import{g as pt}from"./index-BbP3371Q.js";const y=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,_=globalThis,M="10.29.0";function w(){return st(_),_}function st(t){const e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||M,e[M]=e[M]||{}}function j(t,e,n=_){const r=n.__SENTRY__=n.__SENTRY__||{},s=r[M]=r[M]||{};return s[t]||(s[t]=e())}const Vn=["debug","info","warn","error","log","assert","trace"],Qt="Sentry Logger ",dt={};function it(t){if(!("console"in _))return t();const e=_.console,n={},r=Object.keys(dt);r.forEach(s=>{const i=dt[s];n[s]=e[s],e[s]=i});try{return t()}finally{r.forEach(s=>{e[s]=n[s]})}}function te(){at().enabled=!0}function ee(){at().enabled=!1}function Dt(){return at().enabled}function ne(...t){ot("log",...t)}function re(...t){ot("warn",...t)}function se(...t){ot("error",...t)}function ot(t,...e){y&&Dt()&&it(()=>{_.console[t](`${Qt}[${t}]:`,...e)})}function at(){return y?j("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const m={enable:te,disable:ee,isEnabled:Dt,log:ne,warn:re,error:se},Mt=50,ie="?",lt=/\(error: (.*)\)/,_t=/captureMessage|captureException/;function oe(...t){const e=t.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,s=0)=>{const i=[],o=n.split(` `);for(let a=r;a1024&&(c=c.slice(0,1024));const u=lt.test(c)?c.replace(lt,"$1"):c;if(!u.match(/\S*Error: /)){for(const p of e){const f=p(u);if(f){i.push(f);break}}if(i.length>=Mt+s)break}}return ae(i.slice(s))}}function Yn(t){return Array.isArray(t)?oe(...t):t}function ae(t){if(!t.length)return[];const e=Array.from(t);return/sentryWrapped/.test(F(e).function||"")&&e.pop(),e.reverse(),_t.test(F(e).function||"")&&(e.pop(),_t.test(F(e).function||"")&&e.pop()),e.slice(0,Mt).map(n=>({...n,filename:n.filename||F(e).filename,function:n.function||ie}))}function F(t){return t[t.length-1]||{}}const W="";function ce(t){try{return!t||typeof t!="function"?W:t.name||W}catch{return W}}function zn(t){const e=t.exception;if(e){const n=[];try{return e.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}function kt(t){return"__v_isVNode"in t&&t.__v_isVNode?"[VueVNode]":"[VueViewModel]"}const Pt=Object.prototype.toString;function ue(t){switch(Pt.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return L(t,Error)}}function R(t,e){return Pt.call(t)===`[object ${e}]`}function Kn(t){return R(t,"ErrorEvent")}function Wn(t){return R(t,"DOMError")}function Xn(t){return R(t,"DOMException")}function U(t){return R(t,"String")}function fe(t){return typeof t=="object"&&t!==null&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function Jn(t){return t===null||fe(t)||typeof t!="object"&&typeof t!="function"}function wt(t){return R(t,"Object")}function pe(t){return typeof Event<"u"&&L(t,Event)}function de(t){return typeof Element<"u"&&L(t,Element)}function le(t){return R(t,"RegExp")}function v(t){return!!(t?.then&&typeof t.then=="function")}function _e(t){return wt(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function L(t,e){try{return t instanceof e}catch{return!1}}function Lt(t){return!!(typeof t=="object"&&t!==null&&(t.__isVue||t._isVue||t.__v_isVNode))}function qn(t){return typeof Request<"u"&&L(t,Request)}const ct=_,ge=80;function he(t,e={}){if(!t)return"";try{let n=t;const r=5,s=[];let i=0,o=0;const a=" > ",c=a.length;let u;const p=Array.isArray(e)?e:e.keyAttrs,f=!Array.isArray(e)&&e.maxStringLength||ge;for(;n&&i++1&&o+s.length*c+u.length>=f));)s.push(u),o+=u.length,n=n.parentNode;return s.reverse().join(a)}catch{return""}}function me(t,e){const n=t,r=[];if(!n?.tagName)return"";if(ct.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const s=e?.length?e.filter(o=>n.getAttribute(o)).map(o=>[o,n.getAttribute(o)]):null;if(s?.length)s.forEach(o=>{r.push(`[${o[0]}="${o[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const o=n.className;if(o&&U(o)){const a=o.split(/\s+/);for(const c of a)r.push(`.${c}`)}}const i=["aria-label","type","name","title","alt"];for(const o of i){const a=n.getAttribute(o);a&&r.push(`[${o}="${a}"]`)}return r.join("")}function Zn(){try{return ct.document.location.href}catch{return""}}function Qn(t){if(!ct.HTMLElement)return null;let e=t;const n=5;for(let r=0;r"}}function ht(t){if(typeof t=="object"&&t!==null){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}else return{}}function nr(t){const e=Object.keys(Ft(t));return e.sort(),e[0]?e.join(", "):"[object has no keys]"}function Z(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function rr(t,e){if(!Array.isArray(t))return"";const n=[];for(let r=0;rye(t,r,n))}function Ee(){const t=_;return t.crypto||t.msCrypto}let X;function be(){return Math.random()*16}function I(t=Ee()){try{if(t?.randomUUID)return t.randomUUID().replace(/-/g,"")}catch{}return X||(X="10000000100040008000"+1e11),X.replace(/[018]/g,e=>(e^(be()&15)>>e/4).toString(16))}function $t(t){return t.exception?.values?.[0]}function ir(t){const{message:e,event_id:n}=t;if(e)return e;const r=$t(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function or(t,e,n){const r=t.exception=t.exception||{},s=r.values=r.values||[],i=s[0]=s[0]||{};i.value||(i.value=e||""),i.type||(i.type="Error")}function Te(t,e){const n=$t(t);if(!n)return;const r={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism={...r,...s,...e},e&&"data"in e){const i={...s?.data,...e.data};n.mechanism.data=i}}function ar(t){if(Ie(t))return!0;try{A(t,"__sentry_captured__",!0)}catch{}return!1}function Ie(t){try{return t.__sentry_captured__}catch{}}const Ut=1e3;function ut(){return Date.now()/Ut}function Ae(){const{performance:t}=_;if(!t?.now||!t.timeOrigin)return ut;const e=t.timeOrigin;return()=>(e+t.now())/Ut}let mt;function ft(){return(mt??(mt=Ae()))()}let J;function Ne(){const{performance:t}=_;if(!t?.now)return[void 0,"none"];const e=3600*1e3,n=t.now(),r=Date.now(),s=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,i=sRe(n)};return t&&B(n,t),n}function B(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),!t.did&&!e.did&&(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||ft(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:I()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{const n=t.timestamp-t.started;t.duration=n>=0?n:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}function xe(t,e){let n={};t.status==="ok"&&(n={status:"exited"}),B(t,n)}function Re(t){return{sid:`${t.sid}`,init:t.init,started:new Date(t.started*1e3).toISOString(),timestamp:new Date(t.timestamp*1e3).toISOString(),status:t.status,errors:t.errors,did:typeof t.did=="number"||typeof t.did=="string"?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}}}function G(t,e,n=2){if(!e||typeof e!="object"||n<=0)return e;if(t&&Object.keys(e).length===0)return t;const r={...t};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=G(r[s],e[s],n-1));return r}function k(){return I()}function H(){return I().substring(16)}const Q="_sentrySpan";function St(t,e){e?A(t,Q,e):delete t[Q]}function tt(t){return t[Q]}const Oe=100;class E{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:k(),sampleRand:Math.random()}}clone(){const e=new E;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._attributes={...this._attributes},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,St(e,tt(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&B(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,n){return this.setTags({[e]:n})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,n){return this.setAttributes({[e]:n})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],this._notifyScopeListeners()),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,n){return this._extra={...this._extra,[e]:n},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,n){return n===null?delete this._contexts[e]:this._contexts[e]=n,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const n=typeof e=="function"?e(this):e,r=n instanceof E?n.getScopeData():wt(n)?e:void 0,{tags:s,attributes:i,extra:o,user:a,contexts:c,level:u,fingerprint:p=[],propagationContext:f}=r||{};return this._tags={...this._tags,...s},this._attributes={...this._attributes,...i},this._extra={...this._extra,...o},this._contexts={...this._contexts,...c},a&&Object.keys(a).length&&(this._user=a),u&&(this._level=u),p.length&&(this._fingerprint=p),f&&(this._propagationContext=f),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,St(this,void 0),this._attachments=[],this.setPropagationContext({traceId:k(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(e,n){const r=typeof n=="number"?n:Oe;if(r<=0)return this;const s={timestamp:ut(),...e,message:e.message?Z(e.message,2048):e.message};return this._breadcrumbs.push(s),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:tt(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=G(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,n){const r=n?.event_id||I();if(!this._client)return y&&m.warn("No client configured on scope - will not capture exception!"),r;const s=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:s,...n,event_id:r},this),r}captureMessage(e,n,r){const s=r?.event_id||I();if(!this._client)return y&&m.warn("No client configured on scope - will not capture message!"),s;const i=r?.syntheticException??new Error(e);return this._client.captureMessage(e,n,{originalException:e,syntheticException:i,...r,event_id:s},this),s}captureEvent(e,n){const r=n?.event_id||I();return this._client?(this._client.captureEvent(e,{...n,event_id:r},this),r):(y&&m.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}}function De(){return j("defaultCurrentScope",()=>new E)}function Me(){return j("defaultIsolationScope",()=>new E)}class ke{constructor(e,n){let r;e?r=e:r=new E;let s;n?s=n:s=new E,this._stack=[{scope:r}],this._isolationScope=s}withScope(e){const n=this._pushScope();let r;try{r=e(n)}catch(s){throw this._popScope(),s}return v(r)?r.then(s=>(this._popScope(),s),s=>{throw this._popScope(),s}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function x(){const t=w(),e=st(t);return e.stack=e.stack||new ke(De(),Me())}function Pe(t){return x().withScope(t)}function we(t,e){const n=x();return n.withScope(()=>(n.getStackTop().scope=t,e(t)))}function yt(t){return x().withScope(()=>t(x().getIsolationScope()))}function Le(){return{withIsolationScope:yt,withScope:Pe,withSetScope:we,withSetIsolationScope:(t,e)=>yt(e),getCurrentScope:()=>x().getScope(),getIsolationScope:()=>x().getIsolationScope()}}function V(t){const e=st(t);return e.acs?e.acs:Le()}function O(){const t=w();return V(t).getCurrentScope()}function D(){const t=w();return V(t).getIsolationScope()}function Fe(){return j("globalScope",()=>new E)}function ur(...t){const e=w(),n=V(e);if(t.length===2){const[r,s]=t;return r?n.withSetScope(r,s):n.withScope(s)}return n.withScope(t[0])}function Y(){return O().getClient()}function fr(t){const e=t.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:s}=e,i={trace_id:n,span_id:s||H()};return r&&(i.parent_span_id=r),i}const $e="sentry.source",Ue="sentry.sample_rate",je="sentry.previous_trace_sample_rate",ve="sentry.op",Be="sentry.origin",pr="sentry.idle_span_finish_reason",dr="sentry.measurement_unit",lr="sentry.measurement_value",_r="sentry.custom_span_name",gr="sentry.profile_id",hr="sentry.exclusive_time",mr="sentry.link.type",Ge=0,jt=1,h=2;function He(t){if(t<400&&t>=100)return{code:jt};if(t>=400&&t<500)switch(t){case 401:return{code:h,message:"unauthenticated"};case 403:return{code:h,message:"permission_denied"};case 404:return{code:h,message:"not_found"};case 409:return{code:h,message:"already_exists"};case 413:return{code:h,message:"failed_precondition"};case 429:return{code:h,message:"resource_exhausted"};case 499:return{code:h,message:"cancelled"};default:return{code:h,message:"invalid_argument"}}if(t>=500&&t<600)switch(t){case 501:return{code:h,message:"unimplemented"};case 503:return{code:h,message:"unavailable"};case 504:return{code:h,message:"deadline_exceeded"};default:return{code:h,message:"internal_error"}}return{code:h,message:"internal_error"}}function Sr(t,e){t.setAttribute("http.response.status_code",e);const n=He(e);n.message!=="unknown_error"&&t.setStatus(n)}const vt="_sentryScope",Bt="_sentryIsolationScope";function Ve(t){try{const e=_.WeakRef;if(typeof e=="function")return new e(t)}catch{}return t}function Ye(t){if(t){if(typeof t=="object"&&"deref"in t&&typeof t.deref=="function")try{return t.deref()}catch{return}return t}}function yr(t,e,n){t&&(A(t,Bt,Ve(n)),A(t,vt,e))}function Gt(t){const e=t;return{scope:e[vt],isolationScope:Ye(e[Bt])}}const Ht="sentry-",ze=/^sentry-/,Ke=8192;function Vt(t){const e=We(t);if(!e)return;const n=Object.entries(e).reduce((r,[s,i])=>{if(s.match(ze)){const o=s.slice(Ht.length);r[o]=i}return r},{});if(Object.keys(n).length>0)return n}function Er(t){if(!t)return;const e=Object.entries(t).reduce((n,[r,s])=>(s&&(n[`${Ht}${r}`]=s),n),{});return Xe(e)}function We(t){if(!(!t||!U(t)&&!Array.isArray(t)))return Array.isArray(t)?t.reduce((e,n)=>{const r=Et(n);return Object.entries(r).forEach(([s,i])=>{e[s]=i}),e},{}):Et(t)}function Et(t){return t.split(",").map(e=>{const n=e.indexOf("=");if(n===-1)return[];const r=e.slice(0,n),s=e.slice(n+1);return[r,s].map(i=>{try{return decodeURIComponent(i.trim())}catch{return}})}).reduce((e,[n,r])=>(n&&r&&(e[n]=r),e),{})}function Xe(t){if(Object.keys(t).length!==0)return Object.entries(t).reduce((e,[n,r],s)=>{const i=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,o=s===0?i:`${e},${i}`;return o.length>Ke?(y&&m.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),e):o},"")}const Je=/^o(\d+)\./,qe=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Ze(t){return t==="http"||t==="https"}function br(t,e=!1){const{host:n,path:r,pass:s,port:i,projectId:o,protocol:a,publicKey:c}=t;return`${a}://${c}${e&&s?`:${s}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${o}`}function Qe(t){const e=qe.exec(t);if(!e){it(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});return}const[n,r,s="",i="",o="",a=""]=e.slice(1);let c="",u=a;const p=u.split("/");if(p.length>1&&(c=p.slice(0,-1).join("/"),u=p.pop()),u){const f=u.match(/^\d+/);f&&(u=f[0])}return Yt({host:i,pass:s,path:c,projectId:u,port:o,protocol:n,publicKey:r})}function Yt(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function tn(t){if(!y)return!0;const{port:e,projectId:n,protocol:r}=t;return["protocol","publicKey","host","projectId"].find(o=>t[o]?!1:(m.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?Ze(r)?e&&isNaN(parseInt(e,10))?(m.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(m.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(m.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function en(t){return t.match(Je)?.[1]}function nn(t){const e=t.getOptions(),{host:n}=t.getDsn()||{};let r;return e.orgId?r=String(e.orgId):n&&(r=en(n)),r}function Tr(t){const e=typeof t=="string"?Qe(t):Yt(t);if(!(!e||!tn(e)))return e}function bt(t){if(typeof t=="boolean")return Number(t);const e=typeof t=="string"?parseFloat(t):t;if(!(typeof e!="number"||isNaN(e)||e<0||e>1))return e}const rn=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function sn(t){if(!t)return;const e=t.match(rn);if(!e)return;let n;return e[3]==="1"?n=!0:e[3]==="0"&&(n=!1),{traceId:e[1],parentSampled:n,parentSpanId:e[2]}}function Ir(t,e){const n=sn(t),r=Vt(e);if(!n?.traceId)return{traceId:k(),sampleRand:Math.random()};const s=cn(n,r);r&&(r.sample_rand=s.toString());const{traceId:i,parentSpanId:o,parentSampled:a}=n;return{traceId:i,parentSpanId:o,sampled:a,dsc:r||{},sampleRand:s}}function on(t=k(),e=H(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${t}-${e}${r}`}function an(t=k(),e=H(),n){return`00-${t}-${e}-${n?"01":"00"}`}function cn(t,e){const n=bt(e?.sample_rand);if(n!==void 0)return n;const r=bt(e?.sample_rate);return r&&t?.parentSampled!==void 0?t.parentSampled?Math.random()*r:r+Math.random()*(1-r):Math.random()}const Ar=0,zt=1;let Tt=!1;function Nr(t){const{spanId:e,traceId:n}=t.spanContext(),{data:r,op:s,parent_span_id:i,status:o,origin:a,links:c}=z(t);return{parent_span_id:i,span_id:e,trace_id:n,data:r,op:s,status:o,origin:a,links:c}}function un(t){const{spanId:e,traceId:n,isRemote:r}=t.spanContext(),s=r?e:z(t).parent_span_id,i=Gt(t).scope,o=r?i?.getPropagationContext().propagationSpanId||H():e;return{parent_span_id:s,span_id:o,trace_id:n}}function Cr(t){const{traceId:e,spanId:n}=t.spanContext(),r=K(t);return on(e,n,r)}function xr(t){const{traceId:e,spanId:n}=t.spanContext(),r=K(t);return an(e,n,r)}function fn(t){if(t&&t.length>0)return t.map(({context:{spanId:e,traceId:n,traceFlags:r,...s},attributes:i})=>({span_id:e,trace_id:n,sampled:r===zt,attributes:i,...s}))}function It(t){return typeof t=="number"?At(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?At(t.getTime()):ft()}function At(t){return t>9999999999?t/1e3:t}function z(t){if(dn(t))return t.getSpanJSON();const{spanId:e,traceId:n}=t.spanContext();if(pn(t)){const{attributes:r,startTime:s,name:i,endTime:o,status:a,links:c}=t,u="parentSpanId"in t?t.parentSpanId:"parentSpanContext"in t?t.parentSpanContext?.spanId:void 0;return{span_id:e,trace_id:n,data:r,description:i,parent_span_id:u,start_timestamp:It(s),timestamp:It(o)||void 0,status:ln(a),op:r[ve],origin:r[Be],links:fn(c)}}return{span_id:e,trace_id:n,start_timestamp:0,data:{}}}function pn(t){const e=t;return!!e.attributes&&!!e.startTime&&!!e.name&&!!e.endTime&&!!e.status}function dn(t){return typeof t.getSpanJSON=="function"}function K(t){const{traceFlags:e}=t.spanContext();return e===zt}function ln(t){if(!(!t||t.code===Ge))return t.code===jt?"ok":t.message||"internal_error"}const C="_sentryChildSpans",et="_sentryRootSpan";function Rr(t,e){const n=t[et]||t;A(e,et,n),t[C]?t[C].add(e):A(t,C,new Set([e]))}function Or(t,e){t[C]&&t[C].delete(e)}function Dr(t){const e=new Set;function n(r){if(!e.has(r)&&K(r)){e.add(r);const s=r[C]?Array.from(r[C]):[];for(const i of s)n(i)}}return n(t),Array.from(e)}function Kt(t){return t[et]||t}function Mr(){const t=w(),e=V(t);return e.getActiveSpan?e.getActiveSpan():tt(O())}function kr(){Tt||(it(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),Tt=!0)}function _n(t){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const e=t||Y()?.getOptions();return!!e&&(e.tracesSampleRate!=null||!!e.tracesSampler)}const Wt="production",Xt="_frozenDsc";function Pr(t,e){A(t,Xt,e)}function Jt(t,e){const n=e.getOptions(),{publicKey:r}=e.getDsn()||{},s={environment:n.environment||Wt,release:n.release,public_key:r,trace_id:t,org_id:nn(e)};return e.emit("createDsc",s),s}function wr(t,e){const n=e.getPropagationContext();return n.dsc||Jt(n.traceId,t)}function gn(t){const e=Y();if(!e)return{};const n=Kt(t),r=z(n),s=r.data,i=n.spanContext().traceState,o=i?.get("sentry.sample_rate")??s[Ue]??s[je];function a(g){return(typeof o=="number"||typeof o=="string")&&(g.sample_rate=`${o}`),g}const c=n[Xt];if(c)return a(c);const u=i?.get("sentry.dsc"),p=u&&Vt(u);if(p)return a(p);const f=Jt(t.spanContext().traceId,e),d=s[$e],l=r.description;return d!=="url"&&l&&(f.transaction=l),_n()&&(f.sampled=String(K(n)),f.sample_rand=i?.get("sentry.sample_rand")??Gt(n).scope?.getPropagationContext().sampleRand.toString()),a(f),e.emit("createDsc",f,n),f}function T(t,e=100,n=1/0){try{return nt("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function hn(t,e=3,n=100*1024){const r=T(t,e);return En(r)>n?hn(t,e-1,n):r}function nt(t,e,n=1/0,r=1/0,s=bn()){const[i,o]=s;if(e==null||["boolean","string"].includes(typeof e)||typeof e=="number"&&Number.isFinite(e))return e;const a=mn(t,e);if(!a.startsWith("[object "))return a;if(e.__sentry_skip_normalization__)return e;const c=typeof e.__sentry_override_normalization_depth__=="number"?e.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(i(e))return"[Circular ~]";const u=e;if(u&&typeof u.toJSON=="function")try{const l=u.toJSON();return nt("",l,c-1,r,s)}catch{}const p=Array.isArray(e)?[]:{};let f=0;const d=Ft(e);for(const l in d){if(!Object.prototype.hasOwnProperty.call(d,l))continue;if(f>=r){p[l]="[MaxProperties ~]";break}const g=d[l];p[l]=nt(l,g,c-1,r,s),f++}return o(e),p}function mn(t,e){try{if(t==="domain"&&e&&typeof e=="object"&&e._events)return"[Domain]";if(t==="domainEmitter")return"[DomainEmitter]";if(typeof pt<"u"&&e===pt)return"[Global]";if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(Lt(e))return kt(e);if(_e(e))return"[SyntheticEvent]";if(typeof e=="number"&&!Number.isFinite(e))return`[${e}]`;if(typeof e=="function")return`[Function: ${ce(e)}]`;if(typeof e=="symbol")return`[${String(e)}]`;if(typeof e=="bigint")return`[BigInt: ${String(e)}]`;const n=Sn(e);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function Sn(t){const e=Object.getPrototypeOf(t);return e?.constructor?e.constructor.name:"null prototype"}function yn(t){return~-encodeURI(t).split(/%..|./).length}function En(t){return yn(JSON.stringify(t))}function bn(){const t=new WeakSet;function e(r){return t.has(r)?!0:(t.add(r),!1)}function n(r){t.delete(r)}return[e,n]}const q=0,Nt=1,Ct=2;function Tn(t){return new P(e=>{e(t)})}function In(t){return new P((e,n)=>{n(t)})}class P{constructor(e){this._state=q,this._handlers=[],this._runExecutor(e)}then(e,n){return new P((r,s)=>{this._handlers.push([!1,i=>{if(!e)r(i);else try{r(e(i))}catch(o){s(o)}},i=>{if(!n)s(i);else try{r(n(i))}catch(o){s(o)}}]),this._executeHandlers()})}catch(e){return this.then(n=>n,e)}finally(e){return new P((n,r)=>{let s,i;return this.then(o=>{i=!1,s=o,e&&e()},o=>{i=!0,s=o,e&&e()}).then(()=>{if(i){r(s);return}n(s)})})}_executeHandlers(){if(this._state===q)return;const e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===Nt&&n[1](this._value),this._state===Ct&&n[2](this._value),n[0]=!0)})}_runExecutor(e){const n=(i,o)=>{if(this._state===q){if(v(o)){o.then(r,s);return}this._state=i,this._value=o,this._executeHandlers()}},r=i=>{n(Nt,i)},s=i=>{n(Ct,i)};try{e(r,s)}catch(i){s(i)}}}function An(t,e,n,r=0){try{const s=rt(e,n,t,r);return v(s)?s:Tn(s)}catch(s){return In(s)}}function rt(t,e,n,r){const s=n[r];if(!t||!s)return t;const i=s({...t},e);return y&&i===null&&m.log(`Event processor "${s.id||"?"}" dropped event`),v(i)?i.then(o=>rt(o,e,n,r+1)):rt(i,e,n,r+1)}function Nn(t,e){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:i}=e;Cn(t,e),r&&On(t,r),Dn(t,n),xn(t,s),Rn(t,i)}function xt(t,e){const{extra:n,tags:r,user:s,contexts:i,level:o,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:p,attachments:f,propagationContext:d,transactionName:l,span:g}=e;$(t,"extra",n),$(t,"tags",r),$(t,"user",s),$(t,"contexts",i),t.sdkProcessingMetadata=G(t.sdkProcessingMetadata,a,2),o&&(t.level=o),l&&(t.transactionName=l),g&&(t.span=g),c.length&&(t.breadcrumbs=[...t.breadcrumbs,...c]),u.length&&(t.fingerprint=[...t.fingerprint,...u]),p.length&&(t.eventProcessors=[...t.eventProcessors,...p]),f.length&&(t.attachments=[...t.attachments,...f]),t.propagationContext={...t.propagationContext,...d}}function $(t,e,n){t[e]=G(t[e],n,1)}function Cn(t,e){const{extra:n,tags:r,user:s,contexts:i,level:o,transactionName:a}=e;Object.keys(n).length&&(t.extra={...n,...t.extra}),Object.keys(r).length&&(t.tags={...r,...t.tags}),Object.keys(s).length&&(t.user={...s,...t.user}),Object.keys(i).length&&(t.contexts={...i,...t.contexts}),o&&(t.level=o),a&&t.type!=="transaction"&&(t.transaction=a)}function xn(t,e){const n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}function Rn(t,e){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...e}}function On(t,e){t.contexts={trace:un(e),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:gn(e),...t.sdkProcessingMetadata};const n=Kt(e),r=z(n).description;r&&!t.transaction&&t.type==="transaction"&&(t.transaction=r)}function Dn(t,e){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],e&&(t.fingerprint=t.fingerprint.concat(e)),t.fingerprint.length||delete t.fingerprint}let N,Rt,Ot,b;function Mn(t){const e=_._sentryDebugIds,n=_._debugIds;if(!e&&!n)return{};const r=e?Object.keys(e):[],s=n?Object.keys(n):[];if(b&&r.length===Rt&&s.length===Ot)return b;Rt=r.length,Ot=s.length,b={},N||(N={});const i=(o,a)=>{for(const c of o){const u=a[c],p=N?.[c];if(p&&b&&u)b[p[0]]=u,N&&(N[c]=[p[0],u]);else if(u){const f=t(c);for(let d=f.length-1;d>=0;d--){const g=f[d]?.filename;if(g&&b&&N){b[g]=u,N[c]=[g,u];break}}}}};return e&&i(r,e),n&&i(s,n),b}function Lr(t,e,n,r,s,i){const{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=t,c={...e,event_id:e.event_id||n.event_id||I(),timestamp:e.timestamp||ut()},u=n.integrations||t.integrations.map(S=>S.name);kn(c,t),Ln(c,u),s&&s.emit("applyFrameMetadata",e),e.type===void 0&&Pn(c,t.stackParser);const p=$n(r,n.captureContext);n.mechanism&&Te(c,n.mechanism);const f=s?s.getEventProcessors():[],d=Fe().getScopeData();if(i){const S=i.getScopeData();xt(d,S)}if(p){const S=p.getScopeData();xt(d,S)}const l=[...n.attachments||[],...d.attachments];l.length&&(n.attachments=l),Nn(c,d);const g=[...f,...d.eventProcessors];return An(g,c,n).then(S=>(S&&wn(S),typeof o=="number"&&o>0?Fn(S,o,a):S))}function kn(t,e){const{environment:n,release:r,dist:s,maxValueLength:i}=e;t.environment=t.environment||n||Wt,!t.release&&r&&(t.release=r),!t.dist&&s&&(t.dist=s);const o=t.request;o?.url&&i&&(o.url=Z(o.url,i)),i&&t.exception?.values?.forEach(a=>{a.value&&(a.value=Z(a.value,i))})}function Pn(t,e){const n=Mn(e);t.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(s=>{s.filename&&(s.debug_id=n[s.filename])})})}function wn(t){const e={};if(t.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(s=>{s.debug_id&&(s.abs_path?e[s.abs_path]=s.debug_id:s.filename&&(e[s.filename]=s.debug_id),delete s.debug_id)})}),Object.keys(e).length===0)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const n=t.debug_meta.images;Object.entries(e).forEach(([r,s])=>{n.push({type:"sourcemap",code_file:r,debug_id:s})})}function Ln(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function Fn(t,e,n){if(!t)return null;const r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(s=>({...s,...s.data&&{data:T(s.data,e,n)}}))},...t.user&&{user:T(t.user,e,n)},...t.contexts&&{contexts:T(t.contexts,e,n)},...t.extra&&{extra:T(t.extra,e,n)}};return t.contexts?.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=T(t.contexts.trace.data,e,n))),t.spans&&(r.spans=t.spans.map(s=>({...s,...s.data&&{data:T(s.data,e,n)}}))),t.contexts?.flags&&r.contexts&&(r.contexts.flags=T(t.contexts.flags,3,n)),r}function $n(t,e){if(!e)return t;const n=t?t.clone():new E;return n.update(e),n}function Un(t){if(t)return jn(t)?{captureContext:t}:Bn(t)?{captureContext:t}:t}function jn(t){return t instanceof E||typeof t=="function"}const vn=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Bn(t){return Object.keys(t).some(e=>vn.includes(e))}function Fr(t,e){return O().captureException(t,Un(e))}function $r(t,e){return O().captureEvent(t,e)}function Ur(t,e){D().setContext(t,e)}function jr(t,e){D().setTag(t,e)}function vr(){const t=Y();return t?.getOptions().enabled!==!1&&!!t?.getTransport()}function Br(t){D().addEventProcessor(t)}function Gr(t){const e=D(),n=O(),{userAgent:r}=_.navigator||{},s=Ce({user:n.getUser()||e.getUser(),...r&&{userAgent:r},...t}),i=e.getSession();return i?.status==="ok"&&B(i,{status:"exited"}),qt(),e.setSession(s),s}function qt(){const t=D(),n=O().getSession()||t.getSession();n&&xe(n),Zt(),t.setSession()}function Zt(){const t=D(),e=Y(),n=t.getSession();n&&e&&e.captureSession(n)}function Hr(t=!1){if(t){qt();return}Zt()}export{j as $,gr as A,Y as B,Gt as C,y as D,O as E,Dr as F,_ as G,_r as H,Nr as I,v as J,_n as K,bt as L,ur as M,w as N,V as O,Pr as P,D as Q,Rr as R,h as S,Ar as T,yr as U,Ue as V,St as W,pr as X,jt as Y,Or as Z,tt as _,Mr as a,jr as a$,Tn as a0,In as a1,ut as a2,Tr as a3,I as a4,ar as a5,B as a6,Wt as a7,Lr as a8,fr as a9,A as aA,Zn as aB,Se as aC,or as aD,Te as aE,Kn as aF,Wn as aG,Xn as aH,pe as aI,hn as aJ,nr as aK,cr as aL,he as aM,Qn as aN,U as aO,oe as aP,ie as aQ,rr as aR,Gr as aS,Hr as aT,$r as aU,Yn as aV,Br as aW,Ur as aX,je as aY,mr as aZ,Ir as a_,wr as aa,fe as ab,Jn as ac,G as ad,wt as ae,it as af,M as ag,vr as ah,Cr as ai,Er as aj,rn as ak,xr as al,on as am,an,er as ao,ir as ap,sr as aq,L as ar,Vn as as,tr as at,dt as au,zn as av,Sr as aw,qn as ax,Ht as ay,ue as az,Kt as b,Fr as c,m as d,k as e,H as f,ce as g,br as h,ye as i,st as j,gn as k,kr as l,K as m,T as n,dr as o,lr as p,ve as q,Be as r,z as s,ft as t,zt as u,It as v,$e as w,fn as x,ln as y,hr as z};