1import{r as Ae}from"./react-daO8XSXc.js";const A=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,U=globalThis,sn="10.74.0";function xt(){return qr(U),U}function qr(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||sn,t[sn]=t[sn]||{}}function Gr(e,t,n=U){const r=n.__SENTRY__=n.__SENTRY__||{},o=r[sn]=r[sn]||{};return o[e]||(o[e]=t())}const qc=["debug","info","warn","error","log","assert","trace"],my="Sentry Logger ",Ys={};function Jt(e){if(!("console"in U))return e();const t=U.console,n={},r=Object.keys(Ys);r.forEach(o=>{const s=Ys[o];n[o]=t[o],t[o]=s});try{return e()}finally{r.forEach(o=>{t[o]=n[o]})}}function gy(){Vc().enabled=!0}function _y(){Vc().enabled=!1}function Rp(){return Vc().enabled}function yy(...e){Gc("log",...e)}function Sy(...e){Gc("warn",...e)}function by(...e){Gc("error",...e)}function Gc(e,...t){A&&Rp()&&Jt(()=>{U.console[e](`${my}[${e}]:`,...t)})}function Vc(){return A?Gr("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const _={enable:gy,disable:_y,isEnabled:Rp,log:yy,warn:Sy,error:by},kp=50,Rt="?",ml=/\(error: (.*)\)/,gl=/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=ml.test(c)?c.replace(ml,"$1"):c;if(!u.includes("Error: ")){for(const f of t){const l=f(u);if(l){s.push(l);break}}if(s.length>=kp+o)break}}return vy(s.slice(o))}}function Ey(e){return Array.isArray(e)?Ap(...e):e}function vy(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(fs(t).function||"")&&t.pop(),t.reverse(),gl.test(fs(t).function||"")&&(t.pop(),gl.test(fs(t).function||"")&&t.pop()),t.slice(0,kp).map(n=>({...n,filename:n.filename||fs(t).filename,function:n.function||Rt}))}function fs(e){return e[e.length-1]||{}}const _a="<anonymous>";function qt(e){try{return!e||typeof e!="function"?_a:e.name||_a}catch{return _a}}function ec(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 Ty(e){let t=e!=null&&e.startsWith("file://")?e.slice(7):e;return t!=null&&t.match(/\/[A-Z]:/)&&(t=t.slice(1)),t}const io={},_l={};function En(e,t){return io[e]=io[e]||[],io[e].push(t),()=>{const n=io[e];if(n){const r=n.indexOf(t);r!==-1&&n.splice(r,1)}}}function vn(e,t){if(!_l[e]){_l[e]=!0;try{t()}catch(n){A&&_.error(`Error while instrumenting ${e}`,n)}}}function st(e,t){const n=e&&io[e];if(n)for(const r of n)try{r(t)}catch(o){A&&_.error(`Error while triggering instrumentation handler. 3Type: ${e} 4Name: ${qt(r)} 5Error:`,o)}}let ya=null;function Cp(e){const t="error";En(t,e),vn(t,Iy)}function Iy(){ya=U.onerror,U.onerror=function(e,t,n,r,o){return st("error",{column:r,error:o,line:n,msg:e,url:t}),ya?ya.apply(this,arguments):!1},U.onerror.__SENTRY_INSTRUMENTED__=!0}let Sa=null;function Np(e){const t="unhandledrejection";En(t,e),vn(t,wy)}function wy(){Sa=U.onunhandledrejection,U.onunhandledrejection=function(e){return st("unhandledrejection",e),Sa?Sa.apply(this,arguments):!0},U.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Mp=Object.prototype.toString;function He(e){switch(Mp.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Ci(e,Error)}}function Vr(e,t){return Mp.call(e)===`[object ${t}]`}function xp(e){return Vr(e,"ErrorEvent")}function yl(e){return Vr(e,"DOMError")}function Ry(e){return Vr(e,"DOMException")}function mt(e){return Vr(e,"String")}function ki(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function kt(e){return e===null||ki(e)||typeof e!="object"&&typeof e!="function"}function Be(e){return Vr(e,"Object")}function it(e){return typeof e=="object"&&e!==null}function Ai(e){return typeof Event<"u"&&Ci(e,Event)}function ky(e){return Vr(e,"RegExp")}function Tn(e){return!!(e!=null&&e.then&&typeof e.then=="function")}function Ci(e,t){try{return e instanceof t}catch{return!1}}function Yc(e){return typeof Request<"u"&&Ci(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{A&&_.log(`Failed to replace method "${t}" in object`,e)}}function Se(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{A&&_.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,Se(e,"__sentry_original__",t)}catch{}}
5function Jc(e){return e.__sentry_original__}function Pp(e){if(He(e))return{message:e.message,name:e.name,stack:e.stack,...Sl(e)};if(Ai(e)){const{type:t,target:n,currentTarget:r,detail:o}=e;return{type:t,target:n,currentTarget:r,...o?{detail:o}:{},...Sl(e)}}return e}function Sl(e){return it(e)?Object.fromEntries(Object.entries(e)):{}}function Ay(e){const t=Object.keys(Pp(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}let ar;function xo(e){if(ar!==void 0)return ar?ar(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=U;return t in n&&typeof n[t]=="function"?(ar=n[t],ar(e)):(ar=null,e())}function jt(){return xo(()=>Math.random())}function Ot(){return xo(()=>Date.now())}const Lp=Symbol.for("sentry.skipNormalization"),Dp=Symbol.for("sentry.overrideNormalizationDepth");function Cy(e){Se(e,Lp,!0)}function Ny(e,t){Se(e,Dp,t)}function My(e){return!!e[Lp]}function xy(e){const t=e[Dp];return typeof t=="number"?t:void 0}let tc;function Fp(e){tc=e}function ke(e,t=100,n=1/0){try{return nc("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function $p(e,t=3,n=100*1024){const r=ke(e,t);return Ly(r)>n?$p(e,t-1,n):r}function nc(e,t,n=1/0,r=1/0,o=Dy()){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(My(t))return t;const c=xy(t),u=c!==void 0?c:n;if(u===0)return a.replace("object ","");if(s(t))return"[Circular ~]";const f=t;if(f&&typeof f.toJSON=="function")try{const h=f.toJSON();return nc("",h,u-1,r,o)}catch{}const l=Array.isArray(t)?[]:{};let d=0;const p=Pp(t);for(const h in p){if(!Object.prototype.hasOwnProperty.call(p,h))continue;if(d>=r){l[h]="[MaxProperties ~]";break}const m=p[h];l[h]=nc(h,m,u-1,r,o),d++}return i(t),l}function Bp(e,t){try{if(tc){const r=tc(t);if(r)return r}return typeof global<"u"&&t===global?"[Global]":typeof t=="number"&&!Number.isFinite(t)?`[${t}]`:typeof t=="function"?`[Function: ${qt(t)}]`:typeof t=="symbol"?`[${String(t)}]`:typeof t=="bigint"?`[BigInt: ${String(t)}]`:`[object ${Oy(t)}]`}catch(n){return`**non-serializable** (${n})`}}function Oy(e){const t=Object.getPrototypeOf(e);return t!=null&&t.constructor?t.constructor.name:"null prototype"}function Py(e){return~-encodeURI(e).split(/%..|./).length}function Ly(e){return Py(JSON.stringify(e))}function Dy(){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 Je(e,t="[unserializable]"){if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return typeof t=="function"?t(e):t}}function yo(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function ba(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 Js(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const o=e[r];kt(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 lo(e,t,n=!1){return mt(e)?ky(t)?t.test(e):mt(t)?n?e===t:e.includes(t):typeof t=="function"?t(e):!1:!1}function at(e,t=[],n=!1){for(const r of t)if(lo(e,r,n))return!0;return!1}function Fy(){const e=U;return e.crypto||e.msCrypto}let Ea;function $y(){return jt()*16}function Ne(e=Fy()){try{if(e!=null&&e.randomUUID)return xo(()=>e.randomUUID()).replace(/-/g,"")}catch{}return Ea||(Ea="10000000100040008000"+1e11),Ea.replace(/[018]/g,t=>(t^($y()&15)>>t/4).toString(16))}function Up(e){var t,n;return(n=(t=e.exception)==null?void 0:t.values)==null?void 0:n[0]}function On(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 rc(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 It(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==null?void 0:o.data,...t.data};n.mechanism.data=s}}function By(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=>ba(i,0));const s=Math.min(r-1,o);t.context_line=ba(e[s],t.colno||0),t.post_context=e.slice(Math.min(o+1,r),o+1+n).map(i=>ba(i,0))}function bl(e){if(Uy(e))return!0;try{Se(e,"__sentry_captured__",!0)}catch{}return!1}function Uy(e){try{return e.__sentry_captured__}catch{}}const Hp=1e3;function er(){return Ot()/Hp}function Hy(){const{performance:e}=U;if(!(e!=null&&e.now)||!e.timeOrigin)return er;const t=e.timeOrigin;return()=>(t+xo(()=>e.now()))/Hp}let El;function me(){return(El??(El=Hy()))()}let va=null;function Wy(){var i;const{performance:e}=U;if(!(e!=null&&e.now))return;const t=3e5,n=xo(()=>e.now()),r=Ot(),o=e.timeOrigin;if(typeof o=="number"&&Math.abs(o+n-r)<t)return o;const s=(i=e.timing)==null?void 0:i.navigationStart;return typeof s=="number"&&Math.abs(s+n-r)<t?s:r-n}function we(){return va===null&&(va=Wy()),va}function jy(e){const t=me(),n={sid:Ne(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>qy(n)};return e&&kr(n,e),n}function kr(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||me(),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:Ne()),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 zy(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),kr(e,n)}function qy(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 Oo(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]=Oo(r[o],t[o],n-1));return r}function Gt(){return Ne()}function pn(){return Ne().substring(16)}function Wp(e){try{const t=U.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 oc="_sentrySpan";function At(e,t){t?Se(e,oc,Wp(t)):delete e[oc]}function Ar(e){return jp(e[oc])}const Gy=100;class Ct{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:Gt(),sampleRand:jt()}}clone(){const t=new Ct;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,At(t,Ar(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&&kr(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 Ct?n.getScopeData():Be(n)?t:void 0,{tags:o,attributes:s,extra:i,user:a,contexts:c,level:u,fingerprint:f=[],propagationContext:l,conversationId:d}=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),f.length&&(this._fingerprint=f),l&&(this._propagationContext=l),d&&(this._conversationId=d),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,At(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Gt(),sampleRand:jt(
5)}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){var s;const r=typeof n=="number"?n:Gy;if(r<=0)return this;const o={timestamp:er(),...t,message:t.message?yo(t.message,2048):t.message};return this._breadcrumbs.push(o),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),(s=this._client)==null||s.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:Ar(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Oo(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=(n==null?void 0:n.event_id)||Ne();if(!this._client)return A&&_.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==null?void 0:r.event_id)||Ne();if(!this._client)return A&&_.warn("No client configured on scope - will not capture message!"),o;const s=(r==null?void 0: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==null?void 0:n.event_id)||Ne();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(A&&_.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function Vy(){return Gr("defaultCurrentScope",()=>new Ct)}function Yy(){return Gr("defaultIsolationScope",()=>new Ct)}const vl=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 vl(r)&&vl(e)?r:Jy(e,r)},Jy=(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 Ky{constructor(t,n){let r;t?r=t:r=new Ct;let o;n?o=n:o=new Ct,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 Tn(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 Cr(){const e=xt(),t=qr(e);return t.stack=t.stack||new Ky(Vy(),Yy())}function Xy(e){return Cr().withScope(e)}function Qy(e,t){const n=Cr();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Tl(e){return Cr().withScope(()=>e(Cr().getIsolationScope()))}function Zy(){return{withIsolationScope:Tl,withScope:Xy,withSetScope:Qy,withSetIsolationScope:(e,t)=>Tl(t),getCurrentScope:()=>Cr().getScope(),getIsolationScope:()=>Cr().getIsolationScope()}}function In(e){const t=qr(e);return t.acs?t.acs:Zy()}function eS(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)&&Object.keys(e).includes("value")}function tS(e,t){const{value:n,unit:r}=eS(e)?e:{value:e,unit:void 0},o=nS(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 Nr(e,t=!1){const n={};for(const[r,o]of Object.entries(e??{})){const s=tS(o,t);s&&(n[r]=s)}return n}function Il(e){var n;if(!e)return 0;let t=0;for(const[r,o]of Object.entries(e)){t+=r.length*2,t+=o.type.length*2,t+=(((n=o.unit)==null?void 0:n.length)??0)*2;const s=o.value;Array.isArray(s)?t+=wl(s[0])*s.length:kt(s)?t+=wl(s):t+=100}return t}function wl(e){return typeof e=="string"?e.length*2:typeof e=="boolean"?4:typeof e=="number"?8:0}function nS(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 H(){const e=xt();return In(e).getCurrentScope()}function be(){const e=xt();return In(e).getIsolationScope()}function Er(){return Gr("globalScope",()=>new Ct)}function Ze(...e){const t=xt(),n=In(t);if(e.length===2){const[r,o]=e;return r?n.withSetScope(r,o):n.withScope(o)}return n.withScope(e[0])}function rL(...e){const t=xt(),n=In(t);if(e.length===2){const[r,o]=e;return r?n.withSetIsolationScope(r,o):n.withIsolationScope(o)}return n.withIsolationScope(e[0])}function C(){return H().getClient()}function Gp(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:o}=t,s={trace_id:n,span_id:o||pn()};return r&&(s.parent_span_id=r),s}const ue="sentry.source",Kc="sentry.sample_rate",Vp="sentry.previous_trace_sample_rate",ce="sentry.op",J="sentry.origin",rS="sentry.status.message",So="sentry.idle_span_finish_reason",Po="sentry.measurement_unit",Lo="sentry.measurement_value",oS="sentry.release",sS="sentry.environment",iS="sentry.sdk.integrations",aS="user.id",cS="user.email",uS="user.ip_address",lS="user.name",sc="sentry.custom_span_name",Xc="sentry.profile_id",wn="sentry.exclusive_time",fS="http.request.method",dS="sentry.link.type",pS="gen_ai.conversation.id",Yp=0,Do=1,re=2;function hS(e){if(e<400&&e>=100)return{code:Do};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 Ks(e,t){e.setAttribute("http.response.status_code",t);const n=hS(t);n.message!=="unknown_error"&&e.setStatus(n)}const Jp="_sentryScope",Kp="_sentryIsolationScope",mS=Symbol.for("sentry.otelSourceInference"),gS=Symbol.for("sentry.otelSourceExplicitlySet"),_S=Symbol.for("sentry.tracerProviderSpan");function Mr(e,t,n){e&&(Se(e,Kp,Wp(n)),Se(e,Jp,t))}function Un(e){const t=e;return{scope:t[Jp],isolationScope:jp(t[Kp])}}function Rl(e){return e[mS]===!0}function yS(e){Se(e,gS,!0)}function kl(e){return e[_S]===!0}const Xs="sentry-",SS=8192;function Qc(e){const t=bS(e);if(!t)return;const n=Object.entries(t).reduce((r,[o,s])=>{if(o.startsWith(Xs)){const i=o.slice(Xs.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[`${Xs}${r}`]=o),n),{});return ES(t)}function bS(e){if(!(!e||!mt(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=Al(n);return Object.entries(r).forEach(([o,s])=>{t[o]=s}),t},{}):Al(e)}function Al(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 ES(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>SS?(A&&_.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):i},"")}const vS=/^o(\d+)\./,TS=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function IS(e){return e==="http"||e==="https"}function Pt(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=TS.exec(e);if(!t){Jt(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,o="",s="",i="",a=""]=t.slice(1);let c="",u=a;const f=u.split("/");if(f.length>1&&(c=f.slice(0,-1).join("/"),u=f.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 wS(e){if(!A)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(_.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?IS(r)?t&&isNaN(parseInt(t,10))?(_.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(_.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(_.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function RS(e){const t=e.match(vS);return t==null?void 0:t[1]}function eh(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=RS(n)),r}function th(e){const t=typeof e=="string"?Qp(e):Zp(e);if(!(!t||!wS(t)))return t}function Gn(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 kS(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=kS(e),r=Qc(t);
5if(!(n!=null&&n.traceId))return{traceId:Gt(),sampleRand:jt()};const o=AS(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}}function oh(e=Gt(),t=pn(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function sh(e=Gt(),t=pn(),n){return`00-${e}-${t}-${n?"01":"00"}`}function AS(e,t){const n=Gn(t==null?void 0:t.sample_rand);if(n!==void 0)return n;const r=Gn(t==null?void 0:t.sample_rate);return r&&(e==null?void 0:e.parentSampled)!==void 0?e.parentSampled?jt()*r:r+jt()*(1-r):jt()}function CS(e,t){const n=eh(e);return t&&n&&t!==n?(_.log(`Won't continue trace because org IDs don't match (incoming baggage: ${t}, SDK options: ${n})`),!1):(e.getOptions().strictTraceContinuation||!1)&&(t&&!n||!t&&n)?(_.log(`Starting a new trace because strict trace continuation is enabled but one org ID is missing (incoming baggage: ${t}, Sentry client: ${n})`),!1):!0}const ih=0,Ni=1;let Cl=!1;function NS(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:o,parent_span_id:s,status:i,origin:a,links:c}=B(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:B(e).parent_span_id,s=Un(e).scope,i=r?(s==null?void 0:s.getPropagationContext().propagationSpanId)||pn():t;return{parent_span_id:o,span_id:i,trace_id:n}}function MS(e){const{traceId:t,spanId:n}=e.spanContext(),r=Lt(e);return oh(t,n,r)}function xS(e){const{traceId:t,spanId:n}=e.spanContext(),r=Lt(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===Ni,attributes:s,...o}))}function uh(e){if(e!=null&&e.length)return e.map(({context:{spanId:t,traceId:n,traceFlags:r},attributes:o})=>({span_id:t,trace_id:n,sampled:r===Ni,attributes:o}))}function zt(e){return typeof e=="number"?Nl(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Nl(e.getTime()):me()}function Nl(e){return e>9999999999?e/1e3:e}function B(e){if(ph(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(dh(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:zt(o),timestamp:zt(i)||void 0,status:hh(a),op:r[ce],origin:r[J],links:ch(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function Qs(e){if(ph(e))return e.getStreamedSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(dh(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:zt(o),end_timestamp:zt(i),is_segment:e===Zs(e),status:Zc(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===Zs(e)}}function lh(e){var t;return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?(t=e.parentSpanContext)==null?void 0:t.spanId:void 0}function fh(e){var t;return{...e,attributes:Nr(e.attributes),links:(t=e.links)==null?void 0:t.map(n=>({...n,attributes:Nr(n.attributes)}))}}function dh(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function ph(e){return typeof e.getSpanJSON=="function"}function Lt(e){const{traceFlags:t}=e.spanContext();return t===Ni}function hh(e){if(!(!e||e.code===Yp))return e.code===Do?"ok":e.message||"internal_error"}function Zc(e){return!e||e.code===Do||e.code===Yp||e.message==="cancelled"?"ok":"error"}function mh(e,t){const n=Zc(t)==="error"?t==null?void 0:t.message:void 0;return{...n&&{[rS]:n},...e}}const Hn="_sentryChildSpans",ic="_sentryRootSpan";function Cs(e,t){const n=e[ic]||e;Se(t,ic,n),Lt(e)&&(!e.isRecording()&&!n.isRecording()||(e[Hn]?e[Hn].add(t):Se(e,Hn,new Set([t]))))}function OS(e,t){e[Hn]&&e[Hn].delete(t)}function Ns(e){const t=new Set;function n(r){if(!t.has(r)&&Lt(r)){t.add(r);const o=r[Hn]?Array.from(r[Hn]):[];for(const s of o)n(s)}}return n(e),Array.from(t)}const ve=Zs;function Zs(e){return e[ic]||e}function Te(){const e=xt(),t=In(e);return t.getActiveSpan?t.getActiveSpan():Ar(H())}function ei(){Cl||(Jt(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),Cl=!0)}function oL(e,t){e.updateName(t),e.setAttributes({[ue]:"custom",[sc]:t})}let Ml=!1;function PS(){if(Ml)return;function e(){const t=Te(),n=t&&ve(t);if(n){const r="internal_error";A&&_.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:re,message:r})}}Ml=!0,Cp(e),Np(e)}function Qe(e){var n;if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||((n=C())==null?void 0:n.getOptions());return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function xl(e){_.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function bo(e,t){if(!(t!=null&&t.length))return!1;for(const n of t){if(FS(n)){if(e.description&&lo(e.description,n))return A&&xl(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&&lo(e.description,n.name):!0,s=n.op?e.op&&lo(e.op,n.op):!0,i=n.attributes?Object.entries(n.attributes).every(([a,c])=>{var u;return LS((u=e.attributes)==null?void 0:u[a],c)}):!0;if(o&&s&&i)return A&&xl(e),!0}return!1}function LS(e,t){return typeof e=="string"&&(typeof t=="string"||t instanceof RegExp)?lo(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e===t}function DS(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 FS(e){return typeof e=="string"||e instanceof RegExp}const gh=Symbol.for("sentry.nonRecordingSpan");class Vn{constructor(t={}){this._traceId=t.traceId||Gt(),this._spanId=t.spanId||pn(),this.dropReason=t.dropReason,Se(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 xr(e){return!!e&&e[gh]===!0}const Fo="production",_h="_frozenDsc";function Ol(e,t){Se(e,_h,t)}function yh(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o={environment:n.environment||Fo,release:n.release,public_key:r,trace_id:e,org_id:eh(t)};return t.emit("createDsc",o),o}function Mi(e,t){const n=t.getPropagationContext();return n.dsc||yh(n.traceId,e)}function Et(e){var g;const t=C();if(!t)return{};const n=ve(e),r=B(n),o=r.data,s=n.spanContext().traceState,i=(s==null?void 0:s.get("sentry.sample_rate"))??o[Kc]??o[Vp];function a(y){return(typeof i=="number"||typeof i=="string")&&(y.sample_rate=`${i}`),y}const c=n[_h];if(c)return a(c);const u=xr(n),f=u&&n.dropReason==="ignored";if(u&&(!Qe(t.getOptions())||f)){const y=Un(n).scope;if(y){const S={...Mi(t,y)};return f&&(S.sampled="false"),a(S)}}const l=s==null?void 0:s.get("sentry.dsc"),d=l&&Qc(l);if(d)return a(d);const p=yh(e.spanContext().traceId,t),h=o[ue]??o["sentry.segment.name.source"],m=r.description;return h!=="url"&&m&&(p.transaction=m),Qe()&&(p.sampled=String(Lt(n)),p.sample_rand=(s==null?void 0:s.get("sentry.sample_rand"))??((g=Un(n).scope)==null?void 0:g.getPropagationContext().sampleRand.toString())),a(p),t.emit("createDsc",p,n),p}function sL(e){const t=Et(e);return Xp(t)}function iL(e){return Se(e,"_streamed",!0),e}function xi(e){return!!e&&typeof e=="function"&&"_streamed"in e&&!!e._streamed}function ut(e,t=[]){return[e,t]}function Pl(e,t){const[n,r]=e;return[n,[...r,t]]}function Yn(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 ac(e,t){return Yn(e,(n,r)=>t.includes(r))}function ti(e){const t=qr(U);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function $S(e){const t=qr(U);return t.decodePolyfill?t.decodePolyfill(e):new TextDecoder().decode(e)}function ni(e){const[t,n]=e;let r=JSON.stringify(t);function o(s){typeof r=="string"?r=typeof s=="string"?r+s:[ti(r),s]:r.push(typeof s=="string"?ti(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:BS(r)}function BS(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 US(e){let t=typeof e=="string"?ti(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($S(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 HS(e){return[{type:"span"},e]}function WS(e){const t=typeof e.data=="string"?ti(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 jS(e){return e in Sh}function Ll(e){return jS(e)?Sh[e]:e}function $o(e){if(!(e!=null&&e.sdk))return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function bh(e,t,n,r){var s;const o=(s=e.sdkProcessingMetadata)==null?void 0:s.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(Ot()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Pt(r)},...o&&{trace:o}}}function zS(e,t){var r,o,s,i;if(!t)return e;const n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...((r=e.sdk)==null?void 0:r.integrations)||[],...t.integrations||[]],packages:[...((o=e.sdk)==null?void 0:o.packages)||[],...t.packages||[]],settings:(s=e.sdk)!=null&&s.settings||t.settings?{...(i=e.sdk)==null?void 0:i.settings,...t.settings}:void 0},e}function qS(e,t,n,r){const o=$o(n),s={sent_at:new Date(Ot()).toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:Pt(t)}},i="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return ut(s,[i])}function GS(e,t,n,r){const o=$o(n),s=e.type&&e.type!=="replay_event"?e.type:"event";zS(e,n==null?void 0:n.sdk);const i=bh(e,o,r,t);return delete e.sdkProcessingMetadata,ut(i,[[{type:s},e]])}function VS(e,t){function n(p){return!!p.trace_id&&!!p.public_key}const r=Et(e[0]),o=t==null?void 0:t.getDsn(),s=t==null?void 0:t.getOptions().tunnel,i={sent_at:new Date(Ot()).toISOString(),...n(r)&&{trace:r},...!!s&&o&&{dsn:Pt(o)}},{beforeSendSpan:a,ignoreSpans:c}=(t==null?void 0:t.getOptions())||{},u=c!=null&&c.length?e.filter(p=>{const h=B(p);return!bo({description:h.description,op:h.op,attributes:h.data},c)}):e,f=e.length-u.length;f&&(t==null||t.recordDroppedEvent("before_send","span",f));const l=a?p=>{const h=B(p),m=xi(a)?h:a(h);return m||(ei(),h)}:B,d=[];for(const p of u){const h=l(p);h&&d.push(HS(h))}return ut(i,d)}function YS(e){if(!A)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=B(e),{spanId:o}=e.spanContext(),s=Lt(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:f,description:l}=B(i);u.push(`root ID: ${i.spanContext().spanId}`),f&&u.push(`root op: ${f}`),l&&u.push(`root description: ${l}`)}_.log(`${c} 8 ${u.join(` 9 `)}`)}function JS(e){if(!A)return;const{description:t="< unknown name >",op:n="< unknown op >"}=B(e),{spanId:r}=e.spanContext(),s=ve(e)===e,i=`[Tracing] Finishing "${n}" ${s?"root ":""}span "${t}" with ID ${r}`;_.log(i)}function Eh(e,t,n,r=Te()){const o=r&&ve(r);o&&(A&&_.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),o.addEvent(e,{[Lo]:t,[Po]:n}))}function Dl(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},o=r[Po],s=r[Lo];
9typeof o=="string"&&typeof s=="number"&&(t[n.name]={value:s,unit:o})}),t}function Fl(){return qr(xt()).segmentSpanCaptureStrategy}function lt(e){return e.getOptions().traceLifecycle==="stream"}const $l=1e3;class Oi{constructor(t={}){this._traceId=t.traceId||Gt(),this._spanId=t.spanId||pn(),this._startTime=t.startTimestamp||me(),this._links=t.links,this._attributes={},this.setAttributes({[J]:"manual",[ce]: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?Ni:ih}}setAttribute(t,n){return this._frozen?this:(n===void 0?delete this._attributes[t]:this._attributes[t]=n,t===ue&&n!==void 0&&Rl(this)&&yS(this),this)}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._frozen||(this._startTime=zt(t))}setStatus(t){return this._frozen?this:(this._status=t,this)}updateName(t){return this._frozen?this:(this._name=t,Rl(this)||this.setAttribute(ue,"custom"),this)}end(t){if(this._endTime){this._frozen=kl(this);return}this._endTime=zt(t),JS(this),this._onSpanEnded(),this._frozen=kl(this)}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[ce],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[J],profile_id:this._attributes[Xc],exclusive_time:this._attributes[wn],measurements:Dl(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:Zc(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;A&&_.log("[Tracing] Adding an event to span:",t);const o=Bl(n)?n:r||me(),s=Bl(n)?{}:n||{},i={name:t,time:zt(o),attributes:s};return this._events.push(i),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=C();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?XS(VS([this],t)):(A&&_.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=Fl();if(i){const a=Un(this).scope||H();i.onChildSpanEnded(this,n,c=>this._convertSpanToTransaction(c),a)}return}if(t&<(t)){t.emit("afterSegmentSpanEnd",this);return}const o=Un(this).scope||H(),s=Fl();if(s)s.onSegmentSpanEnded(i=>this._convertSpanToTransaction(i),o);else{const i=this._convertSpanToTransaction();i&&o.captureEvent(i)}}_convertSpanToTransaction(t={}){var l,d,p,h;if(!Ul(B(this)))return;this._name||(A&&_.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:n,isolationScope:r}=Un(this),o=(l=n==null?void 0:n.getScopeData().sdkProcessingMetadata)==null?void 0:l.normalizedRequest;if(this._sampled!==!0)return;(d=t.onSpanCaptured)==null||d.call(t,this);const s=[];for(const m of Ns(this)){if(m===this||KS(m)||(p=t.isSpanAlreadyCaptured)!=null&&p.call(t,m))continue;const g=B(m);Ul(g)&&((h=t.onSpanCaptured)==null||h.call(t,m),s.push(g))}const i=this._attributes[ue];delete this._attributes[sc];let a=!1;
9s.forEach(m=>{var g;delete m.data[sc],(g=m.op)!=null&&g.startsWith("gen_ai.")&&(a=!0)});const c={contexts:{trace:NS(this)},spans:s.length>$l?s.sort((m,g)=>m.start_timestamp-g.start_timestamp).slice(0,$l):s,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:n,capturedSpanIsolationScope:r,dynamicSamplingContext:Et(this),hasGenAiSpans:a},request:o,...i&&{transaction_info:{source:i}}},u=Dl(this._events);return u&&Object.keys(u).length&&(A&&_.log("[Measurements] Adding measurements to transaction event",JSON.stringify(u,void 0,2)),c.measurements=u),c}}function Bl(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function Ul(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function KS(e){return e instanceof Oi&&e.isStandaloneSpan()}function XS(e){const t=C();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function eu(e,t,n=()=>{},r=()=>{}){let o;try{o=e()}catch(s){throw t(s),n(),s}return QS(o,t,n,r)}function QS(e,t,n,r){return Tn(e)?qp(e,o=>{n(),r(o)},o=>{t(o),n()}):(n(),r(e),e)}function ZS(e,t,n){if(!Qe(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=Gn(o);if(s===void 0)return A&&_.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 A&&_.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||A&&_.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(o)})`),[i,s,r]}const cc="__SENTRY_SUPPRESS_TRACING__";function Kt(e,t){const n=tr();if(n.startSpan)return n.startSpan(e,t);const r=ou(e),{forceTransaction:o,parentSpan:s,scope:i}=e,a=i==null?void 0:i.clone();return Ze(a,()=>vh(s)(()=>{const u=H(),f=su(u,s),l=C(),p=e.onlyIfParent&&!f?nu(u,l):ru({parentSpan:f,spanArguments:r,forceTransaction:o,scope:u});return(!Pi(p)||!f)&&At(u,p),eu(()=>t(p),()=>{const{status:h}=B(p);p.isRecording()&&(!h||h==="ok")&&p.setStatus({code:re,message:"internal_error"})},()=>{p.end()})}))}function nn(e,t){const n=tr();if(n.startSpanManual)return n.startSpanManual(e,t);const r=ou(e),{forceTransaction:o,parentSpan:s,scope:i}=e,a=i==null?void 0:i.clone();return Ze(a,()=>vh(s)(()=>{const u=H(),f=su(u,s),d=e.onlyIfParent&&!f?nu(u,C()):ru({parentSpan:f,spanArguments:r,forceTransaction:o,scope:u});return(!Pi(d)||!f)&&At(u,d),eu(()=>t(d,()=>d.end()),()=>{const{status:p}=B(d);d.isRecording()&&(!p||p==="ok")&&d.setStatus({code:re,message:"internal_error"})})}))}function Ke(e){const t=tr();return t.startInactiveSpan?t.startInactiveSpan(e):eb(e)}function eb(e){const t=ou(e),{forceTransaction:n,parentSpan:r}=e;return(e.scope?s=>Ze(e.scope,s):r!==void 0?s=>Or(r,s):s=>s())(()=>{const s=H(),i=su(s,r),a=C();return e.onlyIfParent&&!i?nu(s,a):ru({parentSpan:i,spanArguments:t,forceTransaction:n,scope:s})})}const aL=(e,t)=>{const n=xt(),r=In(n);if(r.continueTrace)return r.continueTrace(e,t);const{sentryTrace:o,baggage:s}=e,i=C(),a=Qc(s);return i&&!CS(i,a==null?void 0:a.org_id)?nb(t):Ze(c=>{const u=rh(o,s);return c.setPropagationContext(u),At(c,void 0),t()})};function Or(e,t){const n=tr();return n.withActiveSpan?n.withActiveSpan(e,t):Ze(r=>(At(r,e||void 0),t(r)))}function tb(e){const t=tr();return t.suppressTracing?t.suppressTracing(e):Ze(n=>{n.setSDKProcessingMetadata({[cc]:!0});const r=e();return n.setSDKProcessingMetadata({[cc]:void 0}),r})}function tu(e=H()){const t=tr();return t.isTracingSuppressed?t.isTracingSuppressed(e):e.getScopeData().sdkProcessingMetadata[cc]===!0}function nb(e){const t=tr();return t.startNewTrace?t.startNewTrace(e):Ze(n=>
9(n.setPropagationContext({traceId:Gt(),sampleRand:jt()}),A&&_.log(`Starting a new trace with id ${n.getPropagationContext().traceId}`),Or(null,e)))}function nu(e,t){t==null||t.recordDroppedEvent("no_parent_span","span");const n=new Vn({traceId:e.getPropagationContext().traceId});return Mr(n,e,be()),n}function ru({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){const o=be();if(!Qe()){const a=r.getPropagationContext(),c=e?e.spanContext().traceId:a.traceId,u=new Vn({traceId:c});return e&&!n&&Cs(e,u),Mr(u,r,o),u}const s=C();if(ob(s,t)){tu(r)||s==null||s.recordDroppedEvent("ignored","span");const a=new Vn({dropReason:"ignored",traceId:(e==null?void 0:e.spanContext().traceId)??r.getPropagationContext().traceId});return e&&!n&&Cs(e,a),Mr(a,r,o),a}let i;if(e&&!n)i=rb(e,r,t,o),Cs(e,i);else if(e){const a=Et(e),{traceId:c,spanId:u}=e.spanContext(),f=Lt(e);i=Hl({traceId:c,parentSpanId:u,...t},r,o,f),Ol(i,a)}else{const{traceId:a,dsc:c,parentSpanId:u,sampled:f}=r.getPropagationContext();i=Hl({traceId:a,parentSpanId:u,...t},r,o,f),c&&Ol(i,c)}return YS(i),i}function ou(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=zt(e.startTime),delete r.startTime,r}return n}function tr(){const e=xt();return In(e)}function Hl(e,t,n,r){var g;const o=C(),s=(o==null?void 0:o.getOptions())||{},{name:i=""}=e,a={spanAttributes:{...e.attributes},spanName:i,parentSampled:r};o==null||o.emit("beforeSampling",a,{decision:!1});const c=a.parentSampled??r,u=a.spanAttributes,f=t.getPropagationContext(),l=tu(t),[d,p,h]=l?[!1]:ZS(s,{name:i,parentSampled:c,attributes:u,normalizedRequest:n.getScopeData().sdkProcessingMetadata.normalizedRequest,parentSampleRate:Gn((g=f.dsc)==null?void 0:g.sample_rate)},f.sampleRand),m=new Oi({...e,attributes:{[ue]:"custom",[Kc]:p!==void 0&&h?p:void 0,...u},sampled:d});return!d&&o&&!l&&(A&&_.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),o.recordDroppedEvent("sample_rate",lt(o)?"span":"transaction")),Mr(m,t,n),o&&o.emit("spanStart",m),m}function rb(e,t,n,r){const{spanId:o,traceId:s}=e.spanContext(),i=tu(t),a=i?!1:Lt(e),c=a?new Oi({...n,parentSpanId:o,traceId:s,sampled:a}):new Vn({traceId:s});Cs(e,c),Mr(c,t,r);const u=C();return u&&(lt(u)&&xr(c)&&(xr(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 su(e,t){if(t)return t;if(t===null)return;const n=Ar(e);if(!n)return;const r=C();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?ve(n):n}function vh(e){return e!==void 0?t=>Or(e,t):t=>t()}function ob(e,t){var r;const n=e==null?void 0:e.getOptions().ignoreSpans;return!e||!lt(e)||!(n!=null&&n.length)?!1:bo({description:t.name||"",op:((r=t.attributes)==null?void 0:r[ce])||t.op,attributes:t.attributes},n)}function Pi(e){return xr(e)&&e.dropReason==="ignored"}const Ms={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},sb="heartbeatFailed",ib="idleTimeout",ab="finalTimeout",cb="externalFinish";function Th(e,t={}){const n=new Map;let r=!1,o,s,i=cb,a=!t.disableAutoFinish;const c=[],{idleTimeout:u=Ms.idleTimeout,finalTimeout:f=Ms.finalTimeout,childSpanTimeout:l=Ms.childSpanTimeout,beforeSpanEnd:d,trimIdleSpanEndTimestamp:p=!0}=t,h=C(),m=H();if(!h||!Qe()){const N=new Vn({traceId:m.getPropagationContext().traceId});return Mr(N,m,be()),N}const g=Te(),y=ub(e);y.end=new Proxy(y.end,{apply(N,E,L){if(d&&d(y),xr(E))return;const[M,...F]=L,q=M||me(),K=zt(q),G=Ns(y).filter(ne=>ne!==y),$=B(y);if(!G.length||!p)return D(K),Reflect.apply(N,E,[K,...F]);const x=h.getOptions().ignoreSpans,Z=G==null?void 0:G.reduce((ne,te)=>{const ie=B(te);return!ie.timestamp||x&&bo({description:ie.description,op:ie.op,attributes:ie.data},x)?ne:ne?Math.max(ne,ie.timestamp):ie.timestamp},void 0),O=$.start_timestamp,V=Math.min(O?O+f/1e3:1/0,Math.max(O||-1/0,Math.min(K,Z||1/0)));return D(V),Reflect.apply(N,E,[V,...F])}});function S(){o&&(clearTimeout(o),o=void 0)}function I(){s&&(clearTimeout(s),s=void 0)}function v(N){S(),o=setTimeout(()=>{!r&&n.size===0&&a&&(i=ib,y.end(N))},u)}function w(N){I(),s=setTimeout(()=>{!r&&a&&(i=sb,y.end(N))},l)}function T(N){S(),n.set(N,!0);const E=me();w(E+l/1e3)}function b(N){if(n.has(N)&&n.delete(N),n.size===0){const E=me();v(E+u/1e3),I()}}
9function D(N){r=!0,n.clear(),c.forEach(G=>G()),At(m,g);const E=B(y),{start_timestamp:L}=E;if(!L)return;E.data[So]||y.setAttribute(So,i);const F=E.status;(!F||F==="unknown")&&y.setStatus({code:Do}),_.log(`[Tracing] Idle span "${E.op}" finished`);const q=Ns(y).filter(G=>G!==y);let K=0;q.forEach(G=>{G.isRecording()&&(G.setStatus({code:re,message:"cancelled"}),G.end(N),A&&_.log("[Tracing] Cancelling span since span ended early",JSON.stringify(G,void 0,2)));const $=B(G),{timestamp:x=0,start_timestamp:Z=0}=$,O=Z<=N,V=(f+u)/1e3,ne=x-Z<=V;if(A){const te=JSON.stringify(G,void 0,2);O?ne||_.log("[Tracing] Discarding span since it finished after idle span final timeout",te):_.log("[Tracing] Discarding span since it happened after idle span was finished",te)}(!ne||!O)&&(OS(y,G),K++)}),K>0&&y.setAttribute("sentry.idle_span_discarded_spans",K)}return c.push(h.on("spanStart",N=>{if(r||N===y||B(N).timestamp||N instanceof Oi&&N.isStandaloneSpan())return;Ns(y).includes(N)&&T(N.spanContext().spanId)})),c.push(h.on("spanEnd",N=>{r||b(N.spanContext().spanId)})),c.push(h.on("idleSpanEnableAutoFinish",N=>{N===y&&(a=!0,v(),n.size&&w())})),t.disableAutoFinish||v(),setTimeout(()=>{r||(y.setStatus({code:re,message:"deadline_exceeded"}),i=ab,y.end())},f),y}function ub(e){const t=Ke(e);return At(H(),t),A&&_.log("[Tracing] Started span is an idle span"),t}function lb(e,t,n){let r,o,s;const i=n!=null&&n.maxWait?Math.max(n.maxWait,t):0,a=(n==null?void 0: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 f(){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=f,l}const fb=["addListener","on","once","prependListener","prependOnceListener","addEventListener"],db=["removeListener","off","removeEventListener"],Ih=Symbol("SentryScopeBoundListeners");let vr;function pb(e){return vr!==void 0&&(e===vr||e.listener===vr)}function cL(e,t=H()){const n=e;if(Li(n))return e;iu(n);for(const r of fb)typeof n[r]=="function"&&(n[r]=mb(n,n[r],t));for(const r of db)typeof n[r]=="function"&&(n[r]=gb(n,n[r]));return typeof n.removeAllListeners=="function"&&(n.removeAllListeners=_b(n,n.removeAllListeners)),e}function hb(e,t){return function(...n){return Ze(t,()=>e.apply(this,n))}}function wh(e){return typeof e=="function"}function mb(e,t,n){return function(...r){const o=r[0],s=r[1],i=r.slice(2);if(!wh(s)||pb(s))return t.apply(this,r);const a=Li(e)||iu(e);let c=a.get(o);c||(c=new WeakMap,a.set(o,c));let u=c.get(s);u||(u=hb(s,n),c.set(s,u));const f=vr;vr=u;try{return t.call(this,o,u,...i)}finally{vr=f}}}function gb(e,t){return function(...n){var a,c;const r=n[0],o=n[1],s=n.slice(2),i=wh(o)?(c=(a=Li(e))==null?void 0:a.get(r))==null?void 0:c.get(o):void 0;return i?t.call(this,r,i,...s):t.apply(this,n)}}function _b(e,t){return function(...n){const r=Li(e);if(r)if(n.length===0)iu(e);else{const o=n[0];r.delete(o)}return t.apply(this,n)}}function iu(e){const t=new Map;return e[Ih]=t,t}function Li(e){return e[Ih]}function yb(e,t){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=t;Sb(e,t),r&&vb(e,r),Tb(e,n),bb(e,o),Eb(e,s)}function Wl(e,t){const{extra:n,tags:r,attributes:o,user:s,contexts:i,level:a,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:f,eventProcessors:l,attachments:d,propagationContext:p,transactionName:h,span:m}=t;no(e,"extra",n),no(e,"tags",r),no(e,"attributes",o),no(e,"user",s),no(e,"contexts",i),e.sdkProcessingMetadata=Oo(e.sdkProcessingMetadata,c,2),a&&(e.level=a),h&&(e.transactionName=h),m&&(e.span=m),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),f.length&&(e.fingerprint=[...e.fingerprint,...f]),l.length&&(e.eventProcessors=[...e.eventProcessors,...l]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...p}}function no(e,t,n){e[t]=Oo(e[t],n,1)}function Bo(e,t){const n=Er().getScopeData();return e&&Wl(n,e.getScopeData()),t&&Wl(n,t.getScopeData()),n}function Sb(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 bb(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Eb(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function vb(e,t){e.contexts={trace:ah(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Et(t),...e.sdkProcessingMetadata};const n=ve(t),r=B(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function Tb(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 Ib(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,f]of Object.entries(o))f!=null&&(t[u]=f);s&&(s.locale&&(t["culture.locale"]=s.locale),s.timezone&&(t["culture.timezone"]=s.timezone)),i!=null&&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 Rh="graphql.document",wb="http.request.header",kh="http.url",Rb="params",kb="sentry.op",Ab="sentry.sdk.name",Cb="sentry.sdk.version",Nb="sentry.segment.id",au="sentry.segment.name",Mb="sentry.trace_lifecycle",Ah="sentry.transaction",Rn="url.full",Ch="url.path",xb="url.path.parameter",Xe="url.template",Ob="user_agent.original";function Pb(e,t){var d;const n=Qs(e),r=Zs(e),o=Qs(r),{isolationScope:s,scope:i}=Un(e),a=Bo(s,i);Fb(n,o,t,a);const c=e.kind;t.emit("preprocessSpan",n,{spanKind:c}),n.is_segment&&(Lb(n,a),Db(n,t),t.emit("processSegmentSpan",n)),t.emit("processSpan",n);const{beforeSendSpan:u}=t.getOptions(),f=u&&xi(u)?$b(n,u):n,l=(d=f.attributes)==null?void 0:d[ue];return n.is_segment&&l&&hn(f,{"sentry.segment.name.source":l}),{...fh(f),_segmentSpan:r}}
9function Lb(e,t){const n=Ib(t.contexts);hn(e,n)}function hn(e,t){const n=e.attributes??(e.attributes={});Object.entries(t).forEach(([r,o])=>{o!=null&&!(r in n)&&(n[r]=o)})}function Db(e,t){const n=t.getIntegrationNames();n.length&&hn(e,{[iS]:n})}function Fb(e,t,n,r){var a,c,u,f,l,d;const o=n.getSdkMetadata(),{release:s,environment:i}=n.getOptions();hn(e,{[Mb]:"stream",[au]:t.name,[Nb]:t.span_id,[Ab]:(a=o==null?void 0:o.sdk)==null?void 0:a.name,[Cb]:(c=o==null?void 0:o.sdk)==null?void 0:c.version,[oS]:s,[sS]:i||Fo,[aS]:(u=r.user)==null?void 0:u.id,[cS]:(f=r.user)==null?void 0:f.email,[uS]:(l=r.user)==null?void 0:l.ip_address,[lS]:(d=r.user)==null?void 0:d.username,...r.attributes})}function $b(e,t){const n=t(e);return n||(ei(),e)}const Ta=0,jl=1,zl=2;function Uo(e){return new Eo(t=>{t(e)})}function Nh(e){return new Eo((t,n)=>{n(e)})}class Eo{constructor(t){this._state=Ta,this._handlers=[],this._runExecutor(t)}then(t,n){return new Eo((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 Eo((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===Ta)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===jl&&n[1](this._value),this._state===zl&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(s,i)=>{if(this._state===Ta){if(Tn(i)){i.then(r,o);return}this._state=s,this._value=i,this._executeHandlers()}},r=s=>{n(jl,s)},o=s=>{n(zl,s)};try{t(r,o)}catch(s){o(s)}}}function Bb(e,t,n,r=0){try{const o=uc(t,n,e,r);return Tn(o)?o:Uo(o)}catch(o){return Nh(o)}}function uc(e,t,n,r){const o=n[r];if(!e||!o)return e;const s=o({...e},t);return A&&s===null&&_.log(`Event processor "${o.id||"?"}" dropped event`),Tn(s)?s.then(i=>uc(i,t,n,r+1)):uc(s,t,n,r+1)}let Bt,ql,Gl,Xt;function Mh(e){const t=U._sentryDebugIds,n=U._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],o=n?Object.keys(n):[];if(Xt&&r.length===ql&&o.length===Gl)return Xt;ql=r.length,Gl=o.length,Xt={},Bt||(Bt={});const s=(i,a)=>{for(const c of i){const u=a[c],f=Bt==null?void 0:Bt[c];if(f&&Xt&&u)Xt[f[0]]=u,Bt&&(Bt[c]=[f[0],u]);else if(u){const l=e(c);for(let d=l.length-1;d>=0;d--){const p=l[d],h=p==null?void 0:p.filename;if(h&&Xt&&Bt){Xt[h]=u,Bt[c]=[h,u];break}}}}};return t&&s(r,t),n&&s(o,n),Xt}function Ub(e,t){const n=Mh(e);if(!n)return[];const r=[];for(const o of t){const s=Ty(o);s&&n[s]&&r.push({type:"sourcemap",code_file:o,debug_id:n[s]})}return r}function xh(e,t,n,r,o,s){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||Ne(),timestamp:t.timestamp||er()},u=n.integrations||e.integrations.map(y=>y.name);Hb(c,e),zb(c,u),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&Wb(c,e.stackParser);const f=Gb(r,n.captureContext);n.mechanism&&It(c,n.mechanism);const l=o?o.getEventProcessors():[],d=Bo(s,f),p=[...n.attachments||[],...d.attachments];p.length&&(n.attachments=p),yb(c,d);const h=[...l,...d.eventProcessors];return(n.data&&n.data.__sentry__===!0?Uo(c):Bb(h,c,n)).then(y=>(y&&jb(y),typeof i=="number"&&i>0?qb(y,i,a):y))}function Hb(e,t){var a,c;const{environment:n,release:r,dist:o,maxValueLength:s}=t;e.environment=e.environment||n||Fo,!e.release&&r&&(e.release=r),!e.dist&&o&&(e.dist=o);const i=e.request;i!=null&&i.url&&s&&(i.url=yo(i.url,s)),s&&((c=(a=e.exception)==null?void 0:a.values)==null||c.forEach(u=>{u.value&&(u.value=yo(u.value,s))}))}function Wb(e,t){var r,o;const n=Mh(t);(o=(r=e.exception)==null?void 0:r.values)==null||o.forEach(s=>{var i,a;(a=(i=s.stacktrace)==null?void 0:i.frames)==null||a.forEach(c=>{c.filename&&(c.debug_id=n[c.filename])})})}function jb(e){var r,o;const t={};if((o=(r=e.exception)==null?void 0:r.values)==null||o.forEach(s=>{var i,a;(a=(i=s.stacktrace)==null?void 0:i.frames)==null||a.forEach(c=>{c.debug_id&&(c.abs_path?t[c.abs_path]=c.debug_id:c.filename&&(t[c.filename]=c.debug_id),delete c.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(([s,i])=>{n.push({type:"sourcemap",code_file:s,debug_id:i})})}function zb(e,t){t.length>0&&(e.sdk=e.sdk||{}
9,e.sdk.integrations=[...e.sdk.integrations||[],...t])}function qb(e,t,n){var o,s;if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:ke(i.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(o=e.contexts)!=null&&o.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(i=>({...i,...i.data&&{data:ke(i.data,t,n)}}))),(s=e.contexts)!=null&&s.flags&&r.contexts&&(r.contexts.flags=ke(e.contexts.flags,3,n)),r}function Gb(e,t){if(!t)return e;const n=e?e.clone():new Ct;return n.update(t),n}function Vb(e){if(e)return Yb(e)?{captureContext:e}:Kb(e)?{captureContext:e}:e}function Yb(e){return e instanceof Ct||typeof e=="function"}const Jb=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Kb(e){return Object.keys(e).some(t=>Jb.includes(t))}function St(e,t){return H().captureException(e,Vb(t))}function Xb(e,t){const n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return H().captureMessage(e,n,r)}function Ho(e,t){return H().captureEvent(e,t)}function Oh(e,t){be().setContext(e,t)}function uL(e){be().setExtras(e)}function lL(e,t){be().setExtra(e,t)}function fL(e){be().setTags(e)}function dL(e,t){be().setTag(e,t)}function pL(e){be().setAttributes(e)}function hL(e,t){be().setAttribute(e,t)}function mL(e){be().setUser(e)}function gL(e){be().setConversationId(e)}function Qb(){return be().lastEventId()}async function _L(e){const t=C();return t?t.flush(e):(A&&_.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function yL(e){const t=C();return t?t.close(e):(A&&_.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}function SL(){return!!C()}function Zb(){const e=C();return(e==null?void 0:e.getOptions().enabled)!==!1&&!!(e!=null&&e.getTransport())}function eE(e){be().addEventProcessor(e)}function Vl(e){const t=be(),{user:n}=Bo(t,H()),{userAgent:r}=U.navigator||{},o=jy({user:n,...r&&{userAgent:r},...e}),s=t.getSession();return(s==null?void 0:s.status)==="ok"&&kr(s,{status:"exited"}),Ph(),t.setSession(o),o}function Ph(){const e=be(),n=H().getSession()||e.getSession();n&&zy(n),Lh(),e.setSession()}function Lh(){const e=be(),t=C(),n=e.getSession();n&&t&&t.captureSession(n)}function Ia(e=!1){if(e){Ph();return}Lh()}function Di(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}const tE="7";function Dh(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function nE(e){return`${Dh(e)}${e.projectId}/envelope/`}function rE(e,t){const n={sentry_version:tE};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function Fh(e,t,n){return t||`${nE(e)}?${rE(e,n)}`}function oE(e,t){const n=th(e);if(!n)return"";const r=`${Dh(n)}embed/error-page/`;let o=`dsn=${Pt(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 Yl=[];function sE(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 iE(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 sE(r)}function aE(e,t){const n={};return t.forEach(r=>{r!=null&&r.beforeSetup&&r.beforeSetup(e)}),t.forEach(r=>{r&&$h(e,r,n)}),n}function Jl(e,t){for(const n of t)n!=null&&n.afterAllSetup&&n.afterAllSetup(e)}function $h(e,t,n){if(n[t.name]){A&&_.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!Yl.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),Yl.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))}),A&&_.log(`Integration installed: ${t.name}`)}function Kl(e){const t=C();if(!t){A&&_.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}const cE="sentry.timestamp.sequence";let wa=0,Ra;function Bh(e){const t=Math.floor(e*1e3);Ra!==void 0&&t!==Ra&&(wa=0);const n=wa;return wa++,Ra=t,{key:cE,value:{value:n,type:"integer"}}}function Uh(e,t){return t?Ze(t,()=>{const n=Te(),r=n?ah(n):Gp(t);return[n?Et(n):Mi(e,t),r]}):[void 0,void 0]}const uE={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function lE(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function fE(){/*! __SENTRY_SDK_SOURCE__ */return"npm"}function dE(){return!lE()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function mn(){return typeof window<"u"&&(!dE()||pE())}function pE(){const e=U.process;return(e==null?void 0:e.type)==="renderer"}function hE(e,t){const n=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...mn()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function mE(e,t,n,r,o){const s={};return t!=null&&t.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=Pt(r)),ut(s,[hE(e,o)])}const gE=100;function vt(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function _E(e,t){const n=cu(),r=Wh(e);r===void 0?n.set(e,[t]):r.length>=gE?(Hh(e,r),n.set(e,[t])):n.set(e,[...r,t])}function ri(e,t=H(),n=_E){var F;const r=(t==null?void 0:t.getClient())??C();if(!r){A&&_.warn("No client available to capture log.");return}const{release:o,environment:s,enableLogs:i=!0,beforeSendLog:a}=r.getOptions();if(!i){A&&_.warn("logging option not enabled, log will not be captured.");return}const[,c]=Uh(r,t),u={...e.attributes},{user:{id:f,email:l,username:d},attributes:p={}}=Bo(be(),t);vt(u,"user.id",f,!1),vt(u,"user.email",l,!1),vt(u,"user.name",d,!1),vt(u,"sentry.release",o),vt(u,"sentry.environment",s);const{name:h,version:m}=((F=r.getSdkMetadata())==null?void 0:F.sdk)??{};vt(u,"sentry.sdk.name",h),vt(u,"sentry.sdk.version",m);const g=r.getIntegrationByName("Replay"),y=g==null?void 0:g.getReplayId(!0);vt(u,"sentry.replay_id",y),y&&(g==null?void 0:g.getRecordingMode())==="buffer"&&vt(u,"sentry._internal.replay_is_buffering",!0);const S=e.message;
9if(ki(S)){const{__sentry_template_string__:q,__sentry_template_values__:K=[]}=S;K!=null&&K.length&&(u["sentry.message.template"]=q),K.forEach((G,$)=>{u[`sentry.message.parameter.${$}`]=G})}const I=Ar(t);vt(u,"sentry.trace.parent_span_id",I==null?void 0:I.spanContext().spanId);const v={...e,attributes:u};r.emit("beforeCaptureLog",v);const w=a?Jt(()=>a(v)):v;if(!w){r.recordDroppedEvent("before_send","log_item",1),A&&_.warn("beforeSendLog returned null, log will not be captured.");return}const{level:T,message:b,attributes:D={},severityNumber:N}=w,E=me(),L=Bh(E),M={timestamp:E,level:T,body:lc(String(b)),trace_id:c==null?void 0:c.trace_id,severity_number:N??uE[T],attributes:yE({...Nr(p),...Nr(D,!0),[L.key]:L.value})};n(r,M),r.emit("afterCaptureLog",w)}function Hh(e,t){const n=t??Wh(e)??[];if(n.length===0)return;const r=e.getOptions(),o=mE(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);cu().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function Wh(e){return cu().get(e)}function cu(){return Gr("clientToLogBufferMap",()=>new WeakMap)}function yE(e){const t={};for(const[n,r]of Object.entries(e)){const o=lc(n);r.type==="string"?t[o]={...r,value:lc(r.value)}:t[o]=r}return t}function lc(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 SE(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,...mn()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function bE(e,t,n,r,o){const s={};return t!=null&&t.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=Pt(r)),ut(s,[SE(e,o)])}const EE=1e3;function Ut(e,t,n,r=!0){n&&(r||!(t in e))&&(e[t]=n)}function vE(e,t){const n=uu(),r=zh(e);r===void 0?n.set(e,[t]):r.length>=EE?(jh(e,r),n.set(e,[t])):n.set(e,[...r,t])}function TE(e,t,n){var f;const{release:r,environment:o}=t.getOptions(),s={...e.attributes};Ut(s,"user.id",n.id,!1),Ut(s,"user.email",n.email,!1),Ut(s,"user.name",n.username,!1),Ut(s,"sentry.release",r),Ut(s,"sentry.environment",o);const{name:i,version:a}=((f=t.getSdkMetadata())==null?void 0:f.sdk)??{};Ut(s,"sentry.sdk.name",i),Ut(s,"sentry.sdk.version",a);const c=t.getIntegrationByName("Replay"),u=c==null?void 0:c.getReplayId(!0);return Ut(s,"sentry.replay_id",u),u&&(c==null?void 0:c.getRecordingMode())==="buffer"&&Ut(s,"sentry._internal.replay_is_buffering",!0),{...e,attributes:s}}function IE(e,t,n,r){const[,o]=Uh(t,n),s=Ar(n),i=s?s.spanContext().traceId:o==null?void 0:o.trace_id,a=s?s.spanContext().spanId:void 0,c=me(),u=Bh(c);return{timestamp:c,trace_id:i??"",span_id:a,name:e.name,type:e.type,unit:e.unit,value:e.value,attributes:{...Nr(r),...Nr(e.attributes,"skip-undefined"),[u.key]:u.value}}}function wE(e,t){const n=(t==null?void 0:t.scope)??H(),r=(t==null?void 0:t.captureSerializedMetric)??vE,o=(n==null?void 0:n.getClient())??C();if(!o){A&&_.warn("No client available to capture metric.");return}const{_experiments:s,enableMetrics:i,beforeSendMetric:a}=o.getOptions();if(!(i??(s==null?void 0:s.enableMetrics)??!0)){A&&_.warn("metrics option not enabled, metric will not be captured.");return}const{user:u,attributes:f}=Bo(be(),n),l=TE(e,o,u);
9o.emit("processMetric",l);const d=a||(s==null?void 0:s.beforeSendMetric),p=d?d(l):l;if(!p){A&&_.log("`beforeSendMetric` returned `null`, will not send metric.");return}const h=IE(p,o,n,f);A&&_.log("[Metric]",h),r(o,h),o.emit("afterCaptureMetric",p)}function jh(e,t){const n=t??zh(e)??[];if(n.length===0)return;const r=e.getOptions(),o=bE(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);uu().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function zh(e){return uu().get(e)}function uu(){return Gr("clientToMetricBufferMap",()=>new WeakMap)}function RE(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 fh(t)}function kE(e,t){var s,i,a;if(e.type!=="transaction"||!((s=e.spans)!=null&&s.length)||!((i=e.sdkProcessingMetadata)!=null&&i.hasGenAiSpans)||t.getOptions().streamGenAiSpans===!1||lt(t))return;const n=[],r=[];for(const c of e.spans)(a=c.op)!=null&&a.startsWith("gen_ai.")?n.push(RE(c)):r.push(c);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,...mn()&&{ingest_settings:{infer_ip:o,infer_user_agent:o}},items:n}]}const lu=Symbol.for("SentryBufferFullError");function fu(e=100){const t=new Set;function n(){return t.size<e}function r(i){t.delete(i)}function o(i){if(!n())return Nh(lu);const a=i();return t.add(a),a.then(()=>r(a),()=>r(a)),a}function s(i){if(!t.size)return Uo(!0);const a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!i)return a;const c=[a,new Promise(u=>Di(setTimeout(()=>u(!1),i)))];return Promise.race(c)}return{get $(){return Array.from(t)},add:o,drain:s}}const AE=60*1e3;function qh(e,t=Ot()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?AE:r-t}function CE(e,t){return e[t]||e.all||0}function Gh(e,t,n=Ot()){return CE(e,t)>n}function Vh(e,{statusCode:t,headers:n},r=Ot()){const o={...e},s=n==null?void 0:n["x-sentry-rate-limits"],i=n==null?void 0:n["retry-after"];if(s)for(const a of s.trim().split(",")){const[c,u,,,f]=a.split(":",5),l=parseInt(c,10),d=(isNaN(l)?60:l)*1e3;if(!u)o.all=r+d;else for(const p of u.split(";"))p==="metric_bucket"?(!f||f.split(";").includes("custom"))&&(o[p]=r+d):o[p]=r+d}else i?o.all=r+qh(i,r):t===429&&(o.all=r+60*1e3);return o}const Yh=64;function NE(e,t,n=fu(e.bufferSize||Yh)){let r={};const o=i=>n.drain(i);function s(i){const a=[];if(Yn(i,(l,d)=>{const p=Ll(d);Gh(r,p)?e.recordDroppedEvent("ratelimit_backoff",p):a.push(l)}),a.length===0)return Promise.resolve({});const c=ut(i[0],a),u=l=>{if(ac(c,["client_report"])){A&&_.warn(`Dropping client report. Will not send outcomes (reason: ${l}).`);return}Yn(c,(d,p)=>{e.recordDroppedEvent(l,Ll(p))})},f=()=>t({body:ni(c)}).then(l=>l.statusCode===413?(A&&_.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),u("send_error"),l):(A&&l.statusCode!==void 0&&(l.statusCode<200||l.statusCode>=300)&&_.warn(`Sentry responded with status code ${l.statusCode} to sent event.`),r=Vh(r,l),l),l=>{throw u("network_error"),A&&_.error("Encountered error running transport request:",l),l});return n.add(f).then(l=>l,l=>{if(l===lu)return A&&_.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw l})}return{send:s,flush:o}}function ME(e,t,n){const r=[{type:"client_report"},{timestamp:er(),discarded_events:e}];return ut(t?{dsn:t}:{},[r])}function Jh(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n!=null&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function xE(e){var c;const{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:s,data:i,op:a}=((c=e.contexts)==null?void 0:c.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==null?void 0:i[Xc],exclusive_time:i==null?void 0:i[wn],measurements:e.measurements,is_segment:!0}}function OE(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&&{[Xc]:e.profile_id},...e.exclusive_time&&{[wn]:e.exclusive_time}}}},measurements:e.measurements}}const ao="[Filtered]",ds=["forwarded","-ip","remote-","via","-user"],Xl=["auth","token","secret","session","password","passwd","pwd","key","jwt","bearer","sso","saml","csrf","xsrf","credentials","sid","identity","set-cookie","cookie"],PE=[".sid","sessid","remember","oidc","pkce","nonce","__secure-","__host-","awsalb","awselb","akamai","__stripe","cognito","firebase","supabase","sb-","mfa","2fa"];function LE(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 DE={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 FE(e){var r,o,s,i,a,c;const t=e.dataCollection!=null?DE:LE(e.sendDefaultPii),n=e.dataCollection??{};return{userInfo:n.userInfo??t.userInfo,cookies:n.cookies??t.cookies,httpHeaders:{request:((r=n.httpHeaders)==null?void 0:r.request)??t.httpHeaders.request,response:((o=n.httpHeaders)==null?void 0:o.response)??t.httpHeaders.response},httpBodies:n.httpBodies??t.httpBodies,urlQueryParams:n.urlQueryParams??n.queryParams??t.urlQueryParams,graphQL:{document:((s=n.graphQL)==null?void 0:s.document)??t.graphQL.document,variables:((i=n.graphQL)==null?void 0:i.variables)??t.graphQL.variables},genAI:{inputs:((a=n.genAI)==null?void 0:a.inputs)??t.genAI.inputs,outputs:((c=n.genAI)==null?void 0:c.outputs)??t.genAI.outputs},databaseQueryData:n.databaseQueryData??t.databaseQueryData,stackFrameVariables:n.stackFrameVariables??t.stackFrameVariables,frameContextLines:n.frameContextLines??t.frameContextLines}}const Ql="Not capturing exception because it's already been captured.",Zl="Discarded session because of missing or non-string release",Kh=Symbol.for("SentryInternalError"),Xh=Symbol.for("SentryDoNotSendEventError"),$E=5e3;function xs(e){return{message:e,[Kh]:!0}}function ka(e){return{message:e,[Xh]:!0}}function ef(e){return it(e)&&Kh in e}function tf(e){return it(e)&&Xh in e}function nf(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??$E;u>0&&(a=!0,i=Di(setTimeout(()=>{o(e)},u)))}}),e.on("flush",()=>{o(e)})}class BE{constructor(t){var r,o,s;if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=fu(((r=t.transportOptions)==null?void 0:r.bufferSize)??Yh),this._dataCollection=FE(t),t.dsn?this._dsn=th(t.dsn):A&&_.warn("No DSN provided, client will not send events."),this._dsn){const i=Fh(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:i})}this._options.enableLogs=this._options.enableLogs??((o=this._options._experiments)==null?void 0:o.enableLogs)??!0,this._options.enableLogs&&nf(this,"afterCaptureLog","flushLogs",jE,Hh),(this._options.enableMetrics??((s=this._options._experiments)==null?void 0:s.enableMetrics)??!0)&&nf(this,"afterCaptureMetric","flushMetrics",WE,jh)}captureException(t,n,r){const o=Ne();if(bl(t))return A&&_.log(Ql),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:Ne(),...r},i=ki(t)?t:String(t),a=kt(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=Ne();if(n!=null&&n.originalException&&bl(n.originalException))return A&&_.log(Ql),o;const s={event_id:o,...n},i=t.sdkProcessingMetadata||{},a=i.capturedSpanScope,c=i.capturedSpanIsolationScope,u=rf(t.type);return this._process(()=>this._captureEvent(t,s,a||r,c),u),s.event_id}captureSession(t){this.sendSession(t),kr(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;
9if(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);return this.getOptions().enabled=!1,this.emit("close"),n}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(t){const n=this._integrations[t.name];!n&&t.beforeSetup&&t.beforeSetup(this),$h(this,t,this._integrations),n||Jl(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);const r=kE(t,this);let o=GS(t,this._dsn,this._options._metadata,this._options.tunnel);for(const s of n.attachments||[])o=Pl(o,WS(s));r&&(o=Pl(o,r)),this.sendEnvelope(o).then(s=>this.emit("afterSendEvent",t,s))}sendSession(t){const{release:n,environment:r=Fo}=this._options;if("aggregates"in t){const s=t.attrs||{};if(!s.release&&!n){A&&_.warn(Zl);return}s.release=s.release||n,s.environment=s.environment||r,t.attrs=s}else{if(!t.release&&!n){A&&_.warn(Zl);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const o=qS(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}`;A&&_.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 A&&_.error("Error while sending envelope:",n),{}}return A&&_.error("Transport disabled"),{}}registerCleanup(t){}dispose(){}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=aE(this,t),Jl(this,t)}_updateSessionFromEvent(t,n){var c,u;let r=n.level==="fatal",o=!1;const s=(c=n.exception)==null?void 0:c.values;if(s){o=!0,r=!1;for(const f of s)if(((u=f.mechanism)==null?void 0:u.handled)===!1){r=!0;break}}const i=t.status==="ok";(i&&t.errors===0||i&&r)&&(kr(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),xh(s,t,n,r,this,o).then(a=>{var u;if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:{...(u=a.contexts)==null?void 0:u.trace,...Gp(r)},...a.contexts};const c=Mi(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=H(),o=be()){return A&&fc(t)&&_.log(`Captured error event \`${Jh(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,o).then(s=>s.event_id,s=>{A&&(tf(s)?_.log(s.message):ef(s)?_.warn(s.message):_.warn(s))})}_processEvent(t,n,r,o){const s=this.getOptions(),{sampleRate:i}=s,a=Qh(t),c=fc(t),f=`before send for type \`${t.type||"error"}\``,l=typeof i>"u"?void 0:Gn(i),d=rf(t.type);return this._prepareEvent(t,n,r,o).then(p=>{var g;if(p===null)throw this.recordDroppedEvent("event_processor",d),ka("An event processor returned `null`, will not send event.");if(((g=n.data)==null?void 0:g.__sentry__)===!0)return p;const m=HE(this,s,p,n);return UE(m,f)}).then(p=>{var g;if(p===null){if(this.recordDroppedEvent("before_send",d),a){const S=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",S)}throw ka(`${f} returned \`null\`, will not send event.`)}const h=r.getSession()||o.getSession();if(c&&h&&this._updateSessionFromEvent(h,p),c&&typeof l=="number"&&jt()>
9l)throw this.recordDroppedEvent("sample_rate","error"),ka(`Discarding event because it's not included in the random sample (sampling rate = ${i})`);if(a){const y=((g=p.sdkProcessingMetadata)==null?void 0:g.spanCountBeforeProcessing)||0,S=p.spans?p.spans.length:0,I=y-S;I>0&&this.recordDroppedEvent("before_send","span",I)}const m=p.transaction_info;if(a&&m&&p.transaction!==t.transaction){const y="custom";p.transaction_info={...m,source:y}}return this.sendEvent(p,n),p}).then(null,p=>{throw tf(p)||ef(p)?p:(this.captureException(p,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:p}),xs(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. 10Reason: ${p}`))})}_process(t,n){this._numProcessing++,this._promiseBuffer.add(t).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===lu&&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(){A&&_.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){A&&_.log("No outcomes to send");return}if(!this._dsn){A&&_.log("No dsn provided, will not send outcomes");return}A&&_.log("Sending outcomes:",t);const n=ME(t,this._options.tunnel&&Pt(this._dsn));this.sendEnvelope(n)}}function rf(e){return e==="replay_event"?"replay":e||"error"}function UE(e,t){const n=`${t} must return \`null\` or a valid event.`;if(Tn(e))return e.then(r=>{if(!Be(r)&&r!==null)throw xs(n);return r},r=>{throw xs(`${t} rejected with ${r}`)});if(!Be(e)&&e!==null)throw xs(n);return e}function HE(e,t,n,r){const{beforeSend:o,beforeSendTransaction:s,ignoreSpans:i}=t,a=!xi(t.beforeSendSpan)&&t.beforeSendSpan;let c=n;if(fc(c)&&o)return o(c,r);if(Qh(c)){if(a||i){const u=xE(c);if(i!=null&&i.length&&bo({description:u.description,op:u.op,attributes:u.data},i))return null;if(a){const f=a(u);f?c=Oo(n,OE(f)):ei()}if(c.spans){const f=[],l=c.spans;for(const p of l){if(i!=null&&i.length&&bo({description:p.description,op:p.op,attributes:p.data},i)){DS(l,p);continue}if(a){const h=a(p);h?f.push(h):(ei(),f.push(p))}else f.push(p)}const d=c.spans.length-f.length;d&&e.recordDroppedEvent("before_send","span",d),c.spans=f}}if(s){if(c.spans){const u=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:u}}return s(c,r)}}return c}function fc(e){return e.type===void 0}function Qh(e){return e.type==="transaction"}function WE(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+Zh(e.attributes)}function jE(e){let t=0;return e.message&&(t+=e.message.length*2),t+Zh(e.attributes)}function Zh(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*of(n[0]):kt(n)?t+=of(n):t+=100}),t}function of(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function zE(e,t){t.debug===!0&&(A?_.enable():Jt(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),H().update(t.initialScope);const r=new e(t);return qE(r),r.init(),r}function qE(e){H().setClient(e)}const Aa=100,Ca=5e3,GE=36e5;function VE(e){function t(...n){A&&_.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=Ca,i;function a(l,d,p){return ac(l,["client_report"])?!1:n.shouldStore?n.shouldStore(l,d,p):!0}function c(l){i&&clearTimeout(i),i=Di(setTimeout(async()=>{i=void 0;const d=await o.shift();d&&(t("Attempting to send previously queued event"),d[0].sent_at=new Date(Ot()).toISOString(),f(d,!0).catch(p=>{t("Failed to retry sending",p)}))},l))}function u(){i||(c(s),s=Math.min(s*2,GE))}async function f(l,d=!1){var p,h;if(!d&&ac(l,["replay_event","replay_recording"]))return await o.push(l),c(Aa),{};try{if(n.shouldSend&&await n.shouldSend(l)===!1)throw new Error("Envelope not sent because `shouldSend` callback returned false");const m=await r.send(l);let g=Aa;if(m){if((p=m.headers)!=null&&p["retry-after"])g=qh(m.headers["retry-after"]);else if((h=m.headers)!=null&&h["x-sentry-rate-limits"])g=6e4;else if((m.statusCode||0)>=400)return m}return c(g),s=Ca,m}catch(m){if(await a(l,m,s))return d?await o.unshift(l):await o.push(l),u(),t("Error sending. Event queued.",m),{};throw m}}return n.flushAtStartup&&u(),{send:f,flush:l=>(l===void 0&&(s=Ca,c(Aa)),r.flush(l))}}}const Na="MULTIPLEXED_TRANSPORT_EXTRA_KEY";function em(e,t){let n;return Yn(e,(r,o)=>(t.includes(o)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function YE(e,t){return n=>{const r=e(n);return{...r,send:async o=>{const s=em(o,["event","transaction","profile","replay_event"]);return s&&(s.release=t),r.send(o)}}}}function JE(e,t){return ut(t?{...e[0],dsn:t}:e[0],e[1])}function bL(e,t){return n=>{const r=e(n),o=new Map,s=t||(u=>{var l;const f=u.getEvent();return(l=f==null?void 0:f.extra)!=null&&l[Na]&&Array.isArray(f.extra[Na])?f.extra[Na]:[]});function i(u,f){const l=f?`${u}:${f}`:u;let d=o.get(l);if(!d){const p=Qp(u);if(!p)return;const h=Fh(p,n.tunnel);d=f?YE(e,f)({...n,url:h}):e({...n,url:h}),o.set(l,d)}return[u,d]}async function a(u){function f(h){const m=h!=null&&h.length?h:["event"];return em(u,m)}const l=s({envelope:u,getEvent:f}).map(h=>typeof h=="string"?i(h,void 0):i(h.dsn,h.release)).filter(h=>!!h),d=l.length?l:[["",r]];return(await Promise.all(d.map(([h,m])=>m.send(JE(u,h)))))[0]}async function c(u){const f=[...o.values(),r];return(await Promise.all(f.map(d=>d.flush(u)))).every(d=>d)}return{send:a,flush:c}
10}}function Ma(e,t){return t.some(n=>e.includes(n))}function vo(e,t,n){if(t===!1)return{};const r=n!=null?[...Xl,...n]:Xl,o={};if(t===!0){for(const i of Object.keys(e))o[i]=Ma(i.toLowerCase(),r)?ao:e[i];return o}if("deny"in t){const i=t.deny.map(a=>a.toLowerCase());for(const a of Object.keys(e)){const c=a.toLowerCase(),u=Ma(c,r)||i.some(f=>c.includes(f));o[a]=u?ao:e[a]}return o}const s=t.allow.map(i=>i.toLowerCase());for(const i of Object.keys(e)){const a=i.toLowerCase();if(Ma(a,r))o[i]=ao;else{const c=s.some(u=>a.includes(u));o[i]=c?e[i]:ao}}return o}function KE(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 dc(e,t){if(t===!1)return{};try{const n=KE(e);return Object.keys(n).length===0?{}:vo(n,t,PE)}catch{return ao}}const XE="thismessage:/";function Fi(e){return"isRelative"in e}function To(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=n?XE: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 tm(e){if(Fi(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 Wn(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 nm(e){return e.split(/[?#]/,1)[0]}function gt(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 rm(e,t){const n=t==null?void 0:t.getDsn(),r=t==null?void 0:t.getOptions().tunnel;return ZE(e,n)||QE(e,r)}function QE(e,t){return t?sf(e)===sf(t):!1}function ZE(e,t){const n=To(e);return!n||Fi(n)||!t?!1:ev(n.hostname,t.host)&&/(^|&|\?)sentry_key=/.test(n.search)}function ev(e,t){return e===t||t.length>0&&e.endsWith(`.${t}`)}function sf(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function tv(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 nv=tv;function rv(e){var t;"aggregates"in e?((t=e.attrs)==null?void 0:t.ip_address)===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function om(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:sn})),o.version=sn)}function sm(e={}){const t=e.client||C();if(!Zb()||!t)return{};const n=xt(),r=In(n);if(r.getTraceData)return r.getTraceData(e);const o=e.scope||H(),s=e.span||Te(),i=xr(s)&&!Qe(t.getOptions()),a=s&&!i?MS(s):ov(o),c=s?Et(s):Mi(t,o),u=Xp(c);if(!nh.test(a))return _.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const l={"sentry-trace":a,baggage:u};return e.propagateTraceparent&&(l.traceparent=s&&!i?xS(s):sv(o)),l}function ov(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return oh(t,r,n)}function sv(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return sh(t,r,n)}const iv=100;function Nt(e,t){const n=C(),r=be();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:s=iv}=n.getOptions();if(s<=0)return;const a={timestamp:er(),...e},c=o?Jt(()=>o(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,s))}const av="FunctionToString",af=new WeakMap,cv=(()=>({name:av,setupOnce(){const e=Function.prototype.toString;try{Function.prototype.toString=function(...t){const n=Jc(this);let r;try{af.has(C())&&n!==void 0&&(r=n)}catch{}return e.apply(r??this,t)}}catch{}},setup(e){af.set(e,!0)}})),uv=cv,lv=[/^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$/],fv="EventFilters",dv=(e
10={})=>{let t;return{name:fv,setup(n){const r=n.getOptions();t=cf(e,r)},processEvent(n,r,o){if(!t){const s=o.getOptions();t=cf(e,s)}return hv(n,t)?null:n}}},pv=((e={})=>({...dv(e),name:"InboundFilters"}));function cf(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:lv],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function hv(e,t){if(e.type){if(e.type==="transaction"&&gv(e,t.ignoreTransactions))return A&&_.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. 11Event: ${On(e)}`),!0}else{if(mv(e,t.ignoreErrors))return A&&_.warn(`Event dropped due to being matched by \`ignoreErrors\` option. 12Event: ${On(e)}`),!0;if(bv(e))return A&&_.warn(`Event dropped due to not having an error message, error type or stacktrace. 13Event: ${On(e)}`),!0;if(_v(e,t.denyUrls))return A&&_.warn(`Event dropped due to being matched by \`denyUrls\` option. 14Event: ${On(e)}. 15Url: ${oi(e)}`),!0;if(!yv(e,t.allowUrls))return A&&_.warn(`Event dropped due to not being matched by \`allowUrls\` option. 16Event: ${On(e)}. 17Url: ${oi(e)}`),!0}return!1}function mv(e,t){return t!=null&&t.length?Jh(e).some(n=>at(n,t)):!1}function gv(e,t){if(!(t!=null&&t.length))return!1;const n=e.transaction;return n?at(n,t):!1}function _v(e,t){if(!(t!=null&&t.length))return!1;const n=oi(e);return n?at(n,t):!1}function yv(e,t){if(!(t!=null&&t.length))return!0;const n=oi(e);return n?at(n,t):!0}function Sv(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 oi(e){var t,n;try{const r=[...((t=e.exception)==null?void 0:t.values)??[]].reverse().find(s=>{var i,a,c;return((i=s.mechanism)==null?void 0:i.parent_id)===void 0&&((c=(a=s.stacktrace)==null?void 0:a.frames)==null?void 0:c.length)}),o=(n=r==null?void 0:r.stacktrace)==null?void 0:n.frames;return o?Sv(o):null}catch{return A&&_.error(`Cannot extract url for event ${On(e)}`),null}}function bv(e){var t,n;return(n=(t=e.exception)==null?void 0:t.values)!=null&&n.length?!e.message&&!e.exception.values.some(r=>r.stacktrace||r.type&&r.type!=="Error"||r.value):!1}function Ev(e,t,n,r,o,s){var a;if(!((a=o.exception)!=null&&a.values)||!s||!He(s.originalException))return;const i=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;i&&(o.exception.values=pc(e,t,r,s.originalException,n,o.exception.values,i,0))}function pc(e,t,n,r,o,s,i,a){if(s.length>=n+1)return s;let c=[...s];if(He(r[o])){uf(i,a,r);const u=e(t,r[o]),f=c.length;lf(u,o,f,a),c=pc(e,t,n,r[o],o,[u,...c],u,f)}return im(r)&&r.errors.forEach((u,f)=>{if(He(u)){uf(i,a,r);const l=e(t,u),d=c.length;lf(l,`errors[${f}]`,d,a),c=pc(e,t,n,u,o,[l,...c],l,d)}}),c}function im(e){return Array.isArray(e.errors)}function uf(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...im(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function lf(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function vv(e){return He(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function ff(e){return vv(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}const am=new Map,df=new Set;function Tv(e){if(U._sentryModuleMetadata)for(const t of Object.keys(U._sentryModuleMetadata)){const n=U._sentryModuleMetadata[t];if(df.has(t))continue;df.add(t);const r=e(t);for(const o of r.reverse())if(o.filename){am.set(o.filename,n);break}}}function Iv(e,t){return Tv(e),am.get(t)}function cm(e,t){var n,r;(r=(n=t.exception)==null?void 0:n.values)==null||r.forEach(o=>{var s,i;(i=(s=o.stacktrace)==null?void 0:s.frames)==null||i.forEach(a=>{if(!a.filename||a.module_metadata)return;const c=Iv(e,a.filename);c&&(a.module_metadata=c)})})}function um(e){var t,n;(n=(t=e.exception)==null?void 0:t.values)==null||n.forEach(r=>{var o,s;(s=(o=r.stacktrace)==null?void 0:o.frames)==null||s.forEach(i=>{delete i.module_metadata})})}const EL=()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",t=>{Yn(t,(n,r)=>{if(r==="event"){const o=Array.isArray(n)?n[1]:void 0;o&&(um(o),n[1]=o)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;const n=e.getOptions().stackParser;cm(n,t)})}}),pf=new Set([]);function du(e){const t="console",n=En(t,e);return vn(t,wv),n}const hf=new Set;
17function wv(){"console"in U&&qc.forEach(function(e){hf.has(e)||!(e in U.console)||(hf.add(e),Oe(U.console,e,function(t){return Ys[e]=t,function(...n){const r=n[0],o=Ys[e],s=pf.size&&typeof r=="string"&&at(r,pf);s||st("console",{args:n,level:e}),(!s||A&&_.isEnabled())&&(o==null||o.apply(U.console,n))}}))})}function si(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const Rv="CaptureConsole",kv=((e={})=>{const t=e.levels||qc,n=e.handled??!0;return{name:Rv,setup(r){"console"in U&&du(({args:o,level:s})=>{C()!==r||!t.includes(s)||Av(o,s,n)})}}}),vL=kv;function Av(e,t,n){const r=si(t),o=new Error,s={level:si(t),extra:{arguments:e}};Ze(i=>{if(i.addEventProcessor(u=>(u.logger="console",It(u,{handled:n,type:"auto.core.capture_console"}),u)),t==="assert"){if(!e[0]){const u=`Assertion failed: ${Js(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){St(a,s);return}const c=Js(e," ");i.captureMessage(c,r,{captureContext:s,syntheticException:o})})}
17const Cv="Dedupe",Nv=(()=>{let e;return{name:Cv,processEvent(t){if(t.type)return t;try{if(xv(t,e))return A&&_.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),Mv=Nv;function xv(e,t){return t?!!(Ov(e,t)||Pv(e,t)):!1}function Ov(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!fm(e,t)||!lm(e,t))}function Pv(e,t){const n=mf(t),r=mf(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!fm(e,t)||!lm(e,t))}function lm(e,t){let n=ec(e),r=ec(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 fm(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 mf(e){var t,n;return(n=(t=e.exception)==null?void 0:t.values)==null?void 0:n[0]}const Lv="ExtraErrorData",Dv=((e={})=>{const{depth:t=3,captureErrorCause:n=!0}=e;return{name:Lv,processEvent(r,o,s){const{maxValueLength:i}=s.getOptions();return Fv(r,o,t,n,i)}}}),TL=Dv;function Fv(e,t={},n,r,o){if(!t.originalException||!He(t.originalException))return e;const s=t.originalException.name||t.originalException.constructor.name,i=dm(t.originalException,r,o);if(i){const a={...e.contexts},c=ke(i,n);return Be(c)&&(Cy(c),a[s]=c),{...e,contexts:a}}return e}function dm(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]=He(i)||typeof i=="string"?n?yo(`${i}`,n):`${i}`:i}if(t&&e.cause!==void 0)if(He(e.cause)){const s=e.cause.name||e.cause.constructor.name;o.cause={[s]:dm(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]=He(a)?a.toString():a}}return o}catch(r){A&&_.error("Unable to extract extra data from the Error object:",r)}return null}function $v(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 Bv=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function Uv(e){const t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=Bv.exec(t);return n?n.slice(1):[]}function gf(...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=$v(t.split("/").filter(r=>!!r),!n).join("/"),(n?"/":"")+t||"."}function _f(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 Hv(e,t){e=gf(e).slice(1),t=gf(t).slice(1);const n=_f(e.split("/")),r=_f(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 Wv(e,t){return Uv(e)[2]||""}const jv="RewriteFrames",IL=(e={})=>{const t=e.root,n=e.prefix||"app:///",r="window"in U&&!!U.window,o=e.iteratee||zv({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){var c;return{...a,frames:(c=a==null?void 0:a.frames)==null?void 0:c.map(u=>o(u))}}return{name:jv,processEvent(a){let c=a;return a.exception&&Array.isArray(a.exception.values)&&(c=s(c)),c}}};function zv({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?Hv(t,i):Wv(i);r.filename=`${n}${a}`}return r}}const qv=["reauthenticate","signInAnonymously","signInWithOAuth","signInWithIdToken","signInWithOtp","signInWithPassword","signInWithSSO","signOut","signUp","verifyOtp"],Gv=["createUser","deleteUser","listUsers","getUserById","updateUserById","inviteUserByEmail"],Vv={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"},pm=["select","insert","upsert","update","delete"];function $i(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch{}}function Bi(e){try{return e.__SENTRY_INSTRUMENTED__}catch{return!1}}function hm(e,t){if(Object.keys(t).length>0)return t;if(Array.isArray(e)&&e.length>0)return e}function Yv(e,t){return hm(e,t)!==void 0}function mm(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 Jv(e,t={}){var n;switch(e){case"GET":return"select";case"POST":return(n=mm(t,"Prefer"))!=null&&n.includes("resolution=")?"upsert":"insert";case"PATCH":return"update";case"DELETE":return"delete";default:return"<unknown-op>"}}function Kv(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!=null&&n.startsWith("fts")?o="textSearch":n!=null&&n.startsWith("plfts")?o="textSearch[plain]":n!=null&&n.startsWith("phfts")?o="textSearch[phrase]":n!=null&&n.startsWith("wfts")?o="textSearch[websearch]":o=n&&Vv[n]||"filter",`${o}(${e}, ${r.join(".")})`}function yf(e,t=!1){return new Proxy(e,{apply(n,r,o){return Kt({name:`auth ${t?"(admin) ":""}${e.name}`,attributes:{[J]:"auto.db.supabase",[ce]:"db","db.system":"postgresql","db.operation":`auth.${t?"admin.":""}${e.name}`}},s=>Reflect.apply(n,r,o).then(i=>(it(i)&&"error"in i&&i.error?(s.setStatus({code:re}),St(i.error,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}})):s.setStatus({code:Do}),s.end(),i)).catch(i=>{throw s.setStatus({code:re}),s.end(),St(i,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}}),i}).then(...o))}})}function Xv(e){const t=e.auth;if(!(!t||Bi(e.auth))){for(const n of qv){const r=t[n];r&&typeof e.auth[n]=="function"&&(e.auth[n]=yf(r))}for(const n of Gv){const r=t.admin[n];r&&typeof e.auth.admin[n]=="function"&&(e.auth.admin[n]=yf(r,!0))}$i(e.auth)}}function Qv(e,t){Bi(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 eT(i,t),s}}),$i(e.prototype.from))}function Zv(e,t){Bi(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(n,r,o){var v;const s=pm,i=r,a=Jv(i.method,i.headers);if(!s.includes(a)||!((v=i==null?void 0:i.url)!=null&&v.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]:"",f=[];
17for(const[w,T]of i.url.searchParams.entries())f.push(Kv(w,T));const l=Object.create(null);if(Be(i.body))for(const[w,T]of Object.entries(i.body))l[w]=T;const d=C(),p=t.sendOperationData??(d==null?void 0:d.getDataCollectionOptions().databaseQueryData)===!0,h=hm(i.body,l),m=a==="select"?"":`${a}${Yv(i.body,l)?"(...) ":""}`,g=p?f.join(" "):f.length>0?"[redacted]":"",y=[m.trimEnd(),g].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":mm(i.headers,"X-Client-Info"),"db.system":"postgresql","db.operation":a,[J]:"auto.db.supabase",[ce]:"db"};return f.length&&p&&(I["db.query"]=f),h!==void 0&&p&&(I["db.body"]=h),Kt({name:S,attributes:I},w=>Reflect.apply(n,r,[]).then(T=>{if(w&&(T&&typeof T=="object"&&"status"in T&&Ks(w,T.status||500),w.end()),T!=null&&T.error){const N=new Error(T.error.message);T.error.code&&(N.code=T.error.code),T.error.details&&(N.details=T.error.details);const E={};f.length&&p&&(E.query=f),h!==void 0&&p&&(E.body=h),St(N,L=>(L.addEventProcessor(M=>(It(M,{handled:!1,type:"auto.db.supabase.postgres"}),M)),L.setContext("supabase",E),L))}const b={type:"supabase",category:`db.${a}`,message:S},D={};return f.length&&p&&(D.query=f),h!==void 0&&p&&(D.body=h),Object.keys(D).length&&(b.data=D),Nt(b),T},T=>{throw w&&(Ks(w,500),w.end()),T}).then(...o))}}),$i(e.prototype.then))}function eT(e,t){for(const n of pm)Bi(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 A&&_.log(`Instrumenting ${n} operation's PostgRESTFilterBuilder`),Zv(a,t),i}}),$i(e.prototype[n]))}const tT=(e,t={})=>{if(!e){A&&_.warn("Supabase integration was not installed because no Supabase client was provided.");return}const n=e.constructor===Function?e:e.constructor;Qv(n,t),Xv(e)},nT="Supabase",rT=((e,t)=>({setupOnce(){tT(e,t)},name:nT})),wL=e=>rT(e.supabaseClient,{sendOperationData:e.sendOperationData}),oT=10,sT="ZodErrors";function iT(e){return He(e)&&e.name==="ZodError"&&Array.isArray(e.issues)}function aT(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 cT(e){return e.map(t=>typeof t=="number"?"<array>":t).join(".")}function uT(e){const t=new Set;for(const r of e.issues){const o=cT(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: ${yo(n.join(", "),100)}`}function lT(e,t=!1,n,r){var o;if(!((o=n.exception)!=null&&o.values)||!r.originalException||!iT(r.originalException)||r.originalException.issues.length===0)return n;try{const i=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(aT);return t&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({filename:"zod_issues.json",data:JSON.stringify({issues:i})})),{...n,exception:{...n.exception,values:[{...n.exception.values[0],value:uT(r.originalException)},...n.exception.values.slice(1)]},extra:{...n.extra,"zoderror.issues":i.slice(0,e)}}}catch(s){return{...n,extra:{...n.extra,"zoderrors sentry integration parse error":{message:"an exception was thrown while processing ZodError within applyZodErrorsToEvent()",error:s instanceof Error?`${s.name}: ${s.message} 18${s.stack}`:"unknown"}}}}}const fT=((e={})=>{const t=e.limit??oT;return{name:sT,processEvent(n,r){return lT(t,e.saveZodIssuesAsAttachment,n,r)}}}),RL=fT,kL=e=>({name:"ThirdPartyErrorsFilter",setup(t){t.on("beforeEnvelope",n=>{Yn(n,(r,o)=>{if(o==="event"){const s=Array.isArray(r)?r[1]:void 0;s&&(um(s),r[1]=s)}})}),t.on("applyFrameMetadata",n=>{if(n.type)return;const r=t.getOptions().stackParser;cm(r,n)})},preprocessEvent(t){e.ignoreSentryInternalFrames&&(U._sentryWrappedDepth??0)>0&&(t.sdkProcessingMetadata={...t.sdkProcessingMetadata,insideSentryWrapped:!0})},processEvent(t){var o,s,i;const n=e.ignoreSentryInternalFrames?((o=t.sdkProcessingMetadata)==null?void 0:o.insideSentryWrapped)===!0&&((i=(s=t.exception)==null?void 0:s.values)==null?void 0:i.length)===1:!1,r=pT(t,e.ignoreSentryInternalFrames,n);if(r){const a=e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="apply-tag-if-contains-third-party-frames"?"some":"every";if(r[a](u=>!u.some(f=>e.filterKeys.includes(f)))){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 dT(e,t,n){var r;if(t!==0)return!1;if(n&&hT(e)||e.function==="sentryWrapped")return!0;
18if(!e.context_line||!e.filename||!e.filename.includes("sentry")||!e.filename.includes("helpers")||!e.context_line.includes(gT))return!1;if(e.pre_context){const o=e.pre_context.length;for(let s=0;s<o;s++)if((r=e.pre_context[s])!=null&&r.includes(mT))return!0}return!1}function pT(e,t,n){const r=ec(e);if(r)return r.filter((o,s)=>!o.filename||o.lineno==null&&o.colno==null&&o.instruction_addr==null?!1:!t||!dT(o,s,!!n)).map(o=>o.module_metadata?Object.keys(o.module_metadata).filter(s=>s.startsWith(Sf)).map(s=>s.slice(Sf.length)):[])}function hT(e){return!e.context_line&&!e.pre_context&&!!e.function&&e.function.length<=2}const Sf="_sentryBundlerPluginAppKey:",mT="Attempt to invoke user-land function",gT="fn.apply(this, wrappedArguments)",_T=100,yT=10,ps="flag.evaluation.";function Yr(e){if(e.type)return e;const n=H().getScopeData().contexts.flags,r=n?n.values:[];return r.length&&(e.contexts===void 0&&(e.contexts={}),e.contexts.flags={values:[...r]}),e}function Jn(e,t,n=_T){const r=H().getScopeData().contexts;r.flags||(r.flags={values:[]});const o=r.flags.values;ST(o,e,t,n)}function ST(e,t,n,r){if(typeof n!="boolean")return;if(e.length>r){A&&_.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 Kn(e,t,n=yT){if(typeof t!="boolean")return;const r=Te();if(!r)return;const o=B(r).data;if(`${ps}${e}`in o){r.setAttribute(`${ps}${e}`,t);return}Object.keys(o).filter(i=>i.startsWith(ps)).length<n&&r.setAttribute(`${ps}${e}`,t)}const AL=()=>({name:"FeatureFlags",processEvent(e,t,n){return Yr(e)},addFeatureFlag(e,t){Jn(e,t),Kn(e,t)}}),bT=({growthbookClass:e})=>({name:"GrowthBook",setupOnce(){const t=e.prototype;typeof t.isOn=="function"&&Oe(t,"isOn",bf),typeof t.getFeatureValue=="function"&&Oe(t,"getFeatureValue",bf)},processEvent(t,n,r){return Yr(t)}});function bf(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"&&(Jn(n,r),Kn(n,r)),r}}const ET="ConversationId",vT=(()=>({name:ET,setup(e){e.on("spanStart",t=>{const n=H().getScopeData(),r=be().getScopeData(),o=n.conversationId||r.conversationId;if(o){const{op:s,data:i,description:a}=B(t);if(!(s!=null&&s.startsWith("gen_ai."))&&!i["ai.operationId"]&&!(a!=null&&a.startsWith("ai.")))return;t.setAttribute(pS,o)}})}})),TT=vT;function IT(e,t,n,r,o){if(!e.fetchData)return;const{method:s,url:i}=e.fetchData,a=Qe()&&t(i);if(e.endTimestamp){const m=e.fetchData.__span;if(!m)return;const g=r[m];g&&(a&&(kT(g,e),wT(g,e,o)),delete r[m]);return}const{spanOrigin:c="auto.http.browser",propagateTraceparent:u=!1}=typeof o=="object"?o:{spanOrigin:o},f=C(),l=!!Te(),d=l||!!f&<(f),p=a&&d?Ke(NT(i,s,c)):new Vn,h=Pi(p)&&l?void 0:p;if(a&&!d&&(f==null||f.recordDroppedEvent("no_parent_span","span")),e.fetchData.__span=p.spanContext().spanId,r[p.spanContext().spanId]=p,n(e.fetchData.url)){const m=e.args[0],g={...e.args[1]||{}},y=RT(m,g,Qe()&&d?h:void 0,u);y&&(e.args[1]=g,g.headers=y)}if(f){const m={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};f.emit("beforeOutgoingRequestSpan",p,m)}return p}function wT(e,t,n){var o;const r=typeof n=="object"&&n!==null?n.onRequestSpanEnd:void 0;r==null||r(e,{headers:(o=t.response)==null?void 0:o.headers,error:t.error})}function RT(e,t,n,r){const o=sm({span:n,propagateTraceparent:r}),s=o["sentry-trace"],i=o.baggage,a=o.traceparent;if(!s)return;const c=t.headers||(Yc(e)?e.headers:void 0);if(c)if(AT(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 f=u.get("baggage");f?hs(f)||u.set("baggage",`${f},${i}`):u.set("baggage",i)}return u}else if(CT(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 f=c.find(l=>l[0]==="baggage"&&typeof l[1]=="string"&&hs(l[1]));return i&&!f&&u.push(["baggage",i]),u}else{const u="sentry-trace"in c?c["sentry-trace"]:void 0,f="traceparent"in c?c.traceparent:void 0,l="baggage"in c?c.baggage:void 0,d=l?Array.isArray(l)?[...l]:[l]:[],p=l&&(Array.isArray(l)?l.find(m=>hs(m)):hs(l));i&&!p&&d.push(i);const h=Object.assign({},c,{"sentry-trace":u??s,...d.length>0&&{baggage:d.join(",")}});return r&&a&&!f&&(h.traceparent=a),h}else return{"sentry-trace":s,...i&&{baggage:i},...a&&{traceparent:a}}}function kT(e,t){var n,r;if(t.response){Ks(e,t.response.status);const o=(r=(n=t.response)==null?void 0:n.headers)==null?void 0:r.get("content-length");if(o){const s=parseInt(o);s>0&&e.setAttribute("http.response_content_length",s)}}else t.error&&e.setStatus({code:re,message:"internal_error"});e.end()}function hs(e){return typeof e!="string"?!1:e.split(",").some(t=>t.trim().startsWith(Xs))}function AT(e){return typeof Headers<"u"&&Ci(e,Headers)}function CT(e){return Array.isArray(e)?e.every(t=>Array.isArray(t)&&t.length===2&&typeof t[0]=="string"):!1}function NT(e,t,n){if(e.startsWith("data:")){const s=gt(e);return{name:`${t} ${s}`,attributes:Ef(e,void 0,t,n)}}const r=To(e),o=r?tm(r):e;return{name:`${t} ${o}`,attributes:Ef(e,r,t,n)}}function Ef(e,t,n,r){const o={url:gt(e),type:"fetch","http.method":n,[J]:r,[ce]:"http.client"};return t&&(Fi(t)||(o[kh]=gt(t.href),o[Rn]=gt(t.href),o["server.address"]=t.host),t.search&&(o["http.query"]=t.search),t.hash&&(o["http.fragment"]=t.hash)),o}function MT(e,t={},n=H()){const{message:r,name:o,email:s,url:i,source:a,associatedEventId:c,tags:u}=e,f={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==null?void 0:n.getClient())||C();return l&&l.emit("beforeSendFeedback",f,t),n.captureEvent(f,t)}function Jr(e,t,n,r,o){ri({level:e,message:t,attributes:n,severityNumber:o},r)}function xT(e,t,{scope:n}={}){Jr("trace",e,t,n)}function OT(e,t,{scope:n}={}){Jr("debug",e,t,n)}function PT(e,t,{scope:n}={}){Jr("info",e,t,n)}function LT(e,t,{scope:n}={}){Jr("warn",e,t,n)}function DT(e,t,{scope:n}={}){Jr("error",e,t,n)}function FT(e,t,{scope:n}={}){Jr("fatal",e,t,n)}const CL=Object.freeze(Object.defineProperty({__proto__:null,debug:OT,error:DT,fatal:FT,fmt:nv,info:PT,trace:xT,warn:LT},Symbol.toStringTag,{value:"Module"}));function ii(e,t,n){return"util"in U&&typeof U.util.format=="function"?U.util.format(...e):$T(e,t,n)}function $T(e,t,n){return e.map(r=>kt(r)?String(r):JSON.stringify(ke(r,t,n))).join(" ")}function gm(e){return/%[sdifocO]/.test(e)}function _m(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 BT="ConsoleLogs",vf={[J]:"auto.log.console"},UT=((e={})=>{const t=e.levels||qc;return{name:BT,setup(n){const{enableLogs:r,normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=n.getOptions();if(!r){A&&_.warn("`enableLogs` is not enabled, ConsoleLogs integration disabled");return}const i=du(({args:a,level:c})=>{if(C()!==n||!t.includes(c))return;const u=a[0],f=a.slice(1);if(c==="assert"){if(!u){const p=f.length>0?`Assertion failed: ${ii(f,o,s)}`:"Assertion failed";ri({level:"error",message:p,attributes:vf})}return}const l=c==="log",d={...vf};if(Be(u)){Object.assign(d,ke(u,o,s));const p=typeof a[1]=="string"?2:1;
18a.slice(p).forEach((m,g)=>{d[`sentry.message.parameter.${g}`]=ke(m,o,s)})}else if(f.length>0&&typeof u=="string"&&!gm(u)){const h=_m(u,f);for(const[m,g]of Object.entries(h))d[m]=m.startsWith("sentry.message.parameter.")?ke(g,o,s):g}ri({level:l?"info":c,message:ii(a,o,s),severityNumber:l?10:void 0,attributes:d})});n.registerCleanup(i)}}}),NL=UT;function pu(e,t,n,r){wE({type:e,name:t,value:n,unit:r==null?void 0:r.unit,attributes:r==null?void 0:r.attributes},{scope:r==null?void 0:r.scope})}function HT(e,t=1,n){pu("counter",e,t,n)}function WT(e,t,n){pu("gauge",e,t,n)}function hc(e,t,n){pu("distribution",e,t,n)}const ML=Object.freeze(Object.defineProperty({__proto__:null,count:HT,distribution:hc,gauge:WT},Symbol.toStringTag,{value:"Module"})),jT=["trace","debug","info","warn","error","fatal"];function xL(e={}){const t=new Set(e.levels??jT),n=e.client;return{log(r){const{type:o,level:s,message:i,args:a,tag:c,date:u,...f}=r,l=n||C();if(!l)return;const d=GT(o,s);if(!t.has(d))return;const{normalizeDepth:p=3,normalizeMaxBreadth:h=1e3}=l.getOptions(),m={};for(const[y,S]of Object.entries(f))m[y]=ke(S,p,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 g=YT(VT(a,p,h),p,h);g!=null&&g.attributes&&Object.assign(m,g.attributes),ri({level:d,message:(g==null?void 0:g.message)||i||a&&ii(a,p,h)||"",attributes:m})}}}const zT={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"},qT={0:"fatal",1:"warn",2:"info",3:"info",4:"debug",5:"trace"};function GT(e,t){if(e==="verbose")return"debug";if(e==="silent")return"trace";if(e){const n=zT[e];if(n)return n}if(typeof t=="number"){const n=qT[t];if(n)return n}return"info"}function VT(e,t,n){if(!(e!=null&&e.length))return{message:""};const r=ii(e,t,n),o=e[0];if(Be(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>0&&typeof o=="string"&&!gm(o);return{message:r,messageTemplate:i?o:void 0,messageParameters:i?s:void 0}}}function YT(e,t,n){const{message:r,attributes:o,messageTemplate:s,messageParameters:i}=e,a={};if(s&&i){const c=_m(s,i);for(const[u,f]of Object.entries(c))a[u]=u.startsWith("sentry.message.parameter.")?ke(f,t,n):f}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 JT="gen_ai.prompt",Wo="gen_ai.system",Pe="gen_ai.request.model",hu="gen_ai.request.stream",Ui="gen_ai.request.temperature",mu="gen_ai.request.max_tokens",Hi="gen_ai.request.frequency_penalty",gu="gen_ai.request.presence_penalty",Wi="gen_ai.request.top_p",ym="gen_ai.request.top_k",Sm="gen_ai.request.encoding_format",bm="gen_ai.request.dimensions",Tr="gen_ai.response.finish_reasons",Kr="gen_ai.response.model",ji="gen_ai.response.id",KT="gen_ai.response.stop_reason",Xn="gen_ai.usage.input_tokens",Qn="gen_ai.usage.output_tokens",gn="gen_ai.usage.total_tokens",_t="gen_ai.operation.name",Zn="sentry.sdk_meta.gen_ai.input.messages.original_length",Xr="gen_ai.input.messages",jo="gen_ai.system_instructions",wt="gen_ai.response.text",zo="gen_ai.request.available_tools",XT="gen_ai.response.streaming",an="gen_ai.response.tool_calls",zi="gen_ai.agent.name",QT="gen_ai.pipeline.name",_u="gen_ai.conversation.id",ZT="gen_ai.usage.cache_creation_input_tokens",eI="gen_ai.usage.cache_read_input_tokens",tI="gen_ai.invoke_agent",yu="gen_ai.embeddings.input",Em="gen_ai.embeddings",Tf="gen_ai.execute_tool",vm="gen_ai.tool.name",nI="gen_ai.tool.call.id",rI="gen_ai.tool.type",Tm="gen_ai.tool.input",Im="gen_ai.tool.output",oI="gen_ai.tool.description";function Ir(e){return!e||typeof e!="object"?!1:iI(e)||Rm(e)||sI(e)||km(e)||Am(e)||aI(e)||cI(e)||uI(e)||lI(e)||fI(e)||dI(e)||pI(e)}function sI(e){return"image_url"in e?typeof e.image_url=="string"?e.image_url.startsWith("data:"):wm(e):!1}function wm(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 iI(e){return"type"in e&&typeof e.type=="string"&&"source"in e&&Ir(e.source)}function Rm(e){return"inlineData"in e&&!!e.inlineData&&typeof e.inlineData=="object"&&"data"in e.inlineData&&typeof e.inlineData.data=="str
18ing"}function km(e){return"type"in e&&e.type==="input_audio"&&"input_audio"in e&&!!e.input_audio&&typeof e.input_audio=="object"&&"data"in e.input_audio&&typeof e.input_audio.data=="string"}function Am(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 aI(e){return"media_type"in e&&typeof e.media_type=="string"&&"data"in e}function cI(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 uI(e){return"type"in e&&e.type==="image"&&"image"in e&&typeof e.image=="string"&&!e.image.startsWith("http://")&&!e.image.startsWith("https://")}function lI(e){return"type"in e&&(e.type==="blob"||e.type==="base64")}function fI(e){return"b64_json"in e}function dI(e){return"type"in e&&"result"in e&&e.type==="image_generation"}function pI(e){return"uri"in e&&typeof e.uri=="string"&&e.uri.startsWith("data:")}const ro="[Blob substitute]",hI=["image_url","data","content","b64_json","result","uri","image"];function fo(e){const t={...e};Ir(t.source)&&(t.source=fo(t.source)),Rm(e)&&(t.inlineData={...e.inlineData,data:ro}),wm(e)&&(t.image_url={...e.image_url,url:ro}),km(e)&&(t.input_audio={...e.input_audio,data:ro}),Am(e)&&(t.file={...e.file,file_data:ro});for(const n of hI)typeof t[n]=="string"&&(t[n]=ro);return t}const Cm=2e4,ai=e=>new TextEncoder().encode(e).length,Su=e=>ai(JSON.stringify(e));function qi(e,t){if(ai(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);ai(i)<=t?(o=i,n=s+1):r=s-1}return o}function mI(e){return typeof e=="string"?e:"text"in e&&typeof e.text=="string"?e.text:""}function If(e,t){return typeof e=="string"?t:{...e,text:t}}function gI(e){return e!==null&&typeof e=="object"&&"content"in e&&typeof e.content=="string"}function Nm(e){return e!==null&&typeof e=="object"&&"content"in e&&Array.isArray(e.content)}function Mm(e){return e!==null&&typeof e=="object"&&"parts"in e&&Array.isArray(e.parts)&&e.parts.length>0}function _I(e,t){const n={...e,content:""},r=Su(n),o=t-r;if(o<=0)return[];const s=qi(e.content,o);return[{...e,content:s}]}function yI(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 SI(e,t){const{key:n,items:r}=yI(e);if(n===null||r.length===0)return[];const o=r.map(c=>If(c,"")),s=Su({...e,[n]:o});let i=t-s;if(i<=0)return[];const a=[];for(const c of r){const u=mI(c),f=ai(u);if(f<=i)a.push(c),i-=f;else if(a.length===0){const l=qi(u,i);l&&a.push(If(c,l));break}else break}return a.length<=0?[]:[{...e,[n]:a}]}function bI(e,t){if(!e)return[];if(typeof e=="string"){const n=qi(e,t);return n?[n]:[]}return typeof e!="object"?[]:gI(e)?_I(e,t):Nm(e)||Mm(e)?SI(e,t):[]}function mc(e){return e.map(n=>{let r;return n&&typeof n=="object"&&(Nm(n)?r={...n,content:mc(n.content)}:"content"in n&&Ir(n.content)&&(r={...n,content:fo(n.content)}),Mm(n)&&(r={...r??n,parts:mc(n.parts)}),Ir(r)?r=fo(r):Ir(n)&&(r=fo(n))),r??n})}function EI(e,t){if(!Array.isArray(e)||e.length===0)return e;const n=t-2,r=e[e.length-1],o=mc([r]),s=o[0];return Su(s)<=n?o:bI(s,n)}function vI(e){return EI(e,Cm)}function TI(e){return qi(e,Cm)}function nr(e){var n;const t=(n=C())==null?void 0:n.getDataCollectionOptions().genAI;return{...e,recordInputs:(e==null?void 0:e.recordInputs)??(t==null?void 0:t.inputs)??!1,recordOutputs:(e==null?void 0:e.recordOutputs)??(t==null?void 0:t.outputs)??!1}}function Vt(e){if(e!==void 0)return e;const t=C();return t?!lt(t)&&t.getOptions().streamGenAiSpans===!1:!0}function xm(e,t){return e?`${e}.${t}`:t}function II(e,t,n,r,o){if(t!==void 0&&e.setAttributes({[Xn]:t}),n!==void 0&&e.setAttributes({[Qn]:n}),t!==void 0||n!==void 0||r!==void 0||o!==void 0){const s=(t??0)+(n??0)+(r??0)+(o??0);e.setAttributes({[gn]:s})}}function Gi(e,t,n){if(!e.isRecording())return;const r={[XT]:!0};t.responseId&&(r[ji]=t.responseId),t.responseModel&&(r[Kr]=t.responseModel),t.promptTokens!==void 0&&(r[Xn]=t.promptTokens),t.completionTokens!==void 0&&(r[Qn]=t.completionTokens),t.totalTokens!==void 0?r[gn]=t.totalTokens:(t.promptTokens!==void 0||t.completionTokens!==void 0||t.cacheCreationInputTokens!==void 0||t.cacheReadInputTokens!==void 0)&&(r[gn]=(t.promptTokens??0)+(t.completionTokens??0)+(t.cacheCreationInputTokens??0)+(t.cacheReadInputTokens??0)),t.finishReasons.length&&(r[Tr]=JSON.stringify(t.finishReasons)),n&&t.responseTexts.length&&(r[wt]=t.responseTexts.join("")),n&&t.toolCalls.length&&(r[an]=JSON.stringify(t.toolCalls)),e.setAttributes(r),e.end()}function Qr(e){if(typeof e=="string")return TI(e);try{return JSON.stringify(Array.isArray(e)?vI(e):e)}catch{return"[unserializable]"}}function qo(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 wI(e,t){const[n,r]=await Promise.all([t,e]);return r&&typeof r=="object"&&"data"in r?{...r,data:n}:n}
18function ci(e,t){return Tn(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 wI(c,t)}:typeof i=="function"?i.bind(s):i}}):t}const RI={"responses.create":{operation:"chat"},"chat.completions.create":{operation:"chat"},"embeddings.create":{operation:"embeddings"},"conversations.create":{operation:"chat"}},kI=["response.output_item.added","response.function_call_arguments.delta","response.function_call_arguments.done","response.output_item.done"],AI=["response.created","response.in_progress","response.failed","response.completed","response.incomplete","response.queued","response.output_text.delta",...kI];function CI(e){return e!==null&&typeof e=="object"&&"type"in e&&typeof e.type=="string"&&e.type.startsWith("response.")}function NI(e){return e!==null&&typeof e=="object"&&"object"in e&&e.object==="chat.completion.chunk"}function MI(e,t,n){if(!t||typeof t!="object")return;const r=t,o={};if(typeof r.id=="string"&&(o[ji]=r.id),typeof r.model=="string"&&(o[Kr]=r.model),r.object==="conversation"&&typeof r.id=="string"&&(o[_u]=r.id),r.usage&&typeof r.usage=="object"){const s=r.usage,i=s.prompt_tokens??s.input_tokens;typeof i=="number"&&(o[Xn]=i);const a=s.completion_tokens??s.output_tokens;typeof a=="number"&&(o[Qn]=a),typeof s.total_tokens=="number"&&(o[gn]=s.total_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[Tr]=JSON.stringify(i)),n){const a=s.map(u=>{const f=u.message;return(f==null?void 0:f.content)||""});o[wt]=JSON.stringify(a);const c=s.map(u=>{const f=u.message;return f==null?void 0:f.tool_calls}).filter(u=>Array.isArray(u)&&u.length>0).flat();c.length>0&&(o[an]=JSON.stringify(c))}}if(typeof r.status=="string"&&(o[Tr]||(o[Tr]=JSON.stringify([r.status]))),n&&(typeof r.output_text=="string"&&!o[wt]&&(o[wt]=r.output_text),Array.isArray(r.output)&&r.output.length>0&&!o[an])){const s=r.output.filter(i=>(i==null?void 0:i.type)==="function_call");s.length>0&&(o[an]=JSON.stringify(s))}e.setAttributes(o)}function xI(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 OI(e){const t={[Pe]:e.model??"unknown"};"temperature"in e&&(t[Ui]=e.temperature),"top_p"in e&&(t[Wi]=e.top_p),"frequency_penalty"in e&&(t[Hi]=e.frequency_penalty),"presence_penalty"in e&&(t[gu]=e.presence_penalty),"stream"in e&&(t[hu]=e.stream),"encoding_format"in e&&(t[Sm]=e.encoding_format),"dimensions"in e&&(t[bm]=e.dimensions);const n=xI(e);return n&&(t[_u]=n),t}function PI(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!=null&&o.function)&&(o.function.arguments+=n.function.arguments)}}}function LI(e,t,n){var r,o;t.responseId=e.id??t.responseId,t.responseModel=e.model??t.responseModel,e.usage&&(t.promptTokens=e.usage.prompt_tokens,t.completionTokens=e.usage.completion_tokens,t.totalTokens=e.usage.total_tokens);for(const s of e.choices??[])n&&((r=s.delta)!=null&&r.content&&t.responseTexts.push(s.delta.content),(o=s.delta)!=null&&o.tool_calls&&PI(s.delta.tool_calls,t)),s.finish_reason&&t.finishReasons.push(s.finish_reason)}function DI(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"}),St(e,{mechanism:{handled:!1,type:"auto.ai.openai.stream-response"}});return}if(!("type"in e))return;const o=e;if(!AI.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),s.status&&t.finishReasons.push(s.status),n&&s.output_text&&t.responseTexts.push(s.output_text)}}async function*FI(e,t,n){const r={eventTypes:[],responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,totalTokens:void 0,chatCompletionToolCalls:{},responsesApiToolCalls:[]};try{for await(const o of e)NI(o)?LI(o,r,n):CI(o)&&DI(o,r,n,t),yield o}finally{const o=[...Object.values(r.chatCompletionToolCalls),...r.responsesApiToolCalls];Gi(t,{...r,toolCalls:o},n)}}function $I(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){A&&_.error("Failed to serialize OpenAI tools:",s);return}}function BI(e,t){const n={[Wo]:"openai",[_t]:t,[J]:"auto.ai.openai"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const r=e[0],o=$I(r);o&&(n[zo]=o),Object.assign(n,OI(r))}else n[Pe]="unknown";return n}function wf(e,t,n,r){if(n==="embeddings"&&"input"in t){const a=t.input;
18if(a==null||typeof a=="string"&&a.length===0||Array.isArray(a)&&a.length===0)return;e.setAttribute(yu,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}=qo(o);s&&e.setAttribute(jo,s),e.setAttribute(Xr,r?Qr(i):Je(i)),Array.isArray(i)?e.setAttribute(Zn,i.length):e.setAttribute(Zn,1)}function UI(e,t,n,r,o){return function(...i){const a=n.operation||"unknown",c=BI(i,a),u=c[Pe]||"unknown",f=i[0],l=f&&typeof f=="object"&&f.stream===!0,d={name:`${a} ${u}`,op:`gen_ai.${a}`,attributes:c};if(l){let m;const g=nn(d,y=>(m=e.apply(r,i),o.recordInputs&&f&&wf(y,f,a,Vt(o.enableTruncation)),(async()=>{try{const S=await m;return FI(S,y,o.recordOutputs??!1)}catch(S){throw y.setStatus({code:re,message:"internal_error"}),y.end(),S}})()));return ci(m,g)}let p;const h=Kt(d,m=>(p=e.apply(r,i),o.recordInputs&&f&&wf(m,f,a,Vt(o.enableTruncation)),p.then(g=>(MI(m,g,o.recordOutputs),g))));return ci(p,h)}}function Om(e,t="",n){return new Proxy(e,{get(r,o){const s=r[o],i=xm(t,String(o)),a=RI[i];return typeof s=="function"&&a?UI(s,i,a,r,n):typeof s=="function"?s.bind(r):s&&typeof s=="object"?Om(s,i,n):s}})}function OL(e,t){return Om(e,"",nr(t))}const Rf={"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 HI(e,t,n){if(Array.isArray(t)&&t.length===0)return;const{systemInstructions:r,filteredMessages:o}=qo(t);r&&e.setAttributes({[jo]:r});const s=Array.isArray(o)?o.length:1;e.setAttributes({[Xr]:n?Qr(o):Je(o),[Zn]:s})}const WI={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 Pm(e){return e&&WI[e]||"internal_error"}function jI(e,t){t.error&&(e.setStatus({code:re,message:Pm(t.error.type)}),St(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 qI(e,t){var n;return"type"in e&&typeof e.type=="string"&&e.type==="error"?(t.setStatus({code:re,message:Pm((n=e.error)==null?void 0:n.type)}),!0):!1}function GI(e,t){var n;if(e.type==="message_delta"&&(e.usage&&typeof e.usage.output_tokens=="number"&&(t.completionTokens=e.usage.output_tokens),(n=e.delta)!=null&&n.stop_reason&&t.finishReasons.push(e.delta.stop_reason)),e.message){const r=e.message;r.id&&(t.responseId=r.id),r.model&&(t.responseModel=r.model),r.usage&&(typeof r.usage.input_tokens=="number"&&(t.promptTokens=r.usage.input_tokens),typeof r.usage.cache_creation_input_tokens=="number"&&(t.cacheCreationInputTokens=r.usage.cache_creation_input_tokens),typeof r.usage.cache_read_input_tokens=="number"&&(t.cacheReadInputTokens=r.usage.cache_read_input_tokens))}}function VI(e,t){e.type!=="content_block_start"||typeof e.index!="number"||!e.content_block||(e.content_block.type==="tool_use"||e.content_block.type==="server_tool_use")&&(t.activeToolBlocks[e.index]={id:e.content_block.id,name:e.content_block.name,inputJsonParts:[]})}function YI(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 JI(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 Lm(e,t,n,r){!(e&&typeof e=="object")||qI(e,r)||(GI(e,t),VI(e,t),YI(e,t,n),JI(e,t))}
18async function*KI(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)Lm(o,r,n,t),yield o}finally{Gi(t,r,n)}}function XI(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=>{Lm(o,r,n,t)}),e.on("message",()=>{Gi(t,r,n)}),e.on("error",o=>{St(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 kf=new WeakSet;function QI(e,t,n){const r={[Wo]:"anthropic",[_t]:n,[J]:"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[zo]=JSON.stringify(o.tools)),r[Pe]=o.model??"unknown","temperature"in o&&(r[Ui]=o.temperature),"top_p"in o&&(r[Wi]=o.top_p),"stream"in o&&(r[hu]=o.stream),"top_k"in o&&(r[ym]=o.top_k),"frequency_penalty"in o&&(r[Hi]=o.frequency_penalty),"max_tokens"in o&&(r[mu]=o.max_tokens)}else t==="models.retrieve"||t==="models.get"?r[Pe]=e[0]:r[Pe]="unknown";return r}function gc(e,t,n){const r=zI(t);HI(e,r,n),"prompt"in t&&e.setAttributes({[JT]:JSON.stringify(t.prompt)})}function ZI(e,t){if("content"in t&&Array.isArray(t.content)){e.setAttributes({[wt]: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({[an]:JSON.stringify(n)})}"completion"in t&&e.setAttributes({[wt]:t.completion}),"input_tokens"in t&&e.setAttributes({[wt]:JSON.stringify(t.input_tokens)})}function e0(e,t){"id"in t&&"model"in t&&(e.setAttributes({[ji]:t.id,[Kr]:t.model}),"usage"in t&&t.usage&&II(e,t.usage.input_tokens,t.usage.output_tokens,t.usage.cache_creation_input_tokens,t.usage.cache_read_input_tokens))}function t0(e,t,n){if(!(!t||typeof t!="object")){if("type"in t&&t.type==="error"){jI(e,t);return}n&&ZI(e,t),e0(e,t)}}function Af(e,t){throw t.isRecording()&&(t.setStatus({code:re,message:"internal_error"}),t.end()),e}function n0(e,t,n,r,o,s,i,a,c,u){const f=r[Pe]??"unknown",l={name:`${o} ${f}`,op:`gen_ai.${o}`,attributes:r};if(c&&!u){let d;const p=nn(l,h=>(d=e.apply(t,n),a.recordInputs&&i&&gc(h,i,Vt(a.enableTruncation)),(async()=>{try{const m=await d;return KI(m,h,a.recordOutputs??!1)}catch(m){return Af(m,h)}})()));return ci(d,p)}else return nn(l,d=>{try{a.recordInputs&&i&&gc(d,i,Vt(a.enableTruncation)),Os=!0;const p=e.apply(t,n);return Os=!1,XI(p,d,a.recordOutputs??!1)}catch(p){return Os=!1,Af(p,d)}})}function r0(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 f=n.operation||"unknown",l=QI(a,t,f),d=l[Pe]??"unknown",p=typeof a[0]=="object"?a[0]:void 0,h=!!(p!=null&&p.stream);if(h||u)return n0(s,c,a,l,f,t,p,o,h,u);let m;const g=Kt({name:`${f} ${d}`,op:`gen_ai.${f}`,attributes:l},y=>(m=s.apply(c,a),o.recordInputs&&p&&gc(y,p,Vt(o.enableTruncation)),m.then(S=>(t0(y,S,o.recordOutputs),S))));return ci(m,g)}})}function o0(e,t){for(const n of Object.keys(Rf)){const r=n.split("."),o=r.pop();let s=e;for(const c of r)s=s==null?void 0:s[c];if(!s||typeof s[o]!="function")continue;const i=s[o];if(kf.has(i))continue;const a=r0(i,n,Rf[n],s,t);kf.add(a),s[o]=a}return e}function PL(e,t){return o0(e,nr(t))}const s0={"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}},i0="google_genai";function a0(e,t){const n=e==null?void 0:e.promptFeedback;if(n!=null&&n.blockReason){const r=n.blockReasonMessage??n.blockReason;return t.setStatus({code:re,message:"internal_error"}),St(`Content blocked: ${r}`,{mechanism:{handled:!1,type:"auto.ai.google_genai"}}),!0}return!1}function c0(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.completionTokens=n.candidatesTokenCount),typeof n.totalTokenCount=="number"&&(t.totalTokens=n.totalTokenCount))}function u0(e,t,n){var r;Array.isArray(e.functionCalls)&&t.toolCalls.push(...e.functionCalls);for(const o of e.candidates??[]){o!=null&&o.finishReason&&!t.finishReasons.includes(o.finishReason)&&t.finishReasons.push(o.finishReason);for(const s of((r=o==null?void 0:o.content)==null?void 0:r.parts)??[])n&&s.text&&t.responseTexts.push(s.text),s.functionCall&&t.toolCalls.push({type:"function",id:s.functionCall.id,name:s.functionCall.name,arguments:s.functionCall.args})}}function l0(e,t,n,r){!e||a0(e,r)||(c0(e,t),u0(e,t,n))}async function*f0(e,t,n){const r={responseTexts:[],finishReasons:[],toolCalls:[]};try{for await(const o of e)l0(o,r,n,t),yield o}finally{Gi(t,r,n)}}function co(e,t="user"){return typeof e=="string"?[{role:t,content:e}]:Array.isArray(e)?e.flatMap(n=>co(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 Cf(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 d0(e){const t={};return"temperature"in e&&typeof e.temperature=="number"&&(t[Ui]=e.temperature),"topP"in e&&typeof e.topP=="number"&&(t[Wi]=e.topP),"topK"in e&&typeof e.topK=="number"&&(t[ym]=e.topK),"maxOutputTokens"in e&&typeof e.maxOutputTokens=="number"&&(t[mu]=e.maxOutputTokens),"frequencyPenalty"in e&&typeof e.frequencyPenalty=="number"&&(t[Hi]=e.frequencyPenalty),"presencePenalty"in e&&typeof e.presencePenalty=="number"&&(t[gu]=e.presencePenalty),t}function p0(e,t,n){const r={[Wo]:i0,[_t]:e,[J]:"auto.ai.google_genai"};if(t){if(r[Pe]=Cf(t,n),"config"in t&&typeof t.config=="object"&&t.config){const o=t.config;if(Object.assign(r,d0(o)),"tools"in o&&Array.isArray(o.tools)){const s=o.tools.flatMap(i=>i.functionDeclarations);r[zo]=JSON.stringify(s)}}}else r[Pe]=Cf({},n);return r}function Nf(e,t,n,r){if(n==="embeddings"){const s=t.contents;s!=null&&e.setAttribute(yu,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(...co(t.config.systemInstruction,"system")),"history"in t&&o.push(...co(t.history,"user")),"contents"in t&&o.push(...co(t.contents,"user")),"message"in t&&o.push(...co(t.message,"user")),Array.isArray(o)&&o.length){const{systemInstructions:s,filteredMessages:i}=qo(o);s&&e.setAttribute(jo,s);const a=Array.isArray(i)?i.length:0;e.setAttributes({[Zn]:a,[Xr]:r?Qr(i):Je(i)})}}function h0(e,t,n){if(!(!t||typeof t!="object")){if(t.modelVersion&&e.setAttribute(Kr,t.modelVersion),t.usageMetadata&&typeof t.usageMetadata=="object"){const r=t.usageMetadata;typeof r.promptTokenCount=="number"&&e.setAttributes({[Xn]:r.promptTokenCount}),typeof r.candidatesTokenCount=="number"&&e.setAttributes({[Qn]:r.candidatesTokenCount}),typeof r.totalTokenCount=="number"&&e.setAttributes({[gn]:r.totalTokenCount})}if(n&&Array.isArray(t.candidates)&&t.candidates.length>0){const r=t.candidates.map(o=>{var s;return(s=o.content)!=null&&s.parts&&Array.isArray(o.content.parts)?o.content.parts.map(i=>typeof i.text=="string"?i.text:"").filter(i=>i.length>0).join(""):""}).filter(o=>o.length>0);r.length>0&&e.setAttributes({[wt]:r.join("")})}if(n&&t.functionCalls){const r=t.functionCalls;Array.isArray(r)&&r.length>0&&e.setAttributes({[an]:JSON.stringify(r)})}}}function m0(e,t,n,r,o){const s=n.operation==="embeddings";return new Proxy(e,{apply(i,a,c){const u=n.operation||"unknown",f=c[0],l=p0(u,f,r),d=l[Pe]??"unknown";return n.streaming?nn({name:`${u} ${d}`,op:`gen_ai.${u}`,attributes:l},async p=>{try{o.recordInputs&&f&&Nf(p,f,u,Vt(o.enableTruncation));const h=await i.apply(r,c);return f0(h,p,!!o.recordOutputs)}catch(h){throw p.setStatus({code:re,message:"internal_error"}),p.end(),h}}):Kt({name:`${u} ${d}`,op:`gen_ai.${u}`,attributes:l},p=>(o.recordInputs&&f&&Nf(p,f,u,Vt(o.enableTruncation)),eu(()=>i.apply(r,c),()=>{},()=>{},h=>{s||h0(p,h,o.recordOutputs)})))}})}function _c(e,t="",n){return new Proxy(e,{get:(r,o,s)=>{const i=Reflect.get(r,o,s),a=xm(t,String(o)),c=s0[a];if(typeof i=="function"&&c){const u=c.operation?m0(i,a,c,r,n):i.bind(r);return c.proxyResultPath?function(...f){const l=u(...f);return l&&typeof l=="object"?_c(l,c.proxyResultPath,n):l}:u}return typeof i=="function"?i.bind(r):i&&typeof i=="object"?_c(i,a,n):i}})}function LL(e,t){return _c(e,"",nr(t))}const bu="auto.ai.langchain",g0={human:"user",ai:"assistant",assistant:"assistant",system:"system",function:"function",tool:"tool"}
18,ot=(e,t,n)=>{n!=null&&(e[t]=n)},Ge=(e,t,n)=>{const r=Number(n);Number.isNaN(r)||(e[t]=r)};function cr(e){if(Array.isArray(e))try{const t=e.map(n=>n&&typeof n=="object"&&Ir(n)?fo(n):n);return JSON.stringify(t)}catch{return String(e)}return Je(e,String)}function oo(e){const t=e.toLowerCase();return g0[t]??t}function Mf(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 xf(e){if(!(!e||Array.isArray(e)))return e.invocation_params}function Eu(e){return e.map(t=>{var o,s;const n=t._getType;if(typeof n=="function"){const i=n.call(t);return{role:oo(i),content:cr(t.content)}}if(t.lc===1&&t.kwargs){const i=t.id,a=Array.isArray(i)&&i.length>0?i[i.length-1]:"",c=typeof a=="string"?Mf(a):"user";return{role:oo(c),content:cr((o=t.kwargs)==null?void 0:o.content)}}if(t.type){const i=String(t.type).toLowerCase();return{role:oo(i),content:cr(t.content)}}if(t.role)return{role:oo(String(t.role)),content:cr(t.content)};const r=(s=t.constructor)==null?void 0:s.name;return r&&r!=="Object"?{role:oo(Mf(r)),content:cr(t.content)}:{role:"user",content:cr(t.content)}})}function _0(e,t,n){const r={},o="kwargs"in e?e.kwargs:void 0,s=(t==null?void 0:t.temperature)??(n==null?void 0:n.ls_temperature)??(o==null?void 0:o.temperature);Ge(r,Ui,s);const i=(t==null?void 0:t.max_tokens)??(n==null?void 0:n.ls_max_tokens)??(o==null?void 0:o.max_tokens);Ge(r,mu,i);const a=(t==null?void 0:t.top_p)??(o==null?void 0:o.top_p);Ge(r,Wi,a);const c=t==null?void 0:t.frequency_penalty;Ge(r,Hi,c);const u=t==null?void 0:t.presence_penalty;return Ge(r,gu,u),t&&"stream"in t&&ot(r,hu,!!t.stream),r}function Dm(e,t,n,r,o){return{[Wo]:Je(e??"langchain",String),[_t]:"chat",[Pe]:Je(t,String),[J]:bu,..._0(n,r,o)}}function y0(e,t,n,r,o,s){const i=s==null?void 0:s.ls_provider,a=(o==null?void 0:o.model)??(s==null?void 0:s.ls_model_name)??"unknown",c=Dm(i,a,e,o,s);if(n&&Array.isArray(t)&&t.length>0){ot(c,Zn,t.length);const u=t.map(f=>({role:"user",content:f}));ot(c,Xr,r?Qr(u):Je(u))}return c}function S0(e,t,n,r,o,s){var u;const i=(s==null?void 0:s.ls_provider)??((u=e.id)==null?void 0:u[2]),a=(o==null?void 0:o.model)??(s==null?void 0:s.ls_model_name)??"unknown",c=Dm(i,a,e,o,s);if(n&&Array.isArray(t)&&t.length>0){const f=Eu(t.flat()),{systemInstructions:l,filteredMessages:d}=qo(f);l&&ot(c,jo,l);const p=Array.isArray(d)?d.length:0;ot(c,Zn,p),ot(c,Xr,r?Qr(d):Je(d))}return c}function b0(e,t){var o;const n=[],r=e.flat();for(const s of r){const i=s.message,a=i==null?void 0:i.tool_calls;if(Array.isArray(a)&&a.length>0)n.push(...a);else{const c=(o=s.message)==null?void 0:o.content;if(Array.isArray(c))for(const u of c){const f=u;f.type==="tool_use"&&n.push(f)}}}n.length>0&&ot(t,an,Je(n,String))}function E0(e,t){if(!e)return;const n=e.tokenUsage,r=e.usage;if(n)Ge(t,Xn,n.promptTokens),Ge(t,Qn,n.completionTokens),Ge(t,gn,n.totalTokens);else if(r){Ge(t,Xn,r.input_tokens),Ge(t,Qn,r.output_tokens);const o=Number(r.input_tokens),s=Number(r.output_tokens),i=(Number.isNaN(o)?0:o)+(Number.isNaN(s)?0:s);i>0&&Ge(t,gn,i),r.cache_creation_input_tokens!==void 0&&Ge(t,ZT,r.cache_creation_input_tokens),r.cache_read_input_tokens!==void 0&&Ge(t,eI,r.cache_read_input_tokens)}}function v0(e,t){var u,f,l,d;if(!e)return;const n={};if(Array.isArray(e.generations)){const p=e.generations.flat().map(h=>{var m,g;return(m=h.generationInfo)!=null&&m.finish_reason?h.generationInfo.finish_reason:(g=h.generation_info)!=null&&g.finish_reason?h.generation_info.finish_reason:null}).filter(h=>typeof h=="string");if(p.length>0&&ot(n,Tr,Je(p,String)),b0(e.generations,n),t){const h=e.generations.flat().map(m=>{var g;return m.text??((g=m.message)==null?void 0:g.content)}).filter(m=>typeof m=="string");h.length>0&&ot(n,wt,Je(h,String))}}E0(e.llmOutput,n);const r=e.llmOutput,o=(f=(u=e.generations)==null?void 0:u[0])==null?void 0:f[0],s=o==null?void 0:o.message,i=(r==null?void 0:r.model_name)??(r==null?void 0:r.model)??((l=s==null?void 0:s.response_metadata)==null?void 0:l.model_name);i&&ot(n,Kr,i);const a=(r==null?void 0:r.id)??(s==null?void 0:s.id);a&&ot(n,ji,a);const c=(r==null?void 0:r.stop_reason)??((d=s==null?void 0:s.response_metadata)==null?void 0:d.finish_reason);return c&&ot(n,KT,Je(c,String)),n}function xa(e){const t={},n=e==null?void 0:e.lc_agent_name;return typeof n=="string"&&(t[zi]=n),t}function T0(e){var r,o;const t=((r=e==null?void 0:e.invocation_params)==null?void 0:r.tools)??((o=e==null?void 0:e.options)==null?void 0:o.tools);if(!Array.isArray(t)||t.length===0)return;const n=t.map(s=>{const i=s.function;return{type:"function",name:s.name??(i==null?void 0:i.name)??"",description:s.description??(i==null?void 0:i.description)}});return JSON.stringify(n)}function I0(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.addHandler=="function"&&typeof t.copy=="function"}function w0(e){return typeof e=="object"&&(e==null?void 0:e.name)==="SentryCallbackHandler"}function Of(e){return e.some(w0)}function R0(e,t){if(!e)return[t];if(I0(e)){if(Of(e.handlers??[]))return e;const r=e.copy();return r.addHandler(t,!0),r}const n=Array.isArray(e)?e:[e];return Of(n)?e:[...n,t]}function Fm(e={}){const{recordInputs:t,recordOutputs:n}=nr(e),r=Vt(e.enableTruncation),o=new Map,s=a=>{const c=o.get(a);c!=null&&c.isRecording()&&(c.end(),o.delete(a))}
18,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,f,l,d,p,h){const m=xf(d),g=y0(a,c,t,r,m,p),y=g[Pe],S=g[_t];nn({name:`${S} ${y}`,op:"gen_ai.chat",attributes:{...xa(p),...g,[ce]:"gen_ai.chat"}},I=>(o.set(u,I),I))},handleChatModelStart(a,c,u,f,l,d,p,h){const m=xf(d),g=S0(a,c,t,r,m,p),y=T0(l);y&&(g[zo]=y);const S=g[Pe],I=g[_t];nn({name:`${I} ${S}`,op:"gen_ai.chat",attributes:{...xa(p),...g,[ce]:"gen_ai.chat"}},v=>(o.set(u,v),v))},handleLLMEnd(a,c,u,f,l){const d=o.get(c);if(d!=null&&d.isRecording()){const p=v0(a,n);p&&d.setAttributes(p),s(c)}},handleLLMError(a,c){const u=o.get(c);u!=null&&u.isRecording()&&(u.setStatus({code:re,message:"internal_error"}),s(c))},handleChainStart(a,c,u,f,l,d,p,h){if(d!=null&&d.__sentry_langgraph__)return;const m=h||a.name||"unknown_chain",g={[J]:"auto.ai.langchain","langchain.chain.name":m};t&&(g["langchain.chain.inputs"]=JSON.stringify(c)),nn({name:`chain ${m}`,op:"gen_ai.invoke_agent",attributes:{...g,[ce]:"gen_ai.invoke_agent"}},y=>(o.set(u,y),y))},handleChainEnd(a,c){const u=o.get(c);u!=null&&u.isRecording()&&(n&&u.setAttributes({"langchain.chain.outputs":JSON.stringify(a)}),s(c))},handleChainError(a,c){const u=o.get(c);u!=null&&u.isRecording()&&(u.setStatus({code:re,message:"internal_error"}),s(c))},handleToolStart(a,c,u,f,l,d,p){if(d!=null&&d.__sentry_langgraph__)return;const h=p||a.name||"unknown_tool",m={...xa(d),[J]:bu,[_t]:"execute_tool",[vm]:h};t&&(m[Tm]=c),nn({name:`execute_tool ${h}`,op:"gen_ai.execute_tool",attributes:{...m,[ce]:"gen_ai.execute_tool"}},g=>(o.set(u,g),g))},handleToolEnd(a,c){const u=o.get(c);if(u!=null&&u.isRecording()){if(n){const f=a,l=f&&typeof f=="object"&&"content"in f?f.content:a;u.setAttributes({[Im]:typeof l=="string"?l:JSON.stringify(l)})}s(c)}},handleToolError(a,c){const u=o.get(c);u!=null&&u.isRecording()&&(u.setStatus({code:re,message:"internal_error"}),s(c))},copy(){return i},toJSON(){return{lc:1,type:"not_implemented",id:i.lc_id}},toJSONNotImplemented(){return{lc:1,type:"not_implemented",id:i.lc_id}}};return i}function k0(e){var n;const t=((n=e.constructor)==null?void 0:n.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 A0(e){const t=e??{},n={[J]:bu,[ce]:Em,[_t]:"embeddings",[Pe]:t.model??"unknown"};return n[Wo]=k0(t),"dimensions"in t&&(n[bm]=t.dimensions),"encodingFormat"in t&&(n[Sm]=t.encodingFormat),n}function C0(e,t,n={}){const{recordInputs:r}=nr(n),o=A0(e),s=o[Pe]||"unknown";return r&&t!=null&&(o[yu]=typeof t=="string"?t:JSON.stringify(t)),{name:`embeddings ${s}`,op:Em,attributes:o}}function Pf(e,t={}){return new Proxy(e,{apply(n,r,o){return Kt(C0(r,o[0],t),()=>Reflect.apply(n,r,o))}})}function DL(e,t){const n=e;return typeof n.embedQuery=="function"&&(n.embedQuery=Pf(n.embedQuery,t)),typeof n.embedDocuments=="function"&&(n.embedDocuments=Pf(n.embedDocuments,t)),e}const vu="auto.ai.langgraph";function N0(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 M0(e){const t=e[0];return typeof t=="object"&&t&&"name"in t&&typeof t.name=="string"?t.name:null}function x0(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(f,l,d){var y;const p={[J]:vu,[ce]:Tf,[_t]:"execute_tool",[vm]:a,[rI]:"function"},h=d[1],m=((y=h==null?void 0:h.metadata)==null?void 0:y.lc_agent_name)??n;typeof m=="string"&&(p[zi]=m),c&&(p[oI]=c);const g=d[0];if(typeof g=="object"&&g&&("id"in g&&typeof g.id=="string"&&(p[nI]=g.id),t.recordInputs)){const S="args"in g&&typeof g.args=="object"?g.args:g;try{p[Tm]=JSON.stringify(S)}catch{}}
18return Kt({op:Tf,name:`execute_tool ${a}`,attributes:p},async S=>{try{const I=await Reflect.apply(f,l,d);if(t.recordOutputs)try{const v=I,w=v&&typeof v=="object"&&"content"in v?v.content:I;S.setAttribute(Im,typeof w=="string"?w:JSON.stringify(w))}catch{}return I}catch(I){throw S.setStatus({code:re,message:"internal_error"}),I}})}});s.invoke=u,Object.defineProperty(s,r,{value:!0,enumerable:!1})}return e}function O0(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 P0(e){const t=e;let n=0,r=0,o=0;if(t.usage_metadata&&typeof t.usage_metadata=="object"){const s=t.usage_metadata;return typeof s.input_tokens=="number"&&(n=s.input_tokens),typeof s.output_tokens=="number"&&(r=s.output_tokens),typeof s.total_tokens=="number"&&(o=s.total_tokens),{inputTokens:n,outputTokens:r,totalTokens:o}}if(t.response_metadata&&typeof t.response_metadata=="object"){const s=t.response_metadata;if(s.tokenUsage&&typeof s.tokenUsage=="object"){const i=s.tokenUsage;typeof i.promptTokens=="number"&&(n=i.promptTokens),typeof i.completionTokens=="number"&&(r=i.completionTokens),typeof i.totalTokens=="number"&&(o=i.totalTokens)}}return{inputTokens:n,outputTokens:r,totalTokens:o}}function L0(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(Kr,r.model_name),r.finish_reason&&typeof r.finish_reason=="string"&&e.setAttribute(Tr,[r.finish_reason])}}function D0(e){var n,r,o,s,i,a,c,u;if(!((s=(o=(r=(n=e.builder)==null?void 0:n.nodes)==null?void 0:r.tools)==null?void 0:o.runnable)!=null&&s.tools))return null;const t=(u=(c=(a=(i=e.builder)==null?void 0:i.nodes)==null?void 0:a.tools)==null?void 0:c.runnable)==null?void 0:u.tools;return!t||!Array.isArray(t)||t.length===0?null:t.map(f=>{var l,d,p;return{name:(l=f.lc_kwargs)==null?void 0:l.name,description:(d=f.lc_kwargs)==null?void 0:d.description,schema:(p=f.lc_kwargs)==null?void 0:p.schema}})}function F0(e,t,n){const r=n,o=r==null?void 0:r.messages;if(!o||!Array.isArray(o))return;const s=(t==null?void 0:t.length)??0,i=o.length>s?o.slice(s):[];if(i.length===0)return;const a=O0(i);a&&e.setAttribute(an,JSON.stringify(a));const c=Eu(i);e.setAttribute(wt,JSON.stringify(c));let u=0,f=0,l=0;for(const d of i){const p=P0(d);u+=p.inputTokens,f+=p.outputTokens,l+=p.totalTokens,L0(e,d)}u>0&&e.setAttribute(Xn,u),f>0&&e.setAttribute(Qn,f),l>0&&e.setAttribute(gn,l)}let yc=!1;const ui="__sentry_patched__";function $0(e){const t={[J]:vu,[ce]:"gen_ai.create_agent",[_t]:"create_agent"};return{op:"gen_ai.create_agent",name:e?`create_agent ${e}`:"create_agent",attributes:t}}function B0(e,t){if(Object.prototype.hasOwnProperty.call(e,ui))return e;const n=Fm(t),r=new Proxy(e,{apply(o,s,i){return yc?Reflect.apply(o,s,i):Kt($0(),a=>{try{const c=Reflect.apply(o,s,i),u=i.length>0?i[0]:{};u!=null&&u.name&&typeof u.name=="string"&&(a.setAttribute(zi,u.name),a.updateName(`create_agent ${u.name}`));const f=c.invoke;return f&&typeof f=="function"&&(c.invoke=$m(f.bind(c),c,u,t,void 0,n)),c}catch(c){throw a.setStatus({code:re,message:"internal_error"}),c}})}});return Object.defineProperty(r,ui,{value:!0,enumerable:!1}),r}function $m(e,t,n,r,o,s){return new Proxy(e,{apply(i,a,c){const u=(o==null?void 0:o.modelName)??(o==null?void 0:o.model);return Kt({op:"gen_ai.invoke_agent",name:"invoke_agent",attributes:{[J]:vu,[ce]:tI,[_t]:"invoke_agent"}},async f=>{var l;try{const d=n==null?void 0:n.name;d&&typeof d=="string"&&(f.setAttribute(QT,d),f.setAttribute(zi,d),f.updateName(`invoke_agent ${d}`)),u&&f.setAttribute(Pe,u);const p=c.length>1?c[1]:void 0,h=p==null?void 0:p.configurable,m=h==null?void 0:h.thread_id;if(m&&typeof m=="string"&&f.setAttribute(_u,m),s){const w=c[1]??{};c[1]=w;const T=w.metadata??{};w.metadata={...T,__sentry_langgraph__:!0,...typeof d=="string"?{lc_agent_name:d}:{}},w.callbacks=R0(w.callbacks,s)}const g=D0(t);g&&f.setAttribute(zo,JSON.stringify(g));const y=r.recordInputs,S=r.recordOutputs,I=c.length>0?((l=c[0])==null?void 0:l.messages)??[]:[];if(I&&y){const w=Eu(I),{systemInstructions:T,filteredMessages:b}=qo(w);T&&f.setAttribute(jo,T);const D=Vt(r.enableTruncation),N=Array.isArray(b)?b.length:0;f.setAttributes({[Xr]:D?Qr(b):Je(b),[Zn]:N})}const v=await Reflect.apply(i,a,c);return S&&F0(f,I??null,v),v}catch(d){throw f.setStatus({code:re,message:"internal_error"}),d}})}})}function FL(e,t){if(Object.prototype.hasOwnProperty.call(e,ui))return e;const n=nr(t),r=Fm(n),o=new Proxy(e,{apply(s,i,a){const c=N0(a),u=M0(a),f=a[0];f&&Array.isArray(f.tools)&&f.tools.length>0&&x0(f.tools,n,u??void 0),yc=!0;let l;try{l=Reflect.apply(s,i,a)}finally{yc=!1}
18const d=l.invoke;if(d&&typeof d=="function"){const p={};u&&(p.name=u),l.invoke=$m(d.bind(l),l,p,n,c,r)}return l}});return Object.defineProperty(o,ui,{value:!0,enumerable:!1}),o}function U0(e,t){return e.compile=B0(e.compile,nr(t)),e}const $L=U0;function H0(e,t,n){const r=n.getOptions(),o=n.getDsn(),s=r.tunnel,i=$o(r._metadata),a={sent_at:new Date(Ot()).toISOString(),...W0(t)&&{trace:t},...i&&{sdk:i},...!!s&&o&&{dsn:Pt(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,...mn()&&{ingest_settings:{infer_ip:c,infer_user_agent:c}},items:e}];return ut(a,[u])}function W0(e){return!!e.trace_id&&!!e.public_key}function j0(e){let t=156;if(t+=e.name.length*2,t+=Il(e.attributes),e.links&&e.links.length>0){const n=e.links[0],r=n==null?void 0:n.attributes,o=100+(r?Il(r):0);t+=o*e.links.length}return t}const Lf=1e3,z0=5e6;class q0{constructor(t,n){this._traceBuckets=new Map,this._client=t;const{maxSpanLimit:r,flushInterval:o,maxTraceWeightInBytes:s}=n??{};this._maxSpanLimit=r&&r>0&&r<=Lf?r:Lf,this._flushInterval=o&&o>0?o:5e3,this._maxTraceWeight=s&&s>0?s:z0,this._client.on("flush",()=>{this.drain()}),this._client.on("close",()=>{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:Di(setTimeout(()=>{this.flush(n)},this._flushInterval))},this._traceBuckets.set(n,r)),r.spans.add(t),r.size+=j0(t),(r.spans.size>=this._maxSpanLimit||r.size>=this._maxTraceWeight)&&this.flush(n)}drain(){this._traceBuckets.size&&(A&&_.log(`Flushing span tree map with ${this._traceBuckets.size} traces`),this._traceBuckets.forEach((t,n)=>{this.flush(n)}))}flush(t){var c;const n=this._traceBuckets.get(t);if(!n)return;if(!n.spans.size){this._removeTrace(t);return}const r=Array.from(n.spans),o=(c=r[0])==null?void 0:c._segmentSpan;if(!o){A&&_.warn("No segment span reference found on span JSON, cannot compute DSC"),this._removeTrace(t);return}const s=Et(o),i=r.map(u=>{const{_segmentSpan:f,...l}=u;return l}),a=H0(i,s,this._client);A&&_.log(`Sending span envelope for trace ${t} with ${i.length} spans`),this._client.sendEnvelope(a).then(null,u=>{A&&_.error("Error while sending streamed span envelope:",u)}),this._removeTrace(t)}_removeTrace(t){const n=this._traceBuckets.get(t);n&&clearTimeout(n.timeout),this._traceBuckets.delete(t)}}function Bm(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const Pr=U;function G0(){return"history"in Pr&&!!Pr.history}function V0(){if(!("fetch"in Pr))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function Sc(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Um(){var n;if(typeof EdgeRuntime=="string")return!0;if(!V0())return!1;if(Sc(Pr.fetch))return!0;let e=!1;const t=Pr.document;if(t&&typeof t.createElement=="function")try{const r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r),(n=r.contentWindow)!=null&&n.fetch&&(e=Sc(r.contentWindow.fetch)),t.head.removeChild(r)}catch(r){A&&_.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}function Y0(){return"ReportingObserver"in Pr}function Vi(e,t){const n="fetch",r=En(n,e);return vn(n,()=>Hm(void 0,t)),r}function J0(e){const t="fetch-body-resolved",n=En(t,e);return vn(t,()=>Hm(X0)),n}function Hm(e,t=!1){t&&!Um()||Oe(U,"fetch",function(n){return function(...r){const o=new Error,{method:s,url:i}=Q0(r),a={args:r,fetchData:{method:s,url:i},startTimestamp:me()*1e3,virtualError:o,headers:Z0(r)};return e||st("fetch",{...a}),n.apply(U,r).then(async c=>(e?e(c):st("fetch",{...a,endTimestamp:me()*1e3,response:c}),c),c=>{st("fetch",{...a,endTimestamp:me()*1e3,error:c}),He(c)&&c.stack===void 0&&(c.stack=o.stack,Se(c,"framesToPop",1));const u=C(),f=(u==null?void 0:u.getOptions().enhanceFetchErrorMessages)??"always";if(f!==!1&&He(c)&&c.name==="TypeError"&&(c.message==="Failed to fetch"||c.message==="Load failed"||c.message==="NetworkError when attempting to fetch resource."))try{const p=new URL(a.fetchData.url).host;f==="always"?c.message=`${c.message} (${p})`:Se(c,"__sentry_fetch_url_host__",p)}catch{}throw c})}})}async function K0(e,t){if(e!=null&&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 X0(e){let t;try{t=e.clone()}catch{return}K0(t,()=>{st("fetch-body-resolved",{endTimestamp:me()*1e3,response:e})})}function Ps(e,t){return it(e)&&!!e[t]}function Df(e){return typeof e=="string"?e:e?Ps(e,"url")?e.url:e.toString?e.toString():"":""}function Q0(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:Df(n),method:Ps(r,"method")?String(r.method).toUpperCase():Yc(n)&&Ps(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:Df(t),method:Ps(t,"method")?String(t.method).toUpperCase():"GET"}}function Z0(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(Yc(t))return new Headers(t.headers)}catch{}}const Wm=U;function _n(){try{return Wm.document.location.href}catch{return""}}function Tu(e,t=5){if(!Wm.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 ht=U,de=ht.document,uo=ht.navigator,jm="Report a Bug",ew="Cancel",tw="Send Bug Report",nw="Confirm",rw="Report a Bug",ow="[email protected]",sw="Email",iw="What's the bug? What did you expect?",aw="Description",cw="Your Name",uw="Name",lw="Thank y
18ou for your report!",fw="(required)",dw="Add a screenshot",pw="Remove screenshot",hw="Highlight",mw="Hide",gw="Remove",zm="Unable to submit feedback with empty message",qm="No client setup, cannot send feedback.",Gm="Unable to determine if Feedback was correctly sent.",Vm="Unable to send feedback. This could be because this domain is not in your list of allowed domains.",Ym="Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.",_w="widget",yw="api",Sw=5e3,bw={ERROR_EMPTY_MESSAGE:zm,ERROR_NO_CLIENT:qm,ERROR_TIMEOUT:Gm,ERROR_FORBIDDEN:Vm,ERROR_GENERIC:Ym};function Ls(e,t){return(t==null?void 0:t[e])??bw[e]}function Ff(e,t){return new Error(Ls(e,t))}const Ew=(e,t={includeReplay:!0})=>{const n=t.errorMessages;if(!e.message)throw Ff("ERROR_EMPTY_MESSAGE",n);const r=C();if(!r)throw Ff("ERROR_NO_CLIENT",n);e.tags&&Object.keys(e.tags).length&&H().setTags(e.tags);const o=MT({source:yw,url:_n(),...e},t);return new Promise((s,i)=>{const a=setTimeout(()=>{c(),i(Ls("ERROR_TIMEOUT",n))},3e4),c=r.on("afterSendEvent",(u,f)=>{if(u.event_id===o)return clearTimeout(a),c(),f!=null&&f.statusCode&&f.statusCode>=200&&f.statusCode<300?s(o):(f==null?void 0:f.statusCode)===403?i(Ls("ERROR_FORBIDDEN",n)):i(Ls("ERROR_GENERIC",n))})})},Ds=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function vw(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(uo.userAgent)||/Macintosh/i.test(uo.userAgent)&&uo.maxTouchPoints&&uo.maxTouchPoints>1||!isSecureContext)}function ms(e,t){return{...e,...t,tags:{...e.tags,...t.tags},onFormOpen:()=>{var n,r;(n=t.onFormOpen)==null||n.call(t),(r=e.onFormOpen)==null||r.call(e)},onFormClose:()=>{var n,r;(n=t.onFormClose)==null||n.call(t),(r=e.onFormClose)==null||r.call(e)},onSubmitSuccess:(n,r)=>{var o,s;(o=t.onSubmitSuccess)==null||o.call(t,n,r),(s=e.onSubmitSuccess)==null||s.call(e,n,r)},onSubmitError:n=>{var r,o;(r=t.onSubmitError)==null||r.call(t,n),(o=e.onSubmitError)==null||o.call(e,n)},onFormSubmitted:()=>{var n,r;(n=t.onFormSubmitted)==null||n.call(t),(r=e.onFormSubmitted)==null||r.call(e)},themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function Tw(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 Ye(e,t){return Object.entries(t).forEach(([n,r])=>{e.setAttributeNS(null,n,r)}),e}const ur=20,Iw="http://www.w3.org/2000/svg";function ww(){const e=a=>ht.document.createElementNS(Iw,a),t=Ye(e("svg"),{width:`${ur}`,height:`${ur}`,viewBox:`0 0 ${ur} ${ur}`,fill:"var(--actor-color, var(--foreground))"}),n=Ye(e("g"),{clipPath:"url(#clip0_57_80)"}),r=Ye(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=Ye(e("clipPath"),{id:"clip0_57_80"}),i=Ye(e("rect"),{width:`${ur}`,height:`${ur}`,fill:"white"});return s.appendChild(i),o.appendChild(s),t.appendChild(o).appendChild(s).appendChild(i),t}function Rw({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(ww()),e){const i=de.createElement("span");i.appendChild(de.createTextNode(e)),o.appendChild(i)}const s=Tw(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 Jm="rgba(88, 74, 192, 1)",kw={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:Jm,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%)"},$f={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackgroun
69d:Jm,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 Bf(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 Uf({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 ${Bf(e==="dark"?{...$f,...t}:{...kw,...n})} 96} 97 98${e==="system"?` 99@media (prefers-color-scheme: dark) { 100 :host { 101 color-scheme: only dark; 102 103 ${Bf({...$f,...t})} 104 } 105}`:""} 106`,r&&o.setAttribute("nonce",r),o}const Km=({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:f=!0,enableScreenshot:l=!0,useSentryUser:d={email:"email",name:"username"},tags:p,styleNonce:h,scriptNonce:m,colorScheme:g="system",themeLight:y={},themeDark:S={},addScreenshotButtonLabel:I=dw,cancelButtonLabel:v=ew,confirmButtonLabel:w=nw,emailLabel:T=sw,emailPlaceholder:b=ow,formTitle:D=rw,isRequiredLabel:N=fw,messageLabel:E=aw,messagePlaceholder:L=iw,nameLabel:M=uw,namePlaceholder:F=cw,removeScreenshotButtonLabel:q=pw,submitButtonLabel:K=tw,successMessageText:G=lw,triggerLabel:$=jm,triggerAriaLabel:x="",highlightToolText:Z=hw,hideToolText:O=mw,removeHighlightText:V=gw,errorEmptyMessageText:ne=zm,errorNoClientText:te=qm,errorTimeoutText:ie=Gm,errorForbiddenText:Le=Vm,errorGenericText:ft=Ym,onFormOpen:Dt,onFormClose:dt,onSubmitSuccess:An,onSubmitError:Ft,onFormSubmitted:ls}={})=>{const $t={id:o,autoInject:s,showBranding:i,isEmailRequired:a,isNameRequired:c,showEmail:u,showName:f,enableScreenshot:l,useSentryUser:d,tags:p,styleNonce:h,scriptNonce:m,colorScheme:g,themeDark:S,themeLight:y,triggerLabel:$,triggerAriaLabel:x,cancelButtonLabel:v,submitButtonLabel:K,confirmButtonLabel:w,formTitle:D,emailLabel:T,emailPlaceholder:b,messageLabel:E,messagePlaceholder:L,nameLabel:M,namePlaceholder:F,successMessageText:G,isRequiredLabel:N,addScreenshotButtonLabel:I,removeScreenshotButtonLabel:q,highlightToolText:Z,hideToolText:O,removeHighlightText:V,errorEmptyMessageText:ne,errorNoClientText:te,errorTimeoutText:ie,errorForbiddenText:Le,errorGenericText:ft,onFormClose:dt,onFormOpen:Dt,onSubmitError:Ft,onSubmitSuccess:An,onFormSubmitted:ls};let et=null,We=null,qe=[];const sr=P=>{if(!et){const ae=de.createElement("div");ae.id=String(P.id),de.body.appendChild(ae),et=ae.attachShadow({mode:"open"}),We=Uf(P),et.appendChild(We)}return et},ir=async P=>{const ae=P.enableScreenshot&&vw();let X,fe;try{X=(t?t():await e("feedbackModalIntegration",m))(),Kl(X)}catch{throw Ds&&_.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 De=ae?n?n():await e("feedbackScreenshotIntegration",m):void 0;De&&(fe=De(),Kl(fe))}catch{Ds&&_.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.")}const le={ERROR_EMPTY_MESSAGE:P.errorEmptyMessageText,ERROR_NO_CLIENT:P.errorNoClientText,ERROR_TIMEOUT:P.errorTimeoutText,ERROR_FORBIDDEN:P.errorForbiddenText,ERROR_GENERIC:P.errorGenericText},oe=(De,hy)=>Ew(De,{includeReplay:!0,...hy,errorMessages:le}),Fe=X.createDialog({options:{...P,onFormClose:()=>{var De;Fe==null||Fe.close(),(De=P.onFormClose)==null||De.call(P)}
106,onFormSubmitted:()=>{var De;Fe==null||Fe.close(),(De=P.onFormSubmitted)==null||De.call(P)}},screenshotIntegration:fe,sendFeedback:oe,shadow:sr(P)});return Fe},Cn=(P,ae={})=>{const X=ms($t,ae),fe=typeof P=="string"?de.querySelector(P):typeof P.addEventListener=="function"?P:null;if(!fe)throw Ds&&_.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let le=null;const oe=async()=>{le||(le=await ir({...X,onFormSubmitted:()=>{var De;le==null||le.removeFromDom(),(De=X.onFormSubmitted)==null||De.call(X)}})),le.appendToDom(),le.open()};fe.addEventListener("click",oe);const Fe=()=>{qe=qe.filter(De=>De!==Fe),le==null||le.removeFromDom(),le=null,fe.removeEventListener("click",oe)};return qe.push(Fe),Fe},Nn=(P={})=>{const ae=ms($t,P),X=sr(ae),fe=Rw({triggerLabel:ae.triggerLabel,triggerAriaLabel:ae.triggerAriaLabel,shadow:X,styleNonce:h});return Cn(fe.el,{...ae,onFormOpen(){fe.hide()},onFormClose(){fe.show()},onFormSubmitted(){fe.show()}}),fe};return{name:"Feedback",setupOnce(){!mn()||!$t.autoInject||(de.readyState==="loading"?de.addEventListener("DOMContentLoaded",()=>Nn().appendToDom()):Nn().appendToDom())},attachTo:Cn,createWidget(P={}){const ae=Nn(ms($t,P));return ae.appendToDom(),ae},async createForm(P={}){return ir(ms($t,P))},setTheme(P){if($t.colorScheme=P,et){const ae=Uf($t);We?et.replaceChild(ae,We):et.prepend(ae),We=ae}},remove(){var P;et&&((P=et.parentElement)==null||P.remove(),et=null,We=null),qe.forEach(ae=>ae()),qe=[]}}});function BL(){const e=C();return e==null?void 0:e.getIntegrationByName("Feedback")}var Yi,he,Xm,Pn,Hf,Qm,bc,Io={},Iu=[],Aw=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,wu=Array.isArray;function rn(e,t){for(var n in t)e[n]=t[n];return e}function Zm(e){var t=e.parentNode;t&&t.removeChild(e)}function ee(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?Yi.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??++Xm,__i:-1,__u:0};return o==null&&he.vnode!=null&&he.vnode(s),s}function Go(e){return e.children}function $s(e,t){this.props=e,this.context=t}function Lr(e,t){if(t==null)return e.__?Lr(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"?Lr(e):null}function Cw(e,t,n){var r,o=e.__v,s=o.__e,i=e.__P;if(i)return(r=rn({},o)).__v=o.__v+1,he.vnode&&he.vnode(r),Ru(i,r,o,e.__n,i.ownerSVGElement!==void 0,32&o.__u?[s]:null,t,s??Lr(o),!!(32&o.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=s&&eg(r),r}function eg(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 eg(e)}}function Wf(e){(!e.__d&&(e.__d=!0)&&Pn.push(e)&&!li.__r++||Hf!==he.debounceRendering)&&((Hf=he.debounceRendering)||Qm)(li)}function li(){var e,t,n,r=[],o=[];for(Pn.sort(bc);e=Pn.shift();)e.__d&&(n=Pn.length,t=Cw(e,r,o)||t,n===0||Pn.length>n?(Ec(r,t,o),o.length=r.length=0,t=void 0,Pn.sort(bc)):t&&he.__c&&he.__c(t,Iu));t&&Ec(r,t,o),li.__r=0}function tg(e,t,n,r,o,s,i,a,c,u,f){var l,d,p,h,m,g=r&&r.__k||Iu,y=t.length;for(n.__d=c,Nw(n,t,g),c=n.__d,l=0;l<y;l++)(p=n.__k[l])!=null&&typeof p!="boolean"&&typeof p!="function"&&(d=p.__i===-1?Io:g[p.__i]||Io,p.__i=l,Ru(e,p,d,o,s,i,a,c,u,f),h=p.__e,p.ref&&d.ref!=p.ref&&(d.ref&&ku(d.ref,null,p),f.push(p.ref,p.__c||h,p)),m==null&&h!=null&&(m=h),65536&p.__u||d.__k===p.__k?c=ng(p,c,e):typeof p.type=="function"&&p.__d!==void 0?c=p.__d:h&&(c=h.nextSibling),p.__d=void 0,p.__u&=-196609);n.__d=c,n.__e=m}function Nw(e,t,n){var r,o,s,i,a,c=t.length,u=n.length,f=u,l=0;for(e.__k=[],r=0;r<c;r++)(o=e.__k[r]=(o=t[r])==null||typeof o=="boolean"||typeof o=="function"?null:typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?Fs(null,o,null,null,o):wu(o)?Fs(Go,{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=Mw(o,n,i=r+l,f),o.__i=a,s=null,a!==-1&&(f--,(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?f>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=Lr(s)),vc(s,s,!1),n[r]=null,f--);if(f)for(r=0;r<u;r++)(s=n[r])!=null&&(131072&s.__u)==0&&(s.__e==e.__d&&(e.__d=Lr(s)),vc(s,s))}function ng(e,t,n){var r,o;
vendor: 4,242 bytes, line 106
106if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=ng(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 Mw(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 jf(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Aw.test(t)?n:n+"px"}function gs(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||jf(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||jf(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?qf:zf,s)):e.removeEventListener(t,s?qf:zf,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 zf(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(he.event?he.event(e):e)}}function qf(e){if(this.l)return this.l[e.type+!0](he.event?he.event(e):e)}function Ru(e,t,n,r,o,s,i,a,c,u){var f,l,d,p,h,m,g,y,S,I,v,w,T,b,D,N=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),s=[a=t.__e=n.__e]),(f=he.__b)&&f(t);e:if(typeof N=="function")try{if(y=t.props,S=(f=N.contextType)&&r[f.__c],I=f?S?S.props.value:f.__:r,n.__c?g=(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=Ow),S&&S.sub(l),l.props=y,l.state||(l.state={}),l.context=I,l.__n=r,d=l.__d=!0,l.__h=[],l._sb=[]),l.__s==null&&(l.__s=l.state),N.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=rn({},l.__s)),rn(l.__s,N.getDerivedStateFromProps(y,l.__s))),p=l.props,h=l.state,l.__v=t,d)N.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(N.getDerivedStateFromProps==null&&y!==p&&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(E){E&&(E.__=t)}),v=0;v<l._sb.length;v++)l.__h.push(l._sb[v]);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(p,h,m)})}if(l.context=I,l.props=y,l.__P=e,l.__e=!1,w=he.__r,T=0,"prototype"in N&&N.prototype.render){for(l.state=l.__s,l.__d=!1,w&&w(t),f=l.render(l.props,l.state,l.context),b=0;b<l._sb.length;b++)l.__h.push(l._sb[b]);l._sb=[]}else do l.__d=!1,w&&w(t),f=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++T<25);l.state=l.__s,l.getChildContext!=null&&(r=rn(rn({},r),l.getChildContext())),d||l.getSnapshotBeforeUpdate==null||(m=l.getSnapshotBeforeUpdate(p,h)),tg(e,wu(D=f!=null&&f.type===Go&&f.key==null?f.props.children:f)?D:[D],t,n,r,o,s,i,a,c,u),l.base=t.__e,t.__u&=-161,l.__h.length&&i.push(l),g&&(l.__E=l.__=null)}catch(E){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),he.__e(E,t,n)}else s==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=xw(n.__e,t,n,r,o,s,i,c,u);(f=he.diffed)&&f(t)}function Ec(e,t,n){for(var r=0;r<n.length;r++)ku(n[r],n[++r],n[++r]);he.__c&&he.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(s){s.call(o)})}catch(s){he.__e(s,o.__v)}})}function xw(e,t,n,r,o,s,i,a,c){var u,f,l,d,p,h,m,g=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((p=s[u])&&"setAttribute"in p==!!S&&(S?p.localName===S:p.nodeType===3)){e=p,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)g===y||a&&e.data===y||(e.data=y);else{if(s=s&&Yi.call(e.childNodes),g=n.props||Io,!a&&s!=null)for(g={},u=0;u<e.attributes.length;u++)g[(p=e.attributes[u]).name]=p.value;for(u in g)p=g[u],u=="children"||(u=="dangerouslySetInnerHTML"?l=p:u==="key"||u in y||gs(e,u,null,p,o));for(u in y)p=y[u],u=="children"?d=p:u=="dangerouslySetInnerHTML"?f=p:u=="value"?h=p:u=="checked"?m=p:u==="key"||a&&typeof p!="function"||g[u]===p||gs(e,u,p,g[u],o);if(f)a||l&&(f.__html===l.__html||f.__html===e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(l&&(e.innerHTML=""),tg(e,wu(d)?d:[d],t,n,r,o&&S!=="foreignObject",s,i,s?s[0]:n.__k&&Lr(n,0),a,c),s!=null)for(u=s.length;u--;)s[u]!=null&&Zm(s[u]);a||(u="value",h!==void 0&&(h!==e[u]||S==="progress"&&!h||S==="option"&&h!==g[u])&&gs(e,u,h,g[u],!1),u="checked",m!==void 0&&m!==e[u]&&gs(e,u,m,g[u],!1))}return e}function ku(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){he.__e(r,n)}}function vc(e,t,n){var r,o;if(he.unmount&&he.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||ku(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){he.__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]&&vc(r[o],t,n||typeof e.type!="function");n||e.__e==null||Zm(e.__e),e.__=e.__e=e.__d=void 0}function Ow(e,t,n){return this.constructor(e,n)}function Pw(e,t,n){var r,o,s,i;he.__&&he.__(e,t),o=(r=!1)?null:t.__k,s=[],i=[],Ru(t,e=t.__k=ee(Go,null,[e]),o||Io,Io,t.ownerSVGElement!==void 0,o?null:t.firstChild?Yi.call(t.childNodes):null,s,o?o.__e:t.firstChild,r,i),e.__d=void 0,Ec(s,e,i)}Yi=Iu.slice,he={__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}},Xm=0,$s.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=rn({},this.state),typeof e=="function"&&(e=e(rn({},n),this.props)),e&&rn(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Wf(this))},$s.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Wf(this))},$s.prototype.render=Go,Pn=[],Qm=typeof Promise=="function"?Promise.prototype.then.bind(Prom
106ise.resolve()):setTimeout,bc=function(e,t){return e.__v.__b-t.__v.__b},li.__r=0;var Yt,pe,Oa,Gf,Dr=0,rg=[],Bs=[],Ee=he,Vf=Ee.__b,Yf=Ee.__r,Jf=Ee.diffed,Kf=Ee.__c,Xf=Ee.unmount,Qf=Ee.__;function rr(e,t){Ee.__h&&Ee.__h(pe,e,Dr||t),Dr=0;var n=pe.__H||(pe.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Bs}),n.__[e]}function Dn(e){return Dr=1,og(ig,e)}function og(e,t,n){var r=rr(Yt++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):ig(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=pe,!pe.u)){var o=function(a,c,u){if(!r.__c.__H)return!0;var f=r.__c.__H.__.filter(function(d){return!!d.__c});if(f.every(function(d){return!d.__N}))return!s||s.call(this,a,c,u);var l=!1;return f.forEach(function(d){if(d.__N){var p=d.__[0];d.__=d.__N,d.__N=void 0,p!==d.__[0]&&(l=!0)}}),!(!l&&r.__c.props===a)&&(!s||s.call(this,a,c,u))};pe.u=!0;var s=pe.shouldComponentUpdate,i=pe.componentWillUpdate;pe.componentWillUpdate=function(a,c,u){if(this.__e){var f=s;s=void 0,o(a,c,u),s=f}i&&i.call(this,a,c,u)},pe.shouldComponentUpdate=o}return r.__N||r.__}function Lw(e,t){var n=rr(Yt++,3);!Ee.__s&&Au(n.__H,t)&&(n.__=e,n.i=t,pe.__H.__h.push(n))}function sg(e,t){var n=rr(Yt++,4);!Ee.__s&&Au(n.__H,t)&&(n.__=e,n.i=t,pe.__h.push(n))}function Dw(e){return Dr=5,Vo(function(){return{current:e}},[])}function Fw(e,t,n){Dr=6,sg(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 Vo(e,t){var n=rr(Yt++,7);return Au(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function wr(e,t){return Dr=8,Vo(function(){return e},t)}function $w(e){var t=pe.context[e.__c],n=rr(Yt++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(pe)),t.props.value):e.__}function Bw(e,t){Ee.useDebugValue&&Ee.useDebugValue(t?t(e):e)}function Uw(e){var t=rr(Yt++,10),n=Dn();return t.__=e,pe.componentDidCatch||(pe.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function Hw(){var e=rr(Yt++,11);if(!e.__){for(var t=pe.__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 Ww(){for(var e;e=rg.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Us),e.__H.__h.forEach(Tc),e.__H.__h=[]}catch(t){e.__H.__h=[],Ee.__e(t,e.__v)}}Ee.__b=function(e){pe=null,Vf&&Vf(e)},Ee.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Qf&&Qf(e,t)},Ee.__r=function(e){Yf&&Yf(e),Yt=0;var t=(pe=e.__c).__H;t&&(Oa===pe?(t.__h=[],pe.__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(Tc),t.__h=[],Yt=0)),Oa=pe},Ee.diffed=function(e){Jf&&Jf(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(rg.push(t)!==1&&Gf===Ee.requestAnimationFrame||((Gf=Ee.requestAnimationFrame)||jw)(Ww)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Bs&&(n.__=n.__V),n.i=void 0,n.__V=Bs})),Oa=pe=null},Ee.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Us),n.__h=n.__h.filter(function(r){return!r.__||Tc(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],Ee.__e(r,n.__v)}}),Kf&&Kf(e,t)},Ee.unmount=function(e){Xf&&Xf(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&&Ee.__e(t,n.__v))};var Zf=typeof requestAnimationFrame=="function";function jw(e){var t,n=function(){clearTimeout(r),Zf&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Zf&&(t=requestAnimationFrame(n))}function Us(e){var t=pe,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),pe=t}function Tc(e){var t=pe;e.__c=e.__(),pe=t}function Au(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function ig(e,t){return typeof t=="function"?t(e):t}const zw=Object.defineProperty({__proto__:null,useCallback:wr,useContext:$w,useDebugValue:Bw,useEffect:Lw,useErrorBoundary:Uw,useId:Hw,useImperativeHandle:Fw,useLayoutEffect:sg,useMemo:Vo,useReducer:og,useRef:Dw,useState:Dn},Symbol.toStringTag,{value:"Module"}),qw="http://www.w3.org/2000/svg";function Gw(){const e=r=>de.createElementNS(qw,r),t=Ye(e("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),n=Ye(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 Vw({options:e}){const t=Vo(()=>({__html:Gw().outerHTML}),[]);return ee("h2",{class:"dialog__header"},ee("span",{class:"dialog__title"},e.formTitle),e.showBranding?ee("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:t}):null)}function Yw(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 Pa(e,t){const n=e.get(t);return typeof n=="string"?n.trim():""}function Jw({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:o,onSubmitSuccess:s,onSubmitError:i,showEmail
106:a,showName:c,screenshotInput:u}){const{tags:f,addScreenshotButtonLabel:l,removeScreenshotButtonLabel:d,cancelButtonLabel:p,emailLabel:h,emailPlaceholder:m,isEmailRequired:g,isNameRequired:y,messageLabel:S,messagePlaceholder:I,nameLabel:v,namePlaceholder:w,submitButtonLabel:T,isRequiredLabel:b}=e,[D,N]=Dn(!1),[E,L]=Dn(null),[M,F]=Dn(!1),q=u==null?void 0:u.input,[K,G]=Dn(null),$=wr(O=>{G(O),F(!1)},[]),x=wr(O=>{const V=Yw(O,{emailLabel:h,isEmailRequired:g,isNameRequired:y,messageLabel:S,nameLabel:v});return V.length>0?L(`Please enter in the following required fields: ${V.join(", ")}`):L(null),V.length===0},[h,g,y,S,v]),Z=wr(async O=>{N(!0);try{if(O.preventDefault(),!(O.target instanceof HTMLFormElement))return;const V=new FormData(O.target),ne=await(u&&M?u.value():void 0),te={name:Pa(V,"name"),email:Pa(V,"email"),message:Pa(V,"message"),attachments:ne?[ne]:void 0};if(!x(te))return;try{const ie=await o({name:te.name,email:te.email,message:te.message,source:_w,tags:f},{attachments:te.attachments});s(te,ie)}catch(ie){Ds&&_.error(ie);const Le=ie instanceof Error?ie:new Error(String(ie));L(Le.message),i(Le)}}finally{N(!1)}},[u&&M,s,i]);return ee("form",{class:"form",onSubmit:Z},q&&M?ee(q,{onError:$}):null,ee("fieldset",{class:"form__right","data-sentry-feedback":!0,disabled:D},ee("div",{class:"form__top"},E?ee("div",{class:"form__error-container"},E):null,c?ee("label",{for:"name",class:"form__label"},ee(La,{label:v,isRequiredLabel:b,isRequired:y}),ee("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:w,required:y,type:"text"})):ee("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden"}),a?ee("label",{for:"email",class:"form__label"},ee(La,{label:h,isRequiredLabel:b,isRequired:g}),ee("input",{class:"form__input",defaultValue:t,id:"email",name:"email",placeholder:m,required:g,type:"email"})):ee("input",{"aria-hidden":!0,value:t,name:"email",type:"hidden"}),ee("label",{for:"message",class:"form__label"},ee(La,{label:S,isRequiredLabel:b,isRequired:!0}),ee("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:I,required:!0,rows:5})),q?ee("label",{for:"screenshot",class:"form__label"},ee("button",{class:"btn btn--default",disabled:D,type:"button",onClick:()=>{G(null),F(O=>!O)}},M?d:l),K?ee("div",{class:"form__error-container"},K.message):null):null),ee("div",{class:"btn-group"},ee("button",{class:"btn btn--primary",disabled:D,type:"submit"},T),ee("button",{class:"btn btn--default",disabled:D,type:"button",onClick:r},p))))}function La({label:e,isRequired:t,isRequiredLabel:n}){return ee("span",{class:"form__label__text"},e,t&&ee("span",{class:"form__label__text--required"},n))}const _s=16,ed=17,Kw="http://www.w3.org/2000/svg";function Xw(){const e=c=>ht.document.createElementNS(Kw,c),t=Ye(e("svg"),{width:`${_s}`,height:`${ed}`,viewBox:`0 0 ${_s} ${ed}`,fill:"inherit"}),n=Ye(e("g"),{clipPath:"url(#clip0_57_156)"}),r=Ye(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=Ye(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=Ye(e("clipPath"),{id:"clip0_57_156"}),a=Ye(e("rect"),{width:`${_s}`,height:`${_s}`,fill:"white",transform:"translate(0 0.5)"});return i.appendChild(a),s.appendChild(i),t.appendChild(s).appendChild(i).appendChild(a),t}function Qw({open:e,onFormSubmitted:t,...n}){const r=n.options,o=Vo(()=>({__html:Xw().outerHTML}),[]),[s,i]=Dn(null),a=wr(()=>{s&&(clearTimeout(s),i(null)),t()},[s]),c=wr((u,f)=>{n.onSubmitSuccess(u,f),i(setTimeout(()=>{t(),i(null)},Sw))},[t]);return ee(Go,null,s?ee("div",{class:"success__position",onClick:a},ee("div",{class:"success__content"},r.successMessageText,ee("span",{class:"success__icon",dangerouslySetInnerHTML:o}))):ee("dialog",{class:"dialog",onClick:r.onFormClose,open:e},ee("div",{class:"dialog__position"},ee("div",{class:"dialog__content",onClick:u=>{u.stopPropagation()}},ee(Vw,{options:r}),ee(Jw,{...n,onSubmitSuccess:c})))))}const Zw=` 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`,eR=` 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`,tR=` 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`,nR=` 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`,rR=` 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 oR(e){const t=de.createElement("style");return t.textContent=` 387:host { 388 --dialog-inset: var(--inset); 389} 390 391${Zw} 392${eR} 393${tR} 394${nR} 395${rR} 396`,e&&t.setAttribute("nonce",e),t}function sR(){const e=H().getUser(),t=be().getUser(),n=Er().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}const iR=(()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{const o=r,s=e.useSentryUser,i=sR(),a=de.createElement("div"),c=oR(e.styleNonce);let u="";const f={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(){var p,h;d(!0),(p=e.onFormOpen)==null||p.call(e),(h=C())==null||h.emit("openFeedbackWidget"),u=de.body.style.overflow,de.body.style.overflow="hidden"},close(){d(!1),de.body.style.overflow=u}},l=t==null?void 0:t.createInput({h:ee,hooks:zw,dialog:f,options:e}),d=p=>{Pw(ee(Qw,{options:e,screenshotInput:l,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:String(s&&(i==null?void 0:i[s.name])||""),defaultEmail:String(s&&(i==null?void 0:i[s.email])||""),onFormClose:()=>{var h;d(!1),(h=e.onFormClose)==null||h.call(e)},onSubmit:n,onSubmitSuccess:(h,m)=>{var g;d(!1),(g=e.onSubmitSuccess)==null||g.call(e,h,m)},onSubmitError:h=>{var m;(m=e.onSubmitError)==null||m.call(e,h)},onFormSubmitted:()=>{var h;(h=e.onFormSubmitted)==null||h.call(e)},open:p}),a)};return f}}));function aR({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 cR(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 uR({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 lR({hooks:e}){function t(){const[n,r]=e.useState(ht.devicePixelRatio??1);return e.useEffect(()=>{const o=()=>{r(ht.devicePixelRatio)},s=matchMedia(`(resolution: ${ht.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 uo.mediaDevices.getDisplayMedia({video:{width:ht.innerWidth*a,height:ht.innerHeight*a},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),f=de.createElement("video");await new Promise((l,d)=>{f.srcObject=u,f.onloadedmetadata=()=>{o(f,a),u.getTracks().forEach(p=>p.stop()),l()},f.play().catch(d)}),s()})().catch(i)},[])}}function fR(e,t,n){switch(e.type){case"highlight":{t.shadowColor="rgba(0, 0, 0, 0.7)",t.shadowBlur=50,t.fillStyle=n,t.fillRect(e.x-1,e.y-1,e.w+2,e.h+2),t.clearRect(e.x,e.y,e.w,e.h);break}case"hide":t.fillStyle="rgb(0, 0, 0)",t.fillRect(e.x,e.y,e.w,e.h);break}}function Zt(e,t,n){if(!e)return;const r=e.getContext("2d",t);r&&n(e,r)}function Da(e,t){Zt(e,{alpha:!0},(n,r)=>{r.drawImage(t,0,0,t.width,t.height,0,0,n.width,n.height)})}function Fa(e,t,n){Zt(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=>{fR(s,o,t)})})}function dR({h:e,hooks:t,outputBuffer:n,dialog:r,options:o}){const s=lR({hooks:t}),i=uR({h:e}),a=aR({h:e}),c={__html:cR(o.styleNonce).innerText},u=r.el.style,f=({screenshot:l})=>{const[d,p]=t.useState("highlight"),[h,m]=t.useState([]),g=t.useRef(null),y=t.useRef(null),S=t.useRef(null),I=t.useRef(null),[v,w]=t.useState(1),T=t.useMemo(()=>{const M=de.getElementById(o.id);if(!M)return"white";const F=getComputedStyle(M);return F.getPropertyValue("--button-primary-background")||F.getPropertyValue("--accent-background")},[o.id]);t.useLayoutEffect(()=>{const M=()=>{const F=g.current;F&&(Zt(l.canvas,{alpha:!1},q=>{const K=Math.min(F.clientWidth/q.width,F.clientHeight/q.height);w(K)}),(F.clientHeight===0||F.clientWidth===0)&&setTimeout(M,0))};return M(),ht.addEventListener("resize",M),()=>{ht.removeEventListener("resize",M)}},[l]);const b=t.useCallback((M,F)=>{Zt(M,{alpha:!0},(q,K)=>{K.scale(F,F),q.width=l.canvas.width,q.height=l.canvas.height})},[l]);t.useEffect(()=>{b(y.current,l.dpi),Da(y.current,l.canvas)},[l]),t.useEffect(()=>{b(S.current,l.dpi),Zt(S.current,{alpha:!0},(M,F)=>{F.clearRect(0,0,M.width,M.height)}),Fa(S.current,T,h)},[h,T]),t.useEffect(()=>{b(n,l.dpi),Da(n,l.canvas),Zt(de.createElement("canvas"),{alpha:!0},(M,F)=>{F.scale(l.dpi,l.dpi),M.width=l.canvas.width,M.height=l.canvas.height,Fa(M,T,h),Da(n,M)})},[h,l,T]);const D=M=>{if(!d||!I.current)return;const F=I.current.getBoundingClientRect(),q={type:d,x:M.offsetX/v,y:M.offsetY/v},K=(x,Z)=>{const O=(Z.clientX-F.x)/v,V=(Z.clientY-F.y)/v;return{type:x.type,x:Math.min(x.x,O),y:Math.min(x.y,V),w:Math.abs(O-x.x),h:Math.abs(V-x.y)}},G=x=>{Zt(S.current,{alpha:!0},(Z,O)=>{O.clearRect(0,0,Z.width,Z.height)}),Fa(S.current,T,[...h,K(q,x)])},$=x=>{const Z=K(q,x);Z.w*v>=1&&Z.h*v>=1&&m(O=>[...O,Z]),de.removeEventListener("mousemove",G),de.removeEventListener("mouseup",$)};de.addEventListener("mousemove",G),de.addEventListener("mouseup",$)},N=t.useCallback(M=>F=>{F.preventDefault(),F.stopPropagation(),m(q=>{const K=[...q];return K.splice(M,1),K})},[]),E={width:`${l.canvas.width*v}px`,height:`${l.canvas.height*v}px`},L=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:g},e("canvas",{ref:y,id:"background",style:E}),e("canvas",{ref:S,id:"foreground",style:E}),e("div",{ref:I,onMouseDown:D,style:E},h.map((M,F)=>e("div",{key:F,class:"editor__rect",style:{top:`${M.y*v}px`,left:`${M.x*v}px`,width:`${M.w*v}px`,height:`${M.h*v}px`}},e("button",{"aria-label":o.removeHighlightText,onClick:N(F),onMouseDown:L,onMouseUp:L,type:"button"},e(a,null))))))),e(i,{options:o,action:d,setAction:p}))};return function({onError:d}){const[p,h]=t.useState();return s({onBeforeScreenshot:t.useCallback(()=>{u.display="none"},[]),onScreenshot:t.useCallback((m,g)=>{Zt(de.createElement("canvas"),{alpha:!1},(y,S)=>{S.scale(g,g),y.width=m.videoWidth,y.height=m.videoHeight,S.drawImage(m,0,0,y.width,y.height),h({canvas:y,dpi:g})}),n.width=m.videoWidth,n.height=m.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{u.display="block"},[]),onError:t.useCallback(m=>{u.display="block",d(m)},[])}),p?e(f,{screenshot:p}):e("div",null)}}const pR=(()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{const o=de.createElement("canvas");return{input:dR({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"}}}}})),R=U;let Ic=0;function ag(){return Ic>0}function hR(){Ic++,setTimeout(()=>{Ic--})}function Fr(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(Jc(e))return e}catch{return e}const r=function(...o){U._sentryWrappedDepth=(U._sentryWrappedDepth||0)+1;try{const s=o.map(i=>Fr(i,t));return e.apply(this,s)}catch(s){throw hR(),Ze(i=>{i.addEventProcessor(a=>(t.mechanism&&(rc(a,void 0),It(a,t.mechanism)),a.extra={...a.extra,arguments:o},a)),St(s)}),s}finally{U._sentryWrappedDepth=(U._sentryWrappedDepth||0)-1}};try{for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}catch{}Op(r,e),Se(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function fi(){const e=_n(),{referrer:t}=R.document||{},{userAgent:n}=R.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}const mR=["replayIntegration","replayCanvasIntegration","feedbackIntegration","feedbackModalIntegration","feedbackScreenshotIntegration","captureConsoleIntegration","contextLinesIntegration","linkedErrorsIntegration","dedupeIntegration","extraErrorDataIntegration","graphqlClientIntegration","httpClientIntegration","reportingObserverIntegration","rewriteFramesIntegration","browserProfilingIntegration","moduleMetadataIntegration","instrumentAnthropicAiClient","
488instrumentOpenAiClient","instrumentGoogleGenAIClient","instrumentStateGraph","instrumentLangGraph","createLangChainCallbackHandler","instrumentLangChainEmbeddings"],gR={replayCanvasIntegration:"replay-canvas",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot"};function _R(e){return gR[e]||e.replace("Integration","").toLowerCase()}const td=R;async function yR(e,t){const n=mR.includes(e)?_R(e):void 0,r=td.Sentry=td.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=SR(n),i=R.document.createElement("script");i.src=s,i.crossOrigin="anonymous",i.referrerPolicy="strict-origin",t&&i.setAttribute("nonce",t);const a=new Promise((l,d)=>{i.addEventListener("load",()=>l()),i.addEventListener("error",d)}),c=R.document.currentScript,u=R.document.body||R.document.head||(c==null?void 0: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 f=r[e];if(typeof f!="function")throw new Error(`Could not load integration: ${e}`);return f}function SR(e){var r;const t=C(),n=((r=t==null?void 0:t.getOptions())==null?void 0:r.cdnBaseUrl)||"https://browser.sentry-cdn.com";return new URL(`/${sn}/${e}.min.js`,n).toString()}const UL=Km({lazyLoadIntegration:yR}),HL=Km({getModalIntegration:()=>iR,getScreenshotIntegration:()=>pR});function Cu(e,t){const n=Ji(e,t),r={type:IR(t),value:wR(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function bR(e,t,n,r){const o=C(),s=o==null?void 0:o.getOptions().normalizeDepth,i=NR(t),a={__serialized__:$p(t,s)};if(i)return{exception:{values:[Cu(e,i)]},extra:a};const c={exception:{values:[{type:Ai(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:AR(t,{isUnhandledRejection:r})}]},extra:a};if(n){const u=Ji(e,n);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function $a(e,t){return{exception:{values:[Cu(e,t)]}}}function Ji(e,t){const n=t.stacktrace||t.stack||"",r=vR(t),o=TR(t);try{return e(n,r,o)}catch{}return[]}const ER=/Minified React error #\d+;/i;function vR(e){return e&&ER.test(e.message)?1:0}function TR(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function cg(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function IR(e){const t=e==null?void 0:e.name;return!t&&cg(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function wR(e){const t=e==null?void 0:e.message;return cg(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?ff(t.error):ff(e):"No error message"}function RR(e,t,n,r){const o=(n==null?void 0:n.syntheticException)||void 0,s=Ki(e,t,o,r);return It(s),s.level="error",n!=null&&n.event_id&&(s.event_id=n.event_id),Uo(s)}function kR(e,t,n="info",r,o){const s=(r==null?void 0:r.syntheticException)||void 0,i=wc(e,t,s,o);return i.level=n,r!=null&&r.event_id&&(i.event_id=r.event_id),Uo(i)}function Ki(e,t,n,r,o){var i,a;let s;if(xp(t)&&t.error)return $a(e,t.error);if(yl(t)||Ry(t)){const c=t;if("stack"in t){s=$a(e,t);const u=(a=(i=s.exception)==null?void 0:i.values)==null?void 0:a[0];if(r&&n&&u&&!u.stacktrace){const f=Ji(e,n);f.length&&(u.stacktrace={frames:f},It(s,{synthetic:!0}))}}else{const u=c.name||(yl(c)?"DOMError":"DOMException"),f=c.message?`${u}: ${c.message}`:u;s=wc(e,f,n,r),rc(s,f)}return"code"in c&&(s.tags={...s.tags,"DOMException.code":`${c.code}`}),s}return He(t)?$a(e,t):Be(t)||Ai(t)?(s=bR(e,t,n,o),It(s,{synthetic:!0}),s):(s=wc(e,t,n,r),rc(s,`${t}`),It(s,{synthetic:!0}),s)}function wc(e,t,n,r){const o={};if(r&&n){const s=Ji(e,n);s.length&&(o.exception={values:[{value:t,stacktrace:{frames:s}}]}),It(o,{synthetic:!0})}if(ki(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 AR(e,{isUnhandledRejection:t}){const n=Ay(e),r=t?"promise rejection":"exception";return xp(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Ai(e)?`Event \`${CR(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function CR(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function NR(e){return Object.values(e).find(He)}class MR extends BE{constructor(t){var i;
488const n=xR(t),r=R.SENTRY_SDK_SOURCE||fE();om(n,"browser",["browser"],r),super(n);const{userInfo:o}=this.getDataCollectionOptions();(i=n._metadata)!=null&&i.sdk&&(n._metadata.sdk.settings={infer_ip:o?"auto":"never",...n._metadata.sdk.settings});const{sendClientReports:s}=this._options;R.document&&R.document.addEventListener("visibilitychange",()=>{R.document.visibilityState==="hidden"&&(s&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}),o&&this.on("beforeSendSession",rv)}eventFromException(t,n){return RR(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return kR(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 xR(e){var t;return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:(t=R.SENTRY_RELEASE)==null?void 0:t.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const bt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,z=U,OR=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",Yo=(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=OR(t.value,n),e(t)))}},Jo=(e=!0)=>{var n,r;const t=(r=(n=z.performance)==null?void 0:n.getEntriesByType)==null?void 0:r.call(n,"navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Zr=()=>{const e=Jo();return(e==null?void 0:e.activationStart)??0};function cn(e,t,n){z.document&&z.addEventListener(e,t,n)}function di(e,t,n){z.document&&z.removeEventListener(e,t,n)}let Rr=-1;const ug=new Set,PR=()=>{var e,t;return((e=z.document)==null?void 0:e.visibilityState)==="hidden"&&!((t=z.document)!=null&&t.prerendering)?0:1/0},Hs=e=>{if(LR(e)&&Rr>-1){if(e.type==="visibilitychange"||e.type==="pagehide")for(const t of ug)t();isFinite(Rr)||(Rr=e.type==="visibilitychange"?e.timeStamp:0,di("prerenderingchange",Hs,!0))}},Ko=()=>{var e;if(z.document&&Rr<0){const t=Zr();Rr=(z.document.prerendering||(e=globalThis.performance.getEntriesByType("visibility-state").filter(r=>r.name==="hidden"&&r.startTime>t)[0])==null?void 0:e.startTime)??PR(),cn("visibilitychange",Hs,!0),cn("pagehide",Hs,!0),cn("prerenderingchange",Hs,!0)}return{get firstHiddenTime(){return Rr},onHidden(t){ug.add(t)}}};function LR(e){var t;return e.type==="pagehide"||((t=z.document)==null?void 0:t.visibilityState)==="hidden"}const DR=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,Xo=(e,t=-1)=>{var s,i;const n=Jo();let r="navigate";return n&&((s=z.document)!=null&&s.prerendering||Zr()>0?r="prerender":(i=z.document)!=null&&i.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:DR(),navigationType:r}},Ba=new WeakMap;function Nu(e,t){try{return Ba.get(e)||Ba.set(e,new t),Ba.get(e)}catch{return new t}}class FR{constructor(){this._sessionValue=0,this._sessionEntries=[]}_processEntry(t){var o;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]),(o=this._onAfterProcessingUnexpectedShift)==null||o.call(this,t)}}const eo=(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{}},Mu=e=>{let t=!1;return()=>{t||(e(),t=!0)}},Xi=e=>{var t;(t=z.document)!=null&&t.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},$R=[1800,3e3],BR=(e,t={})=>{Xi(()=>{const n=Ko(),r=Xo("FCP");let o;const i=eo("paint",a=>{for(const c of a)c.name==="first-contentful-paint"&&(i.disconnect(),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-Zr(),0),r.entries.push(c),o(!0)))});i&&(o=Yo(e,r,$R,t.reportAllChanges))})},UR=[.1,.25],HR=(e,t={})=>{BR(Mu(()=>{var c;const n=Xo("CLS",0);let r;const o=Ko(),s=Nu(t,FR),i=u=>{for(const f of u)s._processEntry(f);s._sessionValue>
488n.value&&(n.value=s._sessionValue,n.entries=s._sessionEntries,r())},a=eo("layout-shift",i);a&&(r=Yo(e,n,UR,t.reportAllChanges),o.onHidden(()=>{i(a.takeRecords()),r(!0)}),(c=z==null?void 0:z.setTimeout)==null||c.call(z,r))}))};let lg=0,Ua=1/0,ys=0;const WR=e=>{e.forEach(t=>{t.interactionId&&(Ua=Math.min(Ua,t.interactionId),ys=Math.max(ys,t.interactionId),lg=ys?(ys-Ua)/7+1:0)})};let Rc;const fg=()=>Rc?lg:performance.interactionCount||0,jR=()=>{"interactionCount"in performance||Rc||(Rc=eo("event",WR,{type:"event",buffered:!0,durationThreshold:0}))},Ha=10;let dg=0;const zR=()=>fg()-dg;class qR{constructor(){this._longestInteractionList=[],this._longestInteractionMap=new Map}_resetInteractions(){dg=fg(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor(zR()/50));return this._longestInteractionList[t]}_processEntry(t){var o,s;if((o=this._onBeforeProcessingEntry)==null||o.call(this,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<Ha||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((i,a)=>a._latency-i._latency),this._longestInteractionList.length>Ha){const i=this._longestInteractionList.splice(Ha);for(const a of i)this._longestInteractionMap.delete(a.id)}(s=this._onAfterProcessingINPCandidate)==null||s.call(this,r)}}}const xu=e=>{var n;const t=z.requestIdleCallback||z.setTimeout;((n=z.document)==null?void 0:n.visibilityState)==="hidden"?e():(e=Mu(e),cn("visibilitychange",e,{once:!0,capture:!0}),cn("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),di("visibilitychange",e,{capture:!0}),di("pagehide",e,{capture:!0})}))},GR=[200,500],VR=40,YR=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return;const n=Ko();Xi(()=>{jR();const r=Xo("INP");let o;const s=Nu(t,qR),i=c=>{xu(()=>{for(const f of c)s._processEntry(f);const u=s._estimateP98LongestInteraction();u&&u._latency!==r.value&&(r.value=u._latency,r.entries=u.entries,o())})},a=eo("event",i,{durationThreshold:t.durationThreshold??VR});o=Yo(e,r,GR,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{i(a.takeRecords()),o(!0)}))})};class JR{_processEntry(t){var n;(n=this._onBeforeProcessingEntry)==null||n.call(this,t)}}const KR=[2500,4e3],XR=(e,t={})=>{Xi(()=>{const n=Ko(),r=Xo("LCP");let o;const s=Nu(t,JR),i=c=>{t.reportAllChanges||(c=c.slice(-1));for(const u of c)s._processEntry(u),u.startTime<n.firstHiddenTime&&(r.value=Math.max(u.startTime-Zr(),0),r.entries=[u],o())},a=eo("largest-contentful-paint",i);if(a){o=Yo(e,r,KR,t.reportAllChanges);const c=Mu(()=>{i(a.takeRecords()),a.disconnect(),o(!0)}),u=f=>{f.isTrusted&&(xu(c),di(f.type,u,{capture:!0}))};for(const f of["keydown","click","visibilitychange"])cn(f,u,{capture:!0})}})},QR=[800,1800],kc=e=>{var t,n;(t=z.document)!=null&&t.prerendering?Xi(()=>kc(e)):((n=z.document)==null?void 0:n.readyState)!=="complete"?addEventListener("load",()=>kc(e),!0):setTimeout(e)},ZR=(e,t={})=>{const n=Xo("TTFB"),r=Yo(e,n,QR,t.reportAllChanges);kc(()=>{const o=Jo();o&&(n.value=Math.max(o.responseStart-Zr(),0),n.entries=[o],r(!0))})},po={},pi={};let pg,hg,mg,gg;function Qi(e,t=!1){return ea("cls",e,tk,pg,t)}function Zi(e,t=!1){return ea("lcp",e,nk,hg,t)}function ek(e){return ea("ttfb",e,rk,mg)}function Ou(e){return ea("inp",e,ok,gg)}function yn(e,t){return _g(e,t),pi[e]||(sk(e),pi[e]=!0),yg(e,t)}function Qo(e,t){const n=po[e];if(n!=null&&n.length)for(const r of n)try{r(t)}catch(o){bt&&_.error(`Error while triggering instrumentation handler. 489Type: ${e} 490Name: ${qt(r)} 491Error:`,o)}}function tk(){return HR(e=>{Qo("cls",{metric:e}),pg=e},{reportAllChanges:!0})}function nk(){return XR(e=>{Qo("lcp",{metric:e}),hg=e},{reportAllChanges:!0})}function rk(){return ZR(e=>{Qo("ttfb",{metric:e}),mg=e})}function ok(){return YR(e=>{Qo("inp",{metric:e}),gg=e})}function ea(e,t,n,r,o=!1){_g(e,t);let s;return pi[e]||(s=n(),pi[e]=!0),r&&t({metric:r}),yg(e,t,o?s:void 0)}function sk(e){const t={};e==="event"&&(t.durationThreshold=0),eo(e,n=>{Qo(e,{entries:n})},t)}function _g(e,t){po[e]=po[e]||[],po[e].push(t)}function yg(e,t,n){return()=>{n&&n();const r=po[e];if(!r)return;const o=r.indexOf(t);o!==-1&&r.splice(o,1)}}function ik(e){return"duration"in e}const ak=80,xn={};try{typeof Node<"u"&&(xn.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode").get),typeof Element<"u"&&(xn.tagName=Object.getOwnPropertyDescriptor(Element.prototype,"tagName").get,xn.id=Object.getOwnPropertyDescriptor(Element.prototype,"id").get,xn.className=Object.getOwnPropertyDescriptor(Element.prototype,"className").get,xn.getAttribute=Element.prototype.getAttribute),typeof HTMLElement<"u"&&(xn.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"dataset").get)}catch{}function Qt(e,t,n){const r=xn[t];if(r)try{return r.call(e,n)}catch{}const o=e[t];return typeof o=="function"?o.call(e,n):o}function xe(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 f=Array.isArray(t)?t:t.keyAttrs,l=!Array.isArray(t)&&t.maxStringLength||ak;for(;n&&s++<r&&(u=ck(n,f),!(u==="html"||s>1&&i+o.length*c+u.length>=l));)o.push(u),i+=u.length,n=Qt(n,"parentNode");return o.reverse().join(a)}catch{return"<unknown>"}}function ck(e,t){const n=[],r=Qt(e,"tagName");if(!r)return"";if(typeof HTMLElement<"u"&&e instanceof HTMLElement){const s=Qt(e,"dataset");if(s){if(s.sentryComponent)return s.sentryComponent;if(s.sentryElement)return s.sentryElement}}n.push(r.toLowerCase());const o=t!=null&&t.length?t.filter(s=>Qt(e,"getAttribute",s)).map(s=>[s,Qt(e,"getAttribute",s)]):null;
491if(o!=null&&o.length)o.forEach(s=>{n.push(`[${s[0]}="${s[1]}"]`)});else{const s=Qt(e,"id");s&&n.push(`#${s}`);const i=Qt(e,"className");if(i&&mt(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=Qt(e,"getAttribute",s);i&&n.push(`[${s}="${i}"]`)}return n.join("")}const uk=e=>{const t=n=>{var r;(n.type==="pagehide"||((r=z.document)==null?void 0:r.visibilityState)==="hidden")&&e(n)};cn("visibilitychange",t,{capture:!0,once:!0}),cn("pagehide",t,{capture:!0,once:!0})};function Wa(e){return typeof e=="number"&&isFinite(e)}function Sn(e,t,n,{...r}){const o=B(e).start_timestamp;return o&&o>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),Or(e,()=>{const s=Ke({startTime:t,...r});return s&&s.end(n),s})}function Pu(e){var g;const t=C();if(!t)return;const{name:n,transaction:r,attributes:o,startTime:s}=e,{release:i,environment:a}=t.getOptions(),{userInfo:c}=t.getDataCollectionOptions(),u=t.getIntegrationByName("Replay"),f=u==null?void 0:u.getReplayId(),l=H(),d=l.getUser(),p=d!==void 0?d.email||d.id||d.ip_address:void 0;let h;try{h=l.getScopeData().contexts.profile.profile_id}catch{}const m={release:i,environment:a,user:p||void 0,profile_id:h||void 0,replay_id:f||void 0,transaction:r,"user_agent.original":(g=z.navigator)==null?void 0:g.userAgent,"client.address":c?"{{auto}}":void 0,...o};return Ke({name:n,attributes:m,startTime:s,experimental:{standalone:!0}})}function or(){return z.addEventListener&&z.performance}function ye(e){return e/1e3}function lk(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 ta(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function na(e,t){let n,r=!1;function o(a){!r&&n&&t(a,n.spanContext().spanId,n),r=!0}uk(()=>{o("pagehide")});const s=e.on("beforeStartNavigationSpan",(a,c)=>{c!=null&&c.isRedirect||(o("navigation"),s(),i())}),i=e.on("afterStartPageLoadSpan",a=>{n=a,i()})}function fk(e){let t=0,n;if(!ta("layout-shift"))return;const r=Qi(({metric:o})=>{const s=o.entries[o.entries.length-1];s&&(t=o.value,n=s)},!0);na(e,(o,s)=>{dk(t,n,s,o),r()})}function dk(e,t,n,r){var u;bt&&_.log(`Sending CLS span (${e})`);const o=t?ye((we()||0)+t.startTime):me(),s=H().getScopeData().transactionName,i=t?xe((u=t.sources[0])==null?void 0:u.node):"Layout shift",a={[J]:"auto.http.browser.cls",[ce]:"ui.webvital.cls",[wn]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t!=null&&t.sources&&t.sources.forEach((f,l)=>{a[`cls.source.${l+1}`]=xe(f.node)});const c=Pu({name:i,transaction:s,attributes:a,startTime:o});c&&(c.addEvent("cls",{[Po]:"",[Lo]:e}),c.end(o))}const pk=6e4;function Zo(e){return e!=null&&e>0&&e<=pk}function hk(e){let t=0,n;if(!ta("largest-contentful-paint"))return;const r=Zi(({metric:o})=>{const s=o.entries[o.entries.length-1];!s||!Zo(o.value)||(t=o.value,n=s)},!0);na(e,(o,s)=>{mk(t,n,s,o),r()})}function mk(e,t,n,r){if(!Zo(e))return;bt&&_.log(`Sending LCP span (${e})`);const o=ye((we()||0)+((t==null?void 0:t.startTime)||0)),s=H().getScopeData().transactionName,i=t?xe(t.element):"Largest contentful paint",a={[J]:"auto.http.browser.lcp",[ce]:"ui.webvital.lcp",[wn]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(a["lcp.element"]=xe(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=Pu({name:i,transaction:s,attributes:a,startTime:o});c&&(c.addEvent("lcp",{[Po]:"millisecond",[Lo]:e}),c.end(o))}function tt(e){return e&&((we()||performance.timeOrigin)+e)/1e3}function Sg(e){var n;const t={};if(e.nextHopProtocol!=null){const{name:r,version:o}=lk(e.nextHopProtocol);t["network.protocol.version"]=o,t["network.protocol.name"]=r}return we()||(n=or())!=null&&n.timeOrigin?gk({...t,"http.request.redirect_start":tt(e.redirectStart),"http.request.redirect_end":tt(e.redirectEnd),"http.request.worker_start":tt(e.workerStart),"http.request.fetch_start":tt(e.fetchStart),"http.request.domain_lookup_start":tt(e.domainLookupStart),"http.request.domain_lookup_end":tt(e.domainLookupEnd),"http.request.connect_start":tt(e.connectStart),"http.request.secure_connection_start":tt(e.secureConnectionStart),"http.request.connection_end":tt(e.connectEnd),"http.request.request_start":tt(e.requestStart),"http.request.response_start":tt(e.responseStart),"http.request.response_end":tt(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?e.responseStart/1e3:void 0}):t}function gk(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}const _k=2147483647;let nd=0,ze={},je,mr;function yk({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=or();if(r&&we()){r.mark&&z.performance.mark("sentry-tracing-init");const o=t?hk(n):t===!1?Tk():void 0,s=e?fk(n):e===!1?vk():void 0,i=Ik(),a=wk();return()=>{i(),a(),o==null||o(),s==null||s()}}return()=>{}}function Sk(){yn("longtask",({entries:e})=>{const t=Te();if(!t)return;const{op:n,start_timestamp:r}=B(t);for(const o of e){const s=ye(we()+o.startTime),i=ye(o.duration);n==="navigation"&&r&&s<r||Sn(t,s,s+i,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[J]:"auto.ui.browser.metrics"}})}})}function bk(){new PerformanceObserver(t=>{const n=Te();if(n)for(const r of t.getEntries()){if(!r.scripts[0])continue;const o=ye(we()+r.startTime),{start_timestamp:s,op:i}=B(n);if(i==="navigation"&&s&&o<s)continue;const a=ye(r.duration),c={[J]:"auto.ui.browser.metrics"}
491,u=r.scripts[0],{invoker:f,invokerType:l,sourceURL:d,sourceFunctionName:p,sourceCharPosition:h}=u;c["browser.script.invoker"]=f,c["browser.script.invoker_type"]=l,d&&(c["code.filepath"]=d),p&&(c["code.function"]=p),h!==-1&&(c["browser.script.source_char_position"]=h),Sn(n,o,o+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:c})}}).observe({type:"long-animation-frame",buffered:!0})}function Ek(){yn("event",({entries:e})=>{const t=Te();if(t){for(const n of e)if(n.name==="click"){const r=ye(we()+n.startTime),o=ye(n.duration),s={name:xe(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[J]:"auto.ui.browser.metrics"}},i=Tu(n.target);i&&(s.attributes["ui.component_name"]=i),Sn(t,r,r+o,s)}}})}function vk(){return Qi(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(ze.cls={value:e.value,unit:""},mr=t)},!0)}function Tk(){return Zi(({metric:e})=>{const t=e.entries[e.entries.length-1];!t||!Zo(e.value)||(ze.lcp={value:e.value,unit:"millisecond"},je=t)},!0)}function Ik(){return ek(({metric:e})=>{e.entries[e.entries.length-1]&&(ze.ttfb={value:e.value,unit:"millisecond"})})}function wk(){return yn("paint",({entries:e})=>{const t=Ko();for(const n of e){const r=n.startTime<t.firstHiddenTime;n.name==="first-paint"&&r&&(ze.fp={value:n.startTime,unit:"millisecond"}),n.name==="first-contentful-paint"&&r&&(ze.fcp={value:n.startTime,unit:"millisecond"})}})}function Rk(e,t){const n=or(),r=we();if(!(n!=null&&n.getEntries)||!r)return;const{spanStreamingEnabled:o,ignorePerformanceApiSpans:s,ignoreResourceSpans:i}=t,a=ye(r),c=n.getEntries(),{op:u,start_timestamp:f}=B(e);c.slice(nd).forEach(l=>{const d=ye(l.startTime),p=ye(Math.max(0,l.duration));if(!(u==="navigation"&&f&&a+d<f))switch(l.entryType){case"navigation":{Mk(e,l,a);break}case"mark":case"paint":case"measure":{Ck(e,l,d,p,a,s);break}case"resource":{Pk(e,l,l.name,d,p,a,i);break}}}),nd=Math.max(c.length-1,0),Lk(e,o)}function kk(e,t){var a;const n=we();if(!((a=or())!=null&&a.getEntries)||!n){rd();return}const{spanStreamingEnabled:r,recordClsOnPageloadSpan:o,recordLcpOnPageloadSpan:s}=t,i=ye(n);if(B(e).op==="pageload"){if($k(ze),r){const c=(u,f,l)=>{const d=l??`browser.web_vital.${u}.value`;e.setAttribute(d,f),bt&&_.log("Setting web vital attribute",{[d]:f},"on pageload span")};["ttfb","fp","fcp"].forEach(u=>{ze[u]&&c(u,ze[u].value)}),ze["ttfb.requestTime"]&&c("ttfb.requestTime",ze["ttfb.requestTime"].value,"browser.web_vital.ttfb.request_time")}else o||delete ze.cls,s||delete ze.lcp,Object.entries(ze).forEach(([c,u])=>{Eh(c,u.value,u.unit,e)}),Dk(e,t);e.setAttribute(r?"browser.performance.time_origin":"performance.timeOrigin",i),e.setAttribute(r?"browser.performance.navigation.activation_start":"performance.activationStart",Zr())}rd()}function rd(){je=void 0,mr=void 0,ze={}}function Ak(e){if((e==null?void 0:e.entryType)==="measure")try{return e.detail.devtools.track==="Components ⚛"}catch{return}}function Ck(e,t,n,r,o,s){if(Ak(t)||["mark","measure"].includes(t.entryType)&&at(t.name,s))return;const i=Jo(!1),a=ye(i?i.requestStart:0),c=o+Math.max(n,a),u=o+n,f=u+r,l={[J]:"auto.resource.browser.metrics"};c!==u&&(l["sentry.browser.measure_happened_before_request"]=!0,l["sentry.browser.measure_start_time"]=c),Nk(l,t),c<=f&&Sn(e,c,f,{name:t.name,op:t.entryType,attributes:l})}function Nk(e,t){try{const n=t.detail;if(!n)return;if(typeof n=="object"){for(const[r,o]of Object.entries(n))if(o&&kt(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(kt(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function Mk(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Ss(e,t,r,n)}),Ss(e,t,"secureConnection",n,"TLS/SSL"),Ss(e,t,"fetch",n,"cache"),Ss(e,t,"domainLookup",n,"DNS"),Ok(e,t,n)}function Ss(e,t,n,r,o=n){const s=xk(n),i=t[s],a=t[`${n}Start`];!a||!i||Sn(e,r+ye(a),r+ye(i),{op:`browser.${o}`,name:t.name,attributes:{[J]:"auto.ui.browser.metrics",...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function xk(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}
491function Ok(e,t,n){const r=n+ye(t.requestStart),o=n+ye(t.responseEnd),s=n+ye(t.responseStart);t.responseEnd&&(Sn(e,r,o,{op:"browser.request",name:t.name,attributes:{[J]:"auto.ui.browser.metrics"}}),Sn(e,s,o,{op:"browser.response",name:t.name,attributes:{[J]:"auto.ui.browser.metrics"}}))}function Pk(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!=null&&i.includes(a))return;const c={[J]:"auto.resource.browser.metrics"},u=Wn(n);u.protocol&&(c["url.scheme"]=u.protocol.split(":").pop()),u.host&&(c["server.address"]=u.host),c["url.same_origin"]=n.includes(z.location.origin),c[Rn]=n,Fk(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 f={...c,...Sg(t)},l=s+r,d=l+o;Sn(e,l,d,{name:n.replace(z.location.origin,""),op:a,attributes:f})}function Lk(e,t){const n=z.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),Wa(r.rtt)&&(t?e.setAttribute("network.connection.rtt",r.rtt):B(e).op==="pageload"&&Eh("connection.rtt",r.rtt,"millisecond"))),Wa(n.deviceMemory)&&(t?e.setAttribute("device.memory.estimated_capacity",n.deviceMemory):e.setAttribute("deviceMemory",`${n.deviceMemory} GB`)),Wa(n.hardwareConcurrency)&&(t?e.setAttribute("device.processor_count",n.hardwareConcurrency):e.setAttribute("hardwareConcurrency",String(n.hardwareConcurrency)))}function Dk(e,t){je&&t.recordLcpOnPageloadSpan&&(je.element&&e.setAttribute("lcp.element",xe(je.element)),je.id&&e.setAttribute("lcp.id",je.id),je.url&&e.setAttribute("lcp.url",je.url.trim().slice(0,200)),je.loadTime!=null&&e.setAttribute("lcp.loadTime",je.loadTime),je.renderTime!=null&&e.setAttribute("lcp.renderTime",je.renderTime),e.setAttribute("lcp.size",je.size)),mr!=null&&mr.sources&&t.recordClsOnPageloadSpan&&mr.sources.forEach((n,r)=>e.setAttribute(`cls.source.${r+1}`,xe(n.node)))}function Fk(e,t,n){n.forEach(([r,o])=>{const s=e[r];s!=null&&(typeof s=="number"&&s<_k||typeof s=="string")&&(t[o]=s)})}function $k(e){const t=Jo(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}const Bk="ElementTiming",Uk=(()=>({name:Bk,setup(){!or()||!we()||yn("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&&hc("ui.element.render_time",i,{unit:"millisecond",attributes:c}),a>0&&hc("ui.element.load_time",a,{unit:"millisecond",attributes:c})}})}})),WL=Uk,ja=[],ho=new Map,lr=new Map,bg=60;function Hk(){if(or()&&we()){const t=Wk();return()=>{t()}}return()=>{}}const wo={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 Wk(){return Ou(jk)}const jk=({metric:e})=>{if(e.value==null)return;const t=ye(e.value);if(t>bg)return;const n=e.entries.find(h=>h.duration===e.value&&wo[h.name]);if(!n)return;const{interactionId:r}=n,o=wo[n.name],s=ye(we()+n.startTime),i=Te(),a=i?ve(i):void 0,c=r!=null?ho.get(r):void 0,u=(c==null?void 0:c.span)||a,f=u?B(u).description:H().getScopeData().transactionName,l=(c==null?void 0:c.elementName)||xe(n.target),d={[J]:"auto.http.browser.inp",[ce]:`ui.interaction.${o}`,[wn]:n.duration},p=Pu({name:l,transaction:f,attributes:d,startTime:s});p&&(p.addEvent("inp",{[Po]:"millisecond",[Lo]:e.value}),p.end(s+t))};function zk(e){return e!=null?ho.get(e):void 0}function qk(){const e=Object.keys(wo);mn()&&e.forEach(o=>{z.addEventListener(o,t,{capture:!0,passive:!0})});function t(o){const s=o.target;if(!s)return;const i=xe(s),a=Math.round(o.timeStamp);if(lr.set(a,i),lr.size>50){const c=lr.keys().next().value;c!==void 0&&lr.delete(c)}}function n(o){const s=Math.round(o.startTime);let i=lr.get(s);if(!i)for(let a=-5;a<=5;a++){const c=lr.get(s+a);if(c){i=c;break}}return i||"<unknown>"}const r=({entries:o})=>{const s=Te(),i=s&&ve(s);o.forEach(a=>{if(!ik(a))return;const c=a.interactionId;if(c==null||ho.has(c))return;const u=a.target?xe(a.target):n(a);if(ja.length>10){const f=ja.shift();ho.delete(f)}ja.push(c),ho.set(c,{span:i,elementName:u})})};yn("event",r),yn("first-input",r)}function Lu(e){var h,m;const{name:t,op:n,origin:r,metricName:o,value:s,attributes:i,parentSpan:a,reportEvent:c,startTime:u,endTime:f}=e,l=H().getScopeData().transactionName,d={[J]:r,[ce]:n,[wn]:0,[`browser.web_vital.${o}
491.value`]:s,[Ah]:l,[au]:l,"user_agent.original":(h=z.navigator)==null?void 0:h.userAgent,...i};a&&((m=Qs(a).attributes)==null?void 0:m[ce])==="pageload"&&(d["sentry.pageload.span_id"]=a.spanContext().spanId),c&&(d[`browser.web_vital.${o}.report_event`]=c);const p=Ke({name:t,attributes:d,startTime:u,parentSpan:a});p&&p.end(f??u)}function Gk(e){let t=0,n;if(!ta("largest-contentful-paint"))return;const r=Zi(({metric:o})=>{const s=o.entries[o.entries.length-1];!s||!Zo(o.value)||(t=o.value,n=s)},!0);na(e,(o,s,i)=>{Vk(t,n,i,o),r()})}function Vk(e,t,n,r){if(!Zo(e))return;bt&&_.log(`Sending LCP span (${e})`);const o=we()||0,s=ye(o),i=ye(o+((t==null?void 0:t.startTime)||0)),a=t?xe(t.element):"Largest contentful paint",c={};t!=null&&t.element&&(c["browser.web_vital.lcp.element"]=xe(t.element)),t!=null&&t.id&&(c["browser.web_vital.lcp.id"]=t.id),t!=null&&t.url&&(c["browser.web_vital.lcp.url"]=t.url),(t==null?void 0:t.loadTime)!=null&&(c["browser.web_vital.lcp.load_time"]=t.loadTime),(t==null?void 0:t.renderTime)!=null&&(c["browser.web_vital.lcp.render_time"]=t.renderTime),(t==null?void 0:t.size)!=null&&(c["browser.web_vital.lcp.size"]=t.size),Lu({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 Yk(e){let t=0,n;if(!ta("layout-shift"))return;const r=Qi(({metric:o})=>{const s=o.entries[o.entries.length-1];s&&(t=o.value,n=s)},!0);na(e,(o,s,i)=>{Jk(t,n,i,o),r()})}function Jk(e,t,n,r){var a;bt&&_.log(`Sending CLS span (${e})`);const o=t?ye((we()||0)+t.startTime):me(),s=t?xe((a=t.sources[0])==null?void 0:a.node):"Layout shift",i={};t!=null&&t.sources&&t.sources.forEach((c,u)=>{i[`browser.web_vital.cls.source.${u+1}`]=xe(c.node)}),Lu({name:s,op:"ui.webvital.cls",origin:"auto.http.browser.cls",metricName:"cls",value:e,attributes:i,parentSpan:n,reportEvent:r,startTime:o})}function Kk(){if(!or()||!we())return;Ou(({metric:n})=>{if(n.value==null||ye(n.value)>bg)return;const o=n.entries.find(s=>s.duration===n.value&&wo[s.name]);o&&Xk(n.value,o)})}function Xk(e,t){bt&&_.log(`Sending INP span (${e})`);const n=ye(we()+t.startTime),r=ye(e),o=wo[t.name],s=zk(t.interactionId),i=Te(),a=i?ve(i):void 0,c=(s==null?void 0:s.span)||a,u=c?Qs(c).name:H().getScopeData().transactionName,f=(s==null?void 0:s.elementName)||xe(t.target);Lu({name:f,op:`ui.interaction.${o}`,origin:"auto.http.browser.inp",metricName:"inp",value:e,attributes:{[wn]:t.duration,[Ah]:u,[au]:u},startTime:n,endTime:n+r,parentSpan:c})}const Qk=1e3;let od,Ac,Cc;function Eg(e){En("dom",e),vn("dom",Zk)}function Zk(){if(!z.document)return;const e=st.bind(null,"dom"),t=sd(e,!0);z.document.addEventListener("click",t,!1),z.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{var s,i;const o=(s=z[n])==null?void 0:s.prototype;(i=o==null?void 0:o.hasOwnProperty)!=null&&i.call(o,"addEventListener")&&(Oe(o,"addEventListener",function(a){return function(c,u,f){if(c==="click"||c=="keypress")try{const l=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},d=l[c]=l[c]||{refCount:0};if(!d.handler){const p=sd(e);d.handler=p,a.call(this,c,p,f)}d.refCount++}catch{}return a.call(this,c,u,f)}}),Oe(o,"removeEventListener",function(a){return function(c,u,f){if(c==="click"||c=="keypress")try{const l=this.__sentry_instrumentation_handlers__||{},d=l[c];d&&(d.refCount--,d.refCount<=0&&(a.call(this,c,d.handler,f),d.handler=void 0,delete l[c]),Object.keys(l).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return a.call(this,c,u,f)}}))})}function eA(e){if(e.type!==Ac)return!1;try{if(!e.target||e.target._sentryId!==Cc)return!1}catch{}return!0}function tA(e,t){return e!=="keypress"?!1:t!=null&&t.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function sd(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=nA(n);if(tA(n.type,r))return;Se(n,"_sentryCaptured",!0),r&&!r._sentryId&&Se(r,"_sentryId",Ne());const o=n.type==="keypress"?"input":n.type;eA(n)||(e({event:n,name:o,global:t}),Ac=n.type,Cc=r?r._sentryId:void 0),clearTimeout(od),od=z.setTimeout(()=>{Cc=void 0,Ac=void 0},Qk)}}function nA(e){try{return e.target}catch{return null}}let bs;function ra(e){const t="history";En(t,e),vn(t,rA)}function rA(){if(z.addEventListener("popstate",()=>{const t=z.location.href,n=bs;if(bs=t,n===t)return;st("history",{from:n,to:t})}),!G0())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const o=bs,s=oA(String(r));if(bs=s,o===s)return t.apply(this,n);st("history",{from:o,to:s})}return t.apply(this,n)}}Oe(z.history,"pushState",e),Oe(z.history,"replaceState",e)}function oA(e){try{return new URL(e,z.location.origin).toString()}catch{return e}}const Ws={};function Du(e){const t=Ws[e];if(t)return t;let n=z[e];if(Sc(n))return Ws[e]=n.bind(z);const r=z.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!=null&&s[e]&&(n=s[e]),r.head.removeChild(o)}catch(o){bt&&_.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,o)}return n&&(Ws[e]=n.bind(z))}function sA(e){Ws[e]=void 0}function es(...e){return Du("setTimeout")(...e)}
491const Wt="__sentry_xhr_v3__";function Fu(e){En("xhr",e),vn("xhr",iA)}function iA(){if(!z.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const o=new Error,s=me()*1e3,i=mt(r[0])?r[0].toUpperCase():void 0,a=aA(r[1]);if(!i||!a)return t.apply(n,r);n[Wt]={method:i,url:a,request_headers:{}},i==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const c=()=>{const u=n[Wt];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const f={endTimestamp:me()*1e3,startTimestamp:s,xhr:n,virtualError:o};st("xhr",f),n.removeEventListener("readystatechange",c)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,f,l){return c(),u.apply(f,l)}}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,f,l){const[d,p]=l,h=f[Wt];return h&&mt(d)&&mt(p)&&(h.request_headers[d.toLowerCase()]=p),u.apply(f,l)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const o=n[Wt];if(!o)return t.apply(n,r);r[0]!==void 0&&(o.body=r[0]);const s={startTimestamp:me()*1e3,xhr:n};return st("xhr",s),t.apply(n,r)}})}function aA(e){if(mt(e))return e;try{return e.toString()}catch{}}const cA=Symbol.for("sentry__originalRequestBody");function vg(e){return new URLSearchParams(e).toString()}function hi(e,t=_){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[vg(e)];if(!e)return[void 0]}catch(n){return bt&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return bt&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function $u(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][cA];return n!==void 0?n:void 0}}function Tg(e){let t;try{t=e.getAllResponseHeaders()}catch(n){return bt&&_.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 uA(e){if(typeof Element>"u")return!1;try{return e instanceof Element}catch{return!1}}function lA(e){try{return new URL(e,z.location.origin).toString()}catch{return e}}const fA=40;function Ig(e,t=Du("fetch")){let n=0,r=0;async function o(s){const i=s.body.length;n+=i,r++;const 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 sA("fetch"),c}finally{n-=i,r--}}return NE(e,o,fu(e.bufferSize||fA))}const k=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function dA(){const e=C();if(!e){k&&_.warn("No Sentry client available, profiling is not started");return}if(!e.getIntegrationByName("BrowserProfiling")){k&&_.warn("BrowserProfiling integration is not available");return}e.emit("startUIProfiler")}function pA(){const e=C();if(!e){k&&_.warn("No Sentry client available, profiling is not started");return}if(!e.getIntegrationByName("BrowserProfiling")){k&&_.warn("ProfilingIntegration is not available");return}e.emit("stopUIProfiler")}
492const jL={startProfiler:dA,stopProfiler:pA},hA=10,mA=20,gA=30,_A=40,yA=50;function $r(e,t,n,r){const o={filename:e,function:t==="<anonymous>"?Rt:t,in_app:!0};return n!==void 0&&(o.lineno=n),r!==void 0&&(o.colno=r),o}const SA=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,bA=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,EA=/\((\S*)(?::(\d+))(?::(\d+))\)/,vA=/at (.+?) ?\(data:(.+?),/,TA=e=>{var o;const t=e.match(vA);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=SA.exec(e);if(n){const[,s,i,a]=n;return $r(s,Rt,+i,+a)}const r=bA.exec(e);if(r){if(((o=r[2])==null?void 0:o.indexOf("eval"))===0){const c=EA.exec(r[2]);c&&(r[2]=c[1],r[3]=c[2],r[4]=c[3])}const[i,a]=wg(r[1]||Rt,r[2]);return $r(a,i,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},IA=[gA,TA],wA=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,RA=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,kA=e=>{const t=wA.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const s=RA.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]||Rt;return[o,r]=wg(o,r),$r(r,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},AA=[yA,kA],CA=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,NA=e=>{const t=CA.exec(e);return t?$r(t[2],t[1]||Rt,+t[3],t[4]?+t[4]:void 0):void 0},zL=[_A,NA],MA=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,xA=e=>{const t=MA.exec(e);return t?$r(t[2],t[3]||Rt,+t[1]):void 0},qL=[hA,xA],OA=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,PA=e=>{const t=OA.exec(e);return t?$r(t[5],t[3]||t[4]||Rt,+t[1],+t[2]):void 0},GL=[mA,PA],LA=[IA,AA],DA=Ap(...LA),wg=(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]:Rt,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function VL(e,{metadata:t,tunnel:n,dsn:r}){const o={event_id:e.event_id,sent_at:new Date().toISOString(),...(t==null?void 0:t.sdk)&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Pt(r)}},s=FA(e);return ut(o,[s])}function FA(e){return[{type:"user_report"},e]}const Es=1024,$A="Breadcrumbs",BA=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:$A,setup(n){t.console&&du(jA(n)),t.dom&&Eg(WA(n,t.dom)),t.xhr&&Fu(zA(n)),t.fetch&&Vi(qA(n)),t.history&&ra(GA(n)),t.sentry&&n.on("beforeSendEvent",HA(n))}}}),UA=BA;function HA(e){return function(n){C()===e&&Nt({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:On(n)},{event:n})}}function WA(e,t){return function(r){if(C()!==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>Es&&(k&&_.warn(`\`dom.maxStringLength\` cannot exceed ${Es}, but a value of ${a} was configured. Sentry will use ${Es} instead.`),a=Es),typeof i=="string"&&(i=[i]);try{const u=r.event,f=VA(u)?u.target:u;o=xe(f,{keyAttrs:i,maxStringLength:a}),s=Tu(f)}catch{o="<unknown>"}if(o.length===0)return;const c={category:`ui.${r.name}`,message:o};s&&(c.data={"ui.component_name":s}),Nt(c,{event:r.event,name:r.name,global:r.global})}}function jA(e){return function(n){if(C()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:si(n.level),message:Js(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Js(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Nt(r,{input:n.args,level:n.level})}}function zA(e){return function(n){if(C()!==e)return;const{startTimestamp:r,endTimestamp:o}=n,s=n.xhr[Wt];if(!r||!o||!s)return;const{method:i,url:a,status_code:c,body:u}=s,f={method:i,url:a,status_code:c},l={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:o},d={category:"xhr",data:f,type:"http",level:Bm(c)};e.emit("beforeOutgoingRequestBreadcrumb",d,l),Nt(d,l)}}function qA(e){return function(n){if(C()!==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),Nt(i,s)}else{const s=n.response,i={...n.fetchData,status_code:s==null?void 0:s.status},a={input:n.args,response:s,startTimestamp:r,endTimestamp:o},c={category:"fetch",data:i,type:"http",level:Bm(i.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",c,a),Nt(c,a)}}}function GA(e){return function(n){if(C()!==e)return;let r=n.from,o=n.to;const s=Wn(R.location.href);let i=r?Wn(r):void 0;const a=Wn(o);i!=null&&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),Nt({category:"navigation",data:{from:r,to:o}})}}function VA(e){return!!e&&!!e.target}const YA="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(","),JA="BrowserApiErrors",KA=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:JA,setupOnce(){t.setTimeout&&Oe(R,"setTimeout",id),t.setInterval&&Oe(R,"setInterval",id),t.requestAnimationFrame&&Oe(R,"requestAnimationFrame",QA),t.XMLHttpRequest&&"XMLHttpRequest"in R&&Oe(XMLHttpRequest.prototype,"send",ZA);const n=t.eventTarget;n&&(Array.isArray(n)?n:YA).forEach(o=>eC(o,t))}}}),XA=KA;function id(e){return function(...t){const n=t[0];return t[0]=Fr(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${qt(e)}`}}),e.apply(this,t)}}function QA(e){return function(t){return e.apply(this,[Fr(t,{mechanism:{data:{handler:qt(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function ZA(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:qt(s)},handled:!1,type:`auto.browser.browserapierrors.xhr.${o}`}},a=Jc(s);return a&&(i.mechanism.data.handler=qt(a)),Fr(s,i)})}),e.apply(this,t)}}function eC(e,t){var o,s;const r=(o=R[e])==null?void 0:o.prototype;(s=r==null?void 0:r.hasOwnProperty)!=null&&s.call(r,"addEventListener")&&(Oe(r,"addEventListener",function(i){return function(a,c,u){try{tC(c)&&(c.handleEvent=Fr(c.handleEvent,{mechanism:{data:{handler:qt(c),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&nC(this,a,c),i.apply(this,[a,Fr(c,{mechanism:{data:{handler:qt(c),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),u])}}),Oe(r,"removeEventListener",function(i){return function(a,c,u){try{if(Object.prototype.hasOwnProperty.call(c,"__sentry_wrapped__")){const f=c.__sentry_wrapped__;f&&i.call(this,a,f,u)}}catch{}return i.call(this,a,c,u)}}))}function tC(e){return typeof e.handleEvent=="function"}function nC(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const rC=(e={})=>{const t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(typeof R.document>"u"){k&&_.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Vl({ignoreDuration:!0});let n=!1;xu(()=>{n||(Ia(),n=!0)});const r=be();let o=r.getUser();r.addScopeListener(s=>{const i=s.getUser();((o==null?void 0:o.id)!==(i==null?void 0:i.id)||(o==null?void 0:o.ip_address)!==(i==null?void 0:i.ip_address))&&(o=i,n&&Ia())}),t==="route"&&ra(({from:s,to:i})=>{s!==i&&(Vl({ignoreDuration:!0}),Ia(),n=!0)})}}},oC="CultureContext",sC=(()=>({name:oC,preprocessEvent(e){var n;const t=ad();t&&(e.contexts={...e.contexts,culture:{...t,...(n=e.contexts)==null?void 0:n.culture}})},processSegmentSpan(e){const t=ad();t&&hn(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}})),iC=sC;function ad(){try{const e=R.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}const aC="GlobalHandlers",cC=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:aC,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(lC(n),cd("onerror")),t.onunhandledrejection&&(fC(n),cd("onunhandledrejection"))}}}),uC=cC;function lC(e){Cp(t=>{const{stackParser:n,attachStacktrace:r}=Ag();if(C()!==e||ag())return;const{msg:o,url:s,line:i,column:a,error:c}=t,u=dC(Ki(n,c||o,void 0,r,!1),s,i,a);u.level="error",Ho(u,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function fC(e){Np(t=>{const{stackParser:n,attachStacktrace:r}=Ag();if(C()!==e||ag())return;const o=Rg(t),s=kt(o)?kg(o):Ki(n,o,void 0,r,!0);s.level="error",Ho(s,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function Rg(e){if(kt(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 kg(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function dC(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||[];
492return c.length===0&&c.push({colno:r,lineno:n,filename:pC(t)??_n(),function:Rt,in_app:!0}),e}function cd(e){k&&_.log(`Global Handler attached: ${e}`)}function Ag(){const e=C();return(e==null?void 0:e.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}function pC(e){if(!(!mt(e)||e.length===0))return e.startsWith("data:")?`<${gt(e,!1)}>`:e}const hC=()=>({name:"HttpContext",preprocessEvent(e){var r;if(!R.navigator&&!R.location&&!R.document)return;const t=fi(),n={...t.headers,...(r=e.request)==null?void 0:r.headers};e.request={...t,...e.request,headers:n}},processSpan(e){var n;if(!R.navigator&&!R.location&&!R.document)return;const t=fi();hn(e,{[Ob]:t.headers["User-Agent"],...e.is_segment&&{[Rn]:((n=e.attributes)==null?void 0:n[kb])!=="http.client"?t.url:void 0,[`${wb}.referer`]:t.headers.Referer}})}}),mC="cause",gC=5,_C="LinkedErrors",yC=((e={})=>{const t=e.limit||gC,n=e.key||mC;return{name:_C,preprocessEvent(r,o,s){const i=s.getOptions();Ev(Cu,i.stackParser,n,t,r,o)}}}),SC=yC,bC=/^HTML(\w*)Element$/;function Cg(e){if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(uA(e)){const t=EC(e);if(bC.test(t))return`[HTMLElement: ${xe(e)}]`}}function EC(e){const t=Object.getPrototypeOf(e);return t!=null&&t.constructor?t.constructor.name:"null prototype"}function vC(){return TC()?(k&&Jt(()=>{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 TC(){var o;if(typeof R.window>"u")return!1;const e=R;if(e.nw)return!1;const t=e.chrome||e.browser;if(!((o=t==null?void 0:t.runtime)!=null&&o.id))return!1;const n=_n();return!(R===R.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(n))}function IC(e){return[pv(),uv(),TT(),XA(),UA(),uC(),SC(),Mv(),hC(),iC(),rC()]}function wC(e={}){const t=!e.skipBrowserExtensionCheck&&vC();let n=e.defaultIntegrations==null?IC():e.defaultIntegrations;const r={...e,enabled:t?!1:e.enabled,stackParser:Ey(e.stackParser||DA),integrations:iE({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||Ig};return Fp(Cg),zE(MR,r)}function YL(){}function JL(e){e()}function ud(e={}){const t=R.document,n=(t==null?void 0:t.head)||(t==null?void 0:t.body);if(!n){k&&_.error("[showReportDialog] Global document not defined");return}const r=H(),o=C(),s=o==null?void 0:o.getDsn();if(!s){k&&_.error("[showReportDialog] DSN not configured");return}const i={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||Qb()},a=R.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=oE(s,i);const{onLoad:c,onClose:u}=i;if(c&&(a.onload=c),u){const f=l=>{if(l.data==="__sentry_reportdialog_closed__")try{u()}finally{R.removeEventListener("message",f)}};R.addEventListener("message",f)}n.appendChild(a)}const RC=U,kC="ReportingObserver",ld=new WeakMap,AC=((e={})=>{const t=e.types||["crash","deprecation","intervention"];function n(r){if(ld.has(C()))for(const o of r)Ze(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}Xb(`${i}: ${a}`)})}return{name:kC,setupOnce(){if(!Y0())return;new RC.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){ld.set(r,!0)}}}),KL=AC,CC="HttpClient",NC=((e={})=>{const t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:CC,setup(n){FC(n,t),$C(n,t)}}}),XL=NC;function MC(e,t,n,r,o){if(Ng(e,n.status,n.url)){const s=BC(t,r);let i,a,c,u;const f=xg();if(f.requestHeaders!==!1&&(i=vo(fd(s.headers),f.requestHeaders)),f.responseHeaders!==!1&&(a=vo(fd(n.headers),f.responseHeaders)),f.cookies!==!1){const d=s.headers.get("Cookie")||void 0;if(d){const h=dc(d,f.cookies);typeof h=="object"&&(c=h)}const p=n.headers.get("Set-Cookie")||void 0;if(p){const h=dc(p,f.cookies);typeof h=="object"&&(u=h)}}const l=Mg({url:s.url,method:s.method,status:n.status,requestHeaders:i,responseHeaders:a,requestCookies:c,responseCookies:u,error:o,type:"fetch"});Ho(l)}}function xC(e,t,n,r,o){if(Ng(e,t.status,t.responseURL)){let s,i,a;const c=xg();if(c.cookies!==!1)try{const f=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;if(f){const l=dc(f,c.cookies);typeof l=="object"&&(i=l)}}catch{}if(c.responseHeaders!==!1)try{a=vo(PC(t),c.responseHeaders)}catch{}c.requestHeaders!==!1&&(s=vo(r,c.requestHeaders));const u=Mg({url:t.responseURL,method:n,status:t.status,requestHeaders:s,responseHeaders:a,responseCookies:i,error:o,type:"xhr"});Ho(u)}}function OC(e){if(e){const t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function fd(e){const t={};return e.forEach((n,r)=>{t[r]=n}),t}function PC(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 LC(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}function DC(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}function FC(e,t){Um()&&Vi(n=>{if(C()!==e)return;const{response:r,args:o,error:s,virtualError:i}=n,[a,c]=o;r&&MC(t,a,r,c,s||i)},!1)}function $C(e,t){"XMLHttpRequest"in U&&Fu(n=>{if(C()!==e)return;const{error:r,virtualError:o}=n,s=n.xhr,i=s[Wt];if(!i)return;const{method:a,request_headers:c}=i;try{xC(t,s,a,c,r||o)}catch(u){k&&_.warn("Error while extracting response event form XHR response",u)}})}function Ng(e,t,n){return DC(e.failedRequestStatusCodes,t)&&LC(e.failedRequestTargets,n)&&!rm(n,C())}function Mg(e){const t=C(),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:OC(e.responseHeaders)}}};return It(s,{type:`auto.http.client.${e.type}`,handled:!1}),s}function BC(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request
493(e,t)}function xg(){const e=C();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 za=U,UC=7,HC="ContextLines",WC=((e={})=>({name:HC,processEvent(t,n,r){const o=e.frameContextLines??(r==null?void 0:r.getDataCollectionOptions().frameContextLines)??UC;return jC(t,o)}})),QL=WC;function jC(e,t){var a;const n=za.document,r=za.location&&nm(za.location.href);if(!n||!r)return e;const o=(a=e.exception)==null?void 0:a.values;if(!(o!=null&&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(c=>{const u=c.stacktrace;u!=null&&u.frames&&(u.frames=u.frames.map(f=>zC(f,i,r,t)))}),e}function zC(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||By(t,e,r),e}const qC="GraphQLClient",GC=(e=>({name:qC,setup(t){VC(t,e),YC(t,e)}}));function VC(e,t){e.on("beforeOutgoingRequestSpan",(n,r)=>{const s=B(n).data||{};if(!(s[ce]==="http.client"))return;const c=s[Rn]||s["http.url"]||s.url,u=s[fS]||s["http.method"];if(!mt(c)||!mt(u))return;const{endpoints:f}=t,l=at(c,f),d=Pg(r);if(l&&d){const p=Lg(d);if(p){const h=Og(p);n.updateName(`${u} ${c} (${h})`),oa(p)&&e.getDataCollectionOptions().graphQL.document===!0&&n.setAttribute(Rh,p.query),sa(p)&&(n.setAttribute("graphql.persisted_query.hash.sha256",p.extensions.persistedQuery.sha256Hash),n.setAttribute("graphql.persisted_query.version",p.extensions.persistedQuery.version))}}})}function YC(e,t){e.on("beforeOutgoingRequestBreadcrumb",(n,r)=>{const{category:o,type:s,data:i}=n;if(s==="http"&&(o==="fetch"||o==="xhr")){const f=i==null?void 0:i.url,{endpoints:l}=t,d=at(f,l),p=Pg(r);if(d&&i&&p){const h=Lg(p);if(!i.graphql&&h){const m=Og(h);i["graphql.operation"]=m,oa(h)&&e.getDataCollectionOptions().graphQL.document===!0&&(i[Rh]=h.query),sa(h)&&(i["graphql.persisted_query.hash.sha256"]=h.extensions.persistedQuery.sha256Hash,i["graphql.persisted_query.version"]=h.extensions.persistedQuery.version)}}}})}function Og(e){if(sa(e))return`persisted ${e.operationName}`;if(oa(e)){const{query:t,operationName:n}=e,{operationName:r=n,operationType:o}=JC(t);return r?`${o} ${r}`:`${o}`}return"unknown"}function Pg(e){const t="xhr"in e;let n;if(t){const r=e.xhr[Wt];n=r&&hi(r.body)[0]}else{const r=$u(e.input);n=hi(r)[0]}return n}function JC(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 oa(e){return it(e)&&typeof e.query=="string"}function sa(e){return it(e)&&typeof e.operationName=="string"&&it(e.extensions)&&it(e.extensions.persistedQuery)&&typeof e.extensions.persistedQuery.sha256Hash=="string"&&typeof e.extensions.persistedQuery.version=="number"}function Lg(e){try{const t=JSON.parse(e);return oa(t)||sa(t)?t:void 0}catch{return}}const ZL=GC,eD=(e={})=>{const t=["script"];function n(r,o,s=0){var a;if(!r)return;const i="shadowRoot"in r&&r.shadowRoot?r.shadowRoot.children:r.children;for(const c of i){if(!(c instanceof HTMLElement))continue;const u=Tu(c,1)||void 0,f=c.tagName.toLowerCase();if(t.includes(f))continue;const l=((a=e.onElement)==null?void 0:a.call(e,{element:c,componentName:u,tagName:f,depth:s}))||{};if(l==="skip")continue;if(l==="children"){n(c,o,s+1);continue}const{x:d,y:p,width:h,height:m}=c.getBoundingClientRect(),g={identifier:c.id||void 0,type:u||f,visible:!0,alpha:1,height:m,width:h,x:d,y:p,...l},y=[];g.children=y,n(c,g.children,s+1),o.push(g)}}return{name:"ViewHierarchy",processEvent:(r,o)=>{var a,c;if(r.type!==void 0||((a=e.shouldAttach)==null?void 0:a.call(e,r,o))===!1)return r;const s={rendering_system:"DOM",positioning:"absolute",windows:[]};n(((c=e.rootElement)==null?void 0:c.call(e))||R.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}}},_e=U,Bu="sentryReplaySession",KC="replay_event",Uu="Unable to send Replay",XC=3e5,QC=9e5,ZC=5e3,e1=5500,t1=6e4,n1=5e3,r1=3,dd=15e4,vs=5e3,o1=3e3,
494s1=300,Hu=2e7,i1=4999,a1=5e4,pd=36e5;var c1=Object.defineProperty,u1=(e,t,n)=>t in e?c1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hd=(e,t,n)=>u1(e,typeof t!="symbol"?t+"":t,n),Re=(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))(Re||{});function l1(e){return e.nodeType===e.ELEMENT_NODE}function mo(e){const t=e==null?void 0:e.host;return(t==null?void 0:t.shadowRoot)===e}function go(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function f1(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 d1(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?f1(Array.from(t,Dg).join("")):null}catch{return null}}function p1(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 Dg(e){let t;if(m1(e))try{t=mi(e.styleSheet)||d1(e)}catch{}else if(g1(e)){let n=e.cssText;const r=e.selectorText.includes(":"),o=typeof e.style.all=="string"&&e.style.all;if(o&&(n=p1(e)),r&&(n=h1(n)),r||o)return n}return t||e.cssText}function h1(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function m1(e){return"styleSheet"in e}function g1(e){return"selectorText"in e}let Fg=class{constructor(){hd(this,"idNodeMap",new Map),hd(this,"nodeMetaMap",new WeakMap)}getId(t){var r;return t?((r=this.getMeta(t))==null?void 0:r.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))}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 _1(){return new Fg}function ia({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 Ro({isMasked:e,element:t,value:n,maskInputFn:r}){let o=n||"";return e?(r&&(o=r(o,t)),"*".repeat(o.length)):o}function Br(e){return e.toLowerCase()}function Nc(e){return e.toUpperCase()}const md="__rrweb_original__";function y1(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=md in s?s[md]: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 Wu(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Br(t):null}function gi(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function $g(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i,o=n.pathname.match(r);return(o==null?void 0:o[1])??null}const gd={};function Bg(e){const t=gd[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);const s=o.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(o)}catch{}return gd[e]=r.bind(window)}function Mc(...e){return Bg("setTimeout")(...e)}function Ug(...e){return Bg("clearTimeout")(...e)}function Hg(e){try{return e.contentDocument}catch{}}function S1(e){try{return e.contentWindow}catch{}}let b1=1;const E1=new RegExp("[^a-z0-9-_:]"),ko=-2;function ju(){return b1++}function v1(e){if(e instanceof HTMLFormElement)return"form";const t=Br(e.tagName);return E1.test(t)?"div":t}function T1(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let fr,_d;const I1=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,w1=/^(?:[a-z+]+:)?\/\//i,R1=/^www\..*/i,k1=/^(data:)([^,]*),(.*)/i;function A1(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(I1,(n,r,o,s,i,a)=>{const c=o||i||a,u=r||s||"";if(!c)return n;if(w1.test(c)||R1.test(c))return`url(${u}${c}${u})`;if(k1.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${T1(t)+c}${u})`;const f=t.split("/"),l=c.split("/");f.pop();for(const d of l)d!=="."&&(d===".."?f.pop():f.push(d));return`url(${u}${f.join("/")}${u})`})}const C1=/^[^ \t\n\r\u000c]+/,N1=/^[, \t\n\r\u000c]+/;function M1(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(N1),!(n>=t.length);){let s=r(C1);if(s.slice(-1)===",")s=gr(e,s.substring(0,s.length-1)),o.push(s);else{let i="";s=gr(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 yd=new WeakMap;function gr(e,t){return!t||t.trim()===""?t:aa(e,t)}function x1(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function aa(e,t){let n=yd.get(e);if(n||(n=e.createElement("a"),yd.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function Wg(e,t,n,r,o,s,i){if(!r)return r;if(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#"))return gr(e,r);if(n==="xlink:href"&&r[0]!=="#")return gr(e,r);if(n==="background"&&(t==="table"||t==="td"||t==="th"))return gr(e,r);if(n==="srcset")return M1(e,r);if(n==="style"){let a=_i(r,aa(e));return i&&i.size>0&&(a=A1(a,i)),a}else if(t==="object"&&n==="data")return gr(e,r);return typeof s=="function"?s(n,r,o):r}function jg(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function O1(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 P1(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Fn(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Fn(e.parentNode,t,n,r+1)}function _r(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(P1(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function Ur(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;if(s){if(c=Fn(i,_r(r,o)),c<0)return!0;a=Fn(i,_r(t,n),c>=0?c:1/0)}else{if(a=Fn(i,_r(t,n)),a<0)return!1;c=Fn(i,_r(r,o),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!s}catch{}return!!s}function L1(e,t,n){const r=S1(e);if(!r)return;let o=!1,s;try{s=r.document.readyState}catch{return}if(s!=="complete"){const a=Mc(()=>{o||(t(),o=!0)},n);e.addEventListener("load",()=>{Ug(a),o=!0,t()});return}const i="about:blank";if(r.location.href!==i||e.src===i||e.src==="")return Mc(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function D1(e,t,n){let r=!1,o;try{o=e.sheet}catch{o=null}if(o)return;const s=Mc(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{Ug(s),r=!0,t()})}function F1(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:f,maskTextSelector:l,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:h={},maskTextFn:m,maskInputFn:g,dataURLOptions:y={}
494,inlineImages:S,recordCanvas:I,keepIframeSrcFn:v,newlyAddedElement:w=!1,ignoreCSSAttributes:T}=t,b=$1(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Re.Document,childNodes:[],compatMode:e.compatMode}:{type:Re.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Re.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:b};case e.ELEMENT_NODE:return U1(e,{doc:n,blockClass:o,blockSelector:s,unblockSelector:i,inlineStylesheet:p,maskAttributeFn:c,maskInputOptions:h,maskInputFn:g,dataURLOptions:y,inlineImages:S,recordCanvas:I,keepIframeSrcFn:v,newlyAddedElement:w,rootId:b,maskTextClass:u,unmaskTextClass:f,maskTextSelector:l,unmaskTextSelector:d,ignoreCSSAttributes:T});case e.TEXT_NODE:return B1(e,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:f,maskTextSelector:l,unmaskTextSelector:d,maskTextFn:m,maskInputOptions:h,maskInputFn:g,rootId:b});case e.CDATA_SECTION_NODE:return{type:Re.CDATA,textContent:"",rootId:b};case e.COMMENT_NODE:return{type:Re.Comment,textContent:e.textContent||"",rootId:b};default:return!1}}function $1(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function B1(e,t){var y;const{maskAllText:n,maskTextClass:r,unmaskTextClass:o,maskTextSelector:s,unmaskTextSelector:i,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:f}=t,l=e.parentNode&&e.parentNode.tagName;let d=e.textContent;const p=l==="STYLE"?!0:void 0,h=l==="SCRIPT"?!0:void 0,m=l==="TEXTAREA"?!0:void 0;if(p&&d){try{e.nextSibling||e.previousSibling||(y=e.parentNode.sheet)!=null&&y.cssRules&&(d=mi(e.parentNode.sheet))}catch(S){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${S}`,e)}d=_i(d,aa(t.doc))}h&&(d="SCRIPT_PLACEHOLDER");const g=Ur(e,r,s,o,i,n);if(!p&&!h&&!m&&d&&g&&(d=a?a(d,e.parentElement):d.replace(/[\S]/g,"*")),m&&d&&(c.textarea||g)&&(d=u?u(d,e.parentNode):d.replace(/[\S]/g,"*")),l==="OPTION"&&d){const S=ia({type:null,tagName:l,maskInputOptions:c});d=Ro({isMasked:Ur(e,r,s,o,i,S),element:e,value:d,maskInputFn:u})}return{type:Re.Text,textContent:d||"",isStyle:p,rootId:f}}function U1(e,t){const{doc:n,blockClass:r,blockSelector:o,unblockSelector:s,inlineStylesheet:i,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:f={},inlineImages:l,recordCanvas:d,keepIframeSrcFn:p,newlyAddedElement:h=!1,rootId:m,maskTextClass:g,unmaskTextClass:y,maskTextSelector:S,unmaskTextSelector:I,ignoreCSSAttributes:v}=t,w=O1(e,r,o,s),T=v1(e);let b={};const D=e.attributes.length;for(let E=0;E<D;E++){const L=e.attributes[E];L.name&&!jg(T,L.name,L.value)&&(b[L.name]=Wg(n,T,Br(L.name),L.value,e,c,v))}if(T==="link"&&i){const E=Array.from(n.styleSheets).find(M=>M.href===e.href);let L=null;E&&(L=mi(E)),L&&(b.rel=null,b.href=null,b.crossorigin=null,b._cssText=_i(L,E.href))}if(T==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const E=mi(e.sheet);E&&(b._cssText=_i(E,aa(n)))}if(T==="input"||T==="textarea"||T==="select"||T==="option"){const E=e,L=Wu(E),M=gi(E,Nc(T),L),F=E.checked;if(L!=="submit"&&L!=="button"&&M){const q=Ur(E,g,S,y,I,ia({type:L,tagName:Nc(T),maskInputOptions:a}));b.value=Ro({isMasked:q,element:E,value:M,maskInputFn:u})}F&&(b.checked=F)}if(T==="option"&&(e.selected&&!a.select?b.selected=!0:delete b.selected),T==="canvas"&&d){if(e.__context==="2d")y1(e)||(b.rr_dataURL=e.toDataURL(f.type,f.quality));else if(!("__context"in e)){const E=e.toDataURL(f.type,f.quality),L=n.createElement("canvas");L.width=e.width,L.height=e.height;const M=L.toDataURL(f.type,f.quality);E!==M&&(b.rr_dataURL=E)}}if(T==="img"&&l){fr||(fr=n.createElement("canvas"),_d=fr.getContext("2d"));const E=e,L=E.currentSrc||E.getAttribute("src")||"<unknown-src>",M=E.crossOrigin,F=()=>{E.removeEventListener("load",F);try{fr.width=E.naturalWidth,fr.height=E.naturalHeight,_d.drawImage(E,0,0),b.rr_dataURL=fr.toDataURL(f.type,f.quality)}catch(q){if(E.crossOrigin!=="anonymous"){E.crossOrigin="anonymous",E.complete&&E.naturalWidth!==0?F():E.addEventListener("load",F);return}else console.warn(`Cannot inline img src=${L}! Error: ${q}`)}E.crossOrigin==="anonymous"&&(M?b.crossOrigin=M:E.removeAttribute("crossorigin"))};
494E.complete&&E.naturalWidth!==0?F():E.addEventListener("load",F)}if((T==="audio"||T==="video")&&(b.rr_mediaState=e.paused?"paused":"played",b.rr_mediaCurrentTime=e.currentTime),h||(e.scrollLeft&&(b.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(b.rr_scrollTop=e.scrollTop)),w){const{width:E,height:L}=e.getBoundingClientRect();b={class:b.class,rr_width:`${E}px`,rr_height:`${L}px`}}T==="iframe"&&!p(b.src)&&(!w&&!Hg(e)&&(b.rr_src=b.src),delete b.src);let N;try{customElements.get(T)&&(N=!0)}catch{}return{type:Re.Element,tagName:T,attributes:b,childNodes:[],isSVG:x1(e)||void 0,needBlock:w,rootId:m,isCustom:N}}function ge(e){return e==null?"":e.toLowerCase()}function H1(e,t){if(t.comment&&e.type===Re.Comment)return!0;if(e.type===Re.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"&&$g(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(ge(e.attributes.name).match(/^msapplication-tile(image|color)$/)||ge(e.attributes.name)==="application-name"||ge(e.attributes.rel)==="icon"||ge(e.attributes.rel)==="apple-touch-icon"||ge(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&ge(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ge(e.attributes.property).match(/^(og|twitter|fb):/)||ge(e.attributes.name).match(/^(og|twitter):/)||ge(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(ge(e.attributes.name)==="robots"||ge(e.attributes.name)==="googlebot"||ge(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(ge(e.attributes.name)==="author"||ge(e.attributes.name)==="generator"||ge(e.attributes.name)==="framework"||ge(e.attributes.name)==="publisher"||ge(e.attributes.name)==="progid"||ge(e.attributes.property).match(/^article:/)||ge(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(ge(e.attributes.name)==="google-site-verification"||ge(e.attributes.name)==="yandex-verification"||ge(e.attributes.name)==="csrf-token"||ge(e.attributes.name)==="p:domain_verify"||ge(e.attributes.name)==="verify-v1"||ge(e.attributes.name)==="verification"||ge(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function yr(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:l,skipChild:d=!1,inlineStylesheet:p=!0,maskInputOptions:h={},maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:S,dataURLOptions:I={},inlineImages:v=!1,recordCanvas:w=!1,onSerialize:T,onIframeLoad:b,iframeLoadTimeout:D=5e3,onBlockedImageLoad:N,onStylesheetLoad:E,stylesheetLoadTimeout:L=5e3,keepIframeSrcFn:M=()=>!1,newlyAddedElement:F=!1,ignoreCSSAttributes:q}=t;let{preserveWhiteSpace:K=!0}=t;const G=F1(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:l,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,dataURLOptions:I,inlineImages:v,recordCanvas:w,keepIframeSrcFn:M,newlyAddedElement:F,ignoreCSSAttributes:q});if(!G)return console.warn(e,"not serialized"),null;let $;r.hasNode(e)?$=r.getId(e):H1(G,S)||!K&&G.type===Re.Text&&!G.isStyle&&!G.textContent.trim().length?$=ko:$=ju();const x=Object.assign(G,{id:$});if(r.add(e,x),$===ko)return null;T&&T(e);let Z=!d;if(x.type===Re.Element){Z=Z&&!x.needBlock;const O=e.shadowRoot;O&&go(O)&&(x.isShadowHost=!0)}if((x.type===Re.Document||x.type===Re.Element)&&Z){S.headWhitespace&&x.type===Re.Element&&x.tagName==="head"&&(K=!1);const O={doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:l,skipChild:d,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:S,dataURLOptions:I,inlineImages:v,recordCanvas:w,preserveWhiteSpace:K,onSerialize:T,onIframeLoad:b,iframeLoadTimeout:D,onBlockedImageLoad:N,onStylesheetLoad:E,stylesheetLoadTimeout:L,keepIframeSrcFn:M,ignoreCSSAttributes:q},V=e.childNodes?Array.from(e.childNodes):[];for(const ne of V){const te=yr(ne,O);te&&x.childNodes.push(te)}if(l1(e)&&e.shadowRoot)for(const ne of Array.from(e.shadowRoot.childNodes)){const te=yr(ne,O);te&&(go(e.shadowRoot)&&(te.isShadow=!0),x.childNodes.push(te))}}if(e.parentNode&&mo(e.parentNode)&&go(e.parentNode)&&(x.isShadow=!0),x.type===Re.Element&&x.tagName==="iframe"&&!x.needBlock&&L1(e,()=>{const O=Hg(e);
494if(O&&b){const V=yr(O,{doc:O,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:S,dataURLOptions:I,inlineImages:v,recordCanvas:w,preserveWhiteSpace:K,onSerialize:T,onIframeLoad:b,iframeLoadTimeout:D,onStylesheetLoad:E,stylesheetLoadTimeout:L,keepIframeSrcFn:M,ignoreCSSAttributes:q});V&&b(e,V)}},D),x.type===Re.Element&&x.tagName==="img"&&!e.complete&&x.needBlock){const O=e,V=()=>{if(O.isConnected&&!O.complete&&N)try{const ne=O.getBoundingClientRect();ne.width>0&&ne.height>0&&N(O,x,ne)}catch{}O.removeEventListener("load",V)};O.isConnected&&O.addEventListener("load",V)}return x.type===Re.Element&&x.tagName==="link"&&typeof x.attributes.rel=="string"&&(x.attributes.rel==="stylesheet"||x.attributes.rel==="preload"&&typeof x.attributes.href=="string"&&$g(x.attributes.href)==="css")&&D1(e,()=>{if(E){const O=yr(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:S,dataURLOptions:I,inlineImages:v,recordCanvas:w,preserveWhiteSpace:K,onSerialize:T,onIframeLoad:b,iframeLoadTimeout:D,onStylesheetLoad:E,stylesheetLoadTimeout:L,keepIframeSrcFn:M,ignoreCSSAttributes:q});O&&E(e,O)}},L),x.type===Re.Element&&delete x.needBlock,x}function W1(e,t){const{mirror:n=new Fg,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:s=null,maskAllText:i=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:f=null,inlineStylesheet:l=!0,inlineImages:d=!1,recordCanvas:p=!1,maskAllInputs:h=!1,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOM:S=!1,dataURLOptions:I,preserveWhiteSpace:v,onSerialize:w,onIframeLoad:T,iframeLoadTimeout:b,onBlockedImageLoad:D,onStylesheetLoad:N,stylesheetLoadTimeout:E,keepIframeSrcFn:L=()=>!1,ignoreCSSAttributes:M=new Set([])}=t||{};return yr(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,maskAllText:i,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:f,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:g,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:d,recordCanvas:p,preserveWhiteSpace:v,onSerialize:w,onIframeLoad:T,iframeLoadTimeout:b,onBlockedImageLoad:D,onStylesheetLoad:N,stylesheetLoadTimeout:E,keepIframeSrcFn:L,newlyAddedElement:!1,ignoreCSSAttributes:M})}function Ue(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const dr=`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 Sd={map:{},getId(){return console.error(dr),-1},getNode(){return console.error(dr),null},removeNodeFromMap(){console.error(dr)},has(){return console.error(dr),!1},reset(){console.error(dr)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Sd=new Proxy(Sd,{get(e,t,n){return t==="map"&&console.error(dr),Reflect.get(e,t,n)}}));function Ao(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&&(J1(r),r=null),o=i,e.apply(c,s)):!r&&n.trailing!==!1&&(r=ca(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(c,s)},a))}}function zg(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(i){ca(()=>{n.set.call(this,i)},0),s&&s.set&&s.set.call(this,i)}}),()=>zg(e,t,s||{},!0)}function zu(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){var n,r,o,s,i,a;const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:(t==null?void 0:t.documentElement.scrollLeft)||((r=(n=t==null?void 0:t.body)==null?void 0:n.parentElement)==null?void 0:r.scrollLeft)||((o=t==null?void 0:t.body)==null?void 0:o.scrollLeft)||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(t==null?void 0:t.documentElement.scrollTop)||((i=(s=t==null?void 0:t.body)==null?void 0:s.parentElement)==null?void 0:i.scrollTop)||((a=t==null?void 0:t.body)==null?void 0:a.scrollTop)||0}}function Gg(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Vg(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Yg(e){if(!e)return null;
496try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Ve(e,t,n,r,o){if(!e)return!1;const s=Yg(e);if(!s)return!1;const i=_r(t,n);if(!o){const u=r&&s.matches(r);return i(s)&&!u}const a=Fn(s,i);let c=-1;return a<0?!1:(r&&(c=Fn(s,_r(null,r))),a>-1&&c<0?!0:a<c)}function j1(e,t){return t.getId(e)!==-1}function qa(e,t){return t.getId(e)===ko}function Jg(e,t){if(mo(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?Jg(e.parentNode,t):!0:!0}function xc(e){return!!e.changedTouches}function z1(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 Kg(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Xg(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Oc(e){return!!(e!=null&&e.shadowRoot)}class q1{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 Qg(e){var n,r;let t=null;return((r=(n=e.getRootNode)==null?void 0:n.call(e))==null?void 0:r.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function G1(e){let t=e,n;for(;n=Qg(t);)t=n;return t}function V1(e){const t=e.ownerDocument;if(!t)return!1;const n=G1(e);return t.contains(n)}function Zg(e){const t=e.ownerDocument;return t?t.contains(e)||V1(e):!1}const bd={};function qu(e){const t=bd[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);const s=o.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(o)}catch{}return bd[e]=r.bind(window)}function Y1(...e){return qu("requestAnimationFrame")(...e)}function ca(...e){return qu("setTimeout")(...e)}function J1(...e){return qu("clearTimeout")(...e)}var Q=(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))(Q||{}),Y=(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))(Y||{}),$e=(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))($e||{}),Ht=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Ht||{}),pr=(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))(pr||{});let _o;function K1(e){_o=e}function X1(){_o=void 0}const se=e=>_o?((...n)=>{try{return e(...n)}catch(r){if(_o&&_o(r)===!0)return()=>{};throw r}}):e;var Ed="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
496+/",Q1=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Ts=0;Ts<Ed.length;Ts++)Q1[Ed.charCodeAt(Ts)]=Ts;class vd{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}function Gu(e){try{return e.contentDocument}catch{}}function Co(e){try{return e.contentWindow}catch{}}class Z1{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 Td(e){return"__ln"in e}class eN{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==null?void 0:n.next)||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&Td(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&&Td(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 Id=(e,t)=>`${e}@${t}`;class tN{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 eN,o=c=>{let u=c,f=ko;for(;f===ko;)u=u&&u.nextSibling,f=u&&this.mirror.getId(u);return f},s=c=>{if(!c.parentNode||!Zg(c))return;const u=mo(c.parentNode)?this.mirror.getId(Qg(c)):this.mirror.getId(c.parentNode),f=o(c);if(u===-1||f===-1)return r.addNode(c);const l=yr(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:d=>{Kg(d,this.mirror)&&!Ve(d,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(d),Xg(d,this.mirror)&&this.stylesheetManager.trackLinkElement(d),Oc(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(d,p)=>{if(Ve(d,this.blockClass,this.blockSelector,this.unblockSelector,!1))return;this.iframeManager.attachIframe(d,p);const h=Co(d);h&&this.canvasManager.addWindow(h),this.shadowDomManager.observeAttachShadow(d)},onStylesheetLoad:(d,p)=>{this.stylesheetManager.attachLinkElement(d,p)},onBlockedImageLoad:(d,p,{width:h,height:m})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:p.id,attributes:{style:{width:`${h}px`,height:`${m}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});l&&(t.push({parentId:u,nextId:f,node:l}),n.add(l.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const c of this.movedSet)wd(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||s(c);for(const c of this.addedSet)!Rd(this.droppedSet,c)&&!wd(this.removes,c,this.mirror)||Rd(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),f=o(i.value);u!==-1&&f!==-1&&(c=i)}if(!c){let u=r.tail;for(;u;){const f=u;if(u=u.previous,f){const l=this.mirror.getId(f.value.parentNode);
496if(o(f.value)===-1)continue;if(l!==-1){c=f;break}else{const p=f.value;if(p.parentNode&&p.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const h=p.parentNode.host;if(this.mirror.getId(h)!==-1){c=f;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 f=JSON.stringify(c.styleDiff),l=JSON.stringify(c._unchangedStyles);f.length<u.style.length&&(f+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(!qa(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Ve(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:Ur(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,Yg(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=Wu(n),a=n.tagName;o=gi(n,a,i);const c=ia({maskInputOptions:this.maskInputOptions,tagName:a,type:i}),u=Ur(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c);o=Ro({isMasked:u,element:n,value:o,maskInputFn:this.maskInputFn})}if(Ve(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(!Gu(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"),!jg(n.tagName,r)&&(s.attributes[r]=Wg(this.doc,Br(n.tagName),Br(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==null?void 0:i.getPropertyValue(a))||"")||u!==((i==null?void 0: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(Ve(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=mo(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Ve(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||qa(n,this.mirror)||!j1(n,this.mirror)||(this.addedSet.has(n)?(Pc(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||Jg(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Id(r,o)]?Pc(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:mo(t.target)&&go(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(qa(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[Id(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Ve(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEac
496h(r=>this.genAdds(r)),Oc(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 Z1(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 Pc(e,t){var n;e.delete(t),(n=t.childNodes)==null||n.forEach(r=>Pc(e,r))}function wd(e,t,n){return e.length===0?!1:nN(e,t,n)}function nN(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 Rd(e,t){return e.size===0?!1:e_(e,t)}function e_(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:e_(e,n):!1}const Sr=[];function ts(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 t_(e,t){var i,a;const n=new tN;Sr.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const o=(a=(i=window==null?void 0:window.Zone)==null?void 0:i.__symbol__)==null?void 0:a.call(i,"MutationObserver");o&&window[o]&&(r=window[o]);const s=new r(se(c=>{e.onMutation&&e.onMutation(c)===!1||n.processMutations.bind(n)(c)}));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function rN({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=Ao(se(l=>{const d=Date.now()-a;e(i.map(p=>(p.timeOffset-=d,p)),l),i=[],a=null}),s),u=se(Ao(se(l=>{const d=ts(l),{clientX:p,clientY:h}=xc(l)?l.changedTouches[0]:l;a||(a=yi()),i.push({x:p,y:h,id:r.getId(d),timeOffset:yi()-a}),c(typeof DragEvent<"u"&&l instanceof DragEvent?Y.Drag:l instanceof MouseEvent?Y.MouseMove:Y.TouchMove)}),o,{trailing:!1})),f=[Ue("mousemove",u,n),Ue("touchmove",u,n),Ue("drag",u,n)];return se(()=>{f.forEach(l=>l())})}function oN({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 f=l=>d=>{const p=ts(d);if(Ve(p,r,o,s,!0))return;let h=null,m=l;if("pointerType"in d){switch(d.pointerType){case"mouse":h=Ht.Mouse;break;case"touch":h=Ht.Touch;break;case"pen":h=Ht.Pen;break}h===Ht.Touch?$e[l]===$e.MouseDown?m="TouchStart":$e[l]===$e.MouseUp&&(m="TouchEnd"):Ht.Pen}else xc(d)&&(h=Ht.Touch);h!==null?(u=h,(m.startsWith("Touch")&&h===Ht.Touch||m.startsWith("Mouse")&&h===Ht.Mouse)&&(h=null)):$e[l]===$e.Click&&(h=u,u=null);const g=xc(d)?d.changedTouches[0]:d;if(!g)return;const y=n.getId(p),{clientX:S,clientY:I}=g;se(e)({type:$e[m],id:y,x:S,y:I,...h!==null&&{pointerType:h}})};return Object.keys($e).filter(l=>Number.isNaN(Number(l))&&!l.endsWith("_Departed")&&a[l]!==!1).forEach(l=>{let d=Br(l);const p=f(l);if(window.PointerEvent)switch($e[l]){case $e.MouseDown:case $e.MouseUp:d=d.replace("mouse","pointer");break;case $e.TouchStart:case $e.TouchEnd:return}c.push(Ue(d,p,t))}),se(()=>{c.forEach(l=>l())})}function n_({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){const a=se(Ao(se(c=>{const u=ts(c);if(!u||Ve(u,r,o,s,!0))return;const f=n.getId(u);if(u===t&&t.defaultView){const l=qg(t.defaultView);e({id:f,x:l.left,y:l.top})}else e({id:f,x:u.scrollLeft,y:u.scrollTop})}),i.scroll||100));return Ue("scroll",a,t)}function sN({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const o=se(Ao(se(()=>{const s=Gg(),i=Vg();(n!==s||r!==i)&&(e({width:Number(i),height:Number(s)}),n=s,r=i)}),200));return Ue("resize",o,t)}const iN=["INPUT","TEXTAREA","SELECT"],kd=new WeakMap;function aN({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,ignoreClass:i,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:f,userTriggeredOnInput:l,maskTextClass:d,unmaskTextClass:p,maskTextSelector:h,unmaskTextSelector:m}){function g(b){let D=ts(b);const N=b.isTrusted,E=D&&Nc(D.tagName);if(E==="OPTION"&&(D=D.parentElement),!D||!E||iN.indexOf(E)<0||Ve(D,r,o,s,!0))return;const L=D;if(L.classList.contains(i)||a&&L.matches(a))return;const M=Wu(D);let F=gi(L,E,M),q=!1;const K=ia({maskInputOptions:c,tagName:E,type:M}),G=Ur(D,d,h,p,m,K);(M==="radio"||M==="checkbox")&&(q=D.checked),F=Ro({isMasked:G,element:D,value:F,maskInputFn:u}),y(D,l?{text:F,isChecked:q,userTriggered:N}:{text:F,isChecked:q});const $=D.name;M==="radio"&&$&&q&&t.querySelectorAll(`input[type="radio"][name="${$}"]`).forEach(x=>
vendor: 9,125 bytes, line 496
496{if(x!==D){const Z=Ro({isMasked:G,element:x,value:gi(x,E,M),maskInputFn:u});y(x,l?{text:Z,isChecked:!q,userTriggered:!1}:{text:Z,isChecked:!q})}})}function y(b,D){const N=kd.get(b);if(!N||N.text!==D.text||N.isChecked!==D.isChecked){kd.set(b,D);const E=n.getId(b);se(e)({...D,id:E})}}const I=(f.input==="last"?["change"]:["input","change"]).map(b=>Ue(b,se(g),t)),v=t.defaultView;if(!v)return()=>{I.forEach(b=>b())};const w=v.Object.getOwnPropertyDescriptor(v.HTMLInputElement.prototype,"value"),T=[[v.HTMLInputElement.prototype,"value"],[v.HTMLInputElement.prototype,"checked"],[v.HTMLSelectElement.prototype,"value"],[v.HTMLTextAreaElement.prototype,"value"],[v.HTMLSelectElement.prototype,"selectedIndex"],[v.HTMLOptionElement.prototype,"selected"]];return w&&w.set&&I.push(...T.map(b=>zg(b[0],b[1],{set(){se(g)({target:this,isTrusted:!1})}},!1,v))),se(()=>{I.forEach(b=>b())})}function Si(e){const t=[];function n(r,o){if(Is("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Is("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Is("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Is("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 en(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function cN({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:se((f,l,d)=>{const[p,h]=d,{id:m,styleId:g}=en(l,t,n.styleMirror);return(m&&m!==-1||g&&g!==-1)&&e({id:m,styleId:g,adds:[{rule:p,index:h}]}),f.apply(l,d)})});const s=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:se((f,l,d)=>{const[p]=d,{id:h,styleId:m}=en(l,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,removes:[{index:p}]}),f.apply(l,d)})});let i;r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:se((f,l,d)=>{const[p]=d,{id:h,styleId:m}=en(l,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,replace:p}),f.apply(l,d)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:se((f,l,d)=>{const[p]=d,{id:h,styleId:m}=en(l,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,replaceSync:p}),f.apply(l,d)})}));const c={};ws("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(ws("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),ws("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),ws("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(c).forEach(([f,l])=>{u[f]={insertRule:l.prototype.insertRule,deleteRule:l.prototype.deleteRule},l.prototype.insertRule=new Proxy(u[f].insertRule,{apply:se((d,p,h)=>{const[m,g]=h,{id:y,styleId:S}=en(p.parentStyleSheet,t,n.styleMirror);return(y&&y!==-1||S&&S!==-1)&&e({id:y,styleId:S,adds:[{rule:m,index:[...Si(p),g||0]}]}),d.apply(p,h)})}),l.prototype.deleteRule=new Proxy(u[f].deleteRule,{apply:se((d,p,h)=>{const[m]=h,{id:g,styleId:y}=en(p.parentStyleSheet,t,n.styleMirror);return(g&&g!==-1||y&&y!==-1)&&e({id:g,styleId:y,removes:[{index:[...Si(p),m]}]}),d.apply(p,h)})})}),se(()=>{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).forEach(([f,l])=>{l.prototype.insertRule=u[f].insertRule,l.prototype.deleteRule=u[f].deleteRule})})}function r_({mirror:e,stylesheetManager:t},n){var i,a,c;let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const o=n.nodeName==="#document"?(i=n.defaultView)==null?void 0:i.Document:(c=(a=n.ownerDocument)==null?void 0:a.defaultView)==null?void 0:c.ShadowRoot,s=o!=null&&o.prototype?Object.getOwnPropertyDescriptor(o==null?void 0:o.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!o||!s?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){var u;return(u=s.get)==null?void 0:u.call(this)},set(u){var l;const f=(l=s.set)==null?void 0:l.call(this,u);if(r!==null&&r!==-1)try{t.adoptStyleSheets(u,r)}catch{}return f}}),se(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})}))}function uN({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const s=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:se((a,c,u)=>{var m;const[f,l,d]=u;if(n.has(f))return s.apply(c,[f,l,d]);const{id:p,styleId:h}=en((m=c.parentRule)==null?void 0:m.parentStyleSheet,t,r.styleMirror);return(p&&p!==-1||h&&h!==-1)&&e({id:p,styleId:h,set:{property:f,value:l,priority:d},index:Si(c.parentRule)}),a.apply(c,u)})});const i=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:se((a,c,u)=>{var p;const[f]=u;if(n.has(f))return i.apply(c,[f]);const{id:l,styleId:d}=en((p=c.parentRule)==null?void 0:p.parentStyleSheet,t,r.styleMirror);return(l&&l!==-1||d&&d!==-1)&&e({id:l,styleId:d,remove:{property:f},index:Si(c.parentRule)}),a.apply(c,u)})}),se(()=>{o.CSSStyleDeclaration.prototype.setProperty=s,o.CSSStyleDeclaration.prototype.removeProperty=i})}function lN({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:o,sampling:s,doc:i}){const a=se(u=>Ao(se(f=>{const l=ts(f);if(!l||Ve(l,t,n,r,!0))return;const{currentTime:d,volume:p,muted:h,playbackRate:m}=l;e({type:u,id:o.getId(l),currentTime:d,volume:p,muted:h,playbackRate:m})}),s.media||500)),c=[Ue("play",a(pr.Play),i),Ue("pause",a(pr.Pause),i),Ue("seeked",a(pr.Seeked),i),Ue("volumechange",a(pr.VolumeChange),i),Ue("ratechange",a(pr.RateChange),i)];return se(()=>{c.forEach(u=>u())})}function fN({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,s=n.FontFace;n.FontFace=function(c,u,f){const l=new s(c,u,f);return o.set(l,{family:c,buffer:typeof u!="string",descriptors:f,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),l};const i=zu(t.fonts,"add",function(a){return function(c){return ca(se(()=>{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),se(()=>{r.forEach(a=>a())})}function dN(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,selectionCb:i}=e;let a=!0;const c=se(()=>{const u=t.getSelection();if(!u||a&&(u!=null&&u.isCollapsed))return;a=u.isCollapsed||!1;const f=[],l=u.rangeCount||0;for(let d=0;d<l;d++){const p=u.getRangeAt(d),{startContainer:h,startOffset:m,endContainer:g,endOffset:y}=p;Ve(h,r,o,s,!0)||Ve(g,r,o,s,!0)||f.push({start:n.getId(h),startOffset:m,end:n.getId(g),endOffset:y})}i({ranges:f})});return c(),Ue("selectionchange",c)}function pN({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:zu(n.customElements,"define",function(o){return function(s,i,a){try{t({define:{name:s}})}catch{}return o.apply(this,[s,i,a])}})}function hN(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=t_(e,e.doc));const o=rN(e),s=oN(e),i=n_(e),a=sN(e,{win:n}),c=aN(e),u=lN(e);let f=()=>{},l=()=>{},d=()=>{},p=()=>{};e.recordDOM&&(f=cN(e,{win:n}),l=r_(e,e.doc),d=uN(e,{win:n}),e.collectFonts&&(p=fN(e)));const h=dN(e),m=pN(e),g=[];for(const y of e.plugins)g.push(y.observer(y.callback,n,y.options));return se(()=>{Sr.forEach(y=>y.reset()),r==null||r.disconnect(),o(),s(),i(),a(),c(),u(),f(),l(),d(),p(),h(),m(),g.forEach(y=>y())})}function Is(e){return typeof window[e]<"u"}function ws(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Lc{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 mN{constructor(){this.crossOriginIframeMirror=new Lc(ju),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class gN{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Lc(ju),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Lc(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=Co(t);n&&this.crossOriginIframeMap.set(n,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){var o,s;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((o=Co(t))==null||o.addEventListener("message",this.handleMessage.bind(this))),(s=this.loadListener)==null||s.call(this,t);const r=Gu(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){var r;switch(n.type){case Q.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const o=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,o),this.patchRootIdOnNode(n.data.node,o),{timestamp:n.timestamp,type:Q.IncrementalSnapshot,data:{source:Y.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Q.Meta:case Q.Load:case Q.DomContentLoaded:return!1;case Q.Plugin:return n;case Q.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case Q.IncrementalSnapshot:switch(n.data.source){case Y.Mutation:return n.data.adds.forEach(o=>{this.replaceIds(o,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(o.node,t);const s=this.crossOriginIframeRootIdMap.get(t);s&&this.patchRootIdOnNode(o.node,s)}),n.data.removes.forEach(o=>{this.replaceIds(o,t,["parentId","id"])}),n.data.attributes.forEach(o=>{this.replaceIds(o,t,["id"])}),n.data.texts.forEach(o=>{this.replaceIds(o,t,["id"])}),n;case Y.Drag:case Y.TouchMove:case Y.MouseMove:return n.data.positions.forEach(o=>{this.replaceIds(o,t,["id"])}),n;case Y.ViewportResize:return!1;case Y.MediaInteraction:case Y.MouseInteraction:case Y.Scroll:case Y.CanvasMutation:case Y.Input:return this.replaceIds(n.data,t,["id"]),n;case Y.StyleSheetRule:case Y.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case Y.Font:return n;case Y.Selection:return n.data.ranges.forEach(o=>{this.replaceIds(o,t,["start","end"])}),n;case Y.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),(r=n.data.styles)==null||r.forEach(o=>{this.replaceStyleIds(o,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!==Re.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class _N{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class yN{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(!go(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=t_({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(n_({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),ca(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(r_({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=Gu(t),r=Co(t);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(zu(t.prototype,"attachShadow",function(o){return function(s){const i=o.call(this,s);return this.shadowRoot&&Zg(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 SN{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new q1,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:Dg(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 bN{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,Y1(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let Ie,bi;var vp;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((vp=e.contentWindow)==null?void 0:vp.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const pt=_1();function yt(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:f="rr-mask",unmaskTextClass:l=null,maskTextSelector:d=null,unmaskTextSelector:p=null,inlineStylesheet:h=!0,maskAllInputs:m,maskInputOptions:g,slimDOMOptions:y,maskAttributeFn:S,maskInputFn:I,maskTextFn:v,maxCanvasSize:w=null,packFn:T,sampling:b={},dataURLOptions:D={},mousemoveWait:N,recordDOM:E=!0,recordCanvas:L=!1,recordCrossOriginIframes:M=!1,recordAfter:F=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:q=!1,collectFonts:K=!1,inlineImages:G=!1,plugins:$,keepIframeSrcFn:x=()=>!1,ignoreCSSAttributes:Z=new Set([]),errorHandler:O,onMutation:V,getCanvasManager:ne}=e;K1(O);const te=M?window.parent===window:!0;let ie=!1;if(!te)try{window.parent.document&&(ie=!1)}catch{ie=!0}if(te&&!t)throw new Error("emit function is required");if(!te&&!ie)return()=>{};N!==void 0&&b.mousemove===void 0&&(b.mousemove=N),pt.reset();const Le=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}:g!==void 0?g:{},ft=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||{};z1();let Dt,dt=0;const An=P=>{for(const ae of $||[])ae.eventProcessor&&(P=ae.eventProcessor(P));return T&&!ie&&(P=T(P)),P};Ie=(P,ae)=>{var fe;const X=P;if(X.timestamp=yi(),(fe=Sr[0])!=null&&fe.isFrozen()&&X.type!==Q.FullSnapshot&&!(X.type===Q.IncrementalSnapshot&&X.data.source===Y.Mutation)&&Sr.forEach(le=>le.unfreeze()),te)t==null||t(An(X),ae);else if(ie){const le={type:"rrweb",event:An(X),origin:window.location.origin,isCheckout:ae};window.parent.postMessage(le,"*")}if(X.type===Q.FullSnapshot)Dt=X,dt=0;else if(X.type===Q.IncrementalSnapshot){if(X.data.source===Y.Mutation&&X.data.isAttachIframe)return;dt++;const le=r&&dt>=r,oe=n&&Dt&&X.timestamp-Dt.timestamp>n;(le||oe)&&Nn(!0)}};const Ft=P=>{Ie({type:Q.IncrementalSnapshot,data:{source:Y.Mutation,...P}})},ls=P=>Ie({type:Q.IncrementalSnapshot,data:{source:Y.Scroll,...P}}),$t=P=>Ie({type:Q.IncrementalSnapshot,data:{source:Y.CanvasMutation,...P}}),et=P=>Ie({type:Q.IncrementalSnapshot,data:{source:Y.AdoptedStyleSheet,...P}}),We=new SN({mutationCb:Ft,adoptedStyleSheetCb:et}),qe=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new mN:new gN({mirror:pt,mutationCb:Ft,stylesheetManager:We,recordCrossOriginIframes:M,wrappedEmit:Ie});for(const P of $||[])P.getMirror&&P.getMirror({nodeMirror:pt,crossOriginIframeMirror:qe.crossOriginIframeMirror,crossOriginIframeStyleMirror:qe.crossOriginIframeStyleMirror});const sr=new bN,ir=vN(ne,{mirror:pt,win:window,mutationCb:P=>Ie({type:Q.IncrementalSnapshot,data:{source:Y.CanvasMutation,...P}}),recordCanvas:L,blockClass:o,blockSelector:s,unblockSelector:i,maxCanvasSize:w,sampling:b.canvas,dataURLOptions:D,errorHandler:O}),Cn=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new _N:new yN({mutationCb:Ft,scrollCb:ls,bypassOptions:{onMutation:V,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:u,maskTextClass:f,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:Le,dataURLOptions:D,maskAttributeFn:S,maskTextFn:v,maskInputFn:I,recordCanvas:L,inlineImages:G,sampling:b,slimDOMOptions:ft,iframeManager:qe,stylesheetManager:We,canvasManager:ir,keepIframeSrcFn:x,processedNodeManager:sr,ignoreCSSAttributes:Z},mirror:pt}),Nn=(P=!1)=>
496{if(!E)return;Ie({type:Q.Meta,data:{href:window.location.href,width:Vg(),height:Gg()}},P),We.reset(),Cn.init(),Sr.forEach(X=>X.lock());const ae=W1(document,{mirror:pt,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:u,maskTextClass:f,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:h,maskAllInputs:Le,maskAttributeFn:S,maskInputFn:I,maskTextFn:v,slimDOM:ft,dataURLOptions:D,recordCanvas:L,inlineImages:G,onSerialize:X=>{Kg(X,pt)&&qe.addIframe(X),Xg(X,pt)&&We.trackLinkElement(X),Oc(X)&&Cn.addShadowRoot(X.shadowRoot,document)},onIframeLoad:(X,fe)=>{qe.attachIframe(X,fe);const le=Co(X);le&&ir.addWindow(le),Cn.observeAttachShadow(X)},onStylesheetLoad:(X,fe)=>{We.attachLinkElement(X,fe)},onBlockedImageLoad:(X,fe,{width:le,height:oe})=>{Ft({adds:[],removes:[],texts:[],attributes:[{id:fe.id,attributes:{style:{width:`${le}px`,height:`${oe}px`}}}]})},keepIframeSrcFn:x,ignoreCSSAttributes:Z});if(!ae)return console.warn("Failed to snapshot the document");Ie({type:Q.FullSnapshot,data:{node:ae,initialOffset:qg(window)}}),Sr.forEach(X=>X.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&We.adoptStyleSheets(document.adoptedStyleSheets,pt.getId(document))};bi=Nn;try{const P=[],ae=fe=>{var le;return se(hN)({onMutation:V,mutationCb:Ft,mousemoveCb:(oe,Fe)=>Ie({type:Q.IncrementalSnapshot,data:{source:Fe,positions:oe}}),mouseInteractionCb:oe=>Ie({type:Q.IncrementalSnapshot,data:{source:Y.MouseInteraction,...oe}}),scrollCb:ls,viewportResizeCb:oe=>Ie({type:Q.IncrementalSnapshot,data:{source:Y.ViewportResize,...oe}}),inputCb:oe=>Ie({type:Q.IncrementalSnapshot,data:{source:Y.Input,...oe}}),mediaInteractionCb:oe=>Ie({type:Q.IncrementalSnapshot,data:{source:Y.MediaInteraction,...oe}}),styleSheetRuleCb:oe=>Ie({type:Q.IncrementalSnapshot,data:{source:Y.StyleSheetRule,...oe}}),styleDeclarationCb:oe=>Ie({type:Q.IncrementalSnapshot,data:{source:Y.StyleDeclaration,...oe}}),canvasMutationCb:$t,fontCb:oe=>Ie({type:Q.IncrementalSnapshot,data:{source:Y.Font,...oe}}),selectionCb:oe=>{Ie({type:Q.IncrementalSnapshot,data:{source:Y.Selection,...oe}})},customElementCb:oe=>{Ie({type:Q.IncrementalSnapshot,data:{source:Y.CustomElement,...oe}})},blockClass:o,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:f,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p,maskInputOptions:Le,inlineStylesheet:h,sampling:b,recordDOM:E,recordCanvas:L,inlineImages:G,userTriggeredOnInput:q,collectFonts:K,doc:fe,maskAttributeFn:S,maskInputFn:I,maskTextFn:v,keepIframeSrcFn:x,blockSelector:s,unblockSelector:i,slimDOMOptions:ft,dataURLOptions:D,mirror:pt,iframeManager:qe,stylesheetManager:We,
496shadowDomManager:Cn,processedNodeManager:sr,canvasManager:ir,ignoreCSSAttributes:Z,plugins:((le=$==null?void 0:$.filter(oe=>oe.observer))==null?void 0:le.map(oe=>({observer:oe.observer,options:oe.options,callback:Fe=>Ie({type:Q.Plugin,data:{plugin:oe.name,payload:Fe}})})))||[]},{})};qe.addLoadListener(fe=>{try{P.push(ae(fe.contentDocument))}catch(le){console.warn(le)}});const X=()=>{Nn(),P.push(ae(document))};return document.readyState==="interactive"||document.readyState==="complete"?X():(P.push(Ue("DOMContentLoaded",()=>{Ie({type:Q.DomContentLoaded,data:{}}),F==="DOMContentLoaded"&&X()})),P.push(Ue("load",()=>{Ie({type:Q.Load,data:{}}),F==="load"&&X()},window))),()=>{P.forEach(fe=>fe()),sr.destroy(),bi=void 0,X1()}}catch(P){console.warn(P)}}function EN(e){if(!bi)throw new Error("please take full snapshot after start recording");bi(e)}yt.mirror=pt;yt.takeFullSnapshot=EN;function vN(e,t){try{return e?e(t):new vd}catch{return console.warn("Unable to initialize CanvasManager"),new vd}}var Ad;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Ad||(Ad={}));const TN=3,IN=5;function Vu(e){return e>9999999999?e:e*1e3}function Ga(e){return e>9999999999?e/1e3:e}function ns(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:Q.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:ke(t,10,1e3)}}),t.category==="console")))}const wN="button,a";function o_(e){return e.closest(wN)||e}function s_(e){const t=i_(e);return!t||!(t instanceof Element)?t:o_(t)}function i_(e){return RN(e)?e.target:e}function RN(e){return it(e)&&"target"in e}let tn;function kN(e){return tn||(tn=[],AN()),tn.push(e),()=>{const t=tn?tn.indexOf(e):-1;t>-1&&tn.splice(t,1)}}function AN(){Oe(_e,"open",function(e){return function(...t){if(tn)try{tn.forEach(n=>n())}catch{}return e.apply(_e,t)}})}const CN=new Set([Y.Mutation,Y.StyleSheetRule,Y.StyleDeclaration,Y.AdoptedStyleSheet,Y.CanvasMutation,Y.Selection,Y.MediaInteraction]);function NN(e,t,n){e.handleClick(t,n)}class MN{constructor(t,n,r=ns){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=kN(()=>{this._lastMutation=Cd()});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(ON(n,this._ignoreSelector)||!PN(t))return;const r={timestamp:Ga(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=Ga(t)}registerScroll(t=Date.now()){this._lastScroll=Ga(t)}registerClick(t){const n=o_(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=Cd();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",f={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:_e.location.href,route:n.getCurrentRoute(),timeAfterClickMs:c,endReason:u,clickCount:i||1}};this._addBreadcrumbEvent(n,f);return}if(i>1){const c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:_e.location.href,route:n.getCurrentRoute(),clickCount:i,metric:!0}};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=es(()=>this._checkClicks(),1e3)}}const xN=["A","BUTTON","INPUT"];function ON(e,t){return!!(!xN.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 PN(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function Cd(){return Date.now()/1e3}function LN(e,t){try{if(!DN(t))return;const{source:n}=t.data;if(CN.has(n)&&e.registerMutation(t.timestamp),n===Y.Scroll&&e.registerScroll(t.timestamp),FN(t)){const{type:r,id:o}=t.data,s=yt.mirror.getNode(o);s instanceof HTMLElement&&r===$e.Click&&e.registerClick(s)}}catch{}}function DN(e){return e.type===TN}function FN(e){return e.data.source===Y.MouseInteraction}function Tt(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var ua=(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))(ua||{});const $N=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function BN(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if($N.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const UN=e=>t=>{if(!e.isEnabled())return;const n=HN(t);if(!n)return;const r=t.name==="click",o=r?t.event:void 0;r&&e.clickDetector&&(o!=null&&o.target)&&!o.altKey&&!o.metaKey&&!o.ctrlKey&&!o.shift
496Key&&NN(e.clickDetector,n,s_(t.event)),ns(e,n)};function a_(e,t){const n=yt.mirror.getId(e),r=n&&yt.mirror.getNode(n),o=r&&yt.mirror.getMeta(r),s=o&&jN(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===ua.Text&&i.textContent).filter(Boolean).map(i=>i.trim()).join(""),attributes:BN(s.attributes)}}:{}}}function HN(e){const{target:t,message:n}=WN(e);return Tt({category:`ui.${e.name}`,...a_(t,n)})}function WN(e){const t=e.name==="click";let n,r=null;try{r=t?s_(e.event):i_(e.event),n=xe(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function jN(e){return e.type===ua.Element}function zN(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=qN(t);n&&ns(e,n)}function qN(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s,target:i}=e;if(!i||GN(i)||!s)return null;const a=t||r||o,c=s.length===1;if(!a&&c)return null;const u=xe(i,{maxStringLength:200})||"<unknown>",f=a_(i,u);return Tt({category:"ui.keyDown",message:u,data:{...f.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s}})}function GN(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const VN={resource:QN,paint:KN,navigation:XN};function Va(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function YN(e){return e.map(JN).filter(Boolean)}function JN(e){const t=VN[e.entryType];return t?t(e):null}function Hr(e){return((we()||_e.performance.timeOrigin)+e)/1e3}function KN(e){const{duration:t,entryType:n,name:r,startTime:o}=e,s=Hr(o);return{type:n,name:r,start:s,end:s+t,data:void 0}}function XN(e){const{entryType:t,name:n,decodedBodySize:r,duration:o,domComplete:s,encodedBodySize:i,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:f,loadEventEnd:l,redirectCount:d,startTime:p,transferSize:h,type:m}=e;return o===0?null:{type:`${t}.${m}`,start:Hr(p),end:Hr(s),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:i,duration:o,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:f,loadEventEnd:l,domComplete:s,redirectCount:d}}}function QN(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:Hr(s),end:Hr(o),name:r,data:{size:u,statusCode:c,decodedBodySize:i,encodedBodySize:a}}}function ZN(e){const t=e.entries[e.entries.length-1],n=t!=null&&t.element?[t.element]:void 0;return Yu(e,"largest-contentful-paint",n)}function eM(e){return e.sources!==void 0}function tM(e){const t=[],n=[];for(const r of e.entries)if(eM(r)){const o=[];for(const s of r.sources)if(s.node){n.push(s.node);const i=yt.mirror.getId(s.node);i&&o.push(i)}t.push({value:r.value,nodeIds:o.length?o:void 0})}return Yu(e,"cumulative-layout-shift",n,t)}function nM(e){const t=e.entries[e.entries.length-1],n=t!=null&&t.target?[t.target]:void 0;return Yu(e,"interaction-to-next-paint",n)}function Yu(e,t,n,r){const o=e.value,s=e.rating,i=Hr(o);return{type:"web-vital",name:t,start:i,end:i,data:{value:o,size:o,rating:s,nodeIds:n?n.map(a=>yt.mirror.getId(a)):void 0,attributions:r}}}function rM(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(yn(o,n))}),r.push(Zi(Va(ZN,e)),Qi(Va(tM,e)),Ou(Va(nM,e))),()=>{r.forEach(o=>o())}}const W=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,oM='
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 sM(){const e=new Blob([oM],{type:"text/javascript"});return URL.createObjectURL(e)}const Nd=["log","warn","error"],js="[Replay] ";function Ya(e,t="info"){Nt({category:"console",data:{logger:"replay"},level:t,message:`${js}${e}`},{level:t})}function iM(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return W?(Nd.forEach(r=>{n[r]=(...o)=>{_[r](js,...o),t&&Ya(o.join(""),si(r))}}),n.exception=(r,...o)=>{o.length&&n.error&&n.error(...o),_.error(js,r),e?St(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&Ya(r,"error")},n.infoTick=(...r)=>{_.log(js,...r),t&&setTimeout(()=>Ya(r[0]),0)}):Nd.forEach(r=>{n[r]=()=>{}}),n}const j=iM();class Ju extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Hu}.`)}}class c_ extends Error{constructor(){super("Worker destroyed")}}class u_{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>Hu)throw new Ju;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:Vu(t)}}class aM{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){W&&j.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():(W&&j.warn("Received worker message with unsuccessful status",r),n(new Error("Received worker message with unsuccessful status")))},{once:!0}),this._worker.addEventListener("error",r=>{W&&j.warn("Failed to load Replay compression worker",r),n(new Error(`Failed to load Replay compression worker: ${r instanceof ErrorEvent&&r.message?r.message:"Unknown error. This can happen due to CSP policy restrictions, network issues, or the worker script failing to load."}`))},{once:!0})}),this._ensureReadyPromise)}destroy(){W&&j.log("Destroying compression worker"),this._worker.removeEventListener("message",this._onMessage),this._pending.forEach(t=>t.reject(new c_)),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 cM{constructor(t){this._worker=new aM(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=Vu(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>Hu?Promise.reject(new Ju):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{W&&j.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 uM{constructor(t){this._fallback=new u_,this._compression=new cM(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){W&&j.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 c_)return;W&&j.exception(s,"Failed to add events when switching buffers.")}}}function lM({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=fM(t);if(n)return n}return W&&j.log("Using simple buffer"),new u_}function fM(e){try{const t=e||dM();if(!t)return;W&&j.log(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new uM(n)}catch(t){W&&j.exception(t,"Failed to create compression worker")}}function dM(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?sM():""}function Ku(){try{return"sessionStorage"in _e&&!!_e.sessionStorage}catch{return!1}}function pM(e){hM(),e.session=void 0}function hM(){if(Ku())try{_e.sessionStorage.removeItem(Bu)}catch{}}function l_(e){return e===void 0?!1:Math.random()<e}function la(e){if(Ku())try{_e.sessionStorage.setItem(Bu,JSON.stringify(e))}catch{}}function f_(e){const t=Date.now(),n=e.id||Ne(),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 mM(e,t){return l_(e)?"session":t?"buffer":!1}function Md({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const o=mM(e,t),s=f_({sampled:o,previousSessionId:r});return n&&la(s),s}function gM(){if(!Ku())return null;try{const e=_e.sessionStorage.getItem(Bu);if(!e)return null;const t=JSON.parse(e);return W&&j.infoTick("Loading existing session"),f_(t)}catch{return null}}function Dc(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function _M(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Dc(e.started,t,r)||Dc(e.lastActivity,n,r)}function Ei(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!_M(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Ja({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const o=r.stickySession&&gM();return o?Ei(o,{sessionIdleExpire:e,maxReplayDuration:t})?(W&&j.infoTick("Session in sessionStorage is expired, creating new one..."),Md(r,{previousSessionId:o.id})):o:(W&&j.infoTick("Creating new session"),Md(r,{previousSessionId:n}))}function yM(e){return e.type===Q.Custom}function Xu(e,t,n){return p_(e,t)?(d_(e,t,n),!0):!1}function SM(e,t,n){return p_(e,t)?d_(e,t,n):Promise.resolve(null)}async function d_(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=bM(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 Ju,a=i?"eventBufferOverflow":"eventBufferError",c=C();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 p_(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=Vu(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(W&&j.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function bM(e,t){try{if(typeof t=="function"&&yM(e))return t(e)}catch(n){return W&&j.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}const xd=100;function h_(e,t,n){const r=e.getContext();t&&r.traceIds.size<xd&&r.traceIds.add(t),n&&r.segmentNames.size<xd&&r.segmentNames.add(n)}function EM(e){return t=>{e.isEnabled()&&h_(e,t.trace_id,t.name||void 0)}}function Qu(e){return!e.type}function Fc(e){return e.type==="transaction"}function vM(e){return e.type==="replay_event"}function Od(e){return e.type==="feedback"}function TM(e){return(t,n)=>{if(!e.isEnabled()||!Qu(t)&&!Fc(t))return;const r=n.statusCode;if(!(!r||r<200||r>=300)){if(Fc(t)){IM(e,t);return}wM(e,t)}}}function IM(e,t){var n,r;h_(e,(r=(n=t.contexts)==null?void 0:n.trace)==null?void 0:r.trace_id,t.transaction)}function wM(e,t){var o;const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!((o=t.tags)!=null&&o.replayId))return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||es(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(s){e.handleException(s)}})}function RM(e){return t=>{!e.isEnabled()||!Qu(t)||kM(e,t)}}function kM(e,t){var r,o,s;const n=(s=(o=(r=t.exception)==null?void 0:r.values)==null?void 0:o[0])==null?void 0:s.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 i=Tt({category:"replay.hydrate-error",data:{url:_n()}});ns(e,i)}}function AM(e){const t=C();t&&t.on("beforeAddBreadcrumb",n=>CM(e,n))}function CM(e,t){if(!e.isEnabled()||!m_(t))return;const n=NM(t);n&&ns(e,n)}function NM(e){return!m_(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?MM(e):Tt(e)}function MM(e){var o;const t=(o=e.data)==null?void 0:o.arguments;if(!Array.isArray(t)||t.length===0)return Tt(e);let n=!1;const r=t.map(s=>{if(!s)return s;if(typeof s=="string")return s.length>vs?(n=!0,`${s.slice(0,vs)}…`):s;if(typeof s=="object")try{const i=ke(s,7);return JSON.stringify(i).length>vs?(n=!0,`${JSON.stringify(i,null,2).slice(0,vs)}…`):i}catch{}return s});return Tt({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function m_(e){return!!e.category}function xM(e,t){var n,r,o;return e.type||!((r=(n=e.exception)==null?void 0:n.values)!=null&&r.length)?!1:!!((o=t.originalException)!=null&&o.__rrweb__)}function vi(){const e=H().getPropagationContext().dsc;e&&delete e.replay_id;const t=Te();if(t){const n=Et(t);delete n.replay_id}}function Pd(e){const t=H().getPropagationContext().dsc;t&&(t.replay_id=e);const n=Te();if(n){const r=Et(n);r.replay_id=e}}function OM(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:Q.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 PM(e,t){return e.recordingMode!=="buffer"||t.message===Uu||!t.exception||t.type?!1:l_(e.getOptions().errorSampleRate)}function LM(e){return Object.assign((t,n)=>{var i;if(e.session&&Ei(e.session,{maxReplayDuration:e.getOptions().maxReplayDuration,sessionIdleExpire:e.timeouts.sessionIdleExpire})&&vi(),!e.isEnabled()||e.isPaused())return t;if(vM(t))return delete t.breadcrumbs,t;if(!Qu(t)&&!Fc(t)&&!Od(t))return t;if(!e.checkAndHandleExpiredSession())return vi(),t;if(Od(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),OM(e,t),t;if(xM(t,n)&&!e.getOptions()._experiments.captureExceptions)return W&&j.log("Ignoring error from rrweb internals",t),null;const o=PM(e,t);if((o||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),o&&e.recordingMode==="buffer"&&((i=e.session)==null?void 0:i.sampled)==="buffer"){const a=e.session;a.dirty=!0,e.getOptions().stickySession&&la(a)}return t},{id:"Replay"})}function fa(e,t){return t.map(({type:n,start:r,end:o,name:s,data:i})=>{const a=e.throttledAddEvent({type:Q.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 DM(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 FM(e){return t=>{if(!e.isEnabled())return;const n=DM(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(fa(e,[n]),!1)))}}function $M(e,t){return W&&e.getOptions()._experiments.traceInternals?!1:rm(t,C())}function g_(e,t){e.isEnabled()&&t!==null&&($M(e,t.name)||e.addUpdate(()=>(fa(e,[t]),!0)))}function da(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=vg(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function __(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 y_(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 No(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function un(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}=BM(n);return r.body=o,s!=null&&s.length&&(r._meta={warnings:s}),r}function $c(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 BM(e){if(!e||typeof e!="string")return{body:e};const t=e.length>dd,n=UM(e);if(t){const r=e.slice(0,dd);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 UM(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function Ii(e,t){const n=HM(e);return at(n,t)}function HM(e,t=_e.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(_e.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 WM(e,t,n){try{const r=await zM(e,t,n),o=y_("resource.fetch",r);g_(n.replay,o)}catch(r){W&&j.exception(r,"Failed to capture fetch breadcrumb")}}function jM(e,t){const{input:n,response:r}=t,o=n?$u(n):void 0,s=da(o),i=r?__(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 zM(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:f}=e.data,l=Ii(i,n.networkDetailAllowUrls)&&!Ii(i,n.networkDetailDenyUrls),d=l?qM(n,t.input,u):No(u),p=await GM(l,n,t.response,f);return{startTimestamp:o,endTimestamp:s,url:i,method:a,statusCode:c,request:d,response:p}}function qM({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const o=n?JM(n,t):{};if(!e)return un(o,r,void 0);const s=$u(n),[i,a]=hi(s,j),c=un(o,r,i);return a?Ti(c,a):c}async function GM(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,o){if(!e&&o!==void 0)return No(o);const s=r?S_(r.headers,n):{};if(!r||!t&&o!==void 0)return un(s,o,void 0);const[i,a]=await YM(r),c=VM(i,{networkCaptureBodies:t,responseBodySize:o,captureDetails:e,headers:s});return a?Ti(c,a):c}function VM(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:o}){try{const s=e!=null&&e.length&&n===void 0?da(e):n;return r?t?un(o,s,e):un(o,s,void 0):No(s)}catch(s){return W&&j.exception(s,"Failed to serialize response body"),un(o,n,void 0)}}async function YM(e){const t=KM(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await XM(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(W&&j.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(W&&j.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function S_(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}
496function JM(e,t){return e.length===1&&typeof e[0]!="string"?Ld(e[0],t):e.length===2?Ld(e[1],t):{}}function Ld(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?S_(n,t):Array.isArray(n)?{}:$c(n,t):{}}function KM(e){try{return e.clone()}catch(t){W&&j.exception(t,"Failed to clone response body")}}function XM(e){return new Promise((t,n)=>{const r=es(()=>n(new Error("Timeout while trying to read response body")),500);QM(e).then(o=>t(o),o=>n(o)).finally(()=>clearTimeout(r))})}async function QM(e){return await e.text()}async function ZM(e,t,n){try{const r=tx(e,t,n),o=y_("resource.xhr",r);g_(n.replay,o)}catch(r){W&&j.exception(r,"Failed to capture xhr breadcrumb")}}function ex(e,t){const{xhr:n,input:r}=t;if(!n)return;const o=da(r),s=n.getResponseHeader("content-length")?__(n.getResponseHeader("content-length")):ox(n.response,n.responseType);o!==void 0&&(e.data.request_body_size=o),s!==void 0&&(e.data.response_body_size=s)}function tx(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:s=r,input:i,xhr:a}=t,{url:c,method:u,status_code:f=0,request_body_size:l,response_body_size:d}=e.data;if(!c)return null;if(!a||!Ii(c,n.networkDetailAllowUrls)||Ii(c,n.networkDetailDenyUrls)){const T=No(l),b=No(d);return{startTimestamp:o,endTimestamp:s,url:c,method:u,statusCode:f,request:T,response:b}}const p=a[Wt],h=p?$c(p.request_headers,n.networkRequestHeaders):{},m=$c(Tg(a),n.networkResponseHeaders),[g,y]=n.networkCaptureBodies?hi(i,j):[void 0],[S,I]=n.networkCaptureBodies?nx(a):[void 0],v=un(h,l,g),w=un(m,d,S);return{startTimestamp:o,endTimestamp:s,url:c,method:u,statusCode:f,request:y?Ti(v,y):v,response:I?Ti(w,I):w}}function nx(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return rx(e.response,e.responseType)}catch(n){t.push(n)}return W&&j.warn("Failed to get xhr response body",...t),[void 0]}function rx(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&it(e))return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return W&&j.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return W&&j.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function ox(e,t){try{const n=t==="json"&&it(e)?JSON.stringify(e):e;return da(n)}catch{return}}function sx(e){const t=C();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)=>ix(a,c,u))}catch{}}function ix(e,t,n){if(t.data)try{ax(t)&&ux(n)&&(ex(t,n),ZM(t,n,e)),cx(t)&&lx(n)&&(jM(t,n),WM(t,n,e))}catch(r){W&&j.exception(r,"Error when enriching network breadcrumb")}}function ax(e){return e.category==="xhr"}function cx(e){return e.category==="fetch"}function ux(e){return e==null?void 0:e.xhr}function lx(e){return(e==null?void 0:e.input)!==void 0}function fx(e){const t=C();Eg(UN(e)),ra(FM(e)),AM(e),sx(e);const n=LM(e);eE(n),t&&(t.on("beforeSendEvent",RM(e)),t.on("afterSendEvent",TM(e)),t.on("createDsc",r=>{const o=e.getSessionId();o&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(r.replay_id=o)}),t.on("processSegmentSpan",EM(e)),t.on("spanStart",r=>{e.lastActiveSpan=r}),t.on("spanEnd",r=>{e.lastActiveSpan=r}),t.on("beforeSendFeedback",async(r,o)=>{var i;const s=e.getSessionId();o!=null&&o.includeReplay&&e.isEnabled()&&s&&((i=r.contexts)!=null&&i.feedback)&&(r.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),r.contexts.feedback.replay_id=s)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}async function dx(e){try{return Promise.all(fa(e,[px(_e.performance.memory)]))}catch{return[]}}function px(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 hx(e,t,n){return lb(e,t,{...n,setTimeoutImpl:es})}const nt=U.navigator;function mx(){return/iPhone|iPad|iPod/i.test((nt==null?void 0:nt.userAgent)??"")||/Macintosh/i.test((nt==null?void 0:nt.userAgent)??"")&&(nt!=null&&nt.maxTouchPoints)&&(nt==null?void 0:nt.maxTouchPoints)>1?{sampling:{mousemove:!1}}:{}}function gx(e){let t=!1;return(n,r)=>{try{if(!e.checkAndHandleExpiredSession()){W&&j.warn("Received replay event after session expired.");return}const o=r||!t;t=!0,_x(n),e.clickDetector&&LN(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&o&&e.setInitialState(),!Xu(e,n,o))return!0;
496if(!o)return!1;const s=e.session;if(Sx(e,o),e.recordingMode==="buffer"&&s&&e.eventBuffer&&!s.dirty){const i=e.eventBuffer.getEarliestTimestamp();i&&(W&&j.log(`Updating session start time to earliest event in buffer to ${new Date(i)}`),s.started=i,e.getOptions().stickySession&&la(s))}return s!=null&&s.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}catch(o){e.handleException(o)}}}function _x(e){const t=e.data;if(!(e.type!==Q.IncrementalSnapshot||!t||typeof t!="object"||!("source"in t)||t.source!==Y.Mutation||!("attributes"in t)||!Array.isArray(t.attributes)))for(const n of t.attributes){const r=yt.mirror.getNode(n.id),o=r&&yt.mirror.getMeta(r);if((o==null?void 0:o.type)===ua.Element)for(const[s,i]of Object.entries(n.attributes))i===null?delete o.attributes[s]:o.attributes[s]=i}}function yx(e){const t=e.getOptions();return{type:Q.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 Sx(e,t){var n;!t||((n=e.session)==null?void 0:n.segmentId)!==0||Xu(e,yx(e),!1)}function bx(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Ex(e,t,n,r){return ut(bh(e,$o(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function vx({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 Tx({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 xh(e.getOptions(),r,s,t,e,be());if(!i)return null;e.emit("postprocessEvent",i,s),i.platform=i.platform||"javascript";const a=e.getSdkMetadata(),{name:c,version:u,settings:f}=(a==null?void 0:a.sdk)||{};return i.sdk={...i.sdk,name:c||"sentry.javascript.unknown",version:u||"0.0.0",settings:f},i}async function Ix({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:o,session:s}){const i=vx({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,segmentNames:f,initialTimestamp:l}=r,d=C(),p=H(),h=d==null?void 0:d.getTransport(),m=d==null?void 0:d.getDsn();if(!d||!h||!m||!s.sampled)return Promise.resolve({});const g={type:KC,replay_start_timestamp:l/1e3,timestamp:o/1e3,error_ids:c,trace_ids:u,segment_names:f,urls:a,replay_id:t,segment_id:n,replay_type:s.sampled},y=await Tx({scope:p,client:d,replayId:t,event:g});if(!y)return d.recordDroppedEvent("event_processor","replay"),W&&j.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete y.sdkProcessingMetadata;const S=Ex(y,i,m,d.getOptions().tunnel);let I;try{I=await h.send(S)}catch(w){const T=new Error(Uu);try{T.cause=w}catch{}throw T}const v=Vh({},I);if(Gh(v,"replay"))throw new Zu(v);if(typeof I.statusCode=="number"&&(I.statusCode<200||I.statusCode>=300))throw new b_(I.statusCode);return I}class b_ extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class Zu extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}class Dd extends Error{constructor(){super("Session is too long, not sending replay")}}async function E_(e,t={count:0,interval:n1}){const{recordingData:n,onError:r}=e;if(n.length)try{return await Ix(e),!0}catch(o){if(o instanceof b_||o instanceof Zu)throw o;if(Oh("Replays",{_retryCount:t.count}),r&&r(o),t.count>=r1){const s=new Error(`${Uu} - max retries exceeded`);try{s.cause=o}catch{}throw s}return t.interval*=++t.count,new Promise((s,i)=>{es(async()=>{try{await E_(e,t),s(!0)}catch(a){i(a)}},t.interval)})}}const v_="__THROTTLED",wx="__SKIPPED";
497function Rx(e,t,n){const r=new Map,o=a=>{const c=a-n;r.forEach((u,f)=>{f<c&&r.delete(f)})},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 f=i;return i=!0,f?wx:v_}i=!1;const u=r.get(c)||0;return r.set(c,u+1),e(...a)}}class kx{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:XC,sessionIdleExpire:QC},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,segmentNames:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=hx(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=Rx((i,a)=>SM(this,i,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:o}=this.getOptions(),s=r?{threshold:Math.min(o1,r),timeout:r,scrollTimeout:s1,ignoreSelector:o?o.join(","):""}:void 0;if(s&&(this.clickDetector=new MN(this,s)),W){const i=t._experiments;j.setConfig({captureExceptions:!!i.captureExceptions,traceInternals:!!i.traceInternals})}this._handleVisibilityChange=()=>{_e.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const i=Tt({category:"ui.blur"});this._doChangeToBackgroundTasks(i)},this._handleWindowFocus=()=>{const i=Tt({category:"ui.focus"});this._doChangeToForegroundTasks(i)},this._handleKeyboardEvent=i=>{zN(this,i)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){W&&j.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){W&&j.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",W&&j.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){W&&j.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){W&&j.log("Buffering is in progress, call `flush()` to save the replay");return}W&&j.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=Ja({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){W&&j.log("Buffering is in progress, call `flush()` to save the replay");return}W&&j.infoTick("Starting replay in buffer mode");const t=Ja({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=yt({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:t1}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:gx(this),...mx(),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}={}){var o,s,i;if(!this._isEnabled)return;this._isEnabled=!1,this.recordingMode="buffer";const r=n??"manual";(s=C())==null||s.emit("replayEnd",{sessionId:(o=this.session)==null?void 0:o.id,reason:r});try{W&&j.log(`Stopping Replay triggered by ${r}`),vi(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),(i=this.eventBuffer)==null||i.destroy(),this.eventBuffer=null,pM(this)}catch(a){this.handleException(a)}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),W&&j.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),W&&j.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();W&&j.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(),Pd(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){var n,r;if(!(t&&((n=this.session)==null?void 0:n.sampled)===!1))return(r=this.session)==null?void 0:r.id}
497checkAndHandleExpiredSession(){var t;if(this._lastActivity&&Dc(this._lastActivity,this.timeouts.sessionIdlePause)&&((t=this.session)==null?void 0:t.sampled)==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${_e.location.pathname}${_e.location.hash}${_e.location.search}`,n=`${_e.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===v_){const o=Tt({category:"replay.throttled"});this.addUpdate(()=>!Xu(this,{type:IN,timestamp:o.timestamp||0,data:{tag:"breadcrumb",payload:o,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||Te(),n=t&&ve(t),o=(n&&B(n).data||{})[ue];if(!(!n||!o||!["route","custom"].includes(o)))return B(n).description}_initializeRecording(){var t;this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=lM({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.session&&((t=C())==null||t.emit("replayStart",{sessionId:this.session.id,recordingMode:this.recordingMode})),this.startRecording(),this.recordingMode==="session"&&this.session&&Pd(this.session.id)}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=Ja({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 Ei(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{_e.document.addEventListener("visibilitychange",this._handleVisibilityChange),_e.addEventListener("blur",this._handleWindowBlur),_e.addEventListener("focus",this._handleWindowFocus),_e.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(fx(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=rM(this)}_removeListeners(){try{_e.document.removeEventListener("visibilitychange",this._handleVisibilityChange),_e.removeEventListener("blur",this._handleWindowBlur),_e.removeEventListener("focus",this._handleWindowFocus),_e.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(Ei(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})){vi();return}t&&this._createCustomBreadcrumb(t),this.conditionalFlush()}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){W&&j.log("Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:Q.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=YN(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(fa(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(){var n;const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){W&&j.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!((n=this.eventBuffer)!=null&&n.hasEvents)&&(await dx(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const r=Date.now();if(r-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Dd;const o=this._popEventContext(),s=this.session.segmentId++;this._maybeSaveSession();const i=await this.eventBuffer.finish();await E_({replayId:t,recordingData:i,segmentId:s,eventContext:o,session:this.session,timestamp:r,onError:a=>this.handleException(a)})}catch(r){this.handleException(r),this.stop({reason:"sendError"});const o=C();if(o){let s;r instanceof Zu?s="ratelimit_backoff":r instanceof Dd?s="invalid":s="send_error",o.recordDroppedEvent(s,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){W&&j.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){W&&j.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&&W&&j.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&&la(this.session)}_onMutationHandler(t){const{ignoreMutations:n}=this._options._experiments;if(n!=null&&n.length&&t.some(a=>{const c=bx(a.target),u=n.join(",");return c==null?void 0: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=Tt({category:"replay.mutations",data:{count:r,limit:i}});this._createCustomBreadcrumb(a)}return i?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function so(e,t){return[...e,...t].join(",")}function Ax({mask:e,unmask:t,block:n,unblock:r,ignore:o}){const s=["base","iframe[srcdoc]:not([src])"],i=so(e,[".sentry-mask","[data-sentry-mask]"]),a=so(t,[]);return{maskTextSelector:i,unmaskTextSelector:a,blockSelector:so(n,[".sentry-block","[data-sentry-block]",...s]),unblockSelector:so(r,[]),ignoreSelector:so(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function Cx({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 Fd='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',Nx=["content-length","content-type","accept"],Mx=Symbol.for("sentry__originalRequestBody");let $d=!1,Bd=!1;function xx(){if(typeof Request>"u"||Bd)return;const e=Request;try{const t=function(n,r){const o=new e(n,r);return(r==null?void 0:r.body)!=null&&(o[Mx]=r.body),o};t.prototype=e.prototype,U.Request=t,Bd=!0}catch{}}const nD=(e=>new Ox(e));class Ox{constructor({flushMinDelay:t=ZC,flushMaxDelay:n=e1,minReplayDuration:r=i1,maxReplayDuration:o=pd,stickySession:s=!0,useCompression:i=!0,workerUrl:a,_experiments:c={},maskAllText:u=!0,maskAllInputs:f=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:d=750,mutationLimit:p=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:g=[],networkDetailDenyUrls:y=[],networkCaptureBodies:S=!0,networkRequestHeaders:I=[],networkResponseHeaders:v=[],mask:w=[],maskAttributes:T
497=["title","placeholder","aria-label"],unmask:b=[],block:D=[],unblock:N=[],ignore:E=[],maskFn:L,beforeAddRecordingEvent:M,beforeErrorSampling:F,onError:q,attachRawBodyFromRequest:K=!1}={}){this.name="Replay";const G=Ax({mask:w,unmask:b,block:D,unblock:N,ignore:E});if(this._recordingOptions={maskAllInputs:f,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:L,maskInputFn:L,maskAttributeFn:($,x,Z)=>Cx({maskAttributes:T,maskAllText:u,privacyOptions:G,key:$,value:x,el:Z}),...G,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:$=>{try{$.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!c.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,a1),maxReplayDuration:Math.min(o,pd),stickySession:s,useCompression:i,workerUrl:a,blockAllMedia:l,maskAllInputs:f,maskAllText:u,mutationBreadcrumbLimit:d,mutationLimit:p,slowClickTimeout:h,slowClickIgnoreSelectors:m,networkDetailAllowUrls:g,networkDetailDenyUrls:y,networkCaptureBodies:S,networkRequestHeaders:Ud(I),networkResponseHeaders:Ud(v),beforeAddRecordingEvent:M,beforeErrorSampling:F,onError:q,attachRawBodyFromRequest:K,_experiments:c},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Fd}`:Fd,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&mn())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return $d}set _isInitialized(t){$d=t}afterAllSetup(t){!mn()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&xx(),this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(t){return this._replay?this._replay.stop({forceFlush:(t==null?void 0: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){var n;if((n=this._replay)!=null&&n.isEnabled())return this._replay.getSessionId(t)}getRecordingMode(){var t;if((t=this._replay)!=null&&t.isEnabled())return this._replay.recordingMode}processSpan(t){const n=this.getReplayId(!0);n&&(hn(t,{"sentry.replay_id":n}),this.getRecordingMode()==="buffer"&&hn(t,{"sentry._internal.replay_is_buffering":!0}))}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=Px(this._initialOptions,t);this._replay=new kx({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function Px(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},o=Gn(n.replaysSessionSampleRate),s=Gn(n.replaysOnErrorSampleRate);return o==null&&s==null&&Jt(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),o!=null&&(r.sessionSampleRate=o),s!=null&&(r.errorSampleRate=s),r}function Ud(e){return[...Nx,...e.map(t=>t.toLowerCase())]}function rD(){const e=C();return e==null?void 0:e.getIntegrationByName("Replay")}var Lx=Object.defineProperty,Dx=(e,t,n)=>t in e?Lx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hd=(e,t,n)=>Dx(e,typeof t!="symbol"?t+"":t,n);class Fx{constructor(){Hd(this,"idNodeMap",new Map),Hd(this,"nodeMetaMap",new WeakMap)}getId(t){var r;return t?((r=this.getMeta(t))==null?void 0:r.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))}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 $x(){return new Fx}function Bx(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Bc(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Bc(e.parentNode,t,n,r+1)}function Wd(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(Bx(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}const hr=`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 jd={map:{},getId(){return console.error(hr),-1},getNode(){return console.error(hr),null},removeNodeFromMap(){console.error(hr)},has(){return console.error(hr),!1},reset(){console.error(hr)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(jd=new Proxy(jd,{get(e,t,n){return t==="map"&&console.error(hr),Reflect.get(e,t,n)}}));function el(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(i){I_(()=>{n.set.call(this,i)},0),s&&s.set&&s.set.call(this,i)}}),()=>el(e,t,s||{},!0)}function tl(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 Ux(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function pa(e,t,n,r,o){if(!e)return!1;const s=Ux(e);if(!s)return!1;const i=Wd(t,n),a=Bc(s,i);let c=-1;return a<0?!1:(r&&(c=Bc(s,Wd(null,r))),a>-1&&c<0?!0:a<c)}const zd={};function T_(e){const t=zd[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);const s=o.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(o)}catch{}return zd[e]=r.bind(window)}function Mn(...e){return T_("requestAnimationFrame")(...e)}function I_(...e){return T_("setTimeout")(...e)}var Wr=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Wr||{});let zs;function Hx(e){zs=e}const Ka=e=>zs?((...n)=>{try{return e(...n)}catch(r){if(zs&&zs(r)===!0)return()=>{};throw r}}):e;var br="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Wx=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Rs=0;Rs<br.length;Rs++)Wx[br.charCodeAt(Rs)]=Rs;var jx=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=br[t[n]>>2],o+=br[(t[n]&3)<<4|t[n+1]>>4],o+=br[(t[n+1]&15)<<2|t[n+2]>>6],o+=br[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 qd=new Map;function zx(e,t){let n=qd.get(e);return n||(n=new Map,qd.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const w_=(e,t,n)=>{if(!e||!(k_(e,t)||typeof e=="object"))return;const r=e.constructor.name,o=zx(n,r);let s=o.indexOf(e);return s===-1&&(s=o.length,o.push(e)),s};function qs(e,t,n){if(e instanceof Array)return e.map(r=>qs(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=jx(e);return{rr_type:r,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[qs(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:[qs(e.data,t,n),e.width,e.height]};if(k_(e,t)||typeof e=="object"){const r=e.constructor.name,o=w_(e,t,n);return{rr_type:r,index:o}}}}return e}const R_=(e,t,n)=>e.map(r=>qs(r,t,n)),k_=(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 qx(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=tl(t.CanvasRenderingContext2D.prototype,a,function(u){return function(...f){return pa(this.canvas,n,r,o,!0)||I_(()=>{const l=R_(f,t,this);e(this.canvas,{type:Wr["2D"],property:a,args:l})},0),u.apply(this,f)}});s.push(c)}catch{const c=el(t.CanvasRenderingContext2D.prototype,a,{set(u){e(this.canvas,{type:Wr["2D"],property:a,args:[u],setter:!0})}});s.push(c)}return()=>
499{s.forEach(a=>a())}}function Gx(e){return e==="experimental-webgl"?"webgl":e}function Gd(e,t,n,r,o){const s=[];try{const i=tl(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(c,...u){if(!pa(this,t,n,r,!0)){const f=Gx(c);if("__context"in this||(this.__context=f),o&&["webgl","webgl2"].includes(f))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 Vd(e,t,n,r,o,s,i,a){const c=[],u=Object.getOwnPropertyNames(e);for(const f of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(f))try{if(typeof e[f]!="function")continue;const l=tl(e,f,function(d){return function(...p){const h=d.apply(this,p);if(w_(h,a,this),"tagName"in this.canvas&&!pa(this.canvas,r,o,s,!0)){const m=R_(p,a,this),g={type:t,property:f,args:m};n(this.canvas,g)}return h}});c.push(l)}catch{const l=el(e,f,{set(d){n(this.canvas,{type:t,property:f,args:[d],setter:!0})}});c.push(l)}return c}function Vx(e,t,n,r,o,s){const i=[];return i.push(...Vd(t.WebGLRenderingContext.prototype,Wr.WebGL,e,n,r,o,s,t)),typeof t.WebGL2RenderingContext<"u"&&i.push(...Vd(t.WebGL2RenderingContext.prototype,Wr.WebGL2,e,n,r,o,s,t)),()=>{i.forEach(a=>a())}}const Yx='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 Jx(){const e=new Blob([Yx]);return URL.createObjectURL(e)}class Kx{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&&Hx(i),(s&&typeof r=="number"||n)&&(this.worker=this.initFPSWorker()),this.addWindow(o),!n&&Ka(()=>{s&&r==="all"&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),s&&typeof r=="number"&&this.initCanvasFPSObserver()})()}reset(){var t;
499this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(n=>{try{n()}catch{}}),this.restoreHandlers=[],this.windowsSet=new WeakSet,this.windows=[],this.shadowDoms=new Set,(t=this.worker)==null||t.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}Ka(()=>{if(i&&n==="all"&&this.initCanvasMutationObserver(t,r,o,s),i&&typeof n=="number"){const c=Gd(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!=null&&n.skipRequestAnimationFrame){this.takeSnapshot(performance.now(),!0,t);return}Mn(r=>this.takeSnapsh
499ot(r,!0,t))}initFPSWorker(){const t=new Worker(Jx());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:Wr["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,!1),t=Mn(n)};t=Mn(n),this.restoreHandlers.push(()=>{t&&cancelAnimationFrame(t)})}initCanvasMutationObserver(t,n,r,o){const s=Gd(t,n,r,o,!1),i=qx(this.processMutation.bind(this),t,n,r,o),a=Vx(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=>{pa(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,r){const{sampling:o,blockClass:s,blockSelector:i,unblockSelector:a,dataURLOptions:c,maxCanvasSize:u}=this.options,l=1e3/(o==="all"?2:o||2);return this.lastSnapshotTime&&t-this.lastSnapshotTime<l?!1:(this.lastSnapshotTime=t,(r?[r]:this.getCanvasElements(s,i,a)).forEach(h=>{var g;const m=this.mirror.getId(h);if(!(!this.mirror.hasNode(h)||!h.width||!h.height||this.snapshotInProgressMap.get(m))){if(this.snapshotInProgressMap.set(m,!0),!n&&["webgl","webgl2"].includes(h.__context)){const y=h.getContext(h.__context);((g=y==null?void 0:y.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}createImageBitmap(h).then(y=>{var S;(S=this.worker)==null||S.postMessage({id:m,bitmap:y,width:h.width,height:h.height,dataURLOptions:c,maxCanvasSize:u},[y])}).catch(y=>{Ka(()=>{throw this.snapshotInProgressMap.delete(m),y})()})}}),!0)}startPendingCanvasMutationFlusher(){Mn(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,Mn(t)};Mn(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),Mn(()=>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)}}var Tp;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((Tp=e.contentWindow)==null?void 0:Tp.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}$x();var Yd;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Yd||(Yd={}));const Jd={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}}},Xx="ReplayCanvas",ks=1280,Qx=((e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,ks):ks,n?Math.min(n,ks):ks]};let o,s;const i=new Promise(a=>s=a);return{name:Xx,getOptions(){const{quality:a,enableManualSnapshot:c,maxCanvasSize:u}=r;return{enableManualSnapshot:c,recordCanvas:!0,getCanvasManager:f=>{const l=new Kx({...f,enableManualSnapshot:c,maxCanvasSize:u,errorHandler:d=>{try{typeof d=="object"&&(d.__rrweb__=!0)}catch{}}});return o=l,s(l),l},...Jd[a]||Jd.medium}},async snapshot(a,c){(o||await i).snapshot(a,c)}}}),oD=Qx;function Zx(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function A_(e){try{return new URL(e,R.location.origin).href}catch{return}}function eO(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.
499initiatorType==="xmlhttprequest")}function C_(e){try{return new Headers(e)}catch{return}}const N_={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function tO(e,t){const{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:o,enableHTTPTimings:s,tracePropagationTargets:i,onRequestSpanStart:a,onRequestSpanEnd:c}={...N_,...t},u=typeof o=="function"?o:p=>!0,f=p=>rO(p,i),l={},d=e.getOptions().propagateTraceparent;n&&Vi(p=>{const h=IT(p,u,f,l,{propagateTraceparent:d,onRequestSpanEnd:c});if(h){const m=A_(p.fetchData.url),g=m?Wn(m).host:void 0,y=m?gt(m):void 0;h.setAttributes({[kh]:y,[Rn]:y,"server.address":g}),s&&Kd(h,e),a==null||a(h,{headers:p.headers})}}),r&&Fu(p=>{var m;const h=oO(p,u,f,l,d,c);h&&(s&&Kd(h,e),a==null||a(h,{headers:C_((m=p.xhr.__sentry_xhr_v3__)==null?void 0:m.request_headers)}))})}const nO=300;function Kd(e,t){const{url:n}=B(e).data;if(!n||typeof n!="string")return;let r=()=>void setTimeout(o);if(lt(t)){const s=e.end.bind(e);e.end=i=>{const a=i??me();let c=!1;const u=()=>{c||(c=!0,setTimeout(o),s(a),clearTimeout(f))};r=u;const f=setTimeout(u,nO)}}const o=yn("resource",({entries:s})=>{s.forEach(i=>{eO(i)&&i.name.endsWith(n)&&(e.setAttributes(Sg(i)),r())})})}function rO(e,t){const n=_n();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?at(r.toString(),t)||s&&at(r.pathname,t):s}else{const r=!!e.match(/^\/(?!\/)/);return t?at(e,t):r}}function oO(e,t,n,r,o,s){const i=e.xhr,a=i==null?void 0:i[Wt];if(!i||i.__sentry_own_request__||!a)return;const{url:c,method:u}=a,f=Qe()&&t(c);if(e.endTimestamp){const v=i.__sentry_xhr_span_id__;if(!v)return;const w=r[v];w&&(f&&a.status_code!==void 0&&(Ks(w,a.status_code),w.end(),s==null||s(w,{headers:C_(Tg(i)),error:e.error})),delete r[v]);return}const l=A_(c),d=Wn(l||c),p=l?gt(l):void 0,h=gt(nm(c)),m=C(),g=!!Te(),y=g||!!m&<(m),S=f&&y?Ke({name:`${u} ${h}`,attributes:{url:gt(c),type:"xhr","http.method":u,"http.url":p,[Rn]:p,"server.address":d==null?void 0:d.host,[J]:"auto.http.browser",[ce]:"http.client",...(d==null?void 0:d.search)&&{"http.query":d==null?void 0:d.search},...(d==null?void 0:d.hash)&&{"http.fragment":d==null?void 0:d.hash}}}):new Vn,I=Pi(S)&&g?void 0:S;return f&&!y&&(m==null||m.recordDroppedEvent("no_parent_span","span")),i.__sentry_xhr_span_id__=S.spanContext().spanId,r[i.__sentry_xhr_span_id__]=S,n(c)&&sO(i,Qe()&&y?I:void 0,o),m&&m.emit("beforeOutgoingRequestSpan",S,e),S}function sO(e,t,n){const{"sentry-trace":r,baggage:o,traceparent:s}=sm({span:t,propagateTraceparent:n});r&&iO(e,r,o,s)}function iO(e,t,n,r){var s;const o=(s=e.__sentry_xhr_v3__)==null?void 0:s.request_headers;if(!(o!=null&&o["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),r&&!(o!=null&&o.traceparent)&&e.setRequestHeader("traceparent",r),n){const i=o==null?void 0:o.baggage;(!i||!Zx(i))&&e.setRequestHeader("baggage",n)}}catch{}}const Xd=new WeakMap,Qd=new WeakMap,aO=9e4,cO=["text/event-stream","application/x-ndjson","application/stream+json"],uO=()=>({name:"FetchStreamPerformance",setup(){J0(e=>{if(e.response){const t=Xd.get(e.response);if(t&&e.endTimestamp){t.end(e.endTimestamp);const n=Qd.get(e.response);n&&clearTimeout(n)}}}),Vi(e=>{var t,n,r,o;if(e.endTimestamp&&e.response){const s=((t=e.response.headers)==null?void 0:t.get("content-type"))||"";if((n=e.response.headers)!=null&&n.get("content-length")||!cO.some(d=>s.startsWith(d)))return;const i=((r=e.fetchData)==null?void 0:r.url)||"",a=((o=e.fetchData)==null?void 0:o.method)||"GET",c=To(i),u=i.startsWith("data:")?gt(i):c?tm(c):i,f=Ke({name:`${a} ${u}`,startTime:e.endTimestamp,attributes:{url:gt(i),"http.method":a,type:"fetch",[ce]:"http.client.stream",[J]:"auto.http.browser.stream"}});Xd.set(e.response,f);const l=setTimeout(()=>{f.isRecording()&&f.end()},aO);Qd.set(e.response,l)}})}}),M_="WebVitals",lO=(e={})=>{const t=new Set(e.ignore??[]);return{name:M_,setup(n){const r=lt(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=yk({recordClsStandaloneSpans:i,recordLcpStandaloneSpans:a,client:n}),u=new WeakSet;n.on("afterStartPageLoadSpan",f=>{u.add(f)}),n.on("spanEnd",f=>{u.delete(f)&&(c(),kk(f,{recordClsOnPageloadSpan:i===!1,recordLcpOnPageloadSpan:a===!1,spanStreamingEnabled:r}))}),r?(t.has("lcp")||Gk(n),t.has("cls")||Yk(n),t.has("inp")||Kk()):t.has("inp")||Hk()},afterAllSetup(){t.has("inp")||qk()}}};function fO(){R.document?R.document.addEventListener("visibilitychange",()=>{const e=Te();if(!e)return;const t=ve(e);
499if(R.document.hidden&&t){const n="cancelled",{op:r,status:o}=B(t);k&&_.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()}}):k&&_.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const dO=3600,x_="sentry_previous_trace",pO="sentry.previous_trace";function hO(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let o=r?_O():void 0;e.on("spanStart",i=>{if(ve(i)!==i)return;const a=H().getPropagationContext();o=mO(o,i,a),r&&gO(o)});let s=!0;n&&e.on("beforeSampling",i=>{if(!o)return;const a=H(),c=a.getPropagationContext();if(s&&c.parentSpanId){s=!1;return}a.setPropagationContext({...c,dsc:{...c.dsc,sample_rate:String(o.sampleRate),sampled:String(Uc(o.spanContext))},sampleRand:o.sampleRand}),i.parentSampled=Uc(o.spanContext),i.parentSampleRate=o.sampleRate,i.spanAttributes={...i.spanAttributes,[Vp]:o.sampleRate}})}function mO(e,t,n){const r=B(t);function o(){var a,c;try{const u=Number(((a=r.data)==null?void 0:a[Kc])??((c=n.dsc)==null?void 0:c.sample_rate));return Number.isNaN(u)?0:u}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<=dO&&(k&&_.log(`Adding previous_trace \`${JSON.stringify(i)}\` link to span \`${JSON.stringify({op:r.op,...t.spanContext()})}\``),t.addLink({context:i,attributes:{[dS]:"previous_trace"}}),t.setAttribute(pO,`${i.traceId}-${i.spanId}-${Uc(i)?1:0}`)),s)}function gO(e){try{R.sessionStorage.setItem(x_,JSON.stringify(e))}catch(t){k&&_.warn("Could not store previous trace in sessionStorage",t)}}function _O(){var e;try{const t=(e=R.sessionStorage)==null?void 0:e.getItem(x_);return JSON.parse(t)}catch{return}}function Uc(e){return e.traceFlags===1}const yO="BrowserTracing",SO=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function bO(){const e=R.navigator;return e!=null&&e.userAgent?SO.test(e.userAgent):!1}const EO={...Ms,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...N_},rs=((e={})=>{"enableElementTiming"in e&&Jt(()=>{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=R.document,{enableInp:r,enableLongTask:o,enableLongAnimationFrame:s,_experiments:{enableInteractions:i,enableStandaloneClsSpans:a,enableStandaloneLcpSpans:c},beforeStartSpan:u,idleTimeout:f,finalTimeout:l,childSpanTimeout:d,markBackgroundSpan:p,traceFetch:h,traceXHR:m,trackFetchStreamPerformance:g,shouldCreateSpanForRequest:y,enableHTTPTimings:S,ignoreResourceSpans:I,ignorePerformanceApiSpans:v,instrumentPageLoad:w,instrumentNavigation:T,detectRedirects:b,linkPreviousTrace:D,consistentTraceSampling:N,enableReportPageLoaded:E,onRequestSpanStart:L,onRequestSpanEnd:M}={...EO,...e},F=bO();let q,K;function G($,x,Z=!0,O){const V=x.op==="pageload",ne=x.name,te=u?u(x):x,ie=To(O||_n()),Le={...(ie==null?void 0:ie.pathname)&&{[Ch]:ie.pathname},...ie&&!Fi(ie)&&{[Rn]:ie.href},...te.attributes};if(ne!==te.name&&(Le[ue]="custom"),te.attributes=Le,!Z){const dt=er();Ke({...te,startTime:dt}).end(dt);return}t.name=te.name,t.source=Le[ue];const ft=Th(te,{idleTimeout:f,finalTimeout:l,childSpanTimeout:d,disableAutoFinish:V,beforeSpanEnd:dt=>{Rk(dt,{ignoreResourceSpans:I,ignorePerformanceApiSpans:v,spanStreamingEnabled:lt($)}),tp($,void 0);const An=H(),Ft=An.getPropagationContext();An.setPropagationContext({...Ft,traceId:ft.spanContext().traceId,sampled:Lt(ft),dsc:Et(dt)}),V&&(K=void 0)},trimIdleSpanEndTimestamp:!E});V&&E&&(K=ft),tp($,ft);function Dt(){n&&["interactive","complete"].includes(n.readyState)&&($.emit("idleSpanEnableAutoFinish",ft),n.removeEventListener("readystatechange",Dt))}V&&!E&&n&&(n.addEventListener("readystatechange",Dt),Dt())}return{name:yO,setup($){var Z;if(F){k&&_.log("[Tracing] Skipping browserTracingIntegration setup for bot user agent.");return}if(PS(),s&&U.PerformanceObserver&&((Z=PerformanceObserver.supportedEntryTypes)!=null&&Z.includes("long-animation-frame"))?bk():o&&Sk(),i&&Ek(),b&&n){const O=()=>{q=me()};addEventListener("click",O,{capture:!0}),addEventListener("keydown",O,{capture:!0,passive:!0})}function x(){const O=Mo($);O&&!B(O).timestamp&&(k&&_.log(`[Tracing] Finishing current active span with op: ${B(O).op}`),O.setAttribute(So,"cancelled"),O.end())}$.on("startNavigationSpan",(O,V)=>{if(C()!==$)return;if(V!=null&&V.isRedirect){k&&_.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),G($,{op:"navigation.redirect",...O},!1,V.url);return}q=void 0,x();const ne=H();ne.setPropagationContext({traceId:Gt(),sampleRand:Math.random(),propagationSpanId:Qe()?void 0:pn()}),ne.setSDKProcessingMetadata({normalizedRequest:void 0}),G($,{op:"navigation",...O,parentSpan:null,forceTransaction:!0},!0,V==null?void 0:V.url)}),$.on("startPageLoadSpan",(O,V={})=>
499{if(C()!==$)return;x();const ne=V.sentryTrace||Zd("sentry-trace")||ep("sentry-trace"),te=V.baggage||Zd("baggage")||ep("baggage"),ie=rh(ne,te),Le=H();Le.setPropagationContext(ie),Qe()||(Le.getPropagationContext().propagationSpanId=pn()),Le.setSDKProcessingMetadata({normalizedRequest:fi()}),G($,{op:"pageload",...O})}),$.on("endPageloadSpan",()=>{E&&K&&(K.setAttribute(So,"reportPageLoaded"),K.end())})},afterAllSetup($){var Z;if(F)return;$.addIntegration&&!((Z=$.getIntegrationByName)!=null&&Z.call($,M_))&&$.addIntegration(lO({ignore:r?[]:["inp"],_experiments:{enableStandaloneClsSpans:a,enableStandaloneLcpSpans:c}}));let x=_n();if(D!=="off"&&hO($,{linkPreviousTrace:D,consistentTraceSampling:N}),R.location){if(w){const O=we();os($,{name:R.location.pathname,startTime:O?O/1e3:void 0,attributes:{[ue]:"url",[J]:"auto.pageload.browser"}})}T&&ra(({to:O,from:V})=>{if(V===void 0&&(x==null?void 0:x.indexOf(O))!==-1){x=void 0;return}x=void 0;const ne=To(O),te=Mo($),ie=te&&b&&TO(te,q);ss($,{name:(ne==null?void 0:ne.pathname)||R.location.pathname,attributes:{[ue]:"url",[J]:"auto.navigation.browser"}},{url:O,isRedirect:ie})})}p&&fO(),i&&vO($,f,l,d,t),tO($,{traceFetch:h,traceXHR:m,tracePropagationTargets:$.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:y,enableHTTPTimings:S,onRequestSpanStart:L,onRequestSpanEnd:M}),g&&$.addIntegration(uO())}}});function os(e,t,n){e.emit("startPageLoadSpan",t,n),H().setTransactionName(t.name);const r=Mo(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function ss(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=H();return s.setTransactionName(t.name),r&&!o&&s.setSDKProcessingMetadata({normalizedRequest:{...fi(),url:r}}),Mo(e)}function Zd(e){const t=R.document,n=t==null?void 0:t.querySelector(`meta[name=${e}]`);return(n==null?void 0:n.getAttribute("content"))||void 0}function ep(e){var r,o,s;const t=(o=(r=R.performance)==null?void 0:r.getEntriesByType)==null?void 0:o.call(r,"navigation")[0],n=(s=t==null?void 0:t.serverTiming)==null?void 0:s.find(i=>i.name===e);return n==null?void 0:n.description}function vO(e,t,n,r,o){const s=R.document;let i;const a=()=>{const c="ui.action.click",u=Mo(e);if(u){const f=B(u).op;if(["navigation","pageload"].includes(f)){k&&_.warn(`[Tracing] Did not create ${c} span because a pageload or navigation span is in progress.`);return}}if(i&&(i.setAttribute(So,"interactionInterrupted"),i.end(),i=void 0),!o.name){k&&_.warn(`[Tracing] Did not create ${c} transaction because _latestRouteName is missing.`);return}i=Th({name:o.name,op:c,attributes:{[ue]:o.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};s&&addEventListener("click",a,{capture:!0})}const O_="_sentry_idleSpan";function Mo(e){return e[O_]}function tp(e,t){Se(e,O_,t)}const np=1.5;function TO(e,t){const n=B(e),r=er(),o=n.start_timestamp;return!(r-o>np||t&&r-t<=np)}function sD(e=C()){e==null||e.emit("endPageloadSpan")}function iD(e){const t=Te();if(t===e)return;const n=H();e.end=new Proxy(e.end,{apply(r,o,s){return At(n,t),Reflect.apply(r,o,s)}}),At(n,e)}const aD=()=>({name:"SpanStreaming",beforeSetup(e){const t=e.getOptions();t.traceLifecycle||(k&&_.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(!lt(e)){r.traceLifecycle="static",k&&_.warn(`${t} \`traceLifecycle\` to be set to "stream"! ${n}`);return}const o=r.beforeSendSpan;if(o&&!xi(o)){r.traceLifecycle="static",k&&_.warn(`${t} a beforeSendSpan callback using \`withStreamedSpan\`! ${n}`);return}const s=new q0(e);e.on("afterSpanEnd",i=>{Lt(i)&&s.add(Pb(i,e))}),e.on("afterSegmentSpanEnd",i=>{const a=i.spanContext().traceId;setTimeout(()=>{s.flush(a)},500)})}});function jr(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function IO(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=jr(n);return o=>r.then(s=>o(s.transaction(t,"readwrite").objectStore(t)))}function nl(e){return jr(e.getAllKeys())}function wO(e,t,n){return e(r=>nl(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.max(...o,0)+1),jr(r.transaction)}))}function RO(e,t,n){return e(r=>nl(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.min(...o,0)-1),jr(r.transaction)}))}function kO(e){return e(t=>nl(t).then(n=>{const r=n[0];if(r!=null)return jr(t.get(r)).then(o=>(t.delete(r),jr(t.transaction).then(()=>o)))}))}function AO(e){let t;function n(){return t==null&&(t=IO(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{push:async r=>{try{const o=ni(r);await wO(n(),o,e.maxQueueSize||30)}catch{}},unshift:async r=>{try{const o=ni(r);await RO(n(),o,e.maxQueueSize||30)}catch{}},shift:async()=>{try{const r=await kO(n());if(r)return US(r)}catch{}}}}function CO(e){return t=>{const n=e({...t,createStore:AO});return R.addEventListener("online",async r=>{await n.flush()}),n}}function cD(e=Ig){return CO(VE(e))}const rp=1e6,NO="window"in U&&U.window===U&&typeof importScripts>
499"u",jn=String(0),rl=NO?"main":"worker",rt=R.navigator;let P_="",L_="",D_="",Hc=(rt==null?void 0:rt.userAgent)||"",F_="";var Ip;const MO=(rt==null?void 0:rt.language)||((Ip=rt==null?void 0:rt.languages)==null?void 0:Ip[0])||"";function xO(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}const op=rt==null?void 0:rt.userAgentData;xO(op)&&op.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{var t;if(P_=e.platform||"",D_=e.architecture||"",F_=e.model||"",L_=e.platformVersion||"",(t=e.fullVersionList)!=null&&t.length){const n=e.fullVersionList[e.fullVersionList.length-1];Hc=`${n.brand} ${n.version}`}}).catch(e=>{});function OO(e){return!("thread_metadata"in e)}function PO(e){return OO(e)?UO(e):e}function LO(e){var n,r;const t=(r=(n=e.contexts)==null?void 0:n.trace)==null?void 0:r.trace_id;return typeof t=="string"&&t.length!==32&&k&&_.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t!="string"?"":t}function DO(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=LO(r),s=PO(n),i=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:me()*1e3),a=typeof r.timestamp=="number"?r.timestamp*1e3:me()*1e3;return{event_id:e,timestamp:new Date(i).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||Fo,runtime:{name:"javascript",version:R.navigator.userAgent},os:{name:P_,version:L_,build_number:Hc},device:{locale:MO,model:F_,manufacturer:Hc,architecture:D_,is_emulator:!1},debug_meta:{images:B_(n.resources)},profile:s,transactions:[{name:r.transaction||"",id:r.event_id||Ne(),trace_id:o,active_thread_id:jn,relative_start_ns:"0",relative_end_ns:((a-i)*1e6).toFixed(0)}]}}function FO(e,t,n){var i,a;if(e==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${e} instead.`);const r=BO(e),o=t.getOptions(),s=(a=(i=t.getSdkMetadata)==null?void 0:i.call(t))==null?void 0:a.sdk;return{chunk_id:Ne(),client_sdk:{name:(s==null?void 0:s.name)??"sentry.javascript.browser",version:(s==null?void 0:s.version)??"0.0.0"},profiler_id:n||Ne(),platform:"javascript",version:"2",release:o.release??"",environment:o.environment??"production",debug_meta:{images:B_(e.resources)},profile:r}}function $O(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"}:!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 BO(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 f=c;for(;f;)u.push(f.frameId),f=f.parentId===void 0?void 0:e.stacks[f.parentId];n[a]=u}const r=we(),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:jn,timestamp:u}}return{frames:t,stacks:n,samples:i,thread_metadata:{[jn]:{name:rl}}}}function $_(e){return B(e).op==="pageload"}function UO(e){let t,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[jn]:{name:rl}}},o=e.samples[0];if(!o)return r;const s=o.timestamp,i=we(),a=typeof performance.timeOrigin=="number"?performance.timeOrigin:i||0,c=a-(i||a);
499return e.samples.forEach((u,f)=>{if(u.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[f]={elapsed_since_start_ns:((u.timestamp+c-s)*rp).toFixed(0),stack_id:t,thread_id:jn};return}let l=e.stacks[u.stackId];const d=[];for(;l;){d.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 p={elapsed_since_start_ns:((u.timestamp+c-s)*rp).toFixed(0),stack_id:n,thread_id:jn};r.stacks[n]=d,r.samples[f]=p,n++}),r}function HO(e,t){if(!t.length)return e;for(const n of t)e[1].push([{type:"profile"},n]);return e}function WO(e){const t=[];return Yn(e,(n,r)=>{var o,s;if(r==="transaction")for(let i=1;i<n.length;i++){const a=n[i];(s=(o=a==null?void 0:a.contexts)==null?void 0:o.profile)!=null&&s.profile_id&&t.push(n[i])}}),t}function B_(e){const t=C(),n=t==null?void 0:t.getOptions(),r=n==null?void 0:n.stackParser;return r?Ub(r,e):[]}function U_(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?(k&&_.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?(k&&_.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function jO(e){return e.samples.length<2?(k&&_.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):e.frames.length?!0:(k&&_.log("[Profiling] Discarding profile because it contains no frames"),!1)}let ol=!1;const H_=3e4;function zO(e){return typeof e=="function"}function W_(){const e=R.Profiler;if(!zO(e)){k&&_.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}const t=10,n=Math.floor(H_/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch{k&&(_.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),_.log("[Profiling] Disabling profiling for current user session.")),ol=!0}}function sp(e){if(ol)return k&&_.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return k&&_.log("[Profiling] Discarding profile because root span was not sampled."),!1;const t=C(),n=t==null?void 0:t.getOptions();if(!n)return k&&_.log("[Profiling] Profiling disabled, no options found."),!1;const r=n.profilesSampleRate;return U_(r)?r?(r===!0?!0:Math.random()<r)?!0:(k&&_.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):(k&&_.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):(k&&_.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function qO(e){if(ol)return k&&_.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 k&&_.warn("[Profiling] Session not sampled. Invalid `profileLifecycle` option."),!1;const t=e.profileSessionSampleRate;return U_(t)?t?Math.random()<=t:(k&&_.log("[Profiling] Discarding profile because profileSessionSampleRate is not defined or set to 0"),!1):(k&&_.warn("[Profiling] Discarding profile because of invalid profileSessionSampleRate."),!1)}function As(e){return typeof e.profilesSampleRate<"u"}function GO(e,t,n,r){return jO(n)?DO(e,t,n,r):null}const $n=new Map;function VO(){return $n.size}function YO(e){const t=$n.get(e);return t&&$n.delete(e),t}function JO(e,t){if($n.set(e,t),$n.size>30){const n=$n.keys().next().value;n!==void 0&&$n.delete(n)}}const j_=new WeakSet;function wi(e){e.setAttribute("thread.id",jn),e.setAttribute("thread.name",rl)}function ip(e){let t;$_(e)&&(t=me()*1e3);const n=W_();if(!n)return;k&&_.log(`[Profiling] started profiling span: ${B(e).description}`);const r=Ne();let o=null;H().setContext("profile",{profile_id:r,start_timestamp:t}),j_.add(e),wi(e);async function s(){if(e&&n){if(o){k&&_.log("[Profiling] profile for:",B(e).description,"already exists, returning early");return}return n.stop().then(u=>
499{if(i&&(R.clearTimeout(i),i=void 0),k&&_.log(`[Profiling] stopped profiling of span: ${B(e).description}`),!u){k&&_.log(`[Profiling] profiler returned null profile for: ${B(e).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started");return}o=u,JO(r,u)}).catch(u=>{k&&_.log("[Profiling] error while stopping profiler:",u)})}}let i=R.setTimeout(()=>{k&&_.log("[Profiling] max profile duration elapsed, stopping profiling for:",B(e).description),s()},H_);const a=e.end.bind(e);function c(){return e?(s().then(()=>{a()},()=>{a()}),e):a()}e.end=c}const KO=6e4,XO=3e5;class QO{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=qO(t.getOptions());k&&_.log(`[Profiling] Initializing profiler (lifecycle='${n}').`),r||k&&_.log("[Profiling] Session not sampled. Skipping lifecycle profiler initialization."),this._profilerId=Ne(),this._client=t,this._sessionSampled=r,this._lifecycleMode=n,n==="trace"&&this._setupTraceLifecycleListeners(t),t.on("spanStart",o=>{this._isRunning&&wi(o)})}start(){if(this._lifecycleMode==="trace"){k&&_.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.start()` are ignored in trace mode.');return}if(this._isRunning){k&&_.warn("[Profiling] Profile session is already running, `uiProfiler.start()` is a no-op.");return}if(!this._sessionSampled){k&&_.warn("[Profiling] Session is not sampled, `uiProfiler.start()` is a no-op.");return}this._beginProfiling()}stop(){if(this._lifecycleMode==="trace"){k&&_.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.stop()` are ignored in trace mode.');return}if(!this._isRunning){k&&_.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&&(k&&_.log("[Profiling] Detected already active root span during setup. Active root spans now:",r),this._beginProfiling()),this._isRunning&&wi(t)}_beginProfiling(){if(!this._isRunning){if(this._isRunning=!0,k&&_.log("[Profiling] Started profiling with profiler ID:",this._profilerId),Er().setContext("profile",{profiler_id:this._profilerId}),this._startProfilerInstance(),!this._profiler){k&&_.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=>{k&&_.error("[Profiling] Failed to collect current profile chunk on `stop()`:",t)}),this._lifecycleMode==="manual"&&Er().setContext("profile",{}))}_setupTraceLifecycleListeners(t){t.on("spanStart",n=>{if(!this._sessionSampled){k&&_.log("[Profiling] Span not profiled because of negative sampling decision for user session.");return}if(n!==ve(n))return;if(!n.isRecording()){k&&_.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&&(k&&_.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;k&&_.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=>{k&&_.error("[Profiling] Failed to collect current profile chunk on last `spanEnd`:",s)}),this._endProfiling())})}_resetProfilerInfo(){this._isRunning=!1,Er().setContext("profile",{})}
499_clearAllRootSpanTimeouts(){this._rootSpanTimeouts.forEach(t=>clearTimeout(t)),this._rootSpanTimeouts.clear()}_registerTraceRootSpan(t){this._activeRootSpanIds.add(t);const n=setTimeout(()=>this._onRootSpanTimeout(t),XO);this._rootSpanTimeouts.set(t,n)}_startProfilerInstance(){var n;if(((n=this._profiler)==null?void 0:n.stopped)===!1)return;const t=W_();if(!t){k&&_.log("[Profiling] Failed to start JS Profiler.");return}this._profiler=t}_startPeriodicChunking(){this._isRunning&&(this._chunkTimer=setTimeout(()=>{if(this._collectCurrentChunk().catch(t=>{k&&_.error("[Profiling] Failed to collect current profile chunk during periodic chunking:",t)}),this._isRunning){if(this._startProfilerInstance(),!this._profiler){this._resetProfilerInfo();return}this._startPeriodicChunking()}},KO))}_onRootSpanTimeout(t){this._rootSpanTimeouts.has(t)&&(this._rootSpanTimeouts.delete(t),this._activeRootSpanIds.has(t)&&(k&&_.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=FO(n,this._client,this._profilerId),o=$O(r);if("reason"in o){k&&_.log("[Profiling] Discarding invalid profile chunk (this is probably a bug in the SDK):",o.reason);return}this._sendProfileChunk(r),k&&_.log("[Profiling] Collected browser profile chunk.")}catch(n){k&&_.log("[Profiling] Error while stopping JS Profiler for chunk:",n)}}_sendProfileChunk(t){var a;const n=this._client,r=$o((a=n.getSdkMetadata)==null?void 0:a.call(n)),o=n.getDsn(),s=n.getOptions().tunnel,i=ut({event_id:Ne(),sent_at:new Date().toISOString(),...r&&{sdk:r},...!!s&&o&&{dsn:Pt(o)}},[[{type:"profile_chunk",platform:"javascript"},t]]);n.sendEnvelope(i).then(null,c=>{k&&_.error("Error while sending profile chunk envelope:",c)})}}const ZO="BrowserProfiling",eP=(()=>({name:ZO,setup(e){const t=e.getOptions(),n=new QO;if(!As(t)&&!t.profileLifecycle&&(t.profileLifecycle="manual"),As(t)&&!t.profilesSampleRate){k&&_.log("[Profiling] Profiling disabled, no profiling options found.");return}const r=Te(),o=r&&ve(r);if(As(t)&&t.profileSessionSampleRate!==void 0&&k&&_.warn("[Profiling] Both legacy profiling (`profilesSampleRate`) and UI profiling settings are defined. `profileSessionSampleRate` has no effect when legacy profiling is enabled."),As(t))o&&$_(o)&&sp(o)&&ip(o),e.on("spanStart",s=>{const i=ve(s);s===i?sp(s)&&ip(s):j_.has(i)&&wi(s)}),e.on("beforeEnvelope",s=>{var c,u;if(!VO())return;const i=WO(s);if(!i.length)return;const a=[];for(const f of i){const l=f==null?void 0:f.contexts,d=(c=l==null?void 0:l.profile)==null?void 0:c.profile_id,p=(u=l==null?void 0:l.profile)==null?void 0:u.start_timestamp;if(typeof d!="string"){k&&_.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!d){k&&_.log("[Profiling] cannot find profile for a span without a profile context");continue}l!=null&&l.profile&&delete l.profile;const h=YO(d);if(!h){k&&_.log(`[Profiling] Could not retrieve profile for span: ${d}`);continue}const m=GO(d,p,h,f);m&&a.push(m)}HO(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(!Qe(t)){k&&_.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),R.setTimeout(()=>{const i=Te(),a=i&&ve(i);a&&n.notifyRootSpanActive(a)},0)}}}})),uD=eP,tP="SpotlightBrowser",nP=[{op:"ui.interaction.click",name:"#sentry-spotlight"}],rP=((e={})=>{const t=e.sidecarUrl||"http://localhost:8969/stream";return{name:tP,setup:()=>{k&&_.log("Using Sidecar URL",t)},beforeSetup(n){const r=n.getOptions();r.ignoreSpans=[...r.ignoreSpans||[],...nP]},afterAllSetup:n=>{oP(n,t)}}});function oP(e,t){const n=Du("fetch");let r=0;e.on("beforeEnvelope",o=>{if(r>3){_.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",r);return}n(t,{method:"POST",body:ni(o),headers:{"Content-Type":"application/x-sentry-envelope"},mode:"cors"}).then(s=>{s.status>=200&&s.status<400&&(r=0)},s=>
499{r++,_.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/",s)})})}const lD=rP,fD=()=>({name:"LaunchDarkly",processEvent(e,t,n){return Yr(e)}});function dD(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(e,t,n)=>{Jn(e,t.value),Kn(e,t.value)}}}const pD=()=>({name:"OpenFeature",processEvent(e,t,n){return Yr(e)}});class hD{after(t,n){Jn(n.flagKey,n.value),Kn(n.flagKey,n.value)}error(t,n,r){Jn(t.flagKey,t.defaultValue),Kn(t.flagKey,t.defaultValue)}}const mD=({featureFlagClientClass:e})=>({name:"Unleash",setupOnce(){const t=e.prototype;Oe(t,"isEnabled",sP)},processEvent(t,n,r){return Yr(t)}});function sP(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"?(Jn(n,r),Kn(n,r)):k&&_.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}const gD=(({growthbookClass:e})=>bT({growthbookClass:e})),_D=({featureFlagClient:e})=>({name:"Statsig",setup(t){e.on("gate_evaluation",n=>{Jn(n.gate.name,n.gate.value),Kn(n.gate.name,n.gate.value)})},processEvent(t,n,r){return Yr(t)}});async function yD(){const e=C();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 tb(()=>fetch(r,{body:"{}",method:"POST",mode:"cors",credentials:"omit"}))}catch{return"sentry-unreachable"}}const iP="WebWorker",SD=({worker:e})=>({name:iP,setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(t=>ap(t))},addWorker:t=>ap(t)});function ap(e){e.addEventListener("message",t=>{if(cP(t.data)){if(t.stopImmediatePropagation(),t.data._sentryDebugIds&&(k&&_.log("Sentry debugId web worker message received",t.data),R._sentryDebugIds={...t.data._sentryDebugIds,...R._sentryDebugIds}),t.data._sentryModuleMetadata&&(k&&_.log("Sentry module metadata web worker message received",t.data),R._sentryModuleMetadata={...t.data._sentryModuleMetadata,...R._sentryModuleMetadata}),t.data._sentryWasmImages){k&&_.log("Sentry WASM images web worker message received",t.data);const n=R._sentryWasmImages||[],r=t.data._sentryWasmImages.filter(o=>Be(o)&&typeof o.code_file=="string"&&!n.some(s=>s.code_file===o.code_file));R._sentryWasmImages=[...n,...r]}t.data._sentryWorkerError&&(k&&_.log("Sentry worker rejection message received",t.data._sentryWorkerError),aP(t.data._sentryWorkerError))}})}function aP(e){const t=C();if(!t)return;const n=t.getOptions().stackParser,r=t.getOptions().attachStacktrace,o=e.reason,s=kt(o)?kg(o):Ki(n,o,void 0,r,!0);s.level="error",e.filename&&(s.contexts={...s.contexts,worker:{filename:e.filename}}),Ho(s,{originalException:o,mechanism:{handled:!1,type:"auto.browser.web_worker.onunhandledrejection"}}),k&&_.log("Captured worker unhandled rejection",o)}function bD({self:e}){e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0,_sentryModuleMetadata:e._sentryModuleMetadata??void 0}),e.addEventListener("unhandledrejection",t=>{var o;const r={reason:Rg(t),filename:(o=e.location)==null?void 0:o.href};e.postMessage({_sentryMessage:!0,_sentryWorkerError:r}),k&&_.log("[Sentry Worker] Forwarding unhandled rejection to parent",r)}),k&&_.log("[Sentry Worker] Registered worker with unhandled rejection handling")}function cP(e){if(!Be(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&&!(Be(e._sentryDebugIds)||e._sentryDebugIds===void 0)||n&&!(Be(e._sentryModuleMetadata)||e._sentryModuleMetadata===void 0)||r&&!Be(e._sentryWorkerError)||o&&(!Array.isArray(e._sentryWasmImages)||!e._sentryWasmImages.every(s=>Be(s)&&typeof s.code_file=="string")))}function uP(e){return Be(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function ED(e){const t={...e};om(t,"react"),Oh("react",{version:Ae.version});const n=wC(t);return Fp(lP),n}function lP(e){return uP(e)?"[SyntheticEvent]":Cg(e)}function fP(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}function dP(e,t){const n=new WeakSet;
499function 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 z_(e,{componentStack:t},n){if(fP(Ae.version)&&He(e)&&t){const r=new Error(e.message);r.name=`React ErrorBoundary ${e.name}`,r.stack=t,dP(e,r)}return St(e,n)}function vD(e){return(t,n)=>{const r=!!e,o=z_(t,n,{mechanism:{handled:r,type:"auto.function.react.error_handler"}});r&&e(t,n,o)}}const q_="ui.react.render",pP="ui.react.update",G_="ui.react.mount",hP={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},mP={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},gP={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},V_={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},_P=Symbol.for("react.forward_ref"),Y_=Symbol.for("react.memo");function yP(e){return typeof e=="object"&&e!==null&&e.$$typeof===Y_}const sl={};sl[_P]=gP;sl[Y_]=V_;function cp(e){if(yP(e))return V_;const t=e.$$typeof;return t&&sl[t]||hP}const SP=Object.defineProperty.bind(Object),bP=Object.getOwnPropertyNames.bind(Object);var wp;const up=(wp=Object.getOwnPropertySymbols)==null?void 0:wp.bind(Object),lp=Object.getOwnPropertyDescriptor.bind(Object),EP=Object.getPrototypeOf.bind(Object),fp=Object.prototype;function is(e,t,n){if(typeof t!="string"){if(fp){const i=EP(t);i&&i!==fp&&is(e,i)}let r=bP(t);up&&(r=r.concat(up(t)));const o=cp(e),s=cp(t);for(const i of r)if(!mP[i]&&!(s!=null&&s[i])&&!(o!=null&&o[i])&&!lp(e,i)){const a=lp(t,i);if(a)try{SP(e,i,a)}catch{}}}return e}const vP="unknown";class J_ extends Ae.Component{constructor(t){super(t);const{name:n,disabled:r=!1}=this.props;r||(this._mountSpan=Ke({name:`<${n}>`,onlyIfParent:!0,op:G_,attributes:{[J]:"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=me();this._updateSpan=Or(this._mountSpan,()=>Ke({name:`<${this.props.name}>`,onlyIfParent:!0,op:pP,startTime:o,attributes:{[J]:"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=me(),{name:n,includeRender:r=!0}=this.props;if(this._mountSpan&&r){const o=B(this._mountSpan).timestamp;Or(this._mountSpan,()=>{const s=Ke({onlyIfParent:!0,name:`<${n}>`,op:q_,startTime:o,attributes:{[J]:"auto.ui.react.profiler","ui.component_name":n}});s&&s.end(t)})}}render(){return this.props.children}}Object.assign(J_,{defaultProps:{disabled:!1,includeRender:!0,includeUpdates:!0}});function TD(e,t){const n=(t==null?void 0:t.name)||e.displayName||e.name||vP,r=o=>Ae.createElement(J_,{...t,name:n,updateProps:o},Ae.createElement(e,{...o}));return r.displayName=`profiler(${n})`,is(r,e),r}function ID(e,t={disabled:!1,hasRenderSpan:!0}){const[n]=Ae.useState(()=>{if(!(t!=null&&t.disabled))return Ke({name:`<${e}>`,onlyIfParent:!0,op:G_,attributes:{[J]:"auto.ui.react.profiler","ui.component_name":e}})});Ae.useEffect(()=>(n&&n.end(),()=>{if(n&&t.hasRenderSpan){const r=B(n).timestamp,o=me(),s=Ke({name:`<${e}>`,onlyIfParent:!0,op:q_,startTime:r,attributes:{[J]:"auto.ui.react.profiler","ui.component_name":e}});s&&s.end(o)}}),[])}const Me=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,TP="unknown",Xa={componentStack:null,error:null,eventId:null};class IP extends Ae.Component{constructor(t){super(t),this.state=Xa,this._openFallbackReportDialog=!0;const n=C();n&&t.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=n.on("afterSendEvent",r=>{!r.type&&this._lastEventId&&r.event_id===this._lastEventId&&ud({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,n){const{componentStack:r}=n,{beforeCapture:o,onError:s,showDialog:i,dialogOptions:a}=this.props;Ze(c=>{o&&o(c,t,r);const u=this.props.handled!=null?this.props.handled:!!this.props.fallback,f=z_(t,n,{mechanism:{handled:u,type:"auto.function.react.error_boundary"}});s&&s(t,r,f),i&&(this._lastEventId=f,this._openFallbackReportDialog&&ud({...a,eventId:f})),this.setState({error:t,componentStack:r,eventId:f})})}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===Xa?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(Xa)}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"?Ae.createElement(t,{error:r.error,componentStack:r.componentStack,resetError:()=>this.resetErrorBoundary(),eventId:r.eventId}):t;return Ae.isValidElement(o)?o:(t&&Me&&_.warn("fallback did not produce a valid ReactElement"),null)}}function wD(e,t){const n=e.displayName||e.name||TP,r=Ae.memo(o=>Ae.createElement(IP,{...t},Ae.createElement(e,{...o})));return r.displayName=`errorBoundary(${n})`,is(r,e),r}const wP="redux.action",RP="info",kP={attachReduxState:!0,actionTransformer:e=>e,stateTransformer:e=>e||null};function RD(e){const t={...kP,...e};return n=>(r,o)=>{t.attachReduxState&&Er().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 f=a(c,u),l=H(),d=t.actionTransformer(u);typeof d<"u"&&d!==null&&Nt({category:wP,data:d,type:RP});const p=t.stateTransformer(f);if(typeof p<"u"&&p!==null){const m=C(),g=m==null?void 0:m.getOptions(),y=(g==null?void 0:g.normalizeDepth)||3,S={state:{type:"redux",value:p}};Ny(S,3+y),l.setContext("state",S)}else l.setContext("state",null);const{configureScopeWithState:h}=t;return typeof h=="function"&&h(l,f),f}}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 kD(e){const t=rs({...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&&R.location&&dp(r,R.location,o,(c,u="url")=>{os(a,{name:c,attributes:{[ce]:"pageload",[J]:"auto.pageload.react.reactrouter_v3",[ue]:u,...u==="route"&&{[Xe]:c}}})}),i&&n.listen&&n.listen(c=>{(c.action==="PUSH"||c.action==="POP")&&dp(r,c,o,(u,f="url")=>{ss(a,{name:u,attributes:{[ce]:"navigation",[J]:"auto.navigation.react.reactrouter_v3",[ue]:f,...f==="route"&&{[Xe]:u}}})})})}}}function dp(e,t,n,r){let o=t.pathname;n({location:t,routes:e},(s,i,a)=>
499{if(s||!a)return r(o);const c=AP(a.routes||[]);return c.length===0||c==="/*"?r(o):(o=c,r(o,"route"))})}function AP(e){var r;if(!Array.isArray(e)||e.length===0)return"";const t=e.filter(o=>!!o.path);let n=-1;for(let o=t.length-1;o>=0;o--)if((r=t[o].path)!=null&&r.startsWith("/")){n=o;break}return t.slice(n).reduce((o,{path:s})=>{const i=o==="/"||o===""?s:`/${s}`;return`${o}${i}`},"")}function AD(e,t={}){const n=e,r=rs({...t,instrumentNavigation:!1,instrumentPageLoad:!1}),{instrumentPageLoad:o=!0,instrumentNavigation:s=!0}=t;return{...r,afterAllSetup(i){var f;r.afterAllSetup(i);const a=(l,d)=>{const p=n.matchRoutes(l,d,{preload:!1,throwOnError:!1}),h=p[p.length-1];return(h==null?void 0:h.routeId)!=="__root__"?h:void 0},c=(l,d,p,h)=>{l.updateName(d?d.routeId:h),l.setAttribute(ue,d?"route":"url"),l.setAttributes({...d&&{[Xe]:d.routeId},...CP(n,p),...Qa(d)})},u=R.location;if(o&&u){const l=(f=n.state)==null?void 0:f.location,d=l?a(l.pathname,l.search):a(u.pathname,n.options.parseSearch(u.search)),p=os(i,{name:d?d.routeId:u.pathname,attributes:{[ce]:"pageload",[J]:"auto.pageload.react.tanstack_router",[ue]:d?"route":"url",...d&&{[Xe]:d.routeId},...Qa(d)}}),h=n.subscribe("onResolved",m=>{if(h(),!p)return;const{toLocation:g}=m,y=a(g.pathname,g.search);c(p,y,g,g.pathname)})}if(s){let l;n.subscribe("onBeforeLoad",d=>{var y;const{toLocation:p,fromLocation:h}=d;if(!h||p.state===h.state)return;const m=a(p.pathname,p.search),g=((y=R.location)==null?void 0:y.pathname)||p.pathname;if(l){c(l,m,p,g);return}l=ss(i,{name:m?m.routeId:g,attributes:{[ce]:"navigation",[J]:"auto.navigation.react.tanstack_router",[ue]:m?"route":"url",...m&&{[Xe]:m.routeId},...Qa(m)}},{url:K_(n,p)})}),n.subscribe("onResolved",d=>{var g;const p=l;if(l=void 0,!p)return;const{toLocation:h}=d,m=a(h.pathname,h.search);m&&c(p,m,h,((g=R.location)==null?void 0:g.pathname)||h.pathname)})}}}}function K_(e,t){var o,s;const n=((s=(o=e.options).stringifySearch)==null?void 0:s.call(o,t.search))??"",r=`${t.pathname}${n&&n!=="?"?n:""}`;return lA(r)}function CP(e,t){const n=K_(e,t);return{[Ch]:t.pathname,[Rn]:n}}function Qa(e){if(!e)return{};const t={};return Object.entries(e.params).forEach(([n,r])=>{t[`url.path.params.${n}`]=r,t[`${xb}.${n}`]=r,t[`${Rb}.${n}`]=r}),t}function CD(e){const t=rs({...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),X_(a,s,i,n,"reactrouter_v4",r,o)}}}function ND(e){const t=rs({...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),X_(a,s,i,n,"reactrouter_v5",r,o)}}}function X_(e,t,n,r,o,s=[],i){function a(){if(r.location)return r.location.pathname;if(R.location)return R.location.pathname}function c(u){if(s.length===0||!i)return[u,"url"];const f=Q_(s,u,i);for(const l of f)if(l.match.isExact)return[l.match.path,"route"];return[u,"url"]}if(t){const u=a();if(u){const[f,l]=c(u);os(e,{name:f,attributes:{[ce]:"pageload",[J]:`auto.pageload.react.${o}`,[ue]:l,...l==="route"&&{[Xe]:f}}})}}n&&r.listen&&r.listen((u,f)=>{if(f&&(f==="PUSH"||f==="POP")){const[l,d]=c(u.pathname);ss(e,{name:l,attributes:{[ce]:"navigation",[J]:`auto.navigation.react.${o}`,[ue]:d,...d==="route"&&{[Xe]:l}}})}})}function Q_(e,t,n,r=[]){return e.some(o=>{const s=o.path?n(t,o):r.length?r[r.length-1].match:NP(t);return s&&(r.push({route:o,match:s}),o.routes&&Q_(o.routes,t,n,r)),!!s}),r}function NP(e){return{path:"/",url:"/",params:{},isExact:e==="/"}}function MD(e){const t=e.displayName||e.name,n=r=>{var o;if((o=r==null?void 0:r.computedMatch)!=null&&o.isExact){const s=r.computedMatch.path,i=MP();H().setTransactionName(s),i&&(i.updateName(s),i.setAttributes({[ue]:"route",[Xe]:s}))}return Ae.createElement(e,{...r})};return n.displayName=`sentryRoute(${t})`,is(n,e),n}function MP(){const e=Te(),t=e&&ve(e);if(!t)return;const n=B(t).op;return n==="navigation"||n==="pageload"?t:void 0}function to(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 pp=new WeakMap;function xP(e,t,n){if(!e||!(t!=null&&t.length))return null;const r=n?to(e,n):e;let o=pp.get(t);o||(o=$P(t),pp.set(t,o),Me&&_.log("[React Router] Sorted route manifest by specificity:",o.length,"patterns"));for(const s of o)if(OP(r,s))return Me&&_.log("[React Router] Matched pathname",r,"to pattern",s),s;return Me&&_.log("[React Router] No manifest match found for pathname:",r),null}function OP(e,t){if(t==="/")return e==="/"||e==="";const n=mp(e),r=mp(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(!hp(n[i],a))return!1;return!0}if(n.length!==r.length)return!1;for(const[s,i]of r.entries())if(!hp(n[s],i))return!1;return!0}function hp(e,t){return e===void 0||t===void 0?!1:Z_.test(t)?!0:e===t}
499function mp(e){return e.split("/").filter(Boolean)}const Z_=/^:[\w-]+$/,PP=10,LP=3,DP=1,FP=-2;function gp(e){const t=e.split("/");let n=t.length;t.includes("*")&&(n+=FP);for(const r of t)r!=="*"&&(Z_.test(r)?n+=LP:r===""?n+=DP:n+=PP);return n}function $P(e){return[...e].sort((t,n)=>{const r=gp(t);return gp(n)-r})}let ha,zn=!1;const ln=[],BP=10;function UP(e,t){const n={};return ln.length>=BP&&(Me&&_.warn("[React Router] Navigation context stack overflow - removing oldest context"),ln.shift()),ln.push({token:n,targetPath:e,span:t}),n}function HP(e){const t=ln[ln.length-1];(t==null?void 0:t.token)===e&&ln.pop()}function ey(){const e=ln.length;return e>0?ln[e-1]??null:null}function WP(e,t=!1){ha=e,zn=t}function jP(e){return ny(e.route.path||"")}function ty(e){return e.params["*"]||""}function ny(e){return e[e.length-1]==="*"?e.slice(0,-1):e}function qn(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function ry(e){return e.endsWith("*")}function bn(e){return e.includes("/*")||e.endsWith("*")}function _p(e,t){var n;return ry(e)&&!!((n=t.route.children)!=null&&n.length)||!1}function oy(e){var t;return!!(!e.children&&e.element&&((t=e.path)!=null&&t.endsWith("/*")))}function zP(e,t,n){const r=e&&e.length>0?e:zn?to(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 yp(e){return e.split(/\\?\//).filter(t=>t.length>0&&t!==",").length}function on(e){return e[0]==="/"?e:`/${e}`}function il(e,t){const n=ha(e,t);if(!n||n.length===0)return"";for(const r of n)if(r.route.path&&r.route.path!=="*"){const o=jP(r),s=to(t.pathname,on(r.pathnameBase));return t.pathname===s?qn(s):qn(qn(o||"")+on(il(e.filter(i=>i!==r.route),{pathname:s})))}return""}function qP(e,t,n){const r=t.filter(oy);if(!r.length)return;const o=ha(r,e),s=o==null?void 0:o[o.length-1];if(!s||!ty(s))return;const i=qn(ny(s.route.path||""));if(!i)return;const a=on(i),c=i.split("/")[0],u=(c==null?void 0:c.startsWith(":"))&&(n==null?void 0:n.split("/").includes(c));if(n===a||n!=null&&n.startsWith(`${a}/`)||u)return;const f=to(e.pathname,on(s.pathnameBase))||"/",l=il(t.filter(d=>d!==s.route),{pathname:f});return l?on(`${i}${on(l)}`):void 0}function GP(e,t){const n=ha(t,e);if(n){for(const r of n)if(oy(r.route)&&ty(r))return!0}return!1}function Sp(e,t){return zn?to(e.pathname,t):e.pathname||""}function VP(e,t,n,r=""){if(!e||e.length===0)return[zn?to(t.pathname,r):t.pathname,"url"];if(!n)return[Sp(t,r),"url"];let o="";for(const s of n){const i=s.route;if(!i)continue;if(i.index)return zP(o,s.pathname,r);const a=i.path;if(!a||_p(a,s))continue;const c=a[0]==="/"||o[o.length-1]==="/"?a:`/${a}`;if(o=qn(o)+on(c),qn(t.pathname)===qn(r+s.pathname))return yp(o)!==yp(s.pathname)&&!ry(o)?[(zn?"":r)+c,"route"]:(_p(o,s)&&(o=o.slice(0,-1)),[(zn?"":r)+o,"route"])}return[Sp(t,r),"url"]}function ma(e,t,n,r,o="",s,i){if(i&&s&&s.length>0){const l=xP(e.pathname,s,o);if(l)return[(zn?"":o)+l,"route"]}let a,c="url";const u=GP(e,n);u&&(a=on(il(n,e)),c="route"),(!u||!a)&&([a,c]=VP(t,e,r,o));const f=qP(e,n,a);return f?[f,"route"]:[a||e.pathname,c]}function Mt(){const e=Te(),t=e?ve(e):void 0;if(!t)return;const n=B(t).op;return n==="navigation"||n==="pageload"?t:void 0}function YP(){const e=ey();if(e)return e.targetPath?{pathname:e.targetPath,search:"",hash:"",state:null,key:"default"}:null;if(typeof R<"u")try{const t=R.location;if(t)return{pathname:t.pathname,search:t.search||"",hash:t.hash||"",state:null,key:"default"}}catch{Me&&_.warn("[React Router] Could not access window.location")}return null}function JP(){const e=ey();return e?e.span:Mt()}function KP(e,t,n,r){const o=new Proxy(e,{apply(s,i,a){const c=YP(),u=JP(),f=s.apply(i,a);return XP(f,t,n,r,c,u),f}});return Se(o,"__sentry_proxied__",!0),o}function XP(e,t,n,r,o,s){Tn(e)?e.then(i=>{Array.isArray(i)&&r(i,t,o??void 0,s)}).catch(i=>{Me&&_.warn(`Error resolving async handler '${n}' for route`,t,i)}):Array.isArray(e)&&r(e,t,o??void 0,s)}function ga(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]=KP(r,e,n,t))}if(Array.isArray(e.children))for(const n of e.children)ga(n,t)}let zr,fn,dn,Gs,ct,kn=!1,Bn=3e3,as,al="";
499const sy=new WeakSet,Ri=R!=null&&R.document?Ae.useLayoutEffect:Ae.useEffect,Ln=new WeakMap,Ce=new Set,Vs=new WeakMap,Wc=new WeakMap;function QP(e){return R!=null&&R.requestAnimationFrame?R.requestAnimationFrame(e):setTimeout(e,0)}function bp(e){R!=null&&R.cancelAnimationFrame?R.cancelAnimationFrame(e):clearTimeout(e)}function iy(e){return`${e.pathname}${e.search||""}${e.hash||""}`}function Ep(e){return e.includes(":")||e.includes("*")}function ZP(e,t,n,r){var s;if(!e)return{skip:!1,shouldUpdate:!1};if(e.locationKey===t&&(e.isPlaceholder||!r)){const i=!!e.routeName&&bn(e.routeName),a=bn(n),c=!!e.routeName&&Ep(e.routeName),u=Ep(n),f=i&&!a,l=!c&&u,d=n!==e.routeName&&n.length>(((s=e.routeName)==null?void 0:s.length)||0)&&!a;return{skip:!0,shouldUpdate:!!(e.routeName&&(f||l||d))}}return{skip:!1,shouldUpdate:!1}}function ay(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 cy(e,t){let n=Vs.get(e);n||(n=new Set,Vs.set(e,n)),n.add(t),t.finally(()=>{const r=Vs.get(e);r&&r.delete(t)})}function uy(e){const t=new Promise(n=>{Wc.set(e,n)});cy(e,t)}function eL(e){const t=Wc.get(e);t&&(t(),Wc.delete(e),e.__sentry_may_have_lazy_routes__&&(e.__sentry_may_have_lazy_routes__=!1))}function cl(e,t,n=null,r){e.forEach(s=>{Ce.add(s),kn&&ga(s,cl)}),t&&ay(e,t);const o=r??Mt();if(o){const s=B(o);if(s.timestamp){Me&&_.warn("[React Router] Lazy handler resolved after span ended - skipping update");return}const i=s.op;let a=n;if(!a&&!r&&typeof R<"u"){const c=R.location;c!=null&&c.pathname&&(a={pathname:c.pathname})}a&&(i==="pageload"?us({activeRootSpan:o,location:{pathname:a.pathname},routes:Array.from(Ce),allRoutes:Array.from(Ce)}):i==="navigation"&&jc(o,a,Array.from(Ce),!1,ct))}}function jc(e,t,n,r=!1,o){var f;const s=B(e),i=s.description,a=e==null?void 0:e.__sentry_navigation_name_set__,c=i&&bn(i);if((!a||r||c)&&!s.timestamp){const l=o(n,t),[d,p]=ma(t,n,n,l||[],al,as,kn),h=(f=s.data)==null?void 0:f[ue];d&&(!i||!a&&(h!=="route"||p==="route")||h!=="route"&&p==="route"||h==="route"&&p==="route"&&c)&&(e.updateName(d),e.setAttribute(ue,p),p==="route"&&e.setAttribute(Xe,d),!bn(d)&&p==="route"&&Se(e,"__sentry_navigation_name_set__",!0))}}function ly(e,t,n,r,o){let s=!1,i=!!o&&B(o).op==="pageload",a=!1,c=null,u=null;e.subscribe(f=>{if(!s){const d=Mt();d&&B(d).op==="pageload"?i=!0:i&&(f.historyAction==="POP"&&!a?a=!0:s=!0)}if(f.historyAction==="PUSH"||f.historyAction==="POP"&&s){const d=iy(f.location),p=()=>{u!==d&&(u=d,c=null,pl({location:f.location,routes:t,navigationType:f.historyAction,version:n,basename:r,allRoutes:Array.from(Ce)}))};f.navigation.state!=="idle"?(u!==d&&(u=null),c!==null&&bp(c),c=QP(p)):(c!==null&&(bp(c),c=null),p())}})}function ul(e,t){return!zr||!fn||!dn||!ct?(Me&&_.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(cs(n),kn)for(const u of n)ga(u,cl);const o=Mt();r&&"patchRoutesOnNavigation"in r&&typeof r.patchRoutesOnNavigation=="function"&&o&&(Se(o,"__sentry_may_have_lazy_routes__",!0),uy(o));const i=fy(r,!1,o),a=e(n,i),c=r==null?void 0:r.basename;return a.state.historyAction==="POP"&&o&&us({activeRootSpan:o,location:a.state.location,routes:n,basename:c,allRoutes:Array.from(Ce)}),al=c||"",ly(a,n,t,c,o),a}}function ll(e,t){return!zr||!fn||!dn||!ct?(Me&&_.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(cs(n),kn)for(const g of n)ga(g,cl);const o=Mt();r&&"patchRoutesOnNavigation"in r&&typeof r.patchRoutesOnNavigation=="function"&&o&&(Se(o,"__sentry_may_have_lazy_routes__",!0),uy(o));const i=fy(r,!0,o),a=e(n,i),c=r==null?void 0:r.basename;let u;const f=r==null?void 0:r.initialEntries,l=r==null?void 0:r.initialIndex,d=(f==null?void 0:f.length)===1,p=l!==void 0&&(f==null?void 0:f[l]);u=d?f[0]:p?f[l]:void 0;const h=u?typeof u=="string"?{pathname:u}:u:a.state.location,m=Mt();return a.state.historyAction==="POP"&&m&&us({activeRootSpan:m,location:h,routes:n,basename:c,allRoutes:Array.from(Ce)}),al=c||"",ly(a,n,t,c,m),a}}function fl(e,t){const n=rs({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{useEffect:r,useLocation:o,useNavigationType:s,createRoutesFromChildren:i,matchRoutes:a,stripBasename:c,enableAsyncRouteHandlers:u=!1,instrumentPageLoad:f=!0,instrumentNavigation:l=!0,lazyRouteTimeout:d,lazyRouteManifest:p}=e;return{...n,setup(h){n.setup(h);const m=e.finalTimeout??3e4,g=(e.idleTimeout??1e3)*3,y=d??g;y===1/0?(Bn=m,Me&&_.log("[React Router] lazyRouteTimeout set to Infinity, capping at finalTimeout:",m,"ms to prevent indefinite hangs")):Number.isNaN(y)?(Me&&_.warn("[React Router] lazyRouteTimeout must be a number, falling back to default:",g),Bn=g):y<0?(Me&&_.warn("[React Router] lazyRouteTimeout must be non-negative or Infinity, got:",y,"falling back to:",g),Bn=g):Bn=y,zr=r,fn=o,dn=s,ct=a,Gs=i,kn=u,as=p,WP(a,c||!1)},afterAllSetup(h){var g;n.afterAllSetup(h);const m=(g=R.location)==null?void 0:g.pathname;f&&m&&os(h,{name:m,attributes:{[ue]:"url",[ce]:"pageload",[J]:`auto.pageload.react.reactrouter${t?`_v${t}`:""}`}}),l&&sy.add(h)}}}
499function dl(e,t){if(!zr||!fn||!dn||!ct)return Me&&_.warn("reactRouterV6Instrumentation was unable to wrap `useRoutes` because of one or more missing parameters."),e;const n=r=>{const o=Ae.useRef(!0),{routes:s,locationArg:i}=r,a=e(s,i),c=fn(),u=dn(),f=typeof i=="string"||i!=null&&i.pathname?i:c;return Ri(()=>{const l=cs(s);return()=>dy(l)}),Ri(()=>{const l=typeof f=="string"?{pathname:f}:f;o.current?(us({activeRootSpan:Mt(),location:l,routes:s,allRoutes:Array.from(Ce)}),o.current=!1):pl({location:l,routes:s,navigationType:u,version:t,allRoutes:Array.from(Ce)})},[u,f]),a};return(r,o)=>Ae.createElement(n,{routes:r,locationArg:o})}function fy(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==null?void 0:o.path,i=Mt()??n;if(!t){const c=o==null?void 0:o.patch,u=o==null?void 0:o.matches;c&&(o.patch=(f,l)=>{if(cs(l),u&&u.length>0){const p=u[u.length-1],h=p==null?void 0:p.route;if(h){const m=Array.from(Ce).find(g=>{const y=g.id!==void 0&&g.id===f,S=g===h,I=g.path!==void 0&&h.path!==void 0&&g.path===h.path;return y||S||I});m&&ay(l,m)}}const d=i?B(i):void 0;return s&&i&&d&&!d.timestamp&&d.op==="navigation"&&jc(i,{pathname:s,search:"",hash:"",state:null,key:"default"},Array.from(Ce),!0,ct),c(f,l)})}const a=(async()=>{const c=UP(s,i);let u;try{u=await r(o)}finally{HP(c),i&&eL(i)}const f=i?B(i):void 0;if(i&&f&&!f.timestamp&&f.op==="navigation"){const l=s;l&&jc(i,{pathname:l,search:"",hash:"",state:null,key:"default"},Array.from(Ce),!1,ct)}return u})();return i&&cy(i,a),a}}}function pl(e){const{location:t,routes:n,navigationType:r,version:o,matches:s,basename:i,allRoutes:a}=e,c=Array.isArray(s)?s:ct(a||n,t,i),u=C();if(!u||!sy.has(u))return;const f=Mt();if(!(f&&B(f).op==="pageload"&&r==="POP")&&(r==="PUSH"||r==="POP")&&c){const[l,d]=ma(t,a||n,a||n,c,i,as,kn),p=iy(t),h=Ln.get(u),m=h&&!h.isPlaceholder?!!B(h.span).timestamp:!1,{skip:g,shouldUpdate:y}=ZP(h,p,l,m);if(g){if(y&&h){const w=h.routeName;h.isPlaceholder?(h.routeName=l,Me&&_.log(`[Tracing] Updated placeholder navigation name from "${w}" to "${l}" (will apply to real span)`)):(h.span.updateName(l),h.span.setAttribute(ue,d),d==="route"&&h.span.setAttribute(Xe,l),Se(h.span,"__sentry_navigation_name_set__",!0),h.routeName=l,Me&&_.log(`[Tracing] Updated navigation span name from "${w}" to "${l}"`))}else Me&&_.log(`[Tracing] Skipping duplicate navigation for location: ${p}`);return}const I={span:{end:()=>{}},routeName:l,pathname:t.pathname,locationKey:p,isPlaceholder:!0};Ln.set(u,I);let v;try{v=ss(u,{name:I.routeName,attributes:{[ue]:d,[ce]:"navigation",[J]:`auto.navigation.react.reactrouter${o?`_v${o}`:""}`,...d==="route"&&{[Xe]:I.routeName}}})}catch(w){throw Ln.delete(u),w}v?(Ln.set(u,{span:v,routeName:I.routeName,pathname:t.pathname,locationKey:p}),zc(v,t,n,i,"navigation")):Ln.delete(u)}}function cs(e){const t=[];return e.forEach(n=>
499{py(n).forEach(o=>{Ce.add(o),t.push(o)})}),t}function dy(e){e.forEach(t=>{Ce.delete(t)})}function py(e,t=new Set){return t.has(e)||(t.add(e),e.children&&!e.index&&e.children.forEach(n=>{py(n,t).forEach(o=>{t.add(o)})})),t}function us({activeRootSpan:e,location:t,routes:n,matches:r,basename:o,allRoutes:s}){const i=Array.isArray(r)?r:ct(s||n,t,o);if(i){const[a,c]=ma(t,s||n,s||n,i,o,as,kn);H().setTransactionName(a||"/"),e&&(e.updateName(a),e.setAttribute(ue,c),c==="route"&&e.setAttribute(Xe,a),zc(e,t,n,o,"pageload"))}else e&&zc(e,t,n,o,"pageload")}function tL(e,t,n,r,o=!1){return n?!!(!e&&o||e&&bn(e)&&r==="route"&&!bn(n)||t!=="route"&&r==="route"):!1}function Za(e,t,n,r,o,s,i,a){var c;try{const u=(c=t.data)==null?void 0:c[ue];if(u==="route"&&n&&!bn(n))return;const f=Array.from(a),l=f.length>0?f:o,d=ct(l,r,s);if(!d)return;const[p,h]=ma(r,l,l,d,s,as,kn),m=tL(n,u,p,h,!0),g=i==="pageload"||!t.timestamp;m&&g&&(e.updateName(p),e.setAttribute(ue,h),h==="route"&&e.setAttribute(Xe,p))}catch(u){Me&&_.warn(`Error updating span details before ending: ${u}`)}}function zc(e,t,n,r,o){const s=`__sentry_${o}_end_patched__`;if((e==null?void 0:e[s])||!e.end)return;const a=e.end.bind(e);let c=!1;e.end=function(...f){var v;if(c)return;c=!0;const l=f.length>0?f[0]:Date.now()/1e3,d=B(e),p=d.description,h=(v=d.data)==null?void 0:v[ue],m=()=>{const w=C();if(w&&o==="navigation"){const T=Ln.get(w);T&&T.span===e&&Ln.delete(w)}},g=Vs.get(e),y=e.__sentry_may_have_lazy_routes__;if((g&&g.size>0||y)&&p&&(bn(p)||h!=="route")){if(Bn===0){Za(e,d,p,t,n,r,o,Ce),m(),a(l);return}const w=new Promise(b=>setTimeout(b,Bn));let T;if(g&&g.size>0){const b=Promise.allSettled(g).then(()=>{});T=Bn===1/0?b:Promise.race([b,w])}else T=w;T.then(()=>{const b=B(e);Za(e,b,b.description,t,n,r,o,Ce),m(),a(l)}).catch(()=>{m(),a(l)});return}Za(e,d,p,t,n,r,o,Ce),m(),a(l)},Se(e,s,!0)}function hl(e,t){if(!zr||!fn||!dn||!Gs||!ct)return Me&&_.warn(`reactRouterV6Instrumentation was unable to wrap Routes because of one or more missing parameters. 500 useEffect: ${zr}. useLocation: ${fn}. useNavigationType: ${dn}. 501 createRoutesFromChildren: ${Gs}. matchRoutes: ${ct}.`),e;const n=r=>{const o=Ae.useRef(!0),s=fn(),i=dn(),a=Gs(r.children);return Ri(()=>{const c=cs(a);return()=>dy(c)}),Ri(()=>{o.current?(us({activeRootSpan:Mt(),location:s,routes:a,allRoutes:Array.from(Ce)}),o.current=!1):pl({location:s,routes:a,navigationType:i,version:t,allRoutes:Array.from(Ce)})},[s,i]),Ae.createElement(e,{...r})};return is(n,e),n}function xD(e){return fl(e,"6")}function OD(e){return dl(e,"6")}function PD(e){return ul(e,"6")}function LD(e){return ll(e,"6")}function DD(e){return hl(e,"6")}function FD(e){return fl(e,"7")}function $D(e){return hl(e,"7")}function BD(e){return ul(e,"7")}function UD(e){return ll(e,"7")}function HD(e){return dl(e,"7")}function WD(e){return fl(e,"")}function jD(e){return hl(e,"")}function zD(e){return ul(e,"")}function qD(e){return ll(e,"")}function GD(e){return dl(e,"")}export{MR as BrowserClient,IP as ErrorBoundary,Na as MULTIPLEXED_TRANSPORT_EXTRA_KEY,hD as OpenFeatureIntegrationHook,J_ as Profiler,sn as SDK_VERSION,ce as SEMANTIC_ATTRIBUTE_SENTRY_OP,J as SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,Kc as SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,ue as SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,Ct as Scope,R as WINDOW,Nt as addBreadcrumb,eE as addEventProcessor,Kl as addIntegration,cL as bindScopeToEmitter,UA as breadcrumbsIntegration,XA as browserApiErrorsIntegration,uD as browserProfilingIntegration,rC as browserSessionIntegration,rs as browserTracingIntegration,dD as buildLaunchDarklyFlagUsedHandler,vL as captureConsoleIntegration,Ho as captureEvent,St as captureException,MT as captureFeedback,Xb as captureMessage,z_ as captureReactException,Ia as captureSession,IA as chromeStackLineParser,yL as close,NL as consoleLoggingIntegration,QL as contextLinesIntegration,aL as continueTrace,xL as createConsolaReporter,Fm as createLangChainCallbackHandler,RD as createReduxEnhancer,NE as createTransport,VL as createUserFeedbackEnvelope,iC as cultureContextIntegration,Mv as dedupeIntegration,N_ as defaultRequestInstrumentationOptions,LA as defaultStackLineParsers,DA as defaultStackParser,yD as diagnoseSdkConnectivity,WL as elementTimingIntegration,Ph as endSession,dv as eventFiltersIntegration,RR as eventFromException,kR as eventFromMessage,Cu as exceptionFromError,TL as extraErrorDataIntegration,AL as featureFlagsIntegration,UL as feedbackAsyncIntegration,HL as feedbackIntegration,HL as feedbackSyncIntegration,uO as fetchStreamPerformanceIntegration,_L as flush,YL as forceLoad,uv as functionToStringIntegration,AA as geckoStackLineParser,lA as getAbsoluteUrl,Te as getActiveSpan,C as getClient,H as getCurrentScope,IC as getDefaultIntegrations,BL as getFeedback,Er as getGlobalScope,be as getIsolationScope,rD as getReplay,ve as getRootSpan,Ns as getSpanDescendants,hS as getSpanStatusFromHttpCode,sm as getTraceData,uC as globalHandlersIntegration,ZL as graphqlClientIntegration,gD as growthbookIntegration,
501XL as httpClientIntegration,hC as httpContextIntegration,pv as inboundFiltersIntegration,ED as init,PL as instrumentAnthropicAiClient,FL as instrumentCreateReactAgent,LL as instrumentGoogleGenAIClient,DL as instrumentLangChainEmbeddings,$L as instrumentLangGraph,OL as instrumentOpenAiClient,tO as instrumentOutgoingRequests,U0 as instrumentStateGraph,tT as instrumentSupabaseClient,bO as isBotUserAgent,Zb as isEnabled,SL as isInitialized,Qb as lastEventId,fD as launchDarklyIntegration,yR as lazyLoadIntegration,SC as linkedErrorsIntegration,CL as logger,cD as makeBrowserOfflineTransport,Ig as makeFetchTransport,bL as makeMultiplexedTransport,ML as metrics,EL as moduleMetadataIntegration,Cg as normalizeStringifyValue,JL as onLoad,pD as openFeatureIntegration,qL as opera10StackLineParser,GL as opera11StackLineParser,tv as parameterize,vD as reactErrorHandler,WD as reactRouterBrowserTracingIntegration,kD as reactRouterV3BrowserTracingIntegration,CD as reactRouterV4BrowserTracingIntegration,ND as reactRouterV5BrowserTracingIntegration,xD as reactRouterV6BrowserTracingIntegration,FD as reactRouterV7BrowserTracingIntegration,PS as registerSpanErrorInstrumentation,bD as registerWebWorker,oD as replayCanvasIntegration,nD as replayIntegration,sD as reportPageLoaded,KL as reportingObserverIntegration,IL as rewriteFramesIntegration,Ew as sendFeedback,iD as setActiveSpanInBrowser,hL as setAttribute,pL as setAttributes,Oh as setContext,gL as setConversationId,qE as setCurrentClient,lL as setExtra,uL as setExtras,Ks as setHttpStatus,Eh as setMeasurement,dL as setTag,fL as setTags,mL as setUser,ud as showReportDialog,aD as spanStreamingIntegration,sL as spanToBaggageHeader,B as spanToJSON,MS as spanToTraceHeader,lD as spotlightBrowserIntegration,ss as startBrowserTracingNavigationSpan,os as startBrowserTracingPageLoadSpan,Ke as startInactiveSpan,nb as startNewTrace,Vl as startSession,Kt as startSpan,nn as startSpanManual,_D as statsigIntegration,wL as supabaseIntegration,tb as suppressTracing,AD as tanstackRouterBrowserTracingIntegration,kL as thirdPartyErrorFilterIntegration,jL as uiProfiler,mD as unleashIntegration,oL as updateSpanName,ID as useProfiler,eD as viewHierarchyIntegration,lO as webVitalsIntegration,SD as webWorkerIntegration,zL as winjsStackLineParser,Or as withActiveSpan,wD as withErrorBoundary,rL as withIsolationScope,TD as withProfiler,Ze as withScope,DD as withSentryReactRouterV6Routing,$D as withSentryReactRouterV7Routing,MD as withSentryRouting,iL as withStreamedSpan,zD as wrapCreateBrowserRouter,PD as wrapCreateBrowserRouterV6,BD as wrapCreateBrowserRouterV7,qD as wrapCreateMemoryRouter,LD as wrapCreateMemoryRouterV6,UD as wrapCreateMemoryRouterV7,jD as wrapReactRouterRouting,GD as wrapUseRoutes,OD as wrapUseRoutesV6,HD as wrapUseRoutesV7,RL 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.