PageSourceSearch

https://delphigrc.org/assets/index-DhmtBasA.js

js delphigrc.org collected 2026-10-04 00:25:36 UTC 116,318 bytes, 1 lines download raw bytes

1import{r as e}from"./vendor-react-BH6F5oQJ.js";import{D as t,d as n,g as r,G as s,b as o,e as a,S as i,i as c,n as u,f as l,h as d,j as p,k as f,l as m,m as h,o as g,p as v,q as _,r as y,t as b,u as S,v as T,w as E,x as w,T as k,y as x,z as I,A as C,B as $,C as P,E as R,F as A,H as O,I as L,J as D,K as N,L as M,M as q,N as j,O as H,P as F,Q as B,R as U,U as z,V as W,W as G,X as J,Y as Q,Z as V,_ as X,$ as Y,a0 as K,a1 as Z,a2 as ee,a3 as te,a4 as ne,a5 as re,a6 as se,a7 as oe,a8 as ae,a9 as ie,aa as ce,ab as ue,ac as le,ad as de,ae as pe,af as fe,ag as me,ah as he,ai as ge,aj as ve,ak as _e,al as ye,am as be,an as Se,ao as Te,ap as Ee,aq as we,ar as ke,as as xe,at as Ie,au as Ce,av as $e,aw as Pe,ax as Re,ay as Ae,az as Oe,aA as Le,aB as De,aC as Ne,aD as Me,aE as qe,aF as je,aG as He,aH as Fe,aI as Be,aJ as Ue,aK as ze,aL as We,aM as Ge,aN as Je,aO as Qe,aP as Ve,aQ as Xe,aR as Ye,aS as Ke,aT as Ze,a as et,aU as tt,aV as nt,aW as rt,aX as st,aY as ot,aZ as at,a_ as it,a$ as ct,b0 as ut,b1 as lt,b2 as dt,b3 as pt,b4 as ft,b5 as mt,b6 as ht,b7 as gt,b8 as vt,b9 as _t,ba as yt,bb as bt,bc as St}from"./exports-C9FZZXUj.js";import{bd as Tt,c as Et,be as wt,bf as kt,bg as xt,s as It}from"./exports-C9FZZXUj.js";const Ct={},$t={};function Pt(e,t){return Ct[e]=Ct[e]||[],Ct[e].push(t),()=>{const n=Ct[e];if(n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}}function Rt(e,r){if(!$t[e]){$t[e]=!0;try{r()}catch(s){t&&n.error(`Error while instrumenting ${e}`,s)}}}function At(e,s){const o=e&&Ct[e];if(o)for(const i of o)try{i(s)}catch(a){t&&n.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${r(i)}\nError:`,a)}}let Ot=null;function Lt(e){const t="error";Pt(t,e),Rt(t,Dt)}function Dt(){Ot=s.onerror,s.onerror=function(e,t,n,r,s){return At("error",{column:r,error:s,line:n,msg:e,url:t}),!!Ot&&Ot.apply(this,arguments)},s.onerror.__SENTRY_INSTRUMENTED__=!0}let Nt=null;function Mt(e){const t="unhandledrejection";Pt(t,e),Rt(t,qt)}function qt(){Nt=s.onunhandledrejection,s.onunhandledrejection=function(e){return At("unhandledrejection",e),!Nt||Nt.apply(this,arguments)},s.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}let jt=!1;function Ht(){function e(){const e=o(),r=e&&a(e);if(r){const e="internal_error";t&&n.log(`[Tracing] Root span: ${e} -> Global error occurred`),r.setStatus({code:i,message:e})}}jt||(jt=!0,Lt(e),Mt(e))}function Ft(e){n.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function Bt(e,n){if(!(null==n?void 0:n.length))return!1;for(const r of n){if(Wt(r)){if(e.description&&c(e.description,r))return t&&Ft(e),!0;continue}const n=!!r.attributes&&Object.keys(r.attributes).length>0;if(!r.name&&!r.op&&!n)continue;const s=!r.name||e.description&&c(e.description,r.name),o=!r.op||e.op&&c(e.op,r.op),a=!r.attributes||Object.entries(r.attributes).every(([t,n])=>{var r;return Ut(null==(r=e.attributes)?void 0:r[t],n)});if(s&&o&&a)return t&&Ft(e),!0}return!1}function Ut(e,t){return"string"==typeof e&&("string"==typeof t||t instanceof RegExp)?c(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function zt(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const s of e)s.parent_span_id===r&&(s.parent_span_id=n)}function Wt(e){return"string"==typeof e||e instanceof RegExp}function Gt(e){return!!e&&"function"==typeof e&&"_streamed"in e&&!!e._streamed}function Jt(e,t=[]){return[e,t]}function Qt(e,t){const[n,r]=e;return[n,[...r,t]]}function Vt(e,t){const n=e[1];for(const r of n){if(t(r,r[0].type))return!0}return!1}function Xt(e){const t=l(s);return t.encodePolyfill?t.encodePolyfill(e):(new TextEncoder).encode(e)}function Yt(e){const[t,n]=e;let r=JSON.stringify(t);function s(e){"string"==typeof r?r="string"==typeof e?r+e:[Xt(r),e]:r.push("string"==typeof e?Xt(e):e)}for(const o of n){const[e,t]=o;if(s(`\n${JSON.stringify(e)}\n`),"string"==typeof t||t instanceof Uint8Array)s(t);else{let e;try{e=JSON.stringify(t)}catch{e=JSON.stringify(u(t))}s(e)}}return"string"==typeof r?r:function(e){const t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}(r)}function Kt(e){return[{type:"span"},e]}function Zt(e){const t="string"==typeof e.data?Xt(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const en={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 tn(e){return function(e){return e in en}(e)?en[e]:e}function nn(e){if(!(null==e?void 0:e.sdk))return;
1const{name:t,version:n}=e.sdk;return{name:t,version:n}}function rn(e,t,n,r){const s=nn(n),o=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){var n,r,s,o;if(!t)return e;const a=e.sdk||{};e.sdk={...a,name:a.name||t.name,version:a.version||t.version,integrations:[...(null==(n=e.sdk)?void 0:n.integrations)||[],...t.integrations||[]],packages:[...(null==(r=e.sdk)?void 0:r.packages)||[],...t.packages||[]],settings:(null==(s=e.sdk)?void 0:s.settings)||t.settings?{...null==(o=e.sdk)?void 0:o.settings,...t.settings}:void 0}}(e,null==n?void 0:n.sdk);const a=function(e,t,n,r){var s;const o=null==(s=e.sdkProcessingMetadata)?void 0:s.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(p()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:d(r)},...o&&{trace:o}}}(e,s,r,t);delete e.sdkProcessingMetadata;return Jt(a,[[{type:o},e]])}function sn(e,r,s,i=o()){const c=i&&a(i);c&&(t&&n.log(`[Measurement] Setting measurement on root span: ${e} = ${r} ${s}`),c.addEvent(e,{[_]:r,[v]:s}))}function on(e){if(!e||0===e.length)return;const t={};return e.forEach(e=>{const n=e.attributes||{},r=n[v],s=n[_];"string"==typeof r&&"number"==typeof s&&(t[e.name]={value:s,unit:r})}),t}function an(){return l(y()).segmentSpanCaptureStrategy}function cn(e){return"stream"===e.getOptions().traceLifecycle}class un{constructor(e={}){this._traceId=e.traceId||b(),this._spanId=e.spanId||S(),this._startTime=e.startTimestamp||T(),this._links=e.links,this._attributes={},this.setAttributes({[w]:"manual",[E]: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(){const{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:n?k:x}}setAttribute(e,t){return this._frozen||(void 0===t?delete this._attributes[e]:this._attributes[e]=t,e===I&&void 0!==t&&C(this)&&$(this)),this}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._frozen||(this._startTime=P(e))}setStatus(e){return this._frozen||(this._status=e),this}updateName(e){return this._frozen||(this._name=e,C(this)||this.setAttribute(I,"custom")),this}end(e){this._endTime||(this._endTime=P(e),function(e){if(!t)return;const{description:r="< unknown name >",op:s="< unknown op >"}=m(e),{spanId:o}=e.spanContext(),i=`[Tracing] Finishing "${s}" ${a(e)===e?"root ":""}span "${r}" with ID ${o}`;n.log(i)}(this),this._onSpanEnded()),this._frozen=R(this)}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[E],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:D(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[w],profile_id:this._attributes[L],exclusive_time:this._attributes[O],measurements:on(this._events),is_segment:this._isStandaloneSpan&&a(this)===this||void 0,segment_id:this._isStandaloneSpan?a(this).spanContext().spanId:void 0,links:A(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===a(this),status:q(this._status),attributes:M(this._attributes,this._status),links:N(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,r,s){if(this._frozen)return this;t&&n.log("[Tracing] Adding an event to span:",e);const o=ln(r)?r:s||T(),a=ln(r)?{}:r||{},i={name:e,time:P(o),attributes:a};return this._events.push(i),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const e=j();e&&(e.emit("spanEnd",this),this._isStandaloneSpan||e.emit("afterSpanEnd",this));const r=a(this),s=this._isStandaloneSpan||this===r;if(this._isStandaloneSpan)return void(this._sampled?function(e){const t=j();if(!t)return;const n=e[1];
1if(!n||0===n.length)return void t.recordDroppedEvent("before_send","span");t.sendEnvelope(e)}(function(e,t){const n=f(e[0]),r=null==t?void 0:t.getDsn(),s=null==t?void 0:t.getOptions().tunnel,o={sent_at:new Date(p()).toISOString(),...(a=n,!!a.trace_id&&!!a.public_key&&{trace:n}),...!!s&&r&&{dsn:d(r)}};var a;const{beforeSendSpan:i,ignoreSpans:c}=(null==t?void 0:t.getOptions())||{},u=(null==c?void 0:c.length)?e.filter(e=>{const t=m(e);return!Bt({description:t.description,op:t.op,attributes:t.data},c)}):e,l=e.length-u.length;l&&(null==t||t.recordDroppedEvent("before_send","span",l));const g=i?e=>{const t=m(e);return(Gt(i)?t:i(t))||(h(),t)}:m,v=[];for(const d of u){const e=g(d);e&&v.push(Kt(e))}return Jt(o,v)}([this],e)):(t&&n.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),e&&e.recordDroppedEvent("sample_rate","span")));if(!s){const e=an();if(e){const t=H(this).scope||F();e.onChildSpanEnded(this,r,e=>this._convertSpanToTransaction(e),t)}return}if(e&&cn(e))return void e.emit("afterSegmentSpanEnd",this);const o=H(this).scope||F(),i=an();if(i)i.onSegmentSpanEnded(e=>this._convertSpanToTransaction(e),o);else{const e=this._convertSpanToTransaction();e&&o.captureEvent(e)}}_convertSpanToTransaction(e={}){var r,s,o,a;if(!dn(m(this)))return;this._name||(t&&n.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:i,isolationScope:c}=H(this),u=null==(r=null==i?void 0:i.getScopeData().sdkProcessingMetadata)?void 0:r.normalizedRequest;if(!0!==this._sampled)return;null==(s=e.onSpanCaptured)||s.call(e,this);const l=[];for(const t of B(this)){if(t===this||pn(t)||(null==(o=e.isSpanAlreadyCaptured)?void 0:o.call(e,t)))continue;const n=m(t);dn(n)&&(null==(a=e.onSpanCaptured)||a.call(e,t),l.push(n))}const d=this._attributes[I];delete this._attributes[U];let p=!1;l.forEach(e=>{var t;delete e.data[U],(null==(t=e.op)?void 0:t.startsWith("gen_ai."))&&(p=!0)});const h={contexts:{trace:z(this)},spans:l.length>1e3?l.sort((e,t)=>e.start_timestamp-t.start_timestamp).slice(0,1e3):l,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:i,capturedSpanIsolationScope:c,dynamicSamplingContext:f(this),hasGenAiSpans:p},request:u,...d&&{transaction_info:{source:d}}},g=on(this._events);return g&&Object.keys(g).length&&(t&&n.log("[Measurements] Adding measurements to transaction event",JSON.stringify(g,void 0,2)),h.measurements=g),h}}function ln(e){return e&&"number"==typeof e||e instanceof Date||Array.isArray(e)}function dn(e){return!!(e.start_timestamp&&e.timestamp&&e.span_id&&e.trace_id)}function pn(e){return e instanceof un&&e.isStandaloneSpan()}function fn(e,t,n=()=>{},r=()=>{}){let s;try{s=e()}catch(o){throw t(o),n(),o}return function(e,t,n,r){if(W(e))return G(e,e=>{n(),r(e)},e=>{t(e),n()});return n(),r(e),e}(s,t,n,r)}function mn(e,t){const n=Sn();if(n.startSpan)return n.startSpan(e,t);const r=bn(e),{forceTransaction:s,parentSpan:o,scope:a}=e,c=null==a?void 0:a.clone();return V(c,()=>{const n=void 0!==(a=o)?e=>gn(a,e):e=>e();var a;return n(()=>{const n=F(),a=En(n,o),c=j(),u=e.onlyIfParent&&!a?_n(n,c):yn({parentSpan:a,spanArguments:r,forceTransaction:s,scope:n});return wn(u)&&a||Y(n,u),fn(()=>t(u),()=>{const{status:e}=m(u);!u.isRecording()||e&&"ok"!==e||u.setStatus({code:i,message:"internal_error"})},()=>{u.end()})})})}function hn(e){const t=Sn();return t.startInactiveSpan?t.startInactiveSpan(e):function(e){const t=bn(e),{forceTransaction:n,parentSpan:r}=e,s=e.scope?t=>V(e.scope,t):void 0!==r?e=>gn(r,e):e=>e();return s(()=>{const s=F(),o=En(s,r),a=j();return e.onlyIfParent&&!o?_n(s,a):yn({parentSpan:o,spanArguments:t,forceTransaction:n,scope:s})})}(e)}function gn(e,t){const n=Sn();return n.withActiveSpan?n.withActiveSpan(e,t):V(n=>(Y(n,e||void 0),t(n)))}function vn(e=F()){const t=Sn();return t.isTracingSuppressed?t.isTracingSuppressed(e):!0===e.getScopeData().sdkProcessingMetadata.__SENTRY_SUPPRESS_TRACING__}function _n(e,t){null==t||t.recordDroppedEvent("no_parent_span","span");const n=new K({traceId:e.getPropagationContext().traceId});return Z(n,e,ee()),n}function yn({parentSpan:e,spanArguments:r,forceTransaction:s,scope:o}){const i=ee();if(!J()){const t={...i.getPropagationContext(),...o.getPropagationContext()},n=e?e.spanContext().traceId:t.traceId,r=new K({traceId:n});return e&&!s&&te(e,r),Z(r,o,i),r}const c=j();if(function(e,t){var n;const r=null==e?void 0:e.getOptions().ignoreSpans;if(!e||!cn(e)||!(null==r?void 0:r.length))return!1;return Bt({description:t.name||"",op:(null==(n=t.attributes)?void 0:n[E])||t.op,attributes:t.attributes},r)}(c,r)){vn(o)||null==c||c.recordDroppedEvent("ignored","span");const t=new K({dropReason:"ignored",traceId:(null==e?void 0:e.spanContext().traceId)??o.getPropagationContext().traceId});return e&&!s&&te(e,t),Z(t,o,i),t}let u;if(e&&!s)u=function(e,t,n,r){const{spanId:s,traceId:o}=e.spanContext(),a=vn(t),i=!a&&g(e),c=i?new un({...n,parentSpanId:s,traceId:o,sampled:i}):new K({traceId:o});te(e,c),Z(c,t,r);const u=j();if(!u)return c;cn(u)&&se(c)&&(se(e)&&e.dropReason?(c.dropReason=e.dropReason,u.recordDroppedEvent(e.dropReason,"span")):a||(c.dropReason="sample_rate",u.recordDroppedEvent("sample_rate","span")));u.emit("spanStart",c),n.endTimestamp&&(u.emit("spanEnd",c),u.emit("afterSpanEnd",c));return c}(e,o,r,i),te(e,u);else if(e){const t=f(e),{traceId:n,spanId:s}=e.spanContext(),a=g(e);u=Tn({traceId:n,parentSpanId:s,...r},o,i,a),ne(u,t)}else{const{traceId:e,dsc:t,parentSpanId:n,sampled:s}={...i.getPropagationContext(),...o.getPropagationContext()};u=Tn({traceId:e,parentSpanId:n,...r},o,i,s),t&&ne(u,t)}return function(e){if(!t)return;const{description:r="< unknown name >",op:s="< unknown op >",parent_span_id:o}=m(e),{spanId:i}=e.spanContext(),c=g(e),u=a(e),l=u===e,d=`[Tracing] Starting ${c?"sampled":"unsampled"} ${l?"root ":""}span`,p=[`op: ${s}`,`name: ${r}`,`ID: ${i}`];
1if(o&&p.push(`parent ID: ${o}`),!l){const{op:e,description:t}=m(u);p.push(`root ID: ${u.spanContext().spanId}`),e&&p.push(`root op: ${e}`),t&&p.push(`root description: ${t}`)}n.log(`${d}\n  ${p.join("\n  ")}`)}(u),u}function bn(e){const t={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const n={...t};return n.startTimestamp=P(e.startTime),delete n.startTime,n}return t}function Sn(){const e=y();return X(e)}function Tn(e,r,s,o){var a;const i=j(),c=(null==i?void 0:i.getOptions())||{},{name:u=""}=e,l={spanAttributes:{...e.attributes},spanName:u,parentSampled:o};null==i||i.emit("beforeSampling",l,{decision:!1});const d=l.parentSampled??o,p=l.spanAttributes,f=r.getPropagationContext(),m=vn(r),[h,g,v]=m?[!1]:function(e,r,s){if(!J(e))return[!1];let o,a;"function"==typeof e.tracesSampler?(a=e.tracesSampler({...r,inheritOrSampleWith:e=>"number"==typeof r.parentSampleRate?r.parentSampleRate:"boolean"==typeof r.parentSampled?Number(r.parentSampled):e}),o=!0):void 0!==r.parentSampled?a=r.parentSampled:void 0!==e.tracesSampleRate&&(a=e.tracesSampleRate,o=!0);const i=Q(a);if(void 0===i)return t&&n.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(!i)return t&&n.log("[Tracing] Discarding transaction because "+("function"==typeof e.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),[!1,i,o];const c=s<i;return c||t&&n.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(a)})`),[c,i,o]}(c,{name:u,parentSampled:d,attributes:p,normalizedRequest:s.getScopeData().sdkProcessingMetadata.normalizedRequest,parentSampleRate:Q(null==(a=f.dsc)?void 0:a.sample_rate)},f.sampleRand),_=new un({...e,attributes:{[I]:"custom",[re]:void 0!==g&&v?g:void 0,...p},sampled:h});return h||!i||m||(t&&n.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),i.recordDroppedEvent("sample_rate",cn(i)?"span":"transaction")),Z(_,r,s),i&&i.emit("spanStart",_),_}function En(e,t){if(t)return t;if(null===t)return;const n=oe(e);if(!n)return;const r=j();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?a(n):n}function wn(e){return se(e)&&"ignored"===e.dropReason}const kn={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3};function xn(e,r={}){const s=new Map;let a,c=!1,u="externalFinish",l=!r.disableAutoFinish;const d=[],{idleTimeout:p=kn.idleTimeout,finalTimeout:f=kn.finalTimeout,childSpanTimeout:h=kn.childSpanTimeout,beforeSpanEnd:g,trimIdleSpanEndTimestamp:v=!0}=r,_=j(),y=F();if(!_||!J()){const e=new K({traceId:y.getPropagationContext().traceId});return Z(e,y,ee()),e}const b=o(),S=function(e){const r=hn(e);return Y(F(),r),t&&n.log("[Tracing] Started span is an idle span"),r}(e);function E(){a&&(clearTimeout(a),a=void 0)}function w(e){E(),a=setTimeout(()=>{!c&&0===s.size&&l&&(u="idleTimeout",S.end(e))},p)}function k(e){a=setTimeout(()=>{!c&&l&&(u="heartbeatFailed",S.end(e))},h)}function x(e){c=!0,s.clear(),d.forEach(e=>e()),Y(y,b);const r=m(S),{start_timestamp:o}=r;if(!o)return;r.data[ae]||S.setAttribute(ae,u);const a=r.status;a&&"unknown"!==a||S.setStatus({code:ie}),n.log(`[Tracing] Idle span "${r.op}" finished`);const l=B(S).filter(e=>e!==S);let h=0;l.forEach(r=>{r.isRecording()&&(r.setStatus({code:i,message:"cancelled"}),r.end(e),t&&n.log("[Tracing] Cancelling span since span ended early",JSON.stringify(r,void 0,2)));const s=m(r),{timestamp:o=0,start_timestamp:a=0}=s,c=a<=e,u=o-a<=(f+p)/1e3;if(t){const e=JSON.stringify(r,void 0,2);c?u||n.log("[Tracing] Discarding span since it finished after idle span final timeout",e):n.log("[Tracing] Discarding span since it happened after idle span was finished",e)}u&&c||(ce(S,r),h++)}),h>0&&S.setAttribute("sentry.idle_span_discarded_spans",h)}return S.end=new Proxy(S.end,{apply(e,t,n){if(g&&g(S),se(t))return;const[r,...s]=n,o=r||T(),a=P(o),i=B(S).filter(e=>e!==S),c=m(S);if(!i.length||!v)return x(a),Reflect.apply(e,t,[a,...s]);const u=_.getOptions().ignoreSpans,l=null==i?void 0:i.reduce((e,t)=>
1{const n=m(t);return n.timestamp?u&&Bt({description:n.description,op:n.op,attributes:n.data},u)?e:e?Math.max(e,n.timestamp):n.timestamp:e},void 0),d=c.start_timestamp,p=Math.min(d?d+f/1e3:1/0,Math.max(d||-1/0,Math.min(a,l||1/0)));return x(p),Reflect.apply(e,t,[p,...s])}}),d.push(_.on("spanStart",e=>{if(c||e===S||m(e).timestamp||e instanceof un&&e.isStandaloneSpan())return;var t;B(S).includes(e)&&(t=e.spanContext().spanId,E(),s.set(t,!0),k(T()+h/1e3))})),d.push(_.on("spanEnd",e=>{var t;c||(t=e.spanContext().spanId,s.has(t)&&s.delete(t),0===s.size&&w(T()+p/1e3))})),d.push(_.on("idleSpanEnableAutoFinish",e=>{e===S&&(l=!0,w(),s.size&&k())})),r.disableAutoFinish||w(),setTimeout(()=>{c||(S.setStatus({code:i,message:"deadline_exceeded"}),u="finalTimeout",S.end())},f),S}const In="http.url",Cn="sentry.segment.name",$n="sentry.transaction",Pn="url.full",Rn="url.path";function An(e,t){const n=e.attributes??(e.attributes={});Object.entries(t).forEach(([e,t])=>{null==t||e in n||(n[e]=t)})}function On(e){return"object"==typeof e&&"function"==typeof e.unref&&e.unref(),e}function Ln(e,t,n){return t||`${function(e){return`${function(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){const n={sentry_version:"7"};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}(e,n)}`}const Dn=[];function Nn(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;if(t.forEach(e=>{e.isDefaultInstance=!0}),Array.isArray(n))r=[...t,...n];else if("function"==typeof n){const e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return function(e){const t={};return e.forEach(e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}(r)}function Mn(e,t){for(const n of t)(null==n?void 0:n.afterAllSetup)&&n.afterAllSetup(e)}function qn(e,r,s){if(s[r.name])t&&n.log(`Integration skipped because it was already installed: ${r.name}`);else{if(s[r.name]=r,Dn.includes(r.name)||"function"!=typeof r.setupOnce||(r.setupOnce(),Dn.push(r.name)),r.setup&&"function"==typeof r.setup&&r.setup(e),"function"==typeof r.preprocessEvent){const t=r.preprocessEvent.bind(r);e.on("preprocessEvent",(n,r)=>t(n,r,e))}if("function"==typeof r.processEvent){const t=r.processEvent.bind(r),n=Object.assign((n,r)=>t(n,r,e),{id:r.name});e.addEventProcessor(n)}["processSpan","processSegmentSpan"].forEach(t=>{const n=r[t];"function"==typeof n&&e.on(t,t=>n.call(r,t,e))}),t&&n.log(`Integration installed: ${r.name}`)}}function jn(){return!("undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function Hn(){return"undefined"!=typeof window&&(!jn()||function(){const e=s.process;return"renderer"===(null==e?void 0:e.type)}())}function Fn(e,t){const n=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...Hn()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function Bn(e,t){const n=t??function(e){return Un().get(e)}(e)??[];if(0===n.length)return;const r=e.getOptions(),s=function(e,t,n,r,s){const o={};return(null==t?void 0:t.sdk)&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=d(r)),Jt(o,[Fn(e,s)])}(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);Un().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(s)}function Un(){return ue("clientToLogBufferMap",()=>new WeakMap)}function zn(e,t){const n=t?"auto":"never";return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{version:2,...Hn()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function Wn(e,t){const n=t??function(e){return Gn().get(e)}(e)??[];if(0===n.length)return;const r=e.getOptions(),s=function(e,t,n,r,s){const o={};return(null==t?void 0:t.sdk)&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=d(r)),Jt(o,[zn(e,s)])}(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);Gn().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(s)}function Gn(){return ue("clientToMetricBufferMap",()=>new WeakMap)}function Jn(e){const t={trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,name:e.description||"",start_timestamp:e.start_timestamp,end_timestamp:e.timestamp||e.start_timestamp,status:e.status&&"ok"!==e.status&&"cancelled"!==e.status?"error":"ok",is_segment:!1,attributes:{...e.data},links:e.links};return le(t)}const Qn=Symbol.for("SentryBufferFullError");function Vn(e=100){const t=new Set;function n(e){t.delete(e)}return{get $(){return Array.from(t)},add:function(r){if(!(t.size<e))return pe(Qn);const s=r();return t.add(s),s.then(()=>n(s),()=>n(s)),s},drain:function(e){if(!t.size)return de(!0);const n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;const r=[n,new Promise(t=>On(setTimeout(()=>t(!1),e)))];return Promise.race(r)}}}function Xn(e,{statusCode:t,headers:n},r=p()){const s={...e},o=null==n?void 0:n["x-sentry-rate-limits"],a=null==n?void 0:n["retry-after"];if(o)for(const i of o.trim().split(",")){const[e,t,,,n]=i.split(":",5),o=parseInt(e,10),a=1e3*(isNaN(o)?60:o);if(t)for(const i of t.split(";"))"metric_bucket"===i&&n&&!n.split(";").includes("custom")||(s[i]=r+a);else s.all=r+a}else a?s.all=r+function(e,t=p()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(a,r):429===t&&(s.all=r+6e4);return s}function Yn(e,r,s=Vn(e.bufferSize||64)){let o={};return{send:function(a){const i=[];if(Vt(a,(t,n)=>{const r=tn(n);!function(e,t,n=p()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(o,r)?i.push(t):e.recordDroppedEvent("ratelimit_backoff",r)}),0===i.length)return Promise.resolve({});const c=Jt(a[0],i),u=r=>{!function(e,t){return Vt(e,(e,n)=>t.includes(n))}(c,["client_report"])?Vt(c,(t,n)=>{e.recordDroppedEvent(r,tn(n))}):t&&n.warn(`Dropping client report. Will not send outcomes (reason: ${r}).`)};return s.add(()=>r({body:Yt(c)}).then(e=>413===e.statusCode?(t&&n.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),u("send_error"),e):(t&&void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&n.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),o=Xn(o,e),e),e=>{throw u("network_error"),t&&n.error("Encountered error running transport request:",e),e})).then(e=>e,e=>
1{if(e===Qn)return t&&n.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw e})},flush:e=>s.drain(e)}}function Kn(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];(null==n?void 0:n.value)&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}const Zn=["forwarded","-ip","remote-","via","-user"];const er={userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:5};function tr(e){var t,n,r,s,o,a;const i=null!=e.dataCollection?er:!0===e.sendDefaultPii?{userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:7}:{userInfo:!1,cookies:{deny:Zn},httpHeaders:{request:{deny:Zn},response:{deny:Zn}},httpBodies:[],urlQueryParams:{deny:Zn},graphQL:{document:!0,variables:!0},genAI:{inputs:!1,outputs:!1},databaseQueryData:!1,stackFrameVariables:!0,frameContextLines:7};const c=e.dataCollection??{};return{userInfo:c.userInfo??i.userInfo,cookies:c.cookies??i.cookies,httpHeaders:{request:(null==(t=c.httpHeaders)?void 0:t.request)??i.httpHeaders.request,response:(null==(n=c.httpHeaders)?void 0:n.response)??i.httpHeaders.response},httpBodies:c.httpBodies??i.httpBodies,urlQueryParams:c.urlQueryParams??c.queryParams??i.urlQueryParams,graphQL:{document:(null==(r=c.graphQL)?void 0:r.document)??i.graphQL.document,variables:(null==(s=c.graphQL)?void 0:s.variables)??i.graphQL.variables},genAI:{inputs:(null==(o=c.genAI)?void 0:o.inputs)??i.genAI.inputs,outputs:(null==(a=c.genAI)?void 0:a.outputs)??i.genAI.outputs},databaseQueryData:c.databaseQueryData??i.databaseQueryData,stackFrameVariables:c.stackFrameVariables??i.stackFrameVariables,frameContextLines:c.frameContextLines??i.frameContextLines}}const nr="Not capturing exception because it's already been captured.",rr="Discarded session because of missing or non-string release",sr=Symbol.for("SentryInternalError"),or=Symbol.for("SentryDoNotSendEventError");function ar(e){return{message:e,[sr]:!0}}function ir(e){return{message:e,[or]:!0}}function cr(e){return ke(e)&&sr in e}function ur(e){return ke(e)&&or in e}function lr(e,t,n,r,s){let o,a=0,i=!1;e.on(n,()=>{a=0,clearTimeout(o),i=!1}),e.on(t,t=>{if(a+=r(t),a>=8e5)s(e);else if(!i){const t=e.getOptions()._flushInterval??5e3;t>0&&(i=!0,o=On(setTimeout(()=>{s(e)},t)))}}),e.on("flush",()=>{s(e)})}class dr{constructor(e){var r,s,o;if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Vn((null==(r=e.transportOptions)?void 0:r.bufferSize)??64),this._dataCollection=tr(e),e.dsn?this._dsn=me(e.dsn):t&&n.warn("No DSN provided, client will not send events."),this._dsn){const t=Ln(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}this._options.enableLogs=this._options.enableLogs??(null==(s=this._options._experiments)?void 0:s.enableLogs),this._options.enableLogs&&lr(this,"afterCaptureLog","flushLogs",gr,Bn);(this._options.enableMetrics??(null==(o=this._options._experiments)?void 0:o.enableMetrics)??!0)&&lr(this,"afterCaptureMetric","flushMetrics",hr,Wn)}captureException(e,r,s){const o=he();if(ge(e))return t&&n.log(nr),o;const a={event_id:o,...r};return this._process(()=>this.eventFromException(e,a).then(e=>this._captureEvent(e,a,s)).then(e=>e),"error"),a.event_id}captureMessage(e,t,n,r){const s={event_id:he(),...n},o=Ee(e)?e:String(e),a=we(e),i=a?this.eventFromMessage(o,t,s):this.eventFromException(e,s);return this._process(()=>i.then(e=>this._captureEvent(e,s,r)),a?"unknown":"error"),s.event_id}captureEvent(e,r,s){const o=he();if((null==r?void 0:r.originalException)&&ge(r.originalException))return t&&n.log(nr),o;const a={event_id:o,...r},i=e.sdkProcessingMetadata||{},c=i.capturedSpanScope,u=i.capturedSpanIsolationScope,l=pr(e.type);return this._process(()=>this._captureEvent(e,a,c||s,u),l),a.event_id}captureSession(e){this.sendSession(e),ve(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getDataCollectionOptions(){return this._dataCollection}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(e){const t=this._transport;
1if(this.emit("flush"),!t)return!0;const n=await this._isClientDoneProcessing(e),r=await t.flush(e);return n&&r}async close(e){const t=await this.flush(e);return this.getOptions().enabled=!1,this.emit("close"),t}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(e){const t=this._integrations[e.name];!t&&e.beforeSetup&&e.beforeSetup(this),qn(this,e,this._integrations),t||Mn(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);const n=function(e,t){var n,r,s;if("transaction"!==e.type||!(null==(n=e.spans)?void 0:n.length)||!(null==(r=e.sdkProcessingMetadata)?void 0:r.hasGenAiSpans)||!1===t.getOptions().streamGenAiSpans||cn(t))return;const o=[],a=[];for(const c of e.spans)(null==(s=c.op)?void 0:s.startsWith("gen_ai."))?o.push(Jn(c)):a.push(c);if(0===o.length)return;e.spans=a;const i=t.getDataCollectionOptions().userInfo?"auto":"never";return[{type:"span",item_count:o.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...Hn()&&{ingest_settings:{infer_ip:i,infer_user_agent:i}},items:o}]}(e,this);let r=rn(e,this._dsn,this._options._metadata,this._options.tunnel);for(const s of t.attachments||[])r=Qt(r,Zt(s));n&&(r=Qt(r,n)),this.sendEnvelope(r).then(t=>this.emit("afterSendEvent",e,t))}sendSession(e){const{release:r,environment:s=_e}=this._options;if("aggregates"in e){const o=e.attrs||{};if(!o.release&&!r)return void(t&&n.warn(rr));o.release=o.release||r,o.environment=o.environment||s,e.attrs=o}else{if(!e.release&&!r)return void(t&&n.warn(rr));e.release=e.release||r,e.environment=e.environment||s}this.emit("beforeSendSession",e);const o=function(e,t,n,r){const s=nn(n);return Jt({sent_at:new Date(p()).toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:d(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(o)}recordDroppedEvent(e,r,s=1){if(this._options.sendClientReports){const o=`${e}:${r}`;t&&n.log(`Recording outcome: "${o}"${s>1?` (${s} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+s}}on(e,t){const n=this._hooks[e]=this._hooks[e]||new Set,r=(...e)=>t(...e);return n.add(r),()=>{n.delete(r)}}emit(e,...t){const n=this._hooks[e];n&&n.forEach(e=>e(...t))}async sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)try{return await this._transport.send(e)}catch(r){return t&&n.error("Error while sending envelope:",r),{}}return t&&n.error("Transport disabled"),{}}registerCleanup(e){}dispose(){}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach(t=>{(null==t?void 0:t.beforeSetup)&&t.beforeSetup(e)}),t.forEach(t=>{t&&qn(e,t,n)}),n}(this,e),Mn(this,e)}_updateSessionFromEvent(e,t){var n,r;let s="fatal"===t.level,o=!1;const a=null==(n=t.exception)?void 0:n.values;if(a){o=!0,s=!1;for(const e of a)if(!1===(null==(r=e.mechanism)?void 0:r.handled)){s=!0;break}}const i="ok"===e.status;(i&&0===e.errors||i&&s)&&(ve(e,{...s&&{status:"crashed"},errors:e.errors||Number(o||s)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(e=>setTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n,r){const s=this.getOptions(),o=this.getIntegrationNames();return!t.integrations&&o.length&&(t.integrations=o),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),ye(s,e,t,n,this,r).then(e=>{var r;if(null===e)return e;this.emit("postprocessEvent",e,t),e.contexts={trace:{...null==(r=e.contexts)?void 0:r.trace,...be(n)},...e.contexts};const s=Se(this,n);return e.sdkProcessingMetadata={dynamicSamplingContext:s,...e.sdkProcessingMetadata},e})}_captureEvent(e,r={},s=F(),o=ee()){return t&&fr(e)&&n.log(`Captured error event \`${Kn(e)[0]||"<unknown>"}\``),this._processEvent(e,r,s,o).then(e=>e.event_id,e=>{t&&(ur(e)?n.log(e.message):cr(e)?n.warn(e.message):n.warn(e))})}_processEvent(e,t,n,r){const s=this.getOptions(),{sampleRate:o}=s,a=mr(e),i=fr(e),c=`before send for type \`${e.type||"error"}\``,u=void 0===o?void 0:Q(o);if(i&&"number"==typeof u&&Te()>u)return this.recordDroppedEvent("sample_rate","error"),pe(ir(`Discarding event because it's not included in the random sample (sampling rate = ${o})`));const l=pr(e.type);return this._prepareEvent(e,t,n,r).then(e=>{var n;if(null===e)throw this.recordDroppedEvent("event_processor",l),ir("An event processor returned `null`, will not send event.");if(!0===(null==(n=t.data)?void 0:n.__sentry__))return e;const r=function(e,t,n,r){const{beforeSend:s,beforeSendTransaction:o,ignoreSpans:a}=t,i=!Gt(t.beforeSendSpan)&&t.beforeSendSpan;let c=n;if(fr(c)&&s)return s(c,r);if(mr(c)){if(i||a){const t=function(e){var t;const{trace_id:n,parent_span_id:r,span_id:s,status:o,origin:a,data:i,op:c}=(null==(t=e.contexts)?void 0:t.trace)??{};return{data:i??{},description:e.transaction,op:c,parent_span_id:r,span_id:s??"",start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:n??"",origin:a,profile_id:null==i?void 0:i[L],exclusive_time:null==i?void 0:i[O],measurements:e.measurements,is_segment:!0}}(c);
1if((null==a?void 0:a.length)&&Bt({description:t.description,op:t.op,attributes:t.data},a))return null;if(i){const e=i(t);e?c=xe(n,{type:"transaction",timestamp:(u=e).timestamp,start_timestamp:u.start_timestamp,transaction:u.description,contexts:{trace:{trace_id:u.trace_id,span_id:u.span_id,parent_span_id:u.parent_span_id,op:u.op,status:u.status,origin:u.origin,data:{...u.data,...u.profile_id&&{[L]:u.profile_id},...u.exclusive_time&&{[O]:u.exclusive_time}}}},measurements:u.measurements}):h()}if(c.spans){const t=[],n=c.spans;for(const e of n)if((null==a?void 0:a.length)&&Bt({description:e.description,op:e.op,attributes:e.data},a))zt(n,e);else if(i){const n=i(e);n?t.push(n):(h(),t.push(e))}else t.push(e);const r=c.spans.length-t.length;r&&e.recordDroppedEvent("before_send","span",r),c.spans=t}}if(o){if(c.spans){const e=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return o(c,r)}}var u;return c}(this,s,e,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(W(e))return e.then(e=>{if(!Ie(e)&&null!==e)throw ar(n);return e},e=>{throw ar(`${t} rejected with ${e}`)});if(!Ie(e)&&null!==e)throw ar(n);return e}(r,c)}).then(s=>{var o;if(null===s){if(this.recordDroppedEvent("before_send",l),a){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw ir(`${c} returned \`null\`, will not send event.`)}const u=n.getSession()||r.getSession();if(i&&u&&this._updateSessionFromEvent(u,s),a){const e=((null==(o=s.sdkProcessingMetadata)?void 0:o.spanCountBeforeProcessing)||0)-(s.spans?s.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const d=s.transaction_info;if(a&&d&&s.transaction!==e.transaction){const e="custom";s.transaction_info={...d,source:e}}return this.sendEvent(s,t),s}).then(null,e=>{if(ur(e)||cr(e))throw e;throw this.captureException(e,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:e}),ar(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===Qn&&this.recordDroppedEvent("queue_overflow",t),e))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t}})}_flushOutcomes(){t&&n.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(t&&n.log("No outcomes to send"));if(!this._dsn)return void(t&&n.log("No dsn provided, will not send outcomes"));t&&n.log("Sending outcomes:",e);const r=(s=e,Jt((o=this._options.tunnel&&d(this._dsn))?{dsn:o}:{},[[{type:"client_report"},{timestamp:fe(),discarded_events:s}]]));var s,o;this.sendEnvelope(r)}}function pr(e){return"replay_event"===e?"replay":e||"error"}function fr(e){return void 0===e.type}function mr(e){return"transaction"===e.type}function hr(e){let t=0;return e.name&&(t+=2*e.name.length),t+=8,t+vr(e.attributes)}function gr(e){let t=0;return e.message&&(t+=2*e.message.length),t+vr(e.attributes)}function vr(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*_r(e[0]):we(e)?t+=_r(e):t+=100}),t}function _r(e){return"string"==typeof e?2*e.length:"number"==typeof e?8:"boolean"==typeof e?4:0}function yr(e){F().setClient(e)}function br(e){return"isRelative"in e}function Sr(e,t){const n=e.indexOf("://")<=0&&0!==e.indexOf("//"),r=n?"thismessage:/":void 0;try{if("canParse"in URL&&!URL.canParse(e,r))return;const t=new URL(e,r);return n?{isRelative:n,pathname:t.pathname,search:t.search,hash:t.hash}:t}catch{}}function Tr(e){if(br(e))return e.pathname;const t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function Er(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function wr(e,t=!0){if(e.startsWith("data:")){const n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",s=e.includes(";base64,"),o=e.indexOf(",");let a="";if(t&&-1!==o){const t=e.slice(o+1);a=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${s?",base64":""}${a?`,${a}`:""}`}return e}function kr(e){var t;"aggregates"in e?void 0===(null==(t=e.attrs)?void 0:t.ip_address)&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):void 0===e.ipAddress&&(e.ipAddress="{{auto}}")}function xr(e,t,n=[t],r="npm"){const s=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};s.name||(s.name=`sentry.javascript.${t}`,s.packages=n.map(e=>({name:`${r}:@sentry/${e}`,version:$e})),s.version=$e)}function Ir(e={}){const t=e.client||j();if(!Pe()||!t)return{};const r=y(),s=X(r);if(s.getTraceData)return s.getTraceData(e);const a=e.scope||F(),i=e.span||o(),c=se(i)&&!J(t.getOptions()),u=i&&!c?Re(i):function(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return De(t,r,n)}(a),l=i?f(i):Se(t,a),d=Ae(l);
1if(!Oe.test(u))return n.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const p={"sentry-trace":u,baggage:d};return e.propagateTraceparent&&(p.traceparent=i&&!c?Le(i):function(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Ne(t,r,n)}(a)),p}const Cr=100;function $r(e,t){const n=j(),r=ee();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:o=Cr}=n.getOptions();if(o<=0)return;const a={timestamp:fe(),...e},i=s?Ce(()=>s(a,t)):a;null!==i&&(n.emit&&n.emit("beforeAddBreadcrumb",i,t),r.addBreadcrumb(i,o))}const Pr=new WeakMap,Rr=()=>({name:"FunctionToString",setupOnce(){const e=Function.prototype.toString;try{Function.prototype.toString=function(...t){const n=Me(this);let r;try{Pr.has(j())&&void 0!==n&&(r=n)}catch{}return e.apply(r??this,t)}}catch{}},setup(e){Pr.set(e,!0)}}),Ar=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/^Java exception was raised during method invocation$/],Or=(e={})=>{let r;return{name:"EventFilters",setup(t){const n=t.getOptions();r=Dr(e,n)},processEvent(s,o,a){if(!r){const t=a.getOptions();r=Dr(e,t)}return function(e,r){if(e.type){if("transaction"===e.type&&function(e,t){if(!(null==t?void 0:t.length))return!1;const n=e.transaction;return!!n&&je(n,t)}(e,r.ignoreTransactions))return t&&n.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${qe(e)}`),!0}else{if(function(e,t){if(!(null==t?void 0:t.length))return!1;return Kn(e).some(e=>je(e,t))}(e,r.ignoreErrors))return t&&n.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${qe(e)}`),!0;if(function(e){var t,n;if(!(null==(n=null==(t=e.exception)?void 0:t.values)?void 0:n.length))return!1;return!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&"Error"!==e.type||e.value)}(e))return t&&n.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${qe(e)}`),!0;if(function(e,t){if(!(null==t?void 0:t.length))return!1;const n=Nr(e);return!!n&&je(n,t)}(e,r.denyUrls))return t&&n.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${qe(e)}.\nUrl: ${Nr(e)}`),!0;if(!function(e,t){if(!(null==t?void 0:t.length))return!0;const n=Nr(e);return!n||je(n,t)}(e,r.allowUrls))return t&&n.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${qe(e)}.\nUrl: ${Nr(e)}`),!0}return!1}(s,r)?null:s}}},Lr=(e={})=>({...Or(e),name:"InboundFilters"});function Dr(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Ar],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function Nr(e){var r,s;try{const t=[...(null==(r=e.exception)?void 0:r.values)??[]].reverse().find(e=>{var t,n,r;return void 0===(null==(t=e.mechanism)?void 0:t.parent_id)&&(null==(r=null==(n=e.stacktrace)?void 0:n.frames)?void 0:r.length)}),n=null==(s=null==t?void 0:t.stacktrace)?void 0:s.frames;return n?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(n):null}catch{return t&&n.error(`Cannot extract url for event ${qe(e)}`),null}}function Mr(e,t,n,r,s,o){var a;if(!(null==(a=s.exception)?void 0:a.values)||!o||!He(o.originalException,Error))return;const i=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;i&&(s.exception.values=qr(e,t,r,o.originalException,n,s.exception.values,i,0))}function qr(e,t,n,r,s,o,a,i){if(o.length>=n+1)return o;let c=[...o];if(He(r[s],Error)){Hr(a,i,r);const o=e(t,r[s]),u=c.length;Fr(o,s,u,i),c=qr(e,t,n,r[s],s,[o,...c],o,u)}
1return jr(r)&&r.errors.forEach((o,u)=>{if(He(o,Error)){Hr(a,i,r);const l=e(t,o),d=c.length;Fr(l,`errors[${u}]`,d,i),c=qr(e,t,n,o,s,[l,...c],l,d)}}),c}function jr(e){return Array.isArray(e.errors)}function Hr(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...jr(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function Fr(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function Br(e){return function(e){return Fe(e)&&"__sentry_fetch_url_host__"in e&&"string"==typeof e.__sentry_fetch_url_host__}(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}const Ur=new Set([]);const zr=new Set;function Wr(){"console"in s&&Be.forEach(function(e){!zr.has(e)&&e in s.console&&(zr.add(e),Ue(s.console,e,function(r){return ze[e]=r,function(...r){const o=r[0],a=ze[e],i=Ur.size&&"string"==typeof o&&je(o,Ur);i||At("console",{args:r,level:e}),(!i||t&&n.isEnabled())&&(null==a||a.apply(s.console,r))}}))})}function Gr(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const Jr=()=>{let e;return{name:"Dedupe",processEvent(r){if(r.type)return r;try{if(function(e,t){if(!t)return!1;if(function(e,t){const n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!Vr(e,t))return!1;if(!Qr(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){const n=Xr(t),r=Xr(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!Vr(e,t))return!1;if(!Qr(e,t))return!1;return!0}(e,t))return!0;return!1}(r,e))return t&&n.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=r}}};function Qr(e,t){let n=We(e),r=We(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let s=0;s<r.length;s++){const e=r[s],t=n[s];if(e.filename!==t.filename||e.lineno!==t.lineno||e.colno!==t.colno||e.function!==t.function)return!1}return!0}function Vr(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch{return!1}}function Xr(e){var t,n;return null==(n=null==(t=e.exception)?void 0:t.values)?void 0:n[0]}const Yr=()=>({name:"ConversationId",setup(e){e.on("spanStart",e=>{const t=F().getScopeData(),n=ee().getScopeData(),r=t.conversationId||n.conversationId;if(r){const{op:t,data:n,description:s}=m(e);if(!(null==t?void 0:t.startsWith("gen_ai."))&&!n["ai.operationId"]&&!(null==s?void 0:s.startsWith("ai.")))return;e.setAttribute(Ge,r)}})}});function Kr(e,t,n,r,s){if(!e.fetchData)return;const{method:a,url:c}=e.fetchData,u=J()&&t(c);if(e.endTimestamp){const t=e.fetchData.__span;if(!t)return;const n=r[t];return void(n&&(u&&(function(e,t){var n,r;if(t.response){Je(e,t.response.status);const s=null==(r=null==(n=t.response)?void 0:n.headers)?void 0:r.get("content-length");if(s){const t=parseInt(s);t>0&&e.setAttribute("http.response_content_length",t)}}else t.error&&e.setStatus({code:i,message:"internal_error"});e.end()}(n,e),function(e,t,n){var r;const s="object"==typeof n&&null!==n?n.onRequestSpanEnd:void 0;null==s||s(e,{headers:null==(r=t.response)?void 0:r.headers,error:t.error})}(n,e,s)),delete r[t]))}const{spanOrigin:l="auto.http.browser",propagateTraceparent:d=!1}="object"==typeof s?s:{spanOrigin:s},p=j(),f=!!o(),m=f||!!p&&cn(p),h=u&&m?hn(function(e,t,n){if(e.startsWith("data:")){return{name:`${t} ${wr(e)}`,attributes:es(e,void 0,t,n)}}const r=Sr(e),s=r?Tr(r):e;return{name:`${t} ${s}`,attributes:es(e,r,t,n)}}(c,a,l)):new K,g=wn(h)&&f?void 0:h;if(u&&!m&&(null==p||p.recordDroppedEvent("no_parent_span","span")),e.fetchData.__span=h.spanContext().spanId,r[h.spanContext().spanId]=h,n(e.fetchData.url)){const t=e.args[0],n={...e.args[1]||{}},r=function(e,t,n,r){const s=Ir({span:n,propagateTraceparent:r}),o=s["sentry-trace"],a=s.baggage,i=s.traceparent;if(!o)return;const c=t.headers||(Qe(e)?e.headers:void 0);if(c){if(function(e){return"undefined"!=typeof Headers&&He(e,Headers)}(c)){const e=new Headers(c);if(e.get("sentry-trace")||e.set("sentry-trace",o),r&&i&&!e.get("traceparent")&&e.set("traceparent",i),a){const t=e.get("baggage");t?Zr(t)||e.set("baggage",`${t},${a}`):e.set("baggage",a)}return e}if(function(e){if(!Array.isArray(e))return!1;return e.every(e=>Array.isArray(e)&&2===e.length&&"string"==typeof e[0])}(c)){const e=[...c];e.find(e=>"sentry-trace"===e[0])||e.push(["sentry-trace",o]),r&&i&&!e.find(e=>"traceparent"===e[0])&&e.push(["traceparent",i]);const t=c.find(e=>"baggage"===e[0]&&"string"==typeof e[1]&&Zr(e[1]));return a&&!t&&e.push(["baggage",a]),e}{const 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,s=n?Array.isArray(n)?[...n]:[n]:[],u=n&&(Array.isArray(n)?n.find(e=>Zr(e)):Zr(n));a&&!u&&s.push(a);const l=Object.assign({},c,{"sentry-trace":e??o,...s.length>0&&{baggage:s.join(",")}});return r&&i&&!t&&(l.traceparent=i),l}}return{"sentry-trace":o,...a&&{baggage:a},...i&&{traceparent:i}}}(t,n,J()&&m?g:void 0,d);r&&(e.args[1]=n,n.headers=r)}if(p){const t={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};p.emit("beforeOutgoingRequestSpan",h,t)}return h}function Zr(e){return"string"==typeof e&&e.split(",").some(e=>e.trim().startsWith(Ve))}function es(e,t,n,r){const s={url:wr(e),type:"fetch","http.method":n,[w]:r,[E]:"http.client"};return t&&(br(t)||(s[In]=wr(t.href),s[Pn]=wr(t.href),s["server.address"]=t.host),t.search&&(s["http.query"]=t.search),t.hash&&(s["http.fragment"]=t.hash)),s}function ts(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}const ns=s;function rs(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function ss(){var e;if("string"==typeof EdgeRuntime)return!0;
1if(!function(){if(!("fetch"in ns))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}())return!1;if(rs(ns.fetch))return!0;let r=!1;const s=ns.document;if(s&&"function"==typeof s.createElement)try{const t=s.createElement("iframe");t.hidden=!0,s.head.appendChild(t),(null==(e=t.contentWindow)?void 0:e.fetch)&&(r=rs(t.contentWindow.fetch)),s.head.removeChild(t)}catch(o){t&&n.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",o)}return r}function os(e,t){const n="fetch",r=Pt(n,e);return Rt(n,()=>as(void 0,t)),r}function as(e,t=!1){t&&!ss()||Ue(s,"fetch",function(t){return function(...n){const r=new Error,{method:o,url:a}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:us(t),method:cs(n,"method")?String(n.method).toUpperCase():Qe(t)&&cs(t,"method")?String(t.method).toUpperCase():"GET"}}const t=e[0];return{url:us(t),method:cs(t,"method")?String(t.method).toUpperCase():"GET"}}(n),i={args:n,fetchData:{method:o,url:a},startTimestamp:1e3*T(),virtualError:r,headers:ls(n)};return e||At("fetch",{...i}),t.apply(s,n).then(async t=>(e?e(t):At("fetch",{...i,endTimestamp:1e3*T(),response:t}),t),e=>{At("fetch",{...i,endTimestamp:1e3*T(),error:e}),Fe(e)&&void 0===e.stack&&(e.stack=r.stack,Xe(e,"framesToPop",1));const t=j(),n=(null==t?void 0:t.getOptions().enhanceFetchErrorMessages)??"always";if(!1!==n&&e instanceof TypeError&&("Failed to fetch"===e.message||"Load failed"===e.message||"NetworkError when attempting to fetch resource."===e.message))try{const t=new URL(i.fetchData.url).host;"always"===n?e.message=`${e.message} (${t})`:Xe(e,"__sentry_fetch_url_host__",t)}catch{}throw e})}})}function is(e){let t;try{t=e.clone()}catch{return}!async function(e,t){if(null==e?void 0:e.body){const n=e.body,r=n.getReader(),s=setTimeout(()=>{n.cancel().then(null,()=>{})},9e4);let o=!0;for(;o;){let e;try{e=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:s}=await r.read();clearTimeout(e),s&&(t(),o=!1)}catch{o=!1}finally{clearTimeout(e)}}clearTimeout(s),r.releaseLock(),n.cancel().then(null,()=>{})}}(t,()=>{At("fetch-body-resolved",{endTimestamp:1e3*T(),response:e})})}function cs(e,t){return ke(e)&&!!e[t]}function us(e){return"string"==typeof e?e:e?cs(e,"url")?e.url:e.toString?e.toString():"":""}function ls(e){const[t,n]=e;try{if("object"==typeof n&&null!==n&&"headers"in n&&n.headers)return new Headers(n.headers);if(Qe(t))return new Headers(t.headers)}catch{}}const ds=s;function ps(){try{return ds.document.location.href}catch{return""}}function fs(e,t=5){if(!ds.HTMLElement)return null;let n=e;for(let r=0;r<t;r++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null}const ms=s;let hs=0;function gs(){return hs>0}function vs(e,t={}){if("function"!=typeof e)return e;try{if(Object.prototype.hasOwnProperty.call(e,"__sentry_wrapped__")){const t=e.__sentry_wrapped__;return"function"==typeof t?t:e}if(Me(e))return e}catch{return e}const n=function(...n){s._sentryWrappedDepth=(s._sentryWrappedDepth||0)+1;try{const r=n.map(e=>vs(e,t));return e.apply(this,r)}catch(r){throw hs++,setTimeout(()=>{hs--}),V(e=>{e.addEventProcessor(e=>(t.mechanism&&(Ke(e,void 0),Ze(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),et(r)}),r}finally{s._sentryWrappedDepth=(s._sentryWrappedDepth||0)-1}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}Ye(n,e),Xe(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}function _s(){const e=ps(),{referrer:t}=ms.document||{},{userAgent:n}=ms.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}function ys(e,t){const n=Ts(e,t),r={type:ks(t),value:xs(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function bs(e,t,n,r){const s=j(),o=null==s?void 0:s.getOptions().normalizeDepth,a=(i=t,Object.values(i).find(e=>e instanceof Error));var i;const c={__serialized__:ot(t,o)};if(a)return{exception:{values:[ys(e,a)]},extra:c};const u={exception:{values:[{type:st(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Rs(t,{isUnhandledRejection:r})}]},extra:c};if(n){const t=Ts(e,n);t.length&&(u.exception.values[0].stacktrace={frames:t})}return u}function Ss(e,t){return{exception:{values:[ys(e,t)]}}}function Ts(e,t){const n=t.stacktrace||t.stack||"",r=function(e){if(e&&Es.test(e.message))return 1;return 0}(t),s=function(e){if("number"==typeof e.framesToPop)return e.framesToPop;return 0}(t);try{return e(n,r,s)}catch{}return[]}const Es=/Minified React error #\d+;/i;function ws(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function ks(e){const t=null==e?void 0:e.name;if(!t&&ws(e)){return e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception"}return t}function xs(e){const t=null==e?void 0:e.message;return ws(e)?Array.isArray(e.message)&&2==e.message.length?e.message[1]:"wasm exception":t?t.error&&"string"==typeof t.error.message?Br(t.error):Br(e):"No error message"}function Is(e,t,n,r){const s=$s(e,t,(null==n?void 0:n.syntheticException)||void 0,r);return Ze(s),s.level="error",(null==n?void 0:n.event_id)&&(s.event_id=n.event_id),de(s)}function Cs(e,t,n="info",r,s){const o=Ps(e,t,(null==r?void 0:r.syntheticException)||void 0,s);return o.level=n,(null==r?void 0:r.event_id)&&(o.event_id=r.event_id),de(o)}
1function $s(e,t,n,r,s){var o,a;let i;if(tt(t)&&t.error){return Ss(e,t.error)}if(nt(t)||rt(t)){const s=t;if("stack"in t){i=Ss(e,t);const s=null==(a=null==(o=i.exception)?void 0:o.values)?void 0:a[0];if(r&&n&&s&&!s.stacktrace){const t=Ts(e,n);t.length&&(s.stacktrace={frames:t},Ze(i,{synthetic:!0}))}}else{const t=s.name||(nt(s)?"DOMError":"DOMException"),o=s.message?`${t}: ${s.message}`:t;i=Ps(e,o,n,r),Ke(i,o)}return"code"in s&&(i.tags={...i.tags,"DOMException.code":`${s.code}`}),i}if(Fe(t))return Ss(e,t);if(Ie(t)||st(t)){return i=bs(e,t,n,s),Ze(i,{synthetic:!0}),i}return i=Ps(e,t,n,r),Ke(i,`${t}`),Ze(i,{synthetic:!0}),i}function Ps(e,t,n,r){const s={};if(r&&n){const r=Ts(e,n);r.length&&(s.exception={values:[{value:t,stacktrace:{frames:r}}]}),Ze(s,{synthetic:!0})}if(Ee(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return s.logentry={message:e,params:n},s}return s.message=t,s}function Rs(e,{isUnhandledRejection:t}){const n=at(e),r=t?"promise rejection":"exception";if(tt(e))return`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``;if(st(e)){return`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}(e)}\` (type=${e.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${n}`}class As extends dr{constructor(e){var t;const n=function(e){var t;return{release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:null==(t=ms.SENTRY_RELEASE)?void 0:t.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}(e);xr(n,"browser",["browser"],ms.SENTRY_SDK_SOURCE||"npm"),super(n);const{userInfo:r}=this.getDataCollectionOptions();(null==(t=n._metadata)?void 0:t.sdk)&&(n._metadata.sdk.settings={infer_ip:r?"auto":"never",...n._metadata.sdk.settings});const{sendClientReports:s}=this._options;ms.document&&ms.document.addEventListener("visibilitychange",()=>{"hidden"===ms.document.visibilityState&&(s&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}),r&&this.on("beforeSendSession",kr)}eventFromException(e,t){return Is(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return Cs(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n,r)}}const Os="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Ls=s,Ds=(e,t,n,r)=>{let s,o;return a=>{t.value>=0&&(a||r)&&(o=t.value-(s??0),(o||void 0===s)&&(s=t.value,t.delta=o,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,n),e(t)))}},Ns=(e=!0)=>{var t,n;const r=null==(n=null==(t=Ls.performance)?void 0:t.getEntriesByType)?void 0:n.call(t,"navigation")[0];if(!e||r&&r.responseStart>0&&r.responseStart<performance.now())return r},Ms=()=>{const e=Ns();return(null==e?void 0:e.activationStart)??0};function qs(e,t,n){Ls.document&&Ls.addEventListener(e,t,n)}function js(e,t,n){Ls.document&&Ls.removeEventListener(e,t,n)}let Hs=-1;const Fs=new Set,Bs=e=>{if(function(e){var t;return"pagehide"===e.type||"hidden"===(null==(t=Ls.document)?void 0:t.visibilityState)}(e)&&Hs>-1){if("visibilitychange"===e.type||"pagehide"===e.type)for(const e of Fs)e();isFinite(Hs)||(Hs="visibilitychange"===e.type?e.timeStamp:0,js("prerenderingchange",Bs,!0))}},Us=()=>{var e;if(Ls.document&&Hs<0){const t=Ms(),n=Ls.document.prerendering||null==(e=globalThis.performance.getEntriesByType("visibility-state").filter(e=>"hidden"===e.name&&e.startTime>t)[0])?void 0:e.startTime;Hs=n??(()=>{var e,t;return"hidden"!==(null==(e=Ls.document)?void 0:e.visibilityState)||(null==(t=Ls.document)?void 0:t.prerendering)?1/0:0})(),qs("visibilitychange",Bs,!0),qs("pagehide",Bs,!0),qs("prerenderingchange",Bs,!0)}return{get firstHiddenTime(){return Hs},onHidden(e){Fs.add(e)}}};const zs=(e,t=-1)=>{var n,r;const s=Ns();let o="navigate";s&&((null==(n=Ls.document)?void 0:n.prerendering)||Ms()>0?o="prerender":(null==(r=Ls.document)?void 0:r.wasDiscarded)?o="restore":s.type&&(o=s.type.replace(/_/g,"-")));return{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:o}},Ws=new WeakMap;function Gs(e,t){try{return Ws.get(e)||Ws.set(e,new t),Ws.get(e)}catch(n){return new t}}class Js{constructor(){this._sessionValue=0,this._sessionEntries=[]}_processEntry(e){var t;if(e.hadRecentInput)return;const n=this._sessionEntries[0],r=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&n&&r&&e.startTime-r.startTime<1e3&&e.startTime-n.startTime<5e3?(this._sessionValue+=e.value,this._sessionEntries.push(e)):(this._sessionValue=e.value,this._sessionEntries=[e]),null==(t=this._onAfterProcessingUnexpectedShift)||t.call(this,e)}}const Qs=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},Vs=e=>{let t=!1;return()=>{t||(e(),t=!0)}},Xs=e=>{var t;(null==(t=Ls.document)?void 0:t.prerendering)?addEventListener("prerenderingchange",()=>e(),!0):e()},Ys=[1800,3e3],Ks=[.1,.25],Zs=(e,t={})=>{((e,t={})=>{Xs(()=>{const n=Us(),r=zs("FCP");let s;const o=Qs("paint",e=>{for(const t of e)"first-contentful-paint"===t.name&&(o.disconnect(),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-Ms(),0),r.entries.push(t),s(!0)))});o&&(s=Ds(e,r,Ys,t.reportAllChanges))})})(Vs(()=>{var n;const r=zs("CLS",0);let s;const o=Us(),a=Gs(t,Js),i=e=>{for(const t of e)a._processEntry(t);a._sessionValue>r.value&&(r.value=a._sessionValue,r.entries=a._sessionEntries,s())},c=Qs("layout-shift",i);c&&(s=Ds(e,r,Ks,t.reportAllChanges),o.onHidden(()=>{i(c.takeRecords()),s(!0)}),null==(n=null==Ls?void 0:Ls.setTimeout)||n.call(Ls,s))}))};let eo=0,to=1/0,no=0;const ro=e=>
1{e.forEach(e=>{e.interactionId&&(to=Math.min(to,e.interactionId),no=Math.max(no,e.interactionId),eo=no?(no-to)/7+1:0)})};let so;const oo=()=>so?eo:performance.interactionCount||0;let ao=0;class io{constructor(){this._longestInteractionList=[],this._longestInteractionMap=new Map}_resetInteractions(){ao=oo(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const e=Math.min(this._longestInteractionList.length-1,Math.floor((oo()-ao)/50));return this._longestInteractionList[e]}_processEntry(e){var t,n;if(null==(t=this._onBeforeProcessingEntry)||t.call(this,e),!e.interactionId&&"first-input"!==e.entryType)return;const r=this._longestInteractionList.at(-1);let s=this._longestInteractionMap.get(e.interactionId);if(s||this._longestInteractionList.length<10||e.duration>r._latency){if(s?e.duration>s._latency?(s.entries=[e],s._latency=e.duration):e.duration===s._latency&&e.startTime===s.entries[0].startTime&&s.entries.push(e):(s={id:e.interactionId,entries:[e],_latency:e.duration},this._longestInteractionMap.set(s.id,s),this._longestInteractionList.push(s)),this._longestInteractionList.sort((e,t)=>t._latency-e._latency),this._longestInteractionList.length>10){const e=this._longestInteractionList.splice(10);for(const t of e)this._longestInteractionMap.delete(t.id)}null==(n=this._onAfterProcessingINPCandidate)||n.call(this,s)}}}const co=e=>{var t;const n=Ls.requestIdleCallback||Ls.setTimeout;"hidden"===(null==(t=Ls.document)?void 0:t.visibilityState)?e():(qs("visibilitychange",e=Vs(e),{once:!0,capture:!0}),qs("pagehide",e,{once:!0,capture:!0}),n(()=>{e(),js("visibilitychange",e,{capture:!0}),js("pagehide",e,{capture:!0})}))},uo=[200,500],lo=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=Us();Xs(()=>{"interactionCount"in performance||so||(so=Qs("event",ro,{type:"event",buffered:!0,durationThreshold:0}));const r=zs("INP");let s;const o=Gs(t,io),a=e=>{co(()=>{for(const n of e)o._processEntry(n);const t=o._estimateP98LongestInteraction();t&&t._latency!==r.value&&(r.value=t._latency,r.entries=t.entries,s())})},i=Qs("event",a,{durationThreshold:t.durationThreshold??40});s=Ds(e,r,uo,t.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{a(i.takeRecords()),s(!0)}))})};class po{_processEntry(e){var t;null==(t=this._onBeforeProcessingEntry)||t.call(this,e)}}const fo=[2500,4e3],mo=[800,1800],ho=e=>{var t,n;(null==(t=Ls.document)?void 0:t.prerendering)?Xs(()=>ho(e)):"complete"!==(null==(n=Ls.document)?void 0:n.readyState)?addEventListener("load",()=>ho(e),!0):setTimeout(e)},go={},vo={};let _o,yo,bo,So;function To(e,t=!1){return Ro("cls",e,Io,_o,t)}function Eo(e,t=!1){return Ro("lcp",e,Co,yo,t)}function wo(e){return Ro("inp",e,Po,So)}function ko(e,t){return Ao(e,t),vo[e]||(!function(e){const t={};"event"===e&&(t.durationThreshold=0);Qs(e,t=>{xo(e,{entries:t})},t)}(e),vo[e]=!0),Oo(e,t)}function xo(e,t){const s=go[e];if(null==s?void 0:s.length)for(const a of s)try{a(t)}catch(o){Os&&n.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${r(a)}\nError:`,o)}}function Io(){return Zs(e=>{xo("cls",{metric:e}),_o=e},{reportAllChanges:!0})}function Co(){return((e,t={})=>{Xs(()=>{const n=Us(),r=zs("LCP");let s;const o=Gs(t,po),a=e=>{t.reportAllChanges||(e=e.slice(-1));for(const t of e)o._processEntry(t),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-Ms(),0),r.entries=[t],s())},i=Qs("largest-contentful-paint",a);if(i){s=Ds(e,r,fo,t.reportAllChanges);const n=Vs(()=>{a(i.takeRecords()),i.disconnect(),s(!0)}),o=e=>{e.isTrusted&&(co(n),js(e.type,o,{capture:!0}))};for(const e of["keydown","click","visibilitychange"])qs(e,o,{capture:!0})}})})(e=>{xo("lcp",{metric:e}),yo=e},{reportAllChanges:!0})}function $o(){return((e,t={})=>{const n=zs("TTFB"),r=Ds(e,n,mo,t.reportAllChanges);ho(()=>{const e=Ns();e&&(n.value=Math.max(e.responseStart-Ms(),0),n.entries=[e],r(!0))})})(e=>{xo("ttfb",{metric:e}),bo=e})}function Po(){return lo(e=>{xo("inp",{metric:e}),So=e})}function Ro(e,t,n,r,s=!1){let o;return Ao(e,t),vo[e]||(o=n(),vo[e]=!0),r&&t({metric:r}),Oo(e,t,s?o:void 0)}function Ao(e,t){go[e]=go[e]||[],go[e].push(t)}function Oo(e,t,n){return()=>{n&&n();const r=go[e];if(!r)return;const s=r.indexOf(t);-1!==s&&r.splice(s,1)}}const Lo={};try{"undefined"!=typeof Node&&(Lo.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode").get),"undefined"!=typeof Element&&(Lo.tagName=Object.getOwnPropertyDescriptor(Element.prototype,"tagName").get,Lo.id=Object.getOwnPropertyDescriptor(Element.prototype,"id").get,Lo.className=Object.getOwnPropertyDescriptor(Element.prototype,"className").get,Lo.getAttribute=Element.prototype.getAttribute),"undefined"!=typeof HTMLElement&&(Lo.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"dataset").get)}catch{}
1function Do(e,t,n){const r=Lo[t];if(r)try{return r.call(e,n)}catch{}const s=e[t];return"function"==typeof s?s.call(e,n):s}function No(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,s=[];let o=0,a=0;const i=" > ",c=i.length;let u;const l=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&o++<r&&(u=Mo(n,l),!("html"===u||o>1&&a+s.length*c+u.length>=d));)s.push(u),a+=u.length,n=Do(n,"parentNode");return s.reverse().join(i)}catch{return"<unknown>"}}function Mo(e,t){const n=[],r=Do(e,"tagName");if(!r)return"";if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement){const t=Do(e,"dataset");if(t){if(t.sentryComponent)return t.sentryComponent;if(t.sentryElement)return t.sentryElement}}n.push(r.toLowerCase());const s=(null==t?void 0:t.length)?t.filter(t=>Do(e,"getAttribute",t)).map(t=>[t,Do(e,"getAttribute",t)]):null;if(null==s?void 0:s.length)s.forEach(e=>{n.push(`[${e[0]}="${e[1]}"]`)});else{const t=Do(e,"id");t&&n.push(`#${t}`);const r=Do(e,"className");if(r&&it(r)){const e=r.split(/\s+/);for(const t of e)n.push(`.${t}`)}}for(const o of["aria-label","type","name","title","alt"]){const t=Do(e,"getAttribute",o);t&&n.push(`[${o}="${t}"]`)}return n.join("")}function qo(e){return"number"==typeof e&&isFinite(e)}function jo(e,t,n,{...r}){const s=m(e).start_timestamp;return s&&s>t&&"function"==typeof e.updateStartTime&&e.updateStartTime(t),gn(e,()=>{const e=hn({startTime:t,...r});return e&&e.end(n),e})}function Ho(e){var t;const n=j();if(!n)return;const{name:r,transaction:s,attributes:o,startTime:a}=e,{release:i,environment:c}=n.getOptions(),{userInfo:u}=n.getDataCollectionOptions(),l=n.getIntegrationByName("Replay"),d=null==l?void 0:l.getReplayId(),p=F(),f=p.getUser(),m=void 0!==f?f.email||f.id||f.ip_address:void 0;let h;try{h=p.getScopeData().contexts.profile.profile_id}catch{}return hn({name:r,attributes:{release:i,environment:c,user:m||void 0,profile_id:h||void 0,replay_id:d||void 0,transaction:s,"user_agent.original":null==(t=Ls.navigator)?void 0:t.userAgent,"client.address":u?"{{auto}}":void 0,...o},startTime:a,experimental:{standalone:!0}})}function Fo(){return Ls.addEventListener&&Ls.performance}function Bo(e){return e/1e3}function Uo(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function zo(e,t){let n,r=!1;function s(e){!r&&n&&t(e,n.spanContext().spanId,n),r=!0}(e=>{const t=t=>{var n;"pagehide"!==t.type&&"hidden"!==(null==(n=Ls.document)?void 0:n.visibilityState)||e(t)};qs("visibilitychange",t,{capture:!0,once:!0}),qs("pagehide",t,{capture:!0,once:!0})})(()=>{s("pagehide")});const o=e.on("beforeStartNavigationSpan",(e,t)=>{(null==t?void 0:t.isRedirect)||(s("navigation"),o(),a())}),a=e.on("afterStartPageLoadSpan",e=>{n=e,a()})}function Wo(e){let t,r=0;if(!Uo("layout-shift"))return;const s=To(({metric:e})=>{const n=e.entries[e.entries.length-1];n&&(r=e.value,t=n)},!0);zo(e,(e,o)=>{!function(e,t,r,s){var o;Os&&n.log(`Sending CLS span (${e})`);const a=t?Bo((ct()||0)+t.startTime):T(),i=F().getScopeData().transactionName,c=t?No(null==(o=t.sources[0])?void 0:o.node):"Layout shift",u={[w]:"auto.http.browser.cls",[E]:"ui.webvital.cls",[O]:0,"sentry.pageload.span_id":r,"sentry.report_event":s};(null==t?void 0:t.sources)&&t.sources.forEach((e,t)=>{u[`cls.source.${t+1}`]=No(e.node)});const l=Ho({name:c,transaction:i,attributes:u,startTime:a});l&&(l.addEvent("cls",{[v]:"",[_]:e}),l.end(a))}(r,t,o,e),s()})}function Go(e){return null!=e&&e>0&&e<=6e4}function Jo(e){let t,r=0;if(!Uo("largest-contentful-paint"))return;const s=Eo(({metric:e})=>{const n=e.entries[e.entries.length-1];n&&Go(e.value)&&(r=e.value,t=n)},!0);zo(e,(e,o)=>{!function(e,t,r,s){if(!Go(e))return;Os&&n.log(`Sending LCP span (${e})`);const o=Bo((ct()||0)+((null==t?void 0:t.startTime)||0)),a=F().getScopeData().transactionName,i=t?No(t.element):"Largest contentful paint",c={[w]:"auto.http.browser.lcp",[E]:"ui.webvital.lcp",[O]:0,"sentry.pageload.span_id":r,"sentry.report_event":s};t&&(t.element&&(c["lcp.element"]=No(t.element)),t.id&&(c["lcp.id"]=t.id),t.url&&(c["lcp.url"]=t.url),null!=t.loadTime&&(c["lcp.loadTime"]=t.loadTime),null!=t.renderTime&&(c["lcp.renderTime"]=t.renderTime),null!=t.size&&(c["lcp.size"]=t.size));const u=Ho({name:i,transaction:a,attributes:c,startTime:o});u&&(u.addEvent("lcp",{[v]:"millisecond",[_]:e}),u.end(o))}(r,t,o,e),s()})}function Qo(e){return e?((ct()||performance.timeOrigin)+e)/1e3:e}function Vo(e){var t;const n={};
1if(null!=e.nextHopProtocol){const{name:t,version:r}=function(e){let t="unknown",n="unknown",r="";for(const s of e){if("/"===s){[t,n]=e.split("/");break}if(!isNaN(Number(s))){t="h"===r?"http":r,n=e.split(r)[1];break}r+=s}return r===e&&(t=r),{name:t,version:n}}(e.nextHopProtocol);n["network.protocol.version"]=r,n["network.protocol.name"]=t}return ct()||(null==(t=Fo())?void 0:t.timeOrigin)?(r={...n,"http.request.redirect_start":Qo(e.redirectStart),"http.request.redirect_end":Qo(e.redirectEnd),"http.request.worker_start":Qo(e.workerStart),"http.request.fetch_start":Qo(e.fetchStart),"http.request.domain_lookup_start":Qo(e.domainLookupStart),"http.request.domain_lookup_end":Qo(e.domainLookupEnd),"http.request.connect_start":Qo(e.connectStart),"http.request.secure_connection_start":Qo(e.secureConnectionStart),"http.request.connection_end":Qo(e.connectEnd),"http.request.request_start":Qo(e.requestStart),"http.request.response_start":Qo(e.responseStart),"http.request.response_end":Qo(e.responseEnd),"http.request.time_to_first_byte":null!=e.responseStart?e.responseStart/1e3:void 0},Object.fromEntries(Object.entries(r).filter(([,e])=>null!=e))):n;var r}const Xo=2147483647;let Yo,Ko,Zo=0,ea={};function ta({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=Fo();if(r&&ct()){r.mark&&Ls.performance.mark("sentry-tracing-init");const s=t?Jo(n):!1===t?Eo(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&Go(e.value)&&(ea.lcp={value:e.value,unit:"millisecond"},Yo=t)},!0):void 0,o=e?Wo(n):!1===e?To(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(ea.cls={value:e.value,unit:""},Ko=t)},!0):void 0,a=Ro("ttfb",({metric:e})=>{e.entries[e.entries.length-1]&&(ea.ttfb={value:e.value,unit:"millisecond"})},$o,bo),i=ko("paint",({entries:e})=>{const t=Us();for(const n of e){const e=n.startTime<t.firstHiddenTime;"first-paint"===n.name&&e&&(ea.fp={value:n.startTime,unit:"millisecond"}),"first-contentful-paint"===n.name&&e&&(ea.fcp={value:n.startTime,unit:"millisecond"})}});return()=>{a(),i(),null==s||s(),null==o||o()}}return()=>{}}function na(e,t){const n=Fo(),r=ct();if(!(null==n?void 0:n.getEntries)||!r)return;const{spanStreamingEnabled:s,ignorePerformanceApiSpans:o,ignoreResourceSpans:a}=t,i=Bo(r),c=n.getEntries(),{op:u,start_timestamp:l}=m(e);c.slice(Zo).forEach(t=>{const n=Bo(t.startTime),r=Bo(Math.max(0,t.duration));if(!("navigation"===u&&l&&i+n<l))switch(t.entryType){case"navigation":!function(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{oa(e,t,r,n)}),oa(e,t,"secureConnection",n,"TLS/SSL"),oa(e,t,"fetch",n,"cache"),oa(e,t,"domainLookup",n,"DNS"),function(e,t,n){const r=n+Bo(t.requestStart),s=n+Bo(t.responseEnd),o=n+Bo(t.responseStart);t.responseEnd&&(jo(e,r,s,{op:"browser.request",name:t.name,attributes:{[w]:"auto.ui.browser.metrics"}}),jo(e,o,s,{op:"browser.response",name:t.name,attributes:{[w]:"auto.ui.browser.metrics"}}))}(e,t,n)}(e,t,i);break;case"mark":case"paint":case"measure":!function(e,t,n,r,s,o){if(function(e){if("measure"!==(null==e?void 0:e.entryType))return;try{return"Components ⚛"===e.detail.devtools.track}catch{return}}(t))return;if(["mark","measure"].includes(t.entryType)&&je(t.name,o))return;const a=Ns(!1),i=Bo(a?a.requestStart:0),c=s+Math.max(n,i),u=s+n,l=u+r,d={[w]:"auto.resource.browser.metrics"};c!==u&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=c);(function(e,t){try{const n=t.detail;if(!n)return;if("object"==typeof n){for(const[t,r]of Object.entries(n))if(r&&we(r))e[`sentry.browser.measure.detail.${t}`]=r;else if(void 0!==r)try{e[`sentry.browser.measure.detail.${t}`]=JSON.stringify(r)}catch{}return}if(we(n))return void(e["sentry.browser.measure.detail"]=n);try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}})(d,t),c<=l&&jo(e,c,l,{name:t.name,op:t.entryType,attributes:d})}(e,t,n,r,i,o);break;case"resource":!function(e,t,n,r,s,o,a){if("xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType)return;const i=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(null==a?void 0:a.includes(i))return;const c={[w]:"auto.resource.browser.metrics"},u=Er(n);u.protocol&&(c["url.scheme"]=u.protocol.split(":").pop());u.host&&(c["server.address"]=u.host);c["url.same_origin"]=n.includes(Ls.location.origin),c[Pn]=n,function(e,t,n){n.forEac
1h(([n,r])=>{const s=e[n];null!=s&&("number"==typeof s&&s<Xo||"string"==typeof s)&&(t[r]=s)})}(t,c,[["responseStatus","http.response.status_code"],["transferSize","http.response_transfer_size"],["encodedBodySize","http.response_content_length"],["decodedBodySize","http.decoded_response_content_length"],["renderBlockingStatus","resource.render_blocking_status"],["deliveryType","http.response_delivery_type"]]);const l={...c,...Vo(t)},d=o+r,p=d+s;jo(e,d,p,{name:n.replace(Ls.location.origin,""),op:i,attributes:l})}(e,t,t.name,n,r,i,a)}}),Zo=Math.max(c.length-1,0),function(e,t){const n=Ls.navigator;if(!n)return;const r=n.connection;r&&(r.effectiveType&&e.setAttribute(t?"network.connection.effective_type":"effectiveConnectionType",r.effectiveType),r.type&&e.setAttribute(t?"network.connection.type":"connectionType",r.type),qo(r.rtt)&&(t?e.setAttribute("network.connection.rtt",r.rtt):"pageload"===m(e).op&&sn("connection.rtt",r.rtt,"millisecond")));qo(n.deviceMemory)&&(t?e.setAttribute("device.memory.estimated_capacity",n.deviceMemory):e.setAttribute("deviceMemory",`${n.deviceMemory} GB`));qo(n.hardwareConcurrency)&&(t?e.setAttribute("device.processor_count",n.hardwareConcurrency):e.setAttribute("hardwareConcurrency",String(n.hardwareConcurrency)))}(e,s)}function ra(e,t){var r;const s=ct();if(!(null==(r=Fo())?void 0:r.getEntries)||!s)return void sa();const{spanStreamingEnabled:o,recordClsOnPageloadSpan:a,recordLcpOnPageloadSpan:i}=t,c=Bo(s);if("pageload"===m(e).op){if(function(e){const t=Ns(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}(ea),o){const t=(t,r,s)=>{const o=s??`browser.web_vital.${t}.value`;e.setAttribute(o,r),Os&&n.log("Setting web vital attribute",{[o]:r},"on pageload span")};["ttfb","fp","fcp"].forEach(e=>{ea[e]&&t(e,ea[e].value)}),ea["ttfb.requestTime"]&&t("ttfb.requestTime",ea["ttfb.requestTime"].value,"browser.web_vital.ttfb.request_time")}else a||delete ea.cls,i||delete ea.lcp,Object.entries(ea).forEach(([t,n])=>{sn(t,n.value,n.unit,e)}),function(e,t){Yo&&t.recordLcpOnPageloadSpan&&(Yo.element&&e.setAttribute("lcp.element",No(Yo.element)),Yo.id&&e.setAttribute("lcp.id",Yo.id),Yo.url&&e.setAttribute("lcp.url",Yo.url.trim().slice(0,200)),null!=Yo.loadTime&&e.setAttribute("lcp.loadTime",Yo.loadTime),null!=Yo.renderTime&&e.setAttribute("lcp.renderTime",Yo.renderTime),e.setAttribute("lcp.size",Yo.size));(null==Ko?void 0:Ko.sources)&&t.recordClsOnPageloadSpan&&Ko.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,No(t.node)))}(e,t);e.setAttribute(o?"browser.performance.time_origin":"performance.timeOrigin",c),e.setAttribute(o?"browser.performance.navigation.activation_start":"performance.activationStart",Ms())}sa()}function sa(){Yo=void 0,Ko=void 0,ea={}}function oa(e,t,n,r,s=n){const o=function(e){if("secureConnection"===e)return"connectEnd";if("fetch"===e)return"domainLookupStart";return`${e}End`}(n),a=t[o],i=t[`${n}Start`];i&&a&&jo(e,r+Bo(i),r+Bo(a),{op:`browser.${s}`,name:t.name,attributes:{[w]:"auto.ui.browser.metrics",..."redirect"===n&&null!=t.redirectCount?{"http.redirect_count":t.redirectCount}:{}}})}const aa=[],ia=new Map,ca=new Map;function ua(){if(Fo()&&ct()){const e=wo(da);return()=>{e()}}return()=>{}}const la={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"};const da=({metric:e})=>{if(null==e.value)return;const t=Bo(e.value);if(t>60)return;const n=e.entries.find(t=>t.duration===e.value&&la[t.name]);if(!n)return;const{interactionId:r}=n,s=la[n.name],i=Bo(ct()+n.startTime),c=o(),u=c?a(c):void 0,l=null!=r?ia.get(r):void 0,d=(null==l?void 0:l.span)||u,p=d?m(d).description:F().getScopeData().transactionName,f=Ho({name:(null==l?void 0:l.elementName)||No(n.target),transaction:p,attributes:{[w]:"auto.http.browser.inp",[E]:`ui.interaction.${s}`,[O]:n.duration},startTime:i});f&&(f.addEvent("inp",{[v]:"millisecond",[_]:e.value}),f.end(i+t))};function pa(){const e=Object.keys(la);function t(e){const t=e.target;if(!t)return;const n=No(t),r=Math.round(e.timeStamp);if(ca.set(r,n),ca.size>50){const e=ca.keys().next().value;void 0!==e&&ca.delete(e)}}
1Hn()&&e.forEach(e=>{Ls.addEventListener(e,t,{capture:!0,passive:!0})});const n=({entries:e})=>{const t=o(),n=t&&a(t);e.forEach(e=>{if(!function(e){return"duration"in e}(e))return;const t=e.interactionId;if(null==t)return;if(ia.has(t))return;const r=e.target?No(e.target):function(e){const t=Math.round(e.startTime);let n=ca.get(t);if(!n)for(let r=-5;r<=5;r++){const e=ca.get(t+r);if(e){n=e;break}}return n||"<unknown>"}(e);if(aa.length>10){const e=aa.shift();ia.delete(e)}aa.push(t),ia.set(t,{span:n,elementName:r})})};ko("event",n),ko("first-input",n)}function fa(e){var t,n;const{name:r,op:s,origin:o,metricName:a,value:i,attributes:c,parentSpan:u,reportEvent:l,startTime:d,endTime:p}=e,f=F().getScopeData().transactionName,m={[w]:o,[E]:s,[O]:0,[`browser.web_vital.${a}.value`]:i,[$n]:f,[Cn]:f,"user_agent.original":null==(t=Ls.navigator)?void 0:t.userAgent,...c};u&&"pageload"===(null==(n=ut(u).attributes)?void 0:n[E])&&(m["sentry.pageload.span_id"]=u.spanContext().spanId),l&&(m[`browser.web_vital.${a}.report_event`]=l);const h=hn({name:r,attributes:m,startTime:d,parentSpan:u});h&&h.end(p??d)}function ma(e){let t,r=0;if(!Uo("largest-contentful-paint"))return;const s=Eo(({metric:e})=>{const n=e.entries[e.entries.length-1];n&&Go(e.value)&&(r=e.value,t=n)},!0);zo(e,(e,o,a)=>{!function(e,t,r,s){if(!Go(e))return;Os&&n.log(`Sending LCP span (${e})`);const o=ct()||0,a=Bo(o),i=Bo(o+((null==t?void 0:t.startTime)||0)),c=t?No(t.element):"Largest contentful paint",u={};(null==t?void 0:t.element)&&(u["browser.web_vital.lcp.element"]=No(t.element)),(null==t?void 0:t.id)&&(u["browser.web_vital.lcp.id"]=t.id),(null==t?void 0:t.url)&&(u["browser.web_vital.lcp.url"]=t.url),null!=(null==t?void 0:t.loadTime)&&(u["browser.web_vital.lcp.load_time"]=t.loadTime),null!=(null==t?void 0:t.renderTime)&&(u["browser.web_vital.lcp.render_time"]=t.renderTime),null!=(null==t?void 0:t.size)&&(u["browser.web_vital.lcp.size"]=t.size),fa({name:c,op:"ui.webvital.lcp",origin:"auto.http.browser.lcp",metricName:"lcp",value:e,attributes:u,parentSpan:r,reportEvent:s,startTime:a,endTime:i})}(r,t,a,e),s()})}function ha(e){let t,r=0;if(!Uo("layout-shift"))return;const s=To(({metric:e})=>{const n=e.entries[e.entries.length-1];n&&(r=e.value,t=n)},!0);zo(e,(e,o,a)=>{!function(e,t,r,s){var o;Os&&n.log(`Sending CLS span (${e})`);const a=t?Bo((ct()||0)+t.startTime):T(),i=t?No(null==(o=t.sources[0])?void 0:o.node):"Layout shift",c={};(null==t?void 0:t.sources)&&t.sources.forEach((e,t)=>{c[`browser.web_vital.cls.source.${t+1}`]=No(e.node)});fa({name:i,op:"ui.webvital.cls",origin:"auto.http.browser.cls",metricName:"cls",value:e,attributes:c,parentSpan:r,reportEvent:s,startTime:a})}(r,t,a,e),s()})}function ga(){if(!Fo()||!ct())return;wo(({metric:e})=>{if(null==e.value)return;if(Bo(e.value)>60)return;const t=e.entries.find(t=>t.duration===e.value&&la[t.name]);t&&function(e,t){Os&&n.log(`Sending INP span (${e})`);const r=Bo(ct()+t.startTime),s=Bo(e),i=la[t.name],c=(m=t.interactionId,null!=m?ia.get(m):void 0),u=o(),l=u?a(u):void 0,d=(null==c?void 0:c.span)||l,p=d?ut(d).name:F().getScopeData().transactionName,f=(null==c?void 0:c.elementName)||No(t.target);var m;fa({name:f,op:`ui.interaction.${i}`,origin:"auto.http.browser.inp",metricName:"inp",value:e,attributes:{[O]:t.duration,[$n]:p,[Cn]:p},startTime:r,endTime:r+s,parentSpan:d})}(e.value,t)})}let va,_a,ya,ba;function Sa(){if(!Ls.document)return;const e=At.bind(null,"dom"),t=Ta(e,!0);Ls.document.addEventListener("click",t,!1),Ls.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{var n,r;const s=null==(n=Ls[t])?void 0:n.prototype;(null==(r=null==s?void 0:s.hasOwnProperty)?void 0:r.call(s,"addEventListener"))&&(Ue(s,"addEventListener",function(t){return function(n,r,s){if("click"===n||"keypress"==n)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},o=r[n]=r[n]||{refCount:0};if(!o.handler){const r=Ta(e);o.handler=r,t.call(this,n,r,s)}o.refCount++}catch{}return t.call(this,n,r,s)}}),Ue(s,"removeEventListener",function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this.__sentry_instrumentation_handlers__||{},s=n[t];
1s&&(s.refCount--,s.refCount<=0&&(e.call(this,t,s.handler,r),s.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function Ta(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(e){try{return e.target}catch{return null}}(n);if(function(e,t){return"keypress"===e&&(!(null==t?void 0:t.tagName)||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}(n.type,r))return;Xe(n,"_sentryCaptured",!0),r&&!r._sentryId&&Xe(r,"_sentryId",he());const s="keypress"===n.type?"input":n.type;if(!function(e){if(e.type!==_a)return!1;try{if(!e.target||e.target._sentryId!==ya)return!1}catch{}return!0}(n)){e({event:n,name:s,global:t}),_a=n.type,ya=r?r._sentryId:void 0}clearTimeout(va),va=Ls.setTimeout(()=>{ya=void 0,_a=void 0},1e3)}}function Ea(e){const t="history";Pt(t,e),Rt(t,wa)}function wa(){function e(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const r=ba,s=function(e){try{return new URL(e,Ls.location.origin).toString()}catch{return e}}(String(n));if(ba=s,r===s)return e.apply(this,t);At("history",{from:r,to:s})}return e.apply(this,t)}}Ls.addEventListener("popstate",()=>{const e=Ls.location.href,t=ba;if(ba=e,t===e)return;At("history",{from:t,to:e})}),"history"in ns&&ns.history&&(Ue(Ls.history,"pushState",e),Ue(Ls.history,"replaceState",e))}const ka={};const xa="__sentry_xhr_v3__";function Ia(e){Pt("xhr",e),Rt("xhr",Ca)}function Ca(){if(!Ls.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){const r=new Error,s=1e3*T(),o=it(n[0])?n[0].toUpperCase():void 0,a=function(e){if(it(e))return e;try{return e.toString()}catch{}return}(n[1]);if(!o||!a)return e.apply(t,n);t[xa]={method:o,url:a,request_headers:{}},"POST"===o&&a.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const i=()=>{const e=t[xa];if(e&&4===t.readyState){try{e.status_code=t.status}catch{}At("xhr",{endTimestamp:1e3*T(),startTimestamp:s,xhr:t,virtualError:r}),t.removeEventListener("readystatechange",i)}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(i(),e.apply(t,n))}):t.addEventListener("readystatechange",i),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){const[r,s]=n,o=t[xa];return o&&it(r)&&it(s)&&(o.request_headers[r.toLowerCase()]=s),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){const r=t[xa];if(!r)return e.apply(t,n);void 0!==n[0]&&(r.body=n[0]);return At("xhr",{startTimestamp:1e3*T(),xhr:t}),e.apply(t,n)}})}function $a(e){let t;try{t=e.getAllResponseHeaders()}catch(r){return Os&&n.error(r,"Failed to get xhr response headers",e),{}}return t?t.split("\r\n").reduce((e,t)=>{const[n,r]=t.split(": ");return r&&(e[n.toLowerCase()]=r),e},{}):{}}function Pa(e,t=function(e){const t=ka[e];if(t)return t;let r=Ls[e];if(rs(r))return ka[e]=r.bind(Ls);const s=Ls.document;if(s&&"function"==typeof s.createElement)try{const t=s.createElement("iframe");t.hidden=!0,s.head.appendChild(t);const n=t.contentWindow;(null==n?void 0:n[e])&&(r=n[e]),s.head.removeChild(t)}catch(o){Os&&n.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,o)}return r?ka[e]=r.bind(Ls):r}("fetch")){let r=0,s=0;return Yn(e,async function(n){const o=n.body.length;r+=o,s++;const a={body:n.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:r<=6e4&&s<15,...e.fetchOptions};try{const n=await t(e.url,a);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get("X-Sentry-Rate-Limits"),"retry-after":n.headers.get("Retry-After")}}}catch(i){throw ka["fetch"]=void 0,i}finally{r-=o,s--}},Vn(e.bufferSize||40))}const Ra="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function Aa(e,t,n,r){const s={filename:e,function:"<anonymous>"===t?dt:t,in_app:!0};return void 0!==n&&(s.lineno=n),void 0!==r&&(s.colno=r),s}const Oa=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,La=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Da=/\((\S*)(?::(\d+))(?::(\d+))\)/,Na=/at (.+?) ?\(data:(.+?),/,Ma=[30,e=>{var t;const n=e.match(Na);
1if(n)return{filename:`<data:${n[2]}>`,function:n[1]};const r=Oa.exec(e);if(r){const[,e,t,n]=r;return Aa(e,dt,+t,+n)}const s=La.exec(e);if(s){if(0===(null==(t=s[2])?void 0:t.indexOf("eval"))){const e=Da.exec(s[2]);e&&(s[2]=e[1],s[3]=e[2],s[4]=e[3])}const[e,n]=Ua(s[1]||dt,s[2]);return Aa(n,e,s[3]?+s[3]:void 0,s[4]?+s[4]:void 0)}}],qa=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ja=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ha=[50,e=>{const t=qa.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=ja.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||dt;return[n,e]=Ua(n,e),Aa(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],Fa=[Ma,Ha],Ba=lt(...Fa),Ua=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:dt,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},za=1024,Wa=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(e){var r;t.console&&function(e){const t="console",n=Pt(t,e);Rt(t,Wr)}(function(e){return function(t){if(j()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:Gr(t.level),message:pt(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${pt(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}$r(n,{input:t.args,level:t.level})}}(e)),t.dom&&(r=function(e,t){return function(r){if(j()!==e)return;let s,o,a="object"==typeof t?t.serializeAttribute:void 0,i="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;i&&i>za&&(Ra&&n.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${i} was configured. Sentry will use 1024 instead.`),i=za),"string"==typeof a&&(a=[a]);try{const e=r.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;s=No(t,{keyAttrs:a,maxStringLength:i}),o=fs(t)}catch{s="<unknown>"}if(0===s.length)return;const c={category:`ui.${r.name}`,message:s};o&&(c.data={"ui.component_name":o}),$r(c,{event:r.event,name:r.name,global:r.global})}}(e,t.dom),Pt("dom",r),Rt("dom",Sa)),t.xhr&&Ia(function(e){return function(t){if(j()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,s=t.xhr[xa];if(!n||!r||!s)return;const{method:o,url:a,status_code:i,body:c}=s,u={method:o,url:a,status_code:i},l={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},d={category:"xhr",data:u,type:"http",level:ts(i)};e.emit("beforeOutgoingRequestBreadcrumb",d,l),$r(d,l)}}(e)),t.fetch&&os(function(e){return function(t){if(j()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){const s={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},o={category:"fetch",data:t.fetchData,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",o,s),$r(o,s)}else{const s=t.response,o={...t.fetchData,status_code:null==s?void 0:s.status},a={input:t.args,response:s,startTimestamp:n,endTimestamp:r},i={category:"fetch",data:o,type:"http",level:ts(o.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",i,a),$r(i,a)}}}(e)),t.history&&Ea(function(e){return function(t){if(j()!==e)return;let n=t.from,r=t.to;const s=Er(ms.location.href);let o=n?Er(n):void 0;const a=Er(r);(null==o?void 0:o.path)||(o=s),s.protocol===a.protocol&&s.host===a.host&&(r=a.relative),s.protocol===o.protocol&&s.host===o.host&&(n=o.relative),$r({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on("beforeSendEvent",function(e){return function(t){j()===e&&$r({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:qe(t)},{event:t})}}(e))}}};const Ga="EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".
1split(","),Ja=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&Ue(ms,"setTimeout",Qa),t.setInterval&&Ue(ms,"setInterval",Qa),t.requestAnimationFrame&&Ue(ms,"requestAnimationFrame",Va),t.XMLHttpRequest&&"XMLHttpRequest"in ms&&Ue(XMLHttpRequest.prototype,"send",Xa);const e=t.eventTarget;if(e){(Array.isArray(e)?e:Ga).forEach(e=>function(e,t){var n,s;const o=null==(n=ms[e])?void 0:n.prototype;if(!(null==(s=null==o?void 0:o.hasOwnProperty)?void 0:s.call(o,"addEventListener")))return;Ue(o,"addEventListener",function(n){return function(s,o,a){try{"function"==typeof o.handleEvent&&(o.handleEvent=vs(o.handleEvent,{mechanism:{data:{handler:r(o),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&function(e,t,n){e&&"object"==typeof e&&"removeEventListener"in e&&"function"==typeof e.removeEventListener&&e.removeEventListener(t,n)}(this,s,o),n.apply(this,[s,vs(o,{mechanism:{data:{handler:r(o),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),a])}}),Ue(o,"removeEventListener",function(e){return function(t,n,r){try{if(Object.prototype.hasOwnProperty.call(n,"__sentry_wrapped__")){const s=n.__sentry_wrapped__;s&&e.call(this,t,s,r)}}catch{}return e.call(this,t,n,r)}})}(e,t))}}}};function Qa(e){return function(...t){const n=t[0];return t[0]=vs(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${r(e)}`}}),e.apply(this,t)}}function Va(e){return function(t){return e.apply(this,[vs(t,{mechanism:{data:{handler:r(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function Xa(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&Ue(n,e,function(t){const n={mechanism:{data:{handler:r(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},s=Me(t);return s&&(n.mechanism.data.handler=r(s)),vs(t,n)})}),e.apply(this,t)}}const Ya=(e={})=>{const t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(void 0===ms.document)return void(Ra&&n.warn("Using the `browserSessionIntegration` in non-browser environments is not supported."));ft({ignoreDuration:!0});let e=!1;co(()=>{e||(mt(),e=!0)});const r=ee();let s=r.getUser();r.addScopeListener(t=>{const n=t.getUser();(null==s?void 0:s.id)===(null==n?void 0:n.id)&&(null==s?void 0:s.ip_address)===(null==n?void 0:n.ip_address)||(s=n,e&&mt())}),"route"===t&&Ea(({from:t,to:n})=>{t!==n&&(ft({ignoreDuration:!0}),mt(),e=!0)})}}},Ka=()=>({name:"CultureContext",preprocessEvent(e){var t;const n=Za();n&&(e.contexts={...e.contexts,culture:{...n,...null==(t=e.contexts)?void 0:t.culture}})},processSegmentSpan(e){const t=Za();t&&An(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}});function Za(){try{const e=ms.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}const ei=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(!function(e){Lt(t=>{const{stackParser:n,attachStacktrace:r}=ni();if(j()!==e||gs())return;const{msg:s,url:o,line:a,column:i,error:c}=t,u=function(e,t,n,r){const s=e.exception=e.exception||{},o=s.values=s.values||[],a=o[0]=o[0]||{},i=a.stacktrace=a.stacktrace||{},c=i.frames=i.frames||[];0===c.length&&c.push({colno:r,lineno:n,filename:ri(t)??ps(),function:dt,in_app:!0});return e}($s(n,c||s,void 0,r,!1),o,a,i);u.level="error",ht(u,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}(e),ti("onerror")),t.onunhandledrejection&&(!function(e){Mt(t=>{const{stackParser:n,attachStacktrace:r}=ni();if(j()!==e||gs())return;const s=function(e){if(we(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}(t),o=we(s)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(s)}`}]}}:$s(n,s,void 0,r,!0);o.level="error",ht(o,{originalException:s,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}(e),ti("onunhandledrejection"))}}};function ti(e){Ra&&n.log(`Global Handler attached: ${e}`)}function ni(){const e=j();return(null==e?void 0:e.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}
1function ri(e){if(it(e)&&0!==e.length)return e.startsWith("data:")?`<${wr(e,!1)}>`:e}const si=()=>({name:"HttpContext",preprocessEvent(e){var t;if(!ms.navigator&&!ms.location&&!ms.document)return;const n=_s(),r={...n.headers,...null==(t=e.request)?void 0:t.headers};e.request={...n,...e.request,headers:r}},processSegmentSpan(e){var t;const n=null==(t=e.attributes)?void 0:t[E];if(!ms.navigator&&!ms.location&&!ms.document)return;const r=_s();An(e,{[Pn]:"http.client"!==n?r.url:void 0,"http.request.header.user_agent":r.headers["User-Agent"],"http.request.header.referer":r.headers.Referer})}}),oi=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,s){Mr(ys,s.getOptions().stackParser,n,t,e,r)}}},ai=/^HTML(\w*)Element$/;function ii(e){if("undefined"!=typeof window&&e===window)return"[Window]";if("undefined"!=typeof document&&e===document)return"[Document]";if(function(e){if("undefined"==typeof Element)return!1;try{return e instanceof Element}catch{return!1}}(e)){const t=function(e){const t=Object.getPrototypeOf(e);return(null==t?void 0:t.constructor)?t.constructor.name:"null prototype"}(e);if(ai.test(t))return`[HTMLElement: ${No(e)}]`}}function ci(){return!!function(){var e;if(void 0===ms.window)return!1;const t=ms;if(t.nw)return!1;const n=t.chrome||t.browser;if(!(null==(e=null==n?void 0:n.runtime)?void 0:e.id))return!1;const r=ps();return!(ms===ms.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(r))}()&&(Ra&&Ce(()=>{}),!0)}function ui(e){return[Lr(),Rr(),Yr(),Ja(),Wa(),ei(),oi(),Jr(),si(),Ka(),Ya()]}function li(e={}){const r=!e.skipBrowserExtensionCheck&&ci();let s=null==e.defaultIntegrations?ui():e.defaultIntegrations;const o={...e,enabled:!r&&e.enabled,stackParser:gt(e.stackParser||Ba),integrations:Nn({integrations:e.integrations,defaultIntegrations:s}),transport:e.transport||Pa};return vt(ii),function(e,r){!0===r.debug&&(t?n.enable():Ce(()=>{})),F().update(r.initialScope);const s=new e(r);return yr(s),s.init(),s}(As,o)}function di(e){try{return new URL(e,ms.location.origin).href}catch{return}}function pi(e){try{return new Headers(e)}catch{return}}const fi={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function mi(e,t){const{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:s,enableHTTPTimings:a,tracePropagationTargets:i,onRequestSpanStart:c,onRequestSpanEnd:u}={...fi,...t},l="function"==typeof s?s:e=>!0,d=e=>function(e,t){const n=ps();if(n){let r,s;try{r=new URL(e,n),s=new URL(n).origin}catch{return!1}const o=r.origin===s;return t?je(r.toString(),t)||o&&je(r.pathname,t):o}{const n=!!e.match(/^\/(?!\/)/);return t?je(e,t):n}}(e,i),p={},f=e.getOptions().propagateTraceparent;n&&os(t=>{const n=Kr(t,l,d,p,{propagateTraceparent:f,onRequestSpanEnd:u});if(n){const r=di(t.fetchData.url),s=r?Er(r).host:void 0,o=r?wr(r):void 0;n.setAttributes({[In]:o,[Pn]:o,"server.address":s}),a&&gi(n,e),null==c||c(n,{headers:t.headers})}}),r&&Ia(t=>{var n;const r=function(e,t,n,r,s,a){const i=e.xhr,c=null==i?void 0:i[xa];if(!i||i.__sentry_own_request__||!c)return;const{url:u,method:l}=c,d=J()&&t(u);if(e.endTimestamp){const t=i.__sentry_xhr_span_id__;if(!t)return;const n=r[t];return void(n&&(d&&void 0!==c.status_code&&(Je(n,c.status_code),n.end(),null==a||a(n,{headers:pi($a(i)),error:e.error})),delete r[t]))}const p=di(u),f=Er(p||u),m=p?wr(p):void 0,h=wr((S=u,S.split(/[?#]/,1)[0])),g=j(),v=!!o(),_=v||!!g&&cn(g),y=d&&_?hn({name:`${l} ${h}`,attributes:{url:wr(u),type:"xhr","http.method":l,"http.url":m,[Pn]:m,"server.address":null==f?void 0:f.host,[w]:"auto.http.browser",[E]:"http.client",...(null==f?void 0:f.search)&&{"http.query":null==f?void 0:f.search},...(null==f?void 0:f.hash)&&{"http.fragment":null==f?void 0:f.hash}}}):new K,b=wn(y)&&v?void 0:y;var S;d&&!_&&(null==g||g.recordDroppedEvent("no_parent_span","span"));i.__sentry_xhr_span_id__=y.spanContext().spanId,r[i.__sentry_xhr_span_id__]=y,n(u)&&function(e,t,n){const{"sentry-trace":r,baggage:s,traceparent:o}=Ir({span:t,propagateTraceparent:n});r&&function(e,t,n,r){var s;const o=null==(s=e.__sentry_xhr_v3__)?void 0:s.request_headers;if((null==o?void 0:o["sentry-trace"])||!e.setRequestHeader)return;try{if(e.setRequestHeader("sentry-trace",t),r&&!(null==o?void 0:o.traceparent)&&e.setRequestHeader("traceparent",r),n){const t=null==o?void 0:o.baggage;t&&t.split(",").some(e=>e.trim().startsWith("sentry-"))||e.setRequestHeader("baggage",n)}}catch{}}(e,r,s,o)}(i,J()&&_?b:void 0,s);g&&g.emit("beforeOutgoingRequestSpan",y,e);return y}(t,l,d,p,f,u);r&&(a&&gi(r,e),null==c||c(r,{headers:pi(null==(n=t.xhr.__sentry_xhr_v3__)?void 0:n.request_headers)}))})}const hi=300;function gi(e,t){const{url:n}=m(e).data;if(!n||"string"!=typeof n)return;let r=()=>{setTimeout(s)};if(cn(t)){const t=e.end.bind(e);e.end=e=>{const n=e??T();let o=!1;const a=()=>{o||(o=!0,setTimeout(s),t(n),clearTimeout(i))};r=a;const i=setTimeout(a,hi)}}const s=ko("resource",({entries:t})=>{t.forEach(t=>{(function(e){return"resource"===e.entryType&&"initiatorType"in e&&"string"==typeof e.nextHopProtocol&&("fetch"===e.initiatorType||"xmlhttprequest"===e.initiatorType)}
1)(t)&&t.name.endsWith(n)&&(e.setAttributes(Vo(t)),r())})})}const vi=new WeakMap,_i=new WeakMap,yi=["text/event-stream","application/x-ndjson","application/stream+json"],bi=()=>({name:"FetchStreamPerformance",setup(){!function(e){const t="fetch-body-resolved",n=Pt(t,e);Rt(t,()=>as(is))}(e=>{if(e.response){const t=vi.get(e.response);if(t&&e.endTimestamp){t.end(e.endTimestamp);const n=_i.get(e.response);n&&clearTimeout(n)}}}),os(e=>{var t,n,r,s;if(e.endTimestamp&&e.response){const o=(null==(t=e.response.headers)?void 0:t.get("content-type"))||"";if((null==(n=e.response.headers)?void 0:n.get("content-length"))||!yi.some(e=>o.startsWith(e)))return;const a=(null==(r=e.fetchData)?void 0:r.url)||"",i=(null==(s=e.fetchData)?void 0:s.method)||"GET",c=Sr(a),u=hn({name:`${i} ${a.startsWith("data:")?wr(a):c?Tr(c):a}`,startTime:e.endTimestamp,attributes:{url:wr(a),"http.method":i,type:"fetch",[E]:"http.client.stream",[w]:"auto.http.browser.stream"}});vi.set(e.response,u);const l=setTimeout(()=>{u.isRecording()&&u.end()},9e4);_i.set(e.response,l)}})}}),Si="WebVitals",Ti=(e={})=>{const t=new Set(e.ignore??[]);return{name:Si,setup(n){const r=cn(n),{enableStandaloneClsSpans:s,enableStandaloneLcpSpans:o}=e._experiments??{},a=r||t.has("cls")?void 0:s||!1,i=r||t.has("lcp")?void 0:o||!1,c=ta({recordClsStandaloneSpans:a,recordLcpStandaloneSpans:i,client:n}),u=new WeakSet;n.on("afterStartPageLoadSpan",e=>{u.add(e)}),n.on("spanEnd",e=>{u.delete(e)&&(c(),ra(e,{recordClsOnPageloadSpan:!1===a,recordLcpOnPageloadSpan:!1===i,spanStreamingEnabled:r}))}),r?(t.has("lcp")||ma(n),t.has("cls")||ha(n),t.has("inp")||ga()):t.has("inp")||ua()},afterAllSetup(){t.has("inp")||pa()}}};const Ei="sentry_previous_trace",wi="sentry.previous_trace";function ki(e,{linkPreviousTrace:t,consistentTraceSampling:r}){const s="session-storage"===t;let o=s?function(){var e;try{const t=null==(e=ms.sessionStorage)?void 0:e.getItem(Ei);return JSON.parse(t)}catch{return}}():void 0;e.on("spanStart",e=>{if(a(e)!==e)return;const t=F().getPropagationContext();o=function(e,t,r){const s=m(t);function o(){var e,t;try{const n=Number((null==(e=s.data)?void 0:e[re])??(null==(t=r.dsc)?void 0:t.sample_rate));return Number.isNaN(n)?0:n}catch{return 0}}const a={spanContext:t.spanContext(),startTimestamp:s.start_timestamp,sampleRate:o(),sampleRand:r.sampleRand};if(!e)return a;const i=e.spanContext;if(i.traceId===s.trace_id)return e;Date.now()/1e3-e.startTimestamp<=3600&&(Ra&&n.log(`Adding previous_trace \`${JSON.stringify(i)}\` link to span \`${JSON.stringify({op:s.op,...t.spanContext()})}\``),t.addLink({context:i,attributes:{[yt]:"previous_trace"}}),t.setAttribute(wi,`${i.traceId}-${i.spanId}-${xi(i)?1:0}`));return a}(o,e,t),s&&function(e){try{ms.sessionStorage.setItem(Ei,JSON.stringify(e))}catch(t){Ra&&n.warn("Could not store previous trace in sessionStorage",t)}}(o)});let i=!0;r&&e.on("beforeSampling",e=>{if(!o)return;const t=F(),n=t.getPropagationContext();i&&n.parentSpanId?i=!1:(t.setPropagationContext({...n,dsc:{...n.dsc,sample_rate:String(o.sampleRate),sampled:String(xi(o.spanContext))},sampleRand:o.sampleRand}),e.parentSampled=xi(o.spanContext),e.parentSampleRate=o.sampleRate,e.spanAttributes={...e.spanAttributes,[_t]:o.sampleRate})})}function xi(e){return 1===e.traceFlags}const Ii=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function Ci(){const e=ms.navigator;return!!(null==e?void 0:e.userAgent)&&Ii.test(e.userAgent)}const $i={...kn,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...fi},Pi=(e={})=>{"enableElementTiming"in e&&Ce(()=>{});const t={name:void 0,source:void 0},r=ms.document,{enableInp:c,enableLongTask:u,enableLongAnimationFrame:l,_experiments:{enableInteractions:d,enableStandaloneClsSpans:p,enableStandaloneLcpSpans:h},beforeStartSpan:v,idleTimeout:_,finalTimeout:y,childSpanTimeout:E,markBackgroun
1dSpan:k,traceFetch:x,traceXHR:C,trackFetchStreamPerformance:$,shouldCreateSpanForRequest:P,enableHTTPTimings:R,ignoreResourceSpans:A,ignorePerformanceApiSpans:O,instrumentPageLoad:L,instrumentNavigation:D,detectRedirects:N,linkPreviousTrace:M,consistentTraceSampling:q,enableReportPageLoaded:H,onRequestSpanStart:B,onRequestSpanEnd:U}={...$i,...e},z=Ci();let W,G;function Q(e,n,s=!0,o){const a="pageload"===n.op,i=n.name,c=v?v(n):n,u=Sr(o||ps()),l={...(null==u?void 0:u.pathname)&&{[Rn]:u.pathname},...u&&!br(u)&&{[Pn]:u.href},...c.attributes};if(i!==c.name&&(l[I]="custom"),c.attributes=l,!s){const e=fe();return void hn({...c,startTime:e}).end(e)}t.name=c.name,t.source=l[I];const d=xn(c,{idleTimeout:_,finalTimeout:y,childSpanTimeout:E,disableAutoFinish:a,beforeSpanEnd:t=>{na(t,{ignoreResourceSpans:A,ignorePerformanceApiSpans:O,spanStreamingEnabled:cn(e)}),Mi(e,void 0);const n=F(),r=n.getPropagationContext();n.setPropagationContext({...r,traceId:d.spanContext().traceId,sampled:g(d),dsc:f(t)}),a&&(G=void 0)},trimIdleSpanEndTimestamp:!H});function p(){r&&["interactive","complete"].includes(r.readyState)&&(e.emit("idleSpanEnableAutoFinish",d),r.removeEventListener("readystatechange",p))}a&&H&&(G=d),Mi(e,d),a&&!H&&r&&(r.addEventListener("readystatechange",p),p())}return{name:"BrowserTracing",setup(e){var t;if(z)Ra&&n.log("[Tracing] Skipping browserTracingIntegration setup for bot user agent.");else{if(Ht(),l&&s.PerformanceObserver&&(null==(t=PerformanceObserver.supportedEntryTypes)?void 0:t.includes("long-animation-frame"))?new PerformanceObserver(e=>{const t=o();if(t)for(const n of e.getEntries()){if(!n.scripts[0])continue;const e=Bo(ct()+n.startTime),{start_timestamp:r,op:s}=m(t);if("navigation"===s&&r&&e<r)continue;const o=Bo(n.duration),a={[w]:"auto.ui.browser.metrics"},i=n.scripts[0],{invoker:c,invokerType:u,sourceURL:l,sourceFunctionName:d,sourceCharPosition:p}=i;a["browser.script.invoker"]=c,a["browser.script.invoker_type"]=u,l&&(a["code.filepath"]=l),d&&(a["code.function"]=d),-1!==p&&(a["browser.script.source_char_position"]=p),jo(t,e,e+o,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:a})}}).observe({type:"long-animation-frame",buffered:!0}):u&&ko("longtask",({entries:e})=>{const t=o();if(!t)return;const{op:n,start_timestamp:r}=m(t);for(const s of e){const e=Bo(ct()+s.startTime),o=Bo(s.duration);"navigation"===n&&r&&e<r||jo(t,e,e+o,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[w]:"auto.ui.browser.metrics"}})}}),d&&ko("event",({entries:e})=>{const t=o();if(t)for(const n of e)if("click"===n.name){const e=Bo(ct()+n.startTime),r=Bo(n.duration),s={name:No(n.target),op:`ui.interaction.${n.name}`,startTime:e,attributes:{[w]:"auto.ui.browser.metrics"}},o=fs(n.target);o&&(s.attributes["ui.component_name"]=o),jo(t,e,e+r,s)}}),N&&r){const e=()=>{W=T()};addEventListener("click",e,{capture:!0}),addEventListener("keydown",e,{capture:!0,passive:!0})}e.on("startNavigationSpan",(t,r)=>{if(j()!==e)return;if(null==r?void 0:r.isRedirect)return Ra&&n.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),void Q(e,{op:"navigation.redirect",...t},!1,r.url);W=void 0,a(),ee().setPropagationContext({traceId:b(),sampleRand:Math.random(),propagationSpanId:J()?void 0:S()});const s=F();s.setPropagationContext({traceId:b(),sampleRand:Math.random(),propagationSpanId:J()?void 0:S()}),s.setSDKProcessingMetadata({normalizedRequest:void 0}),Q(e,{op:"navigation",...t,parentSpan:null,forceTransaction:!0},!0,null==r?void 0:r.url)}),e.on("startPageLoadSpan",(t,n={})=>{if(j()!==e)return;a();const r=n.sentryTrace||Oi("sentry-trace")||Li("sentry-trace"),s=n.baggage||Oi("baggage")||Li("baggage"),o=bt(r,s),i=F();i.setPropagationContext(o),J()||(i.getPropagationContext().propagationSpanId=S()),i.setSDKProcessingMetadata({normalizedRequest:_s()}),Q(e,{op:"pageload",...t})}),e.on("endPageloadSpan",()=>{H&&G&&(G.setAttribute(ae,"reportPageLoaded"),G.end())})}function a(){const t=Ni(e);t&&!m(t).timestamp&&(Ra&&n.log(`[Tracing] Finishing current active span with op: ${m(t).op}`),t.setAttribute(ae,"cancelled"),t.end())}},afterAllSetup(e){var r;if(z)return;e.addIntegration&&!(null==(r=e.getIntegrationByName)?void 0:r.call(e,Si))&&e.addIntegration(Ti({ignore:c?[]:["inp"],_experiments:{enableStandaloneClsSpans:p,enableStandaloneLcpSpans:h}}));let s=ps();if("off"!==M&&ki(e,{linkPreviousTrace:M,consistentTraceSampling:q}),ms.location){if(L){const t=ct();Ri(e,{name:ms.location.pathname,startTime:t?t/1e3:void 0,attributes:{[I]:"url",[w]:"auto.pageload.browser"}})}D&&Ea(({to:t,from:n})=>{if(void 0===n&&-1!==(null==s?void 0:s.indexOf(t)))return void(s=void 0);s=void 0;const r=Sr(t),o=Ni(e),a=o&&N&&function(e,t){const n=m(e),r=fe(),s=n.start_timestamp;if(r-s>qi)return!1;if(t&&r-t<=qi)return!1;return!0}(o,W);Ai(e,{name:(null==r?void 0:r.pathname)||ms.location.pathname,attributes:{[I]:"url",[w]:"auto.navigation.browser"}},{url:t,isRedirect:a})})}k&&(ms.document?ms.document.addEventListener("visibilitychange",()=>{const e=o();if(!e)return;const t=a(e);if(ms.document.hidden&&t){const e="cancelled",{op:r,status:s}=m(t);Ra&&n.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${r}`),s||t.setStatus({code:i,message:e}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):Ra&&n.warn("[Tracing] Could not set up background tab detection due to lack of global document")),d&&function(e,t,r,s,o){const a=ms.document;let i;const c=()=>{const a="ui.action.click",c=Ni(e);if(c){const e=m(c).op;
1if(["navigation","pageload"].includes(e))return void(Ra&&n.warn(`[Tracing] Did not create ${a} span because a pageload or navigation span is in progress.`))}i&&(i.setAttribute(ae,"interactionInterrupted"),i.end(),i=void 0),o.name?i=xn({name:o.name,op:a,attributes:{[I]:o.source||"url"}},{idleTimeout:t,finalTimeout:r,childSpanTimeout:s}):Ra&&n.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`)};a&&addEventListener("click",c,{capture:!0})}(e,_,y,E,t),mi(e,{traceFetch:x,traceXHR:C,tracePropagationTargets:e.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:P,enableHTTPTimings:R,onRequestSpanStart:B,onRequestSpanEnd:U}),$&&e.addIntegration(bi())}}};function Ri(e,t,n){e.emit("startPageLoadSpan",t,n),F().setTransactionName(t.name);const r=Ni(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function Ai(e,t,n){const{url:r,isRedirect:s}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:s,url:r}),e.emit("startNavigationSpan",t,{isRedirect:s,url:r});const o=F();return o.setTransactionName(t.name),r&&!s&&o.setSDKProcessingMetadata({normalizedRequest:{..._s(),url:r}}),Ni(e)}function Oi(e){const t=ms.document,n=null==t?void 0:t.querySelector(`meta[name=${e}]`);return(null==n?void 0:n.getAttribute("content"))||void 0}function Li(e){var t,n,r;const s=null==(n=null==(t=ms.performance)?void 0:t.getEntriesByType)?void 0:n.call(t,"navigation")[0],o=null==(r=null==s?void 0:s.serverTiming)?void 0:r.find(t=>t.name===e);return null==o?void 0:o.description}const Di="_sentry_idleSpan";function Ni(e){return e[Di]}function Mi(e,t){Xe(e,Di,t)}const qi=1.5;function ji(t){const n={...t};xr(n,"react"),St("react",{version:e.version});const r=li(n);return vt(Hi),r}function Hi(e){return Ie(t=e)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t?"[SyntheticEvent]":ii(e);var t}export{As as BrowserClient,$e as SDK_VERSION,E as SEMANTIC_ATTRIBUTE_SENTRY_OP,w as SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,re as SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,I as SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,Tt as Scope,ms as WINDOW,$r as addBreadcrumb,Wa as breadcrumbsIntegration,Ja as browserApiErrorsIntegration,Ya as browserSessionIntegration,Pi as browserTracingIntegration,ht as captureEvent,et as captureException,Et as captureMessage,mt as captureSession,Ma as chromeStackLineParser,Yn as createTransport,Ka as cultureContextIntegration,Jr as dedupeIntegration,fi as defaultRequestInstrumentationOptions,Fa as defaultStackLineParsers,Ba as defaultStackParser,wt as endSession,Or as eventFiltersIntegration,Is as eventFromException,Cs as eventFromMessage,ys as exceptionFromError,bi as fetchStreamPerformanceIntegration,Rr as functionToStringIntegration,Ha as geckoStackLineParser,o as getActiveSpan,j as getClient,F as getCurrentScope,ui as getDefaultIntegrations,kt as getGlobalScope,ee as getIsolationScope,a as getRootSpan,B as getSpanDescendants,xt as getSpanStatusFromHttpCode,Ir as getTraceData,ei as globalHandlersIntegration,si as httpContextIntegration,Lr as inboundFiltersIntegration,ji as init,mi as instrumentOutgoingRequests,Ci as isBotUserAgent,Pe as isEnabled,oi as linkedErrorsIntegration,Pa as makeFetchTransport,ii as normalizeStringifyValue,Ht as registerSpanErrorInstrumentation,St as setContext,yr as setCurrentClient,Je as setHttpStatus,sn as setMeasurement,It as setUser,m as spanToJSON,Re as spanToTraceHeader,Ai as startBrowserTracingNavigationSpan,Ri as startBrowserTracingPageLoadSpan,hn as startInactiveSpan,ft as startSession,mn as startSpan,Ti as webVitalsIntegration,gn as withActiveSpan,V as withScope};

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.