PageSourceSearch

https://noman-ai.jp/assets/@sentry--browser-d74e3eb8.js

js noman-ai.jp collected 2026-10-04 18:35:54 UTC 450,964 bytes, 501 lines download raw bytes

1// @sentry/[email protected] bundled for importmap from npm
2
3var tT=Object.defineProperty;var lf=(e,t)=>{for(var n in t)tT(e,n,{get:t[n],enumerable:!0})};var E=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var R=globalThis;var Lt="10.71.0";function Ze(){return Rn(R),R}function Rn(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Lt,t[Lt]=t[Lt]||{}}function cn(e,t,n=R){let r=n.__SENTRY__=n.__SENTRY__||{},i=r[Lt]=r[Lt]||{};return i[e]||(i[e]=t())}var dr=["debug","info","warn","error","log","assert","trace"],nT="Sentry Logger ",zr={};function je(e){if(!("console"in R))return e();let t=R.console,n={},r=Object.keys(zr);r.forEach(i=>{let o=zr[i];n[i]=t[i],t[i]=o});try{return e()}finally{r.forEach(i=>{t[i]=n[i]})}}function rT(){sp().enabled=!0}function iT(){sp().enabled=!1}function pf(){return sp().enabled}function oT(...e){op("log",...e)}function sT(...e){op("warn",...e)}function aT(...e){op("error",...e)}function op(e,...t){E&&pf()&&je(()=>{R.console[e](`${nT}[${e}]:`,...t)})}function sp(){return E?cn("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var g={enable:rT,disable:iT,isEnabled:pf,log:oT,warn:sT,error:aT};var uf=/\(error: (.*)\)/,df=/captureMessage|captureException/;function qo(...e){let t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,i=0)=>{let o=[],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 l=uf.test(c)?c.replace(uf,"$1"):c;if(!l.includes("Error: ")){for(let u of t){let p=u(l);if(p){o.push(p);break}}if(o.length>=50+i)break}}return cp(o.slice(i))}}function Sa(e){return Array.isArray(e)?qo(...e):e}function cp(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(ya(t).function||"")&&t.pop(),t.reverse(),df.test(ya(t).function||"")&&(t.pop(),df.test(ya(t).function||"")&&t.pop()),t.slice(0,50).map(n=>({...n,filename:n.filename||ya(t).filename,function:n.function||"?"}))}function ya(e){return e[e.length-1]||{}}var ap="<anonymous>";function ut(e){try{return!e||typeof e!="function"?ap:e.name||ap}catch{return ap}}function jr(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 mf(e){let t=e?.startsWith("file://")?e.slice(7):e;return t?.match(/\/[A-Z]:/)&&(t=t.slice(1)),t}var Wo={},ff={};function it(e,t){return Wo[e]=Wo[e]||[],Wo[e].push(t),()=>{let n=Wo[e];if(n){let r=n.indexOf(t);r!==-1&&n.splice(r,1)}}}function ot(e,t){if(!ff[e]){ff[e]=!0;try{t()}catch(n){E&&g.error(`Error while instrumenting ${e}`,n)}}}function Fe(e,t){let n=e&&Wo[e];if(n)for(let r of n)try{r(t)}catch(i){E&&g.error(`Error while triggering instrumentation handler.
5Type: ${e}
6Name: ${ut(r)}
7Error:`,i)}}var lp=null;function Yo(e){let t="error";it(t,e),ot(t,cT)}function cT(){lp=R.onerror,R.onerror=function(e,t,n,r,i){return Fe("error",{column:r,error:i,line:n,msg:e,url:t}),lp?lp.apply(this,arguments):!1},R.onerror.__SENTRY_INSTRUMENTED__=!0}var pp=null;function zo(e){let t="unhandledrejection";it(t,e),ot(t,lT)}function lT(){pp=R.onunhandledrejection,R.onunhandledrejection=function(e){return Fe("unhandledrejection",e),pp?pp.apply(this,arguments):!0},R.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var gf=Object.prototype.toString;function Ce(e){switch(gf.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return $r(e,Error)}}function Li(e,t){return gf.call(e)===`[object ${t}]`}function Pi(e){return Li(e,"ErrorEvent")}function jo(e){return Li(e,"DOMError")}function Ea(e){return Li(e,"DOMException")}function $e(e){return Li(e,"String")}function On(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Ge(e){return e===null||On(e)||typeof e!="object"&&typeof e!="function"}function Re(e){return Li(e,"Object")}function He(e){return typeof e=="object"&&e!==null}function mr(e){return typeof Event<"u"&&$r(e,Event)}function Ta(e){return Li(e,"RegExp")}function dt(e){return!!(e?.then&&typeof e.then=="function")}function $r(e,t){try{return e instanceof t}catch{return!1}}function $o(e){return typeof Request<"u"&&$r(e,Request)}function ye(e,t,n){if(!(t in e))return;let r=e[t];if(typeof r!="function")return;let i=n(r);typeof i=="function"&&Vo(i,r);try{e[t]=i}catch{E&&g.log(`Failed to replace method "${t}" in object`,e)}}function pe(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{E&&g.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function Vo(e,t){try{let n=t.prototype||{};e.prototype=t.prototype=n,pe(e,"__sentry_original__",t)}catch{}}function fr(e){return e.__sentry_original__}function Ko(e){if(Ce(e))return{message:e.message,name:e.name,stack:e.stack,..._f(e)};
7if(mr(e)){let{type:t,target:n,currentTarget:r,detail:i}=e;return{type:t,target:n,currentTarget:r,...i?{detail:i}:{},..._f(e)}}return e}function _f(e){return He(e)?Object.fromEntries(Object.entries(e)):{}}function va(e){let t=Object.keys(Ko(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}var Ui;function Vr(e){if(Ui!==void 0)return Ui?Ui(e):e();let t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=R;return t in n&&typeof n[t]=="function"?(Ui=n[t],Ui(e)):(Ui=null,e())}function Et(){return Vr(()=>Math.random())}function st(){return Vr(()=>Date.now())}var hf=Symbol.for("sentry.skipNormalization"),pT=Symbol.for("sentry.overrideNormalizationDepth");function bf(e){pe(e,hf,!0)}function yf(e){return!!e[hf]}function Sf(e){let t=e[pT];return typeof t=="number"?t:void 0}var up;function Ia(e){up=e}function he(e,t=100,n=1/0){try{return dp("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Jo(e,t=3,n=100*1024){let r=he(e,t);return mT(r)>n?Jo(e,t-1,n):r}function dp(e,t,n=1/0,r=1/0,i=fT()){let[o,s]=i;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;let a=mp(e,t);if(!a.startsWith("[object "))return a;if(yf(t))return t;let c=Sf(t),l=c!==void 0?c:n;if(l===0)return a.replace("object ","");if(o(t))return"[Circular ~]";let u=t;if(u&&typeof u.toJSON=="function")try{let f=u.toJSON();return dp("",f,l-1,r,i)}catch{}let p=Array.isArray(t)?[]:{},m=0,d=Ko(t);for(let f in d){if(!Object.prototype.hasOwnProperty.call(d,f))continue;if(m>=r){p[f]="[MaxProperties ~]";break}let _=d[f];p[f]=dp(f,_,l-1,r,i),m++}return s(t),p}function mp(e,t){try{if(up){let r=up(t);if(r)return r}return typeof global<"u"&&t===global?"[Global]":typeof t=="number"&&!Number.isFinite(t)?`[${t}]`:typeof t=="function"?`[Function: ${ut(t)}]`:typeof t=="symbol"?`[${String(t)}]`:typeof t=="bigint"?`[BigInt: ${String(t)}]`:`[object ${uT(t)}]`}catch(n){return`**non-serializable** (${n})`}}function uT(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function dT(e){return~-encodeURI(e).split(/%..|./).length}function mT(e){return dT(JSON.stringify(e))}function fT(){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 qe(e,t="[unserializable]"){if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return typeof t=="function"?t(e):t}}function ln(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Di(e,t){let n=e,r=n.length;if(r<=150)return n;t>r&&(t=r);let i=Math.max(t-60,0);i<5&&(i=0);let o=Math.min(i+140,r);return o>r-5&&(o=r),o===r&&(i=Math.max(o-140,0)),n=n.slice(i,o),i>0&&(n=`'{snip} ${n}`),o<r&&(n+=" {snip}"),n}function gr(e,t){if(!Array.isArray(e))return"";let n=[];for(let r=0;r<e.length;r++){let i=e[r];Ge(i)?n.push(String(i)):i instanceof Error?n.push(i.message?`${i.name}: ${i.message}`:i.name):n.push(mp(void 0,i))}return n.join(t)}function _r(e,t,n=!1){return $e(e)?Ta(t)?t.test(e):$e(t)?n?e===t:e.includes(t):typeof t=="function"?t(e):!1:!1}function We(e,t=[],n=!1){for(let r of t)if(_r(e,r,n))return!0;return!1}function gT(){let e=R;return e.crypto||e.msCrypto}var fp;function _T(){return Et()*16}function fe(e=gT()){try{if(e?.randomUUID)return Vr(()=>e.randomUUID()).replace(/-/g,"")}catch{}return fp||(fp="10000000100040008000"+1e11),fp.replace(/[018]/g,t=>(t^(_T()&15)>>t/4).toString(16))}function Ef(e){return e.exception?.values?.[0]}function pn(e){let{message:t,event_id:n}=e;if(t)return t;let r=Ef(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Kr(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type=n||"Error")}function Je(e,t){let n=Ef(e);if(!n)return;let r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...t},t&&"data"in t){let o={...i?.data,...t.data};n.mechanism.data=o}}function Aa(e,t,n=5){if(t.lineno===void 0)return;let r=e.length,i=Math.max(Math.min(r-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,i-n),i).map(s=>Di(s,0));let o=Math.min(r-1,i);t.context_line=Di(e[o],t.colno||0),t.post_context=e.slice(Math.min(i+1,r),i+1+n).map(s=>Di(s,0))}function Xo(e){if(gp(e))return!0;try{pe(e,"__sentry_captured__",!0)}catch{}return!1}function gp(e){try{return e.__sentry_captured__}catch{}}var vf=1e3;function Tt(){return st()/vf}function hT(){let{performance:e}=R;if(!e?.now||!e.timeOrigin)return Tt;let t=e.timeOrigin;return()=>(t+Vr(()=>e.now()))/vf}var Tf;function te(){return(Tf??(Tf=hT()))()}var _p=null;function bT(){let{performance:e}=R;if(!e?.now)return;let t=3e5,n=Vr(()=>e.now()),r=st(),i=e.timeOrigin;if(typeof i=="number"&&Math.abs(i+n-r)<t)return i;let o=e.timing?.navigationStart;return typeof o=="number"&&Math.abs(o+n-r)<t?o:r-n}function le(){return _p===null&&(_p=bT()),_p}function If(e){let t=te(),n={sid:fe(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>yT(n)};return e&&zn(n,e),n}function zn(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||te(),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:fe()),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),t
7ypeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Af(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),zn(e,n)}function yT(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 hr(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;let r={...e};for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=hr(r[i],t[i],n-1));return r}function et(){return fe()}function at(){return fe().substring(16)}function Ra(e){try{let t=R.WeakRef;if(typeof t=="function")return new t(e)}catch{}return e}function Oa(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}var hp="_sentrySpan";function mt(e,t){t?pe(e,hp,Ra(t)):delete e[hp]}function un(e){return Oa(e[hp])}var ST=100,ft=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:et(),sampleRand:Et()}}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...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={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,mt(t,un(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&&zn(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={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this.setTags({[t]:n})}setAttributes(t){return this._attributes={...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={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...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():Re(n)?t:void 0,{tags:i,attributes:o,extra:s,user:a,contexts:c,level:l,fingerprint:u=[],propagationContext:p,conversationId:m}=r||{};return this._tags={...this._tags,...i},this._attributes={...this._attributes,...o},this._extra={...this._extra,...s},this._contexts={...this._contexts,...c},a&&Object.keys(a).length&&(this._user=a),l&&(this._level=l),u.length&&(this._fingerprint=u),p&&(this._propagationContext=p),m&&(this._conversationId=m),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,mt(this,void 0),this._attachments=[],this.setPropagationContext({traceId:et(),sampleRand:Et()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){let r=typeof n=="number"?n:ST;if(r<=0)return this;let i={timestamp:Tt(),...t,message:t.message?ln(t.message,2048):t.message};return this._breadcrumbs.push(i),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:un(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=hr(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){let r=n?.event_id||fe();if(!this._client)return E&&g.warn("No client configured on scope - will not capture exception!"),r;let i=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:i,...n,event_id:r},this),r}captureMessage(t,n,r){let i=r?.event_id||fe();if(!this._client)return E&&g.warn("No client configured on scope - will not capture message!"),i;let o=r?.syntheticException??new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:o,...r,event_id:i},this),i}captureEvent(t,n){let r=t.event_id||n?.event_id||fe();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(E&&g.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 Rf(){return cn("defaultCurrentScope",()=>new ft)}function Of(){return cn("defaultIsolationScope",()=>new ft)}var Nf=e=>e instanceof Promise&&!e[kf],kf=Symbol("chained PromiseLike"),Na=(e,t,n)=>{let r=e.then(i=>(t(i),i),i=>{throw n(i),i});return Nf(r)&&Nf(e)?r:ET(e,r)},ET=(e,t)=>{if(!t)return e;let n=!1;for(let r in e){if(r in t)continue;n=!0;let i=e[r];typeof i=="function"?Object.defineProperty(t,r,{value:(...o)=>i.apply(e,o),enumerable:!0,configurable:!0,writable:!0}):t[r]=i}return n&&Object.assign(t,{[kf]:!0}),t};var bp=class{constructor(t,n){let r;t?r=t:r=new ft;let i;n?i=n:i=new ft,this._stack=[{scope:r}],this._isolationScope=i}withScope(t){let n=this._pushScope(),r;try{r=t(n)}catch(i){throw this._popScope(),i}return dt(r)?Na(r,()=>this._popScope(),()=>this._popScope()):(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 Bi(){let e=Ze(),t=Rn(e);return t.stack=t.stack||new bp(Rf(),Of())}function TT(e){return Bi().withScope(e)}function vT(e,t){let n=Bi();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function xf(e){return Bi().withScope(()=>e(Bi().getIsolationScope()))}function wf(){return{withIsolationScope:xf,withScope:TT,withSetScope:vT,withSetIsolationScope:(e,t)=>xf(t),getCurrentScope:()=>Bi().getScope(),getIsolationScope:()=>Bi().getIsolationScope()}}function jt(e){let t=Rn(e);return t.acs?t.acs:wf()}function IT(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)&&Object.keys(e).includes("value")}function AT(e,t){let{value:n,unit:r}=IT(e)?e:{value:e,unit:void 0},i=RT(n),o=r&&typeof r=="string"?{unit:r}:{};if(i)return{...i,...o};if(!t||t==="skip-undefined"&&n===void 0)return;let s="";try{s=JSON.stringify(n)??""}catch{}return{value:s,type:"string",...o}}function jn(e,t=!1){let n={};for(let[r,i]of Object.entries(e??{})){let o=AT(i,t);o&&(n[r]=o)}return n}function yp(e){if(!e)return 0;let t=0;for(let[n,r]of Object.entries(e)){t+=n.length*2,t+=r.type.length*2,t+=(r.unit?.length??0)*2;let i=r.value;Array.isArray(i)?t+=Cf(i[0])*i.length:Ge(i)?t+=Cf(i):t+=100}return t}function Cf(e){return typeof e=="string"?e.length*2:typeof e=="boolean"?4:typeof e=="number"?8:0}function RT(e){if(Array.isArray(e))return{value:e,type:"array"};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 Mf;function Sp(){return Mf?.()}function ka(){return Mf!==void 0}function k(){let e=Ze();return jt(e).getCurrentScope()}function Z(){let e=Ze();return jt(e).getIsolationScope()}function dn(){return cn("globalScope",()=>new ft)}function Be(...e){let t=Ze(),n=jt(t);if(e.length===2){let[r,i]=e;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(e[0])}function xa(...e){let t=Ze(),n=jt(t);if(e.length===2){let[r,i]=e;return r?n.withSetIsolationScope(r,i):n.withIsolationScope(i)}return n.withIsolationScope(e[0])}function T(){return k().getClient()}function Fi(e){let t=Sp();if(t)return{trace_id:t.traceId,span_id:t.spanId};let n=e.getPropagationContext(),{traceId:r,parentSpanId:i,propagationSpanId:o}=n,s={trace_id:r,span_id:o||at()};return i&&(s.parent_span_id=i),s}var Me="sentry.source",$n="sentry.sample_rate",Gi="sentry.previous_trace_sample_rate",J="sentry.op",q="sentry.origin",wa="sentry.status.message",Vn="sentry.idle_span_finish_reason",mn="sentry.measurement_unit",fn="sentry.measurement_value",Ca="sentry.release",Ma="sentry.environment";var La="sentry.sdk.integrations",Pa="user.id",Ua="user.email",Da="user.ip_address",Ba="user.name",Jr="sentry.custom_span_name",Xr="sentry.profile_id",ct="sentry.exclusive_time";var Fa="http.request.method";var Ga="sentry.link.type",Ha="gen_ai.conversation.id";function Ep(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 Kn(e,t){e.setAttribute("http.response.status_code",t);let n=Ep(t);n.message!=="unknown_error"&&e.setStatus(n)}var Lf="_sentryScope",Pf="_sentryIsolationScope",OT=Symbol.for("sentry.otelSourceInference"),NT=Symbol.for("sentry.otelSourceExplicitlySet"),kT=Symbol.for("sentry.tracerProviderSpan");function br(e,t,n){e&&(pe(e,Pf,Ra(n)),pe(e,Lf,t))}function gn(e){let t=e;return{scope:t[Lf],isolationScope:Oa(t[Pf])}}function Tp(e){return e[OT]===!0}function Uf(e){pe(e,NT,!0)}function vp(e){return e[kT]===!0}var Qo="sentry-";var xT=8192;function Hi(e){let t=wT(e);if(!t)return;let n=Object.entries(t).reduce((r,[i,o])=>{if(i.startsWith(Qo)){let s=i.slice(Qo.length);r[s]=o}return r},{});if(Object.keys(n).length>0)return n}function qa(e){if(!e)return;let t=Object.entries(e).reduce((n,[r,i])=>(i&&(n[`${Qo}${r}`]=i),n),{});return CT(t)}function wT(e){if(!(!e||!$e(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{let r=Df(n);return Object.entries(r).forEach(([i,o])=>{t[i]=o}),t},{}):Df(e)}function Df(e){return e.split(",").map(t=>{let n=t.indexOf("=");if(n===-1)return[];let r=t.slice(0,n),i=t.slice(n+1);return[r,i].map(o=>{try{return decodeURIComponent(o.trim())}catch{return}})}).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function CT(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],i)=>{let o=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,s=i===0?o:`${t},${o}`;return s.length>xT?(E&&g.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):s},"")}var MT=/^o(\d+)\./,LT=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function PT(e){return e==="http"||e==="https"}function Ye(e,t=!1){let{host:n,path:r,pass:i,port:o,projectId:s,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${s}`}function Wa(e){let t=LT.exec(e);if(!t){je(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,i="",o="",s="",a=""]=t.slice(1),c="",l=a,u=l.split("/");if(u.length>1&&(c=u.slice(0,-1).join("/"),l=u.pop()),l){let p=l.match(/^\d+/);p&&(l=p[0])}return Bf({host:o,pass:i,path:c,projectId:l,port:s,protocol:n,publicKey:r})}function Bf(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function UT(e){if(!E)return!0;let{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(g.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:n.match(/^\d+$/)?PT(r)?t&&isNaN(parseInt(t,10))?(g.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(g.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(g.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function DT(e){return e.match(MT)?.[1]}function Ya(e){let t=e.getOptions(),{host:n}=e.getDsn()||{},r;return t.orgId?r=String(t.orgId):n&&(r=DT(n)),r}function Zo(e){let t=typeof e=="string"?Wa(e):Bf(e);
7if(!(!t||!UT(t)))return t}function Pt(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 za=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Ff(e){if(!e)return;let t=e.match(za);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 es(e,t){let n=Ff(e),r=Hi(t);if(!n?.traceId)return{traceId:et(),sampleRand:Et()};let i=BT(n,r);r&&(r.sample_rand=i.toString());let{traceId:o,parentSpanId:s,parentSampled:a}=n;return{traceId:o,parentSpanId:s,sampled:a,dsc:r||{},sampleRand:i}}function ts(e=et(),t=at(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function ns(e=et(),t=at(),n){return`00-${e}-${t}-${n?"01":"00"}`}function BT(e,t){let n=Pt(t?.sample_rand);if(n!==void 0)return n;let r=Pt(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?Et()*r:r+Et()*(1-r):Et()}function Ip(e,t){let n=Ya(e);return t&&n&&t!==n?(g.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)?(g.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 ja=0,is=1,Gf=!1;function Wf(e){let{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:o,status:s,origin:a,links:c}=P(e);return{parent_span_id:o,span_id:t,trace_id:n,data:r,op:i,status:s,origin:a,links:c}}function qi(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:P(e).parent_span_id,o=gn(e).scope,s=r?o?.getPropagationContext().propagationSpanId||at():t;return{parent_span_id:i,span_id:s,trace_id:n}}function os(e){let{traceId:t,spanId:n}=e.spanContext(),r=tt(e);return ts(t,n,r)}function Yf(e){let{traceId:t,spanId:n}=e.spanContext(),r=tt(e);return ns(t,n,r)}function ss(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:r,...i},attributes:o})=>({span_id:t,trace_id:n,sampled:r===is,attributes:o,...i}))}function Rp(e){if(e?.length)return e.map(({context:{spanId:t,traceId:n,traceFlags:r},attributes:i})=>({span_id:t,trace_id:n,sampled:r===is,attributes:i}))}function vt(e){return typeof e=="number"?Hf(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Hf(e.getTime()):te()}function Hf(e){return e>9999999999?e/1e3:e}function P(e){if(Va(e))return e.getSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(jf(e)){let{attributes:r,startTime:i,name:o,endTime:s,status:a,links:c}=e;return{span_id:t,trace_id:n,data:r,description:o,parent_span_id:zf(e),start_timestamp:vt(i),timestamp:vt(s)||void 0,status:as(a),op:r[J],origin:r[q],links:ss(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function yr(e){if(Va(e))return e.getStreamedSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(jf(e)){let{attributes:r,startTime:i,name:o,endTime:s,status:a,links:c}=e;return{name:o,span_id:t,trace_id:n,parent_span_id:zf(e),start_timestamp:vt(i),end_timestamp:vt(s),is_segment:e===Zr(e),status:Ka(a),attributes:Op(r,a),links:Rp(c)}}return{span_id:t,trace_id:n,start_timestamp:0,name:"",end_timestamp:0,status:"ok",is_segment:e===Zr(e)}}function zf(e){return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0}function $a(e){return{...e,attributes:jn(e.attributes),links:e.links?.map(t=>({...t,attributes:jn(t.attributes)}))}}function jf(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function Va(e){return typeof e.getSpanJSON=="function"}function tt(e){let{traceFlags:t}=e.spanContext();return t===is}function as(e){if(!(!e||e.code===0))return e.code===1?"ok":e.message||"internal_error"}function Ka(e){return!e||e.code===1||e.code===0||e.message==="cancelled"?"ok":"error"}function Op(e,t){let n=Ka(t)==="error"?t?.message:void 0;return{...n&&{[wa]:n},...e}}var Qr="_sentryChildSpans",Ap="_sentryRootSpan";function ei(e,t){let n=e[Ap]||e;pe(t,Ap,n),tt(e)&&(!e.isRecording()&&!n.isRecording()||(e[Qr]?e[Qr].add(t):pe(e,Qr,new Set([t]))))}function $f(e,t){e[Qr]&&e[Qr].delete(t)}function Jn(e){let t=new Set;function n(r){if(!t.has(r)&&tt(r)){t.add(r);let i=r[Qr]?Array.from(r[Qr]):[];for(let o of i)n(o)}}return n(e),Array.from(t)}var se=Zr;function Zr(e){return e[Ap]||e}function re(){let e=Ze(),t=jt(e);return t.getActiveSpan?t.getActiveSpan():un(k())}function ti(){Gf||(je(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),Gf=!0)}function Np(e,t){e.updateName(t),e.setAttributes({[Me]:"custom",[Jr]:t})}var Vf=!1;function Ja(){if(Vf)return;function e(){let t=re(),n=t&&se(t);if(n){let r="internal_error";E&&g.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:2,message:r})}}Vf=!0,Yo(e),zo(e)}function ke(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let t=e||T()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function Kf(e){g.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function Xn(e,t){if(!t?.length)return!1;
7for(let n of t){if(GT(n)){if(e.description&&_r(e.description,n))return E&&Kf(e),!0;continue}let r=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!r)continue;let i=n.name?e.description&&_r(e.description,n.name):!0,o=n.op?e.op&&_r(e.op,n.op):!0,s=n.attributes?Object.entries(n.attributes).every(([a,c])=>FT(e.attributes?.[a],c)):!0;if(i&&o&&s)return E&&Kf(e),!0}return!1}function FT(e,t){return typeof e=="string"&&(typeof t=="string"||t instanceof RegExp)?_r(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e===t}function Jf(e,t){let n=t.parent_span_id,r=t.span_id;if(n)for(let i of e)i.parent_span_id===r&&(i.parent_span_id=n)}function GT(e){return typeof e=="string"||e instanceof RegExp}var Xf=Symbol.for("sentry.nonRecordingSpan"),It=class{constructor(t={}){this._traceId=t.traceId||et(),this._spanId=t.spanId||at(),this.dropReason=t.dropReason,pe(this,Xf,!0)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:ja}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,n,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}};function Nn(e){return!!e&&e[Xf]===!0}var _n="production";var Qf="_frozenDsc";function kp(e,t){pe(e,Qf,t)}function Xa(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||_n,release:n.release,public_key:r,trace_id:e,org_id:Ya(t)};return t.emit("createDsc",i),i}function Qn(e,t){let n=t.getPropagationContext();return n.dsc||Xa(n.traceId,e)}function Pe(e){let t=T();if(!t)return{};let n=se(e),r=P(n),i=r.data,o=n.spanContext().traceState,s=o?.get("sentry.sample_rate")??i[$n]??i[Gi];function a(h){return(typeof s=="number"||typeof s=="string")&&(h.sample_rate=`${s}`),h}let c=n[Qf];if(c)return a(c);let l=Nn(n),u=l&&n.dropReason==="ignored";if(l&&(!ke(t.getOptions())||u)){let h=gn(n).scope;if(h){let b={...Qn(t,h)};return u&&(b.sampled="false"),a(b)}}let p=o?.get("sentry.dsc"),m=p&&Hi(p);if(m)return a(m);let d=Xa(e.spanContext().traceId,t),f=i[Me]??i["sentry.segment.name.source"],_=r.description;return f!=="url"&&_&&(d.transaction=_),ke()&&(d.sampled=String(tt(n)),d.sample_rand=o?.get("sentry.sample_rand")??gn(n).scope?.getPropagationContext().sampleRand.toString()),a(d),t.emit("createDsc",d,n),d}function xp(e){let t=Pe(e);return qa(t)}function Zf(e){return pe(e,"_streamed",!0),e}function Zn(e){return!!e&&typeof e=="function"&&"_streamed"in e&&!!e._streamed}function xe(e,t=[]){return[e,t]}function cs(e,t){let[n,r]=e;return[n,[...r,t]]}function At(e,t){let n=e[1];for(let r of n){let i=r[0].type;if(t(r,i))return!0}return!1}function ni(e,t){return At(e,(n,r)=>t.includes(r))}function Qa(e){let t=Rn(R);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function HT(e){let t=Rn(R);return t.decodePolyfill?t.decodePolyfill(e):new TextDecoder().decode(e)}function er(e){let[t,n]=e,r=JSON.stringify(t);function i(o){typeof r=="string"?r=typeof o=="string"?r+o:[Qa(r),o]:r.push(typeof o=="string"?Qa(o):o)}for(let o of n){let[s,a]=o;if(i(`
8${JSON.stringify(s)}
9`),typeof a=="string"||a instanceof Uint8Array)i(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(he(a))}i(c)}}return typeof r=="string"?r:qT(r)}function qT(e){let t=e.reduce((i,o)=>i+o.length,0),n=new Uint8Array(t),r=0;for(let i of e)n.set(i,r),r+=i.length;return n}function Za(e){let t=typeof e=="string"?Qa(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(HT(n(s)))}let i=r(),o=[];for(;t.length;){let s=r(),a=typeof s.length=="number"?s.length:void 0;o.push([s,a?n(a):r()])}return[i,o]}function ec(e){return[{type:"span"},e]}function tc(e){let t=typeof e.data=="string"?Qa(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var eg={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 WT(e){return e in eg}function ls(e){return WT(e)?eg[e]:e}function hn(e){if(!e?.sdk)return;
9let{name:t,version:n}=e.sdk;return{name:t,version:n}}function Wi(e,t,n,r){let i=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(st()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Ye(r)},...i&&{trace:i}}}function YT(e,t){if(!t)return e;let n=e.sdk||{};return e.sdk={...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?{...e.sdk?.settings,...t.settings}:void 0},e}function tg(e,t,n,r){let i=hn(n),o={sent_at:new Date(st()).toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:Ye(t)}},s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return xe(o,[s])}function ng(e,t,n,r){let i=hn(n),o=e.type&&e.type!=="replay_event"?e.type:"event";YT(e,n?.sdk);let s=Wi(e,i,r,t);return delete e.sdkProcessingMetadata,xe(s,[[{type:o},e]])}function rg(e,t){function n(d){return!!d.trace_id&&!!d.public_key}let r=Pe(e[0]),i=t?.getDsn(),o=t?.getOptions().tunnel,s={sent_at:new Date(st()).toISOString(),...n(r)&&{trace:r},...!!o&&i&&{dsn:Ye(i)}},{beforeSendSpan:a,ignoreSpans:c}=t?.getOptions()||{},l=c?.length?e.filter(d=>{let f=P(d);return!Xn({description:f.description,op:f.op,attributes:f.data},c)}):e,u=e.length-l.length;u&&t?.recordDroppedEvent("before_send","span",u);let p=a?d=>{let f=P(d),_=Zn(a)?f:a(f);return _||(ti(),f)}:P,m=[];for(let d of l){let f=p(d);f&&m.push(ec(f))}return xe(s,m)}function ig(e){if(!E)return;let{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=P(e),{spanId:i}=e.spanContext(),o=tt(e),s=se(e),a=s===e,c=`[Tracing] Starting ${o?"sampled":"unsampled"} ${a?"root ":""}span`,l=[`op: ${n}`,`name: ${t}`,`ID: ${i}`];if(r&&l.push(`parent ID: ${r}`),!a){let{op:u,description:p}=P(s);l.push(`root ID: ${s.spanContext().spanId}`),u&&l.push(`root op: ${u}`),p&&l.push(`root description: ${p}`)}g.log(`${c}
10  ${l.join(`
11  `)}`)}function og(e){if(!E)return;let{description:t="< unknown name >",op:n="< unknown op >"}=P(e),{spanId:r}=e.spanContext(),o=se(e)===e,s=`[Tracing] Finishing "${n}" ${o?"root ":""}span "${t}" with ID ${r}`;g.log(s)}function Yi(e,t,n,r=re()){let i=r&&se(r);i&&(E&&g.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),i.addEvent(e,{[fn]:t,[mn]:n}))}function ps(e){if(!e||e.length===0)return;let t={};return e.forEach(n=>{let r=n.attributes||{},i=r[mn],o=r[fn];typeof i=="string"&&typeof o=="number"&&(t[n.name]={value:o,unit:i})}),t}function wp(){return Rn(Ze()).segmentSpanCaptureStrategy}function Ue(e){return e.getOptions().traceLifecycle==="stream"}var sg=1e3,Sr=class{constructor(t={}){this._traceId=t.traceId||et(),this._spanId=t.spanId||at(),this._startTime=t.startTimestamp||te(),this._links=t.links,this._attributes={},this.setAttributes({[q]:"manual",[J]: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._frozen?this:(this._links?this._links.push(t):this._links=[t],this)}addLinks(t){return this._frozen?this:(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?is:ja}}setAttribute(t,n){return this._frozen?this:(n===void 0?delete this._attributes[t]:this._attributes[t]=n,t===Me&&n!==void 0&&Tp(this)&&Uf(this),this)}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._frozen||(this._startTime=vt(t))}setStatus(t){return this._frozen?this:(this._status=t,this)}updateName(t){return this._frozen?this:(this._name=t,Tp(this)||this.setAttribute(Me,"custom"),this)}end(t){if(this._endTime){this._frozen=vp(this);return}this._endTime=vt(t),og(this),this._onSpanEnded(),this._frozen=vp(this)}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[J],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:as(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[q],profile_id:this._attributes[Xr],exclusive_time:this._attributes[ct],measurements:ps(this._events),is_segment:this._isStandaloneSpan&&se(this)===this||void 0,segment_id:this._isStandaloneSpan?se(this).spanContext().spanId:void 0,links:ss(this._links)}}getStreamedSpanJSON(){return{name:this._name??"",span_id:this._spanId,trace_id:this._traceId,parent_span_id:this._parentSpanId,start_timestamp:this._startTime,end_timestamp:this._endTime??this._startTime,is_segment:this._isStandaloneSpan||this===se(this),status:Ka(this._status),attributes:Op(this._attributes,this._status),links:Rp(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){if(this._frozen)return this;E&&g.log("[Tracing] Adding an event to span:",t);let i=ag(n)?n:r||te(),o=ag(n)?{}:n||{}
11,s={name:t,time:vt(i),attributes:o};return this._events.push(s),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){let t=T();t&&(t.emit("spanEnd",this),this._isStandaloneSpan||t.emit("afterSpanEnd",this));let n=se(this),r=this._isStandaloneSpan||this===n;if(this._isStandaloneSpan){this._sampled?jT(rg([this],t)):(E&&g.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}if(!r){let s=wp();if(s){let a=gn(this).scope||k();s.onChildSpanEnded(this,n,c=>this._convertSpanToTransaction(c),a)}return}if(t&&Ue(t)){t.emit("afterSegmentSpanEnd",this);return}let i=gn(this).scope||k(),o=wp();if(o)o.onSegmentSpanEnded(s=>this._convertSpanToTransaction(s),i);else{let s=this._convertSpanToTransaction();s&&i.captureEvent(s)}}_convertSpanToTransaction(t={}){if(!cg(P(this)))return;this._name||(E&&g.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");let{scope:n,isolationScope:r}=gn(this),i=n?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;t.onSpanCaptured?.(this);let o=[];for(let p of Jn(this)){if(p===this||zT(p)||t.isSpanAlreadyCaptured?.(p))continue;let m=P(p);cg(m)&&(t.onSpanCaptured?.(p),o.push(m))}let s=this._attributes[Me];delete this._attributes[Jr];let a=!1;o.forEach(p=>{delete p.data[Jr],p.op?.startsWith("gen_ai.")&&(a=!0)});let c={contexts:{trace:Wf(this)},spans:o.length>sg?o.sort((p,m)=>p.start_timestamp-m.start_timestamp).slice(0,sg):o,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:n,capturedSpanIsolationScope:r,dynamicSamplingContext:Pe(this),hasGenAiSpans:a},request:i,...s&&{transaction_info:{source:s}}},l=ps(this._events);return l&&Object.keys(l).length&&(E&&g.log("[Measurements] Adding measurements to transaction event",JSON.stringify(l,void 0,2)),c.measurements=l),c}};function ag(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function cg(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function zT(e){return e instanceof Sr&&e.isStandaloneSpan()}function jT(e){let t=T();if(!t)return;let n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function us(e,t,n=()=>{},r=()=>{}){let i;try{i=e()}catch(o){throw t(o),n(),o}return $T(i,t,n,r)}function $T(e,t,n,r){return dt(e)?Na(e,i=>{n(),r(i)},i=>{t(i),n()}):(n(),r(e),e)}function lg(e,t,n){if(!ke(e))return[!1];let r,i;typeof e.tracesSampler=="function"?(i=e.tracesSampler({...t,inheritOrSampleWith:a=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):a}),r=!0):t.parentSampled!==void 0?i=t.parentSampled:typeof e.tracesSampleRate<"u"&&(i=e.tracesSampleRate,r=!0);let o=Pt(i);if(o===void 0)return E&&g.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(i)} of type ${JSON.stringify(typeof i)}.`),[!1];if(!o)return E&&g.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,o,r];let s=n<o;return s||E&&g.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(i)})`),[s,o,r]}var ds="__SENTRY_SUPPRESS_TRACING__";function Ve(e,t){let n=ri();if(n.startSpan)return n.startSpan(e,t);let r=Pp(e),{forceTransaction:i,parentSpan:o,scope:s}=e,a=s?.clone();return Be(a,()=>ug(o)(()=>{let l=k(),u=Up(l,o),p=T(),d=e.onlyIfParent&&!u?Mp(l,p):Lp({parentSpan:u,spanArguments:r,forceTransaction:i,scope:l});return(!Tr(d)||!u)&&mt(l,d),us(()=>t(d),()=>{let{status:f}=P(d);d.isRecording()&&(!f||f==="ok")&&d.setStatus({code:2,message:"internal_error"})},()=>{d.end()})}))}function gt(e,t){let n=ri();if(n.startSpanManual)return n.startSpanManual(e,t);let r=Pp(e),{forceTransaction:i,parentSpan:o,scope:s}=e,a=s?.clone();return Be(a,()=>ug(o)(()=>{let l=k(),u=Up(l,o),m=e.onlyIfParent&&!u?Mp(l,T()):Lp({parentSpan:u,spanArguments:r,forceTransaction:i,scope:l});return(!Tr(m)||!u)&&mt(l,m),us(()=>t(m,()=>m.end()),()=>{let{status:d}=P(m);m.isRecording()&&(!d||d==="ok")&&m.setStatus({code:2,message:"internal_error"})})}))}function Xe(e){let t=ri();return t.startInactiveSpan?t.startInactiveSpan(e):VT(e)}function VT(e){let t=Pp(e),{forceTransaction:n,parentSpan:r}=e;return(e.scope?o=>Be(e.scope,o):r!==void 0?o=>Er(r,o):o=>o())(()=>{let o=k(),s=Up(o,r),a=T();return e.onlyIfParent&&!s?Mp(o,a):Lp({parentSpan:s,spanArguments:t,forceTransaction:n,scope:o})})}var Cp=(e,t)=>{let n=Ze(),r=jt(n);if(r.continueTrace)return r.continueTrace(e,t);let{sentryTrace:i,baggage:o}=e,s=T(),a=Hi(o);return s&&!Ip(s,a?.org_id)?nc(t):Be(c=>{let l=es(i,o);return c.setPropagationContext(l),mt(c,void 0),t()})};function Er(e,t){let n=ri();return n.withActiveSpan?n.withActiveSpan(e,t):Be(r=>(mt(r,e||void 0),t(r)))}function ms(e){let t=ri();return t.suppressTracing?t.suppressTracing(e):Be(n=>{n.setSDKProcessingMetadata({[ds]:!0});let r=e();return n.setSDKProcessingMetadata({[ds]:void 0}),r})}function fs(e=k()){let t=ri();return t.isTracingSuppressed?t.isTracingSuppressed(e):e.getScopeData().sdkProcessingMetadata[ds]===!0}function nc(e){let t=ri();return t.startNewTrace?t.startNewTrace(e):Be(n=>(n.setPropagationContext({traceId:et(),sampleRand:Et()}
11),E&&g.log(`Starting a new trace with id ${n.getPropagationContext().traceId}`),Er(null,e)))}function Mp(e,t){t?.recordDroppedEvent("no_parent_span","span");let n=new It({traceId:e.getPropagationContext().traceId});return br(n,e,Z()),n}function Lp({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){let i=Z();if(!ke()){let a={...i.getPropagationContext(),...r.getPropagationContext()},c=e?e.spanContext().traceId:a.traceId,l=new It({traceId:c});return e&&!n&&ei(e,l),br(l,r,i),l}let o=T();if(JT(o,t)){fs(r)||o?.recordDroppedEvent("ignored","span");let a=new It({dropReason:"ignored",traceId:e?.spanContext().traceId??r.getPropagationContext().traceId});return e&&!n&&ei(e,a),br(a,r,i),a}let s;if(e&&!n)s=KT(e,r,t,i),ei(e,s);else if(e){let a=Pe(e),{traceId:c,spanId:l}=e.spanContext(),u=tt(e);s=pg({traceId:c,parentSpanId:l,...t},r,i,u),kp(s,a)}else{let{traceId:a,dsc:c,parentSpanId:l,sampled:u}={...i.getPropagationContext(),...r.getPropagationContext()};s=pg({traceId:a,parentSpanId:l,...t},r,i,u),c&&kp(s,c)}return ig(s),s}function Pp(e){let n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){let r={...n};return r.startTimestamp=vt(e.startTime),delete r.startTime,r}return n}function ri(){let e=Ze();return jt(e)}function pg(e,t,n,r){let i=T(),o=i?.getOptions()||{},{name:s=""}=e,a={spanAttributes:{...e.attributes},spanName:s,parentSampled:r};i?.emit("beforeSampling",a,{decision:!1});let c=a.parentSampled??r,l=a.spanAttributes,u=t.getPropagationContext(),p=fs(t),[m,d,f]=p?[!1]:lg(o,{name:s,parentSampled:c,attributes:l,normalizedRequest:n.getScopeData().sdkProcessingMetadata.normalizedRequest,parentSampleRate:Pt(u.dsc?.sample_rate)},u.sampleRand),_=new Sr({...e,attributes:{[Me]:"custom",[$n]:d!==void 0&&f?d:void 0,...l},sampled:m});return!m&&i&&!p&&(E&&g.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),i.recordDroppedEvent("sample_rate",Ue(i)?"span":"transaction")),br(_,t,n),i&&i.emit("spanStart",_),_}function KT(e,t,n,r){let{spanId:i,traceId:o}=e.spanContext(),s=fs(t),a=s?!1:tt(e),c=a?new Sr({...n,parentSpanId:i,traceId:o,sampled:a}):new It({traceId:o});ei(e,c),br(c,t,r);let l=T();return l&&(Ue(l)&&Nn(c)&&(Nn(e)&&e.dropReason?(c.dropReason=e.dropReason,l.recordDroppedEvent(e.dropReason,"span")):s||(c.dropReason="sample_rate",l.recordDroppedEvent("sample_rate","span"))),l.emit("spanStart",c),n.endTimestamp&&(l.emit("spanEnd",c),l.emit("afterSpanEnd",c))),c}function Up(e,t){if(t)return t;if(t===null)return;let n=un(e);if(!n)return;let r=T();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?se(n):n}function ug(e){return e!==void 0?t=>Er(e,t):t=>t()}function JT(e,t){let n=e?.getOptions().ignoreSpans;return!e||!Ue(e)||!n?.length?!1:Xn({description:t.name||"",op:t.attributes?.[J]||t.op,attributes:t.attributes},n)}function Tr(e){return Nn(e)&&e.dropReason==="ignored"}var zi={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},XT="heartbeatFailed",QT="idleTimeout",ZT="finalTimeout",ev="externalFinish";function rc(e,t={}){let n=new Map,r=!1,i,o=ev,s=!t.disableAutoFinish,a=[],{idleTimeout:c=zi.idleTimeout,finalTimeout:l=zi.finalTimeout,childSpanTimeout:u=zi.childSpanTimeout,beforeSpanEnd:p,trimIdleSpanEndTimestamp:m=!0}=t,d=T(),f=k();if(!d||!ke()){let y=new It({traceId:f.getPropagationContext().traceId});return br(y,f,Z()),y}let _=re(),h=tv(e);h.end=new Proxy(h.end,{apply(y,x,z){if(p&&p(h),Nn(x))return;let[A,...U]=z,w=A||te(),D=vt(w),H=Jn(h).filter(B=>B!==h),oe=P(h);if(!H.length||!m)return L(D),Reflect.apply(y,x,[D,...U]);let ae=d.getOptions().ignoreSpans,W=H?.reduce((B,ee)=>{let _e=P(ee);return!_e.timestamp||ae&&Xn({description:_e.description,op:_e.op,attributes:_e.data},ae)?B:B?Math.max(B,_e.timestamp):_e.timestamp},void 0),M=oe.start_timestamp,Y=Math.min(M?M+l/1e3:1/0,Math.max(M||-1/0,Math.min(D,W||1/0)));return L(Y),Reflect.apply(y,x,[Y,...U])}});function b(){i&&(clearTimeout(i),i=void 0)}function S(y){b(),i=setTimeout(()=>{!r&&n.size===0&&s&&(o=QT,h.end(y))},c)}function N(y){i=setTimeout(()=>{!r&&s&&(o=XT,h.end(y))},u)}function I(y){b(),n.set(y,!0);let x=te();N(x+u/1e3)}function C(y){if(n.has(y)&&n.delete(y),n.size===0){let x=te();S(x+c/1e3)}}function L(y){r=!0,n.clear(),a.forEach(H=>H()),mt(f,_);let x=P(h),{start_timestamp:z}=x;if(!z)return;x.data[Vn]||h.setAttribute(Vn,o);let U=x.status;(!U||U==="unknown")&&h.setStatus({code:1}),g.log(`[Tracing] Idle span "${x.op}" finished`);let w=Jn(h).filter(H=>H!==h),D=0;
11w.forEach(H=>{H.isRecording()&&(H.setStatus({code:2,message:"cancelled"}),H.end(y),E&&g.log("[Tracing] Cancelling span since span ended early",JSON.stringify(H,void 0,2)));let oe=P(H),{timestamp:ae=0,start_timestamp:W=0}=oe,M=W<=y,Y=(l+c)/1e3,B=ae-W<=Y;if(E){let ee=JSON.stringify(H,void 0,2);M?B||g.log("[Tracing] Discarding span since it finished after idle span final timeout",ee):g.log("[Tracing] Discarding span since it happened after idle span was finished",ee)}(!B||!M)&&($f(h,H),D++)}),D>0&&h.setAttribute("sentry.idle_span_discarded_spans",D)}return a.push(d.on("spanStart",y=>{if(r||y===h||P(y).timestamp||y instanceof Sr&&y.isStandaloneSpan())return;Jn(h).includes(y)&&I(y.spanContext().spanId)})),a.push(d.on("spanEnd",y=>{r||C(y.spanContext().spanId)})),a.push(d.on("idleSpanEnableAutoFinish",y=>{y===h&&(s=!0,S(),n.size&&N())})),t.disableAutoFinish||S(),setTimeout(()=>{r||(h.setStatus({code:2,message:"deadline_exceeded"}),o=ZT,h.end())},l),h}function tv(e){let t=Xe(e);return mt(k(),t),E&&g.log("[Tracing] Started span is an idle span"),t}function Dp(e,t,n){let r,i,o,s=n?.maxWait?Math.max(n.maxWait,t):0,a=n?.setTimeoutImpl||setTimeout;function c(){return l(),r=e(),r}function l(){i!==void 0&&clearTimeout(i),o!==void 0&&clearTimeout(o),i=o=void 0}function u(){return i!==void 0||o!==void 0?c():r}function p(){return i&&clearTimeout(i),i=a(c,t),s&&o===void 0&&(o=a(c,s)),r}return p.cancel=l,p.flush=u,p}var nv=["addListener","on","once","prependListener","prependOnceListener","addEventListener"],rv=["removeListener","off","removeEventListener"],dg=Symbol("SentryScopeBoundListeners"),ji;function iv(e){return ji!==void 0&&(e===ji||e.listener===ji)}function mg(e,t=k()){let n=e;if(ic(n))return e;Bp(n);for(let r of nv)typeof n[r]=="function"&&(n[r]=sv(n,n[r],t));for(let r of rv)typeof n[r]=="function"&&(n[r]=av(n,n[r]));return typeof n.removeAllListeners=="function"&&(n.removeAllListeners=cv(n,n.removeAllListeners)),e}function ov(e,t){return function(...n){return Be(t,()=>e.apply(this,n))}}function fg(e){return typeof e=="function"}function sv(e,t,n){return function(...r){let i=r[0],o=r[1],s=r.slice(2);if(!fg(o)||iv(o))return t.apply(this,r);let a=ic(e)||Bp(e),c=a.get(i);c||(c=new WeakMap,a.set(i,c));let l=c.get(o);l||(l=ov(o,n),c.set(o,l));let u=ji;ji=l;try{return t.call(this,i,l,...s)}finally{ji=u}}}function av(e,t){return function(...n){let r=n[0],i=n[1],o=n.slice(2),s=fg(i)?ic(e)?.get(r)?.get(i):void 0;return s?t.call(this,r,s,...o):t.apply(this,n)}}function cv(e,t){return function(...n){let r=ic(e);if(r)if(n.length===0)Bp(e);else{let i=n[0];r.delete(i)}return t.apply(this,n)}}function Bp(e){let t=new Map;return e[dg]=t,t}function ic(e){return e[dg]}function _g(e,t){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=t;lv(e,t),r&&dv(e,r),mv(e,n),pv(e,i),uv(e,o)}function gg(e,t){let{extra:n,tags:r,attributes:i,user:o,contexts:s,level:a,sdkProcessingMetadata:c,breadcrumbs:l,fingerprint:u,eventProcessors:p,attachments:m,propagationContext:d,transactionName:f,span:_}=t;gs(e,"extra",n),gs(e,"tags",r),gs(e,"attributes",i),gs(e,"user",o),gs(e,"contexts",s),e.sdkProcessingMetadata=hr(e.sdkProcessingMetadata,c,2),a&&(e.level=a),f&&(e.transactionName=f),_&&(e.span=_),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),p.length&&(e.eventProcessors=[...e.eventProcessors,...p]),m.length&&(e.attachments=[...e.attachments,...m]),e.propagationContext={...e.propagationContext,...d}}function gs(e,t,n){e[t]=hr(e[t],n,1)}function kn(e,t){let n=dn().getScopeData();return e&&gg(n,e.getScopeData()),t&&gg(n,t.getScopeData()),n}function lv(e,t){let{extra:n,tags:r,user:i,contexts:o,level:s,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(i).length&&(e.user={...i,...e.user}),Object.keys(o).length&&(e.contexts={...o,...e.contexts}),s&&(e.level=s),a&&e.type!=="transaction"&&(e.transaction=a)}function pv(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function uv(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function dv(e,t){e.contexts={trace:qi(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Pe(t),...e.sdkProcessingMetadata};let n=se(t),r=P(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function mv(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 hg(e){let t={},{response:n,profile:r,cloud_resource:i,culture:o,state:s}=e;if(n&&(n.status_code!=null&&(t["http.response.status_code"]=n.status_code),n.body_size!=null&&(t["http.response.body.size"]=n.body_size)),r&&(r.profile_id&&(t["sentry.profile_id"]=r.profile_id),r.profiler_id&&(t["sentry.profiler_id"]=r.profiler_id)),i)for(let[l,u]of Object.entries(i))u!=null&&(t[l]=u);o&&(o.locale&&(t["culture.locale"]=o.locale),o.timezone&&(t["culture.timezone"]=o.timezone)),s?.state&&typeof s.state.type=="string"&&(t["state.type"]=s.state.type);let a=e.angular;if(a){let l=a.version;(typeof l=="string"||typeof l=="number")&&(t["angular.version"]=l)}let c=e.react;if(c){let l=c.version;(typeof l=="string"||typeof l=="number")&&(t["react.version"]=l)}return t}var Fp="graphql.document";var oc="http.url";var bg="sentry.sdk.name",yg="sentry.sdk.version",Sg="sentry.segment.id";var _s="sentry.segment.name";var Eg="sentry.trace_lifecycle";var Gp="sentry.transaction";var Ut="url.full",Tg="url.path";function sc(e,t){let n=yr(e),r=Zr(e),i=yr(r),{isolationScope:o,scope:s}=gn(e),a=kn(o,s);_v(n,i,t,a);let c=e.kind;t.emit("preprocessSpan",n,{spanKind:c}),n.is_segment&&(fv(n,a),gv(n,t),t.emit("processSegmentSpan",n)),t.emit("processSpan",n);let{beforeSendSpan:l}=t.getOptions(),u=l&&Zn(l)?hv(n,l):n,p=u.attributes?.[Me];return n.is_segment&&p&&Dt(u,{"sentry.segment.name.source":p}),{...$a(u),_segmentSpan:r}}function fv(e,t){let n=hg(t.contexts);Dt(e,n)}function Dt(e,t){let n=e.attributes??(e.attributes={});Object.entries(t).forEach(([r,i])=>{i!=null&&!(r in n)&&(n[r]=i)})}
11function gv(e,t){let n=t.getIntegrationNames();n.length&&Dt(e,{[La]:n})}function _v(e,t,n,r){let i=n.getSdkMetadata(),{release:o,environment:s}=n.getOptions();Dt(e,{[Eg]:"stream",[_s]:t.name,[Sg]:t.span_id,[bg]:i?.sdk?.name,[yg]:i?.sdk?.version,[Ca]:o,[Ma]:s||_n,[Pa]:r.user?.id,[Ua]:r.user?.email,[Da]:r.user?.ip_address,[Ba]:r.user?.username,...r.attributes})}function hv(e,t){let n=t(e);return n||(ti(),e)}var Hp=0,vg=1,Ig=2;function xn(e){return new hs(t=>{t(e)})}function bs(e){return new hs((t,n)=>{n(e)})}var hs=class e{constructor(t){this._state=Hp,this._handlers=[],this._runExecutor(t)}then(t,n){return new e((r,i)=>{this._handlers.push([!1,o=>{if(!t)r(o);else try{r(t(o))}catch(s){i(s)}},o=>{if(!n)i(o);else try{r(n(o))}catch(s){i(s)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new e((n,r)=>{let i,o;return this.then(s=>{o=!1,i=s,t&&t()},s=>{o=!0,i=s,t&&t()}).then(()=>{if(o){r(i);return}n(i)})})}_executeHandlers(){if(this._state===Hp)return;let t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===vg&&n[1](this._value),this._state===Ig&&n[2](this._value),n[0]=!0)})}_runExecutor(t){let n=(o,s)=>{if(this._state===Hp){if(dt(s)){s.then(r,i);return}this._state=o,this._value=s,this._executeHandlers()}},r=o=>{n(vg,o)},i=o=>{n(Ig,o)};try{t(r,i)}catch(o){i(o)}}};function Ag(e,t,n,r=0){try{let i=qp(t,n,e,r);return dt(i)?i:xn(i)}catch(i){return bs(i)}}function qp(e,t,n,r){let i=n[r];if(!e||!i)return e;let o=i({...e},t);return E&&o===null&&g.log(`Event processor "${i.id||"?"}" dropped event`),dt(o)?o.then(s=>qp(s,t,n,r+1)):qp(o,t,n,r+1)}var ii,Rg,Og,vr;function ac(e){let t=R._sentryDebugIds,n=R._debugIds;if(!t&&!n)return{};let r=t?Object.keys(t):[],i=n?Object.keys(n):[];if(vr&&r.length===Rg&&i.length===Og)return vr;Rg=r.length,Og=i.length,vr={},ii||(ii={});let o=(s,a)=>{for(let c of s){let l=a[c],u=ii?.[c];if(u&&vr&&l)vr[u[0]]=l,ii&&(ii[c]=[u[0],l]);else if(l){let p=e(c);for(let m=p.length-1;m>=0;m--){let f=p[m]?.filename;if(f&&vr&&ii){vr[f]=l,ii[c]=[f,l];break}}}}};return t&&o(r,t),n&&o(i,n),vr}function Wp(e,t){let n=ac(e);if(!n)return[];let r=[];for(let i of t){let o=mf(i);o&&n[o]&&r.push({type:"sourcemap",code_file:i,debug_id:n[o]})}return r}function ys(e,t,n,r,i,o){let{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||fe(),timestamp:t.timestamp||Tt()},l=n.integrations||e.integrations.map(b=>b.name);bv(c,e),Ev(c,l),i&&i.emit("applyFrameMetadata",t),t.type===void 0&&yv(c,e.stackParser);let u=vv(r,n.captureContext);n.mechanism&&Je(c,n.mechanism);let p=i?i.getEventProcessors():[],m=kn(o,u),d=[...n.attachments||[],...m.attachments];d.length&&(n.attachments=d),_g(c,m);let f=[...p,...m.eventProcessors];return(n.data&&n.data.__sentry__===!0?xn(c):Ag(f,c,n)).then(b=>(b&&Sv(b),typeof s=="number"&&s>0?Tv(b,s,a):b))}function bv(e,t){let{environment:n,release:r,dist:i,maxValueLength:o}=t;e.environment=e.environment||n||_n,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i);let s=e.request;s?.url&&o&&(s.url=ln(s.url,o)),o&&e.exception?.values?.forEach(a=>{a.value&&(a.value=ln(a.value,o))})}function yv(e,t){let n=ac(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(i=>{i.filename&&(i.debug_id=n[i.filename])})})}function Sv(e){let t={};if(e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(i=>{i.debug_id&&(i.abs_path?t[i.abs_path]=i.debug_id:i.filename&&(t[i.filename]=i.debug_id),delete i.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,i])=>{n.push({type:"sourcemap",code_file:r,debug_id:i})})}function Ev(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Tv(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:he(i.data,t,n)}}))},...e.user&&{user:he(e.user,t,n)},...e.contexts&&{contexts:he(e.contexts,t,n)},...e.extra&&{extra:he(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=he(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(i=>({...i,...i.data&&{data:he(i.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=he(e.contexts.flags,3,n)),r}function vv(e,t){if(!t)return e;let n=e?e.clone():new ft;return n.update(t),n}function Ng(e){if(e)return Iv(e)?{captureContext:e}:Rv(e)?{captureContext:e}:e}function Iv(e){return e instanceof ft||typeof e=="function"}var Av=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Rv(e){return Object.keys(e).some(t=>Av.includes(t))}function X(e,t){return k().captureException(e,Ng(t))}function Ss(e,t){let n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return k().captureMessage(e,n,r)}function bn(e,t){return k().captureEvent(e,t)}function Es(e,t){Z().setContext(e,t)}function Yp(e){Z().setExtras(e)}function zp(e,t){Z().setExtra(e,t)}function jp(e){Z().setTags(e)}function $p(e,t){Z().setTag(e,t)}function Vp(e){Z().setAttributes(e)}function Kp(e,t){Z().setAttribute(e,t)}function Jp(e){Z().setUser(e)}function Xp(e){Z().setConversationId(e)}function Ts(){return Z().lastEventId()}async function Qp(e){let t=T();return t?t.flush(e):(E&&g.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function Zp(e){let t=T();return t?t.close(e):(E&&g.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}function eu(){return!!T()}function vs(){let e=T();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function Is(e){Z().addEventProcessor(e)}function $i(e){let t=Z(),{user:n}=kn(t,k()),{userAgent:r}=R.navigator||{},i=If({user:n,...r&&{userAgent:r},...e}),o=t.getSession();return o?.status==="ok"&&zn(o,{status:"exited"}),As(),t.setSession(i),i}function As(){let e=Z(),n=k().getSession()||e.getSession();n&&Af(n),kg(),e.setSession()}function kg(){let e=Z(),t=T(),n=e.getSession();n&&t&&t.captureSession(n)}function oi(e=!1){if(e){As();return}kg()}function Ir(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}var xg="7";function wg(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Ov(e){return`${wg(e)}${e.projectId}/envelope/`}function Nv(e,t){let n={sentry_version:xg};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function Rs(e,t,n){return t||`${Ov(e)}?${Nv(e,n)}`}function tu(e,t){let n=Zo(e);if(!n)return"";let r=`${wg(n)}embed/error-page/`,i=`dsn=${Ye(n)}`;for(let o in t)if(o!=="dsn"&&o!=="onClose")if(o==="user"){let s=t.user;if(!s)continue;s.name&&(i+=`&name=${encodeURIComponent(s.name)}`),s.email&&(i+=`&email=${encodeURIComponent(s.email)}`)}else i+=`&${encodeURIComponent(o)}=${encodeURIComponent(t[o])}`;return`${r}?${i}`}var cc=[];function kv(e){let t={};return e.forEach(n=>{let{name:r}=n,i=t[r];
11i&&!i.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function lc(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(i=>{i.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){let i=n(t);r=Array.isArray(i)?i:[i]}else r=t;return kv(r)}function Cg(e,t){let n={};return t.forEach(r=>{r?.beforeSetup&&r.beforeSetup(e)}),t.forEach(r=>{r&&ru(e,r,n)}),n}function nu(e,t){for(let n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function ru(e,t,n){if(n[t.name]){E&&g.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!cc.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),cc.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",(i,o)=>r(i,o,e))}if(typeof t.processEvent=="function"){let r=t.processEvent.bind(t),i=Object.assign((o,s)=>r(o,s,e),{id:t.name});e.addEventProcessor(i)}["processSpan","processSegmentSpan"].forEach(r=>{let i=t[r];typeof i=="function"&&e.on(r,o=>i.call(t,o,e))}),E&&g.log(`Integration installed: ${t.name}`)}function Vi(e){let t=T();if(!t){E&&g.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}var xv="sentry.timestamp.sequence",iu=0,ou;function pc(e){let t=Math.floor(e*1e3);ou!==void 0&&t!==ou&&(iu=0);let n=iu;return iu++,ou=t,{key:xv,value:{value:n,type:"integer"}}}function uc(e,t){return t?Be(t,()=>{let n=re(),r=n?qi(n):Fi(t);return[n?Pe(n):Qn(e,t),r]}):[void 0,void 0]}var Mg={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function su(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function au(){return"npm"}function Lg(){return!su()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function lt(){return typeof window<"u"&&(!Lg()||wv())}function wv(){return R.process?.type==="renderer"}function Cv(e,t){let n=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...lt()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function Pg(e,t,n,r,i){let o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=Ye(r)),xe(o,[Cv(e,i)])}var Mv=100;function wn(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function Lv(e,t){let n=pu(),r=Ug(e);r===void 0?n.set(e,[t]):r.length>=Mv?(lu(e,r),n.set(e,[t])):n.set(e,[...r,t])}function si(e,t=k(),n=Lv){let r=t?.getClient()??T();if(!r){E&&g.warn("No client available to capture log.");return}let{release:i,environment:o,enableLogs:s=!0,beforeSendLog:a}=r.getOptions();if(!s){E&&g.warn("logging option not enabled, log will not be captured.");return}let[,c]=uc(r,t),l={...e.attributes},{user:{id:u,email:p,username:m},attributes:d={}}=kn(Z(),t);wn(l,"user.id",u,!1),wn(l,"user.email",p,!1),wn(l,"user.name",m,!1),wn(l,"sentry.release",i),wn(l,"sentry.environment",o);let{name:f,version:_}=r.getSdkMetadata()?.sdk??{};wn(l,"sentry.sdk.name",f),wn(l,"sentry.sdk.version",_);let h=r.getIntegrationByName("Replay"),b=h?.getReplayId(!0);wn(l,"sentry.replay_id",b),b&&h?.getRecordingMode()==="buffer"&&wn(l,"sentry._internal.replay_is_buffering",!0);let S=e.message;if(On(S)){let{__sentry_template_string__:D,__sentry_template_values__:H=[]}=S;H?.length&&(l["sentry.message.template"]=D),H.forEach((oe,ae)=>{l[`sentry.message.parameter.${ae}`]=oe})}let N=un(t);wn(l,"sentry.trace.parent_span_id",N?.spanContext().spanId);let I={...e,attributes:l};r.emit("beforeCaptureLog",I);let C=a?je(()=>a(I)):I;if(!C){r.recordDroppedEvent("before_send","log_item",1),E&&g.warn("beforeSendLog returned null, log will not be captured.");return}let{level:L,message:y,attributes:x={},severityNumber:z}=C,A=te(),U=pc(A),w={timestamp:A,level:L,body:cu(String(y)),trace_id:c?.trace_id,severity_number:z??Mg[L],attributes:Pv({...jn(d),...jn(x,!0),[U.key]:U.value})};n(r,w),r.emit("afterCaptureLog",C)}function lu(e,t){let n=t??Ug(e)??[];if(n.length===0)return;let r=e.getOptions(),i=Pg(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);pu().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(i)}function Ug(e){return pu().get(e)}function pu(){return cn("clientToLogBufferMap",()=>new WeakMap)}function Pv(e){let t={};for(let[n,r]of Object.entries(e)){let i=cu(n);r.type==="string"?t[i]={...r,value:cu(r.value)}:t[i]=r}return t}function cu(e){let t=Object(e),n=t.isWellFormed,r=t.toWellFormed;return typeof n=="function"&&typeof r=="function"?n.call(e)?e:r.call(e):e}function Uv(e,t){let n=t?"auto":"never";return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{version:2,...lt()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function Dg(e,t,n,r,i){let o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}
11),n&&r&&(o.dsn=Ye(r)),xe(o,[Uv(e,i)])}var Dv=1e3;function tr(e,t,n,r=!0){n&&(r||!(t in e))&&(e[t]=n)}function Bv(e,t){let n=du(),r=Fg(e);r===void 0?n.set(e,[t]):r.length>=Dv?(uu(e,r),n.set(e,[t])):n.set(e,[...r,t])}function Fv(e,t,n){let{release:r,environment:i}=t.getOptions(),o={...e.attributes};tr(o,"user.id",n.id,!1),tr(o,"user.email",n.email,!1),tr(o,"user.name",n.username,!1),tr(o,"sentry.release",r),tr(o,"sentry.environment",i);let{name:s,version:a}=t.getSdkMetadata()?.sdk??{};tr(o,"sentry.sdk.name",s),tr(o,"sentry.sdk.version",a);let c=t.getIntegrationByName("Replay"),l=c?.getReplayId(!0);return tr(o,"sentry.replay_id",l),l&&c?.getRecordingMode()==="buffer"&&tr(o,"sentry._internal.replay_is_buffering",!0),{...e,attributes:o}}function Gv(e,t,n,r){let[,i]=uc(t,n),o=un(n),s=o?o.spanContext().traceId:i?.trace_id,a=o?o.spanContext().spanId:void 0,c=te(),l=pc(c);return{timestamp:c,trace_id:s??"",span_id:a,name:e.name,type:e.type,unit:e.unit,value:e.value,attributes:{...jn(r),...jn(e.attributes,"skip-undefined"),[l.key]:l.value}}}function Bg(e,t){let n=t?.scope??k(),r=t?.captureSerializedMetric??Bv,i=n?.getClient()??T();if(!i){E&&g.warn("No client available to capture metric.");return}let{_experiments:o,enableMetrics:s,beforeSendMetric:a}=i.getOptions();if(!(s??o?.enableMetrics??!0)){E&&g.warn("metrics option not enabled, metric will not be captured.");return}let{user:l,attributes:u}=kn(Z(),n),p=Fv(e,i,l);i.emit("processMetric",p);let m=a||o?.beforeSendMetric,d=m?m(p):p;if(!d){E&&g.log("`beforeSendMetric` returned `null`, will not send metric.");return}let f=Gv(d,i,n,u);E&&g.log("[Metric]",f),r(i,f),i.emit("afterCaptureMetric",d)}function uu(e,t){let n=t??Fg(e)??[];if(n.length===0)return;let r=e.getOptions(),i=Dg(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);du().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(i)}function Fg(e){return du().get(e)}function du(){return cn("clientToMetricBufferMap",()=>new WeakMap)}function Gg(e){let t={trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,name:e.description||"",start_timestamp:e.start_timestamp,end_timestamp:e.timestamp||e.start_timestamp,status:!e.status||e.status==="ok"||e.status==="cancelled"?"ok":"error",is_segment:!1,attributes:{...e.data},links:e.links};return $a(t)}function Hg(e,t){if(e.type!=="transaction"||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||t.getOptions().streamGenAiSpans===!1||Ue(t))return;let n=[],r=[];for(let o of e.spans)o.op?.startsWith("gen_ai.")?n.push(Gg(o)):r.push(o);if(n.length===0)return;e.spans=r;let i=t.getDataCollectionOptions().userInfo?"auto":"never";return[{type:"span",item_count:n.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...lt()&&{ingest_settings:{infer_ip:i,infer_user_agent:i}},items:n}]}var Ki=Symbol.for("SentryBufferFullError");function ai(e=100){let t=new Set;function n(){return t.size<e}function r(s){t.delete(s)}function i(s){if(!n())return bs(Ki);let a=s();return t.add(a),a.then(()=>r(a),()=>r(a)),a}function o(s){if(!t.size)return xn(!0);
11let a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!s)return a;let c=[a,new Promise(l=>Ir(setTimeout(()=>l(!1),s)))];return Promise.race(c)}return{get $(){return Array.from(t)},add:i,drain:o}}var qg=60*1e3;function dc(e,t=st()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?qg:r-t}function Wg(e,t){return e[t]||e.all||0}function Os(e,t,n=st()){return Wg(e,t)>n}function Ns(e,{statusCode:t,headers:n},r=st()){let i={...e},o=n?.["x-sentry-rate-limits"],s=n?.["retry-after"];if(o)for(let a of o.trim().split(",")){let[c,l,,,u]=a.split(":",5),p=parseInt(c,10),m=(isNaN(p)?60:p)*1e3;if(!l)i.all=r+m;else for(let d of l.split(";"))d==="metric_bucket"?(!u||u.split(";").includes("custom"))&&(i[d]=r+m):i[d]=r+m}else s?i.all=r+dc(s,r):t===429&&(i.all=r+60*1e3);return i}var mu=64;function mc(e,t,n=ai(e.bufferSize||mu)){let r={},i=s=>n.drain(s);function o(s){let a=[];if(At(s,(p,m)=>{let d=ls(m);Os(r,d)?e.recordDroppedEvent("ratelimit_backoff",d):a.push(p)}),a.length===0)return Promise.resolve({});let c=xe(s[0],a),l=p=>{if(ni(c,["client_report"])){E&&g.warn(`Dropping client report. Will not send outcomes (reason: ${p}).`);return}At(c,(m,d)=>{e.recordDroppedEvent(p,ls(d))})},u=()=>t({body:er(c)}).then(p=>p.statusCode===413?(E&&g.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),l("send_error"),p):(E&&p.statusCode!==void 0&&(p.statusCode<200||p.statusCode>=300)&&g.warn(`Sentry responded with status code ${p.statusCode} to sent event.`),r=Ns(r,p),p),p=>{throw l("network_error"),E&&g.error("Encountered error running transport request:",p),p});return n.add(u).then(p=>p,p=>{if(p===Ki)return E&&g.error("Skipped sending event because buffer is full."),l("queue_overflow"),Promise.resolve({});throw p})}return{send:o,flush:i}}function Yg(e,t,n){let r=[{type:"client_report"},{timestamp:n||Tt(),discarded_events:e}];return xe(t?{dsn:t}:{},[r])}function fc(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 zg(e){let{trace_id:t,parent_span_id:n,span_id:r,status:i,origin:o,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:i,timestamp:e.timestamp,trace_id:t??"",origin:o,profile_id:s?.[Xr],exclusive_time:s?.[ct],measurements:e.measurements,is_segment:!0}}function jg(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:{...e.data,...e.profile_id&&{[Xr]:e.profile_id},...e.exclusive_time&&{[ct]:e.exclusive_time}}}},measurements:e.measurements}}var ci="[Filtered]",ks=["forwarded","-ip","remote-","via","-user"],fu=["auth","token","secret","session","password","passwd","pwd","key","jwt","bearer","sso","saml","csrf","xsrf","credentials","sid","identity","set-cookie","cookie"],$g=[".sid","sessid","remember","oidc","pkce","nonce","__secure-","__host-","awsalb","awselb","akamai","__stripe","cognito","firebase","supabase","sb-","mfa","2fa"];function Vg(e){return e===!0?{userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:7}:{userInfo:!1,cookies:{deny:ks},httpHeaders:{request:{deny:ks},response:{deny:ks}},httpBodies:[],urlQueryParams:{deny:ks},graphQL:{document:!0,variables:!0},genAI:{inputs:!1,outputs:!1},databaseQueryData:!1,stackFrameVariables:!0,frameContextLines:7}}var Hv={userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0}
11,databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:5};function Kg(e){let t=e.dataCollection!=null?Hv:Vg(e.sendDefaultPii),n=e.dataCollection??{};return{userInfo:n.userInfo??t.userInfo,cookies:n.cookies??t.cookies,httpHeaders:{request:n.httpHeaders?.request??t.httpHeaders.request,response:n.httpHeaders?.response??t.httpHeaders.response},httpBodies:n.httpBodies??t.httpBodies,urlQueryParams:n.urlQueryParams??n.queryParams??t.urlQueryParams,graphQL:{document:n.graphQL?.document??t.graphQL.document,variables:n.graphQL?.variables??t.graphQL.variables},genAI:{inputs:n.genAI?.inputs??t.genAI.inputs,outputs:n.genAI?.outputs??t.genAI.outputs},databaseQueryData:n.databaseQueryData??t.databaseQueryData,stackFrameVariables:n.stackFrameVariables??t.stackFrameVariables,frameContextLines:n.frameContextLines??t.frameContextLines}}var Jg="Not capturing exception because it's already been captured.",Xg="Discarded session because of missing or non-string release",r_=Symbol.for("SentryInternalError"),i_=Symbol.for("SentryDoNotSendEventError"),qv=5e3;function gc(e){return{message:e,[r_]:!0}}function gu(e){return{message:e,[i_]:!0}}function Qg(e){return He(e)&&r_ in e}function Zg(e){return He(e)&&i_ in e}function e_(e,t,n,r,i){let o=0,s,a=!1;e.on(n,()=>{o=0,clearTimeout(s),a=!1}),e.on(t,c=>{if(o+=r(c),o>=8e5)i(e);else if(!a){let l=e.getOptions()._flushInterval??qv;l>0&&(a=!0,s=Ir(setTimeout(()=>{i(e)},l)))}}),e.on("flush",()=>{i(e)})}var xs=class{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=ai(t.transportOptions?.bufferSize??mu),this._dataCollection=Kg(t),t.dsn?this._dsn=Zo(t.dsn):E&&g.warn("No DSN provided, client will not send events."),this._dsn){let r=Rs(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:r})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs??!0,this._options.enableLogs&&e_(this,"afterCaptureLog","flushLogs",jv,lu),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&e_(this,"afterCaptureMetric","flushMetrics",zv,uu)}captureException(t,n,r){let i=fe();if(Xo(t))return E&&g.log(Jg),i;let o={event_id:i,...n};return this._process(()=>this.eventFromException(t,o).then(s=>this._captureEvent(s,o,r)).then(s=>s),"error"),o.event_id}captureMessage(t,n,r,i){let o={event_id:fe(),...r},s=On(t)?t:String(t),a=Ge(t),c=a?this.eventFromMessage(s,n,o):this.eventFromException(t,o);return this._process(()=>c.then(l=>this._captureEvent(l,o,i)),a?"unknown":"error"),o.event_id}captureEvent(t,n,r){let i=fe();if(n?.originalException&&Xo(n.originalException))return E&&g.log(Jg),i;let o={event_id:i,...n},s=t.sdkProcessingMetadata||{},a=s.capturedSpanScope,c=s.capturedSpanIsolationScope,l=t_(t.type);return this._process(()=>this._captureEvent(t,o,a||r,c),l),o.event_id}captureSession(t){this.sendSession(t),zn(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getDataCollectionOptions(){return this._dataCollection}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){let n=this._transport;if(this.emit("flush"),!n)return!0;let r=await this._isClientDoneProcessing(t),i=await n.flush(t);return r&&i}async close(t){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]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(t){let n=this._integrations[t.name];!n&&t.beforeSetup&&t.beforeSetup(this),ru(this,t,this._integrations),n||nu(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=Hg(t,this),i=ng(t,this._dsn,this._options._metadata,this._options.tunnel);for(let o of n.attachments||[])i=cs(i,tc(o));r&&(i=cs(i,r)),this.sendEnvelope(i).then(o=>
11this.emit("afterSendEvent",t,o))}sendSession(t){let{release:n,environment:r=_n}=this._options;if("aggregates"in t){let o=t.attrs||{};if(!o.release&&!n){E&&g.warn(Xg);return}o.release=o.release||n,o.environment=o.environment||r,t.attrs=o}else{if(!t.release&&!n){E&&g.warn(Xg);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);let i=tg(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(i)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){let i=`${t}:${n}`;E&&g.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}on(t,n){let r=this._hooks[t]=this._hooks[t]||new Set,i=(...o)=>n(...o);return r.add(i),()=>{r.delete(i)}}emit(t,...n){let r=this._hooks[t];r&&r.forEach(i=>i(...n))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(n){return E&&g.error("Error while sending envelope:",n),{}}return E&&g.error("Transport disabled"),{}}registerCleanup(t){}dispose(){}_setupIntegrations(){let{integrations:t}=this._options;this._integrations=Cg(this,t),nu(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",i=!1,o=n.exception?.values;if(o){i=!0,r=!1;for(let c of o)if(c.mechanism?.handled===!1){r=!0;break}}let s=t.status==="ok";(s&&t.errors===0||s&&r)&&(zn(t,{...r&&{status:"crashed"},errors:t.errors||Number(i||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,i){let o=this.getOptions(),s=this.getIntegrationNames();return!n.integrations&&s.length&&(n.integrations=s),this.emit("preprocessEvent",t,n),t.type||i.setLastEventId(t.event_id||n.event_id),ys(o,t,n,r,this,i).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:{...a.contexts?.trace,...Fi(r)},...a.contexts};let c=Qn(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=k(),i=Z()){return E&&_u(t)&&g.log(`Captured error event \`${fc(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,i).then(o=>o.event_id,o=>{E&&(Zg(o)?g.log(o.message):Qg(o)?g.warn(o.message):g.warn(o))})}_processEvent(t,n,r,i){let o=this.getOptions(),{sampleRate:s}=o,a=o_(t),c=_u(t),u=`before send for type \`${t.type||"error"}\``,p=typeof s>"u"?void 0:Pt(s),m=t_(t.type);return this._prepareEvent(t,n,r,i).then(d=>{if(d===null)throw this.recordDroppedEvent("event_processor",m),gu("An event processor returned `null`, will not send event.");if(n.data?.__sentry__===!0)return d;let _=Yv(this,o,d,n);return Wv(_,u)}).then(d=>{if(d===null){if(this.recordDroppedEvent("before_send",m),a){let b=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",b)}throw gu(`${u} returned \`null\`, will not send event.`)}let f=r.getSession()||i.getSession();if(c&&f&&this._updateSessionFromEvent(f,d),c&&typeof p=="number"&&Et()>p)throw this.recordDroppedEvent("sample_rate","error"),gu(`Discarding event because it's not included in the random sample (sampling rate = ${s})`);if(a){let h=d.sdkProcessingMetadata?.spanCountBeforeProcessing||0,b=d.spans?d.spans.length:0,S=h-b;S>0&&this.recordDroppedEvent("before_send","span",S)}let _=d.transaction_info;if(a&&_&&d.transaction!==t.transaction){let h="custom";d.transaction_info={..._,source:h}}return this.sendEvent(d,n),d}).then(null,d=>{throw Zg(d)||Qg(d)?d:(this.captureException(d,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:d}),gc(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
12Reason: ${d}`))})}_process(t,n){this._numProcessing++,this._promiseBuffer.add(t).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===Ki&&this.recordDroppedEvent("queue_overflow",n),r))}_clearOutcomes(){let t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{let[i,o]=n.split(":");return{reason:i,category:o,quantity:r}})}_flushOutcomes(){E&&g.log("Flushing outcomes...");let t=this._clearOutcomes();if(t.length===0){E&&g.log("No outcomes to send");return}if(!this._dsn){E&&g.log("No dsn provided, will not send outcomes");return}E&&g.log("Sending outcomes:",t);let n=Yg(t,this._options.tunnel&&Ye(this._dsn));this.sendEnvelope(n)}};function t_(e){return e==="replay_event"?"replay":e||"error"}function Wv(e,t){let n=`${t} must return \`null\` or a valid event.`;if(dt(e))return e.then(r=>{if(!Re(r)&&r!==null)throw gc(n);return r},r=>{throw gc(`${t} rejected with ${r}`)});if(!Re(e)&&e!==null)throw gc(n);return e}function Yv(e,t,n,r){let{beforeSend:i,beforeSendTransaction:o,ignoreSpans:s}=t,a=!Zn(t.beforeSendSpan)&&t.beforeSendSpan,c=n;if(_u(c)&&i)return i(c,r);if(o_(c)){if(a||s){let l=zg(c);if(s?.length&&Xn({description:l.description,op:l.op,attributes:l.data},s))return null;if(a){let u=a(l);u?c=hr(n,jg(u)):ti()}if(c.spans){let u=[],p=c.spans;for(let d of p){if(s?.length&&Xn({description:d.description,op:d.op,attributes:d.data},s)){Jf(p,d);continue}if(a){let f=a(d);f?u.push(f):(ti(),u.push(d))}else u.push(d)}let m=c.spans.length-u.length;m&&e.recordDroppedEvent("before_send","span",m),c.spans=u}}if(o){if(c.spans){let l=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:l}}return o(c,r)}}return c}function _u(e){return e.type===void 0}function o_(e){return e.type==="transaction"}function zv(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+s_(e.attributes)}function jv(e){let t=0;return e.message&&(t+=e.message.length*2),t+s_(e.attributes)}function s_(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*n_(n[0]):Ge(n)?t+=n_(n):t+=100}),t}function n_(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function hu(e,t){t.debug===!0&&(E?g.enable():je(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),k().update(t.initialScope);let r=new e(t);return bu(r),r.init(),r}function bu(e){k().setClient(e)}var yu=100,Su=5e3,$v=36e5;function Eu(e){function t(...n){E&&g.log("[Offline]:",...n)}return n=>{let r=e(n);if(!n.createStore)throw new Error("No `createStore` function was provided");let i=n.createStore(n),o=Su,s;function a(p,m,d){return ni(p,["client_report"])?!1:n.shouldStore?n.shouldStore(p,m,d):!0}function c(p){s&&clearTimeout(s),s=Ir(setTimeout(async()=>{s=void 0;let m=await i.shift();m&&(t("Attempting to send previously queued event"),m[0].sent_at=new Date(st()).toISOString(),u(m,!0).catch(d=>{t("Failed to retry sending",d)}))},p))}function l(){s||(c(o),o=Math.min(o*2,$v))}async function u(p,m=!1){if(!m&&ni(p,["replay_event","replay_recording"]))return await i.push(p),c(yu),{};
12try{if(n.shouldSend&&await n.shouldSend(p)===!1)throw new Error("Envelope not sent because `shouldSend` callback returned false");let d=await r.send(p),f=yu;if(d){if(d.headers?.["retry-after"])f=dc(d.headers["retry-after"]);else if(d.headers?.["x-sentry-rate-limits"])f=6e4;else if((d.statusCode||0)>=400)return d}return c(f),o=Su,d}catch(d){if(await a(p,d,o))return m?await i.unshift(p):await i.push(p),l(),t("Error sending. Event queued.",d),{};throw d}}return n.flushAtStartup&&l(),{send:u,flush:p=>(p===void 0&&(o=Su,c(yu)),r.flush(p))}}}var ws="MULTIPLEXED_TRANSPORT_EXTRA_KEY";function a_(e,t){let n;return At(e,(r,i)=>(t.includes(i)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function Vv(e,t){return n=>{let r=e(n);return{...r,send:async i=>{let o=a_(i,["event","transaction","profile","replay_event"]);return o&&(o.release=t),r.send(i)}}}}function Kv(e,t){return xe(t?{...e[0],dsn:t}:e[0],e[1])}function c_(e,t){return n=>{let r=e(n),i=new Map,o=t||(l=>{let u=l.getEvent();return u?.extra?.[ws]&&Array.isArray(u.extra[ws])?u.extra[ws]:[]});function s(l,u){let p=u?`${l}:${u}`:l,m=i.get(p);if(!m){let d=Wa(l);if(!d)return;let f=Rs(d,n.tunnel);m=u?Vv(e,u)({...n,url:f}):e({...n,url:f}),i.set(p,m)}return[l,m]}async function a(l){function u(f){let _=f?.length?f:["event"];return a_(l,_)}let p=o({envelope:l,getEvent:u}).map(f=>typeof f=="string"?s(f,void 0):s(f.dsn,f.release)).filter(f=>!!f),m=p.length?p:[["",r]];return(await Promise.all(m.map(([f,_])=>_.send(Kv(l,f)))))[0]}async function c(l){let u=[...i.values(),r];return(await Promise.all(u.map(m=>m.flush(l)))).every(m=>m)}return{send:a,flush:c}}}function Tu(e,t){return t.some(n=>e.includes(n))}function Ar(e,t,n){if(t===!1)return{};let r=n!=null?[...fu,...n]:fu,i={};if(t===!0){for(let s of Object.keys(e))i[s]=Tu(s.toLowerCase(),r)?ci:e[s];return i}if("deny"in t){let s=t.deny.map(a=>a.toLowerCase());for(let a of Object.keys(e)){let c=a.toLowerCase(),l=Tu(c,r)||s.some(u=>c.includes(u));i[a]=l?ci:e[a]}return i}let o=t.allow.map(s=>s.toLowerCase());for(let s of Object.keys(e)){let a=s.toLowerCase();if(Tu(a,r))i[s]=ci;else{let c=o.some(l=>a.includes(l));i[s]=c?e[s]:ci}}return i}function l_(e){let t={},n=0;for(;n<e.length;){let r=e.indexOf("=",n);if(r===-1)break;let i=e.indexOf(";",n);if(i===-1)i=e.length;else if(i<r){n=e.lastIndexOf(";",r-1)+1;continue}let o=e.slice(n,r).trim();if(t[o]===void 0){let s=e.slice(r+1,i).trim();s.charCodeAt(0)===34&&(s=s.slice(1,-1));try{t[o]=s.indexOf("%")!==-1?decodeURIComponent(s):s}catch{t[o]=s}}n=i+1}return t}function Cs(e,t){if(t===!1)return{};try{let n=l_(e);return Object.keys(n).length===0?{}:Ar(n,t,$g)}catch{return ci}}var Jv="thismessage:/";function nr(e){return"isRelative"in e}function yn(e,t){let n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=t??(n?Jv:void 0);try{if("canParse"in URL&&!URL.canParse(e,r))return;let i=new URL(e,r);return n?{isRelative:n,pathname:i.pathname,search:i.search,hash:i.hash}:i}catch{}}function Ji(e){if(nr(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 $t(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 Xi(e){return e.split(/[?#]/,1)[0]}function nt(e,t=!0){if(e.startsWith("data:")){let n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",i=e.includes(";base64,"),o=e.indexOf(","),s="";if(t&&o!==-1){let a=e.slice(o+1);s=a.length>10?`${a.slice(0,10)}... [truncated]`:a}return`data:${r}${i?",base64":""}${s?`,${s}`:""}`}return e}function Qi(e,t){let n=t?.getDsn(),r=t?.getOptions().tunnel;return Qv(e,n)||Xv(e,r)}function Xv(e,t){return t?p_(e)===p_(t):!1}function Qv(e,t){let n=yn(e);return!n||nr(n)||!t?!1:Zv(n.hostname,t.host)&&/(^|&|\?)sentry_key=/.test(n.search)}function Zv(e,t){return e===t||t.length>0&&e.endsWith(`.${t}`)}function p_(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function vu(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 Iu=vu;function Au(e){"aggregates"in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function Ru(e,t,n=[t],r="npm"){let i=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};i.name||(i.name=`sentry.javascript.${t}`,i.packages=n.map(o=>({name:`${r}:@sentry/${o}`,version:Lt})),i.version=Lt)}function Zi(e={}){let t=e.client||T();if(!vs()||!t)return{};let n=Ze(),r=jt(n);if(r.getTraceData)return r.getTraceData(e);let i=e.scope||k(),o=e.span||re(),s=Nn(o)&&!ke(t.getOptions());if(!o&&ka())return{};let a=o&&!s?os(o):eI(i),c=o?Pe(o):Qn(t,i),l=qa(c);if(!za.test(a))return g.warn("Invalid sentry-trace data. Cannot generate trace data"),{};let p={"sentry-trace":a,baggage:l};return e.propagateTraceparent&&(p.traceparent=o&&!s?Yf(o):tI(i)),p}function eI(e){let{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return ts(t,r,n)}function tI(e){let{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return ns(t,r,n)}var nI=100;function _t(e,t){let n=T(),r=Z();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:o=nI}=n.getOptions();if(o<=0)return;let a={timestamp:Tt(),...e},c=i?je(()=>i(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,o))}var rI="FunctionToString",u_=new WeakMap,iI=(()=>({name:rI,setupOnce(){let e=Function.prototype.toString;try{Function.prototype.toString=function(...t){let n=fr(this),r;try{u_.has(T())&&n!==void 0&&(r=n)}catch{}return e.apply(r??this,t)}}catch{}},setup(e){u_.set(e,!0)}})),_c=iI;var oI=[/^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$/],sI="EventFilters",Ou=(e={})=>{let t;return{name:sI,setup(n){let r=n.getOptions();t=d_(e,r)},processEvent(n,r,i){if(!t){let o=i.getOptions();t=d_(e,o)}return aI(n,t)?null:n}}},bc=((e={})=>({...Ou(e),name:"InboundFilters"}));function d_(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:oI],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function aI(e,t){if(e.type){if(e.type==="transaction"&&lI(e,t.ignoreTransactions))return E&&g.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
13Event: ${pn(e)}`),!0}else{if(cI(e,t.ignoreErrors))return E&&g.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
14Event: ${pn(e)}`),!0;if(mI(e))return E&&g.warn(`Event dropped due to not having an error message, error type or stacktrace.
15Event: ${pn(e)}`),!0;if(pI(e,t.denyUrls))return E&&g.warn(`Event dropped due to being matched by \`denyUrls\` option.
16Event: ${pn(e)}.
17Url: ${hc(e)}`),!0;if(!uI(e,t.allowUrls))return E&&g.warn(`Event dropped due to not being matched by \`allowUrls\` option.
18Event: ${pn(e)}.
19Url: ${hc(e)}`),!0}return!1}function cI(e,t){return t?.length?fc(e).some(n=>We(n,t)):!1}function lI(e,t){if(!t?.length)return!1;let n=e.transaction;return n?We(n,t):!1}function pI(e,t){if(!t?.length)return!1;let n=hc(e);return n?We(n,t):!1}function uI(e,t){if(!t?.length)return!0;let n=hc(e);return n?We(n,t):!0}function dI(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 hc(e){try{let n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?dI(n):null}catch{return E&&g.error(`Cannot extract url for event ${pn(e)}`),null}}function mI(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function ku(e,t,n,r,i,o){if(!i.exception?.values||!o||!Ce(o.originalException))return;let s=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;s&&(i.exception.values=Nu(e,t,r,o.originalException,n,i.exception.values,s,0))}function Nu(e,t,n,r,i,o,s,a){if(o.length>=n+1)return o;let c=[...o];if(Ce(r[i])){m_(s,a,r);let l=e(t,r[i]),u=c.length;f_(l,i,u,a),c=Nu(e,t,n,r[i],i,[l,...c],l,u)}
19return g_(r)&&r.errors.forEach((l,u)=>{if(Ce(l)){m_(s,a,r);let p=e(t,l),m=c.length;f_(p,`errors[${u}]`,m,a),c=Nu(e,t,n,l,i,[p,...c],p,m)}}),c}function g_(e){return Array.isArray(e.errors)}function m_(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...g_(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function f_(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function fI(e){return Ce(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function yc(e){return fI(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}var h_=new Map,__=new Set;function gI(e){if(R._sentryModuleMetadata)for(let t of Object.keys(R._sentryModuleMetadata)){let n=R._sentryModuleMetadata[t];if(__.has(t))continue;__.add(t);let r=e(t);for(let i of r.reverse())if(i.filename){h_.set(i.filename,n);break}}}function _I(e,t){return gI(e),h_.get(t)}function Sc(e,t){t.exception?.values?.forEach(n=>{n.stacktrace?.frames?.forEach(r=>{if(!r.filename||r.module_metadata)return;let i=_I(e,r.filename);i&&(r.module_metadata=i)})})}function Ec(e){e.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(n=>{delete n.module_metadata})})}var b_=()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",t=>{At(t,(n,r)=>{if(r==="event"){let i=Array.isArray(n)?n[1]:void 0;i&&(Ec(i),n[1]=i)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;let n=e.getOptions().stackParser;Sc(n,t)})}});var y_=new Set([]);function li(e){let t="console",n=it(t,e);return ot(t,hI),n}var S_=new Set;function hI(){"console"in R&&dr.forEach(function(e){S_.has(e)||!(e in R.console)||(S_.add(e),ye(R.console,e,function(t){return zr[e]=t,function(...n){let r=n[0],i=zr[e],o=y_.size&&typeof r=="string"&&We(r,y_);o||Fe("console",{args:n,level:e}),(!o||E&&g.isEnabled())&&i?.apply(R.console,n)}}))})}function rr(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}var bI="CaptureConsole",yI=((e={})=>{let t=e.levels||dr,n=e.handled??!0;return{name:bI,setup(r){"console"in R&&li(({args:i,level:o})=>{T()!==r||!t.includes(o)||SI(i,o,n)})}}}),E_=yI;function SI(e,t,n){let r=rr(t),i=new Error,o={level:rr(t),extra:{arguments:e}};Be(s=>{if(s.addEventProcessor(l=>(l.logger="console",Je(l,{handled:n,type:"auto.core.capture_console"}),l)),t==="assert"){if(!e[0]){let l=`Assertion failed: ${gr(e.slice(1)," ")||"console.assert"}`;s.setExtra("arguments",e.slice(1)),s.captureMessage(l,r,{captureContext:o,syntheticException:i})}return}let a=e.find(l=>l instanceof Error);if(a){X(a,o);return}let c=gr(e," ");s.captureMessage(c,r,{captureContext:o,syntheticException:i})})}var EI="Dedupe",TI=(()=>{let e;return{name:EI,processEvent(t){if(t.type)return t;try{if(vI(t,e))return E&&g.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),Tc=TI;function vI(e,t){return t?!!(II(e,t)||AI(e,t)):!1}function II(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!I_(e,t)||!v_(e,t))}function AI(e,t){let n=T_(t),r=T_(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!I_(e,t)||!v_(e,t))}function v_(e,t){let n=jr(e),r=jr(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let i=0;i<r.length;i++){let o=r[i],s=n[i];if(o.filename!==s.filename||o.lineno!==s.lineno||o.colno!==s.colno||o.function!==s.function)return!1}return!0}function I_(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 T_(e){return e.exception?.values?.[0]}var RI="ExtraErrorData",OI=((e={})=>{let{depth:t=3,captureErrorCause:n=!0}=e;return{name:RI,processEvent(r,i,o){let{maxValueLength:s}=o.getOptions();return NI(r,i,t,n,s)}}}),A_=OI;function NI(e,t={},n,r,i){if(!t.originalException||!Ce(t.originalException))return e;let o=t.originalException.name||t.originalException.constructor.name,s=R_(t.originalException,r,i);if(s){let a={...e.contexts},c=he(s,n);return Re(c)&&(bf(c),a[o]=c),{...e,contexts:a}}return e}function R_(e,t,n){try{let r=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],i={};for(let o of Object.keys(e)){if(r.indexOf(o)!==-1)continue;let s=e[o];i[o]=Ce(s)||typeof s=="string"?n?ln(`${s}`,n):`${s}`:s}if(t&&e.cause!==void 0)if(Ce(e.cause)){let o=e.cause.name||e.cause.constructor.name;i.cause={[o]:R_(e.cause,!1,n)}}else i.cause=e.cause;if(typeof e.toJSON=="function"){let o=e.toJSON();for(let s of Object.keys(o)){let a=o[s];i[s]=Ce(a)?a.toString():a}}return i}catch(r){E&&g.error("Unable to extract extra data from the Error object:",r)}return null}function kI(e,t){let n=0;for(let r=e.length-1;r>=0;r--){let i=e[r];i==="."?e.splice(r,1):i===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}var xI=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function wI(e){let t=e.length>1024?`<truncated>${e.slice(-1024)}
19`:e,n=xI.exec(t);return n?n.slice(1):[]}function O_(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:"/";i&&(t=`${i}/${t}`,n=i.charAt(0)==="/")}return t=kI(t.split("/").filter(r=>!!r),!n).join("/"),(n?"/":"")+t||"."}function N_(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 k_(e,t){e=O_(e).slice(1),t=O_(t).slice(1);let n=N_(e.split("/")),r=N_(t.split("/")),i=Math.min(n.length,r.length),o=i;for(let a=0;a<i;a++)if(n[a]!==r[a]){o=a;break}let s=[];for(let a=o;a<n.length;a++)s.push("..");return s=s.concat(r.slice(o)),s.join("/")}function x_(e,t){let n=wI(e)[2]||"";return t&&n.slice(t.length*-1)===t&&(n=n.slice(0,n.length-t.length)),n}var CI="RewriteFrames",w_=(e={})=>{let t=e.root,n=e.prefix||"app:///",r="window"in R&&!!R.window,i=e.iteratee||MI({isBrowser:r,root:t,prefix:n});function o(a){try{return{...a,exception:{...a.exception,values:a.exception.values.map(c=>({...c,...c.stacktrace&&{stacktrace:s(c.stacktrace)}}))}}}catch{return a}}function s(a){return{...a,frames:a?.frames?.map(c=>i(c))}}return{name:CI,processEvent(a){let c=a;return a.exception&&Array.isArray(a.exception.values)&&(c=o(c)),c}}};function MI({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;let i=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes("\\")&&!r.filename.includes("/"),o=/^\//.test(r.filename);if(e){if(t){let s=r.filename;s.indexOf(t)===0&&(r.filename=s.replace(t,n))}}else if(i||o){let s=i?r.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):r.filename,a=t?k_(t,s):x_(s);r.filename=`${n}${a}`}return r}}var LI=["reauthenticate","signInAnonymously","signInWithOAuth","signInWithIdToken","signInWithOtp","signInWithPassword","signInWithSSO","signOut","signUp","verifyOtp"],PI=["createUser","deleteUser","listUsers","getUserById","updateUserById","inviteUserByEmail"],UI={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"},M_=["select","insert","upsert","update","delete"];function vc(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch{}}function Ic(e){try{return e.__SENTRY_INSTRUMENTED__}catch{return!1}}function L_(e,t){if(Object.keys(t).length>0)return t;if(Array.isArray(e)&&e.length>0)return e}function DI(e,t){return L_(e,t)!==void 0}function P_(e,t){if(!e)return;if(typeof e.get=="function")return e.get(t)??void 0;let n=e,r=t.toLowerCase(),i=Object.keys(n).find(o=>o.toLowerCase()===r);return i!==void 0?n[i]:void 0}function BI(e,t={}){switch(e){case"GET":return"select";case"POST":return P_(t,"Prefer")?.includes("resolution=")?"upsert":"insert";case"PATCH":return"update";case"DELETE":return"delete";default:return"<unknown-op>"}}function FI(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("."),i;return n?.startsWith("fts")?i="textSearch":n?.startsWith("plfts")?i="textSearch[plain]":n?.startsWith("phfts")?i="textSearch[phrase]":n?.startsWith("wfts")?i="textSearch[websearch]":i=n&&UI[n]||"filter",`${i}(${e}, ${r.join(".")})`}function C_(e,t=!1){return new Proxy(e,{apply(n,r,i){return Ve({name:`auth ${t?"(admin) ":""}${e.name}`,attributes:{[q]:"auto.db.supabase",[J]:"db","db.system":"postgresql","db.operation":`auth.${t?"admin.":""}${e.name}`}},o=>Reflect.apply(n,r,i).then(s=>(He(s)&&"error"in s&&s.error?(o.setStatus({code:2}),X(s.error,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}})):o.setStatus({code:1}),o.end(),s)).catch(s=>{throw o.setStatus({code:2}),o.end(),X(s,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}}),s}).then(...i))}})}function GI(e){let t=e.auth;if(!(!t||Ic(e.auth))){for(let n of LI){let r=t[n];r&&typeof e.auth[n]=="function"&&(e.auth[n]=C_(r))}for(let n of PI){let r=t.admin[n];r&&typeof e.auth.admin[n]=="function"&&(e.auth.admin[n]=C_(r,!0))}vc(e.auth)}}function HI(e,t){Ic(e.prototype.from)||(e.prototype.from=new Proxy(e.prototype.from,{apply(n,r,i){let o=Reflect.apply(n,r,i),s=o.constructor;return WI(s,t),o}}),vc(e.prototype.from))}function qI(e,t){Ic(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(n,r,i){let o=M_,s=r,a=BI(s.method,s.headers);if(!o.includes(a)||!s?.url?.pathname||typeof s.url.pathname!="string")return Reflect.apply(n,r,i);let c=s.url.pathname.split("/"),l=c.length>0?c[c.length-1]:"",u=[];
19for(let[I,C]of s.url.searchParams.entries())u.push(FI(I,C));let p=Object.create(null);if(Re(s.body))for(let[I,C]of Object.entries(s.body))p[I]=C;let m=T(),d=t.sendOperationData??m?.getDataCollectionOptions().databaseQueryData===!0,f=L_(s.body,p),_=a==="select"?"":`${a}${DI(s.body,p)?"(...) ":""}`,h=d?u.join(" "):u.length>0?"[redacted]":"",b=[_.trimEnd(),h].filter(Boolean).join(" "),S=b?`${b} from(${l})`:`from(${l})`,N={"db.table":l,"db.schema":s.schema,"db.url":s.url.origin,"db.sdk":P_(s.headers,"X-Client-Info"),"db.system":"postgresql","db.operation":a,[q]:"auto.db.supabase",[J]:"db"};return u.length&&d&&(N["db.query"]=u),f!==void 0&&d&&(N["db.body"]=f),Ve({name:S,attributes:N},I=>Reflect.apply(n,r,[]).then(C=>{if(I&&(C&&typeof C=="object"&&"status"in C&&Kn(I,C.status||500),I.end()),C?.error){let x=new Error(C.error.message);C.error.code&&(x.code=C.error.code),C.error.details&&(x.details=C.error.details);let z={};u.length&&d&&(z.query=u),f!==void 0&&d&&(z.body=f),X(x,A=>(A.addEventProcessor(U=>(Je(U,{handled:!1,type:"auto.db.supabase.postgres"}),U)),A.setContext("supabase",z),A))}let L={type:"supabase",category:`db.${a}`,message:S},y={};return u.length&&d&&(y.query=u),f!==void 0&&d&&(y.body=f),Object.keys(y).length&&(L.data=y),_t(L),C},C=>{throw I&&(Kn(I,500),I.end()),C}).then(...i))}}),vc(e.prototype.then))}function WI(e,t){for(let n of M_)Ic(e.prototype[n])||(e.prototype[n]=new Proxy(e.prototype[n],{apply(r,i,o){let s=Reflect.apply(r,i,o),a=s.constructor;return E&&g.log(`Instrumenting ${n} operation's PostgRESTFilterBuilder`),qI(a,t),s}}),vc(e.prototype[n]))}var xu=(e,t={})=>{if(!e){E&&g.warn("Supabase integration was not installed because no Supabase client was provided.");return}let n=e.constructor===Function?e:e.constructor;HI(n,t),GI(e)},YI="Supabase",zI=((e,t)=>({setupOnce(){xu(e,t)},name:YI})),U_=e=>zI(e.supabaseClient,{sendOperationData:e.sendOperationData});var jI=10,$I="ZodErrors";function VI(e){return Ce(e)&&e.name==="ZodError"&&Array.isArray(e.issues)}function KI(e){return{...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 JI(e){return e.map(t=>typeof t=="number"?"<array>":t).join(".")}function XI(e){let t=new Set;for(let r of e.issues){let i=JI(r.path);i.length>0&&t.add(i)}let n=Array.from(t);if(n.length===0){let r="variable";if(e.issues.length>0){let i=e.issues[0];i!==void 0&&"expected"in i&&typeof i.expected=="string"&&(r=i.expected)}return`Failed to validate ${r}`}return`Failed to validate keys: ${ln(n.join(", "),100)}`}function QI(e,t=!1,n,r){if(!n.exception?.values||!r.originalException||!VI(r.originalException)||r.originalException.issues.length===0)return n;try{let o=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(KI);return t&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({filename:"zod_issues.json",data:JSON.stringify({issues:o})})),{...n,exception:{...n.exception,values:[{...n.exception.values[0],value:XI(r.originalException)},...n.exception.values.slice(1)]},extra:{...n.extra,"zoderror.issues":o.slice(0,e)}}}catch(i){return{...n,extra:{...n.extra,"zoderrors sentry integration parse error":{message:"an exception was thrown while processing ZodError within applyZodErrorsToEvent()",error:i instanceof Error?`${i.name}: ${i.message}
20${i.stack}`:"unknown"}}}}}var ZI=((e={})=>{let t=e.limit??jI;return{name:$I,processEvent(n,r){return QI(t,e.saveZodIssuesAsAttachment,n,r)}}}),D_=ZI;var F_=e=>({name:"ThirdPartyErrorsFilter",setup(t){t.on("beforeEnvelope",n=>{At(n,(r,i)=>{if(i==="event"){let o=Array.isArray(r)?r[1]:void 0;o&&(Ec(o),r[1]=o)}})}),t.on("applyFrameMetadata",n=>{if(n.type)return;let r=t.getOptions().stackParser;Sc(r,n)})},preprocessEvent(t){e.ignoreSentryInternalFrames&&(R._sentryWrappedDepth??0)>0&&(t.sdkProcessingMetadata={...t.sdkProcessingMetadata,insideSentryWrapped:!0})},processEvent(t){let n=e.ignoreSentryInternalFrames?t.sdkProcessingMetadata?.insideSentryWrapped===!0&&t.exception?.values?.length===1:!1,r=t0(t,e.ignoreSentryInternalFrames,n);if(r){let i=e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="apply-tag-if-contains-third-party-frames"?"some":"every";if(r[i](s=>!s.some(a=>e.filterKeys.includes(a)))){if(e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="drop-error-if-exclusively-contains-third-party-frames")return null;t.tags={...t.tags,third_party_code:!0}}}return t}});function e0(e,t,n){if(t!==0)return!1;if(n&&n0(e)||e.function==="sentryWrapped")return!0;
20if(!e.context_line||!e.filename||!e.filename.includes("sentry")||!e.filename.includes("helpers")||!e.context_line.includes(i0))return!1;if(e.pre_context){let r=e.pre_context.length;for(let i=0;i<r;i++)if(e.pre_context[i]?.includes(r0))return!0}return!1}function t0(e,t,n){let r=jr(e);if(r)return r.filter((i,o)=>!i.filename||i.lineno==null&&i.colno==null&&i.instruction_addr==null?!1:!t||!e0(i,o,!!n)).map(i=>i.module_metadata?Object.keys(i.module_metadata).filter(o=>o.startsWith(B_)).map(o=>o.slice(B_.length)):[])}function n0(e){return!e.context_line&&!e.pre_context&&!!e.function&&e.function.length<=2}var B_="_sentryBundlerPluginAppKey:",r0="Attempt to invoke user-land function",i0="fn.apply(this, wrappedArguments)";var G_=100,H_=10,Ac="flag.evaluation.";function Bt(e){if(e.type)return e;let n=k().getScopeData().contexts.flags,r=n?n.values:[];return r.length&&(e.contexts===void 0&&(e.contexts={}),e.contexts.flags={values:[...r]}),e}function Rt(e,t,n=G_){let r=k().getScopeData().contexts;r.flags||(r.flags={values:[]});let i=r.flags.values;o0(i,e,t,n)}function o0(e,t,n,r){if(typeof n!="boolean")return;if(e.length>r){E&&g.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${r}`);return}let i=e.findIndex(o=>o.flag===t);i!==-1&&e.splice(i,1),e.length===r&&e.shift(),e.push({flag:t,result:n})}function Ot(e,t,n=H_){if(typeof t!="boolean")return;let r=re();if(!r)return;let i=P(r).data;if(`${Ac}${e}`in i){r.setAttribute(`${Ac}${e}`,t);return}Object.keys(i).filter(s=>s.startsWith(Ac)).length<n&&r.setAttribute(`${Ac}${e}`,t)}var q_=()=>({name:"FeatureFlags",processEvent(e,t,n){return Bt(e)},addFeatureFlag(e,t){Rt(e,t),Ot(e,t)}});var wu=({growthbookClass:e})=>({name:"GrowthBook",setupOnce(){let t=e.prototype;typeof t.isOn=="function"&&ye(t,"isOn",W_),typeof t.getFeatureValue=="function"&&ye(t,"getFeatureValue",W_)},processEvent(t,n,r){return Bt(t)}});function W_(e){return function(...t){let n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"&&(Rt(n,r),Ot(n,r)),r}}var s0="ConversationId",a0=(()=>({name:s0,setup(e){e.on("spanStart",t=>{let n=k().getScopeData(),r=Z().getScopeData(),i=n.conversationId||r.conversationId;if(i){let{op:o,data:s,description:a}=P(t);if(!o?.startsWith("gen_ai.")&&!s["ai.operationId"]&&!a?.startsWith("ai."))return;t.setAttribute(Ha,i)}})}})),Cu=a0;function Mu(e,t,n,r,i){if(!e.fetchData)return;let{method:o,url:s}=e.fetchData,a=ke()&&t(s);if(e.endTimestamp){let _=e.fetchData.__span;if(!_)return;let h=r[_];h&&(a&&(l0(h,e),c0(h,e,i)),delete r[_]);return}let{spanOrigin:c="auto.http.browser",propagateTraceparent:l=!1}=typeof i=="object"?i:{spanOrigin:i},u=T(),p=!!re(),m=p||!!u&&Ue(u),d=a&&m?Xe(d0(s,o,c)):new It,f=Tr(d)&&p?void 0:d;if(a&&!m&&u?.recordDroppedEvent("no_parent_span","span"),e.fetchData.__span=d.spanContext().spanId,r[d.spanContext().spanId]=d,n(e.fetchData.url)){let _=e.args[0],h={...e.args[1]||{}},b=z_(_,h,ke()&&m?f:void 0,l);b&&(e.args[1]=h,h.headers=b)}if(u){let _={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};u.emit("beforeOutgoingRequestSpan",d,_)}return d}function c0(e,t,n){(typeof n=="object"&&n!==null?n.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function z_(e,t,n,r){let i=Zi({span:n,propagateTraceparent:r}),o=i["sentry-trace"],s=i.baggage,a=i.traceparent;if(!o)return;let c=t.headers||($o(e)?e.headers:void 0);if(c)if(p0(c)){let l=new Headers(c);if(l.get("sentry-trace")||l.set("sentry-trace",o),r&&a&&!l.get("traceparent")&&l.set("traceparent",a),s){let u=l.get("baggage");u?Rc(u)||l.set("baggage",`${u},${s}`):l.set("baggage",s)}return l}else if(u0(c)){let l=[...c];l.find(p=>p[0]==="sentry-trace")||l.push(["sentry-trace",o]),r&&a&&!l.find(p=>p[0]==="traceparent")&&l.push(["traceparent",a]);let u=c.find(p=>p[0]==="baggage"&&typeof p[1]=="string"&&Rc(p[1]));return s&&!u&&l.push(["baggage",s]),l}else{let l="sentry-trace"in c?c["sentry-trace"]:void 0,u="traceparent"in c?c.traceparent:void 0,p="baggage"in c?c.baggage:void 0,m=p?Array.isArray(p)?[...p]:[p]:[],d=p&&(Array.isArray(p)?p.find(_=>Rc(_)):Rc(p));s&&!d&&m.push(s);let f=Object.assign({},c,{"sentry-trace":l??o,...m.length>0&&{baggage:m.join(",")}});return r&&a&&!u&&(f.traceparent=a),f}else return{"sentry-trace":o,...s&&{baggage:s},...a&&{traceparent:a}}}function l0(e,t){if(t.response){Kn(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 Rc(e){return typeof e!="string"?!1:e.split(",").some(t=>t.trim().startsWith(Qo))}function p0(e){return typeof Headers<"u"&&$r(e,Headers)}function u0(e){return Array.isArray(e)?e.every(t=>Array.isArray(t)&&t.length===2&&typeof t[0]=="string"):!1}function d0(e,t,n){if(e.startsWith("data:")){let o=nt(e);return{name:`${t} ${o}`,attributes:Y_(e,void 0,t,n)}}let r=yn(e),i=r?Ji(r):e;return{name:`${t} ${i}`,attributes:Y_(e,r,t,n)}}function Y_(e,t,n,r){let i={url:nt(e),type:"fetch","http.method":n,[q]:r,[J]:"http.client"};return t&&(nr(t)||(i[oc]=nt(t.href),i[Ut]=nt(t.href),i["server.address"]=t.host),t.search&&(i["http.query"]=t.search),t.hash&&(i["http.fragment"]=t.hash)),i}function Ms(e,t={},n=k()){let{message:r,name:i,email:o,url:s,source:a,associatedEventId:c,tags:l}=e,u={contexts:{feedback:{contact_email:o,name:i,message:r,url:s,source:a,associated_event_id:c}},type:"feedback",level:"info",tags:l},p=n?.getClient()||T();return p&&p.emit("beforeSendFeedback",u,t),n.captureEvent(u,t)}var Lu={};lf(Lu,{debug:()=>f0,error:()=>h0,fatal:()=>b0,fmt:()=>Iu,info:()=>g0,trace:()=>m0,warn:()=>_0});function eo(e,t,n,r,i){si({level:e,message:t,attributes:n,severityNumber:i},r)}function m0(e,t,{scope:n}={}){eo("trace",e,t,n)}function f0(e,t,{scope:n}={}){eo("debug",e,t,n)}function g0(e,t,{scope:n}={}){eo("info",e,t,n)}function _0(e,t,{scope:n}={}){eo("warn",e,t,n)}function h0(e,t,{scope:n}={}){eo("error",e,t,n)}function b0(e,t,{scope:n}={}){eo("fatal",e,t,n)}function to(e,t,n){return"util"in R&&typeof R.util.format=="function"?R.util.format(...e):y0(e,t,n)}function y0(e,t,n){return e.map(r=>Ge(r)?String(r):JSON.stringify(he(r,t,n))).join(" ")}function Oc(e){return/%[sdifocO]/.test(e)}function Nc(e,t){let n={},r=new Array(t.length).fill("{}").join(" ");return n["sentry.message.template"]=`${e} ${r}`,t.forEach((i,o)=>{n[`sentry.message.parameter.${o}`]=i}),n}var S0="ConsoleLogs",j_={[q]:"auto.log.console"},E0=((e={})=>{let t=e.levels||dr;return{name:S0,setup(n){let{enableLogs:r,normalizeDepth:i=3,normalizeMaxBreadth:o=1e3}=n.getOptions();if(!r){E&&g.warn("`enableLogs` is not enabled, ConsoleLogs integration disabled");return}let s=li(({args:a,level:c})=>{if(T()!==n||!t.includes(c))return;let l=a[0],u=a.slice(1);if(c==="assert"){if(!l){let d=u.length>0?`Assertion failed: ${to(u,i,o)}`:"Assertion failed";si({level:"error",message:d,attributes:j_})}return}let p=c==="log",m={...j_};if(Re(l)){Object.assign(m,he(l,i,o));let d=typeof a[1]=="string"?2:1;
20a.slice(d).forEach((_,h)=>{m[`sentry.message.parameter.${h}`]=he(_,i,o)})}else if(u.length>0&&typeof l=="string"&&!Oc(l)){let f=Nc(l,u);for(let[_,h]of Object.entries(f))m[_]=_.startsWith("sentry.message.parameter.")?he(h,i,o):h}si({level:p?"info":c,message:to(a,i,o),severityNumber:p?10:void 0,attributes:m})});n.registerCleanup(s)}}}),$_=E0;var pi={};lf(pi,{count:()=>T0,distribution:()=>I0,gauge:()=>v0});function Pu(e,t,n,r){Bg({type:e,name:t,value:n,unit:r?.unit,attributes:r?.attributes},{scope:r?.scope})}function T0(e,t=1,n){Pu("counter",e,t,n)}function v0(e,t,n){Pu("gauge",e,t,n)}function I0(e,t,n){Pu("distribution",e,t,n)}var A0=["trace","debug","info","warn","error","fatal"];function V_(e={}){let t=new Set(e.levels??A0),n=e.client;return{log(r){let{type:i,level:o,message:s,args:a,tag:c,date:l,...u}=r,p=n||T();if(!p)return;let m=N0(i,o);if(!t.has(m))return;let{normalizeDepth:d=3,normalizeMaxBreadth:f=1e3}=p.getOptions(),_={};for(let[b,S]of Object.entries(u))_[b]=he(S,d,f);_["sentry.origin"]="auto.log.consola",c&&(_["consola.tag"]=c),i&&(_["consola.type"]=i),o!=null&&typeof o=="number"&&(_["consola.level"]=o);let h=x0(k0(a,d,f),d,f);h?.attributes&&Object.assign(_,h.attributes),si({level:m,message:h?.message||s||a&&to(a,d,f)||"",attributes:_})}}}var R0={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"},O0={0:"fatal",1:"warn",2:"info",3:"info",4:"debug",5:"trace"};function N0(e,t){if(e==="verbose")return"debug";if(e==="silent")return"trace";if(e){let n=R0[e];if(n)return n}if(typeof t=="number"){let n=O0[t];if(n)return n}return"info"}function k0(e,t,n){if(!e?.length)return{message:""};let r=to(e,t,n),i=e[0];if(Re(i)){let o=typeof e[1]=="string"?2:1,s=e.slice(o);return{message:r,attributes:i,messageParameters:s}}else{let o=e.slice(1),s=o.length>0&&typeof i=="string"&&!Oc(i);return{message:r,messageTemplate:s?i:void 0,messageParameters:s?o:void 0}}}function x0(e,t,n){let{message:r,attributes:i,messageTemplate:o,messageParameters:s}=e,a={};if(o&&s){let c=Nc(o,s);for(let[l,u]of Object.entries(c))a[l]=l.startsWith("sentry.message.parameter.")?he(u,t,n):u}else s&&s.length>0&&s.forEach((c,l)=>{a[`sentry.message.parameter.${l}`]=he(c,t,n)});return{message:r,attributes:{...he(i,t,n),...a}}}var K_="gen_ai.prompt",Cn="gen_ai.system",Oe="gen_ai.request.model",no="gen_ai.request.stream",Rr="gen_ai.request.temperature",ro="gen_ai.request.max_tokens",Or="gen_ai.request.frequency_penalty",io="gen_ai.request.presence_penalty",Nr="gen_ai.request.top_p",kc="gen_ai.request.top_k",xc="gen_ai.request.encoding_format",wc="gen_ai.request.dimensions",Mn="gen_ai.response.finish_reasons",Vt="gen_ai.response.model",kr="gen_ai.response.id",J_="gen_ai.response.stop_reason",Kt="gen_ai.usage.input_tokens",Jt="gen_ai.usage.output_tokens",Ft="gen_ai.usage.total_tokens",Ke="gen_ai.operation.name",Xt="sentry.sdk_meta.gen_ai.input.messages.original_length",Sn="gen_ai.input.messages";var Ln="gen_ai.system_instructions",pt="gen_ai.response.text",Pn="gen_ai.request.available_tools",X_="gen_ai.response.streaming",Nt="gen_ai.response.tool_calls",xr="gen_ai.agent.name",Q_="gen_ai.pipeline.name",Ls="gen_ai.conversation.id",Z_="gen_ai.usage.cache_creation_input_tokens",eh="gen_ai.usage.cache_read_input_tokens";var th="gen_ai.invoke_agent",oo="gen_ai.embeddings.input",Uu="gen_ai.embeddings",Du="gen_ai.execute_tool",Cc="gen_ai.tool.name",nh="gen_ai.tool.call.id",rh="gen_ai.tool.type",Mc="gen_ai.tool.input",Lc="gen_ai.tool.output",ih="gen_ai.tool.description";function wr(e){return!e||typeof e!="object"?!1:C0(e)||sh(e)||w0(e)||ah(e)||ch(e)||M0(e)||L0(e)||P0(e)||U0(e)||D0(e)||B0(e)||F0(e)}function w0(e){return"image_url"in e?typeof e.image_url=="string"?e.image_url.startsWith("data:"):oh(e):!1}function oh(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 C0(e){return"type"in e&&typeof e.type=="string"&&"source"in e&&wr(e.source)}function sh(e){return"inlineData"in e&&!!e.inlineData&&typeof e.inlineData=="object"&&"data"in e.inlineData&&typeof e.inlineData.data=="str
20ing"}function ah(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=="string"}function ch(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 M0(e){return"media_type"in e&&typeof e.media_type=="string"&&"data"in e}function L0(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 P0(e){return"type"in e&&e.type==="image"&&"image"in e&&typeof e.image=="string"&&!e.image.startsWith("http://")&&!e.image.startsWith("https://")}function U0(e){return"type"in e&&(e.type==="blob"||e.type==="base64")}function D0(e){return"b64_json"in e}function B0(e){return"type"in e&&"result"in e&&e.type==="image_generation"}function F0(e){return"uri"in e&&typeof e.uri=="string"&&e.uri.startsWith("data:")}var Ps="[Blob substitute]",G0=["image_url","data","content","b64_json","result","uri","image"];function ui(e){let t={...e};wr(t.source)&&(t.source=ui(t.source)),sh(e)&&(t.inlineData={...e.inlineData,data:Ps}),oh(e)&&(t.image_url={...e.image_url,url:Ps}),ah(e)&&(t.input_audio={...e.input_audio,data:Ps}),ch(e)&&(t.file={...e.file,file_data:Ps});for(let n of G0)typeof t[n]=="string"&&(t[n]=Ps);return t}var ph=2e4,Pc=e=>new TextEncoder().encode(e).length,Fu=e=>Pc(JSON.stringify(e));function Uc(e,t){if(Pc(e)<=t)return e;let n=0,r=e.length,i="";for(;n<=r;){let o=Math.floor((n+r)/2),s=e.slice(0,o);Pc(s)<=t?(i=s,n=o+1):r=o-1}return i}function H0(e){return typeof e=="string"?e:"text"in e&&typeof e.text=="string"?e.text:""}function lh(e,t){return typeof e=="string"?t:{...e,text:t}}function q0(e){return e!==null&&typeof e=="object"&&"content"in e&&typeof e.content=="string"}function uh(e){return e!==null&&typeof e=="object"&&"content"in e&&Array.isArray(e.content)}function dh(e){return e!==null&&typeof e=="object"&&"parts"in e&&Array.isArray(e.parts)&&e.parts.length>0}function W0(e,t){let n={...e,content:""},r=Fu(n),i=t-r;if(i<=0)return[];let o=Uc(e.content,i);return[{...e,content:o}]}function Y0(e){return"parts"in e&&Array.isArray(e.parts)?{key:"parts",items:e.parts}:"content"in e&&Array.isArray(e.content)?{key:"content",items:e.content}:{key:null,items:[]}}function z0(e,t){let{key:n,items:r}=Y0(e);if(n===null||r.length===0)return[];let i=r.map(c=>lh(c,"")),o=Fu({...e,[n]:i}),s=t-o;if(s<=0)return[];let a=[];for(let c of r){let l=H0(c),u=Pc(l);if(u<=s)a.push(c),s-=u;else if(a.length===0){let p=Uc(l,s);p&&a.push(lh(c,p));break}else break}return a.length<=0?[]:[{...e,[n]:a}]}function j0(e,t){if(!e)return[];if(typeof e=="string"){let n=Uc(e,t);return n?[n]:[]}return typeof e!="object"?[]:q0(e)?W0(e,t):uh(e)||dh(e)?z0(e,t):[]}function Bu(e){return e.map(n=>{let r;return n&&typeof n=="object"&&(uh(n)?r={...n,content:Bu(n.content)}:"content"in n&&wr(n.content)&&(r={...n,content:ui(n.content)}),dh(n)&&(r={...r??n,parts:Bu(n.parts)}),wr(r)?r=ui(r):wr(n)&&(r=ui(n))),r??n})}function $0(e,t){if(!Array.isArray(e)||e.length===0)return e;let n=t-2,r=e[e.length-1],i=Bu([r]),o=i[0];return Fu(o)<=n?i:j0(o,n)}function mh(e){return $0(e,ph)}function fh(e){return Uc(e,ph)}function Gt(e){let t=T()?.getDataCollectionOptions().genAI;return{...e,recordInputs:e?.recordInputs??t?.inputs??!1,recordOutputs:e?.recordOutputs??t?.outputs??!1}}function kt(e){if(e!==void 0)return e;let t=T();return t?!Ue(t)&&t.getOptions().streamGenAiSpans===!1:!0}function Dc(e,t){return e?`${e}.${t}`:t}function gh(e,t,n,r,i){if(t!==void 0&&e.setAttributes({[Kt]:t}),n!==void 0&&e.setAttributes({[Jt]:n}),t!==void 0||n!==void 0||r!==void 0||i!==void 0){let o=(t??0)+(n??0)+(r??0)+(i??0);e.setAttributes({[Ft]:o})}}function di(e,t,n){if(!e.isRecording())return;let r={[X_]:!0};t.responseId&&(r[kr]=t.responseId),t.responseModel&&(r[Vt]=t.responseModel),t.promptTokens!==void 0&&(r[Kt]=t.promptTokens),t.completionTokens!==void 0&&(r[Jt]=t.completionTokens),t.totalTokens!==void 0?r[Ft]=t.totalTokens:(t.promptTokens!==void 0||t.completionTokens!==void 0||t.cacheCreationInputTokens!==void 0||t.cacheReadInputTokens!==void 0)&&(r[Ft]=(t.promptTokens??0)+(t.completionTokens??0)+(t.cacheCreationInputTokens??0)+(t.cacheReadInputTokens??0)),t.finishReasons.length&&(r[Mn]=JSON.stringify(t.finishReasons)),n&&t.responseTexts.length&&(r[pt]=t.responseTexts.join("")),n&&t.toolCalls.length&&(r[Nt]=JSON.stringify(t.toolCalls)),e.setAttributes(r),e.end()}function En(e){if(typeof e=="string")return fh(e);try{return JSON.stringify(Array.isArray(e)?mh(e):e)}catch{return"[unserializable]"}}function Un(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 i=JSON.stringify([{type:"text",content:r}]),o=[...e.slice(0,t),...e.slice(t+1)];return{systemInstructions:i,filteredMessages:o}}async function V0(e,t,n){let r=e.catch(s=>{throw X(s,{mechanism:{handled:!1,type:n}}),s}),i=await t,o=await r;return o&&typeof o=="object"&&"data"in o?{...o,data:i}:i}function so(e,t,n){return dt(e)?new Proxy(e,{get(r,i){let s=i in Promise.prototype||i===Symbol.toStringTag?t:r,a=Reflect.get(s,i);return i==="withResponse"&&typeof a=="function"?function(){let l=a.call(r);return V0(l,t,n)}:typeof a=="function"?a.bind(s):a}}):t}var _h={"responses.create":{operation:"chat"}
20,"chat.completions.create":{operation:"chat"},"embeddings.create":{operation:"embeddings"},"conversations.create":{operation:"chat"}},K0=["response.output_item.added","response.function_call_arguments.delta","response.function_call_arguments.done","response.output_item.done"],hh=["response.created","response.in_progress","response.failed","response.completed","response.incomplete","response.queued","response.output_text.delta",...K0];function bh(e){return e!==null&&typeof e=="object"&&"type"in e&&typeof e.type=="string"&&e.type.startsWith("response.")}function yh(e){return e!==null&&typeof e=="object"&&"object"in e&&e.object==="chat.completion.chunk"}function Sh(e,t,n){if(!t||typeof t!="object")return;let r=t,i={};if(typeof r.id=="string"&&(i[kr]=r.id),typeof r.model=="string"&&(i[Vt]=r.model),r.object==="conversation"&&typeof r.id=="string"&&(i[Ls]=r.id),r.usage&&typeof r.usage=="object"){let o=r.usage,s=o.prompt_tokens??o.input_tokens;typeof s=="number"&&(i[Kt]=s);let a=o.completion_tokens??o.output_tokens;typeof a=="number"&&(i[Jt]=a),typeof o.total_tokens=="number"&&(i[Ft]=o.total_tokens)}if(Array.isArray(r.choices)){let o=r.choices,s=o.map(a=>a.finish_reason).filter(a=>typeof a=="string");if(s.length>0&&(i[Mn]=JSON.stringify(s)),n){let a=o.map(l=>l.message?.content||"");i[pt]=JSON.stringify(a);let c=o.map(l=>l.message?.tool_calls).filter(l=>Array.isArray(l)&&l.length>0).flat();c.length>0&&(i[Nt]=JSON.stringify(c))}}if(typeof r.status=="string"&&(i[Mn]||(i[Mn]=JSON.stringify([r.status]))),n&&(typeof r.output_text=="string"&&!i[pt]&&(i[pt]=r.output_text),Array.isArray(r.output)&&r.output.length>0&&!i[Nt])){let o=r.output.filter(s=>s?.type==="function_call");o.length>0&&(i[Nt]=JSON.stringify(o))}e.setAttributes(i)}function J0(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 Eh(e){let t={[Oe]:e.model??"unknown"};"temperature"in e&&(t[Rr]=e.temperature),"top_p"in e&&(t[Nr]=e.top_p),"frequency_penalty"in e&&(t[Or]=e.frequency_penalty),"presence_penalty"in e&&(t[io]=e.presence_penalty),"stream"in e&&(t[no]=e.stream),"encoding_format"in e&&(t[xc]=e.encoding_format),"dimensions"in e&&(t[wc]=e.dimensions);let n=J0(e);return n&&(t[Ls]=n),t}function X0(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]={...n,function:{name:n.function.name,arguments:n.function.arguments||""}};else{let i=t.chatCompletionToolCalls[r];n.function.arguments&&i?.function&&(i.function.arguments+=n.function.arguments)}}}function Q0(e,t,n){t.responseId=e.id??t.responseId,t.responseModel=e.model??t.responseModel,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&&X0(r.delta.tool_calls,t)),r.finish_reason&&t.finishReasons.push(r.finish_reason)}function Z0(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 i=e;if(!hh.includes(i.type)){t.eventTypes.push(i.type);return}if(n&&(i.type==="response.output_item.done"&&"item"in i&&t.responsesApiToolCalls.push(i.item),i.type==="response.output_text.delta"&&"delta"in i&&i.delta)){t.responseTexts.push(i.delta);return}if("response"in i){let{response:o}=i;t.responseId=o.id??t.responseId,t.responseModel=o.model??t.responseModel,o.usage&&(t.promptTokens=o.usage.input_tokens,t.completionTokens=o.usage.output_tokens,t.totalTokens=o.usage.total_tokens),o.status&&t.finishReasons.push(o.status),n&&o.output_text&&t.responseTexts.push(o.output_text)}}async function*Th(e,t,n){let r={eventTypes:[],responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,totalTokens:void 0,chatCompletionToolCalls:{},responsesApiToolCalls:[]};
20try{for await(let i of e)yh(i)?Q0(i,r,n):bh(i)&&Z0(i,r,n,t),yield i}finally{let i=[...Object.values(r.chatCompletionToolCalls),...r.responsesApiToolCalls];di(t,{...r,toolCalls:i},n)}}function eA(e){let t=Array.isArray(e.tools)?e.tools:[],r=e.web_search_options&&typeof e.web_search_options=="object"?[{type:"web_search_options",...e.web_search_options}]:[],i=[...t,...r];if(i.length!==0)try{return JSON.stringify(i)}catch(o){E&&g.error("Failed to serialize OpenAI tools:",o);return}}function vh(e,t){let n={[Cn]:"openai",[Ke]:t,[q]:"auto.ai.openai"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){let r=e[0],i=eA(r);i&&(n[Pn]=i),Object.assign(n,Eh(r))}else n[Oe]="unknown";return n}function Gu(e,t,n,r){if(n==="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(oo,typeof a=="string"?a:JSON.stringify(a));return}let i="input"in t?t.input:"messages"in t?t.messages:void 0;if(!i||Array.isArray(i)&&i.length===0)return;let{systemInstructions:o,filteredMessages:s}=Un(i);o&&e.setAttribute(Ln,o),e.setAttribute(Sn,r?En(s):qe(s)),Array.isArray(s)?e.setAttribute(Xt,s.length):e.setAttribute(Xt,1)}function tA(e,t,n,r,i){return function(...s){let a=n.operation||"unknown",c=vh(s,a),l=c[Oe]||"unknown",u=s[0],p=u&&typeof u=="object"&&u.stream===!0,m={name:`${a} ${l}`,op:`gen_ai.${a}`,attributes:c};if(p){let _,h=gt(m,b=>(_=e.apply(r,s),i.recordInputs&&u&&Gu(b,u,a,kt(i.enableTruncation)),(async()=>{try{let S=await _;return Th(S,b,i.recordOutputs??!1)}catch(S){throw b.setStatus({code:2,message:"internal_error"}),X(S,{mechanism:{handled:!1,type:"auto.ai.openai.stream",data:{function:t}}}),b.end(),S}})()));return so(_,h,"auto.ai.openai")}let d,f=Ve(m,_=>(d=e.apply(r,s),i.recordInputs&&u&&Gu(_,u,a,kt(i.enableTruncation)),d.then(h=>(Sh(_,h,i.recordOutputs),h),h=>{throw X(h,{mechanism:{handled:!1,type:"auto.ai.openai",data:{function:t}}}),h})));return so(d,f,"auto.ai.openai")}}function Ih(e,t="",n){return new Proxy(e,{get(r,i){let o=r[i],s=Dc(t,String(i)),a=_h[s];return typeof o=="function"&&a?tA(o,s,a,r,n):typeof o=="function"?o.bind(r):o&&typeof o=="object"?Ih(o,s,n):o}})}function Ah(e,t){return Ih(e,"",Gt(t))}var Hu={"messages.create":{operation:"chat"},"messages.stream":{operation:"chat",streaming:!0},"messages.countTokens":{operation:"chat"},"models.get":{operation:"models"},"completions.create":{operation:"chat"},"models.retrieve":{operation:"models"},"beta.messages.create":{operation:"chat"}};function Rh(e,t,n){if(Array.isArray(t)&&t.length===0)return;let{systemInstructions:r,filteredMessages:i}=Un(t);r&&e.setAttributes({[Ln]:r});let o=Array.isArray(i)?i.length:1;e.setAttributes({[Sn]:n?En(i):qe(i),[Xt]:o})}var nA={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 qu(e){return e&&nA[e]||"internal_error"}function Oh(e,t){t.error&&(e.setStatus({code:2,message:qu(t.error.type)}),X(t.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}))}function Nh(e){let{system:t,messages:n,input:r}=e,i=typeof t=="string"?[{role:"system",content:e.system}]:[],o=Array.isArray(r)?r:r!=null?[r]:void 0,s=Array.isArray(n)?n:n!=null?[n]:[],a=o??s;return[...i,...a]}function rA(e,t){return"type"in e&&typeof e.type=="string"&&e.type==="error"?(t.setStatus({code:2,message:qu(e.error?.type)}),X(e.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}),!0):!1}function iA(e,t){if(e.type==="message_delta"&&(e.usage&&typeof e.usage.output_tokens=="number"&&(t.completionTokens=e.usage.output_tokens),e.delta?.stop_reason&&t.finishReasons.push(e.delta.stop_reason)),e.message){let n=e.message;n.id&&(t.responseId=n.id),n.model&&(t.responseModel=n.model),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 oA(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 sA(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 aA(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(""),i;try{i=r?JSON.parse(r):{}}catch{i={__unparsed:r}}t.toolCalls.push({type:"tool_use",id:n.id,name:n.name,input:i}),delete t.activeToolBlocks[e.index]}function kh(e,t,n,r){!(e&&typeof e=="object")||rA(e,r)||(iA(e,t),oA(e,t),sA(e,t,n),aA(e,t))}async function*xh(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 i of e)kh(i,r,n,t),yield i}finally{di(t,r,n)}}function wh(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",i=>{kh(i,r,n,t)}),e.on("message",()=>{di(t,r,n)}),e.on("error",i=>{X(i,{mechanism:{handled:!1,type:"auto.ai.anthropic.stream_error"}}),t.isRecording()&&(t.setStatus({code:2,message:"internal_error"}),t.end())}),e}var Bc=!1,Ch=new WeakSet;function Lh(e,t,n){let r={[Cn]:"anthropic",[Ke]:n,[q]:"auto.ai.anthropic"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){let i=e[0];i.tools&&Array.isArray(i.tools)&&(r[Pn]=JSON.stringify(i.tools)),r[Oe]=i.model??"unknown","temperature"in i&&(r[Rr]=i.temperature),"top_p"in i&&(r[Nr]=i.top_p),"stream"in i&&(r[no]=i.stream),"top_k"in i&&(r[kc]=i.top_k),"frequency_penalty"in i&&(r[Or]=i.frequency_penalty),"max_tokens"in i&&(r[ro]=i.max_tokens)}else t==="models.retrieve"||t==="models.get"?r[Oe]=e[0]:r[Oe]="unknown";return r}function Fc(e,t,n){let r=Nh(t);Rh(e,r,n),"prompt"in t&&e.setAttributes({[K_]:JSON.stringify(t.prompt)})}function cA(e,t){if("content"in t&&Array.isArray(t.content)){e.setAttributes({[pt]: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({[Nt]:JSON.stringify(n)})}"completion"in t&&e.setAttributes({[pt]:t.completion}),"input_tokens"in t&&e.setAttributes({[pt]:JSON.stringify(t.input_tokens)})}function lA(e,t){"id"in t&&"model"in t&&(e.setAttributes({[kr]:t.id,[Vt]:t.model}),"usage"in t&&t.usage&&gh(e,t.usage.input_tokens,t.usage.output_tokens,t.usage.cache_creation_input_tokens,t.usage.cache_read_input_tokens))}function Ph(e,t,n){if(!(!t||typeof t!="object")){if("type"in t&&t.type==="error"){Oh(e,t);return}n&&cA(e,t),lA(e,t)}}function Mh(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 pA(e,t,n,r,i,o,s,a,c,l){let u=r[Oe]??"unknown",p={name:`${i} ${u}`,op:`gen_ai.${i}`,attributes:r};if(c&&!l){let m,d=gt(p,f=>(m=e.apply(t,n),a.recordInputs&&s&&Fc(f,s,kt(a.enableTruncation)),(async()=>{try{let _=await m;return xh(_,f,a.recordOutputs??!1)}catch(_){return Mh(_,f,o)}})()));return so(m,d,"auto.ai.anthropic")}else return gt(p,m=>{try{a.recordInputs&&s&&Fc(m,s,kt(a.enableTruncation)),Bc=!0;let d=e.apply(t,n);return Bc=!1,wh(d,m,a.recordOutputs??!1)}catch(d){return Bc=!1,Mh(d,m,o)}})}function uA(e,t,n,r,i){return new Proxy(e,{apply(o,s,a){let c=s!==void 0?s:r,l=n.streaming===!0;if(!l&&Bc)return o.apply(c,a);let u=n.operation||"unknown",p=Lh(a,t,u),m=p[Oe]??"unknown",d=typeof a[0]=="object"?a[0]:void 0,f=!!d?.stream;if(f||l)return pA(o,c,a,p,u,t,d,i,f,l);let _,h=Ve({name:`${u} ${m}`,op:`gen_ai.${u}`,attributes:p},b=>(_=o.apply(c,a),i.recordInputs&&d&&Fc(b,d,kt(i.enableTruncation)),_.then(S=>(Ph(b,S,i.recordOutputs),S),S=>{throw X(S,{mechanism:{handled:!1,type:"auto.ai.anthropic",data:{function:t}}}),S})));return so(_,h,"auto.ai.anthropic")}})}function dA(e,t){for(let n of Object.keys(Hu)){let r=n.split("."),i=r.pop(),o=e;for(let c of r)o=o?.[c];if(!o||typeof o[i]!="function")continue;let s=o[i];if(Ch.has(s))continue;let a=uA(s,n,Hu[n],o,t);Ch.add(a),o[i]=a}return e}function Uh(e,t){return dA(e,Gt(t))}var Dh={"models.generateContent":{operation:"generate_content"},"models.generateContentStream":{operation:"generate_content",streaming:!0},"models.embedContent":{operation:"embeddings"},"chats.create":{proxyResultPath:"chat"},"chat.sendMessage":{operation:"chat"},"chat.sendMessageStream":{operation:"chat",streaming:!0}},Bh="google_genai";function mA(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 fA(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 gA(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 i of r?.content?.parts??[])n&&i.text&&t.responseTexts.push(i.text),i.functionCall&&t.toolCalls.push({type:"function",id:i.functionCall.id,name:i.functionCall.name,arguments:i.functionCall.args})}}function _A(e,t,n,r){!e||mA(e,r)||(fA(e,t),gA(e,t,n))}async function*Fh(e,t,n){let r={responseTexts:[],finishReasons:[],toolCalls:[]};try{for await(let i of e)_A(i,r,n,t),yield i}finally{di(t,r,n)}}function ao(e,t="user"){return typeof e=="string"?[{role:t,content:e}]:Array.isArray(e)?e.flatMap(n=>ao(n,t)):typeof e!="object"||!e?[]:"role"in e&&typeof e.role=="string"?[e]:"parts"in e?[{...e,role:t}]:[{role:t,content:e}]}function Gh(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 hA(e){let t={};return"temperature"in e&&typeof e.temperature=="number"&&(t[Rr]=e.temperature),"topP"in e&&typeof e.topP=="number"&&(t[Nr]=e.topP),"topK"in e&&typeof e.topK=="number"&&(t[kc]=e.topK),"maxOutputTokens"in e&&typeof e.maxOutputTokens=="number"&&(t[ro]=e.maxOutputTokens),"frequencyPenalty"in e&&typeof e.frequencyPenalty=="number"&&(t[Or]=e.frequencyPenalty),"presencePenalty"in e&&typeof e.presencePenalty=="number"&&(t[io]=e.presencePenalty),t}function Hh(e,t,n){let r={[Cn]:Bh,[Ke]:e,[q]:"auto.ai.google_genai"};if(t){if(r[Oe]=Gh(t,n),"config"in t&&typeof t.config=="object"&&t.config){let i=t.config;if(Object.assign(r,hA(i)),"tools"in i&&Array.isArray(i.tools)){let o=i.tools.flatMap(s=>s.functionDeclarations);r[Pn]=JSON.stringify(o)}}}else r[Oe]=Gh({},n);return r}function Wu(e,t,n,r){if(n==="embeddings"){let o=t.contents;o!=null&&e.setAttribute(oo,typeof o=="string"?o:JSON.stringify(o));return}let i=[];if("config"in t&&t.config&&typeof t.config=="object"&&"systemInstruction"in t.config&&t.config.systemInstruction&&i.push(...ao(t.config.systemInstruction,"system")),"history"in t&&i.push(...ao(t.history,"user")),"contents"in t&&i.push(...ao(t.contents,"user")),"message"in t&&i.push(...ao(t.message,"user")),Array.isArray(i)&&i.length){let{systemInstructions:o,filteredMessages:s}=Un(i);o&&e.setAttribute(Ln,o);let a=Array.isArray(s)?s.length:0;e.setAttributes({[Xt]:a,[Sn]:r?En(s):qe(s)})}}function qh(e,t,n){if(!(!t||typeof t!="object")){if(t.modelVersion&&e.setAttribute(Vt,t.modelVersion),t.usageMetadata&&typeof t.usageMetadata=="object"){let r=t.usageMetadata;typeof r.promptTokenCount=="number"&&e.setAttributes({[Kt]:r.promptTokenCount}),typeof r.candidatesTokenCount=="number"&&e.setAttributes({[Jt]: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(i=>i.content?.parts&&Array.isArray(i.content.parts)?i.content.parts.map(o=>typeof o.text=="string"?o.text:"").filter(o=>o.length>0).join(""):"").filter(i=>i.length>0);r.length>0&&e.setAttributes({[pt]:r.join("")})}if(n&&t.functionCalls){let r=t.functionCalls;Array.isArray(r)&&r.length>0&&e.setAttributes({[Nt]:JSON.stringify(r)})}}}function bA(e,t,n,r,i){let o=n.operation==="embeddings";return new Proxy(e,{apply(s,a,c){let l=n.operation||"unknown",u=c[0],p=Hh(l,u,r),m=p[Oe]??"unknown";return n.streaming?gt({name:`${l} ${m}`,op:`gen_ai.${l}`,attributes:p},async d=>{try{i.recordInputs&&u&&Wu(d,u,l,kt(i.enableTruncation));let f=await s.apply(r,c);return Fh(f,d,!!i.recordOutputs)}catch(f){throw d.setStatus({code:2,message:"internal_error"}),X(f,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:t}}}),d.end(),f}}):Ve({name:`${l} ${m}`,op:`gen_ai.${l}`,attributes:p},d=>(i.recordInputs&&u&&Wu(d,u,l,kt(i.enableTruncation)),us(()=>s.apply(r,c),f=>{X(f,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:t}}})},()=>{},f=>{o||qh(d,f,i.recordOutputs)})))}})}function Yu(e,t="",n){return new Proxy(e,{get:(r,i,o)=>{let s=Reflect.get(r,i,o),a=Dc(t,String(i)),c=Dh[a];if(typeof s=="function"&&c){let l=c.operation?bA(s,a,c,r,n):s.bind(r);return c.proxyResultPath?function(...u){let p=l(...u);return p&&typeof p=="object"?Yu(p,c.proxyResultPath,n):p}:l}return typeof s=="function"?s.bind(r):s&&typeof s=="object"?Yu(s,a,n):s}})}function Wh(e,t){return Yu(e,"",Gt(t))}var ir="auto.ai.langchain",Yh={human:"user",ai:"assistant",assistant:"assistant",system:"system",function:"function",tool:"tool"};
20var Qt=(e,t,n)=>{n!=null&&(e[t]=n)},Ht=(e,t,n)=>{let r=Number(n);Number.isNaN(r)||(e[t]=r)};function co(e){if(Array.isArray(e))try{let t=e.map(n=>n&&typeof n=="object"&&wr(n)?ui(n):n);return JSON.stringify(t)}catch{return String(e)}return qe(e,String)}function Us(e){let t=e.toLowerCase();return Yh[t]??t}function zh(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 zu(e){if(!(!e||Array.isArray(e)))return e.invocation_params}function Ds(e){return e.map(t=>{let n=t._getType;if(typeof n=="function"){let i=n.call(t);return{role:Us(i),content:co(t.content)}}if(t.lc===1&&t.kwargs){let i=t.id,o=Array.isArray(i)&&i.length>0?i[i.length-1]:"",s=typeof o=="string"?zh(o):"user";return{role:Us(s),content:co(t.kwargs?.content)}}if(t.type){let i=String(t.type).toLowerCase();return{role:Us(i),content:co(t.content)}}if(t.role)return{role:Us(String(t.role)),content:co(t.content)};let r=t.constructor?.name;return r&&r!=="Object"?{role:Us(zh(r)),content:co(t.content)}:{role:"user",content:co(t.content)}})}function yA(e,t,n){let r={},i="kwargs"in e?e.kwargs:void 0,o=t?.temperature??n?.ls_temperature??i?.temperature;Ht(r,Rr,o);let s=t?.max_tokens??n?.ls_max_tokens??i?.max_tokens;Ht(r,ro,s);let a=t?.top_p??i?.top_p;Ht(r,Nr,a);let c=t?.frequency_penalty;Ht(r,Or,c);let l=t?.presence_penalty;return Ht(r,io,l),t&&"stream"in t&&Qt(r,no,!!t.stream),r}function $h(e,t,n,r,i){return{[Cn]:qe(e??"langchain",String),[Ke]:"chat",[Oe]:qe(t,String),[q]:ir,...yA(n,r,i)}}function Vh(e,t,n,r,i,o){let s=o?.ls_provider,a=i?.model??o?.ls_model_name??"unknown",c=$h(s,a,e,i,o);if(n&&Array.isArray(t)&&t.length>0){Qt(c,Xt,t.length);let l=t.map(u=>({role:"user",content:u}));Qt(c,Sn,r?En(l):qe(l))}return c}function Kh(e,t,n,r,i,o){let s=o?.ls_provider??e.id?.[2],a=i?.model??o?.ls_model_name??"unknown",c=$h(s,a,e,i,o);if(n&&Array.isArray(t)&&t.length>0){let l=Ds(t.flat()),{systemInstructions:u,filteredMessages:p}=Un(l);u&&Qt(c,Ln,u);let m=Array.isArray(p)?p.length:0;Qt(c,Xt,m),Qt(c,Sn,r?En(p):qe(p))}return c}function SA(e,t){let n=[],r=e.flat();for(let i of r){let s=i.message?.tool_calls;if(Array.isArray(s)&&s.length>0)n.push(...s);else{let a=i.message?.content;if(Array.isArray(a))for(let c of a){let l=c;l.type==="tool_use"&&n.push(l)}}}n.length>0&&Qt(t,Nt,qe(n,String))}function EA(e,t){if(!e)return;let n=e.tokenUsage,r=e.usage;if(n)Ht(t,Kt,n.promptTokens),Ht(t,Jt,n.completionTokens),Ht(t,Ft,n.totalTokens);else if(r){Ht(t,Kt,r.input_tokens),Ht(t,Jt,r.output_tokens);let i=Number(r.input_tokens),o=Number(r.output_tokens),s=(Number.isNaN(i)?0:i)+(Number.isNaN(o)?0:o);s>0&&Ht(t,Ft,s),r.cache_creation_input_tokens!==void 0&&Ht(t,Z_,r.cache_creation_input_tokens),r.cache_read_input_tokens!==void 0&&Ht(t,eh,r.cache_read_input_tokens)}}function Jh(e,t){if(!e)return;let n={};if(Array.isArray(e.generations)){let l=e.generations.flat().map(u=>u.generationInfo?.finish_reason?u.generationInfo.finish_reason:u.generation_info?.finish_reason?u.generation_info.finish_reason:null).filter(u=>typeof u=="string");if(l.length>0&&Qt(n,Mn,qe(l,String)),SA(e.generations,n),t){let u=e.generations.flat().map(p=>p.text??p.message?.content).filter(p=>typeof p=="string");u.length>0&&Qt(n,pt,qe(u,String))}}EA(e.llmOutput,n);let r=e.llmOutput,o=e.generations?.[0]?.[0]?.message,s=r?.model_name??r?.model??o?.response_metadata?.model_name;s&&Qt(n,Vt,s);let a=r?.id??o?.id;a&&Qt(n,kr,a);let c=r?.stop_reason??o?.response_metadata?.finish_reason;return c&&Qt(n,J_,qe(c,String)),n}function Gc(e){let t={},n=e?.lc_agent_name;return typeof n=="string"&&(t[xr]=n),t}function Xh(e){let t=e?.invocation_params?.tools??e?.options?.tools;if(!Array.isArray(t)||t.length===0)return;let n=t.map(r=>{let i=r.function;return{type:"function",name:r.name??i?.name??"",description:r.description??i?.description}});return JSON.stringify(n)}function TA(e){if(!e||typeof e!="object")return!1;let t=e;return typeof t.addHandler=="function"&&typeof t.copy=="function"}function vA(e){return typeof e=="object"&&e?.name==="SentryCallbackHandler"}function jh(e){return e.some(vA)}function Qh(e,t){if(!e)return[t];if(TA(e)){if(jh(e.handlers??[]))return e;let r=e.copy();return r.addHandler(t,!0),r}let n=Array.isArray(e)?e:[e];return jh(n)?e:[...n,t]}function Bs(e={}){let{recordInputs:t,recordOutputs:n}=Gt(e),r=kt(e.enableTruncation),i=new Map,o=a=>{let c=i.get(a);c?.isRecording()&&(c.end(),i.delete(a))}
20,s={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(a,c,l,u,p,m,d,f){let _=zu(m),h=Vh(a,c,t,r,_,d),b=h[Oe],S=h[Ke];gt({name:`${S} ${b}`,op:"gen_ai.chat",attributes:{...Gc(d),...h,[J]:"gen_ai.chat"}},N=>(i.set(l,N),N))},handleChatModelStart(a,c,l,u,p,m,d,f){let _=zu(m),h=Kh(a,c,t,r,_,d),b=Xh(p);b&&(h[Pn]=b);let S=h[Oe],N=h[Ke];gt({name:`${N} ${S}`,op:"gen_ai.chat",attributes:{...Gc(d),...h,[J]:"gen_ai.chat"}},I=>(i.set(l,I),I))},handleLLMEnd(a,c,l,u,p){let m=i.get(c);if(m?.isRecording()){let d=Jh(a,n);d&&m.setAttributes(d),o(c)}},handleLLMError(a,c){let l=i.get(c);l?.isRecording()&&(l.setStatus({code:2,message:"internal_error"}),o(c)),X(a,{mechanism:{handled:!1,type:`${ir}.llm_error_handler`}})},handleChainStart(a,c,l,u,p,m,d,f){if(m?.__sentry_langgraph__)return;let _=f||a.name||"unknown_chain",h={[q]:"auto.ai.langchain","langchain.chain.name":_};t&&(h["langchain.chain.inputs"]=JSON.stringify(c)),gt({name:`chain ${_}`,op:"gen_ai.invoke_agent",attributes:{...h,[J]:"gen_ai.invoke_agent"}},b=>(i.set(l,b),b))},handleChainEnd(a,c){let l=i.get(c);l?.isRecording()&&(n&&l.setAttributes({"langchain.chain.outputs":JSON.stringify(a)}),o(c))},handleChainError(a,c){let l=i.get(c);l?.isRecording()&&(l.setStatus({code:2,message:"internal_error"}),o(c)),X(a,{mechanism:{handled:!1,type:`${ir}.chain_error_handler`}})}
20,handleToolStart(a,c,l,u,p,m,d){if(m?.__sentry_langgraph__)return;let f=d||a.name||"unknown_tool",_={...Gc(m),[q]:ir,[Ke]:"execute_tool",[Cc]:f};t&&(_[Mc]=c),gt({name:`execute_tool ${f}`,op:"gen_ai.execute_tool",attributes:{..._,[J]:"gen_ai.execute_tool"}},h=>(i.set(l,h),h))},handleToolEnd(a,c){let l=i.get(c);if(l?.isRecording()){if(n){let u=a,p=u&&typeof u=="object"&&"content"in u?u.content:a;l.setAttributes({[Lc]:typeof p=="string"?p:JSON.stringify(p)})}o(c)}},handleToolError(a,c){let l=i.get(c);l?.isRecording()&&(l.setStatus({code:2,message:"internal_error"}),o(c)),X(a,{mechanism:{handled:!1,type:`${ir}.tool_error_handler`}})},copy(){return s},toJSON(){return{lc:1,type:"not_implemented",id:s.lc_id}},toJSONNotImplemented(){return{lc:1,type:"not_implemented",id:s.lc_id}}};return s}function IA(e){let t=e.constructor?.name??"";return t.includes("OpenAI")?"openai":t.includes("Google")?"google_genai":t.includes("Mistral")?"mistralai":t.includes("Vertex")?"google_vertexai":t.includes("Bedrock")?"aws_bedrock":t.includes("Ollama")?"ollama":t.includes("Cloudflare")?"cloudflare":t.includes("Cohere")?"cohere":"langchain"}function AA(e){let t=e??{},n={[q]:ir,[J]:Uu,[Ke]:"embeddings",[Oe]:t.model??"unknown"};return n[Cn]=IA(t),"dimensions"in t&&(n[wc]=t.dimensions),"encodingFormat"in t&&(n[xc]=t.encodingFormat),n}function eb(e,t,n={}){let{recordInputs:r}=Gt(n),i=AA(e),o=i[Oe]||"unknown";return r&&t!=null&&(i[oo]=typeof t=="string"?t:JSON.stringify(t)),{name:`embeddings ${o}`,op:Uu,attributes:i}}function Zh(e,t={}){return new Proxy(e,{apply(n,r,i){return Ve(eb(r,i[0],t),()=>Reflect.apply(n,r,i).then(void 0,o=>{throw X(o,{mechanism:{handled:!1,type:"auto.ai.langchain"}}),o}))}})}function tb(e,t){let n=e;return typeof n.embedQuery=="function"&&(n.embedQuery=Zh(n.embedQuery,t)),typeof n.embedDocuments=="function"&&(n.embedDocuments=Zh(n.embedDocuments,t)),e}var Fs="auto.ai.langgraph";function nb(e){let t=e[0];if(typeof t!="object"||!t||!("llm"in t)||!t.llm||typeof t.llm!="object")return null;let n=t.llm;return typeof n.modelName!="string"&&typeof n.model!="string"?null:n}function rb(e){let t=e[0];return typeof t=="object"&&t&&"name"in t&&typeof t.name=="string"?t.name:null}function ib(e,t,n){let r="__sentry_tool_wrapped__";for(let i of e){if(!i||typeof i!="object")continue;let o=i,s=o.invoke;if(typeof s!="function"||Object.prototype.hasOwnProperty.call(o,r))continue;let a=typeof o.name=="string"?o.name:"unknown_tool",c=typeof o.description=="string"?o.description:void 0,l=new Proxy(s,{apply(u,p,m){let d={[q]:Fs,[J]:Du,[Ke]:"execute_tool",[Cc]:a,[rh]:"function"},_=m[1]?.metadata?.lc_agent_name??n;typeof _=="string"&&(d[xr]=_),c&&(d[ih]=c);let h=m[0];if(typeof h=="object"&&h&&("id"in h&&typeof h.id=="string"&&(d[nh]=h.id),t.recordInputs)){let b="args"in h&&typeof h.args=="object"?h.args:h;try{d[Mc]=JSON.stringify(b)}catch{}}return Ve({op:Du,name:`execute_tool ${a}`,attributes:d},async b=>{try{let S=await Reflect.apply(u,p,m);if(t.recordOutputs)try{let N=S,I=N&&typeof N=="object"&&"content"in N?N.content:S;b.setAttribute(Lc,typeof I=="string"?I:JSON.stringify(I))}catch{}return S}catch(S){throw b.setStatus({code:2,message:"internal_error"}),X(S,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),S}})}});o.invoke=l,Object.defineProperty(o,r,{value:!0,enumerable:!1})}return e}function RA(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 OA(e){let t=e,n=0,r=0,i=0;if(t.usage_metadata&&typeof t.usage_metadata=="object"){let o=t.usage_metadata;return typeof o.input_tokens=="number"&&(n=o.input_tokens),typeof o.output_tokens=="number"&&(r=o.output_tokens),typeof o.total_tokens=="number"&&(i=o.total_tokens),{inputTokens:n,outputTokens:r,totalTokens:i}}if(t.response_metadata&&typeof t.response_metadata=="object"){let o=t.response_metadata;if(o.tokenUsage&&typeof o.tokenUsage=="object"){let s=o.tokenUsage;typeof s.promptTokens=="number"&&(n=s.promptTokens),typeof s.completionTokens=="number"&&(r=s.completionTokens),typeof s.totalTokens=="number"&&(i=s.totalTokens)}}return{inputTokens:n,outputTokens:r,totalTokens:i}}function NA(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(Vt,r.model_name),r.f
20inish_reason&&typeof r.finish_reason=="string"&&e.setAttribute(Mn,[r.finish_reason])}}function ob(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 sb(e,t,n){let i=n?.messages;if(!i||!Array.isArray(i))return;let o=t?.length??0,s=i.length>o?i.slice(o):[];if(s.length===0)return;let a=RA(s);a&&e.setAttribute(Nt,JSON.stringify(a));let c=Ds(s);e.setAttribute(pt,JSON.stringify(c));let l=0,u=0,p=0;for(let m of s){let d=OA(m);l+=d.inputTokens,u+=d.outputTokens,p+=d.totalTokens,NA(e,m)}l>0&&e.setAttribute(Kt,l),u>0&&e.setAttribute(Jt,u),p>0&&e.setAttribute(Ft,p)}var ju=!1,Hc="__sentry_patched__";function ab(e){let t={[q]:Fs,[J]:"gen_ai.create_agent",[Ke]:"create_agent"};return e&&(t[xr]=e),{op:"gen_ai.create_agent",name:e?`create_agent ${e}`:"create_agent",attributes:t}}function cb(e,t){if(Object.prototype.hasOwnProperty.call(e,Hc))return e;let n=Bs(t),r=new Proxy(e,{apply(i,o,s){return ju?Reflect.apply(i,o,s):Ve(ab(),a=>{try{let c=Reflect.apply(i,o,s),l=s.length>0?s[0]:{};l?.name&&typeof l.name=="string"&&(a.setAttribute(xr,l.name),a.updateName(`create_agent ${l.name}`));let u=c.invoke;return u&&typeof u=="function"&&(c.invoke=$u(u.bind(c),c,l,t,void 0,n)),c}catch(c){throw a.setStatus({code:2,message:"internal_error"}),X(c,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),c}})}});return Object.defineProperty(r,Hc,{value:!0,enumerable:!1}),r}function $u(e,t,n,r,i,o){return new Proxy(e,{apply(s,a,c){let l=i?.modelName??i?.model;return Ve({op:"gen_ai.invoke_agent",name:"invoke_agent",attributes:{[q]:Fs,[J]:th,[Ke]:"invoke_agent"}},async u=>{try{let p=n?.name;p&&typeof p=="string"&&(u.setAttribute(Q_,p),u.setAttribute(xr,p),u.updateName(`invoke_agent ${p}`)),l&&u.setAttribute(Oe,l);let f=(c.length>1?c[1]:void 0)?.configurable?.thread_id;if(f&&typeof f=="string"&&u.setAttribute(Ls,f),o){let I=c[1]??{};c[1]=I;let C=I.metadata??{};I.metadata={...C,__sentry_langgraph__:!0,...typeof p=="string"?{lc_agent_name:p}:{}},I.callbacks=Qh(I.callbacks,o)}let _=ob(t);_&&u.setAttribute(Pn,JSON.stringify(_));let h=r.recordInputs,b=r.recordOutputs,S=c.length>0?c[0]?.messages??[]:[];if(S&&h){let I=Ds(S),{systemInstructions:C,filteredMessages:L}=Un(I);C&&u.setAttribute(Ln,C);let y=kt(r.enableTruncation),x=Array.isArray(L)?L.length:0;u.setAttributes({[Sn]:y?En(L):qe(L),[Xt]:x})}let N=await Reflect.apply(s,a,c);return b&&sb(u,S??null,N),N}catch(p){throw u.setStatus({code:2,message:"internal_error"}),X(p,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),p}})}})}function lb(e,t){if(Object.prototype.hasOwnProperty.call(e,Hc))return e;let n=Gt(t),r=Bs(n),i=new Proxy(e,{apply(o,s,a){let c=nb(a),l=rb(a),u=a[0];u&&Array.isArray(u.tools)&&u.tools.length>0&&ib(u.tools,n,l??void 0),ju=!0;let p;try{p=Reflect.apply(o,s,a)}finally{ju=!1}let m=p.invoke;if(m&&typeof m=="function"){let d={};l&&(d.name=l),p.invoke=$u(m.bind(p),p,d,n,c,r)}return p}});return Object.defineProperty(i,Hc,{value:!0,enumerable:!1}),i}function Vu(e,t){return e.compile=cb(e.compile,Gt(t)),e}var pb=Vu;function ub(e,t,n){let r=n.getOptions(),i=n.getDsn(),o=r.tunnel,s=hn(r._metadata),a={sent_at:new Date(st()).toISOString(),...kA(t)&&{trace:t},...s&&{sdk:s},...!!o&&i&&{dsn:Ye(i)}},c=n.getDataCollectionOptions().userInfo?"auto":"never",l=[{type:"span",item_count:e.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...lt()&&{ingest_settings:{infer_ip:c,infer_user_agent:c}},items:e}];return xe(a,[l])}function kA(e){return!!e.trace_id&&!!e.public_key}function db(e){let t=156;if(t+=e.name.length*2,t+=yp(e.attributes),e.links&&e.links.length>0){let r=e.links[0]?.attributes,i=100+(r?yp(r):0);t+=i*e.links.length}return t}var mb=1e3,xA=5e6,Gs=class{constructor(t,n){this._traceBuckets=new Map,this._client=t;let{maxSpanLimit:r,flushInterval:i,maxTraceWeightInBytes:o}=n??{};this._maxSpanLimit=r&&r>0&&r<=mb?r:mb,this._flushInterval=i&&i>0?i:5e3,this._maxTraceWeight=o&&o>0?o:xA,this._client.on("flush",()=>{this.drain()}),this._client.on("close",()=>
20{this._traceBuckets.forEach(s=>{clearTimeout(s.timeout)}),this._traceBuckets.clear()})}add(t){let n=t.trace_id,r=this._traceBuckets.get(n);r||(r={spans:new Set,size:0,timeout:Ir(setTimeout(()=>{this.flush(n)},this._flushInterval))},this._traceBuckets.set(n,r)),r.spans.add(t),r.size+=db(t),(r.spans.size>=this._maxSpanLimit||r.size>=this._maxTraceWeight)&&this.flush(n)}drain(){this._traceBuckets.size&&(E&&g.log(`Flushing span tree map with ${this._traceBuckets.size} traces`),this._traceBuckets.forEach((t,n)=>{this.flush(n)}))}flush(t){let n=this._traceBuckets.get(t);if(!n)return;if(!n.spans.size){this._removeTrace(t);return}let r=Array.from(n.spans),i=r[0]?._segmentSpan;if(!i){E&&g.warn("No segment span reference found on span JSON, cannot compute DSC"),this._removeTrace(t);return}let o=Pe(i),s=r.map(c=>{let{_segmentSpan:l,...u}=c;return u}),a=ub(s,o,this._client);E&&g.log(`Sending span envelope for trace ${t} with ${s.length} spans`),this._client.sendEnvelope(a).then(null,c=>{E&&g.error("Error while sending streamed span envelope:",c)}),this._removeTrace(t)}_removeTrace(t){let n=this._traceBuckets.get(t);n&&clearTimeout(n.timeout),this._traceBuckets.delete(t)}};function qc(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}var lo=R;function Wc(){return"history"in lo&&!!lo.history}function wA(){if(!("fetch"in lo))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function po(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function uo(){if(typeof EdgeRuntime=="string")return!0;if(!wA())return!1;if(po(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=po(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){E&&g.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function Yc(){return"ReportingObserver"in lo}function Dn(e,t){let n="fetch",r=it(n,e);return ot(n,()=>gb(void 0,t)),r}function jc(e){let t="fetch-body-resolved",n=it(t,e);return ot(t,()=>gb(MA)),n}function gb(e,t=!1){t&&!uo()||ye(R,"fetch",function(n){return function(...r){let i=new Error,{method:o,url:s}=LA(r),a={args:r,fetchData:{method:o,url:s},startTimestamp:te()*1e3,virtualError:i,headers:PA(r)};return e||Fe("fetch",{...a}),n.apply(R,r).then(async c=>(e?e(c):Fe("fetch",{...a,endTimestamp:te()*1e3,response:c}),c),c=>{Fe("fetch",{...a,endTimestamp:te()*1e3,error:c}),Ce(c)&&c.stack===void 0&&(c.stack=i.stack,pe(c,"framesToPop",1));let u=T()?.getOptions().enhanceFetchErrorMessages??"always";if(u!==!1&&Ce(c)&&c.name==="TypeError"&&(c.message==="Failed to fetch"||c.message==="Load failed"||c.message==="NetworkError when attempting to fetch resource."))try{let d=new URL(a.fetchData.url).host;u==="always"?c.message=`${c.message} (${d})`:pe(c,"__sentry_fetch_url_host__",d)}catch{}throw c})}})}async function CA(e,t){if(e?.body){let n=e.body,r=n.getReader(),i=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3),o=!0;for(;o;){let s;try{s=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);let{done:a}=await r.read();clearTimeout(s),a&&(t(),o=!1)}catch{o=!1}finally{clearTimeout(s)}}clearTimeout(i),r.releaseLock(),n.cancel().then(null,()=>{})}}function MA(e){let t;try{t=e.clone()}catch{return}CA(t,()=>{Fe("fetch-body-resolved",{endTimestamp:te()*1e3,response:e})})}function zc(e,t){return He(e)&&!!e[t]}function fb(e){return typeof e=="string"?e:e?zc(e,"url")?e.url:e.toString?e.toString():"":""}function LA(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){let[n,r]=e;return{url:fb(n),method:zc(r,"method")?String(r.method).toUpperCase():$o(n)&&zc(n,"method")?String(n.method).toUpperCase():"GET"}}let t=e[0];return{url:fb(t),method:zc(t,"method")?String(t.method).toUpperCase():"GET"}}function PA(e){let[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if($o(t))return new Headers(t.headers)}catch{}}var _b=R;function rt(){try{return _b.document.location.href}catch{return""}}function Cr(e,t=5){if(!_b.HTMLElement)return null;let n=e;for(let r=0;r<t;r++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null}var Tn=R,Se=Tn.document,Hs=Tn.navigator,Pb="Report a Bug",pR="Cancel",uR="Send Bug Report",dR="Confirm",mR="Report a Bug",fR="[email protected]",gR="Email",_R="What's the bug? What did you expect?",hR="Description",bR="Your Name",yR="Name",SR="Thank y
20ou for your report!",ER="(required)",TR="Add a screenshot",vR="Remove screenshot",IR="Highlight",AR="Hide",RR="Remove",Ub="Unable to submit feedback with empty message",Db="No client setup, cannot send feedback.",Bb="Unable to determine if Feedback was correctly sent.",Fb="Unable to send feedback. This could be because this domain is not in your list of allowed domains.",Gb="Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.",OR="widget",NR="api",kR=5e3,xR={ERROR_EMPTY_MESSAGE:Ub,ERROR_NO_CLIENT:Db,ERROR_TIMEOUT:Bb,ERROR_FORBIDDEN:Fb,ERROR_GENERIC:Gb};function Jc(e,t){return t?.[e]??xR[e]}function hb(e,t){return new Error(Jc(e,t))}var Hb=(e,t={includeReplay:!0})=>{let n=t.errorMessages;if(!e.message)throw hb("ERROR_EMPTY_MESSAGE",n);let r=T();if(!r)throw hb("ERROR_NO_CLIENT",n);e.tags&&Object.keys(e.tags).length&&k().setTags(e.tags);let i=Ms({source:NR,url:rt(),...e},t);return new Promise((o,s)=>{let a=setTimeout(()=>{c(),s(Jc("ERROR_TIMEOUT",n))},3e4),c=r.on("afterSendEvent",(l,u)=>{if(l.event_id===i)return clearTimeout(a),c(),u?.statusCode&&u.statusCode>=200&&u.statusCode<300?o(i):u?.statusCode===403?s(Jc("ERROR_FORBIDDEN",n)):s(Jc("ERROR_GENERIC",n))})})},Xc=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function wR(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(Hs.userAgent)||/Macintosh/i.test(Hs.userAgent)&&Hs.maxTouchPoints&&Hs.maxTouchPoints>1||!isSecureContext)}function $c(e,t){return{...e,...t,tags:{...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:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function CR(e){let t=Se.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 qt(e,t){return Object.entries(t).forEach(([n,r])=>{e.setAttributeNS(null,n,r)}),e}var mo=20,MR="http://www.w3.org/2000/svg";function LR(){let e=a=>Tn.document.createElementNS(MR,a),t=qt(e("svg"),{width:`${mo}`,height:`${mo}`,viewBox:`0 0 ${mo} ${mo}`,fill:"var(--actor-color, var(--foreground))"}),n=qt(e("g"),{clipPath:"url(#clip0_57_80)"}),r=qt(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 i=e("defs"),o=qt(e("clipPath"),{id:"clip0_57_80"}),s=qt(e("rect"),{width:`${mo}`,height:`${mo}`,fill:"white"});return o.appendChild(s),i.appendChild(o),t.appendChild(i).appendChild(o).appendChild(s),t}function PR({triggerLabel:e,triggerAriaLabel:t,shadow:n,styleNonce:r}){let i=Se.createElement("button");if(i.type="button",i.className="widget__actor",i.ariaHidden="false",i.ariaLabel=t||e||Pb,i.appendChild(LR()),e){let s=Se.createElement("span");s.appendChild(Se.createTextNode(e)),i.appendChild(s)}let o=CR(r);return{el:i,appendToDom(){n.appendChild(o),n.appendChild(i)},removeFromDom(){i.remove(),o.remove()},show(){i.ariaHidden="false"},hide(){i.ariaHidden="true"}}}var qb="rgba(88, 74, 192, 1)",UR={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:qb,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%)"},bb={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackgroun
71d:qb,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 yb(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 Sb({colorScheme:e,themeDark:t,themeLight:n,styleNonce:r}){let i=Se.createElement("style");return i.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  ${yb(e==="dark"?{...bb,...t}:{...UR,...n})}
98}
99
100${e==="system"?`
101@media (prefers-color-scheme: dark) {
102  :host {
103    color-scheme: only dark;
104
105    ${yb({...bb,...t})}
106  }
107}`:""}
108`,r&&i.setAttribute("nonce",r),i}var rl=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>(({id:i="sentry-feedback",autoInject:o=!0,showBranding:s=!0,isEmailRequired:a=!1,isNameRequired:c=!1,showEmail:l=!0,showName:u=!0,enableScreenshot:p=!0,useSentryUser:m={email:"email",name:"username"},tags:d,styleNonce:f,scriptNonce:_,colorScheme:h="system",themeLight:b={},themeDark:S={},addScreenshotButtonLabel:N=TR,cancelButtonLabel:I=pR,confirmButtonLabel:C=dR,emailLabel:L=gR,emailPlaceholder:y=fR,formTitle:x=mR,isRequiredLabel:z=ER,messageLabel:A=hR,messagePlaceholder:U=_R,nameLabel:w=yR,namePlaceholder:D=bR,removeScreenshotButtonLabel:H=vR,submitButtonLabel:oe=uR,successMessageText:ae=SR,triggerLabel:W=Pb,triggerAriaLabel:M="",highlightToolText:Y=IR,hideToolText:B=AR,removeHighlightText:ee=RR,errorEmptyMessageText:_e=Ub,errorNoClientText:ue=Db,errorTimeoutText:Ne=Bb,errorForbiddenText:Yt=Fb,errorGenericText:sn=Gb,onFormOpen:qn,onFormClose:an,onSubmitSuccess:Gr,onSubmitError:Wn,onFormSubmitted:ba}={})=>{let Yn={id:i,autoInject:o,showBranding:s,isEmailRequired:a,isNameRequired:c,showEmail:l,showName:u,enableScreenshot:p,useSentryUser:m,tags:d,styleNonce:f,scriptNonce:_,colorScheme:h,themeDark:S,themeLight:b,triggerLabel:W,triggerAriaLabel:M,cancelButtonLabel:I,submitButtonLabel:oe,confirmButtonLabel:C,formTitle:x,emailLabel:L,emailPlaceholder:y,messageLabel:A,messagePlaceholder:U,nameLabel:w,namePlaceholder:D,successMessageText:ae,isRequiredLabel:z,addScreenshotButtonLabel:N,removeScreenshotButtonLabel:H,highlightToolText:Y,hideToolText:B,removeHighlightText:ee,errorEmptyMessageText:_e,errorNoClientText:ue,errorTimeoutText:Ne,errorForbiddenText:Yt,errorGenericText:sn,onFormClose:an,onFormOpen:qn,onSubmitError:Wn,onSubmitSuccess:Gr,onFormSubmitted:ba},zt=null,St=null,Mt=[],Ci=G=>{if(!zt){let de=Se.createElement("div");de.id=String(G.id),Se.body.appendChild(de),zt=de.attachShadow({mode:"open"}),St=Sb(G),zt.appendChild(St)}return zt},Mi=async G=>{let de=G.enableScreenshot&&wR(),Q,me;try{Q=(t?t():await e("feedbackModalIntegration",_))(),Vi(Q)}catch{throw Xc&&g.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 Yr=de?n?n():await e("feedbackScreenshotIntegration",_):void 0;Yr&&(me=Yr(),Vi(me))}catch{Xc&&g.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.")}let K={ERROR_EMPTY_MESSAGE:G.errorEmptyMessageText,ERROR_NO_CLIENT:G.errorNoClientText,ERROR_TIMEOUT:G.errorTimeoutText,ERROR_FORBIDDEN:G.errorForbiddenText,ERROR_GENERIC:G.errorGenericText},An=(Yr,eT)=>Hb(Yr,{includeReplay:!0,...eT,errorMessages:K}),Wr=Q.createDialog({options:{...G,onFormClose:()=>{Wr?.close(),G.onFormClose?.()},onFormSubmitted:()=>{Wr?.close(),G.onFormSubmitted?.()}},screenshotIntegration:me,sendFeedback:An,shadow:Ci(G)});return Wr},Hr=(G,de={})=>{let Q=$c(Yn,de),me=typeof G=="string"?Se.querySelector(G):typeof G.addEventListener=="function"?G:null;if(!me)throw Xc&&g.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let K=null,An=async()=>{K||(K=await Mi({...Q,onFormSubmitted:()=>{K?.removeFromDom(),Q.onFormSubmitted?.()}})),K.appendToDom(),K.open()};me.addEventListener("click",An);let Wr=()=>{Mt=Mt.filter(Yr=>Yr!==Wr),K?.removeFromDom(),K=null,me.removeEventListener("click",An)};return Mt.push(Wr),Wr},qr=(G={})=>{let de=$c(Yn,G),Q=Ci(de),me=PR({triggerLabel:de.triggerLabel,triggerAriaLabel:de.triggerAriaLabel,shadow:Q,styleNonce:f});return Hr(me.el,{...de,onFormOpen(){me.hide()},onFormClose(){me.show()},onFormSubmitted(){me.show()}}),me};return{name:"Feedback",setupOnce(){!lt()||!Yn.autoInject||(Se.readyState==="loading"?Se.addEventListener("DOMContentLoaded",()=>qr().appendToDom()):qr().appendToDom())},attachTo:Hr,createWidget(G={}){let de=qr($c(Yn,G));return de.appendToDom(),de},async createForm(G={}){return Mi($c(Yn,G))},setTheme(G){if(Yn.colorScheme=G,zt){let de=Sb(Yn);St?zt.replaceChild(de,St):zt.prepend(de),St=de}},remove(){zt&&(zt.parentElement?.remove(),zt=null,St=null),Mt.forEach(G=>G()),Mt=[]}}});function DR(){return T()?.getIntegrationByName("Feedback")}var il,Te,Wb,mi,Eb,Yb,ed,qs={},id=[],BR=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,od=Array.isArray;function Lr(e,t){for(var n in t)e[n]=t[n];return e}function zb(e){var t=e.parentNode;t&&t.removeChild(e)}function ie(e,t,n){var r,i,o,s={};
108for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?il.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return Qc(e,s,r,i,null)}function Qc(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i??++Wb,__i:-1,__u:0};return i==null&&Te.vnode!=null&&Te.vnode(o),o}function Ws(e){return e.children}function Zc(e,t){this.props=e,this.context=t}function go(e,t){if(t==null)return e.__?go(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"?go(e):null}function FR(e,t,n){var r,i=e.__v,o=i.__e,s=e.__P;if(s)return(r=Lr({},i)).__v=i.__v+1,Te.vnode&&Te.vnode(r),sd(s,r,i,e.__n,s.ownerSVGElement!==void 0,32&i.__u?[o]:null,t,o??go(i),!!(32&i.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=o&&jb(r),r}function jb(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 jb(e)}}function Tb(e){(!e.__d&&(e.__d=!0)&&mi.push(e)&&!nl.__r++||Eb!==Te.debounceRendering)&&((Eb=Te.debounceRendering)||Yb)(nl)}function nl(){var e,t,n,r=[],i=[];for(mi.sort(ed);e=mi.shift();)e.__d&&(n=mi.length,t=FR(e,r,i)||t,n===0||mi.length>n?(td(r,t,i),i.length=r.length=0,t=void 0,mi.sort(ed)):t&&Te.__c&&Te.__c(t,id));t&&td(r,t,i),nl.__r=0}function $b(e,t,n,r,i,o,s,a,c,l,u){var p,m,d,f,_,h=r&&r.__k||id,b=t.length;for(n.__d=c,GR(n,t,h),c=n.__d,p=0;p<b;p++)(d=n.__k[p])!=null&&typeof d!="boolean"&&typeof d!="function"&&(m=d.__i===-1?qs:h[d.__i]||qs,d.__i=p,sd(e,d,m,i,o,s,a,c,l,u),f=d.__e,d.ref&&m.ref!=d.ref&&(m.ref&&ad(m.ref,null,d),u.push(d.ref,d.__c||f,d)),_==null&&f!=null&&(_=f),65536&d.__u||m.__k===d.__k?c=Vb(d,c,e):typeof d.type=="function"&&d.__d!==void 0?c=d.__d:f&&(c=f.nextSibling),d.__d=void 0,d.__u&=-196609);n.__d=c,n.__e=_}function GR(e,t,n){var r,i,o,s,a,c=t.length,l=n.length,u=l,p=0;for(e.__k=[],r=0;r<c;r++)(i=e.__k[r]=(i=t[r])==null||typeof i=="boolean"||typeof i=="function"?null:typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?Qc(null,i,null,null,i):od(i)?Qc(Ws,{children:i},null,null,null):i.constructor===void 0&&i.__b>0?Qc(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)!=null?(i.__=e,i.__b=e.__b+1,a=HR(i,n,s=r+p,u),i.__i=a,o=null,a!==-1&&(u--,(o=n[a])&&(o.__u|=131072)),o==null||o.__v===null?(a==-1&&p--,typeof i.type!="function"&&(i.__u|=65536)):a!==s&&(a===s+1?p++:a>s?u>c-s?p+=a-s:p--:p=a<s&&a==s-1?a-s:0,a!==r+p&&(i.__u|=65536))):(o=n[r])&&o.key==null&&o.__e&&(o.__e==e.__d&&(e.__d=go(o)),nd(o,o,!1),n[r]=null,u--);if(u)for(r=0;r<l;r++)(o=n[r])!=null&&(131072&o.__u)==0&&(o.__e==e.__d&&(e.__d=go(o)),nd(o,o))}function Vb(e,t,n){var r,i;if(typeof e.type=="function"){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=Vb(r[i],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 HR(e,t,n,r){var i=e.key,o=e.type,s=n-1,a=n+1,c=t[n];if(c===null||c&&i==c.key&&o===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&&i==c.key&&o===c.type)return s;s--}if(a<t.length){if((c=t[a])&&(131072&c.__u)==0&&i==c.key&&o===c.type)return a;a++}}return-1}function vb(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||BR.test(t)?n:n+"px"}function Vc(e,t,n,r,i){var o;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||vb(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||vb(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=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+o]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,o?Ab:Ib,o)):e.removeEventListener(t,o?Ab:Ib,o);else{if(i)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 Ib(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(Te.event?Te.event(e):e)}}function Ab(e){if(this.l)return this.l[e.type+!0](Te.event?Te.event(e):e)}function sd(e,t,n,r,i,o,s,a,c,l){var u,p,m,d,f,_,h,b,S,N,I,C,L,y,x,z=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),o=[a=t.__e=n.__e]),(u=Te.__b)&&u(t);e:if(typeof z=="function")try{if(b=t.props,S=(u=z.contextType)&&r[u.__c],N=u?S?S.props.value:u.__:r,n.__c?h=(p=t.__c=n.__c).__=p.__E:("prototype"in z&&z.prototype.render?t.__c=p=new z(b,N):(t.__c=p=new Zc(b,N),p.constructor=z,p.render=WR),S&&S.sub(p),p.props=b,p.state||(p.state={}),p.context=N,p.__n=r,m=p.__d=!0,p.__h=[],p._sb=[]),p.__s==null&&(p.__s=p.state),z.getDerivedStateFromProps!=null&&(p.__s==p.state&&(p.__s=Lr({}
vendor: 4,522 bytes, line 108
108,p.__s)),Lr(p.__s,z.getDerivedStateFromProps(b,p.__s))),d=p.props,f=p.state,p.__v=t,m)z.getDerivedStateFromProps==null&&p.componentWillMount!=null&&p.componentWillMount(),p.componentDidMount!=null&&p.__h.push(p.componentDidMount);else{if(z.getDerivedStateFromProps==null&&b!==d&&p.componentWillReceiveProps!=null&&p.componentWillReceiveProps(b,N),!p.__e&&(p.shouldComponentUpdate!=null&&p.shouldComponentUpdate(b,p.__s,N)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(p.props=b,p.state=p.__s,p.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(A){A&&(A.__=t)}),I=0;I<p._sb.length;I++)p.__h.push(p._sb[I]);p._sb=[],p.__h.length&&s.push(p);break e}p.componentWillUpdate!=null&&p.componentWillUpdate(b,p.__s,N),p.componentDidUpdate!=null&&p.__h.push(function(){p.componentDidUpdate(d,f,_)})}if(p.context=N,p.props=b,p.__P=e,p.__e=!1,C=Te.__r,L=0,"prototype"in z&&z.prototype.render){for(p.state=p.__s,p.__d=!1,C&&C(t),u=p.render(p.props,p.state,p.context),y=0;y<p._sb.length;y++)p.__h.push(p._sb[y]);p._sb=[]}else do p.__d=!1,C&&C(t),u=p.render(p.props,p.state,p.context),p.state=p.__s;while(p.__d&&++L<25);p.state=p.__s,p.getChildContext!=null&&(r=Lr(Lr({},r),p.getChildContext())),m||p.getSnapshotBeforeUpdate==null||(_=p.getSnapshotBeforeUpdate(d,f)),$b(e,od(x=u!=null&&u.type===Ws&&u.key==null?u.props.children:u)?x:[x],t,n,r,i,o,s,a,c,l),p.base=t.__e,t.__u&=-161,p.__h.length&&s.push(p),h&&(p.__E=p.__=null)}catch(A){t.__v=null,c||o!=null?(t.__e=a,t.__u|=c?160:32,o[o.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),Te.__e(A,t,n)}else o==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=qR(n.__e,t,n,r,i,o,s,c,l);(u=Te.diffed)&&u(t)}function td(e,t,n){for(var r=0;r<n.length;r++)ad(n[r],n[++r],n[++r]);Te.__c&&Te.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){Te.__e(o,i.__v)}})}function qR(e,t,n,r,i,o,s,a,c){var l,u,p,m,d,f,_,h=n.props,b=t.props,S=t.type;if(S==="svg"&&(i=!0),o!=null){for(l=0;l<o.length;l++)if((d=o[l])&&"setAttribute"in d==!!S&&(S?d.localName===S:d.nodeType===3)){e=d,o[l]=null;break}}if(e==null){if(S===null)return document.createTextNode(b);e=i?document.createElementNS("http://www.w3.org/2000/svg",S):document.createElement(S,b.is&&b),o=null,a=!1}if(S===null)h===b||a&&e.data===b||(e.data=b);else{if(o=o&&il.call(e.childNodes),h=n.props||qs,!a&&o!=null)for(h={},l=0;l<e.attributes.length;l++)h[(d=e.attributes[l]).name]=d.value;for(l in h)d=h[l],l=="children"||(l=="dangerouslySetInnerHTML"?p=d:l==="key"||l in b||Vc(e,l,null,d,i));for(l in b)d=b[l],l=="children"?m=d:l=="dangerouslySetInnerHTML"?u=d:l=="value"?f=d:l=="checked"?_=d:l==="key"||a&&typeof d!="function"||h[l]===d||Vc(e,l,d,h[l],i);if(u)a||p&&(u.__html===p.__html||u.__html===e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(p&&(e.innerHTML=""),$b(e,od(m)?m:[m],t,n,r,i&&S!=="foreignObject",o,s,o?o[0]:n.__k&&go(n,0),a,c),o!=null)for(l=o.length;l--;)o[l]!=null&&zb(o[l]);a||(l="value",f!==void 0&&(f!==e[l]||S==="progress"&&!f||S==="option"&&f!==h[l])&&Vc(e,l,f,h[l],!1),l="checked",_!==void 0&&_!==e[l]&&Vc(e,l,_,h[l],!1))}return e}function ad(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){Te.__e(r,n)}}function nd(e,t,n){var r,i;if(Te.unmount&&Te.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||ad(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){Te.__e(o,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&nd(r[i],t,n||typeof e.type!="function");n||e.__e==null||zb(e.__e),e.__=e.__e=e.__d=void 0}function WR(e,t,n){return this.constructor(e,n)}function YR(e,t,n){var r,i,o,s;Te.__&&Te.__(e,t),i=(r=!1)?null:t.__k,o=[],s=[],sd(t,e=t.__k=ie(Ws,null,[e]),i||qs,qs,t.ownerSVGElement!==void 0,i?null:t.firstChild?il.call(t.childNodes):null,o,i?i.__e:t.firstChild,r,s),e.__d=void 0,td(o,e,s)}il=id.slice,Te={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(a){e=a}throw e}},Wb=0,Zc.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Lr({},this.state),typeof e=="function"&&(e=e(Lr({},n),this.props)),e&&Lr(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Tb(this))},Zc.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Tb(this))},Zc.prototype.render=Ws,mi=[],Yb=typeof Promise=="function"?Promise.prototype.then.bind(Prom
108ise.resolve()):setTimeout,ed=function(e,t){return e.__v.__b-t.__v.__b},nl.__r=0;var or,Ee,Ku,Rb,_o=0,Kb=[],el=[],Le=Te,Ob=Le.__b,Nb=Le.__r,kb=Le.diffed,xb=Le.__c,wb=Le.unmount,Cb=Le.__;function gi(e,t){Le.__h&&Le.__h(Ee,e,_o||t),_o=0;var n=Ee.__H||(Ee.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:el}),n.__[e]}function fi(e){return _o=1,Jb(Qb,e)}function Jb(e,t,n){var r=gi(or++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Qb(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],l=r.t(c,a);c!==l&&(r.__N=[l,r.__[1]],r.__c.setState({}))}],r.__c=Ee,!Ee.u)){var i=function(a,c,l){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(m){return!!m.__c});if(u.every(function(m){return!m.__N}))return!o||o.call(this,a,c,l);var p=!1;return u.forEach(function(m){if(m.__N){var d=m.__[0];m.__=m.__N,m.__N=void 0,d!==m.__[0]&&(p=!0)}}),!(!p&&r.__c.props===a)&&(!o||o.call(this,a,c,l))};Ee.u=!0;var o=Ee.shouldComponentUpdate,s=Ee.componentWillUpdate;Ee.componentWillUpdate=function(a,c,l){if(this.__e){var u=o;o=void 0,i(a,c,l),o=u}s&&s.call(this,a,c,l)},Ee.shouldComponentUpdate=i}return r.__N||r.__}function zR(e,t){var n=gi(or++,3);!Le.__s&&cd(n.__H,t)&&(n.__=e,n.i=t,Ee.__H.__h.push(n))}function Xb(e,t){var n=gi(or++,4);!Le.__s&&cd(n.__H,t)&&(n.__=e,n.i=t,Ee.__h.push(n))}function jR(e){return _o=5,Ys(function(){return{current:e}},[])}function $R(e,t,n){_o=6,Xb(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 Ys(e,t){var n=gi(or++,7);return cd(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function fo(e,t){return _o=8,Ys(function(){return e},t)}function VR(e){var t=Ee.context[e.__c],n=gi(or++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(Ee)),t.props.value):e.__}function KR(e,t){Le.useDebugValue&&Le.useDebugValue(t?t(e):e)}function JR(e){var t=gi(or++,10),n=fi();return t.__=e,Ee.componentDidCatch||(Ee.componentDidCatch=function(r,i){t.__&&t.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]}function XR(){var e=gi(or++,11);if(!e.__){for(var t=Ee.__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 QR(){for(var e;e=Kb.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(tl),e.__H.__h.forEach(rd),e.__H.__h=[]}catch(t){e.__H.__h=[],Le.__e(t,e.__v)}}Le.__b=function(e){Ee=null,Ob&&Ob(e)},Le.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Cb&&Cb(e,t)},Le.__r=function(e){Nb&&Nb(e),or=0;var t=(Ee=e.__c).__H;t&&(Ku===Ee?(t.__h=[],Ee.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=el,n.__N=n.i=void 0})):(t.__h.forEach(tl),t.__h.forEach(rd),t.__h=[],or=0)),Ku=Ee},Le.diffed=function(e){kb&&kb(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Kb.push(t)!==1&&Rb===Le.requestAnimationFrame||((Rb=Le.requestAnimationFrame)||ZR)(QR)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==el&&(n.__=n.__V),n.i=void 0,n.__V=el})),Ku=Ee=null},Le.__c=function(e,t){t.some(function(n){try{n.__h.forEach(tl),n.__h=n.__h.filter(function(r){return!r.__||rd(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],Le.__e(r,n.__v)}}),xb&&xb(e,t)},Le.unmount=function(e){wb&&wb(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{tl(r)}catch(i){t=i}}),n.__H=void 0,t&&Le.__e(t,n.__v))};var Mb=typeof requestAnimationFrame=="function";function ZR(e){var t,n=function(){clearTimeout(r),Mb&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Mb&&(t=requestAnimationFrame(n))}function tl(e){var t=Ee,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),Ee=t}function rd(e){var t=Ee;e.__c=e.__(),Ee=t}function cd(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Qb(e,t){return typeof t=="function"?t(e):t}var eO=Object.defineProperty({__proto__:null,useCallback:fo,useContext:VR,useDebugValue:KR,useEffect:zR,useErrorBoundary:JR,useId:XR,useImperativeHandle:$R,useLayoutEffect:Xb,useMemo:Ys,useReducer:Jb,useRef:jR,useState:fi},Symbol.toStringTag,{value:"Module"}),tO="http://www.w3.org/2000/svg";function nO(){let e=r=>Se.createElementNS(tO,r),t=qt(e("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),n=qt(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 rO({options:e}){let t=Ys(()=>({__html:nO().outerHTML}),[]);return ie("h2",{class:"dialog__header"},ie("span",{class:"dialog__title"},e.formTitle),e.showBranding?ie("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:t}):null)}function iO(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 Ju(e,t){let n=e.get(t);return typeof n=="string"?n.trim():""}function oO({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:i,onSubmitSuccess:o,onSubmitError:s,showEmail
108:a,showName:c,screenshotInput:l}){let{tags:u,addScreenshotButtonLabel:p,removeScreenshotButtonLabel:m,cancelButtonLabel:d,emailLabel:f,emailPlaceholder:_,isEmailRequired:h,isNameRequired:b,messageLabel:S,messagePlaceholder:N,nameLabel:I,namePlaceholder:C,submitButtonLabel:L,isRequiredLabel:y}=e,[x,z]=fi(!1),[A,U]=fi(null),[w,D]=fi(!1),H=l?.input,[oe,ae]=fi(null),W=fo(B=>{ae(B),D(!1)},[]),M=fo(B=>{let ee=iO(B,{emailLabel:f,isEmailRequired:h,isNameRequired:b,messageLabel:S,nameLabel:I});return ee.length>0?U(`Please enter in the following required fields: ${ee.join(", ")}`):U(null),ee.length===0},[f,h,b,S,I]),Y=fo(async B=>{z(!0);try{if(B.preventDefault(),!(B.target instanceof HTMLFormElement))return;let ee=new FormData(B.target),_e=await(l&&w?l.value():void 0),ue={name:Ju(ee,"name"),email:Ju(ee,"email"),message:Ju(ee,"message"),attachments:_e?[_e]:void 0};if(!M(ue))return;try{let Ne=await i({name:ue.name,email:ue.email,message:ue.message,source:OR,tags:u},{attachments:ue.attachments});o(ue,Ne)}catch(Ne){Xc&&g.error(Ne);let Yt=Ne instanceof Error?Ne:new Error(String(Ne));U(Yt.message),s(Yt)}}finally{z(!1)}},[l&&w,o,s]);return ie("form",{class:"form",onSubmit:Y},H&&w?ie(H,{onError:W}):null,ie("fieldset",{class:"form__right","data-sentry-feedback":!0,disabled:x},ie("div",{class:"form__top"},A?ie("div",{class:"form__error-container"},A):null,c?ie("label",{for:"name",class:"form__label"},ie(Xu,{label:I,isRequiredLabel:y,isRequired:b}),ie("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:C,required:b,type:"text"})):ie("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden"}),a?ie("label",{for:"email",class:"form__label"},ie(Xu,{label:f,isRequiredLabel:y,isRequired:h}),ie("input",{class:"form__input",defaultValue:t,id:"email",name:"email",placeholder:_,required:h,type:"email"})):ie("input",{"aria-hidden":!0,value:t,name:"email",type:"hidden"}),ie("label",{for:"message",class:"form__label"},ie(Xu,{label:S,isRequiredLabel:y,isRequired:!0}),ie("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:N,required:!0,rows:5})),H?ie("label",{for:"screenshot",class:"form__label"},ie("button",{class:"btn btn--default",disabled:x,type:"button",onClick:()=>{ae(null),D(B=>!B)}},w?m:p),oe?ie("div",{class:"form__error-container"},oe.message):null):null),ie("div",{class:"btn-group"},ie("button",{class:"btn btn--primary",disabled:x,type:"submit"},L),ie("button",{class:"btn btn--default",disabled:x,type:"button",onClick:r},d))))}function Xu({label:e,isRequired:t,isRequiredLabel:n}){return ie("span",{class:"form__label__text"},e,t&&ie("span",{class:"form__label__text--required"},n))}var Kc=16,Lb=17,sO="http://www.w3.org/2000/svg";function aO(){let e=c=>Tn.document.createElementNS(sO,c),t=qt(e("svg"),{width:`${Kc}`,height:`${Lb}`,viewBox:`0 0 ${Kc} ${Lb}`,fill:"inherit"}),n=qt(e("g"),{clipPath:"url(#clip0_57_156)"}),r=qt(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"}),i=qt(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(i,r);let o=e("defs"),s=qt(e("clipPath"),{id:"clip0_57_156"}),a=qt(e("rect"),{width:`${Kc}`,height:`${Kc}`,fill:"white",transform:"translate(0 0.5)"});return s.appendChild(a),o.appendChild(s),t.appendChild(o).appendChild(s).appendChild(a),t}function cO({open:e,onFormSubmitted:t,...n}){let r=n.options,i=Ys(()=>({__html:aO().outerHTML}),[]),[o,s]=fi(null),a=fo(()=>{o&&(clearTimeout(o),s(null)),t()},[o]),c=fo((l,u)=>{n.onSubmitSuccess(l,u),s(setTimeout(()=>{t(),s(null)},kR))},[t]);return ie(Ws,null,o?ie("div",{class:"success__position",onClick:a},ie("div",{class:"success__content"},r.successMessageText,ie("span",{class:"success__icon",dangerouslySetInnerHTML:i}))):ie("dialog",{class:"dialog",onClick:r.onFormClose,open:e},ie("div",{class:"dialog__position"},ie("div",{class:"dialog__content",onClick:l=>{l.stopPropagation()}},ie(rO,{options:r}),ie(oO,{...n,onSubmitSuccess:c})))))}var lO=`
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`,pO=`
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`,uO=`
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`,dO=`
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`,mO=`
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 fO(e){let t=Se.createElement("style");return t.textContent=`
389:host {
390  --dialog-inset: var(--inset);
391}
392
393${lO}
394${pO}
395${uO}
396${dO}
397${mO}
398`,e&&t.setAttribute("nonce",e),t}function gO(){let e=k().getUser(),t=Z().getUser(),n=dn().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}var Zb=(()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{let i=r,o=e.useSentryUser,s=gO(),a=Se.createElement("div"),c=fO(e.styleNonce),l="",u={get el(){return a},appendToDom(){!i.contains(c)&&!i.contains(a)&&(i.appendChild(c),i.appendChild(a))},removeFromDom(){a.remove(),c.remove(),Se.body.style.overflow=l},open(){m(!0),e.onFormOpen?.(),T()?.emit("openFeedbackWidget"),l=Se.body.style.overflow,Se.body.style.overflow="hidden"},close(){m(!1),Se.body.style.overflow=l}},p=t?.createInput({h:ie,hooks:eO,dialog:u,options:e}),m=d=>{YR(ie(cO,{options:e,screenshotInput:p,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:String(o&&s?.[o.name]||""),defaultEmail:String(o&&s?.[o.email]||""),onFormClose:()=>{m(!1),e.onFormClose?.()},onSubmit:n,onSubmitSuccess:(f,_)=>{m(!1),e.onSubmitSuccess?.(f,_)},onSubmitError:f=>{e.onSubmitError?.(f)},onFormSubmitted:()=>{e.onFormSubmitted?.()},open:d}),a)};return u}}));function _O({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 hO(e){let t=Se.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 bO({h:e}){return function({action:n,setAction:r,options:i}){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")}},i.highlightToolText),e("button",{type:"button",class:`editor__tool ${n==="hide"?"editor__tool--active":""}`,onClick:()=>{r(n==="hide"?"":"hide")}},i.hideToolText)))}}function yO({hooks:e}){function t(){let[n,r]=e.useState(Tn.devicePixelRatio??1);return e.useEffect(()=>{let i=()=>{r(Tn.devicePixelRatio)},o=matchMedia(`(resolution: ${Tn.devicePixelRatio}dppx)`);
490return o.addEventListener("change",i),()=>{o.removeEventListener("change",i)}},[]),n}return function({onBeforeScreenshot:r,onScreenshot:i,onAfterScreenshot:o,onError:s}){let a=t();e.useEffect(()=>{(async()=>{r();let l=await Hs.mediaDevices.getDisplayMedia({video:{width:Tn.innerWidth*a,height:Tn.innerHeight*a},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),u=Se.createElement("video");await new Promise((p,m)=>{u.srcObject=l,u.onloadedmetadata=()=>{i(u,a),l.getTracks().forEach(d=>d.stop()),p()},u.play().catch(m)}),o()})().catch(s)},[])}}function SO(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 Mr(e,t,n){if(!e)return;let r=e.getContext("2d",t);r&&n(e,r)}function Qu(e,t){Mr(e,{alpha:!0},(n,r)=>{r.drawImage(t,0,0,t.width,t.height,0,0,n.width,n.height)})}function Zu(e,t,n){Mr(e,{alpha:!0},(r,i)=>{n.length&&(i.fillStyle="rgba(0, 0, 0, 0.25)",i.fillRect(0,0,r.width,r.height)),n.forEach(o=>{SO(o,i,t)})})}function EO({h:e,hooks:t,outputBuffer:n,dialog:r,options:i}){let o=yO({hooks:t}),s=bO({h:e}),a=_O({h:e}),c={__html:hO(i.styleNonce).innerText},l=r.el.style,u=({screenshot:p})=>{let[m,d]=t.useState("highlight"),[f,_]=t.useState([]),h=t.useRef(null),b=t.useRef(null),S=t.useRef(null),N=t.useRef(null),[I,C]=t.useState(1),L=t.useMemo(()=>{let w=Se.getElementById(i.id);if(!w)return"white";let D=getComputedStyle(w);return D.getPropertyValue("--button-primary-background")||D.getPropertyValue("--accent-background")},[i.id]);t.useLayoutEffect(()=>{let w=()=>{let D=h.current;D&&(Mr(p.canvas,{alpha:!1},H=>{let oe=Math.min(D.clientWidth/H.width,D.clientHeight/H.height);C(oe)}),(D.clientHeight===0||D.clientWidth===0)&&setTimeout(w,0))};return w(),Tn.addEventListener("resize",w),()=>{Tn.removeEventListener("resize",w)}},[p]);let y=t.useCallback((w,D)=>{Mr(w,{alpha:!0},(H,oe)=>{oe.scale(D,D),H.width=p.canvas.width,H.height=p.canvas.height})},[p]);t.useEffect(()=>{y(b.current,p.dpi),Qu(b.current,p.canvas)},[p]),t.useEffect(()=>{y(S.current,p.dpi),Mr(S.current,{alpha:!0},(w,D)=>{D.clearRect(0,0,w.width,w.height)}),Zu(S.current,L,f)},[f,L]),t.useEffect(()=>{y(n,p.dpi),Qu(n,p.canvas),Mr(Se.createElement("canvas"),{alpha:!0},(w,D)=>{D.scale(p.dpi,p.dpi),w.width=p.canvas.width,w.height=p.canvas.height,Zu(w,L,f),Qu(n,w)})},[f,p,L]);let x=w=>{if(!m||!N.current)return;let D=N.current.getBoundingClientRect(),H={type:m,x:w.offsetX/I,y:w.offsetY/I},oe=(M,Y)=>{let B=(Y.clientX-D.x)/I,ee=(Y.clientY-D.y)/I;return{type:M.type,x:Math.min(M.x,B),y:Math.min(M.y,ee),w:Math.abs(B-M.x),h:Math.abs(ee-M.y)}},ae=M=>{Mr(S.current,{alpha:!0},(Y,B)=>{B.clearRect(0,0,Y.width,Y.height)}),Zu(S.current,L,[...f,oe(H,M)])},W=M=>{let Y=oe(H,M);Y.w*I>=1&&Y.h*I>=1&&_(B=>[...B,Y]),Se.removeEventListener("mousemove",ae),Se.removeEventListener("mouseup",W)};Se.addEventListener("mousemove",ae),Se.addEventListener("mouseup",W)},z=t.useCallback(w=>D=>{D.preventDefault(),D.stopPropagation(),_(H=>{let oe=[...H];return oe.splice(w,1),oe})},[]),A={width:`${p.canvas.width*I}px`,height:`${p.canvas.height*I}px`},U=w=>{w.stopPropagation()};return e("div",{class:"editor"},e("style",{nonce:i.styleNonce,dangerouslySetInnerHTML:c}),e("div",{class:"editor__image-container"},e("div",{class:"editor__canvas-container",ref:h},e("canvas",{ref:b,id:"background",style:A}),e("canvas",{ref:S,id:"foreground",style:A}),e("div",{ref:N,onMouseDown:x,style:A},f.map((w,D)=>e("div",{key:D,class:"editor__rect",style:{top:`${w.y*I}px`,left:`${w.x*I}px`,width:`${w.w*I}px`,height:`${w.h*I}px`}},e("button",{"aria-label":i.removeHighlightText,onClick:z(D),onMouseDown:U,onMouseUp:U,type:"button"},e(a,null))))))),e(s,{options:i,action:m,setAction:d}))};return function({onError:m}){let[d,f]=t.useState();return o({onBeforeScreenshot:t.useCallback(()=>{l.display="none"},[]),onScreenshot:t.useCallback((_,h)=>{Mr(Se.createElement("canvas"),{alpha:!1},(b,S)=>{S.scale(h,h),b.width=_.videoWidth,b.height=_.videoHeight,S.drawImage(_,0,0,b.width,b.height),f({canvas:b,dpi:h})}),n.width=_.videoWidth,n.height=_.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{l.display="block"},[]),onError:t.useCallback(_=>{l.display="block",m(_)},[])}),d?e(u,{screenshot:d}):e("div",null)}}var ey=(()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{let i=Se.createElement("canvas");return{input:EO({h:e,hooks:t,outputBuffer:i,dialog:n,options:r}),value:async()=>{let o=await new Promise(s=>{i.toBlob(s,"image/png")});if(o)return{data:new Uint8Array(await o.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}}));var O=R,ld=0;function pd(){return ld>0}function TO(){ld++,setTimeout(()=>{ld--})}function _i(e,t={}){function n(i){return typeof i=="function"}if(!n(e))return e;try{if(Object.prototype.hasOwnProperty.call(e,"__sentry_wrapped__")){let o=e.__sentry_wrapped__;return typeof o=="function"?o:e}if(fr(e))return e}catch{return e}let r=function(...i){R._sentryWrappedDepth=(R._sentryWrappedDepth||0)+1;try{let o=i.map(s=>_i(s,t));return e.apply(this,o)}catch(o){throw TO(),Be(s=>{s.addEventProcessor(a=>(t.mechanism&&(Kr(a,void 0,void 0),Je(a,t.mechanism)),a.extra={...a.extra,arguments:i},a)),X(o)}),o}finally{R._sentryWrappedDepth=(R._sentryWrappedDepth||0)-1}};try{for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}catch{}Vo(r,e),pe(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function ho(){let e=rt(),{referrer:t}=O.document||{},{userAgent:n}=O.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}var vO=["replayIntegration","replayCanvasIntegration","feedbackIntegration","feedbackModalIntegration","feedbackScreenshotIntegration","captureConsoleIntegration","contextLinesIntegration","linkedErrorsIntegration","dedupeIntegration","extraErrorDataIntegration","graphqlClientIntegration","httpClientIntegration","reportingObserverIntegration","rewriteFramesIntegration","browserProfilingIntegration","moduleMetadataIntegration","instrumentAnthropicAiClient","
490instrumentOpenAiClient","instrumentGoogleGenAIClient","instrumentStateGraph","instrumentLangGraph","createLangChainCallbackHandler","instrumentLangChainEmbeddings"],IO={replayCanvasIntegration:"replay-canvas",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot"};function AO(e){return IO[e]||e.replace("Integration","").toLowerCase()}var ty=O;async function ud(e,t){let n=vO.includes(e)?AO(e):void 0,r=ty.Sentry=ty.Sentry||{};if(!n)throw new Error(`Cannot lazy load integration: ${e}`);let i=r[e];if(typeof i=="function"&&!("_isShim"in i))return i;let o=RO(n),s=O.document.createElement("script");s.src=o,s.crossOrigin="anonymous",s.referrerPolicy="strict-origin",t&&s.setAttribute("nonce",t);let a=new Promise((p,m)=>{s.addEventListener("load",()=>p()),s.addEventListener("error",m)}),c=O.document.currentScript,l=O.document.body||O.document.head||c?.parentElement;if(l)l.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 u=r[e];if(typeof u!="function")throw new Error(`Could not load integration: ${e}`);return u}function RO(e){let n=T()?.getOptions()?.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${Lt}/${e}.min.js`,n).toString()}var OO=rl({lazyLoadIntegration:ud});var ny=rl({getModalIntegration:()=>Zb,getScreenshotIntegration:()=>ey});function zs(e,t){let n=ol(e,t),r={type:CO(t),value:MO(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function NO(e,t,n,r){let o=T()?.getOptions().normalizeDepth,s=UO(t),a={__serialized__:Jo(t,o)};if(s)return{exception:{values:[zs(e,s)]},extra:a};let c={exception:{values:[{type:mr(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:LO(t,{isUnhandledRejection:r})}]},extra:a};if(n){let l=ol(e,n);l.length&&(c.exception.values[0].stacktrace={frames:l})}return c}function dd(e,t){return{exception:{values:[zs(e,t)]}}}function ol(e,t){let n=t.stacktrace||t.stack||"",r=xO(t),i=wO(t);try{return e(n,r,i)}catch{}return[]}var kO=/Minified React error #\d+;/i;function xO(e){return e&&kO.test(e.message)?1:0}function wO(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function ry(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function CO(e){let t=e?.name;return!t&&ry(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function MO(e){let t=e?.message;return ry(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?yc(t.error):yc(e):"No error message"}function fd(e,t,n,r){let i=n?.syntheticException||void 0,o=bo(e,t,i,r);return Je(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),xn(o)}function gd(e,t,n="info",r,i){let o=r?.syntheticException||void 0,s=md(e,t,o,i);return s.level=n,r?.event_id&&(s.event_id=r.event_id),xn(s)}function bo(e,t,n,r,i){let o;if(Pi(t)&&t.error)return dd(e,t.error);if(jo(t)||Ea(t)){let s=t;if("stack"in t){o=dd(e,t);let a=o.exception?.values?.[0];if(r&&n&&a&&!a.stacktrace){let c=ol(e,n);c.length&&(a.stacktrace={frames:c},Je(o,{synthetic:!0}))}}else{let a=s.name||(jo(s)?"DOMError":"DOMException"),c=s.message?`${a}: ${s.message}`:a;o=md(e,c,n,r),Kr(o,c)}return"code"in s&&(o.tags={...o.tags,"DOMException.code":`${s.code}`}),o}return Ce(t)?dd(e,t):Re(t)||mr(t)?(o=NO(e,t,n,i),Je(o,{synthetic:!0}),o):(o=md(e,t,n,r),Kr(o,`${t}`,void 0),Je(o,{synthetic:!0}),o)}function md(e,t,n,r){let i={};if(r&&n){let o=ol(e,n);o.length&&(i.exception={values:[{value:t,stacktrace:{frames:o}}]}),Je(i,{synthetic:!0})}if(On(t)){let{__sentry_template_string__:o,__sentry_template_values__:s}=t;return i.logentry={message:o,params:s},i}return i.message=t,i}function LO(e,{isUnhandledRejection:t}){let n=va(e),r=t?"promise rejection":"exception";return Pi(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:mr(e)?`Event \`${PO(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function PO(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function UO(e){return Object.values(e).find(Ce)}var js=class extends xs{constructor(t){let n=DO(t),r=O.SENTRY_SDK_SOURCE||au();Ru(n,"browser",["browser"],r),super(n);let{userInfo:i}=this.getDataCollectionOptions();n._metadata?.sdk&&(n._metadata.sdk.settings={infer_ip:i?"auto":"never",...n._metadata.sdk.settings});let{sendClientReports:o}=this._options;O.document&&O.document.addEventListener("visibilitychange",()=>{O.document.visibilityState==="hidden"&&(o&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}),i&&this.on("beforeSendSession",Au)}eventFromException(t,n){return fd(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return gd(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,i){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,i)}};function DO(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:O.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}var Qe=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var F=R;var BO=(e,t)=>
490e>t[1]?"poor":e>t[0]?"needs-improvement":"good",Bn=(e,t,n,r)=>{let i,o;return s=>{t.value>=0&&(s||r)&&(o=t.value-(i??0),(o||i===void 0)&&(i=t.value,t.delta=o,t.rating=BO(t.value,n),e(t)))}};var sr=(e=!0)=>{let t=F.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t};var en=()=>sr()?.activationStart??0;function tn(e,t,n){F.document&&F.addEventListener(e,t,n)}function hi(e,t,n){F.document&&F.removeEventListener(e,t,n)}var yo=-1,iy=new Set,FO=()=>F.document?.visibilityState==="hidden"&&!F.document?.prerendering?0:1/0,sl=e=>{if(GO(e)&&yo>-1){if(e.type==="visibilitychange"||e.type==="pagehide")for(let t of iy)t();isFinite(yo)||(yo=e.type==="visibilitychange"?e.timeStamp:0,hi("prerenderingchange",sl,!0))}},Fn=()=>{if(F.document&&yo<0){let e=en();yo=(F.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(n=>n.name==="hidden"&&n.startTime>e)[0]?.startTime)??FO(),tn("visibilitychange",sl,!0),tn("pagehide",sl,!0),tn("prerenderingchange",sl,!0)}return{get firstHiddenTime(){return yo},onHidden(e){iy.add(e)}}};function GO(e){return e.type==="pagehide"||F.document?.visibilityState==="hidden"}var oy=()=>`v5-${Date.now()}-${Math.floor(Math.random()*8999999999999)+1e12}`;var Gn=(e,t=-1)=>{let n=sr(),r="navigate";return n&&(F.document?.prerendering||en()>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:oy(),navigationType:r}};var _d=new WeakMap;function So(e,t){try{return _d.get(e)||_d.set(e,new t),_d.get(e)}catch{return new t}}var al=class{constructor(){this._sessionValue=0,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 nn=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(i=>{Promise.resolve().then(()=>{t(i.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}};var Eo=e=>{let t=!1;return()=>{t||(e(),t=!0)}};var Pr=e=>{F.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()};var HO=[1800,3e3],sy=(e,t={})=>{Pr(()=>{let n=Fn(),r=Gn("FCP"),i,s=nn("paint",a=>{for(let c of a)c.name==="first-contentful-paint"&&(s.disconnect(),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-en(),0),r.entries.push(c),i(!0)))});s&&(i=Bn(e,r,HO,t.reportAllChanges))})};var qO=[.1,.25],ay=(e,t={})=>{sy(Eo(()=>{let n=Gn("CLS",0),r,i=Fn(),o=So(t,al),s=c=>{for(let l of c)o._processEntry(l);o._sessionValue>n.value&&(n.value=o._sessionValue,n.entries=o._sessionEntries,r())},a=nn("layout-shift",s);a&&(r=Bn(e,n,qO,t.reportAllChanges),i.onHidden(()=>{s(a.takeRecords()),r(!0)}),F?.setTimeout?.(r))}))};var cy=0,hd=1/0,cl=0,WO=e=>{e.forEach(t=>{t.interactionId&&(hd=Math.min(hd,t.interactionId),cl=Math.max(cl,t.interactionId),cy=cl?(cl-hd)/7+1:0)})},bd,yd=()=>bd?cy:performance.interactionCount||0,ly=()=>{"interactionCount"in performance||bd||(bd=nn("event",WO,{type:"event",buffered:!0,durationThreshold:0}))};var Sd=10,py=0,YO=()=>yd()-py,ll=class{constructor(){this._longestInteractionList=[],this._longestInteractionMap=new Map}_resetInteractions(){py=yd(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){let t=Math.min(this._longestInteractionList.length-1,Math.floor(YO()/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<Sd||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((i,o)=>o._latency-i._latency),this._longestInteractionList.length>Sd){let i=this._longestInteractionList.splice(Sd);for(let o of i)this._longestInteractionMap.delete(o.id)}this._onAfterProcessingINPCandidate?.(r)}}};var bi=e=>{let t=F.requestIdleCallback||F.setTimeout;F.document?.visibilityState==="hidden"?e():(e=Eo(e),tn("visibilitychange",e,{once:!0,capture:!0}),tn("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),hi("visibilitychange",e,{capture:!0}),hi("pagehide",e,{capture:!0})}))};var zO=[200,500],jO=40,uy=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return;let n=Fn();Pr(()=>{ly();let r=Gn("INP"),i,o=So(t,ll),s=c=>{bi(()=>{for(let u of c)o._processEntry(u);let l=o._estimateP98LongestInteraction();l&&l._latency!==r.value&&(r.value=l._latency,r.entries=l.entries,i())})},a=nn("event",s,{durationThreshold:t.durationThreshold??jO});i=Bn(e,r,zO,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{s(a.takeRecords()),i(!0)}))})};var pl=class{_processEntry(t){this._onBeforeProcessingEntry?.(t)}};var $O=[2500,4e3],dy=(e,t={})=>{Pr(()=>{let n=Fn(),r=Gn("LCP"),i,o=So(t,pl),s=c=>{t.reportAllChanges||(c=c.slice(-1));for(let l of c)o._processEntry(l),l.startTime<n.firstHiddenTime&&(r.value=Math.max(l.startTime-en(),0),r.entries=[l],i())},a=nn("largest-contentful-paint",s);if(a){i=Bn(e,r,$O,t.reportAllChanges);let c=Eo(()=>{s(a.takeRecords()),a.disconnect(),i(!0)}),l=u=>{u.isTrusted&&(bi(c),hi(u.type,l,{capture:!0}))};for(let u of["keydown","click","visibilitychange"])tn(u,l,{capture:!0})}})};var VO=[800,1800],Ed=e=>{F.document?.prerendering?Pr(()=>Ed(e)):F.document?.readyState!=="complete"?addEventListener("load",()=>Ed(e),!0):setTimeout(e)},my=(e,t={})=>{let n=Gn("TTFB"),r=Bn(e,n,VO,t.reportAllChanges);Ed(()=>{let i=sr();i&&(n.value=Math.max(i.responseStart-en(),0),n.entries=[i],r(!0))})};var $s={},ul={},fy,gy,_y,hy;function ar(e,t=!1){return dl("cls",e,KO,fy,t)}function cr(e,t=!1){return dl("lcp",e,JO,gy,t)}function Td(e){return dl("ttfb",e,XO,_y)}function yi(e){return dl("inp",e,QO,hy)}function xt(e,t){return by(e,t),ul[e]||(ZO(e),ul[e]=!0),yy(e,t)}function Vs(e,t){let n=$s[e];if(n?.length)for(let r of n)try{r(t)}catch(i){Qe&&g.error(`Error while triggering instrumentation handler.
491Type: ${e}
492Name: ${ut(r)}
493Error:`,i)}}function KO(){return ay(e=>{Vs("cls",{metric:e}),fy=e},{reportAllChanges:!0})}function JO(){return dy(e=>{Vs("lcp",{metric:e}),gy=e},{reportAllChanges:!0})}function XO(){return my(e=>{Vs("ttfb",{metric:e}),_y=e})}function QO(){return uy(e=>{Vs("inp",{metric:e}),hy=e})}function dl(e,t,n,r,i=!1){by(e,t);let o;return ul[e]||(o=n(),ul[e]=!0),r&&t({metric:r}),yy(e,t,i?o:void 0)}function ZO(e){let t={};e==="event"&&(t.durationThreshold=0),nn(e,n=>{Vs(e,{entries:n})},t)}function by(e,t){$s[e]=$s[e]||[],$s[e].push(t)}function yy(e,t,n){return()=>{n&&n();let r=$s[e];if(!r)return;let i=r.indexOf(t);i!==-1&&r.splice(i,1)}}function Sy(e){return"duration"in e}var eN=80,Si={};try{typeof Node<"u"&&(Si.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode").get),typeof Element<"u"&&(Si.tagName=Object.getOwnPropertyDescriptor(Element.prototype,"tagName").get,Si.id=Object.getOwnPropertyDescriptor(Element.prototype,"id").get,Si.className=Object.getOwnPropertyDescriptor(Element.prototype,"className").get,Si.getAttribute=Element.prototype.getAttribute),typeof HTMLElement<"u"&&(Si.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"dataset").get)}catch{}function Ur(e,t,n){let r=Si[t];if(r)try{return r.call(e,n)}catch{}let i=e[t];return typeof i=="function"?i.call(e,n):i}function be(e,t={}){if(!e)return"<unknown>";try{let n=e,r=5,i=[],o=0,s=0,a=" > ",c=a.length,l,u=Array.isArray(t)?t:t.keyAttrs,p=!Array.isArray(t)&&t.maxStringLength||eN;for(;n&&o++<r&&(l=tN(n,u),!(l==="html"||o>1&&s+i.length*c+l.length>=p));)i.push(l),s+=l.length,n=Ur(n,"parentNode");return i.reverse().join(a)}catch{return"<unknown>"}}function tN(e,t){let n=[],r=Ur(e,"tagName");if(!r)return"";if(typeof HTMLElement<"u"&&e instanceof HTMLElement){let o=Ur(e,"dataset");if(o){if(o.sentryComponent)return o.sentryComponent;if(o.sentryElement)return o.sentryElement}}n.push(r.toLowerCase());let i=t?.length?t.filter(o=>Ur(e,"getAttribute",o)).map(o=>[o,Ur(e,"getAttribute",o)]):null;if(i?.length)i.forEach(o=>{n.push(`[${o[0]}="${o[1]}"]`)});else{let o=Ur(e,"id");o&&n.push(`#${o}`);let s=Ur(e,"className");if(s&&$e(s)){let a=s.split(/\s+/);for(let c of a)n.push(`.${c}`)}}for(let o of["aria-label","type","name","title","alt"]){let s=Ur(e,"getAttribute",o);s&&n.push(`[${o}="${s}"]`)}return n.join("")}var Ey=e=>{let t=n=>{(n.type==="pagehide"||F.document?.visibilityState==="hidden")&&e(n)};tn("visibilitychange",t,{capture:!0,once:!0}),tn("pagehide",t,{capture:!0,once:!0})};function ml(e){return typeof e=="number"&&isFinite(e)}function lr(e,t,n,{...r}){let i=P(e).start_timestamp;return i&&i>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),Er(e,()=>{let o=Xe({startTime:t,...r});return o&&o.end(n),o})}function To(e){let t=T();if(!t)return;let{name:n,transaction:r,attributes:i,startTime:o}=e,{release:s,environment:a}=t.getOptions(),{userInfo:c}=t.getDataCollectionOptions(),u=t.getIntegrationByName("Replay")?.getReplayId(),p=k(),m=p.getUser(),d=m!==void 0?m.email||m.id||m.ip_address:void 0,f;try{f=p.getScopeData().contexts.profile.profile_id}catch{}let _={release:s,environment:a,user:d||void 0,profile_id:f||void 0,replay_id:u||void 0,transaction:r,"user_agent.original":F.navigator?.userAgent,"client.address":c?"{{auto}}":void 0,...i};return Xe({name:n,attributes:_,startTime:o,experimental:{standalone:!0}})}function rn(){return F.addEventListener&&F.performance}function ge(e){return e/1e3}function Ty(e){let t="unknown",n="unknown",r="";for(let i of e){if(i==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(i))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=i}
493return r===e&&(t=r),{name:t,version:n}}function Ei(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function Ti(e,t){let n,r=!1;function i(a){!r&&n&&t(a,n.spanContext().spanId,n),r=!0}Ey(()=>{i("pagehide")});let o=e.on("beforeStartNavigationSpan",(a,c)=>{c?.isRedirect||(i("navigation"),o(),s())}),s=e.on("afterStartPageLoadSpan",a=>{n=a,s()})}function vy(e){let t=0,n;if(!Ei("layout-shift"))return;let r=ar(({metric:i})=>{let o=i.entries[i.entries.length-1];o&&(t=i.value,n=o)},!0);Ti(e,(i,o)=>{nN(t,n,o,i),r()})}function nN(e,t,n,r){Qe&&g.log(`Sending CLS span (${e})`);let i=t?ge((le()||0)+t.startTime):te(),o=k().getScopeData().transactionName,s=t?be(t.sources[0]?.node):"Layout shift",a={[q]:"auto.http.browser.cls",[J]:"ui.webvital.cls",[ct]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((l,u)=>{a[`cls.source.${u+1}`]=be(l.node)});let c=To({name:s,transaction:o,attributes:a,startTime:i});c&&(c.addEvent("cls",{[mn]:"",[fn]:e}),c.end(i))}var rN=6e4;function vi(e){return e!=null&&e>0&&e<=rN}function Iy(e){let t=0,n;if(!Ei("largest-contentful-paint"))return;let r=cr(({metric:i})=>{let o=i.entries[i.entries.length-1];!o||!vi(i.value)||(t=i.value,n=o)},!0);Ti(e,(i,o)=>{iN(t,n,o,i),r()})}function iN(e,t,n,r){if(!vi(e))return;Qe&&g.log(`Sending LCP span (${e})`);let i=ge((le()||0)+(t?.startTime||0)),o=k().getScopeData().transactionName,s=t?be(t.element):"Largest contentful paint",a={[q]:"auto.http.browser.lcp",[J]:"ui.webvital.lcp",[ct]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(a["lcp.element"]=be(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=To({name:s,transaction:o,attributes:a,startTime:i});c&&(c.addEvent("lcp",{[mn]:"millisecond",[fn]:e}),c.end(i))}function on(e){return e&&((le()||performance.timeOrigin)+e)/1e3}function Ks(e){let t={};if(e.nextHopProtocol!=null){let{name:n,version:r}=Ty(e.nextHopProtocol);t["network.protocol.version"]=r,t["network.protocol.name"]=n}return le()||rn()?.timeOrigin?oN({...t,"http.request.redirect_start":on(e.redirectStart),"http.request.redirect_end":on(e.redirectEnd),"http.request.worker_start":on(e.workerStart),"http.request.fetch_start":on(e.fetchStart),"http.request.domain_lookup_start":on(e.domainLookupStart),"http.request.domain_lookup_end":on(e.domainLookupEnd),"http.request.connect_start":on(e.connectStart),"http.request.secure_connection_start":on(e.secureConnectionStart),"http.request.connection_end":on(e.connectEnd),"http.request.request_start":on(e.requestStart),"http.request.response_start":on(e.responseStart),"http.request.response_end":on(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?e.responseStart/1e3:void 0}):t}function oN(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}var sN=2147483647,Ay=0,Ct={},wt,gl;function vd({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){let r=rn();if(r&&le()){r.mark&&F.performance.mark("sentry-tracing-init");let i=t?Iy(n):t===!1?cN():void 0,o=e?vy(n):e===!1?aN():void 0,s=lN(),a=pN();return()=>{s(),a(),i?.(),o?.()}}return()=>{}}function Id(){xt("longtask",({entries:e})=>{let t=re();if(!t)return;let{op:n,start_timestamp:r}=P(t);for(let i of e){let o=ge(le()+i.startTime),s=ge(i.duration);n==="navigation"&&r&&o<r||lr(t,o,o+s,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[q]:"auto.ui.browser.metrics"}})}})}function Ad(){new PerformanceObserver(t=>{let n=re();if(n)for(let r of t.getEntries()){if(!r.scripts[0])continue;let i=ge(le()+r.startTime),{start_timestamp:o,op:s}=P(n);if(s==="navigation"&&o&&i<o)continue;let a=ge(r.duration),c={[q]:"auto.ui.browser.metrics"},l=r.scripts[0],{invoker:u,invokerType:p,sourceURL:m,sourceFunctionName:d,sourceCharPosition:f}=l;c["browser.script.invoker"]=u,c["browser.script.invoker_type"]=p,m&&(c["code.filepath"]=m),d&&(c["code.function"]=d),f!==-1&&(c["browser.script.source_char_position"]=f),lr(n,i,i+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:c})}}).observe({type:"long-animation-frame",buffered:!0})}function Rd(){xt("event",({entries:e})=>{let t=re();if(t){for(let n of e)if(n.name==="click"){let r=ge(le()+n.startTime),i=ge(n.duration),o={name:be(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[q]:"auto.ui.browser.metrics"}},s=Cr(n.target);s&&(o.attributes["ui.component_name"]=s),lr(t,r,r+i,o)}}})}function aN(){return ar(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(Ct.cls={value:e.value,unit:""},gl=t)},!0)}function cN(){return cr(({metric:e})=>{let t=e.entries[e.entries.length-1];!t||!vi(e.value)||(Ct.lcp={value:e.value,unit:"millisecond"},wt=t)},!0)}function lN(){return Td(({metric:e})=>{e.entries[e.entries.length-1]&&(Ct.ttfb={value:e.value,unit:"millisecond"})})}function pN(){return xt("paint",({entries:e})=>{let t=Fn();for(let n of e){let r=n.startTime<t.firstHiddenTime;n.name==="first-paint"&&r&&(Ct.fp={value:n.startTime,unit:"millisecond"}),n.name==="first-contentful-paint"&&r&&(Ct.fcp={value:n.startTime,unit:"millisecond"})}})}function Od(e,t){let n=rn(),r=le();if(!n?.getEntries||!r)return;let{spanStreamingEnabled:i,ignorePerformanceApiSpans:o,ignoreResourceSpans:s}=t,a=ge(r),c=n.getEntries(),{op:l,start_timestamp:u}=P(e);
493c.slice(Ay).forEach(p=>{let m=ge(p.startTime),d=ge(Math.max(0,p.duration));if(!(l==="navigation"&&u&&a+m<u))switch(p.entryType){case"navigation":{fN(e,p,a);break}case"mark":case"paint":case"measure":{dN(e,p,m,d,a,o);break}case"resource":{hN(e,p,p.name,m,d,a,s);break}}}),Ay=Math.max(c.length-1,0),bN(e,i)}function Nd(e,t){let n=le();if(!rn()?.getEntries||!n){Ry();return}let{spanStreamingEnabled:r,recordClsOnPageloadSpan:i,recordLcpOnPageloadSpan:o}=t,s=ge(n);if(P(e).op==="pageload"){if(EN(Ct),r){let a=(c,l,u)=>{let p=u??`browser.web_vital.${c}.value`;e.setAttribute(p,l),Qe&&g.log("Setting web vital attribute",{[p]:l},"on pageload span")};["ttfb","fp","fcp"].forEach(c=>{Ct[c]&&a(c,Ct[c].value)}),Ct["ttfb.requestTime"]&&a("ttfb.requestTime",Ct["ttfb.requestTime"].value,"browser.web_vital.ttfb.request_time")}else i||delete Ct.cls,o||delete Ct.lcp,Object.entries(Ct).forEach(([a,c])=>{Yi(a,c.value,c.unit,e)}),yN(e,t);e.setAttribute(r?"browser.performance.time_origin":"performance.timeOrigin",s),e.setAttribute(r?"browser.performance.navigation.activation_start":"performance.activationStart",en())}Ry()}function Ry(){wt=void 0,gl=void 0,Ct={}}function uN(e){if(e?.entryType==="measure")try{return e.detail.devtools.track==="Components \u269B"}catch{return}}function dN(e,t,n,r,i,o){if(uN(t)||["mark","measure"].includes(t.entryType)&&We(t.name,o))return;let s=sr(!1),a=ge(s?s.requestStart:0),c=i+Math.max(n,a),l=i+n,u=l+r,p={[q]:"auto.resource.browser.metrics"};c!==l&&(p["sentry.browser.measure_happened_before_request"]=!0,p["sentry.browser.measure_start_time"]=c),mN(p,t),c<=u&&lr(e,c,u,{name:t.name,op:t.entryType,attributes:p})}function mN(e,t){try{let n=t.detail;if(!n)return;if(typeof n=="object"){for(let[r,i]of Object.entries(n))if(i&&Ge(i))e[`sentry.browser.measure.detail.${r}`]=i;else if(i!==void 0)try{e[`sentry.browser.measure.detail.${r}`]=JSON.stringify(i)}catch{}return}if(Ge(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function fN(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{fl(e,t,r,n)}),fl(e,t,"secureConnection",n,"TLS/SSL"),fl(e,t,"fetch",n,"cache"),fl(e,t,"domainLookup",n,"DNS"),_N(e,t,n)}function fl(e,t,n,r,i=n){let o=gN(n),s=t[o],a=t[`${n}Start`];!a||!s||lr(e,r+ge(a),r+ge(s),{op:`browser.${i}`,name:t.name,attributes:{[q]:"auto.ui.browser.metrics",...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function gN(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function _N(e,t,n){let r=n+ge(t.requestStart),i=n+ge(t.responseEnd),o=n+ge(t.responseStart);t.responseEnd&&(lr(e,r,i,{op:"browser.request",name:t.name,attributes:{[q]:"auto.ui.browser.metrics"}}),lr(e,o,i,{op:"browser.response",name:t.name,attributes:{[q]:"auto.ui.browser.metrics"}}))}function hN(e,t,n,r,i,o,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={[q]:"auto.resource.browser.metrics"},l=$t(n);l.protocol&&(c["url.scheme"]=l.protocol.split(":").pop()),l.host&&(c["server.address"]=l.host),c["url.same_origin"]=n.includes(F.location.origin),c[Ut]=n,SN(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 u={...c,...Ks(t)},p=o+r,m=p+i;lr(e,p,m,{name:n.replace(F.location.origin,""),op:a,attributes:u})}function bN(e,t){let n=F.navigator;if(!n)return;let r=n.connection;r&&(r.effectiveType&&e.setAttribute(t?"network.connection.effective_type":"effectiveConnectionType",r.effectiveType),r.type&&e.setAttribute(t?"network.connection.type":"connectionType",r.type),ml(r.rtt)&&(t?e.setAttribute("network.connection.rtt",r.rtt):P(e).op==="pageload"&&Yi("connection.rtt",r.rtt,"millisecond"))),ml(n.deviceMemory)&&(t?e.setAttribute("device.memory.estimated_capacity",n.deviceMemory):e.setAttribute("deviceMemory",`${n.deviceMemory} GB`)),ml(n.hardwareConcurrency)&&(t?e.setAttribute("device.processor_count",n.hardwareConcurrency):e.setAttribute("hardwareConcurrency",String(n.hardwareConcurrency)))}function yN(e,t){wt&&t.recordLcpOnPageloadSpan&&(wt.element&&e.setAttribute("lcp.element",be(wt.element)),wt.id&&e.setAttribute("lcp.id",wt.id),wt.url&&e.setAttribute("lcp.url",wt.url.trim().slice(0,200)),wt.loadTime!=null&&e.setAttribute("lcp.loadTime",wt.loadTime),wt.renderTime!=null&&e.setAttribute("lcp.renderTime",wt.renderTime),e.setAttribute("lcp.size",wt.size)),gl?.sources&&t.recordClsOnPageloadSpan&&gl.sources.forEac
493h((n,r)=>e.setAttribute(`cls.source.${r+1}`,be(n.node)))}function SN(e,t,n){n.forEach(([r,i])=>{let o=e[r];o!=null&&(typeof o=="number"&&o<sN||typeof o=="string")&&(t[i]=o)})}function EN(e){let t=sr(!1);if(!t)return;let{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}var TN="ElementTiming",vN=(()=>({name:TN,setup(){!rn()||!le()||xt("element",({entries:t})=>{for(let n of t){let r=n;if(!r.identifier)continue;let i=r.identifier,o=r.name,s=r.renderTime,a=r.loadTime,c={"sentry.origin":"auto.ui.browser.element_timing","ui.element.identifier":i};o&&(c["ui.element.paint_type"]=o),r.id&&(c["ui.element.id"]=r.id),r.element&&(c["ui.element.type"]=r.element.tagName.toLowerCase()),r.url&&(c["ui.element.url"]=r.url),r.naturalWidth&&(c["ui.element.width"]=r.naturalWidth),r.naturalHeight&&(c["ui.element.height"]=r.naturalHeight),s>0&&pi.distribution("ui.element.render_time",s,{unit:"millisecond",attributes:c}),a>0&&pi.distribution("ui.element.load_time",a,{unit:"millisecond",attributes:c})}})}})),Oy=vN;var kd=[],Js=new Map,vo=new Map,xd=60;function wd(){if(rn()&&le()){let t=IN();return()=>{t()}}return()=>{}}var Io={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 IN(){return yi(AN)}var AN=({metric:e})=>{if(e.value==null)return;let t=ge(e.value);if(t>xd)return;let n=e.entries.find(f=>f.duration===e.value&&Io[f.name]);if(!n)return;let{interactionId:r}=n,i=Io[n.name],o=ge(le()+n.startTime),s=re(),a=s?se(s):void 0,c=r!=null?Js.get(r):void 0,l=c?.span||a,u=l?P(l).description:k().getScopeData().transactionName,p=c?.elementName||be(n.target),m={[q]:"auto.http.browser.inp",[J]:`ui.interaction.${i}`,[ct]:n.duration},d=To({name:p,transaction:u,attributes:m,startTime:o});d&&(d.addEvent("inp",{[mn]:"millisecond",[fn]:e.value}),d.end(o+t))};function Ny(e){return e!=null?Js.get(e):void 0}function Cd(){let e=Object.keys(Io);lt()&&e.forEach(i=>{F.addEventListener(i,t,{capture:!0,passive:!0})});function t(i){let o=i.target;if(!o)return;let s=be(o),a=Math.round(i.timeStamp);if(vo.set(a,s),vo.size>50){let c=vo.keys().next().value;c!==void 0&&vo.delete(c)}}function n(i){let o=Math.round(i.startTime),s=vo.get(o);if(!s)for(let a=-5;a<=5;a++){let c=vo.get(o+a);if(c){s=c;break}}return s||"<unknown>"}let r=({entries:i})=>{let o=re(),s=o&&se(o);i.forEach(a=>{if(!Sy(a))return;let c=a.interactionId;if(c==null||Js.has(c))return;let l=a.target?be(a.target):n(a);if(kd.length>10){let u=kd.shift();Js.delete(u)}kd.push(c),Js.set(c,{span:s,elementName:l})})};xt("event",r),xt("first-input",r)}function Md(e){let{name:t,op:n,origin:r,metricName:i,value:o,attributes:s,parentSpan:a,reportEvent:c,startTime:l,endTime:u}=e,p=k().getScopeData().transactionName,m={[q]:r,[J]:n,[ct]:0,[`browser.web_vital.${i}.value`]:o,[Gp]:p,[_s]:p,"user_agent.original":F.navigator?.userAgent,...s};a&&yr(a).attributes?.[J]==="pageload"&&(m["sentry.pageload.span_id"]=a.spanContext().spanId),c&&(m[`browser.web_vital.${i}.report_event`]=c);let d=Xe({name:t,attributes:m,startTime:l,parentSpan:a});d&&d.end(u??l)}function Ld(e){let t=0,n;if(!Ei("largest-contentful-paint"))return;let r=cr(({metric:i})=>{let o=i.entries[i.entries.length-1];!o||!vi(i.value)||(t=i.value,n=o)},!0);Ti(e,(i,o,s)=>{RN(t,n,s,i),r()})}function RN(e,t,n,r){if(!vi(e))return;Qe&&g.log(`Sending LCP span (${e})`);let i=le()||0,o=ge(i),s=ge(i+(t?.startTime||0)),a=t?be(t.element):"Largest contentful paint",c={};t?.element&&(c["browser.web_vital.lcp.element"]=be(t.element)),t?.id&&(c["browser.web_vital.lcp.id"]=t.id),t?.url&&(c["browser.web_vital.lcp.url"]=t.url),t?.loadTime!=null&&(c["browser.web_vital.lcp.load_time"]=t.loadTime),t?.renderTime!=null&&(c["browser.web_vital.lcp.render_time"]=t.renderTime),t?.size!=null&&(c["browser.web_vital.lcp.size"]=t.size),Md({name:a,op:"ui.webvital.lcp",origin:"auto.http.browser.lcp",metricName:"lcp",value:e,attributes:c,parentSpan:n,reportEvent:r,startTime:o,endTime:s})}function Pd(e){let t=0,n;if(!Ei("layout-shift"))return;let r=ar(({metric:i})=>{let o=i.entries[i.entries.length-1];
493o&&(t=i.value,n=o)},!0);Ti(e,(i,o,s)=>{ON(t,n,s,i),r()})}function ON(e,t,n,r){Qe&&g.log(`Sending CLS span (${e})`);let i=t?ge((le()||0)+t.startTime):te(),o=t?be(t.sources[0]?.node):"Layout shift",s={};t?.sources&&t.sources.forEach((a,c)=>{s[`browser.web_vital.cls.source.${c+1}`]=be(a.node)}),Md({name:o,op:"ui.webvital.cls",origin:"auto.http.browser.cls",metricName:"cls",value:e,attributes:s,parentSpan:n,reportEvent:r,startTime:i})}function Ud(){if(!rn()||!le())return;yi(({metric:n})=>{if(n.value==null||ge(n.value)>xd)return;let i=n.entries.find(o=>o.duration===n.value&&Io[o.name]);i&&NN(n.value,i)})}function NN(e,t){Qe&&g.log(`Sending INP span (${e})`);let n=ge(le()+t.startTime),r=ge(e),i=Io[t.name],o=Ny(t.interactionId),s=re(),a=s?se(s):void 0,c=o?.span||a,l=c?yr(c).name:k().getScopeData().transactionName,u=o?.elementName||be(t.target);Md({name:u,op:`ui.interaction.${i}`,origin:"auto.http.browser.inp",metricName:"inp",value:e,attributes:{[ct]:t.duration,[Gp]:l,[_s]:l},startTime:n,endTime:n+r,parentSpan:c})}var kN=1e3,ky,Dd,Bd;function Xs(e){it("dom",e),ot("dom",xN)}function xN(){if(!F.document)return;let e=Fe.bind(null,"dom"),t=xy(e,!0);F.document.addEventListener("click",t,!1),F.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{let i=F[n]?.prototype;i?.hasOwnProperty?.("addEventListener")&&(ye(i,"addEventListener",function(o){return function(s,a,c){if(s==="click"||s=="keypress")try{let l=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},u=l[s]=l[s]||{refCount:0};if(!u.handler){let p=xy(e);u.handler=p,o.call(this,s,p,c)}u.refCount++}catch{}return o.call(this,s,a,c)}}),ye(i,"removeEventListener",function(o){return function(s,a,c){if(s==="click"||s=="keypress")try{let l=this.__sentry_instrumentation_handlers__||{},u=l[s];u&&(u.refCount--,u.refCount<=0&&(o.call(this,s,u.handler,c),u.handler=void 0,delete l[s]),Object.keys(l).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return o.call(this,s,a,c)}}))})}function wN(e){if(e.type!==Dd)return!1;try{if(!e.target||e.target._sentryId!==Bd)return!1}catch{}return!0}function CN(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function xy(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=MN(n);if(CN(n.type,r))return;pe(n,"_sentryCaptured",!0),r&&!r._sentryId&&pe(r,"_sentryId",fe());
493let i=n.type==="keypress"?"input":n.type;wN(n)||(e({event:n,name:i,global:t}),Dd=n.type,Bd=r?r._sentryId:void 0),clearTimeout(ky),ky=F.setTimeout(()=>{Bd=void 0,Dd=void 0},kN)}}function MN(e){try{return e.target}catch{return null}}var _l;function pr(e){let t="history";it(t,e),ot(t,LN)}function LN(){if(F.addEventListener("popstate",()=>{let t=F.location.href,n=_l;if(_l=t,n===t)return;Fe("history",{from:n,to:t})}),!Wc())return;function e(t){return function(...n){let r=n.length>2?n[2]:void 0;if(r){let i=_l,o=PN(String(r));if(_l=o,i===o)return t.apply(this,n);Fe("history",{from:i,to:o})}return t.apply(this,n)}}ye(F.history,"pushState",e),ye(F.history,"replaceState",e)}function PN(e){try{return new URL(e,F.location.origin).toString()}catch{return e}}var hl={};function Ao(e){let t=hl[e];if(t)return t;let n=F[e];if(po(n))return hl[e]=n.bind(F);let r=F.document;if(r&&typeof r.createElement=="function")try{let i=r.createElement("iframe");i.hidden=!0,r.head.appendChild(i);let o=i.contentWindow;o?.[e]&&(n=o[e]),r.head.removeChild(i)}catch(i){Qe&&g.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,i)}return n&&(hl[e]=n.bind(F))}function Fd(e){hl[e]=void 0}function Ii(...e){return Ao("setTimeout")(...e)}var ht="__sentry_xhr_v3__";function Ai(e){it("xhr",e),ot("xhr",UN)}function UN(){if(!F.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){let i=new Error,o=te()*1e3,s=$e(r[0])?r[0].toUpperCase():void 0,a=DN(r[1]);if(!s||!a)return t.apply(n,r);n[ht]={method:s,url:a,request_headers:{}},s==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);let c=()=>{let l=n[ht];if(l&&n.readyState===4){try{l.status_code=n.status}catch{}let u={endTimestamp:te()*1e3,startTimestamp:o,xhr:n,virtualError:i};Fe("xhr",u),n.removeEventListener("readystatechange",c)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(l,u,p){return c(),l.apply(u,p)}}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(l,u,p){let[m,d]=p,f=u[ht];return f&&$e(m)&&$e(d)&&(f.request_headers[m.toLowerCase()]=d),l.apply(u,p)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){let i=n[ht];if(!i)return t.apply(n,r);r[0]!==void 0&&(i.body=r[0]);let o={startTimestamp:te()*1e3,xhr:n};return Fe("xhr",o),t.apply(n,r)}})}function DN(e){if($e(e))return e;try{return e.toString()}catch{}}var BN=Symbol.for("sentry__originalRequestBody");function bl(e){return new URLSearchParams(e).toString()}function Ri(e,t=g){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[bl(e)];if(!e)return[void 0]}catch(n){return Qe&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Qe&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Ro(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][BN];return n!==void 0?n:void 0}}function Qs(e){let t;try{t=e.getAllResponseHeaders()}catch(n){return Qe&&g.error(n,"Failed to get xhr response headers",e),{}}return t?t.split(`\r
494`).reduce((n,r)=>{let[i,o]=r.split(": ");return o&&(n[i.toLowerCase()]=o),n},{}):{}}function Gd(e){if(typeof Element>"u")return!1;try{return e instanceof Element}catch{return!1}}function wy(e){try{return new URL(e,F.location.origin).toString()}catch{return e}}var FN=40;function Zs(e,t=Ao("fetch")){let n=0,r=0;async function i(o){let s=o.body.length;n+=s,r++;let a={body:o.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 Fd("fetch"),c}finally{n-=s,r--}}return mc(e,i,ai(e.bufferSize||FN))}var v=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function GN(){let e=T();if(!e){v&&g.warn("No Sentry client available, profiling is not started");return}if(!e.getIntegrationByName("BrowserProfiling")){v&&g.warn("BrowserProfiling integration is not available");return}e.emit("startUIProfiler")}function HN(){let e=T();if(!e){v&&g.warn("No Sentry client available, profiling is not started");return}if(!e.getIntegrationByName("BrowserProfiling")){v&&g.warn("ProfilingIntegration is not available");return}e.emit("stopUIProfiler")}var qN={startProfiler:GN,stopProfiler:HN};var WN=10,YN=20,zN=30,jN=40,$N=50;function Oo(e,t,n,r){let i={filename:e,function:t==="<anonymous>"?"?":t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var VN=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,KN=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,JN=/\((\S*)(?::(\d+))(?::(\d+))\)/,XN=/at (.+?) ?\(data:(.+?),/,QN=e=>{let t=e.match(XN);
494if(t)return{filename:`<data:${t[2]}>`,function:t[1]};let n=VN.exec(e);if(n){let[,i,o,s]=n;return Oo(i,"?",+o,+s)}let r=KN.exec(e);if(r){if(r[2]?.indexOf("eval")===0){let a=JN.exec(r[2]);a&&(r[2]=a[1],r[3]=a[2],r[4]=a[3])}let[o,s]=Py(r[1]||"?",r[2]);return Oo(s,o,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},Cy=[zN,QN],ZN=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ek=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,tk=e=>{let t=ZN.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let o=ek.exec(t[3]);o&&(t[1]=t[1]||"eval",t[3]=o[1],t[4]=o[2],t[5]="")}let r=t[3],i=t[1]||"?";return[i,r]=Py(i,r),Oo(r,i,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},My=[$N,tk],nk=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,rk=e=>{let t=nk.exec(e);return t?Oo(t[2],t[1]||"?",+t[3],t[4]?+t[4]:void 0):void 0},ik=[jN,rk],ok=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,sk=e=>{let t=ok.exec(e);return t?Oo(t[2],t[3]||"?",+t[1]):void 0},ak=[WN,sk],ck=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,lk=e=>{let t=ck.exec(e);return t?Oo(t[5],t[3]||t[4]||"?",+t[1],+t[2]):void 0},pk=[YN,lk],Ly=[Cy,My],Hd=qo(...Ly),Py=(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 uk(e,{metadata:t,tunnel:n,dsn:r}){let i={event_id:e.event_id,sent_at:new Date().toISOString(),...t?.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Ye(r)}},o=dk(e);return xe(i,[o])}function dk(e){return[{type:"user_report"},e]}var yl=1024,mk="Breadcrumbs",fk=((e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:mk,setup(n){t.console&&li(hk(n)),t.dom&&Xs(_k(n,t.dom)),t.xhr&&Ai(bk(n)),t.fetch&&Dn(yk(n)),t.history&&pr(Sk(n)),t.sentry&&n.on("beforeSendEvent",gk(n))}}}),qd=fk;function gk(e){return function(n){T()===e&&_t({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:pn(n)},{event:n})}}function _k(e,t){return function(r){if(T()!==e)return;let i,o,s=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>yl&&(v&&g.warn(`\`dom.maxStringLength\` cannot exceed ${yl}, but a value of ${a} was configured. Sentry will use ${yl} instead.`),a=yl),typeof s=="string"&&(s=[s]);try{let l=r.event,u=Ek(l)?l.target:l;i=be(u,{keyAttrs:s,maxStringLength:a}),o=Cr(u)}catch{i="<unknown>"}if(i.length===0)return;let c={category:`ui.${r.name}`,message:i};o&&(c.data={"ui.component_name":o}),_t(c,{event:r.event,name:r.name,global:r.global})}}function hk(e){return function(n){if(T()!==e)return;let r={category:"console",data:{arguments:n.args,logger:"console"},level:rr(n.level),message:gr(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${gr(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;_t(r,{input:n.args,level:n.level})}}function bk(e){return function(n){if(T()!==e)return;let{startTimestamp:r,endTimestamp:i}=n,o=n.xhr[ht];if(!r||!i||!o)return;let{method:s,url:a,status_code:c,body:l}=o,u={method:s,url:a,status_code:c},p={xhr:n.xhr,input:l,startTimestamp:r,endTimestamp:i},m={category:"xhr",data:u,type:"http",level:qc(c)};e.emit("beforeOutgoingRequestBreadcrumb",m,p),_t(m,p)}}function yk(e){return function(n){if(T()!==e)return;let{startTimestamp:r,endTimestamp:i}=n;if(i&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){let o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:i},s={category:"fetch",data:n.fetchData,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",s,o),_t(s,o)}else{let o=n.response,s={...n.fetchData,status_code:o?.status},a={input:n.args,response:o,startTimestamp:r,endTimestamp:i},c={category:"fetch",data:s,type:"http",level:qc(s.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",c,a),_t(c,a)}}}function Sk(e){return function(n){if(T()!==e)return;let r=n.from,i=n.to,o=$t(O.location.href),s=r?$t(r):void 0,a=$t(i);s?.path||(s=o),o.protocol===a.protocol&&o.host===a.host&&(i=a.relative),o.protocol===s.protocol&&o.host===s.host&&(r=s.relative),_t({category:"navigation",data:{from:r,to:i}})}}function Ek(e){return!!e&&!!e.target}var Tk="EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDB
494Request,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(","),vk="BrowserApiErrors",Ik=((e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:vk,setupOnce(){t.setTimeout&&ye(O,"setTimeout",Uy),t.setInterval&&ye(O,"setInterval",Uy),t.requestAnimationFrame&&ye(O,"requestAnimationFrame",Ak),t.XMLHttpRequest&&"XMLHttpRequest"in O&&ye(XMLHttpRequest.prototype,"send",Rk);let n=t.eventTarget;n&&(Array.isArray(n)?n:Tk).forEach(i=>Ok(i,t))}}}),Wd=Ik;function Uy(e){return function(...t){let n=t[0];return t[0]=_i(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${ut(e)}`}}),e.apply(this,t)}}function Ak(e){return function(t){return e.apply(this,[_i(t,{mechanism:{data:{handler:ut(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function Rk(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(i=>{i in n&&typeof n[i]=="function"&&ye(n,i,function(o){let s={mechanism:{data:{handler:ut(o)},handled:!1,type:`auto.browser.browserapierrors.xhr.${i}`}},a=fr(o);return a&&(s.mechanism.data.handler=ut(a)),_i(o,s)})}),e.apply(this,t)}}function Ok(e,t){let r=O[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(ye(r,"addEventListener",function(i){return function(o,s,a){try{Nk(s)&&(s.handleEvent=_i(s.handleEvent,{mechanism:{data:{handler:ut(s),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&kk(this,o,s),i.apply(this,[o,_i(s,{mechanism:{data:{handler:ut(s),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),a])}}),ye(r,"removeEventListener",function(i){return function(o,s,a){try{if(Object.prototype.hasOwnProperty.call(s,"__sentry_wrapped__")){let c=s.__sentry_wrapped__;c&&i.call(this,o,c,a)}}catch{}return i.call(this,o,s,a)}}))}function Nk(e){return typeof e.handleEvent=="function"}function kk(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}var Yd=(e={})=>{let t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(typeof O.document>"u"){v&&g.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}$i({ignoreDuration:!0});let n=!1;bi(()=>{n||(oi(),n=!0)});let r=Z(),i=r.getUser();r.addScopeListener(o=>{let s=o.getUser();(i?.id!==s?.id||i?.ip_address!==s?.ip_address)&&(i=s,n&&oi())}),t==="route"&&pr(({from:o,to:s})=>{o!==s&&($i({ignoreDuration:!0}),oi(),n=!0)})}}};var xk="CultureContext",wk=(()=>({name:xk,preprocessEvent(e){let t=Dy();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){let t=Dy();t&&Dt(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}})),zd=wk;function Dy(){try{let e=O.Intl;if(!e)return;let t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}var Ck="GlobalHandlers",Mk=((e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:Ck,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(Lk(n),By("onerror")),t.onunhandledrejection&&(Pk(n),By("onunhandledrejection"))}}}),jd=Mk;function Lk(e){Yo(t=>{let{stackParser:n,attachStacktrace:r}=Fy();if(T()!==e||pd())return;let{msg:i,url:o,line:s,column:a,error:c}=t,l=Uk(bo(n,c||i,void 0,r,!1),o,s,a);l.level="error",bn(l,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function Pk(e){zo(t=>{let{stackParser:n,attachStacktrace:r}=Fy();if(T()!==e||pd())return;let i=$d(t),o=Ge(i)?Vd(i):bo(n,i,void 0,r,!0);o.level="error",bn(o,{originalException:i,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function $d(e){if(Ge(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 Vd(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Uk(e,t,n,r){let i=e.exception=e.exception||{},o=i.values=i.values||[],s=o[0]=o[0]||{},a=s.stacktrace=s.stacktrace||{},c=a.frames=a.frames||[];
494return c.length===0&&c.push({colno:r,lineno:n,filename:Dk(t)??rt(),function:"?",in_app:!0}),e}function By(e){v&&g.log(`Global Handler attached: ${e}`)}function Fy(){return T()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function Dk(e){if(!(!$e(e)||e.length===0))return e.startsWith("data:")?`<${nt(e,!1)}>`:e}var Kd=()=>({name:"HttpContext",preprocessEvent(e){if(!O.navigator&&!O.location&&!O.document)return;let t=ho(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSegmentSpan(e){let t=e.attributes?.[J];if(!O.navigator&&!O.location&&!O.document)return;let n=ho();Dt(e,{[Ut]:t!=="http.client"?n.url:void 0,"http.request.header.user_agent":n.headers["User-Agent"],"http.request.header.referer":n.headers.Referer})}});var Bk="cause",Fk=5,Gk="LinkedErrors",Hk=((e={})=>{let t=e.limit||Fk,n=e.key||Bk;return{name:Gk,preprocessEvent(r,i,o){let s=o.getOptions();ku(zs,s.stackParser,n,t,r,i)}}}),Jd=Hk;var qk=/^HTML(\w*)Element$/;function Xd(e){if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(Gd(e)){let t=Wk(e);if(qk.test(t))return`[HTMLElement: ${be(e)}]`}}function Wk(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function Gy(){return Yk()?(v&&je(()=>{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 Yk(){if(typeof O.window>"u")return!1;let e=O;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;let n=rt();return!(O===O.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(n))}function Hy(e){return[bc(),_c(),Cu(),Wd(),qd(),jd(),Jd(),Tc(),Kd(),zd(),Yd()]}function zk(e={}){let t=!e.skipBrowserExtensionCheck&&Gy(),n=e.defaultIntegrations==null?Hy():e.defaultIntegrations,r={...e,enabled:t?!1:e.enabled,stackParser:Sa(e.stackParser||Hd),integrations:lc({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||Zs};return Ia(Xd),hu(js,r)}function jk(){}function $k(e){e()}function Vk(e={}){let t=O.document,n=t?.head||t?.body;if(!n){v&&g.error("[showReportDialog] Global document not defined");return}let r=k(),o=T()?.getDsn();if(!o){v&&g.error("[showReportDialog] DSN not configured");return}let s={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||Ts()},a=O.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=tu(o,s);let{onLoad:c,onClose:l}=s;if(c&&(a.onload=c),l){let u=p=>{if(p.data==="__sentry_reportdialog_closed__")try{l()}finally{O.removeEventListener("message",u)}};O.addEventListener("message",u)}n.appendChild(a)}var Kk=R,Jk="ReportingObserver",qy=new WeakMap,Xk=((e={})=>{let t=e.types||["crash","deprecation","intervention"];function n(r){if(qy.has(T()))for(let i of r)Be(o=>{o.setExtra("url",i.url);let s=`ReportingObserver [${i.type}]`,a="No details available";if(i.body){let c={};for(let l in i.body)c[l]=i.body[l];if(o.setExtra("body",c),i.type==="crash"){let l=i.body;a=[l.crashId||"",l.reason||""].join(" ").trim()||a}else a=i.body.message||a}Ss(`${s}: ${a}`)})}return{name:Jk,setupOnce(){if(!Yc())return;new Kk.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){qy.set(r,!0)}}}),Qk=Xk;var Zk="HttpClient",ex=((e={})=>{let t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:Zk,setup(n){cx(n,t),lx(n,t)}}}),tx=ex;function nx(e,t,n,r,i){if(Yy(e,n.status,n.url)){let o=px(t,r),s,a,c,l,u=jy();if(u.requestHeaders!==!1&&(s=Ar(Wy(o.headers),u.requestHeaders)),u.responseHeaders!==!1&&(a=Ar(Wy(n.headers),u.responseHeaders)),u.cookies!==!1){let m=o.headers.get("Cookie")||void 0;if(m){let f=Cs(m,u.cookies);typeof f=="object"&&(c=f)}let d=n.headers.get("Set-Cookie")||void 0;if(d){let f=Cs(d,u.cookies);typeof f=="object"&&(l=f)}}let p=zy({url:o.url,method:o.method,status:n.status,requestHeaders:s,responseHeaders:a,requestCookies:c,responseCookies:l,error:i,type:"fetch"});bn(p)}}function rx(e,t,n,r,i){if(Yy(e,t.status,t.responseURL)){let o,s,a,c=jy();if(c.cookies!==!1)try{let u=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;if(u){let p=Cs(u,c.cookies);typeof p=="object"&&(s=p)}}catch{}if(c.responseHeaders!==!1)try{a=Ar(ox(t),c.responseHeaders)}catch{}c.requestHeaders!==!1&&(o=Ar(r,c.requestHeaders));let l=zy({url:t.responseURL,method:n,status:t.status,requestHeaders:o,responseHeaders:a,responseCookies:s,error:i,type:"xhr"});bn(l)}}function ix(e){if(e){let t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function Wy(e){let t={};return e.forEach((n,r)=>{t[r]=n}),t}function ox(e){let t=e.getAllResponseHeaders();return t?t.split(`\r
495`).reduce((n,r)=>{let[i,o]=r.split(": ");return i&&o&&(n[i]=o),n},{}):{}}function sx(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}function ax(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}function cx(e,t){uo()&&Dn(n=>{if(T()!==e)return;let{response:r,args:i,error:o,virtualError:s}=n,[a,c]=i;r&&nx(t,a,r,c,o||s)},!1)}function lx(e,t){"XMLHttpRequest"in R&&Ai(n=>{if(T()!==e)return;let{error:r,virtualError:i}=n,o=n.xhr,s=o[ht];if(!s)return;let{method:a,request_headers:c}=s;try{rx(t,o,a,c,r||i)}catch(l){v&&g.warn("Error while extracting response event form XHR response",l)}})}
495function Yy(e,t,n){return ax(e.failedRequestStatusCodes,t)&&sx(e.failedRequestTargets,n)&&!Qi(n,T())}function zy(e){let t=T(),n=t&&e.error&&e.error instanceof Error?e.error.stack:void 0,r=n&&t?t.getOptions().stackParser(n,0,1):void 0,i=`HTTP Client Error with status code: ${e.status}`,o={message:i,exception:{values:[{type:"Error",value:i,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:ix(e.responseHeaders)}}};return Je(o,{type:`auto.http.client.${e.type}`,handled:!1}),o}function px(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function jy(){let e=T();if(!e)return{cookies:!1,requestHeaders:!1,responseHeaders:!1};let t=e.getOptions();if(t.dataCollection==null){let i=!!t.sendDefaultPii;return{cookies:i,requestHeaders:i,responseHeaders:i}}let{cookies:n,httpHeaders:r}=e.getDataCollectionOptions();return{cookies:n,requestHeaders:r.request,responseHeaders:r.response}}var Qd=R,ux=7,dx="ContextLines",mx=((e={})=>({name:dx,processEvent(t,n,r){let i=e.frameContextLines??r?.getDataCollectionOptions().frameContextLines??ux;return gx(t,i)}})),fx=mx;function gx(e,t){let n=Qd.document,r=Qd.location&&Xi(Qd.location.href);if(!n||!r)return e;let i=e.exception?.values;if(!i?.length)return e;let o=n.documentElement.innerHTML;if(!o)return e;let s=["<!DOCTYPE html>","<html>",...o.split(`
496`),"</html>"];return i.forEach(a=>{let c=a.stacktrace;
496c?.frames&&(c.frames=c.frames.map(l=>_x(l,s,r,t)))}),e}function _x(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||Aa(t,e,r),e}var hx="GraphQLClient",bx=(e=>({name:hx,setup(t){yx(t,e),Sx(t,e)}}));function yx(e,t){e.on("beforeOutgoingRequestSpan",(n,r)=>{let o=P(n).data||{};if(!(o[J]==="http.client"))return;let c=o[Ut]||o["http.url"]||o.url,l=o[Fa]||o["http.method"];if(!$e(c)||!$e(l))return;let{endpoints:u}=t,p=We(c,u),m=Vy(r);if(p&&m){let d=Ky(m);if(d){let f=$y(d);n.updateName(`${l} ${c} (${f})`),Sl(d)&&e.getDataCollectionOptions().graphQL.document===!0&&n.setAttribute(Fp,d.query),El(d)&&(n.setAttribute("graphql.persisted_query.hash.sha256",d.extensions.persistedQuery.sha256Hash),n.setAttribute("graphql.persisted_query.version",d.extensions.persistedQuery.version))}}})}function Sx(e,t){e.on("beforeOutgoingRequestBreadcrumb",(n,r)=>{let{category:i,type:o,data:s}=n;if(o==="http"&&(i==="fetch"||i==="xhr")){let u=s?.url,{endpoints:p}=t,m=We(u,p),d=Vy(r);if(m&&s&&d){let f=Ky(d);if(!s.graphql&&f){let _=$y(f);s["graphql.operation"]=_,Sl(f)&&e.getDataCollectionOptions().graphQL.document===!0&&(s[Fp]=f.query),El(f)&&(s["graphql.persisted_query.hash.sha256"]=f.extensions.persistedQuery.sha256Hash,s["graphql.persisted_query.version"]=f.extensions.persistedQuery.version)}}}})}function $y(e){if(El(e))return`persisted ${e.operationName}`;if(Sl(e)){let{query:t,operationName:n}=e,{operationName:r=n,operationType:i}=Ex(t);return r?`${i} ${r}`:`${i}`}return"unknown"}function Vy(e){let t="xhr"in e,n;if(t){let r=e.xhr[ht];n=r&&Ri(r.body)[0]}else{let r=Ro(e.input);n=Ri(r)[0]}return n}function Ex(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 i=e.match(n);return i?{operationType:i[1],operationName:void 0}:{operationType:void 0,operationName:void 0}}function Sl(e){return He(e)&&typeof e.query=="string"}function El(e){return He(e)&&typeof e.operationName=="string"&&He(e.extensions)&&He(e.extensions.persistedQuery)&&typeof e.extensions.persistedQuery.sha256Hash=="string"&&typeof e.extensions.persistedQuery.version=="number"}function Ky(e){try{let t=JSON.parse(e);return Sl(t)||El(t)?t:void 0}catch{return}}var Tx=bx;var vx=(e={})=>{let t=["script"];function n(r,i,o=0){if(!r)return;let s="shadowRoot"in r&&r.shadowRoot?r.shadowRoot.children:r.children;for(let a of s){if(!(a instanceof HTMLElement))continue;let c=Cr(a,1)||void 0,l=a.tagName.toLowerCase();if(t.includes(l))continue;let u=e.onElement?.({element:a,componentName:c,tagName:l,depth:o})||{};if(u==="skip")continue;if(u==="children"){n(a,i,o+1);continue}let{x:p,y:m,width:d,height:f}=a.getBoundingClientRect(),_={identifier:a.id||void 0,type:c||l,visible:!0,alpha:1,height:f,width:d,x:p,y:m,...u},h=[];_.children=h,n(a,_.children,o+1),i.push(_)}}return{name:"ViewHierarchy",processEvent:(r,i)=>{if(r.type!==void 0||e.shouldAttach?.(r,i)===!1)return r;let o={rendering_system:"DOM",positioning:"absolute",windows:[]};n(e.rootElement?.()||O.document.body,o.windows);let s={filename:"view-hierarchy.json",attachmentType:"event.view_hierarchy",contentType:"application/json",data:JSON.stringify(o)};return i.attachments=i.attachments||[],i.attachments.push(s),r}}};var Ae=R,Nm="sentryReplaySession",Ix="replay_event",km="Unable to send Replay",Ax=3e5,Rx=9e5,Ox=5e3,Nx=5500,kx=6e4,xx=5e3,wx=3,Jy=15e4,Tl=5e3,Cx=3e3,Mx=300,xm=2e7,Lx=4999,Px=5e4,Xy=36e5,Ux=Object.defineProperty,Dx=(e,t,n)=>t in e?Ux(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qy=(e,t,n)=>Dx(e,typeof t!="symbol"?t+"":t,n),ze=(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))(ze||{});function Bx(e){return e.nodeType===e.ELEMENT_NODE}function na(e){return e?.host?.shadowRoot===e}function ra(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Fx(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 Gx(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 Ol(e){try{let t=e.rules||e.cssRules;return t?Fx(Array.from(t,vS).join("")):null}catch{return null}}function Hx(e){let t="";for(let n=0;n<e.style.length;n++){let r=e.style,i=r[n],o=r.getPropertyPriority(i);t+=`${i}:${r.getPropertyValue(i)}${o?" !important":""};`}return`${e.selectorText} { ${t} }`}function vS(e){let t;if(Wx(e))try{t=Ol(e.styleSheet)||Gx(e)}catch{}else if(Yx(e)){let n=e.cssText,r=e.selectorText.includes(":"),i=typeof e.style.all=="string"&&e.style.all;if(i&&(n=Hx(e)),r&&(n=qx(n)),r||i)return n}return t||e.cssText}function qx(e){let t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function Wx(e){return"styleSheet"in e}function Yx(e){return"selectorText"in e}var Nl=class{constructor(){Qy(this,"idNodeMap",new Map),Qy(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);
496this.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 i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(n,i)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function zx(){return new Nl}function ql({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 oa({isMasked:e,element:t,value:n,maskInputFn:r}){let i=n||"";return e?(r&&(i=r(i,t)),"*".repeat(i.length)):i}function Po(e){return e.toLowerCase()}function im(e){return e.toUpperCase()}var Zy="__rrweb_original__";function jx(e){let t=e.getContext("2d");if(!t)return!0;let n=50;for(let r=0;r<e.width;r+=n)for(let i=0;i<e.height;i+=n){let o=t.getImageData,s=Zy in o?o[Zy]:o;if(new Uint32Array(s.call(t,r,i,Math.min(n,e.width-r),Math.min(n,e.height-i)).data.buffer).some(c=>c!==0))return!1}return!0}function wm(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Po(t):null}function kl(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function IS(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 eS={};function AS(e){let t=eS[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement=="function")try{let i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);let o=i.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(i)}catch{}return eS[e]=r.bind(window)}function om(...e){return AS("setTimeout")(...e)}function RS(...e){return AS("clearTimeout")(...e)}function OS(e){try{return e.contentDocument}catch{}}function $x(e){try{return e.contentWindow}catch{}}var Vx=1,Kx=new RegExp("[^a-z0-9-_:]"),sa=-2;function Cm(){return Vx++}function Jx(e){if(e instanceof HTMLFormElement)return"form";let t=Po(e.tagName);return Kx.test(t)?"div":t}function Xx(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var No,tS,Qx=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Zx=/^(?:[a-z+]+:)?\/\//i,e1=/^www\..*/i,t1=/^(data:)([^,]*),(.*)/i;function n1(e,t){if(!e||t.size===0)return e;try{let n=e.split(";"),r=[];for(let i of n){if(i=i.trim(),!i)continue;let o=i.indexOf(":");if(o===-1){r.push(i);continue}let s=i.slice(0,o).trim();t.has(s)||r.push(i)}return r.join("; ")+(r.length>0&&e.endsWith(";")?";":"")}catch(n){return console.warn("Error filtering CSS properties:",n),e}}function xl(e,t){return(e||"").replace(Qx,(n,r,i,o,s,a)=>{let c=i||s||a,l=r||o||"";if(!c)return n;if(Zx.test(c)||e1.test(c))return`url(${l}${c}${l})`;if(t1.test(c))return`url(${l}${c}${l})`;if(c[0]==="/")return`url(${l}${Xx(t)+c}${l})`;let u=t.split("/"),p=c.split("/");u.pop();for(let m of p)m!=="."&&(m===".."?u.pop():u.push(m));return`url(${l}${u.join("/")}${l})`})}var r1=/^[^ \t\n\r\u000c]+/,i1=/^[, \t\n\r\u000c]+/;function o1(e,t){if(t.trim()==="")return t;let n=0;function r(o){let s,a=o.exec(t.substring(n));return a?(s=a[0],n+=s.length,s):""}let i=[];for(;r(i1),!(n>=t.length);){let o=r(r1);if(o.slice(-1)===",")o=wo(e,o.substring(0,o.length-1)),i.push(o);else{let s="";o=wo(e,o);let a=!1;for(;;){let c=t.charAt(n);if(c===""){i.push((o+s).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,i.push((o+s).trim());break}else c==="("&&(a=!0);s+=c,n+=1}}}return i.join(", ")}var nS=new WeakMap;function wo(e,t){return!t||t.trim()===""?t:Wl(e,t)}function s1(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Wl(e,t){let n=nS.get(e);if(n||(n=e.createElement("a"),nS.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function NS(e,t,n,r,i,o,s){if(!r)return r;if(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#"))return wo(e,r);if(n==="xlink:href"&&r[0]!=="#")return wo(e,r);if(n==="background"&&(t==="table"||t==="td"||t==="th"))return wo(e,r);if(n==="srcset")return o1(e,r);if(n==="style"){let a=xl(r,Wl(e));return s&&s.size>0&&(a=n1(a,s)),a}else if(t==="object"&&n==="data")return wo(e,r);return typeof o=="function"?o(n,r,i):r}function kS(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function a1(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 i=e.classList.length;i--;){let o=e.classList[i];if(t.test(o))return!0}if(n)return e.matches(n)}catch{}return!1}function c1(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}function Oi(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Oi(e.parentNode,t,n,r+1)}function Co(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(c1(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function Uo(e,t,n,r,i,o){try{let s=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(s===null)return!1;if(s.tagName==="INPUT"){let l=s.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(l))return!0}let a=-1,c=-1;if(o){if(c=Oi(s,Co(r,i)),c<0)return!0;a=Oi(s,Co(t,n),c>=0?c:1/0)}else{if(a=Oi(s,Co(t,n)),a<0)return!1;c=Oi(s,Co(r,i),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!o}catch{}return!!o}function l1(e,t,n){let r=$x(e);if(!r)return;let i=!1,o;try{o=r.document.readyState}catch{return}if(o!=="complete"){let a=om(()=>{i||(t(),i=!0)},n);e.addEventListener("load",()=>{RS(a),i=!0,t()});return}let s="about:blank";if(r.location.href!==s||e.src===s||e.src==="")return om(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function p1(e,t,n){let r=!1,i;try{i=e.sheet}catch{i=null}if(i)return;let o=om(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{RS(o),r=!0,t()})}function u1(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskAttributeFn:c,maskTextClass:l,unmaskTextClass:u,maskTextSelector:p,unmaskTextSelector:m,inlineStylesheet:d,maskInputOptions:f={},maskTextFn:_,maskInputFn:h,dataURLOptions:b={},inlineImages:S,recordCanvas:N,keepIframeSrcFn:I,newlyAddedElement:C=!1,ignoreCSSAttributes:L}=t,y=d1(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:ze.Document,childNodes:[],compatMode:e.compatMode}:{type:ze.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:ze.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:y};case e.ELEMENT_NODE:return f1(e,{doc:n,blockClass:i,blockSelector:o,unblockSelector:s,inlineStylesheet:d,maskAttributeFn:c,maskInputOptions:f,maskInputFn:h,dataURLOptions:b,inlineImages:S,recordCanvas:N,keepIframeSrcFn:I,newlyAddedElement:C,rootId:y,maskTextClass:l,unmaskTextClass:u,maskTextSelector:p,unmaskTextSelector:m,ignoreCSSAttributes:L});case e.TEXT_NODE:return m1(e,{doc:n,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:p,unmaskTextSelector:m,maskTextFn:_,maskInputOptions:f,maskInputFn:h,rootId:y});case e.CDATA_SECTION_NODE:return{type:ze.CDATA,textContent:"",rootId:y};case e.COMMENT_NODE:return{type:ze.Comment,textContent:e.textContent||"",rootId:y};default:return!1}}function d1(e,t){if(!t.hasNode(e))return;let n=t.getId(e);return n===1?void 0:n}function m1(e,t){let{maskAllText:n,maskTextClass:r,unmaskTextClass:i,maskTextSelector:o,unmaskTextSelector:s,maskTextFn:a,maskInputOptions:c,maskInputFn:l,rootId:u}=t,p=e.parentNode&&e.parentNode.tagName,m=e.textContent,d=p==="STYLE"?!0:void 0,f=p==="SCRIPT"?!0:void 0,_=p==="TEXTAREA"?!0:void 0;if(d&&m){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(m=Ol(e.parentNode.sheet))}catch(b){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${b}`,e)}m=xl(m,Wl(t.doc))}f&&(m="SCRIPT_PLACEHOLDER");let h=Uo(e,r,o,i,s,n);if(!d&&!f&&!_&&m&&h&&(m=a?a(m,e.parentElement):m.replace(/[\S]/g,"*")),_&&m&&(c.textarea||h)&&(m=l?l(m,e.parentNode):m.replace(/[\S]/g,"*")),p==="OPTION"&&m){let b=ql({type:null,tagName:p,maskInputOptions:c});m=oa({isMasked:Uo(e,r,o,i,s,b),element:e,value:m,maskInputFn:l})}return{type:ze.Text,textContent:m||"",isStyle:d,rootId:u}}function f1(e,t){let{doc:n,blockClass:r,blockSelector:i,unblockSelector:o,inlineStylesheet:s,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:l,dataURLOptions:u={},inlineImages:p,recordCanvas:m,keepIframeSrcFn:d,newlyAddedElement:f=!1,rootId:_,maskTextClass:h,unmaskTextClass:b,maskTextSelector:S,unmaskTextSelector:N,ignoreCSSAttributes:I}=t,C=a1(e,r,i,o),L=Jx(e),y={},x=e.attributes.length;for(let A=0;A<x;A++){let U=e.attributes[A];U.name&&!kS(L,U.name,U.value)&&(y[U.name]=NS(n,L,Po(U.name),U.value,e,c,I))}if(L==="link"&&s){let A=Array.from(n.styleSheets).find(w=>w.href===e.href),U=null;A&&(U=Ol(A)),U&&(y.rel=null,y.href=null,y.crossorigin=null,y._cssText=xl(U,A.href))}if(L==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){let A=Ol(e.sheet);A&&(y._cssText=xl(A,Wl(n)))}if(L==="input"||L==="textarea"||L==="select"||L==="option"){let A=e,U=wm(A),w=kl(A,im(L),U),D=A.checked;if(U!=="submit"&&U!=="button"&&w){let H=Uo(A,h,S,b,N,ql({type:U,tagName:im(L),maskInputOptions:a}));y.value=oa({isMasked:H,element:A,value:w,maskInputFn:l})}D&&(y.checked=D)}if(L==="option"&&(e.selected&&!a.select?y.selected=!0:delete y.selected),L==="canvas"&&m){if(e.__context==="2d")jx(e)||(y.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){let A=e.toDataURL(u.type,u.quality),U=n.createElement("canvas");U.width=e.width,U.height=e.height;let w=U.toDataURL(u.type,u.quality);A!==w&&(y.rr_dataURL=A)}}if(L==="img"&&p){No||(No=n.createElement("canvas"),tS=No.getContext("2d"));let A=e,U=A.currentSrc||A.getAttribute("src")||"<unknown-src>",w=A.crossOrigin,D=()=>{A.removeEventListener("load",D);
496try{No.width=A.naturalWidth,No.height=A.naturalHeight,tS.drawImage(A,0,0),y.rr_dataURL=No.toDataURL(u.type,u.quality)}catch(H){if(A.crossOrigin!=="anonymous"){A.crossOrigin="anonymous",A.complete&&A.naturalWidth!==0?D():A.addEventListener("load",D);return}else console.warn(`Cannot inline img src=${U}! Error: ${H}`)}A.crossOrigin==="anonymous"&&(w?y.crossOrigin=w:A.removeAttribute("crossorigin"))};A.complete&&A.naturalWidth!==0?D():A.addEventListener("load",D)}if((L==="audio"||L==="video")&&(y.rr_mediaState=e.paused?"paused":"played",y.rr_mediaCurrentTime=e.currentTime),f||(e.scrollLeft&&(y.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(y.rr_scrollTop=e.scrollTop)),C){let{width:A,height:U}=e.getBoundingClientRect();y={class:y.class,rr_width:`${A}px`,rr_height:`${U}px`}}L==="iframe"&&!d(y.src)&&(!C&&!OS(e)&&(y.rr_src=y.src),delete y.src);let z;try{customElements.get(L)&&(z=!0)}catch{}return{type:ze.Element,tagName:L,attributes:y,childNodes:[],isSVG:s1(e)||void 0,needBlock:C,rootId:_,isCustom:z}}function Ie(e){return e==null?"":e.toLowerCase()}function g1(e,t){if(t.comment&&e.type===ze.Comment)return!0;if(e.type===ze.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"&&IS(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(Ie(e.attributes.name).match(/^msapplication-tile(image|color)$/)||Ie(e.attributes.name)==="application-name"||Ie(e.attributes.rel)==="icon"||Ie(e.attributes.rel)==="apple-touch-icon"||Ie(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&Ie(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Ie(e.attributes.property).match(/^(og|twitter|fb):/)||Ie(e.attributes.name).match(/^(og|twitter):/)||Ie(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(Ie(e.attributes.name)==="robots"||Ie(e.attributes.name)==="googlebot"||Ie(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(Ie(e.attributes.name)==="author"||Ie(e.attributes.name)==="generator"||Ie(e.attributes.name)==="framework"||Ie(e.attributes.name)==="publisher"||Ie(e.attributes.name)==="progid"||Ie(e.attributes.property).match(/^article:/)||Ie(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(Ie(e.attributes.name)==="google-site-verification"||Ie(e.attributes.name)==="yandex-verification"||Ie(e.attributes.name)==="csrf-token"||Ie(e.attributes.name)==="p:domain_verify"||Ie(e.attributes.name)==="verify-v1"||Ie(e.attributes.name)==="verification"||Ie(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Mo(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:p,skipChild:m=!1,inlineStylesheet:d=!0,maskInputOptions:f={},maskAttributeFn:_,maskTextFn:h,maskInputFn:b,slimDOMOptions:S,dataURLOptions:N={},inlineImages:I=!1,recordCanvas:C=!1,onSerialize:L,onIframeLoad:y,iframeLoadTimeout:x=5e3,onBlockedImageLoad:z,onStylesheetLoad:A,stylesheetLoadTimeout:U=5e3,keepIframeSrcFn:w=()=>!1,newlyAddedElement:D=!1,ignoreCSSAttributes:H}=t,{preserveWhiteSpace:oe=!0}=t,ae=u1(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,maskAllText:a,unblockSelector:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:p,inlineStylesheet:d,maskInputOptions:f,maskAttributeFn:_,maskTextFn:h,maskInputFn:b,dataURLOptions:N,inlineImages:I,recordCanvas:C,keepIframeSrcFn:w,newlyAddedElement:D,ignoreCSSAttributes:H});if(!ae)return console.warn(e,"not serialized"),null;let W;r.hasNode(e)?W=r.getId(e):g1(ae,S)||!oe&&ae.type===ze.Text&&!ae.isStyle&&!ae.textContent.trim().length?W=sa:W=Cm();let M=Object.assign(ae,{id:W});if(r.add(e,M),W===sa)return null;L&&L(e);let Y=!m;if(M.type===ze.Element){Y=Y&&!M.needBlock;let B=e.shadowRoot;B&&ra(B)&&(M.isShadowHost=!0)}if((M.type===ze.Document||M.type===ze.Element)&&Y){S.headWhitespace&&M.type===ze.Element&&M.tagName==="head"&&(oe=!1);let B={doc:n,mirror:r,blockClass:i,blockSelector:o,maskAllText:a,unblockSelector:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:p,skipChild:m,inlineStylesheet:d,maskInputOptions:f,maskAttributeFn:_,maskTextFn:
496h,maskInputFn:b,slimDOMOptions:S,dataURLOptions:N,inlineImages:I,recordCanvas:C,preserveWhiteSpace:oe,onSerialize:L,onIframeLoad:y,iframeLoadTimeout:x,onBlockedImageLoad:z,onStylesheetLoad:A,stylesheetLoadTimeout:U,keepIframeSrcFn:w,ignoreCSSAttributes:H},ee=e.childNodes?Array.from(e.childNodes):[];for(let _e of ee){let ue=Mo(_e,B);ue&&M.childNodes.push(ue)}if(Bx(e)&&e.shadowRoot)for(let _e of Array.from(e.shadowRoot.childNodes)){let ue=Mo(_e,B);ue&&(ra(e.shadowRoot)&&(ue.isShadow=!0),M.childNodes.push(ue))}}if(e.parentNode&&na(e.parentNode)&&ra(e.parentNode)&&(M.isShadow=!0),M.type===ze.Element&&M.tagName==="iframe"&&!M.needBlock&&l1(e,()=>{let B=OS(e);if(B&&y){let ee=Mo(B,{doc:B,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:p,skipChild:!1,inlineStylesheet:d,maskInputOptions:f,maskAttributeFn:_,maskTextFn:h,maskInputFn:b,slimDOMOptions:S,dataURLOptions:N,inlineImages:I,recordCanvas:C,preserveWhiteSpace:oe,onSerialize:L,onIframeLoad:y,iframeLoadTimeout:x,onStylesheetLoad:A,stylesheetLoadTimeout:U,keepIframeSrcFn:w,ignoreCSSAttributes:H});ee&&y(e,ee)}},x),M.type===ze.Element&&M.tagName==="img"&&!e.complete&&M.needBlock){let B=e,ee=()=>{if(B.isConnected&&!B.complete&&z)try{let _e=B.getBoundingClientRect();_e.width>0&&_e.height>0&&z(B,M,_e)}catch{}B.removeEventListener("load",ee)};B.isConnected&&B.addEventListener("load",ee)}return M.type===ze.Element&&M.tagName==="link"&&typeof M.attributes.rel=="string"&&(M.attributes.rel==="stylesheet"||M.attributes.rel==="preload"&&typeof M.attributes.href=="string"&&IS(M.attributes.href)==="css")&&p1(e,()=>{if(A){let B=Mo(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:p,skipChild:!1,inlineStylesheet:d,maskInputOptions:f,maskAttributeFn:_,maskTextFn:h,maskInputFn:b,slimDOMOptions:S,dataURLOptions:N,inlineImages:I,recordCanvas:C,preserveWhiteSpace:oe,onSerialize:L,onIframeLoad:y,iframeLoadTimeout:x,onStylesheetLoad:A,stylesheetLoadTimeout:U,keepIframeSrcFn:w,ignoreCSSAttributes:H});B&&A(e,B)}},U),M.type===ze.Element&&delete M.needBlock,M}function _1(e,t){let{mirror:n=new Nl,blockClass:r="rr-block",blockSelector:i=null,unblockSelector:o=null,maskAllText:s=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:l=null,unmaskTextSelector:u=null,inlineStylesheet:p=!0,inlineImages:m=!1,recordCanvas:d=!1,maskAllInputs:f=!1,maskAttributeFn:_,maskTextFn:h,maskInputFn:b,slimDOM:S=!1,dataURLOptions:N,preserveWhiteSpace:I,onSerialize:C,onIframeLoad:L,iframeLoadTimeout:y,onBlockedImageLoad:x,onStylesheetLoad:z,stylesheetLoadTimeout:A,keepIframeSrcFn:U=()=>!1,ignoreCSSAttributes:w=new Set([])}=t||{};return Mo(e,{doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,maskAllText:s,maskTextClass:a,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:p,maskInputOptions:f===!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}:f===!1?{}:f,maskAttributeFn:_,maskTextFn:h,maskInputFn:b,slimDOMOptions:S===!0||S==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:S==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:S===!1?{}:S,dataURLOptions:N,inlineImages:m,recordCanvas:d,preserveWhiteSpace:I,onSerialize:C,onIframeLoad:L,iframeLoadTimeout:y,onBlockedImageLoad:x,onStylesheetLoad:z,stylesheetLoadTimeout:A,keepIframeSrcFn:U,newlyAddedElement:!1,ignoreCSSAttributes:w})}function yt(e,t,n=document){let r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}var ko=`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.`,rS={map:{},getId(){return console.error(ko),-1},getNode(){return console.error(ko),null},removeNodeFromMap(){console.error(ko)},has(){return console.error(ko),!1},reset(){console.error(ko)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(rS=new Proxy(rS,{get(e,t,n){return t==="map"&&c
498onsole.error(ko),Reflect.get(e,t,n)}}));function aa(e,t,n={}){let r=null,i=0;return function(...o){let s=Date.now();!i&&n.leading===!1&&(i=s);let a=t-(s-i),c=this;a<=0||a>t?(r&&(T1(r),r=null),i=s,e.apply(c,o)):!r&&n.trailing!==!1&&(r=Yl(()=>{i=n.leading===!1?0:Date.now(),r=null,e.apply(c,o)},a))}}function xS(e,t,n,r,i=window){let o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(s){Yl(()=>{n.set.call(this,s)},0),o&&o.set&&o.set.call(this,s)}}),()=>xS(e,t,o||{},!0)}function Mm(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}var wl=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(wl=()=>new Date().getTime());function wS(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 CS(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function MS(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function LS(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Wt(e,t,n,r,i){if(!e)return!1;let o=LS(e);if(!o)return!1;let s=Co(t,n);if(!i){let l=r&&o.matches(r);return s(o)&&!l}let a=Oi(o,s),c=-1;return a<0?!1:(r&&(c=Oi(o,Co(null,r))),a>-1&&c<0?!0:a<c)}function h1(e,t){return t.getId(e)!==-1}function Zd(e,t){return t.getId(e)===sa}function PS(e,t){if(na(e))return!1;let n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?PS(e.parentNode,t):!0:!0}function sm(e){return!!e.changedTouches}function b1(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 US(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function DS(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function am(e){return!!e?.shadowRoot}var cm=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 BS(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function y1(e){let t=e,n;for(;n=BS(t);)t=n;return t}function S1(e){let t=e.ownerDocument;if(!t)return!1;let n=y1(e);return t.contains(n)}function FS(e){let t=e.ownerDocument;return t?t.contains(e)||S1(e):!1}var iS={};function Lm(e){let t=iS[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement=="function")try{let i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);let o=i.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(i)}catch{}return iS[e]=r.bind(window)}function E1(...e){return Lm("requestAnimationFrame")(...e)}function Yl(...e){return Lm("setTimeout")(...e)}function T1(...e){return Lm("clearTimeout")(...e)}var ne=(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))(ne||{}),V=(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))(V||{}
498),bt=(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))(bt||{}),ur=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(ur||{}),xo=(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))(xo||{}),ia;function v1(e){ia=e}function I1(){ia=void 0}var ce=e=>ia?((...n)=>{try{return e(...n)}catch(r){if(ia&&ia(r)===!0)return()=>{};throw r}}):e,oS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",A1=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(ea=0;ea<oS.length;ea++)A1[oS.charCodeAt(ea)]=ea;var ea,Cl=class{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}};function Pm(e){try{return e.contentDocument}catch{}}function ca(e){try{return e.contentWindow}catch{}}var lm=class{constructor(t){this.doc=t,this.unattachedDoc=null}parse(t){return this.parseWithConstructableStylesheet(t)||this.parseWithDetachedElement(t)}parseWithConstructableStylesheet(t){if(typeof CSSStyleSheet>"u"||typeof CSSStyleSheet.prototype.replaceSync!="function")return null;try{let n=new CSSStyleSheet;n.replaceSync(`x { ${t} }`);let r=n.cssRules[0];return!r||r.type!==CSSRule.STYLE_RULE?null:r.style}catch{return null}}parseWithDetachedElement(t){let n=this.getUnattachedDoc().createElement("span");return n.setAttribute("style",t),n.style}getUnattachedDoc(){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}return this.unattachedDoc}};function sS(e){return"__ln"in e}var pm=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&&sS(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&&sS(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--)}},aS=(e,t)=>`${e}@${t}`,um=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 pm,i=c=>{let l=c,u=sa;for(;u===sa;)l=l&&l.nextSibling,u=l&&this.mirror.getId(l);return u},o=c=>{if(!c.parentNode||!FS(c))return;let l=na(c.parentNode)?this.mirror.getId(BS(c)):this.mirror.getId(c.parentNode),u=i(c);if(l===-1||u===-1)return r.addNode(c);let p=Mo(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.inl
498ineImages,onSerialize:m=>{US(m,this.mirror)&&!Wt(m,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(m),DS(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),am(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(m,d)=>{if(Wt(m,this.blockClass,this.blockSelector,this.unblockSelector,!1))return;this.iframeManager.attachIframe(m,d);let f=ca(m);f&&this.canvasManager.addWindow(f),this.shadowDomManager.observeAttachShadow(m)},onStylesheetLoad:(m,d)=>{this.stylesheetManager.attachLinkElement(m,d)},onBlockedImageLoad:(m,d,{width:f,height:_})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:d.id,attributes:{style:{width:`${f}px`,height:`${_}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});p&&(t.push({parentId:l,nextId:u,node:p}),n.add(p.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let c of this.movedSet)cS(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||o(c);for(let c of this.addedSet)!lS(this.droppedSet,c)&&!cS(this.removes,c,this.mirror)||lS(this.movedSet,c)?o(c):this.droppedSet.add(c);let s=null;for(;r.length;){let c=null;if(s){let l=this.mirror.getId(s.value.parentNode),u=i(s.value);l!==-1&&u!==-1&&(c=s)}if(!c){let l=r.tail;for(;l;){let u=l;if(l=l.previous,u){let p=this.mirror.getId(u.value.parentNode);if(i(u.value)===-1)continue;if(p!==-1){c=u;break}else{let d=u.value;if(d.parentNode&&d.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let f=d.parentNode.host;if(this.mirror.getId(f)!==-1){c=u;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}s=c.previous,r.removeNode(c.value),o(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:l}=c;if(typeof l.style=="string"){let u=JSON.stringify(c.styleDiff),p=JSON.stringify(c._unchangedStyles);u.length<l.style.length&&(u+p).split("var(").length===l.style.split("var(").length&&(l.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:l}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!Zd(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:Uo(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,LS(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{let n=t.target,r=t.attributeName,i=t.target.getAttribute(r);if(r==="value"){let s=wm(n),a=n.tagName;i=kl(n,a,s);let c=ql({maskInputOptions:this.maskInputOptions,tagName:a,type:s}),l=Uo(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c);i=oa({isMasked:l,element:n,value:i,maskInputFn:this.maskInputFn})}if(Wt(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||i===t.oldValue)return;let o=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!Pm(n))r="rr_src";else return;if(o||(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(t.target,o)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!kS(n.tagName,r)&&(o.attributes[r]=NS(this.doc,Po(n.tagName),Po(r),i,n,this.maskAttributeFn),r==="style")){let s=t.oldValue?this.styleDeclarationParser.parse(t.oldValue):null;for(let a of Array.from(n.style)){let c=n.style.getPropertyValue(a),l=n.style.getPropertyPriority(a);c!==(s?.getPropertyValue(a)||"")||l!==(s?.getPropertyPriority(a)||"")?l===""?o.styleDiff[a]=c:o.styleDiff[a]=[c,l]:o._unchangedStyles[a]=[c,l]}if(s)for(let a of Array.from(s))n.style.getPropertyValue(a)===""&&(o.styleDiff[a]=!1)}break}
498case"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),i=na(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Wt(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Zd(n,this.mirror)||!h1(n,this.mirror)||(this.addedSet.has(n)?(dm(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||PS(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[aS(r,i)]?dm(this.movedSet,n):this.removes.push({parentId:i,id:r,isShadow:na(t.target)&&ra(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(Zd(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[aS(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.forEach(r=>this.genAdds(r)),am(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]}),this.styleDeclarationParser=new lm(this.doc)}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 dm(e,t){e.delete(t),t.childNodes?.forEach(n=>dm(e,n))}function cS(e,t,n){return e.length===0?!1:R1(e,t,n)}function R1(e,t,n){let r=t.parentNode;for(;r;){let i=n.getId(r);if(e.some(o=>o.id===i))return!0;r=r.parentNode}return!1}function lS(e,t){return e.size===0?!1:GS(e,t)}function GS(e,t){let{parentNode:n}=t;return n?e.has(n)?!0:GS(e,n):!1}var Lo=[];function ma(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 HS(e,t){let n=new um;Lo.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver,i=window?.Zone?.__symbol__?.("MutationObserver");i&&window[i]&&(r=window[i]);let o=new r(ce(s=>{e.onMutation&&e.onMutation(s)===!1||n.processMutations.bind(n)(s)}));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function O1({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};let i=typeof t.mousemove=="number"?t.mousemove:50,o=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500,s=[],a,c=aa(ce(p=>{let m=Date.now()-a;e(s.map(d=>(d.timeOffset-=m,d)),p),s=[],a=null}),o),l=ce(aa(ce(p=>{let m=ma(p),{clientX:d,clientY:f}=sm(p)?p.changedTouches[0]:p;a||(a=wl()),s.push({x:d,y:f,id:r.getId(m),timeOffset:wl()-a}),c(typeof DragEvent<"u"&&p instanceof DragEvent?V.Drag:p instanceof MouseEvent?V.MouseMove:V.TouchMove)}),i,{trailing:!1})),u=[yt("mousemove",l,n),yt("touchmove",l,n),yt("drag",l,n)];return ce(()=>{u.forEach(p=>p())})}function N1({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,sampling:s}){if(s.mouseInteraction===!1)return()=>{};let a=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,c=[],l=null,u=p=>m=>{let d=ma(m);if(Wt(d,r,i,o,!0))return;let f=null,_=p;if("pointerType"in m){switch(m.pointerType){case"mouse":f=ur.Mouse;break;case"touch":f=ur.Touch;break;case"pen":f=ur.Pen;break}f===ur.Touch?bt[p]===bt.MouseDown?_="TouchStart":bt[p]===bt.MouseUp&&(_="TouchEnd"):ur.Pen}else sm(m)&&(f=ur.Touch);f!==null?(l=f,(_.startsWith("Touch")&&f===ur.Touch||_.startsWith("Mouse")&&f===ur.Mouse)&&(f=null)):bt[p]===bt.Click&&(f=l,l=null);let h=sm(m)?m.changedTouches[0]:m;if(!h)return;let b=n.getId(d),{clientX:S,clientY:N}=h;ce(e)({type:bt[_],id:b,x:S,y:N,...f!==null&&{pointerType:f}})};return Object.keys(bt).filter(p=>Number.isNaN(Number(p))&&!p.endsWith("_Departed")&&a[p]!==!1).forEac
498h(p=>{let m=Po(p),d=u(p);if(window.PointerEvent)switch(bt[p]){case bt.MouseDown:case bt.MouseUp:m=m.replace("mouse","pointer");break;case bt.TouchStart:case bt.TouchEnd:return}c.push(yt(m,d,t))}),ce(()=>{c.forEach(p=>p())})}function qS({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,sampling:s}){let a=ce(aa(ce(c=>{let l=ma(c);if(!l||Wt(l,r,i,o,!0))return;let u=n.getId(l);if(l===t&&t.defaultView){let p=wS(t.defaultView);e({id:u,x:p.left,y:p.top})}else e({id:u,x:l.scrollLeft,y:l.scrollTop})}),s.scroll||100));return yt("scroll",a,t)}function k1({viewportResizeCb:e},{win:t}){let n=-1,r=-1,i=ce(aa(ce(()=>{let o=CS(),s=MS();(n!==o||r!==s)&&(e({width:Number(s),height:Number(o)}),n=o,r=s)}),200));return yt("resize",i,t)}var x1=["INPUT","TEXTAREA","SELECT"],pS=new WeakMap;function w1({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,ignoreClass:s,ignoreSelector:a,maskInputOptions:c,maskInputFn:l,sampling:u,userTriggeredOnInput:p,maskTextClass:m,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:_}){function h(y){let x=ma(y),z=y.isTrusted,A=x&&im(x.tagName);if(A==="OPTION"&&(x=x.parentElement),!x||!A||x1.indexOf(A)<0||Wt(x,r,i,o,!0))return;let U=x;if(U.classList.contains(s)||a&&U.matches(a))return;let w=wm(x),D=kl(U,A,w),H=!1,oe=ql({maskInputOptions:c,tagName:A,type:w}),ae=Uo(x,m,f,d,_,oe);(w==="radio"||w==="checkbox")&&(H=x.checked),D=oa({isMasked:ae,element:x,value:D,maskInputFn:l}),b(x,p?{text:D,isChecked:H,userTriggered:z}:{text:D,isChecked:H});let W=x.name;w==="radio"&&W&&H&&t.querySelectorAll(`input[type="radio"][name="${W}"]`).forEach(M=>{if(M!==x){let Y=oa({isMasked:ae,element:M,value:kl(M,A,w),maskInputFn:l});b(M,p?{text:Y,isChecked:!H,userTriggered:!1}:{text:Y,isChecked:!H})}})}function b(y,x){let z=pS.get(y);if(!z||z.text!==x.text||z.isChecked!==x.isChecked){pS.set(y,x);let A=n.getId(y);ce(e)({...x,id:A})}}let N=(u.input==="last"?["change"]:["input","change"]).map(y=>yt(y,ce(h),t)),I=t.defaultView;if(!I)return()=>{N.forEach(y=>y())};let C=I.Object.getOwnPropertyDescriptor(I.HTMLInputElement.prototype,"value"),L=[[I.HTMLInputElement.prototype,"value"],[I.HTMLInputElement.prototype,"checked"],[I.HTMLSelectElement.prototype,"value"],[I.HTMLTextAreaElement.prototype,"value"],[I.HTMLSelectElement.prototype,"selectedIndex"],[I.HTMLOptionElement.prototype,"selected"]];return C&&C.set&&N.push(...L.map(y=>xS(y[0],y[1],{set(){ce(h)({target:this,isTrusted:!1})}},!1,I))),ce(()=>{N.forEach(y=>y())})}function Ml(e){let t=[];function n(r,i){if(vl("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||vl("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||vl("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||vl("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){let s=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(s)}else if(r.parentStyleSheet){let s=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(s)}return i}return n(e,t)}function Dr(e,t,n){let r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function C1({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:ce((u,p,m)=>{let[d,f]=m,{id:_,styleId:h}=Dr(p,t,n.styleMirror);return(_&&_!==-1||h&&h!==-1)&&e({id:_,styleId:h,adds:[{rule:d,index:f}]}),u.apply(p,m)})});let o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:ce((u,p,m)=>{let[d]=m,{id:f,styleId:_}=Dr(p,t,n.styleMirror);return(f&&f!==-1||_&&_!==-1)&&e({id:f,styleId:_,removes:[{index:d}]}),u.apply(p,m)})});let s;r.CSSStyleSheet.prototype.replace&&(s=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:ce((u,p,m)=>{let[d]=m,{id:f,styleId:_}=Dr(p,t,n.styleMirror);return(f&&f!==-1||_&&_!==-1)&&e({id:f,styleId:_,replace:d}),u.apply(p,m)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:ce((u,p,m)=>
498{let[d]=m,{id:f,styleId:_}=Dr(p,t,n.styleMirror);return(f&&f!==-1||_&&_!==-1)&&e({id:f,styleId:_,replaceSync:d}),u.apply(p,m)})}));let c={};Il("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Il("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Il("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Il("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));let l={};return Object.entries(c).forEach(([u,p])=>{l[u]={insertRule:p.prototype.insertRule,deleteRule:p.prototype.deleteRule},p.prototype.insertRule=new Proxy(l[u].insertRule,{apply:ce((m,d,f)=>{let[_,h]=f,{id:b,styleId:S}=Dr(d.parentStyleSheet,t,n.styleMirror);return(b&&b!==-1||S&&S!==-1)&&e({id:b,styleId:S,adds:[{rule:_,index:[...Ml(d),h||0]}]}),m.apply(d,f)})}),p.prototype.deleteRule=new Proxy(l[u].deleteRule,{apply:ce((m,d,f)=>{let[_]=f,{id:h,styleId:b}=Dr(d.parentStyleSheet,t,n.styleMirror);return(h&&h!==-1||b&&b!==-1)&&e({id:h,styleId:b,removes:[{index:[...Ml(d),_]}]}),m.apply(d,f)})})}),ce(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=o,s&&(r.CSSStyleSheet.prototype.replace=s),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([u,p])=>{p.prototype.insertRule=l[u].insertRule,p.prototype.deleteRule=l[u].deleteRule})})}function WS({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);let i=n.nodeName==="#document"?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,o=i?.prototype?Object.getOwnPropertyDescriptor(i?.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!i||!o?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){return o.get?.call(this)},set(s){let a=o.set?.call(this,s);if(r!==null&&r!==-1)try{t.adoptStyleSheets(s,r)}catch{}return a}}),ce(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))}function M1({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){let o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:ce((a,c,l)=>{let[u,p,m]=l;if(n.has(u))return o.apply(c,[u,p,m]);let{id:d,styleId:f}=Dr(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,set:{property:u,value:p,priority:m},index:Ml(c.parentRule)}),a.apply(c,l)})});let s=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:ce((a,c,l)=>{let[u]=l;if(n.has(u))return s.apply(c,[u]);let{id:p,styleId:m}=Dr(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(p&&p!==-1||m&&m!==-1)&&e({id:p,styleId:m,remove:{property:u},index:Ml(c.parentRule)}),a.apply(c,l)})}),ce(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=s})}function L1({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:i,sampling:o,doc:s}){let a=ce(l=>aa(ce(u=>{let p=ma(u);if(!p||Wt(p,t,n,r,!0))return;let{currentTime:m,volume:d,muted:f,playbackRate:_}=p;e({type:l,id:i.getId(p),currentTime:m,volume:d,muted:f,playbackRate:_})}),o.media||500)),c=[yt("play",a(xo.Play),s),yt("pause",a(xo.Pause),s),yt("seeked",a(xo.Seeked),s),yt("volumechange",a(xo.VolumeChange),s),yt("ratechange",a(xo.RateChange),s)];return ce(()=>{c.forEach(l=>l())})}function P1({fontCb:e,doc:t}){let n=t.defaultView;if(!n)return()=>{};let r=[],i=new WeakMap,o=n.FontFace;n.FontFace=function(c,l,u){let p=new o(c,l,u);return i.set(p,{family:c,buffer:typeof l!="string",descriptors:u,fontSource:typeof l=="string"?l:JSON.stringify(Array.from(new Uint8Array(l)))}),p};let s=Mm(t.fonts,"add",function(a){return function(c){return Yl(ce(()=>{let l=i.get(c);l&&(e(l),i.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=o}),r.push(s),ce(()=>{r.forEach(a=>a())})}function U1(e){let{doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,selectionCb:s}=e,a=!0,c=ce(()=>{let l=t.getSelection();if(!l||a&&l?.isCollapsed)return;a=l.isCollapsed||!1;let u=[],p=l.rangeCount||0;for(let m=0;m<p;m++){let d=l.getRangeAt(m),{startContainer:f,startOffset:_,endContainer:h,endOffset:b}=d;Wt(f,r,i,o,!0)||Wt(h,r,i,o,!0)||u.push({start:n.getId(f),startOffset:_,end:n.getId(h),endOffset:b})}s({ranges:u})});return c(),yt("selectionchange",c)}function D1({doc:e,customElementCb:t}){let n=e.defaultView;return!n||!n.customElements?()=>{}:Mm(n.customElements,"define",function(i){return function(o,s,a){try{t({define:{name:o}})}catch{}
498return i.apply(this,[o,s,a])}})}function B1(e,t={}){let n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=HS(e,e.doc));let i=O1(e),o=N1(e),s=qS(e),a=k1(e,{win:n}),c=w1(e),l=L1(e),u=()=>{},p=()=>{},m=()=>{},d=()=>{};e.recordDOM&&(u=C1(e,{win:n}),p=WS(e,e.doc),m=M1(e,{win:n}),e.collectFonts&&(d=P1(e)));let f=U1(e),_=D1(e),h=[];for(let b of e.plugins)h.push(b.observer(b.callback,n,b.options));return ce(()=>{Lo.forEach(b=>b.reset()),r?.disconnect(),i(),o(),s(),a(),c(),l(),u(),p(),m(),d(),f(),_(),h.forEach(b=>b())})}function vl(e){return typeof window[e]<"u"}function Il(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var la=class{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,i){let o=r||this.getIdToRemoteIdMap(t),s=i||this.getRemoteIdToIdMap(t),a=o.get(n);return a||(a=this.generateIdFn(),o.set(n,a),s.set(a,n)),a}getIds(t,n){let r=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return n.map(o=>this.getId(t,o,r,i))}getRemoteId(t,n,r){let i=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;let o=i.get(n);return o||-1}getRemoteIds(t,n){let r=this.getRemoteIdToIdMap(t);return n.map(i=>this.getRemoteId(t,i,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}},mm=class{constructor(){this.crossOriginIframeMirror=new la(Cm),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}},fm=class{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new la(Cm),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new la(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);let n=ca(t);n&&this.crossOriginIframeMap.set(n,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&&ca(t)?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(t);let r=Pm(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 i=this.crossOriginIframeMap.get(t.source);if(!i)return;let o=this.transformCrossOriginEvent(i,n.data.event);o&&this.wrappedEmit(o,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case ne.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:ne.IncrementalSnapshot,data:{source:V.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case ne.Meta:case ne.Load:case ne.DomContentLoaded:return!1;case ne.Plugin:return n;case ne.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case ne.IncrementalSnapshot:switch(n.data.source){case V.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);let i=this.crossOriginIframeRootIdMap.get(t);i&&this.patchRootIdOnNode(r.node,i)}
498),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 V.Drag:case V.TouchMove:case V.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case V.ViewportResize:return!1;case V.MediaInteraction:case V.MouseInteraction:case V.Scroll:case V.CanvasMutation:case V.Input:return this.replaceIds(n.data,t,["id"]),n;case V.StyleSheetRule:case V.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case V.Font:return n;case V.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case V.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,i){for(let o of i)!Array.isArray(n[o])&&typeof n[o]!="number"||(Array.isArray(n[o])?n[o]=t.getIds(r,n[o]):n[o]=t.getId(r,n[o]));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!==ze.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}},gm=class{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}},_m=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(!ra(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);let r=HS({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(qS({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),Yl(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(WS({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){let n=Pm(t),r=ca(t);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(t,n){let r=this;this.restoreHandlers.push(Mm(t.prototype,"attachShadow",function(i){return function(o){let s=i.call(this,o);return this.shadowRoot&&FS(this)&&r.addShadowRoot(this.shadowRoot,n),s}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}},hm=class{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new cm,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:[]},i=[];for(let o of t){let s;this.styleMirror.has(o)?s=this.styleMirror.getId(o):(s=this.styleMirror.add(o),i.push({styleId:s,rules:Array.from(o.rules||CSSRule,(a,c)=>({rule:vS(a),index:c}))})),r.styleIds.push(s)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}},bm=class{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,n){let r=this.nodeMap.get(t);return r&&Array.from(r).some(i=>i!==n)}add(t,n){this.active||(this.active=!0,E1(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}},De,Ll;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 vn=zx();function In(e={}){let{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:o=null,unblockSelector:s=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:l=!1,maskTextClass:u="rr-mask",unmaskTextClass:p=null,maskTextSelector:m=null,unmaskTextSelector:d=null,inlineStylesheet:f=!0,maskAllInputs:_,maskInputOptions:h,slimDOMOptions:b,maskAttributeFn:S,maskInputFn:N,maskTextFn:I,maxCanvasSize:C=null,packFn:L,sampling:y={},dataURLOptions:x={},mousemoveWait:z,recordDOM:A=!0,recordCanvas:U=!1,recordCrossOriginIframes:w=!1,recordAfter:D=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:H=!1,collectFonts:oe=!1,inlineImages:ae=!1,plugins:W,keepIframeSrcFn:M=()=>!1,ignoreCSSAttributes:Y=new Set([]),errorHandler:B,onMutation:ee,getCanvasManager:_e}=e;v1(B);let ue=w?window.parent===window:!0,Ne=!1;if(!ue)try{window.parent.document&&(Ne=!1)}catch{Ne=!0}if(ue&&!t)throw new Error("emit function is required");if(!ue&&!Ne)return()=>{};z!==void 0&&y.mousemove===void 0&&(y.mousemove=z),vn.reset();let Yt=_===!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}:h!==void 0?h:{},sn=b===!0||b==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:b==="all",headMetaDescKeywords:b==="all"}:b||{};b1();let qn,an=0,Gr=G=>{for(let de of W||[])de.eventProcessor&&(G=de.eventProcessor(G));return L&&!Ne&&(G=L(G)),G};De=(G,de)=>{let Q=G;if(Q.timestamp=wl(),Lo[0]?.isFrozen()&&Q.type!==ne.FullSnapshot&&!(Q.type===ne.IncrementalSnapshot&&Q.data.source===V.Mutation)&&Lo.forEac
498h(me=>me.unfreeze()),ue)t?.(Gr(Q),de);else if(Ne){let me={type:"rrweb",event:Gr(Q),origin:window.location.origin,isCheckout:de};window.parent.postMessage(me,"*")}if(Q.type===ne.FullSnapshot)qn=Q,an=0;else if(Q.type===ne.IncrementalSnapshot){if(Q.data.source===V.Mutation&&Q.data.isAttachIframe)return;an++;let me=r&&an>=r,K=n&&qn&&Q.timestamp-qn.timestamp>n;(me||K)&&qr(!0)}};let Wn=G=>{De({type:ne.IncrementalSnapshot,data:{source:V.Mutation,...G}})},ba=G=>De({type:ne.IncrementalSnapshot,data:{source:V.Scroll,...G}}),Yn=G=>De({type:ne.IncrementalSnapshot,data:{source:V.CanvasMutation,...G}}),zt=G=>De({type:ne.IncrementalSnapshot,data:{source:V.AdoptedStyleSheet,...G}}),St=new hm({mutationCb:Wn,adoptedStyleSheetCb:zt}),Mt=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new mm:new fm({mirror:vn,mutationCb:Wn,stylesheetManager:St,recordCrossOriginIframes:w,wrappedEmit:De});for(let G of W||[])G.getMirror&&G.getMirror({nodeMirror:vn,crossOriginIframeMirror:Mt.crossOriginIframeMirror,crossOriginIframeStyleMirror:Mt.crossOriginIframeStyleMirror});let Ci=new bm,Mi=G1(_e,{mirror:vn,win:window,mutationCb:G=>De({type:ne.IncrementalSnapshot,data:{source:V.CanvasMutation,...G}}),recordCanvas:U,blockClass:i,blockSelector:o,unblockSelector:s,maxCanvasSize:C,sampling:y.canvas,dataURLOptions:x,errorHandler:B}),Hr=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new gm:new _m({mutationCb:Wn,scrollCb:ba,bypassOptions:{onMutation:ee,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:l,maskTextClass:u,unmaskTextClass:p,maskTextSelector:m,unmaskTextSelector:d,inlineStylesheet:f,maskInputOptions:Yt,dataURLOptions:x,maskAttributeFn:S,maskTextFn:I,maskInputFn:N,recordCanvas:U,inlineImages:ae,sampling:y,slimDOMOptions:sn,iframeManager:Mt,stylesheetManager:St,canvasManager:Mi,keepIframeSrcFn:M,processedNodeManager:Ci,ignoreCSSAttributes:Y},mirror:vn}),qr=(G=!1)=>{if(!A)return;De({type:ne.Meta,data:{href:window.location.href,width:MS(),height:CS()}},G),St.reset(),Hr.init(),Lo.forEach(Q=>Q.lock());let de=_1(document,{mirror:vn,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:l,maskTextClass:u,unmaskTextClass:p,maskTextSelector:m,unmaskTextSelector:d,inlineStylesheet:f,maskAllInputs:Yt,maskAttributeFn:S,maskInputFn:N,maskTextFn:I,slimDOM:sn,dataURLOptions:x,recordCanvas:U,inlineImages:ae,onSerialize:Q=>{US(Q,vn)&&Mt.addIframe(Q),DS(Q,vn)&&St.trackLinkElement(Q),am(Q)&&Hr.addShadowRoot(Q.shadowRoot,document)},onIframeLoad:(Q,me)=>{Mt.attachIframe(Q,me);let K=ca(Q);K&&Mi.addWindow(K),Hr.observeAttachShadow(Q)},onStylesheetLoad:(Q,me)=>{St.attachLinkElement(Q,me)},onBlockedImageLoad:(Q,me,{width:K,height:An})=>{Wn({adds:[],removes:[],texts:[],attributes:[{id:me.id,attributes:{style:{width:`${K}px`,height:`${An}px`}}}]})},keepIframeSrcFn:M,ignoreCSSAttributes:Y});if(!de)return console.warn("Failed to snapshot the document");De({type:ne.FullSnapshot,data:{node:de,initialOffset:wS(window)}}),Lo.forEach(Q=>Q.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&St.adoptStyleSheets(document.adoptedStyleSheets,vn.getId(document))};Ll=qr;try{let G=[],de=me=>ce(B1)({onMutation:ee,mutationCb:Wn,mousemoveCb:(K,An)=>De({type:ne.IncrementalSnapshot,data:{source:An,positions:K}}),mouseInteractionCb:K=>De({type:ne.IncrementalSnapshot,data:{source:V.MouseInteraction,...K}}),scrollCb:ba,viewportResizeCb:K=>De({type:ne.IncrementalSnapshot,data:{source:V.ViewportResize,...K}}),inputCb:K=>De({type:ne.IncrementalSnapshot,data:{source:V.Input,...K}}),mediaInteractionCb:K=>De({type:ne.IncrementalSnapshot,data:{source:V.MediaInteraction,...K}}),styleSheetRuleCb:K=>De({type:ne.IncrementalSnapshot,data:{source:V.StyleSheetRule,...K}}),styleDeclarationCb:K=>De({type:ne.IncrementalSnapshot,data:{source:V.StyleDeclaration,...K}}),canvasMutationCb:Yn,fontCb:K=>De({type:ne.IncrementalSnapshot,data:{source:V.Font,...K}}),selectionCb:K=>{De({type:ne.IncrementalSnapshot,data:{source:V.Selection,...K}})},customElementCb:K=>{De({type:ne.IncrementalSnapshot,data:{source:V.CustomElement,...K}})},blockClass:i,ignoreClass:a,ignoreSelector:c,maskAllText:l,maskTextClass:u,unmaskTextClass:p,maskTextSelector:m,unmaskTextSelector:d,maskInputOptions:Yt,inlineStylesheet:f,sampling:y,recordDOM:A,recordCanvas:U,inlineImages:ae,userTriggeredOnInput:H,collectFonts:oe,doc:me,maskAttributeFn:S,maskInputFn:N,maskTextFn:I,keepIframeSrcFn:M,blockSelector:o,unblockSelector:s,slimDOMOptions:sn,dataURLOptions:x,mirror:vn,iframeManager:Mt,stylesheetManager:St,shadowDomManager:Hr,processedNodeManager:Ci,canvasManager:Mi,ignoreCSSAttributes:Y,plugins:W?.filter(K=>K.observer)?.map(K=>({observer:K.observer,options:K.options,callback:An=>De({type:ne.Plugin,data:{plugin:K.name,payload:An}})}))||[]},{});Mt.addLoadListener(me=>{try{G.push(de(me.contentDocument))}catch(K){console.warn(K)}});let Q=()=>{qr(),G.push(de(document))};return document.readyState==="interactive"||document.readyState==="complete"?Q():(G.push(yt("DOMContentLoaded",()=>{De({type:ne.DomContentLoaded,data:{}}),D==="DOMContentLoaded"&&Q()})),G.push(yt("load",()=>{De({type:ne.Load,data:{}}),D==="load"&&Q()}
498,window))),()=>{G.forEach(me=>me()),Ci.destroy(),Ll=void 0,I1()}}catch(G){console.warn(G)}}function F1(e){if(!Ll)throw new Error("please take full snapshot after start recording");Ll(e)}In.mirror=vn;In.takeFullSnapshot=F1;function G1(e,t){try{return e?e(t):new Cl}catch{return console.warn("Unable to initialize CanvasManager"),new Cl}}var uS;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(uS||(uS={}));var H1=3,q1=5;function Um(e){return e>9999999999?e:e*1e3}function em(e){return e>9999999999?e/1e3:e}function fa(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:ne.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:he(t,10,1e3)}}),t.category==="console")))}var W1="button,a";function YS(e){return e.closest(W1)||e}function zS(e){let t=jS(e);return!t||!(t instanceof Element)?t:YS(t)}function jS(e){return Y1(e)?e.target:e}function Y1(e){return He(e)&&"target"in e}var Br;function z1(e){return Br||(Br=[],j1()),Br.push(e),()=>{let t=Br?Br.indexOf(e):-1;t>-1&&Br.splice(t,1)}}function j1(){ye(Ae,"open",function(e){return function(...t){if(Br)try{Br.forEach(n=>n())}catch{}return e.apply(Ae,t)}})}var $1=new Set([V.Mutation,V.StyleSheetRule,V.StyleDeclaration,V.AdoptedStyleSheet,V.CanvasMutation,V.Selection,V.MediaInteraction]);function V1(e,t,n){e.handleClick(t,n)}var ym=class{constructor(t,n,r=fa){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=z1(()=>{this._lastMutation=dS()});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(J1(n,this._ignoreSelector)||!X1(t))return;let r={timestamp:em(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(i=>i.node===r.node&&Math.abs(i.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=em(t)}registerScroll(t=Date.now()){this._lastScroll=em(t)}registerClick(t){let n=YS(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=dS();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 i=this._clicks.indexOf(r);i>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(i,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){let n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,i=t.mutationAfter&&t.mutationAfter<=this._threshold,o=!r&&!i,{clickCount:s,clickBreadcrumb:a}=t;if(o){let c=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,l=c<this._timeout*1e3?"mutation":"timeout",u={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:Ae.location.href,route:n.getCurrentRoute(),timeAfterClickMs:c,endReason:l,clickCount:s||1}};this._addBreadcrumbEvent(n,u);return}if(s>1){let c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...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=Ii(()=>this._checkClicks(),1e3)}},K1=["A","BUTTON","INPUT"];function J1(e,t){return!!(!K1.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 X1(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function dS(){return Date.now()/1e3}
498function Q1(e,t){try{if(!Z1(t))return;let{source:n}=t.data;if($1.has(n)&&e.registerMutation(t.timestamp),n===V.Scroll&&e.registerScroll(t.timestamp),ew(t)){let{type:r,id:i}=t.data,o=In.mirror.getNode(i);o instanceof HTMLElement&&r===bt.Click&&e.registerClick(o)}}catch{}}function Z1(e){return e.type===H1}function ew(e){return e.data.source===V.MouseInteraction}function Hn(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var zl=(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))(zl||{}),tw=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function nw(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(tw.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}var rw=e=>t=>{if(!e.isEnabled())return;let n=iw(t);if(!n)return;let r=t.name==="click",i=r?t.event:void 0;r&&e.clickDetector&&i?.target&&!i.altKey&&!i.metaKey&&!i.ctrlKey&&!i.shiftKey&&V1(e.clickDetector,n,zS(t.event)),fa(e,n)};function $S(e,t){let n=In.mirror.getId(e),r=n&&In.mirror.getNode(n),i=r&&In.mirror.getMeta(r),o=i&&sw(i)?i:null;return{message:t,data:o?{nodeId:n,node:{id:n,tagName:o.tagName,textContent:Array.from(o.childNodes).map(s=>s.type===zl.Text&&s.textContent).filter(Boolean).map(s=>s.trim()).join(""),attributes:nw(o.attributes)}}:{}}}function iw(e){let{target:t,message:n}=ow(e);return Hn({category:`ui.${e.name}`,...$S(t,n)})}function ow(e){let t=e.name==="click",n,r=null;try{r=t?zS(e.event):jS(e.event),n=be(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function sw(e){return e.type===zl.Element}function aw(e,t){if(!e.isEnabled())return;e.updateUserActivity();let n=cw(t);n&&fa(e,n)}function cw(e){let{metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:o,target:s}=e;if(!s||lw(s)||!o)return null;let a=t||r||i,c=o.length===1;if(!a&&c)return null;let l=be(s,{maxStringLength:200})||"<unknown>",u=$S(s,l);return Hn({category:"ui.keyDown",message:l,data:{...u.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:o}})}function lw(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}var pw={resource:gw,paint:mw,navigation:fw};function tm(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}function uw(e){return e.map(dw).filter(Boolean)}function dw(e){let t=pw[e.entryType];return t?t(e):null}function Do(e){return((le()||Ae.performance.timeOrigin)+e)/1e3}function mw(e){let{duration:t,entryType:n,name:r,startTime:i}=e,o=Do(i);return{type:n,name:r,start:o,end:o+t,data:void 0}}function fw(e){let{entryType:t,name:n,decodedBodySize:r,duration:i,domComplete:o,encodedBodySize:s,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:p,redirectCount:m,startTime:d,transferSize:f,type:_}=e;return i===0?null:{type:`${t}.${_}`,start:Do(d),end:Do(o),name:n,data:{size:f,decodedBodySize:r,encodedBodySize:s,duration:i,domInteractive:l,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:p,domComplete:o,redirectCount:m}}}function gw(e){let{entryType:t,initiatorType:n,name:r,responseEnd:i,startTime:o,decodedBodySize:s,encodedBodySize:a,responseStatus:c,transferSize:l}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:Do(o),end:Do(i),name:r,data:{size:l,statusCode:c,decodedBodySize:s,encodedBodySize:a}}}function _w(e){let t=e.entries[e.entries.length-1],n=t?.element?[t.element]:void 0;return Dm(e,"largest-contentful-paint",n)}function hw(e){return e.sources!==void 0}function bw(e){let t=[],n=[];for(let r of e.entries)if(hw(r)){let i=[];for(let o of r.sources)if(o.node){n.push(o.node);let s=In.mirror.getId(o.node);s&&i.push(s)}t.push({value:r.value,nodeIds:i.length?i:void 0})}return Dm(e,"cumulative-layout-shift",n,t)}function yw(e){let t=e.entries[e.entries.length-1],n=t?.target?[t.target]:void 0;return Dm(e,"interaction-to-next-paint",n)}function Dm(e,t,n,r){let i=e.value,o=e.rating,s=Do(i);return{type:"web-vital",name:t,start:s,end:s,data:{value:i,size:i,rating:o,nodeIds:n?n.map(a=>In.mirror.getId(a)):void 0,attributions:r}}}function Sw(e){function t(i){e.performanceEntries.includes(i)||e.performanceEntries.push(i)}function n({entries:i}
498){i.forEach(t)}let r=[];return["navigation","paint","resource"].forEach(i=>{r.push(xt(i,n))}),r.push(cr(tm(_w,e)),ar(tm(bw,e)),yi(tm(yw,e))),()=>{r.forEach(i=>i())}}var j=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ew='
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 Tw(){let e=new Blob([Ew],{type:"text/javascript"});return URL.createObjectURL(e)}var mS=["log","warn","error"],Rl="[Replay] ";function nm(e,t="info"){_t({category:"console",data:{logger:"replay"},level:t,message:`${Rl}${e}`},{level:t})}function vw(){let e=!1,t=!1,n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return j?(mS.forEach(r=>{n[r]=(...i)=>{g[r](Rl,...i),t&&nm(i.join(""),rr(r))}}),n.exception=(r,...i)=>{i.length&&n.error&&n.error(...i),g.error(Rl,r),e?X(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&nm(r,"error")},n.infoTick=(...r)=>{g.log(Rl,...r),t&&setTimeout(()=>nm(r[0]),0)}):mS.forEach(r=>{n[r]=()=>{}}),n}var $=vw(),pa=class extends Error{constructor(){super(`Event buffer exceeded maximum size of ${xm}.`)}},Pl=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>xm)throw new pa;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=null;for(let{timestamp:n}of this.events)(t===null||n<t)&&(t=n);return t===null?t:Um(t)}},Sm=class{constructor(t){this._onMessage=({data:n})=>{let r=n;if(typeof r.id!="number")return;let i=this._pending.get(r.id);if(!(!i||i.method!==r.method)){if(this._pending.delete(r.id),!r.success){j&&$.error("Error in compression worker: ",r.response),i.reject(new Error("Error in compression worker"));return}i.resolve(r.response)}},this._worker=t,this._id=0,this._pending=new Map,this._worker.addEventListener("message",this._onMessage)}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():(j&&$.warn("Received worker message with unsuccessful status",r),n(new Error("Received worker message with unsuccessful status")))},{once:!0}),this._worker.addEventListener("error",r=>{j&&$.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(){j&&$.log("Destroying compression worker"),this._worker.removeEventListener("message",this._onMessage),this._pending.forEach(t=>t.reject(new Error("Worker destroyed"))),this._pending.clear(),this._worker.terminate()}postMessage(t,n){let r=this._getAndIncrementId();return new Promise((i,o)=>{this._pending.set(r,{method:t,resolve:i,reject:o});try{this._worker.postMessage({id:r,method:t,arg:n})}catch(s){this._pending.delete(r),o(s)}})}_getAndIncrementId(){return this._id++}},Em=class{constructor(t){this._worker=new Sm(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=Um(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);let r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>xm?Promise.reject(new pa):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{j&&$.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}},Tm=class{constructor(t){this._fallback=new Pl,this._compression=new Em(t),this._used=this._fallback,this._ensureWorkerIsLoadedProm
498ise=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()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){j&&$.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,i=[];for(let o of t)i.push(this._compression.addEvent(o));this._compression.hasCheckout=n,this._compression.waitForCheckout=r,this._used=this._compression;try{await Promise.all(i),this._fallback.clear()}catch(o){j&&$.exception(o,"Failed to add events when switching buffers.")}}};function Iw({useCompression:e,workerUrl:t}){if(e&&window.Worker){let n=Aw(t);if(n)return n}return j&&$.log("Using simple buffer"),new Pl}function Aw(e){try{let t=e||Rw();if(!t)return;j&&$.log(`Using compression worker${e?` from ${e}`:""}`);let n=new Worker(t);return new Tm(n)}catch(t){j&&$.exception(t,"Failed to create compression worker")}}function Rw(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?Tw():""}function Bm(){try{return"sessionStorage"in Ae&&!!Ae.sessionStorage}catch{return!1}}function Ow(e){Nw(),e.session=void 0}function Nw(){if(Bm())try{Ae.sessionStorage.removeItem(Nm)}catch{}}function VS(e){return e===void 0?!1:Math.random()<e}function jl(e){if(Bm())try{Ae.sessionStorage.setItem(Nm,JSON.stringify(e))}catch{}}function KS(e){let t=Date.now(),n=e.id||fe(),r=e.started||t,i=e.lastActivity||t,o=e.segmentId||0,s=e.sampled,a=e.previousSessionId,c=e.dirty||!1;return{id:n,started:r,lastActivity:i,segmentId:o,sampled:s,previousSessionId:a,dirty:c}}function kw(e,t){return VS(e)?"session":t?"buffer":!1}function fS({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){let i=kw(e,t),o=KS({sampled:i,previousSessionId:r});return n&&jl(o),o}function xw(){if(!Bm())return null;try{let e=Ae.sessionStorage.getItem(Nm);if(!e)return null;let t=JSON.parse(e);return j&&$.infoTick("Loading existing session"),KS(t)}catch{return null}}function vm(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function ww(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return vm(e.started,t,r)||vm(e.lastActivity,n,r)}function Ul(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!ww(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function rm({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){let i=r.stickySession&&xw();return i?Ul(i,{sessionIdleExpire:e,maxReplayDuration:t})?(j&&$.infoTick("Session in sessionStorage is expired, creating new one..."),fS(r,{previousSessionId:i.id})):i:(j&&$.infoTick("Creating new session"),fS(r,{previousSessionId:n}))}function Cw(e){return e.type===ne.Custom}function Fm(e,t,n){return XS(e,t)?(JS(e,t,n),!0):!1}function Mw(e,t,n){return XS(e,t)?JS(e,t,n):Promise.resolve(null)}async function JS(e,t,n){let{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;let i=e.recordingMode==="buffer";try{n&&i&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);let o=e.getOptions(),s=Lw(t,o.beforeAddRecordingEvent);return s?await r.addEvent(s):void 0}catch(o){if(!e.isEnabled())return e.handleException(o),null;let s=o&&o instanceof pa,a=s?"eventBufferOverflow":"eventBufferError",c=T();if(c){let l=s?"buffer_overflow":"internal_sdk_error";c.recordDroppedEvent(l,"replay")}if(s&&i)return r.clear(),r.waitForCheckout=!0,null;e.handleException(o),await e.stop({reason:a})}}
498function XS(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;let n=Um(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(j&&$.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function Lw(e,t){try{if(typeof t=="function"&&Cw(e))return t(e)}catch(n){return j&&$.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}var gS=100;function QS(e,t,n){let r=e.getContext();t&&r.traceIds.size<gS&&r.traceIds.add(t),n&&r.segmentNames.size<gS&&r.segmentNames.add(n)}function Pw(e){return t=>{e.isEnabled()&&QS(e,t.trace_id,t.name||void 0)}}function Gm(e){return!e.type}function Im(e){return e.type==="transaction"}function Uw(e){return e.type==="replay_event"}function _S(e){return e.type==="feedback"}function Dw(e){return(t,n)=>{if(!e.isEnabled()||!Gm(t)&&!Im(t))return;let r=n.statusCode;if(!(!r||r<200||r>=300)){if(Im(t)){Bw(e,t);return}Fw(e,t)}}}function Bw(e,t){QS(e,t.contexts?.trace?.trace_id,t.transaction)}function Fw(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)||Ii(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(i){e.handleException(i)}})}function Gw(e){return t=>{!e.isEnabled()||!Gm(t)||Hw(e,t)}}function Hw(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=Hn({category:"replay.hydrate-error",data:{url:rt()}});fa(e,r)}}function qw(e){let t=T();t&&t.on("beforeAddBreadcrumb",n=>Ww(e,n))}function Ww(e,t){if(!e.isEnabled()||!ZS(t))return;let n=Yw(t);n&&fa(e,n)}function Yw(e){return!ZS(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?zw(e):Hn(e)}function zw(e){let t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return Hn(e);let n=!1,r=t.map(i=>{if(!i)return i;if(typeof i=="string")return i.length>Tl?(n=!0,`${i.slice(0,Tl)}\u2026`):i;if(typeof i=="object")try{let o=he(i,7);return JSON.stringify(o).length>Tl?(n=!0,`${JSON.stringify(o,null,2).slice(0,Tl)}\u2026`):o}catch{}return i});return Hn({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function ZS(e){return!!e.category}function jw(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function Dl(){let e=k().getPropagationContext().dsc;e&&delete e.replay_id;let t=re();if(t){let n=Pe(t);delete n.replay_id}}function hS(e){let t=k().getPropagationContext().dsc;t&&(t.replay_id=e);let n=re();if(n){let r=Pe(n);r.replay_id=e}}function $w(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:ne.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 Vw(e,t){return e.recordingMode!=="buffer"||t.message===km||!t.exception||t.type?!1:VS(e.getOptions().errorSampleRate)}function Kw(e){return Object.assign((t,n)=>{if(e.session&&Ul(e.session,{maxReplayDuration:e.getOptions().maxReplayDuration,sessionIdleExpire:e.timeouts.sessionIdleExpire})&&Dl(),!e.isEnabled()||e.isPaused())return t;if(Uw(t))return delete t.breadcrumbs,t;if(!Gm(t)&&!Im(t)&&!_S(t))return t;if(!e.checkAndHandleExpiredSession())return Dl(),t;if(_S(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),$w(e,t),t;if(jw(t,n)&&!e.getOptions()._experiments.captureExceptions)return j&&$.log("Ignoring error from rrweb internals",t),null;let i=Vw(e,t);if((i||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),i&&e.recordingMode==="buffer"&&e.session?.sampled==="buffer"){let s=e.session;s.dirty=!0,e.getOptions().stickySession&&jl(s)}return t},{id:"Replay"})}function $l(e,t){return t.map(({type:n,start:r,end:i,name:o,data:s})=>{let a=e.throttledAddEvent({type:ne.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:o,startTimestamp:r,endTimestamp:i,data:s}}});
498return typeof a=="string"?Promise.resolve(null):a})}function Jw(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 Xw(e){return t=>{if(!e.isEnabled())return;let n=Jw(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>($l(e,[n]),!1)))}}function Qw(e,t){return j&&e.getOptions()._experiments.traceInternals?!1:Qi(t,T())}function eE(e,t){e.isEnabled()&&t!==null&&(Qw(e,t.name)||e.addUpdate(()=>($l(e,[t]),!0)))}function Vl(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=bl(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function tE(e){if(!e)return;let t=parseInt(e,10);return isNaN(t)?void 0:t}function Bl(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};let n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function nE(e,t){if(!t)return null;let{startTimestamp:n,endTimestamp:r,url:i,method:o,statusCode:s,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:i,data:{method:o,statusCode:s,request:a,response:c}}}function ua(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Fr(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:i,warnings:o}=Zw(n);return r.body=i,o?.length&&(r._meta={warnings:o}),r}function Am(e,t){return Object.entries(e).reduce((n,[r,i])=>{let o=r.toLowerCase();return t.includes(o)&&e[r]&&(n[o]=i),n},{})}function Zw(e){if(!e||typeof e!="string")return{body:e};let t=e.length>Jy,n=eC(e);if(t){let r=e.slice(0,Jy);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 eC(e){let t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function Fl(e,t){let n=tC(e);return We(n,t)}function tC(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}async function nC(e,t,n){try{let r=await iC(e,t,n),i=nE("resource.fetch",r);eE(n.replay,i)}catch(r){j&&$.exception(r,"Failed to capture fetch breadcrumb")}}function rC(e,t){let{input:n,response:r}=t,i=n?Ro(n):void 0,o=Vl(i),s=r?tE(r.headers.get("content-length")):void 0;o!==void 0&&(e.data.request_body_size=o),s!==void 0&&(e.data.response_body_size=s)}async function iC(e,t,n){let r=Date.now(),{startTimestamp:i=r,endTimestamp:o=r}=t,{url:s,method:a,status_code:c=0,request_body_size:l,response_body_size:u}=e.data,p=Fl(s,n.networkDetailAllowUrls)&&!Fl(s,n.networkDetailDenyUrls),m=p?oC(n,t.input,l):ua(l),d=await sC(p,n,t.response,u);return{startTimestamp:i,endTimestamp:o,url:s,method:a,statusCode:c,request:m,response:d}}function oC({networkCaptureBodies:e,networkRequestHeaders:t},n,r){let i=n?lC(n,t):{};if(!e)return Fr(i,r,void 0);let o=Ro(n),[s,a]=Ri(o,$),c=Fr(i,r,s);return a?Bl(c,a):c}async function sC(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,i){if(!e&&i!==void 0)return ua(i);let o=r?rE(r.headers,n):{};if(!r||!t&&i!==void 0)return Fr(o,i,void 0);let[s,a]=await cC(r),c=aC(s,{networkCaptureBodies:t,responseBodySize:i,captureDetails:e,headers:o});return a?Bl(c,a):c}function aC(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:i}){try{let o=e?.length&&n===void 0?Vl(e):n;return r?t?Fr(i,o,e):Fr(i,o,void 0):ua(o)}catch(o){return j&&$.exception(o,"Failed to serialize response body"),Fr(i,n,void 0)}}async function cC(e){let t=pC(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await uC(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(j&&$.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(j&&$.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function rE(e,t){let n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}
498function lC(e,t){return e.length===1&&typeof e[0]!="string"?bS(e[0],t):e.length===2?bS(e[1],t):{}}function bS(e,t){if(!e)return{};let n=e.headers;return n?n instanceof Headers?rE(n,t):Array.isArray(n)?{}:Am(n,t):{}}function pC(e){try{return e.clone()}catch(t){j&&$.exception(t,"Failed to clone response body")}}function uC(e){return new Promise((t,n)=>{let r=Ii(()=>n(new Error("Timeout while trying to read response body")),500);dC(e).then(i=>t(i),i=>n(i)).finally(()=>clearTimeout(r))})}async function dC(e){return await e.text()}async function mC(e,t,n){try{let r=gC(e,t,n),i=nE("resource.xhr",r);eE(n.replay,i)}catch(r){j&&$.exception(r,"Failed to capture xhr breadcrumb")}}function fC(e,t){let{xhr:n,input:r}=t;if(!n)return;let i=Vl(r),o=n.getResponseHeader("content-length")?tE(n.getResponseHeader("content-length")):bC(n.response,n.responseType);i!==void 0&&(e.data.request_body_size=i),o!==void 0&&(e.data.response_body_size=o)}function gC(e,t,n){let r=Date.now(),{startTimestamp:i=r,endTimestamp:o=r,input:s,xhr:a}=t,{url:c,method:l,status_code:u=0,request_body_size:p,response_body_size:m}=e.data;if(!c)return null;if(!a||!Fl(c,n.networkDetailAllowUrls)||Fl(c,n.networkDetailDenyUrls)){let L=ua(p),y=ua(m);return{startTimestamp:i,endTimestamp:o,url:c,method:l,statusCode:u,request:L,response:y}}let d=a[ht],f=d?Am(d.request_headers,n.networkRequestHeaders):{},_=Am(Qs(a),n.networkResponseHeaders),[h,b]=n.networkCaptureBodies?Ri(s,$):[void 0],[S,N]=n.networkCaptureBodies?_C(a):[void 0],I=Fr(f,p,h),C=Fr(_,m,S);return{startTimestamp:i,endTimestamp:o,url:c,method:l,statusCode:u,request:b?Bl(I,b):I,response:N?Bl(C,N):C}}function _C(e){let t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return hC(e.response,e.responseType)}catch(n){t.push(n)}return j&&$.warn("Failed to get xhr response body",...t),[void 0]}function hC(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&He(e))return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return j&&$.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return j&&$.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function bC(e,t){try{let n=t==="json"&&He(e)?JSON.stringify(e):e;return Vl(n)}catch{return}}function yC(e){let t=T();try{let{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:s}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:s};t&&t.on("beforeAddBreadcrumb",(c,l)=>SC(a,c,l))}catch{}}function SC(e,t,n){if(t.data)try{EC(t)&&vC(n)&&(fC(t,n),mC(t,n,e)),TC(t)&&IC(n)&&(rC(t,n),nC(t,n,e))}catch(r){j&&$.exception(r,"Error when enriching network breadcrumb")}}function EC(e){return e.category==="xhr"}function TC(e){return e.category==="fetch"}function vC(e){return e?.xhr}function IC(e){return e?.input!==void 0}function AC(e){let t=T();Xs(rw(e)),pr(Xw(e)),qw(e),yC(e);let n=Kw(e);Is(n),t&&(t.on("beforeSendEvent",Gw(e)),t.on("afterSendEvent",Dw(e)),t.on("createDsc",r=>{let i=e.getSessionId();i&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(r.replay_id=i)}),t.on("processSegmentSpan",Pw(e)),t.on("spanStart",r=>{e.lastActiveSpan=r}),t.on("spanEnd",r=>{e.lastActiveSpan=r}),t.on("beforeSendFeedback",async(r,i)=>{let o=e.getSessionId();i?.includeReplay&&e.isEnabled()&&o&&r.contexts?.feedback&&(r.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),r.contexts.feedback.replay_id=o)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}async function RC(e){try{return Promise.all($l(e,[OC(Ae.performance.memory)]))}catch{return[]}}function OC(e){let{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,i=Date.now()/1e3;return{type:"memory",name:"memory",start:i,end:i,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function NC(e,t,n){return Dp(e,t,{...n,setTimeoutImpl:Ii})}var Al=R.navigator;function kC(){return/iPhone|iPad|iPod/i.test(Al?.userAgent??"")||/Macintosh/i.test(Al?.userAgent??"")&&Al?.maxTouchPoints&&Al?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function xC(e){let t=!1;return(n,r)=>{try{if(!e.checkAndHandleExpiredSession()){j&&$.warn("Received replay event after session expired.");return}let i=r||!t;t=!0,wC(n),e.clickDetector&&Q1(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&i&&e.setInitialState(),!Fm(e,n,i)
498)return!0;if(!i)return!1;let o=e.session;if(MC(e,i),e.recordingMode==="buffer"&&o&&e.eventBuffer&&!o.dirty){let s=e.eventBuffer.getEarliestTimestamp();s&&(j&&$.log(`Updating session start time to earliest event in buffer to ${new Date(s)}`),o.started=s,e.getOptions().stickySession&&jl(o))}return o?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}catch(i){e.handleException(i)}}}function wC(e){let t=e.data;if(!(e.type!==ne.IncrementalSnapshot||!t||typeof t!="object"||!("source"in t)||t.source!==V.Mutation||!("attributes"in t)||!Array.isArray(t.attributes)))for(let n of t.attributes){let r=In.mirror.getNode(n.id),i=r&&In.mirror.getMeta(r);if(i?.type===zl.Element)for(let[o,s]of Object.entries(n.attributes))s===null?delete i.attributes[o]:i.attributes[o]=s}}function CC(e){let t=e.getOptions();return{type:ne.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 MC(e,t){!t||e.session?.segmentId!==0||Fm(e,CC(e),!1)}function LC(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function PC(e,t,n,r){return xe(Wi(e,hn(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function UC({recordingData:e,headers:t}){let n,r=`${JSON.stringify(t)}
499`;if(typeof e=="string")n=`${r}${e}`;else{let o=new TextEncoder().encode(r);n=new Uint8Array(o.length+e.length),n.set(o),n.set(e,o.length)}return n}async function DC({client:e,scope:t,replayId:n,event:r}){let i=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,o={event_id:n,integrations:i};e.emit("preprocessEvent",r,o);let s=await ys(e.getOptions(),r,o,t,e,Z());if(!s)return null;e.emit("postprocessEvent",s,o),s.platform=s.platform||"javascript";let a=e.getSdkMetadata(),{name:c,version:l,settings:u}=a?.sdk||{};return s.sdk={...s.sdk,name:c||"sentry.javascript.unknown",version:l||"0.0.0",settings:u},s}async function BC({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:i,session:o}){let s=UC({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:l,segmentNames:u,initialTimestamp:p}=r,m=T(),d=k(),f=m?.getTransport(),_=m?.getDsn();if(!m||!f||!_||!o.sampled)return Promise.resolve({});let h={type:Ix,replay_start_timestamp:p/1e3,timestamp:i/1e3,error_ids:c,trace_ids:l,segment_names:u,urls:a,replay_id:t,segment_id:n,replay_type:o.sampled},b=await DC({scope:d,client:m,replayId:t,event:h});if(!b)return m.recordDroppedEvent("event_processor","replay"),j&&$.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete b.sdkProcessingMetadata;let S=PC(b,s,_,m.getOptions().tunnel),N;try{N=await f.send(S)}catch(C){let L=new Error(km);try{L.cause=C}catch{}throw L}let I=Ns({},N);if(Os(I,"replay"))throw new da(I);if(typeof N.statusCode=="number"&&(N.statusCode<200||N.statusCode>=300))throw new Gl(N.statusCode);return N}var Gl=class extends Error{constructor(t){super(`Transport returned status code ${t}`)}},da=class extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}},Hl=class extends Error{constructor(){super("Session is too long, not sending replay")}};async function iE(e,t={count:0,interval:xx}){let{recordingData:n,onError:r}=e;if(n.length)try{return await BC(e),!0}catch(i){if(i instanceof Gl||i instanceof da)throw i;if(Es("Replays",{_retryCount:t.count}),r&&r(i),t.count>=wx){let o=new Error(`${km} - max retries exceeded`);try{o.cause=i}catch{}throw o}return t.interval*=++t.count,new Promise((o,s)=>{Ii(async()=>{try{await iE(e,t),o(!0)}catch(a){s(a)}},t.interval)})}}var oE="__THROTTLED",FC="__SKIPPED";
499function GC(e,t,n){let r=new Map,i=a=>{let c=a-n;r.forEach((l,u)=>{u<c&&r.delete(u)})},o=()=>[...r.values()].reduce((a,c)=>a+c,0),s=!1;return(...a)=>{let c=Math.floor(Date.now()/1e3);if(i(c),o()>=t){let u=s;return s=!0,u?FC:oE}s=!1;let l=r.get(c)||0;return r.set(c,l+1),e(...a)}}var Rm=class{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:Ax,sessionIdleExpire:Rx},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,segmentNames:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=NC(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=GC((s,a)=>Mw(this,s,a),300,5);let{slowClickTimeout:r,slowClickIgnoreSelectors:i}=this.getOptions(),o=r?{threshold:Math.min(Cx,r),timeout:r,scrollTimeout:Mx,ignoreSelector:i?i.join(","):""}:void 0;if(o&&(this.clickDetector=new ym(this,o)),j){let s=t._experiments;$.setConfig({captureExceptions:!!s.captureExceptions,traceInternals:!!s.traceInternals})}this._handleVisibilityChange=()=>{Ae.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{let s=Hn({category:"ui.blur"});this._doChangeToBackgroundTasks(s)},this._handleWindowFocus=()=>{let s=Hn({category:"ui.focus"});this._doChangeToForegroundTasks(s)},this._handleKeyboardEvent=s=>{aw(this,s)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){j&&$.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){let{errorSampleRate:n,sessionSampleRate:r}=this._options,i=n<=0&&r<=0;if(this._requiresManualStart=i,!i){if(this._initializeSessionForSampling(t),!this.session){j&&$.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",j&&$.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){j&&$.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){j&&$.log("Buffering is in progress, call `flush()` to save the replay");return}j&&$.infoTick("Starting replay in session mode"),this._updateUserActivity();let t=rm({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){j&&$.log("Buffering is in progress, call `flush()` to save the replay");return}j&&$.infoTick("Starting replay in buffer mode");let t=rm({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=In({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:kx}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:xC(this),...kC(),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)return;this._isEnabled=!1,this.recordingMode="buffer";let r=n??"manual";T()?.emit("replayEnd",{sessionId:this.session?.id,reason:r});try{j&&$.log(`Stopping Replay triggered by ${r}`),Dl(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,Ow(this)}catch(i){this.handleException(i)}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),j&&$.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),j&&$.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();let n=Date.now();j&&$.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(),hS(this.session.id)),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&&vm(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===oE){let i=Hn({category:"replay.throttled"});this.addUpdate(()=>!Fm(this,{type:q1,timestamp:i.timestamp||0,data:{tag:"breadcrumb",payload:i,metric:!0}}))}return r}getCurrentRoute(){let t=this.lastActiveSpan||re(),n=t&&se(t),i=(n&&P(n).data||{})[Me];if(!(!n||!i||!["route","custom"].includes(i)))return P(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Iw({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.session&&T()?.emit("replayStart",{sessionId:this.session.id,recordingMode:this.recordingMode}),this.startRecording(),this.recordingMode==="session"&&this.session&&hS(this.session.id)}_initializeSessionForSampling(t){let n=this._options.errorSampleRate>0,r=rm({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 Ul(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"sessionExpired"}),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||(AC(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=Sw(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){if(!this.session)return;if(Ul(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})){Dl();return}t&&this._createCustomBreadcrumb(t),this.conditionalFlush()}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){j&&$.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:ne.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=uw(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($l(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.segmentNames.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){let{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;
499let r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){let t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),segmentNames:Array.from(this._context.segmentNames),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){let t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){j&&$.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await RC(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();let n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Hl;let r=this._popEventContext(),i=this.session.segmentId++;this._maybeSaveSession();let o=await this.eventBuffer.finish();await iE({replayId:t,recordingData:o,segmentId:i,eventContext:r,session:this.session,timestamp:n,onError:s=>this.handleException(s)})}catch(n){this.handleException(n),this.stop({reason:"sendError"});let r=T();if(r){let i;n instanceof da?i="ratelimit_backoff":n instanceof Hl?i="invalid":i="send_error",r.recordDroppedEvent(i,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){j&&$.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;let n=this.session.started,i=Date.now()-n;this._debouncedFlush.cancel();let o=i<this._options.minReplayDuration,s=i>this._options.maxReplayDuration+5e3;if(o||s){j&&$.log(`Session duration (${Math.floor(i/1e3)}s) is too ${o?"short":"long"}, not sending replay.`),o&&this._debouncedFlush();return}let a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&j&&$.log("Flushing initial segment without checkout.");let c=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(l){this.handleException(l)}finally{this._flushLock=void 0,c&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&jl(this.session)}_onMutationHandler(t){let{ignoreMutations:n}=this._options._experiments;if(n?.length&&t.some(a=>{let c=LC(a.target),l=n.join(",");return c?.matches(l)}))return!1;let r=t.length,i=this._options.mutationLimit,o=this._options.mutationBreadcrumbLimit,s=i&&r>i;if(r>o||s){let a=Hn({category:"replay.mutations",data:{count:r,limit:s}});this._createCustomBreadcrumb(a)}return s?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}};function ta(e,t){return[...e,...t].join(",")}function HC({mask:e,unmask:t,block:n,unblock:r,ignore:i}){let o=["base","iframe[srcdoc]:not([src])"],s=ta(e,[".sentry-mask","[data-sentry-mask]"]),a=ta(t,[]);return{maskTextSelector:s,unmaskTextSelector:a,blockSelector:ta(n,[".sentry-block","[data-sentry-block]",...o]),unblockSelector:ta(r,[]),ignoreSelector:ta(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function qC({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:i,value:o}){if(i.unmaskTextSelector&&e.matches(i.unmaskTextSelector))return o;let s=n.includes(t),a=r&&t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"");return s||a?o.replace(/[\S]/g,"*"):o}var yS='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',WC=["content-length","content-type","accept"],YC=Symbol.for("sentry__originalRequestBody"),SS=!1,ES=!1;function zC(){if(typeof Request>"u"||ES)return;let e=Request;try{let t=function(n,r){let i=new e(n,r);return r?.body!=null&&(i[YC]=r.body),i};t.prototype=e.prototype,R.Request=t,ES=!0}catch{}}var jC=(e=>new Om(e)),Om=class{constructor({flushMinDelay:t=Ox,flushMaxDelay:n=Nx,minReplayDuration:r=Lx,maxReplayDuration:i=Xy,stickySession:o=!0,useCompression:s=!0,workerUrl:a,_experiments:c={},maskAllText:l=!0,maskAllInputs:u=!0,blockAllMedia:p=!0,mutationBreadcrumbLimit:m=750,mutationLimit:d=1e4,slowClickTimeout:f=7e3,slowClickIgnoreSelectors:_=[],networkDetailAllowUrls:h=[],networkDetailDenyUrls:b=[],networkCaptureBodies:S=!0,networkRequestHeaders:N=[],networkResponseHeaders:I=[],mask:C=[],maskAttributes:L=["title","placeholder","aria-label"],unmask:y=[],block:x=[],unblock:z=[],ignore:A=[],maskFn:U,beforeAddRecordingEvent:w,beforeErrorSampling:D,onError:H,attachRawBodyFromRequest:oe=!1}={}){this.name="Replay";let ae=HC({mask:C,unmask:y,block:x,unblock:z,ignore:A});if(this._recordingOptions={maskAllInputs:u,maskAllText:l,maskInputOptions:{password:!0},maskTextFn:U,maskInputFn:U,maskAttributeFn:(W,M,Y)=>qC({maskAttributes:L,maskAllText:l,privacyOptions:ae,key:W,value:M,el:Y}),...ae,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:W=>{try{W.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!c.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,Px),maxReplayDuration:Math.min(i,Xy),stickySession:o,useCompression:s,workerUrl:a,blockAllMedia:p,maskAllInputs:u,maskAllText:l,mutationBreadcrumbLimit:m,mutationLimit:d,slowClickTimeout:f,slowClickIgnoreSelectors:_,networkDetailAllowUrls:h,networkDetailDenyUrls:b,networkCaptureBodies:S,networkRequestHeaders:TS(N),networkResponseHeaders:TS(I),beforeAddRecordingEvent:w,beforeErrorSampling:D,onError:H,attachRawBodyFromRequest:oe,_experiments:c},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${yS}`:yS,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&lt())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return SS}set _isInitialized(t){SS=t}afterAllSetup(t){!lt()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&zC(),this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}
499startBuffering(){this._replay&&this._replay.startBuffering()}stop(t){return this._replay?this._replay.stop({forceFlush:t?.flush??this._replay.recordingMode==="session",reason:"manual"}):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}processSpan(t){let n=this.getReplayId(!0);n&&(Dt(t,{"sentry.replay_id":n}),this.getRecordingMode()==="buffer"&&Dt(t,{"sentry._internal.replay_is_buffering":!0}))}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){let n=$C(this._initialOptions,t);this._replay=new Rm({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{let n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}};function $C(e,t){let n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},i=Pt(n.replaysSessionSampleRate),o=Pt(n.replaysOnErrorSampleRate);return i==null&&o==null&&je(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),i!=null&&(r.sessionSampleRate=i),o!=null&&(r.errorSampleRate=o),r}function TS(e){return[...WC,...e.map(t=>t.toLowerCase())]}function VC(){return T()?.getIntegrationByName("Replay")}var KC=Object.defineProperty,JC=(e,t,n)=>t in e?KC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sE=(e,t,n)=>JC(e,typeof t!="symbol"?t+"":t,n),qm=class{constructor(){sE(this,"idNodeMap",new Map),sE(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 i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(n,i)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function XC(){return new qm}function QC(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}function Wm(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Wm(e.parentNode,t,n,r+1)}function aE(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(QC(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}var Bo=`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(Bo),-1},getNode(){return console.error(Bo),null},removeNodeFromMap(){console.error(Bo)},has(){return console.error(Bo),!1},reset(){console.error(Bo)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(cE=new Proxy(cE,{get(e,t,n){return t==="map"&&console.error(Bo),Reflect.get(e,t,n)}}));function zm(e,t,n,r,i=window){let o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(s){_E(()=>{n.set.call(this,s)},0),o&&o.set&&o.set.call(this,s)}}),()=>zm(e,t,o||{},!0)}function jm(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}Date.now().toString();function ZC(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Ql(e,t,n,r,i){if(!e)return!1;let o=ZC(e);if(!o)return!1;let s=aE(t,n);if(!i){let l=r&&o.matches(r);return s(o)&&!l}let a=Wm(o,s),c=-1;return a<0?!1:(r&&(c=Wm(o,aE(null,r))),a>-1&&c<0?!0:a<c)}var lE={};function gE(e){let t=lE[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement=="function")try{let i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);let o=i.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(i)}catch{}return lE[e]=r.bind(window)}function Ni(...e){return gE("requestAnimationFrame")(...e)}
501function _E(...e){return gE("setTimeout")(...e)}var Go=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Go||{}),Jl;function eM(e){Jl=e}var Hm=e=>Jl?((...n)=>{try{return e(...n)}catch(r){if(Jl&&Jl(r)===!0)return()=>{};throw r}}):e,Fo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",tM=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(ga=0;ga<Fo.length;ga++)tM[Fo.charCodeAt(ga)]=ga;var ga,nM=function(e){var t=new Uint8Array(e),n,r=t.length,i="";for(n=0;n<r;n+=3)i+=Fo[t[n]>>2],i+=Fo[(t[n]&3)<<4|t[n+1]>>4],i+=Fo[(t[n+1]&15)<<2|t[n+2]>>6],i+=Fo[t[n+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i},pE=new Map;function rM(e,t){let n=pE.get(e);return n||(n=new Map,pE.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}var hE=(e,t,n)=>{if(!e||!(yE(e,t)||typeof e=="object"))return;let r=e.constructor.name,i=rM(n,r),o=i.indexOf(e);return o===-1&&(o=i.length,i.push(e)),o};function Xl(e,t,n){if(e instanceof Array)return e.map(r=>Xl(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,i=nM(e);return{rr_type:r,base64:i}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Xl(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let r=e.constructor.name,{src:i}=e;return{rr_type:r,src:i}}else if(e instanceof HTMLCanvasElement){let r="HTMLImageElement",i=e.toDataURL();return{rr_type:r,src:i}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Xl(e.data,t,n),e.width,e.height]};if(yE(e,t)||typeof e=="object"){let r=e.constructor.name,i=hE(e,t,n);return{rr_type:r,index:i}}}}return e}var bE=(e,t,n)=>e.map(r=>Xl(r,t,n)),yE=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof t[i]=="function").find(i=>e instanceof t[i]);function iM(e,t,n,r,i){let o=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let a of s)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;let c=jm(t.CanvasRenderingContext2D.prototype,a,function(l){return function(...u){return Ql(this.canvas,n,r,i,!0)||_E(()=>{let p=bE(u,t,this);e(this.canvas,{type:Go["2D"],property:a,args:p})},0),l.apply(this,u)}});o.push(c)}catch{let c=zm(t.CanvasRenderingContext2D.prototype,a,{set(l){e(this.canvas,{type:Go["2D"],property:a,args:[l],setter:!0})}});o.push(c)}return()=>{o.forEach(a=>a())}}function oM(e){return e==="experimental-webgl"?"webgl":e}function uE(e,t,n,r,i){let o=[];try{let s=jm(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(c,...l){if(!Ql(this,t,n,r,!0)){let u=oM(c);if("__context"in this||(this.__context=u),i&&["webgl","webgl2"].includes(u))if(l[0]&&typeof l[0]=="object"){let p=l[0];p.preserveDrawingBuffer||(p.preserveDrawingBuffer=!0)}else l.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[c,...l])}});o.push(s)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach(s=>s())}}function dE(e,t,n,r,i,o,s,a){let c=[],l=Object.getOwnPropertyNames(e);for(let u of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(u))try{if(typeof e[u]!="function")continue;let p=jm(e,u,function(m){return function(...d){let f=m.apply(this,d);if(hE(f,a,this),"tagName"in this.canvas&&!Ql(this.canvas,r,i,o,!0)){let _=bE(d,a,this),h={type:t,property:u,args:_};n(this.canvas,h)}return f}});c.push(p)}catch{let p=zm(e,u,{set(m){n(this.canvas,{type:t,property:u,args:[m],setter:!0})}});c.push(p)}return c}function sM(e,t,n,r,i,o){let s=[];return s.push(...dE(t.WebGLRenderingContext.prototype,Go.WebGL,e,n,r,i,o,t)),typeof t.WebGL2RenderingContext<"u"&&s.push(...dE(t.WebGL2RenderingContext.prototype,Go.WebGL2,e,n,r,i,o,t)),()=>
501{s.forEach(a=>a())}}var aM='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 cM(){let e=new Blob([aM]);return URL.createObjectURL(e)}var Ym=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:i,recordCanvas:o,errorHandler:s}=t;t.sampling=r,this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.options=t,s&&eM(s),(o&&typeof r=="number"||n)&&(this.worker=this.initFPSWorker()),this.addWindow(i),!n&&Hm(()=>{o&&r==="all"&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),o&&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:i,unblockSelector:o,recordCanvas:s,enableManualSnapshot:a}=this.options;if(!this.windowsSet.has(t)){if(a){this.windowsSet.add(t),this.windows.push(new WeakRef(t));return}Hm(()=>{if(s&&n==="all"&&this.initCanvasMutationObserver(t,r,i,o),s&&typeof n=="number"){let c=uE(t,r,i,o,!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}Ni(r=>this.takeSnapshot(r,!0,t))}initFPSWorker(){let t=new Worker(cM());return t.onmessage=n=>{let r=n.data,{id:i}=r;if(this.snapshotInProgressMap.set(i,!1),!("base64"in r))return;let{base64:o,type:s,width:a,height:c}=r;this.mutationCb({id:i,type:Go["2D"],commands:[{property:"clearRect",args:[0,0,a,c]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:o}],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=Ni(n)};t=Ni(n),this.restoreHandlers.push(()=>{t&&cancelAnimationFrame(t)})}initCanvasMutationObserver(t,n,r,i){let o=uE(t,n,r,i,!1),s=iM(this.processMutation.bind(this),t,n,r,i),a=sM(this.processMutation.bind(this),t,n,r,i,this.mirror);this.restoreHandlers.push(()=>{o(),s(),a()})}getCanvasElements(t,n,r){let i=[],o=s=>{s.querySelectorAll("canvas").forEach(a=>{Ql(a,t,n,r,!0)||i.push(a)})};for(let s of this.windows){let a=s.deref(),c;try{c=a&&a.document}catch{}c&&o(c)}for(let s of this.shadowDoms){let a=s.deref();a&&o(a)}return i}takeSnapshot(t,n,r){let{sampling:i,blockClass:o,blockSelector:s,unblockSelector:a,dataURLOptions:c,maxCanvasSize:l}=this.options,p=1e3/(i==="all"?2:i||2);return this.lastSnapshotTime&&t-this.lastSnapshotTime<p?!1:(this.lastSnapshotTime=t,(r?[r]:this.getCanvasElements(o,s,a)).forEac
501h(f=>{let _=this.mirror.getId(f);if(!(!this.mirror.hasNode(f)||!f.width||!f.height||this.snapshotInProgressMap.get(_))){if(this.snapshotInProgressMap.set(_,!0),!n&&["webgl","webgl2"].includes(f.__context)){let h=f.getContext(f.__context);h?.getContextAttributes()?.preserveDrawingBuffer===!1&&h.clear(h.COLOR_BUFFER_BIT)}createImageBitmap(f).then(h=>{this.worker?.postMessage({id:_,bitmap:h,width:f.width,height:f.height,dataURLOptions:c,maxCanvasSize:l},[h])}).catch(h=>{Hm(()=>{throw this.snapshotInProgressMap.delete(_),h})()})}}),!0)}startPendingCanvasMutationFlusher(){Ni(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let t=n=>{this.rafStamps.latestId=n,Ni(t)};Ni(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{let r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),Ni(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;let i=r.map(s=>{let{type:a,...c}=s;return c}),{type:o}=r[0];this.mutationCb({id:n,type:o,commands:i}),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)}XC();var mE;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(mE||(mE={}));var fE={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}}},lM="ReplayCanvas",Kl=1280,pM=((e={})=>{let[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,Kl):Kl,n?Math.min(n,Kl):Kl]},i,o,s=new Promise(a=>o=a);return{name:lM,getOptions(){let{quality:a,enableManualSnapshot:c,maxCanvasSize:l}=r;return{enableManualSnapshot:c,recordCanvas:!0,getCanvasManager:u=>{let p=new Ym({...u,enableManualSnapshot:c,maxCanvasSize:l,errorHandler:m=>{try{typeof m=="object"&&(m.__rrweb__=!0)}catch{}}});return i=p,o(p),p},...fE[a]||fE.medium}},async snapshot(a,c){(i||await s).snapshot(a,c)}}}),uM=pM;function SE(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function $m(e){try{return new URL(e,O.location.origin).href}catch{return}}function EE(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function Vm(e){try{return new Headers(e)}catch{return}}var Zl={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function Km(e,t){let{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:i,enableHTTPTimings:o,tracePropagationTargets:s,onRequestSpanStart:a,onRequestSpanEnd:c}
501={...Zl,...t},l=typeof i=="function"?i:d=>!0,u=d=>mM(d,s),p={},m=e.getOptions().propagateTraceparent;n&&Dn(d=>{let f=Mu(d,l,u,p,{propagateTraceparent:m,onRequestSpanEnd:c});if(f){let _=$m(d.fetchData.url),h=_?$t(_).host:void 0,b=_?nt(_):void 0;f.setAttributes({[oc]:b,[Ut]:b,"server.address":h}),o&&TE(f,e),a?.(f,{headers:d.headers})}}),r&&Ai(d=>{let f=fM(d,l,u,p,m,c);f&&(o&&TE(f,e),a?.(f,{headers:Vm(d.xhr.__sentry_xhr_v3__?.request_headers)}))})}var dM=300;function TE(e,t){let{url:n}=P(e).data;if(!n||typeof n!="string")return;let r=()=>{setTimeout(i)};if(Ue(t)){let o=e.end.bind(e);e.end=s=>{let a=s??te(),c=!1,l=()=>{c||(c=!0,setTimeout(i),o(a),clearTimeout(u))};r=l;let u=setTimeout(l,dM)}}let i=xt("resource",({entries:o})=>{o.forEach(s=>{EE(s)&&s.name.endsWith(n)&&(e.setAttributes(Ks(s)),r())})})}function mM(e,t){let n=rt();if(n){let r,i;try{r=new URL(e,n),i=new URL(n).origin}catch{return!1}let o=r.origin===i;return t?We(r.toString(),t)||o&&We(r.pathname,t):o}else{let r=!!e.match(/^\/(?!\/)/);return t?We(e,t):r}}function fM(e,t,n,r,i,o){let s=e.xhr,a=s?.[ht];if(!s||s.__sentry_own_request__||!a)return;let{url:c,method:l}=a,u=ke()&&t(c);if(e.endTimestamp){let I=s.__sentry_xhr_span_id__;if(!I)return;let C=r[I];C&&(u&&a.status_code!==void 0&&(Kn(C,a.status_code),C.end(),o?.(C,{headers:Vm(Qs(s)),error:e.error})),delete r[I]);return}let p=$m(c),m=p?$t(p):$t(c),d=p?nt(p):void 0,f=nt(Xi(c)),_=T(),h=!!re(),b=h||!!_&&Ue(_),S=u&&b?Xe({name:`${l} ${f}`,attributes:{url:nt(c),type:"xhr","http.method":l,"http.url":d,[Ut]:d,"server.address":m?.host,[q]:"auto.http.browser",[J]:"http.client",...m?.search&&{"http.query":m?.search},...m?.hash&&{"http.fragment":m?.hash}}}):new It,N=Tr(S)&&h?void 0:S;return u&&!b&&_?.recordDroppedEvent("no_parent_span","span"),s.__sentry_xhr_span_id__=S.spanContext().spanId,r[s.__sentry_xhr_span_id__]=S,n(c)&&gM(s,ke()&&b?N:void 0,i),_&&_.emit("beforeOutgoingRequestSpan",S,e),S}function gM(e,t,n){let{"sentry-trace":r,baggage:i,traceparent:o}=Zi({span:t,propagateTraceparent:n});r&&_M(e,r,i,o)}function _M(e,t,n,r){let i=e.__sentry_xhr_v3__?.request_headers;if(!(i?.["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),r&&!i?.traceparent&&e.setRequestHeader("traceparent",r),n){let o=i?.baggage;(!o||!SE(o))&&e.setRequestHeader("baggage",n)}}catch{}}var vE=new WeakMap,IE=new WeakMap,hM=9e4,bM=["text/event-stream","application/x-ndjson","application/stream+json"],Jm=()=>({name:"FetchStreamPerformance",setup(){jc(e=>{if(e.response){let t=vE.get(e.response);if(t&&e.endTimestamp){t.end(e.endTimestamp);let n=IE.get(e.response);n&&clearTimeout(n)}}}),Dn(e=>{if(e.endTimestamp&&e.response){let t=e.response.headers?.get("content-type")||"";if(e.response.headers?.get("content-length")||!bM.some(c=>t.startsWith(c)))return;let n=e.fetchData?.url||"",r=e.fetchData?.method||"GET",i=yn(n),o=n.startsWith("data:")?nt(n):i?Ji(i):n,s=Xe({name:`${r} ${o}`,startTime:e.endTimestamp,attributes:{url:nt(n),"http.method":r,type:"fetch",[J]:"http.client.stream",[q]:"auto.http.browser.stream"}});vE.set(e.response,s);let a=setTimeout(()=>{s.isRecording()&&s.end()},hM);IE.set(e.response,a)}})}});var Xm="WebVitals",Qm=(e={})=>{let t=new Set(e.ignore??[]);return{name:Xm,setup(n){let r=Ue(n),{enableStandaloneClsSpans:i,enableStandaloneLcpSpans:o}=e._experiments??{},s=r||t.has("cls")?void 0:i||!1,a=r||t.has("lcp")?void 0:o||!1,c=vd({recordClsStandaloneSpans:s,recordLcpStandaloneSpans:a,client:n}),l=new WeakSet;n.on("afterStartPageLoadSpan",u=>{l.add(u)}),n.on("spanEnd",u=>{l.delete(u)&&(c(),Nd(u,{recordClsOnPageloadSpan:s===!1,recordLcpOnPageloadSpan:a===!1,spanStreamingEnabled:r}))}),r?(t.has("lcp")||Ld(n),t.has("cls")||Pd(n),t.has("inp")||Ud()):t.has("inp")||wd()},afterAllSetup(){t.has("inp")||Cd()}}};function AE(){O.document?O.document.addEventListener("visibilitychange",()=>{let e=re();if(!e)return;let t=se(e);if(O.document.hidden&&t){let n="cancelled",{op:r,status:i}=P(t);v&&g.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),i||t.setStatus({code:2,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):v&&g.warn("[Tracing] Could not set up background tab detection due to lack of global document")}var yM=3600,RE="sentry_previous_trace",SM="sentry.previous_trace";function OE(e,{linkPreviousTrace:t,consistentTraceSampling:n}){let r=t==="session-storage",i=r?vM():void 0;e.on("spanStart",s=>{if(se(s)!==s)return;let a=k().getPropagationContext();i=EM(i,s,a),r&&TM(i)});let o=!0;n&&e.on("beforeSampling",s=>{if(!i)return;let a=k(),c=a.getPropagationContext();if(o&&c.parentSpanId){o=!1;return}a.setPropagationContext({...c,dsc:{...c.dsc,sample_rate:String(i.sampleRate),sampled:String(Zm(i.spanContext))},sampleRand:i.sampleRand}),s.parentSampled=Zm(i.spanContext),s.parentSampleRate=i.sampleRate,s.spanAttributes={...s.spanAttributes,[Gi]:i.sampleRate}})}function EM(e,t,n){let r=P(t);function i(){try{let a=Number(r.data?.[$n]??n.dsc?.sample_rate);return Number.isNaN(a)?0:a}catch{return 0}}let o={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:i(),sampleRand:n.sampleRand};if(!e)return o;let s=e.spanContext;return s.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=yM&&(v&&g.log(`Adding previous_trace \`${JSON.stringify(s)}\` link to span \`${JSON.stringify({op:r.op,...t.spanContext()})}\``),t.addLink({context:s,attributes:{[Ga]:"previous_trace"}}),t.setAttribute(SM,`${s.traceId}-${s.spanId}-${Zm(s)?1:0}`)),o)}function TM(e){try{O.sessionStorage.setItem(RE,JSON.stringify(e))}catch(t){v&&g.warn("Could not store previous trace in sessionStorage",t)}}function vM(){try{let e=O.sessionStorage?.getItem(RE);return JSON.parse(e)}catch{return}}function Zm(e){return e.traceFlags===1}var IM="BrowserTracing",AM=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function CE(){let e=O.navigator;return e?.userAgent?AM.test(e.userAgent):!1}var RM={...zi,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroun
501dSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...Zl},OM=((e={})=>{"enableElementTiming"in e&&je(()=>{console.warn("[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.")});let t={name:void 0,source:void 0},n=O.document,{enableInp:r,enableLongTask:i,enableLongAnimationFrame:o,_experiments:{enableInteractions:s,enableStandaloneClsSpans:a,enableStandaloneLcpSpans:c},beforeStartSpan:l,idleTimeout:u,finalTimeout:p,childSpanTimeout:m,markBackgroundSpan:d,traceFetch:f,traceXHR:_,trackFetchStreamPerformance:h,shouldCreateSpanForRequest:b,enableHTTPTimings:S,ignoreResourceSpans:N,ignorePerformanceApiSpans:I,instrumentPageLoad:C,instrumentNavigation:L,detectRedirects:y,linkPreviousTrace:x,consistentTraceSampling:z,enableReportPageLoaded:A,onRequestSpanStart:U,onRequestSpanEnd:w}={...RM,...e},D=CE(),H,oe;function ae(W,M,Y=!0,B){let ee=M.op==="pageload",_e=M.name,ue=l?l(M):M,Ne=yn(B||rt()),Yt={...Ne?.pathname&&{[Tg]:Ne.pathname},...Ne&&!nr(Ne)&&{[Ut]:Ne.href},...ue.attributes};if(_e!==ue.name&&(Yt[Me]="custom"),ue.attributes=Yt,!Y){let an=Tt();Xe({...ue,startTime:an}).end(an);return}t.name=ue.name,t.source=Yt[Me];let sn=rc(ue,{idleTimeout:u,finalTimeout:p,childSpanTimeout:m,disableAutoFinish:ee,beforeSpanEnd:an=>{Od(an,{ignoreResourceSpans:N,ignorePerformanceApiSpans:I,spanStreamingEnabled:Ue(W)}),xE(W,void 0);let Gr=k(),Wn=Gr.getPropagationContext();Gr.setPropagationContext({...Wn,traceId:sn.spanContext().traceId,sampled:tt(sn),dsc:Pe(an)}),ee&&(oe=void 0)},trimIdleSpanEndTimestamp:!A});ee&&A&&(oe=sn),xE(W,sn);function qn(){n&&["interactive","complete"].includes(n.readyState)&&(W.emit("idleSpanEnableAutoFinish",sn),n.removeEventListener("readystatechange",qn))}ee&&!A&&n&&(n.addEventListener("readystatechange",qn),qn())}return{name:IM,setup(W){if(D){v&&g.log("[Tracing] Skipping browserTracingIntegration setup for bot user agent.");return}if(Ja(),o&&R.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes("long-animation-frame")?Ad():i&&Id(),s&&Rd(),y&&n){let Y=()=>{H=te()};addEventListener("click",Y,{capture:!0}),addEventListener("keydown",Y,{capture:!0,passive:!0})}function M(){let Y=_a(W);Y&&!P(Y).timestamp&&(v&&g.log(`[Tracing] Finishing current active span with op: ${P(Y).op}`),Y.setAttribute(Vn,"cancelled"),Y.end())}W.on("startNavigationSpan",(Y,B)=>{if(T()!==W)return;if(B?.isRedirect){v&&g.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),ae(W,{op:"navigation.redirect",...Y},!1,B.url);return}H=void 0,M(),Z().setPropagationContext({traceId:et(),sampleRand:Math.random(),propagationSpanId:ke()?void 0:at()});let ee=k();ee.setPropagationContext({traceId:et(),sampleRand:Math.random(),propagationSpanId:ke()?void 0:at()}),ee.setSDKProcessingMetadata({normalizedRequest:void 0}),ae(W,{op:"navigation",...Y,parentSpan:null,forceTransaction:!0},!0,B?.url)}),W.on("startPageLoadSpan",(Y,B={})=>
501{if(T()!==W)return;M();let ee=B.sentryTrace||NE("sentry-trace")||kE("sentry-trace"),_e=B.baggage||NE("baggage")||kE("baggage"),ue=es(ee,_e),Ne=k();Ne.setPropagationContext(ue),ke()||(Ne.getPropagationContext().propagationSpanId=at()),Ne.setSDKProcessingMetadata({normalizedRequest:ho()}),ae(W,{op:"pageload",...Y})}),W.on("endPageloadSpan",()=>{A&&oe&&(oe.setAttribute(Vn,"reportPageLoaded"),oe.end())})},afterAllSetup(W){if(D)return;W.addIntegration&&!W.getIntegrationByName?.(Xm)&&W.addIntegration(Qm({ignore:r?[]:["inp"],_experiments:{enableStandaloneClsSpans:a,enableStandaloneLcpSpans:c}}));let M=rt();if(x!=="off"&&OE(W,{linkPreviousTrace:x,consistentTraceSampling:z}),O.location){if(C){let Y=le();ME(W,{name:O.location.pathname,startTime:Y?Y/1e3:void 0,attributes:{[Me]:"url",[q]:"auto.pageload.browser"}})}L&&pr(({to:Y,from:B})=>{if(B===void 0&&M?.indexOf(Y)!==-1){M=void 0;return}M=void 0;let ee=yn(Y),_e=_a(W),ue=_e&&y&&kM(_e,H);LE(W,{name:ee?.pathname||O.location.pathname,attributes:{[Me]:"url",[q]:"auto.navigation.browser"}},{url:Y,isRedirect:ue})})}d&&AE(),s&&NM(W,u,p,m,t),Km(W,{traceFetch:f,traceXHR:_,tracePropagationTargets:W.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:b,enableHTTPTimings:S,onRequestSpanStart:U,onRequestSpanEnd:w}),h&&W.addIntegration(Jm())}}});function ME(e,t,n){e.emit("startPageLoadSpan",t,n),k().setTransactionName(t.name);let r=_a(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function LE(e,t,n){let{url:r,isRedirect:i}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:i,url:r}),e.emit("startNavigationSpan",t,{isRedirect:i,url:r});let o=k();return o.setTransactionName(t.name),r&&!i&&o.setSDKProcessingMetadata({normalizedRequest:{...ho(),url:r}}),_a(e)}function NE(e){return O.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function kE(e){return O.performance?.getEntriesByType?.("navigation")[0]?.serverTiming?.find(r=>r.name===e)?.description}function NM(e,t,n,r,i){let o=O.document,s,a=()=>{let c="ui.action.click",l=_a(e);if(l){let u=P(l).op;if(["navigation","pageload"].includes(u)){v&&g.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),!i.name){v&&g.warn(`[Tracing] Did not create ${c} transaction because _latestRouteName is missing.`);return}s=rc({name:i.name,op:c,attributes:{[Me]:i.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};o&&addEventListener("click",a,{capture:!0})}var PE="_sentry_idleSpan";function _a(e){return e[PE]}function xE(e,t){pe(e,PE,t)}var wE=1.5;function kM(e,t){let n=P(e),r=Tt(),i=n.start_timestamp;return!(r-i>wE||t&&r-t<=wE)}function xM(e=T()){e?.emit("endPageloadSpan")}function wM(e){let t=re();if(t===e)return;let n=k();e.end=new Proxy(e.end,{apply(r,i,o){return mt(n,t),Reflect.apply(r,i,o)}}),mt(n,e)}var CM=()=>({name:"SpanStreaming",beforeSetup(e){let t=e.getOptions();t.traceLifecycle||(v&&g.log('[SpanStreaming] setting `traceLifecycle` to "stream"'),t.traceLifecycle="stream")},setup(e){let t="SpanStreaming integration requires",n="Falling back to static trace lifecycle.",r=e.getOptions();if(!Ue(e)){r.traceLifecycle="static",v&&g.warn(`${t} \`traceLifecycle\` to be set to "stream"! ${n}`);return}let i=r.beforeSendSpan;if(i&&!Zn(i)){r.traceLifecycle="static",v&&g.warn(`${t} a beforeSendSpan callback using \`withStreamedSpan\`! ${n}`);return}let o=new Gs(e);e.on("afterSpanEnd",s=>{tt(s)&&o.add(sc(s,e))}),e.on("afterSegmentSpanEnd",s=>{let a=s.spanContext().traceId;setTimeout(()=>{o.flush(a)},500)})}});function Ho(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function MM(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=Ho(n);return i=>r.then(o=>i(o.transaction(t,"readwrite").objectStore(t)))}function ef(e){return Ho(e.getAllKeys())}function LM(e,t,n){return e(r=>ef(r).then(i=>{if(!(i.length>=n))return r.put(t,Math.max(...i,0)+1),Ho(r.transaction)}))}function PM(e,t,n){return e(r=>ef(r).then(i=>{if(!(i.length>=n))return r.put(t,Math.min(...i,0)-1),Ho(r.transaction)}))}function UM(e){return e(t=>ef(t).then(n=>{let r=n[0];if(r!=null)return Ho(t.get(r)).then(i=>(t.delete(r),Ho(t.transaction).then(()=>i)))}))}function DM(e){let t;function n(){return t==null&&(t=MM(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{push:async r=>{try{let i=er(r);await LM(n(),i,e.maxQueueSize||30)}catch{}},unshift:async r=>{try{let i=er(r);await PM(n(),i,e.maxQueueSize||30)}catch{}},shift:async()=>{try{let r=await UM(n());if(r)return Za(r)}catch{}}}}function BM(e){return t=>{let n=e({...t,createStore:DM});return O.addEventListener("online",async r=>{await n.flush()}),n}}function FM(e=Zs){return BM(Eu(e))}var UE=1e6,GM="window"in R&&R.window===R&&typeof importScripts>
501"u",xi=String(0),nf=GM?"main":"worker",ep=O.navigator,BE="",FE="",GE="",tf=ep?.userAgent||"",HE="",HM=ep?.language||ep?.languages?.[0]||"";function qM(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}var DE=ep?.userAgentData;qM(DE)&&DE.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(BE=e.platform||"",GE=e.architecture||"",HE=e.model||"",FE=e.platformVersion||"",e.fullVersionList?.length){let t=e.fullVersionList[e.fullVersionList.length-1];tf=`${t.brand} ${t.version}`}}).catch(e=>{});function WM(e){return!("thread_metadata"in e)}function YM(e){return WM(e)?VM(e):e}function zM(e){let t=e.contexts?.trace?.trace_id;return typeof t=="string"&&t.length!==32&&v&&g.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t!="string"?"":t}function jM(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 i=zM(r),o=YM(n),s=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:te()*1e3),a=typeof r.timestamp=="number"?r.timestamp*1e3:te()*1e3;return{event_id:e,timestamp:new Date(s).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||_n,runtime:{name:"javascript",version:O.navigator.userAgent},os:{name:BE,version:FE,build_number:tf},device:{locale:HM,model:HE,manufacturer:tf,architecture:GE,is_emulator:!1},debug_meta:{images:jE(n.resources)},profile:o,transactions:[{name:r.transaction||"",id:r.event_id||fe(),trace_id:i,active_thread_id:xi,relative_start_ns:"0",relative_end_ns:((a-s)*1e6).toFixed(0)}]}}function qE(e,t,n){if(e==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${e} instead.`);let r=$M(e),i=t.getOptions(),o=t.getSdkMetadata?.()?.sdk;return{chunk_id:fe(),client_sdk:{name:o?.name??"sentry.javascript.browser",version:o?.version??"0.0.0"},profiler_id:n||fe(),platform:"javascript",version:"2",release:i.release??"",environment:i.environment??"production",debug_meta:{images:jE(e.resources)},profile:r}}function WE(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"}:!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 $M(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 l=[],u=c;for(;u;)l.push(u.frameId),u=u.parentId===void 0?void 0:e.stacks[u.parentId];n[a]=l}let r=le(),i=typeof performance.timeOrigin=="number"?performance.timeOrigin:r||0,o=i-(r||i),s=[];for(let a=0;a<e.samples.length;a++){let c=e.samples[a];if(!c)continue;let l=(i+(c.timestamp-o))/1e3;s[a]={stack_id:c.stackId??0,thread_id:xi,timestamp:l}}return{frames:t,stacks:n,samples:s,thread_metadata:{[xi]:{name:nf}}}}function tp(e){return P(e).op==="pageload"}function VM(e){let t,n=0,r={samples:[],stacks:[],frames:[],thread_metadata:{[xi]:{name:nf}}},i=e.samples[0];if(!i)return r;let o=i.timestamp,s=le(),a=typeof performance.timeOrigin=="number"?performance.timeOrigin:s||0,c=a-(s||a);return e.samples.forEach((l,u)=>{if(l.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[u]={elapsed_since_start_ns:((l.timestamp+c-o)*UE).toFixed(0),stack_id:t,thread_id:xi};return}let p=e.stacks[l.stackId],m=[];for(;p;){m.push(p.frameId);let f=e.frames[p.frameId];f&&r.frames[p.frameId]===void 0&&(r.frames[p.frameId]={function:f.name,abs_path:typeof f.resourceId=="number"?e.resources[f.resourceId]:void 0,lineno:f.line,colno:f.column}),p=p.parentId===void 0?void 0:e.stacks[p.parentId]}let d={elapsed_since_start_ns:((l.timestamp+c-o)*UE).toFixed(0),stack_id:n,thread_id:xi};r.stacks[n]=m,r.samples[u]=d,n++}),r}function YE(e,t){if(!t.length)return e;for(let n of t)e[1].push([{type:"profile"},n]);return e}function zE(e){let t=[];return At(e,(n,r)=>{if(r==="transaction")for(let i=1;i<n.length;
501i++)n[i]?.contexts?.profile?.profile_id&&t.push(n[i])}),t}function jE(e){let r=T()?.getOptions()?.stackParser;return r?Wp(r,e):[]}function $E(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?(v&&g.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?(v&&g.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function KM(e){return e.samples.length<2?(v&&g.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):e.frames.length?!0:(v&&g.log("[Profiling] Discarding profile because it contains no frames"),!1)}var rf=!1,of=3e4;function JM(e){return typeof e=="function"}function np(){let e=O.Profiler;if(!JM(e)){v&&g.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}let t=10,n=Math.floor(of/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch{v&&(g.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),g.log("[Profiling] Disabling profiling for current user session.")),rf=!0}}function sf(e){if(rf)return v&&g.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return v&&g.log("[Profiling] Discarding profile because root span was not sampled."),!1;let n=T()?.getOptions();if(!n)return v&&g.log("[Profiling] Profiling disabled, no options found."),!1;let r=n.profilesSampleRate;return $E(r)?r?(r===!0?!0:Math.random()<r)?!0:(v&&g.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):(v&&g.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):(v&&g.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function VE(e){if(rf)return v&&g.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 v&&g.warn("[Profiling] Session not sampled. Invalid `profileLifecycle` option."),!1;let t=e.profileSessionSampleRate;return $E(t)?t?Math.random()<=t:(v&&g.log("[Profiling] Discarding profile because profileSessionSampleRate is not defined or set to 0"),!1):(v&&g.warn("[Profiling] Discarding profile because of invalid profileSessionSampleRate."),!1)}function ha(e){return typeof e.profilesSampleRate<"u"}function KE(e,t,n,r){return KM(n)?jM(e,t,n,r):null}var ki=new Map;function JE(){return ki.size}function XE(e){let t=ki.get(e);return t&&ki.delete(e),t}function QE(e,t){if(ki.set(e,t),ki.size>30){let n=ki.keys().next().value;n!==void 0&&ki.delete(n)}}var rp=new WeakSet;function wi(e){e.setAttribute("thread.id",xi),e.setAttribute("thread.name",nf)}function af(e){let t;tp(e)&&(t=te()*1e3);let n=np();if(!n)return;v&&g.log(`[Profiling] started profiling span: ${P(e).description}`);let r=fe(),i=null;k().setContext("profile",{profile_id:r,start_timestamp:t}),rp.add(e),wi(e);async function o(){if(e&&n){if(i){v&&g.log("[Profiling] profile for:",P(e).description,"already exists, returning early");return}return n.stop().then(l=>{if(s&&(O.clearTimeout(s),s=void 0),v&&g.log(`[Profiling] stopped profiling of span: ${P(e).description}`),!l){v&&g.log(`[Profiling] profiler returned null profile for: ${P(e).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started");return}i=l,QE(r,l)}).catch(l=>{v&&g.log("[Profiling] error while stopping profiler:",l)})}}let s=O.setTimeout(()=>{v&&g.log("[Profiling] max profile duration elapsed, stopping profiling for:",P(e).description),o()},of),a=e.end.bind(e);function c(){return e?(o().then(()=>{a()},()=>{a()}),e):a()}e.end=c}var XM=6e4,QM=3e5,ip=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=VE(t.getOptions());v&&g.log(`[Profiling] Initializing profiler (lifecycle='${n}').`),r||v&&g.log("[Profiling] Session not sampled. Skipping lifecycle profiler initialization."),this._profilerId=fe(),this._client=t,this._sessionSampled=r,this._lifecycleMode=n,n==="trace"&&this._setupTraceLifecycleListeners(t),t.on("spanStart",i=>{this._isRunning&&wi(i)})}
501start(){if(this._lifecycleMode==="trace"){v&&g.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.start()` are ignored in trace mode.');return}if(this._isRunning){v&&g.warn("[Profiling] Profile session is already running, `uiProfiler.start()` is a no-op.");return}if(!this._sessionSampled){v&&g.warn("[Profiling] Session is not sampled, `uiProfiler.start()` is a no-op.");return}this._beginProfiling()}stop(){if(this._lifecycleMode==="trace"){v&&g.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.stop()` are ignored in trace mode.');return}if(!this._isRunning){v&&g.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&&(v&&g.log("[Profiling] Detected already active root span during setup. Active root spans now:",r),this._beginProfiling()),this._isRunning&&wi(t)}_beginProfiling(){if(!this._isRunning){if(this._isRunning=!0,v&&g.log("[Profiling] Started profiling with profiler ID:",this._profilerId),dn().setContext("profile",{profiler_id:this._profilerId}),this._startProfilerInstance(),!this._profiler){v&&g.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=>{v&&g.error("[Profiling] Failed to collect current profile chunk on `stop()`:",t)}),this._lifecycleMode==="manual"&&dn().setContext("profile",{}))}_setupTraceLifecycleListeners(t){t.on("spanStart",n=>{if(!this._sessionSampled){v&&g.log("[Profiling] Span not profiled because of negative sampling decision for user session.");return}if(n!==se(n))return;if(!n.isRecording()){v&&g.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 i=this._activeRootSpanIds.size;i===1&&(v&&g.log(`[Profiling] Root span ${r} started. Profiling active while there are active root spans (count=${i}).`),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 i=this._activeRootSpanIds.size;v&&g.log(`[Profiling] Root span with ID ${r} ended. Will continue profiling for as long as there are active root spans (currently: ${i}).`),i===0&&(this._collectCurrentChunk().catch(o=>{v&&g.error("[Profiling] Failed to collect current profile chunk on last `spanEnd`:",o)}),this._endProfiling())})}_resetProfilerInfo(){this._isRunning=!1,dn().setContext("profile",{})}_clearAllRootSpanTimeouts(){this._rootSpanTimeouts.forEach(t=>clearTimeout(t)),this._rootSpanTimeouts.clear()}_registerTraceRootSpan(t){this._activeRootSpanIds.add(t);let n=setTimeout(()=>this._onRootSpanTimeout(t),QM);this._rootSpanTimeouts.set(t,n)}_startProfilerInstance(){if(this._profiler?.stopped===!1)return;let t=np();if(!t){v&&g.log("[Profiling] Failed to start JS Profiler.");return}this._profiler=t}_startPeriodicChunking(){this._isRunning&&(this._chunkTimer=setTimeout(()=>{if(this._collectCurrentChunk().catch(t=>{v&&g.error("[Profiling] Failed to collect current profile chunk during periodic chunking:",t)}),this._isRunning){if(this._startProfilerInstance(),!this._profiler){this._resetProfilerInfo();return}this._startPeriodicChunking()}},XM))}_onRootSpanTimeout(t){this._rootSpanTimeouts.has(t)&&(this._rootSpanTimeouts.delete(t),this._activeRootSpanIds.has(t)&&(v&&g.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=qE(n,this._client,this._profilerId),i=WE(r);if("reason"in i){v&&g.log("[Profiling] Discarding invalid profile chunk (this is probably a bug in the SDK):",i.reason);return}this._sendProfileChunk(r),v&&g.log("[Profiling] Collected browser profile chunk.")}catch(n){v&&g.log("[Profiling] Error while stopping JS Profiler for chunk:",n)}}_sendProfileChunk(t){let n=this._client,r=hn(n.getSdkMetadata?.()),i=n.getDsn(),o=n.getOptions().tunnel,s=xe({event_id:fe(),sent_at:new Date().toISOString(),...r&&{sdk:r},...!!o&&i&&{dsn:Ye(i)}},[[{type:"profile_chunk",platform:"javascript"},t]]);n.sendEnvelope(s).then(null,a=>{v&&g.error("Error while sending profile chunk envelope:",a)})}};var ZM="BrowserProfiling",eL=(()=>({name:ZM,setup(e){let t=e.getOptions(),n=new ip;if(!ha(t)&&!t.profileLifecycle&&(t.profileLifecycle="manual"),ha(t)&&!t.profilesSampleRate){v&&g.log("[Profiling] Profiling disabled, no profiling options foun
501d.");return}let r=re(),i=r&&se(r);if(ha(t)&&t.profileSessionSampleRate!==void 0&&v&&g.warn("[Profiling] Both legacy profiling (`profilesSampleRate`) and UI profiling settings are defined. `profileSessionSampleRate` has no effect when legacy profiling is enabled."),ha(t))i&&tp(i)&&sf(i)&&af(i),e.on("spanStart",o=>{let s=se(o);o===s?sf(o)&&af(o):rp.has(s)&&wi(o)}),e.on("beforeEnvelope",o=>{if(!JE())return;let s=zE(o);if(!s.length)return;let a=[];for(let c of s){let l=c?.contexts,u=l?.profile?.profile_id,p=l?.profile?.start_timestamp;if(typeof u!="string"){v&&g.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!u){v&&g.log("[Profiling] cannot find profile for a span without a profile context");continue}l?.profile&&delete l.profile;let m=XE(u);if(!m){v&&g.log(`[Profiling] Could not retrieve profile for span: ${u}`);continue}let d=KE(u,p,m,c);d&&a.push(d)}YE(o,a)});else{let o=t.profileLifecycle;if(e.on("startUIProfiler",()=>n.start()),e.on("stopUIProfiler",()=>n.stop()),o==="manual")n.initialize(e);else if(o==="trace"){if(!ke(t)){v&&g.warn("[Profiling] `profileLifecycle` is 'trace' but tracing is disabled. Set a `tracesSampleRate` or `tracesSampler` to enable span tracing.");return}n.initialize(e),i&&n.notifyRootSpanActive(i),O.setTimeout(()=>{let s=re(),a=s&&se(s);a&&n.notifyRootSpanActive(a)},0)}}}})),tL=eL;var nL="SpotlightBrowser",rL=[{op:"ui.interaction.click",name:"#sentry-spotlight"}],iL=((e={})=>{let t=e.sidecarUrl||"http://localhost:8969/stream";return{name:nL,setup:()=>{v&&g.log("Using Sidecar URL",t)},beforeSetup(n){let r=n.getOptions();r.ignoreSpans=[...r.ignoreSpans||[],...rL]},afterAllSetup:n=>{oL(n,t)}}});function oL(e,t){let n=Ao("fetch"),r=0;e.on("beforeEnvelope",i=>{if(r>3){g.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",r);return}n(t,{method:"POST",body:er(i),headers:{"Content-Type":"application/x-sentry-envelope"},mode:"cors"}).then(o=>{o.status>=200&&o.status<400&&(r=0)},o=>{r++,g.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/",o)})})}var sL=iL;var aL=()=>({name:"LaunchDarkly",processEvent(e,t,n){return Bt(e)}});function cL(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(e,t,n)=>{Rt(e,t.value),Ot(e,t.value)}}}var lL=()=>({name:"OpenFeature",processEvent(e,t,n){return Bt(e)}}),cf=class{after(t,n){Rt(n.flagKey,n.value),Ot(n.flagKey,n.value)}error(t,n,r){Rt(t.flagKey,t.defaultValue),Ot(t.flagKey,t.defaultValue)}};var pL=({featureFlagClientClass:e})=>({name:"Unleash",setupOnce(){let t=e.prototype;ye(t,"isEnabled",uL)},processEvent(t,n,r){return Bt(t)}});function uL(e){return function(...t){let n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"?(Rt(n,r),Ot(n,r)):v&&g.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}var dL=(({growthbookClass:e})=>wu({growthbookClass:e}));var mL=({featureFlagClient:e})=>({name:"Statsig",setup(t){e.on("gate_evaluation",n=>{Rt(n.gate.name,n.gate.value),Ot(n.gate.name,n.gate.value)})},processEvent(t,n,r){return Bt(t)}});async function fL(){let e=T();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 ms(()=>fetch(r,{body:"{}",method:"POST",mode:"cors",credentials:"omit"}))}catch{return"sentry-unreachable"}}var gL="WebWorker",_L=({worker:e})=>({name:gL,setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(t=>ZE(t))},addWorker:t=>ZE(t)});function ZE(e){e.addEventListener("message",t=>{if(yL(t.data)){if(t.stopImmediatePropagation(),t.data._sentryDebugIds&&(v&&g.log("Sentry debugId web worker message received",t.data),O._sentryDebugIds={...t.data._sentryDebugIds,...O._sentryDebugIds}),t.data._sentryModuleMetadata&&(v&&g.log("Sentry module metadata web worker message received",t.data),O._sentryModuleMetadata={...t.data._sentryModuleMetadata,...O._sentryModuleMetadata}),t.data._sentryWasmImages){v&&g.log("Sentry WASM images web worker message received",t.data);let n=O._sentryWasmImages||[],r=t.data._sentryWasmImages.filter(i=>Re(i)&&typeof i.code_file=="string"&&!n.some(o=>o.code_file===i.code_file));O._sentryWasmImages=[...n,...r]}t.data._sentryWorkerError&&(v&&g.log("Sentry worker rejection message received",t.data._sentryWorkerError),hL(t.data._sentryWorkerError))}})}function hL(e){let t=T();if(!t)return;let n=t.getOptions().stackParser,r=t.getOptions().attachStacktrace,i=e.reason,o=Ge(i)?Vd(i):bo(n,i,void 0,r,!0);o.level="error",e.filename&&(o.contexts={...o.contexts,worker:{filename:e.filename}}),bn(o,{originalException:i,mechanism:{handled:!1,type:"auto.browser.web_worker.onunhandledrejection"}}),v&&g.log("Captured worker unhandled rejection",i)}function bL({self:e}){e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0,_sentryModuleMetadata:e._sentryModuleMetadata??void 0}),e.addEventListener("unhandledrejection",t=>{let r={reason:$d(t),filename:e.location?.href};e.postMessage({_sentryMessage:!0,_sentryWorkerError:r}),v&&g.log("[Sentry Worker] Forwarding unhandled rejection to parent",r)}),v&&g.log("[Sentry Worker] Registered worker with unhandled rejection handling")}function yL(e){if(!Re(e)||e._sentryMessage!==!0)return!1;let t="_sentryDebugIds"in e,n="_sentryModuleMetadata"in e,r="_sentryWorkerError"in e,i="_sentryWasmImages"in e;return!(!t&&!n&&!r&&!i||t&&!(Re(e._sentryDebugIds)||e._sentryDebugIds===void 0)||n&&!(Re(e._sentryModuleMetadata)||e._sentryModuleMetadata===void 0)||r&&!Re(e._sentryWorkerError)||i&&(!Array.isArray(e._sentryWasmImages)||!e._sentryWasmImages.every(o=>Re(o)&&typeof o.code_file=="string")))}export{js as BrowserClient,ws as MULTIPLEXED_TRANSPORT_EXTRA_KEY,cf as OpenFeatureIntegrationHook,Lt as SDK_VERSION,J as SEMANTIC_ATTRIBUTE_SENTRY_OP,q as SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,$n as SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,Me as SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,ft as Scope,O as WINDOW,_t as addBreadcrumb,Is as addEventProcessor,Vi as addIntegration,mg as bindScopeToEmitter,qd as breadcrumbsIntegration,Wd as browserApiErrorsIntegration,tL as browserProfilingIntegration,Yd as browserSessionIntegration,OM as browserTracingIntegration,cL as buildLaunchDarklyFlagUsedHandler,E_ as captureConsoleIntegration,bn as captureEvent,X as captureException,Ms as captureFeedback,Ss as captureMessage,oi as captureSession,Cy as chromeStackLineParser,Zp as close,$_ as consoleLoggingIntegration,fx as contextLinesIntegration,Cp as continueTrace,V_ as createConsolaReporter,Bs as createLangChainCallbackHandler,mc as createTransport,uk as createUserFeedbackEnvelope,zd as cultureContextIntegration,Tc as dedupeIntegration,Zl as defaultRequestInstrumentationOptions,Ly as defaultStackLineParsers,Hd as defaultStackParser,fL as diagnoseSdkConnectivity,Oy as elementTimingIntegration,As as endSession,Ou as eventFiltersIntegration,fd as eventFromException,gd as eventFromMessage,zs as exceptionFromError,A_ as extraErrorDataIntegration,q_ as featureFlagsIntegration,OO as feedbackAsyncIntegration,ny as feedbackIntegration,ny as feedbackSyncIntegration,Jm as fetchStreamPerformanceIntegration,Qp as flush,jk as forceLoad,_c as functionToStringIntegration,My as geckoStackLineParser,wy as getAbsoluteUrl,re as getActiveSpan,T as getClient,k as getCurrentScope,Hy as getDefaultIntegrations,DR as getFeedback,dn as getGlobalScope,Z as getIsolationScope,VC as getReplay,se as getRootSpan,Jn as getSpanDescendants,Ep as getSpanStatusFromHttpCode,Zi as getTraceData,jd as globalHandlersIntegration,Tx as graphqlClientIntegration,dL as growthbookIntegration,tx as httpClientIntegration,Kd as httpContextIntegration,bc as inbou
501ndFiltersIntegration,zk as init,Uh as instrumentAnthropicAiClient,lb as instrumentCreateReactAgent,Wh as instrumentGoogleGenAIClient,tb as instrumentLangChainEmbeddings,pb as instrumentLangGraph,Ah as instrumentOpenAiClient,Km as instrumentOutgoingRequests,Vu as instrumentStateGraph,xu as instrumentSupabaseClient,CE as isBotUserAgent,vs as isEnabled,eu as isInitialized,Ts as lastEventId,aL as launchDarklyIntegration,ud as lazyLoadIntegration,Jd as linkedErrorsIntegration,Lu as logger,FM as makeBrowserOfflineTransport,Zs as makeFetchTransport,c_ as makeMultiplexedTransport,pi as metrics,b_ as moduleMetadataIntegration,Xd as normalizeStringifyValue,$k as onLoad,lL as openFeatureIntegration,ak as opera10StackLineParser,pk as opera11StackLineParser,vu as parameterize,Ja as registerSpanErrorInstrumentation,bL as registerWebWorker,uM as replayCanvasIntegration,jC as replayIntegration,xM as reportPageLoaded,Qk as reportingObserverIntegration,w_ as rewriteFramesIntegration,Hb as sendFeedback,wM as setActiveSpanInBrowser,Kp as setAttribute,Vp as setAttributes,Es as setContext,Xp as setConversationId,bu as setCurrentClient,zp as setExtra,Yp as setExtras,Kn as setHttpStatus,Yi as setMeasurement,$p as setTag,jp as setTags,Jp as setUser,Vk as showReportDialog,CM as spanStreamingIntegration,xp as spanToBaggageHeader,P as spanToJSON,os as spanToTraceHeader,sL as spotlightBrowserIntegration,LE as startBrowserTracingNavigationSpan,ME as startBrowserTracingPageLoadSpan,Xe as startInactiveSpan,nc as startNewTrace,$i as startSession,Ve as startSpan,gt as startSpanManual,mL as statsigIntegration,U_ as supabaseIntegration,ms as suppressTracing,F_ as thirdPartyErrorFilterIntegration,qN as uiProfiler,pL as unleashIntegration,Np as updateSpanName,vx as viewHierarchyIntegration,Qm as webVitalsIntegration,_L as webWorkerIntegration,ik as winjsStackLineParser,Er as withActiveSpan,xa as withIsolationScope,Be as withScope,Zf as withStreamedSpan,D_ as zodErrorsIntegration};

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.