@nylas/react 1.4.5 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/abstract-provider-efe136bd-2041bdce.js +187 -0
- package/dist/abstract-provider-efe136bd-b4663c02.cjs +1 -0
- package/dist/add-circle-icon_2.entry-5204c48a.cjs +1 -0
- package/dist/add-circle-icon_2.entry-ea1692a4.js +26 -0
- package/dist/archive-icon.entry-0b585dff.js +16 -0
- package/dist/archive-icon.entry-c2c66bca.cjs +1 -0
- package/dist/{arrow-icon.entry-5bb183c1.js → arrow-icon.entry-2e61394e.js} +5 -5
- package/dist/arrow-icon.entry-9d471162.cjs +1 -0
- package/dist/{bold-icon.entry-c919c71d.cjs → bold-icon.entry-5c37622f.cjs} +1 -1
- package/dist/{bold-icon.entry-e0010c60.js → bold-icon.entry-8ef1b653.js} +2 -2
- package/dist/{button-component_2.entry-078ee06a.cjs → button-component_2.entry-8335ee1e.cjs} +1 -1
- package/dist/{button-component_2.entry-1dd1b8d6.js → button-component_2.entry-c906230f.js} +9 -9
- package/dist/calendar-agenda-fill-icon_36.entry-59c0a997.cjs +6 -0
- package/dist/{calendar-agenda-fill-icon_36.entry-772a70d7.js → calendar-agenda-fill-icon_36.entry-5f184433.js} +900 -881
- package/dist/{calendar-cancel-icon.entry-b791b6b1.cjs → calendar-cancel-icon.entry-65a4a34e.cjs} +1 -1
- package/dist/{calendar-cancel-icon.entry-7d1a7cea.js → calendar-cancel-icon.entry-dd6ac4db.js} +5 -5
- package/dist/{calendar-check-icon_2.entry-2380a4e6.cjs → calendar-check-icon_2.entry-ded15038.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-2b5711fd.js → calendar-check-icon_2.entry-f9b50bb8.js} +3 -3
- package/dist/{calendar-icon.entry-9b23c994.js → calendar-icon.entry-a2a1ddbc.js} +2 -2
- package/dist/{calendar-icon.entry-f88c8b09.cjs → calendar-icon.entry-ca512dd6.cjs} +1 -1
- package/dist/checkbox-component_2.entry-d6128246.js +115 -0
- package/dist/checkbox-component_2.entry-d79b5d1d.cjs +1 -0
- package/dist/checkbox-group_4.entry-2946c7ef.cjs +28 -0
- package/dist/{nylas-event-calendar_3.entry-cc428f95.js → checkbox-group_4.entry-e5145451.js} +1038 -923
- package/dist/{checkmark-icon_15.entry-3ddf90df.js → checkmark-icon_15.entry-6e92e93e.js} +21 -21
- package/dist/checkmark-icon_15.entry-a75a1825.cjs +5 -0
- package/dist/{chevron-icon_3.entry-af195326.js → chevron-icon_3.entry-6eaa3513.js} +16 -16
- package/dist/{chevron-icon_3.entry-a492d340.cjs → chevron-icon_3.entry-9193a885.cjs} +1 -1
- package/dist/{clock-icon_4.entry-7dc4324b.js → clock-icon_4.entry-2c93270e.js} +8 -8
- package/dist/{clock-icon_4.entry-530cd13b.cjs → clock-icon_4.entry-ae2272f4.cjs} +1 -1
- package/dist/constants-f51538ef-cd2a67c4.cjs +1 -0
- package/dist/{constants-3d8016e3-3c080f00.js → constants-f51538ef-e0a5f026.js} +27 -32
- package/dist/{customParseFormat-129be926-36eabae2.js → customParseFormat-edc38d83-b3722499.js} +1 -1
- package/dist/{customParseFormat-129be926-30b2af24.cjs → customParseFormat-edc38d83-fa9c77d9.cjs} +1 -1
- package/dist/{delete-icon.entry-3328484a.js → delete-icon.entry-6684eba6.js} +2 -2
- package/dist/{delete-icon.entry-9369bf78.cjs → delete-icon.entry-b9e4f2c7.cjs} +1 -1
- package/dist/{document-refresh-icon.entry-f45be1c4.cjs → document-refresh-icon.entry-7afe6163.cjs} +1 -1
- package/dist/document-refresh-icon.entry-fba9f60b.js +16 -0
- package/dist/{feedbackSync-d943ffc7-d1e98ba0.js → feedbackSync-e4378c0b-23289195.js} +811 -798
- package/dist/{feedbackSync-d943ffc7-13f01c1f.cjs → feedbackSync-e4378c0b-7876d067.cjs} +26 -26
- package/dist/{folder-icon.entry-c4ffba45.js → folder-icon.entry-430c6b47.js} +4 -4
- package/dist/{folder-icon.entry-48cfa8d0.cjs → folder-icon.entry-b1632bf3.cjs} +1 -1
- package/dist/{forward-icon.entry-dd036273.js → forward-icon.entry-5e53da76.js} +2 -2
- package/dist/{forward-icon.entry-146f3318.cjs → forward-icon.entry-7626dcca.cjs} +1 -1
- package/dist/{globe-icon_2.entry-d6a95f6e.js → globe-icon_2.entry-646eae41.js} +21 -21
- package/dist/{globe-icon_2.entry-049fbca2.cjs → globe-icon_2.entry-bbb0a6ce.cjs} +1 -1
- package/dist/{google-logo-icon_6.entry-e26385cc.js → google-logo-icon_6.entry-5951a546.js} +665 -455
- package/dist/google-logo-icon_6.entry-e39dd9cb.cjs +2 -0
- package/dist/{google-meet-icon_5.entry-c0129f58.js → google-meet-icon_5.entry-a54c83da.js} +14 -14
- package/dist/{google-meet-icon_5.entry-94112d7e.cjs → google-meet-icon_5.entry-c13e0738.cjs} +1 -1
- package/dist/inbox-icon.entry-7bee82b3.js +16 -0
- package/dist/inbox-icon.entry-911b047a.cjs +1 -0
- package/dist/index-71f61ea9.js +24544 -0
- package/dist/index-f769bc2a.cjs +118 -0
- package/dist/index.d.ts +1 -4
- package/dist/index.es-6a9d55cf-122c27e0.js +2724 -0
- package/dist/index.es-6a9d55cf-458ba0e0.cjs +7 -0
- package/dist/{info-icon_2.entry-8bcd39dc.cjs → info-icon_2.entry-471b836b.cjs} +1 -1
- package/dist/{info-icon_2.entry-ef5dbccc.js → info-icon_2.entry-6ff2f004.js} +3 -3
- package/dist/{input-component.entry-922063d5.js → input-component.entry-781b584c.js} +12 -12
- package/dist/{input-component.entry-cc1fb2fa.cjs → input-component.entry-b6a9b4cb.cjs} +1 -1
- package/dist/{input-dropdown_2.entry-4041c294.js → input-dropdown_2.entry-1feebcba.js} +4 -4
- package/dist/{input-dropdown_2.entry-f3750e99.cjs → input-dropdown_2.entry-c71d14ff.cjs} +1 -1
- package/dist/{italic-icon.entry-63b6943f.cjs → italic-icon.entry-16debde5.cjs} +1 -1
- package/dist/italic-icon.entry-9ef7f4a2.js +16 -0
- package/dist/{elements → lib/elements}/index.d.ts +1 -1
- package/dist/lib/index.d.ts +5 -0
- package/dist/lib/main.d.ts +0 -0
- package/dist/lib/notetaker/CalendarSync/CalendarSync.d.ts +37 -0
- package/dist/lib/notetaker/CalendarSync/CalendarSync.spec.d.ts +0 -0
- package/dist/lib/notetaker/SendNotetaker/SendNotetaker.d.ts +31 -0
- package/dist/lib/notetaker/SendNotetaker/SendNotetaker.spec.d.ts +1 -0
- package/dist/lib/notetaker/Transcript/Transcript.d.ts +23 -0
- package/dist/lib/notetaker/Transcript/Transcript.spec.d.ts +0 -0
- package/dist/lib/notetaker/VideoPlayer/VideoPlayer.d.ts +22 -0
- package/dist/lib/notetaker/VideoPlayer/VideoPlayer.spec.d.ts +1 -0
- package/dist/lib/notetaker/index.d.ts +9 -0
- package/dist/lib/notetaker/lib/constants.d.ts +12 -0
- package/dist/lib/notetaker/lib/http-client.d.ts +2 -0
- package/dist/lib/notetaker/lib/primitives.d.ts +66 -0
- package/dist/lib/notetaker/lib/store.d.ts +7 -0
- package/dist/lib/notetaker/types.d.ts +42 -0
- package/dist/multi-select-dropdown.entry-0a6f9417.cjs +1 -0
- package/dist/multi-select-dropdown.entry-1b27c746.js +121 -0
- package/dist/nylas-booked-event-card_11.entry-74fba802.cjs +1 -0
- package/dist/{nylas-booked-event-card_12.entry-7eceb6b6.js → nylas-booked-event-card_11.entry-802671ee.js} +469 -534
- package/dist/{nylas-form-card.entry-984be5f9.cjs → nylas-form-card.entry-59a837c9.cjs} +1 -1
- package/dist/{nylas-form-card.entry-dd3f240a.js → nylas-form-card.entry-7da9a312.js} +3 -3
- package/dist/nylas-notification_2.entry-8f8bad34.cjs +1 -0
- package/dist/nylas-notification_2.entry-b16bb805.js +85 -0
- package/dist/{nylas-scheduler-editor.entry-623da747.js → nylas-scheduler-editor.entry-cbe3e1e3.js} +201 -168
- package/dist/nylas-scheduler-editor.entry-e33e11fb.cjs +2 -0
- package/dist/nylas-scheduling.entry-4223e50b.cjs +1 -0
- package/dist/{nylas-scheduling.entry-6608aa36.js → nylas-scheduling.entry-6fb094a8.js} +295 -295
- package/dist/{person-icon.entry-9f0233cd.js → person-icon.entry-6232e6fd.js} +7 -7
- package/dist/{person-icon.entry-168ba481.cjs → person-icon.entry-beb26b48.cjs} +1 -1
- package/dist/play-icon.entry-16a1c1ac.js +16 -0
- package/dist/{play-icon.entry-4115845d.cjs → play-icon.entry-9060d0d8.cjs} +1 -1
- package/dist/{radio-button-group.entry-da3f23ac.js → radio-button-group.entry-5a3728cd.js} +2 -2
- package/dist/{radio-button-group.entry-3ae5f246.cjs → radio-button-group.entry-6935c39d.cjs} +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.js +135 -126
- package/dist/{refresh-icon.entry-13742bb5.cjs → refresh-icon.entry-2411b2e1.cjs} +1 -1
- package/dist/{refresh-icon.entry-e1db3ca5.js → refresh-icon.entry-4f56e72b.js} +2 -2
- package/dist/{register-component-083eb961-763c87e9.js → register-component-a1c3d7b4-774feacc.js} +1 -1
- package/dist/{register-component-083eb961-c5c48a1b.cjs → register-component-a1c3d7b4-97d7a6f5.cjs} +1 -1
- package/dist/{reply-all-icon.entry-9446c2d0.cjs → reply-all-icon.entry-b4b6926b.cjs} +1 -1
- package/dist/{reply-all-icon.entry-ded706c7.js → reply-all-icon.entry-b4b917ec.js} +2 -2
- package/dist/{reply-icon.entry-7c5c0fd9.js → reply-icon.entry-24f6f4c6.js} +5 -5
- package/dist/{reply-icon.entry-0d362c63.cjs → reply-icon.entry-454545ed.cjs} +1 -1
- package/dist/sent-icon.entry-d9a79336.cjs +1 -0
- package/dist/sent-icon.entry-fa59ce85.js +16 -0
- package/dist/spam-icon.entry-da39987e.cjs +1 -0
- package/dist/spam-icon.entry-fb18a08b.js +16 -0
- package/dist/{star-icon.entry-3a81207c.js → star-icon.entry-406472c1.js} +4 -4
- package/dist/{star-icon.entry-87823b56.cjs → star-icon.entry-833f35a7.cjs} +1 -1
- package/dist/{stop-icon.entry-472a11dc.js → stop-icon.entry-1b6ae838.js} +2 -2
- package/dist/{stop-icon.entry-ddf9242a.cjs → stop-icon.entry-3258db59.cjs} +1 -1
- package/dist/style.css +1 -0
- package/dist/test/vitest.setup.d.ts +0 -0
- package/dist/{textarea-component.entry-2c6c0c7e.cjs → textarea-component.entry-0ae18897.cjs} +1 -1
- package/dist/{textarea-component.entry-f9797150.js → textarea-component.entry-569a281e.js} +2 -2
- package/dist/{toggle-switch.entry-fbef6918.cjs → toggle-switch.entry-60d75f16.cjs} +1 -1
- package/dist/{toggle-switch.entry-a7cbc256.js → toggle-switch.entry-dc3f796b.js} +4 -4
- package/dist/{translate-icon.entry-0ab604fe.js → translate-icon.entry-297cf20f.js} +4 -4
- package/dist/{translate-icon.entry-2fe4868f.cjs → translate-icon.entry-c183ecb5.cjs} +1 -1
- package/dist/trash-fill-icon.entry-3d8a2e5e.js +16 -0
- package/dist/trash-fill-icon.entry-94d4f66c.cjs +1 -0
- package/dist/{underline-icon.entry-29366789.js → underline-icon.entry-4a9105c7.js} +2 -2
- package/dist/{underline-icon.entry-6a2ca451.cjs → underline-icon.entry-50d1e766.cjs} +1 -1
- package/package.json +41 -17
- package/dist/add-circle-icon_2.entry-55361a03.js +0 -26
- package/dist/add-circle-icon_2.entry-75a3df95.cjs +0 -1
- package/dist/archive-icon.entry-3c4e4b28.js +0 -16
- package/dist/archive-icon.entry-8aa151fd.cjs +0 -1
- package/dist/arrow-icon.entry-2cef5ca1.cjs +0 -1
- package/dist/calendar-agenda-fill-icon_36.entry-9b694a33.cjs +0 -6
- package/dist/checkbox-component.entry-94fd68e7.js +0 -43
- package/dist/checkbox-component.entry-af77c4fa.cjs +0 -1
- package/dist/checkmark-icon_15.entry-de65b967.cjs +0 -5
- package/dist/constants-3d8016e3-fd6c3848.cjs +0 -1
- package/dist/document-refresh-icon.entry-902ead30.js +0 -16
- package/dist/google-logo-icon_6.entry-4d9e06be.cjs +0 -2
- package/dist/inbox-icon.entry-74d7a10d.js +0 -16
- package/dist/inbox-icon.entry-94683ba9.cjs +0 -1
- package/dist/index-3b0366ac.cjs +0 -57
- package/dist/index-6e735f92.js +0 -18483
- package/dist/index.es-4615d47c-9156501b.js +0 -2908
- package/dist/index.es-4615d47c-b7c254fe.cjs +0 -7
- package/dist/italic-icon.entry-6706da64.js +0 -16
- package/dist/multi-select-dropdown_2.entry-1096321d.cjs +0 -1
- package/dist/multi-select-dropdown_2.entry-e10a9439.js +0 -193
- package/dist/nylas-booked-event-card_12.entry-38f37135.cjs +0 -1
- package/dist/nylas-event-calendar_3.entry-7dad0f2f.cjs +0 -11
- package/dist/nylas-scheduler-editor.entry-8fb56081.cjs +0 -2
- package/dist/nylas-scheduling.entry-472ef577.cjs +0 -1
- package/dist/play-icon.entry-5fbfabb5.js +0 -16
- package/dist/sent-icon.entry-92434496.cjs +0 -1
- package/dist/sent-icon.entry-bc9d1b35.js +0 -16
- package/dist/spam-icon.entry-11370b68.js +0 -16
- package/dist/spam-icon.entry-e0313c63.cjs +0 -1
- package/dist/trash-fill-icon.entry-1904e8d6.cjs +0 -1
- package/dist/trash-fill-icon.entry-4bdfb061.js +0 -16
- package/dist/warning-icon.entry-1649ffe7.js +0 -16
- package/dist/warning-icon.entry-3f848ed6.cjs +0 -1
- /package/dist/{elements → lib/elements}/react-component-lib/createComponent.d.ts +0 -0
- /package/dist/{elements → lib/elements}/react-component-lib/createOverlayComponent.d.ts +0 -0
- /package/dist/{elements → lib/elements}/react-component-lib/index.d.ts +0 -0
- /package/dist/{elements → lib/elements}/react-component-lib/interfaces.d.ts +0 -0
- /package/dist/{elements → lib/elements}/react-component-lib/utils/attachProps.d.ts +0 -0
- /package/dist/{elements → lib/elements}/react-component-lib/utils/case.d.ts +0 -0
- /package/dist/{elements → lib/elements}/react-component-lib/utils/dev.d.ts +0 -0
- /package/dist/{elements → lib/elements}/react-component-lib/utils/index.d.ts +0 -0
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
"use strict";const Nt=require("./index-
|
|
2
|
-
`);for(let a=r;a<s.length;a++){const c=s[a];if(c.length>1024)continue;const l=
|
|
1
|
+
"use strict";const Nt=require("./index-f769bc2a.cjs");var Pn;(function(e){e.Error="error",e.Warning="warning",e.Info="info",e.Success="success"})(Pn||(Pn={}));exports.ErrorCategory=void 0;(function(e){e.Component="component",e.Api="api",e.Auth="auth"})(exports.ErrorCategory||(exports.ErrorCategory={}));var An;(function(e){e.endtime_not_in_future="endtime_not_in_future",e.no_booking_info="no_booking_info",e.no_timeslot_selected="no_timeslot_selected",e.no_timezone_selected="no_timezone_selected",e.no_booking_id="no_booking_id",e.no_salt="no_salt",e.invalid_start_time="invalid_start_time",e.invalid_end_time="invalid_end_time",e.invalid_timezone="invalid_timezone",e.no_config_id="no_config_id"})(An||(An={}));const Hr=Object.prototype.toString;function hn(e){switch(Hr.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return xe(e,Error)}}function Xe(e,t){return Hr.call(e)===`[object ${t}]`}function jr(e){return Xe(e,"ErrorEvent")}function Un(e){return Xe(e,"DOMError")}function Mo(e){return Xe(e,"DOMException")}function fe(e){return Xe(e,"String")}function mn(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function gn(e){return e===null||mn(e)||typeof e!="object"&&typeof e!="function"}function He(e){return Xe(e,"Object")}function Mt(e){return typeof Event<"u"&&xe(e,Event)}function Oo(e){return typeof Element<"u"&&xe(e,Element)}function $o(e){return Xe(e,"RegExp")}function Ot(e){return!!(e&&e.then&&typeof e.then=="function")}function Fo(e){return He(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function xe(e,t){try{return e instanceof t}catch{return!1}}function Br(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function Pe(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Hn(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const o=e[r];try{Br(o)?n.push("[VueViewModel]"):n.push(String(o))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function Po(e,t,n=!1){return fe(e)?$o(t)?t.test(e):fe(t)?n?e===t:e.includes(t):!1:!1}function $t(e,t=[],n=!1){return t.some(r=>Po(e,r,n))}function Ao(e,t,n=250,r,o,i,s){if(!i.exception||!i.exception.values||!s||!xe(s.originalException,Error))return;const a=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;a&&(i.exception.values=Uo(Wt(e,t,o,s.originalException,r,i.exception.values,a,0),n))}function Wt(e,t,n,r,o,i,s,a){if(i.length>=n+1)return i;let c=[...i];if(xe(r[o],Error)){jn(s,a);const l=e(t,r[o]),d=c.length;Bn(l,o,d,a),c=Wt(e,t,n,r[o],o,[l,...c],l,d)}return Array.isArray(r.errors)&&r.errors.forEach((l,d)=>{if(xe(l,Error)){jn(s,a);const u=e(t,l),_=c.length;Bn(u,`errors[${d}]`,_,a),c=Wt(e,t,n,l,o,[u,...c],u,_)}}),c}function jn(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function Bn(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function Uo(e,t){return e.map(n=>(n.value&&(n.value=Pe(n.value,t)),n))}const ve="8.28.0",w=globalThis;function yn(e,t,n){const r=n||w,o=r.__SENTRY__=r.__SENTRY__||{},i=o[ve]=o[ve]||{};return i[e]||(i[e]=t())}const bn=w,Ho=80;function Yr(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,o=[];let i=0,s=0;const a=" > ",c=a.length;let l;const d=Array.isArray(t)?t:t.keyAttrs,u=!Array.isArray(t)&&t.maxStringLength||Ho;for(;n&&i++<r&&(l=jo(n,d),!(l==="html"||i>1&&s+o.length*c+l.length>=u));)o.push(l),s+=l.length,n=n.parentNode;return o.reverse().join(a)}catch{return"<unknown>"}}function jo(e,t){const n=e,r=[];if(!n||!n.tagName)return"";if(bn.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const o=t&&t.length?t.filter(s=>n.getAttribute(s)).map(s=>[s,n.getAttribute(s)]):null;if(o&&o.length)o.forEach(s=>{r.push(`[${s[0]}="${s[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const s=n.className;if(s&&fe(s)){const a=s.split(/\s+/);for(const c of a)r.push(`.${c}`)}}const i=["aria-label","type","name","title","alt"];for(const s of i){const a=n.getAttribute(s);a&&r.push(`[${s}="${a}"]`)}return r.join("")}function Gr(){try{return bn.document.location.href}catch{return""}}function Bo(e){if(!bn.HTMLElement)return null;let t=e;const n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}const ot=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Yo="Sentry Logger ",Vt=["debug","info","warn","error","log","assert","trace"],It={};function it(e){if(!("console"in w))return e();const t=w.console,n={},r=Object.keys(It);r.forEach(o=>{const i=It[o];n[o]=t[o],t[o]=i});try{return e()}finally{r.forEach(o=>{t[o]=n[o]})}}function Go(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return ot?Vt.forEach(n=>{t[n]=(...r)=>{e&&it(()=>{w.console[n](`${Yo}[${n}]:`,...r)})}}):Vt.forEach(n=>{t[n]=()=>{}}),t}const g=Go(),qo=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Xo(e){return e==="http"||e==="https"}function Ft(e,t=!1){const{host:n,path:r,pass:o,port:i,projectId:s,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&o?`:${o}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${s}`}function zo(e){const t=qo.exec(e);if(!t){it(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,o="",i="",s="",a=""]=t.slice(1);let c="",l=a;const d=l.split("/");if(d.length>1&&(c=d.slice(0,-1).join("/"),l=d.pop()),l){const u=l.match(/^\d+/);u&&(l=u[0])}return qr({host:i,pass:o,path:c,projectId:l,port:s,protocol:n,publicKey:r})}function qr(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Wo(e){if(!ot)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(g.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:n.match(/^\d+$/)?Xo(r)?t&&isNaN(parseInt(t,10))?(g.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(g.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(g.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Vo(e){const t=typeof e=="string"?zo(e):qr(e);if(!(!t||!Wo(t)))return t}class ae extends Error{constructor(t,n="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}function z(e,t,n){if(!(t in e))return;const r=e[t],o=n(r);typeof o=="function"&&Xr(o,r),e[t]=o}function Ce(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{ot&&g.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Xr(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,Ce(e,"__sentry_original__",t)}catch{}}function En(e){return e.__sentry_original__}function Ko(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function zr(e){if(hn(e))return{message:e.message,name:e.name,stack:e.stack,...Gn(e)};if(Mt(e)){const t={type:e.type,target:Yn(e.target),currentTarget:Yn(e.currentTarget),...Gn(e)};return typeof CustomEvent<"u"&&xe(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Yn(e){try{return Oo(e)?Yr(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function Gn(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function Jo(e,t=40){const n=Object.keys(zr(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return Pe(r,t);for(let o=n.length;o>0;o--){const i=n.slice(0,o).join(", ");if(!(i.length>t))return o===n.length?i:Pe(i,t)}return""}function W(e){return Kt(e,new Map)}function Kt(e,t){if(Zo(e)){const n=t.get(e);if(n!==void 0)return n;const r={};t.set(e,r);for(const o of Object.keys(e))typeof e[o]<"u"&&(r[o]=Kt(e[o],t));return r}if(Array.isArray(e)){const n=t.get(e);if(n!==void 0)return n;const r=[];return t.set(e,r),e.forEach(o=>{r.push(Kt(o,t))}),r}return e}function Zo(e){if(!He(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const Wr=50,Ne="?",qn=/\(error: (.*)\)/,Xn=/captureMessage|captureException/;function Vr(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,o=0)=>{const i=[],s=n.split(`
|
|
2
|
+
`);for(let a=r;a<s.length;a++){const c=s[a];if(c.length>1024)continue;const l=qn.test(c)?c.replace(qn,"$1"):c;if(!l.match(/\S*Error: /)){for(const d of t){const u=d(l);if(u){i.push(u);break}}if(i.length>=Wr+o)break}}return ei(i.slice(o))}}function Qo(e){return Array.isArray(e)?Vr(...e):e}function ei(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(dt(t).function||"")&&t.pop(),t.reverse(),Xn.test(dt(t).function||"")&&(t.pop(),Xn.test(dt(t).function||"")&&t.pop()),t.slice(0,Wr).map(n=>({...n,filename:n.filename||dt(t).filename,function:n.function||Ne}))}function dt(e){return e[e.length-1]||{}}const jt="<anonymous>";function Se(e){try{return!e||typeof e!="function"?jt:e.name||jt}catch{return jt}}function zn(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}const Et={},Wn={};function De(e,t){Et[e]=Et[e]||[],Et[e].push(t)}function Re(e,t){Wn[e]||(t(),Wn[e]=!0)}function oe(e,t){const n=e&&Et[e];if(n)for(const r of n)try{r(t)}catch(o){ot&&g.error(`Error while triggering instrumentation handler.
|
|
3
3
|
Type: ${e}
|
|
4
|
-
Name: ${
|
|
5
|
-
Error:`,o)}}function
|
|
4
|
+
Name: ${Se(r)}
|
|
5
|
+
Error:`,o)}}function ti(e){const t="console";De(t,e),Re(t,ni)}function ni(){"console"in w&&Vt.forEach(function(e){e in w.console&&z(w.console,e,function(t){return It[e]=t,function(...n){oe("console",{args:n,level:e});const o=It[e];o&&o.apply(w.console,n)}})})}const Jt=w;function Kr(){if(!("fetch"in Jt))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Zt(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function ri(){if(typeof EdgeRuntime=="string")return!0;if(!Kr())return!1;if(Zt(Jt.fetch))return!0;let e=!1;const t=Jt.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Zt(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){ot&&g.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}const Jr=1e3;function st(){return Date.now()/Jr}function oi(){const{performance:e}=w;if(!e||!e.now)return st;const t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/Jr}const _e=oi();(()=>{const{performance:e}=w;if(!e||!e.now)return;const t=3600*1e3,n=e.now(),r=Date.now(),o=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,i=o<t,s=e.timing&&e.timing.navigationStart,c=typeof s=="number"?Math.abs(s+n-r):t,l=c<t;return i||l?o<=c?e.timeOrigin:s:r})();function ii(e,t){const n="fetch";De(n,e),Re(n,()=>si(void 0,t))}function si(e,t=!1){t&&!ri()||z(w,"fetch",function(n){return function(...r){const{method:o,url:i}=ai(r),s={args:r,fetchData:{method:o,url:i},startTimestamp:_e()*1e3};e||oe("fetch",{...s});const a=new Error().stack;return n.apply(w,r).then(async c=>(e?e(c):oe("fetch",{...s,endTimestamp:_e()*1e3,response:c}),c),c=>{throw oe("fetch",{...s,endTimestamp:_e()*1e3,error:c}),hn(c)&&c.stack===void 0&&(c.stack=a,Ce(c,"framesToPop",1)),c})}})}function Qt(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Vn(e){return typeof e=="string"?e:e?Qt(e,"url")?e.url:e.toString?e.toString():"":""}function ai(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:Vn(n),method:Qt(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:Vn(t),method:Qt(t,"method")?String(t.method).toUpperCase():"GET"}}let ft=null;function ci(e){const t="error";De(t,e),Re(t,ui)}function ui(){ft=w.onerror,w.onerror=function(e,t,n,r,o){return oe("error",{column:r,error:o,line:n,msg:e,url:t}),ft&&!ft.__SENTRY_LOADER__?ft.apply(this,arguments):!1},w.onerror.__SENTRY_INSTRUMENTED__=!0}let _t=null;function li(e){const t="unhandledrejection";De(t,e),Re(t,di)}function di(){_t=w.onunhandledrejection,w.onunhandledrejection=function(e){return oe("unhandledrejection",e),_t&&!_t.__SENTRY_LOADER__?_t.apply(this,arguments):!0},w.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function fi(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function _i(){return"npm"}function pi(){return!fi()&&Object.prototype.toString.call(typeof Nt.process<"u"?Nt.process:0)==="[object process]"}function hi(){return typeof window<"u"&&(!pi()||mi())}function mi(){return w.process!==void 0&&w.process.type==="renderer"}function gi(){const e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(o){if(e)return t.has(o)?!0:(t.add(o),!1);for(let i=0;i<t.length;i++)if(t[i]===o)return!0;return t.push(o),!1}function r(o){if(e)t.delete(o);else for(let i=0;i<t.length;i++)if(t[i]===o){t.splice(i,1);break}}return[n,r]}function ee(){const e=w,t=e.crypto||e.msCrypto;let n=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const r=new Uint8Array(1);return t.getRandomValues(r),r[0]})}catch{}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function Zr(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function ye(e){const{message:t,event_id:n}=e;if(t)return t;const r=Zr(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function en(e,t,n){const r=e.exception=e.exception||{},o=r.values=r.values||[],i=o[0]=o[0]||{};i.value||(i.value=t||""),i.type||(i.type=n||"Error")}function nt(e,t){const n=Zr(e);if(!n)return;const r={type:"generic",handled:!0},o=n.mechanism;if(n.mechanism={...r,...o,...t},t&&"data"in t){const i={...o&&o.data,...t.data};n.mechanism.data=i}}function Kn(e){if(e&&e.__sentry_captured__)return!0;try{Ce(e,"__sentry_captured__",!0)}catch{}return!1}function Qr(e){return Array.isArray(e)?e:[e]}function be(e,t=100,n=1/0){try{return tn("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function eo(e,t=3,n=100*1024){const r=be(e,t);return vi(r)>n?eo(e,t-1,n):r}function tn(e,t,n=1/0,r=1/0,o=gi()){const[i,s]=o;if(t==null||["number","boolean","string"].includes(typeof t)&&!Number.isNaN(t))return t;const a=yi(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(i(t))return"[Circular ~]";const l=t;if(l&&typeof l.toJSON=="function")try{const f=l.toJSON();return tn("",f,c-1,r,o)}catch{}const d=Array.isArray(t)?[]:{};let u=0;const _=zr(t);for(const f in _){if(!Object.prototype.hasOwnProperty.call(_,f))continue;if(u>=r){d[f]="[MaxProperties ~]";break}const p=_[f];d[f]=tn(f,p,c-1,r,o),u++}return s(t),d}function yi(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof Nt.global$1<"u"&&t===Nt.global$1)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Br(t))return"[VueViewModel]";if(Fo(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${Se(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=bi(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function bi(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function Ei(e){return~-encodeURI(e).split(/%..|./).length}function vi(e){return Ei(JSON.stringify(e))}var de;(function(e){e[e.PENDING=0]="PENDING";const n=1;e[e.RESOLVED=n]="RESOLVED";const r=2;e[e.REJECTED=r]="REJECTED"})(de||(de={}));function Ie(e){return new Q(t=>{t(e)})}function Tt(e){return new Q((t,n)=>{n(e)})}class Q{constructor(t){Q.prototype.__init.call(this),Q.prototype.__init2.call(this),Q.prototype.__init3.call(this),Q.prototype.__init4.call(this),this._state=de.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new Q((r,o)=>{this._handlers.push([!1,i=>{if(!t)r(i);else try{r(t(i))}catch(s){o(s)}},i=>{if(!n)o(i);else try{r(n(i))}catch(s){o(s)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new Q((n,r)=>{let o,i;return this.then(s=>{i=!1,o=s,t&&t()},s=>{i=!0,o=s,t&&t()}).then(()=>{if(i){r(o);return}n(o)})})}__init(){this._resolve=t=>{this._setResult(de.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(de.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{if(this._state===de.PENDING){if(Ot(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===de.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===de.RESOLVED&&n[1](this._value),this._state===de.REJECTED&&n[2](this._value),n[0]=!0)})}}}function Si(e){const t=[];function n(){return e===void 0||t.length<e}function r(s){return t.splice(t.indexOf(s),1)[0]||Promise.resolve(void 0)}function o(s){if(!n())return Tt(new ae("Not adding Promise because buffer limit was reached."));const a=s();return t.indexOf(a)===-1&&t.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function i(s){return new Q((a,c)=>{let l=t.length;if(!l)return a(!0);const d=setTimeout(()=>{s&&s>0&&a(!1)},s);t.forEach(u=>{Ie(u).then(()=>{--l||(clearTimeout(d),a(!0))},c)})})}return{$:t,add:o,drain:i}}function Bt(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const 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}}const wi=["fatal","error","warning","log","info","debug"];function ki(e){return e==="warn"?"warning":wi.includes(e)?e:"log"}const xi="sentry-",Ci=/^sentry-/;function Ni(e){const t=Ii(e);if(!t)return;const n=Object.entries(t).reduce((r,[o,i])=>{if(o.match(Ci)){const s=o.slice(xi.length);r[s]=i}return r},{});if(Object.keys(n).length>0)return n}function Ii(e){if(!(!e||!fe(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=Jn(n);return Object.entries(r).forEach(([o,i])=>{t[o]=i}),t},{}):Jn(e)}function Jn(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function at(e,t=[]){return[e,t]}function Ti(e,t){const[n,r]=e;return[n,[...r,t]]}function Zn(e,t){const n=e[1];for(const r of n){const o=r[0].type;if(t(r,o))return!0}return!1}function nn(e){return w.__SENTRY__&&w.__SENTRY__.encodePolyfill?w.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function Di(e){const[t,n]=e;let r=JSON.stringify(t);function o(i){typeof r=="string"?r=typeof i=="string"?r+i:[nn(r),i]:r.push(typeof i=="string"?nn(i):i)}for(const i of n){const[s,a]=i;if(o(`
|
|
6
6
|
${JSON.stringify(s)}
|
|
7
|
-
`),typeof a=="string"||a instanceof Uint8Array)o(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(be(a))}o(c)}}return typeof r=="string"?r:Ti(r)}function Ti(e){const t=e.reduce((o,i)=>o+i.length,0),n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}function Di(e){const t=typeof e.data=="string"?nn(e.data):e.data;return[z({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const Ri={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function Jn(e){return Ri[e]}function Qr(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Li(e,t,n,r){const o=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Ft(r)},...o&&{trace:z({...o})}}}function Mi(e,t,n){const r=[{type:"client_report"},{timestamp:n||st(),discarded_events:e}];return at(t?{dsn:t}:{},[r])}const Oi=60*1e3;function $i(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?Oi:r-t}function Fi(e,t){return e[t]||e.all||0}function Pi(e,t,n=Date.now()){return Fi(e,t)>n}function Ai(e,{statusCode:t,headers:n},r=Date.now()){const o={...e},i=n&&n["x-sentry-rate-limits"],s=n&&n["retry-after"];if(i)for(const a of i.trim().split(",")){const[c,l,,,d]=a.split(":",5),u=parseInt(c,10),_=(isNaN(u)?60:u)*1e3;if(!l)o.all=r+_;else for(const f of l.split(";"))f==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(o[f]=r+_):o[f]=r+_}else s?o.all=r+$i(s,r):t===429&&(o.all=r+60*1e3);return o}function Zn(){return{traceId:ee(),spanId:ee().substring(16)}}const pt=w;function Ui(){const e=pt.chrome,t=e&&e.app&&e.app.runtime,n="history"in pt&&!!pt.history.pushState&&!!pt.history.replaceState;return!t&&n}const N=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Pt(){return Sn(w),w}function Sn(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Se,t[Se]=t[Se]||{}}function Hi(e){const t=_e(),n={sid:ee(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Bi(n)};return e&&je(n,e),n}function je(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||_e(),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:ee()),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{const n=e.timestamp-e.started;e.duration=n>=0?n: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 ji(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),je(e,n)}function Bi(e){return z({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}})}const rn="_sentrySpan";function Qn(e,t){t?Ce(e,rn,t):delete e[rn]}function er(e){return e[rn]}const Yi=100;class vn{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=Zn()}clone(){const t=new vn;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,Qn(t,er(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&je(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,[r,o]=n instanceof we?[n.getScopeData(),n.getRequestSession()]:He(n)?[t,t.requestSession]:[],{tags:i,extra:s,user:a,contexts:c,level:l,fingerprint:d=[],propagationContext:u}=r||{};return this._tags={...this._tags,...i},this._extra={...this._extra,...s},this._contexts={...this._contexts,...c},a&&Object.keys(a).length&&(this._user=a),l&&(this._level=l),d.length&&(this._fingerprint=d),u&&(this._propagationContext=u),o&&(this._requestSession=o),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,Qn(this,void 0),this._attachments=[],this._propagationContext=Zn(),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:Yi;if(r<=0)return this;const o={timestamp:st(),...t},i=this._breadcrumbs;return i.push(o),this._breadcrumbs=i.length>r?i.slice(-r):i,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:er(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n&&n.event_id?n.event_id:ee();if(!this._client)return g.warn("No client configured on scope - will not capture exception!"),r;const o=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:o,...n,event_id:r},this),r}captureMessage(t,n,r){const o=r&&r.event_id?r.event_id:ee();if(!this._client)return g.warn("No client configured on scope - will not capture message!"),o;const i=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:o},this),o}captureEvent(t,n){const r=n&&n.event_id?n.event_id:ee();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(g.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}const we=vn;function Gi(){return yn("defaultCurrentScope",()=>new we)}function qi(){return yn("defaultIsolationScope",()=>new we)}class Xi{constructor(t,n){let r;t?r=t:r=new we;let o;n?o=n:o=new we,this._stack=[{scope:r}],this._isolationScope=o}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(o){throw this._popScope(),o}return Ot(r)?r.then(o=>(this._popScope(),o),o=>{throw this._popScope(),o}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function Be(){const e=Pt(),t=Sn(e);return t.stack=t.stack||new Xi(Gi(),qi())}function Wi(e){return Be().withScope(e)}function zi(e,t){const n=Be();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function tr(e){return Be().withScope(()=>e(Be().getIsolationScope()))}function Vi(){return{withIsolationScope:tr,withScope:Wi,withSetScope:zi,withSetIsolationScope:(e,t)=>tr(t),getCurrentScope:()=>Be().getScope(),getIsolationScope:()=>Be().getIsolationScope()}}function wn(e){const t=Sn(e);return t.acs?t.acs:Vi()}function te(){const e=Pt();return wn(e).getCurrentScope()}function We(){const e=Pt();return wn(e).getIsolationScope()}function eo(){return yn("globalScope",()=>new we)}function Ki(...e){const t=Pt(),n=wn(t);if(e.length===2){const[r,o]=e;return r?n.withSetScope(r,o):n.withScope(o)}return n.withScope(e[0])}function F(){return te().getClient()}const Ji="_sentryMetrics";function Zi(e){const t=e[Ji];if(!t)return;const n={};for(const[,[r,o]]of t)(n[r]||(n[r]=[])).push(z(o));return n}const Qi="sentry.source",es="sentry.sample_rate",ts="sentry.op",ns="sentry.origin",rs=0,os=1,is=1;function ss(e){const{spanId:t,traceId:n}=e.spanContext(),{parent_span_id:r}=Dt(e);return z({parent_span_id:r,span_id:t,trace_id:n})}function nr(e){return typeof e=="number"?rr(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?rr(e.getTime()):_e()}function rr(e){return e>9999999999?e/1e3:e}function Dt(e){if(cs(e))return e.getSpanJSON();try{const{spanId:t,traceId:n}=e.spanContext();if(as(e)){const{attributes:r,startTime:o,name:i,endTime:s,parentSpanId:a,status:c}=e;return z({span_id:t,trace_id:n,data:r,description:i,parent_span_id:a,start_timestamp:nr(o),timestamp:nr(s)||void 0,status:ls(c),op:r[ts],origin:r[ns],_metrics_summary:Zi(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function as(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function cs(e){return typeof e.getSpanJSON=="function"}function us(e){const{traceFlags:t}=e.spanContext();return t===is}function ls(e){if(!(!e||e.code===rs))return e.code===os?"ok":e.message||"unknown_error"}const ds="_sentryRootSpan";function to(e){return e[ds]||e}const kn="production",fs="_frozenDsc";function no(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o=z({environment:n.environment||kn,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",o),o}function _s(e){const t=F();if(!t)return{};const n=no(Dt(e).trace_id||"",t),r=to(e),o=r[fs];if(o)return o;const i=r.spanContext().traceState,s=i&&i.get("sentry.dsc"),a=s&&xi(s);if(a)return a;const c=Dt(r),l=c.data||{},d=l[es];d!=null&&(n.sample_rate=`${d}`);const u=l[Qi],_=c.description;return u!=="url"&&_&&(n.transaction=_),n.sampled=String(us(r)),t.emit("createDsc",n,r),n}function ps(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(typeof t!="number"||isNaN(t)||t<0||t>1){N&&g.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`);return}return t}function hs(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function ms(e,t,n,r){const o=Qr(n),i={sent_at:new Date().toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:Ft(t)}},s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return at(i,[s])}function gs(e,t,n,r){const o=Qr(n),i=e.type&&e.type!=="replay_event"?e.type:"event";hs(e,n&&n.sdk);const s=Li(e,o,r,t);return delete e.sdkProcessingMetadata,at(s,[[{type:i},e]])}function on(e,t,n,r=0){return new Q((o,i)=>{const s=e[r];if(t===null||typeof s!="function")o(t);else{const a=s({...t},n);N&&s.id&&a===null&&g.log(`Event processor "${s.id}" dropped event`),Ot(a)?a.then(c=>on(e,c,n,r+1).then(o)).then(null,i):on(e,a,n,r+1).then(o).then(null,i)}})}function ys(e,t){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:i}=t;bs(e,t),r&&vs(e,r),ws(e,n),Es(e,o),Ss(e,i)}function or(e,t){const{extra:n,tags:r,user:o,contexts:i,level:s,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:l,eventProcessors:d,attachments:u,propagationContext:_,transactionName:f,span:p}=t;Je(e,"extra",n),Je(e,"tags",r),Je(e,"user",o),Je(e,"contexts",i),Je(e,"sdkProcessingMetadata",a),s&&(e.level=s),f&&(e.transactionName=f),p&&(e.span=p),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),u.length&&(e.attachments=[...e.attachments,...u]),e.propagationContext={...e.propagationContext,..._}}function Je(e,t,n){if(n&&Object.keys(n).length){e[t]={...e[t]};for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}function bs(e,t){const{extra:n,tags:r,user:o,contexts:i,level:s,transactionName:a}=t,c=z(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const l=z(r);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});const d=z(o);d&&Object.keys(d).length&&(e.user={...d,...e.user});const u=z(i);u&&Object.keys(u).length&&(e.contexts={...u,...e.contexts}),s&&(e.level=s),a&&e.type!=="transaction"&&(e.transaction=a)}function Es(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Ss(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function vs(e,t){e.contexts={trace:ss(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:_s(t),...e.sdkProcessingMetadata};const n=to(t),r=Dt(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function ws(e,t){e.fingerprint=e.fingerprint?Jr(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function ks(e,t,n,r,o,i){const{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||ee(),timestamp:t.timestamp||st()},l=n.integrations||e.integrations.map(y=>y.name);xs(c,e),Is(c,l),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&Cs(c,e.stackParser);const d=Ds(r,n.captureContext);n.mechanism&&nt(c,n.mechanism);const u=o?o.getEventProcessors():[],_=eo().getScopeData();if(i){const y=i.getScopeData();or(_,y)}if(d){const y=d.getScopeData();or(_,y)}const f=[...n.attachments||[],..._.attachments];f.length&&(n.attachments=f),ys(c,_);const p=[...u,..._.eventProcessors];return on(p,c,n).then(y=>(y&&Ns(y),typeof s=="number"&&s>0?Ts(y,s,a):y))}function xs(e,t){const{environment:n,release:r,dist:o,maxValueLength:i=250}=t;"environment"in e||(e.environment="environment"in t?n:kn),e.release===void 0&&r!==void 0&&(e.release=r),e.dist===void 0&&o!==void 0&&(e.dist=o),e.message&&(e.message=Pe(e.message,i));const s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=Pe(s.value,i));const a=e.request;a&&a.url&&(a.url=Pe(a.url,i))}const ir=new WeakMap;function Cs(e,t){const n=w._sentryDebugIds;if(!n)return;let r;const o=ir.get(t);o?r=o:(r=new Map,ir.set(t,r));const i=Object.entries(n).reduce((s,[a,c])=>{let l;const d=r.get(a);d?l=d:(l=t(a),r.set(a,l));for(let u=l.length-1;u>=0;u--){const _=l[u];if(_.filename){s[_.filename]=c;break}}return s},{});try{e.exception.values.forEach(s=>{s.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=i[a.filename])})})}catch{}}function Ns(e){const t={};try{e.exception.values.forEach(r=>{r.stacktrace.frames.forEach(o=>{o.debug_id&&(o.abs_path?t[o.abs_path]=o.debug_id:o.filename&&(t[o.filename]=o.debug_id),delete o.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([r,o])=>{n.push({type:"sourcemap",code_file:r,debug_id:o})})}function Is(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Ts(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:be(o.data,t,n)}}))},...e.user&&{user:be(e.user,t,n)},...e.contexts&&{contexts:be(e.contexts,t,n)},...e.extra&&{extra:be(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=be(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(o=>({...o,...o.data&&{data:be(o.data,t,n)}}))),r}function Ds(e,t){if(!t)return e;const n=e?e.clone():new we;return n.update(t),n}function Rs(e){if(e)return Ls(e)?{captureContext:e}:Os(e)?{captureContext:e}:e}function Ls(e){return e instanceof we||typeof e=="function"}const Ms=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function Os(e){return Object.keys(e).some(t=>Ms.includes(t))}function $s(e,t){return te().captureException(e,Rs(t))}function Fs(e,t){const n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return te().captureMessage(e,n,r)}function ro(e,t){return te().captureEvent(e,t)}function Ps(){return!!F()}function sr(e){const t=F(),n=We(),r=te(),{release:o,environment:i=kn}=t&&t.getOptions()||{},{userAgent:s}=w.navigator||{},a=Hi({release:o,environment:i,user:r.getUser()||n.getUser(),...s&&{userAgent:s},...e}),c=n.getSession();return c&&c.status==="ok"&&je(c,{status:"exited"}),oo(),n.setSession(a),r.setSession(a),a}function oo(){const e=We(),t=te(),n=t.getSession()||e.getSession();n&&ji(n),io(),e.setSession(),t.setSession()}function io(){const e=We(),t=te(),n=F(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function ar(e=!1){if(e){oo();return}io()}const As="7";function Us(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Hs(e){return`${Us(e)}${e.projectId}/envelope/`}function js(e,t){return zo({sentry_key:e.publicKey,sentry_version:As,...t&&{sentry_client:`${t.name}/${t.version}`}})}function Bs(e,t,n){return t||`${Hs(e)}?${js(e,n)}`}const cr=[];function Ys(e){const t={};return e.forEach(n=>{const{name:r}=n,o=t[r];o&&!o.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function Gs(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(s=>{s.isDefaultInstance=!0});let r;Array.isArray(n)?r=[...t,...n]:typeof n=="function"?r=Jr(n(t)):r=t;const o=Ys(r),i=o.findIndex(s=>s.name==="Debug");if(i>-1){const[s]=o.splice(i,1);o.push(s)}return o}function qs(e,t){const n={};return t.forEach(r=>{r&&so(e,r,n)}),n}function ur(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function so(e,t,n){if(n[t.name]){N&&g.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,cr.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),cr.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(o,i)=>r(o,i,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),o=Object.assign((i,s)=>r(i,s,e),{id:t.name});e.addEventProcessor(o)}N&&g.log(`Integration installed: ${t.name}`)}const lr="Not capturing exception because it's already been captured.";class Xs{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=Wo(t.dsn):N&&g.warn("No DSN provided, client will not send events."),this._dsn){const n=Bs(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:n})}}captureException(t,n,r){const o=ee();if(zn(t))return N&&g.log(lr),o;const i={event_id:o,...n};return this._process(this.eventFromException(t,i).then(s=>this._captureEvent(s,i,r))),i.event_id}captureMessage(t,n,r,o){const i={event_id:ee(),...r},s=mn(t)?t:String(t),a=gn(t)?this.eventFromMessage(s,n,i):this.eventFromException(t,i);return this._process(a.then(c=>this._captureEvent(c,i,o))),i.event_id}captureEvent(t,n,r){const o=ee();if(n&&n.originalException&&zn(n.originalException))return N&&g.log(lr),o;const i={event_id:o,...n},a=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,i,a||r)),i.event_id}captureSession(t){typeof t.release!="string"?N&&g.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),je(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(o=>r&&o))):Ie(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.emit("close"),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];so(this,t,this._integrations),n||ur(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=gs(t,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])r=Ni(r,Di(i));const o=this.sendEnvelope(r);o&&o.then(i=>this.emit("afterSendEvent",t,i),null)}sendSession(t){const n=ms(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(n)}recordDroppedEvent(t,n,r){if(this._options.sendClientReports){const o=typeof r=="number"?r:1,i=`${t}:${n}`;N&&g.log(`Recording outcome: "${i}"${o>1?` (${o} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+o}}on(t,n){const r=this._hooks[t]=this._hooks[t]||[];return r.push(n),()=>{const o=r.indexOf(n);o>-1&&r.splice(o,1)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(o=>o(...n))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,n=>(N&&g.error("Error while sending event:",n),n)):(N&&g.error("Transport disabled"),Ie({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=qs(this,t),ur(this,t)}_updateSessionFromEvent(t,n){let r=!1,o=!1;const i=n.exception&&n.exception.values;if(i){o=!0;for(const c of i){const l=c.mechanism;if(l&&l.handled===!1){r=!0;break}}}const s=t.status==="ok";(s&&t.errors===0||s&&r)&&(je(t,{...r&&{status:"crashed"},errors:t.errors||Number(o||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Q(n=>{let r=0;const o=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=o,t&&r>=t&&(clearInterval(i),n(!1)))},o)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,o=We()){const i=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&s.length>0&&(n.integrations=s),this.emit("preprocessEvent",t,n),t.type||o.setLastEventId(t.event_id||n.event_id),ks(i,t,n,r,this,o).then(a=>{if(a===null)return a;const c={...o.getPropagationContext(),...r?r.getPropagationContext():void 0};if(!(a.contexts&&a.contexts.trace)&&c){const{traceId:d,spanId:u,parentSpanId:_,dsc:f}=c;a.contexts={trace:z({trace_id:d,span_id:u,parent_span_id:_}),...a.contexts};const p=f||no(d,this);a.sdkProcessingMetadata={dynamicSamplingContext:p,...a.sdkProcessingMetadata}}return a})}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then(o=>o.event_id,o=>{if(N){const i=o;i.logLevel==="log"?g.log(i.message):g.warn(i)}})}_processEvent(t,n,r){const o=this.getOptions(),{sampleRate:i}=o,s=co(t),a=ao(t),c=t.type||"error",l=`before send for type \`${c}\``,d=typeof i>"u"?void 0:ps(i);if(a&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error",t),Tt(new ae(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const u=c==="replay_event"?"replay":c,f=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,n,r,f).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",u,t),new ae("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return p;const y=zs(this,o,p,n);return Ws(y,l)}).then(p=>{if(p===null){if(this.recordDroppedEvent("before_send",u,t),s){const k=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",k)}throw new ae(`${l} returned \`null\`, will not send event.`,"log")}const R=r&&r.getSession();if(!s&&R&&this._updateSessionFromEvent(R,p),s){const E=p.sdkProcessingMetadata&&p.sdkProcessingMetadata.spanCountBeforeProcessing||0,k=p.spans?p.spans.length:0,P=E-k;P>0&&this.recordDroppedEvent("before_send","span",P)}const y=p.transaction_info;if(s&&y&&p.transaction!==t.transaction){const E="custom";p.transaction_info={...y,source:E}}return this.sendEvent(p,n),p}).then(null,p=>{throw p instanceof ae?p:(this.captureException(p,{data:{__sentry__:!0},originalException:p}),new ae(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
8
|
-
Reason: ${p}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[o,i]=n.split(":");return{reason:o,category:i,quantity:r}})}_flushOutcomes(){N&&g.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){N&&g.log("No outcomes to send");return}if(!this._dsn){N&&g.log("No dsn provided, will not send outcomes");return}N&&g.log("Sending outcomes:",t);const n
|
|
9
|
-
Event: ${ye(e)}`),!0):
|
|
10
|
-
Event: ${ye(e)}`),!0):
|
|
11
|
-
Event: ${ye(e)}`),!0):
|
|
12
|
-
Event: ${ye(e)}`),!0):
|
|
7
|
+
`),typeof a=="string"||a instanceof Uint8Array)o(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(be(a))}o(c)}}return typeof r=="string"?r:Ri(r)}function Ri(e){const t=e.reduce((o,i)=>o+i.length,0),n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}function Li(e){const t=typeof e.data=="string"?nn(e.data):e.data;return[W({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const Mi={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function Qn(e){return Mi[e]}function to(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Oi(e,t,n,r){const o=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Ft(r)},...o&&{trace:W({...o})}}}function $i(e,t,n){const r=[{type:"client_report"},{timestamp:n||st(),discarded_events:e}];return at(t?{dsn:t}:{},[r])}const Fi=60*1e3;function Pi(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?Fi:r-t}function Ai(e,t){return e[t]||e.all||0}function Ui(e,t,n=Date.now()){return Ai(e,t)>n}function Hi(e,{statusCode:t,headers:n},r=Date.now()){const o={...e},i=n&&n["x-sentry-rate-limits"],s=n&&n["retry-after"];if(i)for(const a of i.trim().split(",")){const[c,l,,,d]=a.split(":",5),u=parseInt(c,10),_=(isNaN(u)?60:u)*1e3;if(!l)o.all=r+_;else for(const f of l.split(";"))f==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(o[f]=r+_):o[f]=r+_}else s?o.all=r+Pi(s,r):t===429&&(o.all=r+60*1e3);return o}function er(){return{traceId:ee(),spanId:ee().substring(16)}}const pt=w;function ji(){const e=pt.chrome,t=e&&e.app&&e.app.runtime,n="history"in pt&&!!pt.history.pushState&&!!pt.history.replaceState;return!t&&n}const N=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Pt(){return vn(w),w}function vn(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||ve,t[ve]=t[ve]||{}}function Bi(e){const t=_e(),n={sid:ee(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Gi(n)};return e&&je(n,e),n}function je(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||_e(),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:ee()),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{const n=e.timestamp-e.started;e.duration=n>=0?n: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 Yi(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),je(e,n)}function Gi(e){return W({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}})}const rn="_sentrySpan";function tr(e,t){t?Ce(e,rn,t):delete e[rn]}function nr(e){return e[rn]}const qi=100;class Sn{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=er()}clone(){const t=new Sn;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,tr(t,nr(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&je(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,[r,o]=n instanceof we?[n.getScopeData(),n.getRequestSession()]:He(n)?[t,t.requestSession]:[],{tags:i,extra:s,user:a,contexts:c,level:l,fingerprint:d=[],propagationContext:u}=r||{};return this._tags={...this._tags,...i},this._extra={...this._extra,...s},this._contexts={...this._contexts,...c},a&&Object.keys(a).length&&(this._user=a),l&&(this._level=l),d.length&&(this._fingerprint=d),u&&(this._propagationContext=u),o&&(this._requestSession=o),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,tr(this,void 0),this._attachments=[],this._propagationContext=er(),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:qi;if(r<=0)return this;const o={timestamp:st(),...t},i=this._breadcrumbs;return i.push(o),this._breadcrumbs=i.length>r?i.slice(-r):i,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:nr(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n&&n.event_id?n.event_id:ee();if(!this._client)return g.warn("No client configured on scope - will not capture exception!"),r;const o=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:o,...n,event_id:r},this),r}captureMessage(t,n,r){const o=r&&r.event_id?r.event_id:ee();if(!this._client)return g.warn("No client configured on scope - will not capture message!"),o;const i=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:o},this),o}captureEvent(t,n){const r=n&&n.event_id?n.event_id:ee();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(g.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}const we=Sn;function Xi(){return yn("defaultCurrentScope",()=>new we)}function zi(){return yn("defaultIsolationScope",()=>new we)}class Wi{constructor(t,n){let r;t?r=t:r=new we;let o;n?o=n:o=new we,this._stack=[{scope:r}],this._isolationScope=o}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(o){throw this._popScope(),o}return Ot(r)?r.then(o=>(this._popScope(),o),o=>{throw this._popScope(),o}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function Be(){const e=Pt(),t=vn(e);return t.stack=t.stack||new Wi(Xi(),zi())}function Vi(e){return Be().withScope(e)}function Ki(e,t){const n=Be();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function rr(e){return Be().withScope(()=>e(Be().getIsolationScope()))}function Ji(){return{withIsolationScope:rr,withScope:Vi,withSetScope:Ki,withSetIsolationScope:(e,t)=>rr(t),getCurrentScope:()=>Be().getScope(),getIsolationScope:()=>Be().getIsolationScope()}}function wn(e){const t=vn(e);return t.acs?t.acs:Ji()}function te(){const e=Pt();return wn(e).getCurrentScope()}function ze(){const e=Pt();return wn(e).getIsolationScope()}function no(){return yn("globalScope",()=>new we)}function Zi(...e){const t=Pt(),n=wn(t);if(e.length===2){const[r,o]=e;return r?n.withSetScope(r,o):n.withScope(o)}return n.withScope(e[0])}function F(){return te().getClient()}const Qi="_sentryMetrics";function es(e){const t=e[Qi];if(!t)return;const n={};for(const[,[r,o]]of t)(n[r]||(n[r]=[])).push(W(o));return n}const ts="sentry.source",ns="sentry.sample_rate",rs="sentry.op",os="sentry.origin",is=0,ss=1,as=1;function cs(e){const{spanId:t,traceId:n}=e.spanContext(),{parent_span_id:r}=Dt(e);return W({parent_span_id:r,span_id:t,trace_id:n})}function or(e){return typeof e=="number"?ir(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?ir(e.getTime()):_e()}function ir(e){return e>9999999999?e/1e3:e}function Dt(e){if(ls(e))return e.getSpanJSON();try{const{spanId:t,traceId:n}=e.spanContext();if(us(e)){const{attributes:r,startTime:o,name:i,endTime:s,parentSpanId:a,status:c}=e;return W({span_id:t,trace_id:n,data:r,description:i,parent_span_id:a,start_timestamp:or(o),timestamp:or(s)||void 0,status:fs(c),op:r[rs],origin:r[os],_metrics_summary:es(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function us(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function ls(e){return typeof e.getSpanJSON=="function"}function ds(e){const{traceFlags:t}=e.spanContext();return t===as}function fs(e){if(!(!e||e.code===is))return e.code===ss?"ok":e.message||"unknown_error"}const _s="_sentryRootSpan";function ro(e){return e[_s]||e}const kn="production",ps="_frozenDsc";function oo(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o=W({environment:n.environment||kn,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",o),o}function hs(e){const t=F();if(!t)return{};const n=oo(Dt(e).trace_id||"",t),r=ro(e),o=r[ps];if(o)return o;const i=r.spanContext().traceState,s=i&&i.get("sentry.dsc"),a=s&&Ni(s);if(a)return a;const c=Dt(r),l=c.data||{},d=l[ns];d!=null&&(n.sample_rate=`${d}`);const u=l[ts],_=c.description;return u!=="url"&&_&&(n.transaction=_),n.sampled=String(ds(r)),t.emit("createDsc",n,r),n}function ms(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(typeof t!="number"||isNaN(t)||t<0||t>1){N&&g.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`);return}return t}function gs(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function ys(e,t,n,r){const o=to(n),i={sent_at:new Date().toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:Ft(t)}},s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return at(i,[s])}function bs(e,t,n,r){const o=to(n),i=e.type&&e.type!=="replay_event"?e.type:"event";gs(e,n&&n.sdk);const s=Oi(e,o,r,t);return delete e.sdkProcessingMetadata,at(s,[[{type:i},e]])}function on(e,t,n,r=0){return new Q((o,i)=>{const s=e[r];if(t===null||typeof s!="function")o(t);else{const a=s({...t},n);N&&s.id&&a===null&&g.log(`Event processor "${s.id}" dropped event`),Ot(a)?a.then(c=>on(e,c,n,r+1).then(o)).then(null,i):on(e,a,n,r+1).then(o).then(null,i)}})}function Es(e,t){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:i}=t;vs(e,t),r&&ks(e,r),xs(e,n),Ss(e,o),ws(e,i)}function sr(e,t){const{extra:n,tags:r,user:o,contexts:i,level:s,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:l,eventProcessors:d,attachments:u,propagationContext:_,transactionName:f,span:p}=t;Je(e,"extra",n),Je(e,"tags",r),Je(e,"user",o),Je(e,"contexts",i),Je(e,"sdkProcessingMetadata",a),s&&(e.level=s),f&&(e.transactionName=f),p&&(e.span=p),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),u.length&&(e.attachments=[...e.attachments,...u]),e.propagationContext={...e.propagationContext,..._}}function Je(e,t,n){if(n&&Object.keys(n).length){e[t]={...e[t]};for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}function vs(e,t){const{extra:n,tags:r,user:o,contexts:i,level:s,transactionName:a}=t,c=W(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const l=W(r);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});const d=W(o);d&&Object.keys(d).length&&(e.user={...d,...e.user});const u=W(i);u&&Object.keys(u).length&&(e.contexts={...u,...e.contexts}),s&&(e.level=s),a&&e.type!=="transaction"&&(e.transaction=a)}function Ss(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function ws(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function ks(e,t){e.contexts={trace:cs(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:hs(t),...e.sdkProcessingMetadata};const n=ro(t),r=Dt(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function xs(e,t){e.fingerprint=e.fingerprint?Qr(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function Cs(e,t,n,r,o,i){const{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||ee(),timestamp:t.timestamp||st()},l=n.integrations||e.integrations.map(y=>y.name);Ns(c,e),Ds(c,l),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&Is(c,e.stackParser);const d=Ls(r,n.captureContext);n.mechanism&&nt(c,n.mechanism);const u=o?o.getEventProcessors():[],_=no().getScopeData();if(i){const y=i.getScopeData();sr(_,y)}if(d){const y=d.getScopeData();sr(_,y)}const f=[...n.attachments||[],..._.attachments];f.length&&(n.attachments=f),Es(c,_);const p=[...u,..._.eventProcessors];return on(p,c,n).then(y=>(y&&Ts(y),typeof s=="number"&&s>0?Rs(y,s,a):y))}function Ns(e,t){const{environment:n,release:r,dist:o,maxValueLength:i=250}=t;"environment"in e||(e.environment="environment"in t?n:kn),e.release===void 0&&r!==void 0&&(e.release=r),e.dist===void 0&&o!==void 0&&(e.dist=o),e.message&&(e.message=Pe(e.message,i));const s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=Pe(s.value,i));const a=e.request;a&&a.url&&(a.url=Pe(a.url,i))}const ar=new WeakMap;function Is(e,t){const n=w._sentryDebugIds;if(!n)return;let r;const o=ar.get(t);o?r=o:(r=new Map,ar.set(t,r));const i=Object.entries(n).reduce((s,[a,c])=>{let l;const d=r.get(a);d?l=d:(l=t(a),r.set(a,l));for(let u=l.length-1;u>=0;u--){const _=l[u];if(_.filename){s[_.filename]=c;break}}return s},{});try{e.exception.values.forEach(s=>{s.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=i[a.filename])})})}catch{}}function Ts(e){const t={};try{e.exception.values.forEach(r=>{r.stacktrace.frames.forEach(o=>{o.debug_id&&(o.abs_path?t[o.abs_path]=o.debug_id:o.filename&&(t[o.filename]=o.debug_id),delete o.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([r,o])=>{n.push({type:"sourcemap",code_file:r,debug_id:o})})}function Ds(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Rs(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:be(o.data,t,n)}}))},...e.user&&{user:be(e.user,t,n)},...e.contexts&&{contexts:be(e.contexts,t,n)},...e.extra&&{extra:be(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=be(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(o=>({...o,...o.data&&{data:be(o.data,t,n)}}))),r}function Ls(e,t){if(!t)return e;const n=e?e.clone():new we;return n.update(t),n}function Ms(e){if(e)return Os(e)?{captureContext:e}:Fs(e)?{captureContext:e}:e}function Os(e){return e instanceof we||typeof e=="function"}const $s=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function Fs(e){return Object.keys(e).some(t=>$s.includes(t))}function Ps(e,t){return te().captureException(e,Ms(t))}function As(e,t){const n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return te().captureMessage(e,n,r)}function io(e,t){return te().captureEvent(e,t)}function Us(){return!!F()}function cr(e){const t=F(),n=ze(),r=te(),{release:o,environment:i=kn}=t&&t.getOptions()||{},{userAgent:s}=w.navigator||{},a=Bi({release:o,environment:i,user:r.getUser()||n.getUser(),...s&&{userAgent:s},...e}),c=n.getSession();return c&&c.status==="ok"&&je(c,{status:"exited"}),so(),n.setSession(a),r.setSession(a),a}function so(){const e=ze(),t=te(),n=t.getSession()||e.getSession();n&&Yi(n),ao(),e.setSession(),t.setSession()}function ao(){const e=ze(),t=te(),n=F(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function ur(e=!1){if(e){so();return}ao()}const Hs="7";function js(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Bs(e){return`${js(e)}${e.projectId}/envelope/`}function Ys(e,t){return Ko({sentry_key:e.publicKey,sentry_version:Hs,...t&&{sentry_client:`${t.name}/${t.version}`}})}function Gs(e,t,n){return t||`${Bs(e)}?${Ys(e,n)}`}const lr=[];function qs(e){const t={};return e.forEach(n=>{const{name:r}=n,o=t[r];o&&!o.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function Xs(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(s=>{s.isDefaultInstance=!0});let r;Array.isArray(n)?r=[...t,...n]:typeof n=="function"?r=Qr(n(t)):r=t;const o=qs(r),i=o.findIndex(s=>s.name==="Debug");if(i>-1){const[s]=o.splice(i,1);o.push(s)}return o}function zs(e,t){const n={};return t.forEach(r=>{r&&co(e,r,n)}),n}function dr(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function co(e,t,n){if(n[t.name]){N&&g.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,lr.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),lr.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(o,i)=>r(o,i,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),o=Object.assign((i,s)=>r(i,s,e),{id:t.name});e.addEventProcessor(o)}N&&g.log(`Integration installed: ${t.name}`)}const fr="Not capturing exception because it's already been captured.";class Ws{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=Vo(t.dsn):N&&g.warn("No DSN provided, client will not send events."),this._dsn){const n=Gs(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:n})}}captureException(t,n,r){const o=ee();if(Kn(t))return N&&g.log(fr),o;const i={event_id:o,...n};return this._process(this.eventFromException(t,i).then(s=>this._captureEvent(s,i,r))),i.event_id}captureMessage(t,n,r,o){const i={event_id:ee(),...r},s=mn(t)?t:String(t),a=gn(t)?this.eventFromMessage(s,n,i):this.eventFromException(t,i);return this._process(a.then(c=>this._captureEvent(c,i,o))),i.event_id}captureEvent(t,n,r){const o=ee();if(n&&n.originalException&&Kn(n.originalException))return N&&g.log(fr),o;const i={event_id:o,...n},a=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,i,a||r)),i.event_id}captureSession(t){typeof t.release!="string"?N&&g.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),je(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(o=>r&&o))):Ie(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.emit("close"),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];co(this,t,this._integrations),n||dr(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=bs(t,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])r=Ti(r,Li(i));const o=this.sendEnvelope(r);o&&o.then(i=>this.emit("afterSendEvent",t,i),null)}sendSession(t){const n=ys(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(n)}recordDroppedEvent(t,n,r){if(this._options.sendClientReports){const o=typeof r=="number"?r:1,i=`${t}:${n}`;N&&g.log(`Recording outcome: "${i}"${o>1?` (${o} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+o}}on(t,n){const r=this._hooks[t]=this._hooks[t]||[];return r.push(n),()=>{const o=r.indexOf(n);o>-1&&r.splice(o,1)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(o=>o(...n))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,n=>(N&&g.error("Error while sending event:",n),n)):(N&&g.error("Transport disabled"),Ie({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=zs(this,t),dr(this,t)}_updateSessionFromEvent(t,n){let r=!1,o=!1;const i=n.exception&&n.exception.values;if(i){o=!0;for(const c of i){const l=c.mechanism;if(l&&l.handled===!1){r=!0;break}}}const s=t.status==="ok";(s&&t.errors===0||s&&r)&&(je(t,{...r&&{status:"crashed"},errors:t.errors||Number(o||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Q(n=>{let r=0;const o=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=o,t&&r>=t&&(clearInterval(i),n(!1)))},o)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,o=ze()){const i=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&s.length>0&&(n.integrations=s),this.emit("preprocessEvent",t,n),t.type||o.setLastEventId(t.event_id||n.event_id),Cs(i,t,n,r,this,o).then(a=>{if(a===null)return a;const c={...o.getPropagationContext(),...r?r.getPropagationContext():void 0};if(!(a.contexts&&a.contexts.trace)&&c){const{traceId:d,spanId:u,parentSpanId:_,dsc:f}=c;a.contexts={trace:W({trace_id:d,span_id:u,parent_span_id:_}),...a.contexts};const p=f||oo(d,this);a.sdkProcessingMetadata={dynamicSamplingContext:p,...a.sdkProcessingMetadata}}return a})}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then(o=>o.event_id,o=>{if(N){const i=o;i.logLevel==="log"?g.log(i.message):g.warn(i)}})}_processEvent(t,n,r){const o=this.getOptions(),{sampleRate:i}=o,s=lo(t),a=uo(t),c=t.type||"error",l=`before send for type \`${c}\``,d=typeof i>"u"?void 0:ms(i);if(a&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error",t),Tt(new ae(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const u=c==="replay_event"?"replay":c,f=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,n,r,f).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",u,t),new ae("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return p;const y=Ks(this,o,p,n);return Vs(y,l)}).then(p=>{if(p===null){if(this.recordDroppedEvent("before_send",u,t),s){const k=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",k)}throw new ae(`${l} returned \`null\`, will not send event.`,"log")}const R=r&&r.getSession();if(!s&&R&&this._updateSessionFromEvent(R,p),s){const E=p.sdkProcessingMetadata&&p.sdkProcessingMetadata.spanCountBeforeProcessing||0,k=p.spans?p.spans.length:0,P=E-k;P>0&&this.recordDroppedEvent("before_send","span",P)}const y=p.transaction_info;if(s&&y&&p.transaction!==t.transaction){const E="custom";p.transaction_info={...y,source:E}}return this.sendEvent(p,n),p}).then(null,p=>{throw p instanceof ae?p:(this.captureException(p,{data:{__sentry__:!0},originalException:p}),new ae(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
8
|
+
Reason: ${p}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[o,i]=n.split(":");return{reason:o,category:i,quantity:r}})}_flushOutcomes(){N&&g.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){N&&g.log("No outcomes to send");return}if(!this._dsn){N&&g.log("No dsn provided, will not send outcomes");return}N&&g.log("Sending outcomes:",t);const n=$i(t,this._options.tunnel&&Ft(this._dsn));this.sendEnvelope(n)}}function Vs(e,t){const n=`${t} must return \`null\` or a valid event.`;if(Ot(e))return e.then(r=>{if(!He(r)&&r!==null)throw new ae(n);return r},r=>{throw new ae(`${t} rejected with ${r}`)});if(!He(e)&&e!==null)throw new ae(n);return e}function Ks(e,t,n,r){const{beforeSend:o,beforeSendTransaction:i,beforeSendSpan:s}=t;if(uo(n)&&o)return o(n,r);if(lo(n)){if(n.spans&&s){const a=[];for(const c of n.spans){const l=s(c);l?a.push(l):e.recordDroppedEvent("before_send","span")}n.spans=a}if(i){if(n.spans){const a=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:a}}return i(n,r)}}return n}function uo(e){return e.type===void 0}function lo(e){return e.type==="transaction"}function Js(e,t){t.debug===!0&&(N?g.enable():it(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),te().update(t.initialScope);const r=new e(t);return Zs(r),r.init(),r}function Zs(e){te().setClient(e)}const Qs=64;function ea(e,t,n=Si(e.bufferSize||Qs)){let r={};const o=s=>n.drain(s);function i(s){const a=[];if(Zn(s,(u,_)=>{const f=Qn(_);if(Ui(r,f)){const p=_r(u,_);e.recordDroppedEvent("ratelimit_backoff",f,p)}else a.push(u)}),a.length===0)return Ie({});const c=at(s[0],a),l=u=>{Zn(c,(_,f)=>{const p=_r(_,f);e.recordDroppedEvent(u,Qn(f),p)})},d=()=>t({body:Di(c)}).then(u=>(u.statusCode!==void 0&&(u.statusCode<200||u.statusCode>=300)&&N&&g.warn(`Sentry responded with status code ${u.statusCode} to sent event.`),r=Hi(r,u),u),u=>{throw l("network_error"),u});return n.add(d).then(u=>u,u=>{if(u instanceof ae)return N&&g.error("Skipped sending event because buffer is full."),l("queue_overflow"),Ie({});throw u})}return{send:i,flush:o}}function _r(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function ta(e,t,n=[t],r="npm"){const o=e._metadata||{};o.sdk||(o.sdk={name:`sentry.javascript.${t}`,packages:n.map(i=>({name:`${r}:@sentry/${i}`,version:ve})),version:ve}),e._metadata=o}const na=100;function Te(e,t){const n=F(),r=ze();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:i=na}=n.getOptions();if(i<=0)return;const a={timestamp:st(),...e},c=o?it(()=>o(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,i))}let pr;const ra="FunctionToString",hr=new WeakMap,oa=()=>({name:ra,setupOnce(){pr=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=En(this),n=hr.has(F())&&t!==void 0?t:this;return pr.apply(n,e)}}catch{}},setup(e){hr.set(e,!0)}}),ia=oa,sa=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler"],aa="InboundFilters",ca=(e={})=>({name:aa,processEvent(t,n,r){const o=r.getOptions(),i=la(e,o);return da(t,i)?null:t}}),ua=ca;function la(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:sa],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function da(e,t){return t.ignoreInternal&&ga(e)?(N&&g.warn(`Event dropped due to being internal Sentry Error.
|
|
9
|
+
Event: ${ye(e)}`),!0):fa(e,t.ignoreErrors)?(N&&g.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
10
|
+
Event: ${ye(e)}`),!0):ba(e)?(N&&g.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
11
|
+
Event: ${ye(e)}`),!0):_a(e,t.ignoreTransactions)?(N&&g.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
12
|
+
Event: ${ye(e)}`),!0):pa(e,t.denyUrls)?(N&&g.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
13
13
|
Event: ${ye(e)}.
|
|
14
|
-
Url: ${Rt(e)}`),!0):
|
|
14
|
+
Url: ${Rt(e)}`),!0):ha(e,t.allowUrls)?!1:(N&&g.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
15
15
|
Event: ${ye(e)}.
|
|
16
|
-
Url: ${Rt(e)}`),!0)}function la(e,t){return e.type||!t||!t.length?!1:pa(e).some(n=>$t(n,t))}function da(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const n=e.transaction;return n?$t(n,t):!1}function fa(e,t){if(!t||!t.length)return!1;const n=Rt(e);return n?$t(n,t):!1}function _a(e,t){if(!t||!t.length)return!0;const n=Rt(e);return n?$t(n,t):!0}function pa(e){const t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),t}function ha(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function ma(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function Rt(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?ma(t):null}catch{return N&&g.error(`Cannot extract url for event ${ye(e)}`),null}}function ga(e){return e.type||!e.exception||!e.exception.values||e.exception.values.length===0?!1:!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value)}const ya="Dedupe",ba=()=>{let e;return{name:ya,processEvent(t){if(t.type)return t;try{if(Sa(t,e))return N&&g.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},Ea=ba;function Sa(e,t){return t?!!(va(e,t)||wa(e,t)):!1}function va(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!lo(e,t)||!uo(e,t))}function wa(e,t){const n=pr(t),r=pr(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!lo(e,t)||!uo(e,t))}function uo(e,t){let n=qn(e),r=qn(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let o=0;o<r.length;o++){const i=r[o],s=n[o];if(i.filename!==s.filename||i.lineno!==s.lineno||i.colno!==s.colno||i.function!==s.function)return!1}return!0}function lo(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function pr(e){return e.exception&&e.exception.values&&e.exception.values[0]}function fo(e,t={},n=te()){const{message:r,name:o,email:i,url:s,source:a,associatedEventId:c,tags:l}=e,d={contexts:{feedback:z({contact_email:i,name:o,message:r,url:s,source:a,associated_event_id:c})},type:"feedback",level:"info",tags:l},u=n&&n.getClient()||F();return u&&u.emit("beforeSendFeedback",d,t),n.captureEvent(d,t)}const x=w;let sn=0;function _o(){return sn>0}function ka(){sn++,setTimeout(()=>{sn--})}function Ye(e,t={},n){if(typeof e!="function")return e;try{const o=e.__sentry_wrapped__;if(o)return o;if(En(e))return e}catch{return e}const r=function(){const o=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);const i=o.map(s=>Ye(s,t));return e.apply(this,i)}catch(i){throw ka(),Ki(s=>{s.addEventProcessor(a=>(t.mechanism&&(en(a,void 0,void 0),nt(a,t.mechanism)),a.extra={...a.extra,arguments:o},a)),$s(i)}),i}};try{for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}catch{}Gr(r,e),Ce(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}const ct=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function xn(e,t){const n=Cn(e,t),r={type:t&&t.name,value:Ta(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function xa(e,t,n,r){const o=F(),i=o&&o.getOptions().normalizeDepth,s=Oa(t),a={__serialized__:Zr(t,i)};if(s)return{exception:{values:[xn(e,s)]},extra:a};const c={exception:{values:[{type:Mt(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:La(t,{isUnhandledRejection:r})}]},extra:a};if(n){const l=Cn(e,n);l.length&&(c.exception.values[0].stacktrace={frames:l})}return c}function Yt(e,t){return{exception:{values:[xn(e,t)]}}}function Cn(e,t){const n=t.stacktrace||t.stack||"",r=Na(t),o=Ia(t);try{return e(n,r,o)}catch{}return[]}const Ca=/Minified React error #\d+;/i;function Na(e){return e&&Ca.test(e.message)?1:0}function Ia(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function Ta(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function Da(e,t,n,r){const o=n&&n.syntheticException||void 0,i=Nn(e,t,o,r);return nt(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),Ie(i)}function Ra(e,t,n="info",r,o){const i=r&&r.syntheticException||void 0,s=an(e,t,i,o);return s.level=n,r&&r.event_id&&(s.event_id=r.event_id),Ie(s)}function Nn(e,t,n,r,o){let i;if(Ur(t)&&t.error)return Yt(e,t.error);if(Pn(t)||Ro(t)){const s=t;if("stack"in t)i=Yt(e,t);else{const a=s.name||(Pn(s)?"DOMError":"DOMException"),c=s.message?`${a}: ${s.message}`:a;i=an(e,c,n,r),en(i,c)}return"code"in s&&(i.tags={...i.tags,"DOMException.code":`${s.code}`}),i}return hn(t)?Yt(e,t):He(t)||Mt(t)?(i=xa(e,t,n,o),nt(i,{synthetic:!0}),i):(i=an(e,t,n,r),en(i,`${t}`,void 0),nt(i,{synthetic:!0}),i)}function an(e,t,n,r){const o={};if(r&&n){const i=Cn(e,n);i.length&&(o.exception={values:[{value:t,stacktrace:{frames:i}}]})}if(mn(t)){const{__sentry_template_string__:i,__sentry_template_values__:s}=t;return o.logentry={message:i,params:s},o}return o.message=t,o}function La(e,{isUnhandledRejection:t}){const n=Vo(e),r=t?"promise rejection":"exception";return Ur(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Mt(e)?`Event \`${Ma(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Ma(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Oa(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}function $a(e,{metadata:t,tunnel:n,dsn:r}){const o={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Ft(r)}},i=Fa(e);return at(o,[i])}function Fa(e){return[{type:"user_report"},e]}class Pa extends Xs{constructor(t){const n={parentSpanIsAlwaysRootSpan:!0,...t},r=x.SENTRY_SDK_SOURCE||di();Qs(n,"browser",["browser"],r),super(n),n.sendClientReports&&x.document&&x.document.addEventListener("visibilitychange",()=>{x.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return Da(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return Ra(this._options.stackParser,t,n,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){ct&&g.warn("SDK not enabled, will not capture user feedback.");return}const n=$a(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}}const Aa=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,j=w,Ua=1e3;let hr,cn,un;function Ha(e){const t="dom";De(t,e),Re(t,ja)}function ja(){if(!j.document)return;const e=oe.bind(null,"dom"),t=mr(e,!0);j.document.addEventListener("click",t,!1),j.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const r=j[n]&&j[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(W(r,"addEventListener",function(o){return function(i,s,a){if(i==="click"||i=="keypress")try{const c=this,l=c.__sentry_instrumentation_handlers__=c.__sentry_instrumentation_handlers__||{},d=l[i]=l[i]||{refCount:0};if(!d.handler){const u=mr(e);d.handler=u,o.call(this,i,u,a)}d.refCount++}catch{}return o.call(this,i,s,a)}}),W(r,"removeEventListener",function(o){return function(i,s,a){if(i==="click"||i=="keypress")try{const c=this,l=c.__sentry_instrumentation_handlers__||{},d=l[i];d&&(d.refCount--,d.refCount<=0&&(o.call(this,i,d.handler,a),d.handler=void 0,delete l[i]),Object.keys(l).length===0&&delete c.__sentry_instrumentation_handlers__)}catch{}return o.call(this,i,s,a)}}))})}function Ba(e){if(e.type!==cn)return!1;try{if(!e.target||e.target._sentryId!==un)return!1}catch{}return!0}function Ya(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function mr(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=Ga(n);if(Ya(n.type,r))return;Ce(n,"_sentryCaptured",!0),r&&!r._sentryId&&Ce(r,"_sentryId",ee());const o=n.type==="keypress"?"input":n.type;Ba(n)||(e({event:n,name:o,global:t}),cn=n.type,un=r?r._sentryId:void 0),clearTimeout(hr),hr=j.setTimeout(()=>{un=void 0,cn=void 0},Ua)}}function Ga(e){try{return e.target}catch{return null}}let ht;function po(e){const t="history";De(t,e),Re(t,qa)}function qa(){if(!Ui())return;const e=j.onpopstate;j.onpopstate=function(...n){const r=j.location.href,o=ht;if(ht=r,oe("history",{from:o,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){const o=r.length>2?r[2]:void 0;if(o){const i=ht,s=String(o);ht=s,oe("history",{from:i,to:s})}return n.apply(this,r)}}W(j.history,"pushState",t),W(j.history,"replaceState",t)}const St={};function Xa(e){const t=St[e];if(t)return t;let n=j[e];if(Zt(n))return St[e]=n.bind(j);const r=j.document;if(r&&typeof r.createElement=="function")try{const o=r.createElement("iframe");o.hidden=!0,r.head.appendChild(o);const i=o.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(o)}catch(o){Aa&&g.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,o)}return n&&(St[e]=n.bind(j))}function gr(e){St[e]=void 0}const Qe="__sentry_xhr_v3__";function Wa(e){const t="xhr";De(t,e),Re(t,za)}function za(){if(!j.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const o=_e()*1e3,i=fe(r[0])?r[0].toUpperCase():void 0,s=Va(r[1]);if(!i||!s)return t.apply(n,r);n[Qe]={method:i,url:s,request_headers:{}},i==="POST"&&s.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const a=()=>{const c=n[Qe];if(c&&n.readyState===4){try{c.status_code=n.status}catch{}const l={endTimestamp:_e()*1e3,startTimestamp:o,xhr:n};oe("xhr",l)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(c,l,d){return a(),c.apply(l,d)}}):n.addEventListener("readystatechange",a),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(c,l,d){const[u,_]=d,f=l[Qe];return f&&fe(u)&&fe(_)&&(f.request_headers[u.toLowerCase()]=_),c.apply(l,d)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const o=n[Qe];if(!o)return t.apply(n,r);r[0]!==void 0&&(o.body=r[0]);const i={startTimestamp:_e()*1e3,xhr:n};return oe("xhr",i),t.apply(n,r)}})}function Va(e){if(fe(e))return e;try{return e.toString()}catch{}}function Ka(e,t=Xa("fetch")){let n=0,r=0;function o(i){const s=i.body.length;n+=s,r++;const a={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return gr("fetch"),Tt("No fetch implementation available");try{return t(e.url,a).then(c=>(n-=s,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return gr("fetch"),n-=s,r--,Tt(c)}}return Zs(e,o)}const Ja=30,Za=50;function ln(e,t,n,r){const o={filename:e,function:t==="<anonymous>"?Ne:t,in_app:!0};return n!==void 0&&(o.lineno=n),r!==void 0&&(o.colno=r),o}const Qa=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,ec=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,tc=/\((\S*)(?::(\d+))(?::(\d+))\)/,nc=e=>{const t=Qa.exec(e);if(t){const[,r,o,i]=t;return ln(r,Ne,+o,+i)}const n=ec.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){const s=tc.exec(n[2]);s&&(n[2]=s[1],n[3]=s[2],n[4]=s[3])}const[o,i]=ho(n[1]||Ne,n[2]);return ln(i,o,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},rc=[Ja,nc],oc=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ic=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,sc=e=>{const t=oc.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=ic.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],o=t[1]||Ne;return[o,r]=ho(o,r),ln(r,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},ac=[Za,sc],cc=[rc,ac],uc=Wr(...cc),ho=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Ne,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},mt=1024,lc="Breadcrumbs",dc=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:lc,setup(n){t.console&&Qo(hc(n)),t.dom&&Ha(pc(n,t.dom)),t.xhr&&Wa(mc(n)),t.fetch&&ri(gc(n)),t.history&&po(yc(n)),t.sentry&&n.on("beforeSendEvent",_c(n))}}},fc=dc;function _c(e){return function(n){F()===e&&Te({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:ye(n)},{event:n})}}function pc(e,t){return function(r){if(F()!==e)return;let o,i,s=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>mt&&(ct&&g.warn(`\`dom.maxStringLength\` cannot exceed ${mt}, but a value of ${a} was configured. Sentry will use ${mt} instead.`),a=mt),typeof s=="string"&&(s=[s]);try{const l=r.event,d=bc(l)?l.target:l;o=jr(d,{keyAttrs:s,maxStringLength:a}),i=Ho(d)}catch{o="<unknown>"}if(o.length===0)return;const c={category:`ui.${r.name}`,message:o};i&&(c.data={"ui.component_name":i}),Te(c,{event:r.event,name:r.name,global:r.global})}}function hc(e){return function(n){if(F()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:vi(n.level),message:An(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${An(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Te(r,{input:n.args,level:n.level})}}function mc(e){return function(n){if(F()!==e)return;const{startTimestamp:r,endTimestamp:o}=n,i=n.xhr[Qe];if(!r||!o||!i)return;const{method:s,url:a,status_code:c,body:l}=i,d={method:s,url:a,status_code:c},u={xhr:n.xhr,input:l,startTimestamp:r,endTimestamp:o};Te({category:"xhr",data:d,type:"http"},u)}}function gc(e){return function(n){if(F()!==e)return;const{startTimestamp:r,endTimestamp:o}=n;if(o&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const i=n.fetchData,s={data:n.error,input:n.args,startTimestamp:r,endTimestamp:o};Te({category:"fetch",data:i,level:"error",type:"http"},s)}else{const i=n.response,s={...n.fetchData,status_code:i&&i.status},a={input:n.args,response:i,startTimestamp:r,endTimestamp:o};Te({category:"fetch",data:s,type:"http"},a)}}}function yc(e){return function(n){if(F()!==e)return;let r=n.from,o=n.to;const i=Bt(x.location.href);let s=r?Bt(r):void 0;const a=Bt(o);(!s||!s.path)&&(s=i),i.protocol===a.protocol&&i.host===a.host&&(o=a.relative),i.protocol===s.protocol&&i.host===s.host&&(r=s.relative),Te({category:"navigation",data:{from:r,to:o}})}}function bc(e){return!!e&&!!e.target}const Ec=["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"],Sc="BrowserApiErrors",vc=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:Sc,setupOnce(){t.setTimeout&&W(x,"setTimeout",yr),t.setInterval&&W(x,"setInterval",yr),t.requestAnimationFrame&&W(x,"requestAnimationFrame",kc),t.XMLHttpRequest&&"XMLHttpRequest"in x&&W(XMLHttpRequest.prototype,"send",xc);const n=t.eventTarget;n&&(Array.isArray(n)?n:Ec).forEach(Cc)}}},wc=vc;function yr(e){return function(...t){const n=t[0];return t[0]=Ye(n,{mechanism:{data:{function:ve(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function kc(e){return function(t){return e.apply(this,[Ye(t,{mechanism:{data:{function:"requestAnimationFrame",handler:ve(e)},handled:!1,type:"instrument"}})])}}function xc(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in n&&typeof n[o]=="function"&&W(n,o,function(i){const s={mechanism:{data:{function:o,handler:ve(i)},handled:!1,type:"instrument"}},a=En(i);return a&&(s.mechanism.data.handler=ve(a)),Ye(i,s)})}),e.apply(this,t)}}function Cc(e){const t=x,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(W(n,"addEventListener",function(r){return function(o,i,s){try{typeof i.handleEvent=="function"&&(i.handleEvent=Ye(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:ve(i),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[o,Ye(i,{mechanism:{data:{function:"addEventListener",handler:ve(i),target:e},handled:!1,type:"instrument"}}),s])}}),W(n,"removeEventListener",function(r){return function(o,i,s){const a=i;try{const c=a&&a.__sentry_wrapped__;c&&r.call(this,o,c,s)}catch{}return r.call(this,o,a,s)}}))}const Nc="GlobalHandlers",Ic=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:Nc,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(Dc(n),br("onerror")),t.onunhandledrejection&&(Rc(n),br("onunhandledrejection"))}}},Tc=Ic;function Dc(e){si(t=>{const{stackParser:n,attachStacktrace:r}=mo();if(F()!==e||_o())return;const{msg:o,url:i,line:s,column:a,error:c}=t,l=Oc(Nn(n,c||o,void 0,r,!1),i,s,a);l.level="error",ro(l,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function Rc(e){ci(t=>{const{stackParser:n,attachStacktrace:r}=mo();if(F()!==e||_o())return;const o=Lc(t),i=gn(o)?Mc(o):Nn(n,o,void 0,r,!0);i.level="error",ro(i,{originalException:o,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function Lc(e){if(gn(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 Oc(e,t,n,r){const o=e.exception=e.exception||{},i=o.values=o.values||[],s=i[0]=i[0]||{},a=s.stacktrace=s.stacktrace||{},c=a.frames=a.frames||[],l=isNaN(parseInt(r,10))?void 0:r,d=isNaN(parseInt(n,10))?void 0:n,u=fe(t)&&t.length>0?t:Br();return c.length===0&&c.push({colno:l,filename:u,function:Ne,in_app:!0,lineno:d}),e}function br(e){ct&&g.log(`Global Handler attached: ${e}`)}function mo(){const e=F();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const $c=()=>({name:"HttpContext",preprocessEvent(e){if(!x.navigator&&!x.location&&!x.document)return;const t=e.request&&e.request.url||x.location&&x.location.href,{referrer:n}=x.document||{},{userAgent:r}=x.navigator||{},o={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},i={...e.request,...t&&{url:t},headers:o};e.request=i}}),Fc="cause",Pc=5,Ac="LinkedErrors",Uc=(e={})=>{const t=e.limit||Pc,n=e.key||Fc;return{name:Ac,preprocessEvent(r,o,i){const s=i.getOptions();Fo(xn,s.stackParser,s.maxValueLength,n,t,r,o)}}},Hc=Uc;function jc(e){return[aa(),ra(),wc(),fc(),Tc(),Hc(),Ea(),$c()]}function Bc(e={}){const t={defaultIntegrations:jc(),release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:x.SENTRY_RELEASE&&x.SENTRY_RELEASE.id?x.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return e.defaultIntegrations==null&&delete e.defaultIntegrations,{...t,...e}}function Yc(){const e=typeof x.window<"u"&&x;if(!e)return!1;const t=e.chrome?"chrome":"browser",n=e[t],r=n&&n.runtime&&n.runtime.id,o=x.location&&x.location.href||"",i=["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"],s=!!r&&x===x.top&&i.some(c=>o.startsWith(`${c}//`)),a=typeof e.nw<"u";return!!r&&!s&&!a}function Gc(e={}){const t=Bc(e);if(Yc()){it(()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")});return}ct&&(zr()||g.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."));const n={...t,stackParser:Jo(t.stackParser||uc),integrations:Gs(t),transport:t.transport||Ka},r=Vs(Pa,n);return t.autoSessionTracking&&qc(),r}function qc(){if(typeof x.document>"u"){ct&&g.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}sr({ignoreDuration:!0}),ar(),po(({from:e,to:t})=>{e!==void 0&&e!==t&&(sr({ignoreDuration:!0}),ar())})}const Xc={replayIntegration:"replay",replayCanvasIntegration:"replay-canvas",feedbackIntegration:"feedback",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot",captureConsoleIntegration:"captureconsole",contextLinesIntegration:"contextlines",linkedErrorsIntegration:"linkederrors",debugIntegration:"debug",dedupeIntegration:"dedupe",extraErrorDataIntegration:"extraerrordata",httpClientIntegration:"httpclient",reportingObserverIntegration:"reportingobserver",rewriteFramesIntegration:"rewriteframes",sessionTimingIntegration:"sessiontiming",browserProfilingIntegration:"browserprofiling"},Er=x;async function Wc(e,t){const n=Xc[e],r=Er.Sentry=Er.Sentry||{};if(!n)throw new Error(`Cannot lazy load integration: ${e}`);const o=r[e];if(typeof o=="function"&&!("_isShim"in o))return o;const i=zc(n),s=x.document.createElement("script");s.src=i,s.crossOrigin="anonymous",s.referrerPolicy="origin",t&&s.setAttribute("nonce",t);const a=new Promise((l,d)=>{s.addEventListener("load",()=>l()),s.addEventListener("error",d)});x.document.body.appendChild(s);try{await a}catch{throw new Error(`Error when loading integration: ${e}`)}const c=r[e];if(typeof c!="function")throw new Error(`Could not load integration: ${e}`);return c}function zc(e){const t=F(),n=t&&t.getOptions(),r=n&&n.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${Se}/${e}.min.js`,r).toString()}const ce=w,C=ce.document,et=ce.navigator,go="Report a Bug",Vc="Cancel",Kc="Send Bug Report",Jc="Confirm",Zc="Report a Bug",Qc="your.email@example.org",eu="Email",tu="What's the bug? What did you expect?",nu="Description",ru="Your Name",ou="Name",iu="Thank you for your report!",su="(required)",au="Add a screenshot",cu="Remove screenshot",uu="widget",lu="api",du=5e3,fu=(e,t={includeReplay:!0})=>{if(!e.message)throw new Error("Unable to submit feedback with empty message");const n=F();if(!n)throw new Error("No client setup, cannot send feedback.");e.tags&&Object.keys(e.tags).length&&te().setTags(e.tags);const r=fo({source:lu,url:Br(),...e},t);return new Promise((o,i)=>{const s=setTimeout(()=>i("Unable to determine if Feedback was correctly sent."),5e3),a=n.on("afterSendEvent",(c,l)=>{if(c.event_id===r)return clearTimeout(s),a(),l&&typeof l.statusCode=="number"&&l.statusCode>=200&&l.statusCode<300&&o(r),l&&typeof l.statusCode=="number"&&l.statusCode===0?i("Unable to send Feedback. This is because of network issues, or because you are using an ad-blocker."):l&&typeof l.statusCode=="number"&&l.statusCode===403?i("Unable to send Feedback. This could be because this domain is not in your list of allowed domains."):i("Unable to send Feedback. This could be because of network issues, or because you are using an ad-blocker")})})},vt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function _u(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(et.userAgent)||/Macintosh/i.test(et.userAgent)&&et.maxTouchPoints&&et.maxTouchPoints>1||!isSecureContext)}function gt(e,t){return{...e,...t,tags:{...e.tags,...t.tags},onFormOpen:()=>{t.onFormOpen&&t.onFormOpen(),e.onFormOpen&&e.onFormOpen()},onFormClose:()=>{t.onFormClose&&t.onFormClose(),e.onFormClose&&e.onFormClose()},onSubmitSuccess:n=>{t.onSubmitSuccess&&t.onSubmitSuccess(n),e.onSubmitSuccess&&e.onSubmitSuccess(n)},onSubmitError:n=>{t.onSubmitError&&t.onSubmitError(n),e.onSubmitError&&e.onSubmitError(n)},onFormSubmitted:()=>{t.onFormSubmitted&&t.onFormSubmitted(),e.onFormSubmitted&&e.onFormSubmitted()},themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function pu(e){const t=C.createElement("style");return t.textContent=`
|
|
16
|
+
Url: ${Rt(e)}`),!0)}function fa(e,t){return e.type||!t||!t.length?!1:ma(e).some(n=>$t(n,t))}function _a(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const n=e.transaction;return n?$t(n,t):!1}function pa(e,t){if(!t||!t.length)return!1;const n=Rt(e);return n?$t(n,t):!1}function ha(e,t){if(!t||!t.length)return!0;const n=Rt(e);return n?$t(n,t):!0}function ma(e){const t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),t}function ga(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function ya(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function Rt(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?ya(t):null}catch{return N&&g.error(`Cannot extract url for event ${ye(e)}`),null}}function ba(e){return e.type||!e.exception||!e.exception.values||e.exception.values.length===0?!1:!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value)}const Ea="Dedupe",va=()=>{let e;return{name:Ea,processEvent(t){if(t.type)return t;try{if(wa(t,e))return N&&g.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},Sa=va;function wa(e,t){return t?!!(ka(e,t)||xa(e,t)):!1}function ka(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!_o(e,t)||!fo(e,t))}function xa(e,t){const n=mr(t),r=mr(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!_o(e,t)||!fo(e,t))}function fo(e,t){let n=zn(e),r=zn(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let o=0;o<r.length;o++){const i=r[o],s=n[o];if(i.filename!==s.filename||i.lineno!==s.lineno||i.colno!==s.colno||i.function!==s.function)return!1}return!0}function _o(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function mr(e){return e.exception&&e.exception.values&&e.exception.values[0]}function po(e,t={},n=te()){const{message:r,name:o,email:i,url:s,source:a,associatedEventId:c,tags:l}=e,d={contexts:{feedback:W({contact_email:i,name:o,message:r,url:s,source:a,associated_event_id:c})},type:"feedback",level:"info",tags:l},u=n&&n.getClient()||F();return u&&u.emit("beforeSendFeedback",d,t),n.captureEvent(d,t)}const x=w;let sn=0;function ho(){return sn>0}function Ca(){sn++,setTimeout(()=>{sn--})}function Ye(e,t={},n){if(typeof e!="function")return e;try{const o=e.__sentry_wrapped__;if(o)return o;if(En(e))return e}catch{return e}const r=function(){const o=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);const i=o.map(s=>Ye(s,t));return e.apply(this,i)}catch(i){throw Ca(),Zi(s=>{s.addEventProcessor(a=>(t.mechanism&&(en(a,void 0,void 0),nt(a,t.mechanism)),a.extra={...a.extra,arguments:o},a)),Ps(i)}),i}};try{for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}catch{}Xr(r,e),Ce(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}const ct=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function xn(e,t){const n=Cn(e,t),r={type:t&&t.name,value:Ra(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Na(e,t,n,r){const o=F(),i=o&&o.getOptions().normalizeDepth,s=Fa(t),a={__serialized__:eo(t,i)};if(s)return{exception:{values:[xn(e,s)]},extra:a};const c={exception:{values:[{type:Mt(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Oa(t,{isUnhandledRejection:r})}]},extra:a};if(n){const l=Cn(e,n);l.length&&(c.exception.values[0].stacktrace={frames:l})}return c}function Yt(e,t){return{exception:{values:[xn(e,t)]}}}function Cn(e,t){const n=t.stacktrace||t.stack||"",r=Ta(t),o=Da(t);try{return e(n,r,o)}catch{}return[]}const Ia=/Minified React error #\d+;/i;function Ta(e){return e&&Ia.test(e.message)?1:0}function Da(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function Ra(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function La(e,t,n,r){const o=n&&n.syntheticException||void 0,i=Nn(e,t,o,r);return nt(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),Ie(i)}function Ma(e,t,n="info",r,o){const i=r&&r.syntheticException||void 0,s=an(e,t,i,o);return s.level=n,r&&r.event_id&&(s.event_id=r.event_id),Ie(s)}function Nn(e,t,n,r,o){let i;if(jr(t)&&t.error)return Yt(e,t.error);if(Un(t)||Mo(t)){const s=t;if("stack"in t)i=Yt(e,t);else{const a=s.name||(Un(s)?"DOMError":"DOMException"),c=s.message?`${a}: ${s.message}`:a;i=an(e,c,n,r),en(i,c)}return"code"in s&&(i.tags={...i.tags,"DOMException.code":`${s.code}`}),i}return hn(t)?Yt(e,t):He(t)||Mt(t)?(i=Na(e,t,n,o),nt(i,{synthetic:!0}),i):(i=an(e,t,n,r),en(i,`${t}`,void 0),nt(i,{synthetic:!0}),i)}function an(e,t,n,r){const o={};if(r&&n){const i=Cn(e,n);i.length&&(o.exception={values:[{value:t,stacktrace:{frames:i}}]})}if(mn(t)){const{__sentry_template_string__:i,__sentry_template_values__:s}=t;return o.logentry={message:i,params:s},o}return o.message=t,o}function Oa(e,{isUnhandledRejection:t}){const n=Jo(e),r=t?"promise rejection":"exception";return jr(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Mt(e)?`Event \`${$a(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function $a(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Fa(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}function Pa(e,{metadata:t,tunnel:n,dsn:r}){const o={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Ft(r)}},i=Aa(e);return at(o,[i])}function Aa(e){return[{type:"user_report"},e]}class Ua extends Ws{constructor(t){const n={parentSpanIsAlwaysRootSpan:!0,...t},r=x.SENTRY_SDK_SOURCE||_i();ta(n,"browser",["browser"],r),super(n),n.sendClientReports&&x.document&&x.document.addEventListener("visibilitychange",()=>{x.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return La(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return Ma(this._options.stackParser,t,n,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){ct&&g.warn("SDK not enabled, will not capture user feedback.");return}const n=Pa(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}}const Ha=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,j=w,ja=1e3;let gr,cn,un;function Ba(e){const t="dom";De(t,e),Re(t,Ya)}function Ya(){if(!j.document)return;const e=oe.bind(null,"dom"),t=yr(e,!0);j.document.addEventListener("click",t,!1),j.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const r=j[n]&&j[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(z(r,"addEventListener",function(o){return function(i,s,a){if(i==="click"||i=="keypress")try{const c=this,l=c.__sentry_instrumentation_handlers__=c.__sentry_instrumentation_handlers__||{},d=l[i]=l[i]||{refCount:0};if(!d.handler){const u=yr(e);d.handler=u,o.call(this,i,u,a)}d.refCount++}catch{}return o.call(this,i,s,a)}}),z(r,"removeEventListener",function(o){return function(i,s,a){if(i==="click"||i=="keypress")try{const c=this,l=c.__sentry_instrumentation_handlers__||{},d=l[i];d&&(d.refCount--,d.refCount<=0&&(o.call(this,i,d.handler,a),d.handler=void 0,delete l[i]),Object.keys(l).length===0&&delete c.__sentry_instrumentation_handlers__)}catch{}return o.call(this,i,s,a)}}))})}function Ga(e){if(e.type!==cn)return!1;try{if(!e.target||e.target._sentryId!==un)return!1}catch{}return!0}function qa(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function yr(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=Xa(n);if(qa(n.type,r))return;Ce(n,"_sentryCaptured",!0),r&&!r._sentryId&&Ce(r,"_sentryId",ee());const o=n.type==="keypress"?"input":n.type;Ga(n)||(e({event:n,name:o,global:t}),cn=n.type,un=r?r._sentryId:void 0),clearTimeout(gr),gr=j.setTimeout(()=>{un=void 0,cn=void 0},ja)}}function Xa(e){try{return e.target}catch{return null}}let ht;function mo(e){const t="history";De(t,e),Re(t,za)}function za(){if(!ji())return;const e=j.onpopstate;j.onpopstate=function(...n){const r=j.location.href,o=ht;if(ht=r,oe("history",{from:o,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){const o=r.length>2?r[2]:void 0;if(o){const i=ht,s=String(o);ht=s,oe("history",{from:i,to:s})}return n.apply(this,r)}}z(j.history,"pushState",t),z(j.history,"replaceState",t)}const vt={};function Wa(e){const t=vt[e];if(t)return t;let n=j[e];if(Zt(n))return vt[e]=n.bind(j);const r=j.document;if(r&&typeof r.createElement=="function")try{const o=r.createElement("iframe");o.hidden=!0,r.head.appendChild(o);const i=o.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(o)}catch(o){Ha&&g.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,o)}return n&&(vt[e]=n.bind(j))}function br(e){vt[e]=void 0}const Qe="__sentry_xhr_v3__";function Va(e){const t="xhr";De(t,e),Re(t,Ka)}function Ka(){if(!j.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const o=_e()*1e3,i=fe(r[0])?r[0].toUpperCase():void 0,s=Ja(r[1]);if(!i||!s)return t.apply(n,r);n[Qe]={method:i,url:s,request_headers:{}},i==="POST"&&s.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const a=()=>{const c=n[Qe];if(c&&n.readyState===4){try{c.status_code=n.status}catch{}const l={endTimestamp:_e()*1e3,startTimestamp:o,xhr:n};oe("xhr",l)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(c,l,d){return a(),c.apply(l,d)}}):n.addEventListener("readystatechange",a),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(c,l,d){const[u,_]=d,f=l[Qe];return f&&fe(u)&&fe(_)&&(f.request_headers[u.toLowerCase()]=_),c.apply(l,d)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const o=n[Qe];if(!o)return t.apply(n,r);r[0]!==void 0&&(o.body=r[0]);const i={startTimestamp:_e()*1e3,xhr:n};return oe("xhr",i),t.apply(n,r)}})}function Ja(e){if(fe(e))return e;try{return e.toString()}catch{}}function Za(e,t=Wa("fetch")){let n=0,r=0;function o(i){const s=i.body.length;n+=s,r++;const a={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return br("fetch"),Tt("No fetch implementation available");try{return t(e.url,a).then(c=>(n-=s,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return br("fetch"),n-=s,r--,Tt(c)}}return ea(e,o)}const Qa=30,ec=50;function ln(e,t,n,r){const o={filename:e,function:t==="<anonymous>"?Ne:t,in_app:!0};return n!==void 0&&(o.lineno=n),r!==void 0&&(o.colno=r),o}const tc=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,nc=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,rc=/\((\S*)(?::(\d+))(?::(\d+))\)/,oc=e=>{const t=tc.exec(e);if(t){const[,r,o,i]=t;return ln(r,Ne,+o,+i)}const n=nc.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){const s=rc.exec(n[2]);s&&(n[2]=s[1],n[3]=s[2],n[4]=s[3])}const[o,i]=go(n[1]||Ne,n[2]);return ln(i,o,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},ic=[Qa,oc],sc=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ac=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,cc=e=>{const t=sc.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=ac.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],o=t[1]||Ne;return[o,r]=go(o,r),ln(r,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},uc=[ec,cc],lc=[ic,uc],dc=Vr(...lc),go=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Ne,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},mt=1024,fc="Breadcrumbs",_c=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:fc,setup(n){t.console&&ti(gc(n)),t.dom&&Ba(mc(n,t.dom)),t.xhr&&Va(yc(n)),t.fetch&&ii(bc(n)),t.history&&mo(Ec(n)),t.sentry&&n.on("beforeSendEvent",hc(n))}}},pc=_c;function hc(e){return function(n){F()===e&&Te({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:ye(n)},{event:n})}}function mc(e,t){return function(r){if(F()!==e)return;let o,i,s=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>mt&&(ct&&g.warn(`\`dom.maxStringLength\` cannot exceed ${mt}, but a value of ${a} was configured. Sentry will use ${mt} instead.`),a=mt),typeof s=="string"&&(s=[s]);try{const l=r.event,d=vc(l)?l.target:l;o=Yr(d,{keyAttrs:s,maxStringLength:a}),i=Bo(d)}catch{o="<unknown>"}if(o.length===0)return;const c={category:`ui.${r.name}`,message:o};i&&(c.data={"ui.component_name":i}),Te(c,{event:r.event,name:r.name,global:r.global})}}function gc(e){return function(n){if(F()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:ki(n.level),message:Hn(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Hn(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Te(r,{input:n.args,level:n.level})}}function yc(e){return function(n){if(F()!==e)return;const{startTimestamp:r,endTimestamp:o}=n,i=n.xhr[Qe];if(!r||!o||!i)return;const{method:s,url:a,status_code:c,body:l}=i,d={method:s,url:a,status_code:c},u={xhr:n.xhr,input:l,startTimestamp:r,endTimestamp:o};Te({category:"xhr",data:d,type:"http"},u)}}function bc(e){return function(n){if(F()!==e)return;const{startTimestamp:r,endTimestamp:o}=n;if(o&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const i=n.fetchData,s={data:n.error,input:n.args,startTimestamp:r,endTimestamp:o};Te({category:"fetch",data:i,level:"error",type:"http"},s)}else{const i=n.response,s={...n.fetchData,status_code:i&&i.status},a={input:n.args,response:i,startTimestamp:r,endTimestamp:o};Te({category:"fetch",data:s,type:"http"},a)}}}function Ec(e){return function(n){if(F()!==e)return;let r=n.from,o=n.to;const i=Bt(x.location.href);let s=r?Bt(r):void 0;const a=Bt(o);(!s||!s.path)&&(s=i),i.protocol===a.protocol&&i.host===a.host&&(o=a.relative),i.protocol===s.protocol&&i.host===s.host&&(r=s.relative),Te({category:"navigation",data:{from:r,to:o}})}}function vc(e){return!!e&&!!e.target}const Sc=["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"],wc="BrowserApiErrors",kc=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:wc,setupOnce(){t.setTimeout&&z(x,"setTimeout",Er),t.setInterval&&z(x,"setInterval",Er),t.requestAnimationFrame&&z(x,"requestAnimationFrame",Cc),t.XMLHttpRequest&&"XMLHttpRequest"in x&&z(XMLHttpRequest.prototype,"send",Nc);const n=t.eventTarget;n&&(Array.isArray(n)?n:Sc).forEach(Ic)}}},xc=kc;function Er(e){return function(...t){const n=t[0];return t[0]=Ye(n,{mechanism:{data:{function:Se(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Cc(e){return function(t){return e.apply(this,[Ye(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Se(e)},handled:!1,type:"instrument"}})])}}function Nc(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in n&&typeof n[o]=="function"&&z(n,o,function(i){const s={mechanism:{data:{function:o,handler:Se(i)},handled:!1,type:"instrument"}},a=En(i);return a&&(s.mechanism.data.handler=Se(a)),Ye(i,s)})}),e.apply(this,t)}}function Ic(e){const t=x,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(z(n,"addEventListener",function(r){return function(o,i,s){try{typeof i.handleEvent=="function"&&(i.handleEvent=Ye(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Se(i),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[o,Ye(i,{mechanism:{data:{function:"addEventListener",handler:Se(i),target:e},handled:!1,type:"instrument"}}),s])}}),z(n,"removeEventListener",function(r){return function(o,i,s){const a=i;try{const c=a&&a.__sentry_wrapped__;c&&r.call(this,o,c,s)}catch{}return r.call(this,o,a,s)}}))}const Tc="GlobalHandlers",Dc=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:Tc,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(Lc(n),vr("onerror")),t.onunhandledrejection&&(Mc(n),vr("onunhandledrejection"))}}},Rc=Dc;function Lc(e){ci(t=>{const{stackParser:n,attachStacktrace:r}=yo();if(F()!==e||ho())return;const{msg:o,url:i,line:s,column:a,error:c}=t,l=Fc(Nn(n,c||o,void 0,r,!1),i,s,a);l.level="error",io(l,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function Mc(e){li(t=>{const{stackParser:n,attachStacktrace:r}=yo();if(F()!==e||ho())return;const o=Oc(t),i=gn(o)?$c(o):Nn(n,o,void 0,r,!0);i.level="error",io(i,{originalException:o,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function Oc(e){if(gn(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 $c(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Fc(e,t,n,r){const o=e.exception=e.exception||{},i=o.values=o.values||[],s=i[0]=i[0]||{},a=s.stacktrace=s.stacktrace||{},c=a.frames=a.frames||[],l=isNaN(parseInt(r,10))?void 0:r,d=isNaN(parseInt(n,10))?void 0:n,u=fe(t)&&t.length>0?t:Gr();return c.length===0&&c.push({colno:l,filename:u,function:Ne,in_app:!0,lineno:d}),e}function vr(e){ct&&g.log(`Global Handler attached: ${e}`)}function yo(){const e=F();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Pc=()=>({name:"HttpContext",preprocessEvent(e){if(!x.navigator&&!x.location&&!x.document)return;const t=e.request&&e.request.url||x.location&&x.location.href,{referrer:n}=x.document||{},{userAgent:r}=x.navigator||{},o={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},i={...e.request,...t&&{url:t},headers:o};e.request=i}}),Ac="cause",Uc=5,Hc="LinkedErrors",jc=(e={})=>{const t=e.limit||Uc,n=e.key||Ac;return{name:Hc,preprocessEvent(r,o,i){const s=i.getOptions();Ao(xn,s.stackParser,s.maxValueLength,n,t,r,o)}}},Bc=jc;function Yc(e){return[ua(),ia(),xc(),pc(),Rc(),Bc(),Sa(),Pc()]}function Gc(e={}){const t={defaultIntegrations:Yc(),release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:x.SENTRY_RELEASE&&x.SENTRY_RELEASE.id?x.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return e.defaultIntegrations==null&&delete e.defaultIntegrations,{...t,...e}}function qc(){const e=typeof x.window<"u"&&x;if(!e)return!1;const t=e.chrome?"chrome":"browser",n=e[t],r=n&&n.runtime&&n.runtime.id,o=x.location&&x.location.href||"",i=["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"],s=!!r&&x===x.top&&i.some(c=>o.startsWith(`${c}//`)),a=typeof e.nw<"u";return!!r&&!s&&!a}function Xc(e={}){const t=Gc(e);if(qc()){it(()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")});return}ct&&(Kr()||g.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."));const n={...t,stackParser:Qo(t.stackParser||dc),integrations:Xs(t),transport:t.transport||Za},r=Js(Ua,n);return t.autoSessionTracking&&zc(),r}function zc(){if(typeof x.document>"u"){ct&&g.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}cr({ignoreDuration:!0}),ur(),mo(({from:e,to:t})=>{e!==void 0&&e!==t&&(cr({ignoreDuration:!0}),ur())})}const Wc={replayIntegration:"replay",replayCanvasIntegration:"replay-canvas",feedbackIntegration:"feedback",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot",captureConsoleIntegration:"captureconsole",contextLinesIntegration:"contextlines",linkedErrorsIntegration:"linkederrors",debugIntegration:"debug",dedupeIntegration:"dedupe",extraErrorDataIntegration:"extraerrordata",httpClientIntegration:"httpclient",reportingObserverIntegration:"reportingobserver",rewriteFramesIntegration:"rewriteframes",sessionTimingIntegration:"sessiontiming",browserProfilingIntegration:"browserprofiling"},Sr=x;async function Vc(e,t){const n=Wc[e],r=Sr.Sentry=Sr.Sentry||{};if(!n)throw new Error(`Cannot lazy load integration: ${e}`);const o=r[e];if(typeof o=="function"&&!("_isShim"in o))return o;const i=Kc(n),s=x.document.createElement("script");s.src=i,s.crossOrigin="anonymous",s.referrerPolicy="origin",t&&s.setAttribute("nonce",t);const a=new Promise((l,d)=>{s.addEventListener("load",()=>l()),s.addEventListener("error",d)});x.document.body.appendChild(s);try{await a}catch{throw new Error(`Error when loading integration: ${e}`)}const c=r[e];if(typeof c!="function")throw new Error(`Could not load integration: ${e}`);return c}function Kc(e){const t=F(),n=t&&t.getOptions(),r=n&&n.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${ve}/${e}.min.js`,r).toString()}const ce=w,C=ce.document,et=ce.navigator,bo="Report a Bug",Jc="Cancel",Zc="Send Bug Report",Qc="Confirm",eu="Report a Bug",tu="your.email@example.org",nu="Email",ru="What's the bug? What did you expect?",ou="Description",iu="Your Name",su="Name",au="Thank you for your report!",cu="(required)",uu="Add a screenshot",lu="Remove screenshot",du="widget",fu="api",_u=5e3,pu=(e,t={includeReplay:!0})=>{if(!e.message)throw new Error("Unable to submit feedback with empty message");const n=F();if(!n)throw new Error("No client setup, cannot send feedback.");e.tags&&Object.keys(e.tags).length&&te().setTags(e.tags);const r=po({source:fu,url:Gr(),...e},t);return new Promise((o,i)=>{const s=setTimeout(()=>i("Unable to determine if Feedback was correctly sent."),5e3),a=n.on("afterSendEvent",(c,l)=>{if(c.event_id===r)return clearTimeout(s),a(),l&&typeof l.statusCode=="number"&&l.statusCode>=200&&l.statusCode<300&&o(r),l&&typeof l.statusCode=="number"&&l.statusCode===0?i("Unable to send Feedback. This is because of network issues, or because you are using an ad-blocker."):l&&typeof l.statusCode=="number"&&l.statusCode===403?i("Unable to send Feedback. This could be because this domain is not in your list of allowed domains."):i("Unable to send Feedback. This could be because of network issues, or because you are using an ad-blocker")})})},St=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function hu(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(et.userAgent)||/Macintosh/i.test(et.userAgent)&&et.maxTouchPoints&&et.maxTouchPoints>1||!isSecureContext)}function gt(e,t){return{...e,...t,tags:{...e.tags,...t.tags},onFormOpen:()=>{t.onFormOpen&&t.onFormOpen(),e.onFormOpen&&e.onFormOpen()},onFormClose:()=>{t.onFormClose&&t.onFormClose(),e.onFormClose&&e.onFormClose()},onSubmitSuccess:n=>{t.onSubmitSuccess&&t.onSubmitSuccess(n),e.onSubmitSuccess&&e.onSubmitSuccess(n)},onSubmitError:n=>{t.onSubmitError&&t.onSubmitError(n),e.onSubmitError&&e.onSubmitError(n)},onFormSubmitted:()=>{t.onFormSubmitted&&t.onFormSubmitted(),e.onFormSubmitted&&e.onFormSubmitted()},themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function mu(e){const t=C.createElement("style");return t.textContent=`
|
|
17
17
|
.widget__actor {
|
|
18
18
|
position: fixed;
|
|
19
19
|
z-index: var(--z-index);
|
|
@@ -64,7 +64,7 @@ Url: ${Rt(e)}`),!0)}function la(e,t){return e.type||!t||!t.length?!1:pa(e).some(
|
|
|
64
64
|
display: none;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
`,e&&t.setAttribute("nonce",e),t}function X(e,t){return Object.entries(t).forEach(([n,r])=>{e.setAttributeNS(null,n,r)}),e}const Fe=20,
|
|
67
|
+
`,e&&t.setAttribute("nonce",e),t}function X(e,t){return Object.entries(t).forEach(([n,r])=>{e.setAttributeNS(null,n,r)}),e}const Fe=20,gu="http://www.w3.org/2000/svg";function yu(){const e=a=>ce.document.createElementNS(gu,a),t=X(e("svg"),{width:`${Fe}`,height:`${Fe}`,viewBox:`0 0 ${Fe} ${Fe}`,fill:"var(--foreground)"}),n=X(e("g"),{clipPath:"url(#clip0_57_80)"}),r=X(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z"});t.appendChild(n).appendChild(r);const o=e("defs"),i=X(e("clipPath"),{id:"clip0_57_80"}),s=X(e("rect"),{width:`${Fe}`,height:`${Fe}`,fill:"white"});return i.appendChild(s),o.appendChild(i),t.appendChild(o).appendChild(i).appendChild(s),t}function bu({triggerLabel:e,triggerAriaLabel:t,shadow:n,styleNonce:r}){const o=C.createElement("button");if(o.type="button",o.className="widget__actor",o.ariaHidden="false",o.ariaLabel=t||e||bo,o.appendChild(yu()),e){const s=C.createElement("span");s.appendChild(C.createTextNode(e)),o.appendChild(s)}const i=mu(r);return{el:o,appendToDom(){n.appendChild(i),n.appendChild(o)},removeFromDom(){n.removeChild(o),n.removeChild(i)},show(){o.ariaHidden="false"},hide(){o.ariaHidden="true"}}}const Eo="rgba(88, 74, 192, 1)",Eu={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:Eo,successColor:"#268d75",errorColor:"#df3338",border:"1.5px solid rgba(41, 35, 47, 0.13)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(95%)"},wr={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackground:Eo,successColor:"#2da98c",errorColor:"#f55459",border:"1.5px solid rgba(235, 230, 239, 0.15)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(150%)"};function kr(e){return`
|
|
68
68
|
--foreground: ${e.foreground};
|
|
69
69
|
--background: ${e.background};
|
|
70
70
|
--accent-foreground: ${e.accentForeground};
|
|
@@ -75,7 +75,7 @@ Url: ${Rt(e)}`),!0)}function la(e,t){return e.type||!t||!t.length?!1:pa(e).some(
|
|
|
75
75
|
--box-shadow: ${e.boxShadow};
|
|
76
76
|
--outline: ${e.outline};
|
|
77
77
|
--interactive-filter: ${e.interactiveFilter};
|
|
78
|
-
`}function
|
|
78
|
+
`}function vu({colorScheme:e,themeDark:t,themeLight:n,styleNonce:r}){const o=C.createElement("style");return o.textContent=`
|
|
79
79
|
:host {
|
|
80
80
|
--font-family: system-ui, 'Helvetica Neue', Arial, sans-serif;
|
|
81
81
|
--font-size: 14px;
|
|
@@ -90,17 +90,17 @@ Url: ${Rt(e)}`),!0)}function la(e,t){return e.type||!t||!t.length?!1:pa(e).some(
|
|
|
90
90
|
|
|
91
91
|
${e!=="system"?"color-scheme: only light;":""}
|
|
92
92
|
|
|
93
|
-
${
|
|
93
|
+
${kr(e==="dark"?{...wr,...t}:{...Eu,...n})}
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
${e==="system"?`
|
|
97
97
|
@media (prefers-color-scheme: dark) {
|
|
98
98
|
:host {
|
|
99
|
-
${
|
|
99
|
+
${kr({...wr,...t})}
|
|
100
100
|
}
|
|
101
101
|
}`:""}
|
|
102
102
|
}
|
|
103
|
-
`,r&&o.setAttribute("nonce",r),o}const Eu=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>({id:o="sentry-feedback",autoInject:i=!0,showBranding:s=!0,isEmailRequired:a=!1,isNameRequired:c=!1,showEmail:l=!0,showName:d=!0,enableScreenshot:u=!0,useSentryUser:_={email:"email",name:"username"},tags:f,styleNonce:p,scriptNonce:R,colorScheme:y="system",themeLight:E={},themeDark:k={},addScreenshotButtonLabel:P=au,cancelButtonLabel:B=Vc,confirmButtonLabel:ne=Jc,emailLabel:V=eu,emailPlaceholder:K=Qc,formTitle:ie=Zc,isRequiredLabel:h=su,messageLabel:m=nu,messagePlaceholder:v=tu,nameLabel:S=ou,namePlaceholder:U=ru,removeScreenshotButtonLabel:re=cu,submitButtonLabel:O=Kc,successMessageText:Y=iu,triggerLabel:Me=go,triggerAriaLabel:G="",onFormOpen:J,onFormClose:Oe,onSubmitSuccess:he,onSubmitError:ze,onFormSubmitted:To}={})=>{const Ve={id:o,autoInject:i,showBranding:s,isEmailRequired:a,isNameRequired:c,showEmail:l,showName:d,enableScreenshot:u,useSentryUser:_,tags:f,styleNonce:p,scriptNonce:R,colorScheme:y,themeDark:k,themeLight:E,triggerLabel:Me,triggerAriaLabel:G,cancelButtonLabel:B,submitButtonLabel:O,confirmButtonLabel:ne,formTitle:ie,emailLabel:V,emailPlaceholder:K,messageLabel:m,messagePlaceholder:v,nameLabel:S,namePlaceholder:U,successMessageText:Y,isRequiredLabel:h,addScreenshotButtonLabel:P,removeScreenshotButtonLabel:re,onFormClose:Oe,onFormOpen:J,onSubmitError:ze,onSubmitSuccess:he,onFormSubmitted:To};let me=null,Ke=[];const Mn=D=>{if(!me){const $=C.createElement("div");$.id=String(D.id),C.body.appendChild($),me=$.attachShadow({mode:"open"}),me.appendChild(bu(D))}return me},On=async(D,$,se)=>{const H=F(),A=H&&H.getIntegrationByName(D);if(A)return A;const $e=($&&$()||await e(se,R))();return H&&H.addIntegration($e),$e},$n=async D=>{const $=D.enableScreenshot&&_u(),[se,H]=await Promise.all([On("FeedbackModal",t,"feedbackModalIntegration"),$?On("FeedbackScreenshot",n,"feedbackScreenshotIntegration"):void 0]);if(!se)throw vt&&g.error("[Feedback] Missing feedback modal integration. Try using `feedbackSyncIntegration` in your `Sentry.init`."),new Error("[Feedback] Missing feedback modal integration!");$&&!H&&vt&&g.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.");const A=se.createDialog({options:{...D,onFormClose:()=>{A&&A.close(),D.onFormClose&&D.onFormClose()},onFormSubmitted:()=>{A&&A.close(),D.onFormSubmitted&&D.onFormSubmitted()}},screenshotIntegration:$?H:void 0,sendFeedback:fu,shadow:Mn(D)});return A},Fn=(D,$={})=>{const se=gt(Ve,$),H=typeof D=="string"?C.querySelector(D):typeof D.addEventListener=="function"?D:null;if(!H)throw vt&&g.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let A=null;const Ht=async()=>{A||(A=await $n({...se,onFormSubmitted:()=>{A&&A.removeFromDom(),se.onFormSubmitted&&se.onFormSubmitted()}})),A.appendToDom(),A.open()};H.addEventListener("click",Ht);const $e=()=>{Ke=Ke.filter(Do=>Do!==$e),A&&A.removeFromDom(),A=null,H.removeEventListener("click",Ht)};return Ke.push($e),$e},Ut=(D={})=>{const $=gt(Ve,D),se=Mn($),H=gu({triggerLabel:$.triggerLabel,triggerAriaLabel:$.triggerAriaLabel,shadow:se,styleNonce:p});return Fn(H.el,{...$,onFormOpen(){H.hide()},onFormClose(){H.show()},onFormSubmitted(){H.show()}}),H};return{name:"Feedback",setupOnce(){!_i()||!Ve.autoInject||(C.readyState==="loading"?C.addEventListener("DOMContentLoaded",()=>Ut().appendToDom()):Ut().appendToDom())},attachTo:Fn,createWidget(D={}){const $=Ut(gt(Ve,D));return $.appendToDom(),$},async createForm(D={}){return $n(gt(Ve,D))},remove(){me&&(me.parentElement&&me.parentElement.remove(),me=null),Ke.forEach(D=>D()),Ke=[]}}};var At,T,bo,ke,wr,Eo,dn,rt={},In=[],Su=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Tn=Array.isArray;function Ee(e,t){for(var n in t)e[n]=t[n];return e}function So(e){var t=e.parentNode;t&&t.removeChild(e)}function b(e,t,n){var r,o,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?At.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return wt(e,s,r,o,null)}function wt(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++bo,__i:-1,__u:0};return o==null&&T.vnode!=null&&T.vnode(i),i}function ut(e){return e.children}function kt(e,t){this.props=e,this.context=t}function Ge(e,t){if(t==null)return e.__?Ge(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Ge(e):null}function vu(e,t,n){var r,o=e.__v,i=o.__e,s=e.__P;if(s)return(r=Ee({},o)).__v=o.__v+1,T.vnode&&T.vnode(r),Dn(s,r,o,e.__n,s.ownerSVGElement!==void 0,32&o.__u?[i]:null,t,i??Ge(o),!!(32&o.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=i&&vo(r),r}function vo(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return vo(e)}}function kr(e){(!e.__d&&(e.__d=!0)&&ke.push(e)&&!Lt.__r++||wr!==T.debounceRendering)&&((wr=T.debounceRendering)||Eo)(Lt)}function Lt(){var e,t,n,r=[],o=[];for(ke.sort(dn);e=ke.shift();)e.__d&&(n=ke.length,t=vu(e,r,o)||t,n===0||ke.length>n?(fn(r,t,o),o.length=r.length=0,t=void 0,ke.sort(dn)):t&&T.__c&&T.__c(t,In));t&&fn(r,t,o),Lt.__r=0}function wo(e,t,n,r,o,i,s,a,c,l,d){var u,_,f,p,R,y=r&&r.__k||In,E=t.length;for(n.__d=c,wu(n,t,y),c=n.__d,u=0;u<E;u++)(f=n.__k[u])!=null&&typeof f!="boolean"&&typeof f!="function"&&(_=f.__i===-1?rt:y[f.__i]||rt,f.__i=u,Dn(e,f,_,o,i,s,a,c,l,d),p=f.__e,f.ref&&_.ref!=f.ref&&(_.ref&&Rn(_.ref,null,f),d.push(f.ref,f.__c||p,f)),R==null&&p!=null&&(R=p),65536&f.__u||_.__k===f.__k?c=ko(f,c,e):typeof f.type=="function"&&f.__d!==void 0?c=f.__d:p&&(c=p.nextSibling),f.__d=void 0,f.__u&=-196609);n.__d=c,n.__e=R}function wu(e,t,n){var r,o,i,s,a,c=t.length,l=n.length,d=l,u=0;for(e.__k=[],r=0;r<c;r++)(o=e.__k[r]=(o=t[r])==null||typeof o=="boolean"||typeof o=="function"?null:typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?wt(null,o,null,null,o):Tn(o)?wt(ut,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?wt(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)!=null?(o.__=e,o.__b=e.__b+1,a=ku(o,n,s=r+u,d),o.__i=a,i=null,a!==-1&&(d--,(i=n[a])&&(i.__u|=131072)),i==null||i.__v===null?(a==-1&&u--,typeof o.type!="function"&&(o.__u|=65536)):a!==s&&(a===s+1?u++:a>s?d>c-s?u+=a-s:u--:u=a<s&&a==s-1?a-s:0,a!==r+u&&(o.__u|=65536))):(i=n[r])&&i.key==null&&i.__e&&(i.__e==e.__d&&(e.__d=Ge(i)),_n(i,i,!1),n[r]=null,d--);if(d)for(r=0;r<l;r++)(i=n[r])!=null&&!(131072&i.__u)&&(i.__e==e.__d&&(e.__d=Ge(i)),_n(i,i))}function ko(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=ko(r[o],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function ku(e,t,n,r){var o=e.key,i=e.type,s=n-1,a=n+1,c=t[n];if(c===null||c&&o==c.key&&i===c.type)return n;if(r>(c!=null&&!(131072&c.__u)?1:0))for(;s>=0||a<t.length;){if(s>=0){if((c=t[s])&&!(131072&c.__u)&&o==c.key&&i===c.type)return s;s--}if(a<t.length){if((c=t[a])&&!(131072&c.__u)&&o==c.key&&i===c.type)return a;a++}}return-1}function xr(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Su.test(t)?n:n+"px"}function yt(e,t,n,r,o){var i;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||xr(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||xr(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,i?Nr:Cr,i)):e.removeEventListener(t,i?Nr:Cr,i);else{if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t!=="role"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function Cr(e){if(this.l){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(T.event?T.event(e):e)}}function Nr(e){if(this.l)return this.l[e.type+!0](T.event?T.event(e):e)}function Dn(e,t,n,r,o,i,s,a,c,l){var d,u,_,f,p,R,y,E,k,P,B,ne,V,K,ie,h=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),i=[a=t.__e=n.__e]),(d=T.__b)&&d(t);e:if(typeof h=="function")try{if(E=t.props,k=(d=h.contextType)&&r[d.__c],P=d?k?k.props.value:d.__:r,n.__c?y=(u=t.__c=n.__c).__=u.__E:("prototype"in h&&h.prototype.render?t.__c=u=new h(E,P):(t.__c=u=new kt(E,P),u.constructor=h,u.render=Cu),k&&k.sub(u),u.props=E,u.state||(u.state={}),u.context=P,u.__n=r,_=u.__d=!0,u.__h=[],u._sb=[]),u.__s==null&&(u.__s=u.state),h.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=Ee({},u.__s)),Ee(u.__s,h.getDerivedStateFromProps(E,u.__s))),f=u.props,p=u.state,u.__v=t,_)h.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(h.getDerivedStateFromProps==null&&E!==f&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(E,P),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(E,u.__s,P)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(u.props=E,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(m){m&&(m.__=t)}),B=0;B<u._sb.length;B++)u.__h.push(u._sb[B]);u._sb=[],u.__h.length&&s.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(E,u.__s,P),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(f,p,R)})}if(u.context=P,u.props=E,u.__P=e,u.__e=!1,ne=T.__r,V=0,"prototype"in h&&h.prototype.render){for(u.state=u.__s,u.__d=!1,ne&&ne(t),d=u.render(u.props,u.state,u.context),K=0;K<u._sb.length;K++)u.__h.push(u._sb[K]);u._sb=[]}else do u.__d=!1,ne&&ne(t),d=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++V<25);u.state=u.__s,u.getChildContext!=null&&(r=Ee(Ee({},r),u.getChildContext())),_||u.getSnapshotBeforeUpdate==null||(R=u.getSnapshotBeforeUpdate(f,p)),wo(e,Tn(ie=d!=null&&d.type===ut&&d.key==null?d.props.children:d)?ie:[ie],t,n,r,o,i,s,a,c,l),u.base=t.__e,t.__u&=-161,u.__h.length&&s.push(u),y&&(u.__E=u.__=null)}catch(m){t.__v=null,c||i!=null?(t.__e=a,t.__u|=c?160:32,i[i.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),T.__e(m,t,n)}else i==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=xu(n.__e,t,n,r,o,i,s,c,l);(d=T.diffed)&&d(t)}function fn(e,t,n){for(var r=0;r<n.length;r++)Rn(n[r],n[++r],n[++r]);T.__c&&T.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){T.__e(i,o.__v)}})}function xu(e,t,n,r,o,i,s,a,c){var l,d,u,_,f,p,R,y=n.props,E=t.props,k=t.type;if(k==="svg"&&(o=!0),i!=null){for(l=0;l<i.length;l++)if((f=i[l])&&"setAttribute"in f==!!k&&(k?f.localName===k:f.nodeType===3)){e=f,i[l]=null;break}}if(e==null){if(k===null)return document.createTextNode(E);e=o?document.createElementNS("http://www.w3.org/2000/svg",k):document.createElement(k,E.is&&E),i=null,a=!1}if(k===null)y===E||a&&e.data===E||(e.data=E);else{if(i=i&&At.call(e.childNodes),y=n.props||rt,!a&&i!=null)for(y={},l=0;l<e.attributes.length;l++)y[(f=e.attributes[l]).name]=f.value;for(l in y)f=y[l],l=="children"||(l=="dangerouslySetInnerHTML"?u=f:l==="key"||l in E||yt(e,l,null,f,o));for(l in E)f=E[l],l=="children"?_=f:l=="dangerouslySetInnerHTML"?d=f:l=="value"?p=f:l=="checked"?R=f:l==="key"||a&&typeof f!="function"||y[l]===f||yt(e,l,f,y[l],o);if(d)a||u&&(d.__html===u.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(u&&(e.innerHTML=""),wo(e,Tn(_)?_:[_],t,n,r,o&&k!=="foreignObject",i,s,i?i[0]:n.__k&&Ge(n,0),a,c),i!=null)for(l=i.length;l--;)i[l]!=null&&So(i[l]);a||(l="value",p!==void 0&&(p!==e[l]||k==="progress"&&!p||k==="option"&&p!==y[l])&&yt(e,l,p,y[l],!1),l="checked",R!==void 0&&R!==e[l]&&yt(e,l,R,y[l],!1))}return e}function Rn(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){T.__e(r,n)}}function _n(e,t,n){var r,o;if(T.unmount&&T.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Rn(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){T.__e(i,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&_n(r[o],t,n||typeof e.type!="function");n||e.__e==null||So(e.__e),e.__=e.__e=e.__d=void 0}function Cu(e,t,n){return this.constructor(e,n)}function Nu(e,t,n){var r,o,i,s;T.__&&T.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],Dn(t,e=(!r&&n||t).__k=b(ut,null,[e]),o||rt,rt,t.ownerSVGElement!==void 0,!r&&n?[n]:o?null:t.firstChild?At.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,s),e.__d=void 0,fn(i,e,s)}At=In.slice,T={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(a){e=a}throw e}},bo=0,kt.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Ee({},this.state),typeof e=="function"&&(e=e(Ee({},n),this.props)),e&&Ee(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),kr(this))},kt.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),kr(this))},kt.prototype.render=ut,ke=[],Eo=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,dn=function(e,t){return e.__v.__b-t.__v.__b},Lt.__r=0;var pe,I,Gt,Ir,qe=0,xo=[],xt=[],M=T,Tr=M.__b,Dr=M.__r,Rr=M.diffed,Lr=M.__c,Mr=M.unmount,Or=M.__;function Le(e,t){M.__h&&M.__h(I,e,qe||t),qe=0;var n=I.__H||(I.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:xt}),n.__[e]}function Ae(e){return qe=1,Co(Io,e)}function Co(e,t,n){var r=Le(pe++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Io(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],l=r.t(c,a);c!==l&&(r.__N=[l,r.__[1]],r.__c.setState({}))}],r.__c=I,!I.u)){var o=function(a,c,l){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(_){return!!_.__c});if(d.every(function(_){return!_.__N}))return!i||i.call(this,a,c,l);var u=!1;return d.forEach(function(_){if(_.__N){var f=_.__[0];_.__=_.__N,_.__N=void 0,f!==_.__[0]&&(u=!0)}}),!(!u&&r.__c.props===a)&&(!i||i.call(this,a,c,l))};I.u=!0;var i=I.shouldComponentUpdate,s=I.componentWillUpdate;I.componentWillUpdate=function(a,c,l){if(this.__e){var d=i;i=void 0,o(a,c,l),i=d}s&&s.call(this,a,c,l)},I.shouldComponentUpdate=o}return r.__N||r.__}function Iu(e,t){var n=Le(pe++,3);!M.__s&&Ln(n.__H,t)&&(n.__=e,n.i=t,I.__H.__h.push(n))}function No(e,t){var n=Le(pe++,4);!M.__s&&Ln(n.__H,t)&&(n.__=e,n.i=t,I.__h.push(n))}function Tu(e){return qe=5,lt(function(){return{current:e}},[])}function Du(e,t,n){qe=6,No(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function lt(e,t){var n=Le(pe++,7);return Ln(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Ue(e,t){return qe=8,lt(function(){return e},t)}function Ru(e){var t=I.context[e.__c],n=Le(pe++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(I)),t.props.value):e.__}function Lu(e,t){M.useDebugValue&&M.useDebugValue(t?t(e):e)}function Mu(e){var t=Le(pe++,10),n=Ae();return t.__=e,I.componentDidCatch||(I.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function Ou(){var e=Le(pe++,11);if(!e.__){for(var t=I.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function $u(){for(var e;e=xo.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Ct),e.__H.__h.forEach(pn),e.__H.__h=[]}catch(t){e.__H.__h=[],M.__e(t,e.__v)}}M.__b=function(e){I=null,Tr&&Tr(e)},M.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Or&&Or(e,t)},M.__r=function(e){Dr&&Dr(e),pe=0;var t=(I=e.__c).__H;t&&(Gt===I?(t.__h=[],I.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=xt,n.__N=n.i=void 0})):(t.__h.forEach(Ct),t.__h.forEach(pn),t.__h=[],pe=0)),Gt=I},M.diffed=function(e){Rr&&Rr(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(xo.push(t)!==1&&Ir===M.requestAnimationFrame||((Ir=M.requestAnimationFrame)||Fu)($u)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==xt&&(n.__=n.__V),n.i=void 0,n.__V=xt})),Gt=I=null},M.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Ct),n.__h=n.__h.filter(function(r){return!r.__||pn(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],M.__e(r,n.__v)}}),Lr&&Lr(e,t)},M.unmount=function(e){Mr&&Mr(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Ct(r)}catch(o){t=o}}),n.__H=void 0,t&&M.__e(t,n.__v))};var $r=typeof requestAnimationFrame=="function";function Fu(e){var t,n=function(){clearTimeout(r),$r&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);$r&&(t=requestAnimationFrame(n))}function Ct(e){var t=I,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),I=t}function pn(e){var t=I;e.__c=e.__(),I=t}function Ln(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Io(e,t){return typeof t=="function"?t(e):t}const Pu={__proto__:null,useCallback:Ue,useContext:Ru,useDebugValue:Lu,useEffect:Iu,useErrorBoundary:Mu,useId:Ou,useImperativeHandle:Du,useLayoutEffect:No,useMemo:lt,useReducer:Co,useRef:Tu,useState:Ae},Au="http://www.w3.org/2000/svg";function Uu(){const e=r=>C.createElementNS(Au,r),t=X(e("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),n=X(e("path"),{transform:"translate(11, 11)",d:"M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z"});return t.appendChild(n),t}const Fr="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/modal/components/DialogHeader.tsx";function Hu({options:e}){const t=lt(()=>({__html:Uu().outerHTML}),[]);return b("h2",{class:"dialog__header",__self:this,__source:{fileName:Fr,lineNumber:16}},e.formTitle,e.showBranding?b("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:t,__self:this,__source:{fileName:Fr,lineNumber:19}}):null)}function ju(e,t){const n=[];return t.isNameRequired&&!e.name&&n.push(t.nameLabel),t.isEmailRequired&&!e.email&&n.push(t.emailLabel),e.message||n.push(t.messageLabel),n}const L="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/modal/components/Form.tsx";function qt(e,t){const n=e.get(t);return typeof n=="string"?n.trim():""}function Bu({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:o,onSubmitSuccess:i,onSubmitError:s,showEmail:a,showName:c,screenshotInput:l}){const{tags:d,addScreenshotButtonLabel:u,removeScreenshotButtonLabel:_,cancelButtonLabel:f,emailLabel:p,emailPlaceholder:R,isEmailRequired:y,isNameRequired:E,messageLabel:k,messagePlaceholder:P,nameLabel:B,namePlaceholder:ne,submitButtonLabel:V,isRequiredLabel:K}=e,[ie,h]=Ae(null),[m,v]=Ae(!1),S=l&&l.input,[U,re]=Ae(null),O=Ue(G=>{re(G),v(!1)},[]),Y=Ue(G=>{const J=ju(G,{emailLabel:p,isEmailRequired:y,isNameRequired:E,messageLabel:k,nameLabel:B});return J.length>0?h(`Please enter in the following required fields: ${J.join(", ")}`):h(null),J.length===0},[p,y,E,k,B]),Me=Ue(async G=>{try{if(G.preventDefault(),!(G.target instanceof HTMLFormElement))return;const J=new FormData(G.target),Oe=await(l&&m?l.value():void 0),he={name:qt(J,"name"),email:qt(J,"email"),message:qt(J,"message"),attachments:Oe?[Oe]:void 0};if(!Y(he))return;try{await o({name:he.name,email:he.email,message:he.message,source:uu,tags:d},{attachments:he.attachments}),i(he)}catch(ze){vt&&g.error(ze),h(ze),s(ze)}}catch{}},[l&&m,i,s]);return b("form",{class:"form",onSubmit:Me,__self:this,__source:{fileName:L,lineNumber:144}},S&&m?b(S,{onError:O,__self:this,__source:{fileName:L,lineNumber:146}}):null,b("div",{class:"form__right","data-sentry-feedback":!0,__self:this,__source:{fileName:L,lineNumber:149}},b("div",{class:"form__top",__self:this,__source:{fileName:L,lineNumber:150}},ie?b("div",{class:"form__error-container",__self:this,__source:{fileName:L,lineNumber:151}},ie):null,c?b("label",{for:"name",class:"form__label",__self:this,__source:{fileName:L,lineNumber:154}},b(Xt,{label:B,isRequiredLabel:K,isRequired:E,__self:this,__source:{fileName:L,lineNumber:155}}),b("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:ne,required:E,type:"text",__self:this,__source:{fileName:L,lineNumber:156}})):b("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden",__self:this,__source:{fileName:L,lineNumber:167}}),a?b("label",{for:"email",class:"form__label",__self:this,__source:{fileName:L,lineNumber:171}},b(Xt,{label:p,isRequiredLabel:K,isRequired:y,__self:this,__source:{fileName:L,lineNumber:172}}),b("input",{class:"form__input",defaultValue:t,id:"email",name:"email",placeholder:R,required:y,type:"email",__self:this,__source:{fileName:L,lineNumber:173}})):b("input",{"aria-hidden":!0,value:t,name:"email",type:"hidden",__self:this,__source:{fileName:L,lineNumber:184}}),b("label",{for:"message",class:"form__label",__self:this,__source:{fileName:L,lineNumber:187}},b(Xt,{label:k,isRequiredLabel:K,isRequired:!0,__self:this,__source:{fileName:L,lineNumber:188}}),b("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:P,required:!0,rows:5,__self:this,__source:{fileName:L,lineNumber:189}})),S?b("label",{for:"screenshot",class:"form__label",__self:this,__source:{fileName:L,lineNumber:201}},b("button",{class:"btn btn--default",type:"button",onClick:()=>{re(null),v(G=>!G)},__self:this,__source:{fileName:L,lineNumber:202}},m?_:u),U?b("div",{class:"form__error-container",__self:this,__source:{fileName:L,lineNumber:212}},U.message):null):null),b("div",{class:"btn-group",__self:this,__source:{fileName:L,lineNumber:216}},b("button",{class:"btn btn--primary",type:"submit",__self:this,__source:{fileName:L,lineNumber:217}},V),b("button",{class:"btn btn--default",type:"button",onClick:r,__self:this,__source:{fileName:L,lineNumber:220}},f))))}function Xt({label:e,isRequired:t,isRequiredLabel:n}){return b("span",{class:"form__label__text",__self:this,__source:{fileName:L,lineNumber:239}},e,t&&b("span",{class:"form__label__text--required",__self:this,__source:{fileName:L,lineNumber:241}},n))}const bt=16,Pr=17,Yu="http://www.w3.org/2000/svg";function Gu(){const e=c=>ce.document.createElementNS(Yu,c),t=X(e("svg"),{width:`${bt}`,height:`${Pr}`,viewBox:`0 0 ${bt} ${Pr}`,fill:"inherit"}),n=X(e("g"),{clipPath:"url(#clip0_57_156)"}),r=X(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),o=X(e("path"),{d:"M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});t.appendChild(n).append(o,r);const i=e("defs"),s=X(e("clipPath"),{id:"clip0_57_156"}),a=X(e("rect"),{width:`${bt}`,height:`${bt}`,fill:"white",transform:"translate(0 0.5)"});return s.appendChild(a),i.appendChild(s),t.appendChild(i).appendChild(s).appendChild(a),t}const ue="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/modal/components/Dialog.tsx";function qu({open:e,onFormSubmitted:t,...n}){const r=n.options,o=lt(()=>({__html:Gu().outerHTML}),[]),[i,s]=Ae(null),a=Ue(()=>{i&&(clearTimeout(i),s(null)),t()},[i]),c=Ue(l=>{n.onSubmitSuccess(l),s(setTimeout(()=>{t(),s(null)},du))},[t]);return b(ut,{__self:this,__source:{fileName:ue,lineNumber:48}},i?b("div",{class:"success__position",onClick:a,__self:this,__source:{fileName:ue,lineNumber:50}},b("div",{class:"success__content",__self:this,__source:{fileName:ue,lineNumber:51}},r.successMessageText,b("span",{class:"success__icon",dangerouslySetInnerHTML:o,__self:this,__source:{fileName:ue,lineNumber:53}}))):b("dialog",{class:"dialog",onClick:r.onFormClose,open:e,__self:this,__source:{fileName:ue,lineNumber:57}},b("div",{class:"dialog__position",__self:this,__source:{fileName:ue,lineNumber:58}},b("div",{class:"dialog__content",onClick:l=>{l.stopPropagation()},__self:this,__source:{fileName:ue,lineNumber:59}},b(Hu,{options:r,__self:this,__source:{fileName:ue,lineNumber:66}}),b(Bu,{...n,onSubmitSuccess:c,__self:this,__source:{fileName:ue,lineNumber:67}})))))}const Xu=`
|
|
103
|
+
`,r&&o.setAttribute("nonce",r),o}const Su=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>({id:o="sentry-feedback",autoInject:i=!0,showBranding:s=!0,isEmailRequired:a=!1,isNameRequired:c=!1,showEmail:l=!0,showName:d=!0,enableScreenshot:u=!0,useSentryUser:_={email:"email",name:"username"},tags:f,styleNonce:p,scriptNonce:R,colorScheme:y="system",themeLight:E={},themeDark:k={},addScreenshotButtonLabel:P=uu,cancelButtonLabel:B=Jc,confirmButtonLabel:ne=Qc,emailLabel:V=nu,emailPlaceholder:K=tu,formTitle:ie=eu,isRequiredLabel:h=cu,messageLabel:m=ou,messagePlaceholder:S=ru,nameLabel:v=su,namePlaceholder:U=iu,removeScreenshotButtonLabel:re=lu,submitButtonLabel:O=Zc,successMessageText:Y=au,triggerLabel:Me=bo,triggerAriaLabel:G="",onFormOpen:J,onFormClose:Oe,onSubmitSuccess:he,onSubmitError:We,onFormSubmitted:Ro}={})=>{const Ve={id:o,autoInject:i,showBranding:s,isEmailRequired:a,isNameRequired:c,showEmail:l,showName:d,enableScreenshot:u,useSentryUser:_,tags:f,styleNonce:p,scriptNonce:R,colorScheme:y,themeDark:k,themeLight:E,triggerLabel:Me,triggerAriaLabel:G,cancelButtonLabel:B,submitButtonLabel:O,confirmButtonLabel:ne,formTitle:ie,emailLabel:V,emailPlaceholder:K,messageLabel:m,messagePlaceholder:S,nameLabel:v,namePlaceholder:U,successMessageText:Y,isRequiredLabel:h,addScreenshotButtonLabel:P,removeScreenshotButtonLabel:re,onFormClose:Oe,onFormOpen:J,onSubmitError:We,onSubmitSuccess:he,onFormSubmitted:Ro};let me=null,Ke=[];const Mn=D=>{if(!me){const $=C.createElement("div");$.id=String(D.id),C.body.appendChild($),me=$.attachShadow({mode:"open"}),me.appendChild(vu(D))}return me},On=async(D,$,se)=>{const H=F(),A=H&&H.getIntegrationByName(D);if(A)return A;const $e=($&&$()||await e(se,R))();return H&&H.addIntegration($e),$e},$n=async D=>{const $=D.enableScreenshot&&hu(),[se,H]=await Promise.all([On("FeedbackModal",t,"feedbackModalIntegration"),$?On("FeedbackScreenshot",n,"feedbackScreenshotIntegration"):void 0]);if(!se)throw St&&g.error("[Feedback] Missing feedback modal integration. Try using `feedbackSyncIntegration` in your `Sentry.init`."),new Error("[Feedback] Missing feedback modal integration!");$&&!H&&St&&g.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.");const A=se.createDialog({options:{...D,onFormClose:()=>{A&&A.close(),D.onFormClose&&D.onFormClose()},onFormSubmitted:()=>{A&&A.close(),D.onFormSubmitted&&D.onFormSubmitted()}},screenshotIntegration:$?H:void 0,sendFeedback:pu,shadow:Mn(D)});return A},Fn=(D,$={})=>{const se=gt(Ve,$),H=typeof D=="string"?C.querySelector(D):typeof D.addEventListener=="function"?D:null;if(!H)throw St&&g.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let A=null;const Ht=async()=>{A||(A=await $n({...se,onFormSubmitted:()=>{A&&A.removeFromDom(),se.onFormSubmitted&&se.onFormSubmitted()}})),A.appendToDom(),A.open()};H.addEventListener("click",Ht);const $e=()=>{Ke=Ke.filter(Lo=>Lo!==$e),A&&A.removeFromDom(),A=null,H.removeEventListener("click",Ht)};return Ke.push($e),$e},Ut=(D={})=>{const $=gt(Ve,D),se=Mn($),H=bu({triggerLabel:$.triggerLabel,triggerAriaLabel:$.triggerAriaLabel,shadow:se,styleNonce:p});return Fn(H.el,{...$,onFormOpen(){H.hide()},onFormClose(){H.show()},onFormSubmitted(){H.show()}}),H};return{name:"Feedback",setupOnce(){!hi()||!Ve.autoInject||(C.readyState==="loading"?C.addEventListener("DOMContentLoaded",()=>Ut().appendToDom()):Ut().appendToDom())},attachTo:Fn,createWidget(D={}){const $=Ut(gt(Ve,D));return $.appendToDom(),$},async createForm(D={}){return $n(gt(Ve,D))},remove(){me&&(me.parentElement&&me.parentElement.remove(),me=null),Ke.forEach(D=>D()),Ke=[]}}};var At,T,vo,ke,xr,So,dn,rt={},In=[],wu=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Tn=Array.isArray;function Ee(e,t){for(var n in t)e[n]=t[n];return e}function wo(e){var t=e.parentNode;t&&t.removeChild(e)}function b(e,t,n){var r,o,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?At.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return wt(e,s,r,o,null)}function wt(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++vo,__i:-1,__u:0};return o==null&&T.vnode!=null&&T.vnode(i),i}function ut(e){return e.children}function kt(e,t){this.props=e,this.context=t}function Ge(e,t){if(t==null)return e.__?Ge(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Ge(e):null}function ku(e,t,n){var r,o=e.__v,i=o.__e,s=e.__P;if(s)return(r=Ee({},o)).__v=o.__v+1,T.vnode&&T.vnode(r),Dn(s,r,o,e.__n,s.ownerSVGElement!==void 0,32&o.__u?[i]:null,t,i??Ge(o),!!(32&o.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=i&&ko(r),r}function ko(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return ko(e)}}function Cr(e){(!e.__d&&(e.__d=!0)&&ke.push(e)&&!Lt.__r++||xr!==T.debounceRendering)&&((xr=T.debounceRendering)||So)(Lt)}function Lt(){var e,t,n,r=[],o=[];for(ke.sort(dn);e=ke.shift();)e.__d&&(n=ke.length,t=ku(e,r,o)||t,n===0||ke.length>n?(fn(r,t,o),o.length=r.length=0,t=void 0,ke.sort(dn)):t&&T.__c&&T.__c(t,In));t&&fn(r,t,o),Lt.__r=0}function xo(e,t,n,r,o,i,s,a,c,l,d){var u,_,f,p,R,y=r&&r.__k||In,E=t.length;for(n.__d=c,xu(n,t,y),c=n.__d,u=0;u<E;u++)(f=n.__k[u])!=null&&typeof f!="boolean"&&typeof f!="function"&&(_=f.__i===-1?rt:y[f.__i]||rt,f.__i=u,Dn(e,f,_,o,i,s,a,c,l,d),p=f.__e,f.ref&&_.ref!=f.ref&&(_.ref&&Rn(_.ref,null,f),d.push(f.ref,f.__c||p,f)),R==null&&p!=null&&(R=p),65536&f.__u||_.__k===f.__k?c=Co(f,c,e):typeof f.type=="function"&&f.__d!==void 0?c=f.__d:p&&(c=p.nextSibling),f.__d=void 0,f.__u&=-196609);n.__d=c,n.__e=R}function xu(e,t,n){var r,o,i,s,a,c=t.length,l=n.length,d=l,u=0;for(e.__k=[],r=0;r<c;r++)(o=e.__k[r]=(o=t[r])==null||typeof o=="boolean"||typeof o=="function"?null:typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?wt(null,o,null,null,o):Tn(o)?wt(ut,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?wt(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)!=null?(o.__=e,o.__b=e.__b+1,a=Cu(o,n,s=r+u,d),o.__i=a,i=null,a!==-1&&(d--,(i=n[a])&&(i.__u|=131072)),i==null||i.__v===null?(a==-1&&u--,typeof o.type!="function"&&(o.__u|=65536)):a!==s&&(a===s+1?u++:a>s?d>c-s?u+=a-s:u--:u=a<s&&a==s-1?a-s:0,a!==r+u&&(o.__u|=65536))):(i=n[r])&&i.key==null&&i.__e&&(i.__e==e.__d&&(e.__d=Ge(i)),_n(i,i,!1),n[r]=null,d--);if(d)for(r=0;r<l;r++)(i=n[r])!=null&&!(131072&i.__u)&&(i.__e==e.__d&&(e.__d=Ge(i)),_n(i,i))}function Co(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=Co(r[o],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function Cu(e,t,n,r){var o=e.key,i=e.type,s=n-1,a=n+1,c=t[n];if(c===null||c&&o==c.key&&i===c.type)return n;if(r>(c!=null&&!(131072&c.__u)?1:0))for(;s>=0||a<t.length;){if(s>=0){if((c=t[s])&&!(131072&c.__u)&&o==c.key&&i===c.type)return s;s--}if(a<t.length){if((c=t[a])&&!(131072&c.__u)&&o==c.key&&i===c.type)return a;a++}}return-1}function Nr(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||wu.test(t)?n:n+"px"}function yt(e,t,n,r,o){var i;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Nr(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Nr(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,i?Tr:Ir,i)):e.removeEventListener(t,i?Tr:Ir,i);else{if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t!=="role"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function Ir(e){if(this.l){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(T.event?T.event(e):e)}}function Tr(e){if(this.l)return this.l[e.type+!0](T.event?T.event(e):e)}function Dn(e,t,n,r,o,i,s,a,c,l){var d,u,_,f,p,R,y,E,k,P,B,ne,V,K,ie,h=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),i=[a=t.__e=n.__e]),(d=T.__b)&&d(t);e:if(typeof h=="function")try{if(E=t.props,k=(d=h.contextType)&&r[d.__c],P=d?k?k.props.value:d.__:r,n.__c?y=(u=t.__c=n.__c).__=u.__E:("prototype"in h&&h.prototype.render?t.__c=u=new h(E,P):(t.__c=u=new kt(E,P),u.constructor=h,u.render=Iu),k&&k.sub(u),u.props=E,u.state||(u.state={}),u.context=P,u.__n=r,_=u.__d=!0,u.__h=[],u._sb=[]),u.__s==null&&(u.__s=u.state),h.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=Ee({},u.__s)),Ee(u.__s,h.getDerivedStateFromProps(E,u.__s))),f=u.props,p=u.state,u.__v=t,_)h.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(h.getDerivedStateFromProps==null&&E!==f&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(E,P),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(E,u.__s,P)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(u.props=E,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(m){m&&(m.__=t)}),B=0;B<u._sb.length;B++)u.__h.push(u._sb[B]);u._sb=[],u.__h.length&&s.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(E,u.__s,P),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(f,p,R)})}if(u.context=P,u.props=E,u.__P=e,u.__e=!1,ne=T.__r,V=0,"prototype"in h&&h.prototype.render){for(u.state=u.__s,u.__d=!1,ne&&ne(t),d=u.render(u.props,u.state,u.context),K=0;K<u._sb.length;K++)u.__h.push(u._sb[K]);u._sb=[]}else do u.__d=!1,ne&&ne(t),d=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++V<25);u.state=u.__s,u.getChildContext!=null&&(r=Ee(Ee({},r),u.getChildContext())),_||u.getSnapshotBeforeUpdate==null||(R=u.getSnapshotBeforeUpdate(f,p)),xo(e,Tn(ie=d!=null&&d.type===ut&&d.key==null?d.props.children:d)?ie:[ie],t,n,r,o,i,s,a,c,l),u.base=t.__e,t.__u&=-161,u.__h.length&&s.push(u),y&&(u.__E=u.__=null)}catch(m){t.__v=null,c||i!=null?(t.__e=a,t.__u|=c?160:32,i[i.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),T.__e(m,t,n)}else i==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Nu(n.__e,t,n,r,o,i,s,c,l);(d=T.diffed)&&d(t)}function fn(e,t,n){for(var r=0;r<n.length;r++)Rn(n[r],n[++r],n[++r]);T.__c&&T.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){T.__e(i,o.__v)}})}function Nu(e,t,n,r,o,i,s,a,c){var l,d,u,_,f,p,R,y=n.props,E=t.props,k=t.type;if(k==="svg"&&(o=!0),i!=null){for(l=0;l<i.length;l++)if((f=i[l])&&"setAttribute"in f==!!k&&(k?f.localName===k:f.nodeType===3)){e=f,i[l]=null;break}}if(e==null){if(k===null)return document.createTextNode(E);e=o?document.createElementNS("http://www.w3.org/2000/svg",k):document.createElement(k,E.is&&E),i=null,a=!1}if(k===null)y===E||a&&e.data===E||(e.data=E);else{if(i=i&&At.call(e.childNodes),y=n.props||rt,!a&&i!=null)for(y={},l=0;l<e.attributes.length;l++)y[(f=e.attributes[l]).name]=f.value;for(l in y)f=y[l],l=="children"||(l=="dangerouslySetInnerHTML"?u=f:l==="key"||l in E||yt(e,l,null,f,o));for(l in E)f=E[l],l=="children"?_=f:l=="dangerouslySetInnerHTML"?d=f:l=="value"?p=f:l=="checked"?R=f:l==="key"||a&&typeof f!="function"||y[l]===f||yt(e,l,f,y[l],o);if(d)a||u&&(d.__html===u.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(u&&(e.innerHTML=""),xo(e,Tn(_)?_:[_],t,n,r,o&&k!=="foreignObject",i,s,i?i[0]:n.__k&&Ge(n,0),a,c),i!=null)for(l=i.length;l--;)i[l]!=null&&wo(i[l]);a||(l="value",p!==void 0&&(p!==e[l]||k==="progress"&&!p||k==="option"&&p!==y[l])&&yt(e,l,p,y[l],!1),l="checked",R!==void 0&&R!==e[l]&&yt(e,l,R,y[l],!1))}return e}function Rn(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){T.__e(r,n)}}function _n(e,t,n){var r,o;if(T.unmount&&T.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Rn(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){T.__e(i,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&_n(r[o],t,n||typeof e.type!="function");n||e.__e==null||wo(e.__e),e.__=e.__e=e.__d=void 0}function Iu(e,t,n){return this.constructor(e,n)}function Tu(e,t,n){var r,o,i,s;T.__&&T.__(e,t),o=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],s=[],Dn(t,e=(!r&&n||t).__k=b(ut,null,[e]),o||rt,rt,t.ownerSVGElement!==void 0,!r&&n?[n]:o?null:t.firstChild?At.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,s),e.__d=void 0,fn(i,e,s)}At=In.slice,T={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(a){e=a}throw e}},vo=0,kt.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Ee({},this.state),typeof e=="function"&&(e=e(Ee({},n),this.props)),e&&Ee(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Cr(this))},kt.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Cr(this))},kt.prototype.render=ut,ke=[],So=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,dn=function(e,t){return e.__v.__b-t.__v.__b},Lt.__r=0;var pe,I,Gt,Dr,qe=0,No=[],xt=[],M=T,Rr=M.__b,Lr=M.__r,Mr=M.diffed,Or=M.__c,$r=M.unmount,Fr=M.__;function Le(e,t){M.__h&&M.__h(I,e,qe||t),qe=0;var n=I.__H||(I.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:xt}),n.__[e]}function Ae(e){return qe=1,Io(Do,e)}function Io(e,t,n){var r=Le(pe++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Do(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],l=r.t(c,a);c!==l&&(r.__N=[l,r.__[1]],r.__c.setState({}))}],r.__c=I,!I.u)){var o=function(a,c,l){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(_){return!!_.__c});if(d.every(function(_){return!_.__N}))return!i||i.call(this,a,c,l);var u=!1;return d.forEach(function(_){if(_.__N){var f=_.__[0];_.__=_.__N,_.__N=void 0,f!==_.__[0]&&(u=!0)}}),!(!u&&r.__c.props===a)&&(!i||i.call(this,a,c,l))};I.u=!0;var i=I.shouldComponentUpdate,s=I.componentWillUpdate;I.componentWillUpdate=function(a,c,l){if(this.__e){var d=i;i=void 0,o(a,c,l),i=d}s&&s.call(this,a,c,l)},I.shouldComponentUpdate=o}return r.__N||r.__}function Du(e,t){var n=Le(pe++,3);!M.__s&&Ln(n.__H,t)&&(n.__=e,n.i=t,I.__H.__h.push(n))}function To(e,t){var n=Le(pe++,4);!M.__s&&Ln(n.__H,t)&&(n.__=e,n.i=t,I.__h.push(n))}function Ru(e){return qe=5,lt(function(){return{current:e}},[])}function Lu(e,t,n){qe=6,To(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function lt(e,t){var n=Le(pe++,7);return Ln(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Ue(e,t){return qe=8,lt(function(){return e},t)}function Mu(e){var t=I.context[e.__c],n=Le(pe++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(I)),t.props.value):e.__}function Ou(e,t){M.useDebugValue&&M.useDebugValue(t?t(e):e)}function $u(e){var t=Le(pe++,10),n=Ae();return t.__=e,I.componentDidCatch||(I.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function Fu(){var e=Le(pe++,11);if(!e.__){for(var t=I.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Pu(){for(var e;e=No.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Ct),e.__H.__h.forEach(pn),e.__H.__h=[]}catch(t){e.__H.__h=[],M.__e(t,e.__v)}}M.__b=function(e){I=null,Rr&&Rr(e)},M.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Fr&&Fr(e,t)},M.__r=function(e){Lr&&Lr(e),pe=0;var t=(I=e.__c).__H;t&&(Gt===I?(t.__h=[],I.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=xt,n.__N=n.i=void 0})):(t.__h.forEach(Ct),t.__h.forEach(pn),t.__h=[],pe=0)),Gt=I},M.diffed=function(e){Mr&&Mr(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(No.push(t)!==1&&Dr===M.requestAnimationFrame||((Dr=M.requestAnimationFrame)||Au)(Pu)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==xt&&(n.__=n.__V),n.i=void 0,n.__V=xt})),Gt=I=null},M.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Ct),n.__h=n.__h.filter(function(r){return!r.__||pn(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],M.__e(r,n.__v)}}),Or&&Or(e,t)},M.unmount=function(e){$r&&$r(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Ct(r)}catch(o){t=o}}),n.__H=void 0,t&&M.__e(t,n.__v))};var Pr=typeof requestAnimationFrame=="function";function Au(e){var t,n=function(){clearTimeout(r),Pr&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Pr&&(t=requestAnimationFrame(n))}function Ct(e){var t=I,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),I=t}function pn(e){var t=I;e.__c=e.__(),I=t}function Ln(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Do(e,t){return typeof t=="function"?t(e):t}const Uu={__proto__:null,useCallback:Ue,useContext:Mu,useDebugValue:Ou,useEffect:Du,useErrorBoundary:$u,useId:Fu,useImperativeHandle:Lu,useLayoutEffect:To,useMemo:lt,useReducer:Io,useRef:Ru,useState:Ae},Hu="http://www.w3.org/2000/svg";function ju(){const e=r=>C.createElementNS(Hu,r),t=X(e("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),n=X(e("path"),{transform:"translate(11, 11)",d:"M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z"});return t.appendChild(n),t}const Ar="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/modal/components/DialogHeader.tsx";function Bu({options:e}){const t=lt(()=>({__html:ju().outerHTML}),[]);return b("h2",{class:"dialog__header",__self:this,__source:{fileName:Ar,lineNumber:16}},e.formTitle,e.showBranding?b("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:t,__self:this,__source:{fileName:Ar,lineNumber:19}}):null)}function Yu(e,t){const n=[];return t.isNameRequired&&!e.name&&n.push(t.nameLabel),t.isEmailRequired&&!e.email&&n.push(t.emailLabel),e.message||n.push(t.messageLabel),n}const L="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/modal/components/Form.tsx";function qt(e,t){const n=e.get(t);return typeof n=="string"?n.trim():""}function Gu({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:o,onSubmitSuccess:i,onSubmitError:s,showEmail:a,showName:c,screenshotInput:l}){const{tags:d,addScreenshotButtonLabel:u,removeScreenshotButtonLabel:_,cancelButtonLabel:f,emailLabel:p,emailPlaceholder:R,isEmailRequired:y,isNameRequired:E,messageLabel:k,messagePlaceholder:P,nameLabel:B,namePlaceholder:ne,submitButtonLabel:V,isRequiredLabel:K}=e,[ie,h]=Ae(null),[m,S]=Ae(!1),v=l&&l.input,[U,re]=Ae(null),O=Ue(G=>{re(G),S(!1)},[]),Y=Ue(G=>{const J=Yu(G,{emailLabel:p,isEmailRequired:y,isNameRequired:E,messageLabel:k,nameLabel:B});return J.length>0?h(`Please enter in the following required fields: ${J.join(", ")}`):h(null),J.length===0},[p,y,E,k,B]),Me=Ue(async G=>{try{if(G.preventDefault(),!(G.target instanceof HTMLFormElement))return;const J=new FormData(G.target),Oe=await(l&&m?l.value():void 0),he={name:qt(J,"name"),email:qt(J,"email"),message:qt(J,"message"),attachments:Oe?[Oe]:void 0};if(!Y(he))return;try{await o({name:he.name,email:he.email,message:he.message,source:du,tags:d},{attachments:he.attachments}),i(he)}catch(We){St&&g.error(We),h(We),s(We)}}catch{}},[l&&m,i,s]);return b("form",{class:"form",onSubmit:Me,__self:this,__source:{fileName:L,lineNumber:144}},v&&m?b(v,{onError:O,__self:this,__source:{fileName:L,lineNumber:146}}):null,b("div",{class:"form__right","data-sentry-feedback":!0,__self:this,__source:{fileName:L,lineNumber:149}},b("div",{class:"form__top",__self:this,__source:{fileName:L,lineNumber:150}},ie?b("div",{class:"form__error-container",__self:this,__source:{fileName:L,lineNumber:151}},ie):null,c?b("label",{for:"name",class:"form__label",__self:this,__source:{fileName:L,lineNumber:154}},b(Xt,{label:B,isRequiredLabel:K,isRequired:E,__self:this,__source:{fileName:L,lineNumber:155}}),b("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:ne,required:E,type:"text",__self:this,__source:{fileName:L,lineNumber:156}})):b("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden",__self:this,__source:{fileName:L,lineNumber:167}}),a?b("label",{for:"email",class:"form__label",__self:this,__source:{fileName:L,lineNumber:171}},b(Xt,{label:p,isRequiredLabel:K,isRequired:y,__self:this,__source:{fileName:L,lineNumber:172}}),b("input",{class:"form__input",defaultValue:t,id:"email",name:"email",placeholder:R,required:y,type:"email",__self:this,__source:{fileName:L,lineNumber:173}})):b("input",{"aria-hidden":!0,value:t,name:"email",type:"hidden",__self:this,__source:{fileName:L,lineNumber:184}}),b("label",{for:"message",class:"form__label",__self:this,__source:{fileName:L,lineNumber:187}},b(Xt,{label:k,isRequiredLabel:K,isRequired:!0,__self:this,__source:{fileName:L,lineNumber:188}}),b("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:P,required:!0,rows:5,__self:this,__source:{fileName:L,lineNumber:189}})),v?b("label",{for:"screenshot",class:"form__label",__self:this,__source:{fileName:L,lineNumber:201}},b("button",{class:"btn btn--default",type:"button",onClick:()=>{re(null),S(G=>!G)},__self:this,__source:{fileName:L,lineNumber:202}},m?_:u),U?b("div",{class:"form__error-container",__self:this,__source:{fileName:L,lineNumber:212}},U.message):null):null),b("div",{class:"btn-group",__self:this,__source:{fileName:L,lineNumber:216}},b("button",{class:"btn btn--primary",type:"submit",__self:this,__source:{fileName:L,lineNumber:217}},V),b("button",{class:"btn btn--default",type:"button",onClick:r,__self:this,__source:{fileName:L,lineNumber:220}},f))))}function Xt({label:e,isRequired:t,isRequiredLabel:n}){return b("span",{class:"form__label__text",__self:this,__source:{fileName:L,lineNumber:239}},e,t&&b("span",{class:"form__label__text--required",__self:this,__source:{fileName:L,lineNumber:241}},n))}const bt=16,Ur=17,qu="http://www.w3.org/2000/svg";function Xu(){const e=c=>ce.document.createElementNS(qu,c),t=X(e("svg"),{width:`${bt}`,height:`${Ur}`,viewBox:`0 0 ${bt} ${Ur}`,fill:"inherit"}),n=X(e("g"),{clipPath:"url(#clip0_57_156)"}),r=X(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),o=X(e("path"),{d:"M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});t.appendChild(n).append(o,r);const i=e("defs"),s=X(e("clipPath"),{id:"clip0_57_156"}),a=X(e("rect"),{width:`${bt}`,height:`${bt}`,fill:"white",transform:"translate(0 0.5)"});return s.appendChild(a),i.appendChild(s),t.appendChild(i).appendChild(s).appendChild(a),t}const ue="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/modal/components/Dialog.tsx";function zu({open:e,onFormSubmitted:t,...n}){const r=n.options,o=lt(()=>({__html:Xu().outerHTML}),[]),[i,s]=Ae(null),a=Ue(()=>{i&&(clearTimeout(i),s(null)),t()},[i]),c=Ue(l=>{n.onSubmitSuccess(l),s(setTimeout(()=>{t(),s(null)},_u))},[t]);return b(ut,{__self:this,__source:{fileName:ue,lineNumber:48}},i?b("div",{class:"success__position",onClick:a,__self:this,__source:{fileName:ue,lineNumber:50}},b("div",{class:"success__content",__self:this,__source:{fileName:ue,lineNumber:51}},r.successMessageText,b("span",{class:"success__icon",dangerouslySetInnerHTML:o,__self:this,__source:{fileName:ue,lineNumber:53}}))):b("dialog",{class:"dialog",onClick:r.onFormClose,open:e,__self:this,__source:{fileName:ue,lineNumber:57}},b("div",{class:"dialog__position",__self:this,__source:{fileName:ue,lineNumber:58}},b("div",{class:"dialog__content",onClick:l=>{l.stopPropagation()},__self:this,__source:{fileName:ue,lineNumber:59}},b(Bu,{options:r,__self:this,__source:{fileName:ue,lineNumber:66}}),b(Gu,{...n,onSubmitSuccess:c,__self:this,__source:{fileName:ue,lineNumber:67}})))))}const Wu=`
|
|
104
104
|
.dialog {
|
|
105
105
|
position: fixed;
|
|
106
106
|
z-index: var(--z-index);
|
|
@@ -171,7 +171,7 @@ ${e==="system"?`
|
|
|
171
171
|
transform: translate(0, 0) scale(1);
|
|
172
172
|
transition: transform 0.2s ease-in-out;
|
|
173
173
|
}
|
|
174
|
-
`,
|
|
174
|
+
`,Vu=`
|
|
175
175
|
.dialog__header {
|
|
176
176
|
display: flex;
|
|
177
177
|
align-items: center;
|
|
@@ -186,7 +186,7 @@ ${e==="system"?`
|
|
|
186
186
|
.brand-link:focus-visible {
|
|
187
187
|
outline: var(--outline);
|
|
188
188
|
}
|
|
189
|
-
`,
|
|
189
|
+
`,Ku=`
|
|
190
190
|
.form {
|
|
191
191
|
display: flex;
|
|
192
192
|
overflow: auto;
|
|
@@ -272,7 +272,7 @@ ${e==="system"?`
|
|
|
272
272
|
color: var(--error-color);
|
|
273
273
|
fill: var(--error-color);
|
|
274
274
|
}
|
|
275
|
-
`,
|
|
275
|
+
`,Ju=`
|
|
276
276
|
.btn-group {
|
|
277
277
|
display: grid;
|
|
278
278
|
gap: 8px;
|
|
@@ -332,7 +332,7 @@ ${e==="system"?`
|
|
|
332
332
|
filter: var(--interactive-filter);
|
|
333
333
|
outline: var(--button-focus-outline, var(--outline));
|
|
334
334
|
}
|
|
335
|
-
`,
|
|
335
|
+
`,Zu=`
|
|
336
336
|
.success__position {
|
|
337
337
|
position: fixed;
|
|
338
338
|
inset: var(--dialog-inset);
|
|
@@ -360,17 +360,17 @@ ${e==="system"?`
|
|
|
360
360
|
.success__icon {
|
|
361
361
|
display: flex;
|
|
362
362
|
}
|
|
363
|
-
`;function
|
|
363
|
+
`;function Qu(e){const t=C.createElement("style");return t.textContent=`
|
|
364
364
|
:host {
|
|
365
365
|
--dialog-inset: var(--inset);
|
|
366
366
|
}
|
|
367
367
|
|
|
368
|
-
${Xu}
|
|
369
368
|
${Wu}
|
|
370
|
-
${zu}
|
|
371
369
|
${Vu}
|
|
372
370
|
${Ku}
|
|
373
|
-
|
|
371
|
+
${Ju}
|
|
372
|
+
${Zu}
|
|
373
|
+
`,e&&t.setAttribute("nonce",e),t}const el="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/modal/integration.tsx";function tl(){const e=te().getUser(),t=ze().getUser(),n=no().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}const nl=()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{const o=r,i=e.useSentryUser,s=tl(),a=C.createElement("div"),c=Qu(e.styleNonce);let l="";const d={get el(){return a},appendToDom(){!o.contains(c)&&!o.contains(a)&&(o.appendChild(c),o.appendChild(a))},removeFromDom(){o.removeChild(a),o.removeChild(c),C.body.style.overflow=l},open(){_(!0),e.onFormOpen&&e.onFormOpen(),l=C.body.style.overflow,C.body.style.overflow="hidden"},close(){_(!1),C.body.style.overflow=l}},u=t&&t.createInput({h:b,hooks:Uu,dialog:d,options:e}),_=f=>{Tu(b(zu,{options:e,screenshotInput:u,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:i&&s&&s[i.name]||"",defaultEmail:i&&s&&s[i.email]||"",onFormClose:()=>{_(!1),e.onFormClose&&e.onFormClose()},onSubmit:n,onSubmitSuccess:p=>{_(!1),e.onSubmitSuccess&&e.onSubmitSuccess(p)},onSubmitError:p=>{e.onSubmitError&&e.onSubmitError(p)},onFormSubmitted:()=>{e.onFormSubmitted&&e.onFormSubmitted()},open:f,__self:void 0,__source:{fileName:el,lineNumber:67}}),a)};return d}}),rl="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/screenshot/components/CropCorner.tsx";function ol({h:e}){return function({top:n,left:r,corner:o,onGrabButton:i}){return e("button",{class:`editor__crop-corner editor__crop-corner--${o} `,style:{top:n,left:r},onMouseDown:s=>{s.preventDefault(),i(s,o)},onClick:s=>{s.preventDefault()},__self:this,__source:{fileName:rl,lineNumber:22}})}}function il(e){const t=C.createElement("style"),n="#1A141F",r="#302735";return t.textContent=`
|
|
374
374
|
.editor {
|
|
375
375
|
padding: 10px;
|
|
376
376
|
padding-top: 65px;
|
|
@@ -445,4 +445,4 @@ ${Ku}
|
|
|
445
445
|
border-left: none;
|
|
446
446
|
border-top: none;
|
|
447
447
|
}
|
|
448
|
-
`,e&&t.setAttribute("nonce",e),t}function
|
|
448
|
+
`,e&&t.setAttribute("nonce",e),t}function sl({hooks:e}){return function({onBeforeScreenshot:n,onScreenshot:r,onAfterScreenshot:o,onError:i}){e.useEffect(()=>{(async()=>{n();const a=await et.mediaDevices.getDisplayMedia({video:{width:ce.innerWidth*ce.devicePixelRatio,height:ce.innerHeight*ce.devicePixelRatio},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),c=C.createElement("video");await new Promise((l,d)=>{c.srcObject=a,c.onloadedmetadata=()=>{r(c),a.getTracks().forEach(u=>u.stop()),l()},c.play().catch(d)}),o()})().catch(i)},[])}}const Z="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/screenshot/components/ScreenshotEditor.tsx",tt=30,le=3,ge=tt+le,q=ce.devicePixelRatio,Ze=e=>({x:Math.min(e.startX,e.endX),y:Math.min(e.startY,e.endY),width:Math.abs(e.startX-e.endX),height:Math.abs(e.startY-e.endY)}),zt=e=>{const t=e.clientHeight,n=e.clientWidth,r=e.width/e.height;let o=t*r,i=t;o>n&&(o=n,i=n/r);const s=(n-o)/2,a=(t-i)/2;return{startX:s,startY:a,endX:o+s,endY:i+a}};function al({h:e,hooks:t,imageBuffer:n,dialog:r,options:o}){const i=sl({hooks:t});return function({onError:a}){const c=t.useMemo(()=>({__html:il(o.styleNonce).innerText}),[]),l=ol({h:e}),d=t.useRef(null),u=t.useRef(null),_=t.useRef(null),[f,p]=t.useState({startX:0,startY:0,endX:0,endY:0}),[R,y]=t.useState(!1),[E,k]=t.useState(!1);t.useEffect(()=>{ce.addEventListener("resize",P,!1)},[]);function P(){const h=_.current,m=Ze(zt(n));if(h){h.width=m.width*q,h.height=m.height*q,h.style.width=`${m.width}px`,h.style.height=`${m.height}px`;const v=h.getContext("2d");v&&v.scale(q,q)}const S=u.current;S&&(S.style.width=`${m.width}px`,S.style.height=`${m.height}px`),p({startX:0,startY:0,endX:m.width,endY:m.height})}t.useEffect(()=>{const h=_.current;if(!h)return;const m=h.getContext("2d");if(!m)return;const S=Ze(zt(n)),v=Ze(f);m.clearRect(0,0,S.width,S.height),m.fillStyle="rgba(0, 0, 0, 0.5)",m.fillRect(0,0,S.width,S.height),m.clearRect(v.x,v.y,v.width,v.height),m.strokeStyle="#ffffff",m.lineWidth=3,m.strokeRect(v.x+1,v.y+1,v.width-2,v.height-2),m.strokeStyle="#000000",m.lineWidth=1,m.strokeRect(v.x+3,v.y+3,v.width-6,v.height-6)},[f]);function B(h,m){y(!1),k(!0);const S=ne(m),v=()=>{C.removeEventListener("mousemove",S),C.removeEventListener("mouseup",v),y(!0),k(!1)};C.addEventListener("mouseup",v),C.addEventListener("mousemove",S)}const ne=t.useCallback(h=>function(m){if(!_.current)return;const S=_.current,v=S.getBoundingClientRect(),U=m.clientX-v.x,re=m.clientY-v.y;switch(h){case"top-left":p(O=>({...O,startX:Math.min(Math.max(0,U),O.endX-ge),startY:Math.min(Math.max(0,re),O.endY-ge)}));break;case"top-right":p(O=>({...O,endX:Math.max(Math.min(U,S.width/q),O.startX+ge),startY:Math.min(Math.max(0,re),O.endY-ge)}));break;case"bottom-left":p(O=>({...O,startX:Math.min(Math.max(0,U),O.endX-ge),endY:Math.max(Math.min(re,S.height/q),O.startY+ge)}));break;case"bottom-right":p(O=>({...O,endX:Math.max(Math.min(U,S.width/q),O.startX+ge),endY:Math.max(Math.min(re,S.height/q),O.startY+ge)}));break}},[]),V=t.useRef({initialX:0,initialY:0});function K(h){if(E)return;V.current={initialX:h.clientX,initialY:h.clientY};const m=v=>{const U=_.current;if(!U)return;const re=v.clientX-V.current.initialX,O=v.clientY-V.current.initialY;p(Y=>{const Me=Math.max(0,Math.min(Y.startX+re,U.width/q-(Y.endX-Y.startX))),G=Math.max(0,Math.min(Y.startY+O,U.height/q-(Y.endY-Y.startY))),J=Me+(Y.endX-Y.startX),Oe=G+(Y.endY-Y.startY);return V.current.initialX=v.clientX,V.current.initialY=v.clientY,{startX:Me,startY:G,endX:J,endY:Oe}})},S=()=>{C.removeEventListener("mousemove",m),C.removeEventListener("mouseup",S)};C.addEventListener("mousemove",m),C.addEventListener("mouseup",S)}function ie(){const h=C.createElement("canvas"),m=Ze(zt(n)),S=Ze(f);h.width=S.width*q,h.height=S.height*q;const v=h.getContext("2d");v&&n&&v.drawImage(n,S.x/m.width*n.width,S.y/m.height*n.height,S.width/m.width*n.width,S.height/m.height*n.height,0,0,h.width,h.height);const U=n.getContext("2d");U&&(U.clearRect(0,0,n.width,n.height),n.width=h.width,n.height=h.height,n.style.width=`${S.width}px`,n.style.height=`${S.height}px`,U.drawImage(h,0,0),P())}return i({onBeforeScreenshot:t.useCallback(()=>{r.el.style.display="none"},[]),onScreenshot:t.useCallback(h=>{const m=n.getContext("2d");if(!m)throw new Error("Could not get canvas context");n.width=h.videoWidth,n.height=h.videoHeight,n.style.width="100%",n.style.height="100%",m.drawImage(h,0,0)},[n]),onAfterScreenshot:t.useCallback(()=>{r.el.style.display="block";const h=d.current;h&&h.appendChild(n),P()},[]),onError:t.useCallback(h=>{r.el.style.display="block",a(h)},[])}),e("div",{class:"editor",__self:this,__source:{fileName:Z,lineNumber:315}},e("style",{nonce:o.styleNonce,dangerouslySetInnerHTML:c,__self:this,__source:{fileName:Z,lineNumber:316}}),e("div",{class:"editor__canvas-container",ref:d,__self:this,__source:{fileName:Z,lineNumber:317}},e("div",{class:"editor__crop-container",style:{position:"absolute",zIndex:1},ref:u,__self:this,__source:{fileName:Z,lineNumber:318}},e("canvas",{onMouseDown:K,style:{position:"absolute",cursor:R?"move":"auto"},ref:_,__self:this,__source:{fileName:Z,lineNumber:319}}),e(l,{left:f.startX-le,top:f.startY-le,onGrabButton:B,corner:"top-left",__self:this,__source:{fileName:Z,lineNumber:324}}),e(l,{left:f.endX-tt+le,top:f.startY-le,onGrabButton:B,corner:"top-right",__self:this,__source:{fileName:Z,lineNumber:330}}),e(l,{left:f.startX-le,top:f.endY-tt+le,onGrabButton:B,corner:"bottom-left",__self:this,__source:{fileName:Z,lineNumber:336}}),e(l,{left:f.endX-tt+le,top:f.endY-tt+le,onGrabButton:B,corner:"bottom-right",__self:this,__source:{fileName:Z,lineNumber:342}}),e("div",{style:{left:Math.max(0,f.endX-191),top:Math.max(0,f.endY+8),display:R?"flex":"none"},class:"editor__crop-btn-group",__self:this,__source:{fileName:Z,lineNumber:348}},e("button",{onClick:h=>{h.preventDefault(),_.current&&p({startX:0,startY:0,endX:_.current.width/q,endY:_.current.height/q}),y(!1)},class:"btn btn--default",__self:this,__source:{fileName:Z,lineNumber:356}},o.cancelButtonLabel),e("button",{onClick:h=>{h.preventDefault(),ie(),y(!1)},class:"btn btn--primary",__self:this,__source:{fileName:Z,lineNumber:373}},o.confirmButtonLabel)))))}}const cl=()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{const o=C.createElement("canvas");return{input:al({h:e,hooks:t,imageBuffer:o,dialog:n,options:r}),value:async()=>{const i=await new Promise(s=>{o.toBlob(s,"image/png")});if(i)return{data:new Uint8Array(await i.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}}),ul=Su({lazyLoadIntegration:Vc,getModalIntegration:()=>nl,getScreenshotIntegration:()=>cl});exports.captureFeedback=po;exports.captureMessage=As;exports.feedbackSyncIntegration=ul;exports.init=Xc;exports.isInitialized=Us;
|