iobroker.sql 4.5.0 → 4.6.0

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.
Files changed (40) hide show
  1. package/README.md +24 -19
  2. package/admin/custom/assets/Components-z0NoiyPz.js +1 -0
  3. package/admin/custom/assets/DataBrowser-v06sXLcj.js +7 -0
  4. package/admin/custom/assets/{_virtual_mf-localSharedImportMap___mfe_internal__SqlComponentsSet__mf_owner__1-DAGgRMdx.js → _virtual_mf-localSharedImportMap___mfe_internal__SqlComponentsSet__mf_owner__1-BCL0evdo.js} +1 -1
  5. package/admin/custom/assets/_virtual_mf___mfe_internal__SqlComponentsSet__mf_owner__175232161831161__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DGB4BINK.js +1526 -0
  6. package/admin/custom/assets/{_virtual_mf___mfe_internal__SqlComponentsSet__mf_owner__264649249385412__loadShare__shared-DmziGsfK.js → _virtual_mf___mfe_internal__SqlComponentsSet__mf_owner__175232161831161__loadShare__shared-CP0GHP0n.js} +2 -2
  7. package/admin/custom/assets/_virtual_mf___mfe_internal__SqlComponentsSet__mf_owner__175232161831161__prebuild___mf_0_iobroker_mf_1_json_mf_2_config__prebuild__-BpKJQFYf.js +122 -0
  8. package/admin/custom/assets/{_virtual_mf___mfe_internal__SqlComponentsSet__mf_owner__264649249385412__prebuild__react_mf_2_dom_mf_1_client__prebuild__-SIym-UC8.js → _virtual_mf___mfe_internal__SqlComponentsSet__mf_owner__175232161831161__prebuild__react_mf_2_dom_mf_1_client__prebuild__-1dRDhFNI.js} +1 -1
  9. package/admin/custom/assets/{dist-ChhOvPa4.js → dist-DKNMF4jN.js} +1 -1
  10. package/admin/custom/assets/helpers-Cms4pf5K.js +1 -0
  11. package/admin/custom/assets/{hostInit-Bp3K06oA.js → hostInit-DCD-lOxc.js} +1 -1
  12. package/admin/custom/assets/{index-BACEccc0.js → index-BLORWz5n.js} +1 -1
  13. package/admin/custom/assets/{lib-BlyWjmi5.js → lib-XBZsNy3C.js} +2 -2
  14. package/admin/custom/assets/{mf-entry-bootstrap-0-03451604.js → mf-entry-bootstrap-0-3836594a.js} +3 -3
  15. package/admin/custom/assets/{pendingShares-BhtJBPS2.js → pendingShares-Bo3TLAs9.js} +2 -2
  16. package/admin/custom/assets/prod-Czs48qVn.js +502 -0
  17. package/admin/custom/assets/{utils-Cqsn1la4.js → utils-BYsz0Nk6.js} +1 -1
  18. package/admin/custom/assets/{vite-preload-helper-BbbETgeG.js → vite-preload-helper-D97eqSzU.js} +1 -1
  19. package/admin/custom/customComponents.js +2 -2
  20. package/admin/custom/mf-manifest.json +1 -1
  21. package/admin/i18n/de.json +1 -1
  22. package/build/lib/help.js +121 -0
  23. package/build/lib/help.js.map +1 -0
  24. package/build/lib/mysql.js +34 -4
  25. package/build/lib/mysql.js.map +1 -1
  26. package/build/lib/names.js +5 -3
  27. package/build/lib/names.js.map +1 -1
  28. package/build/lib/statistics.js +27 -4
  29. package/build/lib/statistics.js.map +1 -1
  30. package/build/main.js +44 -15
  31. package/build/main.js.map +1 -1
  32. package/io-package.json +33 -27
  33. package/package.json +3 -3
  34. package/admin/custom/assets/Components-Biqn0PcX.js +0 -1
  35. package/admin/custom/assets/DataBrowser-DTTVoTBj.js +0 -7
  36. package/admin/custom/assets/_virtual_mf___mfe_internal__SqlComponentsSet__mf_owner__264649249385412__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DiZBpJW2.js +0 -1439
  37. package/admin/custom/assets/_virtual_mf___mfe_internal__SqlComponentsSet__mf_owner__264649249385412__prebuild___mf_0_iobroker_mf_1_json_mf_2_config__prebuild__-CY-VVm-e.js +0 -122
  38. package/admin/custom/assets/helpers-CwABI1ut.js +0 -1
  39. package/admin/custom/assets/prod-m5pRY8Jx.js +0 -15
  40. /package/admin/custom/assets/{_virtual_mf___mfe_internal__SqlComponentsSet__mf_owner__264649249385412__prebuild__react_mf_1_jsx_mf_2_runtime__prebuild__--SURtz9t.js → _virtual_mf___mfe_internal__SqlComponentsSet__mf_owner__175232161831161__prebuild__react_mf_1_jsx_mf_2_runtime__prebuild__--SURtz9t.js} +0 -0
@@ -1 +0,0 @@
1
- import{n as e}from"./utils-Cqsn1la4.js";({...e.global});var t=e.share;e.utils;export{t};
@@ -1,15 +0,0 @@
1
- var e=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,t=globalThis,n=`11.10.0`;function r(){return i(t),t}function i(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||`11.10.0`,t[n]=t[`11.10.0`]||{}}function a(e,r,i=t){let a=i.__SENTRY__=i.__SENTRY__||{},o=a[n]=a[`11.10.0`]||{};return o[e]||(o[e]=r())}var o=[`debug`,`info`,`warn`,`error`,`log`,`assert`,`trace`],s=`Sentry Logger `,c={};function l(e){if(!(`console`in t))return e();let n=t.console,r={},i=Object.keys(c);i.forEach(e=>{let t=c[e];r[e]=n[e],n[e]=t});try{return e()}finally{i.forEach(e=>{n[e]=r[e]})}}function u(){ee().enabled=!0}function d(){ee().enabled=!1}function f(){return ee().enabled}function p(...e){g(`log`,...e)}function m(...e){g(`warn`,...e)}function h(...e){g(`error`,...e)}function g(n,...r){e&&f()&&l(()=>{t.console[n](`${s}[${n}]:`,...r)})}function ee(){return e?a(`loggerSettings`,()=>({enabled:!1})):{enabled:!1}}var _={enable:u,disable:d,isEnabled:f,log:p,warn:m,error:h},te=50,ne=/\(error: (.*)\)/,re=/captureMessage|captureException/;function ie(...e){let t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{let i=[],a=e.split(`
2
- `);for(let e=n;e<a.length;e++){let n=a[e];n.length>1024&&(n=n.slice(0,1024));let o=ne.test(n)?n.replace(ne,`$1`):n;if(!o.includes(`Error: `)){for(let e of t){let t=e(o);if(t){i.push(t);break}}if(i.length>=te+r)break}}return oe(i.slice(r))}}function ae(e){return Array.isArray(e)?ie(...e):e}function oe(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(se(t).function||``)&&t.pop(),t.reverse(),re.test(se(t).function||``)&&(t.pop(),re.test(se(t).function||``)&&t.pop()),t.slice(0,te).map(e=>({...e,filename:e.filename||se(t).filename,function:e.function||`?`}))}function se(e){return e[e.length-1]||{}}var ce=`<anonymous>`;function v(e){try{return!e||typeof e!=`function`?ce:e.name||ce}catch{return ce}}function le(e){let t=e.exception;if(t){let e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}var ue={},de={};function y(e,t){return ue[e]=ue[e]||[],ue[e].push(t),()=>{let n=ue[e];if(n){let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}}function b(t,n){if(!de[t]){de[t]=!0;try{n()}catch(n){e&&_.error(`Error while instrumenting ${t}`,n)}}}function x(t,n){let r=t&&ue[t];if(r)for(let i of r)try{i(n)}catch(n){e&&_.error(`Error while triggering instrumentation handler.
3
- Type: ${t}
4
- Name: ${v(i)}
5
- Error:`,n)}}var fe=null;function pe(e){let t=`error`;y(t,e),b(t,me)}function me(){fe=t.onerror,t.onerror=function(e,t,n,r,i){return x(`error`,{column:r,error:i,line:n,msg:e,url:t}),fe?fe.apply(this,arguments):!1},t.onerror.__SENTRY_INSTRUMENTED__=!0}var he=null;function ge(e){let t=`unhandledrejection`;y(t,e),b(t,_e)}function _e(){he=t.onunhandledrejection,t.onunhandledrejection=function(e){return x(`unhandledrejection`,e),!he||he.apply(this,arguments)},t.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var ve=Object.prototype.toString;function S(e){switch(ve.call(e)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:case`[object WebAssembly.Exception]`:return!0;default:return Oe(e,Error)}}function C(e,t){return ve.call(e)===`[object ${t}]`}function ye(e){return C(e,`ErrorEvent`)}function be(e){return C(e,`DOMError`)}function xe(e){return C(e,`DOMException`)}function w(e){return C(e,`String`)}function Se(e){return typeof e==`object`&&!!e&&`__sentry_template_string__`in e&&`__sentry_template_values__`in e}function T(e){return e===null||Se(e)||typeof e!=`object`&&typeof e!=`function`}function Ce(e){return C(e,`Object`)}function we(e){return typeof e==`object`&&!!e}function Te(e){return typeof Event<`u`&&Oe(e,Event)}function Ee(e){return C(e,`RegExp`)}function De(e){return!!(e!=null&&e.then&&typeof e.then==`function`)}function Oe(e,t){try{return e instanceof t}catch{return!1}}function ke(e){return typeof Request<`u`&&Oe(e,Request)}function E(t,n,r){if(!(n in t))return;let i=t[n];if(typeof i!=`function`)return;let a=r(i);typeof a==`function`&&Ae(a,i);try{t[n]=a}catch{e&&_.log(`Failed to replace method "${n}" in object`,t)}}function D(t,n,r){try{Object.defineProperty(t,n,{value:r,writable:!0,configurable:!0})}catch{e&&_.log(`Failed to add non-enumerable property "${String(n)}" to object`,t)}}function Ae(e,t){try{e.prototype=t.prototype=t.prototype||{},D(e,`__sentry_original__`,t)}catch{}}function je(e){return e.__sentry_original__}function Me(e){if(S(e))return{message:e.message,name:e.name,stack:e.stack,...Ne(e)};if(Te(e)){let{type:t,target:n,currentTarget:r,detail:i}=e;return{type:t,target:n,currentTarget:r,...i?{detail:i}:{},...Ne(e)}}return e}function Ne(e){return we(e)?Object.fromEntries(Object.entries(e)):{}}function Pe(e){let t=Object.keys(Me(e));return t.sort(),t[0]?t.join(`, `):`[object has no keys]`}var O;function Fe(e){if(O!==void 0)return O?O(e):e();let n=Symbol.for(`__SENTRY_SAFE_RANDOM_ID_WRAPPER__`),r=t;return n in r&&typeof r[n]==`function`?(O=r[n],O(e)):(O=null,e())}function Ie(){return Fe(()=>Math.random())}function k(){return Fe(()=>Date.now())}var Le=Symbol.for(`sentry.skipNormalization`),Re=Symbol.for(`sentry.overrideNormalizationDepth`);function ze(e){return!!e[Le]}function Be(e){let t=e[Re];return typeof t==`number`?t:void 0}var Ve;function He(e){Ve=e}function A(e,t=100,n=1/0){try{return We(``,e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function Ue(e,t=3,n=102400){let r=A(e,t);return Je(r)>n?Ue(e,t-1,n):r}function We(e,t,n=1/0,r=1/0,i=Ye()){let[a,o]=i;if(t==null||[`boolean`,`string`].includes(typeof t)||typeof t==`number`&&Number.isFinite(t))return t;let s=Ge(e,t);if(!s.startsWith(`[object `))return s;if(ze(t))return t;let c=Be(t),l=c===void 0?n:c;if(l===0)return s.replace(`object `,``);if(a(t))return`[Circular ~]`;let u=t;if(u&&typeof u.toJSON==`function`)try{return We(``,u.toJSON(),l-1,r,i)}catch{}let d=Array.isArray(t)?[]:{},f=0,p=Me(t);for(let e in p){if(!Object.prototype.hasOwnProperty.call(p,e))continue;if(f>=r){d[e]=`[MaxProperties ~]`;break}let t=p[e];d[e]=We(e,t,l-1,r,i),f++}return o(t),d}function Ge(e,t){try{if(Ve){let e=Ve(t);if(e)return e}return typeof global<`u`&&t===global?`[Global]`:typeof t==`number`&&!Number.isFinite(t)?`[${t}]`:typeof t==`function`?`[Function: ${v(t)}]`:typeof t==`symbol`?`[${String(t)}]`:typeof t==`bigint`?`[BigInt: ${String(t)}]`:`[object ${Ke(t)}]`}catch(e){return`**non-serializable** (${e})`}}function Ke(e){let t=Object.getPrototypeOf(e);return t!=null&&t.constructor?t.constructor.name:`null prototype`}function qe(e){return~-encodeURI(e).split(/%..|./).length}function Je(e){return qe(JSON.stringify(e))}function Ye(){let e=new WeakSet;function t(t){return e.has(t)?!0:(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}function Xe(e,t=0){return typeof e!=`string`||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Ze(e,t){if(!Array.isArray(e))return``;let n=[];for(let t=0;t<e.length;t++){let r=e[t];T(r)?n.push(String(r)):r instanceof Error?n.push(r.message?`${r.name}: ${r.message}`:r.name):n.push(Ge(void 0,r))}return n.join(t)}function Qe(e,t,n=!1){return w(e)?Ee(t)?t.test(e):w(t)?n?e===t:e.includes(t):typeof t==`function`&&t(e):!1}function $e(e,t=[],n=!1){for(let r of t)if(Qe(e,r,n))return!0;return!1}function et(){let e=t;return e.crypto||e.msCrypto}var tt;function nt(){return Ie()*16}function j(e=et()){try{if(e!=null&&e.randomUUID)return Fe(()=>e.randomUUID()).replace(/-/g,``)}catch{}return tt||=`10000000100040008000100000000000`,tt.replace(/[018]/g,e=>(e^(nt()&15)>>e/4).toString(16))}function rt(e){var t;return(t=e.exception)==null||(t=t.values)==null?void 0:t[0]}function M(e){let{message:t,event_id:n}=e;if(t)return t;let r=rt(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||`<unknown>`:n||`<unknown>`}function it(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],a=i[0]=i[0]||{};a.value||=t||``,a.type||=n||`Error`}function N(e,t){let n=rt(e);n&&ot(n,t)}function at(e,t){var n;let r=(n=e.exception)==null?void 0:n.values,i=(r==null?void 0:r.find(e=>{var t;return((t=e.mechanism)==null?void 0:t.exception_id)===0}))??(r==null?void 0:r[0]);i&&ot(i,t)}function ot(e,t){let n={type:`generic`,handled:!0},r=e.mechanism;e.mechanism={...n,...r,...t},t&&`data`in t&&(e.mechanism.data={...r==null?void 0:r.data,...t.data})}function st(e){if(ct(e))return!0;try{D(e,`__sentry_captured__`,!0)}catch{}return!1}function ct(e){try{return e.__sentry_captured__}catch{}}var lt=1e3,ut=1e3,dt=100;function ft(){return k()/lt}var pt=[];function mt(){let{performance:e}=t;if(!(e!=null&&e.now)||!e.timeOrigin)return e!=null&&e.now&&(pt=[{from:0,origin:k()-Fe(()=>e.now())}]),ft;let n=e.timeOrigin;pt=[{from:0,origin:n}];let r=!0,i=0;return()=>Fe(()=>{let t=e.now(),a=Date.now();return Math.abs(n+t-a)>ut&&(n=a-t,r?pt=[{from:0,origin:n}]:(pt.push({from:i,origin:n}),pt.length>dt&&pt.splice(1,1))),r=!1,i=t,(n+t)/lt})}var ht;function P(){return(ht??=mt())()}function gt(e){let t=P(),n={sid:j(),init:!0,timestamp:t,started:t,duration:0,status:`ok`,errors:0,ignoreDuration:!1,toJSON:()=>vt(n)};return e&&F(n,e),n}function F(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||P(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:j()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started==`number`&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration==`number`)e.duration=t.duration;else{let t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors==`number`&&(e.errors=t.errors),t.status&&(e.status=t.status)}function _t(e,t){let n={};t?n={status:t}:e.status===`ok`&&(n={status:`exited`}),F(e,n)}function vt(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did==`number`||typeof e.did==`string`?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function yt(e,t,n=2){if(!t||typeof t!=`object`||n<=0)return t;if(e&&Object.keys(t).length===0)return e;let r={...e};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=yt(r[e],t[e],n-1));return r}function bt(){return j()}function xt(){return j().substring(16)}var St=100,I=class t{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},D(this,`refs`,{}),this._propagationContext={traceId:bt(),sampleRand:Ie()}}clone(){let e=new t;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._attributes={...this._attributes},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,e._conversationId=this._conversationId,e.refs={...this.refs},e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&F(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(e){return this._conversationId=e||void 0,this._notifyScopeListeners(),this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],this._notifyScopeListeners()),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return t===null?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;let n=typeof e==`function`?e(this):e,{tags:r,attributes:i,extra:a,user:o,contexts:s,level:c,fingerprint:l=[],propagationContext:u,conversationId:d}=(n instanceof t?n.getScopeData():Ce(n)?e:void 0)||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...i},this._extra={...this._extra,...a},this._contexts={...this._contexts,...s},o&&Object.keys(o).length&&(this._user=o),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),d&&(this._conversationId=d),this}addBreadcrumb(e,t){let n=typeof t==`number`?t:St;if(n<=0)return this;let r={timestamp:ft(),...e,message:e.message?Xe(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n)),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=yt(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(t,n){let r=(n==null?void 0:n.event_id)||j();if(!this._client)return e&&_.warn(`No client configured on scope - will not capture exception!`),r;let i=Error(`Sentry syntheticException`);return this._client.captureException(t,{originalException:t,syntheticException:i,...n,event_id:r},this),r}captureMessage(t,n,r){let i=(r==null?void 0:r.event_id)||j();if(!this._client)return e&&_.warn(`No client configured on scope - will not capture message!`),i;let a=(r==null?void 0:r.syntheticException)??Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:a,...r,event_id:i},this),i}captureEvent(t,n){let r=t.event_id||(n==null?void 0:n.event_id)||j();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(e&&_.warn(`No client configured on scope - will not capture event!`),r)}_notifyScopeListeners(){this._notifyingListeners||=(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),!1)}};function Ct(){return a(`defaultCurrentScope`,()=>new I)}function wt(){return a(`defaultIsolationScope`,()=>new I)}var Tt=`__SENTRY_SUPPRESS_TRACING__`,Et=e=>e instanceof Promise&&!e[Dt],Dt=Symbol(`chained PromiseLike`),Ot=(e,t,n)=>{let r=e.then(e=>(t(e),e),e=>{throw n(e),e});return Et(r)&&Et(e)?r:kt(e,r)},kt=(e,t)=>{if(!t)return e;let n=!1;for(let r in e){if(r in t)continue;n=!0;let i=e[r];typeof i==`function`?Object.defineProperty(t,r,{value:(...t)=>i.apply(e,t),enumerable:!0,configurable:!0,writable:!0}):t[r]=i}return n&&Object.assign(t,{[Dt]:!0}),t},At=class{constructor(e,t){let n;n=e||new I;let r;r=t||new I,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t=this._pushScope(),n;try{n=e(t)}catch(e){throw this._popScope(),e}return De(n)?Ot(n,()=>this._popScope(),()=>this._popScope()):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function L(){let e=i(r());return e.stack=e.stack||new At(Ct(),wt())}function jt(e){return L().withScope(e)}function Mt(e,t){let n=L();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Nt(e){return L().withScope(()=>e(L().getIsolationScope()))}function Pt(){return{suppressTracing:Ft,withIsolationScope:Nt,withScope:jt,withSetScope:Mt,withSetIsolationScope:(e,t)=>Nt(t),getCurrentScope:()=>L().getScope(),getIsolationScope:()=>L().getIsolationScope()}}function Ft(e){return jt(t=>{t.setSDKProcessingMetadata({[Tt]:!0});let n=e();return t.setSDKProcessingMetadata({[Tt]:void 0}),n})}function It(e){let t=i(e);return t.acs?t.acs:Pt()}function Lt(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.keys(e).includes(`value`)}function Rt(e,t){let{value:n,unit:r}=Lt(e)?e:{value:e,unit:void 0},i=Bt(n),a=r&&typeof r==`string`?{unit:r}:{};if(i)return{...i,...a};if(!t||t===`skip-undefined`&&n===void 0)return;let o=``;try{o=JSON.stringify(n)??``}catch{}return{value:o,type:`string`,...a}}function zt(e,t=!1){let n={};for(let[r,i]of Object.entries(e??{})){let e=Rt(i,t);e&&(n[r]=e)}return n}function Bt(e){if(Array.isArray(e))return{value:e,type:`array`};let t=typeof e==`string`?`string`:typeof e==`boolean`?`boolean`:typeof e==`number`&&!Number.isNaN(e)?Number.isInteger(e)?`integer`:`double`:null;if(t)return{value:e,type:t}}function Vt(){var e,t;return(e=(t=i(r())).externalPropagationContextProvider)==null?void 0:e.call(t)}function R(){return It(r()).getCurrentScope()}function z(){return It(r()).getIsolationScope()}function Ht(){return a(`globalScope`,()=>new I)}function Ut(...e){let t=It(r());if(e.length===2){let[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function B(){return R().getClient()}function Wt(e){let t=Vt();if(t)return{trace_id:t.traceId,span_id:t.spanId};let{traceId:n,parentSpanId:r,propagationSpanId:i}=e.getPropagationContext(),a={trace_id:n,span_id:i||xt()};return r&&(a.parent_span_id=r),a}var Gt=`gen_ai.conversation.id`,Kt=`sentry.exclusive_time`,qt=`sentry.is_localhost`,Jt=`sentry.op`,Yt=`sentry.origin`,Xt=`sentry.profile_id`,Zt=`sentry.segment.name.source`,Qt=`user_agent.original`,$t=[`ok`,`deadline_exceeded`,`unauthenticated`,`permission_denied`,`not_found`,`resource_exhausted`,`invalid_argument`,`unimplemented`,`unavailable`,`internal_error`,`unknown_error`,`cancelled`,`already_exists`,`failed_precondition`,`aborted`,`out_of_range`,`data_loss`];function en(e){return e!==`ok`&&$t.includes(e)}function tn(e){if(e){if(typeof e==`object`&&`deref`in e&&typeof e.deref==`function`)try{return e.deref()}catch{return}return e}}var nn=`_sentryScope`,rn=`_sentryIsolationScope`;function an(e){let t=e;return{scope:t[nn],isolationScope:tn(t[rn])}}function on(e){let t=sn(e);if(!t)return;let n=Object.entries(t).reduce((e,[t,n])=>{if(t.startsWith(`sentry-`)){let r=t.slice(7);e[r]=n}return e},{});if(Object.keys(n).length>0)return n}function sn(e){if(e&&(w(e)||Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>{let n=cn(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):cn(e)}function cn(e){return e.split(`,`).map(e=>{let t=e.indexOf(`=`);return t===-1?[]:[e.slice(0,t),e.slice(t+1)].map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})}).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}var ln=/^o(\d+)\./,un=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function dn(e){return e===`http`||e===`https`}function V(e,t=!1){let{host:n,path:r,pass:i,port:a,projectId:o,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:``}@${n}${a?`:${a}`:``}/${r&&`${r}/`}${o}`}function fn(e){let t=un.exec(e);if(!t){l(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,i=``,a=``,o=``,s=``]=t.slice(1),c=``,u=s,d=u.split(`/`);if(d.length>1&&(c=d.slice(0,-1).join(`/`),u=d.pop()),u){let e=u.match(/^\d+/);e&&(u=e[0])}return pn({host:a,pass:i,path:c,projectId:u,port:o,protocol:n,publicKey:r})}function pn(e){return{protocol:e.protocol,publicKey:e.publicKey||``,pass:e.pass||``,host:e.host,port:e.port||``,path:e.path||``,projectId:e.projectId}}function mn(t){if(!e)return!0;let{port:n,projectId:r,protocol:i}=t;return[`protocol`,`publicKey`,`host`,`projectId`].find(e=>!t[e]&&(_.error(`Invalid Sentry Dsn: ${e} missing`),!0))?!1:r.match(/^\d+$/)?dn(i)?n&&isNaN(parseInt(n,10))?(_.error(`Invalid Sentry Dsn: Invalid port ${n}`),!1):!0:(_.error(`Invalid Sentry Dsn: Invalid protocol ${i}`),!1):(_.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function hn(e){let t=e.match(ln);return t==null?void 0:t[1]}function gn(e){let t=e.getOptions(),{host:n}=e.getDsn()||{},r;return t.orgId?r=String(t.orgId):n&&(r=hn(n)),r}function _n(e){let t=typeof e==`string`?fn(e):pn(e);if(t&&mn(t))return t}function vn(e){if(typeof e==`boolean`)return Number(e);let t=typeof e==`string`?parseFloat(e):e;if(!(typeof t!=`number`||isNaN(t)||t<0||t>1))return t}var yn=`span`;function bn(e){return tn(e.refs[yn])}function xn(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:Tn(e).parent_span_id,a=an(e).scope;return{parent_span_id:i,span_id:r?(a==null?void 0:a.getPropagationContext().propagationSpanId)||xt():t,trace_id:n}}function Sn(e){if(e&&e.length>0)return e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:i})=>({span_id:e,trace_id:t,sampled:n===1,attributes:i,...r}))}function Cn(e){return typeof e==`number`?wn(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?wn(e.getTime()):P()}function wn(e){return e>9999999999?e/1e3:e}function Tn(e){if(kn(e))return e.getStaticSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(On(e)){let{attributes:r,startTime:i,name:a,endTime:o,status:s,links:c}=e;return{span_id:t,trace_id:n,data:r,description:a,parent_span_id:En(e),start_timestamp:Cn(i),timestamp:Cn(o)||void 0,status:jn(s),op:r[Jt],origin:r[Yt],links:Sn(c)}}return{span_id:t,trace_id:n,start_timestamp:0,status:`ok`,data:{}}}function En(e){var t;return`parentSpanId`in e?e.parentSpanId:`parentSpanContext`in e?(t=e.parentSpanContext)==null?void 0:t.spanId:void 0}function Dn(e){var t;return{...e,end_timestamp:e.end_timestamp??e.start_timestamp,attributes:zt(e.attributes),links:(t=e.links)==null?void 0:t.map(e=>({...e,attributes:zt(e.attributes)}))}}function On(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function kn(e){return typeof e.getSpanJSON==`function`}function An(e){let{traceFlags:t}=e.spanContext();return t===1}function jn(e){return!e||e.code===0||e.code===1?`ok`:e.message&&en(e.message)?e.message:`internal_error`}var Mn=`_sentryRootSpan`,Nn=Pn;function Pn(e){return e[Mn]||e}function Fn(e){let t=It(r());return t.getActiveSpan?t.getActiveSpan(e):bn(e||R())}function In(e){var t;if(typeof __SENTRY_TRACING__==`boolean`&&!__SENTRY_TRACING__)return!1;let n=e||((t=B())==null?void 0:t.getOptions());return!!n&&(n.tracesSampleRate!=null||!!n.tracesSampler)}function Ln(e){_.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function Rn(t,n){if(!(n!=null&&n.length))return!1;for(let r of n){if(Vn(r)){if(t.description&&Qe(t.description,r))return e&&Ln(t),!0;continue}let n=!!r.attributes&&Object.keys(r.attributes).length>0;if(!r.name&&!r.op&&!n)continue;let i=!r.name||t.description&&Qe(t.description,r.name),a=!r.op||t.op&&Qe(t.op,r.op),o=!r.attributes||Object.entries(r.attributes).every(([e,n])=>{var r;return zn((r=t.attributes)==null?void 0:r[e],n)});if(i&&a&&o)return e&&Ln(t),!0}return!1}function zn(e,t){return typeof e==`string`&&(typeof t==`string`||t instanceof RegExp)?Qe(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function Bn(e,t){let n=t.parent_span_id,r=t.span_id;if(n)for(let t of e)t.parent_span_id===r&&(t.parent_span_id=n)}function Vn(e){return typeof e==`string`||e instanceof RegExp}var Hn=[];function Un(e){let t={};return e.forEach(e=>{let{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}function Wn(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(e=>{e.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n==`function`){let e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return Un(r)}function Gn(e,t){let n={};return t.forEach(t=>{t!=null&&t.beforeSetup&&t.beforeSetup(e)}),t.forEach(t=>{t&&qn(e,t,n)}),n}function Kn(e,t){for(let n of t)n!=null&&n.afterAllSetup&&n.afterAllSetup(e)}function qn(t,n,r){if(r[n.name])e&&_.log(`Integration skipped because it was already installed: ${n.name}`);else{if(r[n.name]=n,!Hn.includes(n.name)&&typeof n.setupOnce==`function`&&(n.setupOnce(),Hn.push(n.name)),n.setup&&typeof n.setup==`function`&&n.setup(t),typeof n.preprocessEvent==`function`){let e=n.preprocessEvent.bind(n);t.on(`preprocessEvent`,(n,r)=>e(n,r,t))}if(typeof n.processEvent==`function`){let e=n.processEvent.bind(n),r=Object.assign((n,r)=>e(n,r,t),{id:n.name});t.addEventProcessor(r)}[`processSpan`,`processSegmentSpan`].forEach(e=>{let r=n[e];typeof r==`function`&&t.on(e,e=>r.call(n,e,t))}),e&&_.log(`Integration installed: ${n.name}`)}}function H(e){return e}var Jn=`production`,Yn=Symbol.for(`sentry.nonRecordingSpan`);function Xn(e){return!!e&&e[Yn]===!0}var Zn=`_frozenDsc`;function Qn(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||`production`,release:n.release,public_key:r,trace_id:e,org_id:gn(t)};return t.emit(`createDsc`,i),i}function $n(e,t){if(Vt())return;let n=t.getPropagationContext();return n.dsc||Qn(n.traceId,e)}function er(e){let t=B();if(!t)return{};let n=Nn(e),r=Tn(n),i=r.data,a=n.spanContext().traceState,o=(a==null?void 0:a.get(`sentry.sample_rate`))??i[`sentry.sample_rate`]??i[`sentry.previous_trace_sample_rate`];function s(e){return(typeof o==`number`||typeof o==`string`)&&(e.sample_rate=`${o}`),e}let c=n[Zn];if(c)return s(c);let l=Xn(n),u=l&&n.dropReason===`ignored`;if(l&&(!In(t.getOptions())||u)){let e=an(n).scope,r=e&&$n(t,e);if(r){let e={...r};return u&&(e.sampled=`false`),s(e)}}let d=a==null?void 0:a.get(`sentry.dsc`),f=d&&on(d);if(f)return s(f);let p=Qn(e.spanContext().traceId,t),m=i[Zt],h=r.description;if(m!==`url`&&h&&(p.transaction=h),In()){var g;p.sampled=String(An(n)),p.sample_rand=(a==null?void 0:a.get(`sentry.sample_rand`))??((g=an(n).scope)==null?void 0:g.getPropagationContext().sampleRand.toString())}return s(p),t.emit(`createDsc`,p,n),p}function tr(e,t){let{fingerprint:n,breadcrumbs:r,sdkProcessingMetadata:i}=t;ar(e,t),lr(e,n),or(e,r),sr(e,i)}function nr(e,t){let{extra:n,tags:r,attributes:i,user:a,contexts:o,level:s,sdkProcessingMetadata:c,breadcrumbs:l,fingerprint:u,eventProcessors:d,attachments:f,propagationContext:p,transactionName:m}=t;rr(e,`extra`,n),rr(e,`tags`,r),rr(e,`attributes`,i),rr(e,`user`,a),rr(e,`contexts`,o),e.sdkProcessingMetadata=yt(e.sdkProcessingMetadata,c,2),s&&(e.level=s),m&&(e.transactionName=m),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...p}}function rr(e,t,n){e[t]=yt(e[t],n,1)}function ir(e,t){let n=Ht().getScopeData();return e&&nr(n,e.getScopeData()),t&&nr(n,t.getScopeData()),n}function ar(e,t){let{extra:n,tags:r,user:i,contexts:a,level:o,transactionName:s}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(i).length&&(e.user={...i,...e.user}),Object.keys(a).length&&(e.contexts={...a,...e.contexts}),o&&(e.level=o),s&&e.type!==`transaction`&&(e.transaction=s)}function or(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function sr(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function cr(e,t){e.contexts={trace:xn(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:er(t),...e.sdkProcessingMetadata};let n=Tn(Nn(t)).description;n&&!e.transaction&&e.type===`transaction`&&(e.transaction=n)}function lr(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}function ur(e,t,n){let r;try{r=t()}catch(t){return dr(e,t,n)}return De(r)?r.then(void 0,t=>dr(e,t,n)):r}function dr(t,n,r){return e&&_.error(t,n),r(n)}function fr(e){return!!e&&typeof e==`function`&&`_static`in e&&!!e._static}function pr(t,n){return ur(e?"The `beforeSendSpan` callback threw an error, sending the span unmodified:":``,()=>n(t),()=>t)||t}function mr(e){return Dn({trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,name:e.description||``,start_timestamp:e.start_timestamp,end_timestamp:e.timestamp,status:!e.status||e.status===`ok`||e.status===`cancelled`?`ok`:`error`,is_segment:!1,attributes:{...e.data},links:e.links})}function hr(e,t){let n=e.attributes??={};Object.entries(t).forEach(([e,t])=>{t!=null&&!(e in n)&&(n[e]=t)})}function gr(e){return e.getOptions().traceLifecycle===`stream`}function _r(e){return typeof e==`object`&&typeof e.unref==`function`&&e.unref(),e}function U(e,t=[]){return[e,t]}function vr(e,t){let[n,r]=e;return[n,[...r,t]]}function yr(e,t){let n=e[1];for(let e of n){let n=e[0].type;if(t(e,n))return!0}return!1}function br(e,t){return yr(e,(e,n)=>t.includes(n))}function xr(e){let n=i(t);return n.encodePolyfill?n.encodePolyfill(e):new TextEncoder().encode(e)}function Sr(e){let[t,n]=e,r=JSON.stringify(t);function i(e){typeof r==`string`?r=typeof e==`string`?r+e:[xr(r),e]:r.push(typeof e==`string`?xr(e):e)}for(let e of n){let[t,n]=e;if(i(`
6
- ${JSON.stringify(t)}
7
- `),typeof n==`string`||n instanceof Uint8Array)i(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(A(n))}i(e)}}return typeof r==`string`?r:Cr(r)}function Cr(e){let t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}function wr(e){let t=typeof e.data==`string`?xr(e.data):e.data;return[{type:`attachment`,length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var Tr={sessions:`session`,event:`error`,client_report:`internal`,user_report:`default`,profile_chunk:`profile`,replay_event:`replay`,replay_recording:`replay`,check_in:`monitor`,raw_security:`security`,log:`log_item`,metric:`trace_metric`};function Er(e){return e in Tr}function Dr(e){return Er(e)?Tr[e]:e}function Or(e){if(!(e!=null&&e.sdk))return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function kr(e,t,n,r){var i;let a=(i=e.sdkProcessingMetadata)==null?void 0:i.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(k()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:V(r)},...a&&{trace:a}}}function Ar(e){return e===`replay_event`?`replay`:e||`error`}function jr(){return typeof __SENTRY_BROWSER_BUNDLE__<`u`&&!!__SENTRY_BROWSER_BUNDLE__}function Mr(){return`npm`}function Nr(){return!jr()&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`}function Pr(){return typeof window<`u`&&(!Nr()||Fr())}function Fr(){let e=t.process;return(e==null?void 0:e.type)===`renderer`}function Ir(e,t){let n=t.getDataCollectionOptions().userInfo?`auto`:`never`;return[{type:`span`,item_count:e.length,content_type:`application/vnd.sentry.items.span.v2+json`},{version:2,ingest_settings:Pr()?{infer_ip:n,infer_user_agent:n}:void 0,items:e}]}var Lr=new WeakMap;function Rr(e){return T(e)?void 0:e}function zr(e,t,n){var r;let i=Rr(t.originalException),a=i&&Lr.get(i);if(!a)return;let o=(r=e.contexts)==null?void 0:r.trace;((o==null?void 0:o.trace_id)??(n&&Wt(n).trace_id))===a.trace_id&&(e.contexts={...e.contexts,trace:{...o,...a}})}function Br(e,t){var n,r,i,a;if(!t)return e;let o=e.sdk||{};return e.sdk={...o,name:o.name||t.name,version:o.version||t.version,integrations:[...((n=e.sdk)==null?void 0:n.integrations)||[],...t.integrations||[]],packages:[...((r=e.sdk)==null?void 0:r.packages)||[],...t.packages||[]],settings:(i=e.sdk)!=null&&i.settings||t.settings?{...(a=e.sdk)==null?void 0:a.settings,...t.settings}:void 0},e}function Vr(e,t,n,r){let i=Or(n);return U({sent_at:new Date(k()).toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:V(t)}},[`aggregates`in e?[{type:`sessions`},e]:[{type:`session`},e.toJSON()]])}function Hr(e,t,n,r){let i=Or(n),a=e.type&&e.type!==`replay_event`?e.type:`event`;Br(e,n==null?void 0:n.sdk);let o=kr(e,i,r,t);return delete e.sdkProcessingMetadata,U(o,[[{type:a},e]])}var Ur=0,Wr=1,Gr=2;function Kr(e){return new Jr(t=>{t(e)})}function qr(e){return new Jr((t,n)=>{n(e)})}var Jr=class e{constructor(e){this._state=Ur,this._handlers=[],this._runExecutor(e)}then(t,n){return new e((e,r)=>{this._handlers.push([!1,n=>{if(!t)e(n);else try{e(t(n))}catch(e){r(e)}},t=>{if(!n)r(t);else try{e(n(t))}catch(e){r(e)}}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(t){return new e((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)})})}_executeHandlers(){if(this._state===Ur)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||=(this._state===Wr&&e[1](this._value),this._state===Gr&&e[2](this._value),!0)})}_runExecutor(e){let t=(e,t)=>{this._state===Ur&&(De(t)?t.then(n,r):(this._state=e,this._value=t,this._executeHandlers()))},n=e=>{t(Wr,e)},r=e=>{t(Gr,e)};try{e(n,r)}catch(e){r(e)}}};function Yr(e,t,n,r=0,i){try{let a=Xr(t,n,e,r,i);return De(a)?a:Kr(a)}catch(e){return qr(e)}}function Xr(t,n,r,i,a){let o=r[i];if(!t||!o)return t;let s=`Event processor "${o.id||`?`}"`,c=!1,l=ur(e?`${s} threw an error, dropping event:`:``,()=>o({...t},n),()=>(c=!0,null));return e&&l===null&&_.log(`${s} dropped event`),De(l)?l.then(e=>e?Xr(e,n,r,i+1,a):(a==null||a(c?`callback_error`:`event_processor`),null)):l?Xr(l,n,r,i+1,a):(a==null||a(c?`callback_error`:`event_processor`),null)}var W,Zr,Qr,G;function $r(e){let n=t._sentryDebugIds,r=t._debugIds;if(!n&&!r)return{};let i=n?Object.keys(n):[],a=r?Object.keys(r):[];if(G&&i.length===Zr&&a.length===Qr)return G;Zr=i.length,Qr=a.length,G={},W||={};let o=(t,n)=>{for(let r of t){let t=n[r],i=W==null?void 0:W[r];if(i&&G&&t)G[i[0]]=t,W&&(W[r]=[i[0],t]);else if(t){let n=e(r);for(let e=n.length-1;e>=0;e--){let i=n[e],a=i==null?void 0:i.filename;if(a&&G&&W){G[a]=t,W[r]=[a,t];break}}}}};return n&&o(i,n),r&&o(a,r),G}function ei(e){var t;return((t=e.data)==null?void 0:t.__sentry__)===!0}function ti(e){let t=[];e.message&&t.push(e.message);try{let n=e.exception.values[e.exception.values.length-1];n!=null&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function ni(e,t,n,r,i,a){var o;let{normalizeDepth:s=3,normalizeMaxBreadth:c=1e3}=e,l={...t,event_id:t.event_id||n.event_id||j(),timestamp:t.timestamp||ft()},u=n.integrations||e.integrations.map(e=>e.name);ri(l,e),oi(l,u),i&&i.emit(`applyFrameMetadata`,t),t.type===void 0&&ii(l,e.stackParser);let d=ci(r,n.captureContext);n.mechanism&&at(l,n.mechanism);let f=i?i.getEventProcessors():[],p=ir(a,d),m=[...n.attachments||[],...p.attachments];m.length&&(n.attachments=m),tr(l,p);let h=Fn(d);h&&cr(l,h),zr(l,n,d);let g=[...f,...p.eventProcessors],ee=t.type===`transaction`,_=((o=t.spans)==null?void 0:o.length)||0;return(ei(n)?Kr(l):Yr(g,l,n,0,e=>{i&&(i.recordDroppedEvent(e,Ar(t.type)),ee&&i.recordDroppedEvent(e,`span`,1+_))})).then(e=>{if(!e)return null;if(ee&&i){var t;let n=_-(((t=e.spans)==null?void 0:t.length)||0);n>0&&i.recordDroppedEvent(`event_processor`,`span`,n)}return ai(e),typeof s==`number`&&s>0?si(e,s,c):e})}function ri(e,t){let{environment:n,release:r,dist:i,maxValueLength:a}=t;e.environment=e.environment||n||`production`,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i);let o=e.request;if(o!=null&&o.url&&a&&(o.url=Xe(o.url,a)),a){var s;(s=e.exception)==null||(s=s.values)==null||s.forEach(e=>{e.value&&=Xe(e.value,a)})}}function ii(e,t){var n;let r=$r(t);(n=e.exception)==null||(n=n.values)==null||n.forEach(e=>{var t;(t=e.stacktrace)==null||(t=t.frames)==null||t.forEach(e=>{e.filename&&(e.debug_id=r[e.filename])})})}function ai(e){var t;let n={};if((t=e.exception)==null||(t=t.values)==null||t.forEach(e=>{var t;(t=e.stacktrace)==null||(t=t.frames)==null||t.forEach(e=>{e.debug_id&&(e.abs_path?n[e.abs_path]=e.debug_id:e.filename&&(n[e.filename]=e.debug_id),delete e.debug_id)})}),Object.keys(n).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let r=e.debug_meta.images;Object.entries(n).forEach(([e,t])=>{r.push({type:`sourcemap`,code_file:e,debug_id:t})})}function oi(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function si(e,t,n){var r,i;if(!e)return null;let a={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:A(e.data,t,n)}}))},...e.user&&{user:A(e.user,t,n)},...e.contexts&&{contexts:A(e.contexts,t,n)},...e.extra&&{extra:A(e.extra,t,n)}};return(r=e.contexts)!=null&&r.trace&&a.contexts&&(a.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(a.contexts.trace.data=A(e.contexts.trace.data,t,n))),e.spans&&(a.spans=e.spans.map(e=>({...e,...e.data&&{data:A(e.data,t,n)}}))),(i=e.contexts)!=null&&i.flags&&a.contexts&&(a.contexts.flags=A(e.contexts.flags,3,n)),a}function ci(e,t){if(!t)return e;let n=e?e.clone():new I;return n.update(t),n}function li(e){if(e)return ui(e)||fi(e)?{captureContext:e}:e}function ui(e){return e instanceof I||typeof e==`function`}var di=[`user`,`level`,`extra`,`contexts`,`tags`,`fingerprint`,`propagationContext`];function fi(e){return Object.keys(e).some(e=>di.includes(e))}function pi(e,t){return R().captureException(e,li(t))}function mi(e,t){return R().captureEvent(e,t)}function hi(e){let n=z(),{user:r}=ir(n,R()),{userAgent:i}=t.navigator||{},a=gt({user:r,...i&&{userAgent:i},...e}),o=n.getSession();return(o==null?void 0:o.status)===`ok`&&F(o,{status:`exited`}),gi(),n.setSession(a),a}function gi(){let e=z(),t=R().getSession()||e.getSession();t&&_t(t),_i(),e.setSession()}function _i(){let e=z(),t=B(),n=e.getSession();n&&t&&t.captureSession(n)}function vi(e=!1){e?gi():_i()}function yi(e){let t=e.protocol?`${e.protocol}:`:``,n=e.port?`:${e.port}`:``;return`${t}//${e.host}${n}${e.path?`/${e.path}`:``}/api/`}function bi(e){return`${yi(e)}${e.projectId}/envelope/`}function xi(e,t){let n={sentry_version:`7`};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function Si(e,t,n){return t||`${bi(e)}?${xi(e,n)}`}function Ci(e,t){let n=t?`auto`:`never`;return[{type:`log`,item_count:e.length,content_type:`application/vnd.sentry.items.log+json`},{version:2,...Pr()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function wi(e,t,n,r,i){let a={};return t!=null&&t.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=V(r)),U(a,[Ci(e,i)])}function Ti(e,t){let n=t??Ei(e)??[];if(n.length===0)return;let r=e.getOptions(),i=wi(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);Di().set(e,[]),e.emit(`flushLogs`),e.sendEnvelope(i)}function Ei(e){return Di().get(e)}function Di(){return a(`clientToLogBufferMap`,()=>new WeakMap)}function Oi(e,t){let n=t?`auto`:`never`;return[{type:`trace_metric`,item_count:e.length,content_type:`application/vnd.sentry.items.trace-metric+json`},{version:2,...Pr()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function ki(e,t,n,r,i){let a={};return t!=null&&t.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=V(r)),U(a,[Oi(e,i)])}function Ai(e,t){let n=t??ji(e)??[];if(n.length===0)return;let r=e.getOptions(),i=ki(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);Mi().set(e,[]),e.emit(`flushMetrics`),e.sendEnvelope(i)}function ji(e){return Mi().get(e)}function Mi(){return a(`clientToMetricBufferMap`,()=>new WeakMap)}function Ni(e,t){var n,r;if(e.type!==`transaction`||!((n=e.spans)!=null&&n.length)||!((r=e.sdkProcessingMetadata)!=null&&r.hasGenAiSpans)||gr(t))return;let i=[],a=[];for(let t of e.spans){var o;(o=t.op)!=null&&o.startsWith(`gen_ai.`)?i.push(mr(t)):a.push(t)}if(i.length!==0)return e.spans=a,Ir(i,t)}var Pi=Symbol.for(`SentryBufferFullError`);function Fi(e=100){let t=new Set;function n(){return t.size<e}function r(e){t.delete(e)}function i(e){if(!n())return qr(Pi);let i=e();return t.add(i),i.then(()=>r(i),()=>r(i)),i}function a(e){if(!t.size)return Kr(!0);let n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;let r=[n,new Promise(t=>_r(setTimeout(()=>t(!1),e)))];return Promise.race(r)}return{get $(){return Array.from(t)},add:i,drain:a}}var Ii=6e4;function Li(e,t=k()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?Ii:r-t}function Ri(e,t){return e[t]||e.all||0}function zi(e,t,n=k()){return Ri(e,t)>n}function Bi(e,{statusCode:t,headers:n},r=k()){let i={...e},a=n==null?void 0:n[`x-sentry-rate-limits`],o=n==null?void 0:n[`retry-after`];if(a)for(let e of a.trim().split(`,`)){let[t,n,,,a]=e.split(`:`,5),o=parseInt(t,10),s=(isNaN(o)?60:o)*1e3;if(!n)i.all=r+s;else for(let e of n.split(`;`))e===`metric_bucket`?(!a||a.split(`;`).includes(`custom`))&&(i[e]=r+s):i[e]=r+s}else o?i.all=r+Li(o,r):t===429&&(i.all=r+6e4);return i}function Vi(t,n,r=Fi(t.bufferSize||64)){let i={},a=e=>r.drain(e);function o(e,[n,r],i){let a=Dr(i);if(i===`transaction`){var o;t.recordDroppedEvent(e,`span`,(((o=r.spans)==null?void 0:o.length)??0)+1)}t.recordDroppedEvent(e,a,typeof n.item_count==`number`?n.item_count:1)}function s(t){let a=[];if(yr(t,(e,t)=>{zi(i,Dr(t))?o(`ratelimit_backoff`,e,t):a.push(e)}),a.length===0)return Promise.resolve({});let s=U(t[0],a),c=t=>{br(s,[`client_report`])?e&&_.warn(`Dropping client report. Will not send outcomes (reason: ${t}).`):yr(s,(e,n)=>{o(t,e,n)})};return r.add(()=>n({body:Sr(s)}).then(t=>t.statusCode===413?(e&&_.error(`Sentry responded with status code 413. Envelope was discarded due to exceeding size limits.`),c(`send_error`),t):(e&&t.statusCode!==void 0&&(t.statusCode<200||t.statusCode>=300)&&_.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),i=Bi(i,t),t),t=>{throw c(`network_error`),e&&_.error(`Encountered error running transport request:`,t),t})).then(e=>e,t=>{if(t===Pi)return e&&_.error(`Skipped sending event because buffer is full.`),c(`queue_overflow`),Promise.resolve({});throw t})}return{send:s,flush:a}}function Hi(e,t,n){let r=[{type:`client_report`},{timestamp:n||ft(),discarded_events:e}];return U(t?{dsn:t}:{},[r])}function Ui(e){var t;let{trace_id:n,parent_span_id:r,span_id:i,status:a,origin:o,data:s,op:c}=((t=e.contexts)==null?void 0:t.trace)??{};return{data:s??{},description:e.transaction,op:c,parent_span_id:r,span_id:i??``,start_timestamp:e.start_timestamp??0,status:a??`ok`,timestamp:e.timestamp,trace_id:n??``,origin:o,profile_id:s==null?void 0:s[Xt],exclusive_time:s==null?void 0:s[Kt],measurements:e.measurements,is_segment:!0}}function Wi(e){return{type:`transaction`,timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{"sentry.profile_id":e.profile_id},...e.exclusive_time&&{"sentry.exclusive_time":e.exclusive_time}}}},measurements:e.measurements}}function Gi(e){var t;e.traceLifecycle===`stream`&&(e.beforeSendTransaction||(t=e.ignoreTransactions)!=null&&t.length)&&l(()=>{console.warn("[Sentry] `beforeSendTransaction` and `ignoreTransactions` are ignored with `traceLifecycle: 'stream'` (enabled by default). Use `beforeSendSpan` and `ignoreSpans` instead, or set `traceLifecycle: 'static'`.")})}var K={userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:[`incomingRequest`,`outgoingRequest`,`incomingResponse`,`outgoingResponse`],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},mcp:{inputs:!0,outputs:!0},databaseQueryData:!0,queues:!0,stackFrameVariables:!0,frameContextLines:5};function Ki(e){return typeof e==`boolean`||`allow`in e||`deny`in e}function qi(e){return e===void 0?{...K.httpHeaders}:Ki(e)?{request:e,response:e}:{request:e.request??K.httpHeaders.request,response:e.response??K.httpHeaders.response}}function Ji(e){var t,n,r,i,a,o;let s=e.dataCollection??{};return{userInfo:s.userInfo??K.userInfo,cookies:s.cookies??K.cookies,httpHeaders:qi(s.httpHeaders),httpBodies:s.httpBodies??K.httpBodies,urlQueryParams:s.urlQueryParams??K.urlQueryParams,graphQL:{document:((t=s.graphQL)==null?void 0:t.document)??K.graphQL.document,variables:((n=s.graphQL)==null?void 0:n.variables)??K.graphQL.variables},genAI:{inputs:((r=s.genAI)==null?void 0:r.inputs)??K.genAI.inputs,outputs:((i=s.genAI)==null?void 0:i.outputs)??K.genAI.outputs},mcp:{inputs:((a=s.mcp)==null?void 0:a.inputs)??K.mcp.inputs,outputs:((o=s.mcp)==null?void 0:o.outputs)??K.mcp.outputs},databaseQueryData:s.databaseQueryData??K.databaseQueryData,queues:s.queues??K.queues,stackFrameVariables:s.stackFrameVariables??K.stackFrameVariables,frameContextLines:s.frameContextLines??K.frameContextLines}}var Yi=`Not capturing exception because it's already been captured.`,Xi=`Discarded session because of missing or non-string release`,Zi=Symbol.for(`SentryInternalError`),Qi=Symbol.for(`SentryDoNotSendEventError`),$i=5e3,ea=Symbol.for(`SentryClosedClient`);function ta(e){return ea in e}function na(e){return{message:e,[Zi]:!0}}function ra(e){return{message:e,[Qi]:!0}}function ia(e){return ra(`Discarding event because it's not included in the random sample (sampling rate = ${e})`)}function aa(e){return we(e)&&Zi in e}function oa(e){return we(e)&&Qi in e}function sa(e,t,n,r,i){let a=0,o,s=!1;e.on(n,()=>{a=0,clearTimeout(o),s=!1}),e.on(t,t=>{if(a+=r(t),a>=8e5)i(e);else if(!s){let t=e.getOptions()._flushInterval??$i;t>0&&(s=!0,o=_r(setTimeout(()=>{i(e)},t)))}}),e.on(`flush`,()=>{i(e)})}var ca=class{constructor(t){var n;this._options={attachStacktrace:!0,...t,traceLifecycle:t.traceLifecycle===`static`?`static`:`stream`},this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Fi(((n=t.transportOptions)==null?void 0:n.bufferSize)??64),this._dataCollection=Ji(t),this._unhandledSessionStatus=`crashed`,t.dsn?this._dsn=_n(t.dsn):e&&_.warn(`No DSN provided, client will not send events.`);let{beforeSendSpan:r,traceLifecycle:i}=this._options;if(e&&r&&fr(r)!==(i===`static`)&&l(()=>{console.warn(`Ignoring \`beforeSendSpan\`: ${i===`static`?`wrap it with`:`remove`} \`Sentry.withStaticSpan\` to use it with \`traceLifecycle: "${i}"\`.`)}),this._dsn){let e=Si(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:e})}sa(this,`afterCaptureLog`,`flushLogs`,pa,Ti),sa(this,`afterCaptureMetric`,`flushMetrics`,fa,Ai)}captureException(t,n,r){let i=j();if(st(t))return e&&_.log(Yi),i;let a={event_id:i,...n};return this._process(()=>this.eventFromException(t,a).then(e=>this._captureEvent(e,a,r)).then(e=>e),`error`),a.event_id}captureMessage(e,t,n,r){let i={event_id:j(),...n},a=Se(e)?e:String(e),o=T(e),s=o?this.eventFromMessage(a,t,i):this.eventFromException(e,i);return this._process(()=>s.then(e=>this._captureEvent(e,i,r)),o?`unknown`:`error`),i.event_id}captureEvent(t,n,r){let i=j();if(n!=null&&n.originalException&&st(n.originalException))return e&&_.log(Yi),i;let a={event_id:i,...n},o=t.sdkProcessingMetadata||{},s=o.capturedSpanScope,c=o.capturedSpanIsolationScope,l=Ar(t.type);return this._process(()=>this._captureEvent(t,a,s||r,c),l),a.event_id}captureSession(e){this.sendSession(e),F(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getDataCollectionOptions(){return this._dataCollection}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(e){let t=this._transport;if(this.emit(`flush`),!t)return!0;let n=await this._isClientDoneProcessing(e),r=await t.flush(e);return n&&r}async close(e){Object.defineProperty(this,ea,{value:!0});let t=await this.flush(e);return this.getOptions().enabled=!1,this.emit(`close`),t}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith(`Spotlight`)))&&(this._setupIntegrations(),Gi(this._options))}getIntegrationByName(e){return this._integrations[e]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(e){let t=this._integrations[e.name];!t&&e.beforeSetup&&e.beforeSetup(this),qn(this,e,this._integrations),t||Kn(this,[e])}sendEvent(e,t={}){this.emit(`beforeSendEvent`,e,t);let n=Ni(e,this),r=Hr(e,this._dsn,this._options._metadata,this._options.tunnel);if(!ei(t))for(let e of t.attachments||[])r=vr(r,wr(e));n&&(r=vr(r,n)),this.sendEnvelope(r).then(t=>this.emit(`afterSendEvent`,e,t))}sendSession(t){let{release:n,environment:r=Jn}=this._options;if(`aggregates`in t){let i=t.attrs||{};if(!i.release&&!n){e&&_.warn(Xi);return}i.release=i.release||n,i.environment=i.environment||r,t.attrs=i}else{if(!t.release&&!n){e&&_.warn(Xi);return}t.release=t.release||n,t.environment=t.environment||r}this.emit(`beforeSendSession`,t);let i=Vr(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(i)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){let i=`${t}:${n}`;e&&_.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:``}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}on(e,t){let n=this._hooks[e]=this._hooks[e]||new Set,r=(...e)=>t(...e);return n.add(r),()=>{n.delete(r)}}emit(e,...t){let n=this._hooks[e];n&&n.forEach(e=>e(...t))}async sendEnvelope(t){if(this.emit(`beforeEnvelope`,t),this._isEnabled()&&this._transport)try{let e=await this._transport.send(t);return this.emit(`afterEnvelope`,t),e}catch(t){return e&&_.error(`Error while sending envelope:`,t),{}}return e&&_.error(`Transport disabled`),{}}registerCleanup(e){}dispose(){}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=Gn(this,e),Kn(this,e)}_updateSessionFromEvent(e,t){var n;let r=t.level===`fatal`,i=!1,a=(n=t.exception)==null?void 0:n.values;if(a){i=!0,r=!1;for(let e of a){var o;if(((o=e.mechanism)==null?void 0:o.handled)===!1){r=!0;break}}}let s=e.status===`ok`;(s&&e.errors===0||s&&r)&&(F(e,{...r&&{status:this._unhandledSessionStatus},errors:e.errors||Number(i||r)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(e=>setTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,n,r){let i=this.getOptions(),a=this.getIntegrationNames();return!t.integrations&&a.length&&(t.integrations=a),this.emit(`preprocessEvent`,e,t),e.type||r.setLastEventId(e.event_id||t.event_id),ni(i,e,t,n,this,r).then(e=>{var r;return e===null||(this.emit(`postprocessEvent`,e,t),e.contexts={trace:{...(r=e.contexts)==null?void 0:r.trace,...Wt(n)},...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:$n(this,n),...e.sdkProcessingMetadata}),e})}_captureEvent(t,n={},r=R(),i=z()){return e&&ua(t)&&_.log(`Captured error event \`${ti(t)[0]||`<unknown>`}\``),this._processEvent(t,n,r,i).then(e=>e.event_id,t=>{e&&(oa(t)?_.log(t.message):aa(t)?_.warn(t.message):_.warn(t))})}_processEvent(e,t,n,r){let i=this.getOptions(),{sampleRate:a}=i,o=da(e),s=ua(e),c=`before send for type \`${e.type||`error`}\``,l=`before_send`,u=0,d=a===void 0?void 0:vn(a),f=s&&typeof d==`number`&&Ie()>d,p=Ar(e.type),m=0,h=n.getSession()||r.getSession();return f&&(h==null?void 0:h.status)!==`ok`?(this.recordDroppedEvent(`sample_rate`,`error`),qr(ia(a))):this._prepareEvent(e,t,n,r).then(e=>{var n;if(e===null)throw ra("An event processor returned `null`, will not send event.");return m=((n=e.spans)==null?void 0:n.length)||0,ei(t)?e:la(i,e,t,e=>{l=e},e=>{u=e})}).then(n=>{if(u&&this.recordDroppedEvent(`ignored`,`span`,u),!Ce(n)||n===null)throw this.recordDroppedEvent(l,p),o&&this.recordDroppedEvent(l,`span`,1+m-u),n===null?ra(`${l===`ignored`?"Transaction matched `ignoreSpans`":`${c} ${l===`callback_error`?`threw an error`:"returned `null`"}`}, will not send event.`):na(`${c} must return \`null\` or a valid event.`);if(s&&h&&this._updateSessionFromEvent(h,n),f)throw this.recordDroppedEvent(`sample_rate`,`error`),ia(a);if(o){var r;let e=m-u-(((r=n.spans)==null?void 0:r.length)||0);e>0&&this.recordDroppedEvent(`before_send`,`span`,e)}let i=n.transaction_info;return o&&i&&n.transaction!==e.transaction&&(n.transaction_info={...i,source:`custom`}),this.sendEvent(n,t),n}).then(null,e=>{throw oa(e)||aa(e)?e:(this.captureException(e,{mechanism:{handled:!1,type:`internal`},data:{__sentry__:!0},originalException:e}),na(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
8
- Reason: ${e}`))})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===Pi&&this.recordDroppedEvent(`queue_overflow`,t),e))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{let[n,r]=e.split(`:`);return{reason:n,category:r,quantity:t}})}_flushOutcomes(){e&&_.log(`Flushing outcomes...`);let t=this._clearOutcomes();if(t.length===0){e&&_.log(`No outcomes to send`);return}if(!this._dsn){e&&_.log(`No dsn provided, will not send outcomes`);return}e&&_.log(`Sending outcomes:`,t);let n=Hi(t,this._options.tunnel&&V(this._dsn));this.sendEnvelope(n)}};function la(t,n,r,i,a){let{beforeSend:o,ignoreSpans:s,beforeSendTransaction:c}=t,l=fr(t.beforeSendSpan)&&t.beforeSendSpan,u=n;if(ua(u)&&o){let t=u;return ur(e?"The `beforeSend` callback threw an error, dropping the event:":``,()=>o(t,r),()=>(i(`callback_error`),null))}if(da(u)){if(l||s){let e=Ui(u);if(s!=null&&s.length&&Rn({description:e.description,op:e.op,attributes:e.data},s))return i(`ignored`),null;if(l&&(u=yt(n,Wi(pr(e,l)))),u.spans){let e=[],t=u.spans;for(let n of t)s!=null&&s.length&&Rn({description:n.description,op:n.op,attributes:n.data},s)?Bn(t,n):l?e.push(pr(n,l)):e.push(n);a(t.length-e.length),u.spans=e}}if(c)return ur(e?"The `beforeSendTransaction` callback threw an error, dropping the event:":``,()=>c(u,r),()=>(i(`callback_error`),null))}return u}function ua(e){return e.type===void 0}function da(e){return e.type===`transaction`}function fa(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+ma(e.attributes)}function pa(e){let t=0;return e.message&&(t+=e.message.length*2),t+ma(e.attributes)}function ma(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*ha(e[0]):T(e)?t+=ha(e):t+=100}),t}function ha(e){return typeof e==`string`?e.length*2:typeof e==`number`?8:typeof e==`boolean`?4:0}function ga(t,n){n.debug===!0&&(e?_.enable():l(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),va(),R().update(n.initialScope);let r=new t(n);return ya(r),r.init(),r}function _a(){let e=B();return e&&!ta(e)?e:void 0}function va(){_a()&&l(()=>{console.warn("[Sentry] `Sentry.init()` was called more than once. The new client replaces the active client, but the active client is not closed, so state from both can mix. Call `Sentry.init()` only once, or call `await Sentry.close()` before you call it again.")})}function ya(e){R().setClient(e)}var ba=`[Filtered]`,xa=[`auth`,`token`,`secret`,`session`,`password`,`passwd`,`pwd`,`key`,`jwt`,`bearer`,`sso`,`saml`,`csrf`,`xsrf`,`credentials`,`sid`,`identity`,`set-cookie`,`cookie`];function Sa(e,t){return t.some(t=>e.includes(t))}function Ca(e,t,n){if(t===!1)return!0;let r=e.toLowerCase();if(Sa(r,n==null?xa:[...xa,...n]))return!0;if(t===!0)return!1;let i=(`deny`in t?t.deny:t.allow).some(e=>r.includes(e.toLowerCase()));return`deny`in t?i:!i}function wa(e,t,n){if(t===!1)return{};let r={};for(let i of Object.keys(e))r[i]=Ca(i,t,n)?ba:e[i];return r}function Ta(e,t){if(e&&t!==!1)return e.split(`&`).map(e=>{let n=e.indexOf(`=`),r=n===-1?e:e.slice(0,n),i=new URLSearchParams(`${r}=`).keys().next().value;return i!==void 0&&Ca(i,t)?`${r}=${ba}`:e}).join(`&`)}function Ea(e,t){let n=e.indexOf(`#`),r=n===-1?e.length:n,i=e.indexOf(`?`);if(i===-1||i>r)return e;let a=e.slice(0,i),o=e.slice(i+1,r),s=e.slice(r),c=Ta(o,t);return c?`${a}?${c}${s}`:`${a}${s}`}function Da(e){var t;return((t=e??B())==null?void 0:t.getDataCollectionOptions().urlQueryParams)??!0}function q(e,t){return e===void 0?void 0:Ea(e,Da(t))}function Oa(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||``,r=t[8]||``;return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function ka(e,t=!0){if(e.startsWith(`data:`)){let n=e.match(/^data:([^;,]+)/),r=n?n[1]:`text/plain`,i=e.includes(`;base64,`),a=e.indexOf(`,`),o=``;if(t&&a!==-1){let t=e.slice(a+1);o=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${i?`,base64`:``}${o?`,${o}`:``}`}return e}function Aa(e){var t;let n=e?_n(e):(t=B())==null?void 0:t.getDsn();return n?`/${Ma(V(n)).toString(36)}`:void 0}function ja(e){let t=(e!=null&&e.startsWith(`./`)?e.slice(1):e??``).replace(/\/$/,``);return!t||t.startsWith(`/`)?t:`/${t}`}function Ma(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function Na(e){if(`aggregates`in e){var t;((t=e.attrs)==null?void 0:t.ip_address)===void 0&&(e.attrs={...e.attrs,ip_address:`{{auto}}`})}else e.ipAddress===void 0&&(e.ipAddress=`{{auto}}`)}function Pa(e,t,r=[t],i=`npm`){let a=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};a.name||(a.name=`sentry.javascript.${t}`,a.packages=r.map(e=>({name:`${i}:@sentry/${e}`,version:n})),a.version=n)}var Fa=100;function J(t,n){let r=B(),i=z();if(!r)return;let{beforeBreadcrumb:a=null,maxBreadcrumbs:o=Fa}=r.getOptions();if(o<=0)return;let s={timestamp:ft(),...t},c=a?ur(e?"The `beforeBreadcrumb` callback threw an error, dropping the breadcrumb:":``,()=>l(()=>a(s,n)),()=>null):s;c!==null&&(r.emit&&r.emit(`beforeAddBreadcrumb`,c,n),i.addBreadcrumb(c,o))}var Ia=`FunctionToString`,La=new WeakMap,Ra=H((()=>({name:Ia,setupOnce(){let e=Function.prototype.toString;try{Function.prototype.toString=function(...t){let n=je(this),r;try{La.has(B())&&n!==void 0&&(r=n)}catch{}return e.apply(r??this,t)}}catch{}},setup(e){La.set(e,!0)}}))),za=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/Java exception was raised during method invocation$/,/Java object is gone$/],Ba=`EventFilters`,Va=H((e={})=>{let t;return{name:Ba,setup(n){t=Ha(e,n.getOptions())},processEvent(n,r,i){return t||=Ha(e,i.getOptions()),Ua(n,t)?null:n}}});function Ha(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:za],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function Ua(t,n){if(!t.type){if(Wa(t,n.ignoreErrors))return e&&_.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
9
- Event: ${M(t)}`),!0;if(Xa(t))return e&&_.warn(`Event dropped due to not having an error message, error type or stacktrace.
10
- Event: ${M(t)}`),!0;if(Ka(t,n.denyUrls))return e&&_.warn(`Event dropped due to being matched by \`denyUrls\` option.
11
- Event: ${M(t)}.
12
- Url: ${Ya(t)}`),!0;if(!qa(t,n.allowUrls))return e&&_.warn(`Event dropped due to not being matched by \`allowUrls\` option.
13
- Event: ${M(t)}.
14
- Url: ${Ya(t)}`),!0}else if(t.type===`transaction`&&Ga(t,n.ignoreTransactions))return e&&_.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
15
- Event: ${M(t)}`),!0;return!1}function Wa(e,t){return t!=null&&t.length?ti(e).some(e=>$e(e,t)):!1}function Ga(e,t){if(!(t!=null&&t.length))return!1;let n=e.transaction;return n?$e(n,t):!1}function Ka(e,t){if(!(t!=null&&t.length))return!1;let n=Ya(e);return n?$e(n,t):!1}function qa(e,t){if(!(t!=null&&t.length))return!0;let n=Ya(e);return!n||$e(n,t)}function Ja(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==`<anonymous>`&&n.filename!==`[native code]`)return n.filename||null}return null}function Ya(t){try{var n,r;let e=[...((n=t.exception)==null?void 0:n.values)??[]].reverse().find(e=>{var t,n;return((t=e.mechanism)==null?void 0:t.parent_id)===void 0&&((n=e.stacktrace)==null||(n=n.frames)==null?void 0:n.length)}),i=e==null||(r=e.stacktrace)==null?void 0:r.frames;return i?Ja(i):null}catch{return e&&_.error(`Cannot extract url for event ${M(t)}`),null}}function Xa(e){var t;return(t=e.exception)!=null&&(t=t.values)!=null&&t.length?!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&e.type!==`Error`||e.value):!1}function Za(e,t,n,r,i,a){var o;if(!((o=i.exception)!=null&&o.values)||!a||!S(a.originalException))return;let s=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;s&&(i.exception.values=Qa(e,t,r,a.originalException,n,i.exception.values,s,0))}function Qa(e,t,n,r,i,a,o,s){if(a.length>=n+1)return a;let c=[...a];if(S(r[i])){to(o,s,r);let a=e(t,r[i]),l=c.length;no(a,i,l,s),c=Qa(e,t,n,r[i],i,[a,...c],a,l)}return $a(r)&&r.errors.forEach((a,l)=>{if(S(a)){to(o,s,r);let u=e(t,a),d=c.length;no(u,`errors[${l}]`,d,s),c=Qa(e,t,n,a,i,[u,...c],u,d)}}),eo(r)&&[`error`,`suppressed`].forEach(a=>{let l=r[a];if(S(l)){to(o,s,r);let u=e(t,l),d=c.length;no(u,a,d,s),c=Qa(e,t,n,l,i,[u,...c],u,d)}}),c}function $a(e){return Array.isArray(e.errors)}function eo(e){return`error`in e&&`suppressed`in e}function to(e,t,n){e.mechanism={handled:!0,type:`auto.core.linked_errors`,...$a(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function no(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:`chained`,source:t,exception_id:n,parent_id:r}}function ro(e){return S(e)&&`__sentry_fetch_url_host__`in e&&typeof e.__sentry_fetch_url_host__==`string`}function io(e){return ro(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}var ao=new Set([]);function oo(e){let t=`console`,n=y(t,e);return b(t,lo),n}function so(e){for(let t of e)ao.add(t);return()=>{for(let t of e)ao.delete(t)}}var co=new Set;function lo(){`console`in t&&o.forEach(function(n){!co.has(n)&&n in t.console&&(co.add(n),E(t.console,n,function(r){return c[n]=r,function(...r){let i=r[0],a=c[n],o=ao.size&&typeof i==`string`&&$e(i,ao);o||x(`console`,{args:r,level:n}),(!o||e&&_.isEnabled())&&(a==null||a.apply(t.console,r))}}))})}function uo(e){return e===`warn`?`warning`:[`fatal`,`error`,`warning`,`log`,`info`,`debug`].includes(e)?e:`log`}var fo=`Dedupe`,po=H((()=>{let t;return{name:fo,processEvent(n){if(n.type)return n;try{if(mo(n,t))return e&&_.warn(`Event dropped due to being a duplicate of previously captured event.`),null}catch{}return t=n}}}));function mo(e,t){return t?!!(ho(e,t)||go(e,t)):!1}function ho(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!vo(e,t)||!_o(e,t))}function go(e,t){let n=yo(t),r=yo(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!vo(e,t)||!_o(e,t))}function _o(e,t){let n=le(e),r=le(t);if(!n||!r)return!n&&!r;if(r.length!==n.length)return!1;for(let e=0;e<r.length;e++){let t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function vo(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n||!r)return!n&&!r;try{return n.join(``)===r.join(``)}catch{return!1}}function yo(e){var t;return(t=e.exception)==null||(t=t.values)==null?void 0:t[0]}var bo=`Console`,xo=H((e={})=>{let t=new Set(e.levels||o);return{name:bo,setup(n){let r=oo(({args:e,level:r})=>{B()===n&&t.has(r)&&So(r,e)});if(n.registerCleanup(r),e.filter){let t=so(e.filter);n.registerCleanup(t)}}}});function So(e,t){let n={category:`console`,data:{arguments:t,logger:`console`},level:uo(e),message:Co(t)};if(e===`assert`){if(t[0]===!1){let e=t.slice(1);n.message=e.length>0?`Assertion failed: ${Co(e)}`:`Assertion failed`,n.data.arguments=e}else return}J(n,{input:t,level:e})}function Co(e){return`util`in t&&typeof t.util.format==`function`?t.util.format(...e):Ze(e,` `)}var wo=`ConversationId`,To=H((()=>({name:wo,setup(e){e.on(`spanStart`,e=>{let t=R().getScopeData(),n=z().getScopeData(),r=t.conversationId||n.conversationId;if(r){let{op:t,data:n,description:i}=Tn(e);if(!(t!=null&&t.startsWith(`gen_ai.`))&&!n[`ai.operationId`]&&!(i!=null&&i.startsWith(`ai.`)))return;e.setAttribute(Gt,r)}})}}))),Eo=t;function Do(){if(!(`fetch`in Eo))return!1;try{return new Headers,new Request(`data:,`),new Response,!0}catch{return!1}}function Oo(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function ko(){if(typeof EdgeRuntime==`string`)return!0;if(!Do())return!1;if(Oo(Eo.fetch))return!0;let t=!1,n=Eo.document;if(n&&typeof n.createElement==`function`)try{var r;let e=n.createElement(`iframe`);e.hidden=!0,n.head.appendChild(e),(r=e.contentWindow)!=null&&r.fetch&&(t=Oo(e.contentWindow.fetch)),n.head.removeChild(e)}catch(t){e&&_.warn(`Could not create sandbox iframe for pure fetch check, bailing to window.fetch: `,t)}return t}function Ao(e){let t=`fetch`,n=y(t,e);return b(t,()=>jo()),n}function jo(e){(!Pr()||ko())&&E(t,`fetch`,function(n){return new Proxy(n,{apply(n,r,i){let a=Error(),{method:o,url:s}=Po(i),c={args:i,fetchData:{method:o,url:s},startTimestamp:P()*1e3,virtualError:a,headers:Fo(i)};return e||x(`fetch`,{...c}),Reflect.apply(n,t,i).then(async t=>(e?e(t):x(`fetch`,{...c,endTimestamp:P()*1e3,response:t}),t),e=>{x(`fetch`,{...c,endTimestamp:P()*1e3,error:e}),S(e)&&e.stack===void 0&&(e.stack=a.stack,D(e,`framesToPop`,1));let n=B(),r=(n==null?void 0:n.getOptions().enhanceFetchErrorMessages)??`always`;if(r!==!1&&S(e)&&e.name===`TypeError`&&(e.message===`Failed to fetch`||e.message===`Load failed`||e.message===`NetworkError when attempting to fetch resource.`))try{var i;let n=new URL(c.fetchData.url,(i=t.location)==null?void 0:i.href).host;n&&(r===`always`?e.message=`${e.message} (${n})`:D(e,`__sentry_fetch_url_host__`,n))}catch{}throw e})}})})}function Mo(e,t){return we(e)&&!!e[t]}function No(e){return typeof e==`string`?e:e?Mo(e,`url`)?e.url:e.toString?e.toString():``:``}function Po(e){if(e.length===0)return{method:`GET`,url:``};if(e.length===2){let[t,n]=e;return{url:No(t),method:Mo(n,`method`)?String(n.method).toUpperCase():ke(t)&&Mo(t,`method`)?String(t.method).toUpperCase():`GET`}}let t=e[0];return{url:No(t),method:Mo(t,`method`)?String(t.method).toUpperCase():`GET`}}function Fo(e){let[t,n]=e;try{if(typeof n==`object`&&n&&`headers`in n&&n.headers)return new Headers(n.headers);if(ke(t))return new Headers(t.headers)}catch{}}function Io(e){if(e!==void 0){if(e>=400&&e<500)return`warning`;if(e>=500)return`error`}}var Lo=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,Y=t,Ro=80,X={};try{typeof Node<`u`&&(X.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,`parentNode`).get),typeof Element<`u`&&(X.tagName=Object.getOwnPropertyDescriptor(Element.prototype,`tagName`).get,X.id=Object.getOwnPropertyDescriptor(Element.prototype,`id`).get,X.className=Object.getOwnPropertyDescriptor(Element.prototype,`className`).get,X.getAttribute=Element.prototype.getAttribute),typeof HTMLElement<`u`&&(X.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,`dataset`).get)}catch{}function Z(e,t,n){let r=X[t];if(r)try{return r.call(e,n)}catch{}let i=e[t];return typeof i==`function`?i.call(e,n):i}function zo(e,t={}){if(!e)return`<unknown>`;try{let n=e,r=[],i=0,a=0,o,s=Array.isArray(t)?t:t.keyAttrs,c=Array.isArray(t)?void 0:t.maskAttributeFn,l=!Array.isArray(t)&&t.maxStringLength||Ro;for(;n&&i++<5&&(o=Bo(n,s,c),!(o===`html`||i>1&&a+r.length*3+o.length>=l));)r.push(o),a+=o.length,n=Z(n,`parentNode`);return r.reverse().join(` > `)}catch{return`<unknown>`}}function Bo(e,t,n){let r=[],i=Z(e,`tagName`);if(!i)return``;if(typeof HTMLElement<`u`&&e instanceof HTMLElement){let t=Z(e,`dataset`);if(t){if(t.sentryComponent)return n?n(`data-sentry-component`,t.sentryComponent,e):t.sentryComponent;if(t.sentryElement)return n?n(`data-sentry-element`,t.sentryElement,e):t.sentryElement}}r.push(i.toLowerCase());let a=t!=null&&t.length?t.filter(t=>Z(e,`getAttribute`,t)).map(t=>[t,Z(e,`getAttribute`,t)]):null;if(a!=null&&a.length)a.forEach(([t,i])=>{r.push(`[${t}="${n&&i?n(t,i,e):i}"]`)});else{let t=Z(e,`id`);t&&r.push(`#${n?n(`id`,t,e):t}`);let i=Z(e,`className`);if(i&&w(i)){let t=(n?n(`class`,i,e):i).split(/\s+/);for(let e of t)r.push(`.${e}`)}}for(let t of[`aria-label`,`type`,`name`,`title`,`alt`]){let i=Z(e,`getAttribute`,t);i&&r.push(`[${t}="${n?n(t,i,e):i}"]`)}return r.join(``)}function Vo(e,t,n){Y.document&&Y.addEventListener(e,t,n)}function Ho(e,t,n){Y.document&&Y.removeEventListener(e,t,n)}var Uo=e=>{var t;let n=Y.requestIdleCallback||Y.setTimeout;if(((t=Y.document)==null?void 0:t.visibilityState)===`hidden`)e();else{let t=!1,r=()=>{t||=(e(),!0)};Vo(`visibilitychange`,r,{once:!0,capture:!0}),n(()=>{r(),Ho(`visibilitychange`,r,{capture:!0})})}};function Wo(e,n=5){if(!t.HTMLElement)return null;let r=e;for(let e=0;e<n;e++){if(!r)return null;if(r instanceof HTMLElement){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}r=r.parentNode}return null}function Go(){try{var e;return((e=Y.document)==null?void 0:e.location.href)??``}catch{return``}}var Ko=new WeakMap;function qo(e,t=B()){t?(Lo&&Jo(t)&&_.warn(`A route provider is already registered for this client and will be replaced. Routes only the previous provider knows about will no longer resolve.`),Ko.set(t,e)):Lo&&_.warn(`Cannot set a route provider without a client.`)}function Jo(e=B()){return e&&Ko.get(e)}var Yo=1e3,Xo,Zo,Qo;function $o(e){return typeof e==`boolean`?e:!!(e!=null&&e.capture)}function es(e){y(`dom`,e),b(`dom`,ts)}function ts(){if(!Y.document)return;let e=x.bind(null,`dom`),t=is(e,!0);Y.document.addEventListener(`click`,t,!1),Y.document.addEventListener(`keypress`,t,!1),[`EventTarget`,`Node`].forEach(t=>{var n,r;let i=(n=Y[t])==null?void 0:n.prototype;i!=null&&(r=i.hasOwnProperty)!=null&&r.call(i,`addEventListener`)&&(E(i,`addEventListener`,function(t){return function(n,r,i){if((n===`click`||n==`keypress`)&&r)try{let a=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},o=a[n]=a[n]||{captureListeners:new WeakSet,bubbleListeners:new WeakSet,listenerCount:0},s=$o(i);if(!o.handler){let r=is(e);o.handler=r,o.capture=s,t.call(this,n,r,o.capture)}let c=o[s?`captureListeners`:`bubbleListeners`];c.has(r)||(typeof i==`object`&&(i!=null&&i.once||i!=null&&i.signal)?o.sticky=!0:(c.add(r),o.listenerCount++))}catch{}return t.call(this,n,r,i)}}),E(i,`removeEventListener`,function(e){return function(t,n,r){if((t===`click`||t==`keypress`)&&n)try{let i=this.__sentry_instrumentation_handlers__||{},a=i[t];a!=null&&a[$o(r)?`captureListeners`:`bubbleListeners`].delete(n)&&(!--a.listenerCount&&!a.sticky&&(e.call(this,t,a.handler,a.capture),a.handler=void 0,delete i[t]),Object.keys(i).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function ns(e){if(e.type!==Zo)return!1;try{if(!e.target||e.target._sentryId!==Qo)return!1}catch{}return!0}function rs(e,t){return e===`keypress`?t!=null&&t.tagName?!(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable):!0:!1}function is(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=as(n);if(rs(n.type,r))return;D(n,`_sentryCaptured`,!0),r&&!r._sentryId&&D(r,`_sentryId`,j());let i=n.type===`keypress`?`input`:n.type;ns(n)||(e({event:n,name:i,global:t}),Zo=n.type,Qo=r?r._sentryId:void 0),clearTimeout(Xo),Xo=Y.setTimeout(()=>{Qo=void 0,Zo=void 0},Yo)}}function as(e){try{return e.target}catch{return null}}var os;function ss(){return`history`in Y&&!!Y.history}function cs(e){let t=`history`;y(t,e),b(t,ls)}function ls(){if(Y.addEventListener(`popstate`,()=>{let e=Y.location.href,t=os;os=e,t!==e&&x(`history`,{from:t,to:e})}),!ss())return;function e(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let r=os,i=us(String(n));if(os=i,r===i)return e.apply(this,t);x(`history`,{from:r,to:i})}return e.apply(this,t)}}E(Y.history,`pushState`,e),E(Y.history,`replaceState`,e)}function us(e){try{return new URL(e,Y.location.origin).toString()}catch{return e}}var ds={};function fs(e){let t=ds[e];if(t)return t;let n=Y[e];if(Oo(n))return ds[e]=n.bind(Y);let r=Y.document;if(r&&typeof r.createElement==`function`)try{let t=r.createElement(`iframe`);t.hidden=!0,r.head.appendChild(t);let i=t.contentWindow;i!=null&&i[e]&&(n=i[e]),r.head.removeChild(t)}catch(t){Lo&&_.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n&&(ds[e]=n.bind(Y))}function ps(e){ds[e]=void 0}var ms=`__sentry_xhr_v3__`;function hs(e){y(`xhr`,e),b(`xhr`,gs)}function gs(){if(!Y.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=Error(),i=P()*1e3,a=w(n[0])?n[0].toUpperCase():void 0,o=_s(n[1]);if(!a||!o)return e.apply(t,n);t[ms]={method:a,url:o,request_headers:{}},a===`POST`&&o.match(/sentry_key/)&&(t.__sentry_own_request__=!0);let s=()=>{let e=t[ms];if(e&&t.readyState===4){try{e.status_code=t.status}catch{}x(`xhr`,{endTimestamp:P()*1e3,startTimestamp:i,xhr:t,virtualError:r}),r=void 0,t.removeEventListener(`readystatechange`,s)}};return`onreadystatechange`in t&&typeof t.onreadystatechange==`function`?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply(e,t,n){return s(),e.apply(t,n)}}):t.addEventListener(`readystatechange`,s),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){let[r,i]=n,a=t[ms];return a&&w(r)&&w(i)&&(a.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){let r=t[ms];return r&&(n[0]!==void 0&&(r.body=n[0]),x(`xhr`,{startTimestamp:P()*1e3,xhr:t})),e.apply(t,n)}})}function _s(e){if(w(e))return e;try{return e.toString()}catch{}}function vs(e){if(typeof Element>`u`)return!1;try{return e instanceof Element}catch{return!1}}var Q=t,ys=0,bs=[];function xs(e){if(ys>0)return!0;let t=e?bs.findIndex(t=>Ss(t,e)):-1;return t!==-1&&(bs.splice(t,1),!0)}function Ss(e,t){return e.msg===t.msg&&e.url===t.url&&e.line===t.line&&e.column===t.column}function Cs(){ys++,setTimeout(()=>{ys--})}function $(e,n={}){function r(e){return typeof e==`function`}if(!r(e))return e;try{if(Object.prototype.hasOwnProperty.call(e,`__sentry_wrapped__`)){let t=e.__sentry_wrapped__;return typeof t==`function`?t:e}if(je(e))return e}catch{return e}let i=function(...r){t._sentryWrappedDepth=(t._sentryWrappedDepth||0)+1;try{let t=r.map(e=>$(e,n));return e.apply(this,t)}catch(e){throw Cs(),Ut(t=>{t.addEventProcessor(e=>(n.mechanism&&(it(e,void 0,void 0),N(e,n.mechanism)),e.extra={...e.extra,arguments:r},e)),pi(e)}),e}finally{t._sentryWrappedDepth=(t._sentryWrappedDepth||0)-1}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t])}catch{}Ae(i,e),D(e,`__sentry_wrapped__`,i);try{Object.getOwnPropertyDescriptor(i,`name`).configurable&&Object.defineProperty(i,"name",{get(){return e.name}})}catch{}return i}function ws(e){let t=Go(),{referrer:n}=Q.document||{},{userAgent:r}=Q.navigator||{};return{url:t,headers:{...n&&{Referer:q(n,e)},...r&&{"User-Agent":r}}}}function Ts(e,t){let n=Os(e,t),r={type:Ns(t),value:Ps(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===``&&(r.value=`Unrecoverable error caught`),r}function Es(e,t,n,r){let i=B(),a=i==null?void 0:i.getOptions().normalizeDepth,o=Vs(t),s={__serialized__:Ue(t,a)};if(o)return{exception:{values:[Ts(e,o)]},extra:s};let c={exception:{values:[{type:Te(t)?t.constructor.name:r?`UnhandledRejection`:`Error`,value:zs(t,{isUnhandledRejection:r})}]},extra:s};if(n){let t=Os(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}function Ds(e,t){return{exception:{values:[Ts(e,t)]}}}function Os(e,t){let n=t.stacktrace||t.stack||``,r=As(t),i=js(t);try{return e(n,r,i)}catch{}return[]}var ks=/Minified React error #\d+;/i;function As(e){return e&&ks.test(e.message)?1:0}function js(e){return typeof e.framesToPop==`number`?e.framesToPop:0}function Ms(e){return typeof WebAssembly<`u`&&WebAssembly.Exception!==void 0&&e instanceof WebAssembly.Exception}function Ns(e){let t=e==null?void 0:e.name;return!t&&Ms(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:`WebAssembly.Exception`:t}function Ps(e){let t=e==null?void 0:e.message;return Ms(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:`wasm exception`:t?t.error&&typeof t.error.message==`string`?io(t.error):io(e):`No error message`}function Fs(e,t,n,r){let i=Ls(e,t,(n==null?void 0:n.syntheticException)||void 0,r);return N(i),i.level=`error`,n!=null&&n.event_id&&(i.event_id=n.event_id),Kr(i)}function Is(e,t,n=`info`,r,i){let a=Rs(e,t,(r==null?void 0:r.syntheticException)||void 0,i);return a.level=n,r!=null&&r.event_id&&(a.event_id=r.event_id),Kr(a)}function Ls(e,t,n,r,i){let a;if(ye(t)&&t.error)return Ds(e,t.error);if(be(t)||xe(t)){let i=t;if(`stack`in t){var o;a=Ds(e,t);let i=(o=a.exception)==null||(o=o.values)==null?void 0:o[0];if(r&&n&&i&&!i.stacktrace){let t=Os(e,n);t.length&&(i.stacktrace={frames:t},N(a,{synthetic:!0}))}}else{let t=i.name||(be(i)?`DOMError`:`DOMException`),o=i.message?`${t}: ${i.message}`:t;a=Rs(e,o,n,r),it(a,o)}return a}if(S(t))return Ds(e,t);if(Ce(t)||Te(t))return a=Es(e,t,n,i),N(a,{synthetic:!0}),a;let s=String(t);return a=Rs(e,s,n,r),it(a,s,void 0),N(a,{synthetic:!0}),a}function Rs(e,t,n,r){let i={};if(r&&n){let r=Os(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),N(i,{synthetic:!0})}if(Se(t)){let{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function zs(e,{isUnhandledRejection:t}){let n=Pe(e),r=t?`promise rejection`:`exception`;return ye(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Te(e)?`Event \`${Bs(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Bs(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Vs(e){return Object.values(e).find(S)}var Hs=class extends ca{constructor(e){var t;let n=Us(e);Pa(n,`browser`,[`browser`],Q.SENTRY_SDK_SOURCE||Mr()),super(n),n.routeProvider&&qo(n.routeProvider,this),this._unhandledSessionStatus=`unhandled`;let{userInfo:r}=this.getDataCollectionOptions();(t=n._metadata)!=null&&t.sdk&&(n._metadata.sdk.settings={infer_ip:r?`auto`:`never`,...n._metadata.sdk.settings});let{sendClientReports:i}=this._options,a=()=>{P()},o=[[Q.document,`visibilitychange`,()=>{a(),Q.document.visibilityState===`hidden`&&(i&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}],[Q.document,`freeze`,a],[Q.document,`resume`,a],[Q,`pagehide`,a],[Q,`pageshow`,a]];o.forEach(([e,t,n])=>{var r;return e==null||(r=e.addEventListener)==null?void 0:r.call(e,t,n)}),this.on(`close`,()=>o.forEach(([e,t,n])=>{var r;return e==null||(r=e.removeEventListener)==null?void 0:r.call(e,t,n)})),r&&this.on(`beforeSendSession`,Na)}eventFromException(e,t){return Fs(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t=`info`,n){return Is(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||`javascript`,super._prepareEvent(e,t,n,r)}};function Us(e){var t;return{release:typeof __SENTRY_RELEASE__==`string`?__SENTRY_RELEASE__:(t=Q.SENTRY_RELEASE)==null?void 0:t.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}var Ws=40;function Gs(e,t=fs(`fetch`)){let n=0,r=0;async function i(i){let a=i.body.length;n+=a,r++;let o={body:i.body,method:`POST`,referrerPolicy:`strict-origin`,headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{let n=await t(e.url,o);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get(`X-Sentry-Rate-Limits`),"retry-after":n.headers.get(`Retry-After`)}}}catch(e){throw ps(`fetch`),e}finally{n-=a,r--}}return Vi(e,i,Fi(e.bufferSize||Ws))}var Ks=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,qs=30,Js=50;function Ys(e,t,n,r){let i={filename:e,function:t===`<anonymous>`?`?`:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var Xs=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Zs=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Qs=/\((\S*)(?::(\d+))(?::(\d+))\)/,$s=/at (.+?) ?\(data:(.+?),/,ec=[qs,e=>{let t=e.match($s);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};let n=Xs.exec(e);if(n){let[,e,t,r]=n;return Ys(e,`?`,+t,+r)}let r=Zs.exec(e);if(r){var i;if(((i=r[2])==null?void 0:i.indexOf(`eval`))===0){let e=Qs.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}let[e,t]=ic(r[1]||`?`,r[2]);return Ys(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],tc=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,nc=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,rc=ie(ec,[Js,e=>{let t=tc.exec(e);if(t){if(t[3]&&t[3].indexOf(` > eval`)>-1){let e=nc.exec(t[3]);e&&(t[1]=t[1]||`eval`,t[3]=e[1],t[4]=e[2],t[5]=``)}let e=t[3],n=t[1]||`?`;return[n,e]=ic(n,e),Ys(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),ic=(e,t)=>{let n=e.indexOf(`safari-extension`)!==-1,r=e.indexOf(`safari-web-extension`)!==-1;return n||r?[e.indexOf(`@`)===-1?`?`:e.split(`@`)[0],n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},ac=1024,oc=`Breadcrumbs`,sc=H(((e={})=>{let t={dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:oc,setup(e){t.dom&&es(lc(e,t.dom)),t.xhr&&hs(uc(e)),t.fetch&&Ao(dc(e)),t.history&&cs(fc(e)),t.sentry&&e.on(`beforeSendEvent`,cc(e))}}}));function cc(e){return function(t){B()===e&&J({category:`sentry.${t.type===`transaction`?`transaction`:`event`}`,event_id:t.event_id,level:t.level,message:M(t)},{event:t})}}function lc(e,t){return function(n){if(B()!==e)return;let r,i,a=typeof t==`object`?t.serializeAttribute:void 0,o=typeof t==`object`&&typeof t.maxStringLength==`number`?t.maxStringLength:void 0;o&&o>ac&&(Ks&&_.warn(`\`dom.maxStringLength\` cannot exceed ${ac}, but a value of ${o} was configured. Sentry will use ${ac} instead.`),o=ac),typeof a==`string`&&(a=[a]);try{let e=n.event,t=pc(e)?e.target:e;r=zo(t,{keyAttrs:a,maxStringLength:o}),i=Wo(t)}catch{r=`<unknown>`}if(r.length===0)return;let s={category:`ui.${n.name}`,message:r};i&&(s.data={"ui.component_name":i}),J(s,{event:n.event,name:n.name,global:n.global})}}function uc(e){return function(t){if(B()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[ms];if(!n||!r||!i)return;let{method:a,url:o,status_code:s,body:c}=i,l={method:a,url:q(o),status_code:s},u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},d={category:`xhr`,data:l,type:`http`,level:Io(s)};e.emit(`beforeOutgoingRequestBreadcrumb`,d,u),J(d,u)}}function dc(e){return function(t){if(B()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(r&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method===`POST`)){if(t.error){let i={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},a={category:`fetch`,data:{...t.fetchData,url:q(t.fetchData.url)},level:`error`,type:`http`};e.emit(`beforeOutgoingRequestBreadcrumb`,a,i),J(a,i)}else{let i=t.response,a={...t.fetchData,url:q(t.fetchData.url),status_code:i==null?void 0:i.status},o={input:t.args,response:i,startTimestamp:n,endTimestamp:r},s={category:`fetch`,data:a,type:`http`,level:Io(a.status_code)};e.emit(`beforeOutgoingRequestBreadcrumb`,s,o),J(s,o)}}}}function fc(e){return function(t){if(B()!==e)return;let n=t.from,r=t.to,i=Oa(Q.location.href),a=n?Oa(n):void 0,o=Oa(r);a!=null&&a.path||(a=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===a.protocol&&i.host===a.host&&(n=a.relative),J({category:`navigation`,data:{from:q(n),to:q(r)}})}}function pc(e){return!!e&&!!e.target}var mc=`EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload`.split(`,`),hc=`BrowserApiErrors`,gc=H(((e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:hc,setupOnce(){t.setTimeout&&E(Q,`setTimeout`,_c),t.setInterval&&E(Q,`setInterval`,_c),t.requestAnimationFrame&&E(Q,`requestAnimationFrame`,vc),t.XMLHttpRequest&&`XMLHttpRequest`in Q&&E(XMLHttpRequest.prototype,`send`,yc);let e=t.eventTarget;e&&(Array.isArray(e)?e:mc).forEach(e=>bc(e,t))}}}));function _c(e){return function(...t){let n=t[0];return t[0]=$(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${v(e)}`}}),e.apply(this,t)}}function vc(e){return function(t){return e.apply(this,[$(t,{mechanism:{data:{handler:v(e)},handled:!1,type:`auto.browser.browserapierrors.requestAnimationFrame`}})])}}function yc(e){return function(...t){let n=this;return[`onload`,`onerror`,`onprogress`,`onreadystatechange`].forEach(e=>{e in n&&typeof n[e]==`function`&&E(n,e,function(t){let n={mechanism:{data:{handler:v(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=je(t);return r&&(n.mechanism.data.handler=v(r)),$(t,n)})}),e.apply(this,t)}}function bc(e,t){var n,r;let i=(n=Q[e])==null?void 0:n.prototype;i!=null&&(r=i.hasOwnProperty)!=null&&r.call(i,`addEventListener`)&&(E(i,`addEventListener`,function(n){return function(r,i,a){try{xc(i)&&(i.handleEvent=$(i.handleEvent,{mechanism:{data:{handler:v(i),target:e},handled:!1,type:`auto.browser.browserapierrors.handleEvent`}}))}catch{}return t.unregisterOriginalCallbacks&&Sc(this,r,i),n.apply(this,[r,$(i,{mechanism:{data:{handler:v(i),target:e},handled:!1,type:`auto.browser.browserapierrors.addEventListener`}}),a])}}),E(i,`removeEventListener`,function(e){return function(t,n,r){try{if(Object.prototype.hasOwnProperty.call(n,`__sentry_wrapped__`)){let i=n.__sentry_wrapped__;i&&e.call(this,t,i,r)}}catch{}return e.call(this,t,n,r)}}))}function xc(e){return typeof e.handleEvent==`function`}function Sc(e,t,n){e&&typeof e==`object`&&`removeEventListener`in e&&typeof e.removeEventListener==`function`&&e.removeEventListener(t,n)}var Cc=H((e={})=>{let t=e.lifecycle??`page`;return{name:`BrowserSession`,setupOnce(){if(Q.document===void 0){Ks&&_.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}hi({ignoreDuration:!0});let e=!1;Uo(()=>{e||=(vi(),!0)});let n=z(),r=n.getUser();n.addScopeListener(t=>{let n=t.getUser();((r==null?void 0:r.id)!==(n==null?void 0:n.id)||(r==null?void 0:r.ip_address)!==(n==null?void 0:n.ip_address))&&(r=n,e&&vi())}),t===`route`&&cs(({from:t,to:n})=>{t!==n&&(hi({ignoreDuration:!0}),vi(),e=!0)})}}}),wc=`CultureContext`,Tc=H((()=>({name:wc,preprocessEvent(e){let t=Ec();if(t){var n;e.contexts={...e.contexts,culture:{...t,...(n=e.contexts)==null?void 0:n.culture}}}},processSegmentSpan(e){let t=Ec();t&&hr(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}})));function Ec(){try{let e=Q.Intl;if(!e)return;let t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}var Dc=`GlobalHandlers`,Oc=H(((e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:Dc,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(kc(e),Pc(`onerror`)),t.onunhandledrejection&&(Ac(e),Pc(`onunhandledrejection`))}}}));function kc(e){pe(t=>{let{stackParser:n,attachStacktrace:r}=Fc();if(B()!==e||xs(t))return;let{msg:i,url:a,line:o,column:s,error:c}=t,l=Nc(Ls(n,c||i,void 0,r,!1),a,o,s);l.level=`error`,mi(l,{originalException:c,mechanism:{handled:!1,type:`auto.browser.global_handlers.onerror`}})})}function Ac(e){ge(t=>{let{stackParser:n,attachStacktrace:r}=Fc();if(B()!==e||xs())return;let i=jc(t),a=T(i)?Mc(i):Ls(n,i,void 0,r,!0);a.level=`error`,mi(a,{originalException:i,mechanism:{handled:!1,type:`auto.browser.global_handlers.onunhandledrejection`}})})}function jc(e){if(T(e))return e;try{if(`reason`in e)return e.reason;if(`detail`in e&&`reason`in e.detail)return e.detail.reason}catch{}return e}function Mc(e){return{exception:{values:[{type:`UnhandledRejection`,value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Nc(e,t,n,r){let i=e.exception=e.exception||{},a=i.values=i.values||[],o=a[0]=a[0]||{},s=o.stacktrace=o.stacktrace||{},c=s.frames=s.frames||[];return c.length===0&&c.push({colno:r,lineno:n,filename:Ic(t)??Go(),function:`?`,in_app:!0}),e}function Pc(e){Ks&&_.log(`Global Handler attached: ${e}`)}function Fc(){let e=B();return(e==null?void 0:e.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}function Ic(e){if(w(e)&&e.length!==0)return e.startsWith(`data:`)?`<${ka(e,!1)}>`:e}var Lc=H(()=>({name:`HttpContext`,preprocessEvent(e,t,n){var r;if(!Q.navigator&&!Q.location&&!Q.document)return;let{url:i,headers:a}=ws(n),o=n.getDataCollectionOptions().httpHeaders.request,s=Object.entries(((r=e.request)==null?void 0:r.headers)??{}).filter(([e])=>!(e in a)),c={...wa(a,o),...Object.fromEntries(s)};e.request={url:q(i,n),...e.request,...Object.keys(c).length>0?{headers:c}:{headers:void 0}}},processSpan(e,t){var n;if(!Q.navigator&&!Q.location&&!Q.document)return;let r=ws(t),i=wa(r.headers,t.getDataCollectionOptions().httpHeaders.request),a=i.Referer,{hostname:o,protocol:s}=Q.location||{};hr(e,{[Qt]:i[`User-Agent`],[qt]:s===`file:`||o===`localhost`||o===`127.0.0.1`||o===`[::1]`||!!(o!=null&&o.endsWith(`.localhost`)),...e.is_segment&&{"url.full":((n=e.attributes)==null?void 0:n[`sentry.op`])===`http.client`?void 0:q(r.url),"http.request.header.referer":a?[a]:void 0}})}})),Rc=`cause`,zc=5,Bc=`LinkedErrors`,Vc=H(((e={})=>{let t=e.limit||zc,n=e.key||Rc;return{name:Bc,preprocessEvent(e,r,i){Za(Ts,i.getOptions().stackParser,n,t,e,r)}}})),Hc=/^HTML(\w*)Element$/;function Uc(e){if(typeof window<`u`&&e===window)return`[Window]`;if(typeof document<`u`&&e===document)return`[Document]`;if(vs(e)){let t=Wc(e);if(Hc.test(t))return`[HTMLElement: ${zo(e)}]`}}function Wc(e){let t=Object.getPrototypeOf(e);return t!=null&&t.constructor?t.constructor.name:`null prototype`}function Gc(){return Kc()?(Ks&&l(()=>{console.error(`[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/`)}),!0):!1}function Kc(){var e;if(Q.window===void 0)return!1;let t=Q;if(t.nw)return!1;let n=t.chrome||t.browser;if(!(n!=null&&(e=n.runtime)!=null&&e.id))return!1;let r=Go();return!(Q===Q.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(r))}function qc(e){let{tunnel:t,dsn:n,transportOptions:r}=e;if(!t||typeof t==`string`)return{tunnel:t,transportOptions:r};let i=t===!0?{}:t,a=n&&_n(n),o=i.path??(a&&Aa(a));if(!o)return{tunnel:void 0,transportOptions:r};let s=`${ja(i.basePath)}${o}${i.trailingSlash?`/`:``}`;return Ks&&_.log(`Tunneling events to "${s}"`),{tunnel:s,transportOptions:{...r,headers:{"Content-Type":`application/x-sentry-envelope`,...r==null?void 0:r.headers}}}}function Jc(e){return[Va(),Ra(),To(),gc(),sc(),xo(),Oc(),Vc(),po(),Lc(),Tc(),Cc()]}function Yc(e={}){let t=!e.skipBrowserExtensionCheck&&Gc(),n=e.defaultIntegrations==null?Jc():e.defaultIntegrations,r=Wn({integrations:e.integrations,defaultIntegrations:n}),i={...e,...qc(e),enabled:!t&&e.enabled,stackParser:ae(e.stackParser||rc),integrations:r,transport:e.transport||Gs};return He(Uc),ga(Hs,i)}export{po as dedupeIntegration,R as getCurrentScope,Yc as init};