/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var u=function(){return u=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},u.apply(this,arguments)};function Et(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s}function b(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Et(arguments[t]));return e}function Ot(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function X(){return!Ot()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function P(e,t){return e.require(t)}function oe(e){var t;try{t=P(module,e)}catch{}try{var r=P(module,"process").cwd;t=P(module,r()+"/node_modules/"+e)}catch{}return t}var wt={};function _(){return X()?global:typeof window<"u"?window:typeof self<"u"?self:wt}function V(e,t,r){var n=r||_(),i=n.__SENTRY__=n.__SENTRY__||{},s=i[e]||(i[e]=t());return s}var pt=Object.prototype.toString;function xt(e){switch(pt.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return O(e,Error)}}function E(e,t){return pt.call(e)==="[object "+t+"]"}function ae(e){return E(e,"ErrorEvent")}function ue(e){return E(e,"DOMError")}function fe(e){return E(e,"DOMException")}function M(e){return E(e,"String")}function ce(e){return e===null||typeof e!="object"&&typeof e!="function"}function J(e){return E(e,"Object")}function Tt(e){return typeof Event<"u"&&O(e,Event)}function kt(e){return typeof Element<"u"&&O(e,Element)}function Rt(e){return E(e,"RegExp")}function lt(e){return!!(e&&e.then&&typeof e.then=="function")}function he(e){return J(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function pe(e){return typeof e=="number"&&e!==e}function O(e,t){try{return e instanceof t}catch{return!1}}function Nt(e,t){try{for(var r=e,n=5,i=80,s=[],o=0,a=0,c=" > ",h=c.length,f=void 0;r&&o++<n&&(f=jt(r,t),!(f==="html"||o>1&&a+s.length*h+f.length>=i));)s.push(f),a+=f.length,r=r.parentNode;return s.reverse().join(c)}catch{return"<unknown>"}}function jt(e,t){var r=e,n=[],i,s,o,a,c;if(!r||!r.tagName)return"";n.push(r.tagName.toLowerCase());var h=t&&t.length?t.filter(function(p){return r.getAttribute(p)}).map(function(p){return[p,r.getAttribute(p)]}):null;if(h&&h.length)h.forEach(function(p){n.push("["+p[0]+'="'+p[1]+'"]')});else if(r.id&&n.push("#"+r.id),i=r.className,i&&M(i))for(s=i.split(/\s+/),c=0;c<s.length;c++)n.push("."+s[c]);var f=["type","name","title","alt"];for(c=0;c<f.length;c++)o=f[c],a=r.getAttribute(o),a&&n.push("["+o+'="'+a+'"]');return n.join("")}function le(){var e=_();try{return e.document.location.href}catch{return""}}/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Y=function(e,t){return Y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},Y(e,t)};function de(e,t){Y(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var d=function(){return d=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},d.apply(this,arguments)};function L(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Dt(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s}function Pt(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Dt(arguments[t]));return e}var R=typeof __SENTRY_DEBUG__>"u"?!0:__SENTRY_DEBUG__,Mt=_(),Lt="Sentry Logger ",I=["debug","info","warn","error","log","assert"];function dt(e){var t=_();if(!("console"in t))return e();var r=t.console,n={};I.forEach(function(i){var s=r[i]&&r[i].__sentry_original__;i in t.console&&s&&(n[i]=r[i],r[i]=s)});try{return e()}finally{Object.keys(n).forEach(function(i){r[i]=n[i]})}}function et(){var e=!1,t={enable:function(){e=!0},disable:function(){e=!1}};return R?I.forEach(function(r){t[r]=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];e&&dt(function(){var s;(s=Mt.console)[r].apply(s,Pt([Lt+"["+r+"]:"],n))})}}):I.forEach(function(r){t[r]=function(){}}),t}var S;R?S=V("logger",et):S=et();function rt(e,t){return t===void 0&&(t=0),typeof e!="string"||t===0||e.length<=t?e:e.substr(0,t)+"..."}function _e(e,t){if(!Array.isArray(e))return"";for(var r=[],n=0;n<e.length;n++){var i=e[n];try{r.push(String(i))}catch{r.push("[value cannot be serialized]")}}return r.join(t)}function ge(e,t){return M(e)?Rt(t)?t.test(e):typeof t=="string"?e.indexOf(t)!==-1:!1:!1}function v(e,t,r){if(t in e){var n=e[t],i=r(n);if(typeof i=="function")try{It(i,n)}catch{}e[t]=i}}function _t(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}function It(e,t){var r=t.prototype||{};e.prototype=t.prototype=r,_t(e,"__sentry_original__",t)}function ve(e){return e.__sentry_original__}function ye(e){return Object.keys(e).map(function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])}).join("&")}function Ht(e){var t=e;if(xt(e))t=d({message:e.message,name:e.name,stack:e.stack},it(e));else if(Tt(e)){var r=e;t=d({type:r.type,target:nt(r.target),currentTarget:nt(r.currentTarget)},it(r)),typeof CustomEvent<"u"&&O(e,CustomEvent)&&(t.detail=r.detail)}return t}function nt(e){try{return kt(e)?Nt(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function it(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}function me(e,t){t===void 0&&(t=40);var r=Object.keys(Ht(e));if(r.sort(),!r.length)return"[object has no keys]";if(r[0].length>=t)return rt(r[0],t);for(var n=r.length;n>0;n--){var i=r.slice(0,n).join(", ");if(!(i.length>t))return n===r.length?i:rt(i,t)}return""}function C(e){var t,r;if(J(e)){var n={};try{for(var i=L(Object.keys(e)),s=i.next();!s.done;s=i.next()){var o=s.value;typeof e[o]<"u"&&(n[o]=C(e[o]))}}catch(a){t={error:a}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}return Array.isArray(e)?e.map(C):e}var Ut=50;function Se(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.sort(function(n,i){return n[0]-i[0]}).map(function(n){return n[1]});return function(n,i){var s,o,a,c;i===void 0&&(i=0);var h=[];try{for(var f=L(n.split(`
`).slice(i)),p=f.next();!p.done;p=f.next()){var w=p.value;try{for(var m=(a=void 0,L(r)),x=m.next();!x.done;x=m.next()){var bt=x.value,tt=bt(w);if(tt){h.push(tt);break}}}catch(U){a={error:U}}finally{try{x&&!x.done&&(c=m.return)&&c.call(m)}finally{if(a)throw a.error}}}}catch(U){s={error:U}}finally{try{p&&!p.done&&(o=f.return)&&o.call(f)}finally{if(s)throw s.error}}return Bt(h)}}function Bt(e){if(!e.length)return[];var t=e,r=t[0].function||"",n=t[t.length-1].function||"";return(r.indexOf("captureMessage")!==-1||r.indexOf("captureException")!==-1)&&(t=t.slice(1)),n.indexOf("sentryWrapped")!==-1&&(t=t.slice(0,-1)),t.slice(0,Ut).map(function(i){return d(d({},i),{filename:i.filename||t[0].filename,function:i.function||"?"})}).reverse()}var B="<anonymous>";function At(e){try{return!e||typeof e!="function"?B:e.name||B}catch{return B}}function gt(){if(!("fetch"in _()))return!1;try{return new Headers,new Request(""),new Response,!0}catch{return!1}}function st(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function qt(){if(!gt())return!1;var e=_();if(st(e.fetch))return!0;var t=!1,r=e.document;if(r&&typeof r.createElement=="function")try{var n=r.createElement("iframe");n.hidden=!0,r.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(t=st(n.contentWindow.fetch)),r.head.removeChild(n)}catch(i){R&&S.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",i)}return t}function be(){if(!gt())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch{return!1}}function Ft(){var e=_(),t=e.chrome,r=t&&t.app&&t.app.runtime,n="history"in e&&!!e.history.pushState&&!!e.history.replaceState;return!r&&n}var l=_(),T={},ot={};function Yt(e){if(!ot[e])switch(ot[e]=!0,e){case"console":Ct();break;case"dom":Qt();break;case"xhr":Xt();break;case"fetch":Gt();break;case"history":Vt();break;case"error":Zt();break;case"unhandledrejection":te();break;default:R&&S.warn("unknown instrumentation type:",e);return}}function Ee(e,t){T[e]=T[e]||[],T[e].push(t),Yt(e)}function g(e,t){var r,n;if(!(!e||!T[e]))try{for(var i=L(T[e]||[]),s=i.next();!s.done;s=i.next()){var o=s.value;try{o(t)}catch(a){R&&S.error(`Error while triggering instrumentation handler.
Type: `+e+`
Name: `+At(o)+`
Error:`,a)}}}catch(a){r={error:a}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}function Ct(){"console"in l&&I.forEach(function(e){e in l.console&&v(l.console,e,function(t){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];g("console",{args:r,level:e}),t&&t.apply(l.console,r)}})})}function Gt(){qt()&&v(l,"fetch",function(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n={args:t,fetchData:{method:Wt(t),url:$t(t)},startTimestamp:Date.now()};return g("fetch",d({},n)),e.apply(l,t).then(function(i){return g("fetch",d(d({},n),{endTimestamp:Date.now(),response:i})),i},function(i){throw g("fetch",d(d({},n),{endTimestamp:Date.now(),error:i})),i})}})}function Wt(e){return e===void 0&&(e=[]),"Request"in l&&O(e[0],Request)&&e[0].method?String(e[0].method).toUpperCase():e[1]&&e[1].method?String(e[1].method).toUpperCase():"GET"}function $t(e){return e===void 0&&(e=[]),typeof e[0]=="string"?e[0]:"Request"in l&&O(e[0],Request)?e[0].url:String(e[0])}function Xt(){if("XMLHttpRequest"in l){var e=XMLHttpRequest.prototype;v(e,"open",function(t){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=this,s=r[1],o=i.__sentry_xhr__={method:M(r[0])?r[0].toUpperCase():r[0],url:r[1]};M(s)&&o.method==="POST"&&s.match(/sentry_key/)&&(i.__sentry_own_request__=!0);var a=function(){if(i.readyState===4){try{o.status_code=i.status}catch{}g("xhr",{args:r,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:i})}};return"onreadystatechange"in i&&typeof i.onreadystatechange=="function"?v(i,"onreadystatechange",function(c){return function(){for(var h=[],f=0;f<arguments.length;f++)h[f]=arguments[f];return a(),c.apply(i,h)}}):i.addEventListener("readystatechange",a),t.apply(i,r)}}),v(e,"send",function(t){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return this.__sentry_xhr__&&r[0]!==void 0&&(this.__sentry_xhr__.body=r[0]),g("xhr",{args:r,startTimestamp:Date.now(),xhr:this}),t.apply(this,r)}})}}var N;function Vt(){if(!Ft())return;var e=l.onpopstate;l.onpopstate=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=l.location.href,s=N;if(N=i,g("history",{from:s,to:i}),e)try{return e.apply(this,r)}catch{}};function t(r){return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var s=n.length>2?n[2]:void 0;if(s){var o=N,a=String(s);N=a,g("history",{from:o,to:a})}return r.apply(this,n)}}v(l.history,"pushState",t),v(l.history,"replaceState",t)}var Jt=1e3,j,D;function Kt(e,t){if(!e||e.type!==t.type)return!0;try{if(e.target!==t.target)return!0}catch{}return!1}function zt(e){if(e.type!=="keypress")return!1;try{var t=e.target;if(!t||!t.tagName)return!0;if(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)return!1}catch{}return!0}function at(e,t){return t===void 0&&(t=!1),function(r){if(!(!r||D===r)&&!zt(r)){var n=r.type==="keypress"?"input":r.type;j===void 0?(e({event:r,name:n,global:t}),D=r):Kt(D,r)&&(e({event:r,name:n,global:t}),D=r),clearTimeout(j),j=l.setTimeout(function(){j=void 0},Jt)}}}function Qt(){if("document"in l){var e=g.bind(null,"dom"),t=at(e,!0);l.document.addEventListener("click",t,!1),l.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(function(r){var n=l[r]&&l[r].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(v(n,"addEventListener",function(i){return function(s,o,a){if(s==="click"||s=="keypress")try{var c=this,h=c.__sentry_instrumentation_handlers__=c.__sentry_instrumentation_handlers__||{},f=h[s]=h[s]||{refCount:0};if(!f.handler){var p=at(e);f.handler=p,i.call(this,s,p,a)}f.refCount+=1}catch{}return i.call(this,s,o,a)}}),v(n,"removeEventListener",function(i){return function(s,o,a){if(s==="click"||s=="keypress")try{var c=this,h=c.__sentry_instrumentation_handlers__||{},f=h[s];f&&(f.refCount-=1,f.refCount<=0&&(i.call(this,s,f.handler,a),f.handler=void 0,delete h[s]),Object.keys(h).length===0&&delete c.__sentry_instrumentation_handlers__)}catch{}return i.call(this,s,o,a)}}))})}}var A=null;function Zt(){A=l.onerror,l.onerror=function(e,t,r,n,i){return g("error",{column:n,error:i,line:r,msg:e,url:t}),A?A.apply(this,arguments):!1}}var q=null;function te(){q=l.onunhandledrejection,l.onunhandledrejection=function(e){return g("unhandledrejection",e),q?q.apply(this,arguments):!0}}function k(){var e=_(),t=e.crypto||e.msCrypto;if(t!==void 0&&t.getRandomValues){var r=new Uint16Array(8);t.getRandomValues(r),r[3]=r[3]&4095|16384,r[4]=r[4]&16383|32768;var n=function(i){for(var s=i.toString(16);s.length<4;)s="0"+s;return s};return n(r[0])+n(r[1])+n(r[2])+n(r[3])+n(r[4])+n(r[5])+n(r[6])+n(r[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(i){var s=Math.random()*16|0,o=i==="x"?s:s&3|8;return o.toString(16)})}function Oe(e){if(!e)return{};var t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};var r=t[6]||"",n=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],relative:t[5]+r+n}}function vt(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function we(e){var t=e.message,r=e.event_id;if(t)return t;var n=vt(e);return n?n.type&&n.value?n.type+": "+n.value:n.type||n.value||r||"<unknown>":r||"<unknown>"}function xe(e,t,r){var n=e.exception=e.exception||{},i=n.values=n.values||[],s=i[0]=i[0]||{};s.value||(s.value=t||""),s.type||(s.type="Error")}function Te(e,t){var r=vt(e);if(r){var n={type:"generic",handled:!0},i=r.mechanism;if(r.mechanism=d(d(d({},n),i),t),t&&"data"in t){var s=d(d({},i&&i.data),t.data);r.mechanism.data=s}}}function ke(e){if(e&&e.__sentry_captured__)return!0;try{_t(e,"__sentry_captured__",!0)}catch{}return!1}function Re(e){return new K(function(t){t(e)})}function Ne(e){return new K(function(t,r){r(e)})}var K=function(){function e(t){var r=this;this._state=0,this._handlers=[],this._resolve=function(n){r._setResult(1,n)},this._reject=function(n){r._setResult(2,n)},this._setResult=function(n,i){if(r._state===0){if(lt(i)){i.then(r._resolve,r._reject);return}r._state=n,r._value=i,r._executeHandlers()}},this._executeHandlers=function(){if(r._state!==0){var n=r._handlers.slice();r._handlers=[],n.forEach(function(i){i[0]||(r._state===1&&i[1](r._value),r._state===2&&i[2](r._value),i[0]=!0)})}};try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}return e.prototype.then=function(t,r){var n=this;return new e(function(i,s){n._handlers.push([!1,function(o){if(!t)i(o);else try{i(t(o))}catch(a){s(a)}},function(o){if(!r)s(o);else try{i(r(o))}catch(a){s(a)}}]),n._executeHandlers()})},e.prototype.catch=function(t){return this.then(function(r){return r},t)},e.prototype.finally=function(t){var r=this;return new e(function(n,i){var s,o;return r.then(function(a){o=!1,s=a,t&&t()},function(a){o=!0,s=a,t&&t()}).then(function(){if(o){i(s);return}n(s)})})},e}(),G={nowSeconds:function(){return Date.now()/1e3}};function ee(){var e=_().performance;if(!(!e||!e.now)){var t=Date.now()-e.now();return{now:function(){return e.now()},timeOrigin:t}}}function re(){try{var e=P(module,"perf_hooks");return e.performance}catch{return}}var F=X()?re():ee(),ut=F===void 0?G:{nowSeconds:function(){return(F.timeOrigin+F.now())/1e3}},yt=G.nowSeconds.bind(G),W=ut.nowSeconds.bind(ut),je=W;(function(){var e=_().performance;if(!(!e||!e.now)){var t=3600*1e3,r=e.now(),n=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+r-n):t,s=i<t,o=e.timing&&e.timing.navigationStart,a=typeof o=="number",c=a?Math.abs(o+r-n):t,h=c<t;return s||h?i<=c?e.timeOrigin:o:n}})();var ft=100,$=function(){function e(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}return e.clone=function(t){var r=new e;return t&&(r._breadcrumbs=b(t._breadcrumbs),r._tags=u({},t._tags),r._extra=u({},t._extra),r._contexts=u({},t._contexts),r._user=t._user,r._level=t._level,r._span=t._span,r._session=t._session,r._transactionName=t._transactionName,r._fingerprint=t._fingerprint,r._eventProcessors=b(t._eventProcessors),r._requestSession=t._requestSession),r},e.prototype.addScopeListener=function(t){this._scopeListeners.push(t)},e.prototype.addEventProcessor=function(t){return this._eventProcessors.push(t),this},e.prototype.setUser=function(t){return this._user=t||{},this._session&&this._session.update({user:t}),this._notifyScopeListeners(),this},e.prototype.getUser=function(){return this._user},e.prototype.getRequestSession=function(){return this._requestSession},e.prototype.setRequestSession=function(t){return this._requestSession=t,this},e.prototype.setTags=function(t){return this._tags=u(u({},this._tags),t),this._notifyScopeListeners(),this},e.prototype.setTag=function(t,r){var n;return this._tags=u(u({},this._tags),(n={},n[t]=r,n)),this._notifyScopeListeners(),this},e.prototype.setExtras=function(t){return this._extra=u(u({},this._extra),t),this._notifyScopeListeners(),this},e.prototype.setExtra=function(t,r){var n;return this._extra=u(u({},this._extra),(n={},n[t]=r,n)),this._notifyScopeListeners(),this},e.prototype.setFingerprint=function(t){return this._fingerprint=t,this._notifyScopeListeners(),this},e.prototype.setLevel=function(t){return this._level=t,this._notifyScopeListeners(),this},e.prototype.setTransactionName=function(t){return this._transactionName=t,this._notifyScopeListeners(),this},e.prototype.setTransaction=function(t){return this.setTransactionName(t)},e.prototype.setContext=function(t,r){var n;return r===null?delete this._contexts[t]:this._contexts=u(u({},this._contexts),(n={},n[t]=r,n)),this._notifyScopeListeners(),this},e.prototype.setSpan=function(t){return this._span=t,this._notifyScopeListeners(),this},e.prototype.getSpan=function(){return this._span},e.prototype.getTransaction=function(){var t=this.getSpan();return t&&t.transaction},e.prototype.setSession=function(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this},e.prototype.getSession=function(){return this._session},e.prototype.update=function(t){if(!t)return this;if(typeof t=="function"){var r=t(this);return r instanceof e?r:this}return t instanceof e?(this._tags=u(u({},this._tags),t._tags),this._extra=u(u({},this._extra),t._extra),this._contexts=u(u({},this._contexts),t._contexts),t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession)):J(t)&&(t=t,this._tags=u(u({},this._tags),t.tags),this._extra=u(u({},this._extra),t.extra),this._contexts=u(u({},this._contexts),t.contexts),t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession)),this},e.prototype.clear=function(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this},e.prototype.addBreadcrumb=function(t,r){var n=typeof r=="number"?Math.min(r,ft):ft;if(n<=0)return this;var i=u({timestamp:yt()},t);return this._breadcrumbs=b(this._breadcrumbs,[i]).slice(-n),this._notifyScopeListeners(),this},e.prototype.clearBreadcrumbs=function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this},e.prototype.applyToEvent=function(t,r){if(this._extra&&Object.keys(this._extra).length&&(t.extra=u(u({},this._extra),t.extra)),this._tags&&Object.keys(this._tags).length&&(t.tags=u(u({},this._tags),t.tags)),this._user&&Object.keys(this._user).length&&(t.user=u(u({},this._user),t.user)),this._contexts&&Object.keys(this._contexts).length&&(t.contexts=u(u({},this._contexts),t.contexts)),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span){t.contexts=u({trace:this._span.getTraceContext()},t.contexts);var n=this._span.transaction&&this._span.transaction.name;n&&(t.tags=u({transaction:n},t.tags))}return this._applyFingerprint(t),t.breadcrumbs=b(t.breadcrumbs||[],this._breadcrumbs),t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,t.sdkProcessingMetadata=this._sdkProcessingMetadata,this._notifyEventProcessors(b(mt(),this._eventProcessors),t,r)},e.prototype.setSDKProcessingMetadata=function(t){return this._sdkProcessingMetadata=u(u({},this._sdkProcessingMetadata),t),this},e.prototype._notifyEventProcessors=function(t,r,n,i){var s=this;return i===void 0&&(i=0),new K(function(o,a){var c=t[i];if(r===null||typeof c!="function")o(r);else{var h=c(u({},r),n);lt(h)?h.then(function(f){return s._notifyEventProcessors(t,f,n,i+1).then(o)}).then(null,a):s._notifyEventProcessors(t,h,n,i+1).then(o).then(null,a)}})},e.prototype._notifyScopeListeners=function(){var t=this;this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(function(r){r(t)}),this._notifyingListeners=!1)},e.prototype._applyFingerprint=function(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint},e}();function mt(){return V("globalEventProcessors",function(){return[]})}function De(e){mt().push(e)}var ne=function(){function e(t){this.errors=0,this.sid=k(),this.duration=0,this.status="ok",this.init=!0,this.ignoreDuration=!1;var r=W();this.timestamp=r,this.started=r,t&&this.update(t)}return e.prototype.update=function(t){if(t===void 0&&(t={}),t.user&&(!this.ipAddress&&t.user.ip_address&&(this.ipAddress=t.user.ip_address),!this.did&&!t.did&&(this.did=t.user.id||t.user.email||t.user.username)),this.timestamp=t.timestamp||W(),t.ignoreDuration&&(this.ignoreDuration=t.ignoreDuration),t.sid&&(this.sid=t.sid.length===32?t.sid:k()),t.init!==void 0&&(this.init=t.init),!this.did&&t.did&&(this.did=""+t.did),typeof t.started=="number"&&(this.started=t.started),this.ignoreDuration)this.duration=void 0;else if(typeof t.duration=="number")this.duration=t.duration;else{var r=this.timestamp-this.started;this.duration=r>=0?r:0}t.release&&(this.release=t.release),t.environment&&(this.environment=t.environment),!this.ipAddress&&t.ipAddress&&(this.ipAddress=t.ipAddress),!this.userAgent&&t.userAgent&&(this.userAgent=t.userAgent),typeof t.errors=="number"&&(this.errors=t.errors),t.status&&(this.status=t.status)},e.prototype.close=function(t){t?this.update({status:t}):this.status==="ok"?this.update({status:"exited"}):this.update()},e.prototype.toJSON=function(){return C({sid:""+this.sid,init:this.init,started:new Date(this.started*1e3).toISOString(),timestamp:new Date(this.timestamp*1e3).toISOString(),status:this.status,errors:this.errors,did:typeof this.did=="number"||typeof this.did=="string"?""+this.did:void 0,duration:this.duration,attrs:{release:this.release,environment:this.environment,ip_address:this.ipAddress,user_agent:this.userAgent}})},e}(),ct=typeof __SENTRY_DEBUG__>"u"?!0:__SENTRY_DEBUG__,z=4,ie=100,Q=function(){function e(t,r,n){r===void 0&&(r=new $),n===void 0&&(n=z),this._version=n,this._stack=[{}],this.getStackTop().scope=r,t&&this.bindClient(t)}return e.prototype.isOlderThan=function(t){return this._version<t},e.prototype.bindClient=function(t){var r=this.getStackTop();r.client=t,t&&t.setupIntegrations&&t.setupIntegrations()},e.prototype.pushScope=function(){var t=$.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:t}),t},e.prototype.popScope=function(){return this.getStack().length<=1?!1:!!this.getStack().pop()},e.prototype.withScope=function(t){var r=this.pushScope();try{t(r)}finally{this.popScope()}},e.prototype.getClient=function(){return this.getStackTop().client},e.prototype.getScope=function(){return this.getStackTop().scope},e.prototype.getStack=function(){return this._stack},e.prototype.getStackTop=function(){return this._stack[this._stack.length-1]},e.prototype.captureException=function(t,r){var n=this._lastEventId=r&&r.event_id?r.event_id:k(),i=r;if(!r){var s=void 0;try{throw new Error("Sentry syntheticException")}catch(o){s=o}i={originalException:t,syntheticException:s}}return this._invokeClient("captureException",t,u(u({},i),{event_id:n})),n},e.prototype.captureMessage=function(t,r,n){var i=this._lastEventId=n&&n.event_id?n.event_id:k(),s=n;if(!n){var o=void 0;try{throw new Error(t)}catch(a){o=a}s={originalException:t,syntheticException:o}}return this._invokeClient("captureMessage",t,r,u(u({},s),{event_id:i})),i},e.prototype.captureEvent=function(t,r){var n=r&&r.event_id?r.event_id:k();return t.type!=="transaction"&&(this._lastEventId=n),this._invokeClient("captureEvent",t,u(u({},r),{event_id:n})),n},e.prototype.lastEventId=function(){return this._lastEventId},e.prototype.addBreadcrumb=function(t,r){var n=this.getStackTop(),i=n.scope,s=n.client;if(!(!i||!s)){var o=s.getOptions&&s.getOptions()||{},a=o.beforeBreadcrumb,c=a===void 0?null:a,h=o.maxBreadcrumbs,f=h===void 0?ie:h;if(!(f<=0)){var p=yt(),w=u({timestamp:p},t),m=c?dt(function(){return c(w,r)}):w;m!==null&&i.addBreadcrumb(m,f)}}},e.prototype.setUser=function(t){var r=this.getScope();r&&r.setUser(t)},e.prototype.setTags=function(t){var r=this.getScope();r&&r.setTags(t)},e.prototype.setExtras=function(t){var r=this.getScope();r&&r.setExtras(t)},e.prototype.setTag=function(t,r){var n=this.getScope();n&&n.setTag(t,r)},e.prototype.setExtra=function(t,r){var n=this.getScope();n&&n.setExtra(t,r)},e.prototype.setContext=function(t,r){var n=this.getScope();n&&n.setContext(t,r)},e.prototype.configureScope=function(t){var r=this.getStackTop(),n=r.scope,i=r.client;n&&i&&t(n)},e.prototype.run=function(t){var r=ht(this);try{t(this)}finally{ht(r)}},e.prototype.getIntegration=function(t){var r=this.getClient();if(!r)return null;try{return r.getIntegration(t)}catch{return ct&&S.warn("Cannot retrieve integration "+t.id+" from the current Hub"),null}},e.prototype.startSpan=function(t){return this._callExtensionMethod("startSpan",t)},e.prototype.startTransaction=function(t,r){return this._callExtensionMethod("startTransaction",t,r)},e.prototype.traceHeaders=function(){return this._callExtensionMethod("traceHeaders")},e.prototype.captureSession=function(t){if(t===void 0&&(t=!1),t)return this.endSession();this._sendSessionUpdate()},e.prototype.endSession=function(){var t=this.getStackTop(),r=t&&t.scope,n=r&&r.getSession();n&&n.close(),this._sendSessionUpdate(),r&&r.setSession()},e.prototype.startSession=function(t){var r=this.getStackTop(),n=r.scope,i=r.client,s=i&&i.getOptions()||{},o=s.release,a=s.environment,c=_(),h=(c.navigator||{}).userAgent,f=new ne(u(u(u({release:o,environment:a},n&&{user:n.getUser()}),h&&{userAgent:h}),t));if(n){var p=n.getSession&&n.getSession();p&&p.status==="ok"&&p.update({status:"exited"}),this.endSession(),n.setSession(f)}return f},e.prototype._sendSessionUpdate=function(){var t=this.getStackTop(),r=t.scope,n=t.client;if(r){var i=r.getSession&&r.getSession();i&&n&&n.captureSession&&n.captureSession(i)}},e.prototype._invokeClient=function(t){for(var r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var s=this.getStackTop(),o=s.scope,a=s.client;a&&a[t]&&(r=a)[t].apply(r,b(n,[o]))},e.prototype._callExtensionMethod=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=H(),s=i.__SENTRY__;if(s&&s.extensions&&typeof s.extensions[t]=="function")return s.extensions[t].apply(this,r);ct&&S.warn("Extension method "+t+" couldn't be found, doing nothing.")},e}();function H(){var e=_();return e.__SENTRY__=e.__SENTRY__||{extensions:{},hub:void 0},e}function ht(e){var t=H(),r=y(t);return Z(t,e),r}function Pe(){var e=H();return(!St(e)||y(e).isOlderThan(z))&&Z(e,new Q),X()?se(e):y(e)}function se(e){try{var t=H().__SENTRY__,r=t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active;if(!r)return y(e);if(!St(r)||y(r).isOlderThan(z)){var n=y(e).getStackTop();Z(r,new Q(n.client,$.clone(n.scope)))}return y(r)}catch{return y(e)}}function St(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function y(e){return V("hub",function(){return new Q},e)}function Z(e,t){if(!e)return!1;var r=e.__SENTRY__=e.__SENTRY__||{};return r.hub=t,!0}export{v as $,De as A,ke as B,$ as C,rt as D,lt as E,J as F,ve as G,Q as H,R as I,we as J,ge as K,Te as L,ae as M,ue as N,fe as O,xe as P,me as Q,Se as R,K as S,_ as T,st as U,gt as V,be as W,It as X,M as Y,le as Z,de as _,Ee as a,_e as a0,Oe as a1,Nt as a2,y as a3,ht as a4,ne as a5,X as b,H as c,C as d,oe as e,P as f,Pe as g,pe as h,O as i,Dt as j,xt as k,S as l,Tt as m,Ht as n,he as o,At as p,Re as q,Ne as r,ce as s,je as t,k as u,yt as v,d as w,L as x,ye as y,_t as z};