PageSourceSearch

https://my.botto.ai/assets/js/[email protected]

js botto.ai collected 2026-10-05 11:52:53 UTC 85,804 bytes, 1 lines download raw bytes

1const t="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,e=globalThis,n="10.45.0";function r(){return s(e),e}function s(t){const e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||n,e[n]=e[n]||{}}function o(t,r,s=e){const o=s.__SENTRY__=s.__SENTRY__||{},i=o[n]=o[n]||{};return i[t]||(i[t]=r())}const i=["debug","info","warn","error","log","assert","trace"],a={};function c(t){if(!("console"in e))return t();const n=e.console,r={},s=Object.keys(a);s.forEach(t=>{const e=a[t];r[t]=n[t],n[t]=e});try{return t()}finally{s.forEach(t=>{n[t]=r[t]})}}function u(){return d().enabled}function l(n,...r){t&&u()&&c(()=>{e.console[n](`Sentry Logger [${n}]:`,...r)})}function d(){return t?o("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const p={enable:function(){d().enabled=!0},disable:function(){d().enabled=!1},isEnabled:u,log:function(...t){l("log",...t)},warn:function(...t){l("warn",...t)},error:function(...t){l("error",...t)}},f="?",h=/\(error: (.*)\)/,m=/captureMessage|captureException/;function g(...t){const e=t.sort((t,e)=>t[0]-e[0]).map(t=>t[1]);return(t,n=0,r=0)=>{const s=[],o=t.split("\n");for(let i=n;i<o.length;i++){let t=o[i];t.length>1024&&(t=t.slice(0,1024));const n=h.test(t)?t.replace(h,"$1"):t;if(!n.match(/\S*Error: /)){for(const t of e){const e=t(n);if(e){s.push(e);break}}if(s.length>=50+r)break}}return function(t){if(!t.length)return[];const e=Array.from(t);return/sentryWrapped/.test(v(e).function||"")&&e.pop(),e.reverse(),m.test(v(e).function||"")&&(e.pop(),m.test(v(e).function||"")&&e.pop()),e.slice(0,50).map(t=>({...t,filename:t.filename||v(e).filename,function:t.function||"?"}))}(s.slice(r))}}function _(t){return Array.isArray(t)?g(...t):t}function v(t){return t[t.length-1]||{}}const y="<anonymous>";function b(t){try{return t&&"function"==typeof t&&t.name||y}catch(e){return y}}function S(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(n){return}}}function E(t){return"__v_isVNode"in t&&t.__v_isVNode?"[VueVNode]":"[VueViewModel]"}const x={},w={};function k(t,e){x[t]=x[t]||[],x[t].push(e)}function I(e,n){if(!w[e]){w[e]=!0;try{n()}catch(r){t&&p.error(`Error while instrumenting ${e}`,r)}}}function $(e,n){const r=e&&x[e];if(r)for(const o of r)try{o(n)}catch(s){t&&p.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${b(o)}\nError:`,s)}}let T=null;function O(t){const e="error";k(e,t),I(e,C)}function C(){T=e.onerror,e.onerror=function(t,e,n,r,s){return $("error",{column:r,error:s,line:n,msg:t,url:e}),!!T&&T.apply(this,arguments)},e.onerror.__SENTRY_INSTRUMENTED__=!0}let A=null;function D(t){const e="unhandledrejection";k(e,t),I(e,N)}function N(){A=e.onunhandledrejection,e.onunhandledrejection=function(t){return $("unhandledrejection",t),!A||A.apply(this,arguments)},e.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const j=Object.prototype.toString;function P(t){switch(j.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return q(t,Error)}}function R(t,e){return j.call(t)===`[object ${e}]`}function M(t){return R(t,"ErrorEvent")}function L(t){return R(t,"DOMError")}function U(t){return R(t,"DOMException")}function F(t){return R(t,"String")}function B(t){return"object"==typeof t&&null!==t&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function W(t){return null===t||B(t)||"object"!=typeof t&&"function"!=typeof t}function z(t){return R(t,"Object")}function J(t){return"undefined"!=typeof Event&&q(t,Event)}function H(t){return Boolean((null==t?void 0:t.then)&&"function"==typeof t.then)}function q(t,e){try{return t instanceof e}catch(n){return!1}}function Y(t){return!("object"!=typeof t||null===t||!(t.__isVue||t._isVue||t.__v_isVNode))}function G(t){return"undefined"!=typeof Request&&q(t,Request)}const V=e;function K(t,e={}){if(!t)return"<unknown>";try{let n=t;const r=5,s=[];let o=0,i=0;const a=" > ",c=a.length;let u;const l=Array.isArray(e)?e:e.keyAttrs,d=!Array.isArray(e)&&e.maxStringLength||80;for(;n&&o++<r&&(u=Z(n,l),!("html"===u||o>1&&i+s.length*c+u.length>=d));)s.push(u),i+=u.length,n=n.parentNode;return s.reverse().join(a)}catch(n){return"<unknown>"}}function Z(t,e){const n=t,r=[];if(!(null==n?void 0:n.tagName))return"";if(V.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const s=(null==e?void 0:e.length)?e.filter(t=>n.getAttribute(t)).map(t=>[t,n.getAttribute(t)]):null;if(null==s?void 0:s.length)s.forEach(t=>{r.push(`[${t[0]}="${t[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const t=n.className;if(t&&F(t)){const e=t.split(/\s+/);for(const t of e)r.push(`.${t}`)}}for(const o of["aria-label","type","name","title","alt"]){const t=n.getAttribute(o);t&&r.push(`[${o}="${t}"]`)}return r.join("")}function Q(){try{return V.document.location.href}catch(t){return""}}function X(t){if(!V.HTMLElement)return null;let e=t;for(let n=0;n<5;n++){if(!e)return null;if(e instanceof HTMLElement){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}e=e.parentNode}return null}function tt(e,n,r){if(!(n in e))return;const s=e[n];if("function"!=typeof s)return;const o=r(s);"function"==typeof o&&nt(o,s);try{e[n]=o}catch(i){t&&p.log(`Failed to replace method "${n}" in object`,e)}}function et(e,n,r){try{Object.defineProperty(e,n,{value:r,writable:!0,configurable:!0})}catch(s){t&&p.log(`Failed to add non-enumerable property "${n}" to object`,e)}}function nt(t,e){try{const n=e.prototype||{};t.prototype=e.prototype=n,et(t,"__sentry_original__",e)}catch(n){}}function rt(t){return t.__sentry_original__}function st(t){if(P(t))return{message:t.message,name:t.name,stack:t.stack,...it(t)};if(J(t)){const e={type:t.type,target:ot(t.target),currentTarget:ot(t.currentTarget),...it(t)};return"undefined"!=typeof CustomEvent&&q(t,CustomEvent)&&(e.detail=t.detail),e}return t}function ot(t){try{return"undefined"!=typeof Element&&q(t,Element)?K(t):Object.prototype.toString.call(t)}catch(e){return"<unknown>"}}function it(t){return"object"==typeof t&&null!==t?Object.fromEntries(Object.entries(t)):{}}
1function at(t){const e=Object.keys(st(t));return e.sort(),e[0]?e.join(", "):"[object has no keys]"}let ct,ut,lt;function dt(t){if(void 0!==ct)return ct?ct(t):t();const n=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),r=e;return n in r&&"function"==typeof r[n]?(ct=r[n],ct(t)):(ct=null,t())}function pt(){return dt(()=>Math.random())}function ft(){return dt(()=>Date.now())}function ht(t,e=0){return"string"!=typeof t||0===e||t.length<=e?t:`${t.slice(0,e)}...`}function mt(t,e){if(!Array.isArray(t))return"";const n=[];for(let s=0;s<t.length;s++){const e=t[s];try{Y(e)?n.push(E(e)):n.push(String(e))}catch(r){n.push("[value cannot be serialized]")}}return n.join(e)}function gt(t,e,n=!1){return!!F(t)&&(R(e,"RegExp")?e.test(t):!!F(e)&&(n?t===e:t.includes(e)))}function _t(t,e=[],n=!1){return e.some(e=>gt(t,e,n))}function vt(t=function(){const t=e;return t.crypto||t.msCrypto}()){try{if(null==t?void 0:t.randomUUID)return dt(()=>t.randomUUID()).replace(/-/g,"")}catch(n){}return ut||(ut="10000000100040008000100000000000"),ut.replace(/[018]/g,t=>(t^(16*pt()&15)>>t/4).toString(16))}function yt(t){var e,n;return null==(n=null==(e=t.exception)?void 0:e.values)?void 0:n[0]}function bt(t){const{message:e,event_id:n}=t;if(e)return e;const r=yt(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function St(t,e,n){const r=t.exception=t.exception||{},s=r.values=r.values||[],o=s[0]=s[0]||{};o.value||(o.value=e||""),o.type||(o.type="Error")}function Et(t,e){const n=yt(t);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...e},e&&"data"in e){const t={...null==r?void 0:r.data,...e.data};n.mechanism.data=t}}function xt(t){if(function(t){try{return t.__sentry_captured__}catch(e){}}(t))return!0;try{et(t,"__sentry_captured__",!0)}catch(e){}return!1}function wt(){return ft()/1e3}function kt(){return(null!=lt?lt:lt=function(){const{performance:t}=e;if(!(null==t?void 0:t.now)||!t.timeOrigin)return wt;const n=t.timeOrigin;return()=>(n+dt(()=>t.now()))/1e3}())()}let It=null;function $t(){return null===It&&(It=function(){var t;const{performance:n}=e;if(!(null==n?void 0:n.now))return;const r=3e5,s=dt(()=>n.now()),o=ft(),i=n.timeOrigin;if("number"==typeof i&&Math.abs(i+s-o)<r)return i;const a=null==(t=n.timing)?void 0:t.navigationStart;return"number"==typeof a&&Math.abs(a+s-o)<r?a:o-s}()),It}function Tt(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||kt(),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:vt()),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 Ot(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]=Ot(r[s],e[s],n-1));return r}function Ct(){return vt()}function At(){return vt().substring(16)}const Dt="_sentrySpan";function Nt(t,e){e?et(t,Dt,e):delete t[Dt]}function jt(t){return t[Dt]}class Pt{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:Ct(),sampleRand:pt()}}clone(){const t=new Pt;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,Nt(t,jt(this)),t}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&&Tt(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(t){if(!t)return this;const e="function"==typeof t?t(this):t,n=e instanceof Pt?e.getScopeData():z(e)?t:void 0,{tags:r,attributes:s,extra:o,user:i,contexts:a,level:c,fingerprint:u=[],propagationContext:l,conversationId:d}=n||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...s},this._extra={...this._extra,...o},this._contexts={...this._contexts,...a},i&&Object.keys(i).length&&(this._user=i),c&&(this._level=c),u.length&&(this._fingerprint=u),l&&(this._propagationContext=l),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,Nt(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Ct(),sampleRand:pt()}),this._notifyScopeListeners(),this}addBreadcrumb(t,e){var n;const r="number"==typeof e?e:100;if(r<=0)return this;const s={timestamp:wt(),...t,message:t.message?ht(t.message,2048):t.message};return this._breadcrumbs.push(s),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),null==(n=this._client)||n.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:jt(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Ot(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(e,n){const r=(null==n?void 0:n.event_id)||vt();if(!this._client)return t&&p.warn("No client configured on scope - will not capture exception!"),r;const s=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:s,...n,event_id:r},this),r}captureMessage(e,n,r){var s;const o=(null==r?void 0:r.event_id)||vt();if(!this._client)return t&&p.warn("No client configured on scope - will not capture message!"),o;const i=null!=(s=null==r?void 0:r.syntheticException)?s:new Error(e);return this._client.captureMessage(e,n,{originalException:e,syntheticException:i,...r,event_id:o},this),o}
1captureEvent(e,n){const r=e.event_id||(null==n?void 0:n.event_id)||vt();return this._client?(this._client.captureEvent(e,{...n,event_id:r},this),r):(t&&p.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}class Rt{constructor(t,e){let n,r;n=t||new Pt,r=e||new Pt,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 H(n)?n.then(t=>(this._popScope(),t),t=>{throw this._popScope(),t}):(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())}}function Mt(){const t=s(r());return t.stack=t.stack||new Rt(o("defaultCurrentScope",()=>new Pt),o("defaultIsolationScope",()=>new Pt))}function Lt(t){return Mt().withScope(t)}function Ut(t,e){const n=Mt();return n.withScope(()=>(n.getStackTop().scope=t,e(t)))}function Ft(t){return Mt().withScope(()=>t(Mt().getIsolationScope()))}function Bt(t){const e=s(t);return e.acs?e.acs:{withIsolationScope:Ft,withScope:Lt,withSetScope:Ut,withSetIsolationScope:(t,e)=>Ft(e),getCurrentScope:()=>Mt().getScope(),getIsolationScope:()=>Mt().getIsolationScope()}}function Wt(){return Bt(r()).getCurrentScope()}function zt(){return Bt(r()).getIsolationScope()}function Jt(...t){const e=Bt(r());if(2===t.length){const[n,r]=t;return n?e.withSetScope(n,r):e.withScope(r)}return e.withScope(t[0])}function Ht(){return Wt().getClient()}function qt(t){const e=t.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:s}=e,o={trace_id:n,span_id:s||At()};return r&&(o.parent_span_id=r),o}const Yt="sentry.source",Gt="sentry.sample_rate",Vt="sentry.previous_trace_sample_rate",Kt="sentry.op",Zt="sentry.origin",Qt="sentry.idle_span_finish_reason",Xt="sentry.measurement_unit",te="sentry.measurement_value",ee="sentry.custom_span_name",ne="sentry.profile_id",re="sentry.exclusive_time",se="sentry.link.type",oe=2;function ie(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)}const ae="_sentryScope",ce="_sentryIsolationScope";function ue(t){if(t){if("object"==typeof t&&"deref"in t&&"function"==typeof t.deref)try{return t.deref()}catch(e){return}return t}}function le(t){const e=t;return{scope:e[ae],isolationScope:ue(e[ce])}}const de="sentry-";function pe(t){const e=function(t){if(t&&(F(t)||Array.isArray(t)))return Array.isArray(t)?t.reduce((t,e)=>{const n=fe(e);return Object.entries(n).forEach(([e,n])=>{t[e]=n}),t},{}):fe(t)}(t);if(!e)return;const n=Object.entries(e).reduce((t,[e,n])=>(e.startsWith(de)&&(t[e.slice(7)]=n),t),{});return Object.keys(n).length>0?n:void 0}function fe(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(e){return}})}).reduce((t,[e,n])=>(e&&n&&(t[e]=n),t),{})}const he=/^o(\d+)\./,me=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function ge(t,e=!1){const{host:n,path:r,pass:s,port:o,projectId:i,protocol:a,publicKey:c}=t;return`${a}://${c}${e&&s?`:${s}`:""}@${n}${o?`:${o}`:""}/${r?`${r}/`:r}${i}`}function _e(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function ve(t){const e=t.getOptions(),{host:n}=t.getDsn()||{};let r;return e.orgId?r=String(e.orgId):n&&(r=function(t){const e=t.match(he);return null==e?void 0:e[1]}(n)),r}function ye(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}const be=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Se(t,e){const n=function(t){if(!t)return;const e=t.match(be);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=pe(e);if(!(null==n?void 0:n.traceId))return{traceId:Ct(),sampleRand:pt()};const s=function(t,e){const n=ye(null==e?void 0:e.sample_rand);if(void 0!==n)return n;const r=ye(null==e?void 0:e.sample_rate);return r&&void 0!==(null==t?void 0:t.parentSampled)?t.parentSampled?pt()*r:r+pt()*(1-r):pt()}(n,r);r&&(r.sample_rand=s.toString());const{traceId:o,parentSpanId:i,parentSampled:a}=n;return{traceId:o,parentSpanId:i,sampled:a,dsc:r||{},sampleRand:s}}function Ee(t=Ct(),e=At(),n){let r="";return void 0!==n&&(r=n?"-1":"-0"),`${t}-${e}${r}`}function xe(t=Ct(),e=At(),n){return`00-${t}-${e}-${n?"01":"00"}`}let we=!1;function ke(t){const{spanId:e,traceId:n}=t.spanContext(),{data:r,op:s,parent_span_id:o,status:i,origin:a,links:c}=Ce(t);return{parent_span_id:o,span_id:e,trace_id:n,data:r,op:s,status:i,origin:a,links:c}}function Ie(t){const{spanId:e,traceId:n,isRemote:r}=t.spanContext(),s=r?e:Ce(t).parent_span_id,o=le(t).scope;return{parent_span_id:s,span_id:r?(null==o?void 0:o.getPropagationContext().propagationSpanId)||At():e,trace_id:n}}function $e(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 Te(t){return"number"==typeof t?Oe(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?Oe(t.getTime()):kt()}function Oe(t){return t>9999999999?t/1e3:t}function Ce(t){var e;if(function(t){return"function"==typeof t.getSpanJSON}(t))return t.getSpanJSON();const{spanId:n,traceId:r}=t.spanContext();if(function(t){const e=t;return!!(e.attributes&&e.startTime&&e.name&&e.endTime&&e.status)}(t)){const{attributes:s,startTime:o,name:i,endTime:a,status:c,links:u}=t;return{span_id:n,trace_id:r,data:s,description:i,parent_span_id:"parentSpanId"in t?t.parentSpanId:"parentSpanContext"in t?null==(e=t.parentSpanContext)?void 0:e.spanId:void 0,start_timestamp:Te(o),timestamp:Te(a)||void 0,status:De(c),op:s[Kt],origin:s[Zt],links:$e(u)}}return{span_id:n,trace_id:r,start_timestamp:0,data:{}}}function Ae(t){const{traceFlags:e}=t.spanContext();return 1===e}function De(t){if(t&&0!==t.code)return 1===t.code?"ok":t.message||"internal_error"}const Ne="_sentryChildSpans",je="_sentryRootSpan";function Pe(t,e){const n=t[je]||t;et(e,je,n),t[Ne]?t[Ne].add(e):et(t,Ne,new Set([e]))}function Re(t){const e=new Set;return function t(n){if(!e.has(n)&&Ae(n)){e.add(n);const r=n[Ne]?Array.from(n[Ne]):[];for(const e of r)t(e)}}(t),Array.from(e)}function Me(t){return t[je]||t}function Le(){const t=Bt(r());return t.getActiveSpan?t.getActiveSpan():jt(Wt())}function Ue(){we||(c(()=>{}),we=!0)}let Fe=!1;function Be(){function e(){const e=Le(),n=e&&Me(e);if(n){const e="internal_error";t&&p.log(`[Tracing] Root span: ${e} -> Global error occurred`),n.setStatus({code:2,message:e})}}Fe||(e.tag="sentry_tracingErrorCallback",Fe=!0,O(e),D(e))}function We(t){var e;if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const n=t||(null==(e=Ht())?void 0:e.getOptions());return!(!n||null==n.tracesSampleRate&&!n.tracesSampler)}function ze(t){p.log(`Ignoring span ${t.op} - ${t.description} because it matches \`ignoreSpans\`.`)}function Je(e,n){if(!(null==n?void 0:n.length)||!e.description)return!1;for(const r of n){if(qe(r)){if(gt(e.description,r))return t&&ze(e),!0;continue}if(!r.name&&!r.op)continue;const n=!r.name||gt(e.description,r.name),s=!r.op||e.op&&gt(e.op,r.op);if(n&&s)return t&&ze(e),!0}return!1}function He(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)}function qe(t){return"string"==typeof t||t instanceof RegExp}const Ye="production",Ge="_frozenDsc";function Ve(t,e){et(t,Ge,e)}function Ke(t,e){const n=e.getOptions(),{publicKey:r}=e.getDsn()||{},s={environment:n.environment||Ye,release:n.release,public_key:r,trace_id:t,org_id:ve(e)};return e.emit("createDsc",s),s}function Ze(t,e){const n=e.getPropagationContext();return n.dsc||Ke(n.traceId,t)}function Qe(t){var e,n,r,s;const o=Ht();if(!o)return{};const i=Me(t),a=Ce(i),c=a.data,u=i.spanContext().traceState,l=null!=(n=null!=(e=null==u?void 0:u.get("sentry.sample_rate"))?e:c[Gt])?n:c[Vt];function d(t){return"number"!=typeof l&&"string"!=typeof l||(t.sample_rate=`${l}`),t}const p=i[Ge];if(p)return d(p);const f=null==u?void 0:u.get("sentry.dsc"),h=f&&pe(f);if(h)return d(h);const m=Ke(t.spanContext().traceId,o),g=c[Yt],_=a.description;return"url"!==g&&_&&(m.transaction=_),We()&&(m.sampled=String(Ae(i)),m.sample_rand=null!=(s=null==u?void 0:u.get("sentry.sample_rand"))?s:null==(r=le(i).scope)?void 0:r.getPropagationContext().sampleRand.toString()),d(m),o.emit("createDsc",m,i),m}class Xe{constructor(t={}){this._traceId=t.traceId||Ct(),this._spanId=t.spanId||At()}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}
1addEvent(t,e,n){return this}addLink(t){return this}addLinks(t){return this}recordException(t,e){}}function tn(t,e=100,n=1/0){try{return nn("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function en(t,e=3,n=102400){const r=tn(t,e);return s=r,function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(s))>n?en(t,e-1,n):r;var s}function nn(t,e,n=1/0,r=1/0,s=function(){const t=new WeakSet;return[function(e){return!!t.has(e)||(t.add(e),!1)},function(e){t.delete(e)}]}()){const[o,i]=s;if(null==e||["boolean","string"].includes(typeof e)||"number"==typeof e&&Number.isFinite(e))return e;const a=function(t,e){try{if("domain"===t&&e&&"object"==typeof e&&e._events)return"[Domain]";if("domainEmitter"===t)return"[DomainEmitter]";if("undefined"!=typeof global&&e===global)return"[Global]";if("undefined"!=typeof window&&e===window)return"[Window]";if("undefined"!=typeof document&&e===document)return"[Document]";if(Y(e))return E(e);if(z(n=e)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n)return"[SyntheticEvent]";if("number"==typeof e&&!Number.isFinite(e))return`[${e}]`;if("function"==typeof e)return`[Function: ${b(e)}]`;if("symbol"==typeof e)return`[${String(e)}]`;if("bigint"==typeof e)return`[BigInt: ${String(e)}]`;const r=function(t){const e=Object.getPrototypeOf(t);return(null==e?void 0:e.constructor)?e.constructor.name:"null prototype"}(e);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(r){return`**non-serializable** (${r})`}var n}(t,e);if(!a.startsWith("[object "))return a;if(e.__sentry_skip_normalization__)return e;const c="number"==typeof e.__sentry_override_normalization_depth__?e.__sentry_override_normalization_depth__:n;if(0===c)return a.replace("object ","");if(o(e))return"[Circular ~]";const u=e;if(u&&"function"==typeof u.toJSON)try{return nn("",u.toJSON(),c-1,r,s)}catch(f){}const l=Array.isArray(e)?[]:{};let d=0;const p=st(e);for(const h in p){if(!Object.prototype.hasOwnProperty.call(p,h))continue;if(d>=r){l[h]="[MaxProperties ~]";break}const t=p[h];l[h]=nn(h,t,c-1,r,s),d++}return i(e),l}function rn(t,e=[]){return[t,e]}function sn(t,e){const[n,r]=t;return[n,[...r,e]]}function on(t,e){const n=t[1];for(const r of n)if(e(r,r[0].type))return!0;return!1}function an(t){const n=s(e);return n.encodePolyfill?n.encodePolyfill(t):(new TextEncoder).encode(t)}function cn(t){const[e,n]=t;let r=JSON.stringify(e);function s(t){"string"==typeof r?r="string"==typeof t?r+t:[an(r),t]:r.push("string"==typeof t?an(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(o){t=JSON.stringify(tn(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)}function un(t){return[{type:"span"},t]}function ln(t){const e="string"==typeof t.data?an(t.data):t.data;return[{type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType},e]}const dn={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"};function pn(t){return function(t){return t in dn}(t)?dn[t]:t}function fn(t){if(!(null==t?void 0:t.sdk))return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function hn(t,e,n,r){var s;const o=null==(s=t.sdkProcessingMetadata)?void 0:s.dynamicSamplingContext;return{event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&{sdk:e},...!!n&&r&&{dsn:ge(r)},...o&&{trace:o}}}function mn(e,n,r,s=Le()){const o=s&&Me(s);o&&(t&&p.log(`[Measurement] Setting measurement on root span: ${e} = ${n} ${r}`),o.addEvent(e,{[te]:n,[Xt]:r}))}function gn(t){if(!t||0===t.length)return;const e={};return t.forEach(t=>{const n=t.attributes||{},r=n[Xt],s=n[te];"string"==typeof r&&"number"==typeof s&&(e[t.name]={value:s,unit:r})}),e}class _n{constructor(t={}){this._traceId=t.traceId||Ct(),this._spanId=t.spanId||At(),this._startTime=t.startTimestamp||kt(),this._links=t.links,this._attributes={},this.setAttributes({[Zt]:"manual",[Kt]: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()}
1addLink(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=Te(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(Yt,"custom"),this}end(e){this._endTime||(this._endTime=Te(e),function(e){if(!t)return;const{description:n="< unknown name >",op:r="< unknown op >"}=Ce(e),{spanId:s}=e.spanContext(),o=`[Tracing] Finishing "${r}" ${Me(e)===e?"root ":""}span "${n}" with ID ${s}`;p.log(o)}(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[Kt],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:De(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[Zt],profile_id:this._attributes[ne],exclusive_time:this._attributes[re],measurements:gn(this._events),is_segment:this._isStandaloneSpan&&Me(this)===this||void 0,segment_id:this._isStandaloneSpan?Me(this).spanContext().spanId:void 0,links:$e(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,n,r){t&&p.log("[Tracing] Adding an event to span:",e);const s=vn(n)?n:r||kt(),o=vn(n)?{}:n||{},i={name:e,time:Te(s),attributes:o};return this._events.push(i),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const e=Ht();if(e&&e.emit("spanEnd",this),!this._isStandaloneSpan&&this!==Me(this))return;if(this._isStandaloneSpan)return void(this._sampled?function(t){const e=Ht();if(!e)return;const n=t[1];n&&0!==n.length?e.sendEnvelope(t):e.recordDroppedEvent("before_send","span")}(function(t,e){const n=Qe(t[0]),r=null==e?void 0:e.getDsn(),s=null==e?void 0:e.getOptions().tunnel,o={sent_at:(new Date).toISOString(),...(i=n,!!i.trace_id&&!!i.public_key&&{trace:n}),...!!s&&r&&{dsn:ge(r)}};var i;const{beforeSendSpan:a,ignoreSpans:c}=(null==e?void 0:e.getOptions())||{},u=(null==c?void 0:c.length)?t.filter(t=>!Je(Ce(t),c)):t,l=t.length-u.length;l&&(null==e||e.recordDroppedEvent("before_send","span",l));const d=a?t=>{const e=Ce(t);return a(e)||(Ue(),e)}:Ce,p=[];for(const f of u){const t=d(f);t&&p.push(un(t))}return rn(o,p)}([this],e)):(t&&p.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),e&&e.recordDroppedEvent("sample_rate","span")));const n=this._convertSpanToTransaction();n&&(le(this).scope||Wt()).captureEvent(n)}_convertSpanToTransaction(){var e;if(!yn(Ce(this)))return;this._name||(t&&p.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:n,isolationScope:r}=le(this),s=null==(e=null==n?void 0:n.getScopeData().sdkProcessingMetadata)?void 0:e.normalizedRequest;if(!0!==this._sampled)return;const o=Re(this).filter(t=>t!==this&&!function(t){return t instanceof _n&&t.isStandaloneSpan()}(t)).map(t=>Ce(t)).filter(yn),i=this._attributes[Yt];delete this._attributes[ee],o.forEach(t=>{delete t.data[ee]});const a={contexts:{trace:ke(this)},spans:o.length>1e3?o.sort((t,e)=>t.start_timestamp-e.start_timestamp).slice(0,1e3):o,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:n,capturedSpanIsolationScope:r,dynamicSamplingContext:Qe(this)},request:s,...i&&{transaction_info:{source:i}}},c=gn(this._events);return c&&Object.keys(c).length&&(t&&p.log("[Measurements] Adding measurements to transaction event",JSON.stringify(c,void 0,2)),a.measurements=c),a}}function vn(t){return t&&"number"==typeof t||t instanceof Date||Array.isArray(t)}function yn(t){return!!(t.start_timestamp&&t.timestamp&&t.span_id&&t.trace_id)}const bn="__SENTRY_SUPPRESS_TRACING__";function Sn(t,e){const n=In();if(n.startSpan)return n.startSpan(t,e);const r=kn(t),{forceTransaction:s,parentSpan:o,scope:i}=t;return Jt(null==i?void 0:i.clone(),()=>{const n=void 0!==(i=o)?t=>xn(i,t):t=>t();var i;return n(()=>{const n=Wt(),i=Tn(n,o),a=t.onlyIfParent&&!i?new Xe:wn({parentSpan:i,spanArguments:r,forceTransaction:s,scope:n});return Nt(n,a),function(t,e,n=()=>{},r=()=>{}){let s;try{s=t()}catch(o){throw e(o),n(),o}return function(t,e,n,r){return H(t)?t.then(t=>(n(),r(t),t),t=>{throw e(t),n(),t}):(n(),r(t),t)}(s,e,n,r)}(()=>e(a),()=>{const{status:t}=Ce(a);!a.isRecording()||t&&"ok"!==t||a.setStatus({code:2,message:"internal_error"})},()=>{a.end()})})})}function En(t){const e=In();if(e.startInactiveSpan)return e.startInactiveSpan(t);const n=kn(t),{forceTransaction:r,parentSpan:s}=t;return(t.scope?e=>Jt(t.scope,e):void 0!==s?t=>xn(s,t):t=>t())(()=>
1{const e=Wt(),o=Tn(e,s);return t.onlyIfParent&&!o?new Xe:wn({parentSpan:o,spanArguments:n,forceTransaction:r,scope:e})})}function xn(t,e){const n=In();return n.withActiveSpan?n.withActiveSpan(t,e):Jt(n=>(Nt(n,t||void 0),e(n)))}function wn({parentSpan:n,spanArguments:r,forceTransaction:s,scope:o}){if(!We()){const t=new Xe;return!s&&n||Ve(t,{sampled:"false",sample_rate:"0",transaction:r.name,...Qe(t)}),t}const i=zt();let a;if(n&&!s)a=function(t,e,n){const{spanId:r,traceId:s}=t.spanContext(),o=!e.getScopeData().sdkProcessingMetadata[bn]&&Ae(t),i=o?new _n({...n,parentSpanId:r,traceId:s,sampled:o}):new Xe({traceId:s});Pe(t,i);const a=Ht();return a&&(a.emit("spanStart",i),n.endTimestamp&&a.emit("spanEnd",i)),i}(n,o,r),Pe(n,a);else if(n){const t=Qe(n),{traceId:e,spanId:s}=n.spanContext(),i=Ae(n);a=$n({traceId:e,parentSpanId:s,...r},o,i),Ve(a,t)}else{const{traceId:t,dsc:e,parentSpanId:n,sampled:s}={...i.getPropagationContext(),...o.getPropagationContext()};a=$n({traceId:t,parentSpanId:n,...r},o,s),e&&Ve(a,e)}return function(e){if(!t)return;const{description:n="< unknown name >",op:r="< unknown op >",parent_span_id:s}=Ce(e),{spanId:o}=e.spanContext(),i=Ae(e),a=Me(e),c=a===e,u=`[Tracing] Starting ${i?"sampled":"unsampled"} ${c?"root ":""}span`,l=[`op: ${r}`,`name: ${n}`,`ID: ${o}`];if(s&&l.push(`parent ID: ${s}`),!c){const{op:t,description:e}=Ce(a);l.push(`root ID: ${a.spanContext().spanId}`),t&&l.push(`root op: ${t}`),e&&l.push(`root description: ${e}`)}p.log(`${u}\n  ${l.join("\n  ")}`)}(a),function(t,n,r){t&&(et(t,ce,function(t){try{const n=e.WeakRef;if("function"==typeof n)return new n(t)}catch(n){}return t}(r)),et(t,ae,n))}(a,o,i),a}function kn(t){const e={isStandalone:(t.experimental||{}).standalone,...t};if(t.startTime){const n={...e};return n.startTimestamp=Te(t.startTime),delete n.startTime,n}return e}function In(){return Bt(r())}function $n(e,n,r){var s,o;const i=Ht(),a=(null==i?void 0:i.getOptions())||{},{name:c=""}=e,u={spanAttributes:{...e.attributes},spanName:c,parentSampled:r};null==i||i.emit("beforeSampling",u,{decision:!1});const l=null!=(s=u.parentSampled)?s:r,d=u.spanAttributes,f=n.getPropagationContext(),[h,m,g]=n.getScopeData().sdkProcessingMetadata[bn]?[!1]:function(e,n,r){if(!We(e))return[!1];let s,o;"function"==typeof e.tracesSampler?(o=e.tracesSampler({...n,inheritOrSampleWith:t=>"number"==typeof n.parentSampleRate?n.parentSampleRate:"boolean"==typeof n.parentSampled?Number(n.parentSampled):t}),s=!0):void 0!==n.parentSampled?o=n.parentSampled:void 0!==e.tracesSampleRate&&(o=e.tracesSampleRate,s=!0);const i=ye(o);if(void 0===i)return t&&p.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(o)} of type ${JSON.stringify(typeof o)}.`),[!1];if(!i)return t&&p.log("[Tracing] Discarding transaction because "+("function"==typeof e.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),[!1,i,s];const a=r<i;return a||t&&p.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(o)})`),[a,i,s]}(a,{name:c,parentSampled:l,attributes:d,parentSampleRate:ye(null==(o=f.dsc)?void 0:o.sample_rate)},f.sampleRand),_=new _n({...e,attributes:{[Yt]:"custom",[Gt]:void 0!==m&&g?m:void 0,...d},sampled:h});return!h&&i&&(t&&p.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),i.recordDroppedEvent("sample_rate","transaction")),i&&i.emit("spanStart",_),_}function Tn(t,e){if(e)return e;if(null===e)return;const n=jt(t);if(!n)return;const r=Ht();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?Me(n):n}const On={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3};function Cn(e,n={}){const r=new Map;let s,o=!1,i="externalFinish",a=!n.disableAutoFinish;const c=[],{idleTimeout:u=On.idleTimeout,finalTimeout:l=On.finalTimeout,childSpanTimeout:d=On.childSpanTimeout,beforeSpanEnd:f,trimIdleSpanEndTimestamp:h=!0}=n,m=Ht();if(!m||!We()){const t=new Xe;return Ve(t,{sample_rate:"0",sampled:"false",...Qe(t)}),t}const g=Wt(),_=Le(),v=function(e){const n=En(e);
1return Nt(Wt(),n),t&&p.log("[Tracing] Started span is an idle span"),n}(e);function y(){s&&(clearTimeout(s),s=void 0)}function b(t){y(),s=setTimeout(()=>{!o&&0===r.size&&a&&(i="idleTimeout",v.end(t))},u)}function S(t){s=setTimeout(()=>{!o&&a&&(i="heartbeatFailed",v.end(t))},d)}function E(e){o=!0,r.clear(),c.forEach(t=>t()),Nt(g,_);const n=Ce(v),{start_timestamp:s}=n;if(!s)return;n.data[Qt]||v.setAttribute(Qt,i);const a=n.status;a&&"unknown"!==a||v.setStatus({code:1}),p.log(`[Tracing] Idle span "${n.op}" finished`);const d=Re(v).filter(t=>t!==v);let f=0;d.forEach(n=>{n.isRecording()&&(n.setStatus({code:2,message:"cancelled"}),n.end(e),t&&p.log("[Tracing] Cancelling span since span ended early",JSON.stringify(n,void 0,2)));const r=Ce(n),{timestamp:s=0,start_timestamp:o=0}=r,i=o<=e,a=s-o<=(l+u)/1e3;if(t){const t=JSON.stringify(n,void 0,2);i?a||p.log("[Tracing] Discarding span since it finished after idle span final timeout",t):p.log("[Tracing] Discarding span since it happened after idle span was finished",t)}a&&i||(function(t,e){t[Ne]&&t[Ne].delete(e)}(v,n),f++)}),f>0&&v.setAttribute("sentry.idle_span_discarded_spans",f)}return v.end=new Proxy(v.end,{apply(t,e,n){if(f&&f(v),e instanceof Xe)return;const[r,...s]=n,o=Te(r||kt()),i=Re(v).filter(t=>t!==v),a=Ce(v);if(!i.length||!h)return E(o),Reflect.apply(t,e,[o,...s]);const c=m.getOptions().ignoreSpans,u=null==i?void 0:i.reduce((t,e)=>{const n=Ce(e);return n.timestamp?c&&Je(n,c)?t:t?Math.max(t,n.timestamp):n.timestamp:t},void 0),d=a.start_timestamp,p=Math.min(d?d+l/1e3:1/0,Math.max(d||-1/0,Math.min(o,u||1/0)));return E(p),Reflect.apply(t,e,[p,...s])}}),c.push(m.on("spanStart",t=>{var e;o||t===v||Ce(t).timestamp||t instanceof _n&&t.isStandaloneSpan()||Re(v).includes(t)&&(e=t.spanContext().spanId,y(),r.set(e,!0),S(kt()+d/1e3))})),c.push(m.on("spanEnd",t=>{var e;o||(e=t.spanContext().spanId,r.has(e)&&r.delete(e),0===r.size&&b(kt()+u/1e3))})),c.push(m.on("idleSpanEnableAutoFinish",t=>{t===v&&(a=!0,b(),r.size&&S())})),n.disableAutoFinish||b(),setTimeout(()=>{o||(v.setStatus({code:2,message:"deadline_exceeded"}),i="finalTimeout",v.end())},l),v}function An(t){return new Nn(e=>{e(t)})}function Dn(t){return new Nn((e,n)=>{n(t)})}class Nn{constructor(t){this._state=0,this._handlers=[],this._runExecutor(t)}then(t,e){return new Nn((n,r)=>{this._handlers.push([!1,e=>{if(t)try{n(t(e))}catch(s){r(s)}else n(e)},t=>{if(e)try{n(e(t))}catch(s){r(s)}else r(t)}]),this._executeHandlers()})}catch(t){return this.then(t=>t,t)}finally(t){return new Nn((e,n)=>{let r,s;return this.then(e=>{s=!1,r=e,t&&t()},e=>{s=!0,r=e,t&&t()}).then(()=>{s?n(r):e(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&&(H(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)}}}function jn(t,e,n,r=0){try{const s=Pn(e,n,t,r);return H(s)?s:An(s)}catch(s){return Dn(s)}}function Pn(e,n,r,s){const o=r[s];if(!e||!o)return e;const i=o({...e},n);return t&&null===i&&p.log(`Event processor "${o.id||"?"}" dropped event`),H(i)?i.then(t=>Pn(t,n,r,s+1)):Pn(i,n,r,s+1)}let Rn,Mn,Ln,Un;function Fn(t,e){const{extra:n,tags:r,attributes:s,user:o,contexts:i,level:a,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:l,eventProcessors:d,attachments:p,propagationContext:f,transactionName:h,span:m}=e;Bn(t,"extra",n),Bn(t,"tags",r),Bn(t,"attributes",s),Bn(t,"user",o),Bn(t,"contexts",i),t.sdkProcessingMetadata=Ot(t.sdkProcessingMetadata,c,2),a&&(t.level=a),h&&(t.transactionName=h),m&&(t.span=m),u.length&&(t.breadcrumbs=[...t.breadcrumbs,...u]),l.length&&(t.fingerprint=[...t.fingerprint,...l]),d.length&&(t.eventProcessors=[...t.eventProcessors,...d]),p.length&&(t.attachments=[...t.attachments,...p]),t.propagationContext={...t.propagationContext,...f}}function Bn(t,e,n){t[e]=Ot(t[e],n,1)}function Wn(t,e){const n=o("globalScope",()=>new Pt).getScopeData();return t&&Fn(n,t.getScopeData()),e&&Fn(n,e.getScopeData()),n}function zn(t,n,r,s,o,i){const{normalizeDepth:a=3,normalizeMaxBreadth:c=1e3}=t,u={...n,event_id:n.event_id||r.event_id||vt(),timestamp:n.timestamp||wt()},l=r.integrations||t.integrations.map(t=>t.name);!function(t,e){var n,r;const{environment:s,release:o,dist:i,maxValueLength:a}=e;t.environment=t.environment||s||Ye,!t.release&&o&&(t.release=o),!t.dist&&i&&(t.dist=i);const c=t.request;(null==c?void 0:c.url)&&a&&(c.url=ht(c.url,a)),a&&(null==(r=null==(n=t.exception)?void 0:n.values)||r.forEach(t=>{t.value&&(t.value=ht(t.value,a))}))}(u,t),function(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}(u,l),o&&o.emit("applyFrameMetadata",n),void 0===n.type&&function(t,n){var r,s;const o=function(t){const n=e._sentryDebugIds,r=e._debugIds;if(!n&&!r)return{};const s=n?Object.keys(n):[],o=r?Object.keys(r):[];if(Un&&s.length===Mn&&o.length===Ln)return Un;Mn=s.length,Ln=o.length,Un={},Rn||(Rn={});const i=(e,n)=>{for(const r of e){const e=n[r],s=null==Rn?void 0:Rn[r];if(s&&Un&&e)Un[s[0]]=e,Rn&&(Rn[r]=[s[0],e]);else if(e){const n=t(r);for(let t=n.length-1;t>=0;t--){const s=n[t],o=null==s?void 0:s.filename;if(o&&Un&&Rn){Un[o]=e,Rn[r]=[o,e];break}}}}};return n&&i(s,n),r&&i(o,r),Un}(n);
1null==(s=null==(r=t.exception)?void 0:r.values)||s.forEach(t=>{var e,n;null==(n=null==(e=t.stacktrace)?void 0:e.frames)||n.forEach(t=>{t.filename&&(t.debug_id=o[t.filename])})})}(u,t.stackParser);const d=function(t,e){if(!e)return t;const n=t?t.clone():new Pt;return n.update(e),n}(s,r.captureContext);r.mechanism&&Et(u,r.mechanism);const p=o?o.getEventProcessors():[],f=Wn(i,d),h=[...r.attachments||[],...f.attachments];h.length&&(r.attachments=h),function(t,e){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:o}=e;!function(t,e){const{extra:n,tags:r,user:s,contexts:o,level:i,transactionName:a}=e;Object.keys(n).length&&(t.extra={...n,...t.extra}),Object.keys(r).length&&(t.tags={...r,...t.tags}),Object.keys(s).length&&(t.user={...s,...t.user}),Object.keys(o).length&&(t.contexts={...o,...t.contexts}),i&&(t.level=i),a&&"transaction"!==t.type&&(t.transaction=a)}(t,e),r&&function(t,e){t.contexts={trace:Ie(e),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:Qe(e),...t.sdkProcessingMetadata};const n=Ce(Me(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,o)}(u,f);const m=[...p,...f.eventProcessors];return(r.data&&!0===r.data.__sentry__?An(u):jn(m,u,r)).then(t=>(t&&function(t){var e,n;const r={};if(null==(n=null==(e=t.exception)?void 0:e.values)||n.forEach(t=>{var e,n;null==(n=null==(e=t.stacktrace)?void 0:e.frames)||n.forEach(t=>{t.debug_id&&(t.abs_path?r[t.abs_path]=t.debug_id:t.filename&&(r[t.filename]=t.debug_id),delete t.debug_id)})}),0===Object.keys(r).length)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const s=t.debug_meta.images;Object.entries(r).forEach(([t,e])=>{s.push({type:"sourcemap",code_file:t,debug_id:e})})}(t),"number"==typeof a&&a>0?function(t,e,n){var r,s;if(!t)return null;const o={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(t=>({...t,...t.data&&{data:tn(t.data,e,n)}}))},...t.user&&{user:tn(t.user,e,n)},...t.contexts&&{contexts:tn(t.contexts,e,n)},...t.extra&&{extra:tn(t.extra,e,n)}};return(null==(r=t.contexts)?void 0:r.trace)&&o.contexts&&(o.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(o.contexts.trace.data=tn(t.contexts.trace.data,e,n))),t.spans&&(o.spans=t.spans.map(t=>({...t,...t.data&&{data:tn(t.data,e,n)}}))),(null==(s=t.contexts)?void 0:s.flags)&&o.contexts&&(o.contexts.flags=tn(t.contexts.flags,3,n)),o}(t,a,c):t))}const Jn=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Hn(t,e){return Wt().captureException(t,function(t){if(t)return function(t){return t instanceof Pt||"function"==typeof t}(t)||function(t){return Object.keys(t).some(t=>Jn.includes(t))}(t)?{captureContext:t}:t}(e))}function qn(t,e){return Wt().captureEvent(t,e)}function Yn(t,e){zt().setContext(t,e)}function Gn(t){zt().addEventProcessor(t)}function Vn(t){const n=zt(),{user:r}=Wn(n,Wt()),{userAgent:s}=e.navigator||{},o=function(t){const e=kt(),n={sid:vt(),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&&Tt(n,t),n}({user:r,...s&&{userAgent:s},...t}),i=n.getSession();return"ok"===(null==i?void 0:i.status)&&Tt(i,{status:"exited"}),Kn(),n.setSession(o),o}function Kn(){const t=zt(),e=Wt().getSession()||t.getSession();e&&function(t){let e={};"ok"===t.status&&(e={status:"exited"}),Tt(t,e)}(e),Zn(),t.setSession()}function Zn(){const t=zt(),e=Ht(),n=t.getSession();n&&e&&e.captureSession(n)}function Qn(t=!1){t?Kn():Zn()}const Xn=[];function tr(t){const e=t.defaultIntegrations||[],n=t.integrations;let r;if(e.forEach(t=>{t.isDefaultInstance=!0}),Array.isArray(n))r=[...e,...n];else if("function"==typeof n){const t=n(e);r=Array.isArray(t)?t:[t]}else r=e;return function(t){const e={};return t.forEach(t=>{const{name:n}=t,r=e[n];r&&!r.isDefaultInstance&&t.isDefaultInstance||(e[n]=t)}),Object.values(e)}(r)}function er(t,e){for(const n of e)(null==n?void 0:n.afterAllSetup)&&n.afterAllSetup(t)}function nr(e,n,r){if(r[n.name])t&&p.log(`Integration skipped because it was already installed: ${n.name}`);else{if(r[n.name]=n,Xn.includes(n.name)||"function"!=typeof n.setupOnce||(n.setupOnce(),Xn.push(n.name)),n.setup&&"function"==typeof n.setup&&n.setup(e),"function"==typeof n.preprocessEvent){const t=n.preprocessEvent.bind(n);e.on("preprocessEvent",(n,r)=>t(n,r,e))}if("function"==typeof n.processEvent){const t=n.processEvent.bind(n),r=Object.assign((n,r)=>t(n,r,e),{id:n.name});e.addEventProcessor(r)}t&&p.log(`Integration installed: ${n.name}`)}}function rr(t){return t}function sr(t,e){var n;const{value:r,unit:s}="object"==typeof(o=t)&&null!=o&&!Array.isArray(o)&&Object.keys(o).includes("value")?t:{value:t,unit:void 0};var o;const i=function(t){const e="string"==typeof t?"string":"boolean"==typeof t?"boolean":"number"!=typeof t||Number.isNaN(t)?null:Number.isInteger(t)?"integer":"double";if(e)return{value:t,type:e}}(r),a=s&&"string"==typeof s?{unit:s}:{};if(i)return{...i,...a};if(!e||"skip-undefined"===e&&void 0===r)return;let c="";try{c=null!=(n=JSON.stringify(r))?n:""}catch(u){}return{value:c,type:"string",...a}}function or(t,e=!1){const n={};for(const[r,s]of Object.entries(null!=t?t:{})){const t=sr(s,e);t&&(n[r]=t)}return n}let ir,ar=0;const cr={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function ur(t,e,n,r=!0){!n||t[e]&&!r||(t[e]=n)}function lr(t,e){const n=hr(),r=fr(t);void 0===r?n.set(t,[e]):r.length>=100?(pr(t,r),n.set(t,[e])):n.set(t,[...r,e])}function dr(e,n=Wt(),r=lr){var s,o,i;const a=null!=(s=null==n?void 0:n.getClient())?s:Ht();if(!a)return void(t&&p.warn("No client available to capture log."));const{release:u,environment:l,enableLogs:d=!1,beforeSendLog:f}=a.getOptions();if(!d)return void(t&&p.warn("logging option not enabled, log will not be captured."));const[,h]=function(t,e){return e?Jt(e,()=>{const n=Le(),r=n?Ie(n):qt(e);return[n?Qe(n):Ze(t,e),r]}):[void 0,void 0]}(a,n),m={...e.attributes},{user:{id:g,email:_,username:v},attributes:y={}}=Wn(zt(),n);ur(m,"user.id",g,!1),ur(m,"user.email",_,!1),ur(m,"user.name",v,!1),ur(m,"sentry.release",u),ur(m,"sentry.environment",l);const{name:b,version:S}=null!=(i=null==(o=a.getSdkMetadata())?void 0:o.sdk)?i:{};ur(m,"sentry.sdk.name",b),ur(m,"sentry.sdk.version",S);const E=a.getIntegrationByName("Replay"),x=null==E?void 0:E.getReplayId(!0);ur(m,"sentry.replay_id",x),x&&"buffer"===(null==E?void 0:E.getRecordingMode())&&ur(m,"sentry._internal.replay_is_buffering",!0);const w=e.message;
1if(B(w)){const{__sentry_template_string__:t,__sentry_template_values__:e=[]}=w;(null==e?void 0:e.length)&&(m["sentry.message.template"]=t),e.forEach((t,e)=>{m[`sentry.message.parameter.${e}`]=t})}const k=jt(n);ur(m,"sentry.trace.parent_span_id",null==k?void 0:k.spanContext().spanId);const I={...e,attributes:m};a.emit("beforeCaptureLog",I);const $=f?c(()=>f(I)):I;if(!$)return a.recordDroppedEvent("before_send","log_item",1),void(t&&p.warn("beforeSendLog returned null, log will not be captured."));const{level:T,message:O,attributes:C={},severityNumber:A}=$,D=kt(),N=function(t){const e=Math.floor(1e3*t);void 0!==ir&&e!==ir&&(ar=0);const n=ar;return ar++,ir=e,{key:"sentry.timestamp.sequence",value:{value:n,type:"integer"}}}(D);r(a,{timestamp:D,level:T,body:O,trace_id:null==h?void 0:h.trace_id,severity_number:null!=A?A:cr[T],attributes:{...or(y),...or(C,!0),[N.key]:N.value}}),a.emit("afterCaptureLog",$)}function pr(t,e){var n;const r=null!=(n=null!=e?e:fr(t))?n:[];if(0===r.length)return;const s=t.getOptions(),o=function(t,e,n,r){const s={};return(null==e?void 0:e.sdk)&&(s.sdk={name:e.sdk.name,version:e.sdk.version}),n&&r&&(s.dsn=ge(r)),rn(s,[(o=t,[{type:"log",item_count:o.length,content_type:"application/vnd.sentry.items.log+json"},{items:o}])]);var o}(r,s._metadata,s.tunnel,t.getDsn());hr().set(t,[]),t.emit("flushLogs"),t.sendEnvelope(o)}function fr(t){return hr().get(t)}function hr(){return o("clientToLogBufferMap",()=>new WeakMap)}function mr(t,e){var n;const r=null!=(n=null!=e?e:function(t){return gr().get(t)}(t))?n:[];if(0===r.length)return;const s=t.getOptions(),o=function(t,e,n,r){const s={};return(null==e?void 0:e.sdk)&&(s.sdk={name:e.sdk.name,version:e.sdk.version}),n&&r&&(s.dsn=ge(r)),rn(s,[(o=t,[{type:"trace_metric",item_count:o.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:o}])]);var o}(r,s._metadata,s.tunnel,t.getDsn());gr().set(t,[]),t.emit("flushMetrics"),t.sendEnvelope(o)}function gr(){return o("clientToMetricBufferMap",()=>new WeakMap)}function _r(t){return"object"==typeof t&&"function"==typeof t.unref&&t.unref(),t}const vr=Symbol.for("SentryBufferFullError");function yr(t=100){const e=new Set;function n(t){e.delete(t)}return{get $(){return Array.from(e)},add:function(r){if(!(e.size<t))return Dn(vr);const s=r();return e.add(s),s.then(()=>n(s),()=>n(s)),s},drain:function(t){if(!e.size)return An(!0);const n=Promise.allSettled(Array.from(e)).then(()=>!0);if(!t)return n;const r=[n,new Promise(e=>_r(setTimeout(()=>e(!1),t)))];return Promise.race(r)}}}function br(t,e,n=ft()){return function(t,e){return t[e]||t.all||0}(t,e)>n}function Sr(t,{statusCode:e,headers:n},r=ft()){const s={...t},o=null==n?void 0:n["x-sentry-rate-limits"],i=null==n?void 0:n["retry-after"];if(o)for(const a of o.trim().split(",")){const[t,e,,,n]=a.split(":",5),o=parseInt(t,10),i=1e3*(isNaN(o)?60:o);if(e)for(const a of e.split(";"))"metric_bucket"===a&&n&&!n.split(";").includes("custom")||(s[a]=r+i);else s.all=r+i}else i?s.all=r+function(t,e=ft()){const n=parseInt(`${t}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${t}`);return isNaN(r)?6e4:r-e}(i,r):429===e&&(s.all=r+6e4);return s}function Er(e,n,r=yr(e.bufferSize||64)){let s={};return{send:function(o){const i=[];if(on(o,(t,n)=>{const r=pn(n);br(s,r)?e.recordDroppedEvent("ratelimit_backoff",r):i.push(t)}),0===i.length)return Promise.resolve({});const a=rn(o[0],i),c=n=>{!function(t,e){return on(t,(t,n)=>e.includes(n))}(a,["client_report"])?on(a,(t,r)=>{e.recordDroppedEvent(n,pn(r))}):t&&p.warn(`Dropping client report. Will not send outcomes (reason: ${n}).`)};return r.add(()=>n({body:cn(a)}).then(e=>413===e.statusCode?(t&&p.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),c("send_error"),e):(t&&void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&p.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),s=Sr(s,e),e),e=>{throw c("network_error"),t&&p.error("Encountered error running transport request:",e),e})).then(t=>t,e=>{if(e===vr)return t&&p.error("Skipped sending event because buffer is full."),c("queue_overflow"),Promise.resolve({});throw e})},flush:t=>r.drain(t)}}function xr(t){const e=[];t.message&&e.push(t.message);try{const n=t.exception.values[t.exception.values.length-1];(null==n?void 0:n.value)&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`))}catch(n){}return e}const wr="Not capturing exception because it's already been captured.",kr="Discarded session because of missing or non-string release",Ir=Symbol.for("SentryInternalError"),$r=Symbol.for("SentryDoNotSendEventError");function Tr(t){return{message:t,[Ir]:!0}}function Or(t){return{message:t,[$r]:!0}}function Cr(t){return!!t&&"object"==typeof t&&Ir in t}function Ar(t){return!!t&&"object"==typeof t&&$r in t}function Dr(t,e,n,r,s){let o,i=0,a=!1;t.on(n,()=>{i=0,clearTimeout(o),a=!1}),t.on(e,e=>{i+=r(e),i>=8e5?s(t):a||(a=!0,o=_r(setTimeout(()=>{s(t)},5e3)))}),t.on("flush",()=>{s(t)})}class Nr{constructor(e){var n,r,s,o,i,a,u,l,d,f;if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=yr(null!=(r=null==(n=e.transportOptions)?void 0:n.bufferSize)?r:64),e.dsn?this._dsn=function(e){const n="string"==typeof e?function(t){const e=me.exec(t);if(!e)return void c(()=>{});const[n,r,s="",o="",i="",a=""]=e.slice(1);let u="",l=a;const d=l.split("/");if(d.length>1&&(u=d.slice(0,-1).join("/"),l=d.pop()),l){const t=l.match(/^\d+/);t&&(l=t[0])}return _e({host:o,pass:s,path:u,projectId:l,port:i,protocol:n,publicKey:r})}(e):_e(e);
1if(n&&function(e){if(!t)return!0;const{port:n,projectId:r,protocol:s}=e;return!(["protocol","publicKey","host","projectId"].find(t=>!e[t]&&(p.error(`Invalid Sentry Dsn: ${t} missing`),!0))||(r.match(/^\d+$/)?function(t){return"http"===t||"https"===t}(s)?n&&isNaN(parseInt(n,10))&&(p.error(`Invalid Sentry Dsn: Invalid port ${n}`),1):(p.error(`Invalid Sentry Dsn: Invalid protocol ${s}`),1):(p.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),1)))}(n))return n}(e.dsn):t&&p.warn("No DSN provided, client will not send events."),this._dsn){const t=(l=this._dsn,d=e.tunnel,f=e._metadata?e._metadata.sdk:void 0,d||`${function(t){return`${function(t){const e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}(t)}${t.projectId}/envelope/`}(l)}?${function(t,e){const n={sentry_version:"7"};return t.publicKey&&(n.sentry_key=t.publicKey),e&&(n.sentry_client=`${e.name}/${e.version}`),new URLSearchParams(n).toString()}(l,f)}`);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}this._options.enableLogs=null!=(o=this._options.enableLogs)?o:null==(s=this._options._experiments)?void 0:s.enableLogs,this._options.enableLogs&&Dr(this,"afterCaptureLog","flushLogs",Lr,pr),(null==(u=null!=(a=this._options.enableMetrics)?a:null==(i=this._options._experiments)?void 0:i.enableMetrics)||u)&&Dr(this,"afterCaptureMetric","flushMetrics",Mr,mr)}captureException(e,n,r){const s=vt();if(xt(e))return t&&p.log(wr),s;const o={event_id:s,...n};return this._process(()=>this.eventFromException(e,o).then(t=>this._captureEvent(t,o,r)).then(t=>t),"error"),o.event_id}captureMessage(t,e,n,r){const s={event_id:vt(),...n},o=B(t)?t:String(t),i=W(t),a=i?this.eventFromMessage(o,e,s):this.eventFromException(t,s);return this._process(()=>a.then(t=>this._captureEvent(t,s,r)),i?"unknown":"error"),s.event_id}captureEvent(e,n,r){const s=vt();if((null==n?void 0:n.originalException)&&xt(n.originalException))return t&&p.log(wr),s;const o={event_id:s,...n},i=e.sdkProcessingMetadata||{},a=i.capturedSpanScope,c=i.capturedSpanIsolationScope,u=jr(e.type);return this._process(()=>this._captureEvent(e,o,a||r,c),u),o.event_id}captureSession(t){this.sendSession(t),Tt(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){const e=this._transport;if(!e)return!0;this.emit("flush");const n=await this._isClientDoneProcessing(t),r=await e.flush(t);return n&&r}async close(t){pr(this);const e=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),e}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const e=this._integrations[t.name];nr(this,t,this._integrations),e||er(this,[t])}sendEvent(t,e={}){this.emit("beforeSendEvent",t,e);let n=function(t,e,n,r){const s=fn(n),o=t.type&&"replay_event"!==t.type?t.type:"event";!function(t,e){var n,r,s,o;if(!e)return t;const i=t.sdk||{};t.sdk={...i,name:i.name||e.name,version:i.version||e.version,integrations:[...(null==(n=t.sdk)?void 0:n.integrations)||[],...e.integrations||[]],packages:[...(null==(r=t.sdk)?void 0:r.packages)||[],...e.packages||[]],settings:(null==(s=t.sdk)?void 0:s.settings)||e.settings?{...null==(o=t.sdk)?void 0:o.settings,...e.settings}:void 0}}(t,null==n?void 0:n.sdk);const i=hn(t,s,r,e);return delete t.sdkProcessingMetadata,rn(i,[[{type:o},t]])}(t,this._dsn,this._options._metadata,this._options.tunnel);for(const r of e.attachments||[])n=sn(n,ln(r));this.sendEnvelope(n).then(e=>this.emit("afterSendEvent",t,e))}sendSession(e){const{release:n,environment:r=Ye}=this._options;if("aggregates"in e){const s=e.attrs||{};if(!s.release&&!n)return void(t&&p.warn(kr));s.release=s.release||n,s.environment=s.environment||r,e.attrs=s}else{if(!e.release&&!n)return void(t&&p.warn(kr));e.release=e.release||n,e.environment=e.environment||r}
1this.emit("beforeSendSession",e);const s=function(t,e,n,r){const s=fn(n);return rn({sent_at:(new Date).toISOString(),...s&&{sdk:s},...!!r&&e&&{dsn:ge(e)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(s)}recordDroppedEvent(e,n,r=1){if(this._options.sendClientReports){const s=`${e}:${n}`;t&&p.log(`Recording outcome: "${s}"${r>1?` (${r} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+r}}on(t,e){const n=this._hooks[t]=this._hooks[t]||new Set,r=(...t)=>e(...t);return n.add(r),()=>{n.delete(r)}}emit(t,...e){const n=this._hooks[t];n&&n.forEach(t=>t(...e))}async sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)try{return await this._transport.send(e)}catch(n){return t&&p.error("Error while sending envelope:",n),{}}return t&&p.error("Transport disabled"),{}}dispose(){}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=function(t,e){const n={};return e.forEach(e=>{e&&nr(t,e,n)}),n}(this,t),er(this,t)}_updateSessionFromEvent(t,e){var n,r;let s="fatal"===e.level,o=!1;const i=null==(n=e.exception)?void 0:n.values;if(i){o=!0,s=!1;for(const t of i)if(!1===(null==(r=t.mechanism)?void 0:r.handled)){s=!0;break}}const a="ok"===t.status;(a&&0===t.errors||a&&s)&&(Tt(t,{...s&&{status:"crashed"},errors:t.errors||Number(o||s)}),this.captureSession(t))}async _isClientDoneProcessing(t){let e=0;for(;!t||e<t;){if(await new Promise(t=>setTimeout(t,1)),!this._numProcessing)return!0;e++}return!1}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(t,e,n,r){const s=this.getOptions(),o=Object.keys(this._integrations);return!e.integrations&&(null==o?void 0:o.length)&&(e.integrations=o),this.emit("preprocessEvent",t,e),t.type||r.setLastEventId(t.event_id||e.event_id),zn(s,t,e,n,this,r).then(t=>{var r;if(null===t)return t;this.emit("postprocessEvent",t,e),t.contexts={trace:{...null==(r=t.contexts)?void 0:r.trace,...qt(n)},...t.contexts};const s=Ze(this,n);return t.sdkProcessingMetadata={dynamicSamplingContext:s,...t.sdkProcessingMetadata},t})}_captureEvent(e,n={},r=Wt(),s=zt()){return t&&Pr(e)&&p.log(`Captured error event \`${xr(e)[0]||"<unknown>"}\``),this._processEvent(e,n,r,s).then(t=>t.event_id,e=>{t&&(Ar(e)?p.log(e.message):Cr(e)?p.warn(e.message):p.warn(e))})}_processEvent(t,e,n,r){const s=this.getOptions(),{sampleRate:o}=s,i=Rr(t),a=Pr(t),c=`before send for type \`${t.type||"error"}\``,u=void 0===o?void 0:ye(o);if(a&&"number"==typeof u&&pt()>u)return this.recordDroppedEvent("sample_rate","error"),Dn(Or(`Discarding event because it's not included in the random sample (sampling rate = ${o})`));const l=jr(t.type);return this._prepareEvent(t,e,n,r).then(t=>{var n;if(null===t)throw this.recordDroppedEvent("event_processor",l),Or("An event processor returned `null`, will not send event.");if(!0===(null==(n=e.data)?void 0:n.__sentry__))return t;const r=function(t,e,n,r){const{beforeSend:s,beforeSendTransaction:o,beforeSendSpan:i,ignoreSpans:a}=e;let c=n;if(Pr(c)&&s)return s(c,r);if(Rr(c)){if(i||a){const e=function(t){var e,n,r;const{trace_id:s,parent_span_id:o,span_id:i,status:a,origin:c,data:u,op:l}=null!=(n=null==(e=t.contexts)?void 0:e.trace)?n:{};return{data:null!=u?u:{},description:t.transaction,op:l,parent_span_id:o,span_id:null!=i?i:"",start_timestamp:null!=(r=t.start_timestamp)?r:0,status:a,timestamp:t.timestamp,trace_id:null!=s?s:"",origin:c,profile_id:null==u?void 0:u[ne],exclusive_time:null==u?void 0:u[re],measurements:t.measurements,is_segment:!0}}(c);if((null==a?void 0:a.length)&&Je(e,a))return null;if(i){const t=i(e);t?c=Ot(n,{type:"transaction",timestamp:(u=t).timestamp,start_timestamp:u.start_timestamp,transaction:u.description,contexts:{trace:{trace_id:u.trace_id,span_id:u.span_id,parent_span_id:u.parent_span_id,op:u.op,status:u.status,origin:u.origin,data:{...u.data,...u.profile_id&&{[ne]:u.profile_id},...u.exclusive_time&&{[re]:u.exclusive_time}}}},measurements:u.measurements}):Ue()}if(c.spans){const e=[],n=c.spans;for(const t of n)if((null==a?void 0:a.length)&&Je(t,a))He(n,t);else if(i){const n=i(t);n?e.push(n):(Ue(),e.push(t))}else e.push(t);const r=c.spans.length-e.length;r&&t.recordDroppedEvent("before_send","span",r),c.spans=e}}if(o){if(c.spans){const t=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:t}}return o(c,r)}}var u;return c}(this,s,t,e);return function(t,e){const n=`${e} must return \`null\` or a valid event.`;if(H(t))return t.then(t=>{if(!z(t)&&null!==t)throw Tr(n);return t},t=>{throw Tr(`${e} rejected with ${t}`)});if(!z(t)&&null!==t)throw Tr(n);return t}(r,c)}).then(s=>{var o;if(null===s){if(this.recordDroppedEvent("before_send",l),i){const e=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",e)}throw Or(`${c} returned \`null\`, will not send event.`)}const u=n.getSession()||r.getSession();if(a&&u&&this._updateSessionFromEvent(u,s),i){const t=((null==(o=s.sdkProcessingMetadata)?void 0:o.spanCountBeforeProcessing)||0)-(s.spans?s.spans.length:0);t>0&&this.recordDroppedEvent("before_send","span",t)}const d=s.transaction_info;if(i&&d&&s.transaction!==t.transaction){const t="custom";s.transaction_info={...d,source:t}}return this.sendEvent(s,e),s}).then(null,t=>{if(Ar(t)||Cr(t))throw t;throw this.captureException(t,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:t}),Tr(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)})}_process(t,e){this._numProcessing++,this._promiseBuffer.add(t).then(t=>(this._numProcessing--,t),t=>(this._numProcessing--,t===vr&&this.recordDroppedEvent("queue_overflow",e),t))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([t,e])=>{const[n,r]=t.split(":");return{reason:n,category:r,quantity:e}})}_flushOutcomes(){t&&p.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(t&&p.log("No outcomes to send"));if(!this._dsn)return void(t&&p.log("No dsn provided, will not send outcomes"));t&&p.log("Sending outcomes:",e);const n=(r=e,rn((s=this._options.tunnel&&ge(this._dsn))?{dsn:s}:{},[[{type:"client_report"},{timestamp:wt(),discarded_events:r}]]));var r,s;this.sendEnvelope(n)}}function jr(t){return"replay_event"===t?"replay":t||"error"}function Pr(t){return void 0===t.type}function Rr(t){return"transaction"===t.type}function Mr(t){let e=0;return t.name&&(e+=2*t.name.length),e+=8,e+Ur(t.attributes)}function Lr(t){let e=0;return t.message&&(e+=2*t.message.length),e+Ur(t.attributes)}function Ur(t){if(!t)return 0;let e=0;return Object.values(t).forEach(t=>{Array.isArray(t)?e+=t.length*Fr(t[0]):W(t)?e+=Fr(t):e+=100}),e}function Fr(t){return"string"==typeof t?2*t.length:"number"==typeof t?8:"boolean"==typeof t?4:0}function Br(t){return function(t){return P(t)&&"__sentry_fetch_url_host__"in t&&"string"==typeof t.__sentry_fetch_url_host__}(t)?`${t.message} (${t.__sentry_fetch_url_host__})`:t.message}function Wr(e,n){!0===n.debug&&(t?p.enable():c(()=>{})),Wt().update(n.initialScope);const r=new e(n);return function(t){Wt().setClient(t)}(r),r.init(),r}function zr(t){return"isRelative"in t}function Jr(t,e){const n=t.indexOf("://")<=0&&0!==t.indexOf("//"),r=n?"thismessage:/":void 0;try{if("canParse"in URL&&!URL.canParse(t,r))return;const e=new URL(t,r);return n?{isRelative:n,pathname:e.pathname,search:e.search,hash:e.hash}:e}catch(s){}}function Hr(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}function qr(t){return t.split(/[?#]/,1)[0]}function Yr(t,e=!0){if(t.startsWith("data:")){const n=t.match(/^data:([^;
1,]+)/),r=n?n[1]:"text/plain",s=t.includes(";base64,"),o=t.indexOf(",");let i="";if(e&&-1!==o){const e=t.slice(o+1);i=e.length>10?`${e.slice(0,10)}... [truncated]`:e}return`data:${r}${s?",base64":""}${i?`,${i}`:""}`}return t}function Gr(t,e){const n=null==e?void 0:e.getDsn(),r=null==e?void 0:e.getOptions().tunnel;return function(t,e){const n=Jr(t);return!(!n||zr(n))&&(!!e&&n.host.includes(e.host)&&/(^|&|\?)sentry_key=/.test(n.search))}(t,n)||function(t,e){return!!e&&Vr(t)===Vr(e)}(t,r)}function Vr(t){return"/"===t[t.length-1]?t.slice(0,-1):t}function Kr(t){var e;"aggregates"in t?void 0===(null==(e=t.attrs)?void 0:e.ip_address)&&(t.attrs={...t.attrs,ip_address:"{{auto}}"}):void 0===t.ipAddress&&(t.ipAddress="{{auto}}")}function Zr(t,e,r=[e],s="npm"){const o=(t._metadata=t._metadata||{}).sdk=t._metadata.sdk||{};o.name||(o.name=`sentry.javascript.${e}`,o.packages=r.map(t=>({name:`${s}:@sentry/${t}`,version:n})),o.version=n)}function Qr(e={}){const n=e.client||Ht();if(!function(){const t=Ht();return!1!==(null==t?void 0:t.getOptions().enabled)&&!!(null==t?void 0:t.getTransport())}()||!n)return{};const s=Bt(r());if(s.getTraceData)return s.getTraceData(e);const o=e.scope||Wt(),i=e.span||Le(),a=i?function(t){const{traceId:e,spanId:n}=t.spanContext();return Ee(e,n,Ae(t))}(i):function(t){const{traceId:e,sampled:n,propagationSpanId:r}=t.getPropagationContext();return Ee(e,r,n)}(o),c=function(e){if(e)return function(e){if(0!==Object.keys(e).length)return Object.entries(e).reduce((e,[n,r],s)=>{const o=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,i=0===s?o:`${e},${o}`;return i.length>8192?(t&&p.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),e):i},"")}(Object.entries(e).reduce((t,[e,n])=>(n&&(t[`${de}${e}`]=n),t),{}))}(i?Qe(i):Ze(n,o));if(!be.test(a))return p.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const u={"sentry-trace":a,baggage:c};return e.propagateTraceparent&&(u.traceparent=i?function(t){const{traceId:e,spanId:n}=t.spanContext();return xe(e,n,Ae(t))}(i):function(t){const{traceId:e,sampled:n,propagationSpanId:r}=t.getPropagationContext();return xe(e,r,n)}(o)),u}function Xr(t,e,n){let r,s,o;const i=(null==n?void 0:n.maxWait)?Math.max(n.maxWait,e):0,a=(null==n?void 0:n.setTimeoutImpl)||setTimeout;function c(){return u(),r=t(),r}function u(){void 0!==s&&clearTimeout(s),void 0!==o&&clearTimeout(o),s=o=void 0}function l(){return s&&clearTimeout(s),s=a(c,e),i&&void 0===o&&(o=a(c,i)),r}return l.cancel=u,l.flush=function(){return void 0!==s||void 0!==o?c():r},l}const ts=100;function es(t,e){const n=Ht(),r=zt();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:o=ts}=n.getOptions();if(o<=0)return;const i={timestamp:wt(),...t},a=s?c(()=>s(i,e)):i;null!==a&&(n.emit&&n.emit("beforeAddBreadcrumb",a,e),r.addBreadcrumb(a,o))}let ns;const rs=new WeakMap,ss=()=>({name:"FunctionToString",setupOnce(){ns=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=rt(this),n=rs.has(Ht())&&void 0!==e?e:this;return ns.apply(n,t)}}catch(t){}},setup(t){rs.set(t,!0)}}),os=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/^Java exception was raised during method invocation$/],is=(e={})=>{let n;return{name:"EventFilters",setup(t){const r=t.getOptions();n=cs(e,r)},processEvent(r,s,o){if(!n){const t=o.getOptions();n=cs(e,t)}return function(e,n){if(e.type){if("transaction"===e.type&&function(t,e){if(!(null==e?void 0:e.length))return!1;const n=t.transaction;return!!n&&_t(n,e)}(e,n.ignoreTransactions))return t&&p.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${bt(e)}`),!0}else{if(function(t,e){return!!(null==e?void 0:e.length)&&xr(t).some(t=>_t(t,e))}(e,n.ignoreErrors))return t&&p.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${bt(e)}`),!0;if(function(t){var e,n;return!!(null==(n=null==(e=t.exception)?void 0:e.values)?void 0:n.length)&&(!t.message&&!t.exception.values.some(t=>t.stacktrace||t.type&&"Error"!==t.type||t.value))}(e))return t&&p.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${bt(e)}`),!0;if(function(t,e){if(!(null==e?void 0:e.length))return!1;const n=us(t);return!!n&&_t(n,e)}(e,n.denyUrls))return t&&p.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${bt(e)}.\nUrl: ${us(e)}`),!0;if(!function(t,e){if(!(null==e?void 0:e.length))return!0;const n=us(t);return!n||_t(n,e)}(e,n.allowUrls))return t&&p.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${bt(e)}.\nUrl: ${us(e)}`),!0}return!1}(r,n)?null:r}}},as=(t={})=>({...is(t),name:"InboundFilters"});function cs(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:os],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]]}}function us(e){var n,r,s;try{const t=[...null!=(r=null==(n=e.exception)?void 0:n.values)?r:[]].reverse().find(t=>{var e,n,r;return void 0===(null==(e=t.mechanism)?void 0:e.parent_id)&&(null==(r=null==(n=t.stacktrace)?void 0:n.frames)?void 0:r.length)}),o=null==(s=null==t?void 0:t.stacktrace)?void 0:s.frames;return o?function(t=[]){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(o):null}catch(o){return t&&p.error(`Cannot extract url for event ${bt(e)}`),null}}function ls(t,e,n,r,s,o){var i;if(!(null==(i=s.exception)?void 0:i.values)||!o||!q(o.originalException,Error))return;const a=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;a&&(s.exception.values=ds(t,e,r,o.originalException,n,s.exception.values,a,0))}function ds(t,e,n,r,s,o,i,a){if(o.length>=n+1)return o;let c=[...o];if(q(r[s],Error)){fs(i,a,r);const o=t(e,r[s]),u=c.length;hs(o,s,u,a),c=ds(t,e,n,r[s],s,[o,...c],o,u)}
1return ps(r)&&r.errors.forEach((o,u)=>{if(q(o,Error)){fs(i,a,r);const l=t(e,o),d=c.length;hs(l,`errors[${u}]`,d,a),c=ds(t,e,n,o,s,[l,...c],l,d)}}),c}function ps(t){return Array.isArray(t.errors)}function fs(t,e,n){t.mechanism={handled:!0,type:"auto.core.linked_errors",...ps(n)&&{is_exception_group:!0},...t.mechanism,exception_id:e}}function hs(t,e,n,r){t.mechanism={handled:!0,...t.mechanism,type:"chained",source:e,exception_id:n,parent_id:r}}function ms(t){const e="console";k(e,t),I(e,gs)}function gs(){"console"in e&&i.forEach(function(t){t in e.console&&tt(e.console,t,function(n){return a[t]=n,function(...n){$("console",{args:n,level:t});const r=a[t];null==r||r.apply(e.console,n)}})})}function _s(t){return"warn"===t?"warning":["fatal","error","warning","log","info","debug"].includes(t)?t:"log"}const vs=()=>{let e;return{name:"Dedupe",processEvent(n){if(n.type)return n;try{if(function(t,e){return!!e&&(!!function(t,e){const n=t.message,r=e.message;return!(!n&&!r)&&(!(n&&!r||!n&&r)&&(n===r&&(!!bs(t,e)&&!!ys(t,e))))}(t,e)||!!function(t,e){const n=Ss(e),r=Ss(t);return!(!n||!r)&&(n.type===r.type&&n.value===r.value&&(!!bs(t,e)&&!!ys(t,e)))}(t,e))}(n,e))return t&&p.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(r){}return e=n}}};function ys(t,e){let n=S(t),r=S(e);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let s=0;s<r.length;s++){const t=r[s],e=n[s];if(t.filename!==e.filename||t.lineno!==e.lineno||t.colno!==e.colno||t.function!==e.function)return!1}return!0}function bs(t,e){let n=t.fingerprint,r=e.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch(s){return!1}}function Ss(t){var e,n;return null==(n=null==(e=t.exception)?void 0:e.values)?void 0:n[0]}const Es=()=>({name:"ConversationId",setup(t){t.on("spanStart",t=>{const e=Wt().getScopeData(),n=zt().getScopeData(),r=e.conversationId||n.conversationId;r&&t.setAttribute("gen_ai.conversation.id",r)})}});function xs(t,e,n,r,s){if(!t.fetchData)return;const{method:o,url:i}=t.fetchData,a=We()&&e(i);if(t.endTimestamp){const e=t.fetchData.__span;if(!e)return;const n=r[e];return void(n&&(a&&(function(t,e){var n,r;if(e.response){ie(t,e.response.status);const s=null==(r=null==(n=e.response)?void 0:n.headers)?void 0:r.get("content-length");if(s){const e=parseInt(s);e>0&&t.setAttribute("http.response_content_length",e)}}else e.error&&t.setStatus({code:2,message:"internal_error"});t.end()}(n,t),function(t,e,n){var r;const s="object"==typeof n&&null!==n?n.onRequestSpanEnd:void 0;null==s||s(t,{headers:null==(r=e.response)?void 0:r.headers,error:e.error})}(n,t,s)),delete r[e]))}const{spanOrigin:c="auto.http.browser",propagateTraceparent:u=!1}="object"==typeof s?s:{spanOrigin:s},l=!!Le(),d=a&&l?En(function(t,e,n){if(t.startsWith("data:"))return{name:`${e} ${Yr(t)}`,attributes:ks(t,void 0,e,n)};const r=Jr(t);return{name:`${e} ${r?function(t){if(zr(t))return t.pathname;const e=new URL(t);return e.search="",e.hash="",["80","443"].includes(e.port)&&(e.port=""),e.password&&(e.password="%filtered%"),e.username&&(e.username="%filtered%"),e.toString()}(r):t}`,attributes:ks(t,r,e,n)}}(i,o,c)):new Xe;if(t.fetchData.__span=d.spanContext().spanId,r[d.spanContext().spanId]=d,n(t.fetchData.url)){const e=t.args[0],n={...t.args[1]||{}},r=function(t,e,n,r){const s=Qr({span:n,propagateTraceparent:r}),o=s["sentry-trace"],i=s.baggage,a=s.traceparent;if(!o)return;const c=e.headers||(G(t)?t.headers:void 0);if(c){if(function(t){return"undefined"!=typeof Headers&&q(t,Headers)}(c)){const t=new Headers(c);if(t.get("sentry-trace")||t.set("sentry-trace",o),r&&a&&!t.get("traceparent")&&t.set("traceparent",a),i){const e=t.get("baggage");e?ws(e)||t.set("baggage",`${e},${i}`):t.set("baggage",i)}return t}if(Array.isArray(c)){const t=[...c];c.find(t=>"sentry-trace"===t[0])||t.push(["sentry-trace",o]),r&&a&&!c.find(t=>"traceparent"===t[0])&&t.push(["traceparent",a]);const e=c.find(t=>"baggage"===t[0]&&ws(t[1]));return i&&!e&&t.push(["baggage",i]),t}{const t="sentry-trace"in c?c["sentry-trace"]:void 0,e="traceparent"in c?c.traceparent:void 0,n="baggage"in c?c.baggage:void 0,s=n?Array.isArray(n)?[...n]:[n]:[],u=n&&(Array.isArray(n)?n.find(t=>ws(t)):ws(n));i&&!u&&s.push(i);const l={...c,"sentry-trace":null!=t?t:o,baggage:s.length>0?s.join(","):void 0};return r&&a&&!e&&(l.traceparent=a),l}}return{...s}}(e,n,We()&&l?d:void 0,u);r&&(t.args[1]=n,n.headers=r)}const p=Ht();if(p){const e={input:t.args,response:t.response,startTimestamp:t.startTimestamp,endTimestamp:t.endTimestamp};p.emit("beforeOutgoingRequestSpan",d,e)}return d}function ws(t){return t.split(",").some(t=>t.trim().startsWith(de))}function ks(t,e,n,r){const s={url:Yr(t),type:"fetch","http.method":n,[Zt]:r,[Kt]:"http.client"};return e&&(zr(e)||(s["http.url"]=Yr(e.href),s["server.address"]=e.host),e.search&&(s["http.query"]=e.search),e.hash&&(s["http.fragment"]=e.hash)),s}function Is(t,n,r){return"util"in e&&"function"==typeof e.util.format?e.util.format(...t):function(t,e,n){return t.map(t=>W(t)?String(t):JSON.stringify(tn(t,e,n))).join(" ")}(t,n,r)}function $s(t,e){const n={},r=new Array(e.length).fill("{}").join(" ");return n["sentry.message.template"]=`${t} ${r}`,e.forEach((t,e)=>{n[`sentry.message.parameter.${e}`]=t}),n}const Ts={[Zt]:"auto.log.console"},Os=(e={})=>{const n=e.levels||i;return{name:"ConsoleLogs",setup(e){const{enableLogs:r,normalizeDepth:s=3,normalizeMaxBreadth:o=1e3}=e.getOptions();r?ms(({args:t,level:r})=>{if(Ht()!==e||!n.includes(r))return;const i=t[0],a=t.slice(1);if("assert"===r)return void(i||dr({level:"error",message:a.length>0?`Assertion failed: ${Is(a,s,o)}`:"Assertion failed",attributes:Ts}));const c="log"===r,u=t.length>1&&"string"==typeof t[0]&&(l=t[0],!/%[sdifocO]/.test(l));var l;const d={...Ts,...u?$s(i,a):{}};dr({level:c?"info":r,message:Is(t,s,o),severityNumber:c?10:void 0,attributes:d})}):t&&p.warn("`enableLogs` is not enabled, ConsoleLogs integration disabled")}}};function Cs(t){return void 0===t?void 0:t>=400&&t<500?"warning":t>=500?"error":void 0}const As=e;function Ds(){return"history"in As&&!!As.history}function Ns(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function js(t,e){const n="fetch";
1k(n,t),I(n,()=>Rs(void 0,e))}function Ps(t){const e="fetch-body-resolved";k(e,t),I(e,()=>Rs(Ms))}function Rs(n,r=!1){r&&!function(){var e;if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in As))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch(t){return!1}}())return!1;if(Ns(As.fetch))return!0;let n=!1;const r=As.document;if(r&&"function"==typeof r.createElement)try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t),(null==(e=t.contentWindow)?void 0:e.fetch)&&(n=Ns(t.contentWindow.fetch)),r.head.removeChild(t)}catch(s){t&&p.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",s)}return n}()||tt(e,"fetch",function(t){return function(...r){const s=new Error,{method:o,url:i}=function(t){if(0===t.length)return{method:"GET",url:""};if(2===t.length){const[e,n]=t;return{url:Us(e),method:Ls(n,"method")?String(n.method).toUpperCase():G(e)&&Ls(e,"method")?String(e.method).toUpperCase():"GET"}}const e=t[0];return{url:Us(e),method:Ls(e,"method")?String(e.method).toUpperCase():"GET"}}(r),a={args:r,fetchData:{method:o,url:i},startTimestamp:1e3*kt(),virtualError:s,headers:Fs(r)};return n||$("fetch",{...a}),t.apply(e,r).then(async t=>(n?n(t):$("fetch",{...a,endTimestamp:1e3*kt(),response:t}),t),t=>{var e;$("fetch",{...a,endTimestamp:1e3*kt(),error:t}),P(t)&&void 0===t.stack&&(t.stack=s.stack,et(t,"framesToPop",1));const n=Ht(),r=null!=(e=null==n?void 0:n.getOptions().enhanceFetchErrorMessages)?e:"always";if(!1!==r&&t instanceof TypeError&&("Failed to fetch"===t.message||"Load failed"===t.message||"NetworkError when attempting to fetch resource."===t.message))try{const e=new URL(a.fetchData.url).host;"always"===r?t.message=`${t.message} (${e})`:et(t,"__sentry_fetch_url_host__",e)}catch(o){}throw t})}})}function Ms(t){let e;try{e=t.clone()}catch(n){return}!async function(t,e){if(null==t?void 0:t.body){const r=t.body,s=r.getReader(),o=setTimeout(()=>{r.cancel().then(null,()=>{})},9e4);let i=!0;for(;i;){let t;try{t=setTimeout(()=>{r.cancel().then(null,()=>{})},5e3);const{done:n}=await s.read();clearTimeout(t),n&&(e(),i=!1)}catch(n){i=!1}finally{clearTimeout(t)}}clearTimeout(o),s.releaseLock(),r.cancel().then(null,()=>{})}}(e,()=>{$("fetch-body-resolved",{endTimestamp:1e3*kt(),response:t})})}function Ls(t,e){return!!t&&"object"==typeof t&&!!t[e]}function Us(t){return"string"==typeof t?t:t?Ls(t,"url")?t.url:t.toString?t.toString():"":""}function Fs(t){const[e,n]=t;try{if("object"==typeof n&&null!==n&&"headers"in n&&n.headers)return new Headers(n.headers);if(G(e))return new Headers(e.headers)}catch(r){}}function Bs(){return"npm"}function Ws(){return"undefined"!=typeof window&&(!(("undefined"==typeof __SENTRY_BROWSER_BUNDLE__||!__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0))||function(){const t=e.process;return"renderer"===(null==t?void 0:t.type)}())}export{Yr as $,g as A,rr as B,Nr as C,ms as D,js as E,es as F,e as G,bt as H,p as I,K as J,X as K,mt as L,_s as M,Cs as N,Hr as O,tt as P,b as Q,Vn as R,Qn as S,zt as T,f as U,O as V,qn as W,D as X,W as Y,F as Z,Br as _,rt as a,rn as a$,ls as a0,c as a1,as as a2,ss as a3,Es as a4,vs as a5,tr as a6,_ as a7,Wr as a8,Ps as a9,wt as aA,Cn as aB,Qt as aC,Qe as aD,Ae as aE,Jr as aF,xn as aG,te as aH,Xt as aI,re as aJ,mn as aK,Sn as aL,k as aM,I as aN,$ as aO,vt as aP,Ds as aQ,Ns as aR,Ws as aS,ye as aT,Xr as aU,Gn as aV,Yn as aW,tn as aX,Sr as aY,br as aZ,zn as a_,xs as aa,Ce as ab,We as ac,ie as ad,qr as ae,Le as af,En as ag,Kt as ah,Zt as ai,Xe as aj,Qr as ak,_t as al,Me as am,oe as an,Wt as ao,Vt as ap,se as aq,Gt as ar,On as as,$t as at,Be as au,At as av,Ct as aw,Se as ax,kt as ay,Yt as az,et as b,hn as b0,fn as b1,Gr as b2,Os as b3,St as c,Et as d,Hn as e,L as f,Q as g,U as h,M as i,P as j,z as k,J as l,nt as m,B as n,Ht as o,en as p,at as q,An as r,Zr as s,Bs as t,pr as u,mr as v,Jt as w,Kr as x,Er as y,yr as z};

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.