1import{i as Z,t as At,a as Xe,D as de,l as f,b as w,G as _,C as Ct,f as m,o as Ie,d as Q,u as Pt,e as Ke,h as N,r as fe,S as pe,j as x,k as Ve,n as Ft,m as Mt,p as Lt,q as Ht,s as g,v as Ut,w as he,x as be,y as ge,z as Te,A as jt,B as Bt,E as qt,F as Gt,H as ee,I as Je,g as Wt,J as ke,K as T,L as X,M as me,N as S,O as zt,P as Yt,Q as te,R as z,c as Xt,T as _e,U as we,V as Kt,W as Vt,X as ye,Y as Jt,Z as Zt,_ as Qt,$ as O,a0 as en,a1 as tn,a2 as Oe,a3 as Ze,a4 as nn,a5 as rn,a6 as Re,a7 as $e}from"./hub-B0HBP01d.js";import{g as sn}from"./env-Blu__xut.js";function on(t,e,n=250,r,s,o,i){if(!o.exception||!o.exception.values||!i||!Z(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=an(ne(t,e,s,i.originalException,r,o.exception.values,a,0),n))}function ne(t,e,n,r,s,o,i,a){if(o.length>=n+1)return o;let c=[...o];if(Z(r[s],Error)){De(i,a);const u=t(e,r[s]),d=c.length;Ne(u,s,d,a),c=ne(t,e,n,r[s],s,[u,...c],u,d)}return Array.isArray(r.errors)&&r.errors.forEach((u,d)=>{if(Z(u,Error)){De(i,a);const l=t(e,u),y=c.length;Ne(l,`errors[${d}]`,y,a),c=ne(t,e,n,u,s,[l,...c],l,y)}}),c}function De(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 Ne(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 an(t,e){return t.map(n=>(n.value&&(n.value=At(n.value,e)),n))}const cn=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function un(t){return t==="http"||t==="https"}function C(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 ln(t){const e=cn.exec(t);if(!e){Xe(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});return}const[n,r,s="",o,i="",a]=e.slice(1);let c="",u=a;const d=u.split("/");if(d.length>1&&(c=d.slice(0,-1).join("/"),u=d.pop()),u){const l=u.match(/^\d+/);l&&(u=l[0])}return Qe({host:o,pass:s,path:c,projectId:u,port:i,protocol:n,publicKey:r})}function Qe(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function dn(t){if(!de)return!0;const{port:e,projectId:n,protocol:r}=t;return["protocol","publicKey","host","projectId"].find(i=>t[i]?!1:(f.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?un(r)?e&&isNaN(parseInt(e,10))?(f.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(f.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(f.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function et(t){const e=typeof t=="string"?ln(t):Qe(t);if(!(!e||!dn(e)))return e}class I extends Error{constructor(e,n="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}const W={},xe={};function R(t,e){W[t]=W[t]||[],W[t].push(e)}function $(t,e){xe[t]||(e(),xe[t]=!0)}function v(t,e){const n=t&&W[t];if(n)for(const r of n)try{r(e)}catch(s){de&&f.error(`Error while triggering instrumentation handler. 2Type: ${t} 3Name: ${w(r)} 4Error:`,s)}}function fn(t){const e="console";R(e,t),$(e,pn)}function pn(){"console"in _&&Ct.forEach(function(t){t in _.console&&m(_.console,t,function(e){return Ie[t]=e,function(...n){v("console",{args:n,level:t});const s=Ie[t];s&&s.apply(_.console,n)}})})}const D=_,hn=1e3;let Ae,re,se;function gn(t){const e="dom";R(e,t),$(e,mn)}function mn(){if(!D.document)return;const t=v.bind(null,"dom"),e=Ce(t,!0);D.document.addEventListener("click",e,!1),D.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{const r=D[n]&&D[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(m(r,"addEventListener",function(s){return function(o,i,a){if(o==="click"||o=="keypress")try{const c=this,u=c.__sentry_instrumentation_handlers__=c.__sentry_instrumentation_handlers__||{},d=u[o]=u[o]||{refCount:0};if(!d.handler){const l=Ce(t);d.handler=l,s.call(this,o,l,a)}d.refCount++}catch{}return s.call(this,o,i,a)}}),m(r,"removeEventListener",function(s){return function(o,i,a){if(o==="click"||o=="keypress")try{const c=this,u=c.__sentry_instrumentation_handlers__||{},d=u[o];d&&(d.refCount--,d.refCount<=0&&(s.call(this,o,d.handler,a),d.handler=void 0,delete u[o]),Object.keys(u).length===0&&delete c.__sentry_instrumentation_handlers__)}catch{}return s.call(this,o,i,a)}}))})}function _n(t){if(t.type!==re)return!1;try{if(!t.target||t.target._sentryId!==se)return!1}catch{}return!0}function yn(t,e){return t!=="keypress"?!1:!e||!e.tagName?!0:!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable)}function Ce(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;const r=En(n);if(yn(n.type,r))return;Q(n,"_sentryCaptured",!0),r&&!r._sentryId&&Q(r,"_sentryId",Pt());
4const s=n.type==="keypress"?"input":n.type;_n(n)||(t({event:n,name:s,global:e}),re=n.type,se=r?r._sentryId:void 0),clearTimeout(Ae),Ae=D.setTimeout(()=>{se=void 0,re=void 0},hn)}}function En(t){try{return t.target}catch{return null}}const oe=Ke();function tt(){if(!("fetch"in oe))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function ie(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function vn(){if(typeof EdgeRuntime=="string")return!0;if(!tt())return!1;if(ie(oe.fetch))return!0;let t=!1;const e=oe.document;if(e&&typeof e.createElement=="function")try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(t=ie(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){de&&f.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t}function Sn(t){const e="fetch";R(e,t),$(e,In)}function In(){vn()&&m(_,"fetch",function(t){return function(...e){const{method:n,url:r}=bn(e),s={args:e,fetchData:{method:n,url:r},startTimestamp:Date.now()};return v("fetch",{...s}),t.apply(_,e).then(o=>{const i={...s,endTimestamp:Date.now(),response:o};return v("fetch",i),o},o=>{const i={...s,endTimestamp:Date.now(),error:o};throw v("fetch",i),o})}})}function ae(t,e){return!!t&&typeof t=="object"&&!!t[e]}function Pe(t){return typeof t=="string"?t:t?ae(t,"url")?t.url:t.toString?t.toString():"":""}function bn(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){const[n,r]=t;return{url:Pe(n),method:ae(r,"method")?String(r.method).toUpperCase():"GET"}}const e=t[0];return{url:Pe(e),method:ae(e,"method")?String(e.method).toUpperCase():"GET"}}let U=null;function Tn(t){const e="error";R(e,t),$(e,kn)}function kn(){U=_.onerror,_.onerror=function(t,e,n,r,s){return v("error",{column:r,error:s,line:n,msg:t,url:e}
4),U&&!U.__SENTRY_LOADER__?U.apply(this,arguments):!1},_.onerror.__SENTRY_INSTRUMENTED__=!0}let j=null;function wn(t){const e="unhandledrejection";R(e,t),$(e,On)}function On(){j=_.onunhandledrejection,_.onunhandledrejection=function(t){return v("unhandledrejection",t),j&&!j.__SENTRY_LOADER__?j.apply(this,arguments):!0},_.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const B=Ke();function Rn(){const t=B.chrome,e=t&&t.app&&t.app.runtime,n="history"in B&&!!B.history.pushState&&!!B.history.replaceState;return!e&&n}const F=_;let q;function nt(t){const e="history";R(e,t),$(e,$n)}function $n(){if(!Rn())return;const t=F.onpopstate;F.onpopstate=function(...n){const r=F.location.href,s=q;if(q=r,v("history",{from:s,to:r}),t)try{return t.apply(this,n)}catch{}};function e(n){return function(...r){const s=r.length>2?r[2]:void 0;if(s){const o=q,i=String(s);q=i,v("history",{from:o,to:i})}return n.apply(this,r)}}m(F.history,"pushState",e),m(F.history,"replaceState",e)}const Dn=_,M="__sentry_xhr_v3__";function Nn(t){const e="xhr";R(e,t),$(e,xn)}function xn(){if(!Dn.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;m(t,"open",function(e){return function(...n){const r=Date.now(),s=N(n[0])?n[0].toUpperCase():void 0,o=An(n[1]);if(!s||!o)return e.apply(this,n);this[M]={method:s,url:o,request_headers:{}},s==="POST"&&o.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const i=()=>{const a=this[M];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}const c={args:[s,o],endTimestamp:Date.now(),startTimestamp:r,xhr:this};v("xhr",c)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?m(this,"onreadystatechange",function(a){return function(...c){return i(),a.apply(this,c)}}):this.addEventListener("readystatechange",i),m(this,"setRequestHeader",function(a){return function(...c){const[u,d]=c,l=this[M];return l&&N(u)&&N(d)&&(l.request_headers[u.toLowerCase()]=d),a.apply(this,c)}}),e.apply(this,n)}}),m(t,"send",function(e){return function(...n){const r=this[M];if(!r)return e.apply(this,n);n[0]!==void 0&&(r.body=n[0]);const s={args:[r.method,r.url],startTimestamp:Date.now(),xhr:this};return v("xhr",s),e.apply(this,n)}})}function An(t){if(N(t))return t;try{return t.toString()}catch{}}function Cn(t){const e=[];function n(){return t===void 0||e.length<t}function r(i){return e.splice(e.indexOf(i),1)[0]}function s(i){if(!n())return fe(new I("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 pe((a,c)=>{let u=e.length;if(!u)return a(!0);const d=setTimeout(()=>{i&&i>0&&a(!1)},i);e.forEach(l=>{x(l).then(()=>{--u||(clearTimeout(d),a(!0))},c)})})}return{$:e,add:s,drain:o}}function V(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}}const Pn=["fatal","error","warning","log","info","debug"];function Fn(t){return t==="warn"?"warning":Pn.includes(t)?t:"log"}function P(t,e=[]){return[t,e]}function Mn(t,e){const[n,r]=t;return[n,[...r,e]]}function Fe(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 ce(t,e){return(e||new TextEncoder).encode(t)}function Ln(t,e){const[n,r]=t;let s=JSON.stringify(n);function o(i){typeof s=="string"?s=typeof i=="string"?s+i:[ce(s,e),i]:s.push(typeof i=="string"?ce(i,e):i)}for(const i of r){const[a,c]=i;if(o(` 5${JSON.stringify(a)} 6`),typeof c=="string"||c instanceof Uint8Array)o(c);else{let u;try{u=JSON.stringify(c)}catch{u=JSON.stringify(Ft(c))}o(u)}}return typeof s=="string"?s:Hn(s)}function Hn(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 Un(t,e){const n=typeof t.data=="string"?ce(t.data,e):t.data;return[Ve({type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),n]}const jn={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"unknown"};function Me(t){return jn[t]}function rt(t){if(!t||!t.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function Bn(t,e,n,r){const s=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:new Date().toISOString(),...e&&{sdk:e},...!!n&&r&&{dsn:C(r)},...s&&{trace:Ve({...s})}}}function qn(t,e,n){const r=[{type:"client_report"},{timestamp:n||Mt(),discarded_events:t}];return P(e?{dsn:e}:{},[r])}const Gn=60*1e3;function Wn(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${t}`);return isNaN(r)?Gn:r-e}function zn(t,e){return t[e]||t.all||0}function Yn(t,e,n=Date.now()){return zn(t,e)>n}function Xn(t,{statusCode:e,headers:n},r=Date.now()){const s={...t},o=n&&n["x-sentry-rate-limits"],i=n&&n["retry-after"];if(o)for(const a of o.trim().split(",")){const[c,u]=a.split(":",2),d=parseInt(c,10),l=(isNaN(d)?60:d)*1e3;if(!u)s.all=r+l;else for(const y of u.split(";"))s[y]=r+l}else i?s.all=r+Wn(i,r):e===429&&(s.all=r+60*1e3);return s}function Kn(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 Vn(t,e,n,r){const s=rt(n),o={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&e&&{dsn:C(e)}},i="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return P(o,[i])}function Jn(t,e,n,r){const s=rt(n),o=t.type&&t.type!=="replay_event"?t.type:"event";Kn(t,n&&n.sdk);const i=Bn(t,s,r,e);return delete t.sdkProcessingMetadata,P(i,[[{type:o},t]])}const Zn="7";function st(t){const e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function Qn(t){return`${st(t)}${t.projectId}/envelope/`}function er(t,e){return Lt({sentry_key:t.publicKey,sentry_version:Zn,...e&&{sentry_client:`${e.name}/${e.version}`}})}function tr(t,e={}){const n=typeof e=="string"?e:e.tunnel,r=typeof e=="string"||!e._metadata?void 0:e._metadata.sdk;return n||`${Qn(t)}?${er(t,r)}`}function nr(t,e){const n=et(t);if(!n)return"";const r=`${st(n)}embed/error-page/`;let s=`dsn=${C(n)}`;for(const o in e)if(o!=="dsn"&&o!=="onClose")if(o==="user"){const i=e.user;if(!i)continue;i.name&&(s+=`&name=${encodeURIComponent(i.name)}`),i.email&&(s+=`&email=${encodeURIComponent(i.email)}`)}else s+=`&${encodeURIComponent(o)}=${encodeURIComponent(e[o])}`;return`${r}?${s}`}const Le=[];function rr(t){const e={};return t.forEach(n=>{const{name:r}=n,s=e[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(e[r]=n)}),Object.keys(e).map(n=>e[n])}function sr(t){const e=t.defaultIntegrations||[],n=t.integrations;e.forEach(i=>
6{i.isDefaultInstance=!0});let r;Array.isArray(n)?r=[...e,...n]:typeof n=="function"?r=Ht(n(e)):r=e;const s=rr(r),o=ir(s,i=>i.name==="Debug");if(o!==-1){const[i]=s.splice(o,1);s.push(i)}return s}function or(t,e){const n={};return e.forEach(r=>{r&&ot(t,r,n)}),n}function He(t,e){for(const n of e)n&&n.afterAllSetup&&n.afterAllSetup(t)}function ot(t,e,n){if(n[e.name]){g&&f.log(`Integration skipped because it was already installed: ${e.name}`);return}if(n[e.name]=e,Le.indexOf(e.name)===-1&&(e.setupOnce(Ut,he),Le.push(e.name)),e.setup&&typeof e.setup=="function"&&e.setup(t),t.on&&typeof e.preprocessEvent=="function"){const r=e.preprocessEvent.bind(e);t.on("preprocessEvent",(s,o)=>r(s,o,t))}if(t.addEventProcessor&&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&&f.log(`Integration installed: ${e.name}`)}function ir(t,e){for(let n=0;n<t.length;n++)if(e(t[n])===!0)return n;return-1}function k(t,e){return Object.assign(function(...r){return e(...r)},{id:t})}function ar(t){let e="";for(const n of t){const r=Object.entries(n.tags),s=r.length>0?`|#${r.map(([o,i])=>`${o}:${i}`).join(",")}`:"";e+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${s}|T${n.timestamp} 7`}return e}function cr(t,e,n,r){const s={sent_at:new Date().toISOString()};n&&n.sdk&&(s.sdk={name:n.sdk.name,version:n.sdk.version}),r&&e&&(s.dsn=C(e));const o=ur(t);return P(s,[o])}function ur(t){const e=ar(t);return[{type:"statsd",length:e.length},e]}const Ue="Not capturing exception because it's already been captured.";class lr{constructor(e){if(this._options=e,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=et(e.dsn):g&&f.warn("No DSN provided, client will not send events."),this._dsn){const n=tr(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:n})}}captureException(e,n,r){if(be(e)){g&&f.log(Ue);return}let s=n&&n.event_id;return this._process(this.eventFromException(e,n).then(o=>this._captureEvent(o,n,r)).then(o=>{s=o})),s}captureMessage(e,n,r,s){let o=r&&r.event_id;const i=Je(e)?e:String(e),a=ge(e)?this.eventFromMessage(i,n,r):this.eventFromException(e,r);return this._process(a.then(c=>this._captureEvent(c,r,s)).then(c=>{o=c})),o}captureEvent(e,n,r){if(n&&n.originalException&&be(n.originalException)){g&&f.log(Ue);return}let s=n&&n.event_id;const i=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,n,i||r).then(a=>{s=a})),s}captureSession(e){typeof e.release!="string"?g&&f.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),Te(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.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(e).then(r=>n.flush(e).then(s=>r&&s))):x(!0)}close(e){return this.flush(e).then(n=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}setupIntegrations(e){(e&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(e){return this.getIntegrationByName(e)}getIntegrationByName(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch{return g&&f.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}addIntegration(e){const n=this._integrations[e.name];ot(this,e,this._integrations),n||He(this,[e])}sendEvent(e,n={}){this.emit("beforeSendEvent",e,n);let r=Jn(e,this._dsn,this._options._metadata,this._options.tunnel);for(const o of n.attachments||[])r=Mn(r,Un(o,this._options.transportOptions&&this._options.transportOptions.textEncoder));const s=this._sendEnvelope(r);s&&s.then(o=>
7this.emit("afterSendEvent",e,o),null)}sendSession(e){const n=Vn(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}recordDroppedEvent(e,n,r){if(this._options.sendClientReports){const s=`${e}:${n}`;g&&f.log(`Adding outcome: "${s}"`),this._outcomes[s]=this._outcomes[s]+1||1}}captureAggregateMetrics(e){g&&f.log(`Flushing aggregated metrics, number of metrics: ${e.length}`);const n=cr(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}on(e,n){this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(n)}emit(e,...n){this._hooks[e]&&this._hooks[e].forEach(r=>r(...n))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=or(this,e),He(this,e),this._integrationsInitialized=!0}_updateSessionFromEvent(e,n){let r=!1,s=!1;const o=n.exception&&n.exception.values;if(o){s=!0;for(const c of o){const u=c.mechanism;if(u&&u.handled===!1){r=!0;break}}}const i=e.status==="ok";(i&&e.errors===0||i&&r)&&(Te(e,{...r&&{status:"crashed"},errors:e.errors||Number(s||r)}),this.captureSession(e))}_isClientDoneProcessing(e){return new pe(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=qt()){const o=this.getOptions(),i=Object.keys(this._integrations);return!n.integrations&&i.length>0&&(n.integrations=i),this.emit("preprocessEvent",e,n),jt(o,e,n,r,this,s).then(a=>{if(a===null)return a;const c={...s.getPropagationContext(),...r?r.getPropagationContext():void 0};if(!(a.contexts&&a.contexts.trace)&&c){const{traceId:d,spanId:l,parentSpanId:y,dsc:h}=c;a.contexts={trace:{trace_id:d,span_id:l,parent_span_id:y},...a.contexts};const b=h||Bt(d,this,r);a.sdkProcessingMetadata={dynamicSamplingContext:b,...a.sdkProcessingMetadata}}return a})}_captureEvent(e,n={},r){return this._processEvent(e,n,r).then(s=>s.event_id,s=>{if(g){const o=s;o.logLevel==="log"?f.log(o.message):f.warn(o)}})}_processEvent(e,n,r){const s=this.getOptions(),{sampleRate:o}=s,i=at(e),a=it(e),c=e.type||"error",u=`before send for type \`${c}\``;if(a&&typeof o=="number"&&Math.random()>o)return this.recordDroppedEvent("sample_rate","error",e),fe(new I(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));const d=c==="replay_event"?"replay":c,y=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,n,r,y).then(h=>{if(h===null)throw this.recordDroppedEvent("event_processor",d,e),new I("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return h;const H=fr(s,h,n);return dr(H,u)}).then(h=>{if(h===null)throw this.recordDroppedEvent("before_send",d,e),new I(`${u} returned \`null\`, will not send event.`,"log");const b=r&&r.getSession();!i&&b&&this._updateSessionFromEvent(b,h);const H=h.transaction_info;if(i&&H&&h.transaction!==e.transaction){const xt="custom";h.transaction_info={...H,source:xt}}return this.sendEvent(h,n),h}).then(null,h=>{throw h instanceof I?h:(this.captureException(h,{data:{__sentry__:!0},originalException:h}),new I(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. 8Reason: ${h}`))})}_process(e){this._numProcessing++,e.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)return this._transport.send(e).then(null,n=>{g&&f.error("Error while sending event:",n)});g&&f.error("Transport disabled")}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.keys(e).map(n=>{const[r,s]=n.split(":");return{reason:r,category:s,quantity:e[n]}})}}function dr(t,e){const n=`${e} must return \`null\` or a valid event.`;if(Gt(t))return t.then(r=>{if(!ee(r)&&r!==null)throw new I(n);return r},r=>{throw new I(`${e} rejected with ${r}`)});if(!ee(t)&&t!==null)throw new I(n);return t}function fr(t,e,n){const{beforeSend:r,beforeSendTransaction:s}=t;return it(e)&&r?r(e,n):at(e)&&s?s(e,n):e}function it(t){return t.type===void 0}function at(t){return t.type==="transaction"}function pr(t,e){e.debug===!0&&(g?f.enable():Xe(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Wt().update(e.initialScope);const r=new t(e);hr(r),gr(r)}function hr(t){const n=he().getStackTop();n.client=t,n.scope.setClient(t)}function gr(t){t.init?t.init():t.setupIntegrations&&t.setupIntegrations()}const mr=30;function ct(t,e,n=Cn(t.bufferSize||mr)){let r={};const s=i=>n.drain(i);function o(i){const a=[];if(Fe(i,(l,y)=>{const h=Me(y);if(Yn(r,h)){const b=je(l,y);t.recordDroppedEvent("ratelimit_backoff",h,b)}else a.push(l)}),a.length===0)return x();const c=P(i[0],a),u=l=>{Fe(c,(y,h)=>{const b=je(y,h);t.recordDroppedEvent(l,Me(h),b)})},d=()=>e({body:Ln(c,t.textEncoder)}).then(l=>(l.statusCode!==void 0&&(l.statusCode<200||l.statusCode>=300)&&g&&f.warn(`Sentry responded with status code ${l.statusCode} to sent event.`),r=Xn(r,l),l),l=>{throw u("network_error"),l});return n.add(d).then(l=>l,l=>{if(l instanceof I)return g&&f.error("Skipped sending event because buffer is full."),u("queue_overflow"),x();throw l})}return o.__sentry__baseTransport__=!0,{send:o,flush:s}}function je(t,e){if(!(e!=="event"&&e!=="transaction"))return Array.isArray(t)?t[1]:void 0}function _r(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:ke})),version:ke}),t._metadata=s}const yr=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],Er=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],ut="InboundFilters",vr=(t={})=>({name:ut,setupOnce(){},processEvent(e,n,r){const s=r.getOptions(),o=Sr(t,s);return Ir(e,o)?null:e}}),lt=vr;k(ut,lt);function Sr(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:yr],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[],...t.disableTransactionDefaults?[]:Er],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function Ir(t,e){return e.ignoreInternal&&Rr(t)?(g&&f.warn(`Event dropped due to being internal Sentry Error. 9Event: ${T(t)}`),!0):br(t,e.ignoreErrors)?(g&&f.warn(`Event dropped due to being matched by \`ignoreErrors\` option. 10Event: ${T(t)}`),!0):Tr(t,e.ignoreTransactions)?(g&&f.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. 11Event: ${T(t)}`),!0):kr(t,e.denyUrls)?(g&&f.warn(`Event dropped due to being matched by \`denyUrls\` option. 12Event: ${T(t)}. 13Url: ${Y(t)}`),!0):wr(t,e.allowUrls)?!1:(g&&f.warn(`Event dropped due to not being matched by \`allowUrls\` option. 14Event: ${T(t)}. 15Url: ${Y(t)}`),!0)}function br(t,e){return t.type||!e||!e.length?!1:Or(t).some(n=>X(n,e))}function Tr(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;const n=t.transaction;return n?X(n,e):!1}function kr(t,e){if(!e||!e.length)return!1;const n=Y(t);return n?X(n,e):!1}function wr(t,e){if(!e||!e.length)return!0;const n=Y(t);return n?X(n,e):!0}function Or(t){const e=[];t.message&&e.push(t.message);let n;try{n=t.exception.values[t.exception.values.length-1]}catch{}return n&&n.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`)),g&&e.length===0&&f.error(`Could not extract message for event ${T(t)}`),e}function Rr(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function $r(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 Y(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?$r(e):null}catch{return g&&f.error(`Cannot extract url for event ${T(t)}`),null}}let Be;const dt="FunctionToString",qe=new WeakMap,Dr=()=>({name:dt,setupOnce(){Be=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=me(this),n=qe.has(S())&&e!==void 0?e:this;return Be.apply(n,t)}}catch{}},setup(t){qe.set(t,!0)}}),ft=Dr;k(dt,ft);const p=_;let ue=0;function pt(){return ue>0}function Nr(){ue++,setTimeout(()=>{ue--})}function A(t,e={}
15,n){if(typeof t!="function")return t;try{const s=t.__sentry_wrapped__;if(s)return s;if(me(t))return t}catch{return t}const r=function(){const s=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);const o=s.map(i=>A(i,e));return t.apply(this,o)}catch(o){throw Nr(),Yt(i=>{i.addEventProcessor(a=>(e.mechanism&&(te(a,void 0,void 0),z(a,e.mechanism)),a.extra={...a.extra,arguments:s},a)),Xt(o)}),o}};try{for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=t[s])}catch{}zt(r,t),Q(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}const E=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function ht(t,e){const n=Ee(t,e),r={type:e&&e.name,value:Pr(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function xr(t,e,n,r){const s=S(),o=s&&s.getOptions().normalizeDepth,i={exception:{values:[{type:ye(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:Lr(e,{isUnhandledRejection:r})}]},extra:{__serialized__:Jt(e,o)}};if(n){const a=Ee(t,n);a.length&&(i.exception.values[0].stacktrace={frames:a})}return i}function J(t,e){return{exception:{values:[ht(t,e)]}}}function Ee(t,e){const n=e.stacktrace||e.stack||"",r=Cr(e);try{return t(n,r)}catch{}return[]}const Ar=/Minified React error #\d+;/i;function Cr(t){if(t){if(typeof t.framesToPop=="number")return t.framesToPop;if(Ar.test(t.message))return 1}return 0}function Pr(t){const e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function Fr(t,e,n,r){const s=n&&n.syntheticException||void 0,o=ve(t,e,s,r);return z(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),x(o)}function Mr(t,e,n="info",r,s){const o=r&&r.syntheticException||void 0,i=le(t,e,o,s);return i.level=n,r&&r.event_id&&(i.event_id=r.event_id),x(i)}function ve(t,e,n,r,s){let o;if(_e(e)&&e.error)return J(t,e.error);if(we(e)||Kt(e)){const i=e;if("stack"in e)o=J(t,e);else{const a=i.name||(we(i)?"DOMError":"DOMException"),c=i.message?`${a}: ${i.message}`:a;o=le(t,c,n,r),te(o,c)}return"code"in i&&(o.tags={...o.tags,"DOMException.code":`${i.code}`}),o}return Vt(e)?J(t,e):ee(e)||ye(e)?(o=xr(t,e,n,s),z(o,{synthetic:!0}),o):(o=le(t,e,n,r),te(o,`${e}`,void 0),z(o,{synthetic:!0}),o)}function le(t,e,n,r){const s={};if(r&&n){const o=Ee(t,n);o.length&&(s.exception={values:[{value:e,stacktrace:{frames:o}}]})}if(Je(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 Lr(t,{isUnhandledRejection:e}){const n=Zt(t),r=e?"promise rejection":"exception";return _e(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:ye(t)?`Event \`${Hr(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Hr(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function Ur(t,{metadata:e,tunnel:n,dsn:r}){const s={event_id:t.event_id,sent_at:new Date().toISOString(),...e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}},...!!n&&!!r&&{dsn:C(r)}},o=jr(t);return P(s,[o])}function jr(t){return[{type:"user_report"},t]}class Br extends lr{constructor(e){const n=p.SENTRY_SDK_SOURCE||sn();_r(e,"browser",["browser"],n),super(e),e.sendClientReports&&p.document&&p.document.addEventListener("visibilitychange",()=>{p.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,n){return Fr(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return Mr(this._options.stackParser,e,n,r,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){E&&f.warn("SDK not enabled, will not capture user feedback.");return}const n=Ur(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(n)}_prepareEvent(e,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r)}_flushOutcomes(){const e=this._clearOutcomes();if(e.length===0){E&&f.log("No outcomes to send");return}if(!this._dsn){E&&f.log("No dsn provided, will not send outcomes");return}E&&f.log("Sending outcomes:",e);const n=qn(e,this._options.tunnel&&C(this._dsn));this._sendEnvelope(n)}}let L;function qr(){if(L)return L;if(ie(p.fetch))return L=p.fetch.bind(p);const t=p.document;let e=p.fetch;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(e=r.fetch),t.head.removeChild(n)}catch(n){E&&f.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n
15)}return L=e.bind(p)}function Gr(){L=void 0}function Wr(t,e=qr()){let n=0,r=0;function s(o){const i=o.body.length;n+=i,r++;const a={body:o.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&r<15,...t.fetchOptions};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 Gr(),n-=i,r--,fe(c)}}return ct(t,s)}const zr=4;function Yr(t){function e(n){return new pe((r,s)=>{const o=new XMLHttpRequest;o.onerror=s,o.onreadystatechange=()=>{o.readyState===zr&&r({statusCode:o.status,headers:{"x-sentry-rate-limits":o.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":o.getResponseHeader("Retry-After")}})},o.open("POST",t.url);for(const i in t.headers)Object.prototype.hasOwnProperty.call(t.headers,i)&&o.setRequestHeader(i,t.headers[i]);o.send(n.body)})}return ct(t,e)}const K="?",Xr=30,Kr=40,Vr=50;function Se(t,e,n,r){const s={filename:t,function:e,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const Jr=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Zr=/\((\S*)(?::(\d+))(?::(\d+))\)/,Qr=t=>{const e=Jr.exec(t);if(e){if(e[2]&&e[2].indexOf("eval")===0){const o=Zr.exec(e[2]);o&&(e[2]=o[1],e[3]=o[2],e[4]=o[3])}const[r,s]=gt(e[1]||K,e[2]);return Se(s,r,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}},es=[Xr,Qr],ts=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ns=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,rs=t=>{const e=ts.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const o=ns.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]||K;return[s,r]=gt(s,r),Se(r,s,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},ss=[Vr,rs],os=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,is=t=>{const e=os.exec(t);return e?Se(e[2],e[1]||K,+e[3],e[4]?+e[4]:void 0):void 0},as=[Kr,is],cs=[es,ss,as],us=Qt(...cs),gt=(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]:K,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},G=1024,mt="Breadcrumbs",ls=(t={})=>{const e={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:mt,setupOnce(){},setup(n){e.console&&fn(ps(n)),e.dom&&gn(fs(n,e.dom)),e.xhr&&Nn(hs(n)),e.fetch&&Sn(gs(n)),e.history&&nt(ms(n)),e.sentry&&n.on&&n.on("beforeSendEvent",ds(n))}}},_t=ls;k(mt,_t);function ds(t){return function(n){S()===t&&O({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:T(n)},{event:n})}}function fs(t,e){return function(r){if(S()!==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>G&&(E&&f.warn(`\`dom.maxStringLength\` cannot exceed ${G}, but a value of ${a} was configured. Sentry will use ${G} instead.`),a=G),typeof i=="string"&&(i=[i]);try{const u=r.event,d=_s(u)?u.target:u;s=en(d,{keyAttrs:i,maxStringLength:a}),o=tn(d)}catch{s="<unknown>"}if(s.length===0)return;const c={category:`ui.${r.name}`,message:s};o&&(c.data={"ui.component_name":o}),O(c,{event:r.event,name:r.name,global:r.global})}}function ps(t){return function(n){if(S()!==t)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:Fn(n.level),message:Oe(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Oe(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;O(r,{input:n.args,level:n.level})}}function hs(t){return function(n){if(S()!==t)return;const{startTimestamp:r,endTimestamp:s}=n,o=n.xhr[M];if(!r||!s||!o)return;const{method:i,url:a,status_code:c,body:u}=o,d={method:i,url:a,status_code:c},l={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s};O({category:"xhr",data:d,type:"http"},l)}}function gs(t){return function(n){if(S()!==t)return;const{startTimestamp:r,endTimestamp:s}=n;
15if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const o=n.fetchData,i={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s};O({category:"fetch",data:o,level:"error",type:"http"},i)}else{const o=n.response,i={...n.fetchData,status_code:o&&o.status},a={input:n.args,response:o,startTimestamp:r,endTimestamp:s};O({category:"fetch",data:i,type:"http"},a)}}}function ms(t){return function(n){if(S()!==t)return;let r=n.from,s=n.to;const o=V(p.location.href);let i=r?V(r):void 0;const a=V(s);(!i||!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),O({category:"navigation",data:{from:r,to:s}})}}function _s(t){return!!t&&!!t.target}const yt="Dedupe",ys=()=>{let t;return{name:yt,setupOnce(){},processEvent(e){if(e.type)return e;try{if(Es(e,t))return E&&f.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}},Et=ys;k(yt,Et);function Es(t,e){return e?!!(vs(t,e)||Ss(t,e)):!1}function vs(t,e){const n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!St(t,e)||!vt(t,e))}function Ss(t,e){const n=Ge(e),r=Ge(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!St(t,e)||!vt(t,e))}function vt(t,e){let n=We(t),r=We(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 St(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 Ge(t){return t.exception&&t.exception.values&&t.exception.values[0]}function We(t){const e=t.exception;if(e)try{return e.values[0].stacktrace.frames}catch{return}}const It="GlobalHandlers",Is=(t={})=>{const e={onerror:!0,onunhandledrejection:!0,...t};return{name:It,setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(bs(n),ze("onerror")),e.onunhandledrejection&&(Ts(n),ze("onunhandledrejection"))}}},bt=Is;k(It,bt);function bs(t){Tn(e=>{const{stackParser:n,attachStacktrace:r}=kt();if(S()!==t||pt())return;const{msg:s,url:o,line:i,column:a,error:c}=e,u=c===void 0&&N(s)?Os(s,o,i,a):Tt(ve(n,c||s,void 0,r,!1),o,i,a);u.level="error",Ze(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function Ts(t){wn(e=>{const{stackParser:n,attachStacktrace:r}=kt();if(S()!==t||pt())return;const s=ks(e),o=ge(s)?ws(s):ve(n,s,void 0,r,!0);o.level="error",Ze(o,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function ks(t){if(ge(t))return t;const e=t;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return t}function ws(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function Os(t,e,n,r){const s=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let o=_e(t)?t.message:t,i="Error";const a=o.match(s);return a&&(i=a[1],o=a[2]),Tt({exception:{values:[{type:i,value:o}]}},e,n,r)}function Tt(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=isNaN(parseInt(r,10))?void 0:r,d=isNaN(parseInt(n,10))?void 0:n,l=N(e)&&e.length>0?e:nn();return c.length===0&&c.push({colno:u,filename:l,function:"?",in_app:!0,lineno:d}),t}function ze(t){E&&f.log(`Global Handler attached: ${t}`)}function kt(){const t=S();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const wt="HttpContext",Rs=()=>({name:wt,setupOnce(){},preprocessEvent(t){if(!p.navigator&&!p.location&&!p.document)return;const e=t.request&&t.request.url||p.location&&p.location.href,{referrer:n}=p.document||{},{userAgent:r}=p.navigator||{},s={...t.request&&t.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},o={...t.request,...e&&{url:e},headers:s};t.request=o}}),Ot=Rs;k(wt,Ot);const $s="cause",Ds=5,Rt="LinkedErrors",Ns=(t={})=>{const e=t.limit||Ds,n=t.key||$s;return{name:Rt,setupOnce(){},preprocessEvent(r,s,o){const i=o.getOptions();on(ht,i.stackParser,i.maxValueLength,n,e,r,s)}}},$t=Ns;k(Rt,$t);const xs=["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"],Dt="TryCatch",As=(t={})=>{const e={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t};return{name:Dt,setupOnce(){e.setTimeout&&m(p,"setTimeout",Ye),e.setInterval&&m(p,"setInterval",Ye),e.requestAnimationFrame&&m(p,"requestAnimationFrame",Cs),e.XMLHttpRequest&&"XMLHttpRequest"in p&&m(XMLHttpRequest.prototype,"send",Ps);const n=e.eventTarget;
15n&&(Array.isArray(n)?n:xs).forEach(Fs)}}},Nt=As;k(Dt,Nt);function Ye(t){return function(...e){const n=e[0];return e[0]=A(n,{mechanism:{data:{function:w(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function Cs(t){return function(e){return t.apply(this,[A(e,{mechanism:{data:{function:"requestAnimationFrame",handler:w(t)},handled:!1,type:"instrument"}})])}}function Ps(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&m(n,s,function(o){const i={mechanism:{data:{function:s,handler:w(o)},handled:!1,type:"instrument"}},a=me(o);return a&&(i.mechanism.data.handler=w(a)),A(o,i)})}),t.apply(this,e)}}function Fs(t){const e=p,n=e[t]&&e[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(m(n,"addEventListener",function(r){return function(s,o,i){try{typeof o.handleEvent=="function"&&(o.handleEvent=A(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:w(o),target:t},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[s,A(o,{mechanism:{data:{function:"addEventListener",handler:w(o),target:t},handled:!1,type:"instrument"}}),i])}}),m(n,"removeEventListener",function(r){return function(s,o,i){const a=o;try{const c=a&&a.__sentry_wrapped__;c&&r.call(this,s,c,i)}catch{}return r.call(this,s,a,i)}}))}const Ms=[lt(),ft(),Nt(),_t(),bt(),$t(),Et(),Ot()];function Ls(t){return[...Ms]}function Bs(t={}){t.defaultIntegrations===void 0&&(t.defaultIntegrations=Ls()),t.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(t.release=__SENTRY_RELEASE__),p.SENTRY_RELEASE&&p.SENTRY_RELEASE.id&&(t.release=p.SENTRY_RELEASE.id)),t.autoSessionTracking===void 0&&(t.autoSessionTracking=!0),t.sendClientReports===void 0&&(t.sendClientReports=!0);const e={...t,stackParser:rn(t.stackParser||us),integrations:sr(t),transport:t.transport||(tt()?Wr:Yr)};pr(Br,e),t.autoSessionTracking&&Hs()}const qs=(t={},e=he())=>{if(!p.document){E&&f.error("Global document not defined in showReportDialog call");return}const{client:n,scope:r}=e.getStackTop(),s=t.dsn||n&&n.getDsn();if(!s){E&&f.error("DSN not configured for showReportDialog call");return}r&&(t.user={...r.getUser(),...t.user}),t.eventId||(t.eventId=e.lastEventId());const o=p.document.createElement("script");o.async=!0,o.crossOrigin="anonymous",o.src=nr(s,t),t.onLoad&&(o.onload=t.onLoad);const{onClose:i}=t;if(i){const c=u=>{if(u.data==="__sentry_reportdialog_closed__")try{i()}finally{p.removeEventListener("message",c)}};p.addEventListener("message",c)}const a=p.document.head||p.document.body;a?a.appendChild(o):E&&f.error("Not injecting report dialog. No injection point found in HTML")};function Hs(){if(typeof p.document>"u"){E&&f.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}Re({ignoreDuration:!0}),$e(),nt(({from:t,to:e})=>{t!==void 0&&t!==e&&(Re({ignoreDuration:!0}),$e())})}export{M as S,p as W,Tn as a,wn as b,P as c,C as d,Sn as e,Nn as f,nt as g,Jn as h,_r as i,Bs as
15j,V as p,qs as s};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.