1import{G as e,H as t}from"./jsx-runtime-D4_EPXwy.js";var n=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,r=globalThis,i=`10.70.0`;function a(){return o(r),r}function o(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||`10.70.0`,t[i]=t[`10.70.0`]||{}}function s(e,t,n=r){let a=n.__SENTRY__=n.__SENTRY__||{},o=a[i]=a[`10.70.0`]||{};return o[e]||(o[e]=t())}var c=[`debug`,`info`,`warn`,`error`,`log`,`assert`,`trace`],l=`Sentry Logger `,u={};function d(e){if(!(`console`in r))return e();let t=r.console,n={},i=Object.keys(u);i.forEach(e=>{let r=u[e];n[e]=t[e],t[e]=r});try{return e()}finally{i.forEach(e=>{t[e]=n[e]})}}function f(){ee().enabled=!0}function p(){ee().enabled=!1}function m(){return ee().enabled}function h(...e){v(`log`,...e)}function g(...e){v(`warn`,...e)}function _(...e){v(`error`,...e)}function v(e,...t){n&&m()&&d(()=>{r.console[e](`${l}[${e}]:`,...t)})}function ee(){return n?s(`loggerSettings`,()=>({enabled:!1})):{enabled:!1}}var y={enable:f,disable:p,isEnabled:m,log:h,warn:g,error:_},te=50,ne=/\(error: (.*)\)/,re=/captureMessage|captureException/;function ie(...e){let t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{let i=[],a=e.split(` 2`);for(let e=n;e<a.length;e++){let n=a[e];n.length>1024&&(n=n.slice(0,1024));let o=ne.test(n)?n.replace(ne,`$1`):n;if(!o.includes(`Error: `)){for(let e of t){let t=e(o);if(t){i.push(t);break}}if(i.length>=te+r)break}}return oe(i.slice(r))}}function ae(e){return Array.isArray(e)?ie(...e):e}function oe(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(se(t).function||``)&&t.pop(),t.reverse(),re.test(se(t).function||``)&&(t.pop(),re.test(se(t).function||``)&&t.pop()),t.slice(0,te).map(e=>({...e,filename:e.filename||se(t).filename,function:e.function||`?`}))}function se(e){return e[e.length-1]||{}}var ce=`<anonymous>`;function le(e){try{return!e||typeof e!=`function`?ce:e.name||ce}catch{return ce}}function ue(e){let t=e.exception;if(t){let e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}var de={},fe={};function b(e,t){return de[e]=de[e]||[],de[e].push(t),()=>{let n=de[e];if(n){let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}}function x(e,t){if(!fe[e]){fe[e]=!0;try{t()}catch(t){n&&y.error(`Error while instrumenting ${e}`,t)}}}function S(e,t){let r=e&&de[e];if(r)for(let i of r)try{i(t)}catch(t){n&&y.error(`Error while triggering instrumentation handler. 3Type: ${e} 4Name: ${le(i)} 5Error:`,t)}}var pe=null;function me(e){let t=`error`;b(t,e),x(t,he)}function he(){pe=r.onerror,r.onerror=function(e,t,n,r,i){return S(`error`,{column:r,error:i,line:n,msg:e,url:t}),pe?pe.apply(this,arguments):!1},r.onerror.__SENTRY_INSTRUMENTED__=!0}var ge=null;function _e(e){let t=`unhandledrejection`;b(t,e),x(t,ve)}function ve(){ge=r.onunhandledrejection,r.onunhandledrejection=function(e){return S(`unhandledrejection`,e),!ge||ge.apply(this,arguments)},r.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var ye=Object.prototype.toString;function be(e){switch(ye.call(e)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:case`[object WebAssembly.Exception]`:return!0;default:return Me(e,Error)}}function xe(e,t){return ye.call(e)===`[object ${t}]`}function Se(e){return xe(e,`ErrorEvent`)}function Ce(e){return xe(e,`DOMError`)}function we(e){return xe(e,`DOMException`)}function C(e){return xe(e,`String`)}function Te(e){return typeof e==`object`&&!!e&&`__sentry_template_string__`in e&&`__sentry_template_values__`in e}function Ee(e){return e===null||Te(e)||typeof e!=`object`&&typeof e!=`function`}function De(e){return xe(e,`Object`)}function Oe(e){return typeof e==`object`&&!!e}function ke(e){return typeof Event<`u`&&Me(e,Event)}function Ae(e){return xe(e,`RegExp`)}function je(e){return!!(e?.then&&typeof e.then==`function`)}function Me(e,t){try{return e instanceof t}catch{return!1}}function Ne(e){return typeof Request<`u`&&Me(e,Request)}function Pe(e,t,r){if(!(t in e))return;let i=e[t];if(typeof i!=`function`)return;let a=r(i);typeof a==`function`&&Fe(a,i);try{e[t]=a}catch{n&&y.log(`Failed to replace method "${t}" in object`,e)}}function w(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{n&&y.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function Fe(e,t){try{e.prototype=t.prototype=t.prototype||{},w(e,`__sentry_original__`,t)}catch{}}function Ie(e){return e.__sentry_original__}function Le(e){if(be(e))return{message:e.message,name:e.name,stack:e.stack,...Re(e)};
5if(ke(e)){let{type:t,target:n,currentTarget:r,detail:i}=e;return{type:t,target:n,currentTarget:r,...i?{detail:i}:{},...Re(e)}}return e}function Re(e){return Oe(e)?Object.fromEntries(Object.entries(e)):{}}function ze(e){let t=Object.keys(Le(e));return t.sort(),t[0]?t.join(`, `):`[object has no keys]`}var Be;function Ve(e){if(Be!==void 0)return Be?Be(e):e();let t=Symbol.for(`__SENTRY_SAFE_RANDOM_ID_WRAPPER__`),n=r;return t in n&&typeof n[t]==`function`?(Be=n[t],Be(e)):(Be=null,e())}function He(){return Ve(()=>Math.random())}function Ue(){return Ve(()=>Date.now())}var We=Symbol.for(`sentry.skipNormalization`),Ge=Symbol.for(`sentry.overrideNormalizationDepth`);function Ke(e){return!!e[We]}function qe(e){let t=e[Ge];return typeof t==`number`?t:void 0}var Je;function Ye(e){Je=e}function T(e,t=100,n=1/0){try{return Ze(``,e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function Xe(e,t=3,n=102400){let r=T(e,t);return tt(r)>n?Xe(e,t-1,n):r}function Ze(e,t,n=1/0,r=1/0,i=nt()){let[a,o]=i;if(t==null||[`boolean`,`string`].includes(typeof t)||typeof t==`number`&&Number.isFinite(t))return t;let s=Qe(e,t);if(!s.startsWith(`[object `))return s;if(Ke(t))return t;let c=qe(t),l=c===void 0?n:c;if(l===0)return s.replace(`object `,``);if(a(t))return`[Circular ~]`;let u=t;if(u&&typeof u.toJSON==`function`)try{return Ze(``,u.toJSON(),l-1,r,i)}catch{}let d=Array.isArray(t)?[]:{},f=0,p=Le(t);for(let e in p){if(!Object.prototype.hasOwnProperty.call(p,e))continue;if(f>=r){d[e]=`[MaxProperties ~]`;break}let t=p[e];d[e]=Ze(e,t,l-1,r,i),f++}return o(t),d}function Qe(e,t){try{if(Je){let e=Je(t);if(e)return e}return typeof global<`u`&&t===global?`[Global]`:typeof t==`number`&&!Number.isFinite(t)?`[${t}]`:typeof t==`function`?`[Function: ${le(t)}]`:typeof t==`symbol`?`[${String(t)}]`:typeof t==`bigint`?`[BigInt: ${String(t)}]`:`[object ${$e(t)}]`}catch(e){return`**non-serializable** (${e})`}}function $e(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:`null prototype`}function et(e){return~-encodeURI(e).split(/%..|./).length}function tt(e){return et(JSON.stringify(e))}function nt(){let e=new WeakSet;function t(t){return e.has(t)?!0:(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}function rt(e,t=0){return typeof e!=`string`||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function it(e,t){if(!Array.isArray(e))return``;let n=[];for(let t=0;t<e.length;t++){let r=e[t];Ee(r)?n.push(String(r)):r instanceof Error?n.push(r.message?`${r.name}: ${r.message}`:r.name):n.push(Qe(void 0,r))}return n.join(t)}function at(e,t,n=!1){return C(e)?Ae(t)?t.test(e):C(t)?n?e===t:e.includes(t):typeof t==`function`&&t(e):!1}function ot(e,t=[],n=!1){for(let r of t)if(at(e,r,n))return!0;return!1}function st(){let e=r;return e.crypto||e.msCrypto}var ct;function lt(){return He()*16}function E(e=st()){try{if(e?.randomUUID)return Ve(()=>e.randomUUID()).replace(/-/g,``)}catch{}return ct||=`10000000100040008000100000000000`,ct.replace(/[018]/g,e=>(e^(lt()&15)>>e/4).toString(16))}function ut(e){return e.exception?.values?.[0]}function dt(e){let{message:t,event_id:n}=e;if(t)return t;let r=ut(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||`<unknown>`:n||`<unknown>`}function ft(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],a=i[0]=i[0]||{};a.value||=t||``,a.type||=n||`Error`}function pt(e,t){let n=ut(e);if(!n)return;let r={type:`generic`,handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...t},t&&`data`in t){let e={...i?.data,...t.data};n.mechanism.data=e}}function mt(e){if(ht(e))return!0;try{w(e,`__sentry_captured__`,!0)}catch{}return!1}function ht(e){try{return e.__sentry_captured__}catch{}}var gt=1e3;function _t(){return Ue()/gt}function vt(){let{performance:e}=r;if(!e?.now||!e.timeOrigin)return _t;let t=e.timeOrigin;return()=>(t+Ve(()=>e.now()))/gt}var yt;function D(){return(yt??=vt())()}var bt=null;function xt(){let{performance:e}=r;if(!e?.now)return;let t=3e5,n=Ve(()=>e.now()),i=Ue(),a=e.timeOrigin;if(typeof a==`number`&&Math.abs(a+n-i)<t)return a;let o=e.timing?.navigationStart;return typeof o==`number`&&Math.abs(o+n-i)<t?o:i-n}function O(){return bt===null&&(bt=xt()),bt}function St(e){let t=D(),n={sid:E(),init:!0,timestamp:t,started:t,duration:0,status:`ok`,errors:0,ignoreDuration:!1,toJSON:()=>Tt(n)};return e&&Ct(n,e),n}function Ct(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||D(),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:E()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started==`number`&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration==`number`)e.duration=t.duration;else{let t=e.timestamp-e.started;e.duration=t>=0?t: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 wt(e,t){let n={};t?n={status:t}:e.status===`ok`&&(n={status:`exited`}),Ct(e,n)}function Tt(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 Et(e,t,n=2){if(!t||typeof t!=`object`||n<=0)return t;if(e&&Object.keys(t).length===0)return e;let r={...e};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=Et(r[e],t[e],n-1));return r}function k(){return E()}function A(){return E().substring(16)}function Dt(e){try{let t=r.WeakRef;if(typeof t==`function`)return new t(e)}catch{}return e}function Ot(e){if(e){if(typeof e==`object`&&`deref`in e&&typeof e.deref==`function`)try{return e.deref()}catch{return}return e}}var kt=`_sentrySpan`;function At(e,t){t?w(e,kt,Dt(t)):delete e[kt]}function jt(e){return Ot(e[kt])}var Mt=100,Nt=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:k(),sampleRand:He()}}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,At(t,jt(this)),t}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Ct(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(e){return this._conversationId=e||void 0,this._notifyScopeListeners(),this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],this._notifyScopeListeners()),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return t===null?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;let n=typeof t==`function`?t(this):t,{tags:r,attributes:i,extra:a,user:o,contexts:s,level:c,fingerprint:l=[],propagationContext:u,conversationId:d}=(n instanceof e?n.getScopeData():De(n)?t:void 0)||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...i},this._extra={...this._extra,...a},this._contexts={...this._contexts,...s},o&&Object.keys(o).length&&(this._user=o),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),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:k(),sampleRand:He()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){let n=typeof t==`number`?t:Mt;if(n<=0)return this;let r={timestamp:_t(),...e,message:e.message?rt(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client?.recordDroppedEvent(`buffer_overflow`,`log_item`)),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),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:jt(this),conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Et(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){let r=t?.event_id||E();if(!this._client)return n&&y.warn(`No client configured on scope - will not capture exception!`),r;let i=Error(`Sentry syntheticException`);return this._client.captureException(e,{originalException:e,syntheticException:i,...t,event_id:r},this),r}captureMessage(e,t,r){let i=r?.event_id||E();if(!this._client)return n&&y.warn(`No client configured on scope - will not capture message!`),i;let a=r?.syntheticException??Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:a,...r,event_id:i},this),i}captureEvent(e,t){let r=e.event_id||t?.event_id||E();return this._client?(this._client.captureEvent(e,{...t,event_id:r},this),r):(n&&y.warn(`No client configured on scope - will not capture event!`),r)}_notifyScopeListeners(){this._notifyingListeners||=(this._notifyingListeners=!0,this._scopeListeners.forEac
5h(e=>{e(this)}),!1)}};function Pt(){return s(`defaultCurrentScope`,()=>new Nt)}function Ft(){return s(`defaultIsolationScope`,()=>new Nt)}var It=e=>e instanceof Promise&&!e[Lt],Lt=Symbol(`chained PromiseLike`),Rt=(e,t,n)=>{let r=e.then(e=>(t(e),e),e=>{throw n(e),e});return It(r)&&It(e)?r:zt(e,r)},zt=(e,t)=>{if(!t)return e;let n=!1;for(let r in e){if(r in t)continue;n=!0;let i=e[r];typeof i==`function`?Object.defineProperty(t,r,{value:(...t)=>i.apply(e,t),enumerable:!0,configurable:!0,writable:!0}):t[r]=i}return n&&Object.assign(t,{[Lt]:!0}),t},Bt=class{constructor(e,t){let n;n=e||new Nt;let r;r=t||new Nt,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t=this._pushScope(),n;try{n=e(t)}catch(e){throw this._popScope(),e}return je(n)?Rt(n,()=>this._popScope(),()=>this._popScope()):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function Vt(){let e=o(a());return e.stack=e.stack||new Bt(Pt(),Ft())}function Ht(e){return Vt().withScope(e)}function Ut(e,t){let n=Vt();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Wt(e){return Vt().withScope(()=>e(Vt().getIsolationScope()))}function Gt(){return{withIsolationScope:Wt,withScope:Ht,withSetScope:Ut,withSetIsolationScope:(e,t)=>Wt(t),getCurrentScope:()=>Vt().getScope(),getIsolationScope:()=>Vt().getIsolationScope()}}function Kt(e){let t=o(e);return t.acs?t.acs:Gt()}function qt(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.keys(e).includes(`value`)}function Jt(e,t){let{value:n,unit:r}=qt(e)?e:{value:e,unit:void 0},i=Xt(n),a=r&&typeof r==`string`?{unit:r}:{};if(i)return{...i,...a};if(!t||t===`skip-undefined`&&n===void 0)return;let o=``;try{o=JSON.stringify(n)??``}catch{}return{value:o,type:`string`,...a}}function Yt(e,t=!1){let n={};for(let[r,i]of Object.entries(e??{})){let e=Jt(i,t);e&&(n[r]=e)}return n}function Xt(e){if(Array.isArray(e))return{value:e,type:`array`};let t=typeof e==`string`?`string`:typeof e==`boolean`?`boolean`:typeof e==`number`&&!Number.isNaN(e)?Number.isInteger(e)?`integer`:`double`:null;if(t)return{value:e,type:t}}function Zt(){return!1}function j(){return Kt(a()).getCurrentScope()}function M(){return Kt(a()).getIsolationScope()}function Qt(){return s(`globalScope`,()=>new Nt)}function $t(...e){let t=Kt(a());if(e.length===2){let[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function N(){return j().getClient()}function en(e){let{traceId:t,parentSpanId:n,propagationSpanId:r}=e.getPropagationContext(),i={trace_id:t,span_id:r||A()};return n&&(i.parent_span_id=n),i}var P=`sentry.source`,tn=`sentry.sample_rate`,nn=`sentry.previous_trace_sample_rate`,F=`sentry.op`,I=`sentry.origin`,rn=`sentry.idle_span_finish_reason`,an=`sentry.measurement_unit`,on=`sentry.measurement_value`,sn=`sentry.custom_span_name`,cn=`sentry.profile_id`,ln=`sentry.exclusive_time`,un=`sentry.link.type`,dn=`gen_ai.conversation.id`;function fn(e){if(e<400&&e>=100)return{code:1};if(e>=400&&e<500)switch(e){case 401:return{code:2,message:`unauthenticated`};case 403:return{code:2,message:`permission_denied`};case 404:return{code:2,message:`not_found`};case 409:return{code:2,message:`already_exists`};case 413:return{code:2,message:`failed_precondition`};case 429:return{code:2,message:`resource_exhausted`};case 499:return{code:2,message:`cancelled`};default:return{code:2,message:`invalid_argument`}}if(e>=500&&e<600)switch(e){case 501:return{code:2,message:`unimplemented`};case 503:return{code:2,message:`unavailable`};case 504:return{code:2,message:`deadline_exceeded`};default:return{code:2,message:`internal_error`}}return{code:2,message:`internal_error`}}function pn(e,t){e.setAttribute(`http.response.status_code`,t);let n=fn(t);n.message!==`unknown_error`&&e.setStatus(n)}var mn=`_sentryScope`,hn=`_sentryIsolationScope`,gn=Symbol.for(`sentry.otelSourceInference`),_n=Symbol.for(`sentry.otelSourceExplicitlySet`),vn=Symbol.for(`sentry.tracerProviderSpan`);function yn(e,t,n){e&&(w(e,hn,Dt(n)),w(e,mn,t))}function bn(e){let t=e;return{scope:t[mn],isolationScope:Ot(t[hn])}}function xn(e){return e[gn]===!0}function Sn(e){w(e,_n,!0)}function Cn(e){return e[vn]===!0}var wn=`sentry-`;function Tn(e){let t=Dn(e);if(!t)return;let n=Object.entries(t).reduce((e,[t,n])=>{if(t.startsWith(`sentry-`)){let r=t.slice(7);e[r]=n}return e},{});if(Object.keys(n).length>0)return n}function En(e){if(e)return kn(Object.entries(e).reduce((e,[t,n])=>(n&&(e[`${wn}${t}`]=n),e),{}))}function Dn(e){if(!(!e||!C(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>
5{let n=On(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):On(e)}function On(e){return e.split(`,`).map(e=>{let t=e.indexOf(`=`);return t===-1?[]:[e.slice(0,t),e.slice(t+1)].map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})}).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}function kn(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((e,[t,r],i)=>{let a=`${encodeURIComponent(t)}=${encodeURIComponent(r)}`,o=i===0?a:`${e},${a}`;return o.length>8192?(n&&y.warn(`Not adding key: ${t} with val: ${r} to baggage header due to exceeding baggage size limits.`),e):o},``)}var An=/^o(\d+)\./,jn=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function Mn(e){return e===`http`||e===`https`}function Nn(e,t=!1){let{host:n,path:r,pass:i,port:a,projectId:o,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:``}@${n}${a?`:${a}`:``}/${r&&`${r}/`}${o}`}function Pn(e){let t=jn.exec(e);if(!t){d(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,i=``,a=``,o=``,s=``]=t.slice(1),c=``,l=s,u=l.split(`/`);if(u.length>1&&(c=u.slice(0,-1).join(`/`),l=u.pop()),l){let e=l.match(/^\d+/);e&&(l=e[0])}return Fn({host:a,pass:i,path:c,projectId:l,port:o,protocol:n,publicKey:r})}function Fn(e){return{protocol:e.protocol,publicKey:e.publicKey||``,pass:e.pass||``,host:e.host,port:e.port||``,path:e.path||``,projectId:e.projectId}}function In(e){if(!n)return!0;let{port:t,projectId:r,protocol:i}=e;return[`protocol`,`publicKey`,`host`,`projectId`].find(t=>!e[t]&&(y.error(`Invalid Sentry Dsn: ${t} missing`),!0))?!1:r.match(/^\d+$/)?Mn(i)?t&&isNaN(parseInt(t,10))?(y.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(y.error(`Invalid Sentry Dsn: Invalid protocol ${i}`),!1):(y.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function Ln(e){return e.match(An)?.[1]}function Rn(e){let t=e.getOptions(),{host:n}=e.getDsn()||{},r;return t.orgId?r=String(t.orgId):n&&(r=Ln(n)),r}function zn(e){let t=typeof e==`string`?Pn(e):Fn(e);if(!(!t||!In(t)))return t}function Bn(e){if(typeof e==`boolean`)return Number(e);let t=typeof e==`string`?parseFloat(e):e;if(!(typeof t!=`number`||isNaN(t)||t<0||t>1))return t}var Vn=RegExp(`^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$`);function Hn(e){if(!e)return;let t=e.match(Vn);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 Un(e,t){let n=Hn(e),r=Tn(t);if(!n?.traceId)return{traceId:k(),sampleRand:He()};let i=Kn(n,r);r&&(r.sample_rand=i.toString());let{traceId:a,parentSpanId:o,parentSampled:s}=n;return{traceId:a,parentSpanId:o,sampled:s,dsc:r||{},sampleRand:i}}function Wn(e=k(),t=A(),n){let r=``;return n!==void 0&&(r=n?`-1`:`-0`),`${e}-${t}${r}`}function Gn(e=k(),t=A(),n){return`00-${e}-${t}-${n?`01`:`00`}`}function Kn(e,t){let n=Bn(t?.sample_rand);if(n!==void 0)return n;let r=Bn(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?He()*r:r+He()*(1-r):He()}var qn=!1;function Jn(e){let{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:a,status:o,origin:s,links:c}=R(e);return{parent_span_id:a,span_id:t,trace_id:n,data:r,op:i,status:o,origin:s,links:c}}function Yn(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:R(e).parent_span_id,a=bn(e).scope;return{parent_span_id:i,span_id:r?a?.getPropagationContext().propagationSpanId||A():t,trace_id:n}}function Xn(e){let{traceId:t,spanId:n}=e.spanContext();return Wn(t,n,or(e))}function Zn(e){let{traceId:t,spanId:n}=e.spanContext();return Gn(t,n,or(e))}function Qn(e){if(e&&e.length>0)return e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:i})=>({span_id:e,trace_id:t,sampled:n===1,attributes:i,...r}))}function $n(e){if(e?.length)return e.map(({context:{spanId:e,traceId:t,traceFlags:n},attributes:r})=>({span_id:e,trace_id:t,sampled:n===1,attributes:r}))}function L(e){return typeof e==`number`?er(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?er(e.getTime()):D()}function er(e){return e>9999999999?e/1e3:e}function R(e){if(ar(e))return e.getSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(ir(e)){let{attributes:r,startTime:i,name:a,endTime:o,status:s,links:c}=e;return{span_id:t,trace_id:n,data:r,description:a,parent_span_id:nr(e),start_timestamp:L(i),timestamp:L(o)||void 0,status:sr(s),op:r[F],origin:r[I],links:Qn(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function tr(e){if(ar(e))return e.getStreamedSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(ir(e)){let{attributes:r,startTime:i,name:a,endTime:o,status:s,links:c}=e;return{name:a,span_id:t,trace_id:n,parent_span_id:nr(e),start_timestamp:L(i),end_timestamp:L(o),is_segment:e===hr(e),status:cr(s),attributes:lr(r,s),links:$n(c)}}return{span_id:t,trace_id:n,start_timestamp:0,name:``,end_timestamp:0,status:`ok`,is_segment:e===hr(e)}}function nr(e){return`parentSpanId`in e?e.parentSpanId:`parentSpanContext`in e?e.parentSpanContext?.spanId:void 0}function rr(e){return{...e,attributes:Yt(e.attributes),links:e.links?.map(e=>({...e,attributes:Yt(e.attributes)}))}}function ir(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function ar(e){return typeof e.getSpanJSON==`function`}function or(e){let{traceFlags:t}=e.spanContext();return t===1}function sr(e){if(!(!e||e.code===0))return e.code===1?`ok`:e.message||`internal_error`}function cr(e){return!e||e.code===1||e.code===0||e.message===`cancelled`?`ok`:`error`}function lr(e,t){let n=cr(t)===`error`?t?.message:void 0;return{...n&&{"sentry.status.message":n},...e}}var ur=`_sentryChildSpans`,dr=`_sentryRootSpan`;function fr(e,t){w(t,dr,e[dr]||e),e[ur]?e[ur].add(t):w(e,ur,new Set([t]))}function pr(e,t){e[ur]&&e[ur].delete(t)}function mr(e){let t=new Set;function n(e){if(!t.has(e)&&or(e)){t.add(e);let r=e[ur]?Array.from(e[ur]):[];for(let e of r)n(e)}}return n(e),Array.from(t)}var z=hr;function hr(e){return e[dr]||e}function B(){let e=Kt(a());return e.getActiveSpan?e.getActiveSpan():jt(j())}function gr(){qn||=(d(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),!0)}var _r=!1;function vr(){if(_r)return;function e(){let e=B(),t=e&&z(e);if(t){let e=`internal_error`;n&&y.log(`[Tracing] Root span: ${e} -> Global error occurred`),t.setStatus({code:2,message:e})}}_r=!0,me(e),_e(e)}function V(e){if(typeof __SENTRY_TRACING__==`boolean`&&!__SENTRY_TRACING__)return!1;let t=e||N()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function yr(e){y.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function br(e,t){if(!t?.length)return!1;for(let r of t){if(Cr(r)){if(e.description&&at(e.description,r))return n&&yr(e),!0;continue}let t=!!r.attributes&&Object.keys(r.attributes).length>0;if(!r.name&&!r.op&&!t)continue;let i=!r.name||e.description&&at(e.description,r.name),a=!r.op||e.op&&at(e.op,r.op),o=!r.attributes||Object.entries(r.attributes).every(([t,n])=>xr(e.attributes?.[t],n));if(i&&a&&o)return n&&yr(e),!0}return!1}function xr(e,t){return typeof e==`string`&&(typeof t==`string`||t instanceof RegExp)?at(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function Sr(e,t){let n=t.parent_span_id,r=t.span_id;if(n)for(let t of e)t.parent_span_id===r&&(t.parent_span_id=n)}function Cr(e){return typeof e==`string`||e instanceof RegExp}var wr=Symbol.for(`sentry.nonRecordingSpan`),Tr=class{constructor(e={}){this._traceId=e.traceId||k(),this._spanId=e.spanId||A(),this.dropReason=e.dropReason,w(this,wr,!0)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}
5addEvent(e,t,n){return this}addLink(e){return this}addLinks(e){return this}recordException(e,t){}};function Er(e){return!!e&&e[wr]===!0}var Dr=`production`,Or=`_frozenDsc`;function kr(e,t){w(e,Or,t)}function Ar(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||`production`,release:n.release,public_key:r,trace_id:e,org_id:Rn(t)};return t.emit(`createDsc`,i),i}function jr(e,t){let n=t.getPropagationContext();return n.dsc||Ar(n.traceId,e)}function Mr(e){let t=N();if(!t)return{};let n=z(e),r=R(n),i=r.data,a=n.spanContext().traceState,o=a?.get(`sentry.sample_rate`)??i[`sentry.sample_rate`]??i[`sentry.previous_trace_sample_rate`];function s(e){return(typeof o==`number`||typeof o==`string`)&&(e.sample_rate=`${o}`),e}let c=n[Or];if(c)return s(c);let l=Er(n),u=l&&n.dropReason===`ignored`;if(l&&(!V(t.getOptions())||u)){let e=bn(n).scope;if(e){let n={...jr(t,e)};return u&&(n.sampled=`false`),s(n)}}let d=a?.get(`sentry.dsc`),f=d&&Tn(d);if(f)return s(f);let p=Ar(e.spanContext().traceId,t),m=i[`sentry.source`]??i[`sentry.segment.name.source`],h=r.description;return m!==`url`&&h&&(p.transaction=h),V()&&(p.sampled=String(or(n)),p.sample_rand=a?.get(`sentry.sample_rand`)??bn(n).scope?.getPropagationContext().sampleRand.toString()),s(p),t.emit(`createDsc`,p,n),p}function Nr(e){return!!e&&typeof e==`function`&&`_streamed`in e&&!!e._streamed}function Pr(e,t=[]){return[e,t]}function Fr(e,t){let[n,r]=e;return[n,[...r,t]]}function Ir(e,t){let n=e[1];for(let e of n){let n=e[0].type;if(t(e,n))return!0}return!1}function Lr(e,t){return Ir(e,(e,n)=>t.includes(n))}function Rr(e){let t=o(r);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function zr(e){let[t,n]=e,r=JSON.stringify(t);function i(e){typeof r==`string`?r=typeof e==`string`?r+e:[Rr(r),e]:r.push(typeof e==`string`?Rr(e):e)}for(let e of n){let[t,n]=e;if(i(` 6${JSON.stringify(t)} 7`),typeof n==`string`||n instanceof Uint8Array)i(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(T(n))}i(e)}}return typeof r==`string`?r:Br(r)}function Br(e){let t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}function Vr(e){return[{type:`span`},e]}function Hr(e){let t=typeof e.data==`string`?Rr(e.data):e.data;return[{type:`attachment`,length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var Ur={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 Wr(e){return e in Ur}function Gr(e){return Wr(e)?Ur[e]:e}function Kr(e){if(!e?.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function qr(e,t,n,r){let i=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(Ue()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Nn(r)},...i&&{trace:i}}}function Jr(e,t){if(!t)return e;let n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0},e}function Yr(e,t,n,r){let i=Kr(n);return Pr({sent_at:new Date(Ue()).toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:Nn(t)}},[`aggregates`in e?[{type:`sessions`},e]:[{type:`session`},e.toJSON()]])}function Xr(e,t,n,r){let i=Kr(n),a=e.type&&e.type!==`replay_event`?e.type:`event`;Jr(e,n?.sdk);let o=qr(e,i,r,t);return delete e.sdkProcessingMetadata,Pr(o,[[{type:a},e]])}function Zr(e,t){function n(e){return!!e.trace_id&&!!e.public_key}let r=Mr(e[0]),i=t?.getDsn(),a=t?.getOptions().tunnel,o={sent_at:new Date(Ue()).toISOString(),...n(r)&&{trace:r},...!!a&&i&&{dsn:Nn(i)}},{beforeSendSpan:s,ignoreSpans:c}=t?.getOptions()||{},l=c?.length?e.filter(e=>{let t=R(e);return!br({description:t.description,op:t.op,attributes:t.data},c)}):e,u=e.length-l.length;u&&t?.recordDroppedEvent(`before_send`,`span`,u);let d=s?e=>{let t=R(e);return(Nr(s)?t:s(t))||(gr(),t)}:R,f=[];for(let e of l){let t=d(e);t&&f.push(Vr(t))}return Pr(o,f)}function Qr(e){if(!n)return;let{description:t=`< unknown name >`,op:r=`< unknown op >`,parent_span_id:i}=R(e),{spanId:a}=e.spanContext(),o=or(e),s=z(e),c=s===e,l=`[Tracing] Starting ${o?`sampled`:`unsampled`} ${c?`root `:``}span`,u=[`op: ${r}`,`name: ${t}`,`ID: ${a}`];if(i&&u.push(`parent ID: ${i}`),!c){let{op:e,description:t}=R(s);u.push(`root ID: ${s.spanContext().spanId}`),e&&u.push(`root op: ${e}`),t&&u.push(`root description: ${t}`)}y.log(`${l} 8 ${u.join(` 9 `)}`)}function $r(e){if(!n)return;let{description:t=`< unknown name >`,op:r=`< unknown op >`}=R(e),{spanId:i}=e.spanContext(),a=`[Tracing] Finishing "${r}" ${z(e)===e?`root `:``}span "${t}" with ID ${i}`;y.log(a)}function ei(e,t,r,i=B()){let a=i&&z(i);a&&(n&&y.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${r}`),a.addEvent(e,{[on]:t,[an]:r}))}function ti(e){if(!e||e.length===0)return;let t={};
9return e.forEach(e=>{let n=e.attributes||{},r=n[an],i=n[on];typeof r==`string`&&typeof i==`number`&&(t[e.name]={value:i,unit:r})}),t}function ni(){return o(a()).segmentSpanCaptureStrategy}function H(e){return e.getOptions().traceLifecycle===`stream`}var ri=1e3,ii=class{constructor(e={}){this._traceId=e.traceId||k(),this._spanId=e.spanId||A(),this._startTime=e.startTimestamp||D(),this._links=e.links,this._attributes={},this.setAttributes({[I]:`manual`,[F]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),`sampled`in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this._frozen||(this._links?this._links.push(e):this._links=[e]),this}addLinks(e){return this._frozen||(this._links?this._links.push(...e):this._links=e),this}recordException(e,t){}spanContext(){let{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:+!!n}}setAttribute(e,t){return this._frozen?this:(t===void 0?delete this._attributes[e]:this._attributes[e]=t,e===`sentry.source`&&t!==void 0&&xn(this)&&Sn(this),this)}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._frozen||(this._startTime=L(e))}setStatus(e){return this._frozen||(this._status=e),this}updateName(e){return this._frozen?this:(this._name=e,xn(this)||this.setAttribute(P,`custom`),this)}end(e){if(this._endTime){this._frozen=Cn(this);return}this._endTime=L(e),$r(this),this._onSpanEnded(),this._frozen=Cn(this)}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[F],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:sr(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[I],profile_id:this._attributes[cn],exclusive_time:this._attributes[ln],measurements:ti(this._events),is_segment:this._isStandaloneSpan&&z(this)===this||void 0,segment_id:this._isStandaloneSpan?z(this).spanContext().spanId:void 0,links:Qn(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===z(this),status:cr(this._status),attributes:lr(this._attributes,this._status),links:$n(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,t,r){if(this._frozen)return this;n&&y.log(`[Tracing] Adding an event to span:`,e);let i=ai(t)?t:r||D(),a=ai(t)?{}:t||{},o={name:e,time:L(i),attributes:a};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){let e=N();e&&(e.emit(`spanEnd`,this),this._isStandaloneSpan||e.emit(`afterSpanEnd`,this));let t=z(this),r=this._isStandaloneSpan||this===t;if(this._isStandaloneSpan){this._sampled?ci(Zr([this],e)):(n&&y.log(`[Tracing] Discarding standalone span because its trace was not chosen to be sampled.`),e&&e.recordDroppedEvent(`sample_rate`,`span`));return}if(!r){let e=ni();if(e){let n=bn(this).scope||j();e.onChildSpanEnded(this,t,e=>this._convertSpanToTransaction(e),n)}return}if(e&&H(e)){e.emit(`afterSegmentSpanEnd`,this);return}let i=bn(this).scope||j(),a=ni();if(a)a.onSegmentSpanEnded(e=>this._convertSpanToTransaction(e),i);else{let e=this._convertSpanToTransaction();e&&i.captureEvent(e)}}_convertSpanToTransaction(e={}){if(!oi(R(this)))return;this._name||=(n&&y.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),`<unlabeled transaction>`);let{scope:t,isolationScope:r}=bn(this),i=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;e.onSpanCaptured?.(this);let a=[];for(let t of mr(this)){if(t===this||si(t)||e.isSpanAlreadyCaptured?.(t))continue;let n=R(t);oi(n)&&(e.onSpanCaptured?.(t),a.push(n))}let o=this._attributes[P];delete this._attributes[sn];let s=!1;a.forEach(e=>{delete e.data[sn],e.op?.startsWith(`gen_ai.`)&&(s=!0)});let c={contexts:{trace:Jn(this)},spans:a.length>ri?a.sort((e,t)=>
9e.start_timestamp-t.start_timestamp).slice(0,ri):a,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:`transaction`,sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:r,dynamicSamplingContext:Mr(this),hasGenAiSpans:s},request:i,...o&&{transaction_info:{source:o}}},l=ti(this._events);return l&&Object.keys(l).length&&(n&&y.log(`[Measurements] Adding measurements to transaction event`,JSON.stringify(l,void 0,2)),c.measurements=l),c}};function ai(e){return e&&typeof e==`number`||e instanceof Date||Array.isArray(e)}function oi(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function si(e){return e instanceof ii&&e.isStandaloneSpan()}function ci(e){let t=N();if(!t)return;let n=e[1];if(!n||n.length===0){t.recordDroppedEvent(`before_send`,`span`);return}t.sendEnvelope(e)}function li(e,t,r){if(!V(e))return[!1];let i,a;typeof e.tracesSampler==`function`?(a=e.tracesSampler({...t,inheritOrSampleWith:e=>typeof t.parentSampleRate==`number`?t.parentSampleRate:typeof t.parentSampled==`boolean`?Number(t.parentSampled):e}),i=!0):t.parentSampled===void 0?e.tracesSampleRate!==void 0&&(a=e.tracesSampleRate,i=!0):a=t.parentSampled;let o=Bn(a);if(o===void 0)return n&&y.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(a)} of type ${JSON.stringify(typeof a)}.`),[!1];if(!o)return n&&y.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler==`function`?`tracesSampler returned 0 or false`:`a negative sampling decision was inherited or tracesSampleRate is set to 0`}`),[!1,o,i];let s=r<o;return s||n&&y.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(a)})`),[s,o,i]}var ui=`__SENTRY_SUPPRESS_TRACING__`;function di(e){let t=vi();return t.startInactiveSpan?t.startInactiveSpan(e):fi(e)}function fi(e){let t=_i(e),{forceTransaction:n,parentSpan:r}=e;return(e.scope?t=>$t(e.scope,t):r===void 0?e=>e():e=>pi(r,e))(()=>{let i=j(),a=xi(i,r),o=N();return e.onlyIfParent&&!a?hi(i,o):gi({parentSpan:a,spanArguments:t,forceTransaction:n,scope:i})})}function pi(e,t){let n=vi();return n.withActiveSpan?n.withActiveSpan(e,t):$t(n=>(At(n,e||void 0),t(n)))}function mi(e=j()){let t=vi();return t.isTracingSuppressed?t.isTracingSuppressed(e):e.getScopeData().sdkProcessingMetadata[ui]===!0}function hi(e,t){t?.recordDroppedEvent(`no_parent_span`,`span`);let n=new Tr({traceId:e.getPropagationContext().traceId});return yn(n,e,M()),n}function gi({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){let i=M();if(!V()){let t={...i.getPropagationContext(),...r.getPropagationContext()},a=new Tr({traceId:e?e.spanContext().traceId:t.traceId});return e&&!n&&fr(e,a),yn(a,r,i),a}let a=N();if(Si(a,t)){mi(r)||a?.recordDroppedEvent(`ignored`,`span`);let t=new Tr({dropReason:`ignored`,traceId:e?.spanContext().traceId??r.getPropagationContext().traceId});return e&&!n&&fr(e,t),yn(t,r,i),t}let o;if(e&&!n)o=bi(e,r,t,i),fr(e,o);else if(e){let n=Mr(e),{traceId:a,spanId:s}=e.spanContext(),c=or(e);o=yi({traceId:a,parentSpanId:s,...t},r,i,c),kr(o,n)}else{let{traceId:e,dsc:n,parentSpanId:a,sampled:s}={...i.getPropagationContext(),...r.getPropagationContext()};o=yi({traceId:e,parentSpanId:a,...t},r,i,s),n&&kr(o,n)}return Qr(o),o}function _i(e){let t={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){let n={...t};return n.startTimestamp=L(e.startTime),delete n.startTime,n}return t}function vi(){return Kt(a())}function yi(e,t,r,i){let a=N(),o=a?.getOptions()||{},{name:s=``}=e,c={spanAttributes:{...e.attributes},spanName:s,parentSampled:i};a?.emit(`beforeSampling`,c,{decision:!1});let l=c.parentSampled??i,u=c.spanAttributes,d=t.getPropagationContext(),f=mi(t),[p,m,h]=f?[!1]:li(o,{name:s,parentSampled:l,attributes:u,normalizedRequest:r.getScopeData().sdkProcessingMetadata.normalizedRequest,parentSampleRate:Bn(d.dsc?.sample_rate)},d.sampleRand),g=new ii({...e,attributes:{[P]:`custom`,[tn]:m!==void 0&&h?m:void 0,...u},sampled:p});return!p&&a&&!f&&(n&&y.log(`[Tracing] Discarding root span because its trace was not chosen to be sampled.`),a.recordDroppedEvent(`sample_rate`,H(a)?`span`:`transaction`)),yn(g,t,r),a&&a.emit(`spanStart`,g),g}function bi(e,t,n,r){let{spanId:i,traceId:a}=e.spanContext(),o=mi(t),s=!o&&or(e),c=s?new ii({...n,parentSpanId:i,traceId:a,sampled:s}):new Tr({traceId:a});fr(e,c),yn(c,t,r);let l=N();return l?(H(l)&&Er(c)&&(Er(e)&&e.dropReason?(c.dropReason=e.dropReason,l.recordDroppedEvent(e.dropReason,`span`)):o||(c.dropReason=`sample_rate`,l.recordDroppedEvent(`sample_rate`,`span`))),l.emit(`spanStart`,c),n.endTimestamp&&(l.emit(`spanEnd`,c),l.emit(`afterSpanEnd`,c)),c):c}function xi(e,t){if(t)return t;if(t===null)return;let n=jt(e);if(!n)return;let r=N();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?z(n):n}function Si(e,t){let n=e?.getOptions().ignoreSpans;return!e||!H(e)||!n?.length?!1:br({description:t.name||``,op:t.attributes?.[`sentry.op`]||t.op,attributes:t.attributes},n)}function Ci(e){return Er(e)&&e.dropReason===`ignored`}var wi={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},Ti=`heartbeatFailed`,Ei=`idleTimeout`,Di=`finalTimeout`,Oi=`externalFinish`;function ki(e,t={}){let r=new Map,i=!1,a,o=Oi,s=!t.disableAutoFinish,c=[],{idleTimeout:l=wi.idleTimeout,finalTimeout:u=wi.finalTimeout,childSpanTimeout:d=wi.childSpanTimeout,beforeSpanEnd:f,trimIdleSpanEndTimestamp:p=!0}=t,m=N(),h=j();if(!m||!V()){let e=new Tr({traceId:h.getPropagationContext().traceId});return yn(e,h,M()),e}let g=B(),_=Ai(e);_.end=new Proxy(_.end,{apply(e,t,n){if(f&&f(_),Er(t))return;let[r,...i]=n,a=L(r||D()),o=mr(_).filter(e=>e!==_),s=R(_);if(!o.length||!p)return ie(a),Reflect.apply(e,t,[a,...i]);let c=m.getOptions().ignoreSpans,l=o?.reduce((e,t)=>
9{let n=R(t);return!n.timestamp||c&&br({description:n.description,op:n.op,attributes:n.data},c)?e:e?Math.max(e,n.timestamp):n.timestamp},void 0),d=s.start_timestamp,h=Math.min(d?d+u/1e3:1/0,Math.max(d||-1/0,Math.min(a,l||1/0)));return ie(h),Reflect.apply(e,t,[h,...i])}});function v(){a&&=(clearTimeout(a),void 0)}function ee(e){v(),a=setTimeout(()=>{!i&&r.size===0&&s&&(o=Ei,_.end(e))},l)}function te(e){a=setTimeout(()=>{!i&&s&&(o=Ti,_.end(e))},d)}function ne(e){v(),r.set(e,!0),te(D()+d/1e3)}function re(e){r.has(e)&&r.delete(e),r.size===0&&ee(D()+l/1e3)}function ie(e){i=!0,r.clear(),c.forEach(e=>e()),At(h,g);let t=R(_),{start_timestamp:a}=t;if(!a)return;t.data[`sentry.idle_span_finish_reason`]||_.setAttribute(rn,o);let s=t.status;(!s||s===`unknown`)&&_.setStatus({code:1}),y.log(`[Tracing] Idle span "${t.op}" finished`);let d=mr(_).filter(e=>e!==_),f=0;d.forEach(t=>{t.isRecording()&&(t.setStatus({code:2,message:`cancelled`}),t.end(e),n&&y.log(`[Tracing] Cancelling span since span ended early`,JSON.stringify(t,void 0,2)));let{timestamp:r=0,start_timestamp:i=0}=R(t),a=i<=e,o=(u+l)/1e3,s=r-i<=o;if(n){let e=JSON.stringify(t,void 0,2);a?s||y.log(`[Tracing] Discarding span since it finished after idle span final timeout`,e):y.log(`[Tracing] Discarding span since it happened after idle span was finished`,e)}(!s||!a)&&(pr(_,t),f++)}),f>0&&_.setAttribute(`sentry.idle_span_discarded_spans`,f)}return c.push(m.on(`spanStart`,e=>{i||e===_||R(e).timestamp||e instanceof ii&&e.isStandaloneSpan()||mr(_).includes(e)&&ne(e.spanContext().spanId)})),c.push(m.on(`spanEnd`,e=>{i||re(e.spanContext().spanId)})),c.push(m.on(`idleSpanEnableAutoFinish`,e=>{e===_&&(s=!0,ee(),r.size&&te())})),t.disableAutoFinish||ee(),setTimeout(()=>{i||(_.setStatus({code:2,message:`deadline_exceeded`}),o=Di,_.end())},u),_}function Ai(e){let t=di(e);return At(j(),t),n&&y.log(`[Tracing] Started span is an idle span`),t}function ji(e,t){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:a}=t;Fi(e,t),r&&Ri(e,r),zi(e,n),Ii(e,i),Li(e,a)}function Mi(e,t){let{extra:n,tags:r,attributes:i,user:a,contexts:o,level:s,sdkProcessingMetadata:c,breadcrumbs:l,fingerprint:u,eventProcessors:d,attachments:f,propagationContext:p,transactionName:m,span:h}=t;Ni(e,`extra`,n),Ni(e,`tags`,r),Ni(e,`attributes`,i),Ni(e,`user`,a),Ni(e,`contexts`,o),e.sdkProcessingMetadata=Et(e.sdkProcessingMetadata,c,2),s&&(e.level=s),m&&(e.transactionName=m),h&&(e.span=h),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...p}}function Ni(e,t,n){e[t]=Et(e[t],n,1)}function Pi(e,t){let n=Qt().getScopeData();return e&&Mi(n,e.getScopeData()),t&&Mi(n,t.getScopeData()),n}function Fi(e,t){let{extra:n,tags:r,user:i,contexts:a,level:o,transactionName:s}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(i).length&&(e.user={...i,...e.user}),Object.keys(a).length&&(e.contexts={...a,...e.contexts}),o&&(e.level=o),s&&e.type!==`transaction`&&(e.transaction=s)}function Ii(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Li(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Ri(e,t){e.contexts={trace:Yn(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Mr(t),...e.sdkProcessingMetadata};let n=R(z(t)).description;n&&!e.transaction&&e.type===`transaction`&&(e.transaction=n)}function zi(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}var Bi=`http.url`,Vi=`sentry.segment.name`,Hi=`sentry.transaction`,Ui=`url.full`,Wi=`url.template`,Gi=0,Ki=1,qi=2;function Ji(e){return new Xi(t=>{t(e)})}function Yi(e){return new Xi((t,n)=>{n(e)})}var Xi=class e{constructor(e){this._state=Gi,this._handlers=[],this._runExecutor(e)}then(t,n){return new e((e,r)=>{this._handlers.push([!1,n=>
9{if(!t)e(n);else try{e(t(n))}catch(e){r(e)}},t=>{if(!n)r(t);else try{e(n(t))}catch(e){r(e)}}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(t){return new e((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{if(i){n(r);return}e(r)})})}_executeHandlers(){if(this._state===Gi)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||=(this._state===Ki&&e[1](this._value),this._state===qi&&e[2](this._value),!0)})}_runExecutor(e){let t=(e,t)=>{if(this._state===Gi){if(je(t)){t.then(n,r);return}this._state=e,this._value=t,this._executeHandlers()}},n=e=>{t(Ki,e)},r=e=>{t(qi,e)};try{e(n,r)}catch(e){r(e)}}};function Zi(e,t,n,r=0){try{let i=Qi(t,n,e,r);return je(i)?i:Ji(i)}catch(e){return Yi(e)}}function Qi(e,t,r,i){let a=r[i];if(!e||!a)return e;let o=a({...e},t);return n&&o===null&&y.log(`Event processor "${a.id||`?`}" dropped event`),je(o)?o.then(e=>Qi(e,t,r,i+1)):Qi(o,t,r,i+1)}var $i,ea,ta,na;function ra(e){let t=r._sentryDebugIds,n=r._debugIds;if(!t&&!n)return{};let i=t?Object.keys(t):[],a=n?Object.keys(n):[];if(na&&i.length===ea&&a.length===ta)return na;ea=i.length,ta=a.length,na={},$i||={};let o=(t,n)=>{for(let r of t){let t=n[r],i=$i?.[r];if(i&&na&&t)na[i[0]]=t,$i&&($i[r]=[i[0],t]);else if(t){let n=e(r);for(let e=n.length-1;e>=0;e--){let i=n[e]?.filename;if(i&&na&&$i){na[i]=t,$i[r]=[i,t];break}}}}};return t&&o(i,t),n&&o(a,n),na}function ia(e,t,n,r,i,a){let{normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=e,c={...t,event_id:t.event_id||n.event_id||E(),timestamp:t.timestamp||_t()},l=n.integrations||e.integrations.map(e=>e.name);aa(c,e),ca(c,l),i&&i.emit(`applyFrameMetadata`,t),t.type===void 0&&oa(c,e.stackParser);let u=ua(r,n.captureContext);n.mechanism&&pt(c,n.mechanism);let d=i?i.getEventProcessors():[],f=Pi(a,u),p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),ji(c,f);let m=[...d,...f.eventProcessors];return(n.data&&n.data.__sentry__===!0?Ji(c):Zi(m,c,n)).then(e=>(e&&sa(e),typeof o==`number`&&o>0?la(e,o,s):e))}function aa(e,t){let{environment:n,release:r,dist:i,maxValueLength:a}=t;e.environment=e.environment||n||`production`,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i);let o=e.request;o?.url&&a&&(o.url=rt(o.url,a)),a&&e.exception?.values?.forEach(e=>{e.value&&=rt(e.value,a)})}function oa(e,t){let n=ra(t);e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.filename&&(e.debug_id=n[e.filename])})})}function sa(e){let t={};if(e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{n.push({type:`sourcemap`,code_file:e,debug_id:t})})}function ca(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function la(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:T(e.data,t,n)}}))},...e.user&&{user:T(e.user,t,n)},...e.contexts&&{contexts:T(e.contexts,t,n)},...e.extra&&{extra:T(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=T(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:T(e.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=T(e.contexts.flags,3,n)),r}function ua(e,t){if(!t)return e;let n=e?e.clone():new Nt;return n.update(t),n}function da(e){if(e)return fa(e)||ma(e)?{captureContext:e}:e}function fa(e){return e instanceof Nt||typeof e==`function`}var pa=[`user`,`level`,`extra`,`contexts`,`tags`,`fingerprint`,`propagationContext`];function ma(e){return Object.keys(e).some(e=>pa.includes(e))}function ha(e,t){return j().captureException(e,da(t))}function ga(e,t){return j().captureEvent(e,t)}function _a(e,t){M().setContext(e,t)}function va(){let e=N();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function ya(e){M().addEventProcessor(e)}function ba(e){let t=M(),{user:n}=Pi(t,j()),{userAgent:i}=r.navigator||{},a=St({user:n,...i&&{userAgent:i},...e}),o=t.getSession();return o?.status===`ok`&&Ct(o,{status:`exited`}),xa(),t.setSession(a),a}function xa(){let e=M(),t=j().getSession()||e.getSession();t&&wt(t),Sa(),e.setSession()}function Sa(){let e=M(),t=N(),n=e.getSession();n&&t&&t.captureSession(n)}function Ca(e=!1){if(e){xa();return}Sa()}var wa=[];function Ta(e){let t={};
9return e.forEach(e=>{let{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}function Ea(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(e=>{e.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n==`function`){let e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return Ta(r)}function Da(e,t){let n={};return t.forEach(t=>{t?.beforeSetup&&t.beforeSetup(e)}),t.forEach(t=>{t&&ka(e,t,n)}),n}function Oa(e,t){for(let n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function ka(e,t,r){if(r[t.name]){n&&y.log(`Integration skipped because it was already installed: ${t.name}`);return}if(r[t.name]=t,!wa.includes(t.name)&&typeof t.setupOnce==`function`&&(t.setupOnce(),wa.push(t.name)),t.setup&&typeof t.setup==`function`&&t.setup(e),typeof t.preprocessEvent==`function`){let n=t.preprocessEvent.bind(t);e.on(`preprocessEvent`,(t,r)=>n(t,r,e))}if(typeof t.processEvent==`function`){let n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}[`processSpan`,`processSegmentSpan`].forEach(n=>{let r=t[n];typeof r==`function`&&e.on(n,n=>r.call(t,n,e))}),n&&y.log(`Integration installed: ${t.name}`)}function Aa(e){return e}function ja(){return typeof __SENTRY_BROWSER_BUNDLE__<`u`&&!!__SENTRY_BROWSER_BUNDLE__}function Ma(){return`npm`}function Na(){return!ja()&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`}function Pa(){return typeof window<`u`&&(!Na()||Fa())}function Fa(){return r.process?.type===`renderer`}var Ia=`thismessage:/`;function La(e){return`isRelative`in e}function Ra(e,t){let n=e.indexOf(`://`)<=0&&e.indexOf(`//`)!==0,r=t??(n?Ia:void 0);try{if(`canParse`in URL&&!URL.canParse(e,r))return;let t=new URL(e,r);return n?{isRelative:n,pathname:t.pathname,search:t.search,hash:t.hash}:t}catch{}}function za(e){if(La(e))return e.pathname;let t=new URL(e);return t.search=``,t.hash=``,[`80`,`443`].includes(t.port)&&(t.port=``),t.password&&=`%filtered%`,t.username&&=`%filtered%`,t.toString()}function Ba(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||``,r=t[8]||``;return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function Va(e){return e.split(/[?#]/,1)[0]}function U(e,t=!0){if(e.startsWith(`data:`)){let n=e.match(/^data:([^;,]+)/),r=n?n[1]:`text/plain`,i=e.includes(`;base64,`),a=e.indexOf(`,`),o=``;if(t&&a!==-1){let t=e.slice(a+1);o=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${i?`,base64`:``}${o?`,${o}`:``}`}return e}function Ha(e={}){let t=e.client||N();if(!va()||!t)return{};let n=Kt(a());if(n.getTraceData)return n.getTraceData(e);let r=e.scope||j(),i=e.span||B(),o=Er(i)&&!V(t.getOptions());if(!i&&Zt())return{};let s=i&&!o?Xn(i):Ua(r),c=En(i?Mr(i):jr(t,r));if(!Vn.test(s))return y.warn(`Invalid sentry-trace data. Cannot generate trace data`),{};let l={"sentry-trace":s,baggage:c};return e.propagateTraceparent&&(l.traceparent=i&&!o?Zn(i):Wa(r)),l}function Ua(e){let{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Wn(t,r,n)}function Wa(e){let{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Gn(t,r,n)}function Ga(e,t,n,r,i){if(!e.fetchData)return;let{method:a,url:o}=e.fetchData,s=V()&&t(o);if(e.endTimestamp){let t=e.fetchData.__span;if(!t)return;let n=r[t];n&&(s&&(Ja(n,e),Ka(n,e,i)),delete r[t]);return}let{spanOrigin:c=`auto.http.browser`,propagateTraceparent:l=!1}=typeof i==`object`?i:{spanOrigin:i},u=N(),d=!!B(),f=d||!!u&&H(u),p=s&&f?di(Qa(o,a,c)):new Tr,m=Ci(p)&&d?void 0:p;if(s&&!f&&u?.recordDroppedEvent(`no_parent_span`,`span`),e.fetchData.__span=p.spanContext().spanId,r[p.spanContext().spanId]=p,n(e.fetchData.url)){let t=e.args[0],n={...e.args[1]||{}},r=qa(t,n,V()&&f?m:void 0,l);r&&(e.args[1]=n,n.headers=r)}if(u){let t={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};u.emit(`beforeOutgoingRequestSpan`,p,t)}return p}function Ka(e,t,n){(typeof n==`object`&&n?n.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function qa(e,t,n,r){let i=Ha({span:n,propagateTraceparent:r}),a=i[`sentry-trace`],o=i.baggage,s=i.traceparent;if(!a)return;let c=t.headers||(Ne(e)?e.headers:void 0);if(!c)return{"sentry-trace":a,...o&&{baggage:o},...s&&{traceparent:s}};if(Xa(c)){let e=new Headers(c);if(e.get(`sentry-trace`)||e.set(`sentry-trace`,a),r&&s&&!e.get(`traceparent`)&&e.set(`traceparent`,s),o){let t=e.get(`baggage`);t?Ya(t)||e.set(`baggage`,`${t},${o}`):e.set(`baggage`,o)}return e}if(Za(c)){let e=[...c];e.find(e=>e[0]===`sentry-trace`)||e.push([`sentry-trace`,a]),r&&s&&!e.find(e=>e[0]===`traceparent`)&&e.push([`traceparent`,s]);let t=c.find(e=>e[0]===`baggage`&&typeof e[1]==`string`&&Ya(e[1]));return o&&!t&&e.push([`baggage`,o]),e}{let e=`sentry-trace`in c?c[`sentry-trace`]:void 0,t=`traceparent`in c?c.traceparent:void 0,n=`baggage`in c?c.baggage:void 0,i=n?Array.isArray(n)?[...n]:[n]:[],l=n&&(Array.isArray(n)?n.find(e=>Ya(e)):Ya(n));o&&!l&&i.push(o);let u=Object.assign({},c,{"sentry-trace":e??a,...i.length>0&&{baggage:i.join(`,`)}});return r&&s&&!t&&(u.traceparent=s),u}}function Ja(e,t){if(t.response){pn(e,t.response.status);let n=t.response?.headers?.get(`content-length`);if(n){let t=parseInt(n);t>0&&e.setAttribute(`http.response_content_length`,t)}}else t.error&&e.setStatus({code:2,message:`internal_error`});e.end()}function Ya(e){return typeof e==`string`&&e.split(`,`).some(e=>e.trim().startsWith(wn))}function Xa(e){return typeof Headers<`u`&&Me(e,Headers)}function Za(e){return Array.isArray(e)?e.every(e=>Array.isArray(e)&&e.length===2&&typeof e[0]==`string`):!1}
9function Qa(e,t,n){if(e.startsWith(`data:`))return{name:`${t} ${U(e)}`,attributes:$a(e,void 0,t,n)};let r=Ra(e);return{name:`${t} ${r?za(r):e}`,attributes:$a(e,r,t,n)}}function $a(e,t,n,r){let i={url:U(e),type:`fetch`,"http.method":n,[I]:r,[F]:`http.client`};return t&&(La(t)||(i[Bi]=U(t.href),i[Ui]=U(t.href),i[`server.address`]=t.host),t.search&&(i[`http.query`]=t.search),t.hash&&(i[`http.fragment`]=t.hash)),i}var eo=r;function to(){return`history`in eo&&!!eo.history}function no(){if(!(`fetch`in eo))return!1;try{return new Headers,new Request(`data:,`),new Response,!0}catch{return!1}}function ro(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function io(){if(typeof EdgeRuntime==`string`)return!0;if(!no())return!1;if(ro(eo.fetch))return!0;let e=!1,t=eo.document;if(t&&typeof t.createElement==`function`)try{let n=t.createElement(`iframe`);n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=ro(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){n&&y.warn(`Could not create sandbox iframe for pure fetch check, bailing to window.fetch: `,e)}return e}function ao(e,t){let n=`fetch`,r=b(n,e);return x(n,()=>so(void 0,t)),r}function oo(e){let t=`fetch-body-resolved`,n=b(t,e);return x(t,()=>so(lo)),n}function so(e,t=!1){t&&!io()||Pe(r,`fetch`,function(t){return function(...n){let i=Error(),{method:a,url:o}=po(n),s={args:n,fetchData:{method:a,url:o},startTimestamp:D()*1e3,virtualError:i,headers:mo(n)};return e||S(`fetch`,{...s}),t.apply(r,n).then(async t=>(e?e(t):S(`fetch`,{...s,endTimestamp:D()*1e3,response:t}),t),e=>{S(`fetch`,{...s,endTimestamp:D()*1e3,error:e}),be(e)&&e.stack===void 0&&(e.stack=i.stack,w(e,`framesToPop`,1));let t=N()?.getOptions().enhanceFetchErrorMessages??`always`;if(t!==!1&&be(e)&&e.name===`TypeError`&&(e.message===`Failed to fetch`||e.message===`Load failed`||e.message===`NetworkError when attempting to fetch resource.`))try{let n=new URL(s.fetchData.url).host;t===`always`?e.message=`${e.message} (${n})`:w(e,`__sentry_fetch_url_host__`,n)}catch{}throw e})}})}async function co(e,t){if(e?.body){let n=e.body,r=n.getReader(),i=setTimeout(()=>{n.cancel().then(null,()=>{})},9e4),a=!0;for(;a;){let e;try{e=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);let{done:i}=await r.read();clearTimeout(e),i&&(t(),a=!1)}catch{a=!1}finally{clearTimeout(e)}}clearTimeout(i),r.releaseLock(),n.cancel().then(null,()=>{})}}function lo(e){let t;try{t=e.clone()}catch{return}co(t,()=>{S(`fetch-body-resolved`,{endTimestamp:D()*1e3,response:e})})}function uo(e,t){return Oe(e)&&!!e[t]}function fo(e){return typeof e==`string`?e:e?uo(e,`url`)?e.url:e.toString?e.toString():``:``}function po(e){if(e.length===0)return{method:`GET`,url:``};if(e.length===2){let[t,n]=e;return{url:fo(t),method:uo(n,`method`)?String(n.method).toUpperCase():Ne(t)&&uo(t,`method`)?String(t.method).toUpperCase():`GET`}}let t=e[0];return{url:fo(t),method:uo(t,`method`)?String(t.method).toUpperCase():`GET`}}function mo(e){let[t,n]=e;try{if(typeof n==`object`&&n&&`headers`in n&&n.headers)return new Headers(n.headers);if(Ne(t))return new Headers(t.headers)}catch{}}var ho=r;function go(){try{return ho.document.location.href}catch{return``}}function _o(e,t=5){if(!ho.HTMLElement)return null;let n=e;for(let e=0;e<t;e++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null}var vo=e(t()),yo=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,W=r,bo=0;function xo(){return bo>0}function So(){bo++,setTimeout(()=>{bo--})}function Co(e,t={}){function n(e){return typeof e==`function`}if(!n(e))return e;try{if(Object.prototype.hasOwnProperty.call(e,`__sentry_wrapped__`)){let t=e.__sentry_wrapped__;return typeof t==`function`?t:e}if(Ie(e))return e}catch{return e}let i=function(...n){r._sentryWrappedDepth=(r._sentryWrappedDepth||0)+1;try{let r=n.map(e=>Co(e,t));return e.apply(this,r)}catch(e){throw So(),$t(r=>{r.addEventProcessor(e=>(t.mechanism&&(ft(e,void 0,void 0),pt(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),ha(e)}),e}finally{r._sentryWrappedDepth=(r._sentryWrappedDepth||0)-1}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t])}catch{}Fe(i,e),w(e,`__sentry_wrapped__`,i);try{Object.getOwnPropertyDescriptor(i,`name`).configurable&&Object.defineProperty(i,"name",{get(){return e.name}})}catch{}return i}function wo(){let e=go(),{referrer:t}=W.document||{},{userAgent:n}=W.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}var G=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,K=r,To=(e,t)=>e>t[1]?`poor`:e>t[0]?`needs-improvement`:`good`,Eo=(e,t,n,r)=>{let i,a;return o=>{t.value>=0&&(o||r)&&(a=t.value-(i??0),(a||i===void 0)&&(i=t.value,t.delta=a,t.rating=To(t.value,n),e(t)))}},Do=(e=!0)=>{let t=K.performance?.getEntriesByType?.(`navigation`)[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Oo=()=>Do()?.activationStart??0;function q(e,t,n){K.document&&K.addEventListener(e,t,n)}function ko(e,t,n){K.document&&K.removeEventListener(e,t,n)}var Ao=-1,jo=new Set,Mo=()=>K.document?.visibilityState===`hidden`&&!K.document?.prerendering?0:1/0,No=e=>{if(Fo(e)&&Ao>-1){if(e.type===`visibilitychange`||e.type===`pagehide`)for(let e of jo)e();isFinite(Ao)||(Ao=e.type===`visibilitychange`?e.timeStamp:0,ko(`prerenderingchange`,No,!0))}},Po=()=>
9{if(K.document&&Ao<0){let e=Oo();Ao=(K.document.prerendering?void 0:globalThis.performance.getEntriesByType(`visibility-state`).filter(t=>t.name===`hidden`&&t.startTime>e)[0]?.startTime)??Mo(),q(`visibilitychange`,No,!0),q(`pagehide`,No,!0),q(`prerenderingchange`,No,!0)}return{get firstHiddenTime(){return Ao},onHidden(e){jo.add(e)}}};function Fo(e){return e.type===`pagehide`||K.document?.visibilityState===`hidden`}var Io=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+0xe8d4a51000}`,Lo=(e,t=-1)=>{let n=Do(),r=`navigate`;return n&&(K.document?.prerendering||Oo()>0?r=`prerender`:K.document?.wasDiscarded?r=`restore`:n.type&&(r=n.type.replace(/_/g,`-`))),{name:e,value:t,rating:`good`,delta:0,entries:[],id:Io(),navigationType:r}},Ro=new WeakMap;function zo(e,t){try{return Ro.get(e)||Ro.set(e,new t),Ro.get(e)}catch{return new t}}var Bo=class{constructor(){this._sessionValue=0,this._sessionEntries=[]}_processEntry(e){if(e.hadRecentInput)return;let t=this._sessionEntries[0],n=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this._sessionValue+=e.value,this._sessionEntries.push(e)):(this._sessionValue=e.value,this._sessionEntries=[e]),this._onAfterProcessingUnexpectedShift?.(e)}},Vo=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},Ho=e=>{let t=!1;return()=>{t||=(e(),!0)}},Uo=e=>{K.document?.prerendering?addEventListener(`prerenderingchange`,()=>e(),!0):e()},Wo=[1800,3e3],Go=(e,t={})=>{Uo(()=>{let n=Po(),r=Lo(`FCP`),i,a=Vo(`paint`,e=>{for(let t of e)t.name===`first-contentful-paint`&&(a.disconnect(),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-Oo(),0),r.entries.push(t),i(!0)))});a&&(i=Eo(e,r,Wo,t.reportAllChanges))})},Ko=[.1,.25],qo=(e,t={})=>{Go(Ho(()=>{let n=Lo(`CLS`,0),r,i=Po(),a=zo(t,Bo),o=e=>{for(let t of e)a._processEntry(t);a._sessionValue>n.value&&(n.value=a._sessionValue,n.entries=a._sessionEntries,r())},s=Vo(`layout-shift`,o);s&&(r=Eo(e,n,Ko,t.reportAllChanges),i.onHidden(()=>{o(s.takeRecords()),r(!0)}),K?.setTimeout?.(r))}))},Jo=0,Yo=1/0,Xo=0,Zo=e=>{e.forEach(e=>{e.interactionId&&(Yo=Math.min(Yo,e.interactionId),Xo=Math.max(Xo,e.interactionId),Jo=Xo?(Xo-Yo)/7+1:0)})},Qo,$o=()=>Qo?Jo:performance.interactionCount||0,es=()=>{`interactionCount`in performance||Qo||(Qo=Vo(`event`,Zo,{type:`event`,buffered:!0,durationThreshold:0}))},ts=10,ns=0,rs=()=>$o()-ns,is=class{constructor(){this._longestInteractionList=[],this._longestInteractionMap=new Map}_resetInteractions(){ns=$o(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){let e=Math.min(this._longestInteractionList.length-1,Math.floor(rs()/50));return this._longestInteractionList[e]}_processEntry(e){if(this._onBeforeProcessingEntry?.(e),!(e.interactionId||e.entryType===`first-input`))return;let t=this._longestInteractionList.at(-1),n=this._longestInteractionMap.get(e.interactionId);if(n||this._longestInteractionList.length<ts||e.duration>t._latency){if(n?e.duration>n._latency?(n.entries=[e],n._latency=e.duration):e.duration===n._latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],_latency:e.duration},this._longestInteractionMap.set(n.id,n),this._longestInteractionList.push(n)),this._longestInteractionList.sort((e,t)=>t._latency-e._latency),this._longestInteractionList.length>ts){let e=this._longestInteractionList.splice(ts);for(let t of e)this._longestInteractionMap.delete(t.id)}this._onAfterProcessingINPCandidate?.(n)}}},as=e=>{let t=K.requestIdleCallback||K.setTimeout;K.document?.visibilityState===`hidden`?e():(e=Ho(e),q(`visibilitychange`,e,{once:!0,capture:!0}),q(`pagehide`,e,{once:!0,capture:!0}),t(()=>{e(),ko(`visibilitychange`,e,{capture:!0}),ko(`pagehide`,e,{capture:!0})}))},os=[200,500],ss=40,cs=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&`interactionId`in PerformanceEventTiming.prototype))return;let n=Po();Uo(()=>{es();let r=Lo(`INP`),i,a=zo(t,is),o=e=>{as(()=>{for(let t of e)a._processEntry(t);let t=a._estimateP98LongestInteraction();t&&t._latency!==r.value&&(r.value=t._latency,r.entries=t.entries,i())})},s=Vo(`event`,o,{durationThreshold:t.durationThreshold??ss});i=Eo(e,r,os,t.reportAllChanges),s&&(s.observe({type:`first-input`,buffered:!0}),n.onHidden(()=>{o(s.takeRecords()),i(!0)}))})},ls=class{_processEntry(e){this._onBeforeProcessingEntry?.(e)}},us=[2500,4e3],ds=(e,t={})=>{Uo(()=>{let n=Po(),r=Lo(`LCP`),i,a=zo(t,ls),o=e=>{t.reportAllChanges||(e=e.slice(-1));for(let t of e)a._processEntry(t),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-Oo(),0),r.entries=[t],i())},s=Vo(`largest-contentful-paint`,o);if(s){i=Eo(e,r,us,t.reportAllChanges);let n=Ho(()=>{o(s.takeRecords()),s.disconnect(),i(!0)}),a=e=>{e.isTrusted&&(as(n),ko(e.type,a,{capture:!0}))};for(let e of[`keydown`,`click`,`visibilitychange`])q(e,a,{capture:!0})}})},fs=[800,1800],ps=e=>{K.document?.prerendering?Uo(()=>ps(e)):K.document?.readyState===`complete`?setTimeout(e):addEventListener(`load`,()=>ps(e),!0)},ms=(e,t={})=>{let n=Lo(`TTFB`),r=Eo(e,n,fs,t.reportAllChanges);ps(()=>{let e=Do();e&&(n.value=Math.max(e.responseStart-Oo(),0),n.entries=[e],r(!0))})},hs={},gs={},_s,vs,ys,bs;function xs(e,t=!1){return js(`cls`,e,Ds,_s,t)}function Ss(e,t=!1){return js(`lcp`,e,Os,vs,t)}function Cs(e){return js(`ttfb`,e,ks,ys)}function ws(e){return js(`inp`,e,As,bs)}function Ts(e,t){return Ns(e,t),gs[e]||(Ms(e),gs[e]=!0),Ps(e,t)}function Es(e,t){let n=hs[e];if(n?.length)for(let r of n)try{r(t)}catch(t){G&&y.error(`Error while triggering instrumentation handler. 10Type: ${e} 11Name: ${le(r)} 12Error:`,t)}}function Ds(){return qo(e=>{Es(`cls`,{metric:e}),_s=e},{reportAllChanges:!0})}function Os(){return ds(e=>{Es(`lcp`,{metric:e}),vs=e},{reportAllChanges:!0})}function ks(){return ms(e=>{Es(`ttfb`,{metric:e}),ys=e})}function As(){return cs(e=>{Es(`inp`,{metric:e}),bs=e})}function js(e,t,n,r,i=!1){Ns(e,t);let a;return gs[e]||(a=n(),gs[e]=!0),r&&t({metric:r}),Ps(e,t,i?a:void 0)}function Ms(e){let t={};e===`event`&&(t.durationThreshold=0),Vo(e,t=>{Es(e,{entries:t})},t)}function Ns(e,t){hs[e]=hs[e]||[],hs[e].push(t)}function Ps(e,t,n){return()=>{n&&n();let r=hs[e];if(!r)return;let i=r.indexOf(t);i!==-1&&r.splice(i,1)}}function Fs(e){return`duration`in e}var Is=80,Ls={};try{typeof Node<`u`&&(Ls.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,`parentNode`).get),typeof Element<`u`&&(Ls.tagName=Object.getOwnPropertyDescriptor(Element.prototype,`tagName`).get,Ls.id=Object.getOwnPropertyDescriptor(Element.prototype,`id`).get,Ls.className=Object.getOwnPropertyDescriptor(Element.prototype,`className`).get,Ls.getAttribute=Element.prototype.getAttribute),typeof HTMLElement<`u`&&(Ls.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,`dataset`).get)}catch{}function Rs(e,t,n){let r=Ls[t];if(r)try{return r.call(e,n)}catch{}let i=e[t];return typeof i==`function`?i.call(e,n):i}function J(e,t={}){if(!e)return`<unknown>`;try{let n=e,r=[],i=0,a=0,o,s=Array.isArray(t)?t:t.keyAttrs,c=!Array.isArray(t)&&t.maxStringLength||Is;for(;n&&i++<5&&(o=zs(n,s),!(o===`html`||i>1&&a+r.length*3+o.length>=c));)r.push(o),a+=o.length,n=Rs(n,`parentNode`);return r.reverse().join(` > `)}catch{return`<unknown>`}}function zs(e,t){let n=[],r=Rs(e,`tagName`);if(!r)return``;if(typeof HTMLElement<`u`&&e instanceof HTMLElement){let t=Rs(e,`dataset`);if(t){if(t.sentryComponent)return t.sentryComponent;if(t.sentryElement)return t.sentryElement}}n.push(r.toLowerCase());let i=t?.length?t.filter(t=>Rs(e,`getAttribute`,t)).map(t=>[t,Rs(e,`getAttribute`,t)]):null;
12if(i?.length)i.forEach(e=>{n.push(`[${e[0]}="${e[1]}"]`)});else{let t=Rs(e,`id`);t&&n.push(`#${t}`);let r=Rs(e,`className`);if(r&&C(r)){let e=r.split(/\s+/);for(let t of e)n.push(`.${t}`)}}for(let t of[`aria-label`,`type`,`name`,`title`,`alt`]){let r=Rs(e,`getAttribute`,t);r&&n.push(`[${t}="${r}"]`)}return n.join(``)}var Bs=e=>{let t=t=>{(t.type===`pagehide`||K.document?.visibilityState===`hidden`)&&e(t)};q(`visibilitychange`,t,{capture:!0,once:!0}),q(`pagehide`,t,{capture:!0,once:!0})};function Vs(e){return typeof e==`number`&&isFinite(e)}function Hs(e,t,n,{...r}){let i=R(e).start_timestamp;return i&&i>t&&typeof e.updateStartTime==`function`&&e.updateStartTime(t),pi(e,()=>{let e=di({startTime:t,...r});return e&&e.end(n),e})}function Us(e){let t=N();if(!t)return;let{name:n,transaction:r,attributes:i,startTime:a}=e,{release:o,environment:s}=t.getOptions(),{userInfo:c}=t.getDataCollectionOptions(),l=t.getIntegrationByName(`Replay`)?.getReplayId(),u=j(),d=u.getUser(),f=d===void 0?void 0:d.email||d.id||d.ip_address,p;try{p=u.getScopeData().contexts.profile.profile_id}catch{}return di({name:n,attributes:{release:o,environment:s,user:f||void 0,profile_id:p||void 0,replay_id:l||void 0,transaction:r,"user_agent.original":K.navigator?.userAgent,"client.address":c?`{{auto}}`:void 0,...i},startTime:a,experimental:{standalone:!0}})}function Ws(){return K.addEventListener&&K.performance}function Y(e){return e/1e3}function Gs(e){let t=`unknown`,n=`unknown`,r=``;for(let i of e){if(i===`/`){[t,n]=e.split(`/`);break}if(!isNaN(Number(i))){t=r===`h`?`http`:r,n=e.split(r)[1];break}r+=i}return r===e&&(t=r),{name:t,version:n}}function Ks(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function qs(e,t){let n,r=!1;function i(e){!r&&n&&t(e,n.spanContext().spanId,n),r=!0}Bs(()=>{i(`pagehide`)});let a=e.on(`beforeStartNavigationSpan`,(e,t)=>{t?.isRedirect||(i(`navigation`),a(),o())}),o=e.on(`afterStartPageLoadSpan`,e=>{n=e,o()})}function Js(e){let t=0,n;if(!Ks(`layout-shift`))return;let r=xs(({metric:e})=>{let r=e.entries[e.entries.length-1];r&&(t=e.value,n=r)},!0);qs(e,(e,i)=>{Ys(t,n,i,e),r()})}function Ys(e,t,n,r){G&&y.log(`Sending CLS span (${e})`);let i=t?Y((O()||0)+t.startTime):D(),a=j().getScopeData().transactionName,o=t?J(t.sources[0]?.node):`Layout shift`,s={[I]:`auto.http.browser.cls`,[F]:`ui.webvital.cls`,[ln]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((e,t)=>{s[`cls.source.${t+1}`]=J(e.node)});let c=Us({name:o,transaction:a,attributes:s,startTime:i});c&&(c.addEvent(`cls`,{[an]:``,[on]:e}),c.end(i))}function Xs(e){return e!=null&&e>0&&e<=6e4}function Zs(e){let t=0,n;if(!Ks(`largest-contentful-paint`))return;let r=Ss(({metric:e})=>{let r=e.entries[e.entries.length-1];!r||!Xs(e.value)||(t=e.value,n=r)},!0);qs(e,(e,i)=>{Qs(t,n,i,e),r()})}function Qs(e,t,n,r){if(!Xs(e))return;G&&y.log(`Sending LCP span (${e})`);let i=Y((O()||0)+(t?.startTime||0)),a=j().getScopeData().transactionName,o=t?J(t.element):`Largest contentful paint`,s={[I]:`auto.http.browser.lcp`,[F]:`ui.webvital.lcp`,[ln]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(s[`lcp.element`]=J(t.element)),t.id&&(s[`lcp.id`]=t.id),t.url&&(s[`lcp.url`]=t.url),t.loadTime!=null&&(s[`lcp.loadTime`]=t.loadTime),t.renderTime!=null&&(s[`lcp.renderTime`]=t.renderTime),t.size!=null&&(s[`lcp.size`]=t.size));let c=Us({name:o,transaction:a,attributes:s,startTime:i});c&&(c.addEvent(`lcp`,{[an]:`millisecond`,[on]:e}),c.end(i))}function X(e){return e&&((O()||performance.timeOrigin)+e)/1e3}function $s(e){let t={};if(e.nextHopProtocol!=null){let{name:n,version:r}=Gs(e.nextHopProtocol);t[`network.protocol.version`]=r,t[`network.protocol.name`]=n}return O()||Ws()?.timeOrigin?ec({...t,"http.request.redirect_start":X(e.redirectStart),"http.request.redirect_end":X(e.redirectEnd),"http.request.worker_start":X(e.workerStart),"http.request.fetch_start":X(e.fetchStart),"http.request.domain_lookup_start":X(e.domainLookupStart),"http.request.domain_lookup_end":X(e.domainLookupEnd),"http.request.connect_start":X(e.connectStart),"http.request.secure_connection_start":X(e.secureConnectionStart),"http.request.connection_end":X(e.connectEnd),"http.request.request_start":X(e.requestStart),"http.request.response_start":X(e.responseStart),"http.request.response_end":X(e.responseEnd),"http.request.time_to_first_byte":e.responseStart==null?void 0:e.responseStart/1e3}):t}function ec(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>e!=null))}var tc=2147483647,nc=0,Z={},Q,rc;function ic({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){let r=Ws();if(r&&O()){r.mark&&K.performance.mark(`sentry-tracing-init`);let i=t?Zs(n):t===!1?lc():void 0,a=e?Js(n):e===!1?cc():void 0,o=uc(),s=dc();return()=>{o(),s(),i?.(),a?.()}}return()=>void 0}function ac(){Ts(`longtask`,({entries:e})=>{let t=B();if(!t)return;let{op:n,start_timestamp:r}=R(t);for(let i of e){let e=Y(O()+i.startTime),a=Y(i.duration);n===`navigation`&&r&&e<r||Hs(t,e,e+a,{name:`Main UI thread blocked`,op:`ui.long-task`,attributes:{[I]:`auto.ui.browser.metrics`}})}})}function oc(){new PerformanceObserver(e=>{let t=B();if(t)for(let n of e.getEntries()){if(!n.scripts[0])continue;let e=Y(O()+n.startTime),{start_timestamp:r,op:i}=R(t);if(i===`navigation`&&r&&e<r)continue;let a=Y(n.duration),o={[I]:`auto.ui.browser.metrics`},{invoker:s,invokerType:c,sourceURL:l,sourceFunctionName:u,sourceCharPosition:d}=n.scripts[0];o[`browser.script.invoker`]=s,o[`browser.script.invoker_type`]=c,l&&(o[`code.filepath`]=l),u&&(o[`code.function`]=u),d!==-1&&(o[`browser.script.source_char_position`]=d),Hs(t,e,e+a,{name:`Main UI thread blocked`,op:`ui.long-animation-frame`,attributes:o})}}).observe({type:`long-animation-frame`,buffered:!0})}function sc(){Ts(`event`,({entries:e})=>{let t=B();if(t){for(let n of e)if(n.name===`click`){let e=Y(O()+n.startTime),r=Y(n.duration),i={name:J(n.target),op:`ui.interaction.${n.name}`,startTime:e,attributes:{[I]:`auto.ui.browser.metrics`}},a=_o(n.target);a&&(i.attributes[`ui.component_name`]=a),Hs(t,e,e+r,i)}}})}function cc(){return xs(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(Z.cls={value:e.value,unit:``},rc=t)},!0)}function lc(){return Ss(({metric:e})=>{let t=e.entries[e.entries.length-1];!t||!Xs(e.value)||(Z.lcp={value:e.value,unit:`millisecond`},Q=t)},!0)}function uc(){return Cs(({metric:e})=>{e.entries[e.entries.length-1]&&(Z.ttfb={value:e.value,unit:`millisecond`})})}function dc(){return Ts(`paint`,({entries:e})=>{let t=Po();for(let n of e){let e=n.startTime<t.firstHiddenTime;n.name===`first-paint`&&e&&(Z.fp={value:n.startTime,unit:`millisecond`}),n.name===`first-contentful-paint`&&e&&(Z.fcp={value:n.startTime,unit:`millisecond`})}})}function fc(e,t){let n=Ws(),r=O();if(!n?.getEntries||!r)return;let{spanStreamingEnabled:i,ignorePerformanceApiSpans:a,ignoreResourceSpans:o}=t,s=Y(r),c=n.getEntries(),{op:l,start_timestamp:u}=R(e);
12c.slice(nc).forEach(t=>{let n=Y(t.startTime),r=Y(Math.max(0,t.duration));if(!(l===`navigation`&&u&&s+n<u))switch(t.entryType){case`navigation`:vc(e,t,s);break;case`mark`:case`paint`:case`measure`:gc(e,t,n,r,s,a);break;case`resource`:Sc(e,t,t.name,n,r,s,o)}}),nc=Math.max(c.length-1,0),Cc(e,i)}function pc(e,t){let n=O();if(!Ws()?.getEntries||!n){mc();return}let{spanStreamingEnabled:r,recordClsOnPageloadSpan:i,recordLcpOnPageloadSpan:a}=t,o=Y(n);if(R(e).op===`pageload`){if(Ec(Z),r){let t=(t,n,r)=>{let i=r??`browser.web_vital.${t}.value`;e.setAttribute(i,n),G&&y.log(`Setting web vital attribute`,{[i]:n},`on pageload span`)};[`ttfb`,`fp`,`fcp`].forEach(e=>{Z[e]&&t(e,Z[e].value)}),Z[`ttfb.requestTime`]&&t(`ttfb.requestTime`,Z[`ttfb.requestTime`].value,`browser.web_vital.ttfb.request_time`)}else i||delete Z.cls,a||delete Z.lcp,Object.entries(Z).forEach(([t,n])=>{ei(t,n.value,n.unit,e)}),wc(e,t);e.setAttribute(r?`browser.performance.time_origin`:`performance.timeOrigin`,o),e.setAttribute(r?`browser.performance.navigation.activation_start`:`performance.activationStart`,Oo())}mc()}function mc(){Q=void 0,rc=void 0,Z={}}function hc(e){if(e?.entryType===`measure`)try{return e.detail.devtools.track===`Components â`}catch{return}}function gc(e,t,n,r,i,a){if(hc(t)||[`mark`,`measure`].includes(t.entryType)&&ot(t.name,a))return;let o=Do(!1),s=Y(o?o.requestStart:0),c=i+Math.max(n,s),l=i+n,u=l+r,d={[I]:`auto.resource.browser.metrics`};c!==l&&(d[`sentry.browser.measure_happened_before_request`]=!0,d[`sentry.browser.measure_start_time`]=c),_c(d,t),c<=u&&Hs(e,c,u,{name:t.name,op:t.entryType,attributes:d})}function _c(e,t){try{let n=t.detail;if(!n)return;if(typeof n==`object`){for(let[t,r]of Object.entries(n))if(r&&Ee(r))e[`sentry.browser.measure.detail.${t}`]=r;else if(r!==void 0)try{e[`sentry.browser.measure.detail.${t}`]=JSON.stringify(r)}catch{}return}if(Ee(n)){e[`sentry.browser.measure.detail`]=n;return}try{e[`sentry.browser.measure.detail`]=JSON.stringify(n)}catch{}}catch{}}function vc(e,t,n){[`unloadEvent`,`redirect`,`domContentLoadedEvent`,`loadEvent`,`connect`].forEach(r=>{yc(e,t,r,n)}),yc(e,t,`secureConnection`,n,`TLS/SSL`),yc(e,t,`fetch`,n,`cache`),yc(e,t,`domainLookup`,n,`DNS`),xc(e,t,n)}function yc(e,t,n,r,i=n){let a=t[bc(n)],o=t[`${n}Start`];!o||!a||Hs(e,r+Y(o),r+Y(a),{op:`browser.${i}`,name:t.name,attributes:{[I]:`auto.ui.browser.metrics`,...n===`redirect`&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function bc(e){return e===`secureConnection`?`connectEnd`:e===`fetch`?`domainLookupStart`:`${e}End`}function xc(e,t,n){let r=n+Y(t.requestStart),i=n+Y(t.responseEnd),a=n+Y(t.responseStart);t.responseEnd&&(Hs(e,r,i,{op:`browser.request`,name:t.name,attributes:{[I]:`auto.ui.browser.metrics`}}),Hs(e,a,i,{op:`browser.response`,name:t.name,attributes:{[I]:`auto.ui.browser.metrics`}}))}function Sc(e,t,n,r,i,a,o){if(t.initiatorType===`xmlhttprequest`||t.initiatorType===`fetch`)return;let s=t.initiatorType?`resource.${t.initiatorType}`:`resource.other`;if(o?.includes(s))return;let c={[I]:`auto.resource.browser.metrics`},l=Ba(n);l.protocol&&(c[`url.scheme`]=l.protocol.split(`:`).pop()),l.host&&(c[`server.address`]=l.host),c[`url.same_origin`]=n.includes(K.location.origin),c[Ui]=n,Tc(t,c,[[`responseStatus`,`http.response.status_code`],[`transferSize`,`http.response_transfer_size`],[`encodedBodySize`,`http.response_content_length`],[`decodedBodySize`,`http.decoded_response_content_length`],[`renderBlockingStatus`,`resource.render_blocking_status`],[`deliveryType`,`http.response_delivery_type`]]);let u={...c,...$s(t)},d=a+r;Hs(e,d,d+i,{name:n.replace(K.location.origin,``),op:s,attributes:u})}function Cc(e,t){let n=K.navigator;if(!n)return;let r=n.connection;r&&(r.effectiveType&&e.setAttribute(t?`network.connection.effective_type`:`effectiveConnectionType`,r.effectiveType),r.type&&e.setAttribute(t?`network.connection.type`:`connectionType`,r.type),Vs(r.rtt)&&(t?e.setAttribute(`network.connection.rtt`,r.rtt):R(e).op===`pageload`&&ei(`connection.rtt`,r.rtt,`millisecond`))),Vs(n.deviceMemory)&&(t?e.setAttribute(`device.memory.estimated_capacity`,n.deviceMemory):e.setAttribute(`deviceMemory`,`${n.deviceMemory} GB`)),Vs(n.hardwareConcurrency)&&(t?e.setAttribute(`device.processor_count`,n.hardwareConcurrency):e.setAttribute(`hardwareConcurrency`,String(n.hardwareConcurrency)))}function wc(e,t){Q&&t.recordLcpOnPageloadSpan&&(Q.element&&e.setAttribute(`lcp.element`,J(Q.element)),Q.id&&e.setAttribute(`lcp.id`,Q.id),Q.url&&e.setAttribute(`lcp.url`,Q.url.trim().slice(0,200)),Q.loadTime!=null&&e.setAttribute(`lcp.loadTime`,Q.loadTime),Q.renderTime!=null&&e.setAttribute(`lcp.renderTime`,Q.renderTime),e.setAttribute(`lcp.size`,Q.size)),rc?.sources&&t.recordClsOnPageloadSpan&&rc.sources.forEac
12h((t,n)=>e.setAttribute(`cls.source.${n+1}`,J(t.node)))}function Tc(e,t,n){n.forEach(([n,r])=>{let i=e[n];i!=null&&(typeof i==`number`&&i<tc||typeof i==`string`)&&(t[r]=i)})}function Ec(e){let t=Do(!1);if(!t)return;let{responseStart:n,requestStart:r}=t;r<=n&&(e[`ttfb.requestTime`]={value:n-r,unit:`millisecond`})}var Dc=[],Oc=new Map,kc=new Map;function Ac(){if(Ws()&&O()){let e=Mc();return()=>{e()}}return()=>void 0}var jc={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 Mc(){return ws(Nc)}var Nc=({metric:e})=>{if(e.value==null)return;let t=Y(e.value);if(t>60)return;let n=e.entries.find(t=>t.duration===e.value&&jc[t.name]);if(!n)return;let{interactionId:r}=n,i=jc[n.name],a=Y(O()+n.startTime),o=B(),s=o?z(o):void 0,c=r==null?void 0:Oc.get(r),l=c?.span||s,u=l?R(l).description:j().getScopeData().transactionName,d=Us({name:c?.elementName||J(n.target),transaction:u,attributes:{[I]:`auto.http.browser.inp`,[F]:`ui.interaction.${i}`,[ln]:n.duration},startTime:a});d&&(d.addEvent(`inp`,{[an]:`millisecond`,[on]:e.value}),d.end(a+t))};function Pc(e){return e==null?void 0:Oc.get(e)}function Fc(){let e=Object.keys(jc);Pa()&&e.forEach(e=>{K.addEventListener(e,t,{capture:!0,passive:!0})});function t(e){let t=e.target;if(!t)return;let n=J(t),r=Math.round(e.timeStamp);if(kc.set(r,n),kc.size>50){let e=kc.keys().next().value;e!==void 0&&kc.delete(e)}}function n(e){let t=Math.round(e.startTime),n=kc.get(t);if(!n)for(let e=-5;e<=5;e++){let r=kc.get(t+e);if(r){n=r;break}}return n||`<unknown>`}let r=({entries:e})=>{let t=B(),r=t&&z(t);e.forEach(e=>{if(!Fs(e))return;let t=e.interactionId;if(t==null||Oc.has(t))return;let i=e.target?J(e.target):n(e);if(Dc.length>10){let e=Dc.shift();Oc.delete(e)}Dc.push(t),Oc.set(t,{span:r,elementName:i})})};Ts(`event`,r),Ts(`first-input`,r)}function Ic(e){let{name:t,op:n,origin:r,metricName:i,value:a,attributes:o,parentSpan:s,reportEvent:c,startTime:l,endTime:u}=e,d=j().getScopeData().transactionName,f={[I]:r,[F]:n,[ln]:0,[`browser.web_vital.${i}.value`]:a,[Hi]:d,[Vi]:d,"user_agent.original":K.navigator?.userAgent,...o};s&&tr(s).attributes?.[`sentry.op`]===`pageload`&&(f[`sentry.pageload.span_id`]=s.spanContext().spanId),c&&(f[`browser.web_vital.${i}.report_event`]=c);let p=di({name:t,attributes:f,startTime:l,parentSpan:s});p&&p.end(u??l)}function Lc(e){let t=0,n;if(!Ks(`largest-contentful-paint`))return;let r=Ss(({metric:e})=>{let r=e.entries[e.entries.length-1];!r||!Xs(e.value)||(t=e.value,n=r)},!0);qs(e,(e,i,a)=>{Rc(t,n,a,e),r()})}function Rc(e,t,n,r){if(!Xs(e))return;G&&y.log(`Sending LCP span (${e})`);let i=O()||0,a=Y(i),o=Y(i+(t?.startTime||0)),s=t?J(t.element):`Largest contentful paint`,c={};t?.element&&(c[`browser.web_vital.lcp.element`]=J(t.element)),t?.id&&(c[`browser.web_vital.lcp.id`]=t.id),t?.url&&(c[`browser.web_vital.lcp.url`]=t.url),t?.loadTime!=null&&(c[`browser.web_vital.lcp.load_time`]=t.loadTime),t?.renderTime!=null&&(c[`browser.web_vital.lcp.render_time`]=t.renderTime),t?.size!=null&&(c[`browser.web_vital.lcp.size`]=t.size),Ic({name:s,op:`ui.webvital.lcp`,origin:`auto.http.browser.lcp`,metricName:`lcp`,value:e,attributes:c,parentSpan:n,reportEvent:r,startTime:a,endTime:o})}function zc(e){let t=0,n;if(!Ks(`layout-shift`))return;let r=xs(({metric:e})=>{let r=e.entries[e.entries.length-1];r&&(t=e.value,n=r)},!0);qs(e,(e,i,a)=>{Bc(t,n,a,e),r()})}function Bc(e,t,n,r){G&&y.log(`Sending CLS span (${e})`);let i=t?Y((O()||0)+t.startTime):D(),a=t?J(t.sources[0]?.node):`Layout shift`,o={};t?.sources&&t.sources.forEach((e,t)=>{o[`browser.web_vital.cls.source.${t+1}`]=J(e.node)}),Ic({name:a,op:`ui.webvital.cls`,origin:`auto.http.browser.cls`,metricName:`cls`,value:e,attributes:o,parentSpan:n,reportEvent:r,startTime:i})}function Vc(){!Ws()||!O()||ws(({metric:e})=>
12{if(e.value==null||Y(e.value)>60)return;let t=e.entries.find(t=>t.duration===e.value&&jc[t.name]);t&&Hc(e.value,t)})}function Hc(e,t){G&&y.log(`Sending INP span (${e})`);let n=Y(O()+t.startTime),r=Y(e),i=jc[t.name],a=Pc(t.interactionId),o=B(),s=o?z(o):void 0,c=a?.span||s,l=c?tr(c).name:j().getScopeData().transactionName;Ic({name:a?.elementName||J(t.target),op:`ui.interaction.${i}`,origin:`auto.http.browser.inp`,metricName:`inp`,value:e,attributes:{[ln]:t.duration,[Hi]:l,[Vi]:l},startTime:n,endTime:n+r,parentSpan:c})}var Uc;function Wc(e){let t=`history`;b(t,e),x(t,Gc)}function Gc(){if(K.addEventListener(`popstate`,()=>{let e=K.location.href,t=Uc;Uc=e,t!==e&&S(`history`,{from:t,to:e})}),!to())return;function e(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let r=Uc,i=Kc(String(n));if(Uc=i,r===i)return e.apply(this,t);S(`history`,{from:r,to:i})}return e.apply(this,t)}}Pe(K.history,`pushState`,e),Pe(K.history,`replaceState`,e)}function Kc(e){try{return new URL(e,K.location.origin).toString()}catch{return e}}var qc=`__sentry_xhr_v3__`;function Jc(e){b(`xhr`,e),x(`xhr`,Yc)}function Yc(){if(!K.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=Error(),i=D()*1e3,a=C(n[0])?n[0].toUpperCase():void 0,o=Xc(n[1]);if(!a||!o)return e.apply(t,n);t[qc]={method:a,url:o,request_headers:{}},a===`POST`&&o.match(/sentry_key/)&&(t.__sentry_own_request__=!0);let s=()=>{let e=t[qc];if(e&&t.readyState===4){try{e.status_code=t.status}catch{}S(`xhr`,{endTimestamp:D()*1e3,startTimestamp:i,xhr:t,virtualError:r}),t.removeEventListener(`readystatechange`,s)}};return`onreadystatechange`in t&&typeof t.onreadystatechange==`function`?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply(e,t,n){return s(),e.apply(t,n)}}):t.addEventListener(`readystatechange`,s),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){let[r,i]=n,a=t[qc];return a&&C(r)&&C(i)&&(a.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){let r=t[qc];return r?(n[0]!==void 0&&(r.body=n[0]),S(`xhr`,{startTimestamp:D()*1e3,xhr:t}),e.apply(t,n)):e.apply(t,n)}})}function Xc(e){if(C(e))return e;try{return e.toString()}catch{}}var Zc=Symbol.for(`sentry__originalRequestBody`);function Qc(e){return new URLSearchParams(e).toString()}function $c(e,t=y){try{if(typeof e==`string`)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[Qc(e)];if(!e)return[void 0]}catch(n){return G&&t.error(n,`Failed to serialize body`,e),[void 0,`BODY_PARSE_ERROR`]}return G&&t.log(`Skipping network body because of body type`,e),[void 0,`UNPARSEABLE_BODY_TYPE`]}function el(e=[]){if(e.length>=2&&e[1]&&typeof e[1]==`object`&&`body`in e[1])return e[1].body;if(e.length>=1&&e[0]instanceof Request){let t=e[0][Zc];return t===void 0?void 0:t}}function tl(e){let t;try{t=e.getAllResponseHeaders()}catch(t){return G&&y.error(t,`Failed to get xhr response headers`,e),{}}return t?t.split(`\r 13`).reduce((e,t)=>{let[n,r]=t.split(`: `);return r&&(e[n.toLowerCase()]=r),e},{}):{}}var $=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__;function nl(e){return e.split(`,`).some(e=>e.trim().startsWith(`sentry-`))}function rl(e){try{return new URL(e,W.location.origin).href}catch{return}}function il(e){return e.entryType===`resource`&&`initiatorType`in e&&typeof e.nextHopProtocol==`string`&&(e.initiatorType===`fetch`||e.initiatorType===`xmlhttprequest`)}function al(e){try{return new Headers(e)}catch{return}}var ol={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function sl(e,t){let{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:i,enableHTTPTimings:a,tracePropagationTargets:o,onRequestSpanStart:s,onRequestSpanEnd:c}
13={...ol,...t},l=typeof i==`function`?i:e=>!0,u=e=>ul(e,o),d={},f=e.getOptions().propagateTraceparent;n&&ao(t=>{let n=Ga(t,l,u,d,{propagateTraceparent:f,onRequestSpanEnd:c});if(n){let r=rl(t.fetchData.url),i=r?Ba(r).host:void 0,o=r?U(r):void 0;n.setAttributes({[Bi]:o,[Ui]:o,"server.address":i}),a&&ll(n,e),s?.(n,{headers:t.headers})}}),r&&Jc(t=>{let n=dl(t,l,u,d,f,c);n&&(a&&ll(n,e),s?.(n,{headers:al(t.xhr.__sentry_xhr_v3__?.request_headers)}))})}var cl=300;function ll(e,t){let{url:n}=R(e).data;if(!n||typeof n!=`string`)return;let r=()=>void setTimeout(i);if(H(t)){let t=e.end.bind(e);e.end=e=>{let n=e??D(),a=!1,o=()=>{a||(a=!0,setTimeout(i),t(n),clearTimeout(s))};r=o;let s=setTimeout(o,cl)}}let i=Ts(`resource`,({entries:t})=>{t.forEach(t=>{il(t)&&t.name.endsWith(n)&&(e.setAttributes($s(t)),r())})})}function ul(e,t){let n=go();if(n){let r,i;try{r=new URL(e,n),i=new URL(n).origin}catch{return!1}let a=r.origin===i;return t?ot(r.toString(),t)||a&&ot(r.pathname,t):a}{let n=!!e.match(/^\/(?!\/)/);return t?ot(e,t):n}}function dl(e,t,n,r,i,a){let o=e.xhr,s=o?.[qc];if(!o||o.__sentry_own_request__||!s)return;let{url:c,method:l}=s,u=V()&&t(c);if(e.endTimestamp){let t=o.__sentry_xhr_span_id__;if(!t)return;let n=r[t];n&&(u&&s.status_code!==void 0&&(pn(n,s.status_code),n.end(),a?.(n,{headers:al(tl(o)),error:e.error})),delete r[t]);return}let d=rl(c),f=Ba(d||c),p=d?U(d):void 0,m=U(Va(c)),h=N(),g=!!B(),_=g||!!h&&H(h),v=u&&_?di({name:`${l} ${m}`,attributes:{url:U(c),type:`xhr`,"http.method":l,"http.url":p,[Ui]:p,"server.address":f?.host,[I]:`auto.http.browser`,[F]:`http.client`,...f?.search&&{"http.query":f?.search},...f?.hash&&{"http.fragment":f?.hash}}}):new Tr,ee=Ci(v)&&g?void 0:v;return u&&!_&&h?.recordDroppedEvent(`no_parent_span`,`span`),o.__sentry_xhr_span_id__=v.spanContext().spanId,r[o.__sentry_xhr_span_id__]=v,n(c)&&fl(o,V()&&_?ee:void 0,i),h&&h.emit(`beforeOutgoingRequestSpan`,v,e),v}function fl(e,t,n){let{"sentry-trace":r,baggage:i,traceparent:a}=Ha({span:t,propagateTraceparent:n});r&&pl(e,r,i,a)}function pl(e,t,n,r){let i=e.__sentry_xhr_v3__?.request_headers;if(!(i?.[`sentry-trace`]||!e.setRequestHeader))try{if(e.setRequestHeader(`sentry-trace`,t),r&&!i?.traceparent&&e.setRequestHeader(`traceparent`,r),n){let t=i?.baggage;(!t||!nl(t))&&e.setRequestHeader(`baggage`,n)}}catch{}}var ml=new WeakMap,hl=new WeakMap,gl=9e4,_l=[`text/event-stream`,`application/x-ndjson`,`application/stream+json`],vl=Aa(()=>({name:`FetchStreamPerformance`,setup(){oo(e=>{if(e.response){let t=ml.get(e.response);if(t&&e.endTimestamp){t.end(e.endTimestamp);let n=hl.get(e.response);n&&clearTimeout(n)}}}),ao(e=>{if(e.endTimestamp&&e.response){let t=e.response.headers?.get(`content-type`)||``;if(e.response.headers?.get(`content-length`)||!_l.some(e=>t.startsWith(e)))return;let n=e.fetchData?.url||``,r=e.fetchData?.method||`GET`,i=Ra(n),a=di({name:`${r} ${n.startsWith(`data:`)?U(n):i?za(i):n}`,startTime:e.endTimestamp,attributes:{url:U(n),"http.method":r,type:`fetch`,[F]:`http.client.stream`,[I]:`auto.http.browser.stream`}});ml.set(e.response,a);let o=setTimeout(()=>{a.isRecording()&&a.end()},gl);hl.set(e.response,o)}})}})),yl=`WebVitals`,bl=Aa((e={})=>{let t=new Set(e.ignore??[]);return{name:yl,setup(n){let r=H(n),{enableStandaloneClsSpans:i,enableStandaloneLcpSpans:a}=e._experiments??{},o=r||t.has(`cls`)?void 0:i||!1,s=r||t.has(`lcp`)?void 0:a||!1,c=ic({recordClsStandaloneSpans:o,recordLcpStandaloneSpans:s,client:n}),l=new WeakSet;n.on(`afterStartPageLoadSpan`,e=>{l.add(e)}),n.on(`spanEnd`,e=>{l.delete(e)&&(c(),pc(e,{recordClsOnPageloadSpan:o===!1,recordLcpOnPageloadSpan:s===!1,spanStreamingEnabled:r}))}),r?(t.has(`lcp`)||Lc(n),t.has(`cls`)||zc(n),t.has(`inp`)||Vc()):t.has(`inp`)||Ac()},afterAllSetup(){t.has(`inp`)||Fc()}}});function xl(){W.document?W.document.addEventListener(`visibilitychange`,()=>{let e=B();if(!e)return;let t=z(e);
13if(W.document.hidden&&t){let e=`cancelled`,{op:n,status:r}=R(t);$&&y.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${n}`),r||t.setStatus({code:2,message:e}),t.setAttribute(`sentry.cancellation_reason`,`document.hidden`),t.end()}}):$&&y.warn(`[Tracing] Could not set up background tab detection due to lack of global document`)}var Sl=`sentry_previous_trace`,Cl=`sentry.previous_trace`;function wl(e,{linkPreviousTrace:t,consistentTraceSampling:n}){let r=t===`session-storage`,i=r?Dl():void 0;e.on(`spanStart`,e=>{if(z(e)!==e)return;let t=j().getPropagationContext();i=Tl(i,e,t),r&&El(i)});let a=!0;n&&e.on(`beforeSampling`,e=>{if(!i)return;let t=j(),n=t.getPropagationContext();if(a&&n.parentSpanId){a=!1;return}t.setPropagationContext({...n,dsc:{...n.dsc,sample_rate:String(i.sampleRate),sampled:String(Ol(i.spanContext))},sampleRand:i.sampleRand}),e.parentSampled=Ol(i.spanContext),e.parentSampleRate=i.sampleRate,e.spanAttributes={...e.spanAttributes,[nn]:i.sampleRate}})}function Tl(e,t,n){let r=R(t);function i(){try{let e=Number(r.data?.[`sentry.sample_rate`]??n.dsc?.sample_rate);return Number.isNaN(e)?0:e}catch{return 0}}let a={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:i(),sampleRand:n.sampleRand};if(!e)return a;let o=e.spanContext;return o.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=3600&&($&&y.log(`Adding previous_trace \`${JSON.stringify(o)}\` link to span \`${JSON.stringify({op:r.op,...t.spanContext()})}\``),t.addLink({context:o,attributes:{[un]:`previous_trace`}}),t.setAttribute(Cl,`${o.traceId}-${o.spanId}-${+!!Ol(o)}`)),a)}function El(e){try{W.sessionStorage.setItem(Sl,JSON.stringify(e))}catch(e){$&&y.warn(`Could not store previous trace in sessionStorage`,e)}}function Dl(){try{let e=W.sessionStorage?.getItem(Sl);return JSON.parse(e)}catch{return}}function Ol(e){return e.traceFlags===1}var kl=`BrowserTracing`,Al=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function jl(){let e=W.navigator;return e?.userAgent?Al.test(e.userAgent):!1}var Ml={...wi,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:`in-memory`,consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...ol},Nl=((e={})=>{`enableElementTiming`in e&&d(()=>{console.warn("[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.")});let t={name:void 0,source:void 0},n=W.document,{enableInp:i,enableLongTask:a,enableLongAnimationFrame:o,_experiments:{enableInteractions:s,enableStandaloneClsSpans:c,enableStandaloneLcpSpans:l},beforeStartSpan:u,idleTimeout:f,finalTimeout:p,childSpanTimeout:m,markBackgroundSpan:h,traceFetch:g,traceXHR:_,trackFetchStreamPerformance:v,shouldCreateSpanForRequest:ee,enableHTTPTimings:te,ignoreResourceSpans:ne,ignorePerformanceApiSpans:re,instrumentPageLoad:ie,instrumentNavigation:ae,detectRedirects:oe,linkPreviousTrace:se,consistentTraceSampling:ce,enableReportPageLoaded:le,onRequestSpanStart:ue,onRequestSpanEnd:de}={...Ml,...e},fe=jl(),b,x;function S(e,r,i=!0,a){let o=r.op===`pageload`,s=r.name,c=u?u(r):r,l=Ra(a||go()),d={...l?.pathname&&{"url.path":l.pathname},...l&&!La(l)&&{"url.full":l.href},...c.attributes};if(s!==c.name&&(d[P]=`custom`),c.attributes=d,!i){let e=_t();di({...c,startTime:e}).end(e);return}t.name=c.name,t.source=d[P];let h=ki(c,{idleTimeout:f,finalTimeout:p,childSpanTimeout:m,disableAutoFinish:o,beforeSpanEnd:t=>{fc(t,{ignoreResourceSpans:ne,ignorePerformanceApiSpans:re,spanStreamingEnabled:H(e)}),Vl(e,void 0);let n=j(),r=n.getPropagationContext();n.setPropagationContext({...r,traceId:h.spanContext().traceId,sampled:or(h),dsc:Mr(t)}),o&&(x=void 0)},trimIdleSpanEndTimestamp:!le});o&&le&&(x=h),Vl(e,h);function g(){n&&[`interactive`,`complete`].includes(n.readyState)&&(e.emit(`idleSpanEnableAutoFinish`,h),n.removeEventListener(`readystatechange`,g))}o&&!le&&n&&(n.addEventListener(`readystatechange`,g),g())}return{name:kl,setup(e){if(fe){$&&y.log(`[Tracing] Skipping browserTracingIntegration setup for bot user agent.`);return}if(vr(),o&&r.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes(`long-animation-frame`)?oc():a&&ac(),s&&sc(),oe&&n){let e=()=>{b=D()};addEventListener(`click`,e,{capture:!0}
13),addEventListener(`keydown`,e,{capture:!0,passive:!0})}function t(){let t=Bl(e);t&&!R(t).timestamp&&($&&y.log(`[Tracing] Finishing current active span with op: ${R(t).op}`),t.setAttribute(rn,`cancelled`),t.end())}e.on(`startNavigationSpan`,(n,r)=>{if(N()!==e)return;if(r?.isRedirect){$&&y.warn(`[Tracing] Detected redirect, navigation span will not be the root span, but a child span.`),S(e,{op:`navigation.redirect`,...n},!1,r.url);return}b=void 0,t(),M().setPropagationContext({traceId:k(),sampleRand:Math.random(),propagationSpanId:V()?void 0:A()});let i=j();i.setPropagationContext({traceId:k(),sampleRand:Math.random(),propagationSpanId:V()?void 0:A()}),i.setSDKProcessingMetadata({normalizedRequest:void 0}),S(e,{op:`navigation`,...n,parentSpan:null,forceTransaction:!0},!0,r?.url)}),e.on(`startPageLoadSpan`,(n,r={})=>{if(N()!==e)return;t();let i=Un(r.sentryTrace||Il(`sentry-trace`)||Ll(`sentry-trace`),r.baggage||Il(`baggage`)||Ll(`baggage`)),a=j();a.setPropagationContext(i),V()||(a.getPropagationContext().propagationSpanId=A()),a.setSDKProcessingMetadata({normalizedRequest:wo()}),S(e,{op:`pageload`,...n})}),e.on(`endPageloadSpan`,()=>{le&&x&&(x.setAttribute(rn,`reportPageLoaded`),x.end())})},afterAllSetup(e){if(fe)return;e.addIntegration&&!e.getIntegrationByName?.(`WebVitals`)&&e.addIntegration(bl({ignore:i?[]:[`inp`],_experiments:{enableStandaloneClsSpans:c,enableStandaloneLcpSpans:l}}));let n=go();if(se!==`off`&&wl(e,{linkPreviousTrace:se,consistentTraceSampling:ce}),W.location){if(ie){let t=O();Pl(e,{name:W.location.pathname,startTime:t?t/1e3:void 0,attributes:{[P]:`url`,[I]:`auto.pageload.browser`}})}ae&&Wc(({to:t,from:r})=>{if(r===void 0&&n?.indexOf(t)!==-1){n=void 0;return}n=void 0;let i=Ra(t),a=Bl(e),o=a&&oe&&Ul(a,b);Fl(e,{name:i?.pathname||W.location.pathname,attributes:{[P]:`url`,[I]:`auto.navigation.browser`}},{url:t,isRedirect:o})})}h&&xl(),s&&Rl(e,f,p,m,t),sl(e,{traceFetch:g,traceXHR:_,tracePropagationTargets:e.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:ee,enableHTTPTimings:te,onRequestSpanStart:ue,onRequestSpanEnd:de}),v&&e.addIntegration(vl())}}});function Pl(e,t,n){e.emit(`startPageLoadSpan`,t,n),j().setTransactionName(t.name);let r=Bl(e);return r&&e.emit(`afterStartPageLoadSpan`,r),r}function Fl(e,t,n){let{url:r,isRedirect:i}=n||{};e.emit(`beforeStartNavigationSpan`,t,{isRedirect:i,url:r}),e.emit(`startNavigationSpan`,t,{isRedirect:i,url:r});let a=j();return a.setTransactionName(t.name),r&&!i&&a.setSDKProcessingMetadata({normalizedRequest:{...wo(),url:r}}),Bl(e)}function Il(e){return(W.document?.querySelector(`meta[name=${e}]`))?.getAttribute(`content`)||void 0}function Ll(e){return(W.performance?.getEntriesByType?.(`navigation`)[0])?.serverTiming?.find(t=>t.name===e)?.description}function Rl(e,t,n,r,i){let a=W.document,o;a&&addEventListener(`click`,()=>{let a=`ui.action.click`,s=Bl(e);if(s){let e=R(s).op;if([`navigation`,`pageload`].includes(e)){$&&y.warn(`[Tracing] Did not create ${a} span because a pageload or navigation span is in progress.`);return}}if(o&&=(o.setAttribute(rn,`interactionInterrupted`),o.end(),void 0),!i.name){$&&y.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`);return}
13o=ki({name:i.name,op:a,attributes:{[P]:i.source||`url`}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})},{capture:!0})}var zl=`_sentry_idleSpan`;function Bl(e){return e[zl]}function Vl(e,t){w(e,zl,t)}var Hl=1.5;function Ul(e,t){let n=R(e),r=_t();return!(r-n.start_timestamp>Hl||t&&r-t<=Hl)}var Wl=r,Gl=null,Kl=void 0,ql=new Map,Jl=new Map;function Yl(e){let t=e.split(`/`).filter(Boolean),n=0;for(let e of t)e.startsWith(`:`)&&(e.substring(1).endsWith(`*`)?n+=100:n+=10);return n}function Xl(e){if(ql.has(e))return ql.get(e)??null;try{let t=new RegExp(e);return ql.set(e,t),t}catch(t){return yo&&y.warn(`Could not compile regex`,{regexString:e,error:t}),null}}function Zl(){if(!Wl?._sentryRemixRouteManifest||typeof Wl._sentryRemixRouteManifest!=`string`)return null;let e=Wl._sentryRemixRouteManifest;if(Gl&&Kl===e)return Gl;ql.clear(),Jl.clear();let t={staticRoutes:[],dynamicRoutes:[]};try{return t=JSON.parse(e),!Array.isArray(t.staticRoutes)||!Array.isArray(t.dynamicRoutes)?null:(Gl=t,Kl=e,t)}catch{return yo&&y.warn(`Could not extract route manifest`),null}}function Ql(e,t,n){let r=[];if(t.some(t=>t.path===e))return r;for(let t of n)t.regex&&Xl(t.regex)?.test(e)&&r.push(t.path);return r}function $l(){return Zl()!==null}var eu=e=>{let t=Zl();if(!t)return;if(Jl.has(e))return Jl.get(e);let{staticRoutes:n,dynamicRoutes:r}=t,i=Ql(e,n,r).sort((e,t)=>Yl(e)-Yl(t))[0];return Jl.set(e,i),i},tu,nu,ru,iu;function au(){if(W.location)return W.location.pathname}function ou(e,t){let n=e?eu(e):void 0;return n?{name:n,source:`route`}:$l()?{name:e||t,source:`url`}:{name:t,source:`route`}}function su(e){let t=au();if(!t)return;let n=eu(t),r=n||t,i=n?`route`:`url`;Pl(e,{name:r,op:`pageload`,attributes:{[I]:`auto.pageload.remix`,[P]:i,...i===`route`&&{"url.template":r}}})}function cu(e,t){let n=e[e.length-1],r=N();if(!r||!n)return;let{name:i,source:a}=ou(t.pathname,n.id);Fl(r,{name:i,op:`navigation`,attributes:{[I]:`auto.navigation.remix`,[P]:a,...a===`route`&&{"url.template":i}}})}function lu(e,t,n,r,i){return a=>{if(uu({useEffect:t,useLocation:n,useMatches:r,instrumentNavigation:i||!0}),!tu||!nu||!ru)return yo&&!Na()&&y.warn(`Remix SDK was unable to wrap your root because of one or more missing parameters.`),vo.createElement(e,{...a});let o=!1,s=nu(),c=ru();return tu(()=>{let e=c?.[c.length-1];if(e){let{name:t,source:n}=ou(s.pathname,e.id);j().setTransactionName(t);let r=B();if(r){let e=z(r);e&&(e.updateName(t),e.setAttribute(P,n),n===`route`&&e.setAttribute(Wi,t))}}o=!0},[]),tu(()=>{let e=B();if(o){e&&e.end();return}iu&&c?.length&&(e&&e.end(),cu(c,s))},[s]),o=!1,vo.createElement(e,{...a})}}function uu({useEffect:e,useLocation:t,useMatches:n,instrumentNavigation:r}){tu=e||tu,nu=t||nu,ru=n||ru,iu=r??iu}export{Yr as $,we as $t,Ra as A,M as At,Da as B,E as Bt,xo as C,i as Cn,dn as Ct,ao as D,P as Dt,go as E,F as Et,Ma as F,_t as Ft,_a as G,Ye as Gt,ga as H,ot as Ht,Oa as I,pt as It,Yi as J,w as Jt,ba as K,Ue as Kt,Aa as L,ft as Lt,U as M,Et as Mt,Pa as N,Ct as Nt,ro as O,N as Ot,Na as P,O as Pt,Xr as Q,Ce as Qt,Ea as R,mt as Rt,wo as S,s as Sn,zn as St,_o as T,n as Tn,cn as Tt,ha as U,T as Ut,ya as V,it as Vt,Ca as W,Xe as Wt,Ui as X,Pe as Xt,Ji as Y,ze as Yt,H as Z,Ie as Zt,Ts as _,ae as _n,gr as _t,$ as a,De as an,Gr as at,G as b,y as bn,Bn as bt,tl as c,je as cn,zr as ct,Jc as d,b as dn,Mr as dt,be as en,Fr as et,Wc as f,x as fn,Dr as ft,Ss as g,le as gn,z as gt,ws as h,ue as hn,B as ht,Nl as i,Te as in,Lr as it,Ba as j,en as jt,La as k,j as kt,Qc as l,_e as ln,Nr as lt,xs as m,ie as mn,br as mt,su as n,ke as nn,Pr as nt,$c as o,Ee as on,Ir as ot,J as p,S as pn,Sr as pt,ia as q,He as qt,lu as r,Oe as rn,qr as rt,el as s,C as sn,Kr as st,uu as t,Se as tn,Hr as tt,qc as u,me as un,jr as ut,as as v,c as vn,R as vt,Co as w,r as wn,ln as wt,W as x,u as xn,Nn as xt,K as y,d as yn,rr as yt,ka as z,dt as zt};
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.