PageSourceSearch

https://www.tigerairtw.com/assets/sentry-Btydxr-d.js

js tigerairtw.com collected 2026-09-24 09:17:08 UTC 90,219 bytes, 26 lines download raw bytes

1import{i as pe,t as hr,b as Te,e as Tt,l as f,f as U,G as R,C as mr,h as k,o as Ft,j as he,k as Qe,n as In,q as Q,S as yt,r as ee,v as Et,w as gr,x as te,y as _r,z as ye,A as m,B as w,E as G,F as Be,H as je,I as me,J as Tr,K as St,T as yr,M as Er,O as Lt,P as $,Q as qe,R as vn,U as Sr,V as br,W as Ir,X as Rn,Y as vr,Z as Ht,_ as bt,$ as Ut,a0 as Rr,a1 as It,a2 as kn,a3 as kr,a4 as et,a5 as Me,a6 as H,a7 as Ee,a8 as vt,a9 as O,aa as ge,ab as wn,ac as Nn,ad as On,ae as tt,af as wr,ag as Nr,ah as Or,ai as Ar,aj as nt,ak as xe,al as Rt,am as kt,an as Bt,ao as $r,ap as Cr,aq as wt,ar as Dr,as as Pr,at as Mr,au as j,av as jt,aw as An,ax as xr,ay as Fr,az as qt,aA as Gt,d as Lr,aB as Hr,aC as Ur}from"./index-DYVpevD6.js";function Br(t,e,n=250,r,s,i,a){if(!i.exception||!i.exception.values||!a||!pe(a.originalException,Error))return;const o=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;o&&(i.exception.values=jr(rt(t,e,s,a.originalException,r,i.exception.values,o,0),n))}function rt(t,e,n,r,s,i,a,o){if(i.length>=n+1)return i;let c=[...i];if(pe(r[s],Error)){Wt(a,o);const u=t(e,r[s]),d=c.length;Yt(u,s,d,o),c=rt(t,e,n,r[s],s,[u,...c],u,d)}return Array.isArray(r.errors)&&r.errors.forEach((u,d)=>{if(pe(u,Error)){Wt(a,o);const l=t(e,u),h=c.length;Yt(l,`errors[${d}]`,h,o),c=rt(t,e,n,u,s,[l,...c],l,h)}}),c}function Wt(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 Yt(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 jr(t,e){return t.map(n=>(n.value&&(n.value=hr(n.value,e)),n))}const qr=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Gr(t){return t==="http"||t==="https"}function se(t,e=!1){const{host:n,path:r,pass:s,port:i,projectId:a,protocol:o,publicKey:c}=t;return`${o}://${c}${e&&s?`:${s}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${a}`}function Wr(t){const e=qr.exec(t);if(!e){Te(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});return}const[n,r,s="",i,a="",o]=e.slice(1);let c="",u=o;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 $n({host:i,pass:s,path:c,projectId:u,port:a,protocol:n,publicKey:r})}function $n(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function Yr(t){if(!Tt)return!0;const{port:e,projectId:n,protocol:r}=t;return["protocol","publicKey","host","projectId"].find(a=>t[a]?!1:(f.error(`Invalid Sentry Dsn: ${a} missing`),!0))?!1:n.match(/^\d+$/)?Gr(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 Vr(t){const e=typeof t=="string"?Wr(t):$n(t);if(!(!e||!Yr(e)))return e}class P 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 De={},Vt={};function W(t,e){De[t]=De[t]||[],De[t].push(e)}function Y(t,e){Vt[t]||(e(),Vt[t]=!0)}function A(t,e){const n=t&&De[t];if(n)for(const r of n)try{r(e)}catch(s){Tt&&f.error(`Error while triggering instrumentation handler.
2Type: ${t}
3Name: ${U(r)}
4Error:`,s)}}function zr(t){const e="console";W(e,t),Y(e,Xr)}function Xr(){"console"in R&&mr.forEach(function(t){t in R.console&&k(R.console,t,function(e){return Ft[t]=e,function(...n){A("console",{args:n,level:t});const s=Ft[t];s&&s.apply(R.console,n)}})})}const K=R,Kr=1e3;let zt,st,it;function Jr(t){W("dom",t),Y("dom",Zr)}function Zr(){if(!K.document)return;const t=A.bind(null,"dom"),e=Xt(t,!0);K.document.addEventListener("click",e,!1),K.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{const r=K[n]&&K[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(k(r,"addEventListener",function(s){return function(i,a,o){if(i==="click"||i=="keypress")try{const c=this,u=c.__sentry_instrumentation_handlers__=c.__sentry_instrumentation_handlers__||{},d=u[i]=u[i]||{refCount:0};if(!d.handler){const l=Xt(t);d.handler=l,s.call(this,i,l,o)}d.refCount++}catch{}return s.call(this,i,a,o)}}),k(r,"removeEventListener",function(s){return function(i,a,o){if(i==="click"||i=="keypress")try{const c=this,u=c.__sentry_instrumentation_handlers__||{},d=u[i];d&&(d.refCount--,d.refCount<=0&&(s.call(this,i,d.handler,o),d.handler=void 0,delete u[i]),Object.keys(u).length===0&&delete c.__sentry_instrumentation_handlers__)}catch{}return s.call(this,i,a,o)}}))})}function Qr(t){if(t.type!==st)return!1;try{if(!t.target||t.target._sentryId!==it)return!1}catch{}return!0}function es(t,e){return t!=="keypress"?!1:!e||!e.tagName?!0:!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable)}function Xt(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;const r=ts(n);if(es(n.type,r))return;he(n,"_sentryCaptured",!0),r&&!r._sentryId&&he(r,"_sentryId",Qe());
4const s=n.type==="keypress"?"input":n.type;Qr(n)||(t({event:n,name:s,global:e}),st=n.type,it=r?r._sentryId:void 0),clearTimeout(zt),zt=K.setTimeout(()=>{it=void 0,st=void 0},Kr)}}function ts(t){try{return t.target}catch{return null}}const at=In();function Cn(){if(!("fetch"in at))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function ot(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function ns(){if(typeof EdgeRuntime=="string")return!0;if(!Cn())return!1;if(ot(at.fetch))return!0;let t=!1;const e=at.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=ot(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){Tt&&f.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t}function Dn(t){const e="fetch";W(e,t),Y(e,rs)}function rs(){ns()&&k(R,"fetch",function(t){return function(...e){const{method:n,url:r}=ss(e),s={args:e,fetchData:{method:n,url:r},startTimestamp:Date.now()};return A("fetch",{...s}),t.apply(R,e).then(i=>{const a={...s,endTimestamp:Date.now(),response:i};return A("fetch",a),i},i=>{const a={...s,endTimestamp:Date.now(),error:i};throw A("fetch",a),i})}})}function ct(t,e){return!!t&&typeof t=="object"&&!!t[e]}function Kt(t){return typeof t=="string"?t:t?ct(t,"url")?t.url:t.toString?t.toString():"":""}function ss(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){const[n,r]=t;return{url:Kt(n),method:ct(r,"method")?String(r.method).toUpperCase():"GET"}}const e=t[0];return{url:Kt(e),method:ct(e,"method")?String(e.method).toUpperCase():"GET"}}let Re=null;function Pn(t){const e="error";W(e,t),Y(e,is)}function is(){Re=R.onerror,R.onerror=function(t,e,n,r,s){return A("error",{column:r,error:s,line:n,msg:t,url:e}),Re&&!Re.__SENTRY_LOADER__?Re.apply(this,arguments):!1},R.onerror.__SENTRY_INSTRUMENTED__=!0}let ke=null;function Mn(t){const e="unhandledrejection";W(e,t),Y(e,as)}function as(){ke=R.onunhandledrejection,R.onunhandledrejection=function(t){return A("unhandledrejection",t),ke&&!ke.__SENTRY_LOADER__?ke.apply(this,arguments):!0},R.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const we=In();function os(){const t=we.chrome,e=t&&t.app&&t.app.runtime,n="history"in we&&!!we.history.pushState&&!!we.history.replaceState;return!e&&n}const ce=R;let Ne;function Nt(t){const e="history";W(e,t),Y(e,cs)}function cs(){if(!os())return;const t=ce.onpopstate;ce.onpopstate=function(...n){const r=ce.location.href,s=Ne;if(Ne=r,A("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 i=Ne,a=String(s);Ne=a,A("history",{from:i,to:a})}return n.apply(this,r)}}k(ce.history,"pushState",e),k(ce.history,"replaceState",e)}const us=R,J="__sentry_xhr_v3__";function xn(t){W("xhr",t),Y("xhr",ds)}function ds(){if(!us.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;k(t,"open",function(e){return function(...n){const r=Date.now(),s=Q(n[0])?n[0].toUpperCase():void 0,i=ls(n[1]);if(!s||!i)return e.apply(this,n);this[J]={method:s,url:i,request_headers:{}},s==="POST"&&i.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const a=()=>{const o=this[J];if(o&&this.readyState===4){try{o.status_code=this.status}catch{}const c={args:[s,i],endTimestamp:Date.now(),startTimestamp:r,xhr:this};A("xhr",c)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?k(this,"onreadystatechange",function(o){return function(...c){return a(),o.apply(this,c)}}):this.addEventListener("readystatechange",a),k(this,"setRequestHeader",function(o){return function(...c){const[u,d]=c,l=this[J];return l&&Q(u)&&Q(d)&&(l.request_headers[u.toLowerCase()]=d),o.apply(this,c)}}),e.apply(this,n)}}),k(t,"send",function(e){return function(...n){const r=this[J];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 A("xhr",s),e.apply(this,n)}})}function ls(t){if(Q(t))return t;try{return t.toString()}catch{}}function fs(){return"npm"}function ps(t){const e=[];function n(){return t===void 0||e.length<t}function r(a){return e.splice(e.indexOf(a),1)[0]}function s(a){if(!n())return Et(new P("Not adding Promise because buffer limit was reached."));const o=a();return e.indexOf(o)===-1&&e.push(o),o.then(()=>r(o)).then(null,()=>r(o).then(null,()=>{})),o}function i(a){return new yt((o,c)=>{let u=e.length;if(!u)return o(!0);const d=setTimeout(()=>{a&&a>0&&o(!1)},a);e.forEach(l=>{ee(l).then(()=>{--u||(clearTimeout(d),o(!0))},c)})})}return{$:e,add:s,drain:i}}function B(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 hs=["fatal","error","warning","log","info","debug"];function ms(t){return t==="warn"?"warning":hs.includes(t)?t:"log"}function V(t,e=[]){return[t,e]}function gs(t,e){const[n,r]=t;return[n,[...r,e]]}function Jt(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 ut(t,e){return(e||new TextEncoder).encode(t)}function _s(t,e){const[n,r]=t;let s=JSON.stringify(n);
4function i(a){typeof s=="string"?s=typeof a=="string"?s+a:[ut(s,e),a]:s.push(typeof a=="string"?ut(a,e):a)}for(const a of r){const[o,c]=a;if(i(`
5${JSON.stringify(o)}
6`),typeof c=="string"||c instanceof Uint8Array)i(c);else{let u;try{u=JSON.stringify(c)}catch{u=JSON.stringify(gr(c))}i(u)}}return typeof s=="string"?s:Ts(s)}function Ts(t){const e=t.reduce((s,i)=>s+i.length,0),n=new Uint8Array(e);let r=0;for(const s of t)n.set(s,r),r+=s.length;return n}function ys(t,e){const n=typeof t.data=="string"?ut(t.data,e):t.data;return[te({type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),n]}const Es={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:"metric_bucket"};function Zt(t){return Es[t]}function Fn(t){if(!t||!t.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function Ss(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:se(r)},...s&&{trace:te({...s})}}}function bs(t,e,n){const r=[{type:"client_report"},{timestamp:_r(),discarded_events:t}];return V(e?{dsn:e}:{},[r])}const Is=60*1e3;function vs(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${t}`);return isNaN(r)?Is:r-e}function Rs(t,e){return t[e]||t.all||0}function ks(t,e,n=Date.now()){return Rs(t,e)>n}function ws(t,{statusCode:e,headers:n},r=Date.now()){const s={...t},i=n&&n["x-sentry-rate-limits"],a=n&&n["retry-after"];if(i)for(const o of i.trim().split(",")){const[c,u,,,d]=o.split(":",5),l=parseInt(c,10),h=(isNaN(l)?60:l)*1e3;if(!u)s.all=r+h;else for(const p of u.split(";"))p==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(s[p]=r+h):s[p]=r+h}else a?s.all=r+vs(a,r):e===429&&(s.all=r+60*1e3);return s}function q(t){return ye().getScope().getTransaction()}let Qt=!1;function Ns(){Qt||(Qt=!0,Pn(dt),Mn(dt))}function dt(){const t=q();if(t){const e="internal_error";m&&f.log(`[Tracing] Transaction: ${e} -> Global error occured`),t.setStatus(e)}}dt.tag="sentry_tracingErrorCallback";var en;(function(t){t.Ok="ok";const n="deadline_exceeded";t.DeadlineExceeded=n;const r="unauthenticated";t.Unauthenticated=r;const s="permission_denied";t.PermissionDenied=s;const i="not_found";t.NotFound=i;const a="resource_exhausted";t.ResourceExhausted=a;const o="invalid_argument";t.InvalidArgument=o;const c="unimplemented";t.Unimplemented=c;const u="unavailable";t.Unavailable=u;const d="internal_error";t.InternalError=d;const l="unknown_error";t.UnknownError=l;const h="cancelled";t.Cancelled=h;const p="already_exists";t.AlreadyExists=p;const g="failed_precondition";t.FailedPrecondition=g;const y="aborted";t.Aborted=y;const b="out_of_range";t.OutOfRange=b;const E="data_loss";t.DataLoss=E})(en||(en={}));function Os(t){if(t<400&&t>=100)return"ok";if(t>=400&&t<500)switch(t){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(t>=500&&t<600)switch(t){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}function Ot(t,e){t.setTag("http.status_code",String(e)),t.setData("http.response.status_code",e);const n=Os(e);n!=="unknown_error"&&t.setStatus(n)}function z(t){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const e=w(),n=t||e&&e.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function Fe(t){if(!z())return;const e=$s(t),n=ye(),r=t.scope?t.scope.getSpan():lt();if(t.onlyIfParent&&!r)return;const a=(t.scope||G()).clone();return As(n,{parentSpan:r,spanContext:e,forceTransaction:t.forceTransaction,scope:a})}function lt(){return G().getSpan()}function As(t,{parentSpan:e,spanContext:n,forceTransaction:r,scope:s}){if(!z())return;const i=je();let a;if(e&&!r)a=e.startChild(n);else if(e){const o=me(e),{traceId:c,spanId:u}=e.spanContext(),d=Tr(e);a=t.startTransaction({traceId:c,parentSpanId:u,parentSampled:d,...n,metadata:{dynamicSamplingContext:o,...n.metadata}})}else{const{traceId:o,dsc:c,parentSpanId:u,sampled:d}={...i.getPropagationContext(),...s.getPropagationContext()};a=t.startTransaction({traceId:o,parentSpanId:u,parentSampled:d,...n,metadata:{dynamicSamplingContext:c,...n.metadata}})}return s.setSpan(a),Cs(a,s,i),a}function $s(t){if(t.startTime){const e={...t};
6return e.startTimestamp=Be(t.startTime),delete e.startTime,e}return t}const Ln="_sentryScope",Hn="_sentryIsolationScope";function Cs(t,e,n){t&&(he(t,Hn,n),he(t,Ln,e))}function Ds(t){return{scope:t[Ln],isolationScope:t[Hn]}}const M="sentry.source",Z="sentry.sample_rate",Oe="sentry.op",F="sentry.origin",Ps="profile_id";class Un{constructor(e=1e3){this._maxlen=e,this.spans=[]}add(e){this.spans.length>this._maxlen?e.spanRecorder=void 0:this.spans.push(e)}}class Ge{constructor(e={}){this._traceId=e.traceId||Qe(),this._spanId=e.spanId||Qe().substring(16),this._startTime=e.startTimestamp||St(),this.tags=e.tags?{...e.tags}:{},this.data=e.data?{...e.data}:{},this.instrumenter=e.instrumenter||"sentry",this._attributes={},this.setAttributes({[F]:e.origin||"manual",[Oe]:e.op,...e.attributes}),this._name=e.name||e.description,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.status&&(this._status=e.status),e.endTimestamp&&(this._endTime=e.endTimestamp),e.exclusiveTime!==void 0&&(this._exclusiveTime=e.exclusiveTime),this._measurements=e.measurements?{...e.measurements}:{}}get name(){return this._name||""}set name(e){this.updateName(e)}get description(){return this._name}set description(e){this._name=e}get traceId(){return this._traceId}set traceId(e){this._traceId=e}get spanId(){return this._spanId}set spanId(e){this._spanId=e}set parentSpanId(e){this._parentSpanId=e}get parentSpanId(){return this._parentSpanId}get sampled(){return this._sampled}set sampled(e){this._sampled=e}get attributes(){return this._attributes}set attributes(e){this._attributes=e}get startTimestamp(){return this._startTime}set startTimestamp(e){this._startTime=e}get endTimestamp(){return this._endTime}set endTimestamp(e){this._endTime=e}get status(){return this._status}set status(e){this._status=e}get op(){return this._attributes[Oe]}set op(e){this.setAttribute(Oe,e)}get origin(){return this._attributes[F]}set origin(e){this.setAttribute(F,e)}spanContext(){const{_spanId:e,_traceId:n,_sampled:r}=this;return{spanId:e,traceId:n,traceFlags:r?yr:Er}}startChild(e){const n=new Ge({...e,parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId});n.spanRecorder=this.spanRecorder,n.spanRecorder&&n.spanRecorder.add(n);const r=Lt(this);if(n.transaction=r,m&&r){const s=e&&e.op||"< unknown op >",i=$(n).description||"< unknown name >",a=r.spanContext().spanId,o=`[Tracing] Starting '${s}' span on transaction '${i}' (${a}).`;f.log(o),this._logMessage=o}return n}setTag(e,n){return this.tags={...this.tags,[e]:n},this}setData(e,n){return this.data={...this.data,[e]:n},this}setAttribute(e,n){n===void 0?delete this._attributes[e]:this._attributes[e]=n}setAttributes(e){Object.keys(e).forEach(n=>this.setAttribute(n,e[n]))}setStatus(e){return this._status=e,this}setHttpStatus(e){return Ot(this,e),this}setName(e){this.updateName(e)}updateName(e){return this._name=e,this}isSuccess(){return this._status==="ok"}finish(e){return this.end(e)}end(e){if(this._endTime)return;const n=Lt(this);if(m&&n&&n.spanContext().spanId!==this._spanId){const r=this._logMessage;r&&f.log(r.replace("Starting","Finishing"))}this._endTime=Be(e)}toTraceparent(){return qe(this)}toContext(){return te({data:this._getData(),description:this._name,endTimestamp:this._endTime,op:this.op,parentSpanId:this._parentSpanId,sampled:this._sampled,spanId:this._spanId,startTimestamp:this._startTime,status:this._status,tags:this.tags,traceId:this._traceId})}updateWithContext(e){return this.data=e.data||{},this._name=e.name||e.description,this._endTime=e.endTimestamp,this.op=e.op,this._parentSpanId=e.parentSpanId,this._sampled=e.sampled,this._spanId=e.spanId||this._spanId,this._startTime=e.startTimestamp||this._startTime,this._status=e.status,this.tags=e.tags||{},this._traceId=e.traceId||this._traceId,this}getTraceContext(){return vn(this)}getSpanJSON(){return te({data:this._getData(),description:this._name,op:this._attributes[Oe],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:this._status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[F],_metrics_summary:void 0,profile_id:this._attributes[Ps],exclusive_time:this._exclusiveTime,measurements:Object.keys(this._measurements).length>0?this._measurements:void 0})}isRecording(){return!this._endTime&&!!this._sampled}
6toJSON(){return this.getSpanJSON()}_getData(){const{data:e,_attributes:n}=this,r=Object.keys(e).length>0,s=Object.keys(n).length>0;if(!(!r&&!s))return r&&s?{...e,...n}:r?e:n}}class Bn extends Ge{constructor(e,n){super(e),this._contexts={},this._hub=n||ye(),this._name=e.name||"",this._metadata={...e.metadata},this._trimEnd=e.trimEnd,this.transaction=this;const r=this._metadata.dynamicSamplingContext;r&&(this._frozenDynamicSamplingContext={...r})}get name(){return this._name}set name(e){this.setName(e)}get metadata(){return{source:"custom",spanMetadata:{},...this._metadata,...this._attributes[M]&&{source:this._attributes[M]},...this._attributes[Z]&&{sampleRate:this._attributes[Z]}}}set metadata(e){this._metadata=e}setName(e,n="custom"){this._name=e,this.setAttribute(M,n)}updateName(e){return this._name=e,this}initSpanRecorder(e=1e3){this.spanRecorder||(this.spanRecorder=new Un(e)),this.spanRecorder.add(this)}setContext(e,n){n===null?delete this._contexts[e]:this._contexts[e]=n}setMeasurement(e,n,r=""){this._measurements[e]={value:n,unit:r}}setMetadata(e){this._metadata={...this._metadata,...e}}end(e){const n=Be(e),r=this._finishTransaction(n);if(r)return this._hub.captureEvent(r)}toContext(){const e=super.toContext();return te({...e,name:this._name,trimEnd:this._trimEnd})}updateWithContext(e){return super.updateWithContext(e),this._name=e.name||"",this._trimEnd=e.trimEnd,this}getDynamicSamplingContext(){return me(this)}setHub(e){this._hub=e}getProfileId(){if(this._contexts!==void 0&&this._contexts.profile!==void 0)return this._contexts.profile.profile_id}_finishTransaction(e){if(this._endTime!==void 0)return;this._name||(m&&f.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>"),super.end(e);const n=this._hub.getClient();if(n&&n.emit&&n.emit("finishTransaction",this),this._sampled!==!0){m&&f.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),n&&n.recordDroppedEvent("sample_rate","transaction");return}const r=this.spanRecorder?this.spanRecorder.spans.filter(d=>d!==this&&$(d).timestamp):[];if(this._trimEnd&&r.length>0){const d=r.map(l=>$(l).timestamp).filter(Boolean);this._endTime=d.reduce((l,h)=>l>h?l:h)}const{scope:s,isolationScope:i}=Ds(this),{metadata:a}=this,{source:o}=a,c={contexts:{...this._contexts,trace:vn(this)},spans:r,start_timestamp:this._startTime,tags:this.tags,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{...a,capturedSpanScope:s,capturedSpanIsolationScope:i,...te({dynamicSamplingContext:me(this)})},_metrics_summary:void 0,...o&&{transaction_info:{source:o}}};return Object.keys(this._measurements).length>0&&(m&&f.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),c.measurements=this._measurements),m&&f.log(`[Tracing] Finishing ${this.op} transaction: ${this._name}.`),c}}const Pe={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},Ms="finishReason",X=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class xs extends Un{constructor(e,n,r,s){super(s),this._pushActivity=e,this._popActivity=n,this.transactionSpanId=r}add(e){if(e.spanContext().spanId!==this.transactionSpanId){const n=e.end;e.end=(...r)=>(this._popActivity(e.spanContext().spanId),n.apply(e,r)),$(e).timestamp===void 0&&this._pushActivity(e.spanContext().spanId)}super.add(e)}}class Fs extends Bn{constructor(e,n,r=Pe.idleTimeout,s=Pe.finalTimeout,i=Pe.heartbeatInterval,a=!1,o=!1){super(e,n),this._idleHub=n,this._idleTimeout=r,this._finalTimeout=s,this._heartbeatInterval=i,this._onScope=a,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=X[4],this._autoFinishAllowed=!o,a&&(m&&f.log(`Setting idle transaction on scope. Span ID: ${this.spanContext().spanId}`),n.getScope().setSpan(this)),o||this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=X[3],this.end())},this._finalTimeout)}end(e){const n=Be(e);if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setAttribute(Ms,this._finishReason),this.spanRecorder){m&&f.log("[Tracing] finishing IdleTransaction",new Date(n*1e3).toISOString(),this.op);for(const r of this._beforeFinishCallbacks)r(this,n);this.spanRecorder.spans=this.spanRecorder.spans.filter(r=>{if(r.spanContext().spanId===this.spanContext().spanId)return!0;$(r).timestamp||(r.setStatus("cancelled"),r.end(n),m&&f.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(r,void 0,2)));const{start_timestamp:s,timestamp:i}=$(r),a=s&&s<n,o=(this._finalTimeout+this._idleTimeout)/1e3,c=i&&s&&i-s<o;if(m){const u=JSON.stringify(r,void 0,2);a?c||f.log("[Tracing] discarding Span since it finished after Transaction final timeout",u):f.log("[Tracing] discarding Span since it happened after Transaction was finished",u)}return a&&c}),m&&f.log("[Tracing] flushing IdleTransaction")}else m&&f.log("[Tracing] No active IdleTransaction");if(this._onScope){const r=this._idleHub.getScope();r.getTransaction()===this&&r.setSpan(void 0)}return super.end(e)}registerBeforeFinishCallback(e){this._beforeFinishCallbacks.push(e)}initSpanRecorder(e){if(!this.spanRecorder){const n=s=>{this._finished||this._pushActivity(s)},r=s=>{this._finished||this._popActivity(s)};this.spanRecorder=new xs(n,r,this.spanContext().spanId,e),m&&f.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(e,{restartOnChildSpanChange:n}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=n===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=X[5],this.end(e)))}setFinishReason(e){this._finishReason=e}sendAutoFinishSignal(){this._autoFinishAllowed||(m&&f.log("[Tracing] Received finish signal for idle transaction."),this._restartIdleTimeout(),this._autoFinishAllowed=!0)}_restartIdleTimeout(e){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=X[1],this.end(e))},this._idleTimeout)}
6_pushActivity(e){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),m&&f.log(`[Tracing] pushActivity: ${e}`),this.activities[e]=!0,m&&f.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(e){if(this.activities[e]&&(m&&f.log(`[Tracing] popActivity ${e}`),delete this.activities[e],m&&f.log("[Tracing] new activities count",Object.keys(this.activities).length)),Object.keys(this.activities).length===0){const n=St();this._idleTimeoutCanceledPermanently?this._autoFinishAllowed&&(this._finishReason=X[5],this.end(n)):this._restartIdleTimeout(n+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const e=Object.keys(this.activities).join("");e===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=e,this._heartbeatCounter>=3?this._autoFinishAllowed&&(m&&f.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=X[0],this.end()):this._pingHeartbeat()}_pingHeartbeat(){m&&f.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}}function jn(t,e,n){if(!z(e))return t.sampled=!1,t;if(t.sampled!==void 0)return t.setAttribute(Z,Number(t.sampled)),t;let r;return typeof e.tracesSampler=="function"?(r=e.tracesSampler(n),t.setAttribute(Z,Number(r))):n.parentSampled!==void 0?r=n.parentSampled:typeof e.tracesSampleRate!="undefined"?(r=e.tracesSampleRate,t.setAttribute(Z,Number(r))):(r=1,t.setAttribute(Z,r)),qn(r)?r?(t.sampled=Math.random()<r,t.sampled?(m&&f.log(`[Tracing] starting ${t.op} transaction - ${$(t).description}`),t):(m&&f.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`),t)):(m&&f.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),t.sampled=!1,t):(m&&f.warn("[Tracing] Discarding transaction because of invalid sample rate."),t.sampled=!1,t)}function qn(t){return Sr(t)||!(typeof t=="number"||typeof t=="boolean")?(m&&f.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t)} of type ${JSON.stringify(typeof t)}.`),!1):t<0||t>1?(m&&f.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${t}.`),!1):!0}function Ls(){const e=this.getScope().getSpan();return e?{"sentry-trace":qe(e)}:{}}function Hs(t,e){const n=this.getClient(),r=n&&n.getOptions()||{},s=r.instrumenter||"sentry",i=t.instrumenter||"sentry";s!==i&&(m&&f.error(`A transaction was started with instrumenter=\`${i}\`, but the SDK is configured with the \`${s}\` instrumenter.
7The transaction will not be sampled. Please use the ${s} instrumentation to start transactions.`),t.sampled=!1);let a=new Bn(t,this);return a=jn(a,r,{name:t.name,parentSampled:t.parentSampled,transactionContext:t,attributes:{...t.data,...t.attributes},...e}),a.isRecording()&&a.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",a),a}function tn(t,e,n,r,s,i,a,o=!1){const c=t.getClient(),u=c&&c.getOptions()||{};let d=new Fs(e,t,n,r,a,s,o);return d=jn(d,u,{name:e.name,parentSampled:e.parentSampled,transactionContext:e,attributes:{...e.data,...e.attributes},...i}),d.isRecording()&&d.initSpanRecorder(u._experiments&&u._experiments.maxSpans),c&&c.emit&&c.emit("startTransaction",d),d}function Us(){const t=br();t.__SENTRY__&&(t.__SENTRY__.extensions=t.__SENTRY__.extensions||{},t.__SENTRY__.extensions.startTransaction||(t.__SENTRY__.extensions.startTransaction=Hs),t.__SENTRY__.extensions.traceHeaders||(t.__SENTRY__.extensions.traceHeaders=Ls),Ns())}function Bs(t,e,n){const r=q();r&&r.setMeasurement(t,e,n)}function js(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 qs(t,e,n,r){const s=Fn(n),i={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&e&&{dsn:se(e)}},a="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return V(i,[a])}function Gs(t,e,n,r){const s=Fn(n),i=t.type&&t.type!=="replay_event"?t.type:"event";js(t,n&&n.sdk);const a=Ss(t,s,r,e);return delete t.sdkProcessingMetadata,V(a,[[{type:i},t]])}const Ws="7";function Ys(t){const e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function Vs(t){return`${Ys(t)}${t.projectId}/envelope/`}function zs(t,e){return Ir({sentry_key:t.publicKey,sentry_version:Ws,...e&&{sentry_client:`${e.name}/${e.version}`}})}function Xs(t,e={}){const n=typeof e=="string"?e:e.tunnel,r=typeof e=="string"||!e._metadata?void 0:e._metadata.sdk;return n||`${Vs(t)}?${zs(t,r)}`}const nn=[];function Ks(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 Js(t){const e=t.defaultIntegrations||[],n=t.integrations;e.forEach(a=>{a.isDefaultInstance=!0});let r;Array.isArray(n)?r=[...e,...n]:typeof n=="function"?r=Rn(n(e)):r=e;const s=Ks(r),i=Qs(s,a=>a.name==="Debug");if(i!==-1){const[a]=s.splice(i,1);s.push(a)}return s}function Zs(t,e){const n={};return e.forEach(r=>{r&&Gn(t,r,n)}),n}function rn(t,e){for(const n of e)n&&n.afterAllSetup&&n.afterAllSetup(t)}function Gn(t,e,n){if(n[e.name]){m&&f.log(`Integration skipped because it was already installed: ${e.name}`);return}if(n[e.name]=e,nn.indexOf(e.name)===-1&&(e.setupOnce(vr,ye),nn.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,i)=>r(s,i,t))}if(t.addEventProcessor&&typeof e.processEvent=="function"){const r=e.processEvent.bind(e),s=(i,a)=>r(i,a,t);s.id=e.name,t.addEventProcessor(s)}m&&f.log(`Integration installed: ${e.name}`)}function Qs(t,e){for(let n=0;n<t.length;n++)if(e(t[n])===!0)return n;return-1}function ei(t){let e="";for(const n of t){const r=Object.entries(n.tags),s=r.length>0?`|#${r.map(([i,a])=>`${i}:${a}`).join(",")}`:"";e+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${s}|T${n.timestamp}
8`}return e}function ti(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=se(e));const i=ni(t);return V(s,[i])}function ni(t){const e=ei(t);return[{type:"statsd",length:e.length},e]}const sn="Not capturing exception because it's already been captured.";class ri{constructor(e){if(this._options=e,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Vr(e.dsn):m&&f.warn("No DSN provided, client will not send events."),this._dsn){const n=Xs(this._dsn,e);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:n})}}captureException(e,n,r){if(Ht(e)){m&&f.log(sn);return}let s=n&&n.event_id;return this._process(this.eventFromException(e,n).then(i=>this._captureEvent(i,n,r)).then(i=>{s=i}
8)),s}captureMessage(e,n,r,s){let i=r&&r.event_id;const a=kn(e)?e:String(e),o=bt(e)?this.eventFromMessage(a,n,r):this.eventFromException(e,r);return this._process(o.then(c=>this._captureEvent(c,r,s)).then(c=>{i=c})),i}captureEvent(e,n,r){if(n&&n.originalException&&Ht(n.originalException)){m&&f.log(sn);return}let s=n&&n.event_id;const a=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,n,a||r).then(o=>{s=o})),s}captureSession(e){typeof e.release!="string"?m&&f.warn("Discarded session because of missing or non-string release"):(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.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(e).then(r=>n.flush(e).then(s=>r&&s))):ee(!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 m&&f.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}addIntegration(e){const n=this._integrations[e.name];Gn(this,e,this._integrations),n||rn(this,[e])}sendEvent(e,n={}){this.emit("beforeSendEvent",e,n);let r=Gs(e,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])r=gs(r,ys(i,this._options.transportOptions&&this._options.transportOptions.textEncoder));const s=this._sendEnvelope(r);s&&s.then(i=>this.emit("afterSendEvent",e,i),null)}sendSession(e){const n=qs(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}recordDroppedEvent(e,n,r){if(this._options.sendClientReports){const s=typeof r=="number"?r:1,i=`${e}:${n}`;m&&f.log(`Recording outcome: "${i}"${s>1?` (${s} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+s}}captureAggregateMetrics(e){m&&f.log(`Flushing aggregated metrics, number of metrics: ${e.length}`);const n=ti(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=Zs(this,e),rn(this,e),this._integrationsInitialized=!0}_updateSessionFromEvent(e,n){let r=!1,s=!1;const i=n.exception&&n.exception.values;if(i){s=!0;for(const c of i){const u=c.mechanism;if(u&&u.handled===!1){r=!0;break}}}const a=e.status==="ok";(a&&e.errors===0||a&&r)&&(Ut(e,{...r&&{status:"crashed"},errors:e.errors||Number(s||r)}),this.captureSession(e))}_isClientDoneProcessing(e){return new yt(n=>{let r=0;const s=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=s,e&&r>=e&&(clearInterval(i),n(!1)))},s)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,n,r,s=je()){const i=this.getOptions(),a=Object.keys(this._integrations);return!n.integrations&&a.length>0&&(n.integrations=a),this.emit("preprocessEvent",e,n),Rr(i,e,n,r,this,s).then(o=>{if(o===null)return o;const c={...s.getPropagationContext(),...r?r.getPropagationContext():void 0};if(!(o.contexts&&o.contexts.trace)&&c){const{traceId:d,spanId:l,parentSpanId:h,dsc:p}=c;o.contexts={trace:{trace_id:d,span_id:l,parent_span_id:h},...o.contexts};const g=p||It(d,this,r);o.sdkProcessingMetadata={dynamicSamplingContext:g,...o.sdkProcessingMetadata}}return o})}_captureEvent(e,n={},r){return this._processEvent(e,n,r).then(s=>s.event_id,s=>{if(m){const i=s;i.logLevel==="log"?f.log(i.message):f.warn(i)}})}_processEvent(e,n,r){const s=this.getOptions(),{sampleRate:i}=s,a=Yn(e),o=Wn(e),c=e.type||"error",u=`before send for type \`${c}\``;if(o&&typeof i=="number"&&Math.random()>i)return this.recordDroppedEvent("sample_rate","error",e),Et(new P(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const d=c==="replay_event"?"replay":c,h=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,n,r,h).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",d,e),new P("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return p;const y=ii(s,p,n);return si(y,u)}).then(p=>{if(p===null){if(this.recordDroppedEvent("before_send",d,e),a){const E=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",E)}throw new P(`${u} returned \`null\`, will not send event.`,"log")}const g=r&&r.getSession();if(!a&&g&&this._updateSessionFromEvent(g,p),a){const b=p.sdkProcessingMetadata&&p.sdkProcessingMetadata.spanCountBeforeProcessing||0,E=p.spans?p.spans.length:0,N=b-E;N>0&&this.recordDroppedEvent("before_send","span",N)}const y=p.transaction_info;if(a&&y&&p.transaction!==e.transaction){const b="custom";p.transaction_info={...y,source:b}}return this.sendEvent(p,n),p}).then(null,p=>{throw p instanceof P?p:(this.captureException(p,{data:{__sentry__:!0},originalException:p}),new P(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
9Reason: ${p}`))})}_process(e){this._numProcessing++,e.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}
9_sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)return this._transport.send(e).then(null,n=>{m&&f.error("Error while sending event:",n)});m&&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 si(t,e){const n=`${e} must return \`null\` or a valid event.`;if(kr(t))return t.then(r=>{if(!et(r)&&r!==null)throw new P(n);return r},r=>{throw new P(`${e} rejected with ${r}`)});if(!et(t)&&t!==null)throw new P(n);return t}function ii(t,e,n){const{beforeSend:r,beforeSendTransaction:s}=t;if(Wn(e)&&r)return r(e,n);if(Yn(e)&&s){if(e.spans){const i=e.spans.length;e.sdkProcessingMetadata={...e.sdkProcessingMetadata,spanCountBeforeProcessing:i}}return s(e,n)}return e}function Wn(t){return t.type===void 0}function Yn(t){return t.type==="transaction"}function ai(t,e){e.debug===!0&&(m?f.enable():Te(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),G().update(e.initialScope);const r=new t(e);oi(r),ci(r)}function oi(t){const n=ye().getStackTop();n.client=t,n.scope.setClient(t)}function ci(t){t.init?t.init():t.setupIntegrations&&t.setupIntegrations()}const ui=30;function Vn(t,e,n=ps(t.bufferSize||ui)){let r={};const s=a=>n.drain(a);function i(a){const o=[];if(Jt(a,(l,h)=>{const p=Zt(h);if(ks(r,p)){const g=an(l,h);t.recordDroppedEvent("ratelimit_backoff",p,g)}else o.push(l)}),o.length===0)return ee();const c=V(a[0],o),u=l=>{Jt(c,(h,p)=>{const g=an(h,p);t.recordDroppedEvent(l,Zt(p),g)})},d=()=>e({body:_s(c,t.textEncoder)}).then(l=>(l.statusCode!==void 0&&(l.statusCode<200||l.statusCode>=300)&&m&&f.warn(`Sentry responded with status code ${l.statusCode} to sent event.`),r=ws(r,l),l),l=>{throw u("network_error"),l});return n.add(d).then(l=>l,l=>{if(l instanceof P)return m&&f.error("Skipped sending event because buffer is full."),u("queue_overflow"),ee();throw l})}return i.__sentry__baseTransport__=!0,{send:i,flush:s}}function an(t,e){if(!(e!=="event"&&e!=="transaction"))return Array.isArray(t)?t[1]:void 0}function di(t,e){const n={sent_at:new Date().toISOString()};e&&(n.dsn=se(e));const r=t.map(li);return V(n,r)}function li(t){return[{type:"span"},t]}function fi(t,e,n=[e],r="npm"){const s=t._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${e}`,packages:n.map(i=>({name:`${r}:@sentry/${i}`,version:Me})),version:Me}),t._metadata=s}const pi=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/],hi=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],mi="InboundFilters",gi=((t={})=>({name:mi,setupOnce(){},processEvent(e,n,r){const s=r.getOptions(),i=Ti(t,s);return yi(e,i)?null:e}})),_i=gi;function Ti(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:pi],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[],...t.disableTransactionDefaults?[]:hi],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function yi(t,e){return e.ignoreInternal&&Ri(t)?(m&&f.warn(`Event dropped due to being internal Sentry Error.
10Event: ${H(t)}`),!0):Ei(t,e.ignoreErrors)?(m&&f.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
11Event: ${H(t)}`),!0):Si(t,e.ignoreTransactions)?(m&&f.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
12Event: ${H(t)}`),!0):bi(t,e.denyUrls)?(m&&f.warn(`Event dropped due to being matched by \`denyUrls\` option.
13Event: ${H(t)}.
14Url: ${Le(t)}`),!0):Ii(t,e.allowUrls)?!1:(m&&f.warn(`Event dropped due to not being matched by \`allowUrls\` option.
15Event: ${H(t)}.
16Url: ${Le(t)}`),!0)}function Ei(t,e){return t.type||!e||!e.length?!1:vi(t).some(n=>Ee(n,e))}function Si(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;const n=t.transaction;return n?Ee(n,e):!1}function bi(t,e){if(!e||!e.length)return!1;const n=Le(t);return n?Ee(n,e):!1}function Ii(t,e){if(!e||!e.length)return!0;const n=Le(t);return n?Ee(n,e):!0}function vi(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}`)),m&&e.length===0&&f.error(`Could not extract message for event ${H(t)}`),e}function Ri(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function ki(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 Le(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?ki(e):null}catch{return m&&f.error(`Cannot extract url for event ${H(t)}`),null}}let on;const wi="FunctionToString",cn=new WeakMap,Ni=(()=>({name:wi,setupOnce(){on=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=vt(this),n=cn.has(w())&&e!==void 0?e:this;return on.apply(n,t)}}catch{}},setup(t){cn.set(t,!0)}})),Oi=Ni,S=typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__,_=R;function Ai(){_.document?_.document.addEventListener("visibilitychange",()=>{const t=q();if(_.document.hidden&&t){const e="cancelled",{op:n,status:r}=$(t);S&&f.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${n}`),r||t.setStatus(e),t.setTag("visibilitychange","document.hidden"),t.end()}}):S&&f.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const Se=(t,e,n)=>{let r,s;return i=>{e.value>=0&&(i||n)&&(s=e.value-(r||0),(s||r===void 0)&&(r=e.value,e.delta=s,t(e)))}},$i=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,Ci=()=>{const t=_.performance.timing,e=_.performance.navigation.type,n={entryType:"navigation",startTime:0,type:e==2?"back_forward":e===1?"reload":"navigate"};for(const r in t)r!=="navigationStart"&&r!=="toJSON"&&(n[r]=Math.max(t[r]-t.navigationStart,0));return n},We=()=>_.__WEB_VITALS_POLYFILL__?_.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||Ci()):_.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],At=()=>{const t=We();return t&&t.activationStart||0},be=(t,e)=>{const n=We();let r="navigate";return n&&(_.document&&_.document.prerendering||At()>0?r="prerender":r=n.type.replace(/_/g,"-")),{name:t,value:typeof e=="undefined"?-1:e,rating:"good",delta:0,entries:[],id:$i(),navigationType:r}},ie=(t,e,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver(s=>{e(s.getEntries())});return r.observe({type:t,buffered:!0,...n}),r}}catch{}},Ie=(t,e)=>{const n=r=>{(r.type==="pagehide"||_.document.visibilityState==="hidden")&&(t(r),e&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};_.document&&(addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0))},Di=(t,e={})=>{const n=be("CLS",0);let r,s=0,i=[];const a=c=>
16{c.forEach(u=>{if(!u.hadRecentInput){const d=i[0],l=i[i.length-1];s&&i.length!==0&&u.startTime-l.startTime<1e3&&u.startTime-d.startTime<5e3?(s+=u.value,i.push(u)):(s=u.value,i=[u]),s>n.value&&(n.value=s,n.entries=i,r&&r())}})},o=ie("layout-shift",a);if(o){r=Se(t,n,e.reportAllChanges);const c=()=>{a(o.takeRecords()),r(!0)};return Ie(c),c}};let He=-1;const Pi=()=>{_.document&&_.document.visibilityState&&(He=_.document.visibilityState==="hidden"&&!_.document.prerendering?0:1/0)},Mi=()=>{Ie(({timeStamp:t})=>{He=t},!0)},$t=()=>(He<0&&(Pi(),Mi()),{get firstHiddenTime(){return He}}),xi=t=>{const e=$t(),n=be("FID");let r;const s=o=>{o.startTime<e.firstHiddenTime&&(n.value=o.processingStart-o.startTime,n.entries.push(o),r(!0))},i=o=>{o.forEach(s)},a=ie("first-input",i);r=Se(t,n),a&&Ie(()=>{i(a.takeRecords()),a.disconnect()},!0)};let zn=0,Ve=1/0,Ae=0;const Fi=t=>{t.forEach(e=>{e.interactionId&&(Ve=Math.min(Ve,e.interactionId),Ae=Math.max(Ae,e.interactionId),zn=Ae?(Ae-Ve)/7+1:0)})};let ft;const Li=()=>ft?zn:performance.interactionCount||0,Hi=()=>{"interactionCount"in performance||ft||(ft=ie("event",Fi,{type:"event",buffered:!0,durationThreshold:0}))},Xn=()=>Li(),un=10,x=[],ze={},dn=t=>{const e=x[x.length-1],n=ze[t.interactionId];if(n||x.length<un||t.duration>e.latency){if(n)n.entries.push(t),n.latency=Math.max(n.latency,t.duration);else{const r={id:t.interactionId,latency:t.duration,entries:[t]};ze[r.id]=r,x.push(r)}x.sort((r,s)=>s.latency-r.latency),x.splice(un).forEach(r=>{delete ze[r.id]})}},Ui=()=>{const t=Math.min(x.length-1,Math.floor(Xn()/50));return x[t]},Bi=(t,e)=>{e=e||{},Hi();const n=be("INP");let r;const s=a=>{a.forEach(c=>{c.interactionId&&dn(c),c.entryType==="first-input"&&!x.some(d=>d.entries.some(l=>c.duration===l.duration&&c.startTime===l.startTime))&&dn(c)});const o=Ui();o&&o.latency!==n.value&&(n.value=o.latency,n.entries=o.entries,r())},i=ie("event",s,{durationThreshold:e.durationThreshold||40});r=Se(t,n,e.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),Ie(()=>{s(i.takeRecords()),n.value<0&&Xn()>0&&(n.value=0,n.entries=[]),r(!0)}))},ln={},ji=t=>{const e=$t(),n=be("LCP");let r;const s=a=>{const o=a[a.length-1];if(o){const c=Math.max(o.startTime-At(),0);c<e.firstHiddenTime&&(n.value=c,n.entries=[o],r())}},i=ie("largest-contentful-paint",s);if(i){r=Se(t,n);const a=()=>{ln[n.id]||(s(i.takeRecords()),i.disconnect(),ln[n.id]=!0,r(!0))};return["keydown","click"].forEach(o=>{_.document&&addEventListener(o,a,{once:!0,capture:!0})}),Ie(a,!0),a}},pt=t=>{_.document&&(_.document.prerendering?addEventListener("prerenderingchange",()=>pt(t),!0):_.document.readyState!=="complete"?addEventListener("load",()=>pt(t),!0):setTimeout(t,0))},qi=(t,e)=>{e=e||{};const n=be("TTFB"),r=Se(t,n,e.reportAllChanges);pt(()=>{const s=We();if(s){if(n.value=Math.max(s.responseStart-At(),0),n.value<0||n.value>performance.now())return;n.entries=[s],r(!0)}})},de={},Ue={};let Kn,Jn,Zn,Qn,er;function Gi(t,e=!1){return ve("cls",t,Xi,Kn,e)}function Wi(t,e=!1){return ve("lcp",t,Ji,Zn,e)}function Yi(t){return ve("ttfb",t,Zi,Qn)}function Vi(t){return ve("fid",t,Ki,Jn)}function zi(t){return ve("inp",t,Qi,er)}function _e(t,e){return tr(t,e),Ue[t]||(ea(t),Ue[t]=!0),nr(t,e)}function ae(t,e){const n=de[t];if(!(!n||!n.length))for(const r of n)try{r(e)}catch(s){S&&f.error(`Error while triggering instrumentation handler.
17Type: ${t}
18Name: ${U(r)}
19Error:`,s)}}function Xi(){return Di(t=>{ae("cls",{metric:t}),Kn=t},{reportAllChanges:!0})}function Ki(){return xi(t=>{ae("fid",{metric:t}),Jn=t})}function Ji(){return ji(t=>{ae("lcp",{metric:t}),Zn=t})}function Zi(){return qi(t=>{ae("ttfb",{metric:t}),Qn=t})}function Qi(){return Bi(t=>{ae("inp",{metric:t}),er=t})}function ve(t,e,n,r,s=!1){tr(t,e);let i;return Ue[t]||(i=n(),Ue[t]=!0),r&&e({metric:r}),nr(t,e,s?i:void 0)}function ea(t){const e={};t==="event"&&(e.durationThreshold=0),ie(t,n=>{ae(t,{entries:n})},e)}function tr(t,e){de[t]=de[t]||[],de[t].push(e)}function nr(t,e,n){return()=>{n&&n();const r=de[t];if(!r)return;const s=r.indexOf(e);s!==-1&&r.splice(s,1)}}function Xe(t){return typeof t=="number"&&isFinite(t)}
19function ne(t,{startTimestamp:e,...n}){return e&&t.startTimestamp>e&&(t.startTimestamp=e),t.startChild({startTimestamp:e,...n})}const ta=2147483647;function v(t){return t/1e3}function Ct(){return _&&_.addEventListener&&_.performance}let fn=0,I={},D,le;function na(){const t=Ct();if(t&&O){t.mark&&_.performance.mark("sentry-tracing-init");const e=ca(),n=aa(),r=oa(),s=ua();return()=>{e(),n(),r(),s()}}return()=>{}}function ra(){_e("longtask",({entries:t})=>{for(const e of t){const n=q();if(!n)return;const r=v(O+e.startTime),s=v(e.duration);n.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+s})}})}function sa(){_e("event",({entries:t})=>{for(const e of t){const n=q();if(!n)return;if(e.name==="click"){const r=v(O+e.startTime),s=v(e.duration),i={description:ge(e.target),op:`ui.interaction.${e.name}`,origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+s},a=wn(e.target);a&&(i.attributes={"ui.component_name":a}),n.startChild(i)}}})}function ia(t,e){if(Ct()&&O){const r=da(t,e);return()=>{r()}}return()=>{}}function aa(){return Gi(({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(S&&f.log("[Measurements] Adding CLS"),I.cls={value:t.value,unit:""},le=e)},!0)}function oa(){return Wi(({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(S&&f.log("[Measurements] Adding LCP"),I.lcp={value:t.value,unit:"millisecond"},D=e)},!0)}function ca(){return Vi(({metric:t})=>{const e=t.entries[t.entries.length-1];if(!e)return;const n=v(O),r=v(e.startTime);S&&f.log("[Measurements] Adding FID"),I.fid={value:t.value,unit:"millisecond"},I["mark.fid"]={value:n+r,unit:"second"}})}function ua(){return Yi(({metric:t})=>{t.entries[t.entries.length-1]&&(S&&f.log("[Measurements] Adding TTFB"),I.ttfb={value:t.value,unit:"millisecond"})})}const pn={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 da(t,e){return zi(({metric:n})=>{if(n.value===void 0)return;const r=n.entries.find(oe=>oe.duration===n.value&&pn[oe.name]!==void 0),s=w();if(!r||!s)return;const i=pn[r.name],a=s.getOptions(),o=v(O+r.startTime),c=v(n.value),u=r.interactionId!==void 0?t[r.interactionId]:void 0;if(u===void 0)return;const{routeName:d,parentContext:l,activeTransaction:h,user:p,replayId:g}=u,y=p!==void 0?p.email||p.id||p.ip_address:void 0,b=h!==void 0?h.getProfileId():void 0,E=new Ge({startTimestamp:o,endTimestamp:o+c,op:`ui.interaction.${i}`,name:ge(r.target),attributes:{release:a.release,environment:a.environment,transaction:d,...y!==void 0&&y!==""?{user:y}:{},...b!==void 0?{profile_id:b}:{},...g!==void 0?{replay_id:g}:{}},exclusiveTime:n.value,measurements:{inp:{value:n.value,unit:"millisecond"}}}),N=ya(l,a,e);if(N&&Math.random()<N){const oe=E?di([E],s.getDsn()):void 0,xt=s&&s.getTransport();xt&&oe&&xt.send(oe).then(null,pr=>{S&&f.error("Error while sending interaction:",pr)});return}})}function la(t){const e=Ct();if(!e||!_.performance.getEntries||!O)return;S&&f.log("[Tracing] Adding & adjusting spans using Performance API");const n=v(O),r=e.getEntries(),{op:s,start_timestamp:i}=$(t);if(r.slice(fn).forEach(a=>{const o=v(a.startTime),c=v(a.duration);if(!(t.op==="navigation"&&i&&n+o<i))switch(a.entryType){case"navigation":{pa(t,a,n);break}case"mark":case"paint":case"measure":{fa(t,a,o,c,n);const u=$t(),d=a.startTime<u.firstHiddenTime;a.name==="first-paint"&&d&&(S&&f.log("[Measurements] Adding FP"),I.fp={value:a.startTime,unit:"millisecond"}),a.name==="first-contentful-paint"&&d&&(S&&f.log("[Measurements] Adding FCP"),I.fcp={value:a.startTime,unit:"millisecond"});break}case"resource":{ma(t,a,a.name,o,c,n);break}}}),fn=Math.max(r.length-1,0),ga(t),s==="pageload"){Ta(I),["fcp","fp","lcp"].forEach(o=>{if(!I[o]||!i||n>=i)return;const c=I[o].value,u=n+v(c),d=Math.abs((u-i)*1e3),l=d-c;S&&f.log(`[Measurements] Normalized ${o} from ${c} to ${d} (${l})`),I[o].value=d});const a=I["mark.fid"];a&&I.fid&&(ne(t,{description:"first input delay",endTimestamp:a.value+v(I.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:a.value}),delete I["mark.fid"]),"fcp"in I||delete I.cls,Object.keys(I).forEac
19h(o=>{Bs(o,I[o].value,I[o].unit)}),_a(t)}D=void 0,le=void 0,I={}}function fa(t,e,n,r,s){const i=s+n,a=i+r;return ne(t,{description:e.name,endTimestamp:a,op:e.entryType,origin:"auto.resource.browser.metrics",startTimestamp:i}),i}function pa(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{$e(t,e,r,n)}),$e(t,e,"secureConnection",n,"TLS/SSL","connectEnd"),$e(t,e,"fetch",n,"cache","domainLookupStart"),$e(t,e,"domainLookup",n,"DNS"),ha(t,e,n)}function $e(t,e,n,r,s,i){const a=i?e[i]:e[`${n}End`],o=e[`${n}Start`];!o||!a||ne(t,{op:"browser",origin:"auto.browser.browser.metrics",description:s||n,startTimestamp:r+v(o),endTimestamp:r+v(a)})}function ha(t,e,n){e.responseEnd&&(ne(t,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:n+v(e.requestStart),endTimestamp:n+v(e.responseEnd)}),ne(t,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:n+v(e.responseStart),endTimestamp:n+v(e.responseEnd)}))}function ma(t,e,n,r,s,i){if(e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch")return;const a=B(n),o={};Ke(o,e,"transferSize","http.response_transfer_size"),Ke(o,e,"encodedBodySize","http.response_content_length"),Ke(o,e,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in e&&(o["resource.render_blocking_status"]=e.renderBlockingStatus),a.protocol&&(o["url.scheme"]=a.protocol.split(":").pop()),a.host&&(o["server.address"]=a.host),o["url.same_origin"]=n.includes(_.location.origin);const c=i+r,u=c+s;ne(t,{description:n.replace(_.location.origin,""),endTimestamp:u,op:e.initiatorType?`resource.${e.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:c,data:o})}function ga(t){const e=_.navigator;if(!e)return;const n=e.connection;n&&(n.effectiveType&&t.setTag("effectiveConnectionType",n.effectiveType),n.type&&t.setTag("connectionType",n.type),Xe(n.rtt)&&(I["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Xe(e.deviceMemory)&&t.setTag("deviceMemory",`${e.deviceMemory} GB`),Xe(e.hardwareConcurrency)&&t.setTag("hardwareConcurrency",String(e.hardwareConcurrency))}function _a(t){D&&(S&&f.log("[Measurements] Adding LCP Data"),D.element&&t.setTag("lcp.element",ge(D.element)),D.id&&t.setTag("lcp.id",D.id),D.url&&t.setTag("lcp.url",D.url.trim().slice(0,200)),t.setTag("lcp.size",D.size)),le&&le.sources&&(S&&f.log("[Measurements] Adding CLS Data"),le.sources.forEach((e,n)=>t.setTag(`cls.source.${n+1}`,ge(e.node))))}function Ke(t,e,n,r){const s=e[n];s!=null&&s<ta&&(t[r]=s)}function Ta(t){const e=We();if(!e)return;const{responseStart:n,requestStart:r}=e;r<=n&&(S&&f.log("[Measurements] Adding TTFB Request Time"),t["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}function ya(t,e,n){if(!z(e))return!1;let r;return t!==void 0&&typeof e.tracesSampler=="function"?r=e.tracesSampler({transactionContext:t,name:t.name,parentSampled:t.parentSampled,attributes:{...t.data,...t.attributes},location:_.location}):t!==void 0&&t.sampled!==void 0?r=t.sampled:typeof e.tracesSampleRate!="undefined"?r=e.tracesSampleRate:r=1,qn(r)?r===!0?n:r===!1?0:r*n:(S&&f.warn("[Tracing] Discarding interaction span because of invalid sample rate."),!1)}function Ea(t,e,n,r,s="auto.http.browser"){if(!z()||!t.fetchData)return;const i=e(t.fetchData.url);if(t.endTimestamp&&i){const p=t.fetchData.__span;if(!p)return;const g=r[p];g&&(Ia(g,t),delete r[p]);return}const a=G(),o=w(),{method:c,url:u}=t.fetchData,d=ba(u),l=d?B(d).host:void 0,h=i?Fe({name:`${c} ${u}`,onlyIfParent:!0,attributes:{url:u,type:"fetch","http.method":c,"http.url":d,"server.address":l,[F]:s},op:"http.client"}):void 0;if(h&&(t.fetchData.__span=h.spanContext().spanId,r[h.spanContext().spanId]=h),n(t.fetchData.url)&&o){const p=t.args[0];t.args[1]=t.args[1]||{};const g=t.args[1];g.headers=Sa(p,o,a,g,h)}return h}function Sa(t,e,n,r,s){const i=s||n.getSpan(),a=je(),{traceId:o,spanId:c,sampled:u,dsc:d}={...a.getPropagationContext(),...n.getPropagationContext()},l=i?qe(i):Nn(o,c,u),h=On(d||(i?me(i):It(o,e,n))),p=r.headers||(typeof Request!="undefined"&&pe(t,Request)?t.headers:void 0);if(p)if(typeof Headers!="undefined"&&pe(p,Headers)){const g=new Headers(p);return g.append("sentry-trace",l),h&&g.append(tt,h),g}else if(Array.isArray(p)){const g=[...p,["sentry-trace",l]];return h&&g.push([tt,h]),g}else{const g="baggage"in p?p.baggage:void 0,y=[];return Array.isArray(g)?y.push(...g):g&&y.push(g),h&&y.push(h),{...p,"sentry-trace":l,baggage:y.length>0?y.join(","):void 0}}else return{"sentry-trace":l,baggage:h}}function ba(t){try{return new URL(t).href}catch{return}}function Ia(t,e){if(e.response){Ot(t,e.response.status);const n=e.response&&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("internal_error");t.end()}const ht=["localhost",/^\/(?!\/)/],mt={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:ht,tracePropagationTargets:ht};function va(t){const{traceFetch:e,traceXHR:n,tracePropagationTargets:r,tracingOrigins:s,shouldCreateSpanForRequest:i,enableHTTPTimings:a}={traceFetch:mt.traceFetch,traceXHR:mt.traceXHR,...t},o=typeof i=="function"?i:d=>!0,c=d=>Na(d,r||s),u={};e&&Dn(d=>{const l=Ea(d,o,c,u);if(l){const h=rr(d.fetchData.url),p=h?B(h).host:void 0;l.setAttributes({"http.url":h,"server.address":p})}a&&l&&hn(l)}),n&&xn(d=>{const l=Oa(d,o,c,u);a&&l&&hn(l)})}function Ra(t){return t.entryType==="resource"&&"initiatorType"in t&&typeof t.nextHopProtocol=="string"&&(t.initiatorType==="fetch"||t.initiatorType==="xmlhttprequest")}function hn(t){const{url:e}=$(t).data||{};if(!e||typeof e!="string")return;const n=_e("resource",({entries:r})=>{r.forEach(s=>
19{Ra(s)&&s.name.endsWith(e)&&(wa(s).forEach(a=>t.setAttribute(...a)),setTimeout(n))})})}function ka(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 C(t=0){return((O||performance.timeOrigin)+t)/1e3}function wa(t){const{name:e,version:n}=ka(t.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",e]),O?[...r,["http.request.redirect_start",C(t.redirectStart)],["http.request.fetch_start",C(t.fetchStart)],["http.request.domain_lookup_start",C(t.domainLookupStart)],["http.request.domain_lookup_end",C(t.domainLookupEnd)],["http.request.connect_start",C(t.connectStart)],["http.request.secure_connection_start",C(t.secureConnectionStart)],["http.request.connection_end",C(t.connectEnd)],["http.request.request_start",C(t.requestStart)],["http.request.response_start",C(t.responseStart)],["http.request.response_end",C(t.responseEnd)]]:r}function Na(t,e){return Ee(t,e||ht)}function Oa(t,e,n,r){const s=t.xhr,i=s&&s[J];if(!z()||!s||s.__sentry_own_request__||!i)return;const a=e(i.url);if(t.endTimestamp&&a){const p=s.__sentry_xhr_span_id__;if(!p)return;const g=r[p];g&&i.status_code!==void 0&&(Ot(g,i.status_code),g.end(),delete r[p]);return}const o=G(),c=je(),u=rr(i.url),d=u?B(u).host:void 0,l=a?Fe({name:`${i.method} ${i.url}`,onlyIfParent:!0,attributes:{type:"xhr","http.method":i.method,"http.url":u,url:i.url,"server.address":d,[F]:"auto.http.browser"},op:"http.client"}):void 0;l&&(s.__sentry_xhr_span_id__=l.spanContext().spanId,r[s.__sentry_xhr_span_id__]=l);const h=w();if(s.setRequestHeader&&n(i.url)&&h){const{traceId:p,spanId:g,sampled:y,dsc:b}={...c.getPropagationContext(),...o.getPropagationContext()},E=l?qe(l):Nn(p,g,y),N=On(b||(l?me(l):It(p,h,o)));Aa(s,E,N)}return l}function Aa(t,e,n){try{t.setRequestHeader("sentry-trace",e),n&&t.setRequestHeader(tt,n)}catch{}}function rr(t){try{return new URL(t,_.location.origin).href}catch{return}}function $a(t,e=!0,n=!0){if(!_||!_.location){S&&f.warn("Could not initialize routing instrumentation due to invalid location");return}let r=_.location.href,s;e&&(s=t({name:_.location.pathname,startTimestamp:O?O/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),n&&Nt(({to:i,from:a})=>{if(a===void 0&&r&&r.indexOf(i)!==-1){r=void 0;return}a!==i&&(r=void 0,s&&(S&&f.log(`[Tracing] Finishing current transaction with op: ${s.op}`),s.end()),s=t({name:_.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))})}const Ca="BrowserTracing",Da={...Pe,markBackgroundTransactions:!0,routingInstrumentation:$a,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...mt},mn=10;class Pa{constructor(e){this.name=Ca,this._hasSetTracePropagationTargets=!1,Us(),S&&(this._hasSetTracePropagationTargets=!!(e&&(e.tracePropagationTargets||e.tracingOrigins))),this.options={...Da,...e},this.options._experiments.enableLongTask!==void 0&&(this.options.enableLongTask=this.options._experiments.enableLongTask),e&&!e.tracePropagationTargets&&e.tracingOrigins&&(this.options.tracePropagationTargets=e.tracingOrigins),this._collectWebVitals=na(),this._interactionIdToRouteNameMapping={},this.options.enableInp&&ia(this._interactionIdToRouteNameMapping,this.options.interactionsSampleRate),this.options.enableLongTask&&ra(),this.options._experiments.enableInteractions&&sa(),this._latestRoute={name:void 0,context:void 0}}setupOnce(e,n){this._getCurrentHub=n;const s=n().getClient(),i=s&&s.getOptions(),{routingInstrumentation:a,startTransactionOnLocationChange:o,startTransactionOnPageLoad:c,markBackgroundTransactions:u,traceFetch:d,traceXHR:l,shouldCreateSpanForRequest:h,enableHTTPTimings:p,_experiments:g}=this.options,y=i&&i.tracePropagationTargets,b=y||this.options.tracePropagationTargets;S&&this._hasSetTracePropagationTargets&&y&&f.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used."),a(E=>{const N=this._createRouteTransaction(E);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(N,E,n),N},c,o),u&&Ai(),g.enableInteractions&&this._registerInteractionListener(),this.options.enableInp&&this._registerInpInteractionListener(),va({traceFetch:d,traceXHR:l,tracePropagationTargets:b,shouldCreateSpanForRequest:h,enableHTTPTimings:p})}_createRouteTransaction(e){if(!this._getCurrentHub){S&&f.warn(`[Tracing] Did not create ${e.op}
19 transaction because _getCurrentHub is invalid.`);return}const n=this._getCurrentHub(),{beforeNavigate:r,idleTimeout:s,finalTimeout:i,heartbeatInterval:a}=this.options,o=e.op==="pageload";let c;if(o){const p=o?gn("sentry-trace"):"",g=o?gn("baggage"):void 0,{traceId:y,dsc:b,parentSpanId:E,sampled:N}=wr(p,g);c={traceId:y,parentSpanId:E,parentSampled:N,...e,metadata:{...e.metadata,dynamicSamplingContext:b},trimEnd:!0}}else c={trimEnd:!0,...e};const u=typeof r=="function"?r(c):c,d=u===void 0?{...c,sampled:!1}:u;d.metadata=d.name!==c.name?{...d.metadata,source:"custom"}:d.metadata,this._latestRoute.name=d.name,this._latestRoute.context=d,d.sampled===!1&&S&&f.log(`[Tracing] Will not send ${d.op} transaction because of beforeNavigate.`),S&&f.log(`[Tracing] Starting ${d.op} transaction on scope`);const{location:l}=_,h=tn(n,d,s,i,!0,{location:l},a,o);return o&&_.document&&(_.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(_.document.readyState)&&h.sendAutoFinishSignal()}),["interactive","complete"].includes(_.document.readyState)&&h.sendAutoFinishSignal()),h.registerBeforeFinishCallback(p=>{this._collectWebVitals(),la(p)}),h}_registerInteractionListener(){let e;const n=()=>{const{idleTimeout:r,finalTimeout:s,heartbeatInterval:i}=this.options,a="ui.action.click",o=q();if(o&&o.op&&["navigation","pageload"].includes(o.op)){S&&f.warn(`[Tracing] Did not create ${a} transaction because a pageload or navigation transaction is in progress.`);return}if(e&&(e.setFinishReason("interactionInterrupted"),e.end(),e=void 0),!this._getCurrentHub){S&&f.warn(`[Tracing] Did not create ${a} transaction because _getCurrentHub is invalid.`);return}if(!this._latestRoute.name){S&&f.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`);return}const c=this._getCurrentHub(),{location:u}=_,d={name:this._latestRoute.name,op:a,trimEnd:!0,data:{[M]:this._latestRoute.context?Ma(this._latestRoute.context):"url"}};e=tn(c,d,r,s,!0,{location:u},i)};["click"].forEach(r=>{_.document&&addEventListener(r,n,{once:!1,capture:!0})})}_registerInpInteractionListener(){const e=({entries:n})=>{const r=w(),s=r!==void 0&&r.getIntegrationByName!==void 0?r.getIntegrationByName("Replay"):void 0,i=s!==void 0?s.getReplayId():void 0,a=q(),o=G(),c=o!==void 0?o.getUser():void 0;n.forEach(u=>{if(xa(u)){const d=u.interactionId;if(d===void 0)return;const l=this._interactionIdToRouteNameMapping[d],h=u.duration,p=u.startTime,g=Object.keys(this._interactionIdToRouteNameMapping),y=g.length>0?g.reduce((b,E)=>this._interactionIdToRouteNameMapping[b].duration<this._interactionIdToRouteNameMapping[E].duration?b:E):void 0;if(u.entryType==="first-input"&&g.map(E=>this._interactionIdToRouteNameMapping[E]).some(E=>E.duration===h&&E.startTime===p)||!d)return;if(l)l.duration=Math.max(l.duration,h);else if(g.length<mn||y===void 0||h>this._interactionIdToRouteNameMapping[y].duration){const b=this._latestRoute.name,E=this._latestRoute.context;b&&E&&(y&&Object.keys(this._interactionIdToRouteNameMapping).length>=mn&&delete this._interactionIdToRouteNameMapping[y],this._interactionIdToRouteNameMapping[d]={routeName:b,duration:h,parentContext:E,user:c,activeTransaction:a,replayId:i,startTime:p})}}})};_e("event",e),_e("first-input",e)}}function gn(t){const e=Nr(`meta[name=${t}]`);return e?e.getAttribute("content"):void 0}function Ma(t){const e=t.attributes&&t.attributes[M],n=t.data&&t.data[M],r=t.metadata&&t.metadata.source;return e||n||r}function xa(t){return"duration"in t}const T=R;let gt=0;function sr(){return gt>0}function Fa(){gt++,setTimeout(()=>{gt--})}function re(t,e={},n){if(typeof t!="function")return t;try{const s=t.__sentry_wrapped__;if(s)return typeof s=="function"?s:t;if(vt(t))return t}catch{return t}const r=function(){const s=Array.prototype.slice.call(arguments);try{const i=s.map(a=>re(a,e));return t.apply(this,i)}catch(i){throw Fa(),Ar(a=>{a.addEventProcessor(o=>(e.mechanism&&(nt(o,void 0),xe(o,e.mechanism)),o.extra={...o.extra,arguments:s},o)),Rt(i)}),i}};try{for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=t[s])}catch{}Or(r,t),he(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}const L=typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__;
19function ir(t,e){const n=Dt(t,e),r={type:e&&e.name,value:Ba(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function La(t,e,n,r){const s=w(),i=s&&s.getOptions().normalizeDepth,a={exception:{values:[{type:wt(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:Ga(e,{isUnhandledRejection:r})}]},extra:{__serialized__:Dr(e,i)}};if(n){const o=Dt(t,n);o.length&&(a.exception.values[0].stacktrace={frames:o})}return a}function Je(t,e){return{exception:{values:[ir(t,e)]}}}function Dt(t,e){const n=e.stacktrace||e.stack||"",r=Ua(e);try{return t(n,r)}catch{}return[]}const Ha=/Minified React error #\d+;/i;function Ua(t){if(t){if(typeof t.framesToPop=="number")return t.framesToPop;if(Ha.test(t.message))return 1}return 0}function Ba(t){const e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function ja(t,e,n,r){const s=n&&n.syntheticException||void 0,i=Pt(t,e,s,r);return xe(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),ee(i)}function qa(t,e,n="info",r,s){const i=r&&r.syntheticException||void 0,a=_t(t,e,i,s);return a.level=n,r&&r.event_id&&(a.event_id=r.event_id),ee(a)}function Pt(t,e,n,r,s){let i;if(kt(e)&&e.error)return Je(t,e.error);if(Bt(e)||$r(e)){const a=e;if("stack"in e)i=Je(t,e);else{const o=a.name||(Bt(a)?"DOMError":"DOMException"),c=a.message?`${o}: ${a.message}`:o;i=_t(t,c,n,r),nt(i,c)}return"code"in a&&(i.tags={...i.tags,"DOMException.code":`${a.code}`}),i}return Cr(e)?Je(t,e):et(e)||wt(e)?(i=La(t,e,n,s),xe(i,{synthetic:!0}),i):(i=_t(t,e,n,r),nt(i,`${e}`),xe(i,{synthetic:!0}),i)}function _t(t,e,n,r){const s={};if(r&&n){const i=Dt(t,n);i.length&&(s.exception={values:[{value:e,stacktrace:{frames:i}}]})}if(kn(e)){const{__sentry_template_string__:i,__sentry_template_values__:a}=e;return s.logentry={message:i,params:a},s}return s.message=e,s}function Ga(t,{isUnhandledRejection:e}){const n=Pr(t),r=e?"promise rejection":"exception";return kt(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:wt(t)?`Event \`${Wa(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Wa(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function Ya(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:se(r)}},i=Va(t);return V(s,[i])}function Va(t){return[{type:"user_report"},t]}class za extends ri{constructor(e){const n=T.SENTRY_SDK_SOURCE||fs();fi(e,"browser",["browser"],n),super(e),e.sendClientReports&&T.document&&T.document.addEventListener("visibilitychange",()=>{T.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,n){return ja(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return qa(this._options.stackParser,e,n,r,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){L&&f.warn("SDK not enabled, will not capture user feedback.");return}const n=Ya(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){L&&f.log("No outcomes to send");return}if(!this._dsn){L&&f.log("No dsn provided, will not send outcomes");return}L&&f.log("Sending outcomes:",e);const n=bs(e,this._options.tunnel&&se(this._dsn));this._sendEnvelope(n)}}let ue;function Xa(){if(ue)return ue;if(ot(T.fetch))return ue=T.fetch.bind(T);const t=T.document;let e=T.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){L&&f.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return ue=e.bind(T)}function Ka(){ue=void 0}function Ja(t,e=Xa()){let n=0,r=0;function s(i){const a=i.body.length;n+=a,r++;const o={body:i.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&r<15,...t.fetchOptions};try{return e(t.url,o).then(c=>(n-=a,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 Ka(),n-=a,r--,Et(c)}}return Vn(t,s)}const Za=4;function Qa(t){function e(n){return new yt((r,s)=>{const i=new XMLHttpRequest;i.onerror=s,i.onreadystatechange=()=>{i.readyState===Za&&r({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",t.url);for(const a in t.headers)Object.prototype.hasOwnProperty.call(t.headers,a)&&i.setRequestHeader(a,t.headers[a]);i.send(n.body)})}return Vn(t,e)}const Ye="?",eo=30,to=40,no=50;function Mt(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 ro=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,so=/\((\S*)(?::(\d+))(?::(\d+))\)/,io=t=>{const e=ro.exec(t);if(e){if(e[2]&&e[2].indexOf("eval")===0){const i=so.exec(e[2]);i&&(e[2]=i[1],e[3]=i[2],e[4]=i[3])}const[r,s]=ar(e[1]||Ye,e[2]);return Mt(s,r,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}},ao=[eo,io],oo=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,co=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,uo=t=>{const e=oo.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const i=co.exec(e[3]);i&&(e[1]=e[1]||"eval",e[3]=i[1],e[4]=i[2],e[5]="")}let r=e[3],s=e[1]||Ye;return[s,r]=ar(s,r),Mt(r,s,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},lo=[no,uo],fo=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,po=t=>{const e=fo.exec(t);return e?Mt(e[2],e[1]||Ye,+e[3],e[4]?+e[4]:void 0):void 0},ho=[to,po],mo=[ao,lo,ho],go=Mr(...mo),ar=(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]:Ye,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},Ce=1024,_o="Breadcrumbs",To=((t={})=>{const e={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:_o,setupOnce(){},setup(n){e.console&&zr(bo(n)),e.dom&&Jr(So(n,e.dom)),e.xhr&&xn(Io(n)),e.fetch&&Dn(vo(n)),e.history&&Nt(Ro(n)),e.sentry&&n.on&&n.on("beforeSendEvent",Eo(n))}}}),yo=To;function Eo(t){return function(n){w()===t&&j({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:H(n)},{event:n})}}function So(t,e){return function(r){if(w()!==t)return;let s,i,a=typeof e=="object"?e.serializeAttribute:void 0,o=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;o&&o>Ce&&(L&&f.warn(`\`dom.maxStringLength\` cannot exceed ${Ce}, but a value of ${o} was configured. Sentry will use ${Ce}
19 instead.`),o=Ce),typeof a=="string"&&(a=[a]);try{const u=r.event,d=ko(u)?u.target:u;s=ge(d,{keyAttrs:a,maxStringLength:o}),i=wn(d)}catch{s="<unknown>"}if(s.length===0)return;const c={category:`ui.${r.name}`,message:s};i&&(c.data={"ui.component_name":i}),j(c,{event:r.event,name:r.name,global:r.global})}}function bo(t){return function(n){if(w()!==t)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:ms(n.level),message:jt(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${jt(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;j(r,{input:n.args,level:n.level})}}function Io(t){return function(n){if(w()!==t)return;const{startTimestamp:r,endTimestamp:s}=n,i=n.xhr[J];if(!r||!s||!i)return;const{method:a,url:o,status_code:c,body:u}=i,d={method:a,url:o,status_code:c},l={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s};j({category:"xhr",data:d,type:"http"},l)}}function vo(t){return function(n){if(w()!==t)return;const{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const i=n.fetchData,a={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s};j({category:"fetch",data:i,level:"error",type:"http"},a)}else{const i=n.response,a={...n.fetchData,status_code:i&&i.status},o={input:n.args,response:i,startTimestamp:r,endTimestamp:s};j({category:"fetch",data:a,type:"http"},o)}}}function Ro(t){return function(n){if(w()!==t)return;let r=n.from,s=n.to;const i=B(T.location.href);let a=r?B(r):void 0;const o=B(s);(!a||!a.path)&&(a=i),i.protocol===o.protocol&&i.host===o.host&&(s=o.relative),i.protocol===a.protocol&&i.host===a.host&&(r=a.relative),j({category:"navigation",data:{from:r,to:s}})}}function ko(t){return!!t&&!!t.target}const wo="Dedupe",No=(()=>{let t;return{name:wo,setupOnce(){},processEvent(e){if(e.type)return e;try{if(Ao(e,t))return L&&f.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}}),Oo=No;function Ao(t,e){return e?!!($o(t,e)||Co(t,e)):!1}function $o(t,e){const n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!cr(t,e)||!or(t,e))}function Co(t,e){const n=_n(e),r=_n(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!cr(t,e)||!or(t,e))}function or(t,e){let n=Tn(t),r=Tn(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 i=r[s],a=n[s];if(i.filename!==a.filename||i.lineno!==a.lineno||i.colno!==a.colno||i.function!==a.function)return!1}return!0}function cr(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 _n(t){return t.exception&&t.exception.values&&t.exception.values[0]}function Tn(t){const e=t.exception;if(e)try{return e.values[0].stacktrace.frames}catch{return}}const Do="GlobalHandlers",Po=((t={})=>{const e={onerror:!0,onunhandledrejection:!0,...t};return{name:Do,setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(xo(n),yn("onerror")),e.onunhandledrejection&&(Fo(n),yn("onunhandledrejection"))}}}),Mo=Po;function xo(t){Pn(e=>{const{stackParser:n,attachStacktrace:r}=dr();if(w()!==t||sr())return;const{msg:s,url:i,line:a,column:o,error:c}=e,u=c===void 0&&Q(s)?Uo(s,i,a,o):ur(Pt(n,c||s,void 0,r,!1),i,a,o);u.level="error",An(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function Fo(t){Mn(e=>{const{stackParser:n,attachStacktrace:r}=dr();if(w()!==t||sr())return;const s=Lo(e),i=bt(s)?Ho(s):Pt(n,s,void 0,r,!0);i.level="error",An(i,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function Lo(t){if(bt(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 Ho(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function Uo(t,e,n,r){const s=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let i=kt(t)?t.message:t,a="Error";const o=i.match(s);return o&&(a=o[1],i=o[2]),ur({exception:{values:[{type:a,value:i}]}},e,n,r)}function ur(t,e,n,r){const s=t.exception=t.exception||{},i=s.values=s.values||[],a=i[0]=i[0]||{},o=a.stacktrace=a.stacktrace||{},c=o.frames=o.frames||[],u=isNaN(parseInt(r,10))?void 0:r,d=isNaN(parseInt(n,10))?void 0:n,l=Q(e)&&e.length>0?e:xr();
19return c.length===0&&c.push({colno:u,filename:l,function:"?",in_app:!0,lineno:d}),t}function yn(t){L&&f.log(`Global Handler attached: ${t}`)}function dr(){const t=w();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Bo="HttpContext",jo=(()=>({name:Bo,setupOnce(){},preprocessEvent(t){if(!T.navigator&&!T.location&&!T.document)return;const e=t.request&&t.request.url||T.location&&T.location.href,{referrer:n}=T.document||{},{userAgent:r}=T.navigator||{},s={...t.request&&t.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},i={...t.request,...e&&{url:e},headers:s};t.request=i}})),qo=jo,Go="cause",Wo=5,Yo="LinkedErrors",Vo=((t={})=>{const e=t.limit||Wo,n=t.key||Go;return{name:Yo,setupOnce(){},preprocessEvent(r,s,i){const a=i.getOptions();Br(ir,a.stackParser,a.maxValueLength,n,e,r,s)}}}),zo=Vo,Xo=["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"],Ko="TryCatch",Jo=((t={})=>{const e={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t};return{name:Ko,setupOnce(){e.setTimeout&&k(T,"setTimeout",En),e.setInterval&&k(T,"setInterval",En),e.requestAnimationFrame&&k(T,"requestAnimationFrame",Qo),e.XMLHttpRequest&&"XMLHttpRequest"in T&&k(XMLHttpRequest.prototype,"send",ec);const n=e.eventTarget;n&&(Array.isArray(n)?n:Xo).forEach(tc)}}}),Zo=Jo;function En(t){return function(...e){const n=e[0];return e[0]=re(n,{mechanism:{data:{function:U(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function Qo(t){return function(e){return t.apply(this,[re(e,{mechanism:{data:{function:"requestAnimationFrame",handler:U(t)},handled:!1,type:"instrument"}})])}}function ec(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&k(n,s,function(i){const a={mechanism:{data:{function:s,handler:U(i)},handled:!1,type:"instrument"}},o=vt(i);return o&&(a.mechanism.data.handler=U(o)),re(i,a)})}),t.apply(this,e)}}function tc(t){const e=T,n=e[t]&&e[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(k(n,"addEventListener",function(r){return function(s,i,a){try{typeof i.handleEvent=="function"&&(i.handleEvent=re(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:U(i),target:t},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[s,re(i,{mechanism:{data:{function:"addEventListener",handler:U(i),target:t},handled:!1,type:"instrument"}}),a])}}),k(n,"removeEventListener",function(r){return function(s,i,a){const o=i;try{const c=o&&o.__sentry_wrapped__;c&&r.call(this,s,c,a)}catch{}return r.call(this,s,o,a)}}))}const nc=[_i(),Oi(),Zo(),yo(),Mo(),zo(),Oo(),qo()];function lr(t){return[...nc]}function rc(t={}){t.defaultIntegrations===void 0&&(t.defaultIntegrations=lr()),t.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(t.release=__SENTRY_RELEASE__),T.SENTRY_RELEASE&&T.SENTRY_RELEASE.id&&(t.release=T.SENTRY_RELEASE.id)),t.autoSessionTracking===void 0&&(t.autoSessionTracking=!0),t.sendClientReports===void 0&&(t.sendClientReports=!0);const e={...t,stackParser:Fr(t.stackParser||go),integrations:Js(t),transport:t.transport||(Cn()?Ja:Qa)};ai(za,e),t.autoSessionTracking&&sc()}function sc(){if(typeof T.document=="undefined"){L&&f.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}qt({ignoreDuration:!0}),Gt(),Nt(({from:t,to:e})=>{t!==void 0&&t!==e&&(qt({ignoreDuration:!0}),Gt())})}const fr=["activate","mount","update"],ic=/(?:^|[-_])(\w)/g,ac=t=>t.replace(ic,e=>e.toUpperCase()).replace(/[-_]/g,""),oc="<Root>",Ze="<Anonymous>",cc=(t,e)=>t.repeat?t.repeat(e):t,fe=(t,e)=>{if(!t)return Ze;if(t.$root===t)return oc;if(!t.$options)return Ze;const n=t.$options;let r=n.name||n._componentTag;const s=n.__file;if(!r&&s){const i=s.match(/([^/\\]+)\.vue$/);i&&(r=i[1])}return(r?`<${ac(r)}>`:Ze)+(s&&e!==!1?` at ${s}`:"")},uc=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)}
19e.push(t),t=t.$parent}return`
20
21found in
22
23${e.map((s,i)=>`${(i===0?"---> ":cc(" ",5+i*2))+(Array.isArray(s)?`${fe(s[0])}... (${s[1]} recursive calls)`:fe(s))}`).join(`
24`)}`}return`
25
26(found in ${fe(t)})`},dc=(t,e)=>{const{errorHandler:n,warnHandler:r,silent:s}=t.config;t.config.errorHandler=(i,a,o)=>{const c=fe(a,!1),u=a?uc(a):"",d={componentName:c,lifecycleHook:o,trace:u};if(e.attachProps&&a&&(a.$options&&a.$options.propsData?d.propsData=a.$options.propsData:a.$props&&(d.propsData=a.$props)),setTimeout(()=>{Rt(i,{captureContext:{contexts:{vue:d}},mechanism:{handled:!1}})}),typeof n=="function"&&n.call(t,i,a,o),e.logErrors){const l=typeof console!="undefined",h=`Error in ${o}: "${i&&i.toString()}"`;r?r.call(null,h,a,u):l&&!s&&Te(()=>{console.error(`[Vue warn]: ${h}${u}`)})}}},lc=typeof __SENTRY_DEBUG__=="undefined"||__SENTRY_DEBUG__,Sn="ui.vue",fc={activate:["activated","deactivated"],create:["beforeCreate","created"],unmount:["beforeUnmount","unmounted"],destroy:["beforeDestroy","destroyed"],mount:["beforeMount","mounted"],update:["beforeUpdate","updated"]};function pc(){return G().getTransaction()}function hc(t,e,n){t.$_sentryRootSpanTimer&&clearTimeout(t.$_sentryRootSpanTimer),t.$_sentryRootSpanTimer=setTimeout(()=>{t.$root&&t.$root.$_sentryRootSpan&&(t.$root.$_sentryRootSpan.end(e),t.$root.$_sentryRootSpan=void 0)},n)}const mc=t=>{const e=(t.hooks||[]).concat(fr).filter((r,s,i)=>i.indexOf(r)===s),n={};for(const r of e){const s=fc[r];if(!s){lc&&f.warn(`Unknown hook: ${r}`);continue}for(const i of s)n[i]=function(){const a=this.$root===this;a&&lt()&&(this.$_sentryRootSpan=this.$_sentryRootSpan||Fe({name:"Application Render",op:`${Sn}.render`,origin:"auto.ui.vue"}));const o=fe(this,!1),c=Array.isArray(t.trackComponents)?t.trackComponents.indexOf(o)>-1:t.trackComponents;if(!(!a&&!c))if(this.$_sentrySpans=this.$_sentrySpans||{},i==s[0]){if(this.$root&&this.$root.$_sentryRootSpan||lt()){const d=this.$_sentrySpans[r];d&&d.end(),this.$_sentrySpans[r]=Fe({name:`Vue <${o}>`,op:`${Sn}.${r}`,origin:"auto.ui.vue"})}}else{const u=this.$_sentrySpans[r];if(!u)return;u.end(),hc(this,St(),t.timeout)}}}return n},gc=R,_c={Vue:gc.Vue,attachProps:!0,logErrors:!0,hooks:fr,timeout:2e3,trackComponents:!1},Tc="Vue",yc=((t={})=>({name:Tc,setupOnce(){},setup(e){Sc(e,t)}})),Ec=yc;function Sc(t,e){const n={..._c,...t.getOptions(),...e};if(!n.Vue&&!n.app){Te(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue specific errors will not be captured.\nUpdate your `Sentry.init` call with an appropriate config option:\n`app` (Application Instance - Vue 3) or `Vue` (Vue Constructor - Vue 2).")});return}n.app?Rn(n.app).forEach(s=>bn(s,n)):n.Vue&&bn(n.Vue,n)}const bn=(t,e)=>{const n=t;(n._instance&&n._instance.isMounted)===!0&&Te(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue app is already mounted. Make sure to call `app.mount()` after `Sentry.init()`.")}),dc(t,e),z(e)&&t.mixin(mc({...e,...e.tracingOptions}))};function bc(t={}){const e={_metadata:{sdk:{name:"sentry.javascript.vue",packages:[{name:"npm:@sentry/vue",version:Me}],version:Me}},defaultIntegrations:[...lr(),Ec()],...t};rc(e)}function Ic(t,e={}){return(n,r=!0,s=!0)=>{r&&T&&T.location&&n({name:T.location.pathname,op:"pageload",attributes:{[F]:"auto.pageload.vue",[M]:"url"}}),vc(t,{routeLabel:e.routeLabel||"name",instrumentNavigation:s,instrumentPageLoad:r},n)}}function vc(t,e,n){t.onError(r=>Rt(r,{mechanism:{handled:!1}})),t.beforeEach((r,s,i)=>{const a=s.name==null&&s.matched.length===0,o={[F]:"auto.navigation.vue"};for(const d of Object.keys(r.params))o[`params.${d}`]=r.params[d];for(const d of Object.keys(r.query)){const l=r.query[d];l&&(o[`query.${d}`]=l)}let c=r.path,u="url";if(r.name&&e.routeLabel!=="path"?(c=r.name.toString(),u="custom"):r.matched[0]&&r.matched[0].path&&(c=r.matched[0].path,u="route"),e.instrumentPageLoad&&a){const d=pc();d&&(($(d).data||{})[M]!=="custom"&&(d.updateName(c),d.setAttribute(M,u)),d.setAttributes({...o,[F]:"auto.pageload.vue"}))}e.instrumentNavigation&&!a&&(o[M]=u,n({name:c,op:"navigation",attributes:o})),i&&i()})}const kc=Lr(async({app:t,router:e})=>{bc({app:t,dsn:"https://[email protected]/4505321281159168",integrations:[new Pa({routingInstrumentation:Ic(e),tracePropagationTargets:["localhost","https://www.tigerairtw.com",/^\//]})],tracesSampleRate:0,ignoreErrors:Hr,initialScope:n=>Ur(n),beforeSend:(n,r)=>n,environment:"prod"})});
26export{kc as default};

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.