1import{r as Re}from"./index-B-VekllG.js";const k=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,B=globalThis,tn="10.76.2";function At(){return jr(B),B}function jr(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||tn,t[tn]=t[tn]||{}}function zr(e,t,n=B){const r=n.__SENTRY__=n.__SENTRY__||{},o=r[tn]=r[tn]||{};return o[e]||(o[e]=t())}const Xc=["debug","info","warn","error","log","assert","trace"],Ty="Sentry Logger ",Vs={};function zt(e){if(!("console"in B))return e();const t=B.console,n={},r=Object.keys(Vs);r.forEach(o=>{const s=Vs[o];n[o]=t[o],t[o]=s});try{return e()}finally{r.forEach(o=>{t[o]=n[o]})}}function Iy(){Zc().enabled=!0}function wy(){Zc().enabled=!1}function kp(){return Zc().enabled}function ky(...e){Qc("log",...e)}function Ry(...e){Qc("warn",...e)}function Ay(...e){Qc("error",...e)}function Qc(e,...t){k&&kp()&&zt(()=>{B.console[e](`${Ty}[${e}]:`,...t)})}function Zc(){return k?zr("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const g={enable:Iy,disable:wy,isEnabled:kp,log:ky,warn:Ry,error:Ay},Rp=50,Et="?",El=/\(error: (.*)\)/,Tl=/captureMessage|captureException/;function Ap(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,o=0)=>{const s=[],i=n.split(` 2`);for(let a=r;a<i.length;a++){let c=i[a];c.length>1024&&(c=c.slice(0,1024));const u=El.test(c)?c.replace(El,"$1"):c;if(!u.includes("Error: ")){for(const d of t){const l=d(u);if(l){s.push(l);break}}if(s.length>=Rp+o)break}}return Ny(s.slice(o))}}function Cy(e){return Array.isArray(e)?Ap(...e):e}function Ny(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(ls(t).function||"")&&t.pop(),t.reverse(),Tl.test(ls(t).function||"")&&(t.pop(),Tl.test(ls(t).function||"")&&t.pop()),t.slice(0,Rp).map(n=>({...n,filename:n.filename||ls(t).filename,function:n.function||Et}))}function ls(e){return e[e.length-1]||{}}const va="<anonymous>";function Ut(e){try{return!e||typeof e!="function"?va:e.name||va}catch{return va}}function ic(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}function My(e){let t=e?.startsWith("file://")?e.slice(7):e;return t?.match(/\/[A-Z]:/)&&(t=t.slice(1)),t}const so={},Il={};function gn(e,t){return so[e]=so[e]||[],so[e].push(t),()=>{const n=so[e];if(n){const r=n.indexOf(t);r!==-1&&n.splice(r,1)}}}function _n(e,t){if(!Il[e]){Il[e]=!0;try{t()}catch(n){k&&g.error(`Error while instrumenting ${e}`,n)}}}function tt(e,t){const n=e&&so[e];if(n)for(const r of n)try{r(t)}catch(o){k&&g.error(`Error while triggering instrumentation handler. 3Type: ${e} 4Name: ${Ut(r)} 5Error:`,o)}}let Ea=null;function Cp(e){const t="error";gn(t,e),_n(t,xy)}function xy(){Ea=B.onerror,B.onerror=function(e,t,n,r,o){return tt("error",{column:r,error:o,line:n,msg:e,url:t}),Ea?Ea.apply(this,arguments):!1},B.onerror.__SENTRY_INSTRUMENTED__=!0}let Ta=null;function Np(e){const t="unhandledrejection";gn(t,e),_n(t,Oy)}function Oy(){Ta=B.onunhandledrejection,B.onunhandledrejection=function(e){return tt("unhandledrejection",e),Ta?Ta.apply(this,arguments):!0},B.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Mp=Object.prototype.toString;function $e(e){switch(Mp.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Mi(e,Error)}}function qr(e,t){return Mp.call(e)===`[object ${t}]`}function xp(e){return qr(e,"ErrorEvent")}function wl(e){return qr(e,"DOMError")}function Py(e){return qr(e,"DOMException")}function ft(e){return qr(e,"String")}function Ci(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Tt(e){return e===null||Ci(e)||typeof e!="object"&&typeof e!="function"}function De(e){return qr(e,"Object")}function xe(e){return typeof e=="object"&&e!==null}function Ni(e){return typeof Event<"u"&&Mi(e,Event)}function Ly(e){return qr(e,"RegExp")}function yn(e){return!!(e?.then&&typeof e.then=="function")}function Mi(e,t){try{return e instanceof t}catch{return!1}}function eu(e){return typeof Request<"u"&&Mi(e,Request)}function Oe(e,t,n){if(!(t in e))return;const r=e[t];if(typeof r!="function")return;const o=n(r);typeof o=="function"&&Op(o,r);try{e[t]=o}catch{k&&g.log(`Failed to replace method "${t}" in object`,e)}}function ye(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{k&&g.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function Op(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,ye(e,"__sentry_original__",t)}catch{}}function tu(e){return e.__sentry_original__}function Pp(e){if($e(e))return{message:e.message,name:e.name,stack:e.stack,...kl(e)};
5if(Ni(e)){const{type:t,target:n,currentTarget:r,detail:o}=e;return{type:t,target:n,currentTarget:r,...o?{detail:o}:{},...kl(e)}}return e}function kl(e){return xe(e)?Object.fromEntries(Object.entries(e)):{}}function Dy(e){const t=Object.keys(Pp(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}let rr;function Mo(e){if(rr!==void 0)return rr?rr(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=B;return t in n&&typeof n[t]=="function"?(rr=n[t],rr(e)):(rr=null,e())}function $t(){return Mo(()=>Math.random())}function Ct(){return Mo(()=>Date.now())}const Lp=Symbol.for("sentry.skipNormalization"),Dp=Symbol.for("sentry.overrideNormalizationDepth");function Fy(e){ye(e,Lp,!0)}function $y(e,t){ye(e,Dp,t)}function By(e){return!!e[Lp]}function Uy(e){const t=e[Dp];return typeof t=="number"?t:void 0}let ac;function Fp(e){ac=e}function ke(e,t=100,n=1/0){try{return cc("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function $p(e,t=3,n=100*1024){const r=ke(e,t);return jy(r)>n?$p(e,t-1,n):r}function cc(e,t,n=1/0,r=1/0,o=zy()){const[s,i]=o;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=Bp(e,t);if(!a.startsWith("[object "))return a;if(By(t))return t;const c=Uy(t),u=c!==void 0?c:n;if(u===0)return a.replace("object ","");if(s(t))return"[Circular ~]";const d=t;if(d&&typeof d.toJSON=="function")try{const h=d.toJSON();return cc("",h,u-1,r,o)}catch{}const l=Array.isArray(t)?[]:{};let p=0;const f=Pp(t);for(const h in f){if(!Object.prototype.hasOwnProperty.call(f,h))continue;if(p>=r){l[h]="[MaxProperties ~]";break}const m=f[h];l[h]=cc(h,m,u-1,r,o),p++}return i(t),l}function Bp(e,t){try{if(ac){const r=ac(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 ${Hy(t)}]`}catch(n){return`**non-serializable** (${n})`}}function Hy(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function Wy(e){return~-encodeURI(e).split(/%..|./).length}function jy(e){return Wy(JSON.stringify(e))}function zy(){const 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 go(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Ia(e,t){let n=e;const r=n.length;if(r<=150)return n;t>r&&(t=r);let o=Math.max(t-60,0);o<5&&(o=0);let s=Math.min(o+140,r);return s>r-5&&(s=r),s===r&&(o=Math.max(s-140,0)),n=n.slice(o,s),o>0&&(n=`'{snip} ${n}`),s<r&&(n+=" {snip}"),n}function Ys(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const o=e[r];Tt(o)?n.push(String(o)):o instanceof Error?n.push(o.message?`${o.name}: ${o.message}`:o.name):n.push(Bp(void 0,o))}return n.join(t)}function co(e,t,n=!1){return ft(e)?Ly(t)?t.test(e):ft(t)?n?e===t:e.includes(t):typeof t=="function"?t(e):!1:!1}function nt(e,t=[],n=!1){for(const r of t)if(co(e,r,n))return!0;return!1}function qy(){const e=B;return e.crypto||e.msCrypto}let wa;function Gy(){return $t()*16}function Ce(e=qy()){try{if(e?.randomUUID)return Mo(()=>e.randomUUID()).replace(/-/g,"")}catch{}return wa||(wa="10000000100040008000"+1e11),wa.replace(/[018]/g,t=>(t^(Gy()&15)>>t/4).toString(16))}function Up(e){return e.exception?.values?.[0]}function Mn(e){const{message:t,event_id:n}=e;if(t)return t;const r=Up(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function uc(e,t,n){const r=e.exception=e.exception||{},o=r.values=r.values||[],s=o[0]=o[0]||{};s.value||(s.value=t||""),s.type||(s.type="Error")}function bt(e,t){const n=Up(e);if(!n)return;const r={type:"generic",handled:!0},o=n.mechanism;if(n.mechanism={...r,...o,...t},t&&"data"in t){const s={...o?.data,...t.data};n.mechanism.data=s}}function Vy(e,t,n=5){if(t.lineno===void 0)return;const r=e.length,o=Math.max(Math.min(r-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,o-n),o).map(i=>Ia(i,0));const s=Math.min(r-1,o);t.context_line=Ia(e[s],t.colno||0),t.post_context=e.slice(Math.min(o+1,r),o+1+n).map(i=>Ia(i,0))}function Rl(e){if(Yy(e))return!0;try{ye(e,"__sentry_captured__",!0)}catch{}return!1}function Yy(e){try{return e.__sentry_captured__}catch{}}const Hp=1e3;function Kn(){return Ct()/Hp}function Jy(){const{performance:e}=B;if(!e?.now||!e.timeOrigin)return Kn;const t=e.timeOrigin;return()=>(t+Mo(()=>e.now()))/Hp}let Al;function he(){return(Al??(Al=Jy()))()}let ka=null;function Ky(){const{performance:e}=B;if(!e?.now)return;const t=3e5,n=Mo(()=>e.now()),r=Ct(),o=e.timeOrigin;if(typeof o=="number"&&Math.abs(o+n-r)<t)return o;const s=e.timing?.navigationStart;return typeof s=="number"&&Math.abs(s+n-r)<t?s:r-n}function Ie(){return ka===null&&(ka=Ky()),ka}function Xy(e){const t=he(),n={sid:Ce(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Zy(n)};return e&&Tr(n,e),n}function Tr(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||he(),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:Ce()),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{const 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
5ypeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Qy(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),Tr(e,n)}function Zy(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 xo(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;const r={...e};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=xo(r[o],t[o],n-1));return r}function Ht(){return Ce()}function un(){return Ce().substring(16)}function Wp(e){try{const t=B.WeakRef;if(typeof t=="function")return new t(e)}catch{}return e}function jp(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}const lc="_sentrySpan";function It(e,t){t?ye(e,lc,Wp(t)):delete e[lc]}function Ir(e){return jp(e[lc])}const eS=100;class wt{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:Ht(),sampleRand:$t()}}clone(){const t=new wt;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,It(t,Ir(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&&Tr(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;const n=typeof t=="function"?t(this):t,r=n instanceof wt?n.getScopeData():De(n)?t:void 0,{tags:o,attributes:s,extra:i,user:a,contexts:c,level:u,fingerprint:d=[],propagationContext:l,conversationId:p}=r||{};return this._tags={...this._tags,...o},this._attributes={...this._attributes,...s},this._extra={...this._extra,...i},this._contexts={...this._contexts,...c},a&&Object.keys(a).length&&(this._user=a),u&&(this._level=u),d.length&&(this._fingerprint=d),l&&(this._propagationContext=l),p&&(this._conversationId=p),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,It(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Ht(),sampleRand:$t()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:eS;if(r<=0)return this;const o={timestamp:Kn(),...t,message:t.message?go(t.message,2048):t.message};return this._breadcrumbs.push(o),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Ir(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=xo(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n?.event_id||Ce();if(!this._client)return k&&g.warn("No client configured on scope - will not capture exception!"),r;const o=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:o,...n,event_id:r},this),r}captureMessage(t,n,r){const o=r?.event_id||Ce();if(!this._client)return k&&g.warn("No client configured on scope - will not capture message!"),o;const s=r?.syntheticException??new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:s,...r,event_id:o},this),o}captureEvent(t,n){const r=t.event_id||n?.event_id||Ce();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(k&&g.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEac
5h(t=>{t(this)}),this._notifyingListeners=!1)}}function tS(){return zr("defaultCurrentScope",()=>new wt)}function nS(){return zr("defaultIsolationScope",()=>new wt)}const Cl=e=>e instanceof Promise&&!e[zp],zp=Symbol("chained PromiseLike"),qp=(e,t,n)=>{const r=e.then(o=>(t(o),o),o=>{throw n(o),o});return Cl(r)&&Cl(e)?r:rS(e,r)},rS=(e,t)=>{if(!t)return e;let n=!1;for(const r in e){if(r in t)continue;n=!0;const o=e[r];typeof o=="function"?Object.defineProperty(t,r,{value:(...s)=>o.apply(e,s),enumerable:!0,configurable:!0,writable:!0}):t[r]=o}return n&&Object.assign(t,{[zp]:!0}),t};class oS{constructor(t,n){let r;t?r=t:r=new wt;let o;n?o=n:o=new wt,this._stack=[{scope:r}],this._isolationScope=o}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(o){throw this._popScope(),o}return yn(r)?qp(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(){const 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 wr(){const e=At(),t=jr(e);return t.stack=t.stack||new oS(tS(),nS())}function sS(e){return wr().withScope(e)}function iS(e,t){const n=wr();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Nl(e){return wr().withScope(()=>e(wr().getIsolationScope()))}function aS(){return{withIsolationScope:Nl,withScope:sS,withSetScope:iS,withSetIsolationScope:(e,t)=>Nl(t),getCurrentScope:()=>wr().getScope(),getIsolationScope:()=>wr().getIsolationScope()}}function Sn(e){const t=jr(e);return t.acs?t.acs:aS()}function cS(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)&&Object.keys(e).includes("value")}function uS(e,t){const{value:n,unit:r}=cS(e)?e:{value:e,unit:void 0},o=lS(n),s=r&&typeof r=="string"?{unit:r}:{};if(o)return{...o,...s};if(!t||t==="skip-undefined"&&n===void 0)return;let i="";try{i=JSON.stringify(n)??""}catch{}return{value:i,type:"string",...s}}function kr(e,t=!1){const n={};for(const[r,o]of Object.entries(e??{})){const s=uS(o,t);s&&(n[r]=s)}return n}function Ml(e){if(!e)return 0;let t=0;for(const[n,r]of Object.entries(e)){t+=n.length*2,t+=r.type.length*2,t+=(r.unit?.length??0)*2;const o=r.value;Array.isArray(o)?t+=xl(o[0])*o.length:Tt(o)?t+=xl(o):t+=100}return t}function xl(e){return typeof e=="string"?e.length*2:typeof e=="boolean"?4:typeof e=="number"?8:0}function lS(e){if(Array.isArray(e))return{value:e,type:"array"};const 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}}function W(){const e=At();return Sn(e).getCurrentScope()}function Se(){const e=At();return Sn(e).getIsolationScope()}function gr(){return zr("globalScope",()=>new wt)}function Ke(...e){const t=At(),n=Sn(t);if(e.length===2){const[r,o]=e;return r?n.withSetScope(r,o):n.withScope(o)}return n.withScope(e[0])}function pL(...e){const t=At(),n=Sn(t);if(e.length===2){const[r,o]=e;return r?n.withSetIsolationScope(r,o):n.withIsolationScope(o)}return n.withIsolationScope(e[0])}function R(){return W().getClient()}function Gp(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:o}=t,s={trace_id:n,span_id:o||un()};return r&&(s.parent_span_id=r),s}const le="sentry.source",nu="sentry.sample_rate",Vp="sentry.previous_trace_sample_rate",ue="sentry.op",Y="sentry.origin",dS="sentry.status.message",_o="sentry.idle_span_finish_reason",Oo="sentry.measurement_unit",Po="sentry.measurement_value",fS="sentry.release",pS="sentry.environment",hS="sentry.sdk.integrations",mS="user.id",gS="user.email",_S="user.ip_address",yS="user.name",dc="sentry.custom_span_name",ru="sentry.profile_id",bn="sentry.exclusive_time",SS="http.request.method",bS="sentry.link.type",vS="gen_ai.conversation.id",Yp=0,Lo=1,re=2;function ES(e){if(e<400&&e>=100)return{code:Lo};if(e>=400&&e<500)switch(e){case 401:return{code:re,message:"unauthenticated"};case 403:return{code:re,message:"permission_denied"};case 404:return{code:re,message:"not_found"};case 409:return{code:re,message:"already_exists"};case 413:return{code:re,message:"failed_precondition"};case 429:return{code:re,message:"resource_exhausted"};case 499:return{code:re,message:"cancelled"};default:return{code:re,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:re,message:"unimplemented"};case 503:return{code:re,message:"unavailable"};case 504:return{code:re,message:"deadline_exceeded"};default:return{code:re,message:"internal_error"}}return{code:re,message:"internal_error"}}function Js(e,t){e.setAttribute("http.response.status_code",t);const n=ES(t);n.message!=="unknown_error"&&e.setStatus(n)}const Jp="_sentryScope",Kp="_sentryIsolationScope",TS=Symbol.for("sentry.otelSourceInference"),IS=Symbol.for("sentry.otelSourceExplicitlySet"),wS=Symbol.for("sentry.tracerProviderSpan");function Rr(e,t,n){e&&(ye(e,Kp,Wp(n)),ye(e,Jp,t))}function Fn(e){const t=e;return{scope:t[Jp],isolationScope:jp(t[Kp])}}function Ol(e){return e[TS]===!0}function kS(e){ye(e,IS,!0)}function Pl(e){return e[wS]===!0}const Ks="sentry-",RS=8192;function ou(e){const t=AS(e);if(!t)return;const n=Object.entries(t).reduce((r,[o,s])=>{if(o.startsWith(Ks)){const i=o.slice(Ks.length);r[i]=s}return r},{});if(Object.keys(n).length>0)return n}function Xp(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,o])=>(o&&(n[`${Ks}${r}`]=o),n),{});return CS(t)}function AS(e){if(!(!e||!ft(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=Ll(n);return Object.entries(r).forEach(([o,s])=>{t[o]=s}),t},{}):Ll(e)}function Ll(e){return e.split(",").map(t=>{const n=t.indexOf("=");if(n===-1)return[];const r=t.slice(0,n),o=t.slice(n+1);return[r,o].map(s=>{try{return decodeURIComponent(s.trim())}catch{return}})}).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function CS(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],o)=>{const s=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,i=o===0?s:`${t},${s}`;return i.length>RS?(k&&g.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):i},"")}const NS=/^o(\d+)\./,MS=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function xS(e){return e==="http"||e==="https"}function Nt(e,t=!1){const{host:n,path:r,pass:o,port:s,projectId:i,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&o?`:${o}`:""}@${n}${s?`:${s}`:""}/${r&&`${r}/`}${i}`}function Qp(e){const t=MS.exec(e);if(!t){zt(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,o="",s="",i="",a=""]=t.slice(1);let c="",u=a;const d=u.split("/");if(d.length>1&&(c=d.slice(0,-1).join("/"),u=d.pop()),u){const l=u.match(/^\d+/);l&&(u=l[0])}return Zp({host:s,pass:o,path:c,projectId:u,port:i,protocol:n,publicKey:r})}function Zp(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function OS(e){if(!k)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(g.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?xS(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 PS(e){return e.match(NS)?.[1]}function eh(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=PS(n)),r}function th(e){const t=typeof e=="string"?Qp(e):Zp(e);if(!(!t||!OS(t)))return t}function jn(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}const nh=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function LS(e){if(!e)return;const t=e.match(nh);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 rh(e,t){const n=LS(e),r=ou(t);if(!n?.traceId)return{traceId:Ht(),sampleRand:$t()};const o=DS(n,r);r&&(r.sample_rand=o.toString());const{traceId:s,parentSpanId:i,parentSampled:a}=n;return{traceId:s,parentSpanId:i,sampled:a,dsc:r||{},sampleRand:o}}
5function oh(e=Ht(),t=un(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function sh(e=Ht(),t=un(),n){return`00-${e}-${t}-${n?"01":"00"}`}function DS(e,t){const n=jn(t?.sample_rand);if(n!==void 0)return n;const r=jn(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?$t()*r:r+$t()*(1-r):$t()}function FS(e,t){const n=eh(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}const ih=0,xi=1;let Dl=!1;function $S(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:o,parent_span_id:s,status:i,origin:a,links:c}=$(e);return{parent_span_id:s,span_id:t,trace_id:n,data:r,op:o,status:i,origin:a,links:c}}function ah(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),o=r?t:$(e).parent_span_id,s=Fn(e).scope,i=r?s?.getPropagationContext().propagationSpanId||un():t;return{parent_span_id:o,span_id:i,trace_id:n}}function BS(e){const{traceId:t,spanId:n}=e.spanContext(),r=Mt(e);return oh(t,n,r)}function US(e){const{traceId:t,spanId:n}=e.spanContext(),r=Mt(e);return sh(t,n,r)}function ch(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:r,...o},attributes:s})=>({span_id:t,trace_id:n,sampled:r===xi,attributes:s,...o}))}function uh(e){if(e?.length)return e.map(({context:{spanId:t,traceId:n,traceFlags:r},attributes:o})=>({span_id:t,trace_id:n,sampled:r===xi,attributes:o}))}function Bt(e){return typeof e=="number"?Fl(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Fl(e.getTime()):he()}function Fl(e){return e>9999999999?e/1e3:e}function $(e){if(ph(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(fh(e)){const{attributes:r,startTime:o,name:s,endTime:i,status:a,links:c}=e;return{span_id:t,trace_id:n,data:r,description:s,parent_span_id:lh(e),start_timestamp:Bt(o),timestamp:Bt(i)||void 0,status:hh(a),op:r[ue],origin:r[Y],links:ch(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function Xs(e){if(ph(e))return e.getStreamedSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(fh(e)){const{attributes:r,startTime:o,name:s,endTime:i,status:a,links:c}=e;return{name:s,span_id:t,trace_id:n,parent_span_id:lh(e),start_timestamp:Bt(o),end_timestamp:Bt(i),is_segment:e===Qs(e),status:su(a),attributes:mh(r,a),links:uh(c)}}return{span_id:t,trace_id:n,start_timestamp:0,name:"",end_timestamp:0,status:"ok",is_segment:e===Qs(e)}}function lh(e){return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0}function dh(e){return{...e,attributes:kr(e.attributes),links:e.links?.map(t=>({...t,attributes:kr(t.attributes)}))}}function fh(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function ph(e){return typeof e.getSpanJSON=="function"}function Mt(e){const{traceFlags:t}=e.spanContext();return t===xi}function hh(e){if(!(!e||e.code===Yp))return e.code===Lo?"ok":e.message||"internal_error"}function su(e){return!e||e.code===Lo||e.code===Yp||e.message==="cancelled"?"ok":"error"}function mh(e,t){const n=su(t)==="error"?t?.message:void 0;return{...n&&{[dS]:n},...e}}const $n="_sentryChildSpans",fc="_sentryRootSpan";function Cs(e,t){const n=e[fc]||e;ye(t,fc,n),Mt(e)&&(!e.isRecording()&&!n.isRecording()||(e[$n]?e[$n].add(t):ye(e,$n,new Set([t]))))}function HS(e,t){e[$n]&&e[$n].delete(t)}function Ns(e){const t=new Set;function n(r){if(!t.has(r)&&Mt(r)){t.add(r);const o=r[$n]?Array.from(r[$n]):[];for(const s of o)n(s)}}return n(e),Array.from(t)}const ve=Qs;function Qs(e){return e[fc]||e}function Ee(){const e=At(),t=Sn(e);return t.getActiveSpan?t.getActiveSpan():Ir(W())}function Zs(){Dl||(zt(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),Dl=!0)}function hL(e,t){e.updateName(t),e.setAttributes({[le]:"custom",[dc]:t})}let $l=!1;function WS(){if($l)return;function e(){const t=Ee(),n=t&&ve(t);if(n){const r="internal_error";k&&g.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:re,message:r})}}$l=!0,Cp(e),Np(e)}function Je(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||R()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function Bl(e){g.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function yo(e,t){if(!t?.length)return!1;for(const n of t){if(qS(n)){if(e.description&&co(e.description,n))return k&&Bl(e),!0;continue}const r=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!r)continue;const o=n.name?e.description&&co(e.description,n.name):!0,s=n.op?e.op&&co(e.op,n.op):!0,i=n.attributes?Object.entries(n.attributes).every(([a,c])=>jS(e.attributes?.[a],c)):!0;if(o&&s&&i)return k&&Bl(e),!0}return!1}function jS(e,t){return typeof e=="string"&&(typeof t=="string"||t instanceof RegExp)?co(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e===t}function zS(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const o of e)o.parent_span_id===r&&(o.parent_span_id=n)}function qS(e){return typeof e=="string"||e instanceof RegExp}const gh=Symbol.for("sentry.nonRecordingSpan");class zn{constructor(t={}){this._traceId=t.traceId||Ht(),this._spanId=t.spanId||un(),this.dropReason=t.dropReason,ye(this,gh,!0)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:ih}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}
5addEvent(t,n,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}}function Ar(e){return!!e&&e[gh]===!0}const Do="production",_h="_frozenDsc";function Ul(e,t){ye(e,_h,t)}function yh(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o={environment:n.environment||Do,release:n.release,public_key:r,trace_id:e,org_id:eh(t)};return t.emit("createDsc",o),o}function Oi(e,t){const n=t.getPropagationContext();return n.dsc||yh(n.traceId,e)}function gt(e){const t=R();if(!t)return{};const n=ve(e),r=$(n),o=r.data,s=n.spanContext().traceState,i=s?.get("sentry.sample_rate")??o[nu]??o[Vp];function a(_){return(typeof i=="number"||typeof i=="string")&&(_.sample_rate=`${i}`),_}const c=n[_h];if(c)return a(c);const u=Ar(n),d=u&&n.dropReason==="ignored";if(u&&(!Je(t.getOptions())||d)){const _=Fn(n).scope;if(_){const y={...Oi(t,_)};return d&&(y.sampled="false"),a(y)}}const l=s?.get("sentry.dsc"),p=l&&ou(l);if(p)return a(p);const f=yh(e.spanContext().traceId,t),h=o[le]??o["sentry.segment.name.source"],m=r.description;return h!=="url"&&m&&(f.transaction=m),Je()&&(f.sampled=String(Mt(n)),f.sample_rand=s?.get("sentry.sample_rand")??Fn(n).scope?.getPropagationContext().sampleRand.toString()),a(f),t.emit("createDsc",f,n),f}function mL(e){const t=gt(e);return Xp(t)}function gL(e){return ye(e,"_streamed",!0),e}function Pi(e){return!!e&&typeof e=="function"&&"_streamed"in e&&!!e._streamed}function it(e,t=[]){return[e,t]}function Hl(e,t){const[n,r]=e;return[n,[...r,t]]}function qn(e,t){const n=e[1];for(const r of n){const o=r[0].type;if(t(r,o))return!0}return!1}function pc(e,t){return qn(e,(n,r)=>t.includes(r))}function ei(e){const t=jr(B);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function GS(e){const t=jr(B);return t.decodePolyfill?t.decodePolyfill(e):new TextDecoder().decode(e)}function ti(e){const[t,n]=e;let r=JSON.stringify(t);function o(s){typeof r=="string"?r=typeof s=="string"?r+s:[ei(r),s]:r.push(typeof s=="string"?ei(s):s)}for(const s of n){const[i,a]=s;if(o(` 6${JSON.stringify(i)} 7`),typeof a=="string"||a instanceof Uint8Array)o(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(ke(a))}o(c)}}return typeof r=="string"?r:VS(r)}function VS(e){const t=e.reduce((o,s)=>o+s.length,0),n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}function YS(e){let t=typeof e=="string"?ei(e):e;function n(i){const a=t.subarray(0,i);return t=t.subarray(i+1),a}function r(){let i=t.indexOf(10);return i<0&&(i=t.length),JSON.parse(GS(n(i)))}const o=r(),s=[];for(;t.length;){const i=r(),a=typeof i.length=="number"?i.length:void 0;s.push([i,a?n(a):r()])}return[o,s]}function JS(e){return[{type:"span"},e]}function KS(e){const t=typeof e.data=="string"?ei(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const Sh={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 XS(e){return e in Sh}function Wl(e){return XS(e)?Sh[e]:e}function Fo(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function bh(e,t,n,r){const o=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(Ct()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Nt(r)},...o&&{trace:o}}}function QS(e,t){if(!t)return e;const 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 ZS(e,t,n,r){const o=Fo(n),s={sent_at:new Date(Ct()).toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:Nt(t)}},i="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return it(s,[i])}function eb(e,t,n,r){const o=Fo(n),s=e.type&&e.type!=="replay_event"?e.type:"event";QS(e,n?.sdk);const i=bh(e,o,r,t);return delete e.sdkProcessingMetadata,it(i,[[{type:s},e]])}function tb(e,t){function n(f){return!!f.trace_id&&!!f.public_key}const r=gt(e[0]),o=t?.getDsn(),s=t?.getOptions().tunnel,i={sent_at:new Date(Ct()).toISOString(),...n(r)&&{trace:r},...!!s&&o&&{dsn:Nt(o)}},{beforeSendSpan:a,ignoreSpans:c}=t?.getOptions()||{},u=c?.length?e.filter(f=>{const h=$(f);return!yo({description:h.description,op:h.op,attributes:h.data},c)}):e,d=e.length-u.length;d&&t?.recordDroppedEvent("before_send","span",d);const l=a?f=>{const h=$(f),m=Pi(a)?h:a(h);return m||(Zs(),h)}:$,p=[];for(const f of u){const h=l(f);h&&p.push(JS(h))}return it(i,p)}function nb(e){if(!k)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=$(e),{spanId:o}=e.spanContext(),s=Mt(e),i=ve(e),a=i===e,c=`[Tracing] Starting ${s?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${o}`];if(r&&u.push(`parent ID: ${r}`),!a){const{op:d,description:l}=$(i);u.push(`root ID: ${i.spanContext().spanId}`),d&&u.push(`root op: ${d}`),l&&u.push(`root description: ${l}`)}g.log(`${c} 8 ${u.join(` 9 `)}`)}function rb(e){if(!k)return;const{description:t="< unknown name >",op:n="< unknown op >"}=$(e),{spanId:r}=e.spanContext(),s=ve(e)===e,i=`[Tracing] Finishing "${n}" ${s?"root ":""}span "${t}" with ID ${r}`;g.log(i)}function vh(e,t,n,r=Ee()){const o=r&&ve(r);o&&(k&&g.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),o.addEvent(e,{[Po]:t,[Oo]:n}))}function jl(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},o=r[Oo],s=r[Po];
9typeof o=="string"&&typeof s=="number"&&(t[n.name]={value:s,unit:o})}),t}function zl(){return jr(At()).segmentSpanCaptureStrategy}function at(e){return e.getOptions().traceLifecycle==="stream"}const ql=1e3;class Li{constructor(t={}){this._traceId=t.traceId||Ht(),this._spanId=t.spanId||un(),this._startTime=t.startTimestamp||he(),this._links=t.links,this._attributes={},this.setAttributes({[Y]:"manual",[ue]: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(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?xi:ih}}setAttribute(t,n){return this._frozen?this:(n===void 0?delete this._attributes[t]:this._attributes[t]=n,t===le&&n!==void 0&&Ol(this)&&kS(this),this)}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._frozen||(this._startTime=Bt(t))}setStatus(t){return this._frozen?this:(this._status=t,this)}updateName(t){return this._frozen?this:(this._name=t,Ol(this)||this.setAttribute(le,"custom"),this)}end(t){if(this._endTime){this._frozen=Pl(this);return}this._endTime=Bt(t),rb(this),this._onSpanEnded(),this._frozen=Pl(this)}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[ue],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:hh(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[Y],profile_id:this._attributes[ru],exclusive_time:this._attributes[bn],measurements:jl(this._events),is_segment:this._isStandaloneSpan&&ve(this)===this||void 0,segment_id:this._isStandaloneSpan?ve(this).spanContext().spanId:void 0,links:ch(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===ve(this),status:su(this._status),attributes:mh(this._attributes,this._status),links:uh(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){if(this._frozen)return this;k&&g.log("[Tracing] Adding an event to span:",t);const o=Gl(n)?n:r||he(),s=Gl(n)?{}:n||{},i={name:t,time:Bt(o),attributes:s};return this._events.push(i),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=R();t&&(t.emit("spanEnd",this),this._isStandaloneSpan||t.emit("afterSpanEnd",this));const n=ve(this),r=this._isStandaloneSpan||this===n;if(this._isStandaloneSpan){this._sampled?sb(tb([this],t)):(k&&g.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}if(!r){const i=zl();if(i){const a=Fn(this).scope||W();i.onChildSpanEnded(this,n,c=>this._convertSpanToTransaction(c),a)}return}if(t&&at(t)){t.emit("afterSegmentSpanEnd",this);return}const o=Fn(this).scope||W(),s=zl();if(s)s.onSegmentSpanEnded(i=>this._convertSpanToTransaction(i),o);else{const i=this._convertSpanToTransaction();i&&o.captureEvent(i)}}_convertSpanToTransaction(t={}){if(!Vl($(this)))return;this._name||(k&&g.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:n,isolationScope:r}=Fn(this),o=n?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;t.onSpanCaptured?.(this);const s=[];for(const l of Ns(this)){if(l===this||ob(l)||t.isSpanAlreadyCaptured?.(l))continue;const p=$(l);Vl(p)&&(t.onSpanCaptured?.(l),s.push(p))}const i=this._attributes[le];delete this._attributes[dc];let a=!1;s.forEach(l=>{delete l.data[dc],l.op?.startsWith("gen_ai.")&&(a=!0)});const c={contexts:{trace:$S(this)},spans:s.length>ql?s.sort((l,p)=>l.start_timestamp-p.start_timestamp).slice(0,ql):s,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:n,capturedSpanIsolationScope:r,dynamicSamplingContext:gt(this),hasGenAiSpans:a},request:o,...i&&{transaction_info:{source:i}}},u=jl(this._events);return u&&Object.keys(u).length&&(k&&g.log("[Measurements] Adding measurements to transaction event",JSON.stringify(u,void 0,2)),c.measurements=u),c}}function Gl(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function Vl(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function ob(e){return e instanceof Li&&e.isStandaloneSpan()}
9function sb(e){const t=R();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function iu(e,t,n=()=>{},r=()=>{}){let o;try{o=e()}catch(s){throw t(s),n(),s}return ib(o,t,n,r)}function ib(e,t,n,r){return yn(e)?qp(e,o=>{n(),r(o)},o=>{t(o),n()}):(n(),r(e),e)}function ab(e,t,n){if(!Je(e))return[!1];let r,o;typeof e.tracesSampler=="function"?(o=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?o=t.parentSampled:typeof e.tracesSampleRate<"u"&&(o=e.tracesSampleRate,r=!0);const s=jn(o);if(s===void 0)return k&&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(o)} of type ${JSON.stringify(typeof o)}.`),[!1];if(!s)return k&&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,s,r];const i=n<s;return i||k&&g.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(o)})`),[i,s,r]}const hc="__SENTRY_SUPPRESS_TRACING__";function qt(e,t){const n=Xn();if(n.startSpan)return n.startSpan(e,t);const r=lu(e),{forceTransaction:o,parentSpan:s,scope:i}=e,a=i?.clone();return Ke(a,()=>Eh(s)(()=>{const u=W(),d=du(u,s),l=R(),f=e.onlyIfParent&&!d?cu(u,l):uu({parentSpan:d,spanArguments:r,forceTransaction:o,scope:u});return(!Di(f)||!d)&&It(u,f),iu(()=>t(f),()=>{const{status:h}=$(f);f.isRecording()&&(!h||h==="ok")&&f.setStatus({code:re,message:"internal_error"})},()=>{f.end()})}))}function Xt(e,t){const n=Xn();if(n.startSpanManual)return n.startSpanManual(e,t);const r=lu(e),{forceTransaction:o,parentSpan:s,scope:i}=e,a=i?.clone();return Ke(a,()=>Eh(s)(()=>{const u=W(),d=du(u,s),p=e.onlyIfParent&&!d?cu(u,R()):uu({parentSpan:d,spanArguments:r,forceTransaction:o,scope:u});return(!Di(p)||!d)&&It(u,p),iu(()=>t(p,()=>p.end()),()=>{const{status:f}=$(p);p.isRecording()&&(!f||f==="ok")&&p.setStatus({code:re,message:"internal_error"})})}))}function Ge(e){const t=Xn();return t.startInactiveSpan?t.startInactiveSpan(e):cb(e)}function cb(e){const t=lu(e),{forceTransaction:n,parentSpan:r}=e;return(e.scope?s=>Ke(e.scope,s):r!==void 0?s=>Cr(r,s):s=>s())(()=>{const s=W(),i=du(s,r),a=R();return e.onlyIfParent&&!i?cu(s,a):uu({parentSpan:i,spanArguments:t,forceTransaction:n,scope:s})})}const _L=(e,t)=>{const n=At(),r=Sn(n);if(r.continueTrace)return r.continueTrace(e,t);const{sentryTrace:o,baggage:s}=e,i=R(),a=ou(s);return i&&!FS(i,a?.org_id)?lb(t):Ke(c=>{const u=rh(o,s);return c.setPropagationContext(u),It(c,void 0),t()})};function Cr(e,t){const n=Xn();return n.withActiveSpan?n.withActiveSpan(e,t):Ke(r=>(It(r,e||void 0),t(r)))}function ub(e){const t=Xn();return t.suppressTracing?t.suppressTracing(e):Ke(n=>{n.setSDKProcessingMetadata({[hc]:!0});const r=e();return n.setSDKProcessingMetadata({[hc]:void 0}),r})}function au(e=W()){const t=Xn();return t.isTracingSuppressed?t.isTracingSuppressed(e):e.getScopeData().sdkProcessingMetadata[hc]===!0}function lb(e){const t=Xn();return t.startNewTrace?t.startNewTrace(e):Ke(n=>(n.setPropagationContext({traceId:Ht(),sampleRand:$t()}),k&&g.log(`Starting a new trace with id ${n.getPropagationContext().traceId}`),Cr(null,e)))}function cu(e,t){t?.recordDroppedEvent("no_parent_span","span");const n=new zn({traceId:e.getPropagationContext().traceId});return Rr(n,e,Se()),n}function uu({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){const o=Se();if(!Je()){const a=r.getPropagationContext(),c=e?e.spanContext().traceId:a.traceId,u=new zn({traceId:c});return e&&!n&&Cs(e,u),Rr(u,r,o),u}const s=R();if(fb(s,t)){au(r)||s?.recordDroppedEvent("ignored","span");const a=new zn({dropReason:"ignored",traceId:e?.spanContext().traceId??r.getPropagationContext().traceId});return e&&!n&&Cs(e,a),Rr(a,r,o),a}let i;if(e&&!n)i=db(e,r,t,o),Cs(e,i);else if(e){const a=gt(e),{traceId:c,spanId:u}=e.spanContext(),d=Mt(e);i=Yl({traceId:c,parentSpanId:u,...t},r,o,d),Ul(i,a)}else{const{traceId:a,dsc:c,parentSpanId:u,sampled:d}=r.getPropagationContext();i=Yl({traceId:a,parentSpanId:u,...t},r,o,d),c&&Ul(i,c)}return nb(i),i}function lu(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=Bt(e.startTime),delete r.startTime,r}return n}function Xn(){const e=At();return Sn(e)}function Yl(e,t,n,r){const o=R(),s=o?.getOptions()||{},{name:i=""}=e,a={spanAttributes:{...e.attributes},spanName:i,parentSampled:r};o?.emit("beforeSampling",a,{decision:!1});const c=a.parentSampled??r,u=a.spanAttributes,d=t.getPropagationContext(),l=au(t),[p,f,h]=l?[!1]:ab(s,{name:i,parentSampled:c,attributes:u,normalizedRequest:n.getScopeData().sdkProcessingMetadata.normalizedRequest,parentSampleRate:jn(d.dsc?.sample_rate)},d.sampleRand),m=new Li({...e,attributes:{[le]:"custom",[nu]:f!==void 0&&h?f:void 0,...u},sampled:p});return!p&&o&&!l&&(k&&g.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),o.recordDroppedEvent("sample_rate",at(o)?"span":"transaction")),Rr(m,t,n),o&&o.emit("spanStart",m),m}function db(e,t,n,r){const{spanId:o,traceId:s}=e.spanContext(),i=au(t),a=i?!1:Mt(e),c=a?new Li({...n,parentSpanId:o,traceId:s,sampled:a}):new zn({traceId:s});Cs(e,c),Rr(c,t,r);const u=R();return u&&(at(u)&&Ar(c)&&(Ar(e)&&e.dropReason?(c.dropReason=e.dropReason,u.recordDroppedEvent(e.dropReason,"span")):i||(c.dropReason="sample_rate",u.recordDroppedEvent("sample_rate","span"))),u.emit("spanStart",c),n.endTimestamp&&(u.emit("spanEnd",c),u.emit("afterSpanEnd",c))),c}function du(e,t){if(t)return t;if(t===null)return;const n=Ir(e);if(!n)return;const r=R();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?ve(n):n}function Eh(e){return e!==void 0?t=>Cr(e,t):t=>t()}function fb(e,t){const n=e?.getOptions().ignoreSpans;return!e||!at(e)||!n?.length?!1:yo({description:t.name||"",op:t.attributes?.[ue]||t.op,attributes:t.attributes},n)}function Di(e){return Ar(e)&&e.dropReason==="ignored"}const Ms={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},pb="heartbeatFailed",hb="idleTimeout",mb="finalTimeout",gb="externalFinish";function Th(e,t={}){const n=new Map;let r=!1,o,s,i=gb,a=!t.disableAutoFinish;const c=[],{idleTimeout:u=Ms.idleTimeout,finalTimeout:d=Ms.finalTimeout,childSpanTimeout:l=Ms.childSpanTimeout,beforeSpanEnd:p,trimIdleSpanEndTimestamp:f=!0}=t,h=R(),m=W();if(!h||!Je()){const N=new zn({traceId:m.getPropagationContext().traceId});return Rr(N,m,Se()),N}const _=Ee(),y=_b(e);y.end=new Proxy(y.end,{apply(N,v,P){if(p&&p(y),Ar(v))return;const[M,...O]=P,q=M||he(),Q=Bt(q),J=Ns(y).filter(se=>se!==y),U=$(y);if(!J.length||!f)return L(Q),Reflect.apply(N,v,[Q,...O]);const x=h.getOptions().ignoreSpans,H=J?.reduce((se,ne)=>{const ie=$(ne);return!ie.timestamp||x&&yo({description:ie.description,op:ie.op,attributes:ie.data},x)?se:se?Math.max(se,ie.timestamp):ie.timestamp},void 0),D=U.start_timestamp,Z=Math.min(D?D+d/1e3:1/0,Math.max(D||-1/0,Math.min(Q,H||1/0)));return L(Z),Reflect.apply(N,v,[Z,...O])}});function S(){o&&(clearTimeout(o),o=void 0)}function I(){s&&(clearTimeout(s),s=void 0)}function b(N){S(),o=setTimeout(()=>{!r&&n.size===0&&a&&(i=hb,y.end(N))},u)}function T(N){I(),s=setTimeout(()=>{!r&&a&&(i=pb,y.end(N))},l)}function C(N){S(),n.set(N,!0);const v=he();T(v+l/1e3)}function E(N){if(n.has(N)&&n.delete(N),n.size===0){const v=he();b(v+u/1e3),I()}}
9function L(N){r=!0,n.clear(),c.forEach(J=>J()),It(m,_);const v=$(y),{start_timestamp:P}=v;if(!P)return;v.data[_o]||y.setAttribute(_o,i);const O=v.status;(!O||O==="unknown")&&y.setStatus({code:Lo}),g.log(`[Tracing] Idle span "${v.op}" finished`);const q=Ns(y).filter(J=>J!==y);let Q=0;q.forEach(J=>{J.isRecording()&&(J.setStatus({code:re,message:"cancelled"}),J.end(N),k&&g.log("[Tracing] Cancelling span since span ended early",JSON.stringify(J,void 0,2)));const U=$(J),{timestamp:x=0,start_timestamp:H=0}=U,D=H<=N,Z=(d+u)/1e3,se=x-H<=Z;if(k){const ne=JSON.stringify(J,void 0,2);D?se||g.log("[Tracing] Discarding span since it finished after idle span final timeout",ne):g.log("[Tracing] Discarding span since it happened after idle span was finished",ne)}(!se||!D)&&(HS(y,J),Q++)}),Q>0&&y.setAttribute("sentry.idle_span_discarded_spans",Q)}return c.push(h.on("spanStart",N=>{if(r||N===y||$(N).timestamp||N instanceof Li&&N.isStandaloneSpan())return;Ns(y).includes(N)&&C(N.spanContext().spanId)})),c.push(h.on("spanEnd",N=>{r||E(N.spanContext().spanId)})),c.push(h.on("idleSpanEnableAutoFinish",N=>{N===y&&(a=!0,b(),n.size&&T())})),t.disableAutoFinish||b(),setTimeout(()=>{r||(y.setStatus({code:re,message:"deadline_exceeded"}),i=mb,y.end())},d),y}function _b(e){const t=Ge(e);return It(W(),t),k&&g.log("[Tracing] Started span is an idle span"),t}function yb(e,t,n){let r,o,s;const i=n?.maxWait?Math.max(n.maxWait,t):0,a=n?.setTimeoutImpl||setTimeout;function c(){return u(),r=e(),r}function u(){o!==void 0&&clearTimeout(o),s!==void 0&&clearTimeout(s),o=s=void 0}function d(){return o!==void 0||s!==void 0?c():r}function l(){return o&&clearTimeout(o),o=a(c,t),i&&s===void 0&&(s=a(c,i)),r}return l.cancel=u,l.flush=d,l}const Sb=["addListener","on","once","prependListener","prependOnceListener","addEventListener"],bb=["removeListener","off","removeEventListener"],Ih=Symbol("SentryScopeBoundListeners");let _r;function vb(e){return _r!==void 0&&(e===_r||e.listener===_r)}function yL(e,t=W()){const n=e;if(Fi(n))return e;fu(n);for(const r of Sb)typeof n[r]=="function"&&(n[r]=Tb(n,n[r],t));for(const r of bb)typeof n[r]=="function"&&(n[r]=Ib(n,n[r]));return typeof n.removeAllListeners=="function"&&(n.removeAllListeners=wb(n,n.removeAllListeners)),e}function Eb(e,t){return function(...n){return Ke(t,()=>e.apply(this,n))}}function wh(e){return typeof e=="function"}function Tb(e,t,n){return function(...r){const o=r[0],s=r[1],i=r.slice(2);if(!wh(s)||vb(s))return t.apply(this,r);const a=Fi(e)||fu(e);let c=a.get(o);c||(c=new WeakMap,a.set(o,c));let u=c.get(s);u||(u=Eb(s,n),c.set(s,u));const d=_r;_r=u;try{return t.call(this,o,u,...i)}finally{_r=d}}}function Ib(e,t){return function(...n){const r=n[0],o=n[1],s=n.slice(2),i=wh(o)?Fi(e)?.get(r)?.get(o):void 0;return i?t.call(this,r,i,...s):t.apply(this,n)}}function wb(e,t){return function(...n){const r=Fi(e);if(r)if(n.length===0)fu(e);else{const o=n[0];r.delete(o)}return t.apply(this,n)}}function fu(e){const t=new Map;return e[Ih]=t,t}function Fi(e){return e[Ih]}function kb(e,t){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=t;Rb(e,t),r&&Nb(e,r),Mb(e,n),Ab(e,o),Cb(e,s)}function Jl(e,t){const{extra:n,tags:r,attributes:o,user:s,contexts:i,level:a,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:d,eventProcessors:l,attachments:p,propagationContext:f,transactionName:h,span:m}=t;eo(e,"extra",n),eo(e,"tags",r),eo(e,"attributes",o),eo(e,"user",s),eo(e,"contexts",i),e.sdkProcessingMetadata=xo(e.sdkProcessingMetadata,c,2),a&&(e.level=a),h&&(e.transactionName=h),m&&(e.span=m),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),d.length&&(e.fingerprint=[...e.fingerprint,...d]),l.length&&(e.eventProcessors=[...e.eventProcessors,...l]),p.length&&(e.attachments=[...e.attachments,...p]),e.propagationContext={...e.propagationContext,...f}}function eo(e,t,n){e[t]=xo(e[t],n,1)}function $o(e,t){const n=gr().getScopeData();return e&&Jl(n,e.getScopeData()),t&&Jl(n,t.getScopeData()),n}function Rb(e,t){const{extra:n,tags:r,user:o,contexts:s,level:i,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(o).length&&(e.user={...o,...e.user}),Object.keys(s).length&&(e.contexts={...s,...e.contexts}),i&&(e.level=i),a&&e.type!=="transaction"&&(e.transaction=a)}function Ab(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Cb(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Nb(e,t){e.contexts={trace:ah(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:gt(t),...e.sdkProcessingMetadata};const n=ve(t),r=$(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function Mb(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 xb(e){const t={},{response:n,profile:r,cloud_resource:o,culture:s,state:i}=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)),o)for(const[u,d]of Object.entries(o))d!=null&&(t[u]=d);s&&(s.locale&&(t["culture.locale"]=s.locale),s.timezone&&(t["culture.timezone"]=s.timezone)),i?.state&&typeof i.state.type=="string"&&(t["state.type"]=i.state.type);const a=e.angular;if(a){const u=a.version;(typeof u=="string"||typeof u=="number")&&(t["angular.version"]=u)}const c=e.react;if(c){const u=c.version;(typeof u=="string"||typeof u=="number")&&(t["react.version"]=u)}return t}const Nr="gen_ai.usage.cache_creation.input_tokens",Mr="gen_ai.usage.cache_read.input_tokens",kh="gen_ai.usage.reasoning.output_tokens",R
9h="graphql.document",Ob="http.request.header",Ah="http.url",Pb="params",Lb="sentry.op",Db="sentry.sdk.name",Fb="sentry.sdk.version",$b="sentry.segment.id",pu="sentry.segment.name",Bb="sentry.trace_lifecycle",Ch="sentry.transaction",vn="url.full",Nh="url.path",Ub="url.path.parameter",Ve="url.template",Hb="user_agent.original";function Wb(e,t){const n=Xs(e),r=Qs(e),o=Xs(r),{isolationScope:s,scope:i}=Fn(e),a=$o(s,i);qb(n,o,t,a);const c=e.kind;t.emit("preprocessSpan",n,{spanKind:c}),n.is_segment&&(jb(n,a),zb(n,t),t.emit("processSegmentSpan",n)),t.emit("processSpan",n);const{beforeSendSpan:u}=t.getOptions(),d=u&&Pi(u)?Gb(n,u):n,l=d.attributes?.[le];return n.is_segment&&l&&ln(d,{"sentry.segment.name.source":l}),{...dh(d),_segmentSpan:r}}function jb(e,t){const n=xb(t.contexts);ln(e,n)}function ln(e,t){const n=e.attributes??(e.attributes={});Object.entries(t).forEach(([r,o])=>{o!=null&&!(r in n)&&(n[r]=o)})}function zb(e,t){const n=t.getIntegrationNames();n.length&&ln(e,{[hS]:n})}function qb(e,t,n,r){const o=n.getSdkMetadata(),{release:s,environment:i}=n.getOptions();ln(e,{[Bb]:"stream",[pu]:t.name,[$b]:t.span_id,[Db]:o?.sdk?.name,[Fb]:o?.sdk?.version,[fS]:s,[pS]:i||Do,[mS]:r.user?.id,[gS]:r.user?.email,[_S]:r.user?.ip_address,[yS]:r.user?.username,...r.attributes})}function Gb(e,t){const n=t(e);return n||(Zs(),e)}const Ra=0,Kl=1,Xl=2;function Bo(e){return new So(t=>{t(e)})}function Mh(e){return new So((t,n)=>{n(e)})}class So{constructor(t){this._state=Ra,this._handlers=[],this._runExecutor(t)}then(t,n){return new So((r,o)=>{this._handlers.push([!1,s=>{if(!t)r(s);else try{r(t(s))}catch(i){o(i)}},s=>{if(!n)o(s);else try{r(n(s))}catch(i){o(i)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new So((n,r)=>{let o,s;return this.then(i=>{s=!1,o=i,t&&t()},i=>{s=!0,o=i,t&&t()}).then(()=>{if(s){r(o);return}n(o)})})}_executeHandlers(){if(this._state===Ra)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Kl&&n[1](this._value),this._state===Xl&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(s,i)=>{if(this._state===Ra){if(yn(i)){i.then(r,o);return}this._state=s,this._value=i,this._executeHandlers()}},r=s=>{n(Kl,s)},o=s=>{n(Xl,s)};try{t(r,o)}catch(s){o(s)}}}function Vb(e,t,n,r=0){try{const o=mc(t,n,e,r);return yn(o)?o:Bo(o)}catch(o){return Mh(o)}}function mc(e,t,n,r){const o=n[r];if(!e||!o)return e;const s=o({...e},t);return k&&s===null&&g.log(`Event processor "${o.id||"?"}" dropped event`),yn(s)?s.then(i=>mc(i,t,n,r+1)):mc(s,t,n,r+1)}let An,Ql,Zl,Gt;function xh(e){const t=B._sentryDebugIds,n=B._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],o=n?Object.keys(n):[];if(Gt&&r.length===Ql&&o.length===Zl)return Gt;Ql=r.length,Zl=o.length,Gt={},An||(An={});const s=(i,a)=>{for(const c of i){const u=a[c],d=An?.[c];if(d&&Gt&&u)Gt[d[0]]=u,An&&(An[c]=[d[0],u]);else if(u){const l=e(c);for(let p=l.length-1;p>=0;p--){const h=l[p]?.filename;if(h&&Gt&&An){Gt[h]=u,An[c]=[h,u];break}}}}};return t&&s(r,t),n&&s(o,n),Gt}function Yb(e,t){const n=xh(e);if(!n)return[];const r=[];for(const o of t){const s=My(o);s&&n[s]&&r.push({type:"sourcemap",code_file:o,debug_id:n[s]})}return r}function gc(e){return e.data?.__sentry__===!0}function Oh(e){const t=[];e.message&&t.push(e.message);try{const 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 Ph(e,t,n,r,o,s){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||Ce(),timestamp:t.timestamp||Kn()},u=n.integrations||e.integrations.map(_=>_.name);Jb(c,e),Qb(c,u),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&Kb(c,e.stackParser);const d=ev(r,n.captureContext);n.mechanism&&bt(c,n.mechanism);const l=o?o.getEventProcessors():[],p=$o(s,d),f=[...n.attachments||[],...p.attachments];f.length&&(n.attachments=f),kb(c,p);const h=[...l,...p.eventProcessors];return(gc(n)?Bo(c):Vb(h,c,n)).then(_=>(_&&Xb(_),typeof i=="number"&&i>0?Zb(_,i,a):_))}function Jb(e,t){const{environment:n,release:r,dist:o,maxValueLength:s}=t;e.environment=e.environment||n||Do,!e.release&&r&&(e.release=r),!e.dist&&o&&(e.dist=o);const i=e.request;i?.url&&s&&(i.url=go(i.url,s)),s&&e.exception?.values?.forEach(a=>
9{a.value&&(a.value=go(a.value,s))})}function Kb(e,t){const n=xh(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.filename&&(o.debug_id=n[o.filename])})})}function Xb(e){const t={};if(e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.debug_id&&(o.abs_path?t[o.abs_path]=o.debug_id:o.filename&&(t[o.filename]=o.debug_id),delete o.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([r,o])=>{n.push({type:"sourcemap",code_file:r,debug_id:o})})}function Qb(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Zb(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:ke(o.data,t,n)}}))},...e.user&&{user:ke(e.user,t,n)},...e.contexts&&{contexts:ke(e.contexts,t,n)},...e.extra&&{extra:ke(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=ke(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(o=>({...o,...o.data&&{data:ke(o.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=ke(e.contexts.flags,3,n)),r}function ev(e,t){if(!t)return e;const n=e?e.clone():new wt;return n.update(t),n}function tv(e){if(e)return nv(e)?{captureContext:e}:ov(e)?{captureContext:e}:e}function nv(e){return e instanceof wt||typeof e=="function"}const rv=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function ov(e){return Object.keys(e).some(t=>rv.includes(t))}function mt(e,t){return W().captureException(e,tv(t))}function sv(e,t){const n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return W().captureMessage(e,n,r)}function Uo(e,t){return W().captureEvent(e,t)}function Lh(e,t){Se().setContext(e,t)}function SL(e){Se().setExtras(e)}function bL(e,t){Se().setExtra(e,t)}function vL(e){Se().setTags(e)}function EL(e,t){Se().setTag(e,t)}function TL(e){Se().setAttributes(e)}function IL(e,t){Se().setAttribute(e,t)}function wL(e){Se().setUser(e)}function kL(e){Se().setConversationId(e)}function iv(){return Se().lastEventId()}async function RL(e){const t=R();return t?t.flush(e):(k&&g.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function AL(e){const t=R();return t?t.close(e):(k&&g.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}function CL(){return!!R()}function av(){const e=R();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function cv(e){Se().addEventProcessor(e)}function ed(e){const t=Se(),{user:n}=$o(t,W()),{userAgent:r}=B.navigator||{},o=Xy({user:n,...r&&{userAgent:r},...e}),s=t.getSession();return s?.status==="ok"&&Tr(s,{status:"exited"}),Dh(),t.setSession(o),o}function Dh(){const e=Se(),n=W().getSession()||e.getSession();n&&Qy(n),Fh(),e.setSession()}function Fh(){const e=Se(),t=R(),n=e.getSession();n&&t&&t.captureSession(n)}function Aa(e=!1){if(e){Dh();return}Fh()}function $i(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}const uv="7";function $h(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function lv(e){return`${$h(e)}${e.projectId}/envelope/`}function dv(e,t){const n={sentry_version:uv};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function Bh(e,t,n){return t||`${lv(e)}?${dv(e,n)}`}function fv(e,t){const n=th(e);if(!n)return"";const r=`${$h(n)}embed/error-page/`;let o=`dsn=${Nt(n)}`;for(const s in t)if(s!=="dsn"&&s!=="onClose")if(s==="user"){const i=t.user;if(!i)continue;i.name&&(o+=`&name=${encodeURIComponent(i.name)}`),i.email&&(o+=`&email=${encodeURIComponent(i.email)}`)}else o+=`&${encodeURIComponent(s)}=${encodeURIComponent(t[s])}`;return`${r}?${o}`}const td=[];function pv(e){const t={};return e.forEach(n=>{const{name:r}=n,o=t[r];o&&!o.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function hv(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const o=n(t);r=Array.isArray(o)?o:[o]}else r=t;return pv(r)}function mv(e,t){const n={};return t.forEach(r=>{r?.beforeSetup&&r.beforeSetup(e)}),t.forEach(r=>{r&&Uh(e,r,n)}),n}
9function nd(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function Uh(e,t,n){if(n[t.name]){k&&g.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!td.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),td.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(o,s)=>r(o,s,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),o=Object.assign((s,i)=>r(s,i,e),{id:t.name});e.addEventProcessor(o)}["processSpan","processSegmentSpan"].forEach(r=>{const o=t[r];typeof o=="function"&&e.on(r,s=>o.call(t,s,e))}),k&&g.log(`Integration installed: ${t.name}`)}function rd(e){const t=R();if(!t){k&&g.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}const gv="sentry.timestamp.sequence";let Ca=0,Na;function Hh(e){const t=Math.floor(e*1e3);Na!==void 0&&t!==Na&&(Ca=0);const n=Ca;return Ca++,Na=t,{key:gv,value:{value:n,type:"integer"}}}function Wh(e,t){return t?Ke(t,()=>{const n=Ee(),r=n?ah(n):Gp(t);return[n?gt(n):Oi(e,t),r]}):[void 0,void 0]}const _v={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function yv(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function Sv(){return"npm"}function bv(){return!yv()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function dn(){return typeof window<"u"&&(!bv()||vv())}function vv(){return B.process?.type==="renderer"}function Ev(e,t){const n=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...dn()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function Tv(e,t,n,r,o){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=Nt(r)),it(s,[Ev(e,o)])}const Iv=100;function yt(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function wv(e,t){const n=hu(),r=zh(e);r===void 0?n.set(e,[t]):r.length>=Iv?(jh(e,r),n.set(e,[t])):n.set(e,[...r,t])}function ni(e,t=W(),n=wv){const r=t?.getClient()??R();if(!r){k&&g.warn("No client available to capture log.");return}const{release:o,environment:s,enableLogs:i=!0,beforeSendLog:a}=r.getOptions();if(!i){k&&g.warn("logging option not enabled, log will not be captured.");return}const[,c]=Wh(r,t),u={...e.attributes},{user:{id:d,email:l,username:p},attributes:f={}}=$o(Se(),t);yt(u,"user.id",d,!1),yt(u,"user.email",l,!1),yt(u,"user.name",p,!1),yt(u,"sentry.release",o),yt(u,"sentry.environment",s);const{name:h,version:m}=r.getSdkMetadata()?.sdk??{};yt(u,"sentry.sdk.name",h),yt(u,"sentry.sdk.version",m);const _=r.getIntegrationByName("Replay"),y=_?.getReplayId(!0);yt(u,"sentry.replay_id",y),y&&_?.getRecordingMode()==="buffer"&&yt(u,"sentry._internal.replay_is_buffering",!0);const S=e.message;if(Ci(S)){const{__sentry_template_string__:O,__sentry_template_values__:q=[]}=S;q?.length&&(u["sentry.message.template"]=O),q.forEach((Q,J)=>{u[`sentry.message.parameter.${J}`]=Q})}const I=Ir(t);yt(u,"sentry.trace.parent_span_id",I?.spanContext().spanId);const b={...e,attributes:u};r.emit("beforeCaptureLog",b);const T=a?zt(()=>a(b)):b;if(!T){r.recordDroppedEvent("before_send","log_item",1),k&&g.warn("beforeSendLog returned null, log will not be captured.");return}const{level:C,message:E,attributes:L={},severityNumber:N}=T,v=he(),P=Hh(v),M={timestamp:v,level:C,body:_c(String(E)),trace_id:c?.trace_id,severity_number:N??_v[C],attributes:kv({...kr(f),...kr(L,!0),[P.key]:P.value})};n(r,M),r.emit("afterCaptureLog",T)}function jh(e,t){const n=t??zh(e)??[];if(n.length===0)return;const r=e.getOptions(),o=Tv(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);hu().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function zh(e){return hu().get(e)}function hu(){return zr("clientToLogBufferMap",()=>new WeakMap)}function kv(e){const t={};for(const[n,r]of Object.entries(e)){const o=_c(n);r.type==="string"?t[o]={...r,value:_c(r.value)}:t[o]=r}return t}function _c(e){const 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 Rv(e,t){const n=t?"auto":"never";return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{version:2,...dn()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function Av(e,t,n,r,o){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=Nt(r)),it(s,[Rv(e,o)])}const Cv=1e3;function Lt(e,t,n,r=!0){n&&(r||!(t in e))&&(e[t]=n)}function Nv(e,t){const n=mu(),r=Gh(e);r===void 0?n.set(e,[t]):r.length>=Cv?(qh(e,r),n.set(e,[t])):n.set(e,[...r,t])}function Mv(e,t,n){const{release:r,environment:o}=t.getOptions(),s={...e.attributes};
9Lt(s,"user.id",n.id,!1),Lt(s,"user.email",n.email,!1),Lt(s,"user.name",n.username,!1),Lt(s,"sentry.release",r),Lt(s,"sentry.environment",o);const{name:i,version:a}=t.getSdkMetadata()?.sdk??{};Lt(s,"sentry.sdk.name",i),Lt(s,"sentry.sdk.version",a);const c=t.getIntegrationByName("Replay"),u=c?.getReplayId(!0);return Lt(s,"sentry.replay_id",u),u&&c?.getRecordingMode()==="buffer"&&Lt(s,"sentry._internal.replay_is_buffering",!0),{...e,attributes:s}}function xv(e,t,n,r){const[,o]=Wh(t,n),s=Ir(n),i=s?s.spanContext().traceId:o?.trace_id,a=s?s.spanContext().spanId:void 0,c=he(),u=Hh(c);return{timestamp:c,trace_id:i??"",span_id:a,name:e.name,type:e.type,unit:e.unit,value:e.value,attributes:{...kr(r),...kr(e.attributes,"skip-undefined"),[u.key]:u.value}}}function Ov(e,t){const n=t?.scope??W(),r=t?.captureSerializedMetric??Nv,o=n?.getClient()??R();if(!o){k&&g.warn("No client available to capture metric.");return}const{_experiments:s,enableMetrics:i,beforeSendMetric:a}=o.getOptions();if(!(i??s?.enableMetrics??!0)){k&&g.warn("metrics option not enabled, metric will not be captured.");return}const{user:u,attributes:d}=$o(Se(),n),l=Mv(e,o,u);
9o.emit("processMetric",l);const p=a||s?.beforeSendMetric,f=p?p(l):l;if(!f){k&&g.log("`beforeSendMetric` returned `null`, will not send metric.");return}const h=xv(f,o,n,d);k&&g.log("[Metric]",h),r(o,h),o.emit("afterCaptureMetric",f)}function qh(e,t){const n=t??Gh(e)??[];if(n.length===0)return;const r=e.getOptions(),o=Av(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);mu().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function Gh(e){return mu().get(e)}function mu(){return zr("clientToMetricBufferMap",()=>new WeakMap)}function Pv(e){const 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 dh(t)}function Lv(e,t){if(e.type!=="transaction"||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||t.getOptions().streamGenAiSpans===!1||at(t))return;const n=[],r=[];for(const s of e.spans)s.op?.startsWith("gen_ai.")?n.push(Pv(s)):r.push(s);if(n.length===0)return;e.spans=r;const o=t.getDataCollectionOptions().userInfo?"auto":"never";return[{type:"span",item_count:n.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...dn()&&{ingest_settings:{infer_ip:o,infer_user_agent:o}},items:n}]}const gu=Symbol.for("SentryBufferFullError");function _u(e=100){const t=new Set;function n(){return t.size<e}function r(i){t.delete(i)}function o(i){if(!n())return Mh(gu);const a=i();return t.add(a),a.then(()=>r(a),()=>r(a)),a}function s(i){if(!t.size)return Bo(!0);const a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!i)return a;const c=[a,new Promise(u=>$i(setTimeout(()=>u(!1),i)))];return Promise.race(c)}return{get $(){return Array.from(t)},add:o,drain:s}}const Dv=60*1e3;function Vh(e,t=Ct()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?Dv:r-t}function Fv(e,t){return e[t]||e.all||0}function Yh(e,t,n=Ct()){return Fv(e,t)>n}function Jh(e,{statusCode:t,headers:n},r=Ct()){const o={...e},s=n?.["x-sentry-rate-limits"],i=n?.["retry-after"];if(s)for(const a of s.trim().split(",")){const[c,u,,,d]=a.split(":",5),l=parseInt(c,10),p=(isNaN(l)?60:l)*1e3;if(!u)o.all=r+p;else for(const f of u.split(";"))f==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(o[f]=r+p):o[f]=r+p}else i?o.all=r+Vh(i,r):t===429&&(o.all=r+60*1e3);return o}const Kh=64;function $v(e,t,n=_u(e.bufferSize||Kh)){let r={};const o=i=>n.drain(i);function s(i){const a=[];if(qn(i,(l,p)=>{const f=Wl(p);Yh(r,f)?e.recordDroppedEvent("ratelimit_backoff",f):a.push(l)}),a.length===0)return Promise.resolve({});const c=it(i[0],a),u=l=>{if(pc(c,["client_report"])){k&&g.warn(`Dropping client report. Will not send outcomes (reason: ${l}).`);return}qn(c,(p,f)=>{e.recordDroppedEvent(l,Wl(f))})},d=()=>t({body:ti(c)}).then(l=>l.statusCode===413?(k&&g.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),u("send_error"),l):(k&&l.statusCode!==void 0&&(l.statusCode<200||l.statusCode>=300)&&g.warn(`Sentry responded with status code ${l.statusCode} to sent event.`),r=Jh(r,l),l),l=>{throw u("network_error"),k&&g.error("Encountered error running transport request:",l),l});return n.add(d).then(l=>l,l=>{if(l===gu)return k&&g.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw l})}return{send:s,flush:o}}function Bv(e,t,n){const r=[{type:"client_report"},{timestamp:Kn(),discarded_events:e}];return it(t?{dsn:t}:{},[r])}function Uv(e){const{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:s,data:i,op:a}=e.contexts?.trace??{};return{data:i??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:t??"",origin:s,profile_id:i?.[ru],exclusive_time:i?.[bn],measurements:e.measurements,is_segment:!0}}function Hv(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&&{[ru]:e.profile_id},...e.exclusive_time&&{[bn]:e.exclusive_time}}}},measurements:e.measurements}}const yu="[Filtered]",ds=["forwarded","-ip","remote-","via","-user"],od=["auth","token","secret","session","password","passwd","pwd","key","jwt","bearer","sso","saml","csrf","xsrf","credentials","sid","identity","set-cookie","cookie"],Wv=[".sid","sessid","remember","oidc","pkce","nonce","__secure-","__host-","awsalb","awselb","akamai","__stripe","cognito","firebase","supabase","sb-","mfa","2fa"];function jv(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}
9,databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:7}:{userInfo:!1,cookies:{deny:ds},httpHeaders:{request:{deny:ds},response:{deny:ds}},httpBodies:[],urlQueryParams:{deny:ds},graphQL:{document:!0,variables:!0},genAI:{inputs:!1,outputs:!1},databaseQueryData:!1,stackFrameVariables:!0,frameContextLines:7}}const zv={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:5};function qv(e){return typeof e=="boolean"||"allow"in e||"deny"in e}function Gv(e,t){return e===void 0?{...t.httpHeaders}:qv(e)?{request:e,response:e}:{request:e.request??t.httpHeaders.request,response:e.response??t.httpHeaders.response}}function Vv(e){const t=e.dataCollection!=null?zv:jv(e.sendDefaultPii),n=e.dataCollection??{};return{userInfo:n.userInfo??t.userInfo,cookies:n.cookies??t.cookies,httpHeaders:Gv(n.httpHeaders,t),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}}const sd="Not capturing exception because it's already been captured.",id="Discarded session because of missing or non-string release",Xh=Symbol.for("SentryInternalError"),Qh=Symbol.for("SentryDoNotSendEventError"),Yv=5e3;function xs(e){return{message:e,[Xh]:!0}}function Ma(e){return{message:e,[Qh]:!0}}function ad(e){return xe(e)&&Xh in e}function cd(e){return xe(e)&&Qh in e}function ud(e,t,n,r,o){let s=0,i,a=!1;e.on(n,()=>{s=0,clearTimeout(i),a=!1}),e.on(t,c=>{if(s+=r(c),s>=8e5)o(e);else if(!a){const u=e.getOptions()._flushInterval??Yv;u>0&&(a=!0,i=$i(setTimeout(()=>{o(e)},u)))}}),e.on("flush",()=>{o(e)})}class Jv{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=_u(t.transportOptions?.bufferSize??Kh),this._dataCollection=Vv(t),t.dsn?this._dsn=th(t.dsn):k&&g.warn("No DSN provided, client will not send events."),this._dsn){const r=Bh(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&&ud(this,"afterCaptureLog","flushLogs",Zv,jh),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&ud(this,"afterCaptureMetric","flushMetrics",Qv,qh)}captureException(t,n,r){const o=Ce();if(Rl(t))return k&&g.log(sd),o;const s={event_id:o,...n};return this._process(()=>this.eventFromException(t,s).then(i=>this._captureEvent(i,s,r)).then(i=>i),"error"),s.event_id}captureMessage(t,n,r,o){const s={event_id:Ce(),...r},i=Ci(t)?t:String(t),a=Tt(t),c=a?this.eventFromMessage(i,n,s):this.eventFromException(t,s);return this._process(()=>c.then(u=>this._captureEvent(u,s,o)),a?"unknown":"error"),s.event_id}captureEvent(t,n,r){const o=Ce();if(n?.originalException&&Rl(n.originalException))return k&&g.log(sd),o;const s={event_id:o,...n},i=t.sdkProcessingMetadata||{},a=i.capturedSpanScope,c=i.capturedSpanIsolationScope,u=ld(t.type);return this._process(()=>this._captureEvent(t,s,a||r,c),u),s.event_id}captureSession(t){this.sendSession(t),Tr(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){const n=this._transport;if(this.emit("flush"),!n)return!0;const r=await this._isClientDoneProcessing(t),o=await n.flush(t);return r&&o}async close(t){const n=await this.flush(t);
9return 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){const n=this._integrations[t.name];!n&&t.beforeSetup&&t.beforeSetup(this),Uh(this,t,this._integrations),n||nd(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);const r=Lv(t,this);let o=eb(t,this._dsn,this._options._metadata,this._options.tunnel);if(!gc(n))for(const s of n.attachments||[])o=Hl(o,KS(s));r&&(o=Hl(o,r)),this.sendEnvelope(o).then(s=>this.emit("afterSendEvent",t,s))}sendSession(t){const{release:n,environment:r=Do}=this._options;if("aggregates"in t){const s=t.attrs||{};if(!s.release&&!n){k&&g.warn(id);return}s.release=s.release||n,s.environment=s.environment||r,t.attrs=s}else{if(!t.release&&!n){k&&g.warn(id);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const o=ZS(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(o)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const o=`${t}:${n}`;k&&g.log(`Recording outcome: "${o}"${r>1?` (${r} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||new Set,o=(...s)=>n(...s);return r.add(o),()=>{r.delete(o)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(o=>o(...n))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(n){return k&&g.error("Error while sending envelope:",n),{}}return k&&g.error("Transport disabled"),{}}registerCleanup(t){}dispose(){}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=mv(this,t),nd(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",o=!1;const s=n.exception?.values;if(s){o=!0,r=!1;for(const c of s)if(c.mechanism?.handled===!1){r=!0;break}}const i=t.status==="ok";(i&&t.errors===0||i&&r)&&(Tr(t,{...r&&{status:"crashed"},errors:t.errors||Number(o||r)}),this.captureSession(t))}async _isClientDoneProcessing(t){let n=0;for(;!t||n<t;){if(await new Promise(r=>setTimeout(r,1)),!this._numProcessing)return!0;n++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,o){const s=this.getOptions(),i=this.getIntegrationNames();return!n.integrations&&i.length&&(n.integrations=i),this.emit("preprocessEvent",t,n),t.type||o.setLastEventId(t.event_id||n.event_id),Ph(s,t,n,r,this,o).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:{...a.contexts?.trace,...Gp(r)},...a.contexts};const c=Oi(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=W(),o=Se()){return k&&yc(t)&&g.log(`Captured error event \`${Oh(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,o).then(s=>s.event_id,s=>{k&&(cd(s)?g.log(s.message):ad(s)?g.warn(s.message):g.warn(s))})}_processEvent(t,n,r,o){const s=this.getOptions(),{sampleRate:i}=s,a=Zh(t),c=yc(t),d=`before send for type \`${t.type||"error"}\``,l=typeof i>"u"?void 0:jn(i),p=ld(t.type);return this._prepareEvent(t,n,r,o).then(f=>{if(f===null)throw this.recordDroppedEvent("event_processor",p),Ma("An event processor returned `null`, will not send event.");if(gc(n))return f;const h=Xv(this,s,f,n);return Kv(h,d)}).then(f=>{if(f===null){if(this.recordDroppedEvent("before_send",p),a){const y=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",y)}throw Ma(`${d} returned \`null\`, will not send event.`)}const h=r.getSession()||o.getSession();if(c&&h&&this._updateSessionFromEvent(h,f),c&&typeof l=="number"&&$t()>l)throw this.recordDroppedEvent("sample_rate","error"),Ma(`Discarding event because it's not included in the random sample (sampling rate = ${i})`);if(a){const _=f.sdkProcessingMetadata?.spanCountBeforeProcessing||0,y=f.spans?f.spans.length:0,S=_-y;S>0&&this.recordDroppedEvent("before_send","span",S)}const m=f.transaction_info;if(a&&m&&f.transaction!==t.transaction){const _="custom";f.transaction_info={...m,source:_}}
9return this.sendEvent(f,n),f}).then(null,f=>{throw cd(f)||ad(f)?f:(this.captureException(f,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:f}),xs(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. 10Reason: ${f}`))})}_process(t,n){this._numProcessing++,this._promiseBuffer.add(t).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===gu&&this.recordDroppedEvent("queue_overflow",n),r))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[o,s]=n.split(":");return{reason:o,category:s,quantity:r}})}_flushOutcomes(){k&&g.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){k&&g.log("No outcomes to send");return}if(!this._dsn){k&&g.log("No dsn provided, will not send outcomes");return}k&&g.log("Sending outcomes:",t);const n=Bv(t,this._options.tunnel&&Nt(this._dsn));this.sendEnvelope(n)}}function ld(e){return e==="replay_event"?"replay":e||"error"}function Kv(e,t){const n=`${t} must return \`null\` or a valid event.`;if(yn(e))return e.then(r=>{if(!De(r)&&r!==null)throw xs(n);return r},r=>{throw xs(`${t} rejected with ${r}`)});if(!De(e)&&e!==null)throw xs(n);return e}function Xv(e,t,n,r){const{beforeSend:o,beforeSendTransaction:s,ignoreSpans:i}=t,a=!Pi(t.beforeSendSpan)&&t.beforeSendSpan;let c=n;if(yc(c)&&o)return o(c,r);if(Zh(c)){if(a||i){const u=Uv(c);if(i?.length&&yo({description:u.description,op:u.op,attributes:u.data},i))return null;if(a){const d=a(u);d?c=xo(n,Hv(d)):Zs()}if(c.spans){const d=[],l=c.spans;for(const f of l){if(i?.length&&yo({description:f.description,op:f.op,attributes:f.data},i)){zS(l,f);continue}if(a){const h=a(f);h?d.push(h):(Zs(),d.push(f))}else d.push(f)}const p=c.spans.length-d.length;p&&e.recordDroppedEvent("before_send","span",p),c.spans=d}}if(s){if(c.spans){const u=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:u}}return s(c,r)}}return c}function yc(e){return e.type===void 0}function Zh(e){return e.type==="transaction"}function Qv(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+em(e.attributes)}function Zv(e){let t=0;return e.message&&(t+=e.message.length*2),t+em(e.attributes)}function em(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*dd(n[0]):Tt(n)?t+=dd(n):t+=100}),t}function dd(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function eE(e,t){t.debug===!0&&(k?g.enable():zt(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),W().update(t.initialScope);const r=new e(t);return tE(r),r.init(),r}function tE(e){W().setClient(e)}const xa=100,Oa=5e3,nE=36e5;function rE(e){function t(...n){k&&g.log("[Offline]:",...n)}return n=>{const r=e(n);if(!n.createStore)throw new Error("No `createStore` function was provided");const o=n.createStore(n);let s=Oa,i;function a(l,p,f){return pc(l,["client_report"])?!1:n.shouldStore?n.shouldStore(l,p,f):!0}function c(l){i&&clearTimeout(i),i=$i(setTimeout(async()=>{i=void 0;const p=await o.shift();p&&(t("Attempting to send previously queued event"),p[0].sent_at=new Date(Ct()).toISOString(),d(p,!0).catch(f=>{t("Failed to retry sending",f)}))},l))}function u(){i||(c(s),s=Math.min(s*2,nE))}async function d(l,p=!1){if(!p&&pc(l,["replay_event","replay_recording"]))return await o.push(l),c(xa),{};try{if(n.shouldSend&&await n.shouldSend(l)===!1)throw new Error("Envelope not sent because `shouldSend` callback returned false");const f=await r.send(l);let h=xa;if(f){if(f.headers?.["retry-after"])h=Vh(f.headers["retry-after"]);else if(f.headers?.["x-sentry-rate-limits"])h=6e4;else if((f.statusCode||0)>=400)return f}return c(h),s=Oa,f}catch(f){if(await a(l,f,s))return p?await o.unshift(l):await o.push(l),u(),t("Error sending. Event queued.",f),{};throw f}}return n.flushAtStartup&&u(),{send:d,flush:l=>(l===void 0&&(s=Oa,c(xa)),r.flush(l))}}}const Pa="MULTIPLEXED_TRANSPORT_EXTRA_KEY";function tm(e,t){let n;return qn(e,(r,o)=>(t.includes(o)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function oE(e,t){return n=>{const r=e(n);return{...r,send:async o=>{const s=tm(o,["event","transaction","profile","replay_event"]);return s&&(s.release=t),r.send(o)}}}}function sE(e,t){return it(t?{...e[0],dsn:t}:e[0],e[1])}function NL(e,t){return n=>{const r=e(n),o=new Map,s=t||(u=>{const d=u.getEvent();return d?.extra?.[Pa]&&Array.isArray(d.extra[Pa])?d.extra[Pa]:[]});function i(u,d){const l=d?`${u}:${d}`:u;let p=o.get(l);if(!p){const f=Qp(u);if(!f)return;const h=Bh(f,n.tunnel);p=d?oE(e,d)({...n,url:h}):e({...n,url:h}),o.set(l,p)}return[u,p]}async function a(u){function d(h){const m=h?.length?h:["event"];return tm(u,m)}const l=s({envelope:u,getEvent:d}).map(h=>typeof h=="string"?i(h,void 0):i(h.dsn,h.release)).filter(h=>!!h),p=l.length?l:[["",r]];return(await Promise.all(p.map(([h,m])=>m.send(sE(u,h)))))[0]}async function c(u){const d=[...o.values(),r];return(await Promise.all(d.map(p=>p.flush(u)))).every(p=>p)}return{send:a,flush:c}
10}}function iE(e,t){return t.some(n=>e.includes(n))}function nm(e,t,n){if(t===!1)return!0;const r=e.toLowerCase(),o=n!=null?[...od,...n]:od;if(iE(r,o))return!0;if(t===!0)return!1;const i=("deny"in t?t.deny:t.allow).some(a=>r.includes(a.toLowerCase()));return"deny"in t?i:!i}function bo(e,t,n){if(t===!1)return{};const r={};for(const o of Object.keys(e))r[o]=nm(o,t,n)?yu:e[o];return r}function aE(e){const t={};let n=0;for(;n<e.length;){const r=e.indexOf("=",n);if(r===-1)break;let o=e.indexOf(";",n);if(o===-1)o=e.length;else if(o<r){n=e.lastIndexOf(";",r-1)+1;continue}const s=e.slice(n,r).trim();if(t[s]===void 0){let i=e.slice(r+1,o).trim();i.charCodeAt(0)===34&&(i=i.slice(1,-1));try{t[s]=i.indexOf("%")!==-1?decodeURIComponent(i):i}catch{t[s]=i}}n=o+1}return t}function Sc(e,t){if(t===!1)return{};try{const n=aE(e);return Object.keys(n).length===0?{}:bo(n,t,Wv)}catch{return yu}}function rm(e,t){if(!(!e||t===!1))return e.split("&").map(n=>{const r=n.indexOf("="),o=r===-1?n:n.slice(0,r),s=new URLSearchParams(`${o}=`).keys().next().value;return s!==void 0&&nm(s,t)?`${o}=${yu}`:n}).join("&")}function cE(e,t){const n=e.indexOf("#"),r=n===-1?e.length:n,o=e.indexOf("?");if(o===-1||o>r)return e;const s=e.slice(0,o),i=e.slice(o+1,r),a=e.slice(r),c=rm(i,t);return c?`${s}?${c}${a}`:`${s}${a}`}function om(e){return(e??R())?.getDataCollectionOptions().urlQueryParams??!0}function Ye(e,t){return e===void 0?void 0:cE(e,om(t))}function sm(e,t){if(!e)return e;const n=e.startsWith("?"),r=rm(n?e.slice(1):e,om(t));return r&&n?`?${r}`:r}const uE="thismessage:/";function Bi(e){return"isRelative"in e}function vo(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=n?uE:void 0;try{if("canParse"in URL&&!URL.canParse(e,r))return;const o=new URL(e,r);return n?{isRelative:n,pathname:o.pathname,search:o.search,hash:o.hash}:o}catch{}}function im(e){if(Bi(e))return e.pathname;const 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 Bn(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function am(e){return e.split(/[?#]/,1)[0]}function pt(e,t=!0){if(e.startsWith("data:")){const n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",o=e.includes(";base64,"),s=e.indexOf(",");let i="";if(t&&s!==-1){const a=e.slice(s+1);i=a.length>10?`${a.slice(0,10)}... [truncated]`:a}return`data:${r}${o?",base64":""}${i?`,${i}`:""}`}return e}function cm(e,t){const n=t?.getDsn(),r=t?.getOptions().tunnel;return dE(e,n)||lE(e,r)}function lE(e,t){return t?fd(e)===fd(t):!1}function dE(e,t){const n=vo(e);
10return!n||Bi(n)||!t?!1:fE(n.hostname,t.host)&&/(^|&|\?)sentry_key=/.test(n.search)}function fE(e,t){return e===t||t.length>0&&e.endsWith(`.${t}`)}function fd(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function pE(e,...t){const n=new String(String.raw(e,...t));return n.__sentry_template_string__=e.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),n.__sentry_template_values__=t,n}const hE=pE;function mE(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 um(e,t,n=[t],r="npm"){const o=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};o.name||(o.name=`sentry.javascript.${t}`,o.packages=n.map(s=>({name:`${r}:@sentry/${s}`,version:tn})),o.version=tn)}function lm(e={}){const t=e.client||R();if(!av()||!t)return{};const n=At(),r=Sn(n);if(r.getTraceData)return r.getTraceData(e);const o=e.scope||W(),s=e.span||Ee(),i=Ar(s)&&!Je(t.getOptions()),a=s&&!i?BS(s):gE(o),c=s?gt(s):Oi(t,o),u=Xp(c);if(!nh.test(a))return g.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const l={"sentry-trace":a,baggage:u};return e.propagateTraceparent&&(l.traceparent=s&&!i?US(s):_E(o)),l}function gE(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return oh(t,r,n)}function _E(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return sh(t,r,n)}const yE=100;function kt(e,t){const n=R(),r=Se();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:s=yE}=n.getOptions();if(s<=0)return;const a={timestamp:Kn(),...e},c=o?zt(()=>o(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,s))}const SE="FunctionToString",pd=new WeakMap,bE=(()=>({name:SE,setupOnce(){const e=Function.prototype.toString;try{Function.prototype.toString=function(...t){const n=tu(this);let r;try{pd.has(R())&&n!==void 0&&(r=n)}catch{}return e.apply(r??this,t)}}catch{}},setup(e){pd.set(e,!0)}})),vE=bE,EE=[/^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$/,/Java object is gone$/],TE="EventFilters",IE=(e={})=>{let t;return{name:TE,setup(n){const r=n.getOptions();t=hd(e,r)},processEvent(n,r,o){if(!t){const s=o.getOptions();t=hd(e,s)}return kE(n,t)?null:n}}},wE=((e={})=>({...IE(e),name:"InboundFilters"}));function hd(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:EE],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function kE(e,t){if(e.type){if(e.type==="transaction"&&AE(e,t.ignoreTransactions))return k&&g.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. 11Event: ${Mn(e)}`),!0}else{if(RE(e,t.ignoreErrors))return k&&g.warn(`Event dropped due to being matched by \`ignoreErrors\` option. 12Event: ${Mn(e)}`),!0;if(xE(e))return k&&g.warn(`Event dropped due to not having an error message, error type or stacktrace. 13Event: ${Mn(e)}`),!0;if(CE(e,t.denyUrls))return k&&g.warn(`Event dropped due to being matched by \`denyUrls\` option. 14Event: ${Mn(e)}. 15Url: ${ri(e)}`),!0;if(!NE(e,t.allowUrls))return k&&g.warn(`Event dropped due to not being matched by \`allowUrls\` option. 16Event: ${Mn(e)}. 17Url: ${ri(e)}`),!0}return!1}function RE(e,t){return t?.length?Oh(e).some(n=>nt(n,t)):!1}function AE(e,t){if(!t?.length)return!1;const n=e.transaction;return n?nt(n,t):!1}function CE(e,t){if(!t?.length)return!1;const n=ri(e);return n?nt(n,t):!1}function NE(e,t){if(!t?.length)return!0;const n=ri(e);return n?nt(n,t):!0}function ME(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function ri(e){try{const n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?ME(n):null}catch{return k&&g.error(`Cannot extract url for event ${Mn(e)}`),null}}function xE(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function OE(e,t,n,r,o,s){if(!o.exception?.values||!s||!$e(s.originalException))return;const i=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;i&&(o.exception.values=bc(e,t,r,s.originalException,n,o.exception.values,i,0
17))}function bc(e,t,n,r,o,s,i,a){if(s.length>=n+1)return s;let c=[...s];if($e(r[o])){md(i,a,r);const u=e(t,r[o]),d=c.length;gd(u,o,d,a),c=bc(e,t,n,r[o],o,[u,...c],u,d)}return dm(r)&&r.errors.forEach((u,d)=>{if($e(u)){md(i,a,r);const l=e(t,u),p=c.length;gd(l,`errors[${d}]`,p,a),c=bc(e,t,n,u,o,[l,...c],l,p)}}),c}function dm(e){return Array.isArray(e.errors)}function md(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...dm(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function gd(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function PE(e){return $e(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function _d(e){return PE(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}const fm=new Map,yd=new Set;function LE(e){if(B._sentryModuleMetadata)for(const t of Object.keys(B._sentryModuleMetadata)){const n=B._sentryModuleMetadata[t];if(yd.has(t))continue;yd.add(t);const r=e(t);for(const o of r.reverse())if(o.filename){fm.set(o.filename,n);break}}}function DE(e,t){return LE(e),fm.get(t)}function pm(e,t){t.exception?.values?.forEach(n=>{n.stacktrace?.frames?.forEach(r=>{if(!r.filename||r.module_metadata)return;const o=DE(e,r.filename);o&&(r.module_metadata=o)})})}function hm(e){e.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(n=>{delete n.module_metadata})})}const ML=()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",t=>{qn(t,(n,r)=>{if(r==="event"){const o=Array.isArray(n)?n[1]:void 0;o&&(hm(o),n[1]=o)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;const n=e.getOptions().stackParser;pm(n,t)})}}),Sd=new Set([]);function Su(e){const t="console",n=gn(t,e);return _n(t,FE),n}const bd=new Set;function FE(){"console"in B&&Xc.forEach(function(e){bd.has(e)||!(e in B.console)||(bd.add(e),Oe(B.console,e,function(t){return Vs[e]=t,function(...n){const r=n[0],o=Vs[e],s=Sd.size&&typeof r=="string"&&nt(r,Sd);s||tt("console",{args:n,level:e}),(!s||k&&g.isEnabled())&&o?.apply(B.console,n)}}))})}function oi(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const $E="CaptureConsole",BE=((e={})=>{const t=e.levels||Xc,n=e.handled??!0;return{name:$E,setup(r){"console"in B&&Su(({args:o,level:s})=>{R()!==r||!t.includes(s)||UE(o,s,n)})}}}),xL=BE;function UE(e,t,n){const r=oi(t),o=new Error,s={level:oi(t),extra:{arguments:e}};Ke(i=>{if(i.addEventProcessor(u=>(u.logger="console",bt(u,{handled:n,type:"auto.core.capture_console"}),u)),t==="assert"){if(!e[0]){const u=`Assertion failed: ${Ys(e.slice(1)," ")||"console.assert"}`;i.setExtra("arguments",e.slice(1)),i.captureMessage(u,r,{captureContext:s,syntheticException:o})}return}const a=e.find(u=>u instanceof Error);if(a){mt(a,s);return}const c=Ys(e," ");i.captureMessage(c,r,{captureContext:s,syntheticException:o})})}const HE="Dedupe",WE=(()=>{let e;return{name:HE,processEvent(t){if(t.type)return t;try{if(zE(t,e))return k&&g.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),jE=WE;function zE(e,t){return t?!!(qE(e,t)||GE(e,t)):!1}function qE(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!gm(e,t)||!mm(e,t))}function GE(e,t){const n=vd(t),r=vd(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!gm(e,t)||!mm(e,t))}function mm(e,t){let n=ic(e),r=ic(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let o=0;o<r.length;o++){const s=r[o],i=n[o];if(s.filename!==i.filename||s.lineno!==i.lineno||s.colno!==i.colno||s.function!==i.function)return!1}return!0}function gm(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 vd(e){return e.exception?.values?.[0]}const VE="ExtraErrorData",YE=((e={})=>{const{depth:t=3,captureErrorCause:n=!0}=e;return{name:VE,processEvent(r,o,s){const{maxValueLength:i}=s.getOptions();return JE(r,o,t,n,i)}}}),OL=YE;function JE(e,t={},n,r,o){if(!t.originalException||!$e(t.originalException))return e;const s=t.originalException.name||t.originalException.constructor.name,i=_m(t.originalException,r,o);if(i){const a={...e.contexts},c=ke(i,n);return De(c)&&(Fy(c),a[s]=c),{...e,contexts:a}}return e}
17function _m(e,t,n){try{const r=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],o={};for(const s of Object.keys(e)){if(r.indexOf(s)!==-1)continue;const i=e[s];o[s]=$e(i)||typeof i=="string"?n?go(`${i}`,n):`${i}`:i}if(t&&e.cause!==void 0)if($e(e.cause)){const s=e.cause.name||e.cause.constructor.name;o.cause={[s]:_m(e.cause,!1,n)}}else o.cause=e.cause;if(typeof e.toJSON=="function"){const s=e.toJSON();for(const i of Object.keys(s)){const a=s[i];o[i]=$e(a)?a.toString():a}}return o}catch(r){k&&g.error("Unable to extract extra data from the Error object:",r)}return null}function KE(e,t){let n=0;for(let r=e.length-1;r>=0;r--){const o=e[r];o==="."?e.splice(r,1):o===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}const XE=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function QE(e){const t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=XE.exec(t);return n?n.slice(1):[]}function Ed(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const o=r>=0?e[r]:"/";o&&(t=`${o}/${t}`,n=o.charAt(0)==="/")}return t=KE(t.split("/").filter(r=>!!r),!n).join("/"),(n?"/":"")+t||"."}function Td(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 ZE(e,t){e=Ed(e).slice(1),t=Ed(t).slice(1);const n=Td(e.split("/")),r=Td(t.split("/")),o=Math.min(n.length,r.length);let s=o;for(let a=0;a<o;a++)if(n[a]!==r[a]){s=a;break}let i=[];for(let a=s;a<n.length;a++)i.push("..");return i=i.concat(r.slice(s)),i.join("/")}function eT(e,t){return QE(e)[2]||""}const tT="RewriteFrames",PL=(e={})=>{const t=e.root,n=e.prefix||"app:///",r="window"in B&&!!B.window,o=e.iteratee||nT({isBrowser:r,root:t,prefix:n});function s(a){try{return{...a,exception:{...a.exception,values:a.exception.values.map(c=>({...c,...c.stacktrace&&{stacktrace:i(c.stacktrace)}}))}}}catch{return a}}function i(a){return{...a,frames:a?.frames?.map(c=>o(c))}}return{name:tT,processEvent(a){let c=a;return a.exception&&Array.isArray(a.exception.values)&&(c=s(c)),c}}};function nT({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;const o=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes("\\")&&!r.filename.includes("/"),s=/^\//.test(r.filename);if(e){if(t){const i=r.filename;i.indexOf(t)===0&&(r.filename=i.replace(t,n))}}else if(o||s){const i=o?r.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):r.filename,a=t?ZE(t,i):eT(i);r.filename=`${n}${a}`}return r}}const rT=["reauthenticate","signInAnonymously","signInWithOAuth","signInWithIdToken","signInWithOtp","signInWithPassword","signInWithSSO","signOut","signUp","verifyOtp"],oT=["createUser","deleteUser","listUsers","getUserById","updateUserById","inviteUserByEmail"],sT={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"},ym=["select","insert","upsert","update","delete"];function Ui(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch{}}function Hi(e){try{return e.__SENTRY_INSTRUMENTED__}catch{return!1}}function Sm(e,t){if(Object.keys(t).length>0)return t;if(Array.isArray(e)&&e.length>0)return e}function iT(e,t){return Sm(e,t)!==void 0}function bm(e,t){if(!e)return;if(typeof e.get=="function")return e.get(t)??void 0;const n=e,r=t.toLowerCase(),o=Object.keys(n).find(s=>s.toLowerCase()===r);return o!==void 0?n[o]:void 0}function aT(e,t={}){switch(e){case"GET":return"select";case"POST":return bm(t,"Prefer")?.includes("resolution=")?"upsert":"insert";case"PATCH":return"update";case"DELETE":return"delete";default:return"<unknown-op>"}}function cT(e,t){if(t===""||t==="*")return"select(*)";if(e==="select")return`select(${t})`;if(e==="or"||e.endsWith(".or"))return`${e}${t}`;const[n,...r]=t.split(".");let o;return n?.startsWith("fts")?o="textSearch":n?.startsWith("plfts")?o="textSearch[plain]":n?.startsWith("phfts")?o="textSearch[phrase]":n?.startsWith("wfts")?o="textSearch[websearch]":o=n&&sT[n]||"filter",`${o}(${e}, ${r.join(".")})`}function Id(e,t=!1){return new Proxy(e,{apply(n,r,o){return qt({name:`auth ${t?"(admin) ":""}${e.name}`,attributes:{[Y]:"auto.db.supabase",[ue]:"db","db.system":"postgresql","db.operation":`auth.${t?"admin.":""}${e.name}`}},s=>Reflect.apply(n,r,o).then(i=>(xe(i)&&"error"in i&&i.error?(s.setStatus({code:re}),mt(i.error,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}})):s.setStatus({code:Lo}),s.end(),i)).catch(i=>{throw s.setStatus({code:re}),s.end(),mt(i,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}}),i}).then(...o))}})}function uT(e){const t=e.auth;if(!(!t||Hi(e.auth))){for(const n of rT){const r=t[n];r&&typeof e.auth[n]=="function"&&(e.auth[n]=Id(r))}for(const n of oT){const r=t.admin[n];r&&typeof e.auth.admin[n]=="function"&&(e.auth.admin[n]=Id(r,!0))}Ui(e.auth)}}function lT(e,t){Hi(e.prototype.from)||(e.prototype.from=new Proxy(e.prototype.from,{apply(n,r,o){const s=Reflect.apply(n,r,o),i=s.constructor;return fT(i,t),s}}),Ui(e.prototype.from))}function dT(e,t){Hi(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(n,r,o){const s=ym,i=r,a=aT(i.method,i.headers);if(!s.includes(a)||!i?.url?.pathname||typeof i.url.pathname!="string")return Reflect.apply(n,r,o);const c=i.url.pathname.split("/"),u=c.length>0?c[c.length-1]:"",d=[];
17for(const[b,T]of i.url.searchParams.entries())d.push(cT(b,T));const l=Object.create(null);if(De(i.body))for(const[b,T]of Object.entries(i.body))l[b]=T;const p=R(),f=t.sendOperationData??p?.getDataCollectionOptions().databaseQueryData===!0,h=Sm(i.body,l),m=a==="select"?"":`${a}${iT(i.body,l)?"(...) ":""}`,_=f?d.join(" "):d.length>0?"[redacted]":"",y=[m.trimEnd(),_].filter(Boolean).join(" "),S=y?`${y} from(${u})`:`from(${u})`,I={"db.table":u,"db.schema":i.schema,"db.url":i.url.origin,"db.sdk":bm(i.headers,"X-Client-Info"),"db.system":"postgresql","db.operation":a,[Y]:"auto.db.supabase",[ue]:"db"};return d.length&&f&&(I["db.query"]=d),h!==void 0&&f&&(I["db.body"]=h),qt({name:S,attributes:I},b=>Reflect.apply(n,r,[]).then(T=>{if(b&&(T&&typeof T=="object"&&"status"in T&&Js(b,T.status||500),b.end()),T?.error){const L=new Error(T.error.message);T.error.code&&(L.code=T.error.code),T.error.details&&(L.details=T.error.details);const N={};d.length&&f&&(N.query=d),h!==void 0&&f&&(N.body=h),mt(L,v=>(v.addEventProcessor(P=>(bt(P,{handled:!1,type:"auto.db.supabase.postgres"}),P)),v.setContext("supabase",N),v))}const C={type:"supabase",category:`db.${a}`,message:S},E={};return d.length&&f&&(E.query=d),h!==void 0&&f&&(E.body=h),Object.keys(E).length&&(C.data=E),kt(C),T},T=>{throw b&&(Js(b,500),b.end()),T}).then(...o))}}),Ui(e.prototype.then))}function fT(e,t){for(const n of ym)Hi(e.prototype[n])||(e.prototype[n]=new Proxy(e.prototype[n],{apply(r,o,s){const i=Reflect.apply(r,o,s),a=i.constructor;return k&&g.log(`Instrumenting ${n} operation's PostgRESTFilterBuilder`),dT(a,t),i}}),Ui(e.prototype[n]))}const pT=(e,t={})=>{if(!e){k&&g.warn("Supabase integration was not installed because no Supabase client was provided.");return}const n=e.constructor===Function?e:e.constructor;lT(n,t),uT(e)},hT="Supabase",mT=((e,t)=>({setupOnce(){pT(e,t)},name:hT})),LL=e=>mT(e.supabaseClient,{sendOperationData:e.sendOperationData}),gT=10,_T="ZodErrors";function yT(e){return $e(e)&&e.name==="ZodError"&&Array.isArray(e.issues)}function ST(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 bT(e){return e.map(t=>typeof t=="number"?"<array>":t).join(".")}function vT(e){const t=new Set;for(const r of e.issues){const o=bT(r.path);o.length>0&&t.add(o)}const n=Array.from(t);if(n.length===0){let r="variable";if(e.issues.length>0){const o=e.issues[0];o!==void 0&&"expected"in o&&typeof o.expected=="string"&&(r=o.expected)}return`Failed to validate ${r}`}return`Failed to validate keys: ${go(n.join(", "),100)}`}function ET(e,t=!1,n,r){if(!n.exception?.values||!r.originalException||!yT(r.originalException)||r.originalException.issues.length===0)return n;try{const s=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(ST);return t&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({filename:"zod_issues.json",data:JSON.stringify({issues:s})})),{...n,exception:{...n.exception,values:[{...n.exception.values[0],value:vT(r.originalException)},...n.exception.values.slice(1)]},extra:{...n.extra,"zoderror.issues":s.slice(0,e)}}}catch(o){return{...n,extra:{...n.extra,"zoderrors sentry integration parse error":{message:"an exception was thrown while processing ZodError within applyZodErrorsToEvent()",error:o instanceof Error?`${o.name}: ${o.message} 18${o.stack}`:"unknown"}}}}}const TT=((e={})=>{const t=e.limit??gT;return{name:_T,processEvent(n,r){return ET(t,e.saveZodIssuesAsAttachment,n,r)}}}),DL=TT,FL=e=>({name:"ThirdPartyErrorsFilter",setup(t){t.on("beforeEnvelope",n=>{qn(n,(r,o)=>{if(o==="event"){const s=Array.isArray(r)?r[1]:void 0;s&&(hm(s),r[1]=s)}})}),t.on("applyFrameMetadata",n=>{if(n.type)return;const r=t.getOptions().stackParser;pm(r,n)})},preprocessEvent(t){e.ignoreSentryInternalFrames&&(B._sentryWrappedDepth??0)>0&&(t.sdkProcessingMetadata={...t.sdkProcessingMetadata,insideSentryWrapped:!0})},processEvent(t){const n=e.ignoreSentryInternalFrames?t.sdkProcessingMetadata?.insideSentryWrapped===!0&&t.exception?.values?.length===1:!1,r=wT(t,e.ignoreSentryInternalFrames,n);if(r){const o=e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="apply-tag-if-contains-third-party-frames"?"some":"every";if(r[o](i=>
18!i.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 IT(e,t,n){if(t!==0)return!1;if(n&&kT(e)||e.function==="sentryWrapped")return!0;if(!e.context_line||!e.filename||!e.filename.includes("sentry")||!e.filename.includes("helpers")||!e.context_line.includes(AT))return!1;if(e.pre_context){const r=e.pre_context.length;for(let o=0;o<r;o++)if(e.pre_context[o]?.includes(RT))return!0}return!1}function wT(e,t,n){const r=ic(e);if(r)return r.filter((o,s)=>!o.filename||o.lineno==null&&o.colno==null&&o.instruction_addr==null?!1:!t||!IT(o,s,!!n)).map(o=>o.module_metadata?Object.keys(o.module_metadata).filter(s=>s.startsWith(wd)).map(s=>s.slice(wd.length)):[])}function kT(e){return!e.context_line&&!e.pre_context&&!!e.function&&e.function.length<=2}const wd="_sentryBundlerPluginAppKey:",RT="Attempt to invoke user-land function",AT="fn.apply(this, wrappedArguments)",CT=100,NT=10,fs="flag.evaluation.";function Gr(e){if(e.type)return e;const n=W().getScopeData().contexts.flags,r=n?n.values:[];return r.length&&(e.contexts===void 0&&(e.contexts={}),e.contexts.flags={values:[...r]}),e}function Gn(e,t,n=CT){const r=W().getScopeData().contexts;r.flags||(r.flags={values:[]});const o=r.flags.values;MT(o,e,t,n)}function MT(e,t,n,r){if(typeof n!="boolean")return;if(e.length>r){k&&g.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${r}`);return}const o=e.findIndex(s=>s.flag===t);o!==-1&&e.splice(o,1),e.length===r&&e.shift(),e.push({flag:t,result:n})}function Vn(e,t,n=NT){if(typeof t!="boolean")return;const r=Ee();if(!r)return;const o=$(r).data;if(`${fs}${e}`in o){r.setAttribute(`${fs}${e}`,t);return}Object.keys(o).filter(i=>i.startsWith(fs)).length<n&&r.setAttribute(`${fs}${e}`,t)}const $L=()=>({name:"FeatureFlags",processEvent(e,t,n){return Gr(e)},addFeatureFlag(e,t){Gn(e,t),Vn(e,t)}}),xT=({growthbookClass:e})=>({name:"GrowthBook",setupOnce(){const t=e.prototype;typeof t.isOn=="function"&&Oe(t,"isOn",kd),typeof t.getFeatureValue=="function"&&Oe(t,"getFeatureValue",kd)},processEvent(t,n,r){return Gr(t)}});function kd(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"&&(Gn(n,r),Vn(n,r)),r}}const OT="ConversationId",PT=(()=>({name:OT,setup(e){e.on("spanStart",t=>{const n=W().getScopeData(),r=Se().getScopeData(),o=n.conversationId||r.conversationId;if(o){const{op:s,data:i,description:a}=$(t);if(!s?.startsWith("gen_ai.")&&!i["ai.operationId"]&&!a?.startsWith("ai."))return;t.setAttribute(vS,o)}})}})),LT=PT;function DT(e,t,n,r,o){if(!e.fetchData)return;const{method:s,url:i}=e.fetchData,a=Je()&&t(i);if(e.endTimestamp){const m=e.fetchData.__span;if(!m)return;const _=r[m];_&&(a&&(BT(_,e),FT(_,e,o)),delete r[m]);return}const{spanOrigin:c="auto.http.browser",propagateTraceparent:u=!1}=typeof o=="object"?o:{spanOrigin:o},d=R(),l=!!Ee(),p=l||!!d&&at(d),f=a&&p?Ge(WT(i,s,c,d)):new zn,h=Di(f)&&l?void 0:f;if(a&&!p&&d?.recordDroppedEvent("no_parent_span","span"),e.fetchData.__span=f.spanContext().spanId,r[f.spanContext().spanId]=f,n(e.fetchData.url)){const m=e.args[0],_={...e.args[1]||{}},y=$T(m,_,Je()&&p?h:void 0,u);y&&(e.args[1]=_,_.headers=y)}if(d){const m={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};d.emit("beforeOutgoingRequestSpan",f,m)}return f}function FT(e,t,n){(typeof n=="object"&&n!==null?n.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function $T(e,t,n,r){const o=lm({span:n,propagateTraceparent:r}),s=o["sentry-trace"],i=o.baggage,a=o.traceparent;if(!s)return;const c=t.headers||(eu(e)?e.headers:void 0);if(c)if(UT(c)){const u=new Headers(c);if(u.get("sentry-trace")||u.set("sentry-trace",s),r&&a&&!u.get("traceparent")&&u.set("traceparent",a),i){const d=u.get("baggage");d?ps(d)||u.set("baggage",`${d},${i}`):u.set("baggage",i)}return u}else if(HT(c)){const u=[...c];u.find(l=>l[0]==="sentry-trace")||u.push(["sentry-trace",s]),r&&a&&!u.find(l=>l[0]==="traceparent")&&u.push(["traceparent",a]);const d=c.find(l=>l[0]==="baggage"&&typeof l[1]=="string"&&ps(l[1]));return i&&!d&&u.push(["baggage",i]),u}else{const u="sentry-trace"in c?c["sentry-trace"]:void 0,d="traceparent"in c?c.traceparent:void 0,l="baggage"in c?c.baggage:void 0,p=l?Array.isArray(l)?[...l]:[l]:[],f=l&&(Array.isArray(l)?l.find(m=>ps(m)):ps(l));i&&!f&&p.push(i);const h=Object.assign({},c,{"sentry-trace":u??s,...p.length>0&&{baggage:p.join(",")}});return r&&a&&!d&&(h.traceparent=a),h}else return{"sentry-trace":s,...i&&{baggage:i},...a&&{traceparent:a}}}function BT(e,t){if(t.response){Js(e,t.response.status);const n=t.response?.headers?.get("content-length");if(n){const r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus({code:re,message:"internal_error"});e.end()}function ps(e){return typeof e!="string"?!1:e.split(",").some(t=>t.trim().startsWith(Ks))}function UT(e){return typeof Headers<"u"&&Mi(e,Headers)}function HT(e){return Array.isArray(e)?e.every(t=>Array.isArray(t)&&t.length===2&&typeof t[0]=="string"):!1}function WT(e,t,n,r){if(e.startsWith("data:")){const i=pt(e);return{name:`${t} ${i}`,attributes:Rd(e,void 0,t,n,r)}}const o=vo(e),s=o?im(o):e;return{name:`${t} ${s}`,attributes:Rd(e,o,t,n,r)}}function Rd(e,t,n,r,o){const s={url:Ye(pt(e),o),type:"fetch","http.method":n,[Y]:r,[ue]:"http.client"};return t&&(Bi(t)||(s[Ah]=Ye(pt(t.href),o),s[vn]=Ye(pt(t.href),o),s["server.address"]=t.host),t.search&&(s["http.query"]=sm(t.search,o)),t.hash&&(s["http.fragment"]=t.hash)),s}function jT(e,t={},n=W()){const{message:r,name:o,email:s,url:i,source:a,associatedEventId:c,tags:u}=e,d={contexts:{feedback:{contact_email:s,name:o,message:r,url:i,source:a,associated_event_id:c}},type:"feedback",level:"info",tags:u},l=n?.getClient()||R();return l&&l.emit("beforeSendFeedback",d,t),n.captureEvent(d,t)}function Vr(e,t,n,r,o){ni({level:e,message:t,attributes:n,severityNumber:o},r)}function zT(e,t,{scope:n}={}){Vr("trace",e,t,n)}function qT(e,t,{scope:n}={}){Vr("debug",e,t,n)}function GT(e,t,{scope:n}={}){Vr("info",e,t,n)}function VT(e,t,{scope:n}={}){Vr("warn",e,t,n)}function YT(e,t,{scope:n}={}){Vr("error",e,t,n)}function JT(e,t,{scope:n}={}){Vr("fatal",e,t,n)}const BL=Object.freeze(Object.defineProperty({__proto__:null,debug:qT,error:YT,fatal:JT,fmt:hE,info:GT,trace:zT,warn:VT},Symbol.toStringTag,{value:"Module"}));function si(e,t,n){return"util"in B&&typeof B.util.format=="function"?B.util.format(...e):KT(e,t,n)}function KT(e,t,n){return e.map(r=>Tt(r)?String(r):JSON.stringify(ke(r,t,n))).join(" ")}function vm(e){return/%[sdifocO]/.test(e)}function Em(e,t){const n={},r=new Array(t.length).fill("{}").join(" ");return n["sentry.message.template"]=`${e} ${r}`,t.forEach((o,s)=>{n[`sentry.message.parameter.${s}`]=o}),n}const XT="ConsoleLogs",Ad={[Y]:"auto.log.console"},QT=((e={})=>{const t=e.levels||Xc;return{name:XT,setup(n){const{enableLogs:r,normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=n.getOptions();if(!r){k&&g.warn("`enableLogs` is not enabled, ConsoleLogs integration disabled");return}const i=Su(({args:a,level:c})=>{if(R()!==n||!t.includes(c))return;const u=a[0],d=a.slice(1);if(c==="assert"){if(!u){const f=d.length>0?`Assertion failed: ${si(d,o,s)}`:"Assertion failed";ni({level:"error",message:f,attributes:Ad})}return}const l=c==="log",p={...Ad};if(De(u)){Object.assign(p,ke(u,o,s));const f=typeof a[1]=="string"?2:1;a.slice(f).forEach((m,_)=>{p[`sentry.message.parameter.${_}`]=ke(m,o,s)})}else if(d.length>0&&typeof u=="string"&&!vm(u)){const h=Em(u,d);for(const[m,_]of Object.entries(h))p[m]=m.startsWith("sentry.message.parameter.")?ke(_,o,s):_}ni({level:l?"info":c,message:si(a,o,s),severityNumber:l?10:void 0,attributes:p})});n.registerCleanup(i)}}}),UL=QT;function bu(e,t,n,r){Ov({type:e,name:t,value:n,unit:r?.unit,attributes:r?.attributes},{scope:r?.scope})}function ZT(e,t=1,n){bu("counter",e,t,n)}function eI(e,t,n){bu("gauge",e,t,n)}function vc(e,t,n){bu("distribution",e,t,n)}const HL=Object.freeze(Object.defineProperty({__proto__:null,count:ZT,distribution:vc,gauge:eI},Symbol.toStringTag,{value:"Module"})),tI=["trace","debug","info","warn","error","fatal"];function WL(e={}){const t=new Set(e.levels??tI),n=e.client;return{log(r){const{type:o,level:s,message:i,args:a,tag:c,date:u,...d}=r,l=n||R();if(!l)return;const p=oI(o,s);if(!t.has(p))return;const{normalizeDepth:f=3,normalizeMaxBreadth:h=1e3}=l.getOptions(),m={};for(const[y,S]of Object.entries(d))m[y]=ke(S,f,h);m["sentry.origin"]="auto.log.consola",c&&(m["consola.tag"]=c),o&&(m["consola.type"]=o),s!=null&&typeof s=="number"&&(m["consola.level"]=s);const _=iI(sI(a,f,h),f,h);_?.attributes&&Object.assign(m,_.attributes),ni({level:p,message:_?.message||i||a&&si(a,f,h)||"",attributes:m})}}}const nI={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"},rI={0:"fatal",1:"warn",2:"info",3:"info",4:"debug",5:"trace"};function oI(e,t){if(e==="verbose")return"debug";if(e==="silent")return"trace";if(e){const n=nI[e];if(n)return n}if(typeof t=="number"){const n=rI[t];if(n)return n}return"info"}function sI(e,t,n){if(!e?.length)return{message:""};const r=si(e,t,n),o=e[0];if(De(o)){const s=typeof e[1]=="string"?2:1,i=e.slice(s);return{message:r,attributes:o,messageParameters:i}}else{const s=e.slice(1),i=s.length>
180&&typeof o=="string"&&!vm(o);return{message:r,messageTemplate:i?o:void 0,messageParameters:i?s:void 0}}}function iI(e,t,n){const{message:r,attributes:o,messageTemplate:s,messageParameters:i}=e,a={};if(s&&i){const c=Em(s,i);for(const[u,d]of Object.entries(c))a[u]=u.startsWith("sentry.message.parameter.")?ke(d,t,n):d}else i&&i.length>0&&i.forEach((c,u)=>{a[`sentry.message.parameter.${u}`]=ke(c,t,n)});return{message:r,attributes:{...ke(o,t,n),...a}}}const aI="gen_ai.prompt",Ho="gen_ai.system",Pe="gen_ai.request.model",vu="gen_ai.request.stream",Wi="gen_ai.request.temperature",Eu="gen_ai.request.max_tokens",ji="gen_ai.request.frequency_penalty",Tu="gen_ai.request.presence_penalty",zi="gen_ai.request.top_p",Tm="gen_ai.request.top_k",Im="gen_ai.request.encoding_format",wm="gen_ai.request.dimensions",yr="gen_ai.response.finish_reasons",Yr="gen_ai.response.model",qi="gen_ai.response.id",cI="gen_ai.response.stop_reason",Gi="gen_ai.usage.input_tokens",Vi="gen_ai.usage.output_tokens",Eo="gen_ai.usage.total_tokens",ht="gen_ai.operation.name",Yn="sentry.sdk_meta.gen_ai.input.messages.original_length",Jr="gen_ai.input.messages",Wo="gen_ai.system_instructions",vt="gen_ai.response.text",jo="gen_ai.request.available_tools",uI="gen_ai.response.streaming",nn="gen_ai.response.tool_calls",Yi="gen_ai.agent.name",lI="gen_ai.pipeline.name",Iu="gen_ai.conversation.id",dI="gen_ai.invoke_agent",wu="gen_ai.embeddings.input",km="gen_ai.embeddings",Cd="gen_ai.execute_tool",Rm="gen_ai.tool.name",fI="gen_ai.tool.call.id",pI="gen_ai.tool.type",Am="gen_ai.tool.input",Cm="gen_ai.tool.output",hI="gen_ai.tool.description";function Sr(e){return!e||typeof e!="object"?!1:gI(e)||Mm(e)||mI(e)||xm(e)||Om(e)||_I(e)||yI(e)||SI(e)||bI(e)||vI(e)||EI(e)||TI(e)}function mI(e){return"image_url"in e?typeof e.image_url=="string"?e.image_url.startsWith("data:"):Nm(e):!1}function Nm(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 gI(e){return"type"in e&&typeof e.type=="string"&&"source"in e&&Sr(e.source)}function Mm(e){return"inlineData"in e&&!!e.inlineData&&typeof e.inlineData=="object"&&"data"in e.inlineData&&typeof e.inlineData.data=="string"}function xm(e){return"type"in e&&e.type==="input_audio"&&"input_audio"in e&&!!e.input_audio&&typeof e.input_audio=="object"&&"data"in e.input_audio&&typeof e.input_audio.data=="str
18ing"}function Om(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 _I(e){return"media_type"in e&&typeof e.media_type=="string"&&"data"in e}function yI(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 SI(e){return"type"in e&&e.type==="image"&&"image"in e&&typeof e.image=="string"&&!e.image.startsWith("http://")&&!e.image.startsWith("https://")}function bI(e){return"type"in e&&(e.type==="blob"||e.type==="base64")}function vI(e){return"b64_json"in e}function EI(e){return"type"in e&&"result"in e&&e.type==="image_generation"}function TI(e){return"uri"in e&&typeof e.uri=="string"&&e.uri.startsWith("data:")}const to="[Blob substitute]",II=["image_url","data","content","b64_json","result","uri","image"];function uo(e){const t={...e};Sr(t.source)&&(t.source=uo(t.source)),Mm(e)&&(t.inlineData={...e.inlineData,data:to}),Nm(e)&&(t.image_url={...e.image_url,url:to}),xm(e)&&(t.input_audio={...e.input_audio,data:to}),Om(e)&&(t.file={...e.file,file_data:to});for(const n of II)typeof t[n]=="string"&&(t[n]=to);return t}const Pm=2e4,ii=e=>new TextEncoder().encode(e).length,ku=e=>ii(JSON.stringify(e));function Ji(e,t){if(ii(e)<=t)return e;let n=0,r=e.length,o="";for(;n<=r;){const s=Math.floor((n+r)/2),i=e.slice(0,s);ii(i)<=t?(o=i,n=s+1):r=s-1}return o}function wI(e){return typeof e=="string"?e:"text"in e&&typeof e.text=="string"?e.text:""}function Nd(e,t){return typeof e=="string"?t:{...e,text:t}}function kI(e){return e!==null&&typeof e=="object"&&"content"in e&&typeof e.content=="string"}function Lm(e){return e!==null&&typeof e=="object"&&"content"in e&&Array.isArray(e.content)}function Dm(e){return e!==null&&typeof e=="object"&&"parts"in e&&Array.isArray(e.parts)&&e.parts.length>0}function RI(e,t){const n={...e,content:""},r=ku(n),o=t-r;if(o<=0)return[];const s=Ji(e.content,o);return[{...e,content:s}]}function AI(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 CI(e,t){const{key:n,items:r}=AI(e);if(n===null||r.length===0)return[];const o=r.map(c=>Nd(c,"")),s=ku({...e,[n]:o});let i=t-s;if(i<=0)return[];const a=[];for(const c of r){const u=wI(c),d=ii(u);if(d<=i)a.push(c),i-=d;else if(a.length===0){const l=Ji(u,i);l&&a.push(Nd(c,l));break}else break}return a.length<=0?[]:[{...e,[n]:a}]}function NI(e,t){if(!e)return[];if(typeof e=="string"){const n=Ji(e,t);return n?[n]:[]}return typeof e!="object"?[]:kI(e)?RI(e,t):Lm(e)||Dm(e)?CI(e,t):[]}function Ec(e){return e.map(n=>{let r;return n&&typeof n=="object"&&(Lm(n)?r={...n,content:Ec(n.content)}:"content"in n&&Sr(n.content)&&(r={...n,content:uo(n.content)}),Dm(n)&&(r={...r??n,parts:Ec(n.parts)}),Sr(r)?r=uo(r):Sr(n)&&(r=uo(n))),r??n})}function MI(e,t){if(!Array.isArray(e)||e.length===0)return e;const n=t-2,r=e[e.length-1],o=Ec([r]),s=o[0];return ku(s)<=n?o:NI(s,n)}function xI(e){return MI(e,Pm)}function OI(e){return Ji(e,Pm)}function Qn(e){const t=R()?.getDataCollectionOptions().genAI;return{...e,recordInputs:e?.recordInputs??t?.inputs??!1,recordOutputs:e?.recordOutputs??t?.outputs??!1}}function Wt(e){if(e!==void 0)return e;const t=R();return t?!at(t)&&t.getOptions().streamGenAiSpans===!1:!0}function Fm(e,t){return e?`${e}.${t}`:t}function Jn(e,t,n,r,o){const s={};return typeof e=="number"&&(s[Gi]=e),typeof n=="number"&&(s[Nr]=n),typeof r=="number"&&(s[Mr]=r),typeof t=="number"&&(s[Vi]=t),typeof o=="number"?s[Eo]=o:(typeof e=="number"||typeof t=="number")&&(s[Eo]=(typeof e=="number"?e:0)+(typeof t=="number"?t:0)),s}function Ki(e,t,n){if(!e.isRecording())return;const r={[uI]:!0};t.responseId&&(r[qi]=t.responseId),t.responseModel&&(r[Yr]=t.responseModel),Object.assign(r,Jn(t.promptTokens,t.completionTokens,t.cacheCreationInputTokens,t.cacheReadInputTokens,t.totalTokens)),typeof t.reasoningOutputTokens=="number"&&(r[kh]=t.reasoningOutputTokens),t.finishReasons.length&&(r[yr]=JSON.stringify(t.finishReasons)),n&&t.responseTexts.length&&(r[vt]=t.responseTexts.join("")),n&&t.toolCalls.length&&(r[nn]=JSON.stringify(t.toolCalls)),e.setAttributes(r),e.end()}function Kr(e){if(typeof e=="string")return OI(e);try{return JSON.stringify(Array.isArray(e)?xI(e):e)}catch{return"[unserializable]"}}function zo(e){if(!Array.isArray(e))return{systemInstructions:void 0,filteredMessages:e};const t=e.findIndex(i=>i&&typeof i=="object"&&"role"in i&&i.role==="system");if(t===-1)return{systemInstructions:void 0,filteredMessages:e};const 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};const o=JSON.stringify([{type:"text",content:r}]),s=[...e.slice(0,t),...e.slice(t+1)];return{systemInstructions:o,filteredMessages:s}}async function PI(e,t){const[n,r]=await Promise.all([t,e]);return r&&typeof r=="object"&&"data"in r?{...r,data:n}:n}function ai(e,t){return yn(e)?new Proxy(e,{get(n,r){const s=r in Promise.prototype||r===Symbol.toStringTag?t:n,i=Reflect.get(s,r);return r==="withResponse"&&typeof i=="function"?function(){const c=i.call(n);return PI(c,t)}:typeof i=="function"?i.bind(s):i}}):t}const LI={"responses.create":{operation:"chat"}
18,"chat.completions.create":{operation:"chat"},"embeddings.create":{operation:"embeddings"},"conversations.create":{operation:"chat"}},DI=["response.output_item.added","response.function_call_arguments.delta","response.function_call_arguments.done","response.output_item.done"],FI=["response.created","response.in_progress","response.failed","response.completed","response.incomplete","response.queued","response.output_text.delta",...DI];function $I(e){return e!==null&&typeof e=="object"&&"type"in e&&typeof e.type=="string"&&e.type.startsWith("response.")}function BI(e){return e!==null&&typeof e=="object"&&"object"in e&&e.object==="chat.completion.chunk"}function UI(e,t,n){if(!t||typeof t!="object")return;const r=t,o={};if(typeof r.id=="string"&&(o[qi]=r.id),typeof r.model=="string"&&(o[Yr]=r.model),r.object==="conversation"&&typeof r.id=="string"&&(o[Iu]=r.id),r.usage&&typeof r.usage=="object"){const s=r.usage,i=s.prompt_tokens??s.input_tokens;typeof i=="number"&&(o[Gi]=i);const a=s.completion_tokens??s.output_tokens;typeof a=="number"&&(o[Vi]=a),typeof s.total_tokens=="number"&&(o[Eo]=s.total_tokens);const c=s.prompt_tokens_details??s.input_tokens_details;xe(c)&&(typeof c.cached_tokens=="number"&&(o[Mr]=c.cached_tokens),typeof c.cache_write_tokens=="number"&&(o[Nr]=c.cache_write_tokens))}if(Array.isArray(r.choices)){const s=r.choices,i=s.map(a=>a.finish_reason).filter(a=>typeof a=="string");if(i.length>0&&(o[yr]=JSON.stringify(i)),n){const a=s.map(u=>u.message?.content||"");o[vt]=JSON.stringify(a);const c=s.map(u=>u.message?.tool_calls).filter(u=>Array.isArray(u)&&u.length>0).flat();c.length>0&&(o[nn]=JSON.stringify(c))}}if(typeof r.status=="string"&&(o[yr]||(o[yr]=JSON.stringify([r.status]))),n&&(typeof r.output_text=="string"&&!o[vt]&&(o[vt]=r.output_text),Array.isArray(r.output)&&r.output.length>0&&!o[nn])){const s=r.output.filter(i=>i?.type==="function_call");s.length>0&&(o[nn]=JSON.stringify(s))}e.setAttributes(o)}function HI(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 WI(e){const t={[Pe]:e.model??"unknown"};"temperature"in e&&(t[Wi]=e.temperature),"top_p"in e&&(t[zi]=e.top_p),"frequency_penalty"in e&&(t[ji]=e.frequency_penalty),"presence_penalty"in e&&(t[Tu]=e.presence_penalty),"stream"in e&&(t[vu]=e.stream),"encoding_format"in e&&(t[Im]=e.encoding_format),"dimensions"in e&&(t[wm]=e.dimensions);const n=HI(e);return n&&(t[Iu]=n),t}function jI(e,t){for(const n of e){const 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{const o=t.chatCompletionToolCalls[r];n.function.arguments&&o?.function&&(o.function.arguments+=n.function.arguments)}}}function zI(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,t.cacheReadInputTokens=e.usage.prompt_tokens_details?.cached_tokens??t.cacheReadInputTokens,t.cacheCreationInputTokens=e.usage.prompt_tokens_details?.cache_write_tokens??t.cacheCreationInputTokens);for(const r of e.choices??[])n&&(r.delta?.content&&t.responseTexts.push(r.delta.content),r.delta?.tool_calls&&jI(r.delta.tool_calls,t)),r.finish_reason&&t.finishReasons.push(r.finish_reason)}function qI(e,t,n,r){if(!(e&&typeof e=="object")){t.eventTypes.push("unknown:non-object");return}if(e instanceof Error){r.setStatus({code:re,message:"internal_error"}),mt(e,{mechanism:{handled:!1,type:"auto.ai.openai.stream-response"}});return}if(!("type"in e))return;const o=e;if(!FI.includes(o.type)){t.eventTypes.push(o.type);return}if(n&&(o.type==="response.output_item.done"&&"item"in o&&t.responsesApiToolCalls.push(o.item),o.type==="response.output_text.delta"&&"delta"in o&&o.delta)){t.responseTexts.push(o.delta);return}if("response"in o){const{response:s}=o;t.responseId=s.id??t.responseId,t.responseModel=s.model??t.responseModel,s.usage&&(t.promptTokens=s.usage.input_tokens,t.completionTokens=s.usage.output_tokens,t.totalTokens=s.usage.total_tokens,t.cacheReadInputTokens=s.usage.input_tokens_details?.cac
18hed_tokens??t.cacheReadInputTokens,t.cacheCreationInputTokens=s.usage.input_tokens_details?.cache_write_tokens??t.cacheCreationInputTokens),s.status&&t.finishReasons.push(s.status),n&&s.output_text&&t.responseTexts.push(s.output_text)}}async function*GI(e,t,n){const r={eventTypes:[],responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,totalTokens:void 0,cacheReadInputTokens:void 0,cacheCreationInputTokens:void 0,chatCompletionToolCalls:{},responsesApiToolCalls:[]};try{for await(const o of e)BI(o)?zI(o,r,n):$I(o)&&qI(o,r,n,t),yield o}finally{const o=[...Object.values(r.chatCompletionToolCalls),...r.responsesApiToolCalls];Ki(t,{...r,toolCalls:o},n)}}function VI(e){const 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}]:[],o=[...t,...r];if(o.length!==0)try{return JSON.stringify(o)}catch(s){k&&g.error("Failed to serialize OpenAI tools:",s);return}}function YI(e,t){const n={[Ho]:"openai",[ht]:t,[Y]:"auto.ai.openai"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const r=e[0],o=VI(r);o&&(n[jo]=o),Object.assign(n,WI(r))}else n[Pe]="unknown";return n}function Md(e,t,n,r){if(n==="embeddings"&&"input"in t){const a=t.input;if(a==null||typeof a=="string"&&a.length===0||Array.isArray(a)&&a.length===0)return;e.setAttribute(wu,typeof a=="string"?a:JSON.stringify(a));return}const o="input"in t?t.input:"messages"in t?t.messages:void 0;if(!o||Array.isArray(o)&&o.length===0)return;const{systemInstructions:s,filteredMessages:i}=zo(o);s&&e.setAttribute(Wo,s),e.setAttribute(Jr,r?Kr(i):qe(i)),Array.isArray(i)?e.setAttribute(Yn,i.length):e.setAttribute(Yn,1)}function JI(e,t,n,r,o){return function(...i){const a=n.operation||"unknown",c=YI(i,a),u=c[Pe]||"unknown",d=i[0],l=d&&typeof d=="object"&&d.stream===!0,p={name:`${a} ${u}`,op:`gen_ai.${a}`,attributes:c};if(l){let m;const _=Xt(p,y=>(m=e.apply(r,i),o.recordInputs&&d&&Md(y,d,a,Wt(o.enableTruncation)),(async()=>{try{const S=await m;return GI(S,y,o.recordOutputs??!1)}catch(S){throw y.setStatus({code:re,message:"internal_error"}),y.end(),S}})()));return ai(m,_)}let f;const h=qt(p,m=>(f=e.apply(r,i),o.recordInputs&&d&&Md(m,d,a,Wt(o.enableTruncation)),f.then(_=>(UI(m,_,o.recordOutputs),_))));return ai(f,h)}}function $m(e,t="",n){return new Proxy(e,{get(r,o){const s=r[o],i=Fm(t,String(o)),a=LI[i];return typeof s=="function"&&a?JI(s,i,a,r,n):typeof s=="function"?s.bind(r):s&&typeof s=="object"?$m(s,i,n):s}})}function jL(e,t){return $m(e,"",Qn(t))}const xd={"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 KI(e,t,n){if(Array.isArray(t)&&t.length===0)return;const{systemInstructions:r,filteredMessages:o}=zo(t);r&&e.setAttributes({[Wo]:r});const s=Array.isArray(o)?o.length:1;e.setAttributes({[Jr]:n?Kr(o):qe(o),[Yn]:s})}const XI={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 Bm(e){return e&&XI[e]||"internal_error"}function QI(e,t){t.error&&(e.setStatus({code:re,message:Bm(t.error.type)}),mt(t.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}))}function ZI(e){const{system:t,messages:n,input:r}=e,o=typeof t=="string"?[{role:"system",content:e.system}]:[],s=Array.isArray(r)?r:r!=null?[r]:void 0,i=Array.isArray(n)?n:n!=null?[n]:[],a=s??i;return[...o,...a]}function e0(e,t){return"type"in e&&typeof e.type=="string"&&e.type==="error"?(t.setStatus({code:re,message:Bm(e.error?.type)}),!0):!1}function t0(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){const 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+(n.usage.cache_creation_input_tokens??0)+(n.usage.cache_read_input_tokens??0)),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 n0(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:[]})}
18function r0(e,t,n){if(!(e.type!=="content_block_delta"||!e.delta)){if(typeof e.index=="number"&&"partial_json"in e.delta&&typeof e.delta.partial_json=="string"){const 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 o0(e,t){if(e.type!=="content_block_stop"||typeof e.index!="number")return;const n=t.activeToolBlocks[e.index];if(!n)return;const r=n.inputJsonParts.join("");let o;try{o=r?JSON.parse(r):{}}catch{o={__unparsed:r}}t.toolCalls.push({type:"tool_use",id:n.id,name:n.name,input:o}),delete t.activeToolBlocks[e.index]}function Um(e,t,n,r){!(e&&typeof e=="object")||e0(e,r)||(t0(e,t),n0(e,t),r0(e,t,n),o0(e,t))}async function*s0(e,t,n){const r={responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};try{for await(const o of e)Um(o,r,n,t),yield o}finally{Ki(t,r,n)}}function i0(e,t,n){const r={responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};return e.on("streamEvent",o=>{Um(o,r,n,t)}),e.on("message",()=>{Ki(t,r,n)}),e.on("error",o=>{mt(o,{mechanism:{handled:!1,type:"auto.ai.anthropic.stream_error"}}),t.isRecording()&&(t.setStatus({code:re,message:"internal_error"}),t.end())}),e}let Os=!1;const Od=new WeakSet;function a0(e,t,n){const r={[Ho]:"anthropic",[ht]:n,[Y]:"auto.ai.anthropic"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const o=e[0];o.tools&&Array.isArray(o.tools)&&(r[jo]=JSON.stringify(o.tools)),r[Pe]=o.model??"unknown","temperature"in o&&(r[Wi]=o.temperature),"top_p"in o&&(r[zi]=o.top_p),"stream"in o&&(r[vu]=o.stream),"top_k"in o&&(r[Tm]=o.top_k),"frequency_penalty"in o&&(r[ji]=o.frequency_penalty),"max_tokens"in o&&(r[Eu]=o.max_tokens)}else t==="models.retrieve"||t==="models.get"?r[Pe]=e[0]:r[Pe]="unknown";return r}function Tc(e,t,n){const r=ZI(t);KI(e,r,n),"prompt"in t&&e.setAttributes({[aI]:JSON.stringify(t.prompt)})}function c0(e,t){if("content"in t&&Array.isArray(t.content)){e.setAttributes({[vt]:t.content.map(r=>r.text).filter(r=>!!r).join("")});const n=[];for(const r of t.content)(r.type==="tool_use"||r.type==="server_tool_use")&&n.push(r);n.length>0&&e.setAttributes({[nn]:JSON.stringify(n)})}"completion"in t&&e.setAttributes({[vt]:t.completion}),"input_tokens"in t&&e.setAttributes({[vt]:JSON.stringify(t.input_tokens)})}function u0(e,t){"id"in t&&"model"in t&&(e.setAttributes({[qi]:t.id,[Yr]:t.model}),"usage"in t&&t.usage&&e.setAttributes(Jn(t.usage.input_tokens+(t.usage.cache_creation_input_tokens??0)+(t.usage.cache_read_input_tokens??0),t.usage.output_tokens,t.usage.cache_creation_input_tokens,t.usage.cache_read_input_tokens)))}function l0(e,t,n){if(!(!t||typeof t!="object")){if("type"in t&&t.type==="error"){QI(e,t);return}n&&c0(e,t),u0(e,t)}}function Pd(e,t){throw t.isRecording()&&(t.setStatus({code:re,message:"internal_error"}),t.end()),e}function d0(e,t,n,r,o,s,i,a,c,u){const d=r[Pe]??"unknown",l={name:`${o} ${d}`,op:`gen_ai.${o}`,attributes:r};if(c&&!u){let p;const f=Xt(l,h=>(p=e.apply(t,n),a.recordInputs&&i&&Tc(h,i,Wt(a.enableTruncation)),(async()=>{try{const m=await p;return s0(m,h,a.recordOutputs??!1)}catch(m){return Pd(m,h)}})()));return ai(p,f)}else return Xt(l,p=>{try{a.recordInputs&&i&&Tc(p,i,Wt(a.enableTruncation)),Os=!0;const f=e.apply(t,n);return Os=!1,i0(f,p,a.recordOutputs??!1)}catch(f){return Os=!1,Pd(f,p)}})}function f0(e,t,n,r,o){return new Proxy(e,{apply(s,i,a){const c=i!==void 0?i:r,u=n.streaming===!0;if(!u&&Os)return s.apply(c,a);const d=n.operation||"unknown",l=a0(a,t,d),p=l[Pe]??"unknown",f=typeof a[0]=="object"?a[0]:void 0,h=!!f?.stream;if(h||u)return d0(s,c,a,l,d,t,f,o,h,u);let m;const _=qt({name:`${d} ${p}`,op:`gen_ai.${d}`,attributes:l},y=>(m=s.apply(c,a),o.recordInputs&&f&&Tc(y,f,Wt(o.enableTruncation)),m.then(S=>(l0(y,S,o.recordOutputs),S))));return ai(m,_)}})}function p0(e,t){for(const n of Object.keys(xd)){const r=n.split("."),o=r.pop();let s=e;for(const c of r)s=s?.[c];if(!s||typeof s[o]!="function")continue;const i=s[o];if(Od.has(i))continue;const a=f0(i,n,xd[n],s,t);Od.add(a),s[o]=a}return e}function zL(e,t){return p0(e,Qn(t))}const h0={"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}},m0="google_genai";function g0(e,t){const n=e?.promptFeedback;if(n?.blockReason){const r=n.blockReasonMessage??n.blockReason;return t.setStatus({code:re,message:"internal_error"}),mt(`Content blocked: ${r}`,{mechanism:{handled:!1,type:"auto.ai.google_genai"}}),!0}return!1}function _0(e,t){typeof e.responseId=="string"&&(t.responseId=e.responseId),typeof e.modelVersion=="str
18ing"&&(t.responseModel=e.modelVersion);const n=e.usageMetadata;n&&(typeof n.promptTokenCount=="number"&&(t.promptTokens=n.promptTokenCount),typeof n.candidatesTokenCount=="number"&&(t.candidateTokens=n.candidatesTokenCount),typeof n.thoughtsTokenCount=="number"&&(t.reasoningOutputTokens=n.thoughtsTokenCount),(t.candidateTokens!==void 0||t.reasoningOutputTokens!==void 0)&&(t.completionTokens=(t.candidateTokens??0)+(t.reasoningOutputTokens??0)),typeof n.totalTokenCount=="number"&&(t.totalTokens=n.totalTokenCount),typeof n.cachedContentTokenCount=="number"&&(t.cacheReadInputTokens=n.cachedContentTokenCount))}function y0(e,t,n){Array.isArray(e.functionCalls)&&t.toolCalls.push(...e.functionCalls);for(const r of e.candidates??[]){r?.finishReason&&!t.finishReasons.includes(r.finishReason)&&t.finishReasons.push(r.finishReason);for(const o of r?.content?.parts??[])n&&o.text&&t.responseTexts.push(o.text),o.functionCall&&t.toolCalls.push({type:"function",id:o.functionCall.id,name:o.functionCall.name,arguments:o.functionCall.args})}}function S0(e,t,n,r){!e||g0(e,r)||(_0(e,t),y0(e,t,n))}async function*b0(e,t,n){const r={responseTexts:[],finishReasons:[],toolCalls:[]};try{for await(const o of e)S0(o,r,n,t),yield o}finally{Ki(t,r,n)}}function io(e,t="user"){return typeof e=="string"?[{role:t,content:e}]:Array.isArray(e)?e.flatMap(n=>io(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 Ld(e,t){if("model"in e&&typeof e.model=="string")return e.model;if(t&&typeof t=="object"){const 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 v0(e){const t={};return"temperature"in e&&typeof e.temperature=="number"&&(t[Wi]=e.temperature),"topP"in e&&typeof e.topP=="number"&&(t[zi]=e.topP),"topK"in e&&typeof e.topK=="number"&&(t[Tm]=e.topK),"maxOutputTokens"in e&&typeof e.maxOutputTokens=="number"&&(t[Eu]=e.maxOutputTokens),"frequencyPenalty"in e&&typeof e.frequencyPenalty=="number"&&(t[ji]=e.frequencyPenalty),"presencePenalty"in e&&typeof e.presencePenalty=="number"&&(t[Tu]=e.presencePenalty),t}function E0(e,t,n){const r={[Ho]:m0,[ht]:e,[Y]:"auto.ai.google_genai"};if(t){if(r[Pe]=Ld(t,n),"config"in t&&typeof t.config=="object"&&t.config){const o=t.config;if(Object.assign(r,v0(o)),"tools"in o&&Array.isArray(o.tools)){const s=o.tools.flatMap(i=>i.functionDeclarations);r[jo]=JSON.stringify(s)}}}else r[Pe]=Ld({},n);return r}function Dd(e,t,n,r){if(n==="embeddings"){const s=t.contents;s!=null&&e.setAttribute(wu,typeof s=="string"?s:JSON.stringify(s));return}const o=[];if("config"in t&&t.config&&typeof t.config=="object"&&"systemInstruction"in t.config&&t.config.systemInstruction&&o.push(...io(t.config.systemInstruction,"system")),"history"in t&&o.push(...io(t.history,"user")),"contents"in t&&o.push(...io(t.contents,"user")),"message"in t&&o.push(...io(t.message,"user")),Array.isArray(o)&&o.length){const{systemInstructions:s,filteredMessages:i}=zo(o);s&&e.setAttribute(Wo,s);const a=Array.isArray(i)?i.length:0;e.setAttributes({[Yn]:a,[Jr]:r?Kr(i):qe(i)})}}function T0(e,t,n){if(!(!t||typeof t!="object")){if(t.modelVersion&&e.setAttribute(Yr,t.modelVersion),t.usageMetadata&&typeof t.usageMetadata=="object"){const r=t.usageMetadata,o=typeof r.candidatesTokenCount=="number"||typeof r.thoughtsTokenCount=="number";e.setAttributes(Jn(r.promptTokenCount,o?(r.candidatesTokenCount??0)+(r.thoughtsTokenCount??0):void 0,void 0,r.cachedContentTokenCount,r.totalTokenCount)),typeof r.thoughtsTokenCount=="number"&&e.setAttribute(kh,r.thoughtsTokenCount)}if(n&&Array.isArray(t.candidates)&&t.candidates.length>0){const r=t.candidates.map(o=>o.content?.parts&&Array.isArray(o.content.parts)?o.content.parts.map(s=>typeof s.text=="string"?s.text:"").filter(s=>s.length>0).join(""):"").filter(o=>o.length>0);r.length>0&&e.setAttributes({[vt]:r.join("")})}if(n&&t.functionCalls){const r=t.functionCalls;Array.isArray(r)&&r.length>0&&e.setAttributes({[nn]:JSON.stringify(r)})}}}function I0(e,t,n,r,o){const s=n.operation==="embeddings";return new Proxy(e,{apply(i,a,c){const u=n.operation||"unknown",d=c[0],l=E0(u,d,r),p=l[Pe]??"unknown";return n.streaming?Xt({name:`${u} ${p}`,op:`gen_ai.${u}`,attributes:l},async f=>{try{o.recordInputs&&d&&Dd(f,d,u,Wt(o.enableTruncation));const h=await i.apply(r,c);return b0(h,f,!!o.recordOutputs)}catch(h){throw f.setStatus({code:re,message:"internal_error"}),f.end(),h}}):qt({name:`${u} ${p}`,op:`gen_ai.${u}`,attributes:l},f=>(o.recordInputs&&d&&Dd(f,d,u,Wt(o.enableTruncation)),iu(()=>i.apply(r,c),()=>{},()=>{},h=>{s||T0(f,h,o.recordOutputs)})))}})}function Ic(e,t="",n){return new Proxy(e,{get:(r,o,s)=>{const i=Reflect.get(r,o,s),a=Fm(t,String(o)),c=h0[a];if(typeof i=="function"&&c){const u=c.operation?I0(i,a,c,r,n):i.bind(r);return c.proxyResultPath?function(...d){const l=u(...d);return l&&typeof l=="object"?Ic(l,c.proxyResultPath,n):l}:u}return typeof i=="function"?i.bind(r):i&&typeof i=="object"?Ic(i,a,n):i}})}function qL(e,t){return Ic(e,"",Qn(t))}const Ru="auto.ai.langchain",w0={human:"user",ai:"assistant",assistant:"assistant",system:"system",function:"function",tool:"tool"},et=(e,t,n)=>{n!=null&&(e[t]=n)},no=(e,t,n)=>{const r=Number(n);Number.isNaN(r)||(e[t]=r)};function or(e){if(Array.isArray(e))try{const t=e.map(n=>n&&typeof n=="object"&&Sr(n)?uo(n):n);return JSON.stringify(t)}catch{return String(e)}return qe(e,String)}function ro(e){const t=e.toLowerCase();return w0[t]??t}function Fd(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 $d(e){if(!(!e||Array.isArray(e)))return e.invocation_params}function Au(e){return e.map(t=>{const n=t._getType;if(typeof n=="function"){const o=n.call(t);return{role:ro(o),content:or(t.content)}}if(t.lc===1&&t.kwargs){const o=t.id,s=Array.isArray(o)&&o.length>0?o[o.length-1]:"",i=typeof s=="string"?Fd(s):"user";return{role:ro(i),content:or(t.kwargs?.content)}}if(t.type){const o=String(t.type).toLowerCase();return{role:ro(o),content:or(t.content)}}if(t.role)return{role:ro(String(t.role)),content:or(t.content)};const r=t.constructor?.name;return r&&r!=="Object"?{role:ro(Fd(r)),content:or(t.content)}:{role:"user",content:or(t.content)}})}function k0(e,t,n){const r={},o="kwargs"in e?e.kwargs:void 0,s=t?.temperature??n?.ls_temperature??o?.temperature;no(r,Wi,s);const i=t?.max_tokens??n?.ls_max_tokens??o?.max_tokens;no(r,Eu,i);const a=t?.top_p??o?.top_p;no(r,zi,a);const c=t?.frequency_penalty;no(r,ji,c);const u=t?.presence_penalty;return no(r,Tu,u),t&&"stream"in t&&et(r,vu,!!t.stream),r}function Hm(e,t,n,r,o){return{[Ho]:qe(e??"langchain",String),[ht]:"chat",[Pe]:qe(t,String),[Y]:Ru,...k0(n,r,o)}}function R0(e,t,n,r,o,s){const i=s?.ls_provider,a=o?.model??s?.ls_model_name??"unknown",c=Hm(i,a,e,o,s);if(n&&Array.isArray(t)&&t.length>0){et(c,Yn,t.length);const u=t.map(d=>({role:"user",content:d}));et(c,Jr,r?Kr(u):qe(u))}return c}function A0(e,t,n,r,o,s){const i=s?.ls_provider??e.id?.[2],a=o?.model??s?.ls_model_name??"unknown",c=Hm(i,a,e,o,s);if(n&&Array.isArray(t)&&t.length>0){const u=Au(t.flat()),{systemInstructions:d,filteredMessages:l}=zo(u);d&&et(c,Wo,d);const p=Array.isArray(l)?l.length:0;et(c,Yn,p),et(c,Jr,r?Kr(l):qe(l))}return c}function C0(e,t){const n=[],r=e.flat();for(const o of r){const i=o.message?.tool_calls;if(Array.isArray(i)&&i.length>0)n.push(...i);else{const a=o.message?.content;if(Array.isArray(a))for(const c of a){const u=c;u.type==="tool_use"&&n.push(u)}}}n.length>0&&et(t,nn,qe(n,String))}function Wm(e){const t=e.usage_metadata;if(xe(t)){const o=xe(t.input_token_details)?t.input_token_details:void 0;return Jn(t.input_tokens,t.output_tokens,o?.cache_creation,o?.cache_read,t.total_tokens)}const n=e.response_metadata,r=xe(n)&&xe(n.tokenUsage)?n.tokenUsage:void 0;return Jn(r?.promptTokens,r?.completionTokens,void 0,void 0,r?.totalTokens)}function N0(e,t){const n={},r={};for(const a of e.generations??[]){const c=a[0]?.message;if(c){const u=xe(c.usage_metadata)?n:r;for(const[d,l]of Object.entries(Wm(c)))u[d]=(u[d]??0)+l}}Object.assign(t,Object.keys(n).length>0?n:r);const o=e.llmOutput;if(!o)return;const s=o.tokenUsage,i=o.usage;if(i&&Object.keys(n).length===0&&Object.keys(r).length===0){const{input_tokens:a,output_tokens:c,cache_creation_input_tokens:u,cac
18he_read_input_tokens:d}=i;Object.assign(t,Jn(a!==void 0||u!==void 0||d!==void 0?(a??0)+(u??0)+(d??0):void 0,c,u,d))}else s&&Object.keys(n).length===0&&Object.keys(r).length===0&&Object.assign(t,Jn(s.promptTokens,s.completionTokens,void 0,void 0,s.totalTokens));i&&(typeof i.cache_creation_input_tokens=="number"&&!(Nr in t)&&(t[Nr]=i.cache_creation_input_tokens),typeof i.cache_read_input_tokens=="number"&&!(Mr in t)&&(t[Mr]=i.cache_read_input_tokens))}function M0(e,t){if(!e)return;const n={};if(Array.isArray(e.generations)){const u=e.generations.flat().map(d=>d.generationInfo?.finish_reason?d.generationInfo.finish_reason:d.generation_info?.finish_reason?d.generation_info.finish_reason:null).filter(d=>typeof d=="string");if(u.length>0&&et(n,yr,qe(u,String)),C0(e.generations,n),t){const d=e.generations.flat().map(l=>l.text??l.message?.content).filter(l=>typeof l=="string");d.length>0&&et(n,vt,qe(d,String))}}N0(e,n);const r=e.llmOutput,s=e.generations?.[0]?.[0]?.message,i=r?.model_name??r?.model??s?.response_metadata?.model_name;i&&et(n,Yr,i);const a=r?.id??s?.id;a&&et(n,qi,a);const c=r?.stop_reason??s?.response_metadata?.finish_reason;return c&&et(n,cI,qe(c,String)),n}function La(e){const t={},n=e?.lc_agent_name;return typeof n=="string"&&(t[Yi]=n),t}function x0(e){const t=e?.invocation_params?.tools??e?.options?.tools;if(!Array.isArray(t)||t.length===0)return;const n=t.map(r=>{const o=r.function;return{type:"function",name:r.name??o?.name??"",description:r.description??o?.description}});return JSON.stringify(n)}function O0(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.addHandler=="function"&&typeof t.copy=="function"}function P0(e){return typeof e=="object"&&e?.name==="SentryCallbackHandler"}function Bd(e){return e.some(P0)}function L0(e,t){if(!e)return[t];if(O0(e)){if(Bd(e.handlers??[]))return e;const r=e.copy();return r.addHandler(t,!0),r}const n=Array.isArray(e)?e:[e];return Bd(n)?e:[...n,t]}function jm(e={}){const{recordInputs:t,recordOutputs:n}=Qn(e),r=Wt(e.enableTruncation),o=new Map,s=a=>{const c=o.get(a);c?.isRecording()&&(c.end(),o.delete(a))},i={lc_serializable:!1,lc_namespace:["langchain_core","callbacks","sentry"],lc_secrets:void 0,lc_attributes:void 0,lc_aliases:void 0,lc_serializable_keys:void 0,lc_id:["langchain_core","callbacks","sentry"],lc_kwargs:{},name:"SentryCallbackHandler",ignoreLLM:!1,ignoreChain:!1,ignoreAgent:!1,ignoreRetriever:!1,ignoreCustomEvent:!1,raiseError:!1,awaitHandlers:!0,handleLLMStart(a,c,u,d,l,p,f,h){const m=$d(p),_=R0(a,c,t,r,m,f),y=_[Pe],S=_[ht];Xt({name:`${S} ${y}`,op:"gen_ai.chat",attributes:{...La(f),..._,[ue]:"gen_ai.chat"}},I=>(o.set(u,I),I))},handleChatModelStart(a,c,u,d,l,p,f,h){const m=$d(p),_=A0(a,c,t,r,m,f),y=x0(l);y&&(_[jo]=y);const S=_[Pe],I=_[ht];Xt({name:`${I} ${S}`,op:"gen_ai.chat",attributes:{...La(f),..._,[ue]:"gen_ai.chat"}},b=>(o.set(u,b),b))},handleLLMEnd(a,c,u,d,l){const p=o.get(c);if(p?.isRecording()){const f=M0(a,n);f&&p.setAttributes(f),s(c)}},handleLLMError(a,c){const u=o.get(c);u?.isRecording()&&(u.setStatus({code:re,message:"internal_error"}),s(c))},handleChainStart(a,c,u,d,l,p,f,h){if(p?.__sentry_langgraph__)return;const m=h||a.name||"unknown_chain",_={[Y]:"auto.ai.langchain","langchain.chain.name":m};t&&(_["langchain.chain.inputs"]=JSON.stringify(c)),Xt({name:`chain ${m}`,op:"gen_ai.invoke_agent",attributes:{..._,[ue]:"gen_ai.invoke_agent"}},y=>(o.set(u,y),y))},handleChainEnd(a,c){const u=o.get(c);u?.isRecording()&&(n&&u.setAttributes({"langchain.chain.outputs":JSON.stringify(a)}),s(c))},handleChainError(a,c){const u=o.get(c);u?.isRecording()&&(u.setStatus({code:re,message:"internal_error"}),s(c))},handleToolStart(a,c,u,d,l,p,f){if(p?.__sentry_langgraph__)return;const h=f||a.name||"unknown_tool",m={...La(p),[Y]:Ru,[ht]:"execute_tool",[Rm]:h};t&&(m[Am]=c),Xt({name:`execute_tool ${h}`,op:"gen_ai.execute_tool",attributes:{...m,[ue]:"gen_ai.execute_tool"}},_=>(o.set(u,_),_))},handleToolEnd(a,c){const u=o.get(c);if(u?.isRecording()){if(n){const d=a,l=d&&typeof d=="object"&&"content"in d?d.content:a;u.setAttributes({[Cm]:typeof l=="string"?l:JSON.stringify(l)})}s(c)}},handleToolError(a,c){const u=o.get(c);u?.isRecording()&&(u.setStatus({code:re,message:"internal_error"}),s(c))},copy(){return i}
18,toJSON(){return{lc:1,type:"not_implemented",id:i.lc_id}},toJSONNotImplemented(){return{lc:1,type:"not_implemented",id:i.lc_id}}};return i}function D0(e){const 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 F0(e){const t=e??{},n={[Y]:Ru,[ue]:km,[ht]:"embeddings",[Pe]:t.model??"unknown"};return n[Ho]=D0(t),"dimensions"in t&&(n[wm]=t.dimensions),"encodingFormat"in t&&(n[Im]=t.encodingFormat),n}function $0(e,t,n={}){const{recordInputs:r}=Qn(n),o=F0(e),s=o[Pe]||"unknown";return r&&t!=null&&(o[wu]=typeof t=="string"?t:JSON.stringify(t)),{name:`embeddings ${s}`,op:km,attributes:o}}function Ud(e,t={}){return new Proxy(e,{apply(n,r,o){return qt($0(r,o[0],t),()=>Reflect.apply(n,r,o))}})}function GL(e,t){const n=e;return typeof n.embedQuery=="function"&&(n.embedQuery=Ud(n.embedQuery,t)),typeof n.embedDocuments=="function"&&(n.embedDocuments=Ud(n.embedDocuments,t)),e}const Cu="auto.ai.langgraph";function B0(e){const t=e[0];if(typeof t!="object"||!t||!("llm"in t)||!t.llm||typeof t.llm!="object")return null;const n=t.llm;return typeof n.modelName!="string"&&typeof n.model!="string"?null:n}function U0(e){const t=e[0];return typeof t=="object"&&t&&"name"in t&&typeof t.name=="string"?t.name:null}function H0(e,t,n){const r="__sentry_tool_wrapped__";for(const o of e){if(!o||typeof o!="object")continue;const s=o,i=s.invoke;if(typeof i!="function"||Object.prototype.hasOwnProperty.call(s,r))continue;const a=typeof s.name=="string"?s.name:"unknown_tool",c=typeof s.description=="string"?s.description:void 0,u=new Proxy(i,{apply(d,l,p){const f={[Y]:Cu,[ue]:Cd,[ht]:"execute_tool",[Rm]:a,[pI]:"function"},m=p[1]?.metadata?.lc_agent_name??n;typeof m=="string"&&(f[Yi]=m),c&&(f[hI]=c);const _=p[0];if(typeof _=="object"&&_&&("id"in _&&typeof _.id=="string"&&(f[fI]=_.id),t.recordInputs)){const y="args"in _&&typeof _.args=="object"?_.args:_;try{f[Am]=JSON.stringify(y)}catch{}}return qt({op:Cd,name:`execute_tool ${a}`,attributes:f},async y=>{try{const S=await Reflect.apply(d,l,p);if(t.recordOutputs)try{const I=S,b=I&&typeof I=="object"&&"content"in I?I.content:S;y.setAttribute(Cm,typeof b=="string"?b:JSON.stringify(b))}catch{}return S}catch(S){throw y.setStatus({code:re,message:"internal_error"}),S}})}});s.invoke=u,Object.defineProperty(s,r,{value:!0,enumerable:!1})}return e}function W0(e){if(!e||e.length===0)return null;const t=[];for(const n of e)if(n&&typeof n=="object"){const r=n.tool_calls;r&&Array.isArray(r)&&t.push(...r)}return t.length>0?t:null}function j0(e){const t=Wm(e);return{inputTokens:t[Gi]??0,outputTokens:t[Vi]??0,totalTokens:t[Eo]??0,cacheCreationInputTokens:t[Nr],cacheReadInputTokens:t[Mr]}}function z0(e,t){const n=t;if(n.response_metadata&&typeof n.response_metadata=="object"){const r=n.response_metadata;r.model_name&&typeof r.model_name=="string"&&e.setAttribute(Yr,r.model_name),r.finish_reason&&typeof r.finish_reason=="string"&&e.setAttribute(yr,[r.finish_reason])}}function q0(e){if(!e.builder?.nodes?.tools?.runnable?.tools)return null;const 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 G0(e,t,n){const o=n?.messages;if(!o||!Array.isArray(o))return;const s=t?.length??0,i=o.length>s?o.slice(s):[];if(i.length===0)return;const a=W0(i);a&&e.setAttribute(nn,JSON.stringify(a));const c=Au(i);e.setAttribute(vt,JSON.stringify(c));let u=0,d=0,l=0,p,f;for(const h of i){const m=j0(h);u+=m.inputTokens,d+=m.outputTokens,l+=m.totalTokens,m.cacheCreationInputTokens!==void 0&&(p=(p??0)+m.cacheCreationInputTokens),m.cacheReadInputTokens!==void 0&&(f=(f??0)+m.cacheReadInputTokens),z0(e,h)}u>0&&e.setAttribute(Gi,u),d>0&&e.setAttribute(Vi,d),l>0&&e.setAttribute(Eo,l),p!==void 0&&e.setAttribute(Nr,p),f!==void 0&&e.setAttribute(Mr,f)}let wc=!1;const ci="__sentry_patched__";function V0(e){const t={[Y]:Cu,[ue]:"gen_ai.create_agent",[ht]:"create_agent"};return{op:"gen_ai.create_agent",name:e?`create_agent ${e}`:"create_agent",attributes:t}}function Y0(e,t){if(Object.prototype.hasOwnProperty.call(e,ci))return e;const n=jm(t),r=new Proxy(e,{apply(o,s,i){return wc?Reflect.apply(o,s,i):qt(V0(),a=>{try{const c=Reflect.apply(o,s,i),u=i.length>0?i[0]:{};u?.name&&typeof u.name=="string"&&(a.setAttribute(Yi,u.name),a.updateName(`create_agent ${u.name}`));const d=c.invoke;return d&&typeof d=="function"&&(c.invoke=zm(d.bind(c),c,u,t,void 0,n)),c}catch(c){throw a.setStatus({code:re,message:"internal_error"}),c}})}});return Object.defineProperty(r,ci,{value:!0,enumerable:!1}),r}function zm(e,t,n,r,o,s){return new Proxy(e,{apply(i,a,c){const u=o?.modelName??o?.model;return qt({op:"gen_ai.invoke_agent",name:"invoke_agent",attributes:{[Y]:Cu,[ue]:dI,[ht]:"invoke_agent"}},async d=>{try{const l=n?.name;l&&typeof l=="string"&&(d.setAttribute(lI,l),d.setAttribute(Yi,l),d.updateName(`invoke_agent ${l}`)),u&&d.setAttribute(Pe,u);const h=(c.length>1?c[1]:void 0)?.configurable?.thread_id;if(h&&typeof h=="string"&&d.setAttribute(Iu,h),s){const b=c[1]??{};c[1]=b;const T=b.metadata??{};b.metadata={...T,__sentry_langgraph__:!0,...typeof l=="string"?{lc_agent_name:l}:{}},b.callbacks=L0(b.callbacks,s)}const m=q0(t);m&&d.setAttribute(jo,JSON.stringify(m));const _=r.recordInputs,y=r.recordOutputs,S=c.length>0?c[0]?.messages??[]:[];if(S&&_){const b=Au(S),{systemInstructions:T,filteredMessages:C}=zo(b);T&&d.setAttribute(Wo,T);const E=Wt(r.enableTruncation),L=Array.isArray(C)?C.length:0;d.setAttributes({[Jr]:E?Kr(C):qe(C),[Yn]:L})}const I=await Reflect.apply(i,a,c);return y&&G0(d,S??null,I),I}catch(l){throw d.setStatus({code:re,message:"internal_error"}),l}})}})}function VL(e,t){if(Object.prototype.hasOwnProperty.call(e,ci))return e;const n=Qn(t),r=jm(n),o=new Proxy(e,{apply(s,i,a){const c=B0(a),u=U0(a),d=a[0];d&&Array.isArray(d.tools)&&d.tools.length>0&&H0(d.tools,n,u??void 0),wc=!0;let l;try{l=Reflect.apply(s,i,a)}finally{wc=!1}const p=l.invoke;if(p&&typeof p=="function"){const f={};u&&(f.name=u),l.invoke=zm(p.bind(l),l,f,n,c,r)}return l}});return Object.defineProperty(o,ci,{value:!0,enumerable:!1}),o}function J0(e,t){return e.compile=Y0(e.compile,Qn(t)),e}const YL=J0;function K0(e,t,n){const r=n.getOptions(),o=n.getDsn(),s=r.tunnel,i=Fo(r._metadata),a={sent_at:new Date(Ct()).toISOString(),...X0(t)&&{trace:t},...i&&{sdk:i},...!!s&&o&&{dsn:Nt(o)}},c=n.getDataCollectionOptions().userInfo?"auto":"never",u=[{type:"span",item_count:e.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...dn()&&{ingest_settings:{infer_ip:c,infer_user_agent:c}},items:e}];return it(a,[u])}function X0(e){return!!e.trace_id&&!!e.public_key}function Q0(e){let t=156;if(t+=e.name.length*2,t+=Ml(e.attributes),e.links&&e.links.length>0){const r=e.links[0]?.attributes,o=100+(r?Ml(r):0);t+=o*e.links.length}return t}const Hd=1e3,Z0=5e6;class ew{constructor(t,n){this._traceBuckets=new Map,this._client=t;const{maxSpanLimit:r,flushInterval:o,maxTraceWeightInBytes:s}=n??{};this._maxSpanLimit=r&&r>0&&r<=Hd?r:Hd,this._flushInterval=o&&o>0?o:5e3,this._maxTraceWeight=s&&s>0?s:Z0,this._client.on("flush",()=>{this.drain()}),this._client.on("close",()=>
18{this._traceBuckets.forEach(i=>{clearTimeout(i.timeout)}),this._traceBuckets.clear()})}add(t){const n=t.trace_id;let r=this._traceBuckets.get(n);r||(r={spans:new Set,size:0,timeout:$i(setTimeout(()=>{this.flush(n)},this._flushInterval))},this._traceBuckets.set(n,r)),r.spans.add(t),r.size+=Q0(t),(r.spans.size>=this._maxSpanLimit||r.size>=this._maxTraceWeight)&&this.flush(n)}drain(){this._traceBuckets.size&&(k&&g.log(`Flushing span tree map with ${this._traceBuckets.size} traces`),this._traceBuckets.forEach((t,n)=>{this.flush(n)}))}flush(t){const n=this._traceBuckets.get(t);if(!n)return;if(!n.spans.size){this._removeTrace(t);return}const r=Array.from(n.spans),o=r[0]?._segmentSpan;if(!o){k&&g.warn("No segment span reference found on span JSON, cannot compute DSC"),this._removeTrace(t);return}const s=gt(o),i=r.map(c=>{const{_segmentSpan:u,...d}=c;return d}),a=K0(i,s,this._client);k&&g.log(`Sending span envelope for trace ${t} with ${i.length} spans`),this._client.sendEnvelope(a).then(null,c=>{k&&g.error("Error while sending streamed span envelope:",c)}),this._removeTrace(t)}_removeTrace(t){const n=this._traceBuckets.get(t);n&&clearTimeout(n.timeout),this._traceBuckets.delete(t)}}function qm(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const xr=B;function tw(){return"history"in xr&&!!xr.history}function nw(){if(!("fetch"in xr))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function kc(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Gm(){if(typeof EdgeRuntime=="string")return!0;if(!nw())return!1;if(kc(xr.fetch))return!0;let e=!1;const t=xr.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=kc(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){k&&g.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function rw(){return"ReportingObserver"in xr}function Xi(e,t){const n="fetch",r=gn(n,e);return _n(n,()=>Vm(void 0,t)),r}function ow(e){const t="fetch-body-resolved",n=gn(t,e);return _n(t,()=>Vm(iw)),n}function Vm(e,t=!1){t&&!Gm()||Oe(B,"fetch",function(n){return function(...r){const o=new Error,{method:s,url:i}=aw(r),a={args:r,fetchData:{method:s,url:i},startTimestamp:he()*1e3,virtualError:o,headers:cw(r)};return e||tt("fetch",{...a}),n.apply(B,r).then(async c=>(e?e(c):tt("fetch",{...a,endTimestamp:he()*1e3,response:c}),c),c=>{tt("fetch",{...a,endTimestamp:he()*1e3,error:c}),$e(c)&&c.stack===void 0&&(c.stack=o.stack,ye(c,"framesToPop",1));const d=R()?.getOptions().enhanceFetchErrorMessages??"always";if(d!==!1&&$e(c)&&c.name==="TypeError"&&(c.message==="Failed to fetch"||c.message==="Load failed"||c.message==="NetworkError when attempting to fetch resource."))try{const f=new URL(a.fetchData.url).host;d==="always"?c.message=`${c.message} (${f})`:ye(c,"__sentry_fetch_url_host__",f)}catch{}throw c})}})}async function sw(e,t){if(e?.body){const n=e.body,r=n.getReader(),o=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let s=!0;for(;s;){let i;try{i=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:a}=await r.read();clearTimeout(i),a&&(t(),s=!1)}catch{s=!1}finally{clearTimeout(i)}}clearTimeout(o),r.releaseLock(),n.cancel().then(null,()=>{})}}function iw(e){let t;try{t=e.clone()}catch{return}sw(t,()=>{tt("fetch-body-resolved",{endTimestamp:he()*1e3,response:e})})}function Ps(e,t){return xe(e)&&!!e[t]}function Wd(e){return typeof e=="string"?e:e?Ps(e,"url")?e.url:e.toString?e.toString():"":""}function aw(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:Wd(n),method:Ps(r,"method")?String(r.method).toUpperCase():eu(n)&&Ps(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:Wd(t),method:Ps(t,"method")?String(t.method).toUpperCase():"GET"}}function cw(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(eu(t))return new Headers(t.headers)}catch{}}const Ym=B;function fn(){try{return Ym.document.location.href}catch{return""}}function Nu(e,t=5){if(!Ym.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}const dt=B,de=dt.document,ao=dt.navigator,Jm="Report a Bug",uw="Cancel",lw="Send Bug Report",dw="Confirm",fw="Report a Bug",pw="[email protected]",hw="Email",mw="What's the bug? What did you expect?",gw="Description",_w="Your Name",yw="Name",Sw="Thank y
18ou for your report!",bw="(required)",vw="Add a screenshot",Ew="Remove screenshot",Tw="Highlight",Iw="Hide",ww="Remove",Km="Unable to submit feedback with empty message",Xm="No client setup, cannot send feedback.",Qm="Unable to determine if Feedback was correctly sent.",Zm="Unable to send feedback. This could be because this domain is not in your list of allowed domains.",eg="Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.",kw="widget",Rw="api",Aw=5e3,Cw={ERROR_EMPTY_MESSAGE:Km,ERROR_NO_CLIENT:Xm,ERROR_TIMEOUT:Qm,ERROR_FORBIDDEN:Zm,ERROR_GENERIC:eg};function Ls(e,t){return t?.[e]??Cw[e]}function jd(e,t){return new Error(Ls(e,t))}const Nw=(e,t={includeReplay:!0})=>{const n=t.errorMessages;if(!e.message)throw jd("ERROR_EMPTY_MESSAGE",n);const r=R();if(!r)throw jd("ERROR_NO_CLIENT",n);e.tags&&Object.keys(e.tags).length&&W().setTags(e.tags);const o=jT({source:Rw,url:fn(),...e},t);return new Promise((s,i)=>{const a=setTimeout(()=>{c(),i(Ls("ERROR_TIMEOUT",n))},3e4),c=r.on("afterSendEvent",(u,d)=>{if(u.event_id===o)return clearTimeout(a),c(),d?.statusCode&&d.statusCode>=200&&d.statusCode<300?s(o):d?.statusCode===403?i(Ls("ERROR_FORBIDDEN",n)):i(Ls("ERROR_GENERIC",n))})})},Ds=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Mw(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(ao.userAgent)||/Macintosh/i.test(ao.userAgent)&&ao.maxTouchPoints&&ao.maxTouchPoints>1||!isSecureContext)}function hs(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 xw(e){const t=de.createElement("style");return t.textContent=` 19.widget__actor { 20 position: fixed; 21 z-index: var(--z-index); 22 margin: var(--page-margin); 23 inset: var(--actor-inset); 24 25 display: flex; 26 align-items: center; 27 gap: 8px; 28 padding: 16px; 29 30 font-family: inherit; 31 font-size: var(--font-size); 32 font-weight: 600; 33 line-height: 1.14em; 34 text-decoration: none; 35 36 background: var(--actor-background, var(--background)); 37 border-radius: var(--actor-border-radius, 1.7em/50%); 38 border: var(--actor-border, var(--border));
39 box-shadow: var(--actor-box-shadow, var(--box-shadow)); 40 color: var(--actor-color, var(--foreground)); 41 fill: var(--actor-color, var(--foreground)); 42 cursor: pointer; 43 opacity: 1; 44 transition: transform 0.2s ease-in-out; 45 transform: translate(0, 0) scale(1); 46} 47.widget__actor[aria-hidden="true"] { 48 opacity: 0; 49 pointer-events: none; 50 visibility: hidden; 51 transform: translate(0, 16px) scale(0.98); 52} 53 54.widget__actor:hover { 55 background: var(--actor-hover-background, var(--background)); 56 filter: var(--interactive-filter); 57} 58 59.widget__actor svg { 60 width: 1.14em; 61 height: 1.14em; 62} 63 64@media (max-width: 600px) { 65 .widget__actor span { 66 display: none; 67 } 68} 69`,e&&t.setAttribute("nonce",e),t}function ze(e,t){return Object.entries(t).forEach(([n,r])=>{e.setAttributeNS(null,n,r)}),e}const sr=20,Ow="http://www.w3.org/2000/svg";function Pw(){const e=a=>dt.document.createElementNS(Ow,a),t=ze(e("svg"),{width:`${sr}`,height:`${sr}`,viewBox:`0 0 ${sr} ${sr}`,fill:"var(--actor-color, var(--foreground))"}),n=ze(e("g"),{clipPath:"url(#clip0_57_80)"}),r=ze(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);const o=e("defs"),s=ze(e("clipPath"),{id:"clip0_57_80"}),i=ze(e("rect"),{width:`${sr}`,height:`${sr}`,fill:"white"});return s.appendChild(i),o.appendChild(s),t.appendChild(o).appendChild(s).appendChild(i),t}function Lw({triggerLabel:e,triggerAriaLabel:t,shadow:n,styleNonce:r}){const o=de.createElement("button");if(o.type="button",o.className="widget__actor",o.ariaHidden="false",o.ariaLabel=t||e||Jm,o.appendChild(Pw()),e){const i=de.createElement("span");i.appendChild(de.createTextNode(e)),o.appendChild(i)}const s=xw(r);return{el:o,appendToDom(){n.appendChild(s),n.appendChild(o)},removeFromDom(){o.remove(),s.remove()},show(){o.ariaHidden="false"},hide(){o.ariaHidden="true"}}}const tg="rgba(88, 74, 192, 1)",Dw={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:tg,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%)"},zd={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackgroun
69d:tg,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 qd(e){return` 70 --foreground: ${e.foreground}; 71 --background: ${e.background}; 72 --accent-foreground: ${e.accentForeground}; 73 --accent-background: ${e.accentBackground}; 74 --success-color: ${e.successColor}; 75 --error-color: ${e.errorColor}; 76 --border: ${e.border}; 77 --box-shadow: ${e.boxShadow}; 78 --outline: ${e.outline}; 79 --interactive-filter: ${e.interactiveFilter}; 80 `}function Gd({colorScheme:e,themeDark:t,themeLight:n,styleNonce:r}){const o=de.createElement("style");return o.textContent=` 81:host { 82 --font-family: system-ui, 'Helvetica Neue', Arial, sans-serif; 83 --font-size: 14px; 84 --z-index: 100000; 85 86 --page-margin: 16px; 87 --inset: auto 0 0 auto; 88 --actor-inset: var(--inset); 89 90 font-family: var(--font-family); 91 font-size: var(--font-size); 92 93 ${e!=="system"?`color-scheme: only ${e};`:""} 94 95 ${qd(e==="dark"?{...zd,...t}:{...Dw,...n})} 96} 97 98${e==="system"?` 99@media (prefers-color-scheme: dark) { 100 :host { 101 color-scheme: only dark; 102 103 ${qd({...zd,...t})} 104 } 105}`:""} 106`,r&&o.setAttribute("nonce",r),o}const ng=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>(({id:o="sentry-feedback",autoInject:s=!0,showBranding:i=!0,isEmailRequired:a=!1,isNameRequired:c=!1,showEmail:u=!0,showName:d=!0,enableScreenshot:l=!0,useSentryUser:p={email:"email",name:"username"},tags:f,styleNonce:h,scriptNonce:m,colorScheme:_="system",themeLight:y={},themeDark:S={},addScreenshotButtonLabel:I=vw,cancelButtonLabel:b=uw,confirmButtonLabel:T=dw,emailLabel:C=hw,emailPlaceholder:E=pw,formTitle:L=fw,isRequiredLabel:N=bw,messageLabel:v=gw,messagePlaceholder:P=mw,nameLabel:M=yw,namePlaceholder:O=_w,removeScreenshotButtonLabel:q=Ew,submitButtonLabel:Q=lw,successMessageText:J=Sw,triggerLabel:U=Jm,triggerAriaLabel:x="",highlightToolText:H=Tw,hideToolText:D=Iw,removeHighlightText:Z=ww,errorEmptyMessageText:se=Km,errorNoClientText:ne=Xm,errorTimeoutText:ie=Qm,errorForbiddenText:Xe=Zm,errorGenericText:ct=eg,onFormOpen:xt,onFormClose:ut,onSubmitSuccess:Tn,onSubmitError:Ot,onFormSubmitted:us}={})=>{const Pt={id:o,autoInject:s,showBranding:i,isEmailRequired:a,isNameRequired:c,showEmail:u,showName:d,enableScreenshot:l,useSentryUser:p,tags:f,styleNonce:h,scriptNonce:m,colorScheme:_,themeDark:S,themeLight:y,triggerLabel:U,triggerAriaLabel:x,cancelButtonLabel:b,submitButtonLabel:Q,confirmButtonLabel:T,formTitle:L,emailLabel:C,emailPlaceholder:E,messageLabel:v,messagePlaceholder:P,nameLabel:M,namePlaceholder:O,successMessageText:J,isRequiredLabel:N,addScreenshotButtonLabel:I,removeScreenshotButtonLabel:q,highlightToolText:H,hideToolText:D,removeHighlightText:Z,errorEmptyMessageText:se,errorNoClientText:ne,errorTimeoutText:ie,errorForbiddenText:Xe,errorGenericText:ct,onFormClose:ut,onFormOpen:xt,onSubmitError:Ot,onSubmitSuccess:Tn,onFormSubmitted:us};let Qe=null,Be=null,We=[];const tr=F=>{if(!Qe){const ae=de.createElement("div");ae.id=String(F.id),de.body.appendChild(ae),Qe=ae.attachShadow({mode:"open"}),Be=Gd(F),Qe.appendChild(Be)}return Qe},nr=async F=>{const ae=F.enableScreenshot&&Mw();let X,ce;try{X=(t?t():await e("feedbackModalIntegration",m))(),rd(X)}catch{throw Ds&&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{const Rn=ae?n?n():await e("feedbackScreenshotIntegration",m):void 0;Rn&&(ce=Rn(),rd(ce))}catch{Ds&&g.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.")}const K={ERROR_EMPTY_MESSAGE:F.errorEmptyMessageText,ERROR_NO_CLIENT:F.errorNoClientText,ERROR_TIMEOUT:F.errorTimeoutText,ERROR_FORBIDDEN:F.errorForbiddenText,ERROR_GENERIC:F.errorGenericText},_t=(Rn,Ey)=>Nw(Rn,{includeReplay:!0,...Ey,errorMessages:K}),kn=X.createDialog({options:{...F,onFormClose:()=>{kn?.close(),F.onFormClose?.()},onFormSubmitted:()=>{kn?.close(),F.onFormSubmitted?.()}},screenshotIntegration:ce,sendFeedback:_t,shadow:tr(F)});return kn},In=(F,ae={})=>{const X=hs(Pt,ae),ce=typeof F=="string"?de.querySelector(F):typeof F.addEventListener=="function"?F:null;if(!ce)throw Ds&&g.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let K=null;const _t=async()=>{K||(K=await nr({...X,onFormSubmitted:()=>{K?.removeFromDom(),X.onFormSubmitted?.()}})),K.appendToDom(),K.open()};ce.addEventListener("click",_t);const kn=()=>{We=We.filter(Rn=>Rn!==kn),K?.removeFromDom(),K=null,ce.removeEventListener("click",_t)};return We.push(kn),kn},wn=(F={})=>{const ae=hs(Pt,F),X=tr(ae),ce=Lw({triggerLabel:ae.triggerLabel,triggerAriaLabel:ae.triggerAriaLabel,shadow:X,styleNonce:h});return In(ce.el,{...ae,onFormOpen(){ce.hide()},onFormClose(){ce.show()},onFormSubmitted(){ce.show()}}),ce};return{name:"Feedback",setupOnce(){!dn()||!Pt.autoInject||(de.readyState==="loading"?de.addEventListener("DOMContentLoaded",()=>wn().appendToDom()):wn().appendToDom())},attachTo:In,createWidget(F={}){const ae=wn(hs(Pt,F));return ae.appendToDom(),ae},async createForm(F={}){return nr(hs(Pt,F))},setTheme(F){if(Pt.colorScheme=F,Qe){const ae=Gd(Pt);Be?Qe.replaceChild(ae,Be):Qe.prepend(ae),Be=ae}},remove(){Qe&&(Qe.parentElement?.remove(),Qe=null,Be=null),We.forEach(F=>F()),We=[]}}});function JL(){return R()?.getIntegrationByName("Feedback")}var Qi,pe,rg,xn,Vd,og,Rc,To={},Mu=[],Fw=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,xu=Array.isArray;function Qt(e,t){for(var n in t)e[n]=t[n];return e}function sg(e){var t=e.parentNode;t&&t.removeChild(e)}function te(e,t,n){var r,o,s,i={};for(s in t)s=="key"?r=t[s]:s=="ref"?o=t[s]:i[s]=t[s];if(arguments.length>2&&(i.children=arguments.length>3?Qi.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)i[s]===void 0&&(i[s]=e.defaultProps[s]);return Fs(e,i,r,o,null)}function Fs(e,t,n,r,o){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++rg,__i:-1,__u:0};return o==null&&pe.vnode!=null&&pe.vnode(s),s}function qo(e){return e.children}function $s(e,t){this.props=e,this.context=t}function Or(e,t){if(t==null)return e.__?Or(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"?Or(e):null}function $w(e,t,n){var r,o=e.__v,s=o.__e,i=e.__P;if(i)return(r=Qt({},o)).__v=o.__v+1,pe.vnode&&pe.vnode(r),Ou(i,r,o,e.__n,i.ownerSVGElement!==void 0,32&o.__u?[s]:null,t,s??Or(o),!!(32&o.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=s&&ig(r),r}function ig(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 ig(e)}}function Yd(e){(!e.__d&&(e.__d=!0)&&xn.push(e)&&!ui.__r++||Vd!==pe.debounceRendering)&&((Vd=pe.debounceRendering)||og)(ui)}function ui(){var e,t,n,r=[],o=[];for(xn.sort(Rc);e=xn.shift();)e.__d&&(n=xn.length,t=$w(e,r,o)||t,n===0||xn.length>n?(Ac(r,t,o),o.length=r.length=0,t=void 0,xn.sort(Rc)):t&&pe.__c&&pe.__c(t,Mu));t&&Ac(r,t,o),ui.__r=0}function ag(e,t,n,r,o,s,i,a,c,u,d){var l,p,f,h,m,_=r&&r.__k||Mu,y=t.length;for(n.__d=c,Bw(n,t,_),c=n.__d,l=0;l<y;l++)(f=n.__k[l])!=null&&typeof f!="boolean"&&typeof f!="function"&&(p=f.__i===-1?To:_[f.__i]||To,f.__i=l,Ou(e,f,p,o,s,i,a,c,u,d),h=f.__e,f.ref&&p.ref!=f.ref&&(p.ref&&Pu(p.ref,null,f),d.push(f.ref,f.__c||h,f)),m==null&&h!=null&&(m=h),65536&f.__u||p.__k===f.__k?c=cg(f,c,e):typeof f.type=="function"&&f.__d!==void 0?c=f.__d:h&&(c=h.nextSibling),f.__d=void 0,f.__u&=-196609);n.__d=c,n.__e=m}function Bw(e,t,n){var r,o,s,i,a,c=t.length,u=n.length,d=u,l=0;for(e.__k=[],r=0;r<c;r++)(o=e.__k[r]=(o=t[r])==null||typeof o=="boolean"||typeof o=="function"?null:typeof o=="str
106ing"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?Fs(null,o,null,null,o):xu(o)?Fs(qo,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?Fs(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)!=null?(o.__=e,o.__b=e.__b+1,a=Uw(o,n,i=r+l,d),o.__i=a,s=null,a!==-1&&(d--,(s=n[a])&&(s.__u|=131072)),s==null||s.__v===null?(a==-1&&l--,typeof o.type!="function"&&(o.__u|=65536)):a!==i&&(a===i+1?l++:a>i?d>c-i?l+=a-i:l--:l=a<i&&a==i-1?a-i:0,a!==r+l&&(o.__u|=65536))):(s=n[r])&&s.key==null&&s.__e&&(s.__e==e.__d&&(e.__d=Or(s)),Cc(s,s,!1),n[r]=null,d--);if(d)for(r=0;r<u;r++)(s=n[r])!=null&&(131072&s.__u)==0&&(s.__e==e.__d&&(e.__d=Or(s)),Cc(s,s))}function cg(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=cg(r[o],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function Uw(e,t,n,r){var o=e.key,s=e.type,i=n-1,a=n+1,c=t[n];if(c===null||c&&o==c.key&&s===c.type)return n;if(r>(c!=null&&(131072&c.__u)==0?1:0))for(;i>=0||a<t.length;){if(i>=0){if((c=t[i])&&(131072&c.__u)==0&&o==c.key&&s===c.type)return i;i--}if(a<t.length){if((c=t[a])&&(131072&c.__u)==0&&o==c.key&&s===c.type)return a;a++}}return-1}function Jd(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Fw.test(t)?n:n+"px"}function ms(e,t,n,r,o){var s;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||Jd(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Jd(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")s=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+s]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,s?Xd:Kd,s)):e.removeEventListener(t,s?Xd:Kd,s);else{if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t!=="role"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function Kd(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(pe.event?pe.event(e):e)}}function Xd(e){if(this.l)return this.l[e.type+!0](pe.event?pe.event(e):e)}function Ou(e,t,n,r,o,s,i,a,c,u){var d,l,p,f,h,m,_,y,S,I,b,T,C,E,L,N=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),s=[a=t.__e=n.__e]),(d=pe.__b)&&d(t);e:if(typeof N=="function")try{if(y=t.props,S=(d=N.contextType)&&r[d.__c],I=d?S?S.props.value:d.__:r,n.__c?_=(l=t.__c=n.__c).__=l.__E:("prototype"in N&&N.prototype.render?t.__c=l=new N(y,I):(t.__c=l=new $s(y,I),l.constructor=N,l.render=Ww),S&&S.sub(l),l.props=y,l.state||(l.state={}),l.context=I,l.__n=r,p=l.__d=!0,l.__h=[],l._sb=[]),l.__s==null&&(l.__s=l.state),N.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=Qt({},l.__s)),Qt(l.__s,N.getDerivedStateFromProps(y,l.__s))),f=l.props,h=l.state,l.__v=t,p)N.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(N.getDerivedStateFromProps==null&&y!==f&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(y,I),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(y,l.__s,I)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(l.props=y,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(v){v&&(v.__=t)}),b=0;b<l._sb.length;b++)l.__h.push(l._sb[b]);l._sb=[],l.__h.length&&i.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(y,l.__s,I),l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(f,h,m)})}if(l.context=I,l.props=y,l.__P=e,l.__e=!1,T=pe.__r,C=0,"prototype"in N&&N.prototype.render){for(l.state=l.__s,l.__d=!1,T&&T(t),d=l.render(l.props,l.state,l.context),E=0;E<l._sb.length;E++)l.__h.push(l._sb[E]);l._sb=[]}else do l.__d=!1,T&&T(t),d=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++C<25);l.state=l.__s,l.getChildContext!=null&&(r=Qt(Qt({},r),l.getChildContext())),p||l.getSnapshotBeforeUpdate==null||(m=l.getSnapshotBeforeUpdate(f,h)),ag(e,xu(L=d!=null&&d.type===qo&&d.key==null?d.props.children:d)?L:[L],t,n,r,o,s,i,a,c,u),l.base=t.__e,t.__u&=-161,l.__h.length&&i.push(l),_&&(l.__E=l.__=null)}catch(v){t.__v=null,c||s!=null?(t.__e=a,t.__u|=c?160:32,s[s.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),pe.__e(v,t,n)}else s==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Hw(n.__e,t,n,r,o,s,i,c,u);(d=pe.diffed)&&d(t)}function Ac(e,t,n){for(var r=0;r<n.length;r++)Pu(n[r],n[++r],n[++r]);pe.__c&&pe.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(s){s.call(o)})}catch(s){pe.__e(s,o.__v)}})}function Hw(e,t,n,r,o,s,i,a,c){var u,d,l,p,f,h,m,_=n.props,y=t.props,S=t.type;if(S==="svg"&&(o=!0),s!=null){for(u=0;
vendor: 2,583 bytes, line 106
106u<s.length;u++)if((f=s[u])&&"setAttribute"in f==!!S&&(S?f.localName===S:f.nodeType===3)){e=f,s[u]=null;break}}if(e==null){if(S===null)return document.createTextNode(y);e=o?document.createElementNS("http://www.w3.org/2000/svg",S):document.createElement(S,y.is&&y),s=null,a=!1}if(S===null)_===y||a&&e.data===y||(e.data=y);else{if(s=s&&Qi.call(e.childNodes),_=n.props||To,!a&&s!=null)for(_={},u=0;u<e.attributes.length;u++)_[(f=e.attributes[u]).name]=f.value;for(u in _)f=_[u],u=="children"||(u=="dangerouslySetInnerHTML"?l=f:u==="key"||u in y||ms(e,u,null,f,o));for(u in y)f=y[u],u=="children"?p=f:u=="dangerouslySetInnerHTML"?d=f:u=="value"?h=f:u=="checked"?m=f:u==="key"||a&&typeof f!="function"||_[u]===f||ms(e,u,f,_[u],o);if(d)a||l&&(d.__html===l.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(l&&(e.innerHTML=""),ag(e,xu(p)?p:[p],t,n,r,o&&S!=="foreignObject",s,i,s?s[0]:n.__k&&Or(n,0),a,c),s!=null)for(u=s.length;u--;)s[u]!=null&&sg(s[u]);a||(u="value",h!==void 0&&(h!==e[u]||S==="progress"&&!h||S==="option"&&h!==_[u])&&ms(e,u,h,_[u],!1),u="checked",m!==void 0&&m!==e[u]&&ms(e,u,m,_[u],!1))}return e}function Pu(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){pe.__e(r,n)}}function Cc(e,t,n){var r,o;if(pe.unmount&&pe.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Pu(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){pe.__e(s,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&Cc(r[o],t,n||typeof e.type!="function");n||e.__e==null||sg(e.__e),e.__=e.__e=e.__d=void 0}function Ww(e,t,n){return this.constructor(e,n)}function jw(e,t,n){var r,o,s,i;pe.__&&pe.__(e,t),o=(r=!1)?null:t.__k,s=[],i=[],Ou(t,e=t.__k=te(qo,null,[e]),o||To,To,t.ownerSVGElement!==void 0,o?null:t.firstChild?Qi.call(t.childNodes):null,s,o?o.__e:t.firstChild,r,i),e.__d=void 0,Ac(s,e,i)}Qi=Mu.slice,pe={__e:function(e,t,n,r){for(var o,s,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((s=o.constructor)&&s.getDerivedStateFromError!=null&&(o.setState(s.getDerivedStateFromError(e)),i=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(a){e=a}throw e}},rg=0,$s.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Qt({},this.state),typeof e=="function"&&(e=e(Qt({},n),this.props)),e&&Qt(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Yd(this))},$s.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Yd(this))},$s.prototype.render=qo,xn=[],og=typeof Promise=="function"?Promise.prototype.then.bind(Prom
106ise.resolve()):setTimeout,Rc=function(e,t){return e.__v.__b-t.__v.__b},ui.__r=0;var jt,fe,Da,Qd,Pr=0,ug=[],Bs=[],be=pe,Zd=be.__b,ef=be.__r,tf=be.diffed,nf=be.__c,rf=be.unmount,of=be.__;function Zn(e,t){be.__h&&be.__h(fe,e,Pr||t),Pr=0;var n=fe.__H||(fe.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Bs}),n.__[e]}function Pn(e){return Pr=1,lg(fg,e)}function lg(e,t,n){var r=Zn(jt++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):fg(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=fe,!fe.u)){var o=function(a,c,u){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(p){return!!p.__c});if(d.every(function(p){return!p.__N}))return!s||s.call(this,a,c,u);var l=!1;return d.forEach(function(p){if(p.__N){var f=p.__[0];p.__=p.__N,p.__N=void 0,f!==p.__[0]&&(l=!0)}}),!(!l&&r.__c.props===a)&&(!s||s.call(this,a,c,u))};fe.u=!0;var s=fe.shouldComponentUpdate,i=fe.componentWillUpdate;fe.componentWillUpdate=function(a,c,u){if(this.__e){var d=s;s=void 0,o(a,c,u),s=d}i&&i.call(this,a,c,u)},fe.shouldComponentUpdate=o}return r.__N||r.__}function zw(e,t){var n=Zn(jt++,3);!be.__s&&Lu(n.__H,t)&&(n.__=e,n.i=t,fe.__H.__h.push(n))}function dg(e,t){var n=Zn(jt++,4);!be.__s&&Lu(n.__H,t)&&(n.__=e,n.i=t,fe.__h.push(n))}function qw(e){return Pr=5,Go(function(){return{current:e}},[])}function Gw(e,t,n){Pr=6,dg(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 Go(e,t){var n=Zn(jt++,7);return Lu(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function br(e,t){return Pr=8,Go(function(){return e},t)}function Vw(e){var t=fe.context[e.__c],n=Zn(jt++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(fe)),t.props.value):e.__}function Yw(e,t){be.useDebugValue&&be.useDebugValue(t?t(e):e)}function Jw(e){var t=Zn(jt++,10),n=Pn();return t.__=e,fe.componentDidCatch||(fe.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function Kw(){var e=Zn(jt++,11);if(!e.__){for(var t=fe.__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 Xw(){for(var e;e=ug.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Us),e.__H.__h.forEach(Nc),e.__H.__h=[]}catch(t){e.__H.__h=[],be.__e(t,e.__v)}}be.__b=function(e){fe=null,Zd&&Zd(e)},be.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),of&&of(e,t)},be.__r=function(e){ef&&ef(e),jt=0;var t=(fe=e.__c).__H;t&&(Da===fe?(t.__h=[],fe.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Bs,n.__N=n.i=void 0})):(t.__h.forEach(Us),t.__h.forEach(Nc),t.__h=[],jt=0)),Da=fe},be.diffed=function(e){tf&&tf(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(ug.push(t)!==1&&Qd===be.requestAnimationFrame||((Qd=be.requestAnimationFrame)||Qw)(Xw)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Bs&&(n.__=n.__V),n.i=void 0,n.__V=Bs})),Da=fe=null},be.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Us),n.__h=n.__h.filter(function(r){return!r.__||Nc(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],be.__e(r,n.__v)}}),nf&&nf(e,t)},be.unmount=function(e){rf&&rf(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Us(r)}catch(o){t=o}}),n.__H=void 0,t&&be.__e(t,n.__v))};var sf=typeof requestAnimationFrame=="function";function Qw(e){var t,n=function(){clearTimeout(r),sf&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);sf&&(t=requestAnimationFrame(n))}function Us(e){var t=fe,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),fe=t}function Nc(e){var t=fe;e.__c=e.__(),fe=t}function Lu(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function fg(e,t){return typeof t=="function"?t(e):t}const Zw=Object.defineProperty({__proto__:null,useCallback:br,useContext:Vw,useDebugValue:Yw,useEffect:zw,useErrorBoundary:Jw,useId:Kw,useImperativeHandle:Gw,useLayoutEffect:dg,useMemo:Go,useReducer:lg,useRef:qw,useState:Pn},Symbol.toStringTag,{value:"Module"}),ek="http://www.w3.org/2000/svg";function tk(){const e=r=>de.createElementNS(ek,r),t=ze(e("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),n=ze(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 nk({options:e}){const t=Go(()=>({__html:tk().outerHTML}),[]);return te("h2",{class:"dialog__header"},te("span",{class:"dialog__title"},e.formTitle),e.showBranding?te("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:t}):null)}function rk(e,t){const 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 Fa(e,t){const n=e.get(t);return typeof n=="string"?n.trim():""}function ok({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:o,onSubmitSuccess:s,onSubmitError:i,showEmail
106:a,showName:c,screenshotInput:u}){const{tags:d,addScreenshotButtonLabel:l,removeScreenshotButtonLabel:p,cancelButtonLabel:f,emailLabel:h,emailPlaceholder:m,isEmailRequired:_,isNameRequired:y,messageLabel:S,messagePlaceholder:I,nameLabel:b,namePlaceholder:T,submitButtonLabel:C,isRequiredLabel:E}=e,[L,N]=Pn(!1),[v,P]=Pn(null),[M,O]=Pn(!1),q=u?.input,[Q,J]=Pn(null),U=br(D=>{J(D),O(!1)},[]),x=br(D=>{const Z=rk(D,{emailLabel:h,isEmailRequired:_,isNameRequired:y,messageLabel:S,nameLabel:b});return Z.length>0?P(`Please enter in the following required fields: ${Z.join(", ")}`):P(null),Z.length===0},[h,_,y,S,b]),H=br(async D=>{N(!0);try{if(D.preventDefault(),!(D.target instanceof HTMLFormElement))return;const Z=new FormData(D.target),se=await(u&&M?u.value():void 0),ne={name:Fa(Z,"name"),email:Fa(Z,"email"),message:Fa(Z,"message"),attachments:se?[se]:void 0};if(!x(ne))return;try{const ie=await o({name:ne.name,email:ne.email,message:ne.message,source:kw,tags:d},{attachments:ne.attachments});s(ne,ie)}catch(ie){Ds&&g.error(ie);const Xe=ie instanceof Error?ie:new Error(String(ie));P(Xe.message),i(Xe)}}finally{N(!1)}},[u&&M,s,i]);return te("form",{class:"form",onSubmit:H},q&&M?te(q,{onError:U}):null,te("fieldset",{class:"form__right","data-sentry-feedback":!0,disabled:L},te("div",{class:"form__top"},v?te("div",{class:"form__error-container"},v):null,c?te("label",{for:"name",class:"form__label"},te($a,{label:b,isRequiredLabel:E,isRequired:y}),te("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:T,required:y,type:"text"})):te("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden"}),a?te("label",{for:"email",class:"form__label"},te($a,{label:h,isRequiredLabel:E,isRequired:_}),te("input",{class:"form__input",defaultValue:t,id:"email",name:"email",placeholder:m,required:_,type:"email"})):te("input",{"aria-hidden":!0,value:t,name:"email",type:"hidden"}),te("label",{for:"message",class:"form__label"},te($a,{label:S,isRequiredLabel:E,isRequired:!0}),te("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:I,required:!0,rows:5})),q?te("label",{for:"screenshot",class:"form__label"},te("button",{class:"btn btn--default",disabled:L,type:"button",onClick:()=>{J(null),O(D=>!D)}},M?p:l),Q?te("div",{class:"form__error-container"},Q.message):null):null),te("div",{class:"btn-group"},te("button",{class:"btn btn--primary",disabled:L,type:"submit"},C),te("button",{class:"btn btn--default",disabled:L,type:"button",onClick:r},f))))}function $a({label:e,isRequired:t,isRequiredLabel:n}){return te("span",{class:"form__label__text"},e,t&&te("span",{class:"form__label__text--required"},n))}const gs=16,af=17,sk="http://www.w3.org/2000/svg";function ik(){const e=c=>dt.document.createElementNS(sk,c),t=ze(e("svg"),{width:`${gs}`,height:`${af}`,viewBox:`0 0 ${gs} ${af}`,fill:"inherit"}),n=ze(e("g"),{clipPath:"url(#clip0_57_156)"}),r=ze(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),o=ze(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
10610.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});t.appendChild(n).append(o,r);const s=e("defs"),i=ze(e("clipPath"),{id:"clip0_57_156"}),a=ze(e("rect"),{width:`${gs}`,height:`${gs}`,fill:"white",transform:"translate(0 0.5)"});return i.appendChild(a),s.appendChild(i),t.appendChild(s).appendChild(i).appendChild(a),t}function ak({open:e,onFormSubmitted:t,...n}){const r=n.options,o=Go(()=>({__html:ik().outerHTML}),[]),[s,i]=Pn(null),a=br(()=>{s&&(clearTimeout(s),i(null)),t()},[s]),c=br((u,d)=>{n.onSubmitSuccess(u,d),i(setTimeout(()=>{t(),i(null)},Aw))},[t]);return te(qo,null,s?te("div",{class:"success__position",onClick:a},te("div",{class:"success__content"},r.successMessageText,te("span",{class:"success__icon",dangerouslySetInnerHTML:o}))):te("dialog",{class:"dialog",onClick:r.onFormClose,open:e},te("div",{class:"dialog__position"},te("div",{class:"dialog__content",onClick:u=>{u.stopPropagation()}},te(nk,{options:r}),te(ok,{...n,onSubmitSuccess:c})))))}const ck=` 107.dialog { 108 position: fixed; 109 z-index: var(--z-index); 110 margin: 0; 111 inset: 0; 112 113 display: flex; 114 align-items: center; 115 justify-content: center; 116 padding: 0; 117 height: 100vh; 118 width: 100vw; 119 120 color: var(--dialog-color, var(--foreground)); 121 fill: var(--dialog-color, var(--foreground)); 122 line-height: 1.75em; 123 124 background-color: rgba(0, 0, 0, 0.05); 125 border: none; 126 inset: 0; 127 opacity: 1; 128 transition: opacity 0.2s ease-in-out; 129} 130 131.dialog__position { 132 position: fixed; 133 z-index: var(--z-index); 134 inset: var(--dialog-inset); 135 padding: var(--page-margin); 136 display: flex; 137 max-height: calc(100vh - (2 * var(--page-margin))); 138} 139@media (max-width: 600px) { 140 .dialog__position { 141 inset: var(--page-margin); 142 padding: 0; 143 } 144} 145 146.dialog__position:has(.editor) { 147 inset: var(--page-margin); 148 padding: 0; 149} 150 151.dialog:not([open]) { 152 opacity: 0; 153 pointer-events: none; 154 visibility: hidden; 155} 156.dialog:not([open]) .dialog__content { 157 transform: translate(0, -16px) scale(0.98); 158} 159 160.dialog__content { 161 display: flex; 162 flex-direction: column; 163 gap: 16px; 164 padding: var(--dialog-padding, 24px); 165 max-width: 100%; 166 width: 100%; 167 max-height: 100%; 168 overflow: auto; 169 170 background: var(--dialog-background, var(--background)); 171 border-radius: var(--dialog-border-radius, 20px); 172 border: var(--dialog-border, var(--border));
173 box-shadow: var(--dialog-box-shadow, var(--box-shadow)); 174 transform: translate(0, 0) scale(1); 175 transition: transform 0.2s ease-in-out; 176} 177 178`,uk=` 179.dialog__header { 180 display: flex; 181 gap: 4px; 182 justify-content: space-between; 183 font-weight: var(--dialog-header-weight, 600); 184 margin: 0; 185} 186.dialog__title { 187 align-self: center; 188 width: var(--form-width, 272px); 189} 190 191@media (max-width: 600px) { 192 .dialog__title { 193 width: auto; 194 } 195} 196 197.dialog__position:has(.editor) .dialog__title { 198 width: auto; 199} 200 201 202.brand-link { 203 display: inline-flex; 204} 205.brand-link:focus-visible { 206 outline: var(--outline); 207} 208`,lk=` 209.form { 210 display: flex; 211 overflow: auto; 212 flex-direction: row; 213 gap: 16px; 214 flex: 1 0; 215} 216 217.form fieldset { 218 border: none; 219 margin: 0; 220 padding: 0; 221} 222 223.form__right { 224 flex: 0 0 auto; 225 display: flex; 226 overflow: auto; 227 flex-direction: column; 228 justify-content: space-between; 229 gap: 20px; 230 width: var(--form-width, 100%); 231} 232 233.dialog__position:has(.editor) .form__right { 234 width: var(--form-width, 272px); 235} 236 237.form__top { 238 display: flex; 239 flex-direction: column; 240 gap: 8px; 241} 242 243.form__error-container { 244 color: var(--error-color); 245 fill: var(--error-color); 246} 247 248.form__label { 249 display: flex; 250 flex-direction: column; 251 gap: 4px; 252 margin: 0px; 253} 254 255.form__label__text { 256 display: flex; 257 gap: 4px; 258 align-items: center; 259} 260 261.form__label__text--required { 262 font-size: 0.85em; 263} 264 265.form__input { 266 font-family: inherit; 267 line-height: inherit; 268 background: transparent; 269 box-sizing: border-box; 270 border: var(--input-border, var(--border)); 271 border-radius: var(--input-border-radius, 6px); 272 color: var(--input-color, inherit); 273 fill: var(--input-color, inherit); 274 font-size: var(--input-font-size, inherit); 275 font-weight: var(--input-font-weight, 500); 276 padding: 6px 12px; 277} 278 279.form__input::placeholder { 280 opacity: 0.65; 281 color: var(--input-placeholder-color, inherit); 282 filter: var(--interactive-filter); 283} 284 285.form__input:focus-visible { 286 outline: var(--input-focus-outline, var(--outline)); 287} 288 289.form__input--textarea { 290 font-family: inherit; 291 resize: vertical; 292} 293 294.error { 295 color: var(--error-color); 296 fill: var(--error-color); 297} 298`,dk=` 299.btn-group { 300 display: grid; 301 gap: 8px; 302} 303 304.btn { 305 line-height: inherit; 306 border: var(--button-border, var(--border)); 307 border-radius: var(--button-border-radius, 6px); 308 cursor: pointer; 309 font-family: inherit; 310 font-size: var(--button-font-size, inherit); 311 font-weight: var(--button-font-weight, 600); 312 padding: var(--button-padding, 6px 16px); 313} 314.btn[disabled] { 315 opacity: 0.6; 316 pointer-events: none; 317} 318 319.btn--primary { 320 color: var(--button-primary-color, var(--accent-foreground)); 321 fill: var(--button-primary-color, var(--accent-foreground)); 322 background: var(--button-primary-background, var(--accent-background)); 323 border: var(--button-primary-border, var(--border)); 324 border-radius: var(--button-primary-border-radius, 6px); 325 font-weight: var(--button-primary-font-weight, 500); 326} 327.btn--primary:hover { 328 color: var(--button-primary-hover-color, var(--accent-foreground)); 329 fill: var(--button-primary-hover-color, var(--accent-foreground)); 330 background: var(--button-primary-hover-background, var(--accent-background)); 331 filter: var(--interactive-filter); 332} 333.btn--primary:focus-visible { 334 background: var(--button-primary-hover-background, var(--accent-background)); 335 filter: var(--interactive-filter); 336 outline: var(--button-primary-focus-outline, var(--outline)); 337} 338 339.btn--default { 340 color: var(--button-color, var(--foreground)); 341 fill: var(--button-color, var(--foreground)); 342 background: var(--button-background, var(--background)); 343 border: var(--button-border, var(--border)); 344 border-radius: var(--button-border-radius, 6px); 345 font-weight: var(--button-font-weight, 500); 346} 347.btn--default:hover { 348 color: var(--button-color, var(--foreground)); 349 fill: var(--button-color, var(--foreground)); 350 background: var(--button-hover-background, var(--background)); 351 filter: var(--interactive-filter); 352} 353.btn--default:focus-visible { 354 background: var(--button-hover-background, var(--background)); 355 filter: var(--interactive-filter); 356 outline: var(--button-focus-outline, var(--outline)); 357} 358`,fk=` 359.success__position { 360 position: fixed; 361 inset: var(--dialog-inset); 362 padding: var(--page-margin); 363 z-index: var(--z-index); 364} 365.success__content { 366 background: var(--success-background, var(--background)); 367 border: var(--success-border, var(--border)); 368 border-radius: var(--success-border-radius, 1.7em/50%);
369 box-shadow: var(--success-box-shadow, var(--box-shadow)); 370 font-weight: var(--success-font-weight, 600); 371 color: var(--success-color); 372 fill: var(--success-color); 373 padding: 12px 24px; 374 line-height: 1.75em; 375 376 display: grid; 377 align-items: center; 378 grid-auto-flow: column; 379 gap: 6px; 380 cursor: default; 381} 382 383.success__icon { 384 display: flex; 385} 386`;function pk(e){const t=de.createElement("style");return t.textContent=` 387:host { 388 --dialog-inset: var(--inset); 389} 390 391${ck} 392${uk} 393${lk} 394${dk} 395${fk} 396`,e&&t.setAttribute("nonce",e),t}function hk(){const e=W().getUser(),t=Se().getUser(),n=gr().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}const mk=(()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{const o=r,s=e.useSentryUser,i=hk(),a=de.createElement("div"),c=pk(e.styleNonce);let u="";const d={get el(){return a},appendToDom(){!o.contains(c)&&!o.contains(a)&&(o.appendChild(c),o.appendChild(a))},removeFromDom(){a.remove(),c.remove(),de.body.style.overflow=u},open(){p(!0),e.onFormOpen?.(),R()?.emit("openFeedbackWidget"),u=de.body.style.overflow,de.body.style.overflow="hidden"},close(){p(!1),de.body.style.overflow=u}},l=t?.createInput({h:te,hooks:Zw,dialog:d,options:e}),p=f=>{jw(te(ak,{options:e,screenshotInput:l,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:String(s&&i?.[s.name]||""),defaultEmail:String(s&&i?.[s.email]||""),onFormClose:()=>{p(!1),e.onFormClose?.()},onSubmit:n,onSubmitSuccess:(h,m)=>{p(!1),e.onSubmitSuccess?.(h,m)},onSubmitError:h=>{e.onSubmitError?.(h)},onFormSubmitted:()=>{e.onFormSubmitted?.()},open:f}),a)};return d}}));function gk({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 _k(e){const t=de.createElement("style"),n="#1A141F",r="#302735";return t.textContent=` 397.editor { 398 display: flex; 399 flex-grow: 1; 400 flex-direction: column; 401} 402 403.editor__image-container { 404 justify-items: center; 405 padding: 15px; 406 position: relative; 407 height: 100%; 408 border-radius: var(--menu-border-radius, 6px); 409 410 background-color: ${n}; 411 background-image: repeating-linear-gradient( 412 -145deg, 413 transparent, 414 transparent 8px, 415 ${n} 8px, 416 ${n} 11px 417 ), 418 repeating-linear-gradient( 419 -45deg, 420 transparent, 421 transparent 15px, 422 ${r} 15px, 423 ${r} 16px 424 ); 425} 426 427.editor__canvas-container { 428 width: 100%; 429 height: 100%; 430 position: relative; 431 display: flex; 432 align-items: center; 433 justify-content: center; 434} 435 436.editor__canvas-container > * { 437 object-fit: contain; 438 position: absolute; 439} 440 441.editor__tool-container { 442 padding-top: 8px; 443 display: flex; 444 justify-content: center; 445} 446 447.editor__tool-bar { 448 display: flex; 449 gap: 8px; 450} 451 452.editor__tool { 453 display: flex; 454 padding: 8px 12px; 455 justify-content: center; 456 align-items: center; 457 border: var(--button-border, var(--border)); 458 border-radius: var(--button-border-radius, 6px); 459 background: var(--button-background, var(--background)); 460 color: var(--button-color, var(--foreground)); 461} 462 463.editor__tool--active { 464 background: var(--button-primary-background, var(--accent-background)); 465 color: var(--button-primary-color, var(--accent-foreground)); 466} 467 468.editor__rect { 469 position: absolute; 470 z-index: 2; 471} 472 473.editor__rect button { 474 opacity: 0; 475 position: absolute; 476 top: -12px; 477 right: -12px; 478 cursor: pointer; 479 padding: 0; 480 z-index: 3; 481 border: none; 482 background: none; 483} 484 485.editor__rect:hover button { 486 opacity: 1; 487} 488`,e&&t.setAttribute("nonce",e),t}function yk({h:e}){return function({action:n,setAction:r,options:o}){return e("div",{class:"editor__tool-container"},e("div",{class:"editor__tool-bar"},e("button",{type:"button",class:`editor__tool ${n==="highlight"?"editor__tool--active":""}`,onClick:()=>{r(n==="highlight"?"":"highlight")}},o.highlightToolText),e("button",{type:"button",class:`editor__tool ${n==="hide"?"editor__tool--active":""}`,onClick:()=>{r(n==="hide"?"":"hide")}},o.hideToolText)))}}function Sk({hooks:e}){function t(){const[n,r]=e.useState(dt.devicePixelRatio??1);return e.useEffect(()=>{const o=()=>{r(dt.devicePixelRatio)},s=matchMedia(`(resolution: ${dt.devicePixelRatio}dppx)`);return s.addEventListener("change",o),()=>{s.removeEventListener("change",o)}},[]),n}return function({onBeforeScreenshot:r,onScreenshot:o,onAfterScreenshot:s,onError:i}
488){const a=t();e.useEffect(()=>{(async()=>{r();const u=await ao.mediaDevices.getDisplayMedia({video:{width:dt.innerWidth*a,height:dt.innerHeight*a},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),d=de.createElement("video");await new Promise((l,p)=>{d.srcObject=u,d.onloadedmetadata=()=>{o(d,a),u.getTracks().forEach(f=>f.stop()),l()},d.play().catch(p)}),s()})().catch(i)},[])}}function bk(e,t,n){switch(e.type){case"highlight":{t.save(),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),t.restore();break}case"hide":t.fillStyle="rgb(0, 0, 0)",t.fillRect(e.x,e.y,e.w,e.h);break}}function Yt(e,t,n){if(!e)return;const r=e.getContext("2d",t);r&&n(e,r)}function Ba(e,t){Yt(e,{alpha:!0},(n,r)=>{r.drawImage(t,0,0,t.width,t.height,0,0,n.width,n.height)})}function Ua(e,t,n){Yt(e,{alpha:!0},(r,o)=>{n.length&&(o.fillStyle="rgba(0, 0, 0, 0.25)",o.fillRect(0,0,r.width,r.height)),n.forEach(s=>{bk(s,o,t)})})}function vk({h:e,hooks:t,outputBuffer:n,dialog:r,options:o}){const s=Sk({hooks:t}),i=yk({h:e}),a=gk({h:e}),c={__html:_k(o.styleNonce).innerText},u=r.el.style,d=({screenshot:l})=>{const[p,f]=t.useState("highlight"),[h,m]=t.useState([]),_=t.useRef(null),y=t.useRef(null),S=t.useRef(null),I=t.useRef(null),[b,T]=t.useState(1),C=t.useMemo(()=>{const M=de.getElementById(o.id);if(!M)return"white";const O=getComputedStyle(M);return O.getPropertyValue("--button-primary-background")||O.getPropertyValue("--accent-background")},[o.id]);t.useLayoutEffect(()=>{const M=()=>{const O=_.current;O&&(Yt(l.canvas,{alpha:!1},q=>{const Q=Math.min(O.clientWidth/q.width,O.clientHeight/q.height);T(Q)}),(O.clientHeight===0||O.clientWidth===0)&&setTimeout(M,0))};return M(),dt.addEventListener("resize",M),()=>{dt.removeEventListener("resize",M)}},[l]);const E=t.useCallback((M,O)=>{Yt(M,{alpha:!0},(q,Q)=>{Q.scale(O,O),q.width=l.canvas.width,q.height=l.canvas.height})},[l]);t.useEffect(()=>{E(y.current,l.dpi),Ba(y.current,l.canvas)},[l]),t.useEffect(()=>{E(S.current,l.dpi),Yt(S.current,{alpha:!0},(M,O)=>{O.clearRect(0,0,M.width,M.height)}),Ua(S.current,C,h)},[h,C]),t.useEffect(()=>{E(n,l.dpi),Ba(n,l.canvas),Yt(de.createElement("canvas"),{alpha:!0},(M,O)=>{O.scale(l.dpi,l.dpi),M.width=l.canvas.width,M.height=l.canvas.height,Ua(M,C,h),Ba(n,M)})},[h,l,C]);const L=M=>{if(!p||!I.current)return;const O=I.current.getBoundingClientRect(),q={type:p,x:(M.clientX-O.x)/b,y:(M.clientY-O.y)/b},Q=(x,H)=>{const D=(H.clientX-O.x)/b,Z=(H.clientY-O.y)/b;return{type:x.type,x:Math.min(x.x,D),y:Math.min(x.y,Z),w:Math.abs(D-x.x),h:Math.abs(Z-x.y)}},J=x=>{Yt(S.current,{alpha:!0},(H,D)=>{D.clearRect(0,0,H.width,H.height)}),Ua(S.current,C,[...h,Q(q,x)])},U=x=>{const H=Q(q,x);H.w*b>=1&&H.h*b>=1&&m(D=>[...D,H]),de.removeEventListener("mousemove",J),de.removeEventListener("mouseup",U)};de.addEventListener("mousemove",J),de.addEventListener("mouseup",U)},N=t.useCallback(M=>O=>{O.preventDefault(),O.stopPropagation(),m(q=>{const Q=[...q];return Q.splice(M,1),Q})},[]),v={width:`${l.canvas.width*b}px`,height:`${l.canvas.height*b}px`},P=M=>{M.stopPropagation()};return e("div",{class:"editor"},e("style",{nonce:o.styleNonce,dangerouslySetInnerHTML:c}),e("div",{class:"editor__image-container"},e("div",{class:"editor__canvas-container",ref:_},e("canvas",{ref:y,id:"background",style:v}),e("canvas",{ref:S,id:"foreground",style:v}),e("div",{ref:I,onMouseDown:L,style:v},h.map((M,O)=>e("div",{key:O,class:"editor__rect",style:{top:`${M.y*b}px`,left:`${M.x*b}px`,width:`${M.w*b}px`,height:`${M.h*b}px`}},e("button",{"aria-label":o.removeHighlightText,onClick:N(O),onMouseDown:P,onMouseUp:P,type:"button"},e(a,null))))))),e(i,{options:o,action:p,setAction:f}))};return function({onError:p}){const[f,h]=t.useState();return s({onBeforeScreenshot:t.useCallback(()=>{u.display="none"},[]),onScreenshot:t.useCallback((m,_)=>{Yt(de.createElement("canvas"),{alpha:!1},(y,S)=>{S.scale(_,_),y.width=m.videoWidth,y.height=m.videoHeight,S.drawImage(m,0,0,y.width,y.height),h({canvas:y,dpi:_})}),n.width=m.videoWidth,n.height=m.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{u.display="block"},[]),onError:t.useCallback(m=>{u.display="block",p(m)},[])}),f?e(d,{screenshot:f}):e("div",null)}}const Ek=(()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{const o=de.createElement("canvas");return{input:vk({h:e,hooks:t,outputBuffer:o,dialog:n,options:r}),value:async()=>{const s=await new Promise(i=>{o.toBlob(i,"image/png")});if(s)return{data:new Uint8Array(await s.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}})),A=B;let Mc=0;function pg(){return Mc>0}function Tk(){Mc++,setTimeout(()=>{Mc--})}function Lr(e,t={}){function n(o){return typeof o=="function"}if(!n(e))return e;try{if(Object.prototype.hasOwnProperty.call(e,"__sentry_wrapped__")){const s=e.__sentry_wrapped__;return typeof s=="function"?s:e}if(tu(e))return e}catch{return e}const r=function(...o){B._sentryWrappedDepth=(B._sentryWrappedDepth||0)+1;try{const s=o.map(i=>Lr(i,t));return e.apply(this,s)}catch(s){throw Tk(),Ke(i=>{i.addEventProcessor(a=>(t.mechanism&&(uc(a,void 0),bt(a,t.mechanism)),a.extra={...a.extra,arguments:o},a)),mt(s)}),s}finally{B._sentryWrappedDepth=(B._sentryWrappedDepth||0)-1}};try{for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}catch{}Op(r,e),ye(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function li(){const e=fn(),{referrer:t}=A.document||{},{userAgent:n}=A.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}const Ik=["replayIntegration","replayCanvasIntegration","feedbackIntegration","feedbackModalIntegration","feedbackScreenshotIntegration","captureConsoleIntegration","contextLinesIntegration","linkedErrorsIntegration","dedupeIntegration","extraErrorDataIntegration","graphqlClientIntegration","httpClientIntegration","reportingObserverIntegration","rewriteFramesIntegration","browserProfilingIntegration","moduleMetadataIntegration","instrumentAnthropicAiClient","
488instrumentOpenAiClient","instrumentGoogleGenAIClient","instrumentStateGraph","instrumentLangGraph","createLangChainCallbackHandler","instrumentLangChainEmbeddings"],wk={replayCanvasIntegration:"replay-canvas",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot"};function kk(e){return wk[e]||e.replace("Integration","").toLowerCase()}const cf=A;async function Rk(e,t){const n=Ik.includes(e)?kk(e):void 0,r=cf.Sentry=cf.Sentry||{};if(!n)throw new Error(`Cannot lazy load integration: ${e}`);const o=r[e];if(typeof o=="function"&&!("_isShim"in o))return o;const s=Ak(n),i=A.document.createElement("script");i.src=s,i.crossOrigin="anonymous",i.referrerPolicy="strict-origin",t&&i.setAttribute("nonce",t);const a=new Promise((l,p)=>{i.addEventListener("load",()=>l()),i.addEventListener("error",p)}),c=A.document.currentScript,u=A.document.body||A.document.head||c?.parentElement;if(u)u.appendChild(i);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}`)}const d=r[e];if(typeof d!="function")throw new Error(`Could not load integration: ${e}`);return d}function Ak(e){const n=R()?.getOptions()?.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${tn}/${e}.min.js`,n).toString()}const KL=ng({lazyLoadIntegration:Rk}),XL=ng({getModalIntegration:()=>mk,getScreenshotIntegration:()=>Ek});function Du(e,t){const n=Zi(e,t),r={type:Ok(t),value:Pk(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Ck(e,t,n,r){const s=R()?.getOptions().normalizeDepth,i=Bk(t),a={__serialized__:$p(t,s)};if(i)return{exception:{values:[Du(e,i)]},extra:a};const c={exception:{values:[{type:Ni(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Fk(t,{isUnhandledRejection:r})}]},extra:a};if(n){const u=Zi(e,n);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function Ha(e,t){return{exception:{values:[Du(e,t)]}}}function Zi(e,t){const n=t.stacktrace||t.stack||"",r=Mk(t),o=xk(t);try{return e(n,r,o)}catch{}return[]}const Nk=/Minified React error #\d+;/i;function Mk(e){return e&&Nk.test(e.message)?1:0}function xk(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function hg(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function Ok(e){const t=e?.name;return!t&&hg(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function Pk(e){const t=e?.message;return hg(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?_d(t.error):_d(e):"No error message"}function Lk(e,t,n,r){const o=n?.syntheticException||void 0,s=ea(e,t,o,r);return bt(s),s.level="error",n?.event_id&&(s.event_id=n.event_id),Bo(s)}function Dk(e,t,n="info",r,o){const s=r?.syntheticException||void 0,i=xc(e,t,s,o);return i.level=n,r?.event_id&&(i.event_id=r.event_id),Bo(i)}function ea(e,t,n,r,o){let s;if(xp(t)&&t.error)return Ha(e,t.error);if(wl(t)||Py(t)){const i=t;if("stack"in t){s=Ha(e,t);const a=s.exception?.values?.[0];if(r&&n&&a&&!a.stacktrace){const c=Zi(e,n);c.length&&(a.stacktrace={frames:c},bt(s,{synthetic:!0}))}}else{const a=i.name||(wl(i)?"DOMError":"DOMException"),c=i.message?`${a}: ${i.message}`:a;s=xc(e,c,n,r),uc(s,c)}return"code"in i&&(s.tags={...s.tags,"DOMException.code":`${i.code}`}),s}return $e(t)?Ha(e,t):De(t)||Ni(t)?(s=Ck(e,t,n,o),bt(s,{synthetic:!0}),s):(s=xc(e,t,n,r),uc(s,`${t}`),bt(s,{synthetic:!0}),s)}function xc(e,t,n,r){const o={};if(r&&n){const s=Zi(e,n);s.length&&(o.exception={values:[{value:t,stacktrace:{frames:s}}]}),bt(o,{synthetic:!0})}if(Ci(t)){const{__sentry_template_string__:s,__sentry_template_values__:i}=t;return o.logentry={message:s,params:i},o}return o.message=t,o}function Fk(e,{isUnhandledRejection:t}){const n=Dy(e),r=t?"promise rejection":"exception";return xp(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Ni(e)?`Event \`${$k(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function $k(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Bk(e){return Object.values(e).find($e)}class Uk extends Jv{constructor(t){const n=Hk(t),r=A.SENTRY_SDK_SOURCE||Sv();um(n,"browser",["browser"],r),super(n);const{userInfo:o}=this.getDataCollectionOptions();n._metadata?.sdk&&(n._metadata.sdk.settings={infer_ip:o?"auto":"never",...n._metadata.sdk.settings});const{sendClientReports:s}=this._options;A.document&&A.document.addEventListener("visibilitychange",()=>{A.document.visibilityState==="hidden"&&(s&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}),o&&this.on("beforeSendSession",mE)}eventFromException(t,n){return Lk(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return Dk(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,o){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,o)}}function Hk(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:A.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const ot=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,G=B,Wk=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",Vo=(e,t,n,r)=>{let o,s;return i=>{t.value>=0&&(i||r)&&(s=t.value-(o??0),(s||o===void 0)&&(o=t.value,t.delta=s,t.rating=Wk(t.value,n),e(t)))}},Yo=(e=!0)=>{const t=G.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Xr=()=>Yo()?.activationStart??0;function rn(e,t,n){G.document&&G.addEventListener(e,t,n)}function di(e,t,n){G.document&&G.removeEventListener(e,t,n)}let vr=-1;const mg=new Set,jk=()=>G.document?.visibilityState==="hidden"&&!G.document?.prerendering?0:1/0,Hs=e=>{if(zk(e)&&vr>-1){if(e.type==="visibilitychange"||e.type==="pagehide")for(const t of mg)t();isFinite(vr)||(vr=e.type==="visibilitychange"?e.timeStamp:0,di("prerenderingchange",Hs,!0))}},Jo=()=>
488{if(G.document&&vr<0){const e=Xr();vr=(G.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(n=>n.name==="hidden"&&n.startTime>e)[0]?.startTime)??jk(),rn("visibilitychange",Hs,!0),rn("pagehide",Hs,!0),rn("prerenderingchange",Hs,!0)}return{get firstHiddenTime(){return vr},onHidden(e){mg.add(e)}}};function zk(e){return e.type==="pagehide"||G.document?.visibilityState==="hidden"}const qk=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,Ko=(e,t=-1)=>{const n=Yo();let r="navigate";return n&&(G.document?.prerendering||Xr()>0?r="prerender":G.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:qk(),navigationType:r}},Wa=new WeakMap;function Fu(e,t){try{return Wa.get(e)||Wa.set(e,new t),Wa.get(e)}catch{return new t}}class Gk{constructor(){this._sessionValue=0,this._sessionEntries=[]}_processEntry(t){if(t.hadRecentInput)return;const 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)}}const Qr=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(o=>{Promise.resolve().then(()=>{t(o.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},$u=e=>{let t=!1;return()=>{t||(e(),t=!0)}},ta=e=>{G.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},Vk=[1800,3e3],Yk=(e,t={})=>{ta(()=>{const n=Jo(),r=Ko("FCP");let o;const i=Qr("paint",a=>{for(const c of a)c.name==="first-contentful-paint"&&(i.disconnect(),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-Xr(),0),r.entries.push(c),o(!0)))});i&&(o=Vo(e,r,Vk,t.reportAllChanges))})},Jk=[.1,.25],Kk=(e,t={})=>{Yk($u(()=>{const n=Ko("CLS",0);let r;const o=Jo(),s=Fu(t,Gk),i=c=>{for(const u of c)s._processEntry(u);s._sessionValue>n.value&&(n.value=s._sessionValue,n.entries=s._sessionEntries,r())},a=Qr("layout-shift",i);a&&(r=Vo(e,n,Jk,t.reportAllChanges),o.onHidden(()=>{i(a.takeRecords()),r(!0)}),G?.setTimeout?.(r))}))};let gg=0,ja=1/0,_s=0;const Xk=e=>{e.forEach(t=>{t.interactionId&&(ja=Math.min(ja,t.interactionId),_s=Math.max(_s,t.interactionId),gg=_s?(_s-ja)/7+1:0)})};let Oc;const _g=()=>Oc?gg:performance.interactionCount||0,Qk=()=>{"interactionCount"in performance||Oc||(Oc=Qr("event",Xk,{type:"event",buffered:!0,durationThreshold:0}))},za=10;let yg=0;const Zk=()=>_g()-yg;class eR{constructor(){this._longestInteractionList=[],this._longestInteractionMap=new Map}_resetInteractions(){yg=_g(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor(Zk()/50));return this._longestInteractionList[t]}_processEntry(t){if(this._onBeforeProcessingEntry?.(t),!(t.interactionId||t.entryType==="first-input"))return;const n=this._longestInteractionList.at(-1);let r=this._longestInteractionMap.get(t.interactionId);if(r||this._longestInteractionList.length<za||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.interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(r.id,r),this._longestInteractionList.push(r)),this._longestInteractionList.sort((o,s)=>s._latency-o._latency),this._longestInteractionList.length>za){const o=this._longestInteractionList.splice(za);for(const s of o)this._longestInteractionMap.delete(s.id)}this._onAfterProcessingINPCandidate?.(r)}}}const Bu=e=>{const t=G.requestIdleCallback||G.setTimeout;G.document?.visibilityState==="hidden"?e():(e=$u(e),rn("visibilitychange",e,{once:!0,capture:!0}),rn("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),di("visibilitychange",e,{capture:!0}),di("pagehide",e,{capture:!0})}))},tR=[200,500],nR=40,rR=(e,t={})=>
488{if(!(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return;const n=Jo();ta(()=>{Qk();const r=Ko("INP");let o;const s=Fu(t,eR),i=c=>{Bu(()=>{for(const d of c)s._processEntry(d);const u=s._estimateP98LongestInteraction();u&&u._latency!==r.value&&(r.value=u._latency,r.entries=u.entries,o())})},a=Qr("event",i,{durationThreshold:t.durationThreshold??nR});o=Vo(e,r,tR,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{i(a.takeRecords()),o(!0)}))})};class oR{_processEntry(t){this._onBeforeProcessingEntry?.(t)}}const sR=[2500,4e3],iR=(e,t={})=>{ta(()=>{const n=Jo(),r=Ko("LCP");let o;const s=Fu(t,oR),i=c=>{t.reportAllChanges||(c=c.slice(-1));for(const u of c)u&&(s._processEntry(u),u.startTime<n.firstHiddenTime&&(r.value=Math.max(u.startTime-Xr(),0),r.entries=[u],o()))},a=Qr("largest-contentful-paint",i);if(a){o=Vo(e,r,sR,t.reportAllChanges);const c=$u(()=>{i(a.takeRecords()),a.disconnect(),o(!0)}),u=d=>{d.isTrusted&&(Bu(c),di(d.type,u,{capture:!0}))};for(const d of["keydown","click","visibilitychange"])rn(d,u,{capture:!0})}})},aR=[800,1800],Pc=e=>{G.document?.prerendering?ta(()=>Pc(e)):G.document?.readyState!=="complete"?addEventListener("load",()=>Pc(e),!0):setTimeout(e)},cR=(e,t={})=>{const n=Ko("TTFB"),r=Vo(e,n,aR,t.reportAllChanges);Pc(()=>{const o=Yo();o&&(n.value=Math.max(o.responseStart-Xr(),0),n.entries=[o],r(!0))})},lo={},fi={};let Sg,bg,vg,Eg;function na(e,t=!1){return oa("cls",e,lR,Sg,t)}function ra(e,t=!1){return oa("lcp",e,dR,bg,t)}function uR(e){return oa("ttfb",e,fR,vg)}function Uu(e){return oa("inp",e,pR,Eg)}function pn(e,t){return Tg(e,t),fi[e]||(hR(e),fi[e]=!0),Ig(e,t)}function Xo(e,t){const n=lo[e];if(n?.length)for(const r of n)try{r(t)}catch(o){ot&&g.error(`Error while triggering instrumentation handler. 489Type: ${e} 490Name: ${Ut(r)} 491Error:`,o)}}function lR(){return Kk(e=>{Xo("cls",{metric:e}),Sg=e},{reportAllChanges:!0})}function dR(){return iR(e=>{Xo("lcp",{metric:e}),bg=e},{reportAllChanges:!0})}function fR(){return cR(e=>{Xo("ttfb",{metric:e}),vg=e})}function pR(){return rR(e=>{Xo("inp",{metric:e}),Eg=e})}function oa(e,t,n,r,o=!1){Tg(e,t);let s;return fi[e]||(s=n(),fi[e]=!0),r&&t({metric:r}),Ig(e,t,o?s:void 0)}function hR(e){const t={};e==="event"&&(t.durationThreshold=0),Qr(e,n=>{Xo(e,{entries:n})},t)}function Tg(e,t){lo[e]=lo[e]||[],lo[e].push(t)}function Ig(e,t,n){return()=>{n&&n();const r=lo[e];if(!r)return;const o=r.indexOf(t);o!==-1&&r.splice(o,1)}}function mR(e){return"duration"in e}const gR=80,Nn={};try{typeof Node<"u"&&(Nn.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode").get),typeof Element<"u"&&(Nn.tagName=Object.getOwnPropertyDescriptor(Element.prototype,"tagName").get,Nn.id=Object.getOwnPropertyDescriptor(Element.prototype,"id").get,Nn.className=Object.getOwnPropertyDescriptor(Element.prototype,"className").get,Nn.getAttribute=Element.prototype.getAttribute),typeof HTMLElement<"u"&&(Nn.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"dataset").get)}catch{}function Vt(e,t,n){const r=Nn[t];if(r)try{return r.call(e,n)}catch{}const o=e[t];return typeof o=="function"?o.call(e,n):o}function Me(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,o=[];let s=0,i=0;const a=" > ",c=a.length;let u;const d=Array.isArray(t)?t:t.keyAttrs,l=!Array.isArray(t)&&t.maxStringLength||gR;for(;n&&s++<r&&(u=_R(n,d),!(u==="html"||s>1&&i+o.length*c+u.length>=l));)o.push(u),i+=u.length,n=Vt(n,"parentNode");return o.reverse().join(a)}catch{return"<unknown>"}}function _R(e,t){const n=[],r=Vt(e,"tagName");if(!r)return"";if(typeof HTMLElement<"u"&&e instanceof HTMLElement){const s=Vt(e,"dataset");if(s){if(s.sentryComponent)return s.sentryComponent;if(s.sentryElement)return s.sentryElement}}n.push(r.toLowerCase());const o=t?.length?t.filter(s=>Vt(e,"getAttribute",s)).map(s=>[s,Vt(e,"getAttribute",s)]):null;if(o?.length)o.forEach(s=>{n.push(`[${s[0]}="${s[1]}"]`)});else{const s=Vt(e,"id");s&&n.push(`#${s}`);const i=Vt(e,"className");if(i&&ft(i)){const a=i.split(/\s+/);for(const c of a)n.push(`.${c}`)}}for(const s of["aria-label","type","name","title","alt"]){const i=Vt(e,"getAttribute",s);i&&n.push(`[${s}="${i}"]`)}return n.join("")}const yR=e=>{const t=n=>{(n.type==="pagehide"||G.document?.visibilityState==="hidden")&&e(n)};rn("visibilitychange",t,{capture:!0,once:!0}
491),rn("pagehide",t,{capture:!0,once:!0})};function qa(e){return typeof e=="number"&&isFinite(e)}function hn(e,t,n,{...r}){const o=$(e).start_timestamp;return o&&o>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),Cr(e,()=>{const s=Ge({startTime:t,...r});return s&&s.end(n),s})}function Hu(e){const t=R();if(!t)return;const{name:n,transaction:r,attributes:o,startTime:s}=e,{release:i,environment:a}=t.getOptions(),{userInfo:c}=t.getDataCollectionOptions(),d=t.getIntegrationByName("Replay")?.getReplayId(),l=W(),p=l.getUser(),f=p!==void 0?p.email||p.id||p.ip_address:void 0;let h;try{h=l.getScopeData().contexts.profile.profile_id}catch{}const m={release:i,environment:a,user:f||void 0,profile_id:h||void 0,replay_id:d||void 0,transaction:r,"user_agent.original":G.navigator?.userAgent,"client.address":c?"{{auto}}":void 0,...o};return Ge({name:n,attributes:m,startTime:s,experimental:{standalone:!0}})}function er(){return G.addEventListener&&G.performance}function _e(e){return e/1e3}function SR(e){let t="unknown",n="unknown",r="";for(const o of e){if(o==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(o))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=o}return r===e&&(t=r),{name:t,version:n}}function sa(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function ia(e,t){let n,r=!1;function o(a){!r&&n&&t(a,n.spanContext().spanId,n),r=!0}yR(()=>{o("pagehide")});const s=e.on("beforeStartNavigationSpan",(a,c)=>{c?.isRedirect||(o("navigation"),s(),i())}),i=e.on("afterStartPageLoadSpan",a=>{n=a,i()})}function bR(e){let t=0,n;if(!sa("layout-shift"))return;const r=na(({metric:o})=>{const s=o.entries[o.entries.length-1];s&&(t=o.value,n=s)},!0);ia(e,(o,s)=>{vR(t,n,s,o),r()})}function vR(e,t,n,r){ot&&g.log(`Sending CLS span (${e})`);const o=t?_e((Ie()||0)+t.startTime):he(),s=W().getScopeData().transactionName,i=t?Me(t.sources[0]?.node):"Layout shift",a={[Y]:"auto.http.browser.cls",[ue]:"ui.webvital.cls",[bn]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((u,d)=>{a[`cls.source.${d+1}`]=Me(u.node)});const c=Hu({name:i,transaction:s,attributes:a,startTime:o});c&&(c.addEvent("cls",{[Oo]:"",[Po]:e}),c.end(o))}const ER=6e4;function Qo(e){return e!=null&&e>0&&e<=ER}function TR(e){let t=0,n;if(!sa("largest-contentful-paint"))return;const r=ra(({metric:o})=>{const s=o.entries[o.entries.length-1];!s||!Qo(o.value)||(t=o.value,n=s)},!0);ia(e,(o,s)=>{IR(t,n,s,o),r()})}function IR(e,t,n,r){if(!Qo(e))return;ot&&g.log(`Sending LCP span (${e})`);const o=_e((Ie()||0)+(t?.startTime||0)),s=W().getScopeData().transactionName,i=t?Me(t.element):"Largest contentful paint",a={[Y]:"auto.http.browser.lcp",[ue]:"ui.webvital.lcp",[bn]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(a["lcp.element"]=Me(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));const c=Hu({name:i,transaction:s,attributes:a,startTime:o});c&&(c.addEvent("lcp",{[Oo]:"millisecond",[Po]:e}),c.end(o))}function Ze(e){return e&&((Ie()||performance.timeOrigin)+e)/1e3}function wg(e){const t={};if(e.nextHopProtocol!=null){const{name:n,version:r}=SR(e.nextHopProtocol);t["network.protocol.version"]=r,t["network.protocol.name"]=n}return Ie()||er()?.timeOrigin?wR({...t,"http.request.redirect_start":Ze(e.redirectStart),"http.request.redirect_end":Ze(e.redirectEnd),"http.request.worker_start":Ze(e.workerStart),"http.request.fetch_start":Ze(e.fetchStart),"http.request.domain_lookup_start":Ze(e.domainLookupStart),"http.request.domain_lookup_end":Ze(e.domainLookupEnd),"http.request.connect_start":Ze(e.connectStart),"http.request.secure_connection_start":Ze(e.secureConnectionStart),"http.request.connection_end":Ze(e.connectEnd),"http.request.request_start":Ze(e.requestStart),"http.request.response_start":Ze(e.responseStart),"http.request.response_end":Ze(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?e.responseStart/1e3:void 0}):t}function wR(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}const kR=2147483647;let uf=0,He={},Ue,pi;function RR({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=er();if(r&&Ie()){r.mark&&G.performance.mark("sentry-tracing-init");const o=t?TR(n):t===!1?xR():void 0,s=e?bR(n):e===!1?MR():void 0,i=OR(),a=PR();return()=>{i(),a(),o?.(),s?.()}}return()=>{}}function AR(){pn("longtask",({entries:e})=>{const t=Ee();if(!t)return;const{op:n,start_timestamp:r}=$(t);for(const o of e){const s=_e(Ie()+o.startTime),i=_e(o.duration);n==="navigation"&&r&&s<r||hn(t,s,s+i,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[Y]:"auto.ui.browser.metrics"}})}})}function CR(){new PerformanceObserver(t=>{const n=Ee();if(n)for(const r of t.getEntries()){if(!r.scripts[0])continue;const o=_e(Ie()+r.startTime),{start_timestamp:s,op:i}=$(n);if(i==="navigation"&&s&&o<s)continue;const a=_e(r.duration),c={[Y]:"auto.ui.browser.metrics"}
491,u=r.scripts[0],{invoker:d,invokerType:l,sourceURL:p,sourceFunctionName:f,sourceCharPosition:h}=u;c["browser.script.invoker"]=d,c["browser.script.invoker_type"]=l,p&&(c["code.filepath"]=p),f&&(c["code.function"]=f),h!==-1&&(c["browser.script.source_char_position"]=h),hn(n,o,o+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:c})}}).observe({type:"long-animation-frame",buffered:!0})}function NR(){pn("event",({entries:e})=>{const t=Ee();if(t){for(const n of e)if(n.name==="click"){const r=_e(Ie()+n.startTime),o=_e(n.duration),s={name:Me(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[Y]:"auto.ui.browser.metrics"}},i=Nu(n.target);i&&(s.attributes["ui.component_name"]=i),hn(t,r,r+o,s)}}})}function MR(){return na(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(He.cls={value:e.value,unit:""},pi=t)},!0)}function xR(){return ra(({metric:e})=>{const t=e.entries[e.entries.length-1];!t||!Qo(e.value)||(He.lcp={value:e.value,unit:"millisecond"},Ue=t)},!0)}function OR(){return uR(({metric:e})=>{e.entries[e.entries.length-1]&&(He.ttfb={value:e.value,unit:"millisecond"})})}function PR(){return pn("paint",({entries:e})=>{const t=Jo();for(const n of e){const r=n.startTime<t.firstHiddenTime;n.name==="first-paint"&&r&&(He.fp={value:n.startTime,unit:"millisecond"}),n.name==="first-contentful-paint"&&r&&(He.fcp={value:n.startTime,unit:"millisecond"})}})}function LR(e,t){const n=er(),r=Ie();if(!n?.getEntries||!r)return;const{spanStreamingEnabled:o,ignorePerformanceApiSpans:s,ignoreResourceSpans:i}=t,a=_e(r),c=n.getEntries(),{op:u,start_timestamp:d}=$(e);c.slice(uf).forEach(l=>{const p=_e(l.startTime),f=_e(Math.max(0,l.duration));if(!(u==="navigation"&&d&&a+p<d))switch(l.entryType){case"navigation":{UR(e,l,a);break}case"mark":case"paint":case"measure":{$R(e,l,p,f,a,s);break}case"resource":{jR(e,l,l.name,p,f,a,i);break}}}),uf=Math.max(c.length-1,0),zR(e,o)}function DR(e,t){const n=Ie();if(!er()?.getEntries||!n){lf();return}const{spanStreamingEnabled:r,recordClsOnPageloadSpan:o,recordLcpOnPageloadSpan:s}=t,i=_e(n);if($(e).op==="pageload"){if(VR(He),r){const a=(c,u,d)=>{const l=d??`browser.web_vital.${c}.value`;e.setAttribute(l,u),ot&&g.log("Setting web vital attribute",{[l]:u},"on pageload span")};["ttfb","fp","fcp"].forEach(c=>{He[c]&&a(c,He[c].value)}),He["ttfb.requestTime"]&&a("ttfb.requestTime",He["ttfb.requestTime"].value,"browser.web_vital.ttfb.request_time")}else o||delete He.cls,s||delete He.lcp,Object.entries(He).forEach(([a,c])=>{vh(a,c.value,c.unit,e)}),qR(e,t);e.setAttribute(r?"browser.performance.time_origin":"performance.timeOrigin",i),e.setAttribute(r?"browser.performance.navigation.activation_start":"performance.activationStart",Xr())}lf()}function lf(){Ue=void 0,pi=void 0,He={}}function FR(e){if(e?.entryType==="measure")try{return e.detail.devtools.track==="Components ⚛"}catch{return}}function $R(e,t,n,r,o,s){if(FR(t)||["mark","measure"].includes(t.entryType)&&nt(t.name,s))return;const i=Yo(!1),a=_e(i?i.requestStart:0),c=o+Math.max(n,a),u=o+n,d=u+r,l={[Y]:"auto.resource.browser.metrics"};c!==u&&(l["sentry.browser.measure_happened_before_request"]=!0,l["sentry.browser.measure_start_time"]=c),BR(l,t),c<=d&&hn(e,c,d,{name:t.name,op:t.entryType,attributes:l})}function BR(e,t){try{const n=t.detail;if(!n)return;if(typeof n=="object"){for(const[r,o]of Object.entries(n))if(o&&Tt(o))e[`sentry.browser.measure.detail.${r}`]=o;else if(o!==void 0)try{e[`sentry.browser.measure.detail.${r}`]=JSON.stringify(o)}catch{}return}if(Tt(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function UR(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{ys(e,t,r,n)}),ys(e,t,"secureConnection",n,"TLS/SSL"),ys(e,t,"fetch",n,"cache"),ys(e,t,"domainLookup",n,"DNS"),WR(e,t,n)}function ys(e,t,n,r,o=n){const s=HR(n),i=t[s],a=t[`${n}Start`];!a||!i||hn(e,r+_e(a),r+_e(i),{op:`browser.${o}`,name:t.name,attributes:{[Y]:"auto.ui.browser.metrics",...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function HR(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function WR(e,t,n){const r=n+_e(t.requestStart),o=n+_e(t.responseEnd),s=n+_e(t.responseStart);t.responseEnd&&(hn(e,r,o,{op:"browser.request",name:t.name,attributes:{[Y]:"auto.ui.browser.metrics"}}),hn(e,s,o,{op:"browser.response",name:t.name,attributes:{[Y]:"auto.ui.browser.metrics"}}))}function jR(e,t,n,r,o,s,i){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const a=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(i?.includes(a))return;const c={[Y]:"auto.resource.browser.metrics"},u=Bn(n);u.protocol&&(c["url.scheme"]=u.protocol.split(":").pop()),u.host&&(c["server.address"]=u.host),c["url.same_origin"]=n.includes(G.location.origin),c[vn]=Ye(n),GR(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"]]);const d={...c,...wg(t)},l=s+r,p=l+o;hn(e,l,p,{name:n.replace(G.location.origin,""),op:a,attributes:d})}function zR(e,t){const n=G.navigator;if(!n)return;const 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),qa(r.rtt)&&(t?e.setAttribute("network.connection.rtt",r.rtt):$(e).op==="pageload"&&vh("connection.rtt",r.rtt,"millisecond"))),qa(n.deviceMemory)&&(t?e.setAttribute("device.memory.estimated_capacity",n.deviceMemory):e.setAttribute("deviceMemory",`${n.deviceMemory} GB`)),qa(n.hardwareConcurrency)&&(t?e.setAttribute("device.processor_count",n.hardwareConcurrency):e.setAttribute("hardwareConcurrency",String(n.hardwareConcurrency)))}function qR(e,t){Ue&&t.recordLcpOnPageloadSpan&&(Ue.element&&e.setAttribute("lcp.element",Me(Ue.element)),Ue.id&&e.setAttribute("lcp.id",Ue.id),Ue.url&&e.setAttribute("lcp.url",Ue.url.trim().slice(0,200)),Ue.loadTime!=null&&e.setAttribute("lcp.loadTime",Ue.loadTime),Ue.renderTime!=null&&e.setAttribute("lcp.renderTime",Ue.renderTime),e.setAttribute("lcp.size",Ue.size)),pi?.sources&&t.recordClsOnPageloadSpan&&pi.sources.forEac
491h((n,r)=>e.setAttribute(`cls.source.${r+1}`,Me(n.node)))}function GR(e,t,n){n.forEach(([r,o])=>{const s=e[r];s!=null&&(typeof s=="number"&&s<kR||typeof s=="string")&&(t[o]=s)})}function VR(e){const t=Yo(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}const YR="ElementTiming",JR=(()=>({name:YR,setup(){!er()||!Ie()||pn("element",({entries:t})=>{for(const n of t){const r=n;if(!r.identifier)continue;const o=r.identifier,s=r.name,i=r.renderTime,a=r.loadTime,c={"sentry.origin":"auto.ui.browser.element_timing","ui.element.identifier":o};s&&(c["ui.element.paint_type"]=s),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),i>0&&vc("ui.element.render_time",i,{unit:"millisecond",attributes:c}),a>0&&vc("ui.element.load_time",a,{unit:"millisecond",attributes:c})}})}})),QL=JR,Ga=[],fo=new Map,ir=new Map,kg=60;function KR(){if(er()&&Ie()){const t=XR();return()=>{t()}}return()=>{}}const 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 XR(){return Uu(QR)}const QR=({metric:e})=>{if(e.value==null)return;const t=_e(e.value);if(t>kg)return;const n=e.entries.find(h=>h.duration===e.value&&Io[h.name]);if(!n)return;const{interactionId:r}=n,o=Io[n.name],s=_e(Ie()+n.startTime),i=Ee(),a=i?ve(i):void 0,c=r!=null?fo.get(r):void 0,u=c?.span||a,d=u?$(u).description:W().getScopeData().transactionName,l=c?.elementName||Me(n.target),p={[Y]:"auto.http.browser.inp",[ue]:`ui.interaction.${o}`,[bn]:n.duration},f=Hu({name:l,transaction:d,attributes:p,startTime:s});f&&(f.addEvent("inp",{[Oo]:"millisecond",[Po]:e.value}),f.end(s+t))};function ZR(e){return e!=null?fo.get(e):void 0}function eA(){const e=Object.keys(Io);dn()&&e.forEach(o=>{G.addEventListener(o,t,{capture:!0,passive:!0})});function t(o){const s=o.target;if(!s)return;const i=Me(s),a=Math.round(o.timeStamp);if(ir.set(a,i),ir.size>50){const c=ir.keys().next().value;c!==void 0&&ir.delete(c)}}function n(o){const s=Math.round(o.startTime);let i=ir.get(s);if(!i)for(let a=-5;a<=5;a++){const c=ir.get(s+a);if(c){i=c;break}}return i||"<unknown>"}const r=({entries:o})=>{const s=Ee(),i=s&&ve(s);o.forEach(a=>{if(!mR(a))return;const c=a.interactionId;if(c==null||fo.has(c))return;const u=a.target?Me(a.target):n(a);if(Ga.length>10){const d=Ga.shift();fo.delete(d)}Ga.push(c),fo.set(c,{span:i,elementName:u})})};pn("event",r),pn("first-input",r)}function Wu(e){const{name:t,op:n,origin:r,metricName:o,value:s,attributes:i,parentSpan:a,reportEvent:c,startTime:u,endTime:d}=e,l=W().getScopeData().transactionName,p={[Y]:r,[ue]:n,[bn]:0,[`browser.web_vital.${o}.value`]:s,[Ch]:l,[pu]:l,"user_agent.original":G.navigator?.userAgent,...i};a&&Xs(a).attributes?.[ue]==="pageload"&&(p["sentry.pageload.span_id"]=a.spanContext().spanId),c&&(p[`browser.web_vital.${o}.report_event`]=c);const f=Ge({name:t,attributes:p,startTime:u,parentSpan:a});f&&f.end(d??u)}function tA(e){let t=0,n;if(!sa("largest-contentful-paint"))return;const r=ra(({metric:o})=>{const s=o.entries[o.entries.length-1];!s||!Qo(o.value)||(t=o.value,n=s)},!0);ia(e,(o,s,i)=>{nA(t,n,i,o),r()})}function nA(e,t,n,r){if(!Qo(e))return;ot&&g.log(`Sending LCP span (${e})`);const o=Ie()||0,s=_e(o),i=_e(o+(t?.startTime||0)),a=t?Me(t.element):"Largest contentful paint",c={};t?.element&&(c["browser.web_vital.lcp.element"]=Me(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),Wu({name:a,op:"ui.webvital.lcp",origin:"auto.http.browser.lcp",metricName:"lcp",value:e,attributes:c,parentSpan:n,reportEvent:r,startTime:s,endTime:i})}function rA(e){let t=0,n;if(!sa("layout-shift"))return;const r=na(({metric:o})=>{const s=o.entries[o.entries.length-1];s&&(t=o.value,n=s)},!0);ia(e,(o,s,i)=>{oA(t,n,i,o),r()})}function oA(e,t,n,r){ot&&g.log(`Sending CLS span (${e})`);const o=t?_e((Ie()||0)+t.startTime):he(),s=t?Me(t.sources[0]?.node):"Layout shift",i={};
491t?.sources&&t.sources.forEach((a,c)=>{i[`browser.web_vital.cls.source.${c+1}`]=Me(a.node)}),Wu({name:s,op:"ui.webvital.cls",origin:"auto.http.browser.cls",metricName:"cls",value:e,attributes:i,parentSpan:n,reportEvent:r,startTime:o})}function sA(){if(!er()||!Ie())return;Uu(({metric:n})=>{if(n.value==null||_e(n.value)>kg)return;const o=n.entries.find(s=>s.duration===n.value&&Io[s.name]);o&&iA(n.value,o)})}function iA(e,t){ot&&g.log(`Sending INP span (${e})`);const n=_e(Ie()+t.startTime),r=_e(e),o=Io[t.name],s=ZR(t.interactionId),i=Ee(),a=i?ve(i):void 0,c=s?.span||a,u=c?Xs(c).name:W().getScopeData().transactionName,d=s?.elementName||Me(t.target);Wu({name:d,op:`ui.interaction.${o}`,origin:"auto.http.browser.inp",metricName:"inp",value:e,attributes:{[bn]:t.duration,[Ch]:u,[pu]:u},startTime:n,endTime:n+r,parentSpan:c})}const aA=1e3;let df,Lc,Dc;function Rg(e){gn("dom",e),_n("dom",cA)}function cA(){if(!G.document)return;const e=tt.bind(null,"dom"),t=ff(e,!0);G.document.addEventListener("click",t,!1),G.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const o=G[n]?.prototype;o?.hasOwnProperty?.("addEventListener")&&(Oe(o,"addEventListener",function(s){return function(i,a,c){if(i==="click"||i=="keypress")try{const u=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},d=u[i]=u[i]||{refCount:0};if(!d.handler){const l=ff(e);d.handler=l,s.call(this,i,l,c)}d.refCount++}catch{}return s.call(this,i,a,c)}}),Oe(o,"removeEventListener",function(s){return function(i,a,c){if(i==="click"||i=="keypress")try{const u=this.__sentry_instrumentation_handlers__||{},d=u[i];d&&(d.refCount--,d.refCount<=0&&(s.call(this,i,d.handler,c),d.handler=void 0,delete u[i]),Object.keys(u).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return s.call(this,i,a,c)}}))})}function uA(e){if(e.type!==Lc)return!1;try{if(!e.target||e.target._sentryId!==Dc)return!1}catch{}return!0}function lA(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function ff(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=dA(n);if(lA(n.type,r))return;ye(n,"_sentryCaptured",!0),r&&!r._sentryId&&ye(r,"_sentryId",Ce());const o=n.type==="keypress"?"input":n.type;uA(n)||(e({event:n,name:o,global:t}),Lc=n.type,Dc=r?r._sentryId:void 0),clearTimeout(df),df=G.setTimeout(()=>{Dc=void 0,Lc=void 0},aA)}}function dA(e){try{return e.target}catch{return null}}let Ss;function aa(e){const t="history";gn(t,e),_n(t,fA)}function fA(){if(G.addEventListener("popstate",()=>{const t=G.location.href,n=Ss;if(Ss=t,n===t)return;tt("history",{from:n,to:t})}),!tw())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const o=Ss,s=pA(String(r));if(Ss=s,o===s)return t.apply(this,n);tt("history",{from:o,to:s})}return t.apply(this,n)}}Oe(G.history,"pushState",e),Oe(G.history,"replaceState",e)}function pA(e){try{return new URL(e,G.location.origin).toString()}catch{return e}}const po={};function ju(e){const t=po[e];if(t)return t;let n=G[e];if(kc(n))return po[e]=n.bind(G);const r=G.document;if(r&&typeof r.createElement=="function")try{const o=r.createElement("iframe");o.hidden=!0,r.head.appendChild(o);const s=o.contentWindow;s?.[e]&&(n=s[e]),r.head.removeChild(o)}catch(o){ot&&g.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,o)}return n&&(po[e]=n.bind(G))}function hA(e){po[e]=void 0}function Zo(...e){try{return ju("setTimeout")(...e)}catch(t){ot&&g.warn("Could not use native setTimeout implementation, falling back to window.setTimeout: ",t);const n=G.setTimeout.bind(G);return po.setTimeout=n,n(...e)}}const Ft="__sentry_xhr_v3__";function zu(e){gn("xhr",e),_n("xhr",mA)}function mA(){if(!G.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){let o=new Error;const s=he()*1e3,i=ft(r[0])?r[0].toUpperCase():void 0,a=gA(r[1]);if(!i||!a)return t.apply(n,r);n[Ft]={method:i,url:a,request_headers:{}},i==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const c=()=>{const u=n[Ft];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const d={endTimestamp:he()*1e3,startTimestamp:s,xhr:n,virtualError:o};tt("xhr",d),o=void 0,n.removeEventListener("readystatechange",c)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,d,l){return c(),u.apply(d,l)}}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,d,l){const[p,f]=l,h=d[Ft];return h&&ft(p)&&ft(f)&&(h.request_headers[p.toLowerCase()]=f),u.apply(d,l)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const o=n[Ft];if(!o)return t.apply(n,r);r[0]!==void 0&&(o.body=r[0]);const s={startTimestamp:he()*1e3,xhr:n};return tt("xhr",s),t.apply(n,r)}})}function gA(e){if(ft(e))return e;try{return e.toString()}catch{}}const _A=Symbol.for("sentry__originalRequestBody");function Ag(e){return new URLSearchParams(e).toString()}function hi(e,t=g){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[Ag(e)];if(!e)return[void 0]}catch(n){return ot&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return ot&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function qu(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){const n=e[0][_A];return n!==void 0?n:void 0}}function Cg(e){let t;try{t=e.getAllResponseHeaders()}catch(n){return ot&&g.error(n,"Failed to get xhr response headers",e),{}}return t?t.split(`\r 492`).reduce((n,r)=>{const[o,s]=r.split(": ");return s&&(n[o.toLowerCase()]=s),n},{}):{}}function yA(e){if(typeof Element>"u")return!1;try{return e instanceof Element}catch{return!1}}function SA(e){try{return new URL(e,G.location.origin).toString()}catch{return e}}const bA=40;function Ng(e,t=ju("fetch")){let n=0,r=0;async function o(s){const i=s.body.length;n+=i,r++;
492const a={body:s.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const 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 hA("fetch"),c}finally{n-=i,r--}}return $v(e,o,_u(e.bufferSize||bA))}const w=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function vA(){const e=R();if(!e){w&&g.warn("No Sentry client available, profiling is not started");return}if(!e.getIntegrationByName("BrowserProfiling")){w&&g.warn("BrowserProfiling integration is not available");return}e.emit("startUIProfiler")}function EA(){const e=R();if(!e){w&&g.warn("No Sentry client available, profiling is not started");return}if(!e.getIntegrationByName("BrowserProfiling")){w&&g.warn("ProfilingIntegration is not available");return}e.emit("stopUIProfiler")}const ZL={startProfiler:vA,stopProfiler:EA},TA=10,IA=20,wA=30,kA=40,RA=50;function Dr(e,t,n,r){const o={filename:e,function:t==="<anonymous>"?Et:t,in_app:!0};return n!==void 0&&(o.lineno=n),r!==void 0&&(o.colno=r),o}const AA=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,CA=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,NA=/\((\S*)(?::(\d+))(?::(\d+))\)/,MA=/at (.+?) ?\(data:(.+?),/,xA=e=>{const t=e.match(MA);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=AA.exec(e);if(n){const[,o,s,i]=n;return Dr(o,Et,+s,+i)}const r=CA.exec(e);if(r){if(r[2]?.indexOf("eval")===0){const a=NA.exec(r[2]);a&&(r[2]=a[1],r[3]=a[2],r[4]=a[3])}const[s,i]=Mg(r[1]||Et,r[2]);return Dr(i,s,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},OA=[wA,xA],PA=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,LA=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,DA=e=>{const t=PA.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const s=LA.exec(t[3]);s&&(t[1]=t[1]||"eval",t[3]=s[1],t[4]=s[2],t[5]="")}let r=t[3],o=t[1]||Et;return[o,r]=Mg(o,r),Dr(r,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},FA=[RA,DA],$A=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,BA=e=>{const t=$A.exec(e);return t?Dr(t[2],t[1]||Et,+t[3],t[4]?+t[4]:void 0):void 0},eD=[kA,BA],UA=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,HA=e=>{const t=UA.exec(e);return t?Dr(t[2],t[3]||Et,+t[1]):void 0},tD=[TA,HA],WA=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,jA=e=>{const t=WA.exec(e);return t?Dr(t[5],t[3]||t[4]||Et,+t[1],+t[2]):void 0},nD=[IA,jA],zA=[OA,FA],qA=Ap(...zA),Mg=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Et,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function rD(e,{metadata:t,tunnel:n,dsn:r}){const o={event_id:e.event_id,sent_at:new Date().toISOString(),...t?.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Nt(r)}},s=GA(e);return it(o,[s])}function GA(e){return[{type:"user_report"},e]}const bs=1024,VA="Breadcrumbs",YA=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:VA,setup(n){t.console&&Su(QA(n)),t.dom&&Rg(XA(n,t.dom)),t.xhr&&zu(ZA(n)),t.fetch&&Xi(eC(n)),t.history&&aa(tC(n)),t.sentry&&n.on("beforeSendEvent",KA(n))}}}),JA=YA;function KA(e){return function(n){R()===e&&kt({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:Mn(n)},{event:n})}}function XA(e,t){return function(r){if(R()!==e)return;let o,s,i=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>bs&&(w&&g.warn(`\`dom.maxStringLength\` cannot exceed ${bs}, but a value of ${a} was configured. Sentry will use ${bs} instead.`),a=bs),typeof i=="string"&&(i=[i]);try{const u=r.event,d=nC(u)?u.target:u;o=Me(d,{keyAttrs:i,maxStringLength:a}),s=Nu(d)}catch{o="<unknown>"}if(o.length===0)return;const c={category:`ui.${r.name}`,message:o};s&&(c.data={"ui.component_name":s}),kt(c,{event:r.event,name:r.name,global:r.global})}}function QA(e){return function(n){if(R()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:oi(n.level),message:Ys(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Ys(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;kt(r,{input:n.args,level:n.level})}}function ZA(e){return function(n){if(R()!==e)return;const{startTimestamp:r,endTimestamp:o}=n,s=n.xhr[Ft];if(!r||!o||!s)return;const{method:i,url:a,status_code:c,body:u}=s,d={method:i,url:a,status_code:c},l={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:o},p={category:"xhr",data:d,type:"http",level:qm(c)};e.emit("beforeOutgoingRequestBreadcrumb",p,l),kt(p,l)}}function eC(e){return function(n){if(R()!==e)return;const{startTimestamp:r,endTimestamp:o}=n;
492if(o&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const s={data:n.error,input:n.args,startTimestamp:r,endTimestamp:o},i={category:"fetch",data:n.fetchData,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",i,s),kt(i,s)}else{const s=n.response,i={...n.fetchData,status_code:s?.status},a={input:n.args,response:s,startTimestamp:r,endTimestamp:o},c={category:"fetch",data:i,type:"http",level:qm(i.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",c,a),kt(c,a)}}}function tC(e){return function(n){if(R()!==e)return;let r=n.from,o=n.to;const s=Bn(A.location.href);let i=r?Bn(r):void 0;const a=Bn(o);i?.path||(i=s),s.protocol===a.protocol&&s.host===a.host&&(o=a.relative),s.protocol===i.protocol&&s.host===i.host&&(r=i.relative),kt({category:"navigation",data:{from:r,to:o}})}}function nC(e){return!!e&&!!e.target}const rC="EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(","),oC="BrowserApiErrors",sC=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:oC,setupOnce(){t.setTimeout&&Oe(A,"setTimeout",pf),t.setInterval&&Oe(A,"setInterval",pf),t.requestAnimationFrame&&Oe(A,"requestAnimationFrame",aC),t.XMLHttpRequest&&"XMLHttpRequest"in A&&Oe(XMLHttpRequest.prototype,"send",cC);const n=t.eventTarget;n&&(Array.isArray(n)?n:rC).forEach(o=>uC(o,t))}}}),iC=sC;function pf(e){return function(...t){const n=t[0];return t[0]=Lr(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${Ut(e)}`}}),e.apply(this,t)}}function aC(e){return function(t){return e.apply(this,[Lr(t,{mechanism:{data:{handler:Ut(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function cC(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in n&&typeof n[o]=="function"&&Oe(n,o,function(s){const i={mechanism:{data:{handler:Ut(s)},handled:!1,type:`auto.browser.browserapierrors.xhr.${o}`}},a=tu(s);return a&&(i.mechanism.data.handler=Ut(a)),Lr(s,i)})}),e.apply(this,t)}}function uC(e,t){const r=A[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(Oe(r,"addEventListener",function(o){return function(s,i,a){try{lC(i)&&(i.handleEvent=Lr(i.handleEvent,{mechanism:{data:{handler:Ut(i),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&dC(this,s,i),o.apply(this,[s,Lr(i,{mechanism:{data:{handler:Ut(i),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),a])}}),Oe(r,"removeEventListener",function(o){return function(s,i,a){try{if(Object.prototype.hasOwnProperty.call(i,"__sentry_wrapped__")){const c=i.__sentry_wrapped__;c&&o.call(this,s,c,a)}}catch{}return o.call(this,s,i,a)}}))}function lC(e){return typeof e.handleEvent=="function"}function dC(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const fC=(e={})=>{const t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(typeof A.document>"u"){w&&g.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}ed({ignoreDuration:!0});let n=!1;Bu(()=>{n||(Aa(),n=!0)});const r=Se();let o=r.getUser();r.addScopeListener(s=>{const i=s.getUser();(o?.id!==i?.id||o?.ip_address!==i?.ip_address)&&(o=i,n&&Aa())}),t==="route"&&aa(({from:s,to:i})=>{s!==i&&(ed({ignoreDuration:!0}),Aa(),n=!0)})}}},pC="CultureContext",hC=(()=>({name:pC,preprocessEvent(e){const t=hf();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){const t=hf();t&&ln(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}})),mC=hC;function hf(){try{const e=A.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}const gC="GlobalHandlers",_C=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:gC,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(SC(n),mf("onerror")),t.onunhandledrejection&&(bC(n),mf("onunhandledrejection"))}}}),yC=_C;function SC(e){Cp(t=>{const{stackParser:n,attachStacktrace:r}=Pg();if(R()!==e||pg())return;const{msg:o,url:s,line:i,column:a,error:c}=t,u=vC(ea(n,c||o,void 0,r,!1),s,i,a);u.level="error",Uo(u,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function bC(e){Np(t=>{const{stackParser:n,attachStacktrace:r}=Pg();if(R()!==e||pg())return;
492const o=xg(t),s=Tt(o)?Og(o):ea(n,o,void 0,r,!0);s.level="error",Uo(s,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function xg(e){if(Tt(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 Og(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function vC(e,t,n,r){const o=e.exception=e.exception||{},s=o.values=o.values||[],i=s[0]=s[0]||{},a=i.stacktrace=i.stacktrace||{},c=a.frames=a.frames||[];return c.length===0&&c.push({colno:r,lineno:n,filename:EC(t)??fn(),function:Et,in_app:!0}),e}function mf(e){w&&g.log(`Global Handler attached: ${e}`)}function Pg(){return R()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function EC(e){if(!(!ft(e)||e.length===0))return e.startsWith("data:")?`<${pt(e,!1)}>`:e}const TC=()=>({name:"HttpContext",preprocessEvent(e){if(!A.navigator&&!A.location&&!A.document)return;const t=li(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSpan(e){if(!A.navigator&&!A.location&&!A.document)return;const t=li();ln(e,{[Hb]:t.headers["User-Agent"],...e.is_segment&&{[vn]:e.attributes?.[Lb]!=="http.client"?Ye(t.url):void 0,[`${Ob}.referer`]:t.headers.Referer}})}}),IC="cause",wC=5,kC="LinkedErrors",RC=((e={})=>{const t=e.limit||wC,n=e.key||IC;return{name:kC,preprocessEvent(r,o,s){const i=s.getOptions();OE(Du,i.stackParser,n,t,r,o)}}}),AC=RC,CC=/^HTML(\w*)Element$/;function Lg(e){if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(yA(e)){const t=NC(e);if(CC.test(t))return`[HTMLElement: ${Me(e)}]`}}function NC(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function MC(){return xC()?(w&&zt(()=>{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 xC(){if(typeof A.window>"u")return!1;const e=A;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;const n=fn();return!(A===A.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(n))}function OC(e){return[wE(),vE(),LT(),iC(),JA(),yC(),AC(),jE(),TC(),mC(),fC()]}function PC(e={}){const t=!e.skipBrowserExtensionCheck&&MC();let n=e.defaultIntegrations==null?OC():e.defaultIntegrations;const r={...e,enabled:t?!1:e.enabled,stackParser:Cy(e.stackParser||qA),integrations:hv({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||Ng};return Fp(Lg),eE(Uk,r)}function oD(){}function sD(e){e()}function gf(e={}){const t=A.document,n=t?.head||t?.body;if(!n){w&&g.error("[showReportDialog] Global document not defined");return}const r=W(),s=R()?.getDsn();if(!s){w&&g.error("[showReportDialog] DSN not configured");return}const i={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||iv()},a=A.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=fv(s,i);const{onLoad:c,onClose:u}=i;if(c&&(a.onload=c),u){const d=l=>{if(l.data==="__sentry_reportdialog_closed__")try{u()}finally{A.removeEventListener("message",d)}};A.addEventListener("message",d)}n.appendChild(a)}const LC=B,DC="ReportingObserver",_f=new WeakMap,FC=((e={})=>{const t=e.types||["crash","deprecation","intervention"];function n(r){if(_f.has(R()))for(const o of r)Ke(s=>{s.setExtra("url",o.url);const i=`ReportingObserver [${o.type}]`;let a="No details available";if(o.body){const c={};for(const u in o.body)c[u]=o.body[u];if(s.setExtra("body",c),o.type==="crash"){const u=o.body;a=[u.crashId||"",u.reason||""].join(" ").trim()||a}else a=o.body.message||a}sv(`${i}: ${a}`)})}return{name:DC,setupOnce(){if(!rw())return;new LC.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){_f.set(r,!0)}}}),iD=FC,$C="HttpClient",BC=((e={})=>{const t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:$C,setup(n){GC(n,t),VC(n,t)}}}),aD=BC;function UC(e,t,n,r,o){if(Dg(e,n.status,n.url)){const s=YC(t,r);let i,a,c,u;const d=$g();if(d.requestHeaders!==!1&&(i=bo(yf(s.headers),d.requestHeaders)),d.responseHeaders!==!1&&(a=bo(yf(n.headers),d.responseHeaders)),d.cookies!==!1){const p=s.headers.get("Cookie")||void 0;if(p){const h=Sc(p,d.cookies);typeof h=="object"&&(c=h)}const f=n.headers.get("Set-Cookie")||void 0;if(f){const h=Sc(f,d.cookies);typeof h=="object"&&(u=h)}}const l=Fg({url:s.url,method:s.method,status:n.status,requestHeaders:i,responseHeaders:a,requestCookies:c,responseCookies:u,error:o,type:"fetch"});Uo(l)}}function HC(e,t,n,r,o){if(Dg(e,t.status,t.responseURL)){let s,i,a;const c=$g();if(c.cookies!==!1)try{const d=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;if(d){const l=Sc(d,c.cookies);typeof l=="object"&&(i=l)}}catch{}if(c.responseHeaders!==!1)try{a=bo(jC(t),c.responseHeaders)}catch{}c.requestHeaders!==!1&&(s=bo(r,c.requestHeaders));const u=Fg({url:t.responseURL,method:n,status:t.status,requestHeaders:s,responseHeaders:a,responseCookies:i,error:o,type:"xhr"});Uo(u)}}function WC(e){if(e){const t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function yf(e){const t={};return e.forEach((n,r)=>{t[r]=n}),t}function jC(e){const t=e.getAllResponseHeaders();return t?t.split(`\r 493`).reduce((n,r)=>{const[o,s]=r.split(": ");return o&&s&&(n[o]=s),n},{}):{}}function zC(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}function qC(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}function GC(e,t){Gm()&&Xi(n=>{if(R()!==e)return;const{response:r,args:o,error:s,virtualError:i}=n,[a,c]=o;r&&UC(t,a,r,c,s||i)},!1)}function VC(e,t){"XMLHttpRequest"in B&&zu(n=>{if(R()!==e)return;const{error:r,virtualError:o}=n,s=n.xhr,i=s[Ft];if(!i)return;const{method:a,request_headers:c}=i;try{HC(t,s,a,c,r||o)}catch(u){w&&g.warn("Error while extracting response event form XHR response",u)}})}function Dg(e,t,n){return qC(e.failedRequestStatusCodes,t)&&zC(e.failedRequestTargets,n)&&!cm(n,R())}function Fg(e){const t=R(),n=t&&e.error&&e.error instanceof Error?e.error.stack:void 0,r=n&&t?t.getOptions().stackParser(n,0,1):void 0,o=`HTTP Client Error with status code: ${e.status}`,s={message:o,exception:{values:[{type:"Error",value:o,stacktrace:r?{frames:r}:void 0}]},request:{url:e.url,method:e.method,headers:e.requestHeaders,cookies:e.requestCookies},contexts:{response:{status_code:e.status,headers:e.responseHeaders,cookies:e.responseCookies,body_size:WC(e.responseHeaders)}}};return bt(s,{type:`auto.http.client.${e.type}`,handled:!1}),s}function YC(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request
493(e,t)}function $g(){const e=R();if(!e)return{cookies:!1,requestHeaders:!1,responseHeaders:!1};const t=e.getOptions();if(t.dataCollection==null){const o=!!t.sendDefaultPii;return{cookies:o,requestHeaders:o,responseHeaders:o}}const{cookies:n,httpHeaders:r}=e.getDataCollectionOptions();return{cookies:n,requestHeaders:r.request,responseHeaders:r.response}}const Va=B,JC=7,KC="ContextLines",XC=((e={})=>({name:KC,processEvent(t,n,r){const o=e.frameContextLines??r?.getDataCollectionOptions().frameContextLines??JC;return QC(t,o)}})),cD=XC;function QC(e,t){const n=Va.document,r=Va.location&&am(Va.location.href);if(!n||!r)return e;const o=e.exception?.values;if(!o?.length)return e;const s=n.documentElement.innerHTML;if(!s)return e;const i=["<!DOCTYPE html>","<html>",...s.split(` 494`),"</html>"];return o.forEach(a=>{const c=a.stacktrace;c?.frames&&(c.frames=c.frames.map(u=>ZC(u,i,r,t)))}),e}function ZC(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||Vy(t,e,r),e}const e1="GraphQLClient",t1=(e=>({name:e1,setup(t){n1(t,e),r1(t,e)}}));function n1(e,t){e.on("beforeOutgoingRequestSpan",(n,r)=>{const s=$(n).data||{};if(!(s[ue]==="http.client"))return;const c=s[vn]||s["http.url"]||s.url,u=s[SS]||s["http.method"];if(!ft(c)||!ft(u))return;const{endpoints:d}=t,l=nt(c,d),p=Ug(r);if(l&&p){const f=Hg(p);if(f){const h=Bg(f);n.updateName(`${u} ${c} (${h})`),ca(f)&&e.getDataCollectionOptions().graphQL.document===!0&&n.setAttribute(Rh,f.query),ua(f)&&(n.setAttribute("graphql.persisted_query.hash.sha256",f.extensions.persistedQuery.sha256Hash),n.setAttribute("graphql.persisted_query.version",f.extensions.persistedQuery.version))}}})}function r1(e,t){e.on("beforeOutgoingRequestBreadcrumb",(n,r)=>{const{category:o,type:s,data:i}=n;if(s==="http"&&(o==="fetch"||o==="xhr")){const d=i?.url,{endpoints:l}=t,p=nt(d,l),f=Ug(r);if(p&&i&&f){const h=Hg(f);if(!i.graphql&&h){const m=Bg(h);i["graphql.operation"]=m,ca(h)&&e.getDataCollectionOptions().graphQL.document===!0&&(i[Rh]=h.query),ua(h)&&(i["graphql.persisted_query.hash.sha256"]=h.extensions.persistedQuery.sha256Hash,i["graphql.persisted_query.version"]=h.extensions.persistedQuery.version)}}}})}function Bg(e){if(ua(e))return`persisted ${e.operationName}`;if(ca(e)){const{query:t,operationName:n}=e,{operationName:r=n,operationType:o}=o1(t);return r?`${o} ${r}`:`${o}`}return"unknown"}function Ug(e){const t="xhr"in e;let n;if(t){const r=e.xhr[Ft];n=r&&hi(r.body)[0]}else{const r=qu(e.input);n=hi(r)[0]}return n}function o1(e){const 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]};const o=e.match(n);return o?{operationType:o[1],operationName:void 0}:{operationType:void 0,operationName:void 0}}function ca(e){return xe(e)&&typeof e.query=="string"}function ua(e){return xe(e)&&typeof e.operationName=="string"&&xe(e.extensions)&&xe(e.extensions.persistedQuery)&&typeof e.extensions.persistedQuery.sha256Hash=="string"&&typeof e.extensions.persistedQuery.version=="number"}function Hg(e){try{const t=JSON.parse(e);return ca(t)||ua(t)?t:void 0}catch{return}}const uD=t1,lD=(e={})=>{const t=["script"];function n(r,o,s=0){if(!r)return;const i="shadowRoot"in r&&r.shadowRoot?r.shadowRoot.children:r.children;for(const a of i){if(!(a instanceof HTMLElement))continue;const c=Nu(a,1)||void 0,u=a.tagName.toLowerCase();if(t.includes(u))continue;const d=e.onElement?.({element:a,componentName:c,tagName:u,depth:s})||{};if(d==="skip")continue;if(d==="children"){n(a,o,s+1);continue}const{x:l,y:p,width:f,height:h}=a.getBoundingClientRect(),m={identifier:a.id||void 0,type:c||u,visible:!0,alpha:1,height:h,width:f,x:l,y:p,...d},_=[];m.children=_,n(a,m.children,s+1),o.push(m)}}return{name:"ViewHierarchy",processEvent:(r,o)=>{if(r.type!==void 0||e.shouldAttach?.(r,o)===!1)return r;const s={rendering_system:"DOM",positioning:"absolute",windows:[]};n(e.rootElement?.()||A.document.body,s.windows);const i={filename:"view-hierarchy.json",attachmentType:"event.view_hierarchy",contentType:"application/json",data:JSON.stringify(s)};return o.attachments=o.attachments||[],o.attachments.push(i),r}}},ge=B,Gu="sentryReplaySession",s1="replay_event",Vu="Unable to send Replay",i1=3e5,a1=9e5,c1=5e3,u1=5500,l1=6e4,d1=5e3,f1=3,Sf=15e4,vs=5e3,p1=3e3,h1=300,Yu=2e7,m1=4999,g1=5e4,bf=36e5;var _1=Object.defineProperty,y1=(e,t,n)=>t in e?_1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vf=(e,t,n)=>y1(e,typeof t!="symbol"?t+"":t,n),we=(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))(we||{});
494function Wg(e){return e.nodeType===e.ELEMENT_NODE}function Er(e){return e?.host?.shadowRoot===e}function ho(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function S1(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 b1(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function mi(e){try{const t=e.rules||e.cssRules;return t?S1(Array.from(t,jg).join("")):null}catch{return null}}function v1(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,o=r[n],s=r.getPropertyPriority(o);t+=`${o}:${r.getPropertyValue(o)}${s?" !important":""};`}return`${e.selectorText} { ${t} }`}function jg(e){let t;if(T1(e))try{t=mi(e.styleSheet)||b1(e)}catch{}else if(I1(e)){let n=e.cssText;const r=e.selectorText.includes(":"),o=typeof e.style.all=="string"&&e.style.all;if(o&&(n=v1(e)),r&&(n=E1(n)),r||o)return n}return t||e.cssText}function E1(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function T1(e){return"styleSheet"in e}function I1(e){return"selectorText"in e}let zg=class{constructor(){vf(this,"idNodeMap",new Map),vf(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){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r)),Wg(t)&&t.shadowRoot&&this.removeNodeFromMap(t.shadowRoot)}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function w1(){return new zg}function la({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 wo({isMasked:e,element:t,value:n,maskInputFn:r}){let o=n||"";return e?(r&&(o=r(o,t)),"*".repeat(o.length)):o}function Fr(e){return e.toLowerCase()}function Fc(e){return e.toUpperCase()}const Ef="__rrweb_original__";function k1(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let o=0;o<e.height;o+=n){const s=t.getImageData,i=Ef in s?s[Ef]:s;if(new Uint32Array(i.call(t,r,o,Math.min(n,e.width-r),Math.min(n,e.height-o)).data.buffer).some(c=>c!==0))return!1}return!0}function Ju(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Fr(t):null}function gi(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function qg(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i;return n.pathname.match(r)?.[1]??null}const Ya={};function Gg(e){const t=Ya[e];if(t)return t;const n=window[e].bind(window);let r=n;const o=window.document;if(o&&typeof o.createElement=="function")try{const s=o.createElement("iframe");s.hidden=!0,o.head.appendChild(s);const i=s.contentWindow;if(i&&i[e]){const a=i[e].bind(window);r=(...c)=>{try{return a(...c)}catch{return Ya[e]=n,n(...c)}}}o.head.removeChild(s)}catch{}return Ya[e]=r}function $c(...e){return Gg("setTimeout")(...e)}function Vg(...e){return Gg("clearTimeout")(...e)}function Yg(e){try{return e.contentDocument}catch{}}function R1(e){try{return e.contentWindow}catch{}}let A1=1;const C1=new RegExp("[^a-z0-9-_:]"),ko=-2;function Ku(){return A1++}function N1(e){if(e instanceof HTMLFormElement)return"form";const t=Fr(e.tagName);return C1.test(t)?"div":t}function M1(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let ar,Tf;const x1=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,O1=/^(?:[a-z+]+:)?\/\//i,P1=/^www\..*/i,L1=/^(data:)([^,]*),(.*)/i;function D1(e,t){if(!e||t.size===0)return e;try{const n=e.split(";"),r=[];for(let o of n){if(o=o.trim(),!o)continue;const s=o.indexOf(":");if(s===-1){r.push(o);continue}const i=o.slice(0,s).trim();t.has(i)||r.push(o)}return r.join("; ")+(r.length>0&&e.endsWith(";")?";":"")}catch(n){return console.warn("Error filtering CSS properties:",n),e}}function _i(e,t){return(e||"").replace(x1,(n,r,o,s,i,a)=>{const c=o||i||a,u=r||s||"";if(!c)return n;if(O1.test(c)||P1.test(c))return`url(${u}${c}${u})`;if(L1.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${M1(t)+c}${u})`;const d=t.split("/"),l=c.split("/");d.pop();for(const p of l)p!=="."&&(p===".."?d.pop():d.push(p));return`url(${u}${d.join("/")}${u})`})}const F1=/^[^ \t\n\r\u000c]+/,$1=/^[, \t\n\r\u000c]+/;function B1(e,t){if(t.trim()==="")return t;let n=0;function r(s){let i;const a=s.exec(t.substring(n));return a?(i=a[0],n+=i.length,i):""}const o=[];for(;r($1),!(n>=t.length);){let s=r(F1);if(s.slice(-1)===",")s=dr(e,s.substring(0,s.length-1)),o.push(s);else{let i="";s=dr(e,s);let a=!1;for(;;){const c=t.charAt(n);if(c===""){o.push((s+i).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,o.push((s+i).trim());break}else c==="("&&(a=!0);i+=c,n+=1}}}return o.join(", ")}const If=new WeakMap;function dr(e,t){return!t||t.trim()===""?t:da(e,t)}function U1(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function da(e,t){let n=If.get(e);if(n||(n=e.createElement("a"),If.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function Jg(e,t,n,r,o,s,i){if(!r)return r;if(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#"))return dr(e,r);if(n==="xlink:href"&&r[0]!=="#")return dr(e,r);if(n==="background"&&(t==="table"||t==="td"||t==="th"))return dr(e,r);if(n==="srcset")return B1(e,r);if(n==="style"){let a=_i(r,da(e));return i&&i.size>0&&(a=D1(a,i)),a}else if(t==="object"&&n==="data")return dr(e,r);return typeof s=="function"?s(n,r,o):r}function Kg(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function H1(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let o=e.classList.length;o--;){const s=e.classList[o];if(t.test(s))return!0}if(n)return e.matches(n)}catch{}return!1}function W1(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Zt(e,t,n=1/0,r=0){return e?Er(e)?Zt(e.host,t,n,r+1):e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Zt(e.parentNode,t,n,r+1):-1}function fr(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(W1(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function $r(e,t,n,r,o,s){try{const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(i===null)return!1;if(i.tagName==="INPUT"){const u=i.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let a=-1,c=-1;
494if(s){if(c=Zt(i,fr(r,o)),c<0)return!0;a=Zt(i,fr(t,n),c>=0?c:1/0)}else{if(a=Zt(i,fr(t,n)),a<0)return!1;c=Zt(i,fr(r,o),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!s}catch{}return!!s}function j1(e,t,n){const r=R1(e);if(!r)return;let o=!1,s;try{s=r.document.readyState}catch{return}if(s!=="complete"){const a=$c(()=>{o||(t(),o=!0)},n);e.addEventListener("load",()=>{Vg(a),o=!0,t()});return}const i="about:blank";if(r.location.href!==i||e.src===i||e.src==="")return $c(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function z1(e,t,n){let r=!1,o;try{o=e.sheet}catch{o=null}if(o)return;const s=$c(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{Vg(s),r=!0,t()})}function q1(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:p,inlineStylesheet:f,maskInputOptions:h={},maskTextFn:m,maskInputFn:_,dataURLOptions:y={},inlineImages:S,recordCanvas:I,keepIframeSrcFn:b,newlyAddedElement:T=!1,ignoreCSSAttributes:C}=t,E=G1(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:we.Document,childNodes:[],compatMode:e.compatMode}:{type:we.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:we.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:E};case e.ELEMENT_NODE:return Y1(e,{doc:n,blockClass:o,blockSelector:s,unblockSelector:i,inlineStylesheet:f,maskAttributeFn:c,maskInputOptions:h,maskInputFn:_,dataURLOptions:y,inlineImages:S,recordCanvas:I,keepIframeSrcFn:b,newlyAddedElement:T,rootId:E,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:p,ignoreCSSAttributes:C});case e.TEXT_NODE:return V1(e,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:p,maskTextFn:m,maskInputOptions:h,maskInputFn:_,rootId:E});case e.CDATA_SECTION_NODE:return{type:we.CDATA,textContent:"",rootId:E};case e.COMMENT_NODE:return{type:we.Comment,textContent:e.textContent||"",rootId:E};default:return!1}}function G1(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function V1(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:o,maskTextSelector:s,unmaskTextSelector:i,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:d}=t,l=e.parentNode&&e.parentNode.tagName;let p=e.textContent;const f=l==="STYLE"?!0:void 0,h=l==="SCRIPT"?!0:void 0,m=l==="TEXTAREA"?!0:void 0;if(f&&p){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(p=mi(e.parentNode.sheet))}catch(y){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${y}`,e)}p=_i(p,da(t.doc))}h&&(p="SCRIPT_PLACEHOLDER");const _=$r(e,r,s,o,i,n);if(!f&&!h&&!m&&p&&_&&(p=a?a(p,e.parentElement):p.replace(/[\S]/g,"*")),m&&p&&(c.textarea||_)&&(p=u?u(p,e.parentNode):p.replace(/[\S]/g,"*")),l==="OPTION"&&p){const y=la({type:null,tagName:l,maskInputOptions:c});p=wo({isMasked:$r(e,r,s,o,i,y),element:e,value:p,maskInputFn:u})}return{type:we.Text,textContent:p||"",isStyle:f,rootId:d}}function Y1(e,t){const{doc:n,blockClass:r,blockSelector:o,unblockSelector:s,inlineStylesheet:i,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:d={},inlineImages:l,recordCanvas:p,keepIframeSrcFn:f,newlyAddedElement:h=!1,rootId:m,maskTextClass:_,unmaskTextClass:y,maskTextSelector:S,unmaskTextSelector:I,ignoreCSSAttributes:b}=t,T=H1(e,r,o,s),C=N1(e);let E={};const L=e.attributes.length;for(let v=0;v<L;v++){const P=e.attributes[v];P.name&&!Kg(C,P.name,P.value)&&(E[P.name]=Jg(n,C,Fr(P.name),P.value,e,c,b))}if(C==="link"&&i){const v=Array.from(n.styleSheets).find(M=>M.href===e.href);let P=null;v&&(P=mi(v)),P&&(E.rel=null,E.href=null,E.crossorigin=null,E._cssText=_i(P,v.href))}if(C==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const v=mi(e.sheet);v&&(E._cssText=_i(v,da(n)))}if(C==="input"||C==="textarea"||C==="select"||C==="option"){const v=e,P=Ju(v),M=gi(v,Fc(C),P),O=v.checked;if(P!=="submit"&&P!=="button"&&M){const q=$r(v,_,S,y,I,la({type:P,tagName:Fc(C),maskInputOptions:a}));E.value=wo({isMasked:q,element:v,value:M,maskInputFn:u})}O&&(E.checked=O)}if(C==="option"&&(e.selected&&!a.select?E.selected=!0:delete E.selected),C==="canvas"&&p){if(e.__context==="2d")k1(e)||(E.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){const v=e.toDataURL(d.type,d.quality),P=n.createElement("canvas");P.width=e.width,P.height=e.height;const M=P.toDataURL(d.type,d.quality);v!==M&&(E.rr_dataURL=v)}}if(C==="img"&&l){ar||(ar=n.createElement("canvas"),Tf=ar.getContext("2d"));const v=e,P=v.currentSrc||v.getAttribute("src")||"<unknown-src>",M=v.crossOrigin,O=()=>{v.removeEventListener("load",O);
494try{ar.width=v.naturalWidth,ar.height=v.naturalHeight,Tf.drawImage(v,0,0),E.rr_dataURL=ar.toDataURL(d.type,d.quality)}catch(q){if(v.crossOrigin!=="anonymous"){v.crossOrigin="anonymous",v.complete&&v.naturalWidth!==0?O():v.addEventListener("load",O);return}else console.warn(`Cannot inline img src=${P}! Error: ${q}`)}v.crossOrigin==="anonymous"&&(M?E.crossOrigin=M:v.removeAttribute("crossorigin"))};v.complete&&v.naturalWidth!==0?O():v.addEventListener("load",O)}if((C==="audio"||C==="video")&&(E.rr_mediaState=e.paused?"paused":"played",E.rr_mediaCurrentTime=e.currentTime),h||(e.scrollLeft&&(E.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(E.rr_scrollTop=e.scrollTop)),T){const{width:v,height:P}=e.getBoundingClientRect();E={class:E.class,rr_width:`${v}px`,rr_height:`${P}px`}}C==="iframe"&&!f(E.src)&&(!T&&!Yg(e)&&(E.rr_src=E.src),delete E.src);let N;try{customElements.get(C)&&(N=!0)}catch{}return{type:we.Element,tagName:C,attributes:E,childNodes:[],isSVG:U1(e)||void 0,needBlock:T,rootId:m,isCustom:N}}function me(e){return e==null?"":e.toLowerCase()}function J1(e,t){if(t.comment&&e.type===we.Comment)return!0;if(e.type===we.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"&&qg(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(me(e.attributes.name).match(/^msapplication-tile(image|color)$/)||me(e.attributes.name)==="application-name"||me(e.attributes.rel)==="icon"||me(e.attributes.rel)==="apple-touch-icon"||me(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&me(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(me(e.attributes.property).match(/^(og|twitter|fb):/)||me(e.attributes.name).match(/^(og|twitter):/)||me(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(me(e.attributes.name)==="robots"||me(e.attributes.name)==="googlebot"||me(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(me(e.attributes.name)==="author"||me(e.attributes.name)==="generator"||me(e.attributes.name)==="framework"||me(e.attributes.name)==="publisher"||me(e.attributes.name)==="progid"||me(e.attributes.property).match(/^article:/)||me(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(me(e.attributes.name)==="google-site-verification"||me(e.attributes.name)==="yandex-verification"||me(e.attributes.name)==="csrf-token"||me(e.attributes.name)==="p:domain_verify"||me(e.attributes.name)==="verify-v1"||me(e.attributes.name)==="verification"||me(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function pr(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:p=!1,inlineStylesheet:f=!0,maskInputOptions:h={},maskAttributeFn:m,maskTextFn:_,maskInputFn:y,slimDOMOptions:S,dataURLOptions:I={},inlineImages:b=!1,recordCanvas:T=!1,onSerialize:C,onIframeLoad:E,iframeLoadTimeout:L=5e3,onBlockedImageLoad:N,onStylesheetLoad:v,stylesheetLoadTimeout:P=5e3,keepIframeSrcFn:M=()=>!1,newlyAddedElement:O=!1,ignoreCSSAttributes:q}=t;let{preserveWhiteSpace:Q=!0}=t;const J=q1(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:m,maskTextFn:_,maskInputFn:y,dataURLOptions:I,inlineImages:b,recordCanvas:T,keepIframeSrcFn:M,newlyAddedElement:O,ignoreCSSAttributes:q});if(!J)return console.warn(e,"not serialized"),null;let U;r.hasNode(e)?U=r.getId(e):J1(J,S)||!Q&&J.type===we.Text&&!J.isStyle&&!J.textContent.trim().length?U=ko:U=Ku();const x=Object.assign(J,{id:U});if(r.add(e,x),U===ko)return null;C&&C(e);let H=!p;if(x.type===we.Element){H=H&&!x.needBlock;const D=e.shadowRoot;D&&ho(D)&&(x.isShadowHost=!0)}if((x.type===we.Document||x.type===we.Element)&&H){S.headWhitespace&&x.type===we.Element&&x.tagName==="head"&&(Q=!1);const D={doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:p,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:m,maskTextFn:_,maskInputFn:y,slimDOMOptions:S,dataURLOptions:I,inlineImages:b,recordCanvas:T,preserveWhiteSpace:Q,onSerialize:C,onIframeLoad:E,iframeLoadTimeout:L,onBlockedImageLoad:N,onStylesheetLoad:v,stylesheetLoadTimeout:P,keepIframeSrcFn:M,ignoreCSSAttributes:q},Z=e.childNodes?Array.from(e.childNodes):[];for(const se of Z){const ne=pr(se,D);ne&&x.childNodes.push(ne)}if(Wg(e)&&e.shadowRoot)for(const se of Array.from(e.shadowRoot.childNodes)){const ne=pr(se,D);ne&&(ho(e.shadowRoot)&&(ne.isShadow=!0),x.childNodes.push(ne))}}if(e.parentNode&&Er(e.parentNode)&&ho(e.parentNode)&&(x.isShadow=!0),x.type===we.Element&&x.tagName==="iframe"&&!x.needBlock&&j1(e,()=>{const D=Yg(e);if(D&&E){const Z=pr(D,{doc:D,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:m,maskTextFn:_,maskInputFn:y,slimDOMOptions:S,dataURLOptions:I,inlineImages:b,recordCanvas:T,preserveWhiteSpace:Q,onSerialize:C,onIframeLoad:E,iframeLoadTimeout:L,onStylesheetLoad:v,stylesheetLoadTimeout:P,keepIframeSrcFn:M,ignoreCSSAttributes:q});Z&&E(e,Z)}},L),x.type===we.Element&&x.tagName==="img"&&!e.complete&&x.needBlock){const D=e,Z=()=>
494{if(D.isConnected&&!D.complete&&N)try{const se=D.getBoundingClientRect();se.width>0&&se.height>0&&N(D,x,se)}catch{}D.removeEventListener("load",Z)};D.isConnected&&D.addEventListener("load",Z)}return x.type===we.Element&&x.tagName==="link"&&typeof x.attributes.rel=="string"&&(x.attributes.rel==="stylesheet"||x.attributes.rel==="preload"&&typeof x.attributes.href=="string"&&qg(x.attributes.href)==="css")&&z1(e,()=>{if(v){const D=pr(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:m,maskTextFn:_,maskInputFn:y,slimDOMOptions:S,dataURLOptions:I,inlineImages:b,recordCanvas:T,preserveWhiteSpace:Q,onSerialize:C,onIframeLoad:E,iframeLoadTimeout:L,onStylesheetLoad:v,stylesheetLoadTimeout:P,keepIframeSrcFn:M,ignoreCSSAttributes:q});D&&v(e,D)}},P),x.type===we.Element&&delete x.needBlock,x}function K1(e,t){const{mirror:n=new zg,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:s=null,maskAllText:i=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:d=null,inlineStylesheet:l=!0,inlineImages:p=!1,recordCanvas:f=!1,maskAllInputs:h=!1,maskAttributeFn:m,maskTextFn:_,maskInputFn:y,slimDOM:S=!1,dataURLOptions:I,preserveWhiteSpace:b,onSerialize:T,onIframeLoad:C,iframeLoadTimeout:E,onBlockedImageLoad:L,onStylesheetLoad:N,stylesheetLoadTimeout:v,keepIframeSrcFn:P=()=>!1,ignoreCSSAttributes:M=new Set([])}=t||{};return pr(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,maskAllText:i,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:l,maskInputOptions:h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:h===!1?{}:h,maskAttributeFn:m,maskTextFn:_,maskInputFn:y,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:I,inlineImages:p,recordCanvas:f,preserveWhiteSpace:b,onSerialize:T,onIframeLoad:C,iframeLoadTimeout:E,onBlockedImageLoad:L,onStylesheetLoad:N,stylesheetLoadTimeout:v,keepIframeSrcFn:P,newlyAddedElement:!1,ignoreCSSAttributes:M})}function Fe(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const cr=`Please stop import mirror directly. Instead of that,\r 495now you can use replayer.getMirror() to access the mirror instance of a replayer,\r 496or you can use record.mirror to access the mirror instance during recording.`;let wf={map:{},getId(){return console.error(cr),-1},getNode(){return console.error(cr),null},removeNodeFromMap(){console.error(cr)},has(){return console.error(cr),!1},reset(){console.error(cr)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(wf=new Proxy(wf,{get(e,t,n){return t==="map"&&console.error(cr),Reflect.get(e,t,n)}}));function Ro(e,t,n={}){let r=null,o=0;return function(...s){const i=Date.now();!o&&n.leading===!1&&(o=i);const a=t-(i-o),c=this;a<=0||a>t?(r&&(rN(r),r=null),o=i,e.apply(c,s)):!r&&n.trailing!==!1&&(r=fa(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(c,s)},a))}}function Xg(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(i){fa(()=>{n.set.call(this,i)},0),s&&s.set&&s.set.call(this,i)}}),()=>Xg(e,t,s||{},!0)}function Xu(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}let yi=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(yi=()=>new Date().getTime());function Qg(e){const 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 Zg(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function e_(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function t_(e){if(!e)return null;
496try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function je(e,t,n,r,o){if(!e)return!1;const s=t_(e);if(!s)return!1;const i=fr(t,n);if(!o){const u=r&&s.matches(r);return i(s)&&!u}const a=Zt(s,i);let c=-1;return a<0?!1:(r&&(c=Zt(s,fr(null,r))),a>-1&&c<0?!0:a<c)}function X1(e,t){return t.getId(e)!==-1}function Ja(e,t){return t.getId(e)===ko}function n_(e,t){if(Er(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?n_(e.parentNode,t):!0:!0}function Bc(e){return!!e.changedTouches}function Q1(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 r_(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function o_(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Uc(e){return!!e?.shadowRoot}class Z1{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 s_(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function eN(e){let t=e,n;for(;n=s_(t);)t=n;return t}function tN(e){const t=e.ownerDocument;if(!t)return!1;const n=eN(e);return t.contains(n)}function i_(e){const t=e.ownerDocument;return t?t.contains(e)||tN(e):!1}const Ka={};function Qu(e){const t=Ka[e];if(t)return t;const n=window[e].bind(window);let r=n;const o=window.document;if(o&&typeof o.createElement=="function")try{const s=o.createElement("iframe");s.hidden=!0,o.head.appendChild(s);const i=s.contentWindow;if(i&&i[e]){const a=i[e].bind(window);r=(...c)=>{try{return a(...c)}catch{return Ka[e]=n,n(...c)}}}o.head.removeChild(s)}catch{}return Ka[e]=r}function nN(...e){return Qu("requestAnimationFrame")(...e)}function fa(...e){return Qu("setTimeout")(...e)}function rN(...e){return Qu("clearTimeout")(...e)}var ee=(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))(ee||{}),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||{}),Le=(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))(Le||{}),Dt=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Dt||{}),ur=(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))(ur||{});let mo;function oN(e){mo=e}function sN(){mo=void 0}const oe=e=>mo?((...n)=>{try{return e(...n)}catch(r){if(mo&&mo(r)===!0)return()=>{};throw r}}):e;var kf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
496+/",iN=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Es=0;Es<kf.length;Es++)iN[kf.charCodeAt(Es)]=Es;class Rf{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}function Zu(e){try{return e.contentDocument}catch{}}function Ao(e){try{return e.contentWindow}catch{}}class aN{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{const n=new CSSStyleSheet;n.replaceSync(`x { ${t} }`);const r=n.cssRules[0];return!r||r.type!==CSSRule.STYLE_RULE?null:r.style}catch{return null}}parseWithDetachedElement(t){const 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 Af(e){return"__ln"in e}class cN{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){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&Af(t.previousSibling)){const 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&&Af(t.nextSibling)&&t.nextSibling.__ln.previous){const 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){const 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--)}}const Cf=(e,t)=>`${e}@${t}`;class uN{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new cN,o=c=>{let u=c,d=ko;for(;d===ko;)u=u&&u.nextSibling,d=u&&this.mirror.getId(u);return d},s=c=>{if(!c.parentNode||!i_(c))return;const u=Er(c.parentNode)?this.mirror.getId(s_(c)):this.mirror.getId(c.parentNode),d=o(c);if(u===-1||d===-1)return r.addNode(c);const l=pr(c,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:p=>{r_(p,this.mirror)&&!je(p,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(p),o_(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),Uc(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(p,f)=>{if(je(p,this.blockClass,this.blockSelector,this.unblockSelector,!1))return;this.iframeManager.attachIframe(p,f);const h=Ao(p);h&&this.canvasManager.addWindow(h),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,f)=>{this.stylesheetManager.attachLinkElement(p,f)},onBlockedImageLoad:(p,f,{width:h,height:m})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:f.id,attributes:{style:{width:`${h}px`,height:`${m}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});l&&(t.push({parentId:u,nextId:d,node:l}),n.add(l.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const c of this.movedSet)Nf(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||s(c);for(const c of this.addedSet)!Mf(this.droppedSet,c)&&!Nf(this.removes,c,this.mirror)||Mf(this.movedSet,c)?s(c):this.droppedSet.add(c);let i=null;for(;r.length;){let c=null;if(i){const u=this.mirror.getId(i.value.parentNode),d=o(i.value);u!==-1&&d!==-1&&(c=i)}if(!c){let u=r.tail;for(;u;){const d=u;if(u=u.previous,d){const l=this.mirror.getId(d.value.parentNode);
496if(o(d.value)===-1)continue;if(l!==-1){c=d;break}else{const f=d.value;if(f.parentNode&&f.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const h=f.parentNode.host;if(this.mirror.getId(h)!==-1){c=d;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}i=c.previous,r.removeNode(c.value),s(c.value)}const 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=>{const{attributes:u}=c;if(typeof u.style=="string"){const d=JSON.stringify(c.styleDiff),l=JSON.stringify(c._unchangedStyles);d.length<u.style.length&&(d+l).split("var(").length===u.style.split("var(").length&&(u.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:u}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!Ja(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!je(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:$r(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,t_(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,o=t.target.getAttribute(r);if(r==="value"){const i=Ju(n),a=n.tagName;o=gi(n,a,i);const c=la({maskInputOptions:this.maskInputOptions,tagName:a,type:i}),u=$r(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c);o=wo({isMasked:u,element:n,value:o,maskInputFn:this.maskInputFn})}if(je(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||o===t.oldValue)return;let s=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(o))if(!Zu(n))r="rr_src";else return;if(s||(s={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(t.target,s)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!Kg(n.tagName,r)&&(s.attributes[r]=Jg(this.doc,Fr(n.tagName),Fr(r),o,n,this.maskAttributeFn),r==="style")){const i=t.oldValue?this.styleDeclarationParser.parse(t.oldValue):null;for(const a of Array.from(n.style)){const c=n.style.getPropertyValue(a),u=n.style.getPropertyPriority(a);c!==(i?.getPropertyValue(a)||"")||u!==(i?.getPropertyPriority(a)||"")?u===""?s.styleDiff[a]=c:s.styleDiff[a]=[c,u]:s._unchangedStyles[a]=[c,u]}if(i)for(const a of Array.from(i))n.style.getPropertyValue(a)===""&&(s.styleDiff[a]=!1)}break}case"childList":{if(je(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),o=Er(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);je(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Ja(n,this.mirror)||!X1(n,this.mirror)||(this.addedSet.has(n)?(Hc(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||n_(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Cf(r,o)]?Hc(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:Er(t.target)&&ho(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(Ja(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[Cf(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);je(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEac
496h(r=>this.genAdds(r)),Uc(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 aN(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 Hc(e,t){e.delete(t),t.childNodes?.forEach(n=>Hc(e,n))}function Nf(e,t,n){return e.length===0?!1:lN(e,t,n)}function lN(e,t,n){let r=t.parentNode;for(;r;){const o=n.getId(r);if(e.some(s=>s.id===o))return!0;r=r.parentNode}return!1}function Mf(e,t){return e.size===0?!1:a_(e,t)}function a_(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:a_(e,n):!1}const hr=[];function es(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function c_(e,t){const n=new uN;hr.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const o=window?.Zone?.__symbol__?.("MutationObserver");o&&window[o]&&(r=window[o]);const s=new r(oe(i=>{e.onMutation&&e.onMutation(i)===!1||n.processMutations.bind(n)(i)}));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function dN({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const o=typeof t.mousemove=="number"?t.mousemove:50,s=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let i=[],a;const c=Ro(oe(l=>{const p=Date.now()-a;e(i.map(f=>(f.timeOffset-=p,f)),l),i=[],a=null}),s),u=oe(Ro(oe(l=>{const p=es(l),{clientX:f,clientY:h}=Bc(l)?l.changedTouches[0]:l;a||(a=yi()),i.push({x:f,y:h,id:r.getId(p),timeOffset:yi()-a}),c(typeof DragEvent<"u"&&l instanceof DragEvent?V.Drag:l instanceof MouseEvent?V.MouseMove:V.TouchMove)}),o,{trailing:!1})),d=[Fe("mousemove",u,n),Fe("touchmove",u,n),Fe("drag",u,n)];return oe(()=>{d.forEach(l=>l())})}function fN({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){if(i.mouseInteraction===!1)return()=>{};const a=i.mouseInteraction===!0||i.mouseInteraction===void 0?{}:i.mouseInteraction,c=[];let u=null;const d=l=>p=>{const f=es(p);if(je(f,r,o,s,!0))return;let h=null,m=l;if("pointerType"in p){switch(p.pointerType){case"mouse":h=Dt.Mouse;break;case"touch":h=Dt.Touch;break;case"pen":h=Dt.Pen;break}h===Dt.Touch?Le[l]===Le.MouseDown?m="TouchStart":Le[l]===Le.MouseUp&&(m="TouchEnd"):Dt.Pen}else Bc(p)&&(h=Dt.Touch);h!==null?(u=h,(m.startsWith("Touch")&&h===Dt.Touch||m.startsWith("Mouse")&&h===Dt.Mouse)&&(h=null)):Le[l]===Le.Click&&(h=u,u=null);const _=Bc(p)?p.changedTouches[0]:p;if(!_)return;const y=n.getId(f),{clientX:S,clientY:I}=_;oe(e)({type:Le[m],id:y,x:S,y:I,...h!==null&&{pointerType:h}})};return Object.keys(Le).filter(l=>Number.isNaN(Number(l))&&!l.endsWith("_Departed")&&a[l]!==!1).forEach(l=>{let p=Fr(l);const f=d(l);if(window.PointerEvent)switch(Le[l]){case Le.MouseDown:case Le.MouseUp:p=p.replace("mouse","pointer");break;case Le.TouchStart:case Le.TouchEnd:return}c.push(Fe(p,f,t))}),oe(()=>{c.forEach(l=>l())})}function u_({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){const a=oe(Ro(oe(c=>{const u=es(c);if(!u||je(u,r,o,s,!0))return;const d=n.getId(u);if(u===t&&t.defaultView){const l=Qg(t.defaultView);e({id:d,x:l.left,y:l.top})}else e({id:d,x:u.scrollLeft,y:u.scrollTop})}),i.scroll||100));return Fe("scroll",a,t)}function pN({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const o=oe(Ro(oe(()=>{const s=Zg(),i=e_();(n!==s||r!==i)&&(e({width:Number(i),height:Number(s)}),n=s,r=i)}),200));return Fe("resize",o,t)}const hN=["INPUT","TEXTAREA","SELECT"],xf=new WeakMap;function mN({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,ignoreClass:i,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:d,userTr
496iggeredOnInput:l,maskTextClass:p,unmaskTextClass:f,maskTextSelector:h,unmaskTextSelector:m}){function _(E){let L=es(E);const N=E.isTrusted,v=L&&Fc(L.tagName);if(v==="OPTION"&&(L=L.parentElement),!L||!v||hN.indexOf(v)<0||je(L,r,o,s,!0))return;const P=L;if(P.classList.contains(i)||a&&P.matches(a))return;const M=Ju(L);let O=gi(P,v,M),q=!1;const Q=la({maskInputOptions:c,tagName:v,type:M}),J=$r(L,p,h,f,m,Q);(M==="radio"||M==="checkbox")&&(q=L.checked),O=wo({isMasked:J,element:L,value:O,maskInputFn:u}),y(L,l?{text:O,isChecked:q,userTriggered:N}:{text:O,isChecked:q});const U=L.name;M==="radio"&&U&&q&&t.querySelectorAll(`input[type="radio"][name="${U}"]`).forEach(x=>{if(x!==L){const H=wo({isMasked:J,element:x,value:gi(x,v,M),maskInputFn:u});y(x,l?{text:H,isChecked:!q,userTriggered:!1}:{text:H,isChecked:!q})}})}function y(E,L){const N=xf.get(E);if(!N||N.text!==L.text||N.isChecked!==L.isChecked){xf.set(E,L);const v=n.getId(E);oe(e)({...L,id:v})}}const I=(d.input==="last"?["change"]:["input","change"]).map(E=>Fe(E,oe(_),t)),b=t.defaultView;if(!b)return()=>{I.forEach(E=>E())};const T=b.Object.getOwnPropertyDescriptor(b.HTMLInputElement.prototype,"value"),C=[[b.HTMLInputElement.prototype,"value"],[b.HTMLInputElement.prototype,"checked"],[b.HTMLSelectElement.prototype,"value"],[b.HTMLTextAreaElement.prototype,"value"],[b.HTMLSelectElement.prototype,"selectedIndex"],[b.HTMLOptionElement.prototype,"selected"]];return T&&T.set&&I.push(...C.map(E=>Xg(E[0],E[1],{set(){oe(_)({target:this,isTrusted:!1})}},!1,b))),oe(()=>{I.forEach(E=>E())})}function Si(e){const t=[];function n(r,o){if(Ts("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Ts("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Ts("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Ts("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const i=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(i)}else if(r.parentStyleSheet){const i=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(i)}return o}return n(e,t)}function Jt(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function gN({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:oe((d,l,p)=>{const[f,h]=p,{id:m,styleId:_}=Jt(l,t,n.styleMirror);return(m&&m!==-1||_&&_!==-1)&&e({id:m,styleId:_,adds:[{rule:f,index:h}]}),d.apply(l,p)})});const s=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:oe((d,l,p)=>{const[f]=p,{id:h,styleId:m}=Jt(l,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,removes:[{index:f}]}),d.apply(l,p)})});let i;r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:oe((d,l,p)=>{const[f]=p,{id:h,styleId:m}=Jt(l,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,replace:f}),d.apply(l,p)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:oe((d,l,p)=>{const[f]=p,{id:h,styleId:m}=Jt(l,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,replaceSync:f}),d.apply(l,p)})}));const c={};Is("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Is("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Is("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Is("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(c).forEach(([d,l])=>{u[d]={insertRule:l.prototype.insertRule,deleteRule:l.prototype.deleteRule},l.prototype.insertRule=new Proxy(u[d].insertRule,{apply:oe((p,f,h)=>{const[m,_]=h,{id:y,styleId:S}=Jt(f.parentStyleSheet,t,n.styleMirror);return(y&&y!==-1||S&&S!==-1)&&e({id:y,styleId:S,adds:[{rule:m,index:[...Si(f),_||0]}]}),p.apply(f,h)})}),l.prototype.deleteRule=new Proxy(u[d].deleteRule,{apply:oe((p,f,h)=>{const[m]=h,{id:_,styleId:y}=Jt(f.parentStyleSheet,t,n.styleMirror);return(_&&_!==-1||y&&y!==-1)&&e({id:_,styleId:y,removes:[{index:[...Si(f),m]}]}),p.apply(f,h)})})}),oe(()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=s,i&&(r.CSSStyleSheet.prototype.replace=i),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEac
496h(([d,l])=>{l.prototype.insertRule=u[d].insertRule,l.prototype.deleteRule=u[d].deleteRule})})}function l_({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const o=n.nodeName==="#document"?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,s=o?.prototype?Object.getOwnPropertyDescriptor(o?.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!o||!s?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){return s.get?.call(this)},set(i){const a=s.set?.call(this,i);if(r!==null&&r!==-1)try{t.adoptStyleSheets(i,r)}catch{}return a}}),oe(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})}))}function _N({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const s=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:oe((a,c,u)=>{const[d,l,p]=u;if(n.has(d))return s.apply(c,[d,l,p]);const{id:f,styleId:h}=Jt(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(f&&f!==-1||h&&h!==-1)&&e({id:f,styleId:h,set:{property:d,value:l,priority:p},index:Si(c.parentRule)}),a.apply(c,u)})});const i=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:oe((a,c,u)=>{const[d]=u;if(n.has(d))return i.apply(c,[d]);const{id:l,styleId:p}=Jt(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(l&&l!==-1||p&&p!==-1)&&e({id:l,styleId:p,remove:{property:d},index:Si(c.parentRule)}),a.apply(c,u)})}),oe(()=>{o.CSSStyleDeclaration.prototype.setProperty=s,o.CSSStyleDeclaration.prototype.removeProperty=i})}function yN({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:o,sampling:s,doc:i}){const a=oe(u=>Ro(oe(d=>{const l=es(d);if(!l||je(l,t,n,r,!0))return;const{currentTime:p,volume:f,muted:h,playbackRate:m}=l;e({type:u,id:o.getId(l),currentTime:p,volume:f,muted:h,playbackRate:m})}),s.media||500)),c=[Fe("play",a(ur.Play),i),Fe("pause",a(ur.Pause),i),Fe("seeked",a(ur.Seeked),i),Fe("volumechange",a(ur.VolumeChange),i),Fe("ratechange",a(ur.RateChange),i)];return oe(()=>{c.forEach(u=>u())})}function SN({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,s=n.FontFace;n.FontFace=function(c,u,d){const l=new s(c,u,d);return o.set(l,{family:c,buffer:typeof u!="string",descriptors:d,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),l};const i=Xu(t.fonts,"add",function(a){return function(c){return fa(oe(()=>{const u=o.get(c);u&&(e(u),o.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=s}),r.push(i),oe(()=>{r.forEach(a=>a())})}function bN(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,selectionCb:i}=e;let a=!0;const c=oe(()=>{const u=t.getSelection();if(!u||a&&u?.isCollapsed)return;a=u.isCollapsed||!1;const d=[],l=u.rangeCount||0;for(let p=0;p<l;p++){const f=u.getRangeAt(p),{startContainer:h,startOffset:m,endContainer:_,endOffset:y}=f;je(h,r,o,s,!0)||je(_,r,o,s,!0)||d.push({start:n.getId(h),startOffset:m,end:n.getId(_),endOffset:y})}i({ranges:d})});return c(),Fe("selectionchange",c)}function vN({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:Xu(n.customElements,"define",function(o){return function(s,i,a){try{t({define:{name:s}})}catch{}return o.apply(this,[s,i,a])}})}function EN(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=c_(e,e.doc));const o=dN(e),s=fN(e),i=u_(e),a=pN(e,{win:n}),c=mN(e),u=yN(e);let d=()=>{},l=()=>{},p=()=>{},f=()=>{};e.recordDOM&&(d=gN(e,{win:n}),l=l_(e,e.doc),p=_N(e,{win:n}),e.collectFonts&&(f=SN(e)));const h=bN(e),m=vN(e),_=[];for(const y of e.plugins)_.push(y.observer(y.callback,n,y.options));return oe(()=>{hr.forEach(y=>y.reset()),r?.disconnect(),o(),s(),i(),a(),c(),u(),d(),l(),p(),f(),h(),m(),_.forEach(y=>y())})}function Ts(e){return typeof window[e]<"u"}function Is(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Wc{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,o){const s=r||this.getIdToRemoteIdMap(t),i=o||this.getRemoteIdToIdMap(t);let a=s.get(n);return a||(a=this.generateIdFn(),s.set(n,a),i.set(a,n)),a}getIds(t,n){const r=this.getIdToRemoteIdMap(t),o=this.getRemoteIdToIdMap(t);return n.map(s=>this.getId(t,s,r,o))}getRemoteId(t,n,r){const o=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const s=o.get(n);return s||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(o=>this.getRemoteId(t,o,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}
496class TN{constructor(){this.crossOriginIframeMirror=new Wc(Ku),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class IN{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Wc(Ku),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Wc(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);const n=Ao(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&&Ao(t)?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(t);const r=Zu(t);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const o=this.crossOriginIframeMap.get(t.source);if(!o)return;const s=this.transformCrossOriginEvent(o,n.data.event);s&&this.wrappedEmit(s,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case ee.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:ee.IncrementalSnapshot,data:{source:V.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case ee.Meta:case ee.Load:case ee.DomContentLoaded:return!1;case ee.Plugin:return n;case ee.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case ee.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);const o=this.crossOriginIframeRootIdMap.get(t);o&&this.patchRootIdOnNode(r.node,o)}),n.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case 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,o){for(const s of o)!Array.isArray(n[s])&&typeof n[s]!="number"||(Array.isArray(n[s])?n[s]=t.getIds(r,n[s]):n[s]=t.getId(r,n[s]));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!==we.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class wN{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class kN{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(!ho(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=c_({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(u_({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),fa(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(l_({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=Zu(t),r=Ao(t);if(!n||!r)return;let o;try{o=r.Element}catch{return}o&&this.patchAttachShadow(o,n)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(Xu(t.prototype,"attachShadow",function(o){return function(s){const i=o.call(this,s);return this.shadowRoot&&i_(this)&&r.addShadowRoot(this.shadowRoot,n),i}}))}
496reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class RN{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new Z1,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;const r={id:n,styleIds:[]},o=[];for(const s of t){let i;this.styleMirror.has(s)?i=this.styleMirror.getId(s):(i=this.styleMirror.add(s),o.push({styleId:i,rules:Array.from(s.rules||CSSRule,(a,c)=>({rule:jg(a),index:c}))})),r.styleIds.push(i)}o.length>0&&(r.styles=o),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class AN{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(o=>o!==n)}add(t,n){this.active||(this.active=!0,nN(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let Te,bi;try{if(Array.from([1],e=>e*2)[0]!==2){const 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)}const lt=w1();function rt(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:s=null,unblockSelector:i=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:d="rr-mask",unmaskTextClass:l=null,maskTextSelector:p=null,unmaskTextSelector:f=null,inlineStylesheet:h=!0,maskAllInputs:m,maskInputOptions:_,slimDOMOptions:y,maskAttributeFn:S,maskInputFn:I,maskTextFn:b,maxCanvasSize:T=null,packFn:C,sampling:E={},dataURLOptions:L={},mousemoveWait:N,recordDOM:v=!0,recordCanvas:P=!1,recordCrossOriginIframes:M=!1,recordAfter:O=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:q=!1,collectFonts:Q=!1,inlineImages:J=!1,plugins:U,keepIframeSrcFn:x=()=>!1,ignoreCSSAttributes:H=new Set([]),errorHandler:D,onMutation:Z,getCanvasManager:se}=e;oN(D);const ne=M?window.parent===window:!0;let ie=!1;if(!ne)try{window.parent.document&&(ie=!1)}catch{ie=!0}if(ne&&!t)throw new Error("emit function is required");if(!ne&&!ie)return()=>{};N!==void 0&&E.mousemove===void 0&&(E.mousemove=N),lt.reset();const Xe=m===!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}:_!==void 0?_:{},ct=y===!0||y==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:y==="all",headMetaDescKeywords:y==="all"}:y||{};Q1();let xt,ut=0;const Tn=F=>{for(const ae of U||[])ae.eventProcessor&&(F=ae.eventProcessor(F));return C&&!ie&&(F=C(F)),F};Te=(F,ae)=>{const X=F;if(X.timestamp=yi(),hr[0]?.isFrozen()&&X.type!==ee.FullSnapshot&&!(X.type===ee.IncrementalSnapshot&&X.data.source===V.Mutation)&&hr.forEach(ce=>ce.unfreeze()),ne)t?.(Tn(X),ae);else if(ie){const ce={type:"rrweb",event:Tn(X),origin:window.location.origin,isCheckout:ae};window.parent.postMessage(ce,"*")}if(X.type===ee.FullSnapshot)xt=X,ut=0;else if(X.type===ee.IncrementalSnapshot){if(X.data.source===V.Mutation&&X.data.isAttachIframe)return;ut++;const ce=r&&ut>=r,K=n&&xt&&X.timestamp-xt.timestamp>n;(ce||K)&&wn(!0)}};const Ot=F=>{Te({type:ee.IncrementalSnapshot,data:{source:V.Mutation,...F}})},us=F=>Te({type:ee.IncrementalSnapshot,data:{source:V.Scroll,...F}}),Pt=F=>Te({type:ee.IncrementalSnapshot,data:{source:V.CanvasMutation,...F}}),Qe=F=>Te({type:ee.IncrementalSnapshot,data:{source:V.AdoptedStyleSheet,...F}}),Be=new RN({mutationCb:Ot,adoptedStyleSheetCb:Qe}),We=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new TN:new IN({mirror:lt,mutationCb:Ot,stylesheetManager:Be,recordCrossOriginIframes:M,wrappedEmit:Te});for(const F of U||[])F.getMirror&&F.getMirror({nodeMirror:lt,crossOriginIframeMirror:We.crossOriginIframeMirror,crossOriginIframeStyleMirror:We.crossOriginIframeStyleMirror});const tr=new AN,nr=NN(se,{mirror:lt,win:window,mutationCb:F=>Te({type:ee.IncrementalSnapshot,data:{source:V.CanvasMutation,...F}}),recordCanvas:P,blockClass:o,blockSelector:s,unblockSelector:i,maxCanvasSize:T,sampling:E.canvas,dataURLOptions:L,errorHandler:D}),In=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new wN:new kN({mutationCb:Ot,scrollCb:us,bypassOptions:{onMutation:Z,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:p,unmaskTextSelector:f,inlineStylesheet:h,maskInputOptions:Xe,dataURLOptions:L,maskAttributeFn:S,maskTextFn:b,maskInputFn:I,recordCanvas:P,inlineImages:J,sampling:E,slimDOMOptions:ct,iframeManager:We,
496stylesheetManager:Be,canvasManager:nr,keepIframeSrcFn:x,processedNodeManager:tr,ignoreCSSAttributes:H},mirror:lt}),wn=(F=!1)=>{if(!v)return;Te({type:ee.Meta,data:{href:window.location.href,width:e_(),height:Zg()}},F),Be.reset(),In.init(),hr.forEach(X=>X.lock());const ae=K1(document,{mirror:lt,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:p,unmaskTextSelector:f,inlineStylesheet:h,maskAllInputs:Xe,maskAttributeFn:S,maskInputFn:I,maskTextFn:b,slimDOM:ct,dataURLOptions:L,recordCanvas:P,inlineImages:J,onSerialize:X=>{r_(X,lt)&&We.addIframe(X),o_(X,lt)&&Be.trackLinkElement(X),Uc(X)&&In.addShadowRoot(X.shadowRoot,document)},onIframeLoad:(X,ce)=>{We.attachIframe(X,ce);const K=Ao(X);K&&nr.addWindow(K),In.observeAttachShadow(X)},onStylesheetLoad:(X,ce)=>{Be.attachLinkElement(X,ce)},onBlockedImageLoad:(X,ce,{width:K,height:_t})=>{Ot({adds:[],removes:[],texts:[],attributes:[{id:ce.id,attributes:{style:{width:`${K}px`,height:`${_t}px`}}}]})},keepIframeSrcFn:x,ignoreCSSAttributes:H});if(!ae)return console.warn("Failed to snapshot the document");Te({type:ee.FullSnapshot,data:{node:ae,initialOffset:Qg(window)}}),hr.forEach(X=>X.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Be.adoptStyleSheets(document.adoptedStyleSheets,lt.getId(document))};bi=wn;try{const F=[],ae=ce=>oe(EN)({onMutation:Z,mutationCb:Ot,mousemoveCb:(K,_t)=>Te({type:ee.IncrementalSnapshot,data:{source:_t,positions:K}}),mouseInteractionCb:K=>Te({type:ee.IncrementalSnapshot,data:{source:V.MouseInteraction,...K}}),scrollCb:us,viewportResizeCb:K=>Te({type:ee.IncrementalSnapshot,data:{source:V.ViewportResize,...K}}),inputCb:K=>Te({type:ee.IncrementalSnapshot,data:{source:V.Input,...K}}),mediaInteractionCb:K=>Te({type:ee.IncrementalSnapshot,data:{source:V.MediaInteraction,...K}}),styleSheetRuleCb:K=>Te({type:ee.IncrementalSnapshot,data:{source:V.StyleSheetRule,...K}}),styleDeclarationCb:K=>Te({type:ee.IncrementalSnapshot,data:{source:V.StyleDeclaration,...K}}),canvasMutationCb:Pt,fontCb:K=>Te({type:ee.IncrementalSnapshot,data:{source:V.Font,...K}}),selectionCb:K=>{Te({type:ee.IncrementalSnapshot,data:{source:V.Selection,...K}})},customElementCb:K=>{Te({type:ee.IncrementalSnapshot,data:{source:V.CustomElement,...K}})},blockClass:o,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:p,unmaskTextSelector:f,maskInputOptions:Xe,inlineStylesheet:h,sampling:E,recordDOM:v,recordCanvas:P,inlineImages:J,userTriggeredOnInput:q,collectFonts:Q,doc:ce,maskAttributeFn:S,maskInputFn:I,maskTextFn:b,keepIframeSrcFn:x,blockSelector:s,unblockSelector:i,slimDOMOptions:ct,dataURLOptions:L,mirror:lt,iframeManager:We,stylesheetManager:Be,shadowDomManager:In,processedNodeManager:tr,canvasManager:nr,ignoreCSSAttributes:H,plugins:U?.filter(K=>K.observer)?.map(K=>({observer:K.observer,options:K.options,callback:_t=>Te({type:ee.Plugin,data:{plugin:K.name,payload:_t}})}))||[]},{});We.addLoadListener(ce=>{try{F.push(ae(ce.contentDocument))}catch(K){console.warn(K)}});const X=()=>{wn(),F.push(ae(document))};return document.readyState==="interactive"||document.readyState==="complete"?X():(F.push(Fe("DOMContentLoaded",()=>{Te({type:ee.DomContentLoaded,data:{}}),O==="DOMContentLoaded"&&X()})),F.push(Fe("load",()=>{Te({type:ee.Load,data:{}}),O==="load"&&X()},window))),()=>{F.forEach(ce=>ce()),tr.destroy(),bi=void 0,sN()}}catch(F){console.warn(F)}}function CN(e){if(!bi)throw new Error("please take full snapshot after start recording");bi(e)}rt.mirror=lt;rt.takeFullSnapshot=CN;function NN(e,t){try{return e?e(t):new Rf}catch{return console.warn("Unable to initialize CanvasManager"),new Rf}}var Of;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Of||(Of={}));const MN=3,xN=5;function el(e){return e>9999999999?e:e*1e3}function Xa(e){return e>9999999999?e/1e3:e}function ts(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>
496(e.throttledAddEvent({type:ee.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:ke(t,10,1e3)}}),t.category==="console")))}const ON="button,a";function d_(e){return e.closest(ON)||e}function f_(e){const t=p_(e);return!t||!(t instanceof Element)?t:d_(t)}function p_(e){return PN(e)?e.target:e}function PN(e){return xe(e)&&"target"in e}let Kt;function LN(e){return Kt||(Kt=[],DN()),Kt.push(e),()=>{const t=Kt?Kt.indexOf(e):-1;t>-1&&Kt.splice(t,1)}}function DN(){Oe(ge,"open",function(e){return function(...t){if(Kt)try{Kt.forEach(n=>n())}catch{}return e.apply(ge,t)}})}const FN=new Set([V.Mutation,V.StyleSheetRule,V.StyleDeclaration,V.AdoptedStyleSheet,V.CanvasMutation,V.Selection,V.MediaInteraction]);function $N(e,t,n){e.handleClick(t,n)}class BN{constructor(t,n,r=ts){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(){const t=LN(()=>{this._lastMutation=Pf()});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(HN(n,this._ignoreSelector)||!WN(t))return;const r={timestamp:Xa(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(o=>o.node===r.node&&Math.abs(o.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=Xa(t)}registerScroll(t=Date.now()){this._lastScroll=Xa(t)}registerClick(t){const n=d_(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=Pf();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(const r of t){const o=this._clicks.indexOf(r);o>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(o,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,o=t.mutationAfter&&t.mutationAfter<=this._threshold,s=!r&&!o,{clickCount:i,clickBreadcrumb:a}=t;if(s){const c=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=c<this._timeout*1e3?"mutation":"timeout",d={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:ge.location.href,route:n.getCurrentRoute(),timeAfterClickMs:c,endReason:u,clickCount:i||1}};this._addBreadcrumbEvent(n,d);return}if(i>1){const c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:ge.location.href,route:n.getCurrentRoute(),clickCount:i,metric:!0}};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=Zo(()=>this._checkClicks(),1e3)}}const UN=["A","BUTTON","INPUT"];function HN(e,t){return!!(!UN.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 WN(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function Pf(){return Date.now()/1e3}function jN(e,t){try{if(!zN(t))return;const{source:n}=t.data;if(FN.has(n)&&e.registerMutation(t.timestamp),n===V.Scroll&&e.registerScroll(t.timestamp),qN(t)){const{type:r,id:o}=t.data,s=rt.mirror.getNode(o);s instanceof HTMLElement&&r===Le.Click&&e.registerClick(s)}}catch{}}function zN(e){return e.type===MN}function qN(e){return e.data.source===V.MouseInteraction}function St(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var pa=(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))(pa||{});const h_=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]),GN=new Set([...h_,"data-sentry-element"]);function VN(e){const t={};for(const n in e)if(h_.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return!t["data-sentry-component"]&&e["data-sentry-element"]&&(t["data-sentry-component"]=e["data-sentry-element"]),t}const YN=e=>t=>{if(!e.isEnabled())return;const n=JN(t);if(!n)return;const r=t.name==="click",o=r?t.event:void 0;
496r&&e.clickDetector&&o?.target&&!o.altKey&&!o.metaKey&&!o.ctrlKey&&!o.shiftKey&&$N(e.clickDetector,n,f_(t.event)),ts(e,n)};function m_(e,t){const n=rt.mirror.getId(e),r=n&&rt.mirror.getNode(n),o=r&&rt.mirror.getMeta(r),s=o&&XN(o)?o:null;return{message:t,data:s?{nodeId:n,node:{id:n,tagName:s.tagName,textContent:Array.from(s.childNodes).map(i=>i.type===pa.Text&&i.textContent).filter(Boolean).map(i=>i.trim()).join(""),attributes:VN(s.attributes)}}:{}}}function JN(e){const{target:t,message:n}=KN(e);return St({category:`ui.${e.name}`,...m_(t,n)})}function KN(e){const t=e.name==="click";let n,r=null;try{r=t?f_(e.event):p_(e.event),n=Me(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function XN(e){return e.type===pa.Element}function QN(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=ZN(t);n&&ts(e,n)}function ZN(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s,target:i}=e;if(!i||eM(i)||!s)return null;const a=t||r||o,c=s.length===1;if(!a&&c)return null;const u=Me(i,{maxStringLength:200})||"<unknown>",d=m_(i,u);return St({category:"ui.keyDown",message:u,data:{...d.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s}})}function eM(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const tM={resource:iM,paint:oM,navigation:sM};function Qa(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}function nM(e){return e.map(rM).filter(Boolean)}function rM(e){const t=tM[e.entryType];return t?t(e):null}function Br(e){return((Ie()||ge.performance.timeOrigin)+e)/1e3}function oM(e){const{duration:t,entryType:n,name:r,startTime:o}=e,s=Br(o);return{type:n,name:r,start:s,end:s+t,data:void 0}}function sM(e){const{entryType:t,name:n,decodedBodySize:r,duration:o,domComplete:s,encodedBodySize:i,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:d,loadEventEnd:l,redirectCount:p,startTime:f,transferSize:h,type:m}=e;return o===0?null:{type:`${t}.${m}`,start:Br(f),end:Br(s),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:i,duration:o,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:d,loadEventEnd:l,domComplete:s,redirectCount:p}}}function iM(e){const{entryType:t,initiatorType:n,name:r,responseEnd:o,startTime:s,decodedBodySize:i,encodedBodySize:a,responseStatus:c,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:Br(s),end:Br(o),name:r,data:{size:u,statusCode:c,decodedBodySize:i,encodedBodySize:a}}}function aM(e){const t=e.entries[e.entries.length-1],n=t?.element?[t.element]:void 0;return tl(e,"largest-contentful-paint",n)}function cM(e){return e.sources!==void 0}function uM(e){const t=[],n=[];for(const r of e.entries)if(cM(r)){const o=[];for(const s of r.sources)if(s.node){n.push(s.node);const i=rt.mirror.getId(s.node);i&&o.push(i)}t.push({value:r.value,nodeIds:o.length?o:void 0})}return tl(e,"cumulative-layout-shift",n,t)}function lM(e){const t=e.entries[e.entries.length-1],n=t?.target?[t.target]:void 0;return tl(e,"interaction-to-next-paint",n)}function tl(e,t,n,r){const o=e.value,s=e.rating,i=Br(o);return{type:"web-vital",name:t,start:i,end:i,data:{value:o,size:o,rating:s,nodeIds:n?n.map(a=>rt.mirror.getId(a)):void 0,attributions:r}}}function dM(e){function t(o){e.performanceEntries.includes(o)||e.performanceEntries.push(o)}function n({entries:o}){o.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(o=>{r.push(pn(o,n))}),r.push(ra(Qa(aM,e)),na(Qa(uM,e)),Uu(Qa(lM,e))),()=>{r.forEach(o=>o())}}const j=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,fM='
vendor: 10,329 bytes, line 496
496var 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});
496';function pM(){const e=new Blob([fM],{type:"text/javascript"});return URL.createObjectURL(e)}const Lf=["log","warn","error"],Ws="[Replay] ";function Za(e,t="info"){kt({category:"console",data:{logger:"replay"},level:t,message:`${Ws}${e}`},{level:t})}function hM(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return j?(Lf.forEach(r=>{n[r]=(...o)=>{g[r](Ws,...o),t&&Za(o.join(""),oi(r))}}),n.exception=(r,...o)=>{o.length&&n.error&&n.error(...o),g.error(Ws,r),e?mt(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&Za(r,"error")},n.infoTick=(...r)=>{g.log(Ws,...r),t&&setTimeout(()=>Za(r[0]),0)}):Lf.forEach(r=>{n[r]=()=>{}}),n}const z=hM();class nl extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Yu}.`)}}class g_ extends Error{constructor(){super("Worker destroyed")}}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){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>Yu)throw new nl;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let t=null;for(const{timestamp:n}of this.events)(t===null||n<t)&&(t=n);return t===null?t:el(t)}}class mM{constructor(t){this._onMessage=({data:n})=>{const r=n;if(typeof r.id!="number")return;const o=this._pending.get(r.id);if(!(!o||o.method!==r.method)){if(this._pending.delete(r.id),!r.success){j&&z.error("Error in compression worker: ",r.response),o.reject(new Error("Error in compression worker"));return}o.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&&z.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&&z.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&&z.log("Destroying compression worker"),this._worker.removeEventListener("message",this._onMessage),this._pending.forEach(t=>t.reject(new g_)),this._pending.clear(),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((o,s)=>{this._pending.set(r,{method:t,resolve:o,reject:s});try{this._worker.postMessage({id:r,method:t,arg:n})}catch(i){this._pending.delete(r),s(i)}})}_getAndIncrementId(){return this._id++}}class gM{constructor(t){this._worker=new mM(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){const n=el(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>Yu?Promise.reject(new nl):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&&z.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class _M{constructor(t){this._fallback=new __,this._compression=new gM(t),this._used=this._fallback,this._ensureWorkerIsLoadedProm
496ise=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&&z.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n,waitForCheckout:r}=this._fallback,o=[];for(const s of t)o.push(this._compression.addEvent(s));this._compression.hasCheckout=n,this._compression.waitForCheckout=r,this._used=this._compression;try{await Promise.all(o),this._fallback.clear()}catch(s){if(s instanceof g_)return;j&&z.exception(s,"Failed to add events when switching buffers.")}}}function yM({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=SM(t);if(n)return n}return j&&z.log("Using simple buffer"),new __}function SM(e){try{const t=e||bM();if(!t)return;j&&z.log(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new _M(n)}catch(t){j&&z.exception(t,"Failed to create compression worker")}}function bM(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?pM():""}function rl(){try{return"sessionStorage"in ge&&!!ge.sessionStorage}catch{return!1}}function vM(e){EM(),e.session=void 0}function EM(){if(rl())try{ge.sessionStorage.removeItem(Gu)}catch{}}function y_(e){return e===void 0?!1:Math.random()<e}function ha(e){if(rl())try{ge.sessionStorage.setItem(Gu,JSON.stringify(e))}catch{}}function S_(e){const t=Date.now(),n=e.id||Ce(),r=e.started||t,o=e.lastActivity||t,s=e.segmentId||0,i=e.sampled,a=e.previousSessionId,c=e.dirty||!1;return{id:n,started:r,lastActivity:o,segmentId:s,sampled:i,previousSessionId:a,dirty:c}}function TM(e,t){return y_(e)?"session":t?"buffer":!1}function Df({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const o=TM(e,t),s=S_({sampled:o,previousSessionId:r});return n&&ha(s),s}function IM(){if(!rl())return null;try{const e=ge.sessionStorage.getItem(Gu);if(!e)return null;const t=JSON.parse(e);return j&&z.infoTick("Loading existing session"),S_(t)}catch{return null}}function jc(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function wM(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return jc(e.started,t,r)||jc(e.lastActivity,n,r)}function vi(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!wM(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function ec({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const o=r.stickySession&&IM();return o?vi(o,{sessionIdleExpire:e,maxReplayDuration:t})?(j&&z.infoTick("Session in sessionStorage is expired, creating new one..."),Df(r,{previousSessionId:o.id})):o:(j&&z.infoTick("Creating new session"),Df(r,{previousSessionId:n}))}function kM(e){return e.type===ee.Custom}function ol(e,t,n){return v_(e,t)?(b_(e,t,n),!0):!1}function RM(e,t,n){return v_(e,t)?b_(e,t,n):Promise.resolve(null)}async function b_(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const o=e.recordingMode==="buffer";try{n&&o&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const s=e.getOptions(),i=AM(t,s.beforeAddRecordingEvent);return i?await r.addEvent(i):void 0}catch(s){if(!e.isEnabled())return e.handleException(s),null;const i=s&&s instanceof nl,a=i?"eventBufferOverflow":"eventBufferError",c=R();if(c){const u=i?"buffer_overflow":"internal_sdk_error";c.recordDroppedEvent(u,"replay")}if(i&&o)return r.clear(),r.waitForCheckout=!0,null;e.handleException(s),await e.stop({reason:a})}}
496function v_(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=el(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(j&&z.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function AM(e,t){try{if(typeof t=="function"&&kM(e))return t(e)}catch(n){return j&&z.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}const Ff=100;function E_(e,t,n){const r=e.getContext();t&&r.traceIds.size<Ff&&r.traceIds.add(t),n&&r.segmentNames.size<Ff&&r.segmentNames.add(n)}function CM(e){return t=>{e.isEnabled()&&E_(e,t.trace_id,t.name||void 0)}}function sl(e){return!e.type}function zc(e){return e.type==="transaction"}function NM(e){return e.type==="replay_event"}function $f(e){return e.type==="feedback"}function MM(e){return(t,n)=>{if(!e.isEnabled()||!sl(t)&&!zc(t))return;const r=n.statusCode;if(!(!r||r<200||r>=300)){if(zc(t)){xM(e,t);return}OM(e,t)}}}function xM(e,t){E_(e,t.contexts?.trace?.trace_id,t.transaction)}function OM(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags?.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||Zo(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(o){e.handleException(o)}})}function PM(e){return t=>{!e.isEnabled()||!sl(t)||LM(e,t)}}function LM(e,t){const 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))){const r=St({category:"replay.hydrate-error",data:{url:fn()}});ts(e,r)}}function DM(e){const t=R();t&&t.on("beforeAddBreadcrumb",n=>FM(e,n))}function FM(e,t){if(!e.isEnabled()||!T_(t))return;const n=$M(t);n&&ts(e,n)}function $M(e){return!T_(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?BM(e):St(e)}function BM(e){const t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return St(e);let n=!1;const r=t.map(o=>{if(!o)return o;if(typeof o=="string")return o.length>vs?(n=!0,`${o.slice(0,vs)}…`):o;if(typeof o=="object")try{const s=ke(o,7);return JSON.stringify(s).length>vs?(n=!0,`${JSON.stringify(s,null,2).slice(0,vs)}…`):s}catch{}return o});return St({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function T_(e){return!!e.category}function UM(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function Ei(){const e=W().getPropagationContext().dsc;e&&delete e.replay_id;const t=Ee();if(t){const n=gt(t);delete n.replay_id}}function Bf(e){const t=W().getPropagationContext().dsc;t&&(t.replay_id=e);const n=Ee();if(n){const r=gt(n);r.replay_id=e}}function HM(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:ee.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 WM(e,t){return e.recordingMode!=="buffer"||t.message===Vu||!t.exception||t.type?!1:y_(e.getOptions().errorSampleRate)}function jM(e){return Object.assign((t,n)=>{if(e.session&&vi(e.session,{maxReplayDuration:e.getOptions().maxReplayDuration,sessionIdleExpire:e.timeouts.sessionIdleExpire})&&Ei(),!e.isEnabled()||e.isPaused())return t;if(NM(t))return delete t.breadcrumbs,t;if(!sl(t)&&!zc(t)&&!$f(t))return t;if(!e.checkAndHandleExpiredSession())return Ei(),t;if($f(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),HM(e,t),t;if(UM(t,n)&&!e.getOptions()._experiments.captureExceptions)return j&&z.log("Ignoring error from rrweb internals",t),null;const o=WM(e,t);if((o||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),o&&e.recordingMode==="buffer"&&e.session?.sampled==="buffer"){const i=e.session;i.dirty=!0,e.getOptions().stickySession&&ha(i)}return t},{id:"Replay"})}function ma(e,t){return t.map(({type:n,start:r,end:o,name:s,data:i})=>{const a=e.throttledAddEvent({type:ee.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:s,startTimestamp:r,endTimestamp:o,data:i}}});
496return typeof a=="string"?Promise.resolve(null):a})}function zM(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function qM(e){return t=>{if(!e.isEnabled())return;const n=zM(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(ma(e,[n]),!1)))}}function GM(e,t){return j&&e.getOptions()._experiments.traceInternals?!1:cm(t,R())}function I_(e,t){e.isEnabled()&&t!==null&&(GM(e,t.name)||e.addUpdate(()=>(ma(e,[t]),!0)))}function ga(e){if(!e)return;const 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){const n=Ag(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function w_(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Ti(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function k_(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:o,method:s,statusCode:i,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:o,data:{method:s,statusCode:i,request:a,response:c}}}function Co(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function on(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:o,warnings:s}=VM(n);return r.body=o,s?.length&&(r._meta={warnings:s}),r}function qc(e,t){return Object.entries(e).reduce((n,[r,o])=>{const s=r.toLowerCase();return t.includes(s)&&e[r]&&(n[s]=o),n},{})}function VM(e){if(!e||typeof e!="string")return{body:e};const t=e.length>Sf,n=YM(e);if(t){const r=e.slice(0,Sf);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function YM(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function Ii(e,t){const n=JM(e);return nt(n,t)}function JM(e,t=ge.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(ge.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function KM(e,t,n){try{const r=await QM(e,t,n),o=k_("resource.fetch",r);I_(n.replay,o)}catch(r){j&&z.exception(r,"Failed to capture fetch breadcrumb")}}function XM(e,t){const{input:n,response:r}=t,o=n?qu(n):void 0,s=ga(o),i=r?w_(r.headers.get("content-length")):void 0;s!==void 0&&(e.data.request_body_size=s),i!==void 0&&(e.data.response_body_size=i)}async function QM(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:s=r}=t,{url:i,method:a,status_code:c=0,request_body_size:u,response_body_size:d}=e.data,l=Ii(i,n.networkDetailAllowUrls)&&!Ii(i,n.networkDetailDenyUrls),p=l?ZM(n,t.input,u):Co(u),f=await ex(l,n,t.response,d);return{startTimestamp:o,endTimestamp:s,url:i,method:a,statusCode:c,request:p,response:f}}function ZM({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const o=n?rx(n,t):{};if(!e)return on(o,r,void 0);const s=qu(n),[i,a]=hi(s,z),c=on(o,r,i);return a?Ti(c,a):c}async function ex(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,o){if(!e&&o!==void 0)return Co(o);const s=r?R_(r.headers,n):{};if(!r||!t&&o!==void 0)return on(s,o,void 0);const[i,a]=await nx(r),c=tx(i,{networkCaptureBodies:t,responseBodySize:o,captureDetails:e,headers:s});return a?Ti(c,a):c}function tx(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:o}){try{const s=e?.length&&n===void 0?ga(e):n;return r?t?on(o,s,e):on(o,s,void 0):Co(s)}catch(s){return j&&z.exception(s,"Failed to serialize response body"),on(o,n,void 0)}}async function nx(e){const t=ox(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await sx(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(j&&z.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(j&&z.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function R_(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}
496function rx(e,t){return e.length===1&&typeof e[0]!="string"?Uf(e[0],t):e.length===2?Uf(e[1],t):{}}function Uf(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?R_(n,t):Array.isArray(n)?{}:qc(n,t):{}}function ox(e){try{return e.clone()}catch(t){j&&z.exception(t,"Failed to clone response body")}}function sx(e){return new Promise((t,n)=>{const r=Zo(()=>n(new Error("Timeout while trying to read response body")),500);ix(e).then(o=>t(o),o=>n(o)).finally(()=>clearTimeout(r))})}async function ix(e){return await e.text()}async function ax(e,t,n){try{const r=ux(e,t,n),o=k_("resource.xhr",r);I_(n.replay,o)}catch(r){j&&z.exception(r,"Failed to capture xhr breadcrumb")}}function cx(e,t){const{xhr:n,input:r}=t;if(!n)return;const o=ga(r),s=n.getResponseHeader("content-length")?w_(n.getResponseHeader("content-length")):fx(n.response,n.responseType);o!==void 0&&(e.data.request_body_size=o),s!==void 0&&(e.data.response_body_size=s)}function ux(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:s=r,input:i,xhr:a}=t,{url:c,method:u,status_code:d=0,request_body_size:l,response_body_size:p}=e.data;if(!c)return null;if(!a||!Ii(c,n.networkDetailAllowUrls)||Ii(c,n.networkDetailDenyUrls)){const C=Co(l),E=Co(p);return{startTimestamp:o,endTimestamp:s,url:c,method:u,statusCode:d,request:C,response:E}}const f=a[Ft],h=f?qc(f.request_headers,n.networkRequestHeaders):{},m=qc(Cg(a),n.networkResponseHeaders),[_,y]=n.networkCaptureBodies?hi(i,z):[void 0],[S,I]=n.networkCaptureBodies?lx(a):[void 0],b=on(h,l,_),T=on(m,p,S);return{startTimestamp:o,endTimestamp:s,url:c,method:u,statusCode:d,request:y?Ti(b,y):b,response:I?Ti(T,I):T}}function lx(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return dx(e.response,e.responseType)}catch(n){t.push(n)}return j&&z.warn("Failed to get xhr response body",...t),[void 0]}function dx(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&xe(e))return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return j&&z.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return j&&z.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function fx(e,t){try{const n=t==="json"&&xe(e)?JSON.stringify(e):e;return ga(n)}catch{return}}function px(e){const t=R();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:s,networkResponseHeaders:i}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:s,networkResponseHeaders:i};t&&t.on("beforeAddBreadcrumb",(c,u)=>hx(a,c,u))}catch{}}function hx(e,t,n){if(t.data)try{mx(t)&&_x(n)&&(cx(t,n),ax(t,n,e)),gx(t)&&yx(n)&&(XM(t,n),KM(t,n,e))}catch(r){j&&z.exception(r,"Error when enriching network breadcrumb")}}function mx(e){return e.category==="xhr"}function gx(e){return e.category==="fetch"}function _x(e){return e?.xhr}function yx(e){return e?.input!==void 0}function Sx(e){const t=R();Rg(YN(e)),aa(qM(e)),DM(e),px(e);const n=jM(e);cv(n),t&&(t.on("beforeSendEvent",PM(e)),t.on("afterSendEvent",MM(e)),t.on("createDsc",r=>{const o=e.getSessionId();o&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(r.replay_id=o)}),t.on("processSegmentSpan",CM(e)),t.on("spanStart",r=>{e.lastActiveSpan=r}),t.on("spanEnd",r=>{e.lastActiveSpan=r}),t.on("beforeSendFeedback",async(r,o)=>{const s=e.getSessionId();o?.includeReplay&&e.isEnabled()&&s&&r.contexts?.feedback&&(r.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),r.contexts.feedback.replay_id=s)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}async function bx(e){try{return Promise.all(ma(e,[vx(ge.performance.memory)]))}catch{return[]}}function vx(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,o=Date.now()/1e3;return{type:"memory",name:"memory",start:o,end:o,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function Ex(e,t,n){return yb(e,t,{...n,setTimeoutImpl:Zo})}const ws=B.navigator;function Tx(){return/iPhone|iPad|iPod/i.test(ws?.userAgent??"")||/Macintosh/i.test(ws?.userAgent??"")&&ws?.maxTouchPoints&&ws?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function Ix(e){let t=!1;return(n,r)=>{try{if(!e.checkAndHandleExpiredSession()){j&&z.warn("Received replay event after session expired.");return}const o=r||!t;t=!0,wx(n),e.clickDetector&&jN(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&o&&e.setInitialState(),!ol(e,n,o))return!0;
496if(!o)return!1;const s=e.session;if(Rx(e,o),e.recordingMode==="buffer"&&s&&e.eventBuffer&&!s.dirty){const i=e.eventBuffer.getEarliestTimestamp();i&&(j&&z.log(`Updating session start time to earliest event in buffer to ${new Date(i)}`),s.started=i,e.getOptions().stickySession&&ha(s))}return s?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}catch(o){e.handleException(o)}}}function wx(e){const t=e.data;if(!(e.type!==ee.IncrementalSnapshot||!t||typeof t!="object"||!("source"in t)||t.source!==V.Mutation||!("attributes"in t)||!Array.isArray(t.attributes)))for(const n of t.attributes){const r=rt.mirror.getNode(n.id),o=r&&rt.mirror.getMeta(r);if(!r||o?.type!==pa.Element)continue;const s={...o.attributes};let i=!1;for(const[a,c]of Object.entries(n.attributes))GN.has(a)&&(c===null?delete s[a]:s[a]=c,i=!0);i&&rt.mirror.add(r,{...o,attributes:s})}}function kx(e){const t=e.getOptions();return{type:ee.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 Rx(e,t){!t||e.session?.segmentId!==0||ol(e,kx(e),!1)}function Ax(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Cx(e,t,n,r){return it(bh(e,Fo(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function Nx({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)} 497`;if(typeof e=="string")n=`${r}${e}`;else{const s=new TextEncoder().encode(r);n=new Uint8Array(s.length+e.length),n.set(s),n.set(e,s.length)}return n}async function Mx({client:e,scope:t,replayId:n,event:r}){const o=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,s={event_id:n,integrations:o};e.emit("preprocessEvent",r,s);const i=await Ph(e.getOptions(),r,s,t,e,Se());if(!i)return null;e.emit("postprocessEvent",i,s),i.platform=i.platform||"javascript";const a=e.getSdkMetadata(),{name:c,version:u,settings:d}=a?.sdk||{};return i.sdk={...i.sdk,name:c||"sentry.javascript.unknown",version:u||"0.0.0",settings:d},i}async function xx({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:o,session:s}){const i=Nx({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,segmentNames:d,initialTimestamp:l}=r,p=R(),f=W(),h=p?.getTransport(),m=p?.getDsn();if(!p||!h||!m||!s.sampled)return Promise.resolve({});const _={type:s1,replay_start_timestamp:l/1e3,timestamp:o/1e3,error_ids:c,trace_ids:u,segment_names:d,urls:a,replay_id:t,segment_id:n,replay_type:s.sampled},y=await Mx({scope:f,client:p,replayId:t,event:_});if(!y)return p.recordDroppedEvent("event_processor","replay"),j&&z.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete y.sdkProcessingMetadata;const S=Cx(y,i,m,p.getOptions().tunnel);let I;try{I=await h.send(S)}catch(T){const C=new Error(Vu);try{C.cause=T}catch{}throw C}const b=Jh({},I);if(Yh(b,"replay"))throw new il(b);if(typeof I.statusCode=="number"&&(I.statusCode<200||I.statusCode>=300))throw new A_(I.statusCode);return I}class A_ extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class il extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}class Hf extends Error{constructor(){super("Session is too long, not sending replay")}}async function C_(e,t={count:0,interval:d1}){const{recordingData:n,onError:r}=e;if(n.length)try{return await xx(e),!0}catch(o){if(o instanceof A_||o instanceof il)throw o;if(Lh("Replays",{_retryCount:t.count}),r&&r(o),t.count>=f1){const s=new Error(`${Vu} - max retries exceeded`);try{s.cause=o}catch{}throw s}return t.interval*=++t.count,new Promise((s,i)=>{Zo(async()=>{try{await C_(e,t),s(!0)}catch(a){i(a)}},t.interval)})}}const N_="__THROTTLED",Ox="__SKIPPED";function Px(e,t,n){const r=new Map,o=a=>{const c=a-n;r.forEach((u,d)=>{d<c&&r.delete(d)})},s=()=>[...r.values()].reduce((a,c)=>a+c,0);let i=!1;return(...a)=>{const c=Math.floor(Date.now()/1e3);if(o(c),s()>=t){const d=i;return i=!0,d?Ox:N_}i=!1;const u=r.get(c)||0;return r.set(c,u+1),e(...a)}}class Lx{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:i1,sessionIdleExpire:a1},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=Ex(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=Px((i,a)=>RM(this,i,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:o}=this.getOptions(),s=r?{threshold:Math.min(p1,r),timeout:r,scrollTimeout:h1,ignoreSelector:o?o.join(","):""}:void 0;if(s&&(this.clickDetector=new BN(this,s)),j){const i=t._experiments;z.setConfig({captureExceptions:!!i.captureExceptions,traceInternals:!!i.traceInternals})}this._handleVisibilityChange=()=>{ge.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroun
497dTasks()},this._handleWindowBlur=()=>{const i=St({category:"ui.blur"});this._doChangeToBackgroundTasks(i)},this._handleWindowFocus=()=>{const i=St({category:"ui.focus"});this._doChangeToForegroundTasks(i)},this._handleKeyboardEvent=i=>{QN(this,i)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){j&&z.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options,o=n<=0&&r<=0;if(this._requiresManualStart=o,!o){if(this._initializeSessionForSampling(t),!this.session){j&&z.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&&z.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){j&&z.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){j&&z.log("Buffering is in progress, call `flush()` to save the replay");return}j&&z.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=ec({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&&z.log("Buffering is in progress, call `flush()` to save the replay");return}j&&z.infoTick("Starting replay in buffer mode");const t=ec({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{const t=this._canvas;this._stopRecording=rt({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:l1}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:Ix(this),...Tx(),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";const r=n??"manual";R()?.emit("replayEnd",{sessionId:this.session?.id,reason:r});try{j&&z.log(`Stopping Replay triggered by ${r}`),Ei(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,vM(this)}catch(o){this.handleException(o)}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),j&&z.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),j&&z.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();j&&z.log("Converting buffer to session"),await this.flushImmediate();const 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(),Bf(this.session.id)),this.startRecording())}addUpdate(t){const 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}
497checkAndHandleExpiredSession(){if(this._lastActivity&&jc(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session?.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${ge.location.pathname}${ge.location.hash}${ge.location.search}`,n=`${ge.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){const r=this._throttledAddEvent(t,n);if(r===N_){const o=St({category:"replay.throttled"});this.addUpdate(()=>!ol(this,{type:xN,timestamp:o.timestamp||0,data:{tag:"breadcrumb",payload:o,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||Ee(),n=t&&ve(t),o=(n&&$(n).data||{})[le];if(!(!n||!o||!["route","custom"].includes(o)))return $(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=yM({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.session&&R()?.emit("replayStart",{sessionId:this.session.id,recordingMode:this.recordingMode}),this.startRecording(),this.recordingMode==="session"&&this.session&&Bf(this.session.id)}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=ec({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;const t=this.session;return vi(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{ge.document.addEventListener("visibilitychange",this._handleVisibilityChange),ge.addEventListener("blur",this._handleWindowBlur),ge.addEventListener("focus",this._handleWindowFocus),ge.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(Sx(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=dM(this)}_removeListeners(){try{ge.document.removeEventListener("visibilitychange",this._handleVisibilityChange),ge.removeEventListener("blur",this._handleWindowBlur),ge.removeEventListener("focus",this._handleWindowFocus),ge.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(vi(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})){Ei();return}t&&this._createCustomBreadcrumb(t),this.conditionalFlush()}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){j&&z.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:ee.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=nM(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const n=this._context.initialTimestamp/1e3;t=t.filter(r=>r.start>=n)}return Promise.all(ma(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.segmentNames.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;
497const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const 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(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){j&&z.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await bx(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Hf;const r=this._popEventContext(),o=this.session.segmentId++;this._maybeSaveSession();const s=await this.eventBuffer.finish();await C_({replayId:t,recordingData:s,segmentId:o,eventContext:r,session:this.session,timestamp:n,onError:i=>this.handleException(i)})}catch(n){this.handleException(n),this.stop({reason:"sendError"});const r=R();if(r){let o;n instanceof il?o="ratelimit_backoff":n instanceof Hf?o="invalid":o="send_error",r.recordDroppedEvent(o,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){j&&z.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,o=Date.now()-n;this._debouncedFlush.cancel();const s=o<this._options.minReplayDuration,i=o>this._options.maxReplayDuration+5e3;if(s||i){j&&z.log(`Session duration (${Math.floor(o/1e3)}s) is too ${s?"short":"long"}, not sending replay.`),s&&this._debouncedFlush();return}const a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&j&&z.log("Flushing initial segment without checkout.");const c=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(u){this.handleException(u)}finally{this._flushLock=void 0,c&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&ha(this.session)}_onMutationHandler(t){const{ignoreMutations:n}=this._options._experiments;if(n?.length&&t.some(a=>{const c=Ax(a.target),u=n.join(",");return c?.matches(u)}))return!1;const r=t.length,o=this._options.mutationLimit,s=this._options.mutationBreadcrumbLimit,i=o&&r>o;if(r>s||i){const a=St({category:"replay.mutations",data:{count:r,limit:i}});this._createCustomBreadcrumb(a)}return i?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function oo(e,t){return[...e,...t].join(",")}function Dx({mask:e,unmask:t,block:n,unblock:r,ignore:o}){const s=["base","iframe[srcdoc]:not([src])"],i=oo(e,[".sentry-mask","[data-sentry-mask]"]),a=oo(t,[]);return{maskTextSelector:i,unmaskTextSelector:a,blockSelector:oo(n,[".sentry-block","[data-sentry-block]",...s]),unblockSelector:oo(r,[]),ignoreSelector:oo(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function Fx({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:o,value:s}){if(o.unmaskTextSelector&&e.matches(o.unmaskTextSelector))return s;const i=n.includes(t),a=r&&t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"");return i||a?s.replace(/[\S]/g,"*"):s}const Wf='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',$x=["content-length","content-type","accept"],Bx=Symbol.for("sentry__originalRequestBody");let jf=!1,zf=!1;function Ux(){if(typeof Request>"u"||zf)return;const e=Request;try{const t=function(n,r){const o=new e(n,r);return r?.body!=null&&(o[Bx]=r.body),o};t.prototype=e.prototype,B.Request=t,zf=!0}catch{}}const fD=(e=>new Hx(e));class Hx{constructor({flushMinDelay:t=c1,flushMaxDelay:n=u1,minReplayDuration:r=m1,maxReplayDuration:o=bf,stickySession:s=!0,useCompression:i=!0,workerUrl:a,_experiments:c={},maskAllText:u=!0,maskAllInputs:d=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:p=750,mutationLimit:f=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:_=[],networkDetailDenyUrls:y=[],networkCaptureBodies:S=!0,networkRequestHeaders:I=[],networkResponseHeaders:b=[],mask:T=[],maskAttributes:C=["title","placeholder","aria-label"],unmask:E=[],block:L=[],unblock:N=[],ignore:v=[],maskFn:P,beforeAddRecordingEvent:M,beforeErrorSampling:O,onError:q,attachRawBodyFromRequest:Q=!1}={}){this.name="Replay";const J=Dx({mask:T,unmask:E,block:L,unblock:N,ignore:v});if(this._recordingOptions={maskAllInputs:d,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:P,maskInputFn:P,maskAttributeFn:(U,x,H)=>Fx({maskAttributes:C,maskAllText:u,privacyOptions:J,key:U,value:x,el:H}),...J,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:U=>{try{U.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!c.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,g1),maxReplayDuration:Math.min(o,bf),stickySession:s,useCompression:i,workerUrl:a,blockAllMedia:l,maskAllInputs:d,maskAllText:u,mutationBreadcrumbLimit:p,mutationLimit:f,slowClickTimeout:h,slowClickIgnoreSelectors:m,networkDetailAllowUrls:_,networkDetailDenyUrls:y,networkCaptureBodies:S,networkRequestHeaders:qf(I),networkResponseHeaders:qf(b),beforeAddRecordingEvent:M,beforeErrorSampling:O,onError:q,attachRawBodyFromRequest:Q,_experiments:c},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Wf}`:Wf,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&dn())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return jf}set _isInitialized(t){jf=t}afterAllSetup(t){!dn()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&Ux(),this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}
497startBuffering(){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){const n=this.getReplayId(!0);n&&(ln(t,{"sentry.replay_id":n}),this.getRecordingMode()==="buffer"&&ln(t,{"sentry._internal.replay_is_buffering":!0}))}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=Wx(this._initialOptions,t);this._replay=new Lx({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function Wx(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},o=jn(n.replaysSessionSampleRate),s=jn(n.replaysOnErrorSampleRate);return o==null&&s==null&&zt(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),o!=null&&(r.sessionSampleRate=o),s!=null&&(r.errorSampleRate=s),r}function qf(e){return[...$x,...e.map(t=>t.toLowerCase())]}function pD(){return R()?.getIntegrationByName("Replay")}var jx=Object.defineProperty,zx=(e,t,n)=>t in e?jx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gf=(e,t,n)=>zx(e,typeof t!="symbol"?t+"":t,n);
497function qx(e){return e.nodeType===e.ELEMENT_NODE}function Gx(e){return e?.host?.shadowRoot===e}class Vx{constructor(){Gf(this,"idNodeMap",new Map),Gf(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){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r)),qx(t)&&t.shadowRoot&&this.removeNodeFromMap(t.shadowRoot)}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Yx(){return new Vx}function Jx(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function wi(e,t,n=1/0,r=0){return e?Gx(e)?wi(e.host,t,n,r+1):e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:wi(e.parentNode,t,n,r+1):-1}function Vf(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(Jx(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}const lr=`Please stop import mirror directly. Instead of that,\r 498now you can use replayer.getMirror() to access the mirror instance of a replayer,\r 499or you can use record.mirror to access the mirror instance during recording.`;let Yf={map:{},getId(){return console.error(lr),-1},getNode(){return console.error(lr),null},removeNodeFromMap(){console.error(lr)},has(){return console.error(lr),!1},reset(){console.error(lr)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Yf=new Proxy(Yf,{get(e,t,n){return t==="map"&&console.error(lr),Reflect.get(e,t,n)}}));function al(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(i){x_(()=>{n.set.call(this,i)},0),s&&s.set&&s.set.call(this,i)}}),()=>al(e,t,s||{},!0)}function cl(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}Date.now().toString();function Kx(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function _a(e,t,n,r,o){if(!e)return!1;const s=Kx(e);if(!s)return!1;const i=Vf(t,n),a=wi(s,i);let c=-1;return a<0?!1:(r&&(c=wi(s,Vf(null,r))),a>-1&&c<0?!0:a<c)}const tc={};function M_(e){const t=tc[e];if(t)return t;const n=window[e].bind(window);let r=n;const o=window.document;if(o&&typeof o.createElement=="function")try{const s=o.createElement("iframe");s.hidden=!0,o.head.appendChild(s);const i=s.contentWindow;if(i&&i[e]){const a=i[e].bind(window);r=(...c)=>{try{return a(...c)}catch{return tc[e]=n,n(...c)}}}o.head.removeChild(s)}catch{}return tc[e]=r}function Cn(...e){return M_("requestAnimationFrame")(...e)}function x_(...e){return M_("setTimeout")(...e)}var Ur=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Ur||{});let js;function Xx(e){js=e}const nc=e=>js?((...n)=>{try{return e(...n)}catch(r){if(js&&js(r)===!0)return()=>{};throw r}}):e;var mr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qx=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var ks=0;ks<mr.length;ks++)Qx[mr.charCodeAt(ks)]=ks;var Zx=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=mr[t[n]>>2],o+=mr[(t[n]&3)<<4|t[n+1]>>4],o+=mr[(t[n+1]&15)<<2|t[n+2]>>6],o+=mr[t[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o};const Jf=new Map;function eO(e,t){let n=Jf.get(e);return n||(n=new Map,Jf.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const O_=(e,t,n)=>{if(!e||!(L_(e,t)||typeof e=="object"))return;const r=e.constructor.name,o=eO(n,r);let s=o.indexOf(e);return s===-1&&(s=o.length,o.push(e)),s};function zs(e,t,n){if(e instanceof Array)return e.map(r=>zs(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){const r=e.constructor.name,o=Zx(e);return{rr_type:r,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[zs(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:o}=e;return{rr_type:r,src:o}}else if(e instanceof HTMLCanvasElement){const r="HTMLImageElement",o=e.toDataURL();return{rr_type:r,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[zs(e.data,t,n),e.width,e.height]};
vendor: 1,913 bytes, line 499
499if(L_(e,t)||typeof e=="object"){const r=e.constructor.name,o=O_(e,t,n);return{rr_type:r,index:o}}}}return e}const P_=(e,t,n)=>e.map(r=>zs(r,t,n)),L_=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(o=>typeof t[o]=="function").find(o=>e instanceof t[o]);function tO(e,t,n,r,o){const s=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of i)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;const c=cl(t.CanvasRenderingContext2D.prototype,a,function(u){return function(...d){return _a(this.canvas,n,r,o,!0)||x_(()=>{const l=P_(d,t,this);e(this.canvas,{type:Ur["2D"],property:a,args:l})},0),u.apply(this,d)}});s.push(c)}catch{const c=al(t.CanvasRenderingContext2D.prototype,a,{set(u){e(this.canvas,{type:Ur["2D"],property:a,args:[u],setter:!0})}});s.push(c)}return()=>{s.forEach(a=>a())}}function nO(e){return e==="experimental-webgl"?"webgl":e}function Kf(e,t,n,r,o){const s=[];try{const i=cl(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(c,...u){if(!_a(this,t,n,r,!0)){const d=nO(c);if("__context"in this||(this.__context=d),o&&["webgl","webgl2"].includes(d))if(u[0]&&typeof u[0]=="object"){const l=u[0];l.preserveDrawingBuffer||(l.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[c,...u])}});s.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach(i=>i())}}function Xf(e,t,n,r,o,s,i,a){const c=[],u=Object.getOwnPropertyNames(e);for(const d of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(d))try{if(typeof e[d]!="function")continue;const l=cl(e,d,function(p){return function(...f){const h=p.apply(this,f);
499if(O_(h,a,this),"tagName"in this.canvas&&!_a(this.canvas,r,o,s,!0)){const m=P_(f,a,this),_={type:t,property:d,args:m};n(this.canvas,_)}return h}});c.push(l)}catch{const l=al(e,d,{set(p){n(this.canvas,{type:t,property:d,args:[p],setter:!0})}});c.push(l)}return c}function rO(e,t,n,r,o,s){const i=[];return i.push(...Xf(t.WebGLRenderingContext.prototype,Ur.WebGL,e,n,r,o,s,t)),typeof t.WebGL2RenderingContext<"u"&&i.push(...Xf(t.WebGL2RenderingContext.prototype,Ur.WebGL2,e,n,r,o,s,t)),()=>{i.forEach(a=>a())}}const oO='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 sO(){const e=new Blob([oO]);return URL.createObjectURL(e)}class iO{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)};const{enableManualSnapshot:n,sampling:r="all",win:o,recordCanvas:s,errorHandler:i}=t;t.sampling=r,this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.options=t,i&&Xx(i),(s&&typeof r=="number"||n)&&(this.worker=this.initFPSWorker()),this.addWindow(o),!n&&nc(()=>{s&&r==="all"&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),s&&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){const{sampling:n="all",blockClass:r,blockSelector:o,unblockSelector:s,recordCanvas:i,enableManualSnapshot:a}=this.options;if(!this.windowsSet.has(t)){if(a){this.windowsSet.add(t),this.windows.push(new WeakRef(t));return}nc(()=>{if(i&&n==="all"&&this.initCanvasMutationObserver(t,r,o,s),i&&typeof n=="number"){const c=Kf(t,r,o,s,!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(),t);return}Cn(r=>this.takeSnapshot(r,t))}initFPSWorker(){const t=new Worker(sO());return t.onmessage=n=>{const r=n.data,{id:o}=r;if(this.snapshotInProgressMap.set(o,!1),!("base64"in r))return;const{base64:s,type:i,width:a,height:c}=r;this.mutationCb({id:o,type:Ur["2D"],commands:[{property:"clearRect",args:[0,0,a,c]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:s}],type:i}]},0,0,a,c]}]})},t}initCanvasFPSObserver(){let t;if(!this.windows.length&&!this.shadowDoms.size)return;const n=r=>{this.takeSnapshot(r),t=Cn(n)};t=Cn(n),this.restoreHandlers.push(()=>{t&&cancelAnimationFrame(t)})}initCanvasMutationObserver(t,n,r,o){const s=Kf(t,n,r,o,!1),i=tO(this.processMutation.bind(this),t,n,r,o),a=rO(this.processMutation.bind(this),t,n,r,o,this.mirror);this.restoreHandlers.push(()=>{s(),i(),a()})}getCanvasElements(t,n,r){const o=[],s=i=>{i.querySelectorAll("canvas").forEach(a=>{_a(a,t,n,r)||o.push(a)})};for(const i of this.windows){const a=i.deref();let c;try{c=a&&a.document}catch{}c&&s(c)}for(const i of this.shadowDoms){const a=i.deref();a&&s(a)}return o}takeSnapshot(t,n){const{sampling:r,blockClass:o,blockSelector:s,unblockSelector:i,dataURLOptions:a,maxCanvasSize:c}=this.options,d=1e3/(r==="all"?2:r||2);return this.lastSnapshotTime&&t-this.lastSnapshotTime<d?!1:(this.lastSnapshotTime=t,(n?[n]:this.getCanvasElements(o,s,i)).forEac
499h(f=>{const h=this.mirror.getId(f);!this.mirror.hasNode(f)||!f.width||!f.height||this.snapshotInProgressMap.get(h)||(this.snapshotInProgressMap.set(h,!0),createImageBitmap(f).then(m=>{this.worker?.postMessage({id:h,bitmap:m,width:f.width,height:f.height,dataURLOptions:a,maxCanvasSize:c},[m])}).catch(m=>{nc(()=>{throw this.snapshotInProgressMap.delete(h),m})()}))}),!0)}startPendingCanvasMutationFlusher(){Cn(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,Cn(t)};Cn(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),Cn(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const o=r.map(i=>{const{type:a,...c}=i;return c}),{type:s}=r[0];this.mutationCb({id:n,type:s,commands:o}),this.pendingCanvasMutations.delete(t)}}try{if(Array.from([1],e=>e*2)[0]!==2){const 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)}Yx();var Qf;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Qf||(Qf={}));const Zf={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}}},aO="ReplayCanvas",Rs=1280,cO=((e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,Rs):Rs,n?Math.min(n,Rs):Rs]};let o,s;const i=new Promise(a=>s=a);return{name:aO,getOptions(){const{quality:a,enableManualSnapshot:c,maxCanvasSize:u}=r;return{enableManualSnapshot:c,recordCanvas:!0,getCanvasManager:d=>{const l=new iO({...d,enableManualSnapshot:c,maxCanvasSize:u,errorHandler:p=>{try{typeof p=="object"&&(p.__rrweb__=!0)}catch{}}});return o=l,s(l),l},...Zf[a]||Zf.medium}},async snapshot(a,c){(o||await i).snapshot(a,c)}}}),hD=cO;function uO(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function D_(e){try{return new URL(e,A.location.origin).href}catch{return}}function lO(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function F_(e){try{return new Headers(e)}catch{return}}const $_={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function dO(e,t){const{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:o,enableHTTPTimings:s,tracePropagationTargets:i,onRequestSpanStart:a,onRequestSpanEnd:c}
499={...$_,...t},u=typeof o=="function"?o:f=>!0,d=f=>pO(f,i),l={},p=e.getOptions().propagateTraceparent;n&&Xi(f=>{const h=DT(f,u,d,l,{propagateTraceparent:p,onRequestSpanEnd:c});if(h){const m=D_(f.fetchData.url),_=m?Bn(m).host:void 0,y=m?pt(m):void 0;h.setAttributes({[Ah]:Ye(y),[vn]:Ye(y),"server.address":_}),s&&ep(h,e),a?.(h,{headers:f.headers})}}),r&&zu(f=>{const h=hO(f,u,d,l,p,c);h&&(s&&ep(h,e),a?.(h,{headers:F_(f.xhr.__sentry_xhr_v3__?.request_headers)}))})}const fO=300;function ep(e,t){const{url:n}=$(e).data;if(!n||typeof n!="string")return;let r=()=>{setTimeout(o)};if(at(t)){const s=e.end.bind(e);e.end=i=>{const a=i??he();let c=!1;const u=()=>{c||(c=!0,setTimeout(o),s(a),clearTimeout(d))};r=u;const d=setTimeout(u,fO)}}const o=pn("resource",({entries:s})=>{s.forEach(i=>{lO(i)&&i.name.endsWith(n)&&(e.setAttributes(wg(i)),r())})})}function pO(e,t){const n=fn();if(n){let r,o;try{r=new URL(e,n),o=new URL(n).origin}catch{return!1}const s=r.origin===o;return t?nt(r.toString(),t)||s&&nt(r.pathname,t):s}else{const r=!!e.match(/^\/(?!\/)/);return t?nt(e,t):r}}function hO(e,t,n,r,o,s){const i=e.xhr,a=i?.[Ft];if(!i||i.__sentry_own_request__||!a)return;const{url:c,method:u}=a,d=Je()&&t(c);if(e.endTimestamp){const b=i.__sentry_xhr_span_id__;if(!b)return;const T=r[b];T&&(d&&a.status_code!==void 0&&(Js(T,a.status_code),T.end(),s?.(T,{headers:F_(Cg(i)),error:e.error})),delete r[b]);return}const l=D_(c),p=Bn(l||c),f=l?pt(l):void 0,h=pt(am(c)),m=R(),_=!!Ee(),y=_||!!m&&at(m),S=d&&y?Ge({name:`${u} ${h}`,attributes:{url:Ye(pt(c)),type:"xhr","http.method":u,"http.url":Ye(f),[vn]:Ye(f),"server.address":p?.host,[Y]:"auto.http.browser",[ue]:"http.client",...p?.search&&{"http.query":sm(p?.search)},...p?.hash&&{"http.fragment":p?.hash}}}):new zn,I=Di(S)&&_?void 0:S;return d&&!y&&m?.recordDroppedEvent("no_parent_span","span"),i.__sentry_xhr_span_id__=S.spanContext().spanId,r[i.__sentry_xhr_span_id__]=S,n(c)&&mO(i,Je()&&y?I:void 0,o),m&&m.emit("beforeOutgoingRequestSpan",S,e),S}function mO(e,t,n){const{"sentry-trace":r,baggage:o,traceparent:s}=lm({span:t,propagateTraceparent:n});r&&gO(e,r,o,s)}function gO(e,t,n,r){const o=e.__sentry_xhr_v3__?.request_headers;if(!(o?.["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),r&&!o?.traceparent&&e.setRequestHeader("traceparent",r),n){const s=o?.baggage;(!s||!uO(s))&&e.setRequestHeader("baggage",n)}}catch{}}const tp=new WeakMap,np=new WeakMap,_O=9e4,yO=["text/event-stream","application/x-ndjson","application/stream+json"],SO=()=>({name:"FetchStreamPerformance",setup(){ow(e=>{if(e.response){const t=tp.get(e.response);if(t&&e.endTimestamp){t.end(e.endTimestamp);const n=np.get(e.response);n&&clearTimeout(n)}}}),Xi(e=>{if(e.endTimestamp&&e.response){const t=e.response.headers?.get("content-type")||"";if(e.response.headers?.get("content-length")||!yO.some(c=>t.startsWith(c)))return;const n=e.fetchData?.url||"",r=e.fetchData?.method||"GET",o=vo(n),s=n.startsWith("data:")?pt(n):o?im(o):n,i=Ge({name:`${r} ${s}`,startTime:e.endTimestamp,attributes:{url:Ye(pt(n)),"http.method":r,type:"fetch",[ue]:"http.client.stream",[Y]:"auto.http.browser.stream"}});tp.set(e.response,i);const a=setTimeout(()=>{i.isRecording()&&i.end()},_O);np.set(e.response,a)}})}}),B_="WebVitals",bO=(e={})=>{const t=new Set(e.ignore??[]);return{name:B_,setup(n){const r=at(n),{enableStandaloneClsSpans:o,enableStandaloneLcpSpans:s}=e._experiments??{},i=r||t.has("cls")?void 0:o||!1,a=r||t.has("lcp")?void 0:s||!1,c=RR({recordClsStandaloneSpans:i,recordLcpStandaloneSpans:a,client:n}),u=new WeakSet;n.on("afterStartPageLoadSpan",d=>{u.add(d)}),n.on("spanEnd",d=>{u.delete(d)&&(c(),DR(d,{recordClsOnPageloadSpan:i===!1,recordLcpOnPageloadSpan:a===!1,spanStreamingEnabled:r}))}),r?(t.has("lcp")||tA(n),t.has("cls")||rA(n),t.has("inp")||sA()):t.has("inp")||KR()},afterAllSetup(){t.has("inp")||eA()}}};function vO(){A.document?A.document.addEventListener("visibilitychange",()=>{const e=Ee();if(!e)return;const t=ve(e);if(A.document.hidden&&t){const n="cancelled",{op:r,status:o}=$(t);w&&g.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),o||t.setStatus({code:re,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):w&&g.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const EO=3600,U_="sentry_previous_trace",TO="sentry.previous_trace";function IO(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let o=r?RO():void 0;e.on("spanStart",i=>{if(ve(i)!==i)return;const a=W().getPropagationContext();o=wO(o,i,a),r&&kO(o)});let s=!0;n&&e.on("beforeSampling",i=>{if(!o)return;const a=W(),c=a.getPropagationContext();if(s&&c.parentSpanId){s=!1;return}a.setPropagationContext({...c,dsc:{...c.dsc,sample_rate:String(o.sampleRate),sampled:String(Gc(o.spanContext))},sampleRand:o.sampleRand}),i.parentSampled=Gc(o.spanContext),i.parentSampleRate=o.sampleRate,i.spanAttributes={...i.spanAttributes,[Vp]:o.sampleRate}})}function wO(e,t,n){const r=$(t);function o(){try{const a=Number(r.data?.[nu]??n.dsc?.sample_rate);return Number.isNaN(a)?0:a}catch{return 0}}const s={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:o(),sampleRand:n.sampleRand};if(!e)return s;const i=e.spanContext;return i.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=EO&&(w&&g.log(`Adding previous_trace \`${JSON.stringify(i)}\` link to span \`${JSON.stringify({op:r.op,...t.spanContext()})}\``),t.addLink({context:i,attributes:{[bS]:"previous_trace"}}),t.setAttribute(TO,`${i.traceId}-${i.spanId}-${Gc(i)?1:0}`)),s)}function kO(e){try{A.sessionStorage.setItem(U_,JSON.stringify(e))}catch(t){w&&g.warn("Could not store previous trace in sessionStorage",t)}}function RO(){try{const e=A.sessionStorage?.getItem(U_);return JSON.parse(e)}catch{return}}function Gc(e){return e.traceFlags===1}const AO="BrowserTracing",CO=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function NO(){const e=A.navigator;return e?.userAgent?CO.test(e.userAgent):!1}const MO={...Ms,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroun
499dSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...$_},ns=((e={})=>{"enableElementTiming"in e&&zt(()=>{console.warn("[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.")});const t={name:void 0,source:void 0},n=A.document,{enableInp:r,enableLongTask:o,enableLongAnimationFrame:s,_experiments:{enableInteractions:i,enableStandaloneClsSpans:a,enableStandaloneLcpSpans:c},beforeStartSpan:u,idleTimeout:d,finalTimeout:l,childSpanTimeout:p,markBackgroundSpan:f,traceFetch:h,traceXHR:m,trackFetchStreamPerformance:_,shouldCreateSpanForRequest:y,enableHTTPTimings:S,ignoreResourceSpans:I,ignorePerformanceApiSpans:b,instrumentPageLoad:T,instrumentNavigation:C,detectRedirects:E,linkPreviousTrace:L,consistentTraceSampling:N,enableReportPageLoaded:v,onRequestSpanStart:P,onRequestSpanEnd:M}={...MO,...e},O=NO();let q,Q;function J(U,x,H=!0,D){const Z=x.op==="pageload",se=x.name,ne=u?u(x):x,ie=vo(D||fn()),Xe={...ie?.pathname&&{[Nh]:ie.pathname},...ie&&!Bi(ie)&&{[vn]:Ye(ie.href)},...ne.attributes};if(se!==ne.name&&(Xe[le]="custom"),ne.attributes=Xe,!H){const ut=Kn();Ge({...ne,startTime:ut}).end(ut);return}t.name=ne.name,t.source=Xe[le];const ct=Th(ne,{idleTimeout:d,finalTimeout:l,childSpanTimeout:p,disableAutoFinish:Z,beforeSpanEnd:ut=>{LR(ut,{ignoreResourceSpans:I,ignorePerformanceApiSpans:b,spanStreamingEnabled:at(U)}),sp(U,void 0);const Tn=W(),Ot=Tn.getPropagationContext();Tn.setPropagationContext({...Ot,traceId:ct.spanContext().traceId,sampled:Mt(ct),dsc:gt(ut)}),Z&&(Q=void 0)},trimIdleSpanEndTimestamp:!v});Z&&v&&(Q=ct),sp(U,ct);function xt(){n&&["interactive","complete"].includes(n.readyState)&&(U.emit("idleSpanEnableAutoFinish",ct),n.removeEventListener("readystatechange",xt))}Z&&!v&&n&&(n.addEventListener("readystatechange",xt),xt())}return{name:AO,setup(U){if(O){w&&g.log("[Tracing] Skipping browserTracingIntegration setup for bot user agent.");return}if(WS(),s&&B.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes("long-animation-frame")?CR():o&&AR(),i&&NR(),E&&n){const H=()=>{q=he()};addEventListener("click",H,{capture:!0}),addEventListener("keydown",H,{capture:!0,passive:!0})}function x(){const H=No(U);H&&!$(H).timestamp&&(w&&g.log(`[Tracing] Finishing current active span with op: ${$(H).op}`),H.setAttribute(_o,"cancelled"),H.end())}U.on("startNavigationSpan",(H,D)=>
499{if(R()!==U)return;if(D?.isRedirect){w&&g.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),J(U,{op:"navigation.redirect",...H},!1,D.url);return}q=void 0,x();const Z=W();Z.setPropagationContext({traceId:Ht(),sampleRand:Math.random(),propagationSpanId:Je()?void 0:un()}),Z.setSDKProcessingMetadata({normalizedRequest:void 0}),J(U,{op:"navigation",...H,parentSpan:null,forceTransaction:!0},!0,D?.url)}),U.on("startPageLoadSpan",(H,D={})=>{if(R()!==U)return;x();const Z=D.sentryTrace||rp("sentry-trace")||op("sentry-trace"),se=D.baggage||rp("baggage")||op("baggage"),ne=rh(Z,se),ie=W();ie.setPropagationContext(ne),Je()||(ie.getPropagationContext().propagationSpanId=un()),ie.setSDKProcessingMetadata({normalizedRequest:li()}),J(U,{op:"pageload",...H})}),U.on("endPageloadSpan",()=>{v&&Q&&(Q.setAttribute(_o,"reportPageLoaded"),Q.end())})},afterAllSetup(U){if(O)return;U.addIntegration&&!U.getIntegrationByName?.(B_)&&U.addIntegration(bO({ignore:r?[]:["inp"],_experiments:{enableStandaloneClsSpans:a,enableStandaloneLcpSpans:c}}));let x=fn();if(L!=="off"&&IO(U,{linkPreviousTrace:L,consistentTraceSampling:N}),A.location){if(T){const H=Ie();rs(U,{name:A.location.pathname,startTime:H?H/1e3:void 0,attributes:{[le]:"url",[Y]:"auto.pageload.browser"}})}C&&aa(({to:H,from:D})=>{if(D===void 0&&x?.indexOf(H)!==-1){x=void 0;return}x=void 0;const Z=vo(H),se=No(U),ne=se&&E&&OO(se,q);os(U,{name:Z?.pathname||A.location.pathname,attributes:{[le]:"url",[Y]:"auto.navigation.browser"}},{url:H,isRedirect:ne})})}f&&vO(),i&&xO(U,d,l,p,t),dO(U,{traceFetch:h,traceXHR:m,tracePropagationTargets:U.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:y,enableHTTPTimings:S,onRequestSpanStart:P,onRequestSpanEnd:M}),_&&U.addIntegration(SO())}}});function rs(e,t,n){e.emit("startPageLoadSpan",t,n),W().setTransactionName(t.name);const r=No(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function os(e,t,n){const{url:r,isRedirect:o}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:o,url:r}),e.emit("startNavigationSpan",t,{isRedirect:o,url:r});const s=W();return s.setTransactionName(t.name),r&&!o&&s.setSDKProcessingMetadata({normalizedRequest:{...li(),url:r}}),No(e)}function rp(e){return A.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function op(e){return A.performance?.getEntriesByType?.("navigation")[0]?.serverTiming?.find(r=>r.name===e)?.description}function xO(e,t,n,r,o){const s=A.document;let i;const a=()=>{const c="ui.action.click",u=No(e);if(u){const d=$(u).op;if(["navigation","pageload"].includes(d)){w&&g.warn(`[Tracing] Did not create ${c} span because a pageload or navigation span is in progress.`);return}}if(i&&(i.setAttribute(_o,"interactionInterrupted"),i.end(),i=void 0),!o.name){w&&g.warn(`[Tracing] Did not create ${c} transaction because _latestRouteName is missing.`);return}i=Th({name:o.name,op:c,attributes:{[le]:o.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};s&&addEventListener("click",a,{capture:!0})}const H_="_sentry_idleSpan";function No(e){return e[H_]}function sp(e,t){ye(e,H_,t)}const ip=1.5;function OO(e,t){const n=$(e),r=Kn(),o=n.start_timestamp;return!(r-o>ip||t&&r-t<=ip)}function mD(e=R()){e?.emit("endPageloadSpan")}function gD(e){const t=Ee();if(t===e)return;const n=W();e.end=new Proxy(e.end,{apply(r,o,s){return It(n,t),Reflect.apply(r,o,s)}}),It(n,e)}const _D=()=>({name:"SpanStreaming",beforeSetup(e){const t=e.getOptions();t.traceLifecycle||(w&&g.log('[SpanStreaming] setting `traceLifecycle` to "stream"'),t.traceLifecycle="stream")},setup(e){const t="SpanStreaming integration requires",n="Falling back to static trace lifecycle.",r=e.getOptions();if(!at(e)){r.traceLifecycle="static",w&&g.warn(`${t} \`traceLifecycle\` to be set to "stream"! ${n}`);return}const o=r.beforeSendSpan;if(o&&!Pi(o)){r.traceLifecycle="static",w&&g.warn(`${t} a beforeSendSpan callback using \`withStreamedSpan\`! ${n}`);return}const s=new ew(e);e.on("afterSpanEnd",i=>{Mt(i)&&s.add(Wb(i,e))}),e.on("afterSegmentSpanEnd",i=>{const a=i.spanContext().traceId;setTimeout(()=>{s.flush(a)},500)})}});function Hr(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function PO(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=Hr(n);return o=>r.then(s=>o(s.transaction(t,"readwrite").objectStore(t)))}function ul(e){return Hr(e.getAllKeys())}function LO(e,t,n){return e(r=>ul(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.max(...o,0)+1),Hr(r.transaction)}))}function DO(e,t,n){return e(r=>ul(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.min(...o,0)-1),Hr(r.transaction)}))}function FO(e){return e(t=>ul(t).then(n=>{const r=n[0];if(r!=null)return Hr(t.get(r)).then(o=>(t.delete(r),Hr(t.transaction).then(()=>o)))}))}function $O(e){let t;function n(){return t==null&&(t=PO(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{push:async r=>{try{const o=ti(r);await LO(n(),o,e.maxQueueSize||30)}catch{}},unshift:async r=>{try{const o=ti(r);await DO(n(),o,e.maxQueueSize||30)}catch{}},shift:async()=>{try{const r=await FO(n());if(r)return YS(r)}catch{}}}}function BO(e){return t=>{const n=e({...t,createStore:$O});return A.addEventListener("online",async r=>{await n.flush()}),n}}function yD(e=Ng){return BO(rE(e))}const ap=1e6,UO="window"in B&&B.window===B&&typeof importScripts>"u",Un=String(0),ll=UO?"main":"worker",ki=A.navigator;let W_="",j_="",z_="",Vc=ki?.userAgent||"",q_="";const HO=ki?.language||ki?.languages?.[0]||"";function WO(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}const cp=ki?.userAgentData;WO(cp)&&cp.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(W_=e.platform||"",z_=e.architecture||"",q_=e.model||"",j_=e.platformVersion||"",e.fullVersionList?.length){const t=e.fullVersionList[e.fullVersionList.length-1];Vc=`${t.brand} ${t.version}`}}).catch(e=>{});function jO(e){return!("thread_metadata"in e)}function zO(e){return jO(e)?KO(e):e}function qO(e){const t=e.contexts?.trace?.trace_id;return typeof t=="string"&&t.length!==32&&w&&g.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t!="string"?"":t}function GO(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.`);const o=qO(r),s=zO(n),i=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:he()*1e3),a=typeof r.timestamp=="number"?r.timestamp*1e3:he()*1e3;return{event_id:e,timestamp:new Date(i).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||Do,runtime:{name:"javascript",version:A.navigator.userAgent},os:{name:W_,version:j_,build_number:Vc},device:{locale:HO,model:q_,manufacturer:Vc,architecture:z_,is_emulator:!1},debug_meta:{images:V_(n.resources)},profile:s,transactions:[{name:r.transaction||"",id:r.event_id||Ce(),trace_id:o,active_thread_id:Un,relative_start_ns:"0",relative_end_ns:((a-i)*1e6).toFixed(0)}]}}function VO(e,t,n){if(e==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${e} instead.`);const r=JO(e),o=t.getOptions(),s=t.getSdkMetadata?.()?.sdk;return{chunk_id:Ce(),client_sdk:{name:s?.name??"sentry.javascript.browser",version:s?.version??"0.0.0"},profiler_id:n||Ce(),platform:"javascript",version:"2",release:o.release??"",environment:o.environment??"production",debug_meta:{images:V_(e.resources)},profile:r}}function YO(e){try{if(!e||typeof e!="object")return{reason:"chunk is not an object"};const 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"};const n=e.profile;return n?!Array.isArray(n.frames)||!n.frames.length?{reason:"profile has no frames"}
499:!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 JO(e){const t=[];for(let a=0;a<e.frames.length;a++){const 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})}const n=[];for(let a=0;a<e.stacks.length;a++){const c=e.stacks[a];if(!c)continue;const u=[];let d=c;for(;d;)u.push(d.frameId),d=d.parentId===void 0?void 0:e.stacks[d.parentId];n[a]=u}const r=Ie(),o=typeof performance.timeOrigin=="number"?performance.timeOrigin:r||0,s=o-(r||o),i=[];for(let a=0;a<e.samples.length;a++){const c=e.samples[a];if(!c)continue;const u=(o+(c.timestamp-s))/1e3;i[a]={stack_id:c.stackId??0,thread_id:Un,timestamp:u}}return{frames:t,stacks:n,samples:i,thread_metadata:{[Un]:{name:ll}}}}function G_(e){return $(e).op==="pageload"}function KO(e){let t,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[Un]:{name:ll}}},o=e.samples[0];if(!o)return r;const s=o.timestamp,i=Ie(),a=typeof performance.timeOrigin=="number"?performance.timeOrigin:i||0,c=a-(i||a);return e.samples.forEach((u,d)=>{if(u.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[d]={elapsed_since_start_ns:((u.timestamp+c-s)*ap).toFixed(0),stack_id:t,thread_id:Un};return}let l=e.stacks[u.stackId];const p=[];for(;l;){p.push(l.frameId);const h=e.frames[l.frameId];h&&r.frames[l.frameId]===void 0&&(r.frames[l.frameId]={function:h.name,abs_path:typeof h.resourceId=="number"?e.resources[h.resourceId]:void 0,lineno:h.line,colno:h.column}),l=l.parentId===void 0?void 0:e.stacks[l.parentId]}const f={elapsed_since_start_ns:((u.timestamp+c-s)*ap).toFixed(0),stack_id:n,thread_id:Un};r.stacks[n]=p,r.samples[d]=f,n++}),r}function XO(e,t){if(!t.length)return e;for(const n of t)e[1].push([{type:"profile"},n]);return e}function QO(e){const t=[];return qn(e,(n,r)=>{if(r==="transaction")for(let o=1;o<n.length;o++)n[o]?.contexts?.profile?.profile_id&&t.push(n[o])}),t}function V_(e){const r=R()?.getOptions()?.stackParser;return r?Yb(r,e):[]}function Y_(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?(w&&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?(w&&g.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function ZO(e){return e.samples.length<2?(w&&g.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):e.frames.length?!0:(w&&g.log("[Profiling] Discarding profile because it contains no frames"),!1)}let dl=!1;const J_=3e4;function eP(e){return typeof e=="function"}function K_(){const e=A.Profiler;if(!eP(e)){w&&g.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}const t=10,n=Math.floor(J_/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch{w&&(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.")),dl=!0}}function up(e){if(dl)return w&&g.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return w&&g.log("[Profiling] Discarding profile because root span was not sampled."),!1;const n=R()?.getOptions();if(!n)return w&&g.log("[Profiling] Profiling disabled, no options found."),!1;const r=n.profilesSampleRate;return Y_(r)?r?(r===!0?!0:Math.random()<r)?!0:(w&&g.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):(w&&g.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):(w&&g.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function tP(e){if(dl)return w&&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 w&&g.warn("[Profiling] Session not sampled. Invalid `profileLifecycle` option."),!1;const t=e.profileSessionSampleRate;return Y_(t)?t?Math.random()<=t:(w&&g.log("[Profiling] Discarding profile because profileSessionSampleRate is not defined or set to 0"),!1):(w&&g.warn("[Profiling] Discarding profile because of invalid profileSessionSampleRate."),!1)}function As(e){return typeof e.profilesSampleRate<"u"}function nP(e,t,n,r){return ZO(n)?GO(e,t,n,r):null}const Ln=new Map;function rP(){return Ln.size}function oP(e){const t=Ln.get(e);return t&&Ln.delete(e),t}function sP(e,t){if(Ln.set(e,t),Ln.size>30){const n=Ln.keys().next().value;n!==void 0&&Ln.delete(n)}}const X_=new WeakSet;function Ri(e){e.setAttribute("thread.id",Un),e.setAttribute("thread.name",ll)}function lp(e){let t;G_(e)&&(t=he()*1e3);const n=K_();if(!n)return;w&&g.log(`[Profiling] started profiling span: ${$(e).description}`);const r=Ce();let o=null;W().setContext("profile",{profile_id:r,start_timestamp:t}),X_.add(e),Ri(e);async function s(){if(e&&n){if(o){w&&g.log("[Profiling] profile for:",$(e).description,"already exists, returning early");return}return n.stop().then(u=>{if(i&&(A.clearTimeout(i),i=void 0),w&&g.log(`[Profiling] stopped profiling of span: ${$(e).description}`),!u){w&&g.log(`[Profiling] profiler returned null profile for: ${$(e).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started");return}o=u,sP(r,u)}).catch(u=>{w&&g.log("[Profiling] error while stopping profiler:",u)})}}let i=A.setTimeout(()=>{w&&g.log("[Profiling] max profile duration elapsed, stopping profiling for:",$(e).description),s()},J_);const a=e.end.bind(e);function c(){return e?(s().then(()=>{a()},()=>{a()}),e):a()}e.end=c}const iP=6e4,aP=3e5;class cP{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){const n=t.getOptions().profileLifecycle,r=tP(t.getOptions());w&&g.log(`[Profiling] Initializing profiler (lifecycle='${n}').`),r||w&&g.log("[Profiling] Session not sampled. Skipping lifecycle profiler initialization."),this._profilerId=Ce(),this._client=t,this._sessionSampled=r,this._lifecycleMode=n,n==="trace"&&this._setupTraceLifecycleListeners(t),t.on("spanStart",o=>{this._isRunning&&Ri(o)})}
499start(){if(this._lifecycleMode==="trace"){w&&g.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.start()` are ignored in trace mode.');return}if(this._isRunning){w&&g.warn("[Profiling] Profile session is already running, `uiProfiler.start()` is a no-op.");return}if(!this._sessionSampled){w&&g.warn("[Profiling] Session is not sampled, `uiProfiler.start()` is a no-op.");return}this._beginProfiling()}stop(){if(this._lifecycleMode==="trace"){w&&g.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.stop()` are ignored in trace mode.');return}if(!this._isRunning){w&&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;const n=t.spanContext().spanId;if(!n||this._activeRootSpanIds.has(n))return;this._registerTraceRootSpan(n);const r=this._activeRootSpanIds.size;r===1&&(w&&g.log("[Profiling] Detected already active root span during setup. Active root spans now:",r),this._beginProfiling()),this._isRunning&&Ri(t)}_beginProfiling(){if(!this._isRunning){if(this._isRunning=!0,w&&g.log("[Profiling] Started profiling with profiler ID:",this._profilerId),gr().setContext("profile",{profiler_id:this._profilerId}),this._startProfilerInstance(),!this._profiler){w&&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=>{w&&g.error("[Profiling] Failed to collect current profile chunk on `stop()`:",t)}),this._lifecycleMode==="manual"&&gr().setContext("profile",{}))}_setupTraceLifecycleListeners(t){t.on("spanStart",n=>{if(!this._sessionSampled){w&&g.log("[Profiling] Span not profiled because of negative sampling decision for user session.");return}if(n!==ve(n))return;if(!n.isRecording()){w&&g.log("[Profiling] Discarding profile because root span was not sampled.");return}const r=n.spanContext().spanId;if(!r||this._activeRootSpanIds.has(r))return;this._registerTraceRootSpan(r);const o=this._activeRootSpanIds.size;o===1&&(w&&g.log(`[Profiling] Root span ${r} started. Profiling active while there are active root spans (count=${o}).`),this._beginProfiling())}),t.on("spanEnd",n=>{if(!this._sessionSampled)return;const r=n.spanContext().spanId;if(!r||!this._activeRootSpanIds.has(r))return;this._activeRootSpanIds.delete(r);const o=this._activeRootSpanIds.size;w&&g.log(`[Profiling] Root span with ID ${r} ended. Will continue profiling for as long as there are active root spans (currently: ${o}).`),o===0&&(this._collectCurrentChunk().catch(s=>{w&&g.error("[Profiling] Failed to collect current profile chunk on last `spanEnd`:",s)}),this._endProfiling())})}_resetProfilerInfo(){this._isRunning=!1,gr().setContext("profile",{})}_clearAllRootSpanTimeouts(){this._rootSpanTimeouts.forEach(t=>clearTimeout(t)),this._rootSpanTimeouts.clear()}_registerTraceRootSpan(t){this._activeRootSpanIds.add(t);const n=setTimeout(()=>this._onRootSpanTimeout(t),aP);this._rootSpanTimeouts.set(t,n)}_startProfilerInstance(){if(this._profiler?.stopped===!1)return;const t=K_();if(!t){w&&g.log("[Profiling] Failed to start JS Profiler.");return}this._profiler=t}_startPeriodicChunking(){this._isRunning&&(this._chunkTimer=setTimeout(()=>{if(this._collectCurrentChunk().catch(t=>{w&&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()}},iP))}_onRootSpanTimeout(t){this._rootSpanTimeouts.has(t)&&(this._rootSpanTimeouts.delete(t),this._activeRootSpanIds.has(t)&&(w&&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(){const t=this._profiler;if(this._profiler=void 0,!!t)try{const n=await t.stop(),r=VO(n,this._client,this._profilerId),o=YO(r);if("reason"in o){w&&g.log("[Profiling] Discarding invalid profile chunk (this is probably a bug in the SDK):",o.reason);return}this._sendProfileChunk(r),w&&g.log("[Profiling] Collected browser profile chunk.")}catch(n){w&&g.log("[Profiling] Error while stopping JS Profiler for chunk:",n)}}_sendProfileChunk(t){const n=this._client,r=Fo(n.getSdkMetadata?.()),o=n.getDsn(),s=n.getOptions().tunnel,i=it({event_id:Ce(),sent_at:new Date().toISOString(),...r&&{sdk:r},...!!s&&o&&{dsn:Nt(o)}},[[{type:"profile_chunk",platform:"javascript"},t]]);n.sendEnvelope(i).then(null,a=>{w&&g.error("Error while sending profile chunk envelope:",a)})}}const uP="BrowserProfiling",lP=(()=>({name:uP,setup(e){const t=e.getOptions(),n=new cP;if(!As(t)&&!t.profileLifecycle&&(t.profileLifecycle="manual"),As(t)&&!t.profilesSampleRate){w&&g.log("[Profiling] Profiling disabled, no profiling options foun
499d.");return}const r=Ee(),o=r&&ve(r);if(As(t)&&t.profileSessionSampleRate!==void 0&&w&&g.warn("[Profiling] Both legacy profiling (`profilesSampleRate`) and UI profiling settings are defined. `profileSessionSampleRate` has no effect when legacy profiling is enabled."),As(t))o&&G_(o)&&up(o)&&lp(o),e.on("spanStart",s=>{const i=ve(s);s===i?up(s)&&lp(s):X_.has(i)&&Ri(s)}),e.on("beforeEnvelope",s=>{if(!rP())return;const i=QO(s);if(!i.length)return;const a=[];for(const c of i){const u=c?.contexts,d=u?.profile?.profile_id,l=u?.profile?.start_timestamp;if(typeof d!="string"){w&&g.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!d){w&&g.log("[Profiling] cannot find profile for a span without a profile context");continue}u?.profile&&delete u.profile;const p=oP(d);if(!p){w&&g.log(`[Profiling] Could not retrieve profile for span: ${d}`);continue}const f=nP(d,l,p,c);f&&a.push(f)}XO(s,a)});else{const s=t.profileLifecycle;if(e.on("startUIProfiler",()=>n.start()),e.on("stopUIProfiler",()=>n.stop()),s==="manual")n.initialize(e);else if(s==="trace"){if(!Je(t)){w&&g.warn("[Profiling] `profileLifecycle` is 'trace' but tracing is disabled. Set a `tracesSampleRate` or `tracesSampler` to enable span tracing.");return}n.initialize(e),o&&n.notifyRootSpanActive(o),A.setTimeout(()=>{const i=Ee(),a=i&&ve(i);a&&n.notifyRootSpanActive(a)},0)}}}})),SD=lP,dP="SpotlightBrowser",fP=[{op:"ui.interaction.click",name:"#sentry-spotlight"}],pP=((e={})=>{const t=e.sidecarUrl||"http://localhost:8969/stream";return{name:dP,setup:()=>{w&&g.log("Using Sidecar URL",t)},beforeSetup(n){const r=n.getOptions();r.ignoreSpans=[...r.ignoreSpans||[],...fP]},afterAllSetup:n=>{hP(n,t)}}});function hP(e,t){const n=ju("fetch");let r=0;e.on("beforeEnvelope",o=>{if(r>3){g.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",r);return}n(t,{method:"POST",body:ti(o),headers:{"Content-Type":"application/x-sentry-envelope"},mode:"cors"}).then(s=>{s.status>=200&&s.status<400&&(r=0)},s=>{r++,g.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/",s)})})}const bD=pP,vD=()=>({name:"LaunchDarkly",processEvent(e,t,n){return Gr(e)}});function ED(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(e,t,n)=>{Gn(e,t.value),Vn(e,t.value)}}}const TD=()=>({name:"OpenFeature",processEvent(e,t,n){return Gr(e)}});class ID{after(t,n){Gn(n.flagKey,n.value),Vn(n.flagKey,n.value)}error(t,n,r){Gn(t.flagKey,t.defaultValue),Vn(t.flagKey,t.defaultValue)}}const wD=({featureFlagClientClass:e})=>({name:"Unleash",setupOnce(){const t=e.prototype;Oe(t,"isEnabled",mP)},processEvent(t,n,r){return Gr(t)}});function mP(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"?(Gn(n,r),Vn(n,r)):w&&g.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}const kD=(({growthbookClass:e})=>xT({growthbookClass:e})),RD=({featureFlagClient:e})=>({name:"Statsig",setup(t){e.on("gate_evaluation",n=>{Gn(n.gate.name,n.gate.value),Vn(n.gate.name,n.gate.value)})},processEvent(t,n,r){return Gr(t)}});async function AD(){const e=R();if(!e)return"no-client-active";if(!e.getDsn())return"no-dsn-configured";const 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 ub(()=>fetch(r,{body:"{}",method:"POST",mode:"cors",credentials:"omit"}))}catch{return"sentry-unreachable"}}const gP="WebWorker",CD=({worker:e})=>({name:gP,setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(t=>dp(t))},addWorker:t=>dp(t)});function dp(e){e.addEventListener("message",t=>{if(yP(t.data)){if(t.stopImmediatePropagation(),t.data._sentryDebugIds&&(w&&g.log("Sentry debugId web worker message received",t.data),A._sentryDebugIds={...t.data._sentryDebugIds,...A._sentryDebugIds}),t.data._sentryModuleMetadata&&(w&&g.log("Sentry module metadata web worker message received",t.data),A._sentryModuleMetadata={...t.data._sentryModuleMetadata,...A._sentryModuleMetadata}),t.data._sentryWasmImages){w&&g.log("Sentry WASM images web worker message received",t.data);const n=A._sentryWasmImages||[],r=t.data._sentryWasmImages.filter(o=>De(o)&&typeof o.code_file=="string"&&!n.some(s=>s.code_file===o.code_file));A._sentryWasmImages=[...n,...r]}t.data._sentryWorkerError&&(w&&g.log("Sentry worker rejection message received",t.data._sentryWorkerError),_P(t.data._sentryWorkerError))}})}function _P(e){const t=R();if(!t)return;const n=t.getOptions().stackParser,r=t.getOptions().attachStacktrace,o=e.reason,s=Tt(o)?Og(o
499):ea(n,o,void 0,r,!0);s.level="error",e.filename&&(s.contexts={...s.contexts,worker:{filename:e.filename}}),Uo(s,{originalException:o,mechanism:{handled:!1,type:"auto.browser.web_worker.onunhandledrejection"}}),w&&g.log("Captured worker unhandled rejection",o)}function ND({self:e}){e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0,_sentryModuleMetadata:e._sentryModuleMetadata??void 0}),e.addEventListener("unhandledrejection",t=>{const r={reason:xg(t),filename:e.location?.href};e.postMessage({_sentryMessage:!0,_sentryWorkerError:r}),w&&g.log("[Sentry Worker] Forwarding unhandled rejection to parent",r)}),w&&g.log("[Sentry Worker] Registered worker with unhandled rejection handling")}function yP(e){if(!De(e)||e._sentryMessage!==!0)return!1;const t="_sentryDebugIds"in e,n="_sentryModuleMetadata"in e,r="_sentryWorkerError"in e,o="_sentryWasmImages"in e;return!(!t&&!n&&!r&&!o||t&&!(De(e._sentryDebugIds)||e._sentryDebugIds===void 0)||n&&!(De(e._sentryModuleMetadata)||e._sentryModuleMetadata===void 0)||r&&!De(e._sentryWorkerError)||o&&(!Array.isArray(e._sentryWasmImages)||!e._sentryWasmImages.every(s=>De(s)&&typeof s.code_file=="string")))}function SP(e){return De(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function MD(e){const t={...e};um(t,"react"),Lh("react",{version:Re.version});const n=PC(t);return Fp(bP),n}function bP(e){return SP(e)?"[SyntheticEvent]":Lg(e)}function vP(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}function EP(e,t){const n=new WeakSet;function r(o,s){if(!n.has(o)){if(o.cause)return n.add(o),r(o.cause,s);o.cause=s}}r(e,t)}function Q_(e,{componentStack:t},n){if(vP(Re.version)&&$e(e)&&t){const r=new Error(e.message);r.name=`React ErrorBoundary ${e.name}`,r.stack=t,EP(e,r)}return mt(e,n)}function xD(e){return(t,n)=>{const r=!!e,o=Q_(t,n,{mechanism:{handled:r,type:"auto.function.react.error_handler"}});r&&e(t,n,o)}}const Z_="ui.react.render",TP="ui.react.update",ey="ui.react.mount",IP={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},wP={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},kP={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ty={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},RP=Symbol.for("react.forward_ref"),ny=Symbol.for("react.memo");function AP(e){return typeof e=="object"&&e!==null&&e.$$typeof===ny}const fl={};fl[RP]=kP;fl[ny]=ty;function fp(e){if(AP(e))return ty;const t=e.$$typeof;return t&&fl[t]||IP}const CP=Object.defineProperty.bind(Object),NP=Object.getOwnPropertyNames.bind(Object),pp=Object.getOwnPropertySymbols?.bind(Object),hp=Object.getOwnPropertyDescriptor.bind(Object),MP=Object.getPrototypeOf.bind(Object),mp=Object.prototype;function ss(e,t,n){if(typeof t!="string"){if(mp){const i=MP(t);i&&i!==mp&&ss(e,i)}let r=NP(t);pp&&(r=r.concat(pp(t)));const o=fp(e),s=fp(t);for(const i of r)if(!wP[i]&&!s?.[i]&&!o?.[i]&&!hp(e,i)){const a=hp(t,i);if(a)try{CP(e,i,a)}catch{}}}return e}const xP="unknown";class ry extends Re.Component{constructor(t){super(t);const{name:n,disabled:r=!1}=this.props;r||(this._mountSpan=Ge({name:`<${n}>`,onlyIfParent:!0,op:ey,attributes:{[Y]:"auto.ui.react.profiler","ui.component_name":n}}))}componentDidMount(){this._mountSpan&&this._mountSpan.end()}shouldComponentUpdate({updateProps:t,includeUpdates:n=!0}){if(n&&this._mountSpan&&t!==this.props.updateProps){const r=Object.keys(t).filter(o=>t[o]!==this.props.updateProps[o]);if(r.length>0){const o=he();this._updateSpan=Cr(this._mountSpan,()=>Ge({name:`<${this.props.name}>`,onlyIfParent:!0,op:TP,startTime:o,attributes:{[Y]:"auto.ui.react.profiler","ui.component_name":this.props.name,"ui.react.changed_props":r}}))}}return!0}componentDidUpdate(){this._updateSpan&&(this._updateSpan.end(),this._updateSpan=void 0)}componentWillUnmount(){const t=he(),{name:n,includeRender:r=!0}=this.props;if(this._mountSpan&&r){const o=$(this._mountSpan).timestamp;Cr(this._mountSpan,()=>{const s=Ge({onlyIfParent:!0,name:`<${n}>`,op:Z_,startTime:o,attributes:{[Y]:"auto.ui.react.profiler","ui.component_name":n}});s&&s.end(t)})}}render(){return this.props.children}}Object.assign(ry,{defaultProps:{disabled:!1,includeRender:!0,includeUpdates:!0}});function OD(e,t){const n=t?.name||e.displayName||e.name||xP,r=o=>Re.createElement(ry,{...t,name:n,updateProps:o},Re.createElement(e,{...o}));return r.displayName=`profiler(${n})`,ss(r,e),r}function PD(e,t={disabled:!1,hasRenderSpan:!0}
499){const[n]=Re.useState(()=>{if(!t?.disabled)return Ge({name:`<${e}>`,onlyIfParent:!0,op:ey,attributes:{[Y]:"auto.ui.react.profiler","ui.component_name":e}})});Re.useEffect(()=>(n&&n.end(),()=>{if(n&&t.hasRenderSpan){const r=$(n).timestamp,o=he(),s=Ge({name:`<${e}>`,onlyIfParent:!0,op:Z_,startTime:r,attributes:{[Y]:"auto.ui.react.profiler","ui.component_name":e}});s&&s.end(o)}}),[])}const Ne=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,OP="unknown",rc={componentStack:null,error:null,eventId:null};class PP extends Re.Component{constructor(t){super(t),this.state=rc,this._openFallbackReportDialog=!0;const n=R();n&&t.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=n.on("afterSendEvent",r=>{!r.type&&this._lastEventId&&r.event_id===this._lastEventId&&gf({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,n){const{componentStack:r}=n,{beforeCapture:o,onError:s,showDialog:i,dialogOptions:a}=this.props;Ke(c=>{o&&o(c,t,r);const u=this.props.handled!=null?this.props.handled:!!this.props.fallback,d=Q_(t,n,{mechanism:{handled:u,type:"auto.function.react.error_boundary"}});s&&s(t,r,d),i&&(this._lastEventId=d,this._openFallbackReportDialog&&gf({...a,eventId:d})),this.setState({error:t,componentStack:r,eventId:d})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:n,eventId:r}=this.state,{onUnmount:o}=this.props;o&&(this.state===rc?o(null,null,null):o(t,n,r)),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}resetErrorBoundary(){const{onReset:t}=this.props,{error:n,componentStack:r,eventId:o}=this.state;t&&t(n,r,o),this.setState(rc)}render(){const{fallback:t,children:n}=this.props,r=this.state;if(r.componentStack===null)return typeof n=="function"?n():n;const o=typeof t=="function"?Re.createElement(t,{error:r.error,componentStack:r.componentStack,resetError:()=>this.resetErrorBoundary(),eventId:r.eventId}):t;return Re.isValidElement(o)?o:(t&&Ne&&g.warn("fallback did not produce a valid ReactElement"),null)}}function LD(e,t){const n=e.displayName||e.name||OP,r=Re.memo(o=>Re.createElement(PP,{...t},Re.createElement(e,{...o})));return r.displayName=`errorBoundary(${n})`,ss(r,e),r}const LP="redux.action",DP="info",FP={attachReduxState:!0,actionTransformer:e=>e,stateTransformer:e=>e||null};function DD(e){const t={...FP,...e};return n=>(r,o)=>{t.attachReduxState&&gr().addEventProcessor((a,c)=>{try{a.type===void 0&&a.contexts.state.state.type==="redux"&&(c.attachments=[...c.attachments||[],{filename:"redux_state.json",data:JSON.stringify(a.contexts.state.state.value)}])}catch{}return a});function s(a){return(c,u)=>{const d=a(c,u),l=W(),p=t.actionTransformer(u);typeof p<"u"&&p!==null&&kt({category:LP,data:p,type:DP});const f=t.stateTransformer(d);if(typeof f<"u"&&f!==null){const y=R()?.getOptions()?.normalizeDepth||3,S={state:{type:"redux",value:f}};$y(S,3+y),l.setContext("state",S)}else l.setContext("state",null);const{configureScopeWithState:h}=t;return typeof h=="function"&&h(l,d),d}}const i=n(s(r),o);return i.replaceReducer=new Proxy(i.replaceReducer,{apply:function(a,c,u){a.apply(c,[s(u[0])])}}),i}}function FD(e){const t=ns({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,match:o,instrumentPageLoad:s=!0,instrumentNavigation:i=!0}=e;return{...t,afterAllSetup(a){t.afterAllSetup(a),s&&A.location&&gp(r,A.location,o,(c,u="url")=>{rs(a,{name:c,attributes:{[ue]:"pageload",[Y]:"auto.pageload.react.reactrouter_v3",[le]:u,...u==="route"&&{[Ve]:c}}})}),i&&n.listen&&n.listen(c=>{(c.action==="PUSH"||c.action==="POP")&&gp(r,c,o,(u,d="url")=>{os(a,{name:u,attributes:{[ue]:"navigation",[Y]:"auto.navigation.react.reactrouter_v3",[le]:d,...d==="route"&&{[Ve]:u}}})})})}}}function gp(e,t,n,r){let o=t.pathname;n({location:t,routes:e},(s,i,a)=>{if(s||!a)return r(o);const c=$P(a.routes||[]);return c.length===0||c==="/*"?r(o):(o=c,r(o,"route"))})}function $P(e){if(!Array.isArray(e)||e.length===0)return"";const t=e.filter(r=>!!r.path);let n=-1;for(let r=t.length-1;r>=0;r--)if(t[r].path?.startsWith("/")){n=r;break}return t.slice(n).reduce((r,{path:o})=>{const s=r==="/"||r===""?o:`/${o}`;return`${r}${s}`},"")}function $D(e,t={}){const n=e,r=ns({...t,instrumentNavigation:!1,instrumentPageLoad:!1}),{instrumentPageLoad:o=!0,instrumentNavigation:s=!0}=t;return{...r,afterAllSetup(i){r.afterAllSetup(i);const a=(d,l)=>{const p=n.matchRoutes(d,l,{preload:!1,throwOnError:!1}),f=p[p.length-1];return f?.routeId!=="__root__"?f:void 0},c=(d,l,p,f)=>{d.updateName(l?l.routeId:f),d.setAttribute(le,l?"route":"url"),d.setAttributes({...l&&{[Ve]:l.routeId},...BP(n,p),...oc(l)})},u=A.location;if(o&&u){const d=n.state?.location,l=d?a(d.pathname,d.search):a(u.pathname,n.options.parseSearch(u.search)),p=rs(i,{name:l?l.routeId:u.pathname,attributes:{[ue]:"pageload",[Y]:"auto.pageload.react.tanstack_router",[le]:l?"route":"url",...l&&{[Ve]:l.routeId},...oc(l)}}),f=n.subscribe("onResolved",h=>{if(f(),!p)return;const{toLocation:m}=h,_=a(m.pathname,m.search);c(p,_,m,m.pathname)})}if(s){let d;n.subscribe("onBeforeLoad",l=>{const{toLocation:p,fromLocation:f}=l;if(!f||p.state===f.state)return;const h=a(p.pathname,p.search),m=A.location?.pathname||p.pathname;if(d){c(d,h,p,m);return}d=os(i,{name:h?h.routeId:m,attributes:{[ue]:"navigation",[Y]:"auto.navigation.react.tanstack_router",[le]:h?"route":"url",...h&&{[Ve]:h.routeId},...oc(h)}},{url:oy(n,p)})}),n.subscribe("onResolved",l=>{const p=d;if(d=void 0,!p)return;const{toLocation:f}=l,h=a(f.pathname,f.search);h&&c(p,h,f,A.location?.pathname||f.pathname)})}}}}function oy(e,t){const n=e.options.stringifySearch?.(t.search)??"",r=`${t.pathname}${n&&n!=="?"?n:""}`;return SA(r)}function BP(e,t){const n=oy(e,t);return{[Nh]:t.pathname,[vn]:Ye(n)}}function oc(e){if(!e)return{};const t={};
499return Object.entries(e.params).forEach(([n,r])=>{t[`url.path.params.${n}`]=r,t[`${Ub}.${n}`]=r,t[`${Pb}.${n}`]=r}),t}function BD(e){const t=ns({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,matchPath:o,instrumentPageLoad:s=!0,instrumentNavigation:i=!0}=e;return{...t,afterAllSetup(a){t.afterAllSetup(a),sy(a,s,i,n,"reactrouter_v4",r,o)}}}function UD(e){const t=ns({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,matchPath:o,instrumentPageLoad:s=!0,instrumentNavigation:i=!0}=e;return{...t,afterAllSetup(a){t.afterAllSetup(a),sy(a,s,i,n,"reactrouter_v5",r,o)}}}function sy(e,t,n,r,o,s=[],i){function a(){if(r.location)return r.location.pathname;if(A.location)return A.location.pathname}function c(u){if(s.length===0||!i)return[u,"url"];const d=iy(s,u,i);for(const l of d)if(l.match.isExact)return[l.match.path,"route"];return[u,"url"]}if(t){const u=a();if(u){const[d,l]=c(u);rs(e,{name:d,attributes:{[ue]:"pageload",[Y]:`auto.pageload.react.${o}`,[le]:l,...l==="route"&&{[Ve]:d}}})}}n&&r.listen&&r.listen((u,d)=>{if(d&&(d==="PUSH"||d==="POP")){const[l,p]=c(u.pathname);os(e,{name:l,attributes:{[ue]:"navigation",[Y]:`auto.navigation.react.${o}`,[le]:p,...p==="route"&&{[Ve]:l}}})}})}function iy(e,t,n,r=[]){return e.some(o=>{const s=o.path?n(t,o):r.length?r[r.length-1].match:UP(t);return s&&(r.push({route:o,match:s}),o.routes&&iy(o.routes,t,n,r)),!!s}),r}function UP(e){return{path:"/",url:"/",params:{},isExact:e==="/"}}function HD(e){const t=e.displayName||e.name,n=r=>{if(r?.computedMatch?.isExact){const o=r.computedMatch.path,s=HP();W().setTransactionName(o),s&&(s.updateName(o),s.setAttributes({[le]:"route",[Ve]:o}))}return Re.createElement(e,{...r})};return n.displayName=`sentryRoute(${t})`,ss(n,e),n}function HP(){const e=Ee(),t=e&&ve(e);if(!t)return;const n=$(t).op;return n==="navigation"||n==="pageload"?t:void 0}function Zr(e,t){if(!t||t==="/"||!e.toLowerCase().startsWith(t.toLowerCase()))return e;const n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?e:e.slice(n)||"/"}const _p=new WeakMap;function WP(e,t,n){if(!e||!t?.length)return null;const r=n?Zr(e,n):e;let o=_p.get(t);o||(o=YP(t),_p.set(t,o),Ne&&g.log("[React Router] Sorted route manifest by specificity:",o.length,"patterns"));for(const s of o)if(jP(r,s))return Ne&&g.log("[React Router] Matched pathname",r,"to pattern",s),s;return Ne&&g.log("[React Router] No manifest match found for pathname:",r),null}function jP(e,t){if(t==="/")return e==="/"||e==="";const n=Sp(e),r=Sp(t);if(r.length>0&&r[r.length-1]==="*"){const s=r.slice(0,-1);if(n.length<s.length)return!1;for(const[i,a]of s.entries())if(!yp(n[i],a))return!1;return!0}if(n.length!==r.length)return!1;for(const[s,i]of r.entries())if(!yp(n[s],i))return!1;return!0}function yp(e,t){return e===void 0||t===void 0?!1:ay.test(t)?!0:e===t}function Sp(e){return e.split("/").filter(Boolean)}const ay=/^:[\w-]+$/,zP=10,qP=3,GP=1,VP=-2;function bp(e){const t=e.split("/");let n=t.length;t.includes("*")&&(n+=VP);for(const r of t)r!=="*"&&(ay.test(r)?n+=qP:r===""?n+=GP:n+=zP);return n}function YP(e){return[...e].sort((t,n)=>{const r=bp(t);return bp(n)-r})}let ya,Hn=!1;const sn=[],JP=10;function KP(e,t){const n={};return sn.length>=JP&&(Ne&&g.warn("[React Router] Navigation context stack overflow - removing oldest context"),sn.shift()),sn.push({token:n,targetPath:e,span:t}),n}function XP(e){sn[sn.length-1]?.token===e&&sn.pop()}function cy(){const e=sn.length;return e>0?sn[e-1]??null:null}function QP(e,t=!1){ya=e,Hn=t}function ZP(e){return ly(e.route.path||"")}function uy(e){return e.params["*"]||""}function ly(e){return e[e.length-1]==="*"?e.slice(0,-1):e}function Wn(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function dy(e){return e.endsWith("*")}function mn(e){return e.includes("/*")||e.endsWith("*")}function vp(e,t){return dy(e)&&!!t.route.children?.length||!1}function fy(e){return!!(!e.children&&e.element&&e.path?.endsWith("/*"))}
499function eL(e,t,n){const r=e&&e.length>0?e:Hn?Zr(t,n):t;let o=r.slice(-2)==="/*"?r.slice(0,-2):r;return o.length>1&&o[o.length-1]==="/"&&(o=o.slice(0,-1)),[o,"route"]}function Ep(e){return e.split(/\\?\//).filter(t=>t.length>0&&t!==",").length}function en(e){return e[0]==="/"?e:`/${e}`}function pl(e,t){const n=ya(e,t);if(!n||n.length===0)return"";for(const r of n)if(r.route.path&&r.route.path!=="*"){const o=ZP(r),s=Zr(t.pathname,en(r.pathnameBase));return t.pathname===s?Wn(s):Wn(Wn(o||"")+en(pl(e.filter(i=>i!==r.route),{pathname:s})))}return""}function tL(e,t,n){const r=t.filter(fy);if(!r.length)return;const o=ya(r,e),s=o?.[o.length-1];if(!s||!uy(s))return;const i=Wn(ly(s.route.path||""));if(!i)return;const a=en(i),c=i.split("/")[0],u=c?.startsWith(":")&&n?.split("/").includes(c);if(n===a||n?.startsWith(`${a}/`)||u)return;const d=Zr(e.pathname,en(s.pathnameBase))||"/",l=pl(t.filter(p=>p!==s.route),{pathname:d});return l?en(`${i}${en(l)}`):void 0}function nL(e,t){const n=ya(t,e);if(n){for(const r of n)if(fy(r.route)&&uy(r))return!0}return!1}function Tp(e,t){return Hn?Zr(e.pathname,t):e.pathname||""}function rL(e,t,n,r=""){if(!e||e.length===0)return[Hn?Zr(t.pathname,r):t.pathname,"url"];if(!n)return[Tp(t,r),"url"];let o="";for(const s of n){const i=s.route;if(!i)continue;if(i.index)return eL(o,s.pathname,r);const a=i.path;if(!a||vp(a,s))continue;const c=a[0]==="/"||o[o.length-1]==="/"?a:`/${a}`;if(o=Wn(o)+en(c),Wn(t.pathname)===Wn(r+s.pathname))return Ep(o)!==Ep(s.pathname)&&!dy(o)?[(Hn?"":r)+c,"route"]:(vp(o,s)&&(o=o.slice(0,-1)),[(Hn?"":r)+o,"route"])}return[Tp(t,r),"url"]}function Sa(e,t,n,r,o="",s,i){if(i&&s&&s.length>0){const l=WP(e.pathname,s,o);if(l)return[(Hn?"":o)+l,"route"]}let a,c="url";const u=nL(e,n);u&&(a=en(pl(n,e)),c="route"),(!u||!a)&&([a,c]=rL(t,e,r,o));const d=tL(e,n,a);return d?[d,"route"]:[a||e.pathname,c]}function Rt(){const e=Ee(),t=e?ve(e):void 0;if(!t)return;const n=$(t).op;return n==="navigation"||n==="pageload"?t:void 0}function oL(){const e=cy();if(e)return e.targetPath?{pathname:e.targetPath,search:"",hash:"",state:null,key:"default"}:null;if(typeof A<"u")try{const t=A.location;if(t)return{pathname:t.pathname,search:t.search||"",hash:t.hash||"",state:null,key:"default"}}catch{Ne&&g.warn("[React Router] Could not access window.location")}return null}function sL(){const e=cy();return e?e.span:Rt()}function iL(e,t,n,r){const o=new Proxy(e,{apply(s,i,a){const c=oL(),u=sL(),d=s.apply(i,a);return aL(d,t,n,r,c,u),d}});return ye(o,"__sentry_proxied__",!0),o}function aL(e,t,n,r,o,s){yn(e)?e.then(i=>{Array.isArray(i)&&r(i,t,o??void 0,s)}).catch(i=>{Ne&&g.warn(`Error resolving async handler '${n}' for route`,t,i)}):Array.isArray(e)&&r(e,t,o??void 0,s)}function ba(e,t){if(e.handle&&typeof e.handle=="object")for(const n of Object.keys(e.handle)){const r=e.handle[n];typeof r=="function"&&!r.__sentry_proxied__&&(e.handle[n]=iL(r,e,n,t))}if(Array.isArray(e.children))for(const n of e.children)ba(n,t)}let Wr,an,cn,qs,st,En=!1,Dn=3e3,is,hl="";const py=new WeakSet,Ai=A?.document?Re.useLayoutEffect:Re.useEffect,On=new WeakMap,Ae=new Set,Gs=new WeakMap,Yc=new WeakMap;function cL(e){return A?.requestAnimationFrame?A.requestAnimationFrame(e):setTimeout(e,0)}function Ip(e){A?.cancelAnimationFrame?A.cancelAnimationFrame(e):clearTimeout(e)}function hy(e){return`${e.pathname}${e.search||""}${e.hash||""}`}function wp(e){return e.includes(":")||e.includes("*")}function uL(e,t,n,r){if(!e)return{skip:!1,shouldUpdate:!1};if(e.locationKey===t&&(e.isPlaceholder||!r)){const s=!!e.routeName&&mn(e.routeName),i=mn(n),a=!!e.routeName&&wp(e.routeName),c=wp(n),u=s&&!i,d=!a&&c,l=n!==e.routeName&&n.length>(e.routeName?.length||0)&&!i;return{skip:!0,shouldUpdate:!!(e.routeName&&(u||d||l))}}return{skip:!1,shouldUpdate:!1}}function my(e,t){const n=t.children||[],r=e.filter(o=>!n.some(s=>s===o||o.path&&s.path===o.path||o.id&&s.id===o.id));r.length>0&&(t.children=[...n,...r])}function gy(e,t){let n=Gs.get(e);n||(n=new Set,Gs.set(e,n)),n.add(t),t.finally(()=>{const r=Gs.get(e);r&&r.delete(t)})}function _y(e){const t=new Promise(n=>{Yc.set(e,n)});gy(e,t)}function lL(e){const t=Yc.get(e);t&&(t(),Yc.delete(e),e.__sentry_may_have_lazy_routes__&&(e.__sentry_may_have_lazy_routes__=!1))}function ml(e,t,n=null,r){e.forEach(s=>{Ae.add(s),En&&ba(s,ml)}),t&&my(e,t);const o=r??Rt();if(o){const s=$(o);if(s.timestamp){Ne&&g.warn("[React Router] Lazy handler resolved after span ended - skipping update");return}const i=s.op;let a=n;if(!a&&!r&&typeof A<"u"){const c=A.location;c?.pathname&&(a={pathname:c.pathname})}a&&(i==="pageload"?cs({activeRootSpan:o,location:{pathname:a.pathname},routes:Array.from(Ae),allRoutes:Array.from(Ae)}):i==="navigation"&&Jc(o,a,Array.from(Ae),!1,st))}}
499function Jc(e,t,n,r=!1,o){const s=$(e),i=s.description,a=e?.__sentry_navigation_name_set__,c=i&&mn(i);if((!a||r||c)&&!s.timestamp){const d=o(n,t),[l,p]=Sa(t,n,n,d||[],hl,is,En),f=s.data?.[le];l&&(!i||!a&&(f!=="route"||p==="route")||f!=="route"&&p==="route"||f==="route"&&p==="route"&&c)&&(e.updateName(l),e.setAttribute(le,p),p==="route"&&e.setAttribute(Ve,l),!mn(l)&&p==="route"&&ye(e,"__sentry_navigation_name_set__",!0))}}function yy(e,t,n,r,o){let s=!1,i=!!o&&$(o).op==="pageload",a=!1,c=null,u=null;e.subscribe(d=>{if(!s){const p=Rt();p&&$(p).op==="pageload"?i=!0:i&&(d.historyAction==="POP"&&!a?a=!0:s=!0)}if(d.historyAction==="PUSH"||d.historyAction==="POP"&&s){const p=hy(d.location),f=()=>{u!==p&&(u=p,c=null,bl({location:d.location,routes:t,navigationType:d.historyAction,version:n,basename:r,allRoutes:Array.from(Ae)}))};d.navigation.state!=="idle"?(u!==p&&(u=null),c!==null&&Ip(c),c=cL(f)):(c!==null&&(Ip(c),c=null),f())}})}function gl(e,t){return!Wr||!an||!cn||!st?(Ne&&g.warn(`reactRouter${t?`V${t}`:""}Instrumentation was unable to wrap the \`createRouter\` function because of one or more missing parameters.`),e):function(n,r){if(as(n),En)for(const u of n)ba(u,ml);const o=Rt();r&&"patchRoutesOnNavigation"in r&&typeof r.patchRoutesOnNavigation=="function"&&o&&(ye(o,"__sentry_may_have_lazy_routes__",!0),_y(o));const i=Sy(r,!1,o),a=e(n,i),c=r?.basename;return a.state.historyAction==="POP"&&o&&cs({activeRootSpan:o,location:a.state.location,routes:n,basename:c,allRoutes:Array.from(Ae)}),hl=c||"",yy(a,n,t,c,o),a}}function _l(e,t){return!Wr||!an||!cn||!st?(Ne&&g.warn(`reactRouter${t?`V${t}`:""}Instrumentation was unable to wrap the \`createMemoryRouter\` function because of one or more missing parameters.`),e):function(n,r){if(as(n),En)for(const _ of n)ba(_,ml);const o=Rt();r&&"patchRoutesOnNavigation"in r&&typeof r.patchRoutesOnNavigation=="function"&&o&&(ye(o,"__sentry_may_have_lazy_routes__",!0),_y(o));const i=Sy(r,!0,o),a=e(n,i),c=r?.basename;let u;const d=r?.initialEntries,l=r?.initialIndex,p=d?.length===1,f=l!==void 0&&d?.[l];u=p?d[0]:f?d[l]:void 0;const h=u?typeof u=="string"?{pathname:u}:u:a.state.location,m=Rt();return a.state.historyAction==="POP"&&m&&cs({activeRootSpan:m,location:h,routes:n,basename:c,allRoutes:Array.from(Ae)}),hl=c||"",yy(a,n,t,c,m),a}}function yl(e,t){const n=ns({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{useEffect:r,useLocation:o,useNavigationType:s,createRoutesFromChildren:i,matchRoutes:a,stripBasename:c,enableAsyncRouteHandlers:u=!1,instrumentPageLoad:d=!0,instrumentNavigation:l=!0,lazyRouteTimeout:p,lazyRouteManifest:f}=e;return{...n,setup(h){n.setup(h);const m=e.finalTimeout??3e4,_=(e.idleTimeout??1e3)*3,y=p??_;y===1/0?(Dn=m,Ne&&g.log("[React Router] lazyRouteTimeout set to Infinity, capping at finalTimeout:",m,"ms to prevent indefinite hangs")):Number.isNaN(y)?(Ne&&g.warn("[React Router] lazyRouteTimeout must be a number, falling back to default:",_),Dn=_):y<0?(Ne&&g.warn("[React Router] lazyRouteTimeout must be non-negative or Infinity, got:",y,"falling back to:",_),Dn=_):Dn=y,Wr=r,an=o,cn=s,st=a,qs=i,En=u,is=f,QP(a,c||!1)},afterAllSetup(h){n.afterAllSetup(h);const m=A.location?.pathname;d&&m&&rs(h,{name:m,attributes:{[le]:"url",[ue]:"pageload",[Y]:`auto.pageload.react.reactrouter${t?`_v${t}`:""}`}}),l&&py.add(h)}}}function Sl(e,t){if(!Wr||!an||!cn||!st)return Ne&&g.warn("reactRouterV6Instrumentation was unable to wrap `useRoutes` because of one or more missing parameters."),e;const n=r=>{const o=Re.useRef(!0),{routes:s,locationArg:i}=r,a=e(s,i),c=an(),u=cn(),d=typeof i=="string"||i?.pathname?i:c;return Ai(()=>{const l=as(s);return()=>by(l)}),Ai(()=>{const l=typeof d=="string"?{pathname:d}:d;o.current?(cs({activeRootSpan:Rt(),location:l,routes:s,allRoutes:Array.from(Ae)}),o.current=!1):bl({location:l,routes:s,navigationType:u,version:t,allRoutes:Array.from(Ae)})},[u,d]),a};return(r,o)=>Re.createElement(n,{routes:r,locationArg:o})}function Sy(e,t=!1,n){if(!e||!("patchRoutesOnNavigation"in e)||typeof e.patchRoutesOnNavigation!="function")return e||{};const r=e.patchRoutesOnNavigation;return{...e,patchRoutesOnNavigation:async o=>{const s=o?.path,i=Rt()??n;if(!t){const c=o?.patch,u=o?.matches;c&&(o.patch=(d,l)=>{if(as(l),u&&u.length>0){const h=u[u.length-1]?.route;if(h){const m=Array.from(Ae).find(_=>{const y=_.id!==void 0&&_.id===d,S=_===h,I=_.path!==void 0&&h.path!==void 0&&_.path===h.path;return y||S||I});m&&my(l,m)}}const p=i?$(i):void 0;return s&&i&&p&&!p.timestamp&&p.op==="navigation"&&Jc(i,{pathname:s,search:"",hash:"",state:null,key:"default"},Array.from(Ae),!0,st),c(d,l)})}const a=(async()=>{const c=KP(s,i);let u;
499try{u=await r(o)}finally{XP(c),i&&lL(i)}const d=i?$(i):void 0;if(i&&d&&!d.timestamp&&d.op==="navigation"){const l=s;l&&Jc(i,{pathname:l,search:"",hash:"",state:null,key:"default"},Array.from(Ae),!1,st)}return u})();return i&&gy(i,a),a}}}function bl(e){const{location:t,routes:n,navigationType:r,version:o,matches:s,basename:i,allRoutes:a}=e,c=Array.isArray(s)?s:st(a||n,t,i),u=R();if(!u||!py.has(u))return;const d=Rt();if(!(d&&$(d).op==="pageload"&&r==="POP")&&(r==="PUSH"||r==="POP")&&c){const[l,p]=Sa(t,a||n,a||n,c,i,is,En),f=hy(t),h=On.get(u),m=h&&!h.isPlaceholder?!!$(h.span).timestamp:!1,{skip:_,shouldUpdate:y}=uL(h,f,l,m);if(_){if(y&&h){const T=h.routeName;h.isPlaceholder?(h.routeName=l,Ne&&g.log(`[Tracing] Updated placeholder navigation name from "${T}" to "${l}" (will apply to real span)`)):(h.span.updateName(l),h.span.setAttribute(le,p),p==="route"&&h.span.setAttribute(Ve,l),ye(h.span,"__sentry_navigation_name_set__",!0),h.routeName=l,Ne&&g.log(`[Tracing] Updated navigation span name from "${T}" to "${l}"`))}else Ne&&g.log(`[Tracing] Skipping duplicate navigation for location: ${f}`);return}const I={span:{end:()=>{}},routeName:l,pathname:t.pathname,locationKey:f,isPlaceholder:!0};On.set(u,I);let b;try{b=os(u,{name:I.routeName,attributes:{[le]:p,[ue]:"navigation",[Y]:`auto.navigation.react.reactrouter${o?`_v${o}`:""}`,...p==="route"&&{[Ve]:I.routeName}}})}catch(T){throw On.delete(u),T}b?(On.set(u,{span:b,routeName:I.routeName,pathname:t.pathname,locationKey:f}),Kc(b,t,n,i,"navigation")):On.delete(u)}}function as(e){const t=[];return e.forEach(n=>{vy(n).forEach(o=>{Ae.add(o),t.push(o)})}),t}function by(e){e.forEach(t=>{Ae.delete(t)})}function vy(e,t=new Set){return t.has(e)||(t.add(e),e.children&&!e.index&&e.children.forEach(n=>{vy(n,t).forEach(o=>{t.add(o)})})),t}function cs({activeRootSpan:e,location:t,routes:n,matches:r,basename:o,allRoutes:s}){const i=Array.isArray(r)?r:st(s||n,t,o);if(i){const[a,c]=Sa(t,s||n,s||n,i,o,is,En);W().setTransactionName(a||"/"),e&&(e.updateName(a),e.setAttribute(le,c),c==="route"&&e.setAttribute(Ve,a),Kc(e,t,n,o,"pageload"))}else e&&Kc(e,t,n,o,"pageload")}function dL(e,t,n,r,o=!1){return n?!!(!e&&o||e&&mn(e)&&r==="route"&&!mn(n)||t!=="route"&&r==="route"):!1}function sc(e,t,n,r,o,s,i,a){try{const c=t.data?.[le];if(c==="route"&&n&&!mn(n))return;const u=Array.from(a),d=u.length>0?u:o,l=st(d,r,s);if(!l)return;const[p,f]=Sa(r,d,d,l,s,is,En),h=dL(n,c,p,f,!0),m=i==="pageload"||!t.timestamp;h&&m&&(e.updateName(p),e.setAttribute(le,f),f==="route"&&e.setAttribute(Ve,p))}catch(c){Ne&&g.warn(`Error updating span details before ending: ${c}`)}}function Kc(e,t,n,r,o){const s=`__sentry_${o}_end_patched__`;if(e?.[s]||!e.end)return;const a=e.end.bind(e);let c=!1;e.end=function(...d){if(c)return;c=!0;const l=d.length>0?d[0]:Date.now()/1e3,p=$(e),f=p.description,h=p.data?.[le],m=()=>{const b=R();if(b&&o==="navigation"){const T=On.get(b);T&&T.span===e&&On.delete(b)}},_=Gs.get(e),y=e.__sentry_may_have_lazy_routes__;if((_&&_.size>0||y)&&f&&(mn(f)||h!=="route")){if(Dn===0){sc(e,p,f,t,n,r,o,Ae),m(),a(l);return}const b=new Promise(C=>setTimeout(C,Dn));let T;if(_&&_.size>0){const C=Promise.allSettled(_).then(()=>{});T=Dn===1/0?C:Promise.race([C,b])}else T=b;T.then(()=>{const C=$(e);sc(e,C,C.description,t,n,r,o,Ae),m(),a(l)}).catch(()=>{m(),a(l)});return}sc(e,p,f,t,n,r,o,Ae),m(),a(l)},ye(e,s,!0)}function vl(e,t){if(!Wr||!an||!cn||!qs||!st)return Ne&&g.warn(`reactRouterV6Instrumentation was unable to wrap Routes because of one or more missing parameters. 500 useEffect: ${Wr}. useLocation: ${an}. useNavigationType: ${cn}. 501 createRoutesFromChildren: ${qs}. matchRoutes: ${st}.`),e;const n=r=>{const o=Re.useRef(!0),s=an(),i=cn(),a=qs(r.children);return Ai(()=>{const c=as(a);return()=>by(c)}),Ai(()=>{o.current?(cs({activeRootSpan:Rt(),location:s,routes:a,allRoutes:Array.from(Ae)}),o.current=!1):bl({location:s,routes:a,navigationType:i,version:t,allRoutes:Array.from(Ae)})},[s,i]),Re.createElement(e,{...r})};return ss(n,e),n}function WD(e){return yl(e,"6")}function jD(e){return Sl(e,"6")}function zD(e){return gl(e,"6")}function qD(e){return _l(e,"6")}function GD(e){return vl(e,"6")}function VD(e){return yl(e,"7")}function YD(e){return vl(e,"7")}function JD(e){return gl(e,"7")}function KD(e){return _l(e,"7")}function XD(e){return Sl(e,"7")}function QD(e){return yl(e,"")}function ZD(e){return vl(e,"")}function eF(e){return gl(e,"")}function tF(e){return _l(e,"")}function nF(e){return Sl(e,"")}export{Uk as BrowserClient,PP as ErrorBoundary,Pa as MULTIPLEXED_TRANSPORT_EXTRA_KEY,ID as OpenFeatureIntegrationHook,ry as Profiler,tn as SDK_VERSION,ue as SEMANTIC_ATTRIBUTE_SENTRY_OP,Y as SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,nu as SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,le as SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,wt as Scope,A as WINDOW,kt as addBreadcrumb,cv as addEventProcessor,rd as addIntegration,yL as bindScopeToEmitter,JA as breadcrumbsIntegration,iC as browserApiErrorsIntegration,SD as browserProfilingIntegration,fC as browserSessionIntegration,ns as browserTracingIntegration,ED as buildLaunchDarklyFlagUsedHandler,xL as captureConsoleIntegration,Uo as captureEvent,mt as captureException,jT as captureFeedback,sv as captureMessage,Q_ as captureReactException,Aa as captureSession,OA as chromeStackLineParser,AL as close,UL as consoleLoggingIntegration,cD as contextLinesIntegration,_L as continueTrace,WL as createConsolaReporter,jm as createLangChainCallbackHandler,DD as createReduxEnhancer,$v as createTransport,rD as createUserFeedbackEnvelope,mC as cultureContextIntegration,jE as dedupeIntegration,$_ as defaultRequestInstrumentationOptions,zA as defaultStackLineParsers,qA as defaultStackParser,AD as diagnoseSdkConnectivity,QL as elementTimingIntegration,Dh as endSession,IE as eventFiltersIntegration,Lk as eventFromException,Dk as eventFromMessage,Du as exceptionFromError,OL as extraErrorDataIntegration,$L as featureFlagsIntegration,KL as feedbackAsyncIntegration,
501XL as feedbackIntegration,XL as feedbackSyncIntegration,SO as fetchStreamPerformanceIntegration,RL as flush,oD as forceLoad,vE as functionToStringIntegration,FA as geckoStackLineParser,SA as getAbsoluteUrl,Ee as getActiveSpan,R as getClient,W as getCurrentScope,OC as getDefaultIntegrations,JL as getFeedback,gr as getGlobalScope,Se as getIsolationScope,pD as getReplay,ve as getRootSpan,Ns as getSpanDescendants,ES as getSpanStatusFromHttpCode,lm as getTraceData,yC as globalHandlersIntegration,uD as graphqlClientIntegration,kD as growthbookIntegration,aD as httpClientIntegration,TC as httpContextIntegration,wE as inboundFiltersIntegration,MD as init,zL as instrumentAnthropicAiClient,VL as instrumentCreateReactAgent,qL as instrumentGoogleGenAIClient,GL as instrumentLangChainEmbeddings,YL as instrumentLangGraph,jL as instrumentOpenAiClient,dO as instrumentOutgoingRequests,J0 as instrumentStateGraph,pT as instrumentSupabaseClient,NO as isBotUserAgent,av as isEnabled,CL as isInitialized,iv as lastEventId,vD as launchDarklyIntegration,Rk as lazyLoadIntegration,AC as linkedErrorsIntegration,BL as logger,yD as makeBrowserOfflineTransport,Ng as makeFetchTransport,NL as makeMultiplexedTransport,HL as metrics,ML as moduleMetadataIntegration,Lg as normalizeStringifyValue,sD as onLoad,TD as openFeatureIntegration,tD as opera10StackLineParser,nD as opera11StackLineParser,pE as parameterize,xD as reactErrorHandler,QD as reactRouterBrowserTracingIntegration,FD as reactRouterV3BrowserTracingIntegration,BD as reactRouterV4BrowserTracingIntegration,UD as reactRouterV5BrowserTracingIntegration,WD as reactRouterV6BrowserTracingIntegration,VD as reactRouterV7BrowserTracingIntegration,WS as registerSpanErrorInstrumentation,ND as registerWebWorker,hD as replayCanvasIntegration,fD as replayIntegration,mD as reportPageLoaded,iD as reportingObserverIntegration,PL as rewriteFramesIntegration,Nw as sendFeedback,gD as setActiveSpanInBrowser,IL as setAttribute,TL as setAttributes,Lh as setContext,kL as setConversationId,tE as setCurrentClient,bL as setExtra,SL as setExtras,Js as setHttpStatus,vh as setMeasurement,EL as setTag,vL as setTags,wL as setUser,gf as showReportDialog,_D as spanStreamingIntegration,mL as spanToBaggageHeader,$ as spanToJSON,BS as spanToTraceHeader,bD as spotlightBrowserIntegration,os as startBrowserTracingNavigationSpan,rs as startBrowserTracingPageLoadSpan,Ge as startInactiveSpan,lb as startNewTrace,ed as startSession,qt as startSpan,Xt as startSpanManual,RD as statsigIntegration,LL as supabaseIntegration,ub as suppressTracing,$D as tanstackRouterBrowserTracingIntegration,FL as thirdPartyErrorFilterIntegration,ZL as uiProfiler,wD as unleashIntegration,hL as updateSpanName,PD as useProfiler,lD as viewHierarchyIntegration,bO as webVitalsIntegration,CD as webWorkerIntegration,eD as winjsStackLineParser,Cr as withActiveSpan,LD as withErrorBoundary,pL as withIsolationScope,OD as withProfiler,Ke as withScope,GD as withSentryReactRouterV6Routing,YD as withSentryReactRouterV7Routing,HD as withSentryRouting,gL as withStreamedSpan,eF as wrapCreateBrowserRouter,zD as wrapCreateBrowserRouterV6,JD as wrapCreateBrowserRouterV7,tF as wrapCreateMemoryRouter,qD as wrapCreateMemoryRouterV6,KD as wrapCreateMemoryRouterV7,ZD as wrapReactRouterRouting,nF as wrapUseRoutes,jD as wrapUseRoutesV6,XD as wrapUseRoutesV7,DL 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.