@getontime/cli
Version:
Time keeping for live events
2 lines • 45.7 kB
JavaScript
System.register([],function(t,e){var n,r,s,i,a,o,c,u,p,d,f,l,h,_,m,g,y,b,S,v,x,I,k,E,w,O,A,C,T,P,R,j,N,D,$,L,M,J,U,F,W,Y,z,B,K,q,G,H,V,Q,X,Z;function tt(){return et(n),n}function et(t){const e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||"10.59.0",e[r]=e["10.59.0"]||{}}function nt(t,e,s=n){const i=s.__SENTRY__=s.__SENTRY__||{},a=i[r]=i["10.59.0"]||{};return a[t]||(a[t]=e())}function rt(t){if(!("console"in n))return t();const e=n.console,r={},i=Object.keys(s);i.forEach(t=>{const n=s[t];r[t]=e[t],e[t]=n});try{return t()}finally{i.forEach(t=>{e[t]=r[t]})}}function st(){}function it(){}function at(){return!1}function ot(...t){}function ct(...t){}function ut(...t){}function pt(...t){const e=t.sort((t,e)=>t[0]-e[0]).map(t=>t[1]);return(t,n=0,r=0)=>{const s=[],c=t.split("\n");for(let o=n;o<c.length;o++){let t=c[o];t.length>1024&&(t=t.slice(0,1024));const n=a.test(t)?t.replace(a,"$1"):t;if(!n.includes("Error: ")){for(const t of e){const e=t(n);if(e){s.push(e);break}}if(s.length>=i+r)break}}return function(t){if(!t.length)return[];const e=Array.from(t);return/sentryWrapped/.test(dt(e).function||"")&&e.pop(),e.reverse(),o.test(dt(e).function||"")&&(e.pop(),o.test(dt(e).function||"")&&e.pop()),e.slice(0,i).map(t=>({...t,filename:t.filename||dt(e).filename,function:t.function||"?"}))}(s.slice(r))}}function dt(t){return t[t.length-1]||{}}function ft(t){try{return t&&"function"==typeof t&&t.name||c}catch{return c}}function lt(t){switch(u.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return vt(t,Error)}}function ht(t,e){return u.call(t)===`[object ${e}]`}function _t(t){return ht(t,"String")}function mt(t){return"object"==typeof t&&null!==t&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function gt(t){return null===t||mt(t)||"object"!=typeof t&&"function"!=typeof t}function yt(t){return ht(t,"Object")}function bt(t){return"undefined"!=typeof Event&&vt(t,Event)}function St(t){return Boolean(t?.then&&"function"==typeof t.then)}function vt(t,e){try{return t instanceof e}catch{return!1}}function xt(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch{}}function It(t,e){try{t.prototype=e.prototype=e.prototype||{},xt(t,"__sentry_original__",e)}catch{}}function kt(t){if(lt(t))return{message:t.message,name:t.name,stack:t.stack,...Et(t)};if(bt(t)){const{type:e,target:n,currentTarget:r,detail:s}=t;return{type:e,target:n,currentTarget:r,...s?{detail:s}:{},...Et(t)}}return t}function Et(t){return"object"==typeof t&&null!==t?Object.fromEntries(Object.entries(t)):{}}function wt(t){if(void 0!==p)return p?p(t):t();const e=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),r=n;return e in r&&"function"==typeof r[e]?(p=r[e])(t):(p=null,t())}function Ot(){return wt(()=>Math.random())}function At(){return wt(()=>Date.now())}function Ct(t,e=100,n=1/0){try{return Tt("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Tt(t,e,n=1/0,r=1/0,s=function(){const t=new WeakSet;function e(e){return!!t.has(e)||(t.add(e),!1)}function n(e){t.delete(e)}return[e,n]}()){const[i,a]=s;if(null==e||["boolean","string"].includes(typeof e)||"number"==typeof e&&Number.isFinite(e))return e;const o=Pt(0,e);if(!o.startsWith("[object "))return o;if(function(t){return Boolean(t[d])}(e))return e;const c=function(t){const e=t[f];return"number"==typeof e?e:void 0}(e),u=void 0!==c?c:n;if(0===u)return o.replace("object ","");if(i(e))return"[Circular ~]";const p=e;if(p&&"function"==typeof p.toJSON)try{return Tt("",p.toJSON(),u-1,r,s)}catch{}const l=Array.isArray(e)?[]:{};let h=0;const _=kt(e);for(const d in _){if(!Object.prototype.hasOwnProperty.call(_,d))continue;if(h>=r){l[d]="[MaxProperties ~]";break}const t=_[d];l[d]=Tt(d,t,u-1,r,s),h++}return a(e),l}function Pt(t,e){try{if(l){const t=l(e);if(t)return t}return"undefined"!=typeof global&&e===global?"[Global]":"number"!=typeof e||Number.isFinite(e)?"function"==typeof e?`[Function: ${ft(e)}]`:"symbol"==typeof e?`[${String(e)}]`:"bigint"==typeof e?`[BigInt: ${String(e)}]`:`[object ${function(t){const e=Object.getPrototypeOf(t);return e?.constructor?e.constructor.name:"null prototype"}(e)}]`:`[${e}]`}catch(n){return`**non-serializable** (${n})`}}function Rt(t,e=0){return"string"!=typeof t||0===e||t.length<=e?t:`${t.slice(0,e)}...`}function jt(t,e,n=!1){return!!_t(t)&&(ht(e,"RegExp")?e.test(t):_t(e)?n?t===e:t.includes(e):"function"==typeof e&&e(t))}function Nt(t=function(){const t=n;return t.crypto||t.msCrypto}()){try{if(t?.randomUUID)return wt(()=>t.randomUUID()).replace(/-/g,"")}catch{}return h||(h="10000000100040008000100000000000"),h.replace(/[018]/g,t=>(t^(16*Ot()&15)>>t/4).toString(16))}function Dt(t){return t.exception?.values?.[0]}function $t(t,e){const n=Dt(t);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...e},e&&"data"in e){const t={...r?.data,...e.data};n.mechanism.data=t}}function Lt(){return At()/_}function Mt(){return(m??(m=function(){const{performance:t}=n;if(!t?.now||!t.timeOrigin)return Lt;const e=t.timeOrigin;return()=>(e+wt(()=>t.now()))/_}()))()}function Jt(t){const e=Mt(),n={sid:Nt(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return{sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}}}(n)};return t&&Ut(n,t),n}function Ut(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),t.did||e.did||(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||Mt(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=32===e.sid.length?e.sid:Nt()),void 0!==e.init&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),"number"==typeof e.started&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof e.duration)t.duration=e.duration;else{const e=t.timestamp-t.started;t.duration=e>=0?e:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),"number"==typeof e.errors&&(t.errors=e.errors),e.status&&(t.status=e.status)}function Ft(t,e,n=2){if(!e||"object"!=typeof e||n<=0)return e;if(t&&0===Object.keys(e).length)return t;const r={...t};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=Ft(r[s],e[s],n-1));return r}function Wt(){return Nt()}function Yt(){return Nt().substring(16)}function zt(t){try{const e=n.WeakRef;if("function"==typeof e)return new e(t)}catch{}return t}function Bt(t){if(t){if("object"==typeof t&&"deref"in t&&"function"==typeof t.deref)try{return t.deref()}catch{return}return t}}function Kt(t,e){e?xt(t,y,zt(e)):delete t[y]}function qt(t){return Bt(t[y])}function Gt(){const t=et(tt());return t.stack=t.stack||new k(nt("defaultCurrentScope",()=>new b),nt("defaultIsolationScope",()=>new b))}function Ht(t){return Gt().withScope(t)}function Vt(t,e){const n=Gt();return n.withScope(()=>(n.getStackTop().scope=t,e(t)))}function Qt(t){return Gt().withScope(()=>t(Gt().getIsolationScope()))}function Xt(t){const e=et(t);return e.acs?e.acs:{withIsolationScope:Qt,withScope:Ht,withSetScope:Vt,withSetIsolationScope:(t,e)=>Qt(e),getCurrentScope:()=>Gt().getScope(),getIsolationScope:()=>Gt().getIsolationScope()}}function Zt(t,e){const{value:n,unit:r}="object"==typeof(s=t)&&null!=s&&!Array.isArray(s)&&Object.keys(s).includes("value")?t:{value:t,unit:void 0};var s;const i=function(t){if(Array.isArray(t))return{value:t,type:"array"};const e="string"==typeof t?"string":"boolean"==typeof t?"boolean":"number"!=typeof t||Number.isNaN(t)?null:Number.isInteger(t)?"integer":"double";return e?{value:t,type:e}:void 0}(n),a=r&&"string"==typeof r?{unit:r}:{};if(i)return{...i,...a};if(!e||"skip-undefined"===e&&void 0===n)return;let o="";try{o=JSON.stringify(n)??""}catch{}return{value:o,type:"string",...a}}function te(t,e=!1){const n={};for(const[r,s]of Object.entries(t??{})){const t=Zt(s,e);t&&(n[r]=t)}return n}function ee(){return Xt(tt()).getCurrentScope()}function ne(){return Xt(tt()).getIsolationScope()}function re(...t){const e=Xt(tt());if(2===t.length){const[n,r]=t;return n?e.withSetScope(n,r):e.withScope(r)}return e.withScope(t[0])}function se(){return ee().getClient()}function ie(t,e,n){t&&(xt(t,j,zt(n)),xt(t,R,e))}function ae(t){const e=t;return{scope:e[R],isolationScope:Bt(e[j])}}function oe(t){const e=function(t){if(t&&(_t(t)||Array.isArray(t)))return Array.isArray(t)?t.reduce((t,e)=>{const n=ce(e);return Object.entries(n).forEach(([e,n])=>{t[e]=n}),t},{}):ce(t)}(t);if(!e)return;const n=Object.entries(e).reduce((t,[e,n])=>(e.startsWith("sentry-")&&(t[e.slice(7)]=n),t),{});return Object.keys(n).length>0?n:void 0}function ce(t){return t.split(",").map(t=>{const e=t.indexOf("=");return-1===e?[]:[t.slice(0,e),t.slice(e+1)].map(t=>{try{return decodeURIComponent(t.trim())}catch{return}})}).reduce((t,[e,n])=>(e&&n&&(t[e]=n),t),{})}function ue(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}/`:r}${a}`}function pe(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function de(t){const e=t.getOptions(),{host:n}=t.getDsn()||{};let r;return e.orgId?r=String(e.orgId):n&&(r=function(t){return t.match(D)?.[1]}(n)),r}function fe(t){if("boolean"==typeof t)return Number(t);const e="string"==typeof t?parseFloat(t):t;return"number"!=typeof e||isNaN(e)||e<0||e>1?void 0:e}function le(t=Wt(),e=Yt(),n){let r="";return void 0!==n&&(r=n?"-1":"-0"),`${t}-${e}${r}`}function he(t=Wt(),e=Yt(),n){return`00-${t}-${e}-${n?"01":"00"}`}function _e(t){const{spanId:e,traceId:n}=t.spanContext(),{data:r,op:s,parent_span_id:i,status:a,origin:o,links:c}=ve(t);return{parent_span_id:i,span_id:e,trace_id:n,data:r,op:s,status:a,origin:o,links:c}}function me(t){const{spanId:e,traceId:n,isRemote:r}=t.spanContext(),s=r?e:ve(t).parent_span_id,i=ae(t).scope;return{parent_span_id:s,span_id:r?i?.getPropagationContext().propagationSpanId||Yt():e,trace_id:n}}function ge(t){return t&&t.length>0?t.map(({context:{spanId:t,traceId:e,traceFlags:n,...r},attributes:s})=>({span_id:t,trace_id:e,sampled:1===n,attributes:s,...r})):void 0}function ye(t){return t?.length?t.map(({context:{spanId:t,traceId:e,traceFlags:n},attributes:r})=>({span_id:t,trace_id:e,sampled:1===n,attributes:r})):void 0}function be(t){return"number"==typeof t?Se(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?Se(t.getTime()):Mt()}function Se(t){return t>9999999999?t/1e3:t}function ve(t){if(ke(t))return t.getSpanJSON();const{spanId:e,traceId:n}=t.spanContext();if(Ie(t)){const{attributes:r,startTime:s,name:i,endTime:a,status:o,links:c}=t;return{span_id:e,trace_id:n,data:r,description:i,parent_span_id:xe(t),start_timestamp:be(s),timestamp:be(a)||void 0,status:we(o),op:r[O],origin:r[A],links:ge(c)}}return{span_id:e,trace_id:n,start_timestamp:0,data:{}}}function xe(t){return"parentSpanId"in t?t.parentSpanId:"parentSpanContext"in t?t.parentSpanContext?.spanId:void 0}function Ie(t){const e=t;return!!(e.attributes&&e.startTime&&e.name&&e.endTime&&e.status)}function ke(t){return"function"==typeof t.getSpanJSON}function Ee(t){const{traceFlags:e}=t.spanContext();return 1===e}function we(t){if(t&&0!==t.code)return 1===t.code?"ok":t.message||"internal_error"}function Oe(t){return t&&1!==t.code&&0!==t.code&&"cancelled"!==t.message?"error":"ok"}function Ae(t,e){xt(e,U,t[U]||t),t[J]?t[J].add(e):xt(t,J,new Set([e]))}function Ce(t){const e=new Set;return function t(n){if(!e.has(n)&&Ee(n)){e.add(n);const r=n[J]?Array.from(n[J]):[];for(const e of r)t(e)}}(t),Array.from(e)}function Te(t){return t[U]||t}function Pe(){const t=Xt(tt());return t.getActiveSpan?t.getActiveSpan():qt(ee())}function Re(){M||(rt(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),M=!0)}function je(t){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const e=t||se()?.getOptions();return!(!e||null==e.tracesSampleRate&&!e.tracesSampler)}function Ne(t,e){if(!e?.length)return!1;for(const n of e){if(De(n)){if(t.description&&jt(t.description,n))return!0;continue}const e=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!e)continue;const r=!n.name||t.description&&jt(t.description,n.name),s=!n.op||t.op&&jt(t.op,n.op),i=!n.attributes||Object.entries(n.attributes).every(([e,n])=>{return r=t.attributes?.[e],s=n,"string"==typeof r&&("string"==typeof s||s instanceof RegExp)?jt(r,s):Array.isArray(r)&&Array.isArray(s)?r.length===s.length&&r.every((t,e)=>t===s[e]):r===s;var r,s});if(r&&s&&i)return!0}return!1}function De(t){return"string"==typeof t||t instanceof RegExp}function $e(t){return!!t&&!0===t[W]}function Le(t,e){xt(t,z,e)}function Me(t,e){const n=e.getOptions(),{publicKey:r}=e.getDsn()||{},s={environment:n.environment||"production",release:n.release,public_key:r,trace_id:t,org_id:de(e)};return e.emit("createDsc",s),s}function Je(t,e){const n=e.getPropagationContext();return n.dsc||Me(n.traceId,t)}function Ue(t){const e=se();if(!e)return{};const n=F(t),r=ve(n),s=r.data,i=n.spanContext().traceState,a=i?.get("sentry.sample_rate")??s["sentry.sample_rate"]??s["sentry.previous_trace_sample_rate"];function o(t){return"number"!=typeof a&&"string"!=typeof a||(t.sample_rate=`${a}`),t}const c=n[z];if(c)return o(c);if($e(n)&&!je(e.getOptions())){const t=ae(n).scope;if(t)return o({...Je(e,t)})}const u=i?.get("sentry.dsc"),p=u&&oe(u);if(p)return o(p);const d=Me(t.spanContext().traceId,e),f=s["sentry.source"]??s["sentry.span.source"],l=r.description;return"url"!==f&&l&&(d.transaction=l),je()&&(d.sampled=String(Ee(n)),d.sample_rand=i?.get("sentry.sample_rand")??ae(n).scope?.getPropagationContext().sampleRand.toString()),o(d),e.emit("createDsc",d,n),d}function Fe(t){return!!t&&"function"==typeof t&&"_streamed"in t&&!!t._streamed}function We(t,e=[]){return[t,e]}function Ye(t,e){const n=t[1];for(const r of n)if(e(r,r[0].type))return!0;return!1}function ze(t){const e=et(n);return e.encodePolyfill?e.encodePolyfill(t):(new TextEncoder).encode(t)}function Be(t){return[{type:"span"},t]}function Ke(t){if(!t?.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function qe(t){if(!t||0===t.length)return;const e={};return t.forEach(t=>{const n=t.attributes||{},r=n[C],s=n[T];"string"==typeof r&&"number"==typeof s&&(e[t.name]={value:s,unit:r})}),e}function Ge(t){return"stream"===t.getOptions().traceLifecycle}function He(t){return t&&"number"==typeof t||t instanceof Date||Array.isArray(t)}function Ve(t){return!!(t.start_timestamp&&t.timestamp&&t.span_id&&t.trace_id)}function Qe(t,e){const n=Xe();return n.withActiveSpan?n.withActiveSpan(t,e):re(n=>(Kt(n,t||void 0),e(n)))}function Xe(){return Xt(tt())}function Ze(t,e,n,r){const s=se(),i=s?.getOptions()||{},{name:a=""}=t,o={spanAttributes:{...t.attributes},spanName:a,parentSampled:r};s?.emit("beforeSampling",o,{decision:!1});const c=o.parentSampled??r,u=o.spanAttributes,p=e.getPropagationContext(),d=tn(e),[f,l,h]=d?[!1]:function(t,e,n){if(!je(t))return[!1];let r,s;"function"==typeof t.tracesSampler?(s=t.tracesSampler({...e,inheritOrSampleWith:t=>"number"==typeof e.parentSampleRate?e.parentSampleRate:"boolean"==typeof e.parentSampled?Number(e.parentSampled):t}),r=!0):void 0!==e.parentSampled?s=e.parentSampled:void 0!==t.tracesSampleRate&&(s=t.tracesSampleRate,r=!0);const i=fe(s);return void 0===i?[!1]:i?[n<i,i,r]:[!1,i,r]}(i,{name:a,parentSampled:c,attributes:u,parentSampleRate:fe(p.dsc?.sample_rate)},p.sampleRand),_=new K({...t,attributes:{[E]:"custom",[w]:void 0!==l&&h?l:void 0,...u},sampled:f});return f||!s||d||s.recordDroppedEvent("sample_rate",Ge(s)?"span":"transaction"),ie(_,e,n),s&&s.emit("spanStart",_),_}function tn(t){return!0===t.getScopeData().sdkProcessingMetadata[q]}function en(t,e){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:i}=e;!function(t,e){const{extra:n,tags:r,user:s,contexts:i,level:a,transactionName:o}=e;Object.keys(n).length&&(t.extra={...n,...t.extra}),Object.keys(r).length&&(t.tags={...r,...t.tags}),Object.keys(s).length&&(t.user={...s,...t.user}),Object.keys(i).length&&(t.contexts={...i,...t.contexts}),a&&(t.level=a),o&&"transaction"!==t.type&&(t.transaction=o)}(t,e),r&&function(t,e){t.contexts={trace:me(e),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:Ue(e),...t.sdkProcessingMetadata};const n=ve(F(e)).description;n&&!t.transaction&&"transaction"===t.type&&(t.transaction=n)}(t,r),function(t,e){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],e&&(t.fingerprint=t.fingerprint.concat(e)),t.fingerprint.length||delete t.fingerprint}(t,n),function(t,e){const n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}(t,s),function(t,e){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...e}}(t,i)}function nn(t,e){const{extra:n,tags:r,attributes:s,user:i,contexts:a,level:o,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:p,eventProcessors:d,attachments:f,propagationContext:l,transactionName:h,span:_}=e;rn(t,"extra",n),rn(t,"tags",r),rn(t,"attributes",s),rn(t,"user",i),rn(t,"contexts",a),t.sdkProcessingMetadata=Ft(t.sdkProcessingMetadata,c,2),o&&(t.level=o),h&&(t.transactionName=h),_&&(t.span=_),u.length&&(t.breadcrumbs=[...t.breadcrumbs,...u]),p.length&&(t.fingerprint=[...t.fingerprint,...p]),d.length&&(t.eventProcessors=[...t.eventProcessors,...d]),f.length&&(t.attachments=[...t.attachments,...f]),t.propagationContext={...t.propagationContext,...l}}function rn(t,e,n){t[e]=Ft(t[e],n,1)}function sn(t,e){const n=nt("globalScope",()=>new b).getScopeData();return t&&nn(n,t.getScopeData()),e&&nn(n,e.getScopeData()),n}function an(t){return new G(e=>{e(t)})}function on(t){return new G((e,n)=>{n(t)})}function cn(t,e,n,r=0){try{const s=un(e,n,t,r);return St(s)?s:an(s)}catch(ut){return on(ut)}}function un(t,e,n,r){const s=n[r];if(!t||!s)return t;const i=s({...t},e);return St(i)?i.then(t=>un(t,e,n,r+1)):un(i,e,n,r+1)}function pn(t){if(t)return function(t){return t instanceof b||"function"==typeof t}(t)||function(t){return Object.keys(t).some(t=>Z.includes(t))}(t)?{captureContext:t}:t}function dn(){const t=ne(),e=ee().getSession()||t.getSession();e&&function(t,e){let n={};e?n={status:e}:"ok"===t.status&&(n={status:"exited"}),Ut(t,n)}(e),fn(),t.setSession()}function fn(){const t=ne(),e=se(),n=t.getSession();n&&e&&e.captureSession(n)}return t({$t:yt,A:$e,At:$t,B:be,Bt:Ot,C:Ye,Ct:Yt,D:Ue,Dt:function(){return null===g&&(g=function(){const{performance:t}=n;if(!t?.now)return;const e=3e5,r=wt(()=>t.now()),s=At(),i=t.timeOrigin;if("number"==typeof i&&Math.abs(i+r-s)<e)return i;const a=t.timing?.navigationStart;return"number"==typeof a&&Math.abs(a+r-s)<e?a:s-r}()),g},E:Je,Et:Ut,Ft:function(t,e){if(!Array.isArray(t))return"";const n=[];for(let r=0;r<t.length;r++){const e=t[r];gt(e)?n.push(String(e)):e instanceof Error?n.push(e.message?`${e.name}: ${e.message}`:e.name):n.push(Pt(0,e))}return n.join(e)},G:function(t){return{...t,attributes:te(t.attributes),links:t.links?.map(t=>({...t,attributes:te(t.attributes)}))}},Gt:It,H:function(t){if(ke(t))return t.getStreamedSpanJSON();const{spanId:e,traceId:n}=t.spanContext();if(Ie(t)){const{attributes:r,startTime:s,name:i,endTime:a,status:o,links:c}=t;return{name:i,span_id:e,trace_id:n,parent_span_id:xe(t),start_timestamp:be(s),end_timestamp:be(a),is_segment:t===Te(t),status:Oe(o),attributes:r,links:ye(c)}}return{span_id:e,trace_id:n,start_timestamp:0,name:"",end_timestamp:0,status:"ok",is_segment:t===Te(t)}},Ht:function(t){const e=Object.keys(kt(t));return e.sort(),e[0]?e.join(", "):"[object has no keys]"},I:Ce,It:function(t,e=[],n=!1){for(const r of e)if(jt(t,r,n))return!0;return!1},J:he,Jt:lt,Kt:function(t){return ht(t,"DOMError")},L:function(t,e){t[J]&&t[J].delete(e)},Lt:function t(e,n=3,r=102400){const s=Ct(e,n);return i=s,function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(i))>r?t(e,n-1,r):s;var i},M:Ne,Mt:function(t){if(function(t){try{return t.__sentry_captured__}catch{}}(t))return!0;try{xt(t,"__sentry_captured__",!0)}catch{}return!1},N:je,Nt:function(t){const{message:e,event_id:n}=t;if(e)return e;const r=Dt(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"},Ot:Lt,P:Pe,Pt:Nt,Q:function(t){const e="string"==typeof t?function(t){const e=$.exec(t);if(!e)return void rt(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});const[n,r,s="",i="",a="",o=""]=e.slice(1);let c="",u=o;const p=u.split("/");if(p.length>1&&(c=p.slice(0,-1).join("/"),u=p.pop()),u){const t=u.match(/^\d+/);t&&(u=t[0])}return pe({host:i,pass:s,path:c,projectId:u,port:a,protocol:n,publicKey:r})}(t):pe(t);if(e)return e},Qt:mt,R:Re,Rt:function(t){l=t},S:function(t){return function(t){return t in B}(t)?B[t]:t},St:Kt,T:Fe,Tt:Ft,U:function(t){const{traceId:e,spanId:n}=t.spanContext();return le(e,n,Ee(t))},Ut:function(t,e,n){if(!(e in t))return;const r=t[e];if("function"!=typeof r)return;const s=n(r);"function"==typeof s&&It(s,r);try{t[e]=s}catch{}},V:ve,Vt:xt,W:function(t){const{traceId:e,spanId:n}=t.spanContext();return he(e,n,Ee(t))},Wt:function(t){return t.__sentry_original__},X:fe,Xt:bt,Y:function(t,e){const n=function(t){if(!t)return;const e=t.match(L);if(!e)return;let n;return"1"===e[3]?n=!0:"0"===e[3]&&(n=!1),{traceId:e[1],parentSampled:n,parentSpanId:e[2]}}(t),r=oe(e);if(!n?.traceId)return{traceId:Wt(),sampleRand:Ot()};const s=function(t,e){const n=fe(e?.sample_rand);if(void 0!==n)return n;const r=fe(e?.sample_rate);return r&&void 0!==t?.parentSampled?t.parentSampled?Ot()*r:r+Ot()*(1-r):Ot()}(n,r);r&&(r.sample_rand=s.toString());const{traceId:i,parentSpanId:a,parentSampled:o}=n;return{traceId:i,parentSpanId:a,sampled:o,dsc:r||{},sampleRand:s}},Yt:function(t){return ht(t,"ErrorEvent")},Z:ue,Zt:vt,_:function(t,e,n,r){const s=Ke(n);return We({sent_at:new Date(At()).toISOString(),...s&&{sdk:s},...!!r&&e&&{dsn:ue(e)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])},_t:ne,a:function(){return ne().lastEventId()},an:function(t){const e=t.exception;if(e){const t=[];try{return e.values.forEach(e=>{e.stacktrace.frames&&t.push(...e.stacktrace.frames)}),t}catch{return}}},b:We,bt:re,c:function(t,e,r,s,i,a){const{normalizeDepth:o=3,normalizeMaxBreadth:c=1e3}=t,u={...e,event_id:e.event_id||r.event_id||Nt(),timestamp:e.timestamp||Lt()},p=r.integrations||t.integrations.map(t=>t.name);!function(t,e){const{environment:n,release:r,dist:s,maxValueLength:i}=e;t.environment=t.environment||n||"production",!t.release&&r&&(t.release=r),!t.dist&&s&&(t.dist=s);const a=t.request;a?.url&&i&&(a.url=Rt(a.url,i)),i&&t.exception?.values?.forEach(t=>{t.value&&(t.value=Rt(t.value,i))})}(u,t),function(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}(u,p),i&&i.emit("applyFrameMetadata",e),void 0===e.type&&function(t,e){const r=function(t){const e=n._sentryDebugIds,r=n._debugIds;if(!e&&!r)return{};const s=e?Object.keys(e):[],i=r?Object.keys(r):[];if(X&&s.length===V&&i.length===Q)return X;V=s.length,Q=i.length,X={},H||(H={});const a=(e,n)=>{for(const r of e){const e=n[r],s=H?.[r];if(s&&X&&e)X[s[0]]=e,H&&(H[r]=[s[0],e]);else if(e){const n=t(r);for(let t=n.length-1;t>=0;t--){const s=n[t]?.filename;if(s&&X&&H){X[s]=e,H[r]=[s,e];break}}}}};return e&&a(s,e),r&&a(i,r),X}(e);t.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(t=>{t.filename&&(t.debug_id=r[t.filename])})})}(u,t.stackParser);const d=function(t,e){if(!e)return t;const n=t?t.clone():new b;return n.update(e),n}(s,r.captureContext);r.mechanism&&$t(u,r.mechanism);const f=i?i.getEventProcessors():[],l=sn(a,d),h=[...r.attachments||[],...l.attachments];h.length&&(r.attachments=h),en(u,l);const _=[...f,...l.eventProcessors];return(r.data&&!0===r.data.__sentry__?an(u):cn(_,u,r)).then(t=>(t&&function(t){const e={};if(t.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(t=>{t.debug_id&&(t.abs_path?e[t.abs_path]=t.debug_id:t.filename&&(e[t.filename]=t.debug_id),delete t.debug_id)})}),0===Object.keys(e).length)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const n=t.debug_meta.images;Object.entries(e).forEach(([t,e])=>{n.push({type:"sourcemap",code_file:t,debug_id:e})})}(t),"number"==typeof o&&o>0?function(t,e,n){if(!t)return null;const r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(t=>({...t,...t.data&&{data:Ct(t.data,e,n)}}))},...t.user&&{user:Ct(t.user,e,n)},...t.contexts&&{contexts:Ct(t.contexts,e,n)},...t.extra&&{extra:Ct(t.extra,e,n)}};return t.contexts?.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=Ct(t.contexts.trace.data,e,n))),t.spans&&(r.spans=t.spans.map(t=>({...t,...t.data&&{data:Ct(t.data,e,n)}}))),t.contexts?.flags&&r.contexts&&(r.contexts.flags=Ct(t.contexts.flags,3,n)),r}(t,o,c):t))},d:function(t){const e=Xe();if(e.startInactiveSpan)return e.startInactiveSpan(t);const n=function(t){const e={isStandalone:(t.experimental||{}).standalone,...t};if(t.startTime){const n={...e};return n.startTimestamp=be(t.startTime),delete n.startTime,n}return e}(t),{forceTransaction:r,parentSpan:s}=t;return(t.scope?e=>re(t.scope,e):void 0!==s?t=>Qe(s,t):t=>t())(()=>{const e=ee(),i=function(t,e){if(e)return e;if(null===e)return;const n=qt(t);if(!n)return;const r=se();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?F(n):n}(e,s),a=se();return t.onlyIfParent&&!i?function(t,e){e?.recordDroppedEvent("no_parent_span","span");const n=new Y({traceId:t.getPropagationContext().traceId});return ie(n,t,ne()),n}(e,a):function({parentSpan:t,spanArguments:e,forceTransaction:n,scope:r}){const s=ne();if(!je()){const e={...s.getPropagationContext(),...r.getPropagationContext()},i=new Y({traceId:t?t.spanContext().traceId:e.traceId});return t&&!n&&Ae(t,i),ie(i,r,s),i}const i=se();if(function(t,e){const n=t?.getOptions().ignoreSpans;return!!(t&&Ge(t)&&n?.length)&&Ne({description:e.name||"",op:e.attributes?.["sentry.op"]||e.op,attributes:e.attributes},n)}(i,e)){tn(r)||i?.recordDroppedEvent("ignored","span");const e=new Y({dropReason:"ignored",traceId:t?.spanContext().traceId??r.getPropagationContext().traceId});return ie(e,r,s),e}let a;if(t&&!n)a=function(t,e,n,r){const{spanId:s,traceId:i}=t.spanContext(),a=tn(e),o=!a&&Ee(t),c=o?new K({...n,parentSpanId:s,traceId:i,sampled:o}):new Y({traceId:i});Ae(t,c),ie(c,e,r);const u=se();return u?(Ge(u)&&$e(c)&&($e(t)&&t.dropReason?(c.dropReason=t.dropReason,u.recordDroppedEvent(t.dropReason,"span")):a||(c.dropReason="sample_rate",u.recordDroppedEvent("sample_rate","span"))),u.emit("spanStart",c),n.endTimestamp&&(u.emit("spanEnd",c),u.emit("afterSpanEnd",c)),c):c}(t,r,e,s),Ae(t,a);else if(t){const n=Ue(t),{traceId:i,spanId:o}=t.spanContext(),c=Ee(t);a=Ze({traceId:i,parentSpanId:o,...e},r,s,c),Le(a,n)}else{const{traceId:t,dsc:n,parentSpanId:i,sampled:o}={...s.getPropagationContext(),...r.getPropagationContext()};a=Ze({traceId:t,parentSpanId:i,...e},r,s,o),n&&Le(a,n)}return a}({parentSpan:i,spanArguments:n,forceTransaction:r,scope:e})})},en:gt,et:function(t){if(t)return function(t){if(0!==Object.keys(t).length)return Object.entries(t).reduce((t,[e,n],r)=>{const s=`${encodeURIComponent(e)}=${encodeURIComponent(n)}`,i=0===r?s:`${t},${s}`;return i.length>8192?t:i},"")}(Object.entries(t).reduce((t,[e,n])=>(n&&(t[`${N}${e}`]=n),t),{}))},f:Qe,fn:nt,g:function(t,e,n,r){const s=Ke(n),i=t.type&&"replay_event"!==t.type?t.type:"event";!function(t,e){if(!e)return t;const n=t.sdk||{};t.sdk={...n,name:n.name||e.name,version:n.version||e.version,integrations:[...t.sdk?.integrations||[],...e.integrations||[]],packages:[...t.sdk?.packages||[],...e.packages||[]],settings:t.sdk?.settings||e.settings?{...t.sdk?.settings,...e.settings}:void 0}}(t,n?.sdk);const a=function(t,e,n,r){const s=t.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:t.event_id,sent_at:new Date(At()).toISOString(),...e&&{sdk:e},...!!n&&r&&{dsn:ue(r)},...s&&{trace:s}}}(t,s,r,e);return delete t.sdkProcessingMetadata,We(a,[[{type:i},t]])},gt:ee,h:function(t,e,n,r=Pe()){const s=r&&F(r);s&&s.addEvent(t,{[T]:e,[C]:n})},ht:se,i:function(){const t=se();return!1!==t?.getOptions().enabled&&!!t?.getTransport()},in:pt,j:function(t,e){const n=e.parent_span_id,r=e.span_id;if(n)for(const s of t)s.parent_span_id===r&&(s.parent_span_id=n)},jt:function(t,e,n){const r=t.exception=t.exception||{},s=r.values=r.values||[],i=s[0]=s[0]||{};i.value||(i.value=e||""),i.type||(i.type=n||"Error")},kt:Mt,l:on,ln:rt,m:Ge,n:function(t,e){return ee().captureException(t,pn(e))},nn:_t,nt:function(t,e){t.setAttribute("http.response.status_code",e);const n=function(t){if(t<400&&t>=100)return{code:1};if(t>=400&&t<500)switch(t){case 401:return{code:2,message:"unauthenticated"};case 403:return{code:2,message:"permission_denied"};case 404:return{code:2,message:"not_found"};case 409:return{code:2,message:"already_exists"};case 413:return{code:2,message:"failed_precondition"};case 429:return{code:2,message:"resource_exhausted"};case 499:return{code:2,message:"cancelled"};default:return{code:2,message:"invalid_argument"}}if(t>=500&&t<600)switch(t){case 501:return{code:2,message:"unimplemented"};case 503:return{code:2,message:"unavailable"};case 504:return{code:2,message:"deadline_exceeded"};default:return{code:2,message:"internal_error"}}return{code:2,message:"internal_error"}}(e);"unknown_error"!==n.message&&t.setStatus(n)},o:function(t,e){ne().setContext(t,e)},on:ft,pn:tt,q:le,qt:function(t){return ht(t,"DOMException")},r:function(t=!1){t?dn():fn()},rn:St,s:function(t){const e=ne(),{user:r}=sn(e,ee()),{userAgent:s}=n.navigator||{},i=Jt({user:r,...s&&{userAgent:s},...t}),a=e.getSession();return"ok"===a?.status&&Ut(a,{status:"exited"}),dn(),e.setSession(i),i},sn:function(t){return Array.isArray(t)?pt(...t):t},t:function(t,e){return ee().captureEvent(t,e)},tn:function(t){return"undefined"!=typeof Request&&vt(t,Request)},tt:ie,u:an,v:function(t,e){const[n,r]=t;return[n,[...r,e]]},vt:function(t){const{traceId:e,parentSpanId:n,propagationSpanId:r}=t.getPropagationContext(),s={trace_id:e,span_id:r||Yt()};return n&&(s.parent_span_id=n),s},w:function(t){const[e,n]=t;let r=JSON.stringify(e);function s(t){"string"==typeof r?r="string"==typeof t?r+t:[ze(r),t]:r.push("string"==typeof t?ze(t):t)}for(const i of n){const[t,e]=i;if(s(`\n${JSON.stringify(t)}\n`),"string"==typeof e||e instanceof Uint8Array)s(e);else{let t;try{t=JSON.stringify(e)}catch{t=JSON.stringify(Ct(e))}s(t)}}return"string"==typeof r?r:function(t){const e=t.reduce((t,e)=>t+e.length,0),n=new Uint8Array(e);let r=0;for(const s of t)n.set(s,r),r+=s.length;return n}(r)},wt:Wt,x:function(t,e){return Ye(t,(t,n)=>e.includes(n))},xt:Xt,y:function(t){const e="string"==typeof t.data?ze(t.data):t.data;return[{type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType},e]},yt:function(){return!1},z:Ee,zt:At}),{setters:[],execute:function(){!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};t.SENTRY_RELEASE={id:"f14ad0099eab1969fdd065b56af5fdd3cf530de6"};var e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="905456bc-252e-4113-815c-f782d4a78ca5",t._sentryDebugIdIdentifier="sentry-dbid-905456bc-252e-4113-815c-f782d4a78ca5")}catch(t){}}(),t("hn",n=globalThis),t("mn",r="10.59.0"),t("cn",["debug","info","warn","error","log","assert","trace"]),t("dn",s={}),t("un",{enable:st,disable:it,isEnabled:at,log:ot,warn:ct,error:ut}),i=50,a=/\(error: (.*)\)/,o=/captureMessage|captureException/,c="<anonymous>",u=Object.prototype.toString,d=Symbol.for("sentry.skipNormalization"),f=Symbol.for("sentry.overrideNormalizationDepth"),_=1e3,g=null,y="_sentrySpan",b=class t{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Wt(),sampleRand:Ot()}}clone(){const e=new t;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._attributes={...this._attributes},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,e._conversationId=this._conversationId,Kt(e,qt(this)),e}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Ut(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(t){return this._conversationId=t||void 0,this._notifyScopeListeners(),this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,e){return this.setTags({[t]:e})}setAttributes(t){return this._attributes={...this._attributes,...t},this._notifyScopeListeners(),this}setAttribute(t,e){return this.setAttributes({[t]:e})}removeAttribute(t){return t in this._attributes&&(delete this._attributes[t],this._notifyScopeListeners()),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,e){return this._extra={...this._extra,[t]:e},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,e){return null===e?delete this._contexts[t]:this._contexts[t]=e,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const n="function"==typeof e?e(this):e,{tags:r,attributes:s,extra:i,user:a,contexts:o,level:c,fingerprint:u=[],propagationContext:p,conversationId:d}=(n instanceof t?n.getScopeData():yt(n)?e:void 0)||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...s},this._extra={...this._extra,...i},this._contexts={...this._contexts,...o},a&&Object.keys(a).length&&(this._user=a),c&&(this._level=c),u.length&&(this._fingerprint=u),p&&(this._propagationContext=p),d&&(this._conversationId=d),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,Kt(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Wt(),sampleRand:Ot()}),this._notifyScopeListeners(),this}addBreadcrumb(t,e){const n="number"==typeof e?e:100;if(n<=0)return this;const r={timestamp:Lt(),...t,message:t.message?Rt(t.message,2048):t.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:qt(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Ft(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,e){const n=e?.event_id||Nt();if(!this._client)return n;const r=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:r,...e,event_id:n},this),n}captureMessage(t,e,n){const r=n?.event_id||Nt();if(!this._client)return r;const s=n?.syntheticException??new Error(t);return this._client.captureMessage(t,e,{originalException:t,syntheticException:s,...n,event_id:r},this),r}captureEvent(t,e){const n=t.event_id||e?.event_id||Nt();return this._client?(this._client.captureEvent(t,{...e,event_id:n},this),n):n}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}},S=t=>t instanceof Promise&&!t[v],v=Symbol("chained PromiseLike"),x=(t,e,n)=>{const r=t.then(t=>(e(t),t),t=>{throw n(t),t});return S(r)&&S(t)?r:I(t,r)},I=(t,e)=>{if(!e)return t;let n=!1;for(const r in t){if(r in e)continue;n=!0;const s=t[r];"function"==typeof s?Object.defineProperty(e,r,{value:(...e)=>s.apply(t,e),enumerable:!0,configurable:!0,writable:!0}):e[r]=s}return n&&Object.assign(e,{[v]:!0}),e},k=class{constructor(t,e){let n,r;n=t||new b,r=e||new b,this._stack=[{scope:n}],this._isolationScope=r}withScope(t){const e=this._pushScope();let n;try{n=t(e)}catch(r){throw this._popScope(),r}return St(n)?x(n,()=>this._popScope(),()=>this._popScope()):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return!(this._stack.length<=1||!this._stack.pop())}},t("pt",E="sentry.source"),t("ft",w="sentry.sample_rate"),t("dt","sentry.previous_trace_sample_rate"),t("lt",O="sentry.op"),t("ut",A="sentry.origin"),t("ot","sentry.idle_span_finish_reason"),t("st",C="sentry.measurement_unit"),t("ct",T="sentry.measurement_value"),P="sentry.custom_span_name",t("at","sentry.profile_id"),t("it","sentry.exclusive_time"),t("mt","sentry.link.type"),t("rt","gen_ai.conversation.id"),R="_sentryScope",j="_sentryIsolationScope",t("$",N="sentry-"),D=/^o(\d+)\./,$=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/,t("K",L=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$")),M=!1,J="_sentryChildSpans",U="_sentryRootSpan",t("F",F=Te),W=Symbol.for("sentry.nonRecordingSpan"),t("k",Y=class{constructor(t={}){this._traceId=t.traceId||Wt(),this._spanId=t.spanId||Yt(),this.dropReason=t.dropReason,xt(this,W,!0)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(t){}setAttribute(t,e){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,e,n){return this}addLink(t){return this}addLinks(t){return this}recordException(t,e){}}),t("O","production"),z="_frozenDsc",B={sessions:"session",event:"error",client_report:"internal",user_report:"default",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",raw_security:"security",log:"log_item",trace_metric:"metric"},t("p",K=class{constructor(t={}){this._traceId=t.traceId||Wt(),this._spanId=t.spanId||Yt(),this._startTime=t.startTimestamp||Mt(),this._links=t.links,this._attributes={},this.setAttributes({[A]:"manual",[O]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this._links?this._links.push(t):this._links=[t],this}addLinks(t){return this._links?this._links.push(...t):this._links=t,this}recordException(t,e){}spanContext(){const{_spanId:t,_traceId:e,_sampled:n}=this;return{spanId:t,traceId:e,traceFlags:n?1:0}}setAttribute(t,e){return void 0===e?delete this._attributes[t]:this._attributes[t]=e,this}setAttributes(t){return Object.keys(t).forEach(e=>this.setAttribute(e,t[e])),this}updateStartTime(t){this._startTime=be(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(E,"custom"),this}end(t){this._endTime||(this._endTime=be(t),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[O],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:we(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[A],profile_id:this._attributes["sentry.profile_id"],exclusive_time:this._attributes["sentry.exclusive_time"],measurements:qe(this._events),is_segment:this._isStandaloneSpan&&F(this)===this||void 0,segment_id:this._isStandaloneSpan?F(this).spanContext().spanId:void 0,links:ge(this._links)}}getStreamedSpanJSON(){return{name:this._name??"",span_id:this._spanId,trace_id:this._traceId,parent_span_id:this._parentSpanId,start_timestamp:this._startTime,end_timestamp:this._endTime??this._startTime,is_segment:this._isStandaloneSpan||this===F(this),status:Oe(this._status),attributes:this._attributes,links:ye(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,e,n){const r=He(e)?e:n||Mt(),s=He(e)?{}:e||{},i={name:t,time:be(r),attributes:s};return this._events.push(i),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=se();if(t&&(t.emit("spanEnd",this),this._isStandaloneSpan||t.emit("afterSpanEnd",this)),!this._isStandaloneSpan&&this!==F(this))return;if(this._isStandaloneSpan)return void(this._sampled?function(t){const e=se();if(!e)return;const n=t[1];n&&0!==n.length?e.sendEnvelope(t):e.recordDroppedEvent("before_send","span")}(function(t,e){const n=Ue(t[0]),r=e?.getDsn(),s=e?.getOptions().tunnel,i={sent_at:new Date(At()).toISOString(),...(a=n,!!a.trace_id&&!!a.public_key&&{trace:n}),...!!s&&r&&{dsn:ue(r)}};var a;const{beforeSendSpan:o,ignoreSpans:c}=e?.getOptions()||{},u=c?.length?t.filter(t=>{const e=ve(t);return!Ne({description:e.description,op:e.op,attributes:e.data},c)}):t,p=t.length-u.length;p&&e?.recordDroppedEvent("before_send","span",p);const d=o?t=>{const e=ve(t);return(Fe(o)?e:o(e))||(Re(),e)}:ve,f=[];for(const l of u){const t=d(l);t&&f.push(Be(t))}return We(i,f)}([this],t)):t&&t.recordDroppedEvent("sample_rate","span"));if(t&&Ge(t))return void t.emit("afterSegmentSpanEnd",this);const e=this._convertSpanToTransaction();e&&(ae(this).scope||ee()).captureEvent(e)}_convertSpanToTransaction(){if(!Ve(ve(this)))return;this._name||(this._name="<unlabeled transaction>");const{scope:t,isolationScope:e}=ae(this),n=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(!0!==this._sampled)return;const r=Ce(this).filter(t=>t!==this&&!function(t){return t instanceof K&&t.isStandaloneSpan()}(t)).map(t=>ve(t)).filter(Ve),s=this._attributes[E];delete this._attributes[P];let i=!1;r.forEach(t=>{delete t.data[P],t.op?.startsWith("gen_ai.")&&(i=!0)});const a={contexts:{trace:_e(this)},spans:r.length>1e3?r.sort((t,e)=>t.start_timestamp-e.start_timestamp).slice(0,1e3):r,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:e,dynamicSamplingContext:Ue(this),hasGenAiSpans:i},request:n,...s&&{transaction_info:{source:s}}},o=qe(this._events);return o&&Object.keys(o).length&&(a.measurements=o),a}}),q="__SENTRY_SUPPRESS_TRACING__",G=class t{constructor(t){this._state=0,this._handlers=[],this._runExecutor(t)}then(e,n){return new t((t,r)=>{this._handlers.push([!1,n=>{if(e)try{t(e(n))}catch(s){r(s)}else t(n)},e=>{if(n)try{t(n(e))}catch(s){r(s)}else r(e)}]),this._executeHandlers()})}catch(t){return this.then(t=>t,t)}finally(e){return new t((t,n)=>{let r,s;return this.then(t=>{s=!1,r=t,e&&e()},t=>{s=!0,r=t,e&&e()}).then(()=>{s?n(r):t(r)})})}_executeHandlers(){if(0===this._state)return;const t=this._handlers.slice();this._handlers=[],t.forEach(t=>{t[0]||(1===this._state&&t[1](this._value),2===this._state&&t[2](this._value),t[0]=!0)})}_runExecutor(t){const e=(t,e)=>{0===this._state&&(St(e)?e.then(n,r):(this._state=t,this._value=e,this._executeHandlers()))},n=t=>{e(1,t)},r=t=>{e(2,t)};try{t(n,r)}catch(s){r(s)}}},Z=["user","level","extra","contexts","tags","fingerprint","propagationContext"]}}});
//# sourceMappingURL=exports-legacy-BgX55wRH.js.map