@prefabs.tech/vue3-config 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,28 @@
1
+ (function(V,$t){typeof exports=="object"&&typeof module<"u"?$t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],$t):(V=typeof globalThis<"u"?globalThis:V||self,$t(V.PrefabsTechVue3Config={},V.Vue))})(this,function(V,$t){"use strict";const mo=(t,e)=>{if(typeof t>"u")return e;if(typeof t=="boolean")return t;switch(typeof e){case"boolean":return!!JSON.parse(t);case"number":return JSON.parse(t);default:return t}},g=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,b=globalThis,ct=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,_t="9.1.0";function St(){return he(b),b}function he(t){const e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||_t,e[_t]=e[_t]||{}}function ge(t,e,n=b){const r=n.__SENTRY__=n.__SENTRY__||{},s=r[_t]=r[_t]||{};return s[t]||(s[t]=e())}const ho="Sentry Logger ",Je=["debug","info","warn","error","log","assert","trace"],_e={};function ut(t){if(!("console"in b))return t();const e=b.console,n={},r=Object.keys(_e);r.forEach(s=>{const o=_e[s];n[s]=e[s],e[s]=o});try{return t()}finally{r.forEach(s=>{e[s]=n[s]})}}function go(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return ct?Je.forEach(n=>{e[n]=(...r)=>{t&&ut(()=>{b.console[n](`${ho}[${n}]:`,...r)})}}):Je.forEach(n=>{e[n]=()=>{}}),e}const m=ge("logger",go),Jn=50,yt="?",Zn=/\(error: (.*)\)/,Qn=/captureMessage|captureException/;function tr(...t){const e=t.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,s=0)=>{const o=[],i=n.split(`
2
+ `);for(let a=r;a<i.length;a++){const c=i[a];if(c.length>1024)continue;const u=Zn.test(c)?c.replace(Zn,"$1"):c;if(!u.match(/\S*Error: /)){for(const f of e){const d=f(u);if(d){o.push(d);break}}if(o.length>=Jn+s)break}}return So(o.slice(s))}}function _o(t){return Array.isArray(t)?tr(...t):t}function So(t){if(!t.length)return[];const e=Array.from(t);return/sentryWrapped/.test(Se(e).function||"")&&e.pop(),e.reverse(),Qn.test(Se(e).function||"")&&(e.pop(),Qn.test(Se(e).function||"")&&e.pop()),e.slice(0,Jn).map(n=>({...n,filename:n.filename||Se(e).filename,function:n.function||yt}))}function Se(t){return t[t.length-1]||{}}const Ze="<anonymous>";function J(t){try{return!t||typeof t!="function"?Ze:t.name||Ze}catch{return Ze}}function er(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}}}const ye={},nr={};function dt(t,e){ye[t]=ye[t]||[],ye[t].push(e)}function ft(t,e){if(!nr[t]){nr[t]=!0;try{e()}catch(n){ct&&m.error(`Error while instrumenting ${t}`,n)}}}function B(t,e){const n=t&&ye[t];if(n)for(const r of n)try{r(e)}catch(s){ct&&m.error(`Error while triggering instrumentation handler.
3
+ Type: ${t}
4
+ Name: ${J(r)}
5
+ Error:`,s)}}let Qe=null;function rr(t){const e="error";dt(e,t),ft(e,yo)}function yo(){Qe=b.onerror,b.onerror=function(t,e,n,r,s){return B("error",{column:r,error:s,line:n,msg:t,url:e}),Qe?Qe.apply(this,arguments):!1},b.onerror.__SENTRY_INSTRUMENTED__=!0}let tn=null;function sr(t){const e="unhandledrejection";dt(e,t),ft(e,Eo)}function Eo(){tn=b.onunhandledrejection,b.onunhandledrejection=function(t){return B("unhandledrejection",t),tn?tn.apply(this,arguments):!0},b.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const or=Object.prototype.toString;function en(t){switch(or.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Q(t,Error)}}function Lt(t,e){return or.call(t)===`[object ${e}]`}function ir(t){return Lt(t,"ErrorEvent")}function ar(t){return Lt(t,"DOMError")}function bo(t){return Lt(t,"DOMException")}function Z(t){return Lt(t,"String")}function nn(t){return typeof t=="object"&&t!==null&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function rn(t){return t===null||nn(t)||typeof t!="object"&&typeof t!="function"}function Mt(t){return Lt(t,"Object")}function Ee(t){return typeof Event<"u"&&Q(t,Event)}function To(t){return typeof Element<"u"&&Q(t,Element)}function Io(t){return Lt(t,"RegExp")}function be(t){return!!(t?.then&&typeof t.then=="function")}function vo(t){return Mt(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function Q(t,e){try{return t instanceof e}catch{return!1}}function cr(t){return!!(typeof t=="object"&&t!==null&&(t.__isVue||t._isVue))}const sn=b,Ro=80;function Et(t,e={}){if(!t)return"<unknown>";try{let n=t;const r=5,s=[];let o=0,i=0;const a=" > ",c=a.length;let u;const f=Array.isArray(e)?e:e.keyAttrs,d=!Array.isArray(e)&&e.maxStringLength||Ro;for(;n&&o++<r&&(u=wo(n,f),!(u==="html"||o>1&&i+s.length*c+u.length>=d));)s.push(u),i+=u.length,n=n.parentNode;return s.reverse().join(a)}catch{return"<unknown>"}}function wo(t,e){const n=t,r=[];if(!n?.tagName)return"";if(sn.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(i=>n.getAttribute(i)).map(i=>[i,n.getAttribute(i)]):null;if(s?.length)s.forEach(i=>{r.push(`[${i[0]}="${i[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const i=n.className;if(i&&Z(i)){const a=i.split(/\s+/);for(const c of a)r.push(`.${c}`)}}const o=["aria-label","type","name","title","alt"];for(const i of o){const a=n.getAttribute(i);a&&r.push(`[${i}="${a}"]`)}return r.join("")}function Jt(){try{return sn.document.location.href}catch{return""}}function ur(t){if(!sn.HTMLElement)return null;let e=t;const n=5;for(let r=0;r<n;r++){if(!e)return null;if(e instanceof HTMLElement){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}e=e.parentNode}return null}function Ft(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function dr(t,e){if(!Array.isArray(t))return"";const n=[];for(let r=0;r<t.length;r++){const s=t[r];try{cr(s)?n.push("[VueViewModel]"):n.push(String(s))}catch{n.push("[value cannot be serialized]")}}return n.join(e)}function No(t,e,n=!1){return Z(t)?Io(e)?e.test(t):Z(e)?n?t===e:t.includes(e):!1:!1}function bt(t,e=[],n=!1){return e.some(r=>No(t,r,n))}function H(t,e,n){if(!(e in t))return;const r=t[e],s=n(r);typeof s=="function"&&fr(s,r);try{t[e]=s}catch{ct&&m.log(`Failed to replace method "${e}" in object`,t)}}function U(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch{ct&&m.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function fr(t,e){try{const n=e.prototype||{};t.prototype=e.prototype=n,U(t,"__sentry_original__",e)}catch{}}function on(t){return t.__sentry_original__}function lr(t){if(en(t))return{message:t.message,name:t.name,stack:t.stack,...mr(t)};if(Ee(t)){const e={type:t.type,target:pr(t.target),currentTarget:pr(t.currentTarget),...mr(t)};return typeof CustomEvent<"u"&&Q(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function pr(t){try{return To(t)?Et(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}}function mr(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 ko(t,e=40){const n=Object.keys(lr(t));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=e)return Ft(r,e);for(let s=n.length;s>0;s--){const o=n.slice(0,s).join(", ");if(!(o.length>e))return s===n.length?o:Ft(o,e)}return""}function O(t){return an(t,new Map)}function an(t,e){if(Ao(t)){const n=e.get(t);if(n!==void 0)return n;const r={};e.set(t,r);for(const s of Object.getOwnPropertyNames(t))typeof t[s]<"u"&&(r[s]=an(t[s],e));return r}if(Array.isArray(t)){const n=e.get(t);if(n!==void 0)return n;const r=[];return e.set(t,r),t.forEach(s=>{r.push(an(s,e))}),r}return t}function Ao(t){if(!Mt(t))return!1;try{const e=Object.getPrototypeOf(t).constructor.name;return!e||e==="Object"}catch{return!0}}const hr=1e3;function Zt(){return Date.now()/hr}function Co(){const{performance:t}=b;if(!t?.now)return Zt;const e=Date.now()-t.now(),n=t.timeOrigin==null?e:t.timeOrigin;return()=>(n+t.now())/hr}const D=Co();let cn;function Oo(){const{performance:t}=b;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,o=s<e,i=t.timing?.navigationStart,c=typeof i=="number"?Math.abs(i+n-r):e,u=c<e;return o||u?s<=c?[t.timeOrigin,"timeOrigin"]:[i,"navigationStart"]:[r,"dateNow"]}function j(){return cn||(cn=Oo()),cn[0]}function q(){const t=b,e=t.crypto||t.msCrypto;let n=()=>Math.random()*16;try{if(e?.randomUUID)return e.randomUUID().replace(/-/g,"");e?.getRandomValues&&(n=()=>{const r=new Uint8Array(1);return e.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function gr(t){return t.exception?.values?.[0]}function lt(t){const{message:e,event_id:n}=t;if(e)return e;const r=gr(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function un(t,e,n){const r=t.exception=t.exception||{},s=r.values=r.values||[],o=s[0]=s[0]||{};o.value||(o.value=e||""),o.type||(o.type="Error")}function Ht(t,e){const n=gr(t);if(!n)return;const r={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism={...r,...s,...e},e&&"data"in e){const o={...s?.data,...e.data};n.mechanism.data=o}}function _r(t){if(Po(t))return!0;try{U(t,"__sentry_captured__",!0)}catch{}return!1}function Po(t){try{return t.__sentry_captured__}catch{}}var tt;(function(t){t[t.PENDING=0]="PENDING";const n=1;t[t.RESOLVED=n]="RESOLVED";const r=2;t[t.REJECTED=r]="REJECTED"})(tt||(tt={}));function Tt(t){return new pt(e=>{e(t)})}function Te(t){return new pt((e,n)=>{n(t)})}class pt{constructor(e){this._state=tt.PENDING,this._handlers=[],this._runExecutor(e)}then(e,n){return new pt((r,s)=>{this._handlers.push([!1,o=>{if(!e)r(o);else try{r(e(o))}catch(i){s(i)}},o=>{if(!n)s(o);else try{r(n(o))}catch(i){s(i)}}]),this._executeHandlers()})}catch(e){return this.then(n=>n,e)}finally(e){return new pt((n,r)=>{let s,o;return this.then(i=>{o=!1,s=i,e&&e()},i=>{o=!0,s=i,e&&e()}).then(()=>{if(o){r(s);return}n(s)})})}_executeHandlers(){if(this._state===tt.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===tt.RESOLVED&&n[1](this._value),this._state===tt.REJECTED&&n[2](this._value),n[0]=!0)})}_runExecutor(e){const n=(o,i)=>{if(this._state===tt.PENDING){if(be(i)){i.then(r,s);return}this._state=o,this._value=i,this._executeHandlers()}},r=o=>{n(tt.RESOLVED,o)},s=o=>{n(tt.REJECTED,o)};try{e(r,s)}catch(o){s(o)}}}function xo(t){const e=D(),n={sid:q(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>$o(n)};return t&&Ut(n,t),n}function Ut(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||D(),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:q()),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 Do(t,e){let n={};t.status==="ok"&&(n={status:"exited"}),Ut(t,n)}function $o(t){return O({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 mt(){return q()}function Qt(){return q().substring(16)}function te(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]=te(r[s],e[s],n-1));return r}const dn="_sentrySpan";function ee(t,e){e?U(t,dn,e):delete t[dn]}function Ie(t){return t[dn]}const Lo=100;class z{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:mt(),sampleRand:Math.random()}}clone(){const e=new z;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},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,ee(e,Ie(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&&Ut(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._tags={...this._tags,[e]:n},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 z?n.getScopeData():Mt(n)?e:void 0,{tags:s,extra:o,user:i,contexts:a,level:c,fingerprint:u=[],propagationContext:f}=r||{};return this._tags={...this._tags,...s},this._extra={...this._extra,...o},this._contexts={...this._contexts,...a},i&&Object.keys(i).length&&(this._user=i),c&&(this._level=c),u.length&&(this._fingerprint=u),f&&(this._propagationContext=f),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,ee(this,void 0),this._attachments=[],this.setPropagationContext({traceId:mt(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(e,n){const r=typeof n=="number"?n:Lo;if(r<=0)return this;const s={timestamp:Zt(),...e};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,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:Ie(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=te(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,n){const r=n?.event_id||q();if(!this._client)return 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||q();if(!this._client)return m.warn("No client configured on scope - will not capture message!"),s;const o=new Error(e);return this._client.captureMessage(e,n,{originalException:e,syntheticException:o,...r,event_id:s},this),s}captureEvent(e,n){const r=n?.event_id||q();return this._client?(this._client.captureEvent(e,{...n,event_id:r},this),r):(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 Mo(){return ge("defaultCurrentScope",()=>new z)}function Fo(){return ge("defaultIsolationScope",()=>new z)}class Ho{constructor(e,n){let r;e?r=e:r=new z;let s;n?s=n:s=new z,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 be(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 Bt(){const t=St(),e=he(t);return e.stack=e.stack||new Ho(Mo(),Fo())}function Uo(t){return Bt().withScope(t)}function Bo(t,e){const n=Bt();return n.withScope(()=>(n.getStackTop().scope=t,e(t)))}function Sr(t){return Bt().withScope(()=>t(Bt().getIsolationScope()))}function jo(){return{withIsolationScope:Sr,withScope:Uo,withSetScope:Bo,withSetIsolationScope:(t,e)=>Sr(e),getCurrentScope:()=>Bt().getScope(),getIsolationScope:()=>Bt().getIsolationScope()}}function jt(t){const e=he(t);return e.acs?e.acs:jo()}function v(){const t=St();return jt(t).getCurrentScope()}function It(){const t=St();return jt(t).getIsolationScope()}function qo(){return ge("globalScope",()=>new z)}function fn(...t){const e=St(),n=jt(e);if(t.length===2){const[r,s]=t;return r?n.withSetScope(r,s):n.withScope(s)}return n.withScope(t[0])}function T(){return v().getClient()}function Go(t){const e=t.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:s}=e;return O({trace_id:n,span_id:s||Qt(),parent_span_id:r})}const G="sentry.source",yr="sentry.sample_rate",vt="sentry.op",R="sentry.origin",ln="sentry.idle_span_finish_reason",ve="sentry.measurement_unit",Re="sentry.measurement_value",Er="sentry.custom_span_name",pn="sentry.profile_id",ne="sentry.exclusive_time",Wo=0,br=1,P=2;function Vo(t){if(t<400&&t>=100)return{code:br};if(t>=400&&t<500)switch(t){case 401:return{code:P,message:"unauthenticated"};case 403:return{code:P,message:"permission_denied"};case 404:return{code:P,message:"not_found"};case 409:return{code:P,message:"already_exists"};case 413:return{code:P,message:"failed_precondition"};case 429:return{code:P,message:"resource_exhausted"};case 499:return{code:P,message:"cancelled"};default:return{code:P,message:"invalid_argument"}}if(t>=500&&t<600)switch(t){case 501:return{code:P,message:"unimplemented"};case 503:return{code:P,message:"unavailable"};case 504:return{code:P,message:"deadline_exceeded"};default:return{code:P,message:"internal_error"}}return{code:P,message:"unknown_error"}}function Tr(t,e){t.setAttribute("http.response.status_code",e);const n=Vo(e);n.message!=="unknown_error"&&t.setStatus(n)}const Ir="_sentryScope",vr="_sentryIsolationScope";function Yo(t,e,n){t&&(U(t,vr,n),U(t,Ir,e))}function we(t){return{scope:t[Ir],isolationScope:t[vr]}}function re(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 mn="sentry-",zo=/^sentry-/,Xo=8192;function Rr(t){const e=Jo(t);if(!e)return;const n=Object.entries(e).reduce((r,[s,o])=>{if(s.match(zo)){const i=s.slice(mn.length);r[i]=o}return r},{});if(Object.keys(n).length>0)return n}function Ko(t){if(!t)return;const e=Object.entries(t).reduce((n,[r,s])=>(s&&(n[`${mn}${r}`]=s),n),{});return Zo(e)}function Jo(t){if(!(!t||!Z(t)&&!Array.isArray(t)))return Array.isArray(t)?t.reduce((e,n)=>{const r=wr(n);return Object.entries(r).forEach(([s,o])=>{e[s]=o}),e},{}):wr(t)}function wr(t){return t.split(",").map(e=>e.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((e,[n,r])=>(n&&r&&(e[n]=r),e),{})}function Zo(t){if(Object.keys(t).length!==0)return Object.entries(t).reduce((e,[n,r],s)=>{const o=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,i=s===0?o:`${e},${o}`;return i.length>Xo?(ct&&m.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),e):i},"")}const Nr=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Qo(t){if(!t)return;const e=t.match(Nr);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 ti(t,e){const n=Qo(t),r=Rr(e);if(!n?.traceId)return{traceId:mt(),sampleRand:Math.random()};const s=ei(n,r);r&&(r.sample_rand=s.toString());const{traceId:o,parentSpanId:i,parentSampled:a}=n;return{traceId:o,parentSpanId:i,sampled:a,dsc:r||{},sampleRand:s}}function kr(t=mt(),e=Qt(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${t}-${e}${r}`}function ei(t,e){const n=re(e?.sample_rand);if(n!==void 0)return n;const r=re(e?.sample_rate);return r&&t?.parentSampled!==void 0?t.parentSampled?Math.random()*r:r+Math.random()*(1-r):Math.random()}const Ar=0,Cr=1;let Or=!1;function ni(t){const{spanId:e,traceId:n}=t.spanContext(),{data:r,op:s,parent_span_id:o,status:i,origin:a}=I(t);return O({parent_span_id:o,span_id:e,trace_id:n,data:r,op:s,status:i,origin:a})}function ri(t){const{spanId:e,traceId:n,isRemote:r}=t.spanContext(),s=r?e:I(t).parent_span_id,o=we(t).scope,i=r?o?.getPropagationContext().propagationSpanId||Qt():e;return O({parent_span_id:s,span_id:i,trace_id:n})}function si(t){const{traceId:e,spanId:n}=t.spanContext(),r=wt(t);return kr(e,n,r)}function Rt(t){return typeof t=="number"?Pr(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?Pr(t.getTime()):D()}function Pr(t){return t>9999999999?t/1e3:t}function I(t){if(ii(t))return t.getSpanJSON();const{spanId:e,traceId:n}=t.spanContext();if(oi(t)){const{attributes:r,startTime:s,name:o,endTime:i,parentSpanId:a,status:c}=t;return O({span_id:e,trace_id:n,data:r,description:o,parent_span_id:a,start_timestamp:Rt(s),timestamp:Rt(i)||void 0,status:xr(c),op:r[vt],origin:r[R]})}return{span_id:e,trace_id:n,start_timestamp:0,data:{}}}function oi(t){const e=t;return!!e.attributes&&!!e.startTime&&!!e.name&&!!e.endTime&&!!e.status}function ii(t){return typeof t.getSpanJSON=="function"}function wt(t){const{traceFlags:e}=t.spanContext();return e===Cr}function xr(t){if(!(!t||t.code===Wo))return t.code===br?"ok":t.message||"unknown_error"}const Nt="_sentryChildSpans",hn="_sentryRootSpan";function Dr(t,e){const n=t[hn]||t;U(e,hn,n),t[Nt]?t[Nt].add(e):U(t,Nt,new Set([e]))}function ai(t,e){t[Nt]&&t[Nt].delete(e)}function Ne(t){const e=new Set;function n(r){if(!e.has(r)&&wt(r)){e.add(r);const s=r[Nt]?Array.from(r[Nt]):[];for(const o of s)n(o)}}return n(t),Array.from(e)}function $(t){return t[hn]||t}function L(){const t=St(),e=jt(t);return e.getActiveSpan?e.getActiveSpan():Ie(v())}function gn(){Or||(ut(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),Or=!0)}let $r=!1;function ci(){$r||($r=!0,rr(_n),sr(_n))}function _n(){const t=L(),e=t&&$(t);if(e){const n="internal_error";g&&m.log(`[Tracing] Root span: ${n} -> Global error occurred`),e.setStatus({code:P,message:n})}}_n.tag="sentry_tracingErrorCallback";function et(t){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const e=t||T()?.getOptions();return!!e&&(e.tracesSampleRate!=null||!!e.tracesSampler)}const Sn="production",Lr="_frozenDsc";function ke(t,e){U(t,Lr,e)}function Mr(t,e){const n=e.getOptions(),{publicKey:r}=e.getDsn()||{},s=O({environment:n.environment||Sn,release:n.release,public_key:r,trace_id:t});return e.emit("createDsc",s),s}function Fr(t,e){const n=e.getPropagationContext();return n.dsc||Mr(n.traceId,t)}function ht(t){const e=T();if(!e)return{};const n=$(t),r=I(n),s=r.data,o=n.spanContext().traceState,i=o?.get("sentry.sample_rate")??s[yr];function a(S){return(typeof i=="number"||typeof i=="string")&&(S.sample_rate=`${i}`),S}const c=n[Lr];if(c)return a(c);const u=o?.get("sentry.dsc"),f=u&&Rr(u);if(f)return a(f);const d=Mr(t.spanContext().traceId,e),l=s[G],p=r.description;return l!=="url"&&p&&(d.transaction=p),et()&&(d.sampled=String(wt(n)),d.sample_rand=o?.get("sentry.sample_rand")??we(n).scope?.getPropagationContext().sampleRand.toString()),a(d),e.emit("createDsc",d,n),d}class kt{constructor(e={}){this._traceId=e.traceId||mt(),this._spanId=e.spanId||Qt()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:Ar}}end(e){}setAttribute(e,n){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,n,r){return this}addLink(e){return this}addLinks(e){return this}recordException(e,n){}}function ui(t){if(!g)return;const{description:e="< unknown name >",op:n="< unknown op >",parent_span_id:r}=I(t),{spanId:s}=t.spanContext(),o=wt(t),i=$(t),a=i===t,c=`[Tracing] Starting ${o?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${e}`,`ID: ${s}`];if(r&&u.push(`parent ID: ${r}`),!a){const{op:f,description:d}=I(i);u.push(`root ID: ${i.spanContext().spanId}`),f&&u.push(`root op: ${f}`),d&&u.push(`root description: ${d}`)}m.log(`${c}
6
+ ${u.join(`
7
+ `)}`)}function di(t){if(!g)return;const{description:e="< unknown name >",op:n="< unknown op >"}=I(t),{spanId:r}=t.spanContext(),o=$(t)===t,i=`[Tracing] Finishing "${n}" ${o?"root ":""}span "${e}" with ID ${r}`;m.log(i)}function fi(t,e,n){if(!et(t))return[!1];let r,s;typeof t.tracesSampler=="function"?(s=t.tracesSampler({...e,inheritOrSampleWith:a=>typeof e.parentSampleRate=="number"?e.parentSampleRate:typeof e.parentSampled=="boolean"?Number(e.parentSampled):a}),r=!0):e.parentSampled!==void 0?s=e.parentSampled:typeof t.tracesSampleRate<"u"&&(s=t.tracesSampleRate,r=!0);const o=re(s);if(o===void 0)return g&&m.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(s)} of type ${JSON.stringify(typeof s)}.`),[!1];if(!o)return g&&m.log(`[Tracing] Discarding transaction because ${typeof t.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,o,r];const i=n<o;return i||g&&m.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(s)})`),[i,o,r]}const li=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function pi(t){return t==="http"||t==="https"}function Ae(t,e=!1){const{host:n,path:r,pass:s,port:o,projectId:i,protocol:a,publicKey:c}=t;return`${a}://${c}${e&&s?`:${s}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${i}`}function mi(t){const e=li.exec(t);if(!e){ut(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});return}const[n,r,s="",o="",i="",a=""]=e.slice(1);let c="",u=a;const f=u.split("/");if(f.length>1&&(c=f.slice(0,-1).join("/"),u=f.pop()),u){const d=u.match(/^\d+/);d&&(u=d[0])}return Hr({host:o,pass:s,path:c,projectId:u,port:i,protocol:n,publicKey:r})}function Hr(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function hi(t){if(!ct)return!0;const{port:e,projectId:n,protocol:r}=t;return["protocol","publicKey","host","projectId"].find(i=>t[i]?!1:(m.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?pi(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 gi(t){const e=typeof t=="string"?mi(t):Hr(t);if(!(!e||!hi(e)))return e}function nt(t,e=100,n=1/0){try{return yn("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Ur(t,e=3,n=100*1024){const r=nt(t,e);return Ei(r)>n?Ur(t,e-1,n):r}function yn(t,e,n=1/0,r=1/0,s=bi()){const[o,i]=s;if(e==null||["boolean","string"].includes(typeof e)||typeof e=="number"&&Number.isFinite(e))return e;const a=_i(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(o(e))return"[Circular ~]";const u=e;if(u&&typeof u.toJSON=="function")try{const p=u.toJSON();return yn("",p,c-1,r,s)}catch{}const f=Array.isArray(e)?[]:{};let d=0;const l=lr(e);for(const p in l){if(!Object.prototype.hasOwnProperty.call(l,p))continue;if(d>=r){f[p]="[MaxProperties ~]";break}const S=l[p];f[p]=yn(p,S,c-1,r,s),d++}return i(e),f}function _i(t,e){try{if(t==="domain"&&e&&typeof e=="object"&&e._events)return"[Domain]";if(t==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&e===global)return"[Global]";if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(cr(e))return"[VueViewModel]";if(vo(e))return"[SyntheticEvent]";if(typeof e=="number"&&!Number.isFinite(e))return`[${e}]`;if(typeof e=="function")return`[Function: ${J(e)}]`;if(typeof e=="symbol")return`[${String(e)}]`;if(typeof e=="bigint")return`[BigInt: ${String(e)}]`;const n=Si(e);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function Si(t){const e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}function yi(t){return~-encodeURI(t).split(/%..|./).length}function Ei(t){return yi(JSON.stringify(t))}function bi(){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]}function se(t,e=[]){return[t,e]}function Ti(t,e){const[n,r]=t;return[n,[...r,e]]}function Br(t,e){const n=t[1];for(const r of n){const s=r[0].type;if(e(r,s))return!0}return!1}function En(t){const e=he(b);return e.encodePolyfill?e.encodePolyfill(t):new TextEncoder().encode(t)}function Ii(t){const[e,n]=t;let r=JSON.stringify(e);function s(o){typeof r=="string"?r=typeof o=="string"?r+o:[En(r),o]:r.push(typeof o=="string"?En(o):o)}for(const o of n){const[i,a]=o;if(s(`
8
+ ${JSON.stringify(i)}
9
+ `),typeof a=="string"||a instanceof Uint8Array)s(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(nt(a))}s(c)}}return typeof r=="string"?r:vi(r)}function vi(t){const e=t.reduce((s,o)=>s+o.length,0),n=new Uint8Array(e);let r=0;for(const s of t)n.set(s,r),r+=s.length;return n}function Ri(t){return[{type:"span"},t]}function wi(t){const e=typeof t.data=="string"?En(t.data):t.data;return[O({type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),e]}const Ni={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security"};function jr(t){return Ni[t]}function qr(t){if(!t?.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function ki(t,e,n,r){const s=t.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:t.event_id,sent_at:new Date().toISOString(),...e&&{sdk:e},...!!n&&r&&{dsn:Ae(r)},...s&&{trace:O({...s})}}}function Ai(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]]),t}function Ci(t,e,n,r){const s=qr(n),o={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&e&&{dsn:Ae(e)}},i="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return se(o,[i])}function Oi(t,e,n,r){const s=qr(n),o=t.type&&t.type!=="replay_event"?t.type:"event";Ai(t,n?.sdk);const i=ki(t,s,r,e);return delete t.sdkProcessingMetadata,se(i,[[{type:o},t]])}function Pi(t,e){function n(f){return!!f.trace_id&&!!f.public_key}const r=ht(t[0]),s=e?.getDsn(),o=e?.getOptions().tunnel,i={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!o&&s&&{dsn:Ae(s)}},a=e?.getOptions().beforeSendSpan,c=a?f=>{const d=I(f),l=a(d);return l||(gn(),d)}:I,u=[];for(const f of t){const d=c(f);d&&u.push(Ri(d))}return se(i,u)}function xi(t,e,n,r=L()){const s=r&&$(r);s&&(g&&m.log(`[Measurement] Setting measurement on root span: ${t} = ${e} ${n}`),s.addEvent(t,{[Re]:e,[ve]:n}))}function Gr(t){if(!t||t.length===0)return;const e={};return t.forEach(n=>{const r=n.attributes||{},s=r[ve],o=r[Re];typeof s=="string"&&typeof o=="number"&&(e[n.name]={value:o,unit:s})}),e}const Wr=1e3;class bn{constructor(e={}){this._traceId=e.traceId||mt(),this._spanId=e.spanId||Qt(),this._startTime=e.startTimestamp||D(),this._attributes={},this.setAttributes({[R]:"manual",[vt]: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}addLinks(e){return this}recordException(e,n){}spanContext(){const{_spanId:e,_traceId:n,_sampled:r}=this;return{spanId:e,traceId:n,traceFlags:r?Cr:Ar}}setAttribute(e,n){return n===void 0?delete this._attributes[e]:this._attributes[e]=n,this}setAttributes(e){return Object.keys(e).forEach(n=>this.setAttribute(n,e[n])),this}updateStartTime(e){this._startTime=Rt(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this.setAttribute(G,"custom"),this}end(e){this._endTime||(this._endTime=Rt(e),di(this),this._onSpanEnded())}getSpanJSON(){return O({data:this._attributes,description:this._name,op:this._attributes[vt],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:xr(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[R],profile_id:this._attributes[pn],exclusive_time:this._attributes[ne],measurements:Gr(this._events),is_segment:this._isStandaloneSpan&&$(this)===this||void 0,segment_id:this._isStandaloneSpan?$(this).spanContext().spanId:void 0})}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,n,r){g&&m.log("[Tracing] Adding an event to span:",e);const s=Vr(n)?n:r||D(),o=Vr(n)?{}:n||{},i={name:e,time:Rt(s),attributes:o};return this._events.push(i),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const e=T();if(e&&e.emit("spanEnd",this),!(this._isStandaloneSpan||this===$(this)))return;if(this._isStandaloneSpan){this._sampled?$i(Pi([this],e)):(g&&m.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),e&&e.recordDroppedEvent("sample_rate","span"));return}const r=this._convertSpanToTransaction();r&&(we(this).scope||v()).captureEvent(r)}_convertSpanToTransaction(){if(!Yr(I(this)))return;this._name||(g&&m.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:e,isolationScope:n}=we(this);if(this._sampled!==!0)return;const s=Ne(this).filter(u=>u!==this&&!Di(u)).map(u=>I(u)).filter(Yr),o=this._attributes[G];delete this._attributes[Er],s.forEach(u=>{delete u.data[Er]});const i={contexts:{trace:ni(this)},spans:s.length>Wr?s.sort((u,f)=>u.start_timestamp-f.start_timestamp).slice(0,Wr):s,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:n,...O({dynamicSamplingContext:ht(this)})},...o&&{transaction_info:{source:o}}},a=Gr(this._events);return a&&Object.keys(a).length&&(g&&m.log("[Measurements] Adding measurements to transaction event",JSON.stringify(a,void 0,2)),i.measurements=a),i}}function Vr(t){return t&&typeof t=="number"||t instanceof Date||Array.isArray(t)}function Yr(t){return!!t.start_timestamp&&!!t.timestamp&&!!t.span_id&&!!t.trace_id}function Di(t){return t instanceof bn&&t.isStandaloneSpan()}function $i(t){const e=T();if(!e)return;const n=t[1];if(!n||n.length===0){e.recordDroppedEvent("before_send","span");return}e.sendEnvelope(t)}const zr="__SENTRY_SUPPRESS_TRACING__";function At(t){const e=Kr();if(e.startInactiveSpan)return e.startInactiveSpan(t);const n=Mi(t),{forceTransaction:r,parentSpan:s}=t;return(t.scope?i=>fn(t.scope,i):s!==void 0?i=>Xr(s,i):i=>i())(()=>{const i=v(),a=Hi(i);return t.onlyIfParent&&!a?new kt:Li({parentSpan:a,spanArguments:n,forceTransaction:r,scope:i})})}function Xr(t,e){const n=Kr();return n.withActiveSpan?n.withActiveSpan(t,e):fn(r=>(ee(r,t||void 0),e(r)))}function Li({parentSpan:t,spanArguments:e,forceTransaction:n,scope:r}){if(!et()){const i=new kt;if(n||!t){const a={sampled:"false",sample_rate:"0",transaction:e.name,...ht(i)};ke(i,a)}return i}const s=It();let o;if(t&&!n)o=Fi(t,r,e),Dr(t,o);else if(t){const i=ht(t),{traceId:a,spanId:c}=t.spanContext(),u=wt(t);o=Jr({traceId:a,parentSpanId:c,...e},r,u),ke(o,i)}else{const{traceId:i,dsc:a,parentSpanId:c,sampled:u}={...s.getPropagationContext(),...r.getPropagationContext()};o=Jr({traceId:i,parentSpanId:c,...e},r,u),a&&ke(o,a)}return ui(o),Yo(o,r,s),o}function Mi(t){const n={isStandalone:(t.experimental||{}).standalone,...t};if(t.startTime){const r={...n};return r.startTimestamp=Rt(t.startTime),delete r.startTime,r}return n}function Kr(){const t=St();return jt(t)}function Jr(t,e,n){const r=T(),s=r?.getOptions()||{},{name:o="",attributes:i}=t,a=e.getPropagationContext(),[c,u,f]=e.getScopeData().sdkProcessingMetadata[zr]?[!1]:fi(s,{name:o,parentSampled:n,attributes:i,parentSampleRate:re(a.dsc?.sample_rate)},a.sampleRand),d=new bn({...t,attributes:{[G]:"custom",[yr]:u!==void 0&&f?u:void 0,...t.attributes},sampled:c});return!c&&r&&(g&&m.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate","transaction")),r&&r.emit("spanStart",d),d}function Fi(t,e,n){const{spanId:r,traceId:s}=t.spanContext(),o=e.getScopeData().sdkProcessingMetadata[zr]?!1:wt(t),i=o?new bn({...n,parentSpanId:r,traceId:s,sampled:o}):new kt({traceId:s});Dr(t,i);const a=T();return a&&(a.emit("spanStart",i),n.endTimestamp&&a.emit("spanEnd",i)),i}function Hi(t){const e=Ie(t);if(!e)return;const n=T();return(n?n.getOptions():{}).parentSpanIsAlwaysRootSpan?$(e):e}const Ce={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},Ui="heartbeatFailed",Bi="idleTimeout",ji="finalTimeout",qi="externalFinish";function Zr(t,e={}){const n=new Map;let r=!1,s,o=qi,i=!e.disableAutoFinish;const a=[],{idleTimeout:c=Ce.idleTimeout,finalTimeout:u=Ce.finalTimeout,childSpanTimeout:f=Ce.childSpanTimeout,beforeSpanEnd:d}=e,l=T();if(!l||!et()){const h=new kt,w={sample_rate:"0",sampled:"false",...ht(h)};return ke(h,w),h}const p=v(),S=L(),y=Gi(t);y.end=new Proxy(y.end,{apply(h,w,it){if(d&&d(y),w instanceof kt)return;const[N,...F]=it,W=N||D(),C=Rt(W),at=Ne(y).filter(gt=>gt!==y);if(!at.length)return me(C),Reflect.apply(h,w,[C,...F]);const Dt=at.map(gt=>I(gt).timestamp).filter(gt=>!!gt),Xt=Dt.length?Math.max(...Dt):void 0,Kt=I(y).start_timestamp,Ke=Math.min(Kt?Kt+u/1e3:1/0,Math.max(Kt||-1/0,Math.min(C,Xt||1/0)));return me(Ke),Reflect.apply(h,w,[Ke,...F])}});function A(){s&&(clearTimeout(s),s=void 0)}function ot(h){A(),s=setTimeout(()=>{!r&&n.size===0&&i&&(o=Bi,y.end(h))},c)}function xt(h){s=setTimeout(()=>{!r&&i&&(o=Ui,y.end(h))},f)}function Kn(h){A(),n.set(h,!0);const w=D();xt(w+f/1e3)}function pe(h){if(n.has(h)&&n.delete(h),n.size===0){const w=D();ot(w+c/1e3)}}function me(h){r=!0,n.clear(),a.forEach(C=>C()),ee(p,S);const w=I(y),{start_timestamp:it}=w;if(!it)return;w.data[ln]||y.setAttribute(ln,o),m.log(`[Tracing] Idle span "${w.op}" finished`);const F=Ne(y).filter(C=>C!==y);let W=0;F.forEach(C=>{C.isRecording()&&(C.setStatus({code:P,message:"cancelled"}),C.end(h),g&&m.log("[Tracing] Cancelling span since span ended early",JSON.stringify(C,void 0,2)));const at=I(C),{timestamp:Dt=0,start_timestamp:Xt=0}=at,Kt=Xt<=h,Ke=(u+c)/1e3,gt=Dt-Xt<=Ke;if(g){const po=JSON.stringify(C,void 0,2);Kt?gt||m.log("[Tracing] Discarding span since it finished after idle span final timeout",po):m.log("[Tracing] Discarding span since it happened after idle span was finished",po)}(!gt||!Kt)&&(ai(y,C),W++)}),W>0&&y.setAttribute("sentry.idle_span_discarded_spans",W)}return a.push(l.on("spanStart",h=>{if(r||h===y||I(h).timestamp)return;Ne(y).includes(h)&&Kn(h.spanContext().spanId)})),a.push(l.on("spanEnd",h=>{r||pe(h.spanContext().spanId)})),a.push(l.on("idleSpanEnableAutoFinish",h=>{h===y&&(i=!0,ot(),n.size&&xt())})),e.disableAutoFinish||ot(),setTimeout(()=>{r||(y.setStatus({code:P,message:"deadline_exceeded"}),o=ji,y.end())},u),y}function Gi(t){const e=At(t);return ee(v(),e),g&&m.log("[Tracing] Started span is an idle span"),e}function Tn(t,e,n,r=0){return new pt((s,o)=>{const i=t[r];if(e===null||typeof i!="function")s(e);else{const a=i({...e},n);g&&i.id&&a===null&&m.log(`Event processor "${i.id}" dropped event`),be(a)?a.then(c=>Tn(t,c,n,r+1).then(s)).then(null,o):Tn(t,a,n,r+1).then(s).then(null,o)}})}let Oe,Qr,Pe;function Wi(t){const e=b._sentryDebugIds;if(!e)return{};const n=Object.keys(e);return Pe&&n.length===Qr||(Qr=n.length,Pe=n.reduce((r,s)=>{Oe||(Oe={});const o=Oe[s];if(o)r[o[0]]=o[1];else{const i=t(s);for(let a=i.length-1;a>=0;a--){const u=i[a]?.filename,f=e[s];if(u&&f){r[u]=f,Oe[s]=[u,f];break}}}return r},{})),Pe}function Vi(t,e){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:o}=e;Yi(t,e),r&&Ki(t,r),Ji(t,n),zi(t,s),Xi(t,o)}function ts(t,e){const{extra:n,tags:r,user:s,contexts:o,level:i,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:f,attachments:d,propagationContext:l,transactionName:p,span:S}=e;xe(t,"extra",n),xe(t,"tags",r),xe(t,"user",s),xe(t,"contexts",o),t.sdkProcessingMetadata=te(t.sdkProcessingMetadata,a,2),i&&(t.level=i),p&&(t.transactionName=p),S&&(t.span=S),c.length&&(t.breadcrumbs=[...t.breadcrumbs,...c]),u.length&&(t.fingerprint=[...t.fingerprint,...u]),f.length&&(t.eventProcessors=[...t.eventProcessors,...f]),d.length&&(t.attachments=[...t.attachments,...d]),t.propagationContext={...t.propagationContext,...l}}function xe(t,e,n){t[e]=te(t[e],n,1)}function Yi(t,e){const{extra:n,tags:r,user:s,contexts:o,level:i,transactionName:a}=e,c=O(n);Object.keys(c).length&&(t.extra={...c,...t.extra});const u=O(r);Object.keys(u).length&&(t.tags={...u,...t.tags});const f=O(s);Object.keys(f).length&&(t.user={...f,...t.user});const d=O(o);Object.keys(d).length&&(t.contexts={...d,...t.contexts}),i&&(t.level=i),a&&t.type!=="transaction"&&(t.transaction=a)}function zi(t,e){const n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}function Xi(t,e){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...e}}function Ki(t,e){t.contexts={trace:ri(e),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:ht(e),...t.sdkProcessingMetadata};const n=$(e),r=I(n).description;r&&!t.transaction&&t.type==="transaction"&&(t.transaction=r)}function Ji(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}function Zi(t,e,n,r,s,o){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=t,c={...e,event_id:e.event_id||n.event_id||q(),timestamp:e.timestamp||Zt()},u=n.integrations||t.integrations.map(A=>A.name);Qi(c,t),na(c,u),s&&s.emit("applyFrameMetadata",e),e.type===void 0&&ta(c,t.stackParser);const f=sa(r,n.captureContext);n.mechanism&&Ht(c,n.mechanism);const d=s?s.getEventProcessors():[],l=qo().getScopeData();if(o){const A=o.getScopeData();ts(l,A)}if(f){const A=f.getScopeData();ts(l,A)}const p=[...n.attachments||[],...l.attachments];p.length&&(n.attachments=p),Vi(c,l);const S=[...d,...l.eventProcessors];return Tn(S,c,n).then(A=>(A&&ea(A),typeof i=="number"&&i>0?ra(A,i,a):A))}function Qi(t,e){const{environment:n,release:r,dist:s,maxValueLength:o=250}=e;t.environment=t.environment||n||Sn,!t.release&&r&&(t.release=r),!t.dist&&s&&(t.dist=s),t.message&&(t.message=Ft(t.message,o));const i=t.exception?.values?.[0];i?.value&&(i.value=Ft(i.value,o));const a=t.request;a?.url&&(a.url=Ft(a.url,o))}function ta(t,e){const n=Wi(e);t.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(s=>{s.filename&&(s.debug_id=n[s.filename])})})}function ea(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 na(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function ra(t,e,n){if(!t)return null;const r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(s=>({...s,...s.data&&{data:nt(s.data,e,n)}}))},...t.user&&{user:nt(t.user,e,n)},...t.contexts&&{contexts:nt(t.contexts,e,n)},...t.extra&&{extra:nt(t.extra,e,n)}};return t.contexts?.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=nt(t.contexts.trace.data,e,n))),t.spans&&(r.spans=t.spans.map(s=>({...s,...s.data&&{data:nt(s.data,e,n)}}))),t.contexts?.flags&&r.contexts&&(r.contexts.flags=nt(t.contexts.flags,3,n)),r}function sa(t,e){if(!e)return t;const n=t?t.clone():new z;return n.update(e),n}function oa(t){if(t)return ia(t)?{captureContext:t}:ca(t)?{captureContext:t}:t}function ia(t){return t instanceof z||typeof t=="function"}const aa=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function ca(t){return Object.keys(t).some(e=>aa.includes(e))}function In(t,e){return v().captureException(t,oa(e))}function es(t,e){return v().captureEvent(t,e)}function ua(){const t=T();return t?.getOptions().enabled!==!1&&!!t?.getTransport()}function ns(t){const e=It(),n=v(),{userAgent:r}=b.navigator||{},s=xo({user:n.getUser()||e.getUser(),...r&&{userAgent:r},...t}),o=e.getSession();return o?.status==="ok"&&Ut(o,{status:"exited"}),rs(),e.setSession(s),s}function rs(){const t=It(),n=v().getSession()||t.getSession();n&&Do(n),ss(),t.setSession()}function ss(){const t=It(),e=T(),n=t.getSession();n&&e&&e.captureSession(n)}function os(t=!1){if(t){rs();return}ss()}const da="7";function fa(t){const e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function la(t){return`${fa(t)}${t.projectId}/envelope/`}function pa(t,e){const n={sentry_version:da};return t.publicKey&&(n.sentry_key=t.publicKey),e&&(n.sentry_client=`${e.name}/${e.version}`),new URLSearchParams(n).toString()}function ma(t,e,n){return e||`${la(t)}?${pa(t,n)}`}const is=[];function ha(t){const e={};return t.forEach(n=>{const{name:r}=n,s=e[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(e[r]=n)}),Object.values(e)}function ga(t){const e=t.defaultIntegrations||[],n=t.integrations;e.forEach(s=>{s.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...e,...n];else if(typeof n=="function"){const s=n(e);r=Array.isArray(s)?s:[s]}else r=e;return ha(r)}function _a(t,e){const n={};return e.forEach(r=>{r&&cs(t,r,n)}),n}function as(t,e){for(const n of e)n?.afterAllSetup&&n.afterAllSetup(t)}function cs(t,e,n){if(n[e.name]){g&&m.log(`Integration skipped because it was already installed: ${e.name}`);return}if(n[e.name]=e,is.indexOf(e.name)===-1&&typeof e.setupOnce=="function"&&(e.setupOnce(),is.push(e.name)),e.setup&&typeof e.setup=="function"&&e.setup(t),typeof e.preprocessEvent=="function"){const r=e.preprocessEvent.bind(e);t.on("preprocessEvent",(s,o)=>r(s,o,t))}if(typeof e.processEvent=="function"){const r=e.processEvent.bind(e),s=Object.assign((o,i)=>r(o,i,t),{id:e.name});t.addEventProcessor(s)}g&&m.log(`Integration installed: ${e.name}`)}function Ef(t){return t}function Sa(t,e,n){const r=[{type:"client_report"},{timestamp:Zt(),discarded_events:t}];return se(e?{dsn:e}:{},[r])}class Y extends Error{constructor(e,n="warn"){super(e),this.message=e,this.logLevel=n}}function us(t){const e=[];t.message&&e.push(t.message);try{const n=t.exception.values[t.exception.values.length-1];n?.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`))}catch{}return e}function ya(t){const{trace_id:e,parent_span_id:n,span_id:r,status:s,origin:o,data:i,op:a}=t.contexts?.trace??{};return O({data:i??{},description:t.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:t.start_timestamp??0,status:s,timestamp:t.timestamp,trace_id:e??"",origin:o,profile_id:i?.[pn],exclusive_time:i?.[ne],measurements:t.measurements,is_segment:!0})}function Ea(t){const e={type:"transaction",timestamp:t.timestamp,start_timestamp:t.start_timestamp,transaction:t.description,contexts:{trace:{trace_id:t.trace_id,span_id:t.span_id,parent_span_id:t.parent_span_id,op:t.op,status:t.status,origin:t.origin,data:{...t.data,...t.profile_id&&{[pn]:t.profile_id},...t.exclusive_time&&{[ne]:t.exclusive_time}}}},measurements:t.measurements};return O(e)}const ds="Not capturing exception because it's already been captured.",fs="Discarded session because of missing or non-string release";class ba{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=gi(e.dsn):g&&m.warn("No DSN provided, client will not send events."),this._dsn){const n=ma(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:n})}}captureException(e,n,r){const s=q();if(_r(e))return g&&m.log(ds),s;const o={event_id:s,...n};return this._process(this.eventFromException(e,o).then(i=>this._captureEvent(i,o,r))),o.event_id}captureMessage(e,n,r,s){const o={event_id:q(),...r},i=nn(e)?e:String(e),a=rn(e)?this.eventFromMessage(i,n,o):this.eventFromException(e,o);return this._process(a.then(c=>this._captureEvent(c,o,s))),o.event_id}captureEvent(e,n,r){const s=q();if(n?.originalException&&_r(n.originalException))return g&&m.log(ds),s;const o={event_id:s,...n},i=e.sdkProcessingMetadata||{},a=i.capturedSpanScope,c=i.capturedSpanIsolationScope;return this._process(this._captureEvent(e,o,a||r,c)),o.event_id}captureSession(e){this.sendSession(e),Ut(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(e).then(r=>n.flush(e).then(s=>r&&s))):Tt(!0)}close(e){return this.flush(e).then(n=>(this.getOptions().enabled=!1,this.emit("close"),n))}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]}addIntegration(e){const n=this._integrations[e.name];cs(this,e,this._integrations),n||as(this,[e])}sendEvent(e,n={}){this.emit("beforeSendEvent",e,n);let r=Oi(e,this._dsn,this._options._metadata,this._options.tunnel);for(const o of n.attachments||[])r=Ti(r,wi(o));const s=this.sendEnvelope(r);s&&s.then(o=>this.emit("afterSendEvent",e,o),null)}sendSession(e){const{release:n,environment:r=Sn}=this._options;if("aggregates"in e){const o=e.attrs||{};if(!o.release&&!n){g&&m.warn(fs);return}o.release=o.release||n,o.environment=o.environment||r,e.attrs=o}else{if(!e.release&&!n){g&&m.warn(fs);return}e.release=e.release||n,e.environment=e.environment||r}this.emit("beforeSendSession",e);const s=Ci(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(s)}recordDroppedEvent(e,n,r=1){if(this._options.sendClientReports){const s=`${e}:${n}`;g&&m.log(`Recording outcome: "${s}"${r>1?` (${r} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+r}}on(e,n){const r=this._hooks[e]=this._hooks[e]||[];return r.push(n),()=>{const s=r.indexOf(n);s>-1&&r.splice(s,1)}}emit(e,...n){const r=this._hooks[e];r&&r.forEach(s=>s(...n))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,n=>(g&&m.error("Error while sending envelope:",n),n)):(g&&m.error("Transport disabled"),Tt({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=_a(this,e),as(this,e)}_updateSessionFromEvent(e,n){let r=n.level==="fatal",s=!1;const o=n.exception?.values;if(o){s=!0;for(const c of o)if(c.mechanism?.handled===!1){r=!0;break}}const i=e.status==="ok";(i&&e.errors===0||i&&r)&&(Ut(e,{...r&&{status:"crashed"},errors:e.errors||Number(s||r)}),this.captureSession(e))}_isClientDoneProcessing(e){return new pt(n=>{let r=0;const s=1,o=setInterval(()=>{this._numProcessing==0?(clearInterval(o),n(!0)):(r+=s,e&&r>=e&&(clearInterval(o),n(!1)))},s)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,n,r,s){const o=this.getOptions(),i=Object.keys(this._integrations);return!n.integrations&&i?.length&&(n.integrations=i),this.emit("preprocessEvent",e,n),e.type||s.setLastEventId(e.event_id||n.event_id),Zi(o,e,n,r,this,s).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:Go(r),...a.contexts};const c=Fr(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(e,n={},r=v(),s=It()){return g&&vn(e)&&m.log(`Captured error event \`${us(e)[0]||"<unknown>"}\``),this._processEvent(e,n,r,s).then(o=>o.event_id,o=>{g&&(o instanceof Y&&o.logLevel==="log"?m.log(o.message):m.warn(o))})}_processEvent(e,n,r,s){const o=this.getOptions(),{sampleRate:i}=o,a=ls(e),c=vn(e),u=e.type||"error",f=`before send for type \`${u}\``,d=typeof i>"u"?void 0:re(i);if(c&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error"),Te(new Y(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const l=u==="replay_event"?"replay":u;return this._prepareEvent(e,n,r,s).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",l),new Y("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return p;const y=Ia(this,o,p,n);return Ta(y,f)}).then(p=>{if(p===null){if(this.recordDroppedEvent("before_send",l),a){const ot=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",ot)}throw new Y(`${f} returned \`null\`, will not send event.`,"log")}const S=r.getSession()||s.getSession();if(c&&S&&this._updateSessionFromEvent(S,p),a){const A=p.sdkProcessingMetadata?.spanCountBeforeProcessing||0,ot=p.spans?p.spans.length:0,xt=A-ot;xt>0&&this.recordDroppedEvent("before_send","span",xt)}const y=p.transaction_info;if(a&&y&&p.transaction!==e.transaction){const A="custom";p.transaction_info={...y,source:A}}return this.sendEvent(p,n),p}).then(null,p=>{throw p instanceof Y?p:(this.captureException(p,{data:{__sentry__:!0},originalException:p}),new Y(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
10
+ Reason: ${p}`))})}_process(e){this._numProcessing++,e.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([n,r])=>{const[s,o]=n.split(":");return{reason:s,category:o,quantity:r}})}_flushOutcomes(){g&&m.log("Flushing outcomes...");const e=this._clearOutcomes();if(e.length===0){g&&m.log("No outcomes to send");return}if(!this._dsn){g&&m.log("No dsn provided, will not send outcomes");return}g&&m.log("Sending outcomes:",e);const n=Sa(e,this._options.tunnel&&Ae(this._dsn));this.sendEnvelope(n)}}function Ta(t,e){const n=`${e} must return \`null\` or a valid event.`;if(be(t))return t.then(r=>{if(!Mt(r)&&r!==null)throw new Y(n);return r},r=>{throw new Y(`${e} rejected with ${r}`)});if(!Mt(t)&&t!==null)throw new Y(n);return t}function Ia(t,e,n,r){const{beforeSend:s,beforeSendTransaction:o,beforeSendSpan:i}=e;let a=n;if(vn(a)&&s)return s(a,r);if(ls(a)){if(i){const c=i(ya(a));if(c?a=te(n,Ea(c)):gn(),a.spans){const u=[];for(const f of a.spans){const d=i(f);d?u.push(d):(gn(),u.push(f))}a.spans=u}}if(o){if(a.spans){const c=a.spans.length;a.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:c}}return o(a,r)}}return a}function vn(t){return t.type===void 0}function ls(t){return t.type==="transaction"}function va(t,e){e.debug===!0&&(g?m.enable():ut(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),v().update(e.initialScope);const r=new t(e);return Ra(r),r.init(),r}function Ra(t){v().setClient(t)}function wa(t){const e=[];function n(){return t===void 0||e.length<t}function r(i){return e.splice(e.indexOf(i),1)[0]||Promise.resolve(void 0)}function s(i){if(!n())return Te(new Y("Not adding Promise because buffer limit was reached."));const a=i();return e.indexOf(a)===-1&&e.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function o(i){return new pt((a,c)=>{let u=e.length;if(!u)return a(!0);const f=setTimeout(()=>{i&&i>0&&a(!1)},i);e.forEach(d=>{Tt(d).then(()=>{--u||(clearTimeout(f),a(!0))},c)})})}return{$:e,add:s,drain:o}}const Na=60*1e3;function ka(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${t}`);return isNaN(r)?Na:r-e}function Aa(t,e){return t[e]||t.all||0}function Ca(t,e,n=Date.now()){return Aa(t,e)>n}function Oa(t,{statusCode:e,headers:n},r=Date.now()){const s={...t},o=n?.["x-sentry-rate-limits"],i=n?.["retry-after"];if(o)for(const a of o.trim().split(",")){const[c,u,,,f]=a.split(":",5),d=parseInt(c,10),l=(isNaN(d)?60:d)*1e3;if(!u)s.all=r+l;else for(const p of u.split(";"))p==="metric_bucket"?(!f||f.split(";").includes("custom"))&&(s[p]=r+l):s[p]=r+l}else i?s.all=r+ka(i,r):e===429&&(s.all=r+60*1e3);return s}const Pa=64;function xa(t,e,n=wa(t.bufferSize||Pa)){let r={};const s=i=>n.drain(i);function o(i){const a=[];if(Br(i,(d,l)=>{const p=jr(l);Ca(r,p)?t.recordDroppedEvent("ratelimit_backoff",p):a.push(d)}),a.length===0)return Tt({});const c=se(i[0],a),u=d=>{Br(c,(l,p)=>{t.recordDroppedEvent(d,jr(p))})},f=()=>e({body:Ii(c)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&g&&m.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=Oa(r,d),d),d=>{throw u("network_error"),d});return n.add(f).then(d=>d,d=>{if(d instanceof Y)return g&&m.error("Skipped sending event because buffer is full."),u("queue_overflow"),Tt({});throw d})}return{send:o,flush:s}}function Da(t){t.user?.ip_address===void 0&&(t.user={...t.user,ip_address:"{{auto}}"})}function $a(t){"aggregates"in t?t.attrs?.ip_address===void 0&&(t.attrs={...t.attrs,ip_address:"{{auto}}"}):t.ipAddress===void 0&&(t.ipAddress="{{auto}}")}function ps(t,e,n=[e],r="npm"){const s=t._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${e}`,packages:n.map(o=>({name:`${r}:@sentry/${o}`,version:_t})),version:_t}),t._metadata=s}function ms(t={}){const e=T();if(!ua()||!e)return{};const n=St(),r=jt(n);if(r.getTraceData)return r.getTraceData(t);const s=v(),o=t.span||L(),i=o?si(o):La(s),a=o?ht(o):Fr(e,s),c=Ko(a);return Nr.test(i)?{"sentry-trace":i,baggage:c}:(m.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}function La(t){const{traceId:e,sampled:n,propagationSpanId:r}=t.getPropagationContext();return kr(e,r,n)}const Ma=100;function Ct(t,e){const n=T(),r=It();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:o=Ma}=n.getOptions();if(o<=0)return;const a={timestamp:Zt(),...t},c=s?ut(()=>s(a,e)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,e),r.addBreadcrumb(c,o))}let hs;const Fa="FunctionToString",gs=new WeakMap,Ha=()=>({name:Fa,setupOnce(){hs=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=on(this),n=gs.has(T())&&e!==void 0?e:this;return hs.apply(n,t)}}catch{}},setup(t){gs.set(t,!0)}}),Ua=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/],Ba="InboundFilters",ja=(t={})=>({name:Ba,processEvent(e,n,r){const s=r.getOptions(),o=qa(t,s);return Ga(e,o)?null:e}});function qa(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:Ua],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function Ga(t,e){return e.ignoreInternal&&Xa(t)?(g&&m.warn(`Event dropped due to being internal Sentry Error.
11
+ Event: ${lt(t)}`),!0):Wa(t,e.ignoreErrors)?(g&&m.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
12
+ Event: ${lt(t)}`),!0):Ja(t)?(g&&m.warn(`Event dropped due to not having an error message, error type or stacktrace.
13
+ Event: ${lt(t)}`),!0):Va(t,e.ignoreTransactions)?(g&&m.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
14
+ Event: ${lt(t)}`),!0):Ya(t,e.denyUrls)?(g&&m.warn(`Event dropped due to being matched by \`denyUrls\` option.
15
+ Event: ${lt(t)}.
16
+ Url: ${De(t)}`),!0):za(t,e.allowUrls)?!1:(g&&m.warn(`Event dropped due to not being matched by \`allowUrls\` option.
17
+ Event: ${lt(t)}.
18
+ Url: ${De(t)}`),!0)}function Wa(t,e){return t.type||!e||!e.length?!1:us(t).some(n=>bt(n,e))}function Va(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;const n=t.transaction;return n?bt(n,e):!1}function Ya(t,e){if(!e?.length)return!1;const n=De(t);return n?bt(n,e):!1}function za(t,e){if(!e?.length)return!0;const n=De(t);return n?bt(n,e):!0}function Xa(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function Ka(t=[]){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function De(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?Ka(e):null}catch{return g&&m.error(`Cannot extract url for event ${lt(t)}`),null}}function Ja(t){return t.type||!t.exception?.values?.length?!1:!t.message&&!t.exception.values.some(e=>e.stacktrace||e.type&&e.type!=="Error"||e.value)}function Za(t,e,n=250,r,s,o,i){if(!o.exception?.values||!i||!Q(i.originalException,Error))return;const a=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;a&&(o.exception.values=Qa(Rn(t,e,s,i.originalException,r,o.exception.values,a,0),n))}function Rn(t,e,n,r,s,o,i,a){if(o.length>=n+1)return o;let c=[...o];if(Q(r[s],Error)){_s(i,a);const u=t(e,r[s]),f=c.length;Ss(u,s,f,a),c=Rn(t,e,n,r[s],s,[u,...c],u,f)}return Array.isArray(r.errors)&&r.errors.forEach((u,f)=>{if(Q(u,Error)){_s(i,a);const d=t(e,u),l=c.length;Ss(d,`errors[${f}]`,l,a),c=Rn(t,e,n,u,s,[d,...c],d,l)}}),c}function _s(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,...t.type==="AggregateError"&&{is_exception_group:!0},exception_id:e}}function Ss(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:n,parent_id:r}}function Qa(t,e){return t.map(n=>(n.value&&(n.value=Ft(n.value,e)),n))}function tc(t){const e="console";dt(e,t),ft(e,ec)}function ec(){"console"in b&&Je.forEach(function(t){t in b.console&&H(b.console,t,function(e){return _e[t]=e,function(...n){B("console",{args:n,level:t}),_e[t]?.apply(b.console,n)}})})}function nc(t){return t==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(t)?t:"log"}const rc="Dedupe",sc=()=>{let t;return{name:rc,processEvent(e){if(e.type)return e;try{if(oc(e,t))return g&&m.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}};function oc(t,e){return e?!!(ic(t,e)||ac(t,e)):!1}function ic(t,e){const n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Es(t,e)||!ys(t,e))}function ac(t,e){const n=bs(e),r=bs(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Es(t,e)||!ys(t,e))}function ys(t,e){let n=er(t),r=er(e);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s<r.length;s++){const o=r[s],i=n[s];if(o.filename!==i.filename||o.lineno!==i.lineno||o.colno!==i.colno||o.function!==i.function)return!1}return!0}function Es(t,e){let n=t.fingerprint,r=e.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function bs(t){return t.exception?.values&&t.exception.values[0]}function Ot(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}function cc(t,e,n,r,s="auto.http.browser"){if(!t.fetchData)return;const o=et()&&e(t.fetchData.url);if(t.endTimestamp&&o){const p=t.fetchData.__span;if(!p)return;const S=r[p];S&&(fc(S,t),delete r[p]);return}const{method:i,url:a}=t.fetchData,c=dc(a),u=c?Ot(c).host:void 0,f=!!L(),d=o&&f?At({name:`${i} ${a}`,attributes:{url:a,type:"fetch","http.method":i,"http.url":c,"server.address":u,[R]:s,[vt]:"http.client"}}):new kt;if(t.fetchData.__span=d.spanContext().spanId,r[d.spanContext().spanId]=d,n(t.fetchData.url)){const p=t.args[0],S=t.args[1]||{},y=uc(p,S,et()&&f?d:void 0);y&&(t.args[1]=S,S.headers=y)}const l=T();if(l){const p={input:t.args,response:t.response,startTimestamp:t.startTimestamp,endTimestamp:t.endTimestamp};l.emit("beforeOutgoingRequestSpan",d,p)}return d}function uc(t,e,n){const r=ms({span:n}),s=r["sentry-trace"],o=r.baggage;if(!s)return;const i=e.headers||(lc(t)?t.headers:void 0);if(i)if(pc(i)){const a=new Headers(i);if(a.set("sentry-trace",s),o){const c=a.get("baggage");if(c){const u=$e(c);a.set("baggage",u?`${u},${o}`:o)}else a.set("baggage",o)}return a}else if(Array.isArray(i)){const a=[...i.filter(c=>!(Array.isArray(c)&&c[0]==="sentry-trace")).map(c=>{if(Array.isArray(c)&&c[0]==="baggage"&&typeof c[1]=="string"){const[u,f,...d]=c;return[u,$e(f),...d]}else return c}),["sentry-trace",s]];return o&&a.push(["baggage",o]),a}else{const a="baggage"in i?i.baggage:void 0;let c=[];return Array.isArray(a)?c=a.map(u=>typeof u=="string"?$e(u):u).filter(u=>u===""):a&&c.push($e(a)),o&&c.push(o),{...i,"sentry-trace":s,baggage:c.length>0?c.join(","):void 0}}else return{...r}}function dc(t){try{return new URL(t).href}catch{return}}function fc(t,e){if(e.response){Tr(t,e.response.status);const n=e.response?.headers&&e.response.headers.get("content-length");if(n){const r=parseInt(n);r>0&&t.setAttribute("http.response_content_length",r)}}else e.error&&t.setStatus({code:P,message:"internal_error"});t.end()}function $e(t){return t.split(",").filter(e=>!e.split("=")[0].startsWith(mn)).join(",")}function lc(t){return typeof Request<"u"&&Q(t,Request)}function pc(t){return typeof Headers<"u"&&Q(t,Headers)}function Ts(t){if(t!==void 0)return t>=400&&t<500?"warning":t>=500?"error":void 0}const Le=b;function mc(){return"history"in Le}function Is(){if(!("fetch"in Le))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function wn(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function hc(){if(typeof EdgeRuntime=="string")return!0;if(!Is())return!1;if(wn(Le.fetch))return!0;let t=!1;const e=Le.document;if(e&&typeof e.createElement=="function")try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow?.fetch&&(t=wn(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){ct&&m.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t}function vs(t,e){const n="fetch";dt(n,t),ft(n,()=>Rs(void 0,e))}function gc(t){const e="fetch-body-resolved";dt(e,t),ft(e,()=>Rs(Sc))}function Rs(t,e=!1){e&&!hc()||H(b,"fetch",function(n){return function(...r){const s=new Error,{method:o,url:i}=yc(r),a={args:r,fetchData:{method:o,url:i},startTimestamp:D()*1e3,virtualError:s};return t||B("fetch",{...a}),n.apply(b,r).then(async c=>(t?t(c):B("fetch",{...a,endTimestamp:D()*1e3,response:c}),c),c=>{throw B("fetch",{...a,endTimestamp:D()*1e3,error:c}),en(c)&&c.stack===void 0&&(c.stack=s.stack,U(c,"framesToPop",1)),c})}})}async function _c(t,e){if(t?.body){const n=t.body,r=n.getReader(),s=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let o=!0;for(;o;){let i;try{i=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:a}=await r.read();clearTimeout(i),a&&(e(),o=!1)}catch{o=!1}finally{clearTimeout(i)}}clearTimeout(s),r.releaseLock(),n.cancel().then(null,()=>{})}}function Sc(t){let e;try{e=t.clone()}catch{return}_c(e,()=>{B("fetch-body-resolved",{endTimestamp:D()*1e3,response:t})})}function Nn(t,e){return!!t&&typeof t=="object"&&!!t[e]}function ws(t){return typeof t=="string"?t:t?Nn(t,"url")?t.url:t.toString?t.toString():"":""}function yc(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){const[n,r]=t;return{url:ws(n),method:Nn(r,"method")?String(r.method).toUpperCase():"GET"}}const e=t[0];return{url:ws(e),method:Nn(e,"method")?String(e.method).toUpperCase():"GET"}}function Ec(){return"npm"}const E=b;let kn=0;function Ns(){return kn>0}function bc(){kn++,setTimeout(()=>{kn--})}function qt(t,e={}){function n(s){return typeof s=="function"}if(!n(t))return t;try{const s=t.__sentry_wrapped__;if(s)return typeof s=="function"?s:t;if(on(t))return t}catch{return t}const r=function(...s){try{const o=s.map(i=>qt(i,e));return t.apply(this,o)}catch(o){throw bc(),fn(i=>{i.addEventProcessor(a=>(e.mechanism&&(un(a,void 0),Ht(a,e.mechanism)),a.extra={...a.extra,arguments:s},a)),In(o)}),o}};try{for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=t[s])}catch{}fr(r,t),U(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}function An(t,e){const n=On(t,e),r={type:wc(e),value:Nc(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Tc(t,e,n,r){const o=T()?.getOptions().normalizeDepth,i=Pc(e),a={__serialized__:Ur(e,o)};if(i)return{exception:{values:[An(t,i)]},extra:a};const c={exception:{values:[{type:Ee(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:Cc(e,{isUnhandledRejection:r})}]},extra:a};if(n){const u=On(t,n);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function Cn(t,e){return{exception:{values:[An(t,e)]}}}function On(t,e){const n=e.stacktrace||e.stack||"",r=vc(e),s=Rc(e);try{return t(n,r,s)}catch{}return[]}const Ic=/Minified React error #\d+;/i;function vc(t){return t&&Ic.test(t.message)?1:0}function Rc(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function ks(t){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?t instanceof WebAssembly.Exception:!1}function wc(t){const e=t?.name;return!e&&ks(t)?t.message&&Array.isArray(t.message)&&t.message.length==2?t.message[0]:"WebAssembly.Exception":e}function Nc(t){const e=t?.message;return ks(t)?Array.isArray(t.message)&&t.message.length==2?t.message[1]:"wasm exception":e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function kc(t,e,n,r){const s=n?.syntheticException||void 0,o=Pn(t,e,s,r);return Ht(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),Tt(o)}function Ac(t,e,n="info",r,s){const o=r?.syntheticException||void 0,i=xn(t,e,o,s);return i.level=n,r?.event_id&&(i.event_id=r.event_id),Tt(i)}function Pn(t,e,n,r,s){let o;if(ir(e)&&e.error)return Cn(t,e.error);if(ar(e)||bo(e)){const i=e;if("stack"in e)o=Cn(t,e);else{const a=i.name||(ar(i)?"DOMError":"DOMException"),c=i.message?`${a}: ${i.message}`:a;o=xn(t,c,n,r),un(o,c)}return"code"in i&&(o.tags={...o.tags,"DOMException.code":`${i.code}`}),o}return en(e)?Cn(t,e):Mt(e)||Ee(e)?(o=Tc(t,e,n,s),Ht(o,{synthetic:!0}),o):(o=xn(t,e,n,r),un(o,`${e}`),Ht(o,{synthetic:!0}),o)}function xn(t,e,n,r){const s={};if(r&&n){const o=On(t,n);o.length&&(s.exception={values:[{value:e,stacktrace:{frames:o}}]}),Ht(s,{synthetic:!0})}if(nn(e)){const{__sentry_template_string__:o,__sentry_template_values__:i}=e;return s.logentry={message:o,params:i},s}return s.message=e,s}function Cc(t,{isUnhandledRejection:e}){const n=ko(t),r=e?"promise rejection":"exception";return ir(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:Ee(t)?`Event \`${Oc(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Oc(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function Pc(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];if(n instanceof Error)return n}}class xc extends ba{constructor(e){const n={parentSpanIsAlwaysRootSpan:!0,...e},r=E.SENTRY_SDK_SOURCE||Ec();ps(n,"browser",["browser"],r),super(n),n.sendClientReports&&E.document&&E.document.addEventListener("visibilitychange",()=>{E.document.visibilityState==="hidden"&&this._flushOutcomes()}),this._options.sendDefaultPii&&(this.on("postprocessEvent",Da),this.on("beforeSendSession",$a))}eventFromException(e,n){return kc(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return Ac(this._options.stackParser,e,n,r,this._options.attachStacktrace)}_prepareEvent(e,n,r,s){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r,s)}}const Dn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Dc=(t,e)=>t>e[1]?"poor":t>e[0]?"needs-improvement":"good",Gt=(t,e,n,r)=>{let s,o;return i=>{e.value>=0&&(i||r)&&(o=e.value-(s||0),(o||s===void 0)&&(s=e.value,e.delta=o,e.rating=Dc(e.value,n),t(e)))}},_=b,$c=()=>`v4-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,oe=(t=!0)=>{const e=_.performance?.getEntriesByType?.("navigation")[0];if(!t||e&&e.responseStart>0&&e.responseStart<performance.now())return e},ie=()=>oe()?.activationStart||0,Wt=(t,e)=>{const n=oe();let r="navigate";return n&&(_.document?.prerendering||ie()>0?r="prerender":_.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:typeof e>"u"?-1:e,rating:"good",delta:0,entries:[],id:$c(),navigationType:r}},Pt=(t,e,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver(s=>{Promise.resolve().then(()=>{e(s.getEntries())})});return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch{}},Vt=t=>{const e=n=>{(n.type==="pagehide"||_.document?.visibilityState==="hidden")&&t(n)};_.document&&(addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0))},Me=t=>{let e=!1;return()=>{e||(t(),e=!0)}};let ae=-1;const Lc=()=>_.document.visibilityState==="hidden"&&!_.document.prerendering?0:1/0,Fe=t=>{_.document.visibilityState==="hidden"&&ae>-1&&(ae=t.type==="visibilitychange"?t.timeStamp:0,Fc())},Mc=()=>{addEventListener("visibilitychange",Fe,!0),addEventListener("prerenderingchange",Fe,!0)},Fc=()=>{removeEventListener("visibilitychange",Fe,!0),removeEventListener("prerenderingchange",Fe,!0)},He=()=>(_.document&&ae<0&&(ae=Lc(),Mc()),{get firstHiddenTime(){return ae}}),ce=t=>{_.document?.prerendering?addEventListener("prerenderingchange",()=>t(),!0):t()},Hc=[1800,3e3],Uc=(t,e={})=>{ce(()=>{const n=He(),r=Wt("FCP");let s;const i=Pt("paint",a=>{a.forEach(c=>{c.name==="first-contentful-paint"&&(i.disconnect(),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-ie(),0),r.entries.push(c),s(!0)))})});i&&(s=Gt(t,r,Hc,e.reportAllChanges))})},Bc=[.1,.25],jc=(t,e={})=>{Uc(Me(()=>{const n=Wt("CLS",0);let r,s=0,o=[];const i=c=>{c.forEach(u=>{if(!u.hadRecentInput){const f=o[0],d=o[o.length-1];s&&f&&d&&u.startTime-d.startTime<1e3&&u.startTime-f.startTime<5e3?(s+=u.value,o.push(u)):(s=u.value,o=[u])}}),s>n.value&&(n.value=s,n.entries=o,r())},a=Pt("layout-shift",i);a&&(r=Gt(t,n,Bc,e.reportAllChanges),Vt(()=>{i(a.takeRecords()),r(!0)}),setTimeout(r,0))}))},qc=[100,300],Gc=(t,e={})=>{ce(()=>{const n=He(),r=Wt("FID");let s;const o=c=>{c.startTime<n.firstHiddenTime&&(r.value=c.processingStart-c.startTime,r.entries.push(c),s(!0))},i=c=>{c.forEach(o)},a=Pt("first-input",i);s=Gt(t,r,qc,e.reportAllChanges),a&&Vt(Me(()=>{i(a.takeRecords()),a.disconnect()}))})};let As=0,$n=1/0,Ue=0;const Wc=t=>{t.forEach(e=>{e.interactionId&&($n=Math.min($n,e.interactionId),Ue=Math.max(Ue,e.interactionId),As=Ue?(Ue-$n)/7+1:0)})};let Ln;const Vc=()=>Ln?As:performance.interactionCount||0,Yc=()=>{"interactionCount"in performance||Ln||(Ln=Pt("event",Wc,{type:"event",buffered:!0,durationThreshold:0}))},rt=[],Mn=new Map,zc=40;let Xc=0;const Kc=()=>Vc()-Xc,Jc=()=>{const t=Math.min(rt.length-1,Math.floor(Kc()/50));return rt[t]},Fn=10,Zc=[],Qc=t=>{if(Zc.forEach(r=>r(t)),!(t.interactionId||t.entryType==="first-input"))return;const e=rt[rt.length-1],n=Mn.get(t.interactionId);if(n||rt.length<Fn||e&&t.duration>e.latency){if(n)t.duration>n.latency?(n.entries=[t],n.latency=t.duration):t.duration===n.latency&&t.startTime===n.entries[0]?.startTime&&n.entries.push(t);else{const r={id:t.interactionId,latency:t.duration,entries:[t]};Mn.set(r.id,r),rt.push(r)}rt.sort((r,s)=>s.latency-r.latency),rt.length>Fn&&rt.splice(Fn).forEach(r=>Mn.delete(r.id))}},Cs=t=>{const e=_.requestIdleCallback||_.setTimeout;let n=-1;return t=Me(t),_.document?.visibilityState==="hidden"?t():(n=e(t),Vt(t)),n},tu=[200,500],eu=(t,e={})=>{"PerformanceEventTiming"in _&&"interactionId"in PerformanceEventTiming.prototype&&ce(()=>{Yc();const n=Wt("INP");let r;const s=i=>{Cs(()=>{i.forEach(Qc);const a=Jc();a&&a.latency!==n.value&&(n.value=a.latency,n.entries=a.entries,r())})},o=Pt("event",s,{durationThreshold:e.durationThreshold!=null?e.durationThreshold:zc});r=Gt(t,n,tu,e.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),Vt(()=>{s(o.takeRecords()),r(!0)}))})},nu=[2500,4e3],Os={},ru=(t,e={})=>{ce(()=>{const n=He(),r=Wt("LCP");let s;const o=a=>{e.reportAllChanges||(a=a.slice(-1)),a.forEach(c=>{c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-ie(),0),r.entries=[c],s())})},i=Pt("largest-contentful-paint",o);if(i){s=Gt(t,r,nu,e.reportAllChanges);const a=Me(()=>{Os[r.id]||(o(i.takeRecords()),i.disconnect(),Os[r.id]=!0,s(!0))});["keydown","click"].forEach(c=>{_.document&&addEventListener(c,()=>Cs(a),{once:!0,capture:!0})}),Vt(a)}})},su=[800,1800],Hn=t=>{_.document?.prerendering?ce(()=>Hn(t)):_.document?.readyState!=="complete"?addEventListener("load",()=>Hn(t),!0):setTimeout(t,0)},ou=(t,e={})=>{const n=Wt("TTFB"),r=Gt(t,n,su,e.reportAllChanges);Hn(()=>{const s=oe();s&&(n.value=Math.max(s.responseStart-ie(),0),n.entries=[s],r(!0))})},ue={},Be={};let Ps,xs,Ds,$s,Ls;function Ms(t,e=!1){return fe("cls",t,du,Ps,e)}function iu(t,e=!1){return fe("lcp",t,lu,Ds,e)}function au(t){return fe("fid",t,fu,xs)}function cu(t){return fe("ttfb",t,pu,$s)}function uu(t){return fe("inp",t,mu,Ls)}function de(t,e){return Fs(t,e),Be[t]||(hu(t),Be[t]=!0),Hs(t,e)}function Yt(t,e){const n=ue[t];if(n?.length)for(const r of n)try{r(e)}catch(s){Dn&&m.error(`Error while triggering instrumentation handler.
19
+ Type: ${t}
20
+ Name: ${J(r)}
21
+ Error:`,s)}}function du(){return jc(t=>{Yt("cls",{metric:t}),Ps=t},{reportAllChanges:!0})}function fu(){return Gc(t=>{Yt("fid",{metric:t}),xs=t})}function lu(){return ru(t=>{Yt("lcp",{metric:t}),Ds=t},{reportAllChanges:!0})}function pu(){return ou(t=>{Yt("ttfb",{metric:t}),$s=t})}function mu(){return eu(t=>{Yt("inp",{metric:t}),Ls=t})}function fe(t,e,n,r,s=!1){Fs(t,e);let o;return Be[t]||(o=n(),Be[t]=!0),r&&e({metric:r}),Hs(t,e,s?o:void 0)}function hu(t){const e={};t==="event"&&(e.durationThreshold=0),Pt(t,n=>{Yt(t,{entries:n})},e)}function Fs(t,e){ue[t]=ue[t]||[],ue[t].push(e)}function Hs(t,e,n){return()=>{n&&n();const r=ue[t];if(!r)return;const s=r.indexOf(e);s!==-1&&r.splice(s,1)}}function gu(t){return"duration"in t}function Un(t){return typeof t=="number"&&isFinite(t)}function st(t,e,n,{...r}){const s=I(t).start_timestamp;return s&&s>e&&typeof t.updateStartTime=="function"&&t.updateStartTime(e),Xr(t,()=>{const o=At({startTime:e,...r});return o&&o.end(n),o})}function Us(t){const e=T();if(!e)return;const{name:n,transaction:r,attributes:s,startTime:o}=t,{release:i,environment:a,sendDefaultPii:c}=e.getOptions(),f=e.getIntegrationByName("Replay")?.getReplayId(),d=v(),l=d.getUser(),p=l!==void 0?l.email||l.id||l.ip_address:void 0;let S;try{S=d.getScopeData().contexts.profile.profile_id}catch{}const y={release:i,environment:a,user:p||void 0,profile_id:S||void 0,replay_id:f||void 0,transaction:r,"user_agent.original":_.navigator?.userAgent,"client.address":c?"{{auto}}":void 0,...s};return At({name:n,attributes:y,startTime:o,experimental:{standalone:!0}})}function Bn(){return _.addEventListener&&_.performance}function k(t){return t/1e3}function Bs(t){let e="unknown",n="unknown",r="";for(const s of t){if(s==="/"){[e,n]=t.split("/");break}if(!isNaN(Number(s))){e=r==="h"?"http":r,n=t.split(r)[1];break}r+=s}return r===t&&(e=r),{name:e,version:n}}function _u(){let t=0,e,n;if(!yu())return;let r=!1;function s(){r||(r=!0,n&&Su(t,e,n),o())}const o=Ms(({metric:i})=>{const a=i.entries[i.entries.length-1];a&&(t=i.value,e=a)},!0);Vt(()=>{s()}),setTimeout(()=>{const i=T();if(!i)return;const a=i.on("startNavigationSpan",()=>{s(),a?.()}),c=L();if(c){const u=$(c);I(u).op==="pageload"&&(n=u.spanContext().spanId)}},0)}function Su(t,e,n){Dn&&m.log(`Sending CLS span (${t})`);const r=k((j()||0)+(e?.startTime||0)),s=v().getScopeData().transactionName,o=e?Et(e.sources[0]?.node):"Layout shift",i=O({[R]:"auto.http.browser.cls",[vt]:"ui.webvital.cls",[ne]:e?.duration||0,"sentry.pageload.span_id":n}),a=Us({name:o,transaction:s,attributes:i,startTime:r});a&&(a.addEvent("cls",{[ve]:"",[Re]:t}),a.end(r))}function yu(){try{return PerformanceObserver.supportedEntryTypes.includes("layout-shift")}catch{return!1}}const Eu=2147483647;let js=0,x={},M,je;function bu({recordClsStandaloneSpans:t}){const e=Bn();if(e&&j()){e.mark&&_.performance.mark("sentry-tracing-init");const n=Nu(),r=wu(),s=ku(),o=t?_u():Ru();return()=>{n(),r(),s(),o?.()}}return()=>{}}function Tu(){de("longtask",({entries:t})=>{const e=L();if(!e)return;const{op:n,start_timestamp:r}=I(e);for(const s of t){const o=k(j()+s.startTime),i=k(s.duration);n==="navigation"&&r&&o<r||st(e,o,o+i,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[R]:"auto.ui.browser.metrics"}})}})}function Iu(){new PerformanceObserver(e=>{const n=L();if(n)for(const r of e.getEntries()){if(!r.scripts[0])continue;const s=k(j()+r.startTime),{start_timestamp:o,op:i}=I(n);if(i==="navigation"&&o&&s<o)continue;const a=k(r.duration),c={[R]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:f,invokerType:d,sourceURL:l,sourceFunctionName:p,sourceCharPosition:S}=u;c["browser.script.invoker"]=f,c["browser.script.invoker_type"]=d,l&&(c["code.filepath"]=l),p&&(c["code.function"]=p),S!==-1&&(c["browser.script.source_char_position"]=S),st(n,s,s+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:c})}}).observe({type:"long-animation-frame",buffered:!0})}function vu(){de("event",({entries:t})=>{const e=L();if(e){for(const n of t)if(n.name==="click"){const r=k(j()+n.startTime),s=k(n.duration),o={name:Et(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[R]:"auto.ui.browser.metrics"}},i=ur(n.target);i&&(o.attributes["ui.component_name"]=i),st(e,r,r+s,o)}}})}function Ru(){return Ms(({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(x.cls={value:t.value,unit:""},je=e)},!0)}function wu(){return iu(({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(x.lcp={value:t.value,unit:"millisecond"},M=e)},!0)}function Nu(){return au(({metric:t})=>{const e=t.entries[t.entries.length-1];if(!e)return;const n=k(j()),r=k(e.startTime);x.fid={value:t.value,unit:"millisecond"},x["mark.fid"]={value:n+r,unit:"second"}})}function ku(){return cu(({metric:t})=>{t.entries[t.entries.length-1]&&(x.ttfb={value:t.value,unit:"millisecond"})})}function Au(t,e){const n=Bn(),r=j();if(!n?.getEntries||!r)return;const s=k(r),o=n.getEntries(),{op:i,start_timestamp:a}=I(t);if(o.slice(js).forEach(c=>{const u=k(c.startTime),f=k(Math.max(0,c.duration));if(!(i==="navigation"&&a&&s+u<a))switch(c.entryType){case"navigation":{Ou(t,c,s);break}case"mark":case"paint":case"measure":{Cu(t,c,u,f,s);const d=He(),l=c.startTime<d.firstHiddenTime;c.name==="first-paint"&&l&&(x.fp={value:c.startTime,unit:"millisecond"}),c.name==="first-contentful-paint"&&l&&(x.fcp={value:c.startTime,unit:"millisecond"});break}case"resource":{Du(t,c,c.name,u,f,s);break}}}),js=Math.max(o.length-1,0),$u(t),i==="pageload"){Mu(x);const c=x["mark.fid"];c&&x.fid&&(st(t,c.value,c.value+k(x.fid.value),{name:"first input delay",op:"ui.action",attributes:{[R]:"auto.ui.browser.metrics"}}),delete x["mark.fid"]),(!("fcp"in x)||!e.recordClsOnPageloadSpan)&&delete x.cls,Object.entries(x).forEach(([u,f])=>{xi(u,f.value,f.unit)}),t.setAttribute("performance.timeOrigin",s),t.setAttribute("performance.activationStart",ie()),Lu(t)}M=void 0,je=void 0,x={}}function Cu(t,e,n,r,s){const o=oe(!1),i=k(o?o.requestStart:0),a=s+Math.max(n,i),c=s+n,u=c+r,f={[R]:"auto.resource.browser.metrics"};return a!==c&&(f["sentry.browser.measure_happened_before_request"]=!0,f["sentry.browser.measure_start_time"]=a),st(t,a,u,{name:e.name,op:e.entryType,attributes:f}),a}function Ou(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{qe(t,e,r,n)}),qe(t,e,"secureConnection",n,"TLS/SSL"),qe(t,e,"fetch",n,"cache"),qe(t,e,"domainLookup",n,"DNS"),xu(t,e,n)}function qe(t,e,n,r,s=n){const o=Pu(n),i=e[o],a=e[`${n}Start`];!a||!i||st(t,r+k(a),r+k(i),{op:`browser.${s}`,name:e.name,attributes:{[R]:"auto.ui.browser.metrics"}})}function Pu(t){return t==="secureConnection"?"connectEnd":t==="fetch"?"domainLookupStart":`${t}End`}function xu(t,e,n){const r=n+k(e.requestStart),s=n+k(e.responseEnd),o=n+k(e.responseStart);e.responseEnd&&(st(t,r,s,{op:"browser.request",name:e.name,attributes:{[R]:"auto.ui.browser.metrics"}}),st(t,o,s,{op:"browser.response",name:e.name,attributes:{[R]:"auto.ui.browser.metrics"}}))}function Du(t,e,n,r,s,o){if(e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch")return;const i=Ot(n),a={[R]:"auto.resource.browser.metrics"};jn(a,e,"transferSize","http.response_transfer_size"),jn(a,e,"encodedBodySize","http.response_content_length"),jn(a,e,"decodedBodySize","http.decoded_response_content_length");const c=e.deliveryType;c!=null&&(a["http.response_delivery_type"]=c);const u=e.renderBlockingStatus;u&&(a["resource.render_blocking_status"]=u),i.protocol&&(a["url.scheme"]=i.protocol.split(":").pop()),i.host&&(a["server.address"]=i.host),a["url.same_origin"]=n.includes(_.location.origin);const{name:f,version:d}=Bs(e.nextHopProtocol);a["network.protocol.name"]=f,a["network.protocol.version"]=d;const l=o+r,p=l+s;st(t,l,p,{name:n.replace(_.location.origin,""),op:e.initiatorType?`resource.${e.initiatorType}`:"resource.other",attributes:a})}function $u(t){const e=_.navigator;if(!e)return;const n=e.connection;n&&(n.effectiveType&&t.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&t.setAttribute("connectionType",n.type),Un(n.rtt)&&(x["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Un(e.deviceMemory)&&t.setAttribute("deviceMemory",`${e.deviceMemory} GB`),Un(e.hardwareConcurrency)&&t.setAttribute("hardwareConcurrency",String(e.hardwareConcurrency))}function Lu(t){M&&(M.element&&t.setAttribute("lcp.element",Et(M.element)),M.id&&t.setAttribute("lcp.id",M.id),M.url&&t.setAttribute("lcp.url",M.url.trim().slice(0,200)),M.loadTime!=null&&t.setAttribute("lcp.loadTime",M.loadTime),M.renderTime!=null&&t.setAttribute("lcp.renderTime",M.renderTime),t.setAttribute("lcp.size",M.size)),je?.sources&&je.sources.forEach((e,n)=>t.setAttribute(`cls.source.${n+1}`,Et(e.node)))}function jn(t,e,n,r){const s=e[n];s!=null&&s<Eu&&(t[r]=s)}function Mu(t){const e=oe(!1);if(!e)return;const{responseStart:n,requestStart:r}=e;r<=n&&(t["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}const Fu=1e3;let qs,qn,Gn;function Hu(t){const e="dom";dt(e,t),ft(e,Uu)}function Uu(){if(!_.document)return;const t=B.bind(null,"dom"),e=Gs(t,!0);_.document.addEventListener("click",e,!1),_.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{const s=_[n]?.prototype;s?.hasOwnProperty?.("addEventListener")&&(H(s,"addEventListener",function(o){return function(i,a,c){if(i==="click"||i=="keypress")try{const u=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},f=u[i]=u[i]||{refCount:0};if(!f.handler){const d=Gs(t);f.handler=d,o.call(this,i,d,c)}f.refCount++}catch{}return o.call(this,i,a,c)}}),H(s,"removeEventListener",function(o){return function(i,a,c){if(i==="click"||i=="keypress")try{const u=this.__sentry_instrumentation_handlers__||{},f=u[i];f&&(f.refCount--,f.refCount<=0&&(o.call(this,i,f.handler,c),f.handler=void 0,delete u[i]),Object.keys(u).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return o.call(this,i,a,c)}}))})}function Bu(t){if(t.type!==qn)return!1;try{if(!t.target||t.target._sentryId!==Gn)return!1}catch{}return!0}function ju(t,e){return t!=="keypress"?!1:e?.tagName?!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable):!0}function Gs(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;const r=qu(n);if(ju(n.type,r))return;U(n,"_sentryCaptured",!0),r&&!r._sentryId&&U(r,"_sentryId",q());const s=n.type==="keypress"?"input":n.type;Bu(n)||(t({event:n,name:s,global:e}),qn=n.type,Gn=r?r._sentryId:void 0),clearTimeout(qs),qs=_.setTimeout(()=>{Gn=void 0,qn=void 0},Fu)}}function qu(t){try{return t.target}catch{return null}}let Ge;function Wn(t){const e="history";dt(e,t),ft(e,Gu)}function Gu(){if(_.addEventListener("popstate",()=>{const e=_.location.href,n=Ge;if(Ge=e,n===e)return;B("history",{from:n,to:e})}),!mc())return;function t(e){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const s=Ge,o=String(r);if(Ge=o,s===o)return;B("history",{from:s,to:o})}return e.apply(this,n)}}H(_.history,"pushState",t),H(_.history,"replaceState",t)}const We={};function Wu(t){const e=We[t];if(e)return e;let n=_[t];if(wn(n))return We[t]=n.bind(_);const r=_.document;if(r&&typeof r.createElement=="function")try{const s=r.createElement("iframe");s.hidden=!0,r.head.appendChild(s);const o=s.contentWindow;o?.[t]&&(n=o[t]),r.head.removeChild(s)}catch(s){Dn&&m.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,s)}return n&&(We[t]=n.bind(_))}function Ws(t){We[t]=void 0}const zt="__sentry_xhr_v3__";function Vs(t){const e="xhr";dt(e,t),ft(e,Vu)}function Vu(){if(!_.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(e,n,r){const s=new Error,o=D()*1e3,i=Z(r[0])?r[0].toUpperCase():void 0,a=Yu(r[1]);if(!i||!a)return e.apply(n,r);n[zt]={method:i,url:a,request_headers:{}},i==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const c=()=>{const u=n[zt];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const f={endTimestamp:D()*1e3,startTimestamp:o,xhr:n,virtualError:s};B("xhr",f)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,f,d){return c(),u.apply(f,d)}}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,f,d){const[l,p]=d,S=f[zt];return S&&Z(l)&&Z(p)&&(S.request_headers[l.toLowerCase()]=p),u.apply(f,d)}}),e.apply(n,r)}}),t.send=new Proxy(t.send,{apply(e,n,r){const s=n[zt];if(!s)return e.apply(n,r);r[0]!==void 0&&(s.body=r[0]);const o={startTimestamp:D()*1e3,xhr:n};return B("xhr",o),e.apply(n,r)}})}function Yu(t){if(Z(t))return t;try{return t.toString()}catch{}}const Vn=[],Ve=new Map;function zu(){if(Bn()&&j()){const e=Xu();return()=>{e()}}return()=>{}}const Ys={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function Xu(){return uu(({metric:t})=>{if(t.value==null)return;const e=t.entries.find(S=>S.duration===t.value&&Ys[S.name]);if(!e)return;const{interactionId:n}=e,r=Ys[e.name],s=k(j()+e.startTime),o=k(t.value),i=L(),a=i?$(i):void 0,u=(n!=null?Ve.get(n):void 0)||a,f=u?I(u).description:v().getScopeData().transactionName,d=Et(e.target),l=O({[R]:"auto.http.browser.inp",[vt]:`ui.interaction.${r}`,[ne]:e.duration}),p=Us({name:d,transaction:f,attributes:l,startTime:s});p&&(p.addEvent("inp",{[ve]:"millisecond",[Re]:t.value}),p.end(s+o))})}function Ku(){const t=({entries:e})=>{const n=L(),r=n&&$(n);e.forEach(s=>{if(!gu(s)||!r)return;const o=s.interactionId;if(o!=null&&!Ve.has(o)){if(Vn.length>10){const i=Vn.shift();Ve.delete(i)}Vn.push(o),Ve.set(o,r)}})};de("event",t),de("first-input",t)}function Ju(t,e=Wu("fetch")){let n=0,r=0;function s(o){const i=o.body.length;n+=i,r++;const a={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:t.headers,keepalive:n<=6e4&&r<15,...t.fetchOptions};if(!e)return Ws("fetch"),Te("No fetch implementation available");try{return e(t.url,a).then(c=>(n-=i,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return Ws("fetch"),n-=i,r--,Te(c)}}return xa(t,s)}const Zu=30,Qu=50;function Yn(t,e,n,r){const s={filename:t,function:e==="<anonymous>"?yt:e,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const td=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,ed=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,nd=/\((\S*)(?::(\d+))(?::(\d+))\)/,rd=[Zu,t=>{const e=td.exec(t);if(e){const[,r,s,o]=e;return Yn(r,yt,+s,+o)}const n=ed.exec(t);if(n){if(n[2]&&n[2].indexOf("eval")===0){const i=nd.exec(n[2]);i&&(n[2]=i[1],n[3]=i[2],n[4]=i[3])}const[s,o]=zs(n[1]||yt,n[2]);return Yn(o,s,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],sd=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,od=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,id=tr(...[rd,[Qu,t=>{const e=sd.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const o=od.exec(e[3]);o&&(e[1]=e[1]||"eval",e[3]=o[1],e[4]=o[2],e[5]="")}let r=e[3],s=e[1]||yt;return[s,r]=zs(s,r),Yn(r,s,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}]]),zs=(t,e)=>{const n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:yt,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},X=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ye=1024,ad="Breadcrumbs",cd=(t={})=>{const e={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:ad,setup(n){e.console&&tc(fd(n)),e.dom&&Hu(dd(n,e.dom)),e.xhr&&Vs(ld(n)),e.fetch&&vs(pd(n)),e.history&&Wn(md(n)),e.sentry&&n.on("beforeSendEvent",ud(n))}}};function ud(t){return function(n){T()===t&&Ct({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:lt(n)},{event:n})}}function dd(t,e){return function(r){if(T()!==t)return;let s,o,i=typeof e=="object"?e.serializeAttribute:void 0,a=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;a&&a>Ye&&(X&&m.warn(`\`dom.maxStringLength\` cannot exceed ${Ye}, but a value of ${a} was configured. Sentry will use ${Ye} instead.`),a=Ye),typeof i=="string"&&(i=[i]);try{const u=r.event,f=hd(u)?u.target:u;s=Et(f,{keyAttrs:i,maxStringLength:a}),o=ur(f)}catch{s="<unknown>"}if(s.length===0)return;const c={category:`ui.${r.name}`,message:s};o&&(c.data={"ui.component_name":o}),Ct(c,{event:r.event,name:r.name,global:r.global})}}function fd(t){return function(n){if(T()!==t)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:nc(n.level),message:dr(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${dr(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Ct(r,{input:n.args,level:n.level})}}function ld(t){return function(n){if(T()!==t)return;const{startTimestamp:r,endTimestamp:s}=n,o=n.xhr[zt];if(!r||!s||!o)return;const{method:i,url:a,status_code:c,body:u}=o,f={method:i,url:a,status_code:c},d={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s},l={category:"xhr",data:f,type:"http",level:Ts(c)};t.emit("beforeOutgoingRequestBreadcrumb",l,d),Ct(l,d)}}function pd(t){return function(n){if(T()!==t)return;const{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){const o=n.fetchData,i={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s},a={category:"fetch",data:o,level:"error",type:"http"};t.emit("beforeOutgoingRequestBreadcrumb",a,i),Ct(a,i)}else{const o=n.response,i={...n.fetchData,status_code:o?.status};n.fetchData.request_body_size,n.fetchData.response_body_size,o?.status;const a={input:n.args,response:o,startTimestamp:r,endTimestamp:s},c={category:"fetch",data:i,type:"http",level:Ts(i.status_code)};t.emit("beforeOutgoingRequestBreadcrumb",c,a),Ct(c,a)}}}function md(t){return function(n){if(T()!==t)return;let r=n.from,s=n.to;const o=Ot(E.location.href);let i=r?Ot(r):void 0;const a=Ot(s);i?.path||(i=o),o.protocol===a.protocol&&o.host===a.host&&(s=a.relative),o.protocol===i.protocol&&o.host===i.host&&(r=i.relative),Ct({category:"navigation",data:{from:r,to:s}})}}function hd(t){return!!t&&!!t.target}const gd=["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"],_d="BrowserApiErrors",Sd=(t={})=>{const e={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t};return{name:_d,setupOnce(){e.setTimeout&&H(E,"setTimeout",Xs),e.setInterval&&H(E,"setInterval",Xs),e.requestAnimationFrame&&H(E,"requestAnimationFrame",yd),e.XMLHttpRequest&&"XMLHttpRequest"in E&&H(XMLHttpRequest.prototype,"send",Ed);const n=e.eventTarget;n&&(Array.isArray(n)?n:gd).forEach(bd)}}};function Xs(t){return function(...e){const n=e[0];return e[0]=qt(n,{mechanism:{data:{function:J(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function yd(t){return function(e){return t.apply(this,[qt(e,{mechanism:{data:{function:"requestAnimationFrame",handler:J(t)},handled:!1,type:"instrument"}})])}}function Ed(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&H(n,s,function(o){const i={mechanism:{data:{function:s,handler:J(o)},handled:!1,type:"instrument"}},a=on(o);return a&&(i.mechanism.data.handler=J(a)),qt(o,i)})}),t.apply(this,e)}}function bd(t){const n=E[t]?.prototype;n?.hasOwnProperty?.("addEventListener")&&(H(n,"addEventListener",function(r){return function(s,o,i){try{Td(o)&&(o.handleEvent=qt(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:J(o),target:t},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[s,qt(o,{mechanism:{data:{function:"addEventListener",handler:J(o),target:t},handled:!1,type:"instrument"}}),i])}}),H(n,"removeEventListener",function(r){return function(s,o,i){try{const a=o.__sentry_wrapped__;a&&r.call(this,s,a,i)}catch{}return r.call(this,s,o,i)}}))}function Td(t){return typeof t.handleEvent=="function"}const Id=()=>({name:"BrowserSession",setupOnce(){if(typeof E.document>"u"){X&&m.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}ns({ignoreDuration:!0}),os(),Wn(({from:t,to:e})=>{t!==void 0&&t!==e&&(ns({ignoreDuration:!0}),os())})}}),vd="GlobalHandlers",Rd=(t={})=>{const e={onerror:!0,onunhandledrejection:!0,...t};return{name:vd,setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(wd(n),Ks("onerror")),e.onunhandledrejection&&(Nd(n),Ks("onunhandledrejection"))}}};function wd(t){rr(e=>{const{stackParser:n,attachStacktrace:r}=Js();if(T()!==t||Ns())return;const{msg:s,url:o,line:i,column:a,error:c}=e,u=Cd(Pn(n,c||s,void 0,r,!1),o,i,a);u.level="error",es(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function Nd(t){sr(e=>{const{stackParser:n,attachStacktrace:r}=Js();if(T()!==t||Ns())return;const s=kd(e),o=rn(s)?Ad(s):Pn(n,s,void 0,r,!0);o.level="error",es(o,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function kd(t){if(rn(t))return t;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return t}function Ad(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function Cd(t,e,n,r){const s=t.exception=t.exception||{},o=s.values=s.values||[],i=o[0]=o[0]||{},a=i.stacktrace=i.stacktrace||{},c=a.frames=a.frames||[],u=r,f=n,d=Z(e)&&e.length>0?e:Jt();return c.length===0&&c.push({colno:u,filename:d,function:yt,in_app:!0,lineno:f}),t}function Ks(t){X&&m.log(`Global Handler attached: ${t}`)}function Js(){return T()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Od=()=>({name:"HttpContext",preprocessEvent(t){if(!E.navigator&&!E.location&&!E.document)return;const e=t.request?.url||Jt(),{referrer:n}=E.document||{},{userAgent:r}=E.navigator||{},s={...t.request?.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},o={...t.request,...e&&{url:e},headers:s};t.request=o}}),Pd="cause",xd=5,Dd="LinkedErrors",$d=(t={})=>{const e=t.limit||xd,n=t.key||Pd;return{name:Dd,preprocessEvent(r,s,o){const i=o.getOptions();Za(An,i.stackParser,i.maxValueLength,n,e,r,s)}}};function Zs(t){return[ja(),Ha(),Sd(),cd(),Rd(),$d(),sc(),Od(),Id()]}function Ld(t={}){return{...{defaultIntegrations:Zs(),release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:E.SENTRY_RELEASE?.id,sendClientReports:!0},...Md(t)}}function Md(t){const e={};for(const n of Object.getOwnPropertyNames(t)){const r=n;t[r]!==void 0&&(e[r]=t[r])}return e}function Fd(){const t=typeof E.window<"u"&&E;if(!t)return!1;const e=t.chrome?"chrome":"browser",r=t[e]?.runtime?.id,s=Jt()||"",o=["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"],i=!!r&&E===E.top&&o.some(c=>s.startsWith(`${c}//`)),a=typeof t.nw<"u";return!!r&&!i&&!a}function Hd(t={}){const e=Ld(t);if(!e.skipBrowserExtensionCheck&&Fd()){X&&ut(()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")});return}X&&!Is()&&m.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill.");const n={...e,stackParser:_o(e.stackParser||id),integrations:ga(e),transport:e.transport||Ju};return va(xc,n)}const Qs=new WeakMap,zn=new Map,ze={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function Ud(t,e){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:s,shouldCreateSpanForRequest:o,enableHTTPTimings:i,tracePropagationTargets:a}={traceFetch:ze.traceFetch,traceXHR:ze.traceXHR,trackFetchStreamPerformance:ze.trackFetchStreamPerformance,...e},c=typeof o=="function"?o:d=>!0,u=d=>qd(d,a),f={};n&&(t.addEventProcessor(d=>(d.type==="transaction"&&d.spans&&d.spans.forEach(l=>{if(l.op==="http.client"){const p=zn.get(l.span_id);p&&(l.timestamp=p/1e3,zn.delete(l.span_id))}}),d)),s&&gc(d=>{if(d.response){const l=Qs.get(d.response);l&&d.endTimestamp&&zn.set(l,d.endTimestamp)}}),vs(d=>{const l=cc(d,c,u,f);if(d.response&&d.fetchData.__span&&Qs.set(d.response,d.fetchData.__span),l){const p=eo(d.fetchData.url),S=p?Ot(p).host:void 0;l.setAttributes({"http.url":p,"server.address":S})}i&&l&&to(l)})),r&&Vs(d=>{const l=Gd(d,c,u,f);i&&l&&to(l)})}function Bd(t){return t.entryType==="resource"&&"initiatorType"in t&&typeof t.nextHopProtocol=="string"&&(t.initiatorType==="fetch"||t.initiatorType==="xmlhttprequest")}function to(t){const{url:e}=I(t).data;if(!e||typeof e!="string")return;const n=de("resource",({entries:r})=>{r.forEach(s=>{Bd(s)&&s.name.endsWith(e)&&(jd(s).forEach(i=>t.setAttribute(...i)),setTimeout(n))})})}function K(t=0){return((j()||performance.timeOrigin)+t)/1e3}function jd(t){const{name:e,version:n}=Bs(t.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",e]),j()?[...r,["http.request.redirect_start",K(t.redirectStart)],["http.request.fetch_start",K(t.fetchStart)],["http.request.domain_lookup_start",K(t.domainLookupStart)],["http.request.domain_lookup_end",K(t.domainLookupEnd)],["http.request.connect_start",K(t.connectStart)],["http.request.secure_connection_start",K(t.secureConnectionStart)],["http.request.connection_end",K(t.connectEnd)],["http.request.request_start",K(t.requestStart)],["http.request.response_start",K(t.responseStart)],["http.request.response_end",K(t.responseEnd)]]:r}function qd(t,e){const n=Jt();if(n){let r,s;try{r=new URL(t,n),s=new URL(n).origin}catch{return!1}const o=r.origin===s;return e?bt(r.toString(),e)||o&&bt(r.pathname,e):o}else{const r=!!t.match(/^\/(?!\/)/);return e?bt(t,e):r}}function Gd(t,e,n,r){const s=t.xhr,o=s?.[zt];if(!s||s.__sentry_own_request__||!o)return;const i=et()&&e(o.url);if(t.endTimestamp&&i){const l=s.__sentry_xhr_span_id__;if(!l)return;const p=r[l];p&&o.status_code!==void 0&&(Tr(p,o.status_code),p.end(),delete r[l]);return}const a=eo(o.url),c=a?Ot(a).host:void 0,u=!!L(),f=i&&u?At({name:`${o.method} ${o.url}`,attributes:{type:"xhr","http.method":o.method,"http.url":a,url:o.url,"server.address":c,[R]:"auto.http.browser",[vt]:"http.client"}}):new kt;s.__sentry_xhr_span_id__=f.spanContext().spanId,r[s.__sentry_xhr_span_id__]=f,n(o.url)&&Wd(s,et()&&u?f:void 0);const d=T();return d&&d.emit("beforeOutgoingRequestSpan",f,t),f}function Wd(t,e){const{"sentry-trace":n,baggage:r}=ms({span:e});n&&Vd(t,n,r)}function Vd(t,e,n){try{t.setRequestHeader("sentry-trace",e),n&&t.setRequestHeader("baggage",n)}catch{}}function eo(t){try{return new URL(t,E.location.origin).href}catch{return}}function Yd(){E.document?E.document.addEventListener("visibilitychange",()=>{const t=L();if(!t)return;const e=$(t);if(E.document.hidden&&e){const n="cancelled",{op:r,status:s}=I(e);X&&m.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),s||e.setStatus({code:P,message:n}),e.setAttribute("sentry.cancellation_reason","document.hidden"),e.end()}}):X&&m.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const zd="BrowserTracing",Xd={...Ce,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,_experiments:{},...ze},no=(t={})=>{const e=E.document;ci();const{enableInp:n,enableLongTask:r,enableLongAnimationFrame:s,_experiments:{enableInteractions:o,enableStandaloneClsSpans:i},beforeStartSpan:a,idleTimeout:c,finalTimeout:u,childSpanTimeout:f,markBackgroundSpan:d,traceFetch:l,traceXHR:p,trackFetchStreamPerformance:S,shouldCreateSpanForRequest:y,enableHTTPTimings:A,instrumentPageLoad:ot,instrumentNavigation:xt}={...Xd,...t},Kn=bu({recordClsStandaloneSpans:i||!1});n&&zu(),s&&b.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?Iu():r&&Tu(),o&&vu();const pe={name:void 0,source:void 0};function me(h,w){const it=w.op==="pageload",N=a?a(w):w,F=N.attributes||{};w.name!==N.name&&(F[G]="custom",N.attributes=F),pe.name=N.name,pe.source=F[G];const W=Zr(N,{idleTimeout:c,finalTimeout:u,childSpanTimeout:f,disableAutoFinish:it,beforeSpanEnd:at=>{Kn(),Au(at,{recordClsOnPageloadSpan:!i}),io(h,void 0);const Dt=v(),Xt=Dt.getPropagationContext();Dt.setPropagationContext({...Xt,traceId:W.spanContext().traceId,sampled:wt(W),dsc:ht(at)})}});io(h,W);function C(){e&&["interactive","complete"].includes(e.readyState)&&h.emit("idleSpanEnableAutoFinish",W)}it&&e&&(e.addEventListener("readystatechange",()=>{C()}),C())}return{name:zd,afterAllSetup(h){let w=Jt();function it(){const N=Xe(h);N&&!I(N).timestamp&&(X&&m.log(`[Tracing] Finishing current active span with op: ${I(N).op}`),N.end())}if(h.on("startNavigationSpan",N=>{T()===h&&(it(),It().setPropagationContext({traceId:mt(),sampleRand:Math.random()}),v().setPropagationContext({traceId:mt(),sampleRand:Math.random()}),me(h,{op:"navigation",...N}))}),h.on("startPageLoadSpan",(N,F={})=>{if(T()!==h)return;it();const W=F.sentryTrace||so("sentry-trace"),C=F.baggage||so("baggage"),at=ti(W,C);v().setPropagationContext(at),me(h,{op:"pageload",...N})}),E.location){if(ot){const N=j();Kd(h,{name:E.location.pathname,startTime:N?N/1e3:void 0,attributes:{[G]:"url",[R]:"auto.pageload.browser"}})}xt&&Wn(({to:N,from:F})=>{if(F===void 0&&w?.indexOf(N)!==-1){w=void 0;return}F!==N&&(w=void 0,ro(h,{name:E.location.pathname,attributes:{[G]:"url",[R]:"auto.navigation.browser"}}))})}d&&Yd(),o&&Jd(h,c,u,f,pe),n&&Ku(),Ud(h,{traceFetch:l,traceXHR:p,trackFetchStreamPerformance:S,tracePropagationTargets:h.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:y,enableHTTPTimings:A})}}};function Kd(t,e,n){return t.emit("startPageLoadSpan",e,n),v().setTransactionName(e.name),Xe(t)}function ro(t,e){return t.emit("startNavigationSpan",e),v().setTransactionName(e.name),Xe(t)}function so(t){return E.document?.querySelector(`meta[name=${t}]`)?.getAttribute("content")||void 0}function Jd(t,e,n,r,s){const o=E.document;let i;const a=()=>{const c="ui.action.click",u=Xe(t);if(u){const f=I(u).op;if(["navigation","pageload"].includes(f)){X&&m.warn(`[Tracing] Did not create ${c} span because a pageload or navigation span is in progress.`);return}}if(i&&(i.setAttribute(ln,"interactionInterrupted"),i.end(),i=void 0),!s.name){X&&m.warn(`[Tracing] Did not create ${c} transaction because _latestRouteName is missing.`);return}i=Zr({name:s.name,op:c,attributes:{[G]:s.source||"url"}},{idleTimeout:e,finalTimeout:n,childSpanTimeout:r})};o&&addEventListener("click",a,{once:!1,capture:!0})}const oo="_sentry_idleSpan";function Xe(t){return t[oo]}function io(t,e){U(t,oo,e)}const ao=["activate","mount"],co=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Zd=/(?:^|[-_])(\w)/g,Qd=t=>t.replace(Zd,e=>e.toUpperCase()).replace(/[-_]/g,""),tf="<Root>",Xn="<Anonymous>",ef=(t,e)=>t.repeat(e),le=(t,e)=>{if(!t)return Xn;if(t.$root===t)return tf;if(!t.$options)return Xn;const n=t.$options;let r=n.name||n._componentTag||n.__name;const s=n.__file;if(!r&&s){const o=s.match(/([^/\\]+)\.vue$/);o&&(r=o[1])}return(r?`<${Qd(r)}>`:Xn)+(s&&e!==!1?` at ${s}`:"")},nf=t=>{if(t&&(t._isVue||t.__isVue)&&t.$parent){const e=[];let n=0;for(;t;){if(e.length>0){const s=e[e.length-1];if(s.constructor===t.constructor){n++,t=t.$parent;continue}else n>0&&(e[e.length-1]=[s,n],n=0)}e.push(t),t=t.$parent}return`
22
+
23
+ found in
24
+
25
+ ${e.map((s,o)=>`${(o===0?"---> ":ef(" ",5+o*2))+(Array.isArray(s)?`${le(s[0])}... (${s[1]} recursive calls)`:le(s))}`).join(`
26
+ `)}`}return`
27
+
28
+ (found in ${le(t)})`},rf=(t,e)=>{const{errorHandler:n}=t.config;t.config.errorHandler=(r,s,o)=>{const i=le(s,!1),a=s?nf(s):"",c={componentName:i,lifecycleHook:o,trace:a};if(e.attachProps&&s&&(s.$options?.propsData?c.propsData=s.$options.propsData:s.$props&&(c.propsData=s.$props)),setTimeout(()=>{In(r,{captureContext:{contexts:{vue:c}},mechanism:{handled:!!n,type:"vue"}})}),typeof n=="function"&&t.config.errorHandler)n.call(t,r,s,o);else throw r}},uo="ui.vue",sf={activate:["activated","deactivated"],create:["beforeCreate","created"],unmount:["beforeUnmount","unmounted"],destroy:["beforeDestroy","destroyed"],mount:["beforeMount","mounted"],update:["beforeUpdate","updated"]};function of(t,e,n){t.$_sentryRootSpanTimer&&clearTimeout(t.$_sentryRootSpanTimer),t.$_sentryRootSpanTimer=setTimeout(()=>{t.$root?.$_sentryRootSpan&&(t.$root.$_sentryRootSpan.end(e),t.$root.$_sentryRootSpan=void 0)},n)}function af(t,e){function n(s){return s.replace(/^<([^\s]*)>(?: at [^\s]*)?$/,"$1")}return t.some(s=>n(e)===n(s))}const cf=(t={})=>{const e=(t.hooks||[]).concat(ao).filter((r,s,o)=>o.indexOf(r)===s),n={};for(const r of e){const s=sf[r];if(!s){co&&m.warn(`Unknown hook: ${r}`);continue}for(const o of s)n[o]=function(){const i=this.$root===this;i&&(this.$_sentryRootSpan=this.$_sentryRootSpan||At({name:"Application Render",op:`${uo}.render`,attributes:{[R]:"auto.ui.vue"},onlyIfParent:!0}));const a=le(this,!1),c=Array.isArray(t.trackComponents)?af(t.trackComponents,a):t.trackComponents;if(!(!i&&!c))if(this.$_sentrySpans=this.$_sentrySpans||{},o==s[0]){if(this.$root?.$_sentryRootSpan||L()){const f=this.$_sentrySpans[r];f&&f.end(),this.$_sentrySpans[r]=At({name:`Vue ${a}`,op:`${uo}.${r}`,attributes:{[R]:"auto.ui.vue"},onlyIfParent:!0})}}else{const u=this.$_sentrySpans[r];if(!u)return;u.end(),of(this,D(),t.timeout||2e3)}}}return n},uf={Vue:b.Vue,attachProps:!0,attachErrorHandler:!0,tracingOptions:{hooks:ao,timeout:2e3,trackComponents:!1}},df="Vue",ff=(t={})=>({name:df,setup(e){const n={...uf,...e.getOptions(),...t};if(!n.Vue&&!n.app){ut(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue specific errors will not be captured. Update your `Sentry.init` call with an appropriate config option: `app` (Application Instance - Vue 3) or `Vue` (Vue Constructor - Vue 2).")});return}n.app?(Array.isArray(n.app)?n.app:[n.app]).forEach(s=>fo(s,n)):n.Vue&&fo(n.Vue,n)}}),fo=(t,e)=>{co&&t._instance?.isMounted===!0&&ut(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue app is already mounted. Make sure to call `app.mount()` after `Sentry.init()`.")}),e.attachErrorHandler&&rf(t,e),et(e)&&t.mixin(cf(e.tracingOptions))};function lf(t={}){const e={defaultIntegrations:[...Zs(),ff()],...t};return ps(e,"vue"),Hd(e)}function pf(t,e,n){let r=!0;t.onError(s=>In(s,{mechanism:{handled:!1}})),t.beforeEach((s,o,i)=>{const a=o.name==null&&o.matched.length===0||o.name===void 0&&r;r&&(r=!1);const c={[R]:"auto.navigation.vue"};for(const d of Object.keys(s.params))c[`params.${d}`]=s.params[d];for(const d of Object.keys(s.query)){const l=s.query[d];l&&(c[`query.${d}`]=l)}let u=s.path,f="url";if(s.name&&e.routeLabel!=="path")u=s.name.toString(),f="custom";else if(s.matched.length>0){const d=s.matched.length-1;u=s.matched[d].path,f="route"}if(v().setTransactionName(u),e.instrumentPageLoad&&a){const d=mf();d&&(I(d).data[G]!=="custom"&&(d.updateName(u),d.setAttribute(G,f)),d.setAttributes({...c,[R]:"auto.pageload.vue"}))}e.instrumentNavigation&&!a&&(c[G]=f,c[R]="auto.navigation.vue",n({name:u,op:"navigation",attributes:c})),i&&i()})}function mf(){const t=L(),e=t&&$(t);if(!e)return;const n=I(e).op;return n==="navigation"||n==="pageload"?e:void 0}function hf(t={}){if(!t.router)return no(t);const e=no({...t,instrumentNavigation:!1}),{router:n,instrumentNavigation:r=!0,instrumentPageLoad:s=!0,routeLabel:o="name"}=t;return{...e,afterAllSetup(i){e.afterAllSetup(i),pf(n,{routeLabel:o,instrumentNavigation:r,instrumentPageLoad:s},c=>{ro(i,c)})}}}const gf={install:(t,e)=>{const{config:n}=e,r=n.sentry;r?.enabled&&r?.dsn&&lf({...r,app:t,integrations:[hf({router:e.router})],tracePropagationTargets:["localhost",n.websiteDomain,/^\//],release:e.config.appVersion})}},_f=t=>{const e=lo();return!e||!e?.features?!1:e?.features[t]},Sf={install:(t,e)=>{const n=Symbol.for("dzangolab.vue-config.config");t.provide(n,e.config);const r=Symbol.for("dzangolab.vue-config.feature");t.provide(r,_f)}},lo=()=>$t.inject(Symbol.for("dzangolab.vue-config.config")),yf=()=>$t.inject(Symbol.for("dzangolab.vue-config.feature"));V.default=Sf,V.parse=mo,V.sentry=gf,V.useConfig=lo,V.useFeature=yf,Object.defineProperties(V,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -0,0 +1,12 @@
1
+ import parse from "./parse";
2
+ import sentry from "./sentry";
3
+ import type { AppConfig, AppFeatures } from "./types";
4
+ import type { Plugin } from "vue";
5
+ declare const feature: (name: keyof AppFeatures) => boolean;
6
+ declare const plugin: Plugin;
7
+ declare const useConfig: () => AppConfig;
8
+ declare const useFeature: () => typeof feature | undefined;
9
+ export default plugin;
10
+ export { parse, sentry, useConfig, useFeature };
11
+ export type { AppConfig, AppFeatures };
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,KAAK,EAAO,MAAM,EAAE,MAAM,KAAK,CAAC;AAEvC,QAAA,MAAM,OAAO,SAAU,MAAM,WAAW,KAAG,OAQ1C,CAAC;AAEF,QAAA,MAAM,MAAM,EAAE,MAQb,CAAC;AAEF,QAAA,MAAM,SAAS,QAAO,SAIrB,CAAC;AAEF,QAAA,MAAM,UAAU,QAAO,OAAO,OAAO,GAAG,SAEvC,CAAC;AAEF,eAAe,MAAM,CAAC;AAEtB,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC;AAEhD,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const parse: (value: bigint | number | string | boolean | undefined, fallback: bigint | number | string | null | boolean) => any;
2
+ export default parse;
3
+ //# sourceMappingURL=parse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/parse.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,KAAK,UACF,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,YAC3C,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,OAAO,QAoBpD,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { AppConfig } from "./types";
2
+ import type { Plugin } from "vue";
3
+ import type { Router } from "vue-router";
4
+ declare const plugin: Plugin;
5
+ interface DzangolabVueSentryPluginOptions {
6
+ config: AppConfig;
7
+ router: Router;
8
+ }
9
+ export default plugin;
10
+ export type { DzangolabVueSentryPluginOptions };
11
+ //# sourceMappingURL=sentry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sentry.d.ts","sourceRoot":"","sources":["../../src/sentry.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,EAAO,MAAM,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEzC,QAAA,MAAM,MAAM,EAAE,MAmBb,CAAC;AAEF,UAAU,+BAA+B;IACvC,MAAM,EAAE,SAAS,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAe,MAAM,CAAC;AAEtB,YAAY,EAAE,+BAA+B,EAAE,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { Options as SentryOptions } from "@sentry/core";
2
+ interface AppConfig {
3
+ authBasePath?: string;
4
+ apiBaseUrl: string;
5
+ appName?: string;
6
+ appTitle: string;
7
+ appVersion: string;
8
+ copyright?: {
9
+ holder: string;
10
+ url: string;
11
+ };
12
+ features: AppFeatures;
13
+ sentry?: SentryOptions & {
14
+ enabled?: boolean;
15
+ };
16
+ slug: string;
17
+ websiteDomain: string;
18
+ }
19
+ interface AppFeatures {
20
+ showVersion: boolean;
21
+ }
22
+ export type { AppConfig, AppFeatures };
23
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7D,UAAU,SAAS;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE;QACV,MAAM,EAAE,MAAM,CAAC;QACf,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,QAAQ,EAAE,WAAW,CAAC;IACtB,MAAM,CAAC,EAAE,aAAa,GAAG;QACvB,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,CAAC;IACF,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,UAAU,WAAW;IACnB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC"}
package/package.json ADDED
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "@prefabs.tech/vue3-config",
3
+ "version": "0.12.0",
4
+ "description": "Vue config plugin",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "exports": {
8
+ ".": {
9
+ "import": "./dist/PrefabsTechVue3Config.es.js",
10
+ "require": "./dist/PrefabsTechVue3Config.umd.js"
11
+ }
12
+ },
13
+ "main": "./dist/PrefabsTechVue3Config.umd.js",
14
+ "module": "./dist/PrefabsTechVue3Config.es.js",
15
+ "types": "./dist/src/index.d.ts",
16
+ "files": [
17
+ "dist"
18
+ ],
19
+ "dependencies": {
20
+ "@sentry/core": "9.1.0",
21
+ "@sentry/vue": "9.1.0"
22
+ },
23
+ "devDependencies": {
24
+ "@prefabs.tech/eslint-config": "0.2.0",
25
+ "@prefabs.tech/tsconfig": "0.2.0",
26
+ "@types/node": "22.13.5",
27
+ "@typescript-eslint/eslint-plugin": "8.24.1",
28
+ "@typescript-eslint/parser": "8.24.1",
29
+ "@vitejs/plugin-vue": "5.2.1",
30
+ "@vitejs/plugin-vue-jsx": "4.1.1",
31
+ "@vitest/coverage-istanbul": "3.0.6",
32
+ "eslint": "9.20.1",
33
+ "eslint-config-prettier": "10.0.1",
34
+ "eslint-import-resolver-alias": "1.1.2",
35
+ "eslint-import-resolver-typescript": "3.8.3",
36
+ "eslint-plugin-import": "2.31.0",
37
+ "eslint-plugin-prettier": "5.2.3",
38
+ "eslint-plugin-unicorn": "56.0.1",
39
+ "eslint-plugin-vue": "9.32.0",
40
+ "prettier": "3.5.2",
41
+ "typescript": "5.7.3",
42
+ "vite": "6.1.1",
43
+ "vitest": "3.0.6",
44
+ "vue": "3.5.13",
45
+ "vue-eslint-parser": "9.4.3",
46
+ "vue-router": "4.5.0",
47
+ "vue-tsc": "2.2.2"
48
+ },
49
+ "peerDependencies": {
50
+ "vue": ">=3.2",
51
+ "vue-router": ">=4.0"
52
+ },
53
+ "engines": {
54
+ "node": ">=18",
55
+ "pnpm": ">=9"
56
+ },
57
+ "scripts": {
58
+ "build": "vite build && vue-tsc --emitDeclarationOnly",
59
+ "lint": "eslint .",
60
+ "lint:fix": "eslint . --fix",
61
+ "sort-package": "npx sort-package-json",
62
+ "test": "vitest --environment jsdom run --coverage --passWithNoTests",
63
+ "test:component": "vitest --environment jsdom run component/ --passWithNoTests",
64
+ "test:snapshot": "vitest --environment jsdom run snapshot/ --passWithNoTests",
65
+ "test:unit": "vitest --environment jsdom run unit/ --passWithNoTests",
66
+ "typecheck": "vue-tsc --noEmit -p tsconfig.json --composite false"
67
+ }
68
+ }