@sentry/browser 6.18.0 → 6.18.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/bundle.es6.js +158 -123
- package/build/bundle.es6.js.map +1 -1
- package/build/bundle.es6.min.js +2 -2
- package/build/bundle.es6.min.js.map +1 -1
- package/build/bundle.js +168 -130
- package/build/bundle.js.map +1 -1
- package/build/bundle.min.js +2 -2
- package/build/bundle.min.js.map +1 -1
- package/dist/backend.js +2 -2
- package/dist/backend.js.map +1 -1
- package/dist/eventbuilder.d.ts +24 -10
- package/dist/eventbuilder.d.ts.map +1 -1
- package/dist/eventbuilder.js +119 -23
- package/dist/eventbuilder.js.map +1 -1
- package/dist/helpers.js +2 -2
- package/dist/helpers.js.map +1 -1
- package/dist/integrations/dedupe.js +1 -1
- package/dist/integrations/dedupe.js.map +1 -1
- package/dist/integrations/globalhandlers.js +2 -8
- package/dist/integrations/globalhandlers.js.map +1 -1
- package/dist/integrations/linkederrors.js +2 -2
- package/dist/integrations/linkederrors.js.map +1 -1
- package/dist/stack-parsers.d.ts +5 -5
- package/dist/stack-parsers.d.ts.map +1 -1
- package/dist/stack-parsers.js +16 -6
- package/dist/stack-parsers.js.map +1 -1
- package/dist/transports/base.d.ts.map +1 -1
- package/dist/transports/base.js +11 -18
- package/dist/transports/base.js.map +1 -1
- package/dist/transports/utils.js +1 -1
- package/dist/transports/utils.js.map +1 -1
- package/esm/backend.js +2 -2
- package/esm/backend.js.map +1 -1
- package/esm/eventbuilder.d.ts +24 -10
- package/esm/eventbuilder.d.ts.map +1 -1
- package/esm/eventbuilder.js +113 -21
- package/esm/eventbuilder.js.map +1 -1
- package/esm/helpers.js +2 -2
- package/esm/helpers.js.map +1 -1
- package/esm/integrations/dedupe.js +1 -1
- package/esm/integrations/dedupe.js.map +1 -1
- package/esm/integrations/globalhandlers.js +2 -8
- package/esm/integrations/globalhandlers.js.map +1 -1
- package/esm/integrations/linkederrors.js +1 -1
- package/esm/integrations/linkederrors.js.map +1 -1
- package/esm/stack-parsers.d.ts +5 -5
- package/esm/stack-parsers.d.ts.map +1 -1
- package/esm/stack-parsers.js +16 -6
- package/esm/stack-parsers.js.map +1 -1
- package/esm/transports/base.d.ts.map +1 -1
- package/esm/transports/base.js +13 -20
- package/esm/transports/base.js.map +1 -1
- package/esm/transports/utils.js +1 -1
- package/esm/transports/utils.js.map +1 -1
- package/package.json +5 -5
- package/dist/parsers.d.ts +0 -21
- package/dist/parsers.d.ts.map +0 -1
- package/dist/parsers.js +0 -108
- package/dist/parsers.js.map +0 -1
- package/esm/parsers.d.ts +0 -21
- package/esm/parsers.d.ts.map +0 -1
- package/esm/parsers.js +0 -103
- package/esm/parsers.js.map +0 -1
package/build/bundle.es6.min.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! @sentry/browser 6.18.
|
|
2
|
-
var Sentry=function(t){var e;t.Severity=void 0,(e=t.Severity||(t.Severity={})).Fatal="fatal",e.Error="error",e.Warning="warning",e.Log="log",e.Info="info",e.Debug="debug",e.Critical="critical";const n={};function r(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:n}const i=Object.prototype.toString;function s(t){switch(i.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return b(t,Error)}}function o(t,e){return i.call(t)===`[object ${e}]`}function c(t){return o(t,"ErrorEvent")}function u(t){return o(t,"DOMError")}function a(t){return o(t,"String")}function h(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function f(t){return o(t,"Object")}function l(t){return"undefined"!=typeof Event&&b(t,Event)}function d(t){return"undefined"!=typeof Element&&b(t,Element)}function p(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function b(t,e){try{return t instanceof e}catch(t){return!1}}function y(t,e){try{let n=t;const r=5,i=80,s=[];let o=0,c=0;const u=" > ",a=u.length;let h;for(;n&&o++<r&&(h=v(n,e),!("html"===h||o>1&&c+s.length*a+h.length>=i));)s.push(h),c+=h.length,n=n.parentNode;return s.reverse().join(u)}catch(t){return"<unknown>"}}function v(t,e){const n=t,r=[];let i,s,o,c,u;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());const h=e&&e.length?e.filter((t=>n.getAttribute(t))).map((t=>[t,n.getAttribute(t)])):null;if(h&&h.length)h.forEach((t=>{r.push(`[${t[0]}="${t[1]}"]`)}));else if(n.id&&r.push(`#${n.id}`),i=n.className,i&&a(i))for(s=i.split(/\s+/),u=0;u<s.length;u++)r.push(`.${s[u]}`);const f=["type","name","title","alt"];for(u=0;u<f.length;u++)o=f[u],c=n.getAttribute(o),c&&r.push(`[${o}="${c}"]`);return r.join("")}const m=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){return t.__proto__=e,t}:function(t,e){for(const n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n]);return t});class g extends Error{constructor(t){super(t),this.message=t,this.name=new.target.prototype.constructor.name,m(this,new.target.prototype)}}const O=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;function j(t,e=!1){const{host:n,path:r,pass:i,port:s,projectId:o,protocol:c,publicKey:u}=t;return`${c}://${u}${e&&i?`:${i}`:""}@${n}${s?`:${s}`:""}/${r?`${r}/`:r}${o}`}function w(t){return"user"in t&&!("publicKey"in t)&&(t.publicKey=t.user),{user:t.publicKey||"",protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function E(t){const e="string"==typeof t?function(t){const e=O.exec(t);if(!e)throw new g(`Invalid Sentry Dsn: ${t}`);const[n,r,i="",s,o="",c]=e.slice(1);let u="",a=c;const h=a.split("/");if(h.length>1&&(u=h.slice(0,-1).join("/"),a=h.pop()),a){const t=a.match(/^\d+/);t&&(a=t[0])}return w({host:s,pass:i,path:u,projectId:a,port:o,protocol:n,publicKey:r})}(t):w(t);return e}const x=["fatal","error","warning","log","info","debug","critical"],_=r(),$="Sentry Logger ";function S(t){const e=r();if(!("console"in e))return t();const n=e.console,i={};["debug","info","warn","error","log","assert"].forEach((t=>{t in e.console&&n[t].__sentry_original__&&(i[t]=n[t],n[t]=n[t].__sentry_original__)}));const s=t();return Object.keys(i).forEach((t=>{n[t]=i[t]})),s}_.__SENTRY__=_.__SENTRY__||{};const k=_.__SENTRY__.logger||(_.__SENTRY__.logger=new class{constructor(){this.t=!1}disable(){this.t=!1}enable(){this.t=!0}log(...t){this.t&&S((()=>{_.console.log(`${$}[Log]: ${t.join(" ")}`)}))}warn(...t){this.t&&S((()=>{_.console.warn(`${$}[Warn]: ${t.join(" ")}`)}))}error(...t){this.t&&S((()=>{_.console.error(`${$}[Error]: ${t.join(" ")}`)}))}});function T(...t){return(e,n=0)=>{const r=[];for(const i of e.split("\n").slice(n))for(const e of t){const t=e(i);if(t){r.push(t);break}}return function(t){if(!t.length)return[];let e=t;const n=e[0].function||"",r=e[e.length-1].function||"";-1===n.indexOf("captureMessage")&&-1===n.indexOf("captureException")||(e=e.slice(1));-1!==r.indexOf("sentryWrapped")&&(e=e.slice(0,-1));return e.slice(0,50).map((t=>Object.assign(Object.assign({},t),{filename:t.filename||e[0].filename,function:t.function||"?"}))).reverse()}(r)}}const D="<anonymous>";function R(t){try{return t&&"function"==typeof t&&t.name||D}catch(t){return D}}function N(t,e=0){return"string"!=typeof t||0===e||t.length<=e?t:`${t.substr(0,e)}...`}function I(t,e){if(!Array.isArray(t))return"";const n=[];for(let e=0;e<t.length;e++){const r=t[e];try{n.push(String(r))}catch(t){n.push("[value cannot be serialized]")}}return n.join(e)}function M(t,e){return!!a(t)&&(o(e,"RegExp")?e.test(t):"string"==typeof e&&-1!==t.indexOf(e))}function q(t,e,n){if(!(e in t))return;const r=t[e],i=n(r);if("function"==typeof i)try{L(i,r)}catch(t){}t[e]=i}function C(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}function L(t,e){const n=e.prototype||{};t.prototype=e.prototype=n,C(t,"__sentry_original__",e)}function A(t){return t.__sentry_original__}function U(t){if(s(t)){const e=t,n={message:e.message,name:e.name,stack:e.stack};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n}if(l(t)){const e=t,n={};n.type=e.type;try{n.target=d(e.target)?y(e.target):Object.prototype.toString.call(e.target)}catch(t){n.target="<unknown>"}try{n.currentTarget=d(e.currentTarget)?y(e.currentTarget):Object.prototype.toString.call(e.currentTarget)}catch(t){n.currentTarget="<unknown>"}"undefined"!=typeof CustomEvent&&b(t,CustomEvent)&&(n.detail=e.detail);for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n}return t}function F(t){return function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(t))}function B(t,e=3,n=102400){const r=H(t,e);return F(r)>n?B(t,e-1,n):r}function J(t,e){return"domain"===e&&t&&"object"==typeof t&&t.i?"[Domain]":"domainEmitter"===e?"[DomainEmitter]":"undefined"!=typeof global&&t===global?"[Global]":"undefined"!=typeof window&&t===window?"[Window]":"undefined"!=typeof document&&t===document?"[Document]":f(n=t)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n?"[SyntheticEvent]":"number"==typeof t&&t!=t?"[NaN]":void 0===t?"[undefined]":"function"==typeof t?`[Function: ${R(t)}]`:"symbol"==typeof t?`[${String(t)}]`:"bigint"==typeof t?`[BigInt: ${String(t)}]`:t;var n}function P(t,e,n=1/0,r=function(){const t="function"==typeof WeakSet,e=t?new WeakSet:[];return[function(n){if(t)return!!e.has(n)||(e.add(n),!1);for(let t=0;t<e.length;t++)if(e[t]===n)return!0;return e.push(n),!1},function(n){if(t)e.delete(n);else for(let t=0;t<e.length;t++)if(e[t]===n){e.splice(t,1);break}}]}()){if(0===n)return function(t){if("string"==typeof t)return t;const e=Object.prototype.toString.call(t);if("[object Object]"===e)return"[Object]";if("[object Array]"===e)return"[Array]";const n=J(t);return h(n)?n:e}(e);if(null!=e&&"function"==typeof e.toJSON)return e.toJSON();const i=J(e,t);if(h(i))return i;const s=U(e),o=Array.isArray(e)?[]:{};if(r[0](e))return"[Circular ~]";for(const t in s)Object.prototype.hasOwnProperty.call(s,t)&&(o[t]=P(t,s[t],n-1,r));return r[1](e),o}function H(t,e){try{return JSON.parse(JSON.stringify(t,((t,n)=>P(t,n,e))))}catch(t){return"**non-serializable**"}}function X(t,e=40){const n=Object.keys(U(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return N(n[0],e);for(let t=n.length;t>0;t--){const r=n.slice(0,t).join(", ");if(!(r.length>e))return t===n.length?r:N(r,e)}return""}function z(t){if(f(t)){const e=t,n={};for(const t of Object.keys(e))void 0!==e[t]&&(n[t]=z(e[t]));return n}return Array.isArray(t)?t.map(z):t}function W(){if(!("fetch"in r()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function K(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function G(){if(!W())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(t){return!1}}const V=r(),Q={},Y={};function Z(t){if(!Y[t])switch(Y[t]=!0,t){case"console":!function(){if(!("console"in V))return;["debug","info","warn","error","log","assert"].forEach((function(t){t in V.console&&q(V.console,t,(function(e){return function(...n){et("console",{args:n,level:t}),e&&e.apply(V.console,n)}}))}))}();break;case"dom":!function(){if(!("document"in V))return;const t=et.bind(null,"dom"),e=ct(t,!0);V.document.addEventListener("click",e,!1),V.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach((e=>{const n=V[e]&&V[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(q(n,"addEventListener",(function(e){return function(n,r,i){if("click"===n||"keypress"==n)try{const r=this,s=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},o=s[n]=s[n]||{refCount:0};if(!o.handler){const r=ct(t);o.handler=r,e.call(this,n,r,i)}o.refCount+=1}catch(t){}return e.call(this,n,r,i)}})),q(n,"removeEventListener",(function(t){return function(e,n,r){if("click"===e||"keypress"==e)try{const n=this,i=n.__sentry_instrumentation_handlers__||{},s=i[e];s&&(s.refCount-=1,s.refCount<=0&&(t.call(this,e,s.handler,r),s.handler=void 0,delete i[e]),0===Object.keys(i).length&&delete n.__sentry_instrumentation_handlers__)}catch(t){}return t.call(this,e,n,r)}})))}))}();break;case"xhr":!function(){if(!("XMLHttpRequest"in V))return;const t=XMLHttpRequest.prototype;q(t,"open",(function(t){return function(...e){const n=this,r=e[1],i=n.__sentry_xhr__={method:a(e[0])?e[0].toUpperCase():e[0],url:e[1]};a(r)&&"POST"===i.method&&r.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const s=function(){if(4===n.readyState){try{i.status_code=n.status}catch(t){}et("xhr",{args:e,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:n})}};return"onreadystatechange"in n&&"function"==typeof n.onreadystatechange?q(n,"onreadystatechange",(function(t){return function(...e){return s(),t.apply(n,e)}})):n.addEventListener("readystatechange",s),t.apply(n,e)}})),q(t,"send",(function(t){return function(...e){return this.__sentry_xhr__&&void 0!==e[0]&&(this.__sentry_xhr__.body=e[0]),et("xhr",{args:e,startTimestamp:Date.now(),xhr:this}),t.apply(this,e)}}))}();break;case"fetch":!function(){if(!function(){if(!W())return!1;const t=r();if(K(t.fetch))return!0;let e=!1;const n=t.document;if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t),t.contentWindow&&t.contentWindow.fetch&&(e=K(t.contentWindow.fetch)),n.head.removeChild(t)}catch(t){}return e}())return;q(V,"fetch",(function(t){return function(...e){const n={args:e,fetchData:{method:nt(e),url:rt(e)},startTimestamp:Date.now()};return et("fetch",Object.assign({},n)),t.apply(V,e).then((t=>(et("fetch",Object.assign(Object.assign({},n),{endTimestamp:Date.now(),response:t})),t)),(t=>{throw et("fetch",Object.assign(Object.assign({},n),{endTimestamp:Date.now(),error:t})),t}))}}))}();break;case"history":!function(){if(!function(){const t=r(),e=t.chrome,n=e&&e.app&&e.app.runtime,i="history"in t&&!!t.history.pushState&&!!t.history.replaceState;return!n&&i}())return;const t=V.onpopstate;function e(t){return function(...e){const n=e.length>2?e[2]:void 0;if(n){const t=it,e=String(n);it=e,et("history",{from:t,to:e})}return t.apply(this,e)}}V.onpopstate=function(...e){const n=V.location.href,r=it;if(it=n,et("history",{from:r,to:n}),t)try{return t.apply(this,e)}catch(t){}},q(V.history,"pushState",e),q(V.history,"replaceState",e)}();break;case"error":ut=V.onerror,V.onerror=function(t,e,n,r,i){return et("error",{column:r,error:i,line:n,msg:t,url:e}),!!ut&&ut.apply(this,arguments)};break;case"unhandledrejection":at=V.onunhandledrejection,V.onunhandledrejection=function(t){return et("unhandledrejection",t),!at||at.apply(this,arguments)};break;default:k.warn("unknown instrumentation type:",t)}}function tt(t,e){Q[t]=Q[t]||[],Q[t].push(e),Z(t)}function et(t,e){if(t&&Q[t])for(const n of Q[t]||[])try{n(e)}catch(t){0}}function nt(t=[]){return"Request"in V&&b(t[0],Request)&&t[0].method?String(t[0].method).toUpperCase():t[1]&&t[1].method?String(t[1].method).toUpperCase():"GET"}function rt(t=[]){return"string"==typeof t[0]?t[0]:"Request"in V&&b(t[0],Request)?t[0].url:String(t[0])}let it;let st,ot;function ct(t,e=!1){return n=>{if(!n||ot===n)return;if(function(t){if("keypress"!==t.type)return!1;try{const e=t.target;if(!e||!e.tagName)return!0;if("INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable)return!1}catch(t){}return!0}(n))return;const r="keypress"===n.type?"input":n.type;(void 0===st||function(t,e){if(!t)return!0;if(t.type!==e.type)return!0;try{if(t.target!==e.target)return!0}catch(t){}return!1}(ot,n))&&(t({event:n,name:r,global:e}),ot=n),clearTimeout(st),st=V.setTimeout((()=>{st=void 0}),1e3)}}let ut=null;let at=null;function ht(){const t=r(),e=t.crypto||t.msCrypto;if(void 0!==e&&e.getRandomValues){const t=new Uint16Array(8);e.getRandomValues(t),t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;const n=t=>{let e=t.toString(16);for(;e.length<4;)e=`0${e}`;return e};return n(t[0])+n(t[1])+n(t[2])+n(t[3])+n(t[4])+n(t[5])+n(t[6])+n(t[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(t=>{const e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}function ft(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],relative:e[5]+n+r}}function lt(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function dt(t){const{message:e,event_id:n}=t;if(e)return e;const r=lt(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function pt(t,e,n){const r=t.exception=t.exception||{},i=r.values=r.values||[],s=i[0]=i[0]||{};s.value||(s.value=e||""),s.type||(s.type=n||"Error")}function bt(t,e){const n=lt(t);if(!n)return;const r=n.mechanism;if(n.mechanism=Object.assign(Object.assign(Object.assign({},{type:"generic",handled:!0}),r),e),e&&"data"in e){const t=Object.assign(Object.assign({},r&&r.data),e.data);n.mechanism.data=t}}function yt(t){if(t&&t.__sentry_captured__)return!0;try{C(t,"__sentry_captured__",!0)}catch(t){}return!1}function vt(t){return new gt((e=>{e(t)}))}function mt(t){return new gt(((e,n)=>{n(t)}))}class gt{constructor(t){this.o=0,this.u=[],this.h=t=>{this.l(1,t)},this.p=t=>{this.l(2,t)},this.l=(t,e)=>{0===this.o&&(p(e)?e.then(this.h,this.p):(this.o=t,this.v=e,this.m()))},this.m=()=>{if(0===this.o)return;const t=this.u.slice();this.u=[],t.forEach((t=>{t[0]||(1===this.o&&t[1](this.v),2===this.o&&t[2](this.v),t[0]=!0)}))};try{t(this.h,this.p)}catch(t){this.p(t)}}then(t,e){return new gt(((n,r)=>{this.u.push([!1,e=>{if(t)try{n(t(e))}catch(t){r(t)}else n(e)},t=>{if(e)try{n(e(t))}catch(t){r(t)}else r(t)}]),this.m()}))}catch(t){return this.then((t=>t),t)}finally(t){return new gt(((e,n)=>{let r,i;return this.then((e=>{i=!1,r=e,t&&t()}),(e=>{i=!0,r=e,t&&t()})).then((()=>{i?n(r):e(r)}))}))}}function Ot(t){const e=[];function n(t){return e.splice(e.indexOf(t),1)[0]}return{$:e,add:function(r){if(!(void 0===t||e.length<t))return mt(new g("Not adding Promise due to buffer limit reached."));const i=r();return-1===e.indexOf(i)&&e.push(i),i.then((()=>n(i))).then(null,(()=>n(i).then(null,(()=>{})))),i},drain:function(t){return new gt(((n,r)=>{let i=e.length;if(!i)return n(!0);const s=setTimeout((()=>{t&&t>0&&n(!1)}),t);e.forEach((t=>{vt(t).then((()=>{--i||(clearTimeout(s),n(!0))}),r)}))}))}}}function jt(e){return"warn"===e?t.Severity.Warning:function(t){return-1!==x.indexOf(t)}(e)?e:t.Severity.Log}const wt={nowSeconds:()=>Date.now()/1e3};const Et=function(){const{performance:t}=r();if(!t||!t.now)return;return{now:()=>t.now(),timeOrigin:Date.now()-t.now()}}(),xt=void 0===Et?wt:{nowSeconds:()=>(Et.timeOrigin+Et.now())/1e3},_t=wt.nowSeconds.bind(wt),$t=xt.nowSeconds.bind(xt);(()=>{const{performance:t}=r();if(!t||!t.now)return;const e=36e5,n=t.now(),i=Date.now(),s=t.timeOrigin?Math.abs(t.timeOrigin+n-i):e,o=s<e,c=t.timing&&t.timing.navigationStart,u="number"==typeof c?Math.abs(c+n-i):e;(o||u<e)&&(s<=u&&t.timeOrigin)})();class St{constructor(){this.g=!1,this.O=[],this.j=[],this._=[],this.S={},this.k={},this.T={},this.D={},this.R={}}static clone(t){const e=new St;return t&&(e._=[...t._],e.k=Object.assign({},t.k),e.T=Object.assign({},t.T),e.D=Object.assign({},t.D),e.S=t.S,e.N=t.N,e.I=t.I,e.M=t.M,e.q=t.q,e.C=t.C,e.j=[...t.j],e.L=t.L),e}addScopeListener(t){this.O.push(t)}addEventProcessor(t){return this.j.push(t),this}setUser(t){return this.S=t||{},this.M&&this.M.update({user:t}),this.A(),this}getUser(){return this.S}getRequestSession(){return this.L}setRequestSession(t){return this.L=t,this}setTags(t){return this.k=Object.assign(Object.assign({},this.k),t),this.A(),this}setTag(t,e){return this.k=Object.assign(Object.assign({},this.k),{[t]:e}),this.A(),this}setExtras(t){return this.T=Object.assign(Object.assign({},this.T),t),this.A(),this}setExtra(t,e){return this.T=Object.assign(Object.assign({},this.T),{[t]:e}),this.A(),this}setFingerprint(t){return this.C=t,this.A(),this}setLevel(t){return this.N=t,this.A(),this}setTransactionName(t){return this.q=t,this.A(),this}setTransaction(t){return this.setTransactionName(t)}setContext(t,e){return null===e?delete this.D[t]:this.D=Object.assign(Object.assign({},this.D),{[t]:e}),this.A(),this}setSpan(t){return this.I=t,this.A(),this}getSpan(){return this.I}getTransaction(){const t=this.getSpan();return t&&t.transaction}setSession(t){return t?this.M=t:delete this.M,this.A(),this}getSession(){return this.M}update(t){if(!t)return this;if("function"==typeof t){const e=t(this);return e instanceof St?e:this}return t instanceof St?(this.k=Object.assign(Object.assign({},this.k),t.k),this.T=Object.assign(Object.assign({},this.T),t.T),this.D=Object.assign(Object.assign({},this.D),t.D),t.S&&Object.keys(t.S).length&&(this.S=t.S),t.N&&(this.N=t.N),t.C&&(this.C=t.C),t.L&&(this.L=t.L)):f(t)&&(t=t,this.k=Object.assign(Object.assign({},this.k),t.tags),this.T=Object.assign(Object.assign({},this.T),t.extra),this.D=Object.assign(Object.assign({},this.D),t.contexts),t.user&&(this.S=t.user),t.level&&(this.N=t.level),t.fingerprint&&(this.C=t.fingerprint),t.requestSession&&(this.L=t.requestSession)),this}clear(){return this._=[],this.k={},this.T={},this.S={},this.D={},this.N=void 0,this.q=void 0,this.C=void 0,this.L=void 0,this.I=void 0,this.M=void 0,this.A(),this}addBreadcrumb(t,e){const n="number"==typeof e?Math.min(e,100):100;if(n<=0)return this;const r=Object.assign({timestamp:_t()},t);return this._=[...this._,r].slice(-n),this.A(),this}clearBreadcrumbs(){return this._=[],this.A(),this}applyToEvent(t,e){if(this.T&&Object.keys(this.T).length&&(t.extra=Object.assign(Object.assign({},this.T),t.extra)),this.k&&Object.keys(this.k).length&&(t.tags=Object.assign(Object.assign({},this.k),t.tags)),this.S&&Object.keys(this.S).length&&(t.user=Object.assign(Object.assign({},this.S),t.user)),this.D&&Object.keys(this.D).length&&(t.contexts=Object.assign(Object.assign({},this.D),t.contexts)),this.N&&(t.level=this.N),this.q&&(t.transaction=this.q),this.I){t.contexts=Object.assign({trace:this.I.getTraceContext()},t.contexts);const e=this.I.transaction&&this.I.transaction.name;e&&(t.tags=Object.assign({transaction:e},t.tags))}return this.U(t),t.breadcrumbs=[...t.breadcrumbs||[],...this._],t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,t.sdkProcessingMetadata=this.R,this.F([...kt(),...this.j],t,e)}setSDKProcessingMetadata(t){return this.R=Object.assign(Object.assign({},this.R),t),this}F(t,e,n,r=0){return new gt(((i,s)=>{const o=t[r];if(null===e||"function"!=typeof o)i(e);else{const c=o(Object.assign({},e),n);p(c)?c.then((e=>this.F(t,e,n,r+1).then(i))).then(null,s):this.F(t,c,n,r+1).then(i).then(null,s)}}))}A(){this.g||(this.g=!0,this.O.forEach((t=>{t(this)})),this.g=!1)}U(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this.C&&(t.fingerprint=t.fingerprint.concat(this.C)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}}function kt(){const t=r();return t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.globalEventProcessors=t.__SENTRY__.globalEventProcessors||[],t.__SENTRY__.globalEventProcessors}function Tt(t){kt().push(t)}class Dt{constructor(t){this.errors=0,this.sid=ht(),this.duration=0,this.status="ok",this.init=!0,this.ignoreDuration=!1;const e=$t();this.timestamp=e,this.started=e,t&&this.update(t)}update(t={}){if(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||$t(),t.ignoreDuration&&(this.ignoreDuration=t.ignoreDuration),t.sid&&(this.sid=32===t.sid.length?t.sid:ht()),void 0!==t.init&&(this.init=t.init),!this.did&&t.did&&(this.did=`${t.did}`),"number"==typeof t.started&&(this.started=t.started),this.ignoreDuration)this.duration=void 0;else if("number"==typeof t.duration)this.duration=t.duration;else{const t=this.timestamp-this.started;this.duration=t>=0?t: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),"number"==typeof t.errors&&(this.errors=t.errors),t.status&&(this.status=t.status)}close(t){t?this.update({status:t}):"ok"===this.status?this.update({status:"exited"}):this.update()}toJSON(){return z({sid:`${this.sid}`,init:this.init,started:new Date(1e3*this.started).toISOString(),timestamp:new Date(1e3*this.timestamp).toISOString(),status:this.status,errors:this.errors,did:"number"==typeof this.did||"string"==typeof this.did?`${this.did}`:void 0,duration:this.duration,attrs:{release:this.release,environment:this.environment,ip_address:this.ipAddress,user_agent:this.userAgent}})}}const Rt=100;class Nt{constructor(t,e=new St,n=4){this.B=n,this.J=[{}],this.getStackTop().scope=e,t&&this.bindClient(t)}isOlderThan(t){return this.B<t}bindClient(t){this.getStackTop().client=t,t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=St.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(t){const e=this.pushScope();try{t(e)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this.J}getStackTop(){return this.J[this.J.length-1]}captureException(t,e){const n=this.P=e&&e.event_id?e.event_id:ht();let r=e;if(!e){let e;try{throw new Error("Sentry syntheticException")}catch(t){e=t}r={originalException:t,syntheticException:e}}return this.H("captureException",t,Object.assign(Object.assign({},r),{event_id:n})),n}captureMessage(t,e,n){const r=this.P=n&&n.event_id?n.event_id:ht();let i=n;if(!n){let e;try{throw new Error(t)}catch(t){e=t}i={originalException:t,syntheticException:e}}return this.H("captureMessage",t,e,Object.assign(Object.assign({},i),{event_id:r})),r}captureEvent(t,e){const n=e&&e.event_id?e.event_id:ht();return"transaction"!==t.type&&(this.P=n),this.H("captureEvent",t,Object.assign(Object.assign({},e),{event_id:n})),n}lastEventId(){return this.P}addBreadcrumb(t,e){const{scope:n,client:r}=this.getStackTop();if(!n||!r)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:s=Rt}=r.getOptions&&r.getOptions()||{};if(s<=0)return;const o=_t(),c=Object.assign({timestamp:o},t),u=i?S((()=>i(c,e))):c;null!==u&&n.addBreadcrumb(u,s)}setUser(t){const e=this.getScope();e&&e.setUser(t)}setTags(t){const e=this.getScope();e&&e.setTags(t)}setExtras(t){const e=this.getScope();e&&e.setExtras(t)}setTag(t,e){const n=this.getScope();n&&n.setTag(t,e)}setExtra(t,e){const n=this.getScope();n&&n.setExtra(t,e)}setContext(t,e){const n=this.getScope();n&&n.setContext(t,e)}configureScope(t){const{scope:e,client:n}=this.getStackTop();e&&n&&t(e)}run(t){const e=Mt(this);try{t(this)}finally{Mt(e)}}getIntegration(t){const e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(e){return k.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startSpan(t){return this.X("startSpan",t)}startTransaction(t,e){return this.X("startTransaction",t,e)}traceHeaders(){return this.X("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this.W()}endSession(){const t=this.getStackTop(),e=t&&t.scope,n=e&&e.getSession();n&&n.close(),this.W(),e&&e.setSession()}startSession(t){const{scope:e,client:n}=this.getStackTop(),{release:i,environment:s}=n&&n.getOptions()||{},o=r(),{userAgent:c}=o.navigator||{},u=new Dt(Object.assign(Object.assign(Object.assign({release:i,environment:s},e&&{user:e.getUser()}),c&&{userAgent:c}),t));if(e){const t=e.getSession&&e.getSession();t&&"ok"===t.status&&t.update({status:"exited"}),this.endSession(),e.setSession(u)}return u}W(){const{scope:t,client:e}=this.getStackTop();if(!t)return;const n=t.getSession&&t.getSession();n&&e&&e.captureSession&&e.captureSession(n)}H(t,...e){const{scope:n,client:r}=this.getStackTop();r&&r[t]&&r[t](...e,n)}X(t,...e){const n=It().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[t])return n.extensions[t].apply(this,e);k.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function It(){const t=r();return t.__SENTRY__=t.__SENTRY__||{extensions:{},hub:void 0},t}function Mt(t){const e=It(),n=Ct(e);return Lt(e,t),n}function qt(){const t=It();var e;return(e=t)&&e.__SENTRY__&&e.__SENTRY__.hub&&!Ct(t).isOlderThan(4)||Lt(t,new Nt),Ct(t)}function Ct(t){return t&&t.__SENTRY__&&t.__SENTRY__.hub||(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=new Nt),t.__SENTRY__.hub}function Lt(t,e){return!!t&&(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=e,!0)}function At(t,...e){const n=qt();if(n&&n[t])return n[t](...e);throw new Error(`No hub defined or ${t} was not found on the hub, please open a bug report.`)}function captureException(t,e){let n;try{throw new Error("Sentry syntheticException")}catch(t){n=t}return At("captureException",t,{captureContext:e,originalException:t,syntheticException:n})}function Ut(t){At("withScope",t)}function Ft(t){const e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function Bt(t,e){return`${Ft(t)}${t.projectId}/${e}/`}function Jt(t){return e={sentry_key:t.publicKey,sentry_version:"7"},Object.keys(e).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`)).join("&");var e}function Pt(t){return`${function(t){return Bt(t,"store")}(t)}?${Jt(t)}`}function Ht(t,e){return e||`${function(t){return Bt(t,"envelope")}(t)}?${Jt(t)}`}const Xt=[];function zt(t){return t.reduce(((t,e)=>(t.every((t=>e.name!==t.name))&&t.push(e),t)),[])}function Wt(t){const e={};return function(t){const e=t.defaultIntegrations&&[...t.defaultIntegrations]||[],n=t.integrations;let r=[...zt(e)];Array.isArray(n)?r=[...r.filter((t=>n.every((e=>e.name!==t.name)))),...zt(n)]:"function"==typeof n&&(r=n(r),r=Array.isArray(r)?r:[r]);const i=r.map((t=>t.name)),s="Debug";return-1!==i.indexOf(s)&&r.push(...r.splice(i.indexOf(s),1)),r}(t).forEach((t=>{e[t.name]=t,function(t){-1===Xt.indexOf(t.name)&&(t.setupOnce(Tt,qt),Xt.push(t.name),k.log(`Integration installed: ${t.name}`))}(t)})),C(e,"initialized",!0),e}const Kt="Not capturing exception because it's already been captured.";class Gt{sendEvent(t){return vt({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:"skipped"})}close(t){return vt(!0)}}function Vt(t){if(!t.metadata||!t.metadata.sdk)return;const{name:e,version:n}=t.metadata.sdk;return{name:e,version:n}}const Qt="6.18.0";let Yt;class Zt{constructor(){this.name=Zt.id}setupOnce(){Yt=Function.prototype.toString,Function.prototype.toString=function(...t){const e=A(this)||this;return Yt.apply(e,t)}}}Zt.id="FunctionToString";const te=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/];class ee{constructor(t={}){this.K=t,this.name=ee.id}setupOnce(){Tt((t=>{const e=qt();if(!e)return t;const n=e.getIntegration(ee);if(n){const r=e.getClient(),i=r?r.getOptions():{},s="function"==typeof n._mergeOptions?n._mergeOptions(i):{};return"function"!=typeof n.G?t:n.G(t,s)?null:t}return t}))}G(t,e){return!!this.V(t,e)||(!!this.Y(t,e)||(!!this.Z(t,e)||!this.tt(t,e)))}V(t,e){if(!e.ignoreInternal)return!1;try{return"SentryError"===t.exception.values[0].type}catch(t){}return!1}Y(t,e){return!(!e.ignoreErrors||!e.ignoreErrors.length)&&this.et(t).some((t=>e.ignoreErrors.some((e=>M(t,e)))))}Z(t,e){if(!e.denyUrls||!e.denyUrls.length)return!1;const n=this.nt(t);return!!n&&e.denyUrls.some((t=>M(n,t)))}tt(t,e){if(!e.allowUrls||!e.allowUrls.length)return!0;const n=this.nt(t);return!n||e.allowUrls.some((t=>M(n,t)))}_mergeOptions(t={}){return{allowUrls:[...this.K.whitelistUrls||[],...this.K.allowUrls||[],...t.whitelistUrls||[],...t.allowUrls||[]],denyUrls:[...this.K.blacklistUrls||[],...this.K.denyUrls||[],...t.blacklistUrls||[],...t.denyUrls||[]],ignoreErrors:[...this.K.ignoreErrors||[],...t.ignoreErrors||[],...te],ignoreInternal:void 0===this.K.ignoreInternal||this.K.ignoreInternal}}et(t){if(t.message)return[t.message];if(t.exception)try{const{type:e="",value:n=""}=t.exception.values&&t.exception.values[0]||{};return[`${n}`,`${e}: ${n}`]}catch(t){return[]}return[]}rt(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}nt(t){try{if(t.stacktrace)return this.rt(t.stacktrace.frames);let e;try{e=t.exception.values[0].stacktrace.frames}catch(t){}return e?this.rt(e):null}catch(t){return null}}}ee.id="InboundFilters";var ne=Object.freeze({__proto__:null,FunctionToString:Zt,InboundFilters:ee});const re="?";function ie(t,e,n,r){const i={filename:t,function:e,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}const se=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,oe=/\((\S*)(?::(\d+))(?::(\d+))\)/,ce=t=>{const e=se.exec(t);if(e){if(e[2]&&0===e[2].indexOf("eval")){const t=oe.exec(e[2]);t&&(e[2]=t[1],e[3]=t[2],e[4]=t[3])}const[t,n]=ve(e[1]||re,e[2]);return ie(n,t,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}},ue=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ae=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,he=t=>{const e=ue.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const t=ae.exec(e[3]);t&&(e[1]=e[1]||"eval",e[3]=t[1],e[4]=t[2],e[5]="")}let t=e[3],n=e[1]||re;return[n,t]=ve(n,t),ie(t,n,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},fe=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,le=t=>{const e=fe.exec(t);return e?ie(e[2],e[1]||re,+e[3],e[4]?+e[4]:void 0):void 0},de=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,pe=t=>{const e=de.exec(t);return e?ie(e[2],e[3]||re,+e[1]):void 0},be=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,ye=t=>{const e=be.exec(t);return e?ie(e[5],e[3]||e[4]||re,+e[1],+e[2]):void 0},ve=(t,e)=>{const n=-1!==t.indexOf("safari-extension"),r=-1!==t.indexOf("safari-web-extension");return n||r?[-1!==t.indexOf("@")?t.split("@")[0]:re,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};function me(t){const e=Oe(t),n={type:t&&t.name,value:we(t)};return e&&e.length&&(n.stacktrace={frames:e}),void 0===n.type&&""===n.value&&(n.value="Unrecoverable error caught"),n}function ge(t){return{exception:{values:[me(t)]}}}function Oe(t){const e=t.stacktrace||t.stack||"",n=function(t){if(t){if("number"==typeof t.framesToPop)return t.framesToPop;if(je.test(t.message))return 1}return 0}(t);try{return T(pe,ye,ce,le,he)(e,n)}catch(t){}return[]}const je=/Minified React error #\d+;/i;function we(t){const e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}function Ee(e,n,r){const i=_e(n,r&&r.syntheticException||void 0,{attachStacktrace:e.attachStacktrace});return bt(i),i.level=t.Severity.Error,r&&r.event_id&&(i.event_id=r.event_id),vt(i)}function xe(e,n,r=t.Severity.Info,i){const s=$e(n,i&&i.syntheticException||void 0,{attachStacktrace:e.attachStacktrace});return s.level=r,i&&i.event_id&&(s.event_id=i.event_id),vt(s)}function _e(t,e,n={}){let r;if(c(t)&&t.error){return ge(t.error)}if(u(t)||o(t,"DOMException")){const i=t;if("stack"in t)r=ge(t);else{const t=i.name||(u(i)?"DOMError":"DOMException"),s=i.message?`${t}: ${i.message}`:t;r=$e(s,e,n),pt(r,s)}return"code"in i&&(r.tags=Object.assign(Object.assign({},r.tags),{"DOMException.code":`${i.code}`})),r}if(s(t))return ge(t);if(f(t)||l(t)){return r=function(t,e,n){const r={exception:{values:[{type:l(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:`Non-Error ${n?"promise rejection":"exception"} captured with keys: ${X(t)}`}]},extra:{__serialized__:B(t)}};if(e){const t=Oe(e);t.length&&(r.stacktrace={frames:t})}return r}(t,e,n.isRejection),bt(r,{synthetic:!0}),r}return r=$e(t,e,n),pt(r,`${t}`,void 0),bt(r,{synthetic:!0}),r}function $e(t,e,n={}){const r={message:t};if(n.attachStacktrace&&e){const t=Oe(e);t.length&&(r.stacktrace={frames:t})}return r}const Se=r();let ke;function Te(){if(ke)return ke;if(K(Se.fetch))return ke=Se.fetch.bind(Se);const t=Se.document;let e=Se.fetch;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(e=r.fetch),t.head.removeChild(n)}catch(t){0}return ke=e.bind(Se)}function De(t,e){if("[object Navigator]"===Object.prototype.toString.call(Se&&Se.navigator)&&"function"==typeof Se.navigator.sendBeacon){return Se.navigator.sendBeacon.bind(Se.navigator)(t,e)}if(W()){const n=Te();n(t,{body:e,method:"POST",credentials:"omit",keepalive:!0}).then(null,(t=>{console.error(t)}))}else;}function Re(t){return"event"===t?"error":t}const Ne=r();class Ie{constructor(t){var e,n,r;this.options=t,this.it=Ot(30),this.st={},this.ot={},this.ct=(e=t.dsn,n=t.ut,r=t.tunnel,{initDsn:e,metadata:n||{},dsn:E(e),tunnel:r}),this.url=Pt(this.ct.dsn),this.options.sendClientReports&&Ne.document&&Ne.document.addEventListener("visibilitychange",(()=>{"hidden"===Ne.document.visibilityState&&this.at()}))}sendEvent(t){return this.ht(function(t,e){const n=Vt(e),r=t.type||"event",i="transaction"===r||!!e.tunnel,{transactionSampling:s}=t.sdkProcessingMetadata||{},{method:o,rate:c}=s||{};let u;!function(t,e){e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]])}(t,e.metadata.sdk),t.tags=t.tags||{},t.extra=t.extra||{},t.sdkProcessingMetadata&&t.sdkProcessingMetadata.baseClientNormalized||(t.tags.skippedNormalization=!0,t.extra.normalizeDepth=t.sdkProcessingMetadata?t.sdkProcessingMetadata.normalizeDepth:"unset"),delete t.sdkProcessingMetadata;try{u=JSON.stringify(t)}catch(e){t.tags.JSONStringifyError=!0,t.extra.JSONStringifyError=e;try{u=JSON.stringify(H(t))}catch(t){const e=t;u=JSON.stringify({message:"JSON.stringify error after renormalization",extra:{message:e.message,stack:e.stack}})}}const a={body:u,type:r,url:i?Ht(e.dsn,e.tunnel):Pt(e.dsn)};if(i){const i=`${JSON.stringify(Object.assign(Object.assign({event_id:t.event_id,sent_at:(new Date).toISOString()},n&&{sdk:n}),!!e.tunnel&&{dsn:j(e.dsn)}))}\n${JSON.stringify({type:r,sample_rates:[{id:o,rate:c}]})}\n${a.body}`;a.body=i}return a}(t,this.ct),t)}sendSession(t){return this.ht(function(t,e){const n=Vt(e),r="aggregates"in t?"sessions":"session";return{body:`${JSON.stringify(Object.assign(Object.assign({sent_at:(new Date).toISOString()},n&&{sdk:n}),!!e.tunnel&&{dsn:j(e.dsn)}))}\n${JSON.stringify({type:r})}\n${JSON.stringify(t)}`,type:r,url:Ht(e.dsn,e.tunnel)}}(t,this.ct),t)}close(t){return this.it.drain(t)}recordLostEvent(t,e){var n;if(!this.options.sendClientReports)return;const r=`${Re(e)}:${t}`;k.log(`Adding outcome: ${r}`),this.ot[r]=(null!=(n=this.ot[r])?n:0)+1}at(){if(!this.options.sendClientReports)return;const t=this.ot;if(this.ot={},!Object.keys(t).length)return void k.log("No outcomes to flush");k.log(`Flushing outcomes:\n${JSON.stringify(t,null,2)}`);const e=Ht(this.ct.dsn,this.ct.tunnel),n=`${JSON.stringify(Object.assign({},this.ct.tunnel&&{dsn:j(this.ct.dsn)}))}\n${JSON.stringify({type:"client_report"})}\n${JSON.stringify({timestamp:_t(),discarded_events:Object.keys(t).map((e=>{const[n,r]=e.split(":");return{reason:r,category:n,quantity:t[e]}}))})}`;try{De(e,n)}catch(t){k.error(t)}}ft({requestType:t,response:e,headers:n,resolve:r,reject:i}){const s=(o=e.status)>=200&&o<300?"success":429===o?"rate_limit":o>=400&&o<500?"invalid":o>=500?"failed":"unknown";var o;this.lt(n);"success"!==s?i(e):r({status:s})}dt(t){const e=Re(t);return this.st[e]||this.st.all}bt(t){return this.dt(t)>new Date(Date.now())}lt(t){const e=Date.now(),n=t["x-sentry-rate-limits"],r=t["retry-after"];if(n){for(const t of n.trim().split(",")){const n=t.split(":",2),r=parseInt(n[0],10),i=1e3*(isNaN(r)?60:r);for(const t of n[1].split(";"))this.st[t||"all"]=new Date(e+i)}return!0}return!!r&&(this.st.all=new Date(e+function(t,e){if(!e)return 6e4;const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(e,r)),!0)}}class Me extends Ie{constructor(t,e=Te()){super(t),this.yt=e}ht(t,e){if(this.bt(t.type))return this.recordLostEvent("ratelimit_backoff",t.type),Promise.reject({event:e,type:t.type,reason:`Transport for ${t.type} requests locked till ${this.dt(t.type)} due to too many requests.`,status:429});const n={body:t.body,method:"POST",referrerPolicy:G()?"origin":""};return void 0!==this.options.fetchParameters&&Object.assign(n,this.options.fetchParameters),void 0!==this.options.headers&&(n.headers=this.options.headers),this.it.add((()=>new gt(((e,r)=>{this.yt(t.url,n).then((n=>{const i={"x-sentry-rate-limits":n.headers.get("X-Sentry-Rate-Limits"),"retry-after":n.headers.get("Retry-After")};this.ft({requestType:t.type,response:n,headers:i,resolve:e,reject:r})})).catch(r)})))).then(void 0,(e=>{throw e instanceof g?this.recordLostEvent("queue_overflow",t.type):this.recordLostEvent("network_error",t.type),e}))}}class qe extends Ie{ht(t,e){return this.bt(t.type)?(this.recordLostEvent("ratelimit_backoff",t.type),Promise.reject({event:e,type:t.type,reason:`Transport for ${t.type} requests locked till ${this.dt(t.type)} due to too many requests.`,status:429})):this.it.add((()=>new gt(((e,n)=>{const r=new XMLHttpRequest;r.onreadystatechange=()=>{if(4===r.readyState){const i={"x-sentry-rate-limits":r.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":r.getResponseHeader("Retry-After")};this.ft({requestType:t.type,response:r,headers:i,resolve:e,reject:n})}},r.open("POST",t.url);for(const t in this.options.headers)Object.prototype.hasOwnProperty.call(this.options.headers,t)&&r.setRequestHeader(t,this.options.headers[t]);r.send(t.body)})))).then(void 0,(e=>{throw e instanceof g?this.recordLostEvent("queue_overflow",t.type):this.recordLostEvent("network_error",t.type),e}))}}var Ce=Object.freeze({__proto__:null,BaseTransport:Ie,FetchTransport:Me,XHRTransport:qe});class Le extends class{constructor(t){this.K=t,this.K.dsn||k.warn("No DSN provided, backend will not do anything."),this.vt=this.gt()}eventFromException(t,e){throw new g("Backend has to implement `eventFromException` method")}eventFromMessage(t,e,n){throw new g("Backend has to implement `eventFromMessage` method")}sendEvent(t){this.vt.sendEvent(t).then(null,(t=>{0}))}sendSession(t){this.vt.sendSession&&this.vt.sendSession(t).then(null,(t=>{0}))}getTransport(){return this.vt}gt(){return new Gt}}{eventFromException(t,e){return Ee(this.K,t,e)}eventFromMessage(e,n=t.Severity.Info,r){return xe(this.K,e,n,r)}gt(){if(!this.K.dsn)return super.gt();const t=Object.assign(Object.assign({},this.K.transportOptions),{dsn:this.K.dsn,tunnel:this.K.tunnel,sendClientReports:this.K.sendClientReports,ut:this.K.ut});return this.K.transport?new this.K.transport(t):W()?new Me(t):new qe(t)}}const Ae=r();let Ue=0;function Fe(){return Ue>0}function Be(){Ue+=1,setTimeout((()=>{Ue-=1}))}function Je(t,e={},n){if("function"!=typeof t)return t;try{const e=t.__sentry_wrapped__;if(e)return e;if(A(t))return t}catch(e){return t}const sentryWrapped=function(){const r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);const i=r.map((t=>Je(t,e)));return t.apply(this,i)}catch(t){throw Be(),Ut((n=>{n.addEventProcessor((t=>(e.mechanism&&(pt(t,void 0,void 0),bt(t,e.mechanism)),t.extra=Object.assign(Object.assign({},t.extra),{arguments:r}),t))),captureException(t)})),t}};try{for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(sentryWrapped[e]=t[e])}catch(t){}L(sentryWrapped,t),C(t,"__sentry_wrapped__",sentryWrapped);try{Object.getOwnPropertyDescriptor(sentryWrapped,"name").configurable&&Object.defineProperty(sentryWrapped,"name",{get:()=>t.name})}catch(t){}return sentryWrapped}function Pe(t={}){if(!Ae.document)return;if(!t.eventId)return void 0;if(!t.dsn)return void 0;const e=Ae.document.createElement("script");e.async=!0,e.src=function(t,e){const n=E(t),r=`${Ft(n)}embed/error-page/`;let i=`dsn=${j(n)}`;for(const t in e)if("dsn"!==t)if("user"===t){if(!e.user)continue;e.user.name&&(i+=`&name=${encodeURIComponent(e.user.name)}`),e.user.email&&(i+=`&email=${encodeURIComponent(e.user.email)}`)}else i+=`&${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`;return`${r}?${i}`}(t.dsn,t),t.onLoad&&(e.onload=t.onLoad);const n=Ae.document.head||Ae.document.body;n&&n.appendChild(e)}class He{constructor(t){this.name=He.id,this.Ot={onerror:Xe,onunhandledrejection:ze},this.K=Object.assign({onerror:!0,onunhandledrejection:!0},t)}setupOnce(){Error.stackTraceLimit=50;const t=this.K;for(const e in t){const n=this.Ot[e];n&&t[e]&&(Ke(e),n(),this.Ot[e]=void 0)}}}function Xe(){tt("error",(e=>{const[n,r]=Ve();if(!n.getIntegration(He))return;const{msg:i,url:s,line:o,column:u,error:h}=e;if(Fe()||h&&h.__sentry_own_request__)return;const f=void 0===h&&a(i)?function(t,e,n,r){const i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let s=c(t)?t.message:t,o="Error";const u=s.match(i);u&&(o=u[1],s=u[2]);return We({exception:{values:[{type:o,value:s}]}},e,n,r)}(i,s,o,u):We(_e(h||i,void 0,{attachStacktrace:r,isRejection:!1}),s,o,u);f.level=t.Severity.Error,Ge(n,h,f,"onerror")}))}function ze(){tt("unhandledrejection",(e=>{const[n,r]=Ve();if(!n.getIntegration(He))return;let i=e;try{"reason"in e?i=e.reason:"detail"in e&&"reason"in e.detail&&(i=e.detail.reason)}catch(t){}if(Fe()||i&&i.__sentry_own_request__)return!0;const s=h(i)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:_e(i,void 0,{attachStacktrace:r,isRejection:!0});s.level=t.Severity.Error,Ge(n,i,s,"onunhandledrejection")}))}function We(t,e,n,i){const s=t.exception=t.exception||{},o=s.values=s.values||[],c=o[0]=o[0]||{},u=c.stacktrace=c.stacktrace||{},h=u.frames=u.frames||[],f=isNaN(parseInt(i,10))?void 0:i,l=isNaN(parseInt(n,10))?void 0:n,d=a(e)&&e.length>0?e:function(){const t=r();try{return t.document.location.href}catch(t){return""}}();return 0===h.length&&h.push({colno:f,filename:d,function:"?",in_app:!0,lineno:l}),t}function Ke(t){0}function Ge(t,e,n,r){bt(n,{handled:!1,type:r}),t.captureEvent(n,{originalException:e})}function Ve(){const t=qt(),e=t.getClient();return[t,e&&e.getOptions().attachStacktrace]}He.id="GlobalHandlers";const Qe=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class Ye{constructor(t){this.name=Ye.id,this.K=Object.assign({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t)}setupOnce(){const t=r();this.K.setTimeout&&q(t,"setTimeout",Ze),this.K.setInterval&&q(t,"setInterval",Ze),this.K.requestAnimationFrame&&q(t,"requestAnimationFrame",tn),this.K.XMLHttpRequest&&"XMLHttpRequest"in t&&q(XMLHttpRequest.prototype,"send",en);const e=this.K.eventTarget;if(e){(Array.isArray(e)?e:Qe).forEach(nn)}}}function Ze(t){return function(...e){const n=e[0];return e[0]=Je(n,{mechanism:{data:{function:R(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}function tn(t){return function(e){return t.call(this,Je(e,{mechanism:{data:{function:"requestAnimationFrame",handler:R(t)},handled:!0,type:"instrument"}}))}}function en(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((t=>{t in n&&"function"==typeof n[t]&&q(n,t,(function(e){const n={mechanism:{data:{function:t,handler:R(e)},handled:!0,type:"instrument"}},r=A(e);return r&&(n.mechanism.data.handler=R(r)),Je(e,n)}))})),t.apply(this,e)}}function nn(t){const e=r(),n=e[t]&&e[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(q(n,"addEventListener",(function(e){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=Je(r.handleEvent.bind(r),{mechanism:{data:{function:"handleEvent",handler:R(r),target:t},handled:!0,type:"instrument"}}))}catch(t){}return e.call(this,n,Je(r,{mechanism:{data:{function:"addEventListener",handler:R(r),target:t},handled:!0,type:"instrument"}}),i)}})),q(n,"removeEventListener",(function(t){return function(e,n,r){const i=n;try{const n=i&&i.__sentry_wrapped__;n&&t.call(this,e,n,r)}catch(t){}return t.call(this,e,i,r)}})))}Ye.id="TryCatch";class rn{constructor(t){this.name=rn.id,this.K=Object.assign({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t)}addSentryBreadcrumb(t){this.K.sentry&&qt().addBreadcrumb({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:dt(t)},{event:t})}setupOnce(){this.K.console&&tt("console",sn),this.K.dom&&tt("dom",function(t){function e(e){let n,r="object"==typeof t?t.serializeAttribute:void 0;"string"==typeof r&&(r=[r]);try{n=e.event.target?y(e.event.target,r):y(e.event,r)}catch(t){n="<unknown>"}0!==n.length&&qt().addBreadcrumb({category:`ui.${e.name}`,message:n},{event:e.event,name:e.name,global:e.global})}return e}(this.K.dom)),this.K.xhr&&tt("xhr",on),this.K.fetch&&tt("fetch",cn),this.K.history&&tt("history",un)}}function sn(t){const e={category:"console",data:{arguments:t.args,logger:"console"},level:jt(t.level),message:I(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;e.message=`Assertion failed: ${I(t.args.slice(1)," ")||"console.assert"}`,e.data.arguments=t.args.slice(1)}qt().addBreadcrumb(e,{input:t.args,level:t.level})}function on(t){if(t.endTimestamp){if(t.xhr.__sentry_own_request__)return;const{method:e,url:n,status_code:r,body:i}=t.xhr.__sentry_xhr__||{};qt().addBreadcrumb({category:"xhr",data:{method:e,url:n,status_code:r},type:"http"},{xhr:t.xhr,input:i})}else;}function cn(e){e.endTimestamp&&(e.fetchData.url.match(/sentry_key/)&&"POST"===e.fetchData.method||(e.error?qt().addBreadcrumb({category:"fetch",data:e.fetchData,level:t.Severity.Error,type:"http"},{data:e.error,input:e.args}):qt().addBreadcrumb({category:"fetch",data:Object.assign(Object.assign({},e.fetchData),{status_code:e.response.status}),type:"http"},{input:e.args,response:e.response})))}function un(t){const e=r();let n=t.from,i=t.to;const s=ft(e.location.href);let o=ft(n);const c=ft(i);o.path||(o=s),s.protocol===c.protocol&&s.host===c.host&&(i=c.relative),s.protocol===o.protocol&&s.host===o.host&&(n=o.relative),qt().addBreadcrumb({category:"navigation",data:{from:n,to:i}})}rn.id="Breadcrumbs";class an{constructor(t={}){this.name=an.id,this.jt=t.key||"cause",this.wt=t.limit||5}setupOnce(){Tt(((t,e)=>{const n=qt().getIntegration(an);return n?function(t,e,n,r){if(!(n.exception&&n.exception.values&&r&&b(r.originalException,Error)))return n;const i=hn(e,r.originalException,t);return n.exception.values=[...i,...n.exception.values],n}(n.jt,n.wt,t,e):t}))}}function hn(t,e,n,r=[]){if(!b(e[n],Error)||r.length+1>=t)return r;const i=me(e[n]);return hn(t,e[n],n,[i,...r])}an.id="LinkedErrors";const fn=r();class ln{constructor(){this.name=ln.id}setupOnce(){Tt((t=>{if(qt().getIntegration(ln)){if(!fn.navigator&&!fn.location&&!fn.document)return t;const e=t.request&&t.request.url||fn.location&&fn.location.href,{referrer:n}=fn.document||{},{userAgent:r}=fn.navigator||{},i=Object.assign(Object.assign(Object.assign({},t.request&&t.request.headers),n&&{Referer:n}),r&&{"User-Agent":r}),s=Object.assign(Object.assign({},e&&{url:e}),{headers:i});return Object.assign(Object.assign({},t),{request:s})}return t}))}}ln.id="UserAgent";class dn{constructor(){this.name=dn.id}setupOnce(t,e){t((t=>{const n=e().getIntegration(dn);if(n){try{if(function(t,e){if(!e)return!1;if(function(t,e){const n=t.message,r=e.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!bn(t,e))return!1;if(!pn(t,e))return!1;return!0}(t,e))return!0;if(function(t,e){const n=yn(e),r=yn(t);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!bn(t,e))return!1;if(!pn(t,e))return!1;return!0}(t,e))return!0;return!1}(t,n.Et))return k.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(e){return n.Et=t}return n.Et=t}return t}))}}function pn(t,e){let n=vn(t),r=vn(e);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(n=n,r=r,r.length!==n.length)return!1;for(let t=0;t<r.length;t++){const e=r[t],i=n[t];if(e.filename!==i.filename||e.lineno!==i.lineno||e.colno!==i.colno||e.function!==i.function)return!1}return!0}function bn(t,e){let n=t.fingerprint,r=e.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return!(n.join("")!==r.join(""))}catch(t){return!1}}function yn(t){return t.exception&&t.exception.values&&t.exception.values[0]}function vn(t){const e=t.exception;if(e)try{return e.values[0].stacktrace.frames}catch(t){return}else if(t.stacktrace)return t.stacktrace.frames}dn.id="Dedupe";var mn=Object.freeze({__proto__:null,GlobalHandlers:He,TryCatch:Ye,Breadcrumbs:rn,LinkedErrors:an,UserAgent:ln,Dedupe:dn});class gn extends class{constructor(t,e){this.xt={},this._t=0,this.$t=new t(e),this.K=e,e.dsn&&(this.St=E(e.dsn))}captureException(t,e,n){if(yt(t))return void k.log(Kt);let r=e&&e.event_id;return this.kt(this.Tt().eventFromException(t,e).then((t=>this.Dt(t,e,n))).then((t=>{r=t}))),r}captureMessage(t,e,n,r){let i=n&&n.event_id;const s=h(t)?this.Tt().eventFromMessage(String(t),e,n):this.Tt().eventFromException(t,n);return this.kt(s.then((t=>this.Dt(t,n,r))).then((t=>{i=t}))),i}captureEvent(t,e,n){if(e&&e.originalException&&yt(e.originalException))return void k.log(Kt);let r=e&&e.event_id;return this.kt(this.Dt(t,e,n).then((t=>{r=t}))),r}captureSession(t){this.Rt()&&("string"!=typeof t.release||(this.Nt(t),t.update({init:!1})))}getDsn(){return this.St}getOptions(){return this.K}getTransport(){return this.Tt().getTransport()}flush(t){return this.It(t).then((e=>this.getTransport().close(t).then((t=>e&&t))))}close(t){return this.flush(t).then((t=>(this.getOptions().enabled=!1,t)))}setupIntegrations(){this.Rt()&&!this.xt.initialized&&(this.xt=Wt(this.K))}getIntegration(t){try{return this.xt[t.id]||null}catch(e){return k.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}Mt(t,e){let n=!1,r=!1;const i=e.exception&&e.exception.values;if(i){r=!0;for(const t of i){const e=t.mechanism;if(e&&!1===e.handled){n=!0;break}}}const s="ok"===t.status;(s&&0===t.errors||s&&n)&&(t.update(Object.assign(Object.assign({},n&&{status:"crashed"}),{errors:t.errors||Number(r||n)})),this.captureSession(t))}Nt(t){this.Tt().sendSession(t)}It(t){return new gt((e=>{let n=0;const r=setInterval((()=>{0==this._t?(clearInterval(r),e(!0)):(n+=1,t&&n>=t&&(clearInterval(r),e(!1)))}),1)}))}Tt(){return this.$t}Rt(){return!1!==this.getOptions().enabled&&void 0!==this.St}qt(t,e,n){const{normalizeDepth:r=3}=this.getOptions(),i=Object.assign(Object.assign({},t),{event_id:t.event_id||(n&&n.event_id?n.event_id:ht()),timestamp:t.timestamp||_t()});this.Ct(i),this.Lt(i);let s=e;n&&n.captureContext&&(s=St.clone(s).update(n.captureContext));let o=vt(i);return s&&(o=s.applyToEvent(i,n)),o.then((t=>(t&&(t.sdkProcessingMetadata=Object.assign(Object.assign({},t.sdkProcessingMetadata),{normalizeDepth:H(r)})),"number"==typeof r&&r>0?this.At(t,r):t)))}At(t,e){if(!t)return null;const n=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map((t=>Object.assign(Object.assign({},t),t.data&&{data:H(t.data,e)})))}),t.user&&{user:H(t.user,e)}),t.contexts&&{contexts:H(t.contexts,e)}),t.extra&&{extra:H(t.extra,e)});return t.contexts&&t.contexts.trace&&(n.contexts.trace=t.contexts.trace),t.sdkProcessingMetadata=Object.assign(Object.assign({},t.sdkProcessingMetadata),{baseClientNormalized:!0}),n}Ct(t){const e=this.getOptions(),{environment:n,release:r,dist:i,maxValueLength:s=250}=e;"environment"in t||(t.environment="environment"in e?n:"production"),void 0===t.release&&void 0!==r&&(t.release=r),void 0===t.dist&&void 0!==i&&(t.dist=i),t.message&&(t.message=N(t.message,s));const o=t.exception&&t.exception.values&&t.exception.values[0];o&&o.value&&(o.value=N(o.value,s));const c=t.request;c&&c.url&&(c.url=N(c.url,s))}Lt(t){const e=Object.keys(this.xt);e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}Ut(t){this.Tt().sendEvent(t)}Dt(t,e,n){return this.Ft(t,e,n).then((t=>t.event_id),(t=>{k.error(t)}))}Ft(t,e,n){const{beforeSend:r,sampleRate:i}=this.getOptions(),s=this.getTransport();function o(t,e){s.recordLostEvent&&s.recordLostEvent(t,e)}if(!this.Rt())return mt(new g("SDK not enabled, will not capture event."));const c="transaction"===t.type;return!c&&"number"==typeof i&&Math.random()>i?(o("sample_rate","event"),mt(new g(`Discarding event because it's not included in the random sample (sampling rate = ${i})`))):this.qt(t,n,e).then((n=>{if(null===n)throw o("event_processor",t.type||"event"),new g("An event processor returned null, will not send event.");if(e&&e.data&&!0===e.data.__sentry__||c||!r)return n;return function(t){const e="`beforeSend` method has to return `null` or a valid event.";if(p(t))return t.then((t=>{if(!f(t)&&null!==t)throw new g(e);return t}),(t=>{throw new g(`beforeSend rejected with ${t}`)}));if(!f(t)&&null!==t)throw new g(e);return t}(r(n,e))})).then((e=>{if(null===e)throw o("before_send",t.type||"event"),new g("`beforeSend` returned `null`, will not send event.");const r=n&&n.getSession&&n.getSession();return!c&&r&&this.Mt(r,e),this.Ut(e),e})).then(null,(t=>{if(t instanceof g)throw t;throw this.captureException(t,{data:{__sentry__:!0},originalException:t}),new g(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)}))}kt(t){this._t+=1,t.then((t=>(this._t-=1,t)),(t=>(this._t-=1,t)))}}{constructor(t={}){t.ut=t.ut||{},t.ut.sdk=t.ut.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:Qt}],version:Qt},super(Le,t)}showReportDialog(t={}){r().document&&(this.Rt()?Pe(Object.assign(Object.assign({},t),{dsn:t.dsn||this.getDsn()})):k.error("Trying to call showReportDialog with Sentry Client disabled"))}qt(t,e,n){return t.platform=t.platform||"javascript",super.qt(t,e,n)}Ut(t){const e=this.getIntegration(rn);e&&e.addSentryBreadcrumb(t),super.Ut(t)}}const On=[new ee,new Zt,new Ye,new rn,new He,new an,new dn,new ln];function jn(t){t.startSession({ignoreDuration:!0}),t.captureSession()}let wn={};const En=r();En.Sentry&&En.Sentry.Integrations&&(wn=En.Sentry.Integrations);const xn=Object.assign(Object.assign(Object.assign({},wn),ne),mn);return t.BrowserClient=gn,t.Hub=Nt,t.Integrations=xn,t.SDK_NAME="sentry.javascript.browser",t.SDK_VERSION=Qt,t.Scope=St,t.Session=Dt,t.Transports=Ce,t.addBreadcrumb=function(t){At("addBreadcrumb",t)},t.addGlobalEventProcessor=Tt,t.captureEvent=function(t){return At("captureEvent",t)},t.captureException=captureException,t.captureMessage=function(t,e){let n;try{throw new Error(t)}catch(t){n=t}const r="string"!=typeof e?{captureContext:e}:void 0;return At("captureMessage",t,"string"==typeof e?e:void 0,Object.assign({originalException:t,syntheticException:n},r))},t.close=function(t){const e=qt().getClient();return e?e.close(t):vt(!1)},t.configureScope=function(t){At("configureScope",t)},t.defaultIntegrations=On,t.eventFromException=Ee,t.eventFromMessage=xe,t.flush=function(t){const e=qt().getClient();return e?e.flush(t):vt(!1)},t.forceLoad=function(){},t.getCurrentHub=qt,t.getHubFromCarrier=Ct,t.init=function(t={}){if(void 0===t.defaultIntegrations&&(t.defaultIntegrations=On),void 0===t.release){const e=r();e.SENTRY_RELEASE&&e.SENTRY_RELEASE.id&&(t.release=e.SENTRY_RELEASE.id)}void 0===t.autoSessionTracking&&(t.autoSessionTracking=!0),void 0===t.sendClientReports&&(t.sendClientReports=!0),function(t,e){!0===e.debug&&k.enable();const n=qt(),r=n.getScope();r&&r.update(e.initialScope);const i=new t(e);n.bindClient(i)}(gn,t),t.autoSessionTracking&&function(){const t=r();if(void 0===t.document)return void 0;const e=qt();if(!e.captureSession)return;jn(e),tt("history",(({from:t,to:e})=>{void 0!==t&&t!==e&&jn(qt())}))}()},t.injectReportDialog=Pe,t.lastEventId=function(){return qt().lastEventId()},t.makeMain=Mt,t.onLoad=function(t){t()},t.setContext=function(t,e){At("setContext",t,e)},t.setExtra=function(t,e){At("setExtra",t,e)},t.setExtras=function(t){At("setExtras",t)},t.setTag=function(t,e){At("setTag",t,e)},t.setTags=function(t){At("setTags",t)},t.setUser=function(t){At("setUser",t)},t.showReportDialog=function(t={}){const e=qt(),n=e.getScope();n&&(t.user=Object.assign(Object.assign({},n.getUser()),t.user)),t.eventId||(t.eventId=e.lastEventId());const r=e.getClient();r&&r.showReportDialog(t)},t.startTransaction=function(t,e){return At("startTransaction",Object.assign({},t),e)},t.withScope=Ut,t.wrap=function(t){return Je(t)()},t}({});
|
|
1
|
+
/*! @sentry/browser 6.18.2 (22f518e) | https://github.com/getsentry/sentry-javascript */
|
|
2
|
+
var Sentry=function(t){var e;t.Severity=void 0,(e=t.Severity||(t.Severity={})).Fatal="fatal",e.Error="error",e.Warning="warning",e.Log="log",e.Info="info",e.Debug="debug",e.Critical="critical";const n={};function r(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:n}const i=Object.prototype.toString;function s(t){switch(i.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return b(t,Error)}}function o(t,e){return i.call(t)===`[object ${e}]`}function c(t){return o(t,"ErrorEvent")}function u(t){return o(t,"DOMError")}function a(t){return o(t,"String")}function h(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function f(t){return o(t,"Object")}function l(t){return"undefined"!=typeof Event&&b(t,Event)}function d(t){return"undefined"!=typeof Element&&b(t,Element)}function p(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function b(t,e){try{return t instanceof e}catch(t){return!1}}function y(t,e){try{let n=t;const r=5,i=80,s=[];let o=0,c=0;const u=" > ",a=u.length;let h;for(;n&&o++<r&&(h=v(n,e),!("html"===h||o>1&&c+s.length*a+h.length>=i));)s.push(h),c+=h.length,n=n.parentNode;return s.reverse().join(u)}catch(t){return"<unknown>"}}function v(t,e){const n=t,r=[];let i,s,o,c,u;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());const h=e&&e.length?e.filter((t=>n.getAttribute(t))).map((t=>[t,n.getAttribute(t)])):null;if(h&&h.length)h.forEach((t=>{r.push(`[${t[0]}="${t[1]}"]`)}));else if(n.id&&r.push(`#${n.id}`),i=n.className,i&&a(i))for(s=i.split(/\s+/),u=0;u<s.length;u++)r.push(`.${s[u]}`);const f=["type","name","title","alt"];for(u=0;u<f.length;u++)o=f[u],c=n.getAttribute(o),c&&r.push(`[${o}="${c}"]`);return r.join("")}const m=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){return t.__proto__=e,t}:function(t,e){for(const n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n]);return t});class g extends Error{constructor(t){super(t),this.message=t,this.name=new.target.prototype.constructor.name,m(this,new.target.prototype)}}const O=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;function j(t,e=!1){const{host:n,path:r,pass:i,port:s,projectId:o,protocol:c,publicKey:u}=t;return`${c}://${u}${e&&i?`:${i}`:""}@${n}${s?`:${s}`:""}/${r?`${r}/`:r}${o}`}function w(t){return"user"in t&&!("publicKey"in t)&&(t.publicKey=t.user),{user:t.publicKey||"",protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function E(t){const e="string"==typeof t?function(t){const e=O.exec(t);if(!e)throw new g(`Invalid Sentry Dsn: ${t}`);const[n,r,i="",s,o="",c]=e.slice(1);let u="",a=c;const h=a.split("/");if(h.length>1&&(u=h.slice(0,-1).join("/"),a=h.pop()),a){const t=a.match(/^\d+/);t&&(a=t[0])}return w({host:s,pass:i,path:u,projectId:a,port:o,protocol:n,publicKey:r})}(t):w(t);return e}const x=["fatal","error","warning","log","info","debug","critical"],_=r(),$="Sentry Logger ";function S(t){const e=r();if(!("console"in e))return t();const n=e.console,i={};["debug","info","warn","error","log","assert"].forEach((t=>{t in e.console&&n[t].__sentry_original__&&(i[t]=n[t],n[t]=n[t].__sentry_original__)}));const s=t();return Object.keys(i).forEach((t=>{n[t]=i[t]})),s}_.__SENTRY__=_.__SENTRY__||{};const k=_.__SENTRY__.logger||(_.__SENTRY__.logger=new class{constructor(){this.t=!1}disable(){this.t=!1}enable(){this.t=!0}log(...t){this.t&&S((()=>{_.console.log(`${$}[Log]:`,...t)}))}warn(...t){this.t&&S((()=>{_.console.warn(`${$}[Warn]:`,...t)}))}error(...t){this.t&&S((()=>{_.console.error(`${$}[Error]:`,...t)}))}});function T(...t){const e=t.sort(((t,e)=>t[0]-e[0])).map((t=>t[1]));return(t,n=0)=>{const r=[];for(const i of t.split("\n").slice(n))for(const t of e){const e=t(i);if(e){r.push(e);break}}return function(t){if(!t.length)return[];let e=t;const n=e[0].function||"",r=e[e.length-1].function||"";-1===n.indexOf("captureMessage")&&-1===n.indexOf("captureException")||(e=e.slice(1));-1!==r.indexOf("sentryWrapped")&&(e=e.slice(0,-1));return e.slice(0,50).map((t=>Object.assign(Object.assign({},t),{filename:t.filename||e[0].filename,function:t.function||"?"}))).reverse()}(r)}}const D="<anonymous>";function R(t){try{return t&&"function"==typeof t&&t.name||D}catch(t){return D}}function N(t,e=0){return"string"!=typeof t||0===e||t.length<=e?t:`${t.substr(0,e)}...`}function I(t,e){if(!Array.isArray(t))return"";const n=[];for(let e=0;e<t.length;e++){const r=t[e];try{n.push(String(r))}catch(t){n.push("[value cannot be serialized]")}}return n.join(e)}function M(t,e){return!!a(t)&&(o(e,"RegExp")?e.test(t):"string"==typeof e&&-1!==t.indexOf(e))}function q(t,e,n){if(!(e in t))return;const r=t[e],i=n(r);if("function"==typeof i)try{L(i,r)}catch(t){}t[e]=i}function C(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}function L(t,e){const n=e.prototype||{};t.prototype=e.prototype=n,C(t,"__sentry_original__",e)}function A(t){return t.__sentry_original__}function U(t){if(s(t)){const e=t,n={message:e.message,name:e.name,stack:e.stack};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n}if(l(t)){const e=t,n={};n.type=e.type;try{n.target=d(e.target)?y(e.target):Object.prototype.toString.call(e.target)}catch(t){n.target="<unknown>"}try{n.currentTarget=d(e.currentTarget)?y(e.currentTarget):Object.prototype.toString.call(e.currentTarget)}catch(t){n.currentTarget="<unknown>"}"undefined"!=typeof CustomEvent&&b(t,CustomEvent)&&(n.detail=e.detail);for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n}return t}function F(t){return function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(t))}function B(t,e=3,n=102400){const r=X(t,e);return F(r)>n?B(t,e-1,n):r}function P(t,e){return"domain"===e&&t&&"object"==typeof t&&t.i?"[Domain]":"domainEmitter"===e?"[DomainEmitter]":"undefined"!=typeof global&&t===global?"[Global]":"undefined"!=typeof window&&t===window?"[Window]":"undefined"!=typeof document&&t===document?"[Document]":f(n=t)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n?"[SyntheticEvent]":"number"==typeof t&&t!=t?"[NaN]":void 0===t?"[undefined]":"function"==typeof t?`[Function: ${R(t)}]`:"symbol"==typeof t?`[${String(t)}]`:"bigint"==typeof t?`[BigInt: ${String(t)}]`:t;var n}function H(t,e,n=1/0,r=function(){const t="function"==typeof WeakSet,e=t?new WeakSet:[];return[function(n){if(t)return!!e.has(n)||(e.add(n),!1);for(let t=0;t<e.length;t++)if(e[t]===n)return!0;return e.push(n),!1},function(n){if(t)e.delete(n);else for(let t=0;t<e.length;t++)if(e[t]===n){e.splice(t,1);break}}]}()){const[i,s]=r;if(0===n)return function(t){if("string"==typeof t)return t;const e=Object.prototype.toString.call(t);if("[object Object]"===e)return"[Object]";if("[object Array]"===e)return"[Array]";const n=P(t);return h(n)?n:e}(e);if(null!=e&&"function"==typeof e.toJSON)return e.toJSON();const o=P(e,t);if(h(o))return o;const c=U(e),u=Array.isArray(e)?[]:{};if(i(e))return"[Circular ~]";for(const t in c){if(!Object.prototype.hasOwnProperty.call(c,t))continue;const e=c[t];u[t]=H(t,e,n-1,r)}return s(e),u}function X(t,e){try{return H("",t,e)}catch(t){return"**non-serializable**"}}function z(t,e=40){const n=Object.keys(U(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return N(n[0],e);for(let t=n.length;t>0;t--){const r=n.slice(0,t).join(", ");if(!(r.length>e))return t===n.length?r:N(r,e)}return""}function J(t){if(f(t)){const e=t,n={};for(const t of Object.keys(e))void 0!==e[t]&&(n[t]=J(e[t]));return n}return Array.isArray(t)?t.map(J):t}function W(){if(!("fetch"in r()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function K(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function G(){if(!W())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(t){return!1}}const V=r(),Q={},Y={};function Z(t){if(!Y[t])switch(Y[t]=!0,t){case"console":!function(){if(!("console"in V))return;["debug","info","warn","error","log","assert"].forEach((function(t){t in V.console&&q(V.console,t,(function(e){return function(...n){et("console",{args:n,level:t}),e&&e.apply(V.console,n)}}))}))}();break;case"dom":!function(){if(!("document"in V))return;const t=et.bind(null,"dom"),e=ct(t,!0);V.document.addEventListener("click",e,!1),V.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach((e=>{const n=V[e]&&V[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(q(n,"addEventListener",(function(e){return function(n,r,i){if("click"===n||"keypress"==n)try{const r=this,s=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},o=s[n]=s[n]||{refCount:0};if(!o.handler){const r=ct(t);o.handler=r,e.call(this,n,r,i)}o.refCount+=1}catch(t){}return e.call(this,n,r,i)}})),q(n,"removeEventListener",(function(t){return function(e,n,r){if("click"===e||"keypress"==e)try{const n=this,i=n.__sentry_instrumentation_handlers__||{},s=i[e];s&&(s.refCount-=1,s.refCount<=0&&(t.call(this,e,s.handler,r),s.handler=void 0,delete i[e]),0===Object.keys(i).length&&delete n.__sentry_instrumentation_handlers__)}catch(t){}return t.call(this,e,n,r)}})))}))}();break;case"xhr":!function(){if(!("XMLHttpRequest"in V))return;const t=XMLHttpRequest.prototype;q(t,"open",(function(t){return function(...e){const n=this,r=e[1],i=n.__sentry_xhr__={method:a(e[0])?e[0].toUpperCase():e[0],url:e[1]};a(r)&&"POST"===i.method&&r.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const s=function(){if(4===n.readyState){try{i.status_code=n.status}catch(t){}et("xhr",{args:e,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:n})}};return"onreadystatechange"in n&&"function"==typeof n.onreadystatechange?q(n,"onreadystatechange",(function(t){return function(...e){return s(),t.apply(n,e)}})):n.addEventListener("readystatechange",s),t.apply(n,e)}})),q(t,"send",(function(t){return function(...e){return this.__sentry_xhr__&&void 0!==e[0]&&(this.__sentry_xhr__.body=e[0]),et("xhr",{args:e,startTimestamp:Date.now(),xhr:this}),t.apply(this,e)}}))}();break;case"fetch":!function(){if(!function(){if(!W())return!1;const t=r();if(K(t.fetch))return!0;let e=!1;const n=t.document;if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t),t.contentWindow&&t.contentWindow.fetch&&(e=K(t.contentWindow.fetch)),n.head.removeChild(t)}catch(t){}return e}())return;q(V,"fetch",(function(t){return function(...e){const n={args:e,fetchData:{method:nt(e),url:rt(e)},startTimestamp:Date.now()};return et("fetch",Object.assign({},n)),t.apply(V,e).then((t=>(et("fetch",Object.assign(Object.assign({},n),{endTimestamp:Date.now(),response:t})),t)),(t=>{throw et("fetch",Object.assign(Object.assign({},n),{endTimestamp:Date.now(),error:t})),t}))}}))}();break;case"history":!function(){if(!function(){const t=r(),e=t.chrome,n=e&&e.app&&e.app.runtime,i="history"in t&&!!t.history.pushState&&!!t.history.replaceState;return!n&&i}())return;const t=V.onpopstate;function e(t){return function(...e){const n=e.length>2?e[2]:void 0;if(n){const t=it,e=String(n);it=e,et("history",{from:t,to:e})}return t.apply(this,e)}}V.onpopstate=function(...e){const n=V.location.href,r=it;if(it=n,et("history",{from:r,to:n}),t)try{return t.apply(this,e)}catch(t){}},q(V.history,"pushState",e),q(V.history,"replaceState",e)}();break;case"error":ut=V.onerror,V.onerror=function(t,e,n,r,i){return et("error",{column:r,error:i,line:n,msg:t,url:e}),!!ut&&ut.apply(this,arguments)};break;case"unhandledrejection":at=V.onunhandledrejection,V.onunhandledrejection=function(t){return et("unhandledrejection",t),!at||at.apply(this,arguments)};break;default:k.warn("unknown instrumentation type:",t)}}function tt(t,e){Q[t]=Q[t]||[],Q[t].push(e),Z(t)}function et(t,e){if(t&&Q[t])for(const n of Q[t]||[])try{n(e)}catch(t){0}}function nt(t=[]){return"Request"in V&&b(t[0],Request)&&t[0].method?String(t[0].method).toUpperCase():t[1]&&t[1].method?String(t[1].method).toUpperCase():"GET"}function rt(t=[]){return"string"==typeof t[0]?t[0]:"Request"in V&&b(t[0],Request)?t[0].url:String(t[0])}let it;let st,ot;function ct(t,e=!1){return n=>{if(!n||ot===n)return;if(function(t){if("keypress"!==t.type)return!1;try{const e=t.target;if(!e||!e.tagName)return!0;if("INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable)return!1}catch(t){}return!0}(n))return;const r="keypress"===n.type?"input":n.type;(void 0===st||function(t,e){if(!t)return!0;if(t.type!==e.type)return!0;try{if(t.target!==e.target)return!0}catch(t){}return!1}(ot,n))&&(t({event:n,name:r,global:e}),ot=n),clearTimeout(st),st=V.setTimeout((()=>{st=void 0}),1e3)}}let ut=null;let at=null;function ht(){const t=r(),e=t.crypto||t.msCrypto;if(void 0!==e&&e.getRandomValues){const t=new Uint16Array(8);e.getRandomValues(t),t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;const n=t=>{let e=t.toString(16);for(;e.length<4;)e=`0${e}`;return e};return n(t[0])+n(t[1])+n(t[2])+n(t[3])+n(t[4])+n(t[5])+n(t[6])+n(t[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(t=>{const e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}function ft(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],relative:e[5]+n+r}}function lt(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function dt(t){const{message:e,event_id:n}=t;if(e)return e;const r=lt(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function pt(t,e,n){const r=t.exception=t.exception||{},i=r.values=r.values||[],s=i[0]=i[0]||{};s.value||(s.value=e||""),s.type||(s.type=n||"Error")}function bt(t,e){const n=lt(t);if(!n)return;const r=n.mechanism;if(n.mechanism=Object.assign(Object.assign(Object.assign({},{type:"generic",handled:!0}),r),e),e&&"data"in e){const t=Object.assign(Object.assign({},r&&r.data),e.data);n.mechanism.data=t}}function yt(t){if(t&&t.__sentry_captured__)return!0;try{C(t,"__sentry_captured__",!0)}catch(t){}return!1}function vt(t){return new gt((e=>{e(t)}))}function mt(t){return new gt(((e,n)=>{n(t)}))}class gt{constructor(t){this.o=0,this.u=[],this.h=t=>{this.l(1,t)},this.p=t=>{this.l(2,t)},this.l=(t,e)=>{0===this.o&&(p(e)?e.then(this.h,this.p):(this.o=t,this.v=e,this.m()))},this.m=()=>{if(0===this.o)return;const t=this.u.slice();this.u=[],t.forEach((t=>{t[0]||(1===this.o&&t[1](this.v),2===this.o&&t[2](this.v),t[0]=!0)}))};try{t(this.h,this.p)}catch(t){this.p(t)}}then(t,e){return new gt(((n,r)=>{this.u.push([!1,e=>{if(t)try{n(t(e))}catch(t){r(t)}else n(e)},t=>{if(e)try{n(e(t))}catch(t){r(t)}else r(t)}]),this.m()}))}catch(t){return this.then((t=>t),t)}finally(t){return new gt(((e,n)=>{let r,i;return this.then((e=>{i=!1,r=e,t&&t()}),(e=>{i=!0,r=e,t&&t()})).then((()=>{i?n(r):e(r)}))}))}}function Ot(t){const e=[];function n(t){return e.splice(e.indexOf(t),1)[0]}return{$:e,add:function(r){if(!(void 0===t||e.length<t))return mt(new g("Not adding Promise due to buffer limit reached."));const i=r();return-1===e.indexOf(i)&&e.push(i),i.then((()=>n(i))).then(null,(()=>n(i).then(null,(()=>{})))),i},drain:function(t){return new gt(((n,r)=>{let i=e.length;if(!i)return n(!0);const s=setTimeout((()=>{t&&t>0&&n(!1)}),t);e.forEach((t=>{vt(t).then((()=>{--i||(clearTimeout(s),n(!0))}),r)}))}))}}}function jt(e){return"warn"===e?t.Severity.Warning:function(t){return-1!==x.indexOf(t)}(e)?e:t.Severity.Log}const wt={nowSeconds:()=>Date.now()/1e3};const Et=function(){const{performance:t}=r();if(!t||!t.now)return;return{now:()=>t.now(),timeOrigin:Date.now()-t.now()}}(),xt=void 0===Et?wt:{nowSeconds:()=>(Et.timeOrigin+Et.now())/1e3},_t=wt.nowSeconds.bind(wt),$t=xt.nowSeconds.bind(xt);function St(t,e=[]){return[t,e]}function kt(t){const[e,n]=t,r=JSON.stringify(e);return n.reduce(((t,e)=>{const[n,r]=e,i=h(r)?String(r):JSON.stringify(r);return`${t}\n${JSON.stringify(n)}\n${i}`}),r)}(()=>{const{performance:t}=r();if(!t||!t.now)return;const e=36e5,n=t.now(),i=Date.now(),s=t.timeOrigin?Math.abs(t.timeOrigin+n-i):e,o=s<e,c=t.timing&&t.timing.navigationStart,u="number"==typeof c?Math.abs(c+n-i):e;(o||u<e)&&(s<=u&&t.timeOrigin)})();class Tt{constructor(){this.g=!1,this.O=[],this.j=[],this._=[],this.S={},this.k={},this.T={},this.D={},this.R={}}static clone(t){const e=new Tt;return t&&(e._=[...t._],e.k=Object.assign({},t.k),e.T=Object.assign({},t.T),e.D=Object.assign({},t.D),e.S=t.S,e.N=t.N,e.I=t.I,e.M=t.M,e.q=t.q,e.C=t.C,e.j=[...t.j],e.L=t.L),e}addScopeListener(t){this.O.push(t)}addEventProcessor(t){return this.j.push(t),this}setUser(t){return this.S=t||{},this.M&&this.M.update({user:t}),this.A(),this}getUser(){return this.S}getRequestSession(){return this.L}setRequestSession(t){return this.L=t,this}setTags(t){return this.k=Object.assign(Object.assign({},this.k),t),this.A(),this}setTag(t,e){return this.k=Object.assign(Object.assign({},this.k),{[t]:e}),this.A(),this}setExtras(t){return this.T=Object.assign(Object.assign({},this.T),t),this.A(),this}setExtra(t,e){return this.T=Object.assign(Object.assign({},this.T),{[t]:e}),this.A(),this}setFingerprint(t){return this.C=t,this.A(),this}setLevel(t){return this.N=t,this.A(),this}setTransactionName(t){return this.q=t,this.A(),this}setTransaction(t){return this.setTransactionName(t)}setContext(t,e){return null===e?delete this.D[t]:this.D=Object.assign(Object.assign({},this.D),{[t]:e}),this.A(),this}setSpan(t){return this.I=t,this.A(),this}getSpan(){return this.I}getTransaction(){const t=this.getSpan();return t&&t.transaction}setSession(t){return t?this.M=t:delete this.M,this.A(),this}getSession(){return this.M}update(t){if(!t)return this;if("function"==typeof t){const e=t(this);return e instanceof Tt?e:this}return t instanceof Tt?(this.k=Object.assign(Object.assign({},this.k),t.k),this.T=Object.assign(Object.assign({},this.T),t.T),this.D=Object.assign(Object.assign({},this.D),t.D),t.S&&Object.keys(t.S).length&&(this.S=t.S),t.N&&(this.N=t.N),t.C&&(this.C=t.C),t.L&&(this.L=t.L)):f(t)&&(t=t,this.k=Object.assign(Object.assign({},this.k),t.tags),this.T=Object.assign(Object.assign({},this.T),t.extra),this.D=Object.assign(Object.assign({},this.D),t.contexts),t.user&&(this.S=t.user),t.level&&(this.N=t.level),t.fingerprint&&(this.C=t.fingerprint),t.requestSession&&(this.L=t.requestSession)),this}clear(){return this._=[],this.k={},this.T={},this.S={},this.D={},this.N=void 0,this.q=void 0,this.C=void 0,this.L=void 0,this.I=void 0,this.M=void 0,this.A(),this}addBreadcrumb(t,e){const n="number"==typeof e?Math.min(e,100):100;if(n<=0)return this;const r=Object.assign({timestamp:_t()},t);return this._=[...this._,r].slice(-n),this.A(),this}clearBreadcrumbs(){return this._=[],this.A(),this}applyToEvent(t,e){if(this.T&&Object.keys(this.T).length&&(t.extra=Object.assign(Object.assign({},this.T),t.extra)),this.k&&Object.keys(this.k).length&&(t.tags=Object.assign(Object.assign({},this.k),t.tags)),this.S&&Object.keys(this.S).length&&(t.user=Object.assign(Object.assign({},this.S),t.user)),this.D&&Object.keys(this.D).length&&(t.contexts=Object.assign(Object.assign({},this.D),t.contexts)),this.N&&(t.level=this.N),this.q&&(t.transaction=this.q),this.I){t.contexts=Object.assign({trace:this.I.getTraceContext()},t.contexts);const e=this.I.transaction&&this.I.transaction.name;e&&(t.tags=Object.assign({transaction:e},t.tags))}return this.U(t),t.breadcrumbs=[...t.breadcrumbs||[],...this._],t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,t.sdkProcessingMetadata=this.R,this.F([...Dt(),...this.j],t,e)}setSDKProcessingMetadata(t){return this.R=Object.assign(Object.assign({},this.R),t),this}F(t,e,n,r=0){return new gt(((i,s)=>{const o=t[r];if(null===e||"function"!=typeof o)i(e);else{const c=o(Object.assign({},e),n);p(c)?c.then((e=>this.F(t,e,n,r+1).then(i))).then(null,s):this.F(t,c,n,r+1).then(i).then(null,s)}}))}A(){this.g||(this.g=!0,this.O.forEach((t=>{t(this)})),this.g=!1)}U(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this.C&&(t.fingerprint=t.fingerprint.concat(this.C)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}}function Dt(){const t=r();return t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.globalEventProcessors=t.__SENTRY__.globalEventProcessors||[],t.__SENTRY__.globalEventProcessors}function Rt(t){Dt().push(t)}class Nt{constructor(t){this.errors=0,this.sid=ht(),this.duration=0,this.status="ok",this.init=!0,this.ignoreDuration=!1;const e=$t();this.timestamp=e,this.started=e,t&&this.update(t)}update(t={}){if(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||$t(),t.ignoreDuration&&(this.ignoreDuration=t.ignoreDuration),t.sid&&(this.sid=32===t.sid.length?t.sid:ht()),void 0!==t.init&&(this.init=t.init),!this.did&&t.did&&(this.did=`${t.did}`),"number"==typeof t.started&&(this.started=t.started),this.ignoreDuration)this.duration=void 0;else if("number"==typeof t.duration)this.duration=t.duration;else{const t=this.timestamp-this.started;this.duration=t>=0?t: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),"number"==typeof t.errors&&(this.errors=t.errors),t.status&&(this.status=t.status)}close(t){t?this.update({status:t}):"ok"===this.status?this.update({status:"exited"}):this.update()}toJSON(){return J({sid:`${this.sid}`,init:this.init,started:new Date(1e3*this.started).toISOString(),timestamp:new Date(1e3*this.timestamp).toISOString(),status:this.status,errors:this.errors,did:"number"==typeof this.did||"string"==typeof this.did?`${this.did}`:void 0,duration:this.duration,attrs:{release:this.release,environment:this.environment,ip_address:this.ipAddress,user_agent:this.userAgent}})}}const It=100;class Mt{constructor(t,e=new Tt,n=4){this.B=n,this.P=[{}],this.getStackTop().scope=e,t&&this.bindClient(t)}isOlderThan(t){return this.B<t}bindClient(t){this.getStackTop().client=t,t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=Tt.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(t){const e=this.pushScope();try{t(e)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this.P}getStackTop(){return this.P[this.P.length-1]}captureException(t,e){const n=this.H=e&&e.event_id?e.event_id:ht();let r=e;if(!e){let e;try{throw new Error("Sentry syntheticException")}catch(t){e=t}r={originalException:t,syntheticException:e}}return this.X("captureException",t,Object.assign(Object.assign({},r),{event_id:n})),n}captureMessage(t,e,n){const r=this.H=n&&n.event_id?n.event_id:ht();let i=n;if(!n){let e;try{throw new Error(t)}catch(t){e=t}i={originalException:t,syntheticException:e}}return this.X("captureMessage",t,e,Object.assign(Object.assign({},i),{event_id:r})),r}captureEvent(t,e){const n=e&&e.event_id?e.event_id:ht();return"transaction"!==t.type&&(this.H=n),this.X("captureEvent",t,Object.assign(Object.assign({},e),{event_id:n})),n}lastEventId(){return this.H}addBreadcrumb(t,e){const{scope:n,client:r}=this.getStackTop();if(!n||!r)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:s=It}=r.getOptions&&r.getOptions()||{};if(s<=0)return;const o=_t(),c=Object.assign({timestamp:o},t),u=i?S((()=>i(c,e))):c;null!==u&&n.addBreadcrumb(u,s)}setUser(t){const e=this.getScope();e&&e.setUser(t)}setTags(t){const e=this.getScope();e&&e.setTags(t)}setExtras(t){const e=this.getScope();e&&e.setExtras(t)}setTag(t,e){const n=this.getScope();n&&n.setTag(t,e)}setExtra(t,e){const n=this.getScope();n&&n.setExtra(t,e)}setContext(t,e){const n=this.getScope();n&&n.setContext(t,e)}configureScope(t){const{scope:e,client:n}=this.getStackTop();e&&n&&t(e)}run(t){const e=Ct(this);try{t(this)}finally{Ct(e)}}getIntegration(t){const e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(e){return k.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startSpan(t){return this.J("startSpan",t)}startTransaction(t,e){return this.J("startTransaction",t,e)}traceHeaders(){return this.J("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this.W()}endSession(){const t=this.getStackTop(),e=t&&t.scope,n=e&&e.getSession();n&&n.close(),this.W(),e&&e.setSession()}startSession(t){const{scope:e,client:n}=this.getStackTop(),{release:i,environment:s}=n&&n.getOptions()||{},o=r(),{userAgent:c}=o.navigator||{},u=new Nt(Object.assign(Object.assign(Object.assign({release:i,environment:s},e&&{user:e.getUser()}),c&&{userAgent:c}),t));if(e){const t=e.getSession&&e.getSession();t&&"ok"===t.status&&t.update({status:"exited"}),this.endSession(),e.setSession(u)}return u}W(){const{scope:t,client:e}=this.getStackTop();if(!t)return;const n=t.getSession&&t.getSession();n&&e&&e.captureSession&&e.captureSession(n)}X(t,...e){const{scope:n,client:r}=this.getStackTop();r&&r[t]&&r[t](...e,n)}J(t,...e){const n=qt().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[t])return n.extensions[t].apply(this,e);k.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function qt(){const t=r();return t.__SENTRY__=t.__SENTRY__||{extensions:{},hub:void 0},t}function Ct(t){const e=qt(),n=At(e);return Ut(e,t),n}function Lt(){const t=qt();var e;return(e=t)&&e.__SENTRY__&&e.__SENTRY__.hub&&!At(t).isOlderThan(4)||Ut(t,new Mt),At(t)}function At(t){return t&&t.__SENTRY__&&t.__SENTRY__.hub||(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=new Mt),t.__SENTRY__.hub}function Ut(t,e){return!!t&&(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=e,!0)}function Ft(t,...e){const n=Lt();if(n&&n[t])return n[t](...e);throw new Error(`No hub defined or ${t} was not found on the hub, please open a bug report.`)}function captureException(t,e){let n;try{throw new Error("Sentry syntheticException")}catch(t){n=t}return Ft("captureException",t,{captureContext:e,originalException:t,syntheticException:n})}function Bt(t){Ft("withScope",t)}function Pt(t){const e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function Ht(t,e){return`${Pt(t)}${t.projectId}/${e}/`}function Xt(t){return e={sentry_key:t.publicKey,sentry_version:"7"},Object.keys(e).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`)).join("&");var e}function zt(t){return`${function(t){return Ht(t,"store")}(t)}?${Xt(t)}`}function Jt(t,e){return e||`${function(t){return Ht(t,"envelope")}(t)}?${Xt(t)}`}const Wt=[];function Kt(t){return t.reduce(((t,e)=>(t.every((t=>e.name!==t.name))&&t.push(e),t)),[])}function Gt(t){const e={};return function(t){const e=t.defaultIntegrations&&[...t.defaultIntegrations]||[],n=t.integrations;let r=[...Kt(e)];Array.isArray(n)?r=[...r.filter((t=>n.every((e=>e.name!==t.name)))),...Kt(n)]:"function"==typeof n&&(r=n(r),r=Array.isArray(r)?r:[r]);const i=r.map((t=>t.name)),s="Debug";return-1!==i.indexOf(s)&&r.push(...r.splice(i.indexOf(s),1)),r}(t).forEach((t=>{e[t.name]=t,function(t){-1===Wt.indexOf(t.name)&&(t.setupOnce(Rt,Lt),Wt.push(t.name),k.log(`Integration installed: ${t.name}`))}(t)})),C(e,"initialized",!0),e}const Vt="Not capturing exception because it's already been captured.";class Qt{sendEvent(t){return vt({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:"skipped"})}close(t){return vt(!0)}}function Yt(t){if(!t.metadata||!t.metadata.sdk)return;const{name:e,version:n}=t.metadata.sdk;return{name:e,version:n}}const Zt="6.18.2";let te;class ee{constructor(){this.name=ee.id}setupOnce(){te=Function.prototype.toString,Function.prototype.toString=function(...t){const e=A(this)||this;return te.apply(e,t)}}}ee.id="FunctionToString";const ne=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/];class re{constructor(t={}){this.K=t,this.name=re.id}setupOnce(){Rt((t=>{const e=Lt();if(!e)return t;const n=e.getIntegration(re);if(n){const r=e.getClient(),i=r?r.getOptions():{},s="function"==typeof n.G?n.G(i):{};return"function"!=typeof n.V?t:n.V(t,s)?null:t}return t}))}V(t,e){return!!this.Y(t,e)||(!!this.Z(t,e)||(!!this.tt(t,e)||!this.et(t,e)))}Y(t,e){if(!e.ignoreInternal)return!1;try{return"SentryError"===t.exception.values[0].type}catch(t){}return!1}Z(t,e){return!(!e.ignoreErrors||!e.ignoreErrors.length)&&this.nt(t).some((t=>e.ignoreErrors.some((e=>M(t,e)))))}tt(t,e){if(!e.denyUrls||!e.denyUrls.length)return!1;const n=this.rt(t);return!!n&&e.denyUrls.some((t=>M(n,t)))}et(t,e){if(!e.allowUrls||!e.allowUrls.length)return!0;const n=this.rt(t);return!n||e.allowUrls.some((t=>M(n,t)))}G(t={}){return{allowUrls:[...this.K.whitelistUrls||[],...this.K.allowUrls||[],...t.whitelistUrls||[],...t.allowUrls||[]],denyUrls:[...this.K.blacklistUrls||[],...this.K.denyUrls||[],...t.blacklistUrls||[],...t.denyUrls||[]],ignoreErrors:[...this.K.ignoreErrors||[],...t.ignoreErrors||[],...ne],ignoreInternal:void 0===this.K.ignoreInternal||this.K.ignoreInternal}}nt(t){if(t.message)return[t.message];if(t.exception)try{const{type:e="",value:n=""}=t.exception.values&&t.exception.values[0]||{};return[`${n}`,`${e}: ${n}`]}catch(t){return[]}return[]}it(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}rt(t){try{if(t.stacktrace)return this.it(t.stacktrace.frames);let e;try{e=t.exception.values[0].stacktrace.frames}catch(t){}return e?this.it(e):null}catch(t){return null}}}re.id="InboundFilters";var ie=Object.freeze({__proto__:null,FunctionToString:ee,InboundFilters:re});const se="?";function oe(t,e,n,r){const i={filename:t,function:e,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}const ce=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ue=/\((\S*)(?::(\d+))(?::(\d+))\)/,ae=[30,t=>{const e=ce.exec(t);if(e){if(e[2]&&0===e[2].indexOf("eval")){const t=ue.exec(e[2]);t&&(e[2]=t[1],e[3]=t[2],e[4]=t[3])}const[t,n]=ge(e[1]||se,e[2]);return oe(n,t,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}}],he=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,fe=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,le=[50,t=>{const e=he.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const t=fe.exec(e[3]);t&&(e[1]=e[1]||"eval",e[3]=t[1],e[4]=t[2],e[5]="")}let t=e[3],n=e[1]||se;return[n,t]=ge(n,t),oe(t,n,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}],de=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,pe=[40,t=>{const e=de.exec(t);return e?oe(e[2],e[1]||se,+e[3],e[4]?+e[4]:void 0):void 0}],be=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,ye=[10,t=>{const e=be.exec(t);return e?oe(e[2],e[3]||se,+e[1]):void 0}],ve=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,me=[20,t=>{const e=ve.exec(t);return e?oe(e[5],e[3]||e[4]||se,+e[1],+e[2]):void 0}],ge=(t,e)=>{const n=-1!==t.indexOf("safari-extension"),r=-1!==t.indexOf("safari-web-extension");return n||r?[-1!==t.indexOf("@")?t.split("@")[0]:se,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};function Oe(t){const e=we(t),n={type:t&&t.name,value:xe(t)};return e.length&&(n.stacktrace={frames:e}),void 0===n.type&&""===n.value&&(n.value="Unrecoverable error caught"),n}function je(t){return{exception:{values:[Oe(t)]}}}function we(t){const e=t.stacktrace||t.stack||"",n=function(t){if(t){if("number"==typeof t.framesToPop)return t.framesToPop;if(Ee.test(t.message))return 1}return 0}(t);try{return T(ye,me,ae,pe,le)(e,n)}catch(t){}return[]}const Ee=/Minified React error #\d+;/i;function xe(t){const e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}function _e(e,n,r){const i=Se(e,n&&n.syntheticException||void 0,r);return bt(i),i.level=t.Severity.Error,n&&n.event_id&&(i.event_id=n.event_id),vt(i)}function $e(e,n=t.Severity.Info,r,i){const s=ke(e,r&&r.syntheticException||void 0,i);return s.level=n,r&&r.event_id&&(s.event_id=r.event_id),vt(s)}function Se(t,e,n,r){let i;if(c(t)&&t.error){return je(t.error)}if(u(t)||o(t,"DOMException")){const r=t;if("stack"in t)i=je(t);else{const t=r.name||(u(r)?"DOMError":"DOMException"),s=r.message?`${t}: ${r.message}`:t;i=ke(s,e,n),pt(i,s)}return"code"in r&&(i.tags=Object.assign(Object.assign({},i.tags),{"DOMException.code":`${r.code}`})),i}if(s(t))return je(t);if(f(t)||l(t)){return i=function(t,e,n){const r={exception:{values:[{type:l(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:`Non-Error ${n?"promise rejection":"exception"} captured with keys: ${z(t)}`}]},extra:{__serialized__:B(t)}};if(e){const t=we(e);t.length&&(r.stacktrace={frames:t})}return r}(t,e,r),bt(i,{synthetic:!0}),i}return i=ke(t,e,n),pt(i,`${t}`,void 0),bt(i,{synthetic:!0}),i}function ke(t,e,n){const r={message:t};if(n&&e){const t=we(e);t.length&&(r.stacktrace={frames:t})}return r}const Te=r();let De;function Re(){if(De)return De;if(K(Te.fetch))return De=Te.fetch.bind(Te);const t=Te.document;let e=Te.fetch;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(e=r.fetch),t.head.removeChild(n)}catch(t){0}return De=e.bind(Te)}function Ne(t,e){if("[object Navigator]"===Object.prototype.toString.call(Te&&Te.navigator)&&"function"==typeof Te.navigator.sendBeacon){return Te.navigator.sendBeacon.bind(Te.navigator)(t,e)}if(W()){const n=Re();n(t,{body:e,method:"POST",credentials:"omit",keepalive:!0}).then(null,(t=>{console.error(t)}))}else;}function Ie(t){return"event"===t?"error":t}const Me=r();class qe{constructor(t){var e,n,r;this.options=t,this.st=Ot(30),this.ot={},this.ct={},this.ut=(e=t.dsn,n=t.at,r=t.tunnel,{initDsn:e,metadata:n||{},dsn:E(e),tunnel:r}),this.url=zt(this.ut.dsn),this.options.sendClientReports&&Me.document&&Me.document.addEventListener("visibilitychange",(()=>{"hidden"===Me.document.visibilityState&&this.ht()}))}sendEvent(t){return this.ft(function(t,e){const n=Yt(e),r=t.type||"event",i="transaction"===r||!!e.tunnel,{transactionSampling:s}=t.sdkProcessingMetadata||{},{method:o,rate:c}=s||{};let u;!function(t,e){e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]])}(t,e.metadata.sdk),t.tags=t.tags||{},t.extra=t.extra||{},t.sdkProcessingMetadata&&t.sdkProcessingMetadata.baseClientNormalized||(t.tags.skippedNormalization=!0,t.extra.normalizeDepth=t.sdkProcessingMetadata?t.sdkProcessingMetadata.normalizeDepth:"unset"),delete t.sdkProcessingMetadata;try{u=JSON.stringify(t)}catch(e){t.tags.JSONStringifyError=!0,t.extra.JSONStringifyError=e;try{u=JSON.stringify(X(t))}catch(t){const e=t;u=JSON.stringify({message:"JSON.stringify error after renormalization",extra:{message:e.message,stack:e.stack}})}}const a={body:u,type:r,url:i?Jt(e.dsn,e.tunnel):zt(e.dsn)};if(i){const i=St(Object.assign(Object.assign({event_id:t.event_id,sent_at:(new Date).toISOString()},n&&{sdk:n}),!!e.tunnel&&{dsn:j(e.dsn)}),[[{type:r,sample_rates:[{id:o,rate:c}]},a.body]]);a.body=kt(i)}return a}(t,this.ut),t)}sendSession(t){return this.ft(function(t,e){const n=Yt(e),r="aggregates"in t?"sessions":"session";return{body:kt(St(Object.assign(Object.assign({sent_at:(new Date).toISOString()},n&&{sdk:n}),!!e.tunnel&&{dsn:j(e.dsn)}),[[{type:r},t]])),type:r,url:Jt(e.dsn,e.tunnel)}}(t,this.ut),t)}close(t){return this.st.drain(t)}recordLostEvent(t,e){var n;if(!this.options.sendClientReports)return;const r=`${Ie(e)}:${t}`;k.log(`Adding outcome: ${r}`),this.ct[r]=(null!=(n=this.ct[r])?n:0)+1}ht(){if(!this.options.sendClientReports)return;const t=this.ct;if(this.ct={},!Object.keys(t).length)return void k.log("No outcomes to flush");k.log(`Flushing outcomes:\n${JSON.stringify(t,null,2)}`);const e=Jt(this.ut.dsn,this.ut.tunnel),n=Object.keys(t).map((e=>{const[n,r]=e.split(":");return{reason:r,category:n,quantity:t[e]}})),r=(i=n,St((s=this.ut.tunnel&&j(this.ut.dsn))?{dsn:s}:{},[[{type:"client_report"},{timestamp:o||_t(),discarded_events:i}]]));var i,s,o;try{Ne(e,kt(r))}catch(t){k.error(t)}}lt({requestType:t,response:e,headers:n,resolve:r,reject:i}){const s=(o=e.status)>=200&&o<300?"success":429===o?"rate_limit":o>=400&&o<500?"invalid":o>=500?"failed":"unknown";var o;this.dt(n);"success"!==s?i(e):r({status:s})}bt(t){const e=Ie(t);return this.ot[e]||this.ot.all}yt(t){return this.bt(t)>new Date(Date.now())}dt(t){const e=Date.now(),n=t["x-sentry-rate-limits"],r=t["retry-after"];if(n){for(const t of n.trim().split(",")){const n=t.split(":",2),r=parseInt(n[0],10),i=1e3*(isNaN(r)?60:r);for(const t of n[1].split(";"))this.ot[t||"all"]=new Date(e+i)}return!0}return!!r&&(this.ot.all=new Date(e+function(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${t}`);return isNaN(r)?6e4:r-e}(r,e)),!0)}}class Ce extends qe{constructor(t,e=Re()){super(t),this.vt=e}ft(t,e){if(this.yt(t.type))return this.recordLostEvent("ratelimit_backoff",t.type),Promise.reject({event:e,type:t.type,reason:`Transport for ${t.type} requests locked till ${this.bt(t.type)} due to too many requests.`,status:429});const n={body:t.body,method:"POST",referrerPolicy:G()?"origin":""};return void 0!==this.options.fetchParameters&&Object.assign(n,this.options.fetchParameters),void 0!==this.options.headers&&(n.headers=this.options.headers),this.st.add((()=>new gt(((e,r)=>{this.vt(t.url,n).then((n=>{const i={"x-sentry-rate-limits":n.headers.get("X-Sentry-Rate-Limits"),"retry-after":n.headers.get("Retry-After")};this.lt({requestType:t.type,response:n,headers:i,resolve:e,reject:r})})).catch(r)})))).then(void 0,(e=>{throw e instanceof g?this.recordLostEvent("queue_overflow",t.type):this.recordLostEvent("network_error",t.type),e}))}}class Le extends qe{ft(t,e){return this.yt(t.type)?(this.recordLostEvent("ratelimit_backoff",t.type),Promise.reject({event:e,type:t.type,reason:`Transport for ${t.type} requests locked till ${this.bt(t.type)} due to too many requests.`,status:429})):this.st.add((()=>new gt(((e,n)=>{const r=new XMLHttpRequest;r.onreadystatechange=()=>{if(4===r.readyState){const i={"x-sentry-rate-limits":r.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":r.getResponseHeader("Retry-After")};this.lt({requestType:t.type,response:r,headers:i,resolve:e,reject:n})}},r.open("POST",t.url);for(const t in this.options.headers)Object.prototype.hasOwnProperty.call(this.options.headers,t)&&r.setRequestHeader(t,this.options.headers[t]);r.send(t.body)})))).then(void 0,(e=>{throw e instanceof g?this.recordLostEvent("queue_overflow",t.type):this.recordLostEvent("network_error",t.type),e}))}}var Ae=Object.freeze({__proto__:null,BaseTransport:qe,FetchTransport:Ce,XHRTransport:Le});class Ue extends class{constructor(t){this.K=t,this.K.dsn||k.warn("No DSN provided, backend will not do anything."),this.gt=this.Ot()}eventFromException(t,e){throw new g("Backend has to implement `eventFromException` method")}eventFromMessage(t,e,n){throw new g("Backend has to implement `eventFromMessage` method")}sendEvent(t){this.gt.sendEvent(t).then(null,(t=>{0}))}sendSession(t){this.gt.sendSession&&this.gt.sendSession(t).then(null,(t=>{0}))}getTransport(){return this.gt}Ot(){return new Qt}}{eventFromException(t,e){return _e(t,e,this.K.attachStacktrace)}eventFromMessage(e,n=t.Severity.Info,r){return $e(e,n,r,this.K.attachStacktrace)}Ot(){if(!this.K.dsn)return super.Ot();const t=Object.assign(Object.assign({},this.K.transportOptions),{dsn:this.K.dsn,tunnel:this.K.tunnel,sendClientReports:this.K.sendClientReports,at:this.K.at});return this.K.transport?new this.K.transport(t):W()?new Ce(t):new Le(t)}}const Fe=r();let Be=0;function Pe(){return Be>0}function He(){Be+=1,setTimeout((()=>{Be-=1}))}function Xe(t,e={},n){if("function"!=typeof t)return t;try{const e=t.__sentry_wrapped__;if(e)return e;if(A(t))return t}catch(e){return t}const sentryWrapped=function(){const r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);const i=r.map((t=>Xe(t,e)));return t.apply(this,i)}catch(t){throw He(),Bt((n=>{n.addEventProcessor((t=>(e.mechanism&&(pt(t,void 0,void 0),bt(t,e.mechanism)),t.extra=Object.assign(Object.assign({},t.extra),{arguments:r}),t))),captureException(t)})),t}};try{for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(sentryWrapped[e]=t[e])}catch(t){}L(sentryWrapped,t),C(t,"__sentry_wrapped__",sentryWrapped);try{Object.getOwnPropertyDescriptor(sentryWrapped,"name").configurable&&Object.defineProperty(sentryWrapped,"name",{get:()=>t.name})}catch(t){}return sentryWrapped}function ze(t={}){if(!Fe.document)return;if(!t.eventId)return void 0;if(!t.dsn)return void 0;const e=Fe.document.createElement("script");e.async=!0,e.src=function(t,e){const n=E(t),r=`${Pt(n)}embed/error-page/`;let i=`dsn=${j(n)}`;for(const t in e)if("dsn"!==t)if("user"===t){if(!e.user)continue;e.user.name&&(i+=`&name=${encodeURIComponent(e.user.name)}`),e.user.email&&(i+=`&email=${encodeURIComponent(e.user.email)}`)}else i+=`&${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`;return`${r}?${i}`}(t.dsn,t),t.onLoad&&(e.onload=t.onLoad);const n=Fe.document.head||Fe.document.body;n&&n.appendChild(e)}class Je{constructor(t){this.name=Je.id,this.jt={onerror:We,onunhandledrejection:Ke},this.K=Object.assign({onerror:!0,onunhandledrejection:!0},t)}setupOnce(){Error.stackTraceLimit=50;const t=this.K;for(const e in t){const n=this.jt[e];n&&t[e]&&(Ve(e),n(),this.jt[e]=void 0)}}}function We(){tt("error",(e=>{const[n,r]=Ye();if(!n.getIntegration(Je))return;const{msg:i,url:s,line:o,column:u,error:h}=e;if(Pe()||h&&h.__sentry_own_request__)return;const f=void 0===h&&a(i)?function(t,e,n,r){const i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let s=c(t)?t.message:t,o="Error";const u=s.match(i);u&&(o=u[1],s=u[2]);return Ge({exception:{values:[{type:o,value:s}]}},e,n,r)}(i,s,o,u):Ge(Se(h||i,void 0,r,!1),s,o,u);f.level=t.Severity.Error,Qe(n,h,f,"onerror")}))}function Ke(){tt("unhandledrejection",(e=>{const[n,r]=Ye();if(!n.getIntegration(Je))return;let i=e;try{"reason"in e?i=e.reason:"detail"in e&&"reason"in e.detail&&(i=e.detail.reason)}catch(t){}if(Pe()||i&&i.__sentry_own_request__)return!0;const s=h(i)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:Se(i,void 0,r,!0);s.level=t.Severity.Error,Qe(n,i,s,"onunhandledrejection")}))}function Ge(t,e,n,i){const s=t.exception=t.exception||{},o=s.values=s.values||[],c=o[0]=o[0]||{},u=c.stacktrace=c.stacktrace||{},h=u.frames=u.frames||[],f=isNaN(parseInt(i,10))?void 0:i,l=isNaN(parseInt(n,10))?void 0:n,d=a(e)&&e.length>0?e:function(){const t=r();try{return t.document.location.href}catch(t){return""}}();return 0===h.length&&h.push({colno:f,filename:d,function:"?",in_app:!0,lineno:l}),t}function Ve(t){0}function Qe(t,e,n,r){bt(n,{handled:!1,type:r}),t.captureEvent(n,{originalException:e})}function Ye(){const t=Lt(),e=t.getClient();return[t,e&&e.getOptions().attachStacktrace]}Je.id="GlobalHandlers";const Ze=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class tn{constructor(t){this.name=tn.id,this.K=Object.assign({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t)}setupOnce(){const t=r();this.K.setTimeout&&q(t,"setTimeout",en),this.K.setInterval&&q(t,"setInterval",en),this.K.requestAnimationFrame&&q(t,"requestAnimationFrame",nn),this.K.XMLHttpRequest&&"XMLHttpRequest"in t&&q(XMLHttpRequest.prototype,"send",rn);const e=this.K.eventTarget;if(e){(Array.isArray(e)?e:Ze).forEach(sn)}}}function en(t){return function(...e){const n=e[0];return e[0]=Xe(n,{mechanism:{data:{function:R(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}function nn(t){return function(e){return t.call(this,Xe(e,{mechanism:{data:{function:"requestAnimationFrame",handler:R(t)},handled:!0,type:"instrument"}}))}}function rn(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((t=>{t in n&&"function"==typeof n[t]&&q(n,t,(function(e){const n={mechanism:{data:{function:t,handler:R(e)},handled:!0,type:"instrument"}},r=A(e);return r&&(n.mechanism.data.handler=R(r)),Xe(e,n)}))})),t.apply(this,e)}}function sn(t){const e=r(),n=e[t]&&e[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(q(n,"addEventListener",(function(e){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=Xe(r.handleEvent.bind(r),{mechanism:{data:{function:"handleEvent",handler:R(r),target:t},handled:!0,type:"instrument"}}))}catch(t){}return e.call(this,n,Xe(r,{mechanism:{data:{function:"addEventListener",handler:R(r),target:t},handled:!0,type:"instrument"}}),i)}})),q(n,"removeEventListener",(function(t){return function(e,n,r){const i=n;try{const n=i&&i.__sentry_wrapped__;n&&t.call(this,e,n,r)}catch(t){}return t.call(this,e,i,r)}})))}tn.id="TryCatch";class on{constructor(t){this.name=on.id,this.K=Object.assign({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t)}addSentryBreadcrumb(t){this.K.sentry&&Lt().addBreadcrumb({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:dt(t)},{event:t})}setupOnce(){this.K.console&&tt("console",cn),this.K.dom&&tt("dom",function(t){function e(e){let n,r="object"==typeof t?t.serializeAttribute:void 0;"string"==typeof r&&(r=[r]);try{n=e.event.target?y(e.event.target,r):y(e.event,r)}catch(t){n="<unknown>"}0!==n.length&&Lt().addBreadcrumb({category:`ui.${e.name}`,message:n},{event:e.event,name:e.name,global:e.global})}return e}(this.K.dom)),this.K.xhr&&tt("xhr",un),this.K.fetch&&tt("fetch",an),this.K.history&&tt("history",hn)}}function cn(t){const e={category:"console",data:{arguments:t.args,logger:"console"},level:jt(t.level),message:I(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;e.message=`Assertion failed: ${I(t.args.slice(1)," ")||"console.assert"}`,e.data.arguments=t.args.slice(1)}Lt().addBreadcrumb(e,{input:t.args,level:t.level})}function un(t){if(t.endTimestamp){if(t.xhr.__sentry_own_request__)return;const{method:e,url:n,status_code:r,body:i}=t.xhr.__sentry_xhr__||{};Lt().addBreadcrumb({category:"xhr",data:{method:e,url:n,status_code:r},type:"http"},{xhr:t.xhr,input:i})}else;}function an(e){e.endTimestamp&&(e.fetchData.url.match(/sentry_key/)&&"POST"===e.fetchData.method||(e.error?Lt().addBreadcrumb({category:"fetch",data:e.fetchData,level:t.Severity.Error,type:"http"},{data:e.error,input:e.args}):Lt().addBreadcrumb({category:"fetch",data:Object.assign(Object.assign({},e.fetchData),{status_code:e.response.status}),type:"http"},{input:e.args,response:e.response})))}function hn(t){const e=r();let n=t.from,i=t.to;const s=ft(e.location.href);let o=ft(n);const c=ft(i);o.path||(o=s),s.protocol===c.protocol&&s.host===c.host&&(i=c.relative),s.protocol===o.protocol&&s.host===o.host&&(n=o.relative),Lt().addBreadcrumb({category:"navigation",data:{from:n,to:i}})}on.id="Breadcrumbs";class fn{constructor(t={}){this.name=fn.id,this.wt=t.key||"cause",this.Et=t.limit||5}setupOnce(){Rt(((t,e)=>{const n=Lt().getIntegration(fn);return n?function(t,e,n,r){if(!(n.exception&&n.exception.values&&r&&b(r.originalException,Error)))return n;const i=ln(e,r.originalException,t);return n.exception.values=[...i,...n.exception.values],n}(n.wt,n.Et,t,e):t}))}}function ln(t,e,n,r=[]){if(!b(e[n],Error)||r.length+1>=t)return r;const i=Oe(e[n]);return ln(t,e[n],n,[i,...r])}fn.id="LinkedErrors";const dn=r();class pn{constructor(){this.name=pn.id}setupOnce(){Rt((t=>{if(Lt().getIntegration(pn)){if(!dn.navigator&&!dn.location&&!dn.document)return t;const e=t.request&&t.request.url||dn.location&&dn.location.href,{referrer:n}=dn.document||{},{userAgent:r}=dn.navigator||{},i=Object.assign(Object.assign(Object.assign({},t.request&&t.request.headers),n&&{Referer:n}),r&&{"User-Agent":r}),s=Object.assign(Object.assign({},e&&{url:e}),{headers:i});return Object.assign(Object.assign({},t),{request:s})}return t}))}}pn.id="UserAgent";class bn{constructor(){this.name=bn.id}setupOnce(t,e){t((t=>{const n=e().getIntegration(bn);if(n){try{if(function(t,e){if(!e)return!1;if(function(t,e){const n=t.message,r=e.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!vn(t,e))return!1;if(!yn(t,e))return!1;return!0}(t,e))return!0;if(function(t,e){const n=mn(e),r=mn(t);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!vn(t,e))return!1;if(!yn(t,e))return!1;return!0}(t,e))return!0;return!1}(t,n.xt))return k.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(e){return n.xt=t}return n.xt=t}return t}))}}function yn(t,e){let n=gn(t),r=gn(e);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(n=n,r=r,r.length!==n.length)return!1;for(let t=0;t<r.length;t++){const e=r[t],i=n[t];if(e.filename!==i.filename||e.lineno!==i.lineno||e.colno!==i.colno||e.function!==i.function)return!1}return!0}function vn(t,e){let n=t.fingerprint,r=e.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return!(n.join("")!==r.join(""))}catch(t){return!1}}function mn(t){return t.exception&&t.exception.values&&t.exception.values[0]}function gn(t){const e=t.exception;if(e)try{return e.values[0].stacktrace.frames}catch(t){return}else if(t.stacktrace)return t.stacktrace.frames}bn.id="Dedupe";var On=Object.freeze({__proto__:null,GlobalHandlers:Je,TryCatch:tn,Breadcrumbs:on,LinkedErrors:fn,UserAgent:pn,Dedupe:bn});class jn extends class{constructor(t,e){this._t={},this.$t=0,this.St=new t(e),this.K=e,e.dsn&&(this.kt=E(e.dsn))}captureException(t,e,n){if(yt(t))return void k.log(Vt);let r=e&&e.event_id;return this.Tt(this.Dt().eventFromException(t,e).then((t=>this.Rt(t,e,n))).then((t=>{r=t}))),r}captureMessage(t,e,n,r){let i=n&&n.event_id;const s=h(t)?this.Dt().eventFromMessage(String(t),e,n):this.Dt().eventFromException(t,n);return this.Tt(s.then((t=>this.Rt(t,n,r))).then((t=>{i=t}))),i}captureEvent(t,e,n){if(e&&e.originalException&&yt(e.originalException))return void k.log(Vt);let r=e&&e.event_id;return this.Tt(this.Rt(t,e,n).then((t=>{r=t}))),r}captureSession(t){this.Nt()&&("string"!=typeof t.release||(this.It(t),t.update({init:!1})))}getDsn(){return this.kt}getOptions(){return this.K}getTransport(){return this.Dt().getTransport()}flush(t){return this.Mt(t).then((e=>this.getTransport().close(t).then((t=>e&&t))))}close(t){return this.flush(t).then((t=>(this.getOptions().enabled=!1,t)))}setupIntegrations(){this.Nt()&&!this._t.initialized&&(this._t=Gt(this.K))}getIntegration(t){try{return this._t[t.id]||null}catch(e){return k.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}qt(t,e){let n=!1,r=!1;const i=e.exception&&e.exception.values;if(i){r=!0;for(const t of i){const e=t.mechanism;if(e&&!1===e.handled){n=!0;break}}}const s="ok"===t.status;(s&&0===t.errors||s&&n)&&(t.update(Object.assign(Object.assign({},n&&{status:"crashed"}),{errors:t.errors||Number(r||n)})),this.captureSession(t))}It(t){this.Dt().sendSession(t)}Mt(t){return new gt((e=>{let n=0;const r=setInterval((()=>{0==this.$t?(clearInterval(r),e(!0)):(n+=1,t&&n>=t&&(clearInterval(r),e(!1)))}),1)}))}Dt(){return this.St}Nt(){return!1!==this.getOptions().enabled&&void 0!==this.kt}Ct(t,e,n){const{normalizeDepth:r=3}=this.getOptions(),i=Object.assign(Object.assign({},t),{event_id:t.event_id||(n&&n.event_id?n.event_id:ht()),timestamp:t.timestamp||_t()});this.Lt(i),this.At(i);let s=e;n&&n.captureContext&&(s=Tt.clone(s).update(n.captureContext));let o=vt(i);return s&&(o=s.applyToEvent(i,n)),o.then((t=>(t&&(t.sdkProcessingMetadata=Object.assign(Object.assign({},t.sdkProcessingMetadata),{normalizeDepth:X(r)})),"number"==typeof r&&r>0?this.Ut(t,r):t)))}Ut(t,e){if(!t)return null;const n=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map((t=>Object.assign(Object.assign({},t),t.data&&{data:X(t.data,e)})))}),t.user&&{user:X(t.user,e)}),t.contexts&&{contexts:X(t.contexts,e)}),t.extra&&{extra:X(t.extra,e)});return t.contexts&&t.contexts.trace&&(n.contexts.trace=t.contexts.trace),t.sdkProcessingMetadata=Object.assign(Object.assign({},t.sdkProcessingMetadata),{baseClientNormalized:!0}),n}Lt(t){const e=this.getOptions(),{environment:n,release:r,dist:i,maxValueLength:s=250}=e;"environment"in t||(t.environment="environment"in e?n:"production"),void 0===t.release&&void 0!==r&&(t.release=r),void 0===t.dist&&void 0!==i&&(t.dist=i),t.message&&(t.message=N(t.message,s));const o=t.exception&&t.exception.values&&t.exception.values[0];o&&o.value&&(o.value=N(o.value,s));const c=t.request;c&&c.url&&(c.url=N(c.url,s))}At(t){const e=Object.keys(this._t);e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}Ft(t){this.Dt().sendEvent(t)}Rt(t,e,n){return this.Bt(t,e,n).then((t=>t.event_id),(t=>{k.error(t)}))}Bt(t,e,n){const{beforeSend:r,sampleRate:i}=this.getOptions(),s=this.getTransport();function o(t,e){s.recordLostEvent&&s.recordLostEvent(t,e)}if(!this.Nt())return mt(new g("SDK not enabled, will not capture event."));const c="transaction"===t.type;return!c&&"number"==typeof i&&Math.random()>i?(o("sample_rate","event"),mt(new g(`Discarding event because it's not included in the random sample (sampling rate = ${i})`))):this.Ct(t,n,e).then((n=>{if(null===n)throw o("event_processor",t.type||"event"),new g("An event processor returned null, will not send event.");if(e&&e.data&&!0===e.data.__sentry__||c||!r)return n;return function(t){const e="`beforeSend` method has to return `null` or a valid event.";if(p(t))return t.then((t=>{if(!f(t)&&null!==t)throw new g(e);return t}),(t=>{throw new g(`beforeSend rejected with ${t}`)}));if(!f(t)&&null!==t)throw new g(e);return t}(r(n,e))})).then((e=>{if(null===e)throw o("before_send",t.type||"event"),new g("`beforeSend` returned `null`, will not send event.");const r=n&&n.getSession&&n.getSession();return!c&&r&&this.qt(r,e),this.Ft(e),e})).then(null,(t=>{if(t instanceof g)throw t;throw this.captureException(t,{data:{__sentry__:!0},originalException:t}),new g(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)}))}Tt(t){this.$t+=1,t.then((t=>(this.$t-=1,t)),(t=>(this.$t-=1,t)))}}{constructor(t={}){t.at=t.at||{},t.at.sdk=t.at.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:Zt}],version:Zt},super(Ue,t)}showReportDialog(t={}){r().document&&(this.Nt()?ze(Object.assign(Object.assign({},t),{dsn:t.dsn||this.getDsn()})):k.error("Trying to call showReportDialog with Sentry Client disabled"))}Ct(t,e,n){return t.platform=t.platform||"javascript",super.Ct(t,e,n)}Ft(t){const e=this.getIntegration(on);e&&e.addSentryBreadcrumb(t),super.Ft(t)}}const wn=[new re,new ee,new tn,new on,new Je,new fn,new bn,new pn];function En(t){t.startSession({ignoreDuration:!0}),t.captureSession()}let xn={};const _n=r();_n.Sentry&&_n.Sentry.Integrations&&(xn=_n.Sentry.Integrations);const $n=Object.assign(Object.assign(Object.assign({},xn),ie),On);return t.BrowserClient=jn,t.Hub=Mt,t.Integrations=$n,t.SDK_NAME="sentry.javascript.browser",t.SDK_VERSION=Zt,t.Scope=Tt,t.Session=Nt,t.Transports=Ae,t.addBreadcrumb=function(t){Ft("addBreadcrumb",t)},t.addGlobalEventProcessor=Rt,t.captureEvent=function(t){return Ft("captureEvent",t)},t.captureException=captureException,t.captureMessage=function(t,e){let n;try{throw new Error(t)}catch(t){n=t}const r="string"!=typeof e?{captureContext:e}:void 0;return Ft("captureMessage",t,"string"==typeof e?e:void 0,Object.assign({originalException:t,syntheticException:n},r))},t.close=function(t){const e=Lt().getClient();return e?e.close(t):vt(!1)},t.configureScope=function(t){Ft("configureScope",t)},t.defaultIntegrations=wn,t.eventFromException=_e,t.eventFromMessage=$e,t.flush=function(t){const e=Lt().getClient();return e?e.flush(t):vt(!1)},t.forceLoad=function(){},t.getCurrentHub=Lt,t.getHubFromCarrier=At,t.init=function(t={}){if(void 0===t.defaultIntegrations&&(t.defaultIntegrations=wn),void 0===t.release){const e=r();e.SENTRY_RELEASE&&e.SENTRY_RELEASE.id&&(t.release=e.SENTRY_RELEASE.id)}void 0===t.autoSessionTracking&&(t.autoSessionTracking=!0),void 0===t.sendClientReports&&(t.sendClientReports=!0),function(t,e){!0===e.debug&&k.enable();const n=Lt(),r=n.getScope();r&&r.update(e.initialScope);const i=new t(e);n.bindClient(i)}(jn,t),t.autoSessionTracking&&function(){const t=r();if(void 0===t.document)return void 0;const e=Lt();if(!e.captureSession)return;En(e),tt("history",(({from:t,to:e})=>{void 0!==t&&t!==e&&En(Lt())}))}()},t.injectReportDialog=ze,t.lastEventId=function(){return Lt().lastEventId()},t.makeMain=Ct,t.onLoad=function(t){t()},t.setContext=function(t,e){Ft("setContext",t,e)},t.setExtra=function(t,e){Ft("setExtra",t,e)},t.setExtras=function(t){Ft("setExtras",t)},t.setTag=function(t,e){Ft("setTag",t,e)},t.setTags=function(t){Ft("setTags",t)},t.setUser=function(t){Ft("setUser",t)},t.showReportDialog=function(t={}){const e=Lt(),n=e.getScope();n&&(t.user=Object.assign(Object.assign({},n.getUser()),t.user)),t.eventId||(t.eventId=e.lastEventId());const r=e.getClient();r&&r.showReportDialog(t)},t.startTransaction=function(t,e){return Ft("startTransaction",Object.assign({},t),e)},t.withScope=Bt,t.wrap=function(t){return Xe(t)()},t}({});
|
|
3
3
|
//# sourceMappingURL=bundle.es6.min.js.map
|