@nylas/react 1.1.2 → 1.1.3
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/{add-circle-icon_2.entry-f1383568.cjs → add-circle-icon_2.entry-b77120e5.cjs} +1 -1
- package/dist/{add-circle-icon_2.entry-611be49d.js → add-circle-icon_2.entry-fbc1e82b.js} +1 -1
- package/dist/{archive-icon_7.entry-5e6ba9e7.js → archive-icon_7.entry-30962e70.js} +13 -13
- package/dist/{archive-icon_7.entry-59cc6868.cjs → archive-icon_7.entry-dd8c7642.cjs} +1 -1
- package/dist/{arrow-icon.entry-a924df13.cjs → arrow-icon.entry-2dfd8319.cjs} +1 -1
- package/dist/{arrow-icon.entry-9c19a803.js → arrow-icon.entry-5b436054.js} +1 -1
- package/dist/{bold-icon_3.entry-2935a3df.js → bold-icon_3.entry-5120a9c8.js} +3 -3
- package/dist/{bold-icon_3.entry-ffe02f93.cjs → bold-icon_3.entry-da2d1270.cjs} +1 -1
- package/dist/{button-component_2.entry-b9d3f6a2.cjs → button-component_2.entry-27a504d9.cjs} +1 -1
- package/dist/{button-component_2.entry-93aa59a2.js → button-component_2.entry-697bf5ac.js} +7 -7
- package/dist/{calendar-agenda-fill-icon_48.entry-476bc4ef.js → calendar-agenda-fill-icon_51.entry-52b5bf31.js} +990 -910
- package/dist/calendar-agenda-fill-icon_51.entry-a25262b3.cjs +7 -0
- package/dist/{calendar-cancel-icon.entry-11bb8656.cjs → calendar-cancel-icon.entry-c6e2eed6.cjs} +1 -1
- package/dist/{calendar-cancel-icon.entry-ee0acc54.js → calendar-cancel-icon.entry-e6a433a2.js} +1 -1
- package/dist/{calendar-check-icon_2.entry-14548656.cjs → calendar-check-icon_2.entry-45cad6f1.cjs} +1 -1
- package/dist/{calendar-check-icon_2.entry-54a82e1e.js → calendar-check-icon_2.entry-d88307d6.js} +1 -1
- package/dist/{calendar-icon.entry-29f7003b.js → calendar-icon.entry-2badc962.js} +1 -1
- package/dist/{calendar-icon.entry-1a17f887.cjs → calendar-icon.entry-b2fffd21.cjs} +1 -1
- package/dist/{checkbox-component_2.entry-84a17232.cjs → checkbox-component_2.entry-3926b644.cjs} +1 -1
- package/dist/{checkbox-component_2.entry-dfec10cb.js → checkbox-component_2.entry-5ab55050.js} +3 -3
- package/dist/{chevron-icon_3.entry-5da08d02.cjs → chevron-icon_3.entry-1fe5d097.cjs} +1 -1
- package/dist/{chevron-icon_3.entry-826e81d4.js → chevron-icon_3.entry-664fae5d.js} +5 -5
- package/dist/{clock-icon_4.entry-dafdd895.cjs → clock-icon_4.entry-efec2c08.cjs} +1 -1
- package/dist/{clock-icon_4.entry-36d97f00.js → clock-icon_4.entry-f11f9dad.js} +13 -13
- package/dist/{constants-50c3e067-fed7fb48.js → constants-50c3e067-33cf0ffe.js} +1 -1
- package/dist/{constants-50c3e067-1fe54cf3.cjs → constants-50c3e067-5ec3f879.cjs} +1 -1
- package/dist/{copy-icon.entry-eec265da.cjs → copy-icon.entry-3965f206.cjs} +1 -1
- package/dist/{copy-icon.entry-6d1a649d.js → copy-icon.entry-70131e8e.js} +1 -1
- package/dist/{delete-icon_2.entry-160ba41e.cjs → delete-icon.entry-5d067fef.cjs} +1 -1
- package/dist/{delete-icon_2.entry-528a3879.js → delete-icon.entry-e003695d.js} +4 -14
- package/dist/{document-refresh-icon.entry-276704dc.cjs → document-refresh-icon.entry-30c974df.cjs} +1 -1
- package/dist/{document-refresh-icon.entry-6565f3b5.js → document-refresh-icon.entry-b4e01cd4.js} +1 -1
- package/dist/elements/index.d.ts +2 -0
- package/dist/{elements-dc5b338e-2d3857dc.js → elements-dc5b338e-55823d00.js} +1 -1
- package/dist/{elements-dc5b338e-b06b2857.cjs → elements-dc5b338e-6883a39e.cjs} +1 -1
- package/dist/feedbackSync-81d4c4d8-dd4d2e32.js +11735 -0
- package/dist/feedbackSync-81d4c4d8-f4e78902.cjs +455 -0
- package/dist/{focus-visible-e8093c16-47e61336.cjs → focus-visible-e8093c16-431bbe59.cjs} +1 -1
- package/dist/{focus-visible-e8093c16-6f68eb89.js → focus-visible-e8093c16-f403fee8.js} +1 -1
- package/dist/{forward-icon_6.entry-ed6ab66a.js → forward-icon_6.entry-3bb91d58.js} +7 -7
- package/dist/{forward-icon_6.entry-fed8994d.cjs → forward-icon_6.entry-ceec2371.cjs} +3 -3
- package/dist/{globe-icon.entry-154ccdb5.js → globe-icon.entry-6fc456c7.js} +5 -5
- package/dist/{globe-icon.entry-95fc0408.cjs → globe-icon.entry-8c3c9e48.cjs} +1 -1
- package/dist/google-logo-icon_4.entry-4eb16cd2.cjs +1 -0
- package/dist/{google-logo-icon_4.entry-68cfa3fe.js → google-logo-icon_4.entry-d6e0c4c0.js} +331 -289
- package/dist/index-11f33e47.cjs +82 -0
- package/dist/{index-1322d804.js → index-a282e817.js} +2890 -2792
- package/dist/{index.es-79f5b771-08cc349d.cjs → index.es-ab9affcc-18263b66.cjs} +1 -1
- package/dist/{index.es-79f5b771-04cd3414.js → index.es-ab9affcc-30461b18.js} +1 -1
- package/dist/{info-icon_2.entry-49261a0a.js → info-icon_2.entry-d20b975c.js} +5 -5
- package/dist/{info-icon_2.entry-2af880b8.cjs → info-icon_2.entry-e582ac10.cjs} +1 -1
- package/dist/{input-color-picker.entry-aefe0e26.js → input-color-picker.entry-27f4288f.js} +3 -3
- package/dist/{input-color-picker.entry-57adff77.cjs → input-color-picker.entry-c6a28671.cjs} +1 -1
- package/dist/{input-component.entry-09c3c9b6.cjs → input-component.entry-744fcec1.cjs} +1 -1
- package/dist/{input-component.entry-d7c2724b.js → input-component.entry-b6f1c417.js} +2 -2
- package/dist/{input-dropdown.entry-e573ade0.js → input-dropdown.entry-18744def.js} +2 -2
- package/dist/{input-dropdown.entry-e7d26273.cjs → input-dropdown.entry-f13234d7.cjs} +1 -1
- package/dist/{mailbox-store-9c52a3fa-6b39645f.cjs → mailbox-store-affca6de-9451094e.cjs} +1 -1
- package/dist/{mailbox-store-9c52a3fa-27f8f7e6.js → mailbox-store-affca6de-d601dc6b.js} +2 -2
- package/dist/{multi-select-dropdown.entry-15cacb87.js → multi-select-dropdown.entry-924809e1.js} +5 -5
- package/dist/{multi-select-dropdown.entry-46b2b1c9.cjs → multi-select-dropdown.entry-dde671d7.cjs} +1 -1
- package/dist/{nylas-booked-event-card_12.entry-3921071a.js → nylas-booked-event-card_12.entry-52c3111d.js} +62 -60
- package/dist/nylas-booked-event-card_12.entry-d89c1f9d.cjs +1 -0
- package/dist/{nylas-form-card.entry-db3f0e3b.cjs → nylas-form-card.entry-ab61fdc5.cjs} +1 -1
- package/dist/{nylas-form-card.entry-ca835017.js → nylas-form-card.entry-b0a2403f.js} +8 -8
- package/dist/{nylas-if-state.entry-4159d41d.js → nylas-if-state.entry-523fdc6b.js} +2 -2
- package/dist/{nylas-if-state.entry-5410607c.cjs → nylas-if-state.entry-53883c36.cjs} +1 -1
- package/dist/{nylas-list-folders.entry-0f143930.cjs → nylas-list-folders.entry-4ef6cb3d.cjs} +1 -1
- package/dist/{nylas-list-folders.entry-6b4a3d96.js → nylas-list-folders.entry-e37d069f.js} +8 -8
- package/dist/{nylas-list-threads.entry-68b6f32b.cjs → nylas-list-threads.entry-3be623e9.cjs} +1 -1
- package/dist/{nylas-list-threads.entry-62108562.js → nylas-list-threads.entry-8ba62db8.js} +3 -3
- package/dist/{nylas-login.entry-f1d7bc7d.cjs → nylas-login.entry-05e1df3e.cjs} +1 -1
- package/dist/{nylas-login.entry-590e7fba.js → nylas-login.entry-d9bf3974.js} +5 -5
- package/dist/{nylas-mailbox-pagination.entry-8377fdee.cjs → nylas-mailbox-pagination.entry-3dd05cf4.cjs} +1 -1
- package/dist/{nylas-mailbox-pagination.entry-ba1af8fb.js → nylas-mailbox-pagination.entry-50d9d9e3.js} +2 -2
- package/dist/{nylas-mailbox-toolbar-button.entry-4497acd0.js → nylas-mailbox-toolbar-button.entry-9a77d137.js} +2 -2
- package/dist/{nylas-mailbox-toolbar-button.entry-6a5d8387.cjs → nylas-mailbox-toolbar-button.entry-d87b55de.cjs} +1 -1
- package/dist/{nylas-mailbox.entry-917c22f5.js → nylas-mailbox.entry-cb7d1031.js} +3 -3
- package/dist/{nylas-mailbox.entry-a07652b4.cjs → nylas-mailbox.entry-f7db9aa8.cjs} +1 -1
- package/dist/{nylas-provider.entry-0e520ac3.cjs → nylas-provider.entry-1716bf48.cjs} +1 -1
- package/dist/{nylas-provider.entry-20c47b14.js → nylas-provider.entry-7aa46ea2.js} +37 -37
- package/dist/{nylas-reminder-emails.entry-69626e7f.cjs → nylas-reminder-emails.entry-88a862cd.cjs} +2 -2
- package/dist/{nylas-reminder-emails.entry-088ee120.js → nylas-reminder-emails.entry-a86231b7.js} +5 -5
- package/dist/{nylas-reminder-time_2.entry-0357f280.js → nylas-reminder-time_2.entry-9589d5f2.js} +4 -4
- package/dist/{nylas-reminder-time_2.entry-b5c181db.cjs → nylas-reminder-time_2.entry-bc76d4ab.cjs} +1 -1
- package/dist/{nylas-scheduler-editor.entry-d2c3bddc.cjs → nylas-scheduler-editor.entry-1a2f3ee0.cjs} +2 -2
- package/dist/{nylas-scheduler-editor.entry-6bb290ed.js → nylas-scheduler-editor.entry-b434b526.js} +7 -7
- package/dist/nylas-scheduling.entry-59e5e8c1.cjs +1 -0
- package/dist/nylas-scheduling.entry-b71080c8.js +400 -0
- package/dist/{nylas-threads-refresh.entry-45d7d171.js → nylas-threads-refresh.entry-544ca90a.js} +2 -2
- package/dist/{nylas-threads-refresh.entry-6636e7b1.cjs → nylas-threads-refresh.entry-7ada7b2d.cjs} +1 -1
- package/dist/{nylas-threads-search.entry-4460aa9b.js → nylas-threads-search.entry-181ba46a.js} +17 -17
- package/dist/{nylas-threads-search.entry-ae87695a.cjs → nylas-threads-search.entry-f1cb19e4.cjs} +1 -1
- package/dist/{nylas-time-window-picker.entry-1b449403.cjs → nylas-time-window-picker.entry-a6d1c648.cjs} +1 -1
- package/dist/{nylas-time-window-picker.entry-260f52a6.js → nylas-time-window-picker.entry-c1ee860a.js} +2 -2
- package/dist/{nylas-view-thread.entry-5a9b353a.cjs → nylas-view-thread.entry-6ae8dd64.cjs} +1 -1
- package/dist/{nylas-view-thread.entry-5821630b.js → nylas-view-thread.entry-c066f522.js} +6 -6
- package/dist/{person-icon.entry-b4ce06b7.cjs → person-icon.entry-80c9022e.cjs} +1 -1
- package/dist/{person-icon.entry-ed6786db.js → person-icon.entry-8833e3cc.js} +4 -4
- package/dist/{play-icon_2.entry-87fe39a9.cjs → play-icon_2.entry-801c85bc.cjs} +1 -1
- package/dist/{play-icon_2.entry-261ea828.js → play-icon_2.entry-efca8f00.js} +3 -3
- package/dist/react.cjs +1 -1
- package/dist/react.js +118 -116
- package/dist/{refresh-icon.entry-87af05b0.js → refresh-icon.entry-4d6791bd.js} +4 -4
- package/dist/{refresh-icon.entry-21ac359d.cjs → refresh-icon.entry-d4cc16b7.cjs} +1 -1
- package/dist/{register-component-ea95564d-a64ee107.cjs → register-component-a7ea27ad-2343f3df.cjs} +1 -1
- package/dist/{register-component-ea95564d-843da1da.js → register-component-a7ea27ad-fa2c4b17.js} +1 -1
- package/dist/{scheduler-config-store-2a3b403d-88840eb1.cjs → scheduler-config-store-2a3b403d-2263f999.cjs} +1 -1
- package/dist/{scheduler-config-store-2a3b403d-8553b685.js → scheduler-config-store-2a3b403d-5176cd45.js} +1 -1
- package/dist/{scheduler-store-9ff4914b-d1a624f8.js → scheduler-store-33ab8dea-9801357a.js} +2 -2
- package/dist/scheduler-store-33ab8dea-a0b39d36.cjs +1 -0
- package/dist/{textarea-component.entry-cbffb0b0.cjs → textarea-component.entry-019e75d0.cjs} +1 -1
- package/dist/{textarea-component.entry-dad42f20.js → textarea-component.entry-174089bc.js} +2 -2
- package/dist/{time-period-selector.entry-79c94da3.js → time-period-selector.entry-62c854d1.js} +4 -4
- package/dist/{time-period-selector.entry-e54d0989.cjs → time-period-selector.entry-8466d0f2.cjs} +1 -1
- package/dist/{translate-icon.entry-ef6266c4.js → translate-icon.entry-73f7127b.js} +4 -4
- package/dist/{translate-icon.entry-8e9eeeba.cjs → translate-icon.entry-7d5cf4b8.cjs} +1 -1
- package/dist/{warning-icon.entry-34c85de2.cjs → warning-icon.entry-92638eeb.cjs} +1 -1
- package/dist/{warning-icon.entry-adf18211.js → warning-icon.entry-abf896c3.js} +5 -5
- package/package.json +2 -2
- package/dist/calendar-agenda-fill-icon_48.entry-c4ea84b3.cjs +0 -7
- package/dist/google-logo-icon_4.entry-afffb209.cjs +0 -1
- package/dist/index-c4e817ef.cjs +0 -82
- package/dist/nylas-booked-event-card_12.entry-47c5381d.cjs +0 -1
- package/dist/nylas-scheduling.entry-bc9c25c5.js +0 -359
- package/dist/nylas-scheduling.entry-dc92d5e7.cjs +0 -1
- package/dist/scheduler-store-9ff4914b-63dc472a.cjs +0 -1
|
@@ -0,0 +1,455 @@
|
|
|
1
|
+
"use strict";const Vn=require("./index-11f33e47.cjs"),Ni=Object.prototype.toString;function Ss(e){switch(Ni.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return ft(e,Error)}}function jt(e,t){return Ni.call(e)===`[object ${t}]`}function Di(e){return jt(e,"ErrorEvent")}function so(e){return jt(e,"DOMError")}function Cc(e){return jt(e,"DOMException")}function He(e){return jt(e,"String")}function bs(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Es(e){return e===null||bs(e)||typeof e!="object"&&typeof e!="function"}function At(e){return jt(e,"Object")}function dr(e){return typeof Event<"u"&&ft(e,Event)}function Ic(e){return typeof Element<"u"&&ft(e,Element)}function xc(e){return jt(e,"RegExp")}function fr(e){return!!(e&&e.then&&typeof e.then=="function")}function Tc(e){return At(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function ft(e,t){try{return e instanceof t}catch{return!1}}function Ai(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function Rt(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function oo(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const s=e[r];try{Ai(s)?n.push("[VueViewModel]"):n.push(String(s))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function Mc(e,t,n=!1){return He(e)?xc(t)?t.test(e):He(t)?n?e===t:e.includes(t):!1:!1}function pn(e,t=[],n=!1){return t.some(r=>Mc(e,r,n))}function Rc(e,t,n=250,r,s,o,i){if(!o.exception||!o.exception.values||!i||!ft(i.originalException,Error))return;const c=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;c&&(o.exception.values=Nc(Br(e,t,s,i.originalException,r,o.exception.values,c,0),n))}function Br(e,t,n,r,s,o,i,c){if(o.length>=n+1)return o;let a=[...o];if(ft(r[s],Error)){io(i,c);const u=e(t,r[s]),d=a.length;ao(u,s,d,c),a=Br(e,t,n,r[s],s,[u,...a],u,d)}return Array.isArray(r.errors)&&r.errors.forEach((u,d)=>{if(ft(u,Error)){io(i,c);const l=e(t,u),f=a.length;ao(l,`errors[${d}]`,f,c),a=Br(e,t,n,u,s,[l,...a],l,f)}}),a}function io(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 ao(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 Nc(e,t){return e.map(n=>(n.value&&(n.value=Rt(n.value,t)),n))}const nt="8.28.0",B=globalThis;function vs(e,t,n){const r=n||B,s=r.__SENTRY__=r.__SENTRY__||{},o=s[nt]=s[nt]||{};return o[e]||(o[e]=t())}const ws=B,Dc=80;function hr(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,s=[];let o=0,i=0;const c=" > ",a=c.length;let u;const d=Array.isArray(t)?t:t.keyAttrs,l=!Array.isArray(t)&&t.maxStringLength||Dc;for(;n&&o++<r&&(u=Ac(n,d),!(u==="html"||o>1&&i+s.length*a+u.length>=l));)s.push(u),i+=u.length,n=n.parentNode;return s.reverse().join(c)}catch{return"<unknown>"}}function Ac(e,t){const n=e,r=[];if(!n||!n.tagName)return"";if(ws.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const s=t&&t.length?t.filter(i=>n.getAttribute(i)).map(i=>[i,n.getAttribute(i)]):null;if(s&&s.length)s.forEach(i=>{r.push(`[${i[0]}="${i[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const i=n.className;if(i&&He(i)){const c=i.split(/\s+/);for(const a of c)r.push(`.${a}`)}}const o=["aria-label","type","name","title","alt"];for(const i of o){const c=n.getAttribute(i);c&&r.push(`[${i}="${c}"]`)}return r.join("")}function ks(){try{return ws.document.location.href}catch{return""}}function Oc(e){if(!ws.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 mn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Lc="Sentry Logger ",Ur=["debug","info","warn","error","log","assert","trace"],Kn={};function qt(e){if(!("console"in B))return e();const t=B.console,n={},r=Object.keys(Kn);r.forEach(s=>{const o=Kn[s];n[s]=t[s],t[s]=o});try{return e()}finally{r.forEach(s=>{t[s]=n[s]})}}function Pc(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return mn?Ur.forEach(n=>{t[n]=(...r)=>{e&&qt(()=>{B.console[n](`${Lc}[${n}]:`,...r)})}}):Ur.forEach(n=>{t[n]=()=>{}}),t}const C=Pc(),Fc=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function $c(e){return e==="http"||e==="https"}function pr(e,t=!1){const{host:n,path:r,pass:s,port:o,projectId:i,protocol:c,publicKey:a}=e;return`${c}://${a}${t&&s?`:${s}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${i}`}function Bc(e){const t=Fc.exec(e);if(!t){qt(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,s="",o="",i="",c=""]=t.slice(1);let a="",u=c;const d=u.split("/");if(d.length>1&&(a=d.slice(0,-1).join("/"),u=d.pop()),u){const l=u.match(/^\d+/);l&&(u=l[0])}return Oi({host:o,pass:s,path:a,projectId:u,port:i,protocol:n,publicKey:r})}function Oi(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Uc(e){if(!mn)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(C.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?$c(r)?t&&isNaN(parseInt(t,10))?(C.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(C.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(C.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Hc(e){const t=typeof e=="string"?Bc(e):Oi(e);if(!(!t||!Uc(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 ge(e,t,n){if(!(t in e))return;const r=e[t],s=n(r);typeof s=="function"&&Li(s,r),e[t]=s}function ht(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{mn&&C.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Li(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,ht(e,"__sentry_original__",t)}catch{}}function Cs(e){return e.__sentry_original__}function zc(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function Pi(e){if(Ss(e))return{message:e.message,name:e.name,stack:e.stack,...uo(e)};if(dr(e)){const t={type:e.type,target:co(e.target),currentTarget:co(e.currentTarget),...uo(e)};return typeof CustomEvent<"u"&&ft(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function co(e){try{return Ic(e)?hr(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function uo(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 Wc(e,t=40){const n=Object.keys(Pi(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return Rt(r,t);for(let s=n.length;s>0;s--){const o=n.slice(0,s).join(", ");if(!(o.length>t))return s===n.length?o:Rt(o,t)}return""}function me(e){return Hr(e,new Map)}function Hr(e,t){if(jc(e)){const n=t.get(e);if(n!==void 0)return n;const r={};t.set(e,r);for(const s of Object.keys(e))typeof e[s]<"u"&&(r[s]=Hr(e[s],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(s=>{r.push(Hr(s,t))}),r}return e}function jc(e){if(!At(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const Fi=50,pt="?",lo=/\(error: (.*)\)/,fo=/captureMessage|captureException/;function $i(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,s=0)=>{const o=[],i=n.split(`
|
|
2
|
+
`);for(let c=r;c<i.length;c++){const a=i[c];if(a.length>1024)continue;const u=lo.test(a)?a.replace(lo,"$1"):a;if(!u.match(/\S*Error: /)){for(const d of t){const l=d(u);if(l){o.push(l);break}}if(o.length>=Fi+s)break}}return Yc(o.slice(s))}}function qc(e){return Array.isArray(e)?$i(...e):e}function Yc(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(In(t).function||"")&&t.pop(),t.reverse(),fo.test(In(t).function||"")&&(t.pop(),fo.test(In(t).function||"")&&t.pop()),t.slice(0,Fi).map(n=>({...n,filename:n.filename||In(t).filename,function:n.function||pt}))}function In(e){return e[e.length-1]||{}}const Ir="<anonymous>";function je(e){try{return!e||typeof e!="function"?Ir:e.name||Ir}catch{return Ir}}function ho(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 Un={},po={};function mt(e,t){Un[e]=Un[e]||[],Un[e].push(t)}function _t(e,t){po[e]||(t(),po[e]=!0)}function Re(e,t){const n=e&&Un[e];if(n)for(const r of n)try{r(t)}catch(s){mn&&C.error(`Error while triggering instrumentation handler.
|
|
3
|
+
Type: ${e}
|
|
4
|
+
Name: ${je(r)}
|
|
5
|
+
Error:`,s)}}function Gc(e){const t="console";mt(t,e),_t(t,Xc)}function Xc(){"console"in B&&Ur.forEach(function(e){e in B.console&&ge(B.console,e,function(t){return Kn[e]=t,function(...n){Re("console",{args:n,level:e});const s=Kn[e];s&&s.apply(B.console,n)}})})}const zr=B;function Bi(){if(!("fetch"in zr))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Wr(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Vc(){if(typeof EdgeRuntime=="string")return!0;if(!Bi())return!1;if(Wr(zr.fetch))return!0;let e=!1;const t=zr.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=Wr(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){mn&&C.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}const Ui=1e3;function _n(){return Date.now()/Ui}function Kc(){const{performance:e}=B;if(!e||!e.now)return _n;const t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/Ui}const ze=Kc(),Jc=(()=>{const{performance:e}=B;if(!e||!e.now)return;const t=3600*1e3,n=e.now(),r=Date.now(),s=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=s<t,i=e.timing&&e.timing.navigationStart,a=typeof i=="number"?Math.abs(i+n-r):t,u=a<t;return o||u?s<=a?e.timeOrigin:i:r})();function Zc(e,t){const n="fetch";mt(n,e),_t(n,()=>Qc(void 0,t))}function Qc(e,t=!1){t&&!Vc()||ge(B,"fetch",function(n){return function(...r){const{method:s,url:o}=eu(r),i={args:r,fetchData:{method:s,url:o},startTimestamp:ze()*1e3};e||Re("fetch",{...i});const c=new Error().stack;return n.apply(B,r).then(async a=>(e?e(a):Re("fetch",{...i,endTimestamp:ze()*1e3,response:a}),a),a=>{throw Re("fetch",{...i,endTimestamp:ze()*1e3,error:a}),Ss(a)&&a.stack===void 0&&(a.stack=c,ht(a,"framesToPop",1)),a})}})}function jr(e,t){return!!e&&typeof e=="object"&&!!e[t]}function mo(e){return typeof e=="string"?e:e?jr(e,"url")?e.url:e.toString?e.toString():"":""}function eu(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:mo(n),method:jr(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:mo(t),method:jr(t,"method")?String(t.method).toUpperCase():"GET"}}let xn=null;function tu(e){const t="error";mt(t,e),_t(t,nu)}function nu(){xn=B.onerror,B.onerror=function(e,t,n,r,s){return Re("error",{column:r,error:s,line:n,msg:e,url:t}),xn&&!xn.__SENTRY_LOADER__?xn.apply(this,arguments):!1},B.onerror.__SENTRY_INSTRUMENTED__=!0}let Tn=null;function ru(e){const t="unhandledrejection";mt(t,e),_t(t,su)}function su(){Tn=B.onunhandledrejection,B.onunhandledrejection=function(e){return Re("unhandledrejection",e),Tn&&!Tn.__SENTRY_LOADER__?Tn.apply(this,arguments):!0},B.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function ou(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function iu(){return"npm"}function au(){return!ou()&&Object.prototype.toString.call(typeof Vn.process<"u"?Vn.process:0)==="[object process]"}function qr(){return typeof window<"u"&&(!au()||cu())}function cu(){return B.process!==void 0&&B.process.type==="renderer"}function uu(){const e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(s){if(e)return t.has(s)?!0:(t.add(s),!1);for(let o=0;o<t.length;o++)if(t[o]===s)return!0;return t.push(s),!1}function r(s){if(e)t.delete(s);else for(let o=0;o<t.length;o++)if(t[o]===s){t.splice(o,1);break}}return[n,r]}function Ee(){const e=B,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 Hi(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Ke(e){const{message:t,event_id:n}=e;if(t)return t;const r=Hi(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Yr(e,t,n){const r=e.exception=e.exception||{},s=r.values=r.values||[],o=s[0]=s[0]||{};o.value||(o.value=t||""),o.type||(o.type=n||"Error")}function on(e,t){const n=Hi(e);if(!n)return;const r={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism={...r,...s,...t},t&&"data"in t){const o={...s&&s.data,...t.data};n.mechanism.data=o}}function _o(e){if(e&&e.__sentry_captured__)return!0;try{ht(e,"__sentry_captured__",!0)}catch{}return!1}function zi(e){return Array.isArray(e)?e:[e]}function De(e,t=100,n=1/0){try{return Gr("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Wi(e,t=3,n=100*1024){const r=De(e,t);return hu(r)>n?Wi(e,t-1,n):r}function Gr(e,t,n=1/0,r=1/0,s=uu()){const[o,i]=s;if(t==null||["number","boolean","string"].includes(typeof t)&&!Number.isNaN(t))return t;const c=lu(e,t);if(!c.startsWith("[object "))return c;if(t.__sentry_skip_normalization__)return t;const a=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(a===0)return c.replace("object ","");if(o(t))return"[Circular ~]";const u=t;if(u&&typeof u.toJSON=="function")try{const h=u.toJSON();return Gr("",h,a-1,r,s)}catch{}const d=Array.isArray(t)?[]:{};let l=0;const f=Pi(t);for(const h in f){if(!Object.prototype.hasOwnProperty.call(f,h))continue;if(l>=r){d[h]="[MaxProperties ~]";break}const p=f[h];d[h]=Gr(h,p,a-1,r,s),l++}return i(t),d}function lu(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof Vn.global$1<"u"&&t===Vn.global$1)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Ai(t))return"[VueViewModel]";if(Tc(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${je(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=du(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function du(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function fu(e){return~-encodeURI(e).split(/%..|./).length}function hu(e){return fu(JSON.stringify(e))}var Be;(function(e){e[e.PENDING=0]="PENDING";const n=1;e[e.RESOLVED=n]="RESOLVED";const r=2;e[e.REJECTED=r]="REJECTED"})(Be||(Be={}));function qe(e){return new ke(t=>{t(e)})}function Jn(e){return new ke((t,n)=>{n(e)})}class ke{constructor(t){ke.prototype.__init.call(this),ke.prototype.__init2.call(this),ke.prototype.__init3.call(this),ke.prototype.__init4.call(this),this._state=Be.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new ke((r,s)=>{this._handlers.push([!1,o=>{if(!t)r(o);else try{r(t(o))}catch(i){s(i)}},o=>{if(!n)s(o);else try{r(n(o))}catch(i){s(i)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new ke((n,r)=>{let s,o;return this.then(i=>{o=!1,s=i,t&&t()},i=>{o=!0,s=i,t&&t()}).then(()=>{if(o){r(s);return}n(s)})})}__init(){this._resolve=t=>{this._setResult(Be.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(Be.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{if(this._state===Be.PENDING){if(fr(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Be.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Be.RESOLVED&&n[1](this._value),this._state===Be.REJECTED&&n[2](this._value),n[0]=!0)})}}}function pu(e){const t=[];function n(){return e===void 0||t.length<e}function r(i){return t.splice(t.indexOf(i),1)[0]||Promise.resolve(void 0)}function s(i){if(!n())return Jn(new Ae("Not adding Promise because buffer limit was reached."));const c=i();return t.indexOf(c)===-1&&t.push(c),c.then(()=>r(c)).then(null,()=>r(c).then(null,()=>{})),c}function o(i){return new ke((c,a)=>{let u=t.length;if(!u)return c(!0);const d=setTimeout(()=>{i&&i>0&&c(!1)},i);t.forEach(l=>{qe(l).then(()=>{--u||(clearTimeout(d),c(!0))},a)})})}return{$:t,add:s,drain:o}}function xr(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 mu=["fatal","error","warning","log","info","debug"];function _u(e){return e==="warn"?"warning":mu.includes(e)?e:"log"}const gu="sentry-",yu=/^sentry-/;function Su(e){const t=bu(e);if(!t)return;const n=Object.entries(t).reduce((r,[s,o])=>{if(s.match(yu)){const i=s.slice(gu.length);r[i]=o}return r},{});if(Object.keys(n).length>0)return n}function bu(e){if(!(!e||!He(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=go(n);return Object.entries(r).forEach(([s,o])=>{t[s]=o}),t},{}):go(e)}function go(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function Yt(e,t=[]){return[e,t]}function Eu(e,t){const[n,r]=e;return[n,[...r,t]]}function yo(e,t){const n=e[1];for(const r of n){const s=r[0].type;if(t(r,s))return!0}return!1}function Xr(e){return B.__SENTRY__&&B.__SENTRY__.encodePolyfill?B.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function vu(e){const[t,n]=e;let r=JSON.stringify(t);function s(o){typeof r=="string"?r=typeof o=="string"?r+o:[Xr(r),o]:r.push(typeof o=="string"?Xr(o):o)}for(const o of n){const[i,c]=o;if(s(`
|
|
6
|
+
${JSON.stringify(i)}
|
|
7
|
+
`),typeof c=="string"||c instanceof Uint8Array)s(c);else{let a;try{a=JSON.stringify(c)}catch{a=JSON.stringify(De(c))}s(a)}}return typeof r=="string"?r:wu(r)}function wu(e){const t=e.reduce((s,o)=>s+o.length,0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function ku(e){const t=typeof e.data=="string"?Xr(e.data):e.data;return[me({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const Cu={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 So(e){return Cu[e]}function Is(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function ji(e,t,n,r){const s=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:pr(r)},...s&&{trace:me({...s})}}}function Iu(e,t,n){const r=[{type:"client_report"},{timestamp:n||_n(),discarded_events:e}];return Yt(t?{dsn:t}:{},[r])}const xu=60*1e3;function Tu(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?xu:r-t}function Mu(e,t){return e[t]||e.all||0}function qi(e,t,n=Date.now()){return Mu(e,t)>n}function Yi(e,{statusCode:t,headers:n},r=Date.now()){const s={...e},o=n&&n["x-sentry-rate-limits"],i=n&&n["retry-after"];if(o)for(const c of o.trim().split(",")){const[a,u,,,d]=c.split(":",5),l=parseInt(a,10),f=(isNaN(l)?60:l)*1e3;if(!u)s.all=r+f;else for(const h of u.split(";"))h==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(s[h]=r+f):s[h]=r+f}else i?s.all=r+Tu(i,r):t===429&&(s.all=r+60*1e3);return s}function Ru(e,t){return e??t()}function Hn(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=o(n)):(s==="call"||s==="optionalCall")&&(n=o((...i)=>n.call(t,...i)),t=void 0)}return n}function bo(){return{traceId:Ee(),spanId:Ee().substring(16)}}const Mn=B;function Nu(){const e=Mn.chrome,t=e&&e.app&&e.app.runtime,n="history"in Mn&&!!Mn.history.pushState&&!!Mn.history.replaceState;return!t&&n}const V=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function gn(){return xs(B),B}function xs(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||nt,t[nt]=t[nt]||{}}function Du(e){const t=ze(),n={sid:Ee(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Ou(n)};return e&&Ot(n,e),n}function Ot(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||ze(),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 Au(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),Ot(e,n)}function Ou(e){return me({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 Vr="_sentrySpan";function Eo(e,t){t?ht(e,Vr,t):delete e[Vr]}function Kr(e){return e[Vr]}const Lu=100;class Ts{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=bo()}clone(){const t=new Ts;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,Eo(t,Kr(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&&Ot(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,s]=n instanceof st?[n.getScopeData(),n.getRequestSession()]:At(n)?[t,t.requestSession]:[],{tags:o,extra:i,user:c,contexts:a,level:u,fingerprint:d=[],propagationContext:l}=r||{};return this._tags={...this._tags,...o},this._extra={...this._extra,...i},this._contexts={...this._contexts,...a},c&&Object.keys(c).length&&(this._user=c),u&&(this._level=u),d.length&&(this._fingerprint=d),l&&(this._propagationContext=l),s&&(this._requestSession=s),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,Eo(this,void 0),this._attachments=[],this._propagationContext=bo(),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:Lu;if(r<=0)return this;const s={timestamp:_n(),...t},o=this._breadcrumbs;return o.push(s),this._breadcrumbs=o.length>r?o.slice(-r):o,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:Kr(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 C.warn("No client configured on scope - will not capture exception!"),r;const s=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:s,...n,event_id:r},this),r}captureMessage(t,n,r){const s=r&&r.event_id?r.event_id:Ee();if(!this._client)return C.warn("No client configured on scope - will not capture message!"),s;const o=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:o,...r,event_id:s},this),s}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):(C.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 st=Ts;function Pu(){return vs("defaultCurrentScope",()=>new st)}function Fu(){return vs("defaultIsolationScope",()=>new st)}class $u{constructor(t,n){let r;t?r=t:r=new st;let s;n?s=n:s=new st,this._stack=[{scope:r}],this._isolationScope=s}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(s){throw this._popScope(),s}return fr(r)?r.then(s=>(this._popScope(),s),s=>{throw this._popScope(),s}):(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 Lt(){const e=gn(),t=xs(e);return t.stack=t.stack||new $u(Pu(),Fu())}function Bu(e){return Lt().withScope(e)}function Uu(e,t){const n=Lt();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function vo(e){return Lt().withScope(()=>e(Lt().getIsolationScope()))}function Hu(){return{withIsolationScope:vo,withScope:Bu,withSetScope:Uu,withSetIsolationScope:(e,t)=>vo(t),getCurrentScope:()=>Lt().getScope(),getIsolationScope:()=>Lt().getIsolationScope()}}function mr(e){const t=xs(e);return t.acs?t.acs:Hu()}function ye(){const e=gn();return mr(e).getCurrentScope()}function Ge(){const e=gn();return mr(e).getIsolationScope()}function Gi(){return vs("globalScope",()=>new st)}function zu(...e){const t=gn(),n=mr(t);if(e.length===2){const[r,s]=e;return r?n.withSetScope(r,s):n.withScope(s)}return n.withScope(e[0])}function Z(){return ye().getClient()}const Wu="_sentryMetrics";function ju(e){const t=e[Wu];if(!t)return;const n={};for(const[,[r,s]]of t)(n[r]||(n[r]=[])).push(me(s));return n}const Xi="sentry.source",qu="sentry.sample_rate",Yu="sentry.op",Gu="sentry.origin",Xu=0,Vu=1,Ku=1;function Ju(e){const{spanId:t,traceId:n}=e.spanContext(),{parent_span_id:r}=Pt(e);return me({parent_span_id:r,span_id:t,trace_id:n})}function wo(e){return typeof e=="number"?ko(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?ko(e.getTime()):ze()}function ko(e){return e>9999999999?e/1e3:e}function Pt(e){if(Qu(e))return e.getSpanJSON();try{const{spanId:t,traceId:n}=e.spanContext();if(Zu(e)){const{attributes:r,startTime:s,name:o,endTime:i,parentSpanId:c,status:a}=e;return me({span_id:t,trace_id:n,data:r,description:o,parent_span_id:c,start_timestamp:wo(s),timestamp:wo(i)||void 0,status:tl(a),op:r[Yu],origin:r[Gu],_metrics_summary:ju(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function Zu(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function Qu(e){return typeof e.getSpanJSON=="function"}function el(e){const{traceFlags:t}=e.spanContext();return t===Ku}function tl(e){if(!(!e||e.code===Xu))return e.code===Vu?"ok":e.message||"unknown_error"}const nl="_sentryRootSpan";function Ms(e){return e[nl]||e}function rl(){const e=gn(),t=mr(e);return t.getActiveSpan?t.getActiveSpan():Kr(ye())}const Rs="production",sl="_frozenDsc";function Vi(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},s=me({environment:n.environment||Rs,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",s),s}function ol(e){const t=Z();if(!t)return{};const n=Vi(Pt(e).trace_id||"",t),r=Ms(e),s=r[sl];if(s)return s;const o=r.spanContext().traceState,i=o&&o.get("sentry.dsc"),c=i&&Su(i);if(c)return c;const a=Pt(r),u=a.data||{},d=u[qu];d!=null&&(n.sample_rate=`${d}`);const l=u[Xi],f=a.description;return l!=="url"&&f&&(n.transaction=f),n.sampled=String(el(r)),t.emit("createDsc",n,r),n}function Jr(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){V&&C.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 il(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 al(e,t,n,r){const s=Is(n),o={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:pr(t)}},i="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Yt(o,[i])}function cl(e,t,n,r){const s=Is(n),o=e.type&&e.type!=="replay_event"?e.type:"event";il(e,n&&n.sdk);const i=ji(e,s,r,t);return delete e.sdkProcessingMetadata,Yt(i,[[{type:o},e]])}function Zr(e,t,n,r=0){return new ke((s,o)=>{const i=e[r];if(t===null||typeof i!="function")s(t);else{const c=i({...t},n);V&&i.id&&c===null&&C.log(`Event processor "${i.id}" dropped event`),fr(c)?c.then(a=>Zr(e,a,n,r+1).then(s)).then(null,o):Zr(e,c,n,r+1).then(s).then(null,o)}})}function ul(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:o}=t;ll(e,t),r&&hl(e,r),pl(e,n),dl(e,s),fl(e,o)}function Co(e,t){const{extra:n,tags:r,user:s,contexts:o,level:i,sdkProcessingMetadata:c,breadcrumbs:a,fingerprint:u,eventProcessors:d,attachments:l,propagationContext:f,transactionName:h,span:p}=t;Kt(e,"extra",n),Kt(e,"tags",r),Kt(e,"user",s),Kt(e,"contexts",o),Kt(e,"sdkProcessingMetadata",c),i&&(e.level=i),h&&(e.transactionName=h),p&&(e.span=p),a.length&&(e.breadcrumbs=[...e.breadcrumbs,...a]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),l.length&&(e.attachments=[...e.attachments,...l]),e.propagationContext={...e.propagationContext,...f}}function Kt(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 ll(e,t){const{extra:n,tags:r,user:s,contexts:o,level:i,transactionName:c}=t,a=me(n);a&&Object.keys(a).length&&(e.extra={...a,...e.extra});const u=me(r);u&&Object.keys(u).length&&(e.tags={...u,...e.tags});const d=me(s);d&&Object.keys(d).length&&(e.user={...d,...e.user});const l=me(o);l&&Object.keys(l).length&&(e.contexts={...l,...e.contexts}),i&&(e.level=i),c&&e.type!=="transaction"&&(e.transaction=c)}function dl(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function fl(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function hl(e,t){e.contexts={trace:Ju(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:ol(t),...e.sdkProcessingMetadata};const n=Ms(t),r=Pt(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function pl(e,t){e.fingerprint=e.fingerprint?zi(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function Ki(e,t,n,r,s,o){const{normalizeDepth:i=3,normalizeMaxBreadth:c=1e3}=e,a={...t,event_id:t.event_id||n.event_id||Ee(),timestamp:t.timestamp||_n()},u=n.integrations||e.integrations.map(g=>g.name);ml(a,e),yl(a,u),s&&s.emit("applyFrameMetadata",t),t.type===void 0&&_l(a,e.stackParser);const d=bl(r,n.captureContext);n.mechanism&&on(a,n.mechanism);const l=s?s.getEventProcessors():[],f=Gi().getScopeData();if(o){const g=o.getScopeData();Co(f,g)}if(d){const g=d.getScopeData();Co(f,g)}const h=[...n.attachments||[],...f.attachments];h.length&&(n.attachments=h),ul(a,f);const p=[...l,...f.eventProcessors];return Zr(p,a,n).then(g=>(g&&gl(g),typeof i=="number"&&i>0?Sl(g,i,c):g))}function ml(e,t){const{environment:n,release:r,dist:s,maxValueLength:o=250}=t;"environment"in e||(e.environment="environment"in t?n:Rs),e.release===void 0&&r!==void 0&&(e.release=r),e.dist===void 0&&s!==void 0&&(e.dist=s),e.message&&(e.message=Rt(e.message,o));const i=e.exception&&e.exception.values&&e.exception.values[0];i&&i.value&&(i.value=Rt(i.value,o));const c=e.request;c&&c.url&&(c.url=Rt(c.url,o))}const Io=new WeakMap;function _l(e,t){const n=B._sentryDebugIds;if(!n)return;let r;const s=Io.get(t);s?r=s:(r=new Map,Io.set(t,r));const o=Object.entries(n).reduce((i,[c,a])=>{let u;const d=r.get(c);d?u=d:(u=t(c),r.set(c,u));for(let l=u.length-1;l>=0;l--){const f=u[l];if(f.filename){i[f.filename]=a;break}}return i},{});try{e.exception.values.forEach(i=>{i.stacktrace.frames.forEach(c=>{c.filename&&(c.debug_id=o[c.filename])})})}catch{}}function gl(e){const t={};try{e.exception.values.forEach(r=>{r.stacktrace.frames.forEach(s=>{s.debug_id&&(s.abs_path?t[s.abs_path]=s.debug_id:s.filename&&(t[s.filename]=s.debug_id),delete s.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,s])=>{n.push({type:"sourcemap",code_file:r,debug_id:s})})}function yl(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Sl(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(s=>({...s,...s.data&&{data:De(s.data,t,n)}}))},...e.user&&{user:De(e.user,t,n)},...e.contexts&&{contexts:De(e.contexts,t,n)},...e.extra&&{extra:De(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=De(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(s=>({...s,...s.data&&{data:De(s.data,t,n)}}))),r}function bl(e,t){if(!t)return e;const n=e?e.clone():new st;return n.update(t),n}function El(e){if(e)return vl(e)?{captureContext:e}:kl(e)?{captureContext:e}:e}function vl(e){return e instanceof st||typeof e=="function"}const wl=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function kl(e){return Object.keys(e).some(t=>wl.includes(t))}function Ns(e,t){return ye().captureException(e,El(t))}function Cl(e,t){const n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return ye().captureMessage(e,n,r)}function Ji(e,t){return ye().captureEvent(e,t)}function Il(e,t){Ge().setContext(e,t)}function xl(){return!!Z()}function Tl(e){Ge().addEventProcessor(e)}function xo(e){const t=Z(),n=Ge(),r=ye(),{release:s,environment:o=Rs}=t&&t.getOptions()||{},{userAgent:i}=B.navigator||{},c=Du({release:s,environment:o,user:r.getUser()||n.getUser(),...i&&{userAgent:i},...e}),a=n.getSession();return a&&a.status==="ok"&&Ot(a,{status:"exited"}),Zi(),n.setSession(c),r.setSession(c),c}function Zi(){const e=Ge(),t=ye(),n=t.getSession()||e.getSession();n&&Au(n),Qi(),e.setSession(),t.setSession()}function Qi(){const e=Ge(),t=ye(),n=Z(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function To(e=!1){if(e){Zi();return}Qi()}const Ml="7";function Rl(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Nl(e){return`${Rl(e)}${e.projectId}/envelope/`}function Dl(e,t){return zc({sentry_key:e.publicKey,sentry_version:Ml,...t&&{sentry_client:`${t.name}/${t.version}`}})}function Al(e,t,n){return t||`${Nl(e)}?${Dl(e,n)}`}const Mo=[];function Ol(e){const t={};return e.forEach(n=>{const{name:r}=n,s=t[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function Ll(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(i=>{i.isDefaultInstance=!0});let r;Array.isArray(n)?r=[...t,...n]:typeof n=="function"?r=zi(n(t)):r=t;const s=Ol(r),o=s.findIndex(i=>i.name==="Debug");if(o>-1){const[i]=s.splice(o,1);s.push(i)}return s}function Pl(e,t){const n={};return t.forEach(r=>{r&&ea(e,r,n)}),n}function Ro(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function ea(e,t,n){if(n[t.name]){V&&C.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,Mo.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),Mo.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",(s,o)=>r(s,o,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),s=Object.assign((o,i)=>r(o,i,e),{id:t.name});e.addEventProcessor(s)}V&&C.log(`Integration installed: ${t.name}`)}const No="Not capturing exception because it's already been captured.";class Fl{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=Hc(t.dsn):V&&C.warn("No DSN provided, client will not send events."),this._dsn){const n=Al(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 s=Ee();if(_o(t))return V&&C.log(No),s;const o={event_id:s,...n};return this._process(this.eventFromException(t,o).then(i=>this._captureEvent(i,o,r))),o.event_id}captureMessage(t,n,r,s){const o={event_id:Ee(),...r},i=bs(t)?t:String(t),c=Es(t)?this.eventFromMessage(i,n,o):this.eventFromException(t,o);return this._process(c.then(a=>this._captureEvent(a,o,s))),o.event_id}captureEvent(t,n,r){const s=Ee();if(n&&n.originalException&&_o(n.originalException))return V&&C.log(No),s;const o={event_id:s,...n},c=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,o,c||r)),o.event_id}captureSession(t){typeof t.release!="string"?V&&C.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),Ot(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(s=>r&&s))):qe(!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];ea(this,t,this._integrations),n||Ro(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=cl(t,this._dsn,this._options._metadata,this._options.tunnel);for(const o of n.attachments||[])r=Eu(r,ku(o));const s=this.sendEnvelope(r);s&&s.then(o=>this.emit("afterSendEvent",t,o),null)}sendSession(t){const n=al(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(n)}recordDroppedEvent(t,n,r){if(this._options.sendClientReports){const s=typeof r=="number"?r:1,o=`${t}:${n}`;V&&C.log(`Recording outcome: "${o}"${s>1?` (${s} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+s}}on(t,n){const r=this._hooks[t]=this._hooks[t]||[];return r.push(n),()=>{const s=r.indexOf(n);s>-1&&r.splice(s,1)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(s=>s(...n))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,n=>(V&&C.error("Error while sending event:",n),n)):(V&&C.error("Transport disabled"),qe({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=Pl(this,t),Ro(this,t)}_updateSessionFromEvent(t,n){let r=!1,s=!1;const o=n.exception&&n.exception.values;if(o){s=!0;for(const a of o){const u=a.mechanism;if(u&&u.handled===!1){r=!0;break}}}const i=t.status==="ok";(i&&t.errors===0||i&&r)&&(Ot(t,{...r&&{status:"crashed"},errors:t.errors||Number(s||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new ke(n=>{let r=0;const s=1,o=setInterval(()=>{this._numProcessing==0?(clearInterval(o),n(!0)):(r+=s,t&&r>=t&&(clearInterval(o),n(!1)))},s)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,s=Ge()){const o=this.getOptions(),i=Object.keys(this._integrations);return!n.integrations&&i.length>0&&(n.integrations=i),this.emit("preprocessEvent",t,n),t.type||s.setLastEventId(t.event_id||n.event_id),Ki(o,t,n,r,this,s).then(c=>{if(c===null)return c;const a={...s.getPropagationContext(),...r?r.getPropagationContext():void 0};if(!(c.contexts&&c.contexts.trace)&&a){const{traceId:d,spanId:l,parentSpanId:f,dsc:h}=a;c.contexts={trace:me({trace_id:d,span_id:l,parent_span_id:f}),...c.contexts};const p=h||Vi(d,this);c.sdkProcessingMetadata={dynamicSamplingContext:p,...c.sdkProcessingMetadata}}return c})}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then(s=>s.event_id,s=>{if(V){const o=s;o.logLevel==="log"?C.log(o.message):C.warn(o)}})}_processEvent(t,n,r){const s=this.getOptions(),{sampleRate:o}=s,i=na(t),c=ta(t),a=t.type||"error",u=`before send for type \`${a}\``,d=typeof o>"u"?void 0:Jr(o);if(c&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error",t),Jn(new Ae(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));const l=a==="replay_event"?"replay":a,h=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,n,r,h).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",l,t),new Ae("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return p;const g=Bl(this,s,p,n);return $l(g,u)}).then(p=>{if(p===null){if(this.recordDroppedEvent("before_send",l,t),i){const v=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",v)}throw new Ae(`${u} returned \`null\`, will not send event.`,"log")}const y=r&&r.getSession();if(!i&&y&&this._updateSessionFromEvent(y,p),i){const _=p.sdkProcessingMetadata&&p.sdkProcessingMetadata.spanCountBeforeProcessing||0,v=p.spans?p.spans.length:0,x=_-v;x>0&&this.recordDroppedEvent("before_send","span",x)}const g=p.transaction_info;if(i&&g&&p.transaction!==t.transaction){const _="custom";p.transaction_info={...g,source:_}}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[s,o]=n.split(":");return{reason:s,category:o,quantity:r}})}_flushOutcomes(){V&&C.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){V&&C.log("No outcomes to send");return}if(!this._dsn){V&&C.log("No dsn provided, will not send outcomes");return}V&&C.log("Sending outcomes:",t);const n=Iu(t,this._options.tunnel&&pr(this._dsn));this.sendEnvelope(n)}}function $l(e,t){const n=`${t} must return \`null\` or a valid event.`;if(fr(e))return e.then(r=>{if(!At(r)&&r!==null)throw new Ae(n);return r},r=>{throw new Ae(`${t} rejected with ${r}`)});if(!At(e)&&e!==null)throw new Ae(n);return e}function Bl(e,t,n,r){const{beforeSend:s,beforeSendTransaction:o,beforeSendSpan:i}=t;if(ta(n)&&s)return s(n,r);if(na(n)){if(n.spans&&i){const c=[];for(const a of n.spans){const u=i(a);u?c.push(u):e.recordDroppedEvent("before_send","span")}n.spans=c}if(o){if(n.spans){const c=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:c}}return o(n,r)}}return n}function ta(e){return e.type===void 0}function na(e){return e.type==="transaction"}function Ul(e,t){t.debug===!0&&(V?C.enable():qt(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),ye().update(t.initialScope);const r=new e(t);return Hl(r),r.init(),r}function Hl(e){ye().setClient(e)}const zl=64;function Wl(e,t,n=pu(e.bufferSize||zl)){let r={};const s=i=>n.drain(i);function o(i){const c=[];if(yo(i,(l,f)=>{const h=So(f);if(qi(r,h)){const p=Do(l,f);e.recordDroppedEvent("ratelimit_backoff",h,p)}else c.push(l)}),c.length===0)return qe({});const a=Yt(i[0],c),u=l=>{yo(a,(f,h)=>{const p=Do(f,h);e.recordDroppedEvent(l,So(h),p)})},d=()=>t({body:vu(a)}).then(l=>(l.statusCode!==void 0&&(l.statusCode<200||l.statusCode>=300)&&V&&C.warn(`Sentry responded with status code ${l.statusCode} to sent event.`),r=Yi(r,l),l),l=>{throw u("network_error"),l});return n.add(d).then(l=>l,l=>{if(l instanceof Ae)return V&&C.error("Skipped sending event because buffer is full."),u("queue_overflow"),qe({});throw l})}return{send:o,flush:s}}function Do(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function jl(e,t){const n=t&&t.getDsn(),r=t&&t.getOptions().tunnel;return Yl(e,n)||ql(e,r)}function ql(e,t){return t?Ao(e)===Ao(t):!1}function Yl(e,t){return t?e.includes(t.host):!1}function Ao(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function Gl(e,t,n=[t],r="npm"){const s=e._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${t}`,packages:n.map(o=>({name:`${r}:@sentry/${o}`,version:nt})),version:nt}),e._metadata=s}const Xl=100;function ot(e,t){const n=Z(),r=Ge();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:o=Xl}=n.getOptions();if(o<=0)return;const c={timestamp:_n(),...e},a=s?qt(()=>s(c,t)):c;a!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",a,t),r.addBreadcrumb(a,o))}let Oo;const Vl="FunctionToString",Lo=new WeakMap,Kl=()=>({name:Vl,setupOnce(){Oo=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Cs(this),n=Lo.has(Z())&&t!==void 0?t:this;return Oo.apply(n,e)}}catch{}},setup(e){Lo.set(e,!0)}}),Jl=Kl,Zl=[/^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"],Ql="InboundFilters",ed=(e={})=>({name:Ql,processEvent(t,n,r){const s=r.getOptions(),o=nd(e,s);return rd(t,o)?null:t}}),td=ed;function nd(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Zl],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function rd(e,t){return t.ignoreInternal&&ud(e)?(V&&C.warn(`Event dropped due to being internal Sentry Error.
|
|
9
|
+
Event: ${Ke(e)}`),!0):sd(e,t.ignoreErrors)?(V&&C.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
10
|
+
Event: ${Ke(e)}`),!0):dd(e)?(V&&C.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
11
|
+
Event: ${Ke(e)}`),!0):od(e,t.ignoreTransactions)?(V&&C.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
12
|
+
Event: ${Ke(e)}`),!0):id(e,t.denyUrls)?(V&&C.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
13
|
+
Event: ${Ke(e)}.
|
|
14
|
+
Url: ${Zn(e)}`),!0):ad(e,t.allowUrls)?!1:(V&&C.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
15
|
+
Event: ${Ke(e)}.
|
|
16
|
+
Url: ${Zn(e)}`),!0)}function sd(e,t){return e.type||!t||!t.length?!1:cd(e).some(n=>pn(n,t))}function od(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const n=e.transaction;return n?pn(n,t):!1}function id(e,t){if(!t||!t.length)return!1;const n=Zn(e);return n?pn(n,t):!1}function ad(e,t){if(!t||!t.length)return!0;const n=Zn(e);return n?pn(n,t):!0}function cd(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 ud(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function ld(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 Zn(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?ld(t):null}catch{return V&&C.error(`Cannot extract url for event ${Ke(e)}`),null}}function dd(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 fd="Dedupe",hd=()=>{let e;return{name:fd,processEvent(t){if(t.type)return t;try{if(md(t,e))return V&&C.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},pd=hd;function md(e,t){return t?!!(_d(e,t)||gd(e,t)):!1}function _d(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!sa(e,t)||!ra(e,t))}function gd(e,t){const n=Po(t),r=Po(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!sa(e,t)||!ra(e,t))}function ra(e,t){let n=ho(e),r=ho(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s<r.length;s++){const o=r[s],i=n[s];if(o.filename!==i.filename||o.lineno!==i.lineno||o.colno!==i.colno||o.function!==i.function)return!1}return!0}function sa(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 Po(e){return e.exception&&e.exception.values&&e.exception.values[0]}function oa(e,t={},n=ye()){const{message:r,name:s,email:o,url:i,source:c,associatedEventId:a,tags:u}=e,d={contexts:{feedback:me({contact_email:o,name:s,message:r,url:i,source:c,associated_event_id:a})},type:"feedback",level:"info",tags:u},l=n&&n.getClient()||Z();return l&&l.emit("beforeSendFeedback",d,t),n.captureEvent(d,t)}const Y=B;let Qr=0;function ia(){return Qr>0}function yd(){Qr++,setTimeout(()=>{Qr--})}function Ft(e,t={},n){if(typeof e!="function")return e;try{const s=e.__sentry_wrapped__;if(s)return s;if(Cs(e))return e}catch{return e}const r=function(){const s=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);const o=s.map(i=>Ft(i,t));return e.apply(this,o)}catch(o){throw yd(),zu(i=>{i.addEventProcessor(c=>(t.mechanism&&(Yr(c,void 0,void 0),on(c,t.mechanism)),c.extra={...c.extra,arguments:s},c)),Ns(o)}),o}};try{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}Li(r,e),ht(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}const yn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Ds(e,t){const n=As(e,t),r={type:t&&t.name,value:wd(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Sd(e,t,n,r){const s=Z(),o=s&&s.getOptions().normalizeDepth,i=Td(t),c={__serialized__:Wi(t,o)};if(i)return{exception:{values:[Ds(e,i)]},extra:c};const a={exception:{values:[{type:dr(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Id(t,{isUnhandledRejection:r})}]},extra:c};if(n){const u=As(e,n);u.length&&(a.exception.values[0].stacktrace={frames:u})}return a}function Tr(e,t){return{exception:{values:[Ds(e,t)]}}}function As(e,t){const n=t.stacktrace||t.stack||"",r=Ed(t),s=vd(t);try{return e(n,r,s)}catch{}return[]}const bd=/Minified React error #\d+;/i;function Ed(e){return e&&bd.test(e.message)?1:0}function vd(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function wd(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function kd(e,t,n,r){const s=n&&n.syntheticException||void 0,o=Os(e,t,s,r);return on(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),qe(o)}function Cd(e,t,n="info",r,s){const o=r&&r.syntheticException||void 0,i=es(e,t,o,s);return i.level=n,r&&r.event_id&&(i.event_id=r.event_id),qe(i)}function Os(e,t,n,r,s){let o;if(Di(t)&&t.error)return Tr(e,t.error);if(so(t)||Cc(t)){const i=t;if("stack"in t)o=Tr(e,t);else{const c=i.name||(so(i)?"DOMError":"DOMException"),a=i.message?`${c}: ${i.message}`:c;o=es(e,a,n,r),Yr(o,a)}return"code"in i&&(o.tags={...o.tags,"DOMException.code":`${i.code}`}),o}return Ss(t)?Tr(e,t):At(t)||dr(t)?(o=Sd(e,t,n,s),on(o,{synthetic:!0}),o):(o=es(e,t,n,r),Yr(o,`${t}`,void 0),on(o,{synthetic:!0}),o)}function es(e,t,n,r){const s={};if(r&&n){const o=As(e,n);o.length&&(s.exception={values:[{value:t,stacktrace:{frames:o}}]})}if(bs(t)){const{__sentry_template_string__:o,__sentry_template_values__:i}=t;return s.logentry={message:o,params:i},s}return s.message=t,s}function Id(e,{isUnhandledRejection:t}){const n=Wc(e),r=t?"promise rejection":"exception";return Di(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:dr(e)?`Event \`${xd(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function xd(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Td(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}function Md(e,{metadata:t,tunnel:n,dsn:r}){const s={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:pr(r)}},o=Rd(e);return Yt(s,[o])}function Rd(e){return[{type:"user_report"},e]}class Nd extends Fl{constructor(t){const n={parentSpanIsAlwaysRootSpan:!0,...t},r=Y.SENTRY_SDK_SOURCE||iu();Gl(n,"browser",["browser"],r),super(n),n.sendClientReports&&Y.document&&Y.document.addEventListener("visibilitychange",()=>{Y.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return kd(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return Cd(this._options.stackParser,t,n,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){yn&&C.warn("SDK not enabled, will not capture user feedback.");return}const n=Md(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__,Dd=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",Sn=(e,t,n,r)=>{let s,o;return i=>{t.value>=0&&(i||r)&&(o=t.value-(s||0),(o||s===void 0)&&(s=t.value,t.delta=o,t.rating=Dd(t.value,n),e(t)))}},W=B,Ad=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,ca=()=>W.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],Ls=()=>{const e=ca();return e&&e.activationStart||0},bn=(e,t)=>{const n=ca();let r="navigate";return n&&(W.document&&W.document.prerendering||Ls()>0?r="prerender":W.document&&W.document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:Ad(),navigationType:r}},gt=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(s=>{Promise.resolve().then(()=>{t(s.getEntries())})});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},_r=e=>{const t=n=>{(n.type==="pagehide"||W.document&&W.document.visibilityState==="hidden")&&e(n)};W.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},Ps=e=>{let t=!1;return n=>{t||(e(n),t=!0)}};let an=-1;const Od=()=>{an=W.document.visibilityState==="hidden"&&!W.document.prerendering?0:1/0},Qn=e=>{W.document.visibilityState==="hidden"&&an>-1&&(an=e.type==="visibilitychange"?e.timeStamp:0,removeEventListener("visibilitychange",Qn,!0),removeEventListener("prerenderingchange",Qn,!0))},Ld=()=>{addEventListener("visibilitychange",Qn,!0),addEventListener("prerenderingchange",Qn,!0)},Fs=()=>(W.document&&an<0&&(Od(),Ld()),{get firstHiddenTime(){return an}}),gr=e=>{W.document&&W.document.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},Pd=[1800,3e3],Fd=(e,t={})=>{gr(()=>{const n=Fs(),r=bn("FCP");let s;const i=gt("paint",c=>{c.forEach(a=>{a.name==="first-contentful-paint"&&(i.disconnect(),a.startTime<n.firstHiddenTime&&(r.value=Math.max(a.startTime-Ls(),0),r.entries.push(a),s(!0)))})});i&&(s=Sn(e,r,Pd,t.reportAllChanges))})},$d=[.1,.25],Bd=(e,t={})=>{Fd(Ps(()=>{const n=bn("CLS",0);let r,s=0,o=[];const i=a=>{a.forEach(u=>{if(!u.hadRecentInput){const d=o[0],l=o[o.length-1];s&&d&&l&&u.startTime-l.startTime<1e3&&u.startTime-d.startTime<5e3?(s+=u.value,o.push(u)):(s=u.value,o=[u])}}),s>n.value&&(n.value=s,n.entries=o,r())},c=gt("layout-shift",i);c&&(r=Sn(e,n,$d,t.reportAllChanges),_r(()=>{i(c.takeRecords()),r(!0)}),setTimeout(r,0))}))},Ud=[100,300],Hd=(e,t={})=>{gr(()=>{const n=Fs(),r=bn("FID");let s;const o=a=>{a.startTime<n.firstHiddenTime&&(r.value=a.processingStart-a.startTime,r.entries.push(a),s(!0))},i=a=>{a.forEach(o)},c=gt("first-input",i);s=Sn(e,r,Ud,t.reportAllChanges),c&&_r(Ps(()=>{i(c.takeRecords()),c.disconnect()}))})};let ua=0,Mr=1/0,Rn=0;const zd=e=>{e.forEach(t=>{t.interactionId&&(Mr=Math.min(Mr,t.interactionId),Rn=Math.max(Rn,t.interactionId),ua=Rn?(Rn-Mr)/7+1:0)})};let ts;const Wd=()=>ts?ua:performance.interactionCount||0,jd=()=>{"interactionCount"in performance||ts||(ts=gt("event",zd,{type:"event",buffered:!0,durationThreshold:0}))},qd=[200,500],Yd=0,la=()=>Wd()-Yd,Fo=10,Ue=[],Rr={},$o=e=>{const t=Ue[Ue.length-1],n=Rr[e.interactionId];if(n||Ue.length<Fo||t&&e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{const r={id:e.interactionId,latency:e.duration,entries:[e]};Rr[r.id]=r,Ue.push(r)}Ue.sort((r,s)=>s.latency-r.latency),Ue.splice(Fo).forEach(r=>{delete Rr[r.id]})}},Gd=()=>{const e=Math.min(Ue.length-1,Math.floor(la()/50));return Ue[e]},Xd=(e,t={})=>{gr(()=>{jd();const n=bn("INP");let r;const s=i=>{i.forEach(a=>{a.interactionId&&$o(a),a.entryType==="first-input"&&!Ue.some(d=>d.entries.some(l=>a.duration===l.duration&&a.startTime===l.startTime))&&$o(a)});const c=Gd();c&&c.latency!==n.value&&(n.value=c.latency,n.entries=c.entries,r())},o=gt("event",s,{durationThreshold:t.durationThreshold!=null?t.durationThreshold:40});r=Sn(e,n,qd,t.reportAllChanges),o&&("PerformanceEventTiming"in W&&"interactionId"in PerformanceEventTiming.prototype&&o.observe({type:"first-input",buffered:!0}),_r(()=>{s(o.takeRecords()),n.value<0&&la()>0&&(n.value=0,n.entries=[]),r(!0)}))})},Vd=[2500,4e3],Bo={},Kd=(e,t={})=>{gr(()=>{const n=Fs(),r=bn("LCP");let s;const o=c=>{const a=c[c.length-1];a&&a.startTime<n.firstHiddenTime&&(r.value=Math.max(a.startTime-Ls(),0),r.entries=[a],s())},i=gt("largest-contentful-paint",o);if(i){s=Sn(e,r,Vd,t.reportAllChanges);const c=Ps(()=>{Bo[r.id]||(o(i.takeRecords()),i.disconnect(),Bo[r.id]=!0,s(!0))});["keydown","click"].forEach(a=>{W.document&&addEventListener(a,()=>setTimeout(c,0),!0)}),_r(c)}})},tn={},er={};let da,fa,ha,pa;function Jd(e,t=!1){return yr("cls",e,nf,da,t)}function Zd(e,t=!1){return yr("lcp",e,sf,ha,t)}function Qd(e){return yr("fid",e,rf,fa)}function ef(e){return yr("inp",e,of,pa)}function tf(e,t){return ma(e,t),er[e]||(af(e),er[e]=!0),_a(e,t)}function En(e,t){const n=tn[e];if(!(!n||!n.length))for(const r of n)try{r(t)}catch(s){aa&&C.error(`Error while triggering instrumentation handler.
|
|
17
|
+
Type: ${e}
|
|
18
|
+
Name: ${je(r)}
|
|
19
|
+
Error:`,s)}}function nf(){return Bd(e=>{En("cls",{metric:e}),da=e},{reportAllChanges:!0})}function rf(){return Hd(e=>{En("fid",{metric:e}),fa=e})}function sf(){return Kd(e=>{En("lcp",{metric:e}),ha=e},{reportAllChanges:!0})}function of(){return Xd(e=>{En("inp",{metric:e}),pa=e})}function yr(e,t,n,r,s=!1){ma(e,t);let o;return er[e]||(o=n(),er[e]=!0),r&&t({metric:r}),_a(e,t,s?o:void 0)}function af(e){const t={};e==="event"&&(t.durationThreshold=0),gt(e,n=>{En(e,{entries:n})},t)}function ma(e,t){tn[e]=tn[e]||[],tn[e].push(t)}function _a(e,t,n){return()=>{n&&n();const r=tn[e];if(!r)return;const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}const cf=1e3;let Uo,ns,rs;function ga(e){const t="dom";mt(t,e),_t(t,uf)}function uf(){if(!W.document)return;const e=Re.bind(null,"dom"),t=Ho(e,!0);W.document.addEventListener("click",t,!1),W.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const r=W[n]&&W[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(ge(r,"addEventListener",function(s){return function(o,i,c){if(o==="click"||o=="keypress")try{const a=this,u=a.__sentry_instrumentation_handlers__=a.__sentry_instrumentation_handlers__||{},d=u[o]=u[o]||{refCount:0};if(!d.handler){const l=Ho(e);d.handler=l,s.call(this,o,l,c)}d.refCount++}catch{}return s.call(this,o,i,c)}}),ge(r,"removeEventListener",function(s){return function(o,i,c){if(o==="click"||o=="keypress")try{const a=this,u=a.__sentry_instrumentation_handlers__||{},d=u[o];d&&(d.refCount--,d.refCount<=0&&(s.call(this,o,d.handler,c),d.handler=void 0,delete u[o]),Object.keys(u).length===0&&delete a.__sentry_instrumentation_handlers__)}catch{}return s.call(this,o,i,c)}}))})}function lf(e){if(e.type!==ns)return!1;try{if(!e.target||e.target._sentryId!==rs)return!1}catch{}return!0}function df(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function Ho(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=ff(n);if(df(n.type,r))return;ht(n,"_sentryCaptured",!0),r&&!r._sentryId&&ht(r,"_sentryId",Ee());const s=n.type==="keypress"?"input":n.type;lf(n)||(e({event:n,name:s,global:t}),ns=n.type,rs=r?r._sentryId:void 0),clearTimeout(Uo),Uo=W.setTimeout(()=>{rs=void 0,ns=void 0},cf)}}function ff(e){try{return e.target}catch{return null}}let Nn;function $s(e){const t="history";mt(t,e),_t(t,hf)}function hf(){if(!Nu())return;const e=W.onpopstate;W.onpopstate=function(...n){const r=W.location.href,s=Nn;if(Nn=r,Re("history",{from:s,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){const s=r.length>2?r[2]:void 0;if(s){const o=Nn,i=String(s);Nn=i,Re("history",{from:o,to:i})}return n.apply(this,r)}}ge(W.history,"pushState",t),ge(W.history,"replaceState",t)}const zn={};function ya(e){const t=zn[e];if(t)return t;let n=W[e];if(Wr(n))return zn[e]=n.bind(W);const r=W.document;if(r&&typeof r.createElement=="function")try{const s=r.createElement("iframe");s.hidden=!0,r.head.appendChild(s);const o=s.contentWindow;o&&o[e]&&(n=o[e]),r.head.removeChild(s)}catch(s){aa&&C.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,s)}return n&&(zn[e]=n.bind(W))}function zo(e){zn[e]=void 0}function $t(...e){return ya("setTimeout")(...e)}const Ct="__sentry_xhr_v3__";function pf(e){const t="xhr";mt(t,e),_t(t,mf)}function mf(){if(!W.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const s=ze()*1e3,o=He(r[0])?r[0].toUpperCase():void 0,i=_f(r[1]);if(!o||!i)return t.apply(n,r);n[Ct]={method:o,url:i,request_headers:{}},o==="POST"&&i.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const c=()=>{const a=n[Ct];if(a&&n.readyState===4){try{a.status_code=n.status}catch{}const u={endTimestamp:ze()*1e3,startTimestamp:s,xhr:n};Re("xhr",u)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(a,u,d){return c(),a.apply(u,d)}}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(a,u,d){const[l,f]=d,h=u[Ct];return h&&He(l)&&He(f)&&(h.request_headers[l.toLowerCase()]=f),a.apply(u,d)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const s=n[Ct];if(!s)return t.apply(n,r);r[0]!==void 0&&(s.body=r[0]);const o={startTimestamp:ze()*1e3,xhr:n};return Re("xhr",o),t.apply(n,r)}})}function _f(e){if(He(e))return e;try{return e.toString()}catch{}}function gf(e,t=ya("fetch")){let n=0,r=0;function s(o){const i=o.body.length;n+=i,r++;const c={body:o.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return zo("fetch"),Jn("No fetch implementation available");try{return t(e.url,c).then(a=>(n-=i,r--,{statusCode:a.status,headers:{"x-sentry-rate-limits":a.headers.get("X-Sentry-Rate-Limits"),"retry-after":a.headers.get("Retry-After")}}))}catch(a){return zo("fetch"),n-=i,r--,Jn(a)}}return Wl(e,s)}const yf=30,Sf=50;function ss(e,t,n,r){const s={filename:e,function:t==="<anonymous>"?pt:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const bf=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Ef=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,vf=/\((\S*)(?::(\d+))(?::(\d+))\)/,wf=e=>{const t=bf.exec(e);if(t){const[,r,s,o]=t;return ss(r,pt,+s,+o)}const n=Ef.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){const i=vf.exec(n[2]);i&&(n[2]=i[1],n[3]=i[2],n[4]=i[3])}const[s,o]=Sa(n[1]||pt,n[2]);return ss(o,s,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},kf=[yf,wf],Cf=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,If=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,xf=e=>{const t=Cf.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const o=If.exec(t[3]);o&&(t[1]=t[1]||"eval",t[3]=o[1],t[4]=o[2],t[5]="")}let r=t[3],s=t[1]||pt;return[s,r]=Sa(s,r),ss(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},Tf=[Sf,xf],Mf=[kf,Tf],Rf=$i(...Mf),Sa=(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]:pt,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Dn=1024,Nf="Breadcrumbs",Df=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Nf,setup(n){t.console&&Gc(Pf(n)),t.dom&&ga(Lf(n,t.dom)),t.xhr&&pf(Ff(n)),t.fetch&&Zc($f(n)),t.history&&$s(Bf(n)),t.sentry&&n.on("beforeSendEvent",Of(n))}}},Af=Df;function Of(e){return function(n){Z()===e&&ot({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:Ke(n)},{event:n})}}function Lf(e,t){return function(r){if(Z()!==e)return;let s,o,i=typeof t=="object"?t.serializeAttribute:void 0,c=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;c&&c>Dn&&(yn&&C.warn(`\`dom.maxStringLength\` cannot exceed ${Dn}, but a value of ${c} was configured. Sentry will use ${Dn} instead.`),c=Dn),typeof i=="string"&&(i=[i]);try{const u=r.event,d=Uf(u)?u.target:u;s=hr(d,{keyAttrs:i,maxStringLength:c}),o=Oc(d)}catch{s="<unknown>"}if(s.length===0)return;const a={category:`ui.${r.name}`,message:s};o&&(a.data={"ui.component_name":o}),ot(a,{event:r.event,name:r.name,global:r.global})}}function Pf(e){return function(n){if(Z()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:_u(n.level),message:oo(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${oo(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;ot(r,{input:n.args,level:n.level})}}function Ff(e){return function(n){if(Z()!==e)return;const{startTimestamp:r,endTimestamp:s}=n,o=n.xhr[Ct];if(!r||!s||!o)return;const{method:i,url:c,status_code:a,body:u}=o,d={method:i,url:c,status_code:a},l={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s};ot({category:"xhr",data:d,type:"http"},l)}}function $f(e){return function(n){if(Z()!==e)return;const{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const o=n.fetchData,i={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s};ot({category:"fetch",data:o,level:"error",type:"http"},i)}else{const o=n.response,i={...n.fetchData,status_code:o&&o.status},c={input:n.args,response:o,startTimestamp:r,endTimestamp:s};ot({category:"fetch",data:i,type:"http"},c)}}}function Bf(e){return function(n){if(Z()!==e)return;let r=n.from,s=n.to;const o=xr(Y.location.href);let i=r?xr(r):void 0;const c=xr(s);(!i||!i.path)&&(i=o),o.protocol===c.protocol&&o.host===c.host&&(s=c.relative),o.protocol===i.protocol&&o.host===i.host&&(r=i.relative),ot({category:"navigation",data:{from:r,to:s}})}}function Uf(e){return!!e&&!!e.target}const Hf=["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"],zf="BrowserApiErrors",Wf=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:zf,setupOnce(){t.setTimeout&&ge(Y,"setTimeout",Wo),t.setInterval&&ge(Y,"setInterval",Wo),t.requestAnimationFrame&&ge(Y,"requestAnimationFrame",qf),t.XMLHttpRequest&&"XMLHttpRequest"in Y&&ge(XMLHttpRequest.prototype,"send",Yf);const n=t.eventTarget;n&&(Array.isArray(n)?n:Hf).forEach(Gf)}}},jf=Wf;function Wo(e){return function(...t){const n=t[0];return t[0]=Ft(n,{mechanism:{data:{function:je(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function qf(e){return function(t){return e.apply(this,[Ft(t,{mechanism:{data:{function:"requestAnimationFrame",handler:je(e)},handled:!1,type:"instrument"}})])}}function Yf(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&ge(n,s,function(o){const i={mechanism:{data:{function:s,handler:je(o)},handled:!1,type:"instrument"}},c=Cs(o);return c&&(i.mechanism.data.handler=je(c)),Ft(o,i)})}),e.apply(this,t)}}function Gf(e){const t=Y,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(ge(n,"addEventListener",function(r){return function(s,o,i){try{typeof o.handleEvent=="function"&&(o.handleEvent=Ft(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:je(o),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[s,Ft(o,{mechanism:{data:{function:"addEventListener",handler:je(o),target:e},handled:!1,type:"instrument"}}),i])}}),ge(n,"removeEventListener",function(r){return function(s,o,i){const c=o;try{const a=c&&c.__sentry_wrapped__;a&&r.call(this,s,a,i)}catch{}return r.call(this,s,c,i)}}))}const Xf="GlobalHandlers",Vf=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:Xf,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(Jf(n),jo("onerror")),t.onunhandledrejection&&(Zf(n),jo("onunhandledrejection"))}}},Kf=Vf;function Jf(e){tu(t=>{const{stackParser:n,attachStacktrace:r}=ba();if(Z()!==e||ia())return;const{msg:s,url:o,line:i,column:c,error:a}=t,u=th(Os(n,a||s,void 0,r,!1),o,i,c);u.level="error",Ji(u,{originalException:a,mechanism:{handled:!1,type:"onerror"}})})}function Zf(e){ru(t=>{const{stackParser:n,attachStacktrace:r}=ba();if(Z()!==e||ia())return;const s=Qf(t),o=Es(s)?eh(s):Os(n,s,void 0,r,!0);o.level="error",Ji(o,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function Qf(e){if(Es(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 eh(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function th(e,t,n,r){const s=e.exception=e.exception||{},o=s.values=s.values||[],i=o[0]=o[0]||{},c=i.stacktrace=i.stacktrace||{},a=c.frames=c.frames||[],u=isNaN(parseInt(r,10))?void 0:r,d=isNaN(parseInt(n,10))?void 0:n,l=He(t)&&t.length>0?t:ks();return a.length===0&&a.push({colno:u,filename:l,function:pt,in_app:!0,lineno:d}),e}function jo(e){yn&&C.log(`Global Handler attached: ${e}`)}function ba(){const e=Z();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const nh=()=>({name:"HttpContext",preprocessEvent(e){if(!Y.navigator&&!Y.location&&!Y.document)return;const t=e.request&&e.request.url||Y.location&&Y.location.href,{referrer:n}=Y.document||{},{userAgent:r}=Y.navigator||{},s={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},o={...e.request,...t&&{url:t},headers:s};e.request=o}}),rh="cause",sh=5,oh="LinkedErrors",ih=(e={})=>{const t=e.limit||sh,n=e.key||rh;return{name:oh,preprocessEvent(r,s,o){const i=o.getOptions();Rc(Ds,i.stackParser,i.maxValueLength,n,t,r,s)}}},ah=ih;function ch(e){return[td(),Jl(),jf(),Af(),Kf(),ah(),pd(),nh()]}function uh(e={}){const t={defaultIntegrations:ch(),release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:Y.SENTRY_RELEASE&&Y.SENTRY_RELEASE.id?Y.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return e.defaultIntegrations==null&&delete e.defaultIntegrations,{...t,...e}}function lh(){const e=typeof Y.window<"u"&&Y;if(!e)return!1;const t=e.chrome?"chrome":"browser",n=e[t],r=n&&n.runtime&&n.runtime.id,s=Y.location&&Y.location.href||"",o=["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"],i=!!r&&Y===Y.top&&o.some(a=>s.startsWith(`${a}//`)),c=typeof e.nw<"u";return!!r&&!i&&!c}function dh(e={}){const t=uh(e);if(lh()){qt(()=>{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}yn&&(Bi()||C.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:qc(t.stackParser||Rf),integrations:Ll(t),transport:t.transport||gf},r=Ul(Nd,n);return t.autoSessionTracking&&fh(),r}function fh(){if(typeof Y.document>"u"){yn&&C.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}xo({ignoreDuration:!0}),To(),$s(({from:e,to:t})=>{e!==void 0&&e!==t&&(xo({ignoreDuration:!0}),To())})}const hh={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"},qo=Y;async function ph(e,t){const n=hh[e],r=qo.Sentry=qo.Sentry||{};if(!n)throw new Error(`Cannot lazy load integration: ${e}`);const s=r[e];if(typeof s=="function"&&!("_isShim"in s))return s;const o=mh(n),i=Y.document.createElement("script");i.src=o,i.crossOrigin="anonymous",i.referrerPolicy="origin",t&&i.setAttribute("nonce",t);const c=new Promise((u,d)=>{i.addEventListener("load",()=>u()),i.addEventListener("error",d)});Y.document.body.appendChild(i);try{await c}catch{throw new Error(`Error when loading integration: ${e}`)}const a=r[e];if(typeof a!="function")throw new Error(`Could not load integration: ${e}`);return a}function mh(e){const t=Z(),n=t&&t.getOptions(),r=n&&n.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${nt}/${e}.min.js`,r).toString()}const ee=B,Bs="sentryReplaySession",_h="replay_event",Us="Unable to send Replay",gh=3e5,yh=9e5,Sh=5e3,bh=5500,Eh=6e4,vh=5e3,wh=3,Yo=15e4,An=5e3,kh=3e3,Ch=300,Hs=2e7,Ih=4999,xh=15e3,Go=36e5;function os(e,t){return e??t()}function cn(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=o(n)):(s==="call"||s==="optionalCall")&&(n=o((...i)=>n.call(t,...i)),t=void 0)}return n}var le;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(le||(le={}));function Th(e){return e.nodeType===e.ELEMENT_NODE}function nn(e){const t=cn([e,"optionalAccess",n=>n.host]);return cn([t,"optionalAccess",n=>n.shadowRoot])===e}function rn(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Mh(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e}function Rh(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function tr(e){try{const t=e.rules||e.cssRules;return t?Mh(Array.from(t,Ea).join("")):null}catch{return null}}function Ea(e){let t;if(Dh(e))try{t=tr(e.styleSheet)||Rh(e)}catch{}else if(Ah(e)&&e.selectorText.includes(":"))return Nh(e.cssText);return t||e.cssText}function Nh(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function Dh(e){return"styleSheet"in e}function Ah(e){return"selectorText"in e}class va{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){if(!t)return-1;const n=cn([this,"access",r=>r.getMeta,"call",r=>r(t),"optionalAccess",r=>r.id]);return os(n,()=>-1)}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(n,s)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Oh(){return new va}function Sr({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function un({isMasked:e,element:t,value:n,maskInputFn:r}){let s=n||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function Bt(e){return e.toLowerCase()}function is(e){return e.toUpperCase()}const Xo="__rrweb_original__";function Lh(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let s=0;s<e.height;s+=n){const o=t.getImageData,i=Xo in o?o[Xo]:o;if(new Uint32Array(i.call(t,r,s,Math.min(n,e.width-r),Math.min(n,e.height-s)).data.buffer).some(a=>a!==0))return!1}return!0}function zs(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Bt(t):null}function nr(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function wa(e,t){let n;try{n=new URL(e,os(t,()=>window.location.href))}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i,s=n.pathname.match(r);return os(cn([s,"optionalAccess",o=>o[1]]),()=>null)}const Vo={};function ka(e){const t=Vo[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const o=s.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(s)}catch{}return Vo[e]=r.bind(window)}function as(...e){return ka("setTimeout")(...e)}function Ca(...e){return ka("clearTimeout")(...e)}let Ph=1;const Fh=new RegExp("[^a-z0-9-_:]"),ln=-2;function Ws(){return Ph++}function $h(e){if(e instanceof HTMLFormElement)return"form";const t=Bt(e.tagName);return Fh.test(t)?"div":t}function Bh(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let vt,Ko;const Uh=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Hh=/^(?:[a-z+]+:)?\/\//i,zh=/^www\..*/i,Wh=/^(data:)([^,]*),(.*)/i;function rr(e,t){return(e||"").replace(Uh,(n,r,s,o,i,c)=>{const a=s||i||c,u=r||o||"";if(!a)return n;if(Hh.test(a)||zh.test(a))return`url(${u}${a}${u})`;if(Wh.test(a))return`url(${u}${a}${u})`;if(a[0]==="/")return`url(${u}${Bh(t)+a}${u})`;const d=t.split("/"),l=a.split("/");d.pop();for(const f of l)f!=="."&&(f===".."?d.pop():d.push(f));return`url(${u}${d.join("/")}${u})`})}const jh=/^[^ \t\n\r\u000c]+/,qh=/^[, \t\n\r\u000c]+/;function Yh(e,t){if(t.trim()==="")return t;let n=0;function r(o){let i;const c=o.exec(t.substring(n));return c?(i=c[0],n+=i.length,i):""}const s=[];for(;r(qh),!(n>=t.length);){let o=r(jh);if(o.slice(-1)===",")o=It(e,o.substring(0,o.length-1)),s.push(o);else{let i="";o=It(e,o);let c=!1;for(;;){const a=t.charAt(n);if(a===""){s.push((o+i).trim());break}else if(c)a===")"&&(c=!1);else if(a===","){n+=1,s.push((o+i).trim());break}else a==="("&&(c=!0);i+=a,n+=1}}}return s.join(", ")}function It(e,t){if(!t||t.trim()==="")return t;const n=e.createElement("a");return n.href=t,n.href}function Gh(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function js(){const e=document.createElement("a");return e.href="",e.href}function Ia(e,t,n,r,s,o){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?It(e,r):n==="srcset"?Yh(e,r):n==="style"?rr(r,js()):t==="object"&&n==="data"?It(e,r):typeof o=="function"?o(n,r,s):r)}function xa(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function Xh(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let s=e.classList.length;s--;){const o=e.classList[s];if(t.test(o))return!0}if(n)return e.matches(n)}catch{}return!1}function Vh(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function dt(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:dt(e.parentNode,t,n,r+1)}function xt(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(Vh(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function Ut(e,t,n,r,s,o){try{const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(i===null)return!1;if(i.tagName==="INPUT"){const u=i.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let c=-1,a=-1;if(o){if(a=dt(i,xt(r,s)),a<0)return!0;c=dt(i,xt(t,n),a>=0?a:1/0)}else{if(c=dt(i,xt(t,n)),c<0)return!1;a=dt(i,xt(r,s),c>=0?c:1/0)}return c>=0?a>=0?c<=a:!0:a>=0?!1:!!o}catch{}return!!o}function Kh(e,t,n){const r=e.contentWindow;if(!r)return;let s=!1,o;try{o=r.document.readyState}catch{return}if(o!=="complete"){const c=as(()=>{s||(t(),s=!0)},n);e.addEventListener("load",()=>{Ca(c),s=!0,t()});return}const i="about:blank";if(r.location.href!==i||e.src===i||e.src==="")return as(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Jh(e,t,n){let r=!1,s;try{s=e.sheet}catch{return}if(s)return;const o=as(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{Ca(o),r=!0,t()})}function Zh(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:c,maskAttributeFn:a,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:f,inlineStylesheet:h,maskInputOptions:p={},maskTextFn:y,maskInputFn:g,dataURLOptions:_={},inlineImages:v,recordCanvas:x,keepIframeSrcFn:T,newlyAddedElement:P=!1}=t,k=Qh(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:le.Document,childNodes:[],compatMode:e.compatMode}:{type:le.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:le.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:k};case e.ELEMENT_NODE:return tp(e,{doc:n,blockClass:s,blockSelector:o,unblockSelector:i,inlineStylesheet:h,maskAttributeFn:a,maskInputOptions:p,maskInputFn:g,dataURLOptions:_,inlineImages:v,recordCanvas:x,keepIframeSrcFn:T,newlyAddedElement:P,rootId:k,maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:f});case e.TEXT_NODE:return ep(e,{maskAllText:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:f,maskTextFn:y,maskInputOptions:p,maskInputFn:g,rootId:k});case e.CDATA_SECTION_NODE:return{type:le.CDATA,textContent:"",rootId:k};case e.COMMENT_NODE:return{type:le.Comment,textContent:e.textContent||"",rootId:k};default:return!1}}function Qh(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function ep(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:o,unmaskTextSelector:i,maskTextFn:c,maskInputOptions:a,maskInputFn:u,rootId:d}=t,l=e.parentNode&&e.parentNode.tagName;let f=e.textContent;const h=l==="STYLE"?!0:void 0,p=l==="SCRIPT"?!0:void 0,y=l==="TEXTAREA"?!0:void 0;if(h&&f){try{e.nextSibling||e.previousSibling||cn([e,"access",_=>_.parentNode,"access",_=>_.sheet,"optionalAccess",_=>_.cssRules])&&(f=tr(e.parentNode.sheet))}catch(_){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${_}`,e)}f=rr(f,js())}p&&(f="SCRIPT_PLACEHOLDER");const g=Ut(e,r,o,s,i,n);if(!h&&!p&&!y&&f&&g&&(f=c?c(f,e.parentElement):f.replace(/[\S]/g,"*")),y&&f&&(a.textarea||g)&&(f=u?u(f,e.parentNode):f.replace(/[\S]/g,"*")),l==="OPTION"&&f){const _=Sr({type:null,tagName:l,maskInputOptions:a});f=un({isMasked:Ut(e,r,o,s,i,_),element:e,value:f,maskInputFn:u})}return{type:le.Text,textContent:f||"",isStyle:h,rootId:d}}function tp(e,t){const{doc:n,blockClass:r,blockSelector:s,unblockSelector:o,inlineStylesheet:i,maskInputOptions:c={},maskAttributeFn:a,maskInputFn:u,dataURLOptions:d={},inlineImages:l,recordCanvas:f,keepIframeSrcFn:h,newlyAddedElement:p=!1,rootId:y,maskAllText:g,maskTextClass:_,unmaskTextClass:v,maskTextSelector:x,unmaskTextSelector:T}=t,P=Xh(e,r,s,o),k=$h(e);let E={};const N=e.attributes.length;for(let m=0;m<N;m++){const b=e.attributes[m];b.name&&!xa(k,b.name)&&(E[b.name]=Ia(n,k,Bt(b.name),b.value,e,a))}if(k==="link"&&i){const m=Array.from(n.styleSheets).find(w=>w.href===e.href);let b=null;m&&(b=tr(m)),b&&(delete E.rel,delete E.href,E._cssText=rr(b,m.href))}if(k==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const m=tr(e.sheet);m&&(E._cssText=rr(m,js()))}if(k==="input"||k==="textarea"||k==="select"||k==="option"){const m=e,b=zs(m),w=nr(m,is(k),b),O=m.checked;if(b!=="submit"&&b!=="button"&&w){const z=Ut(m,_,x,v,T,Sr({type:b,tagName:is(k),maskInputOptions:c}));E.value=un({isMasked:z,element:m,value:w,maskInputFn:u})}O&&(E.checked=O)}if(k==="option"&&(e.selected&&!c.select?E.selected=!0:delete E.selected),k==="canvas"&&f){if(e.__context==="2d")Lh(e)||(E.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){const m=e.toDataURL(d.type,d.quality),b=document.createElement("canvas");b.width=e.width,b.height=e.height;const w=b.toDataURL(d.type,d.quality);m!==w&&(E.rr_dataURL=m)}}if(k==="img"&&l){vt||(vt=n.createElement("canvas"),Ko=vt.getContext("2d"));const m=e,b=m.crossOrigin;m.crossOrigin="anonymous";const w=()=>{m.removeEventListener("load",w);try{vt.width=m.naturalWidth,vt.height=m.naturalHeight,Ko.drawImage(m,0,0),E.rr_dataURL=vt.toDataURL(d.type,d.quality)}catch(O){console.warn(`Cannot inline img src=${m.currentSrc}! Error: ${O}`)}b?E.crossOrigin=b:m.removeAttribute("crossorigin")};m.complete&&m.naturalWidth!==0?w():m.addEventListener("load",w)}if((k==="audio"||k==="video")&&(E.rr_mediaState=e.paused?"paused":"played",E.rr_mediaCurrentTime=e.currentTime),p||(e.scrollLeft&&(E.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(E.rr_scrollTop=e.scrollTop)),P){const{width:m,height:b}=e.getBoundingClientRect();E={class:E.class,rr_width:`${m}px`,rr_height:`${b}px`}}k==="iframe"&&!h(E.src)&&(!P&&!e.contentDocument&&(E.rr_src=E.src),delete E.src);let S;try{customElements.get(k)&&(S=!0)}catch{}return{type:le.Element,tagName:k,attributes:E,childNodes:[],isSVG:Gh(e)||void 0,needBlock:P,rootId:y,isCustom:S}}function Q(e){return e==null?"":e.toLowerCase()}function np(e,t){if(t.comment&&e.type===le.Comment)return!0;if(e.type===le.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&wa(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(Q(e.attributes.name).match(/^msapplication-tile(image|color)$/)||Q(e.attributes.name)==="application-name"||Q(e.attributes.rel)==="icon"||Q(e.attributes.rel)==="apple-touch-icon"||Q(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&Q(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Q(e.attributes.property).match(/^(og|twitter|fb):/)||Q(e.attributes.name).match(/^(og|twitter):/)||Q(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(Q(e.attributes.name)==="robots"||Q(e.attributes.name)==="googlebot"||Q(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(Q(e.attributes.name)==="author"||Q(e.attributes.name)==="generator"||Q(e.attributes.name)==="framework"||Q(e.attributes.name)==="publisher"||Q(e.attributes.name)==="progid"||Q(e.attributes.property).match(/^article:/)||Q(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(Q(e.attributes.name)==="google-site-verification"||Q(e.attributes.name)==="yandex-verification"||Q(e.attributes.name)==="csrf-token"||Q(e.attributes.name)==="p:domain_verify"||Q(e.attributes.name)==="verify-v1"||Q(e.attributes.name)==="verification"||Q(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Tt(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:c,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:f=!1,inlineStylesheet:h=!0,maskInputOptions:p={},maskAttributeFn:y,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:x={},inlineImages:T=!1,recordCanvas:P=!1,onSerialize:k,onIframeLoad:E,iframeLoadTimeout:N=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:m=5e3,keepIframeSrcFn:b=()=>!1,newlyAddedElement:w=!1}=t;let{preserveWhiteSpace:O=!0}=t;const z=Zh(e,{doc:n,mirror:r,blockClass:s,blockSelector:o,maskAllText:c,unblockSelector:i,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:y,maskTextFn:g,maskInputFn:_,dataURLOptions:x,inlineImages:T,recordCanvas:P,keepIframeSrcFn:b,newlyAddedElement:w});if(!z)return console.warn(e,"not serialized"),null;let $;r.hasNode(e)?$=r.getId(e):np(z,v)||!O&&z.type===le.Text&&!z.isStyle&&!z.textContent.replace(/^\s+|\s+$/gm,"").length?$=ln:$=Ws();const M=Object.assign(z,{id:$});if(r.add(e,M),$===ln)return null;k&&k(e);let ue=!f;if(M.type===le.Element){ue=ue&&!M.needBlock,delete M.needBlock;const F=e.shadowRoot;F&&rn(F)&&(M.isShadowHost=!0)}if((M.type===le.Document||M.type===le.Element)&&ue){v.headWhitespace&&M.type===le.Element&&M.tagName==="head"&&(O=!1);const F={doc:n,mirror:r,blockClass:s,blockSelector:o,maskAllText:c,unblockSelector:i,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:f,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:y,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:x,inlineImages:T,recordCanvas:P,preserveWhiteSpace:O,onSerialize:k,onIframeLoad:E,iframeLoadTimeout:N,onStylesheetLoad:S,stylesheetLoadTimeout:m,keepIframeSrcFn:b};for(const ne of Array.from(e.childNodes)){const fe=Tt(ne,F);fe&&M.childNodes.push(fe)}if(Th(e)&&e.shadowRoot)for(const ne of Array.from(e.shadowRoot.childNodes)){const fe=Tt(ne,F);fe&&(rn(e.shadowRoot)&&(fe.isShadow=!0),M.childNodes.push(fe))}}return e.parentNode&&nn(e.parentNode)&&rn(e.parentNode)&&(M.isShadow=!0),M.type===le.Element&&M.tagName==="iframe"&&Kh(e,()=>{const F=e.contentDocument;if(F&&E){const ne=Tt(F,{doc:F,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:c,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:y,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:x,inlineImages:T,recordCanvas:P,preserveWhiteSpace:O,onSerialize:k,onIframeLoad:E,iframeLoadTimeout:N,onStylesheetLoad:S,stylesheetLoadTimeout:m,keepIframeSrcFn:b});ne&&E(e,ne)}},N),M.type===le.Element&&M.tagName==="link"&&typeof M.attributes.rel=="string"&&(M.attributes.rel==="stylesheet"||M.attributes.rel==="preload"&&typeof M.attributes.href=="string"&&wa(M.attributes.href)==="css")&&Jh(e,()=>{if(S){const F=Tt(e,{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:c,maskTextClass:a,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskAttributeFn:y,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:x,inlineImages:T,recordCanvas:P,preserveWhiteSpace:O,onSerialize:k,onIframeLoad:E,iframeLoadTimeout:N,onStylesheetLoad:S,stylesheetLoadTimeout:m,keepIframeSrcFn:b});F&&S(e,F)}},m),M}function rp(e,t){const{mirror:n=new va,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:o=null,maskAllText:i=!1,maskTextClass:c="rr-mask",unmaskTextClass:a=null,maskTextSelector:u=null,unmaskTextSelector:d=null,inlineStylesheet:l=!0,inlineImages:f=!1,recordCanvas:h=!1,maskAllInputs:p=!1,maskAttributeFn:y,maskTextFn:g,maskInputFn:_,slimDOM:v=!1,dataURLOptions:x,preserveWhiteSpace:T,onSerialize:P,onIframeLoad:k,iframeLoadTimeout:E,onStylesheetLoad:N,stylesheetLoadTimeout:S,keepIframeSrcFn:m=()=>!1}=t||{};return Tt(e,{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,maskAllText:i,maskTextClass:c,unmaskTextClass:a,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:l,maskInputOptions:p===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:p===!1?{}:p,maskAttributeFn:y,maskTextFn:g,maskInputFn:_,slimDOMOptions:v===!0||v==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:v==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:v===!1?{}:v,dataURLOptions:x,inlineImages:f,recordCanvas:h,preserveWhiteSpace:T,onSerialize:P,onIframeLoad:k,iframeLoadTimeout:E,onStylesheetLoad:N,stylesheetLoadTimeout:S,keepIframeSrcFn:m,newlyAddedElement:!1})}function Je(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=o(n)):(s==="call"||s==="optionalCall")&&(n=o((...i)=>n.call(t,...i)),t=void 0)}return n}function pe(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const kt=`Please stop import mirror directly. Instead of that,\r
|
|
20
|
+
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
21
|
+
or you can use record.mirror to access the mirror instance during recording.`;let Jo={map:{},getId(){return console.error(kt),-1},getNode(){return console.error(kt),null},removeNodeFromMap(){console.error(kt)},has(){return console.error(kt),!1},reset(){console.error(kt)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Jo=new Proxy(Jo,{get(e,t,n){return t==="map"&&console.error(kt),Reflect.get(e,t,n)}}));function dn(e,t,n={}){let r=null,s=0;return function(...o){const i=Date.now();!s&&n.leading===!1&&(s=i);const c=t-(i-s),a=this;c<=0||c>t?(r&&(lp(r),r=null),s=i,e.apply(a,o)):!r&&n.trailing!==!1&&(r=br(()=>{s=n.leading===!1?0:Date.now(),r=null,e.apply(a,o)},c))}}function Ta(e,t,n,r,s=window){const o=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(i){br(()=>{n.set.call(this,i)},0),o&&o.set&&o.set.call(this,i)}}),()=>Ta(e,t,o||{},!0)}function qs(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],s=n(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}let sr=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(sr=()=>new Date().getTime());function Ma(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:Je([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollLeft])||Je([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollLeft])||Je([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:Je([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollTop])||Je([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollTop])||Je([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollTop])||0}}function Ra(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Na(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Da(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function Se(e,t,n,r,s){if(!e)return!1;const o=Da(e);if(!o)return!1;const i=xt(t,n);if(!s){const u=r&&o.matches(r);return i(o)&&!u}const c=dt(o,i);let a=-1;return c<0?!1:(r&&(a=dt(o,xt(null,r))),c>-1&&a<0?!0:c<a)}function sp(e,t){return t.getId(e)!==-1}function Nr(e,t){return t.getId(e)===ln}function Aa(e,t){if(nn(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?Aa(e.parentNode,t):!0:!0}function cs(e){return!!e.changedTouches}function op(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function Oa(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function La(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function us(e){return!!Je([e,"optionalAccess",t=>t.shadowRoot])}class ip{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return Ru(this.styleIDMap.get(t),()=>-1)}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Pa(e){let t=null;return Je([e,"access",n=>n.getRootNode,"optionalCall",n=>n(),"optionalAccess",n=>n.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function ap(e){let t=e,n;for(;n=Pa(t);)t=n;return t}function cp(e){const t=e.ownerDocument;if(!t)return!1;const n=ap(e);return t.contains(n)}function Fa(e){const t=e.ownerDocument;return t?t.contains(e)||cp(e):!1}const Zo={};function Ys(e){const t=Zo[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const o=s.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(s)}catch{}return Zo[e]=r.bind(window)}function up(...e){return Ys("requestAnimationFrame")(...e)}function br(...e){return Ys("setTimeout")(...e)}function lp(...e){return Ys("clearTimeout")(...e)}var A=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(A||{}),D=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(D||{}),he=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(he||{}),Ve=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Ve||{});function dp(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=o(n)):(s==="call"||s==="optionalCall")&&(n=o((...i)=>n.call(t,...i)),t=void 0)}return n}function Qo(e){return"__ln"in e}class fp{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=dp([n,"optionalAccess",s=>s.next])||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&Qo(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&Qo(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const ei=(e,t)=>`${e}@${t}`;class hp{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new fp,s=a=>{let u=a,d=ln;for(;d===ln;)u=u&&u.nextSibling,d=u&&this.mirror.getId(u);return d},o=a=>{if(!a.parentNode||!Fa(a))return;const u=nn(a.parentNode)?this.mirror.getId(Pa(a)):this.mirror.getId(a.parentNode),d=s(a);if(u===-1||d===-1)return r.addNode(a);const l=Tt(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:f=>{Oa(f,this.mirror)&&!Se(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(f),La(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),us(a)&&this.shadowDomManager.addShadowRoot(a.shadowRoot,this.doc)},onIframeLoad:(f,h)=>{Se(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(f,h),f.contentWindow&&this.canvasManager.addWindow(f.contentWindow),this.shadowDomManager.observeAttachShadow(f))},onStylesheetLoad:(f,h)=>{this.stylesheetManager.attachLinkElement(f,h)}});l&&(t.push({parentId:u,nextId:d,node:l}),n.add(l.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)ti(this.removes,a,this.mirror)&&!this.movedSet.has(a.parentNode)||o(a);for(const a of this.addedSet)!ni(this.droppedSet,a)&&!ti(this.removes,a,this.mirror)||ni(this.movedSet,a)?o(a):this.droppedSet.add(a);let i=null;for(;r.length;){let a=null;if(i){const u=this.mirror.getId(i.value.parentNode),d=s(i.value);u!==-1&&d!==-1&&(a=i)}if(!a){let u=r.tail;for(;u;){const d=u;if(u=u.previous,d){const l=this.mirror.getId(d.value.parentNode);if(s(d.value)===-1)continue;if(l!==-1){a=d;break}else{const h=d.value;if(h.parentNode&&h.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const p=h.parentNode.host;if(this.mirror.getId(p)!==-1){a=d;break}}}}}}if(!a){for(;r.head;)r.removeNode(r.head.value);break}i=a.previous,r.removeNode(a.value),o(a.value)}const c={texts:this.texts.map(a=>({id:this.mirror.getId(a.node),value:a.value})).filter(a=>!n.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{const{attributes:u}=a;if(typeof u.style=="string"){const d=JSON.stringify(a.styleDiff),l=JSON.stringify(a._unchangedStyles);d.length<u.style.length&&(d+l).split("var(").length===u.style.split("var(").length&&(u.style=a.styleDiff)}return{id:this.mirror.getId(a.node),attributes:u}}).filter(a=>!n.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:t};!c.texts.length&&!c.attributes.length&&!c.removes.length&&!c.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(c))},this.processMutation=t=>{if(!Nr(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Se(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:Ut(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,Da(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,s=t.target.getAttribute(r);if(r==="value"){const i=zs(n),c=n.tagName;s=nr(n,c,i);const a=Sr({maskInputOptions:this.maskInputOptions,tagName:c,type:i}),u=Ut(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,a);s=un({isMasked:u,element:n,value:s,maskInputFn:this.maskInputFn})}if(Se(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||s===t.oldValue)return;let o=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(s))if(!n.contentDocument)r="rr_src";else return;if(o||(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(t.target,o)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!xa(n.tagName,r)&&(o.attributes[r]=Ia(this.doc,Bt(n.tagName),Bt(r),s,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const i=this.unattachedDoc.createElement("span");t.oldValue&&i.setAttribute("style",t.oldValue);for(const c of Array.from(n.style)){const a=n.style.getPropertyValue(c),u=n.style.getPropertyPriority(c);a!==i.style.getPropertyValue(c)||u!==i.style.getPropertyPriority(c)?u===""?o.styleDiff[c]=a:o.styleDiff[c]=[a,u]:o._unchangedStyles[c]=[a,u]}for(const c of Array.from(i.style))n.style.getPropertyValue(c)===""&&(o.styleDiff[c]=!1)}break}case"childList":{if(Se(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),s=nn(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Se(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Nr(n,this.mirror)||!sp(n,this.mirror)||(this.addedSet.has(n)?(ls(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||Aa(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[ei(r,s)]?ls(this.movedSet,n):this.removes.push({parentId:s,id:r,isShadow:nn(t.target)&&rn(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Nr(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[ei(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Se(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes.forEach(r=>this.genAdds(r)),us(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function ls(e,t){e.delete(t),t.childNodes.forEach(n=>ls(e,n))}function ti(e,t,n){return e.length===0?!1:$a(e,t,n)}function $a(e,t,n){const{parentNode:r}=t;if(!r)return!1;const s=n.getId(r);return e.some(o=>o.id===s)?!0:$a(e,r,n)}function ni(e,t){return e.size===0?!1:Ba(e,t)}function Ba(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:Ba(e,n):!1}let sn;function pp(e){sn=e}function mp(){sn=void 0}const H=e=>sn?(...n)=>{try{return e(...n)}catch(r){if(sn&&sn(r)===!0)return()=>{};throw r}}:e;function Me(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=o(n)):(s==="call"||s==="optionalCall")&&(n=o((...i)=>n.call(t,...i)),t=void 0)}return n}const Mt=[];function vn(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Ua(e,t){const n=new hp;Mt.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const s=Me([window,"optionalAccess",i=>i.Zone,"optionalAccess",i=>i.__symbol__,"optionalCall",i=>i("MutationObserver")]);s&&window[s]&&(r=window[s]);const o=new r(H(i=>{e.onMutation&&e.onMutation(i)===!1||n.processMutations.bind(n)(i)}));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function _p({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const s=typeof t.mousemove=="number"?t.mousemove:50,o=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let i=[],c;const a=dn(H(l=>{const f=Date.now()-c;e(i.map(h=>(h.timeOffset-=f,h)),l),i=[],c=null}),o),u=H(dn(H(l=>{const f=vn(l),{clientX:h,clientY:p}=cs(l)?l.changedTouches[0]:l;c||(c=sr()),i.push({x:h,y:p,id:r.getId(f),timeOffset:sr()-c}),a(typeof DragEvent<"u"&&l instanceof DragEvent?D.Drag:l instanceof MouseEvent?D.MouseMove:D.TouchMove)}),s,{trailing:!1})),d=[pe("mousemove",u,n),pe("touchmove",u,n),pe("drag",u,n)];return H(()=>{d.forEach(l=>l())})}function gp({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,sampling:i}){if(i.mouseInteraction===!1)return()=>{};const c=i.mouseInteraction===!0||i.mouseInteraction===void 0?{}:i.mouseInteraction,a=[];let u=null;const d=l=>f=>{const h=vn(f);if(Se(h,r,s,o,!0))return;let p=null,y=l;if("pointerType"in f){switch(f.pointerType){case"mouse":p=Ve.Mouse;break;case"touch":p=Ve.Touch;break;case"pen":p=Ve.Pen;break}p===Ve.Touch&&(he[l]===he.MouseDown?y="TouchStart":he[l]===he.MouseUp&&(y="TouchEnd"))}else cs(f)&&(p=Ve.Touch);p!==null?(u=p,(y.startsWith("Touch")&&p===Ve.Touch||y.startsWith("Mouse")&&p===Ve.Mouse)&&(p=null)):he[l]===he.Click&&(p=u,u=null);const g=cs(f)?f.changedTouches[0]:f;if(!g)return;const _=n.getId(h),{clientX:v,clientY:x}=g;H(e)({type:he[y],id:_,x:v,y:x,...p!==null&&{pointerType:p}})};return Object.keys(he).filter(l=>Number.isNaN(Number(l))&&!l.endsWith("_Departed")&&c[l]!==!1).forEach(l=>{let f=Bt(l);const h=d(l);if(window.PointerEvent)switch(he[l]){case he.MouseDown:case he.MouseUp:f=f.replace("mouse","pointer");break;case he.TouchStart:case he.TouchEnd:return}a.push(pe(f,h,t))}),H(()=>{a.forEach(l=>l())})}function Ha({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,sampling:i}){const c=H(dn(H(a=>{const u=vn(a);if(!u||Se(u,r,s,o,!0))return;const d=n.getId(u);if(u===t&&t.defaultView){const l=Ma(t.defaultView);e({id:d,x:l.left,y:l.top})}else e({id:d,x:u.scrollLeft,y:u.scrollTop})}),i.scroll||100));return pe("scroll",c,t)}function yp({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const s=H(dn(H(()=>{const o=Ra(),i=Na();(n!==o||r!==i)&&(e({width:Number(i),height:Number(o)}),n=o,r=i)}),200));return pe("resize",s,t)}const Sp=["INPUT","TEXTAREA","SELECT"],ri=new WeakMap;function bp({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,ignoreClass:i,ignoreSelector:c,maskInputOptions:a,maskInputFn:u,sampling:d,userTriggeredOnInput:l,maskTextClass:f,unmaskTextClass:h,maskTextSelector:p,unmaskTextSelector:y}){function g(E){let N=vn(E);const S=E.isTrusted,m=N&&is(N.tagName);if(m==="OPTION"&&(N=N.parentElement),!N||!m||Sp.indexOf(m)<0||Se(N,r,s,o,!0))return;const b=N;if(b.classList.contains(i)||c&&b.matches(c))return;const w=zs(N);let O=nr(b,m,w),z=!1;const $=Sr({maskInputOptions:a,tagName:m,type:w}),M=Ut(N,f,p,h,y,$);(w==="radio"||w==="checkbox")&&(z=N.checked),O=un({isMasked:M,element:N,value:O,maskInputFn:u}),_(N,l?{text:O,isChecked:z,userTriggered:S}:{text:O,isChecked:z});const ue=N.name;w==="radio"&&ue&&z&&t.querySelectorAll(`input[type="radio"][name="${ue}"]`).forEach(F=>{if(F!==N){const ne=un({isMasked:M,element:F,value:nr(F,m,w),maskInputFn:u});_(F,l?{text:ne,isChecked:!z,userTriggered:!1}:{text:ne,isChecked:!z})}})}function _(E,N){const S=ri.get(E);if(!S||S.text!==N.text||S.isChecked!==N.isChecked){ri.set(E,N);const m=n.getId(E);H(e)({...N,id:m})}}const x=(d.input==="last"?["change"]:["input","change"]).map(E=>pe(E,H(g),t)),T=t.defaultView;if(!T)return()=>{x.forEach(E=>E())};const P=T.Object.getOwnPropertyDescriptor(T.HTMLInputElement.prototype,"value"),k=[[T.HTMLInputElement.prototype,"value"],[T.HTMLInputElement.prototype,"checked"],[T.HTMLSelectElement.prototype,"value"],[T.HTMLTextAreaElement.prototype,"value"],[T.HTMLSelectElement.prototype,"selectedIndex"],[T.HTMLOptionElement.prototype,"selected"]];return P&&P.set&&x.push(...k.map(E=>Ta(E[0],E[1],{set(){H(g)({target:this,isTrusted:!1})}},!1,T))),H(()=>{x.forEach(E=>E())})}function or(e){const t=[];function n(r,s){if(On("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||On("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||On("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||On("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const i=Array.from(r.parentRule.cssRules).indexOf(r);s.unshift(i)}else if(r.parentStyleSheet){const i=Array.from(r.parentStyleSheet.cssRules).indexOf(r);s.unshift(i)}return s}return n(e,t)}function Ze(e,t,n){let r,s;return e?(e.ownerNode?r=t.getId(e.ownerNode):s=n.getId(e),{styleId:s,id:r}):{}}function Ep({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:H((d,l,f)=>{const[h,p]=f,{id:y,styleId:g}=Ze(l,t,n.styleMirror);return(y&&y!==-1||g&&g!==-1)&&e({id:y,styleId:g,adds:[{rule:h,index:p}]}),d.apply(l,f)})});const o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:H((d,l,f)=>{const[h]=f,{id:p,styleId:y}=Ze(l,t,n.styleMirror);return(p&&p!==-1||y&&y!==-1)&&e({id:p,styleId:y,removes:[{index:h}]}),d.apply(l,f)})});let i;r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:H((d,l,f)=>{const[h]=f,{id:p,styleId:y}=Ze(l,t,n.styleMirror);return(p&&p!==-1||y&&y!==-1)&&e({id:p,styleId:y,replace:h}),d.apply(l,f)})}));let c;r.CSSStyleSheet.prototype.replaceSync&&(c=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(c,{apply:H((d,l,f)=>{const[h]=f,{id:p,styleId:y}=Ze(l,t,n.styleMirror);return(p&&p!==-1||y&&y!==-1)&&e({id:p,styleId:y,replaceSync:h}),d.apply(l,f)})}));const a={};Ln("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(Ln("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),Ln("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),Ln("CSSSupportsRule")&&(a.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(a).forEach(([d,l])=>{u[d]={insertRule:l.prototype.insertRule,deleteRule:l.prototype.deleteRule},l.prototype.insertRule=new Proxy(u[d].insertRule,{apply:H((f,h,p)=>{const[y,g]=p,{id:_,styleId:v}=Ze(h.parentStyleSheet,t,n.styleMirror);return(_&&_!==-1||v&&v!==-1)&&e({id:_,styleId:v,adds:[{rule:y,index:[...or(h),g||0]}]}),f.apply(h,p)})}),l.prototype.deleteRule=new Proxy(u[d].deleteRule,{apply:H((f,h,p)=>{const[y]=p,{id:g,styleId:_}=Ze(h.parentStyleSheet,t,n.styleMirror);return(g&&g!==-1||_&&_!==-1)&&e({id:g,styleId:_,removes:[{index:[...or(h),y]}]}),f.apply(h,p)})})}),H(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=o,i&&(r.CSSStyleSheet.prototype.replace=i),c&&(r.CSSStyleSheet.prototype.replaceSync=c),Object.entries(a).forEach(([d,l])=>{l.prototype.insertRule=u[d].insertRule,l.prototype.deleteRule=u[d].deleteRule})})}function za({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const s=n.nodeName==="#document"?Me([n,"access",i=>i.defaultView,"optionalAccess",i=>i.Document]):Me([n,"access",i=>i.ownerDocument,"optionalAccess",i=>i.defaultView,"optionalAccess",i=>i.ShadowRoot]),o=Me([s,"optionalAccess",i=>i.prototype])?Object.getOwnPropertyDescriptor(Me([s,"optionalAccess",i=>i.prototype]),"adoptedStyleSheets"):void 0;return r===null||r===-1||!s||!o?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){return Me([o,"access",i=>i.get,"optionalAccess",i=>i.call,"call",i=>i(this)])},set(i){const c=Me([o,"access",a=>a.set,"optionalAccess",a=>a.call,"call",a=>a(this,i)]);if(r!==null&&r!==-1)try{t.adoptStyleSheets(i,r)}catch{}return c}}),H(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))}function vp({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const o=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:H((c,a,u)=>{const[d,l,f]=u;if(n.has(d))return o.apply(a,[d,l,f]);const{id:h,styleId:p}=Ze(Me([a,"access",y=>y.parentRule,"optionalAccess",y=>y.parentStyleSheet]),t,r.styleMirror);return(h&&h!==-1||p&&p!==-1)&&e({id:h,styleId:p,set:{property:d,value:l,priority:f},index:or(a.parentRule)}),c.apply(a,u)})});const i=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:H((c,a,u)=>{const[d]=u;if(n.has(d))return i.apply(a,[d]);const{id:l,styleId:f}=Ze(Me([a,"access",h=>h.parentRule,"optionalAccess",h=>h.parentStyleSheet]),t,r.styleMirror);return(l&&l!==-1||f&&f!==-1)&&e({id:l,styleId:f,remove:{property:d},index:or(a.parentRule)}),c.apply(a,u)})}),H(()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=i})}function wp({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:s,sampling:o,doc:i}){const c=H(u=>dn(H(d=>{const l=vn(d);if(!l||Se(l,t,n,r,!0))return;const{currentTime:f,volume:h,muted:p,playbackRate:y}=l;e({type:u,id:s.getId(l),currentTime:f,volume:h,muted:p,playbackRate:y})}),o.media||500)),a=[pe("play",c(0),i),pe("pause",c(1),i),pe("seeked",c(2),i),pe("volumechange",c(3),i),pe("ratechange",c(4),i)];return H(()=>{a.forEach(u=>u())})}function kp({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,o=n.FontFace;n.FontFace=function(a,u,d){const l=new o(a,u,d);return s.set(l,{family:a,buffer:typeof u!="string",descriptors:d,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),l};const i=qs(t.fonts,"add",function(c){return function(a){return br(H(()=>{const u=s.get(a);u&&(e(u),s.delete(a))}),0),c.apply(this,[a])}});return r.push(()=>{n.FontFace=o}),r.push(i),H(()=>{r.forEach(c=>c())})}function Cp(e){const{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,selectionCb:i}=e;let c=!0;const a=H(()=>{const u=t.getSelection();if(!u||c&&Me([u,"optionalAccess",f=>f.isCollapsed]))return;c=u.isCollapsed||!1;const d=[],l=u.rangeCount||0;for(let f=0;f<l;f++){const h=u.getRangeAt(f),{startContainer:p,startOffset:y,endContainer:g,endOffset:_}=h;Se(p,r,s,o,!0)||Se(g,r,s,o,!0)||d.push({start:n.getId(p),startOffset:y,end:n.getId(g),endOffset:_})}i({ranges:d})});return a(),pe("selectionchange",a)}function Ip({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:qs(n.customElements,"define",function(s){return function(o,i,c){try{t({define:{name:o}})}catch{}return s.apply(this,[o,i,c])}})}function xp(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=Ua(e,e.doc));const s=_p(e),o=gp(e),i=Ha(e),c=yp(e,{win:n}),a=bp(e),u=wp(e);let d=()=>{},l=()=>{},f=()=>{},h=()=>{};e.recordDOM&&(d=Ep(e,{win:n}),l=za(e,e.doc),f=vp(e,{win:n}),e.collectFonts&&(h=kp(e)));const p=Cp(e),y=Ip(e),g=[];for(const _ of e.plugins)g.push(_.observer(_.callback,n,_.options));return H(()=>{Mt.forEach(_=>_.reset()),Me([r,"optionalAccess",_=>_.disconnect,"call",_=>_()]),s(),o(),i(),c(),a(),u(),d(),l(),f(),h(),p(),y(),g.forEach(_=>_())})}function On(e){return typeof window[e]<"u"}function Ln(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class ds{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,s){const o=r||this.getIdToRemoteIdMap(t),i=s||this.getRemoteIdToIdMap(t);let c=o.get(n);return c||(c=this.generateIdFn(),o.set(n,c),i.set(c,n)),c}getIds(t,n){const r=this.getIdToRemoteIdMap(t),s=this.getRemoteIdToIdMap(t);return n.map(o=>this.getId(t,o,r,s))}getRemoteId(t,n,r){const s=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const o=s.get(n);return o||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(s=>this.getRemoteId(t,s,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}function si(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],o=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=o(n)):(s==="call"||s==="optionalCall")&&(n=o((...i)=>n.call(t,...i)),t=void 0)}return n}class Tp{constructor(){this.crossOriginIframeMirror=new ds(Ws),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class Mp{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new ds(Ws),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ds(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),si([this,"access",r=>r.loadListener,"optionalCall",r=>r(t)]),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const s=this.crossOriginIframeMap.get(t.source);if(!s)return;const o=this.transformCrossOriginEvent(s,n.data.event);o&&this.wrappedEmit(o,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case A.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:A.IncrementalSnapshot,data:{source:D.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case A.Meta:case A.Load:case A.DomContentLoaded:return!1;case A.Plugin:return n;case A.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case A.IncrementalSnapshot:switch(n.data.source){case D.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);const s=this.crossOriginIframeRootIdMap.get(t);s&&this.patchRootIdOnNode(r.node,s)}),n.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case D.Drag:case D.TouchMove:case D.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case D.ViewportResize:return!1;case D.MediaInteraction:case D.MouseInteraction:case D.Scroll:case D.CanvasMutation:case D.Input:return this.replaceIds(n.data,t,["id"]),n;case D.StyleSheetRule:case D.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case D.Font:return n;case D.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case D.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),si([n,"access",r=>r.data,"access",r=>r.styles,"optionalAccess",r=>r.forEach,"call",r=>r(s=>{this.replaceStyleIds(s,t,["styleId"])})]),n}}return!1}replace(t,n,r,s){for(const o of s)!Array.isArray(n[o])&&typeof n[o]!="number"||(Array.isArray(n[o])?n[o]=t.getIds(r,n[o]):n[o]=t.getId(r,n[o]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==le.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class Rp{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class Np{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!rn(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=Ua({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Ha({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),br(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(za({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(qs(t.prototype,"attachShadow",function(s){return function(o){const i=s.call(this,o);return this.shadowRoot&&Fa(this)&&r.addShadowRoot(this.shadowRoot,n),i}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class oi{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class Dp{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new ip,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},s=[];for(const o of t){let i;this.styleMirror.has(o)?i=this.styleMirror.getId(o):(i=this.styleMirror.add(o),s.push({styleId:i,rules:Array.from(o.rules||CSSRule,(c,a)=>({rule:Ea(c),index:a}))})),r.styleIds.push(i)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Ap{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){up(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(s=>s!==n)}add(t,n){this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}}let ce,ir;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=Hn([e,"access",t=>t.contentWindow,"optionalAccess",t=>t.Array,"access",t=>t.from])||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const Te=Oh();function We(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:o=null,unblockSelector:i=null,ignoreClass:c="rr-ignore",ignoreSelector:a=null,maskAllText:u=!1,maskTextClass:d="rr-mask",unmaskTextClass:l=null,maskTextSelector:f=null,unmaskTextSelector:h=null,inlineStylesheet:p=!0,maskAllInputs:y,maskInputOptions:g,slimDOMOptions:_,maskAttributeFn:v,maskInputFn:x,maskTextFn:T,maxCanvasSize:P=null,packFn:k,sampling:E={},dataURLOptions:N={},mousemoveWait:S,recordDOM:m=!0,recordCanvas:b=!1,recordCrossOriginIframes:w=!1,recordAfter:O=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:z=!1,collectFonts:$=!1,inlineImages:M=!1,plugins:ue,keepIframeSrcFn:F=()=>!1,ignoreCSSAttributes:ne=new Set([]),errorHandler:fe,onMutation:Ce,getCanvasManager:it}=e;pp(fe);const Gt=w?window.parent===window:!0;let Ne=!1;if(!Gt)try{window.parent.document&&(Ne=!1)}catch{Ne=!0}if(Gt&&!t)throw new Error("emit function is required");S!==void 0&&E.mousemove===void 0&&(E.mousemove=S),Te.reset();const ve=y===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:g!==void 0?g:{},Pe=_===!0||_==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:_==="all",headMetaDescKeywords:_==="all"}:_||{};op();let St,bt=0;const Xt=j=>{for(const xe of ue||[])xe.eventProcessor&&(j=xe.eventProcessor(j));return k&&!Ne&&(j=k(j)),j};ce=(j,xe)=>{const U=j;if(U.timestamp=sr(),Hn([Mt,"access",se=>se[0],"optionalAccess",se=>se.isFrozen,"call",se=>se()])&&U.type!==A.FullSnapshot&&!(U.type===A.IncrementalSnapshot&&U.data.source===D.Mutation)&&Mt.forEach(se=>se.unfreeze()),Gt)Hn([t,"optionalCall",se=>se(Xt(U),xe)]);else if(Ne){const se={type:"rrweb",event:Xt(U),origin:window.location.origin,isCheckout:xe};window.parent.postMessage(se,"*")}if(U.type===A.FullSnapshot)St=U,bt=0;else if(U.type===A.IncrementalSnapshot){if(U.data.source===D.Mutation&&U.data.isAttachIframe)return;bt++;const se=r&&bt>=r,q=n&&St&&U.timestamp-St.timestamp>n;(se||q)&&Vt(!0)}};const at=j=>{ce({type:A.IncrementalSnapshot,data:{source:D.Mutation,...j}})},Et=j=>ce({type:A.IncrementalSnapshot,data:{source:D.Scroll,...j}}),X=j=>ce({type:A.IncrementalSnapshot,data:{source:D.CanvasMutation,...j}}),ie=j=>ce({type:A.IncrementalSnapshot,data:{source:D.AdoptedStyleSheet,...j}}),de=new Dp({mutationCb:at,adoptedStyleSheetCb:ie}),te=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new Tp:new Mp({mirror:Te,mutationCb:at,stylesheetManager:de,recordCrossOriginIframes:w,wrappedEmit:ce});for(const j of ue||[])j.getMirror&&j.getMirror({nodeMirror:Te,crossOriginIframeMirror:te.crossOriginIframeMirror,crossOriginIframeStyleMirror:te.crossOriginIframeStyleMirror});const ae=new Ap,ct=Lp(it,{mirror:Te,win:window,mutationCb:j=>ce({type:A.IncrementalSnapshot,data:{source:D.CanvasMutation,...j}}),recordCanvas:b,blockClass:s,blockSelector:o,unblockSelector:i,maxCanvasSize:P,sampling:E.canvas,dataURLOptions:N,errorHandler:fe}),Ie=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Rp:new Np({mutationCb:at,scrollCb:Et,bypassOptions:{onMutation:Ce,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:h,inlineStylesheet:p,maskInputOptions:ve,dataURLOptions:N,maskAttributeFn:v,maskTextFn:T,maskInputFn:x,recordCanvas:b,inlineImages:M,sampling:E,slimDOMOptions:Pe,iframeManager:te,stylesheetManager:de,canvasManager:ct,keepIframeSrcFn:F,processedNodeManager:ae},mirror:Te}),Vt=(j=!1)=>{if(!m)return;ce({type:A.Meta,data:{href:window.location.href,width:Na(),height:Ra()}},j),de.reset(),Ie.init(),Mt.forEach(U=>U.lock());const xe=rp(document,{mirror:Te,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:h,inlineStylesheet:p,maskAllInputs:ve,maskAttributeFn:v,maskInputFn:x,maskTextFn:T,slimDOM:Pe,dataURLOptions:N,recordCanvas:b,inlineImages:M,onSerialize:U=>{Oa(U,Te)&&te.addIframe(U),La(U,Te)&&de.trackLinkElement(U),us(U)&&Ie.addShadowRoot(U.shadowRoot,document)},onIframeLoad:(U,se)=>{te.attachIframe(U,se),U.contentWindow&&ct.addWindow(U.contentWindow),Ie.observeAttachShadow(U)},onStylesheetLoad:(U,se)=>{de.attachLinkElement(U,se)},keepIframeSrcFn:F});if(!xe)return console.warn("Failed to snapshot the document");ce({type:A.FullSnapshot,data:{node:xe,initialOffset:Ma(window)}}),Mt.forEach(U=>U.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&de.adoptStyleSheets(document.adoptedStyleSheets,Te.getId(document))};ir=Vt;try{const j=[],xe=se=>H(xp)({onMutation:Ce,mutationCb:at,mousemoveCb:(q,ut)=>ce({type:A.IncrementalSnapshot,data:{source:ut,positions:q}}),mouseInteractionCb:q=>ce({type:A.IncrementalSnapshot,data:{source:D.MouseInteraction,...q}}),scrollCb:Et,viewportResizeCb:q=>ce({type:A.IncrementalSnapshot,data:{source:D.ViewportResize,...q}}),inputCb:q=>ce({type:A.IncrementalSnapshot,data:{source:D.Input,...q}}),mediaInteractionCb:q=>ce({type:A.IncrementalSnapshot,data:{source:D.MediaInteraction,...q}}),styleSheetRuleCb:q=>ce({type:A.IncrementalSnapshot,data:{source:D.StyleSheetRule,...q}}),styleDeclarationCb:q=>ce({type:A.IncrementalSnapshot,data:{source:D.StyleDeclaration,...q}}),canvasMutationCb:X,fontCb:q=>ce({type:A.IncrementalSnapshot,data:{source:D.Font,...q}}),selectionCb:q=>{ce({type:A.IncrementalSnapshot,data:{source:D.Selection,...q}})},customElementCb:q=>{ce({type:A.IncrementalSnapshot,data:{source:D.CustomElement,...q}})},blockClass:s,ignoreClass:c,ignoreSelector:a,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:h,maskInputOptions:ve,inlineStylesheet:p,sampling:E,recordDOM:m,recordCanvas:b,inlineImages:M,userTriggeredOnInput:z,collectFonts:$,doc:se,maskAttributeFn:v,maskInputFn:x,maskTextFn:T,keepIframeSrcFn:F,blockSelector:o,unblockSelector:i,slimDOMOptions:Pe,dataURLOptions:N,mirror:Te,iframeManager:te,stylesheetManager:de,shadowDomManager:Ie,processedNodeManager:ae,canvasManager:ct,ignoreCSSAttributes:ne,plugins:Hn([ue,"optionalAccess",q=>q.filter,"call",q=>q(ut=>ut.observer),"optionalAccess",q=>q.map,"call",q=>q(ut=>({observer:ut.observer,options:ut.options,callback:kc=>ce({type:A.Plugin,data:{plugin:ut.name,payload:kc}})}))])||[]},{});te.addLoadListener(se=>{try{j.push(xe(se.contentDocument))}catch(q){console.warn(q)}});const U=()=>{Vt(),j.push(xe(document))};return document.readyState==="interactive"||document.readyState==="complete"?U():(j.push(pe("DOMContentLoaded",()=>{ce({type:A.DomContentLoaded,data:{}}),O==="DOMContentLoaded"&&U()})),j.push(pe("load",()=>{ce({type:A.Load,data:{}}),O==="load"&&U()},window))),()=>{j.forEach(se=>se()),ae.destroy(),ir=void 0,mp()}}catch(j){console.warn(j)}}function Op(e){if(!ir)throw new Error("please take full snapshot after start recording");ir(e)}We.mirror=Te;We.takeFullSnapshot=Op;function Lp(e,t){try{return e?e(t):new oi}catch{return console.warn("Unable to initialize CanvasManager"),new oi}}const I=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,ii=["info","warn","error","log"],Wn="[Replay] ";function Dr(e,t="info"){ot({category:"console",data:{logger:"replay"},level:t,message:`${Wn}${e}`},{level:t})}function Pp(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=r.captureExceptions,t=r.traceInternals}};return I?(ii.forEach(r=>{n[r]=(...s)=>{C[r](Wn,...s),t&&Dr(s[0])}}),n.exception=(r,...s)=>{n.error&&n.error(...s),C.error(Wn,r),e?Ns(r):t&&Dr(r)},n.infoTick=(...r)=>{C.info(Wn,...r),t&&setTimeout(()=>Dr(r[0]),0)}):ii.forEach(r=>{n[r]=()=>{}}),n}const R=Pp(),Fp=3,$p=5;function Gs(e){return e>9999999999?e:e*1e3}function Ar(e){return e>9999999999?e/1e3:e}function wn(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:A.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:De(t,10,1e3)}}),t.category==="console")))}const Bp="button,a";function Wa(e){return e.closest(Bp)||e}function ja(e){const t=qa(e);return!t||!(t instanceof Element)?t:Wa(t)}function qa(e){return Up(e)?e.target:e}function Up(e){return typeof e=="object"&&!!e&&"target"in e}let Qe;function Hp(e){return Qe||(Qe=[],zp()),Qe.push(e),()=>{const t=Qe?Qe.indexOf(e):-1;t>-1&&Qe.splice(t,1)}}function zp(){ge(ee,"open",function(e){return function(...t){if(Qe)try{Qe.forEach(n=>n())}catch{}return e.apply(ee,t)}})}const Wp=new Set([D.Mutation,D.StyleSheetRule,D.StyleDeclaration,D.AdoptedStyleSheet,D.CanvasMutation,D.Selection,D.MediaInteraction]);function jp(e,t,n){e.handleClick(t,n)}class qp{constructor(t,n,r=wn){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=Hp(()=>{this._lastMutation=ai()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(Gp(n,this._ignoreSelector)||!Xp(t))return;const r={timestamp:Ar(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(s=>s.node===r.node&&Math.abs(s.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=Ar(t)}registerScroll(t=Date.now()){this._lastScroll=Ar(t)}registerClick(t){const n=Wa(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=ai();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(const r of t){const s=this._clicks.indexOf(r);s>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(s,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scollTimeout,s=t.mutationAfter&&t.mutationAfter<=this._threshold,o=!r&&!s,{clickCount:i,clickBreadcrumb:c}=t;if(o){const a=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=a<this._timeout*1e3?"mutation":"timeout",d={type:"default",message:c.message,timestamp:c.timestamp,category:"ui.slowClickDetected",data:{...c.data,url:ee.location.href,route:n.getCurrentRoute(),timeAfterClickMs:a,endReason:u,clickCount:i||1}};this._addBreadcrumbEvent(n,d);return}if(i>1){const a={type:"default",message:c.message,timestamp:c.timestamp,category:"ui.multiClick",data:{...c.data,url:ee.location.href,route:n.getCurrentRoute(),clickCount:i,metric:!0}};this._addBreadcrumbEvent(n,a)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=$t(()=>this._checkClicks(),1e3)}}const Yp=["A","BUTTON","INPUT"];function Gp(e,t){return!!(!Yp.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function Xp(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function ai(){return Date.now()/1e3}function Vp(e,t){try{if(!Kp(t))return;const{source:n}=t.data;if(Wp.has(n)&&e.registerMutation(t.timestamp),n===D.Scroll&&e.registerScroll(t.timestamp),Jp(t)){const{type:r,id:s}=t.data,o=We.mirror.getNode(s);o instanceof HTMLElement&&r===he.Click&&e.registerClick(o)}}catch{}}function Kp(e){return e.type===Fp}function Jp(e){return e.data.source===D.MouseInteraction}function Oe(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var ar;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(ar||(ar={}));const Zp=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function Qp(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(Zp.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const em=e=>t=>{if(!e.isEnabled())return;const n=tm(t);if(!n)return;const r=t.name==="click",s=r?t.event:void 0;r&&e.clickDetector&&s&&s.target&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&jp(e.clickDetector,n,ja(t.event)),wn(e,n)};function Ya(e,t){const n=We.mirror.getId(e),r=n&&We.mirror.getNode(n),s=r&&We.mirror.getMeta(r),o=s&&rm(s)?s:null;return{message:t,data:o?{nodeId:n,node:{id:n,tagName:o.tagName,textContent:Array.from(o.childNodes).map(i=>i.type===ar.Text&&i.textContent).filter(Boolean).map(i=>i.trim()).join(""),attributes:Qp(o.attributes)}}:{}}}function tm(e){const{target:t,message:n}=nm(e);return Oe({category:`ui.${e.name}`,...Ya(t,n)})}function nm(e){const t=e.name==="click";let n,r=null;try{r=t?ja(e.event):qa(e.event),n=hr(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function rm(e){return e.type===ar.Element}function sm(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=om(t);n&&wn(e,n)}function om(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:o,target:i}=e;if(!i||im(i)||!o)return null;const c=t||r||s,a=o.length===1;if(!c&&a)return null;const u=hr(i,{maxStringLength:200})||"<unknown>",d=Ya(i,u);return Oe({category:"ui.keyDown",message:u,data:{...d.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:o}})}function im(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const am={resource:fm,paint:lm,navigation:dm};function Pn(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function cm(e){return e.map(um).filter(Boolean)}function um(e){const t=am[e.entryType];return t?t(e):null}function Ht(e){return((Jc||ee.performance.timeOrigin)+e)/1e3}function lm(e){const{duration:t,entryType:n,name:r,startTime:s}=e,o=Ht(s);return{type:n,name:r,start:o,end:o+t,data:void 0}}function dm(e){const{entryType:t,name:n,decodedBodySize:r,duration:s,domComplete:o,encodedBodySize:i,domContentLoadedEventStart:c,domContentLoadedEventEnd:a,domInteractive:u,loadEventStart:d,loadEventEnd:l,redirectCount:f,startTime:h,transferSize:p,type:y}=e;return s===0?null:{type:`${t}.${y}`,start:Ht(h),end:Ht(o),name:n,data:{size:p,decodedBodySize:r,encodedBodySize:i,duration:s,domInteractive:u,domContentLoadedEventStart:c,domContentLoadedEventEnd:a,loadEventStart:d,loadEventEnd:l,domComplete:o,redirectCount:f}}}function fm(e){const{entryType:t,initiatorType:n,name:r,responseEnd:s,startTime:o,decodedBodySize:i,encodedBodySize:c,responseStatus:a,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:Ht(o),end:Ht(s),name:r,data:{size:u,statusCode:a,decodedBodySize:i,encodedBodySize:c}}}function hm(e){const t=e.entries[e.entries.length-1],n=t&&t.element?[t.element]:void 0;return Er(e,"largest-contentful-paint",n)}function pm(e){return e.sources!==void 0}function mm(e){const t=[],n=[];for(const r of e.entries)if(pm(r)){const s=[];for(const o of r.sources)if(o.node){n.push(o.node);const i=We.mirror.getId(o.node);i&&s.push(i)}t.push({value:r.value,nodeIds:s})}return Er(e,"cumulative-layout-shift",n,t)}function _m(e){const t=e.entries[e.entries.length-1],n=t&&t.target?[t.target]:void 0;return Er(e,"first-input-delay",n)}function gm(e){const t=e.entries[e.entries.length-1],n=t&&t.target?[t.target]:void 0;return Er(e,"interaction-to-next-paint",n)}function Er(e,t,n,r){const s=e.value,o=e.rating,i=Ht(s);return{type:"web-vital",name:t,start:i,end:i,data:{value:s,size:s,rating:o,nodeIds:n?n.map(a=>We.mirror.getId(a)):void 0,attributions:r}}}function ym(e){function t(s){e.performanceEntries.includes(s)||e.performanceEntries.push(s)}function n({entries:s}){s.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(s=>{r.push(tf(s,n))}),r.push(Zd(Pn(hm,e)),Jd(Pn(mm,e)),Qd(Pn(_m,e)),ef(Pn(gm,e))),()=>{r.forEach(s=>s())}}const Sm='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==r||r<0)&&(r=0),(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},A=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},_=function(r,e){for(var i=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=x(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},x=function(t,n,r){return-1==t.s?Math.max(x(t.l,n,r+1),x(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},C=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=_(f,15),M=b.t,E=b.l,x=_(h,15),C=x.t,U=x.l,F=D(M),I=F.c,S=F.n,L=D(C),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=_(q,7),H=G.t,J=G.l,K=19;K>4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,C)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(C,U,0),R=C;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[a[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){A(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;A(r,m,Q[et]),m+=R[et],et>3&&(A(r,m,rt>>5&8191),m+=i[et])}else A(r,m,N[rt]),m+=P[rt]}return A(r,m,N[256]),m+P[256]},U=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}},L=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},O=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=U[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,A=c.p||new n(32768),_=c.h||new n(z+1),x=Math.ceil(o/3),D=2*x,T=function(t){return(a[t]^a[t+1]<<x^a[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=_[H];if(A[J]=K,_[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=C(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-A[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=A[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=C(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=_,c.p=A,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&j(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(O(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),J="undefined"!=typeof TextEncoder&&new TextEncoder,K="undefined"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(n,r){if(r){for(var e=new t(n.length),i=0;i<n.length;++i)e[i]=n.charCodeAt(i);return e}if(J)return J.encode(n);var a=n.length,s=new t(n.length+(n.length>>1)),o=0,f=function(t){s[o++]=t};for(i=0;i<a;++i){if(o+5>s.length){var h=new t(o+8+(a-i<<1));h.set(s),s=h}var l=n.charCodeAt(i);l<128||r?f(l):l<2048?(f(192|l>>6),f(128|63&l)):l>55295&&l<57344?(f(240|(l=65536+(1047552&l)|1023&n.charCodeAt(++i))>>18),f(128|l>>12&63),f(128|l>>6&63),f(128|63&l)):(f(224|l>>12),f(128|l>>6&63),f(128|63&l))}return b(s,0,o)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),a=i.length;return q(i,n),j(i,a-8,r.d()),j(i,a-4,e),i}(P(t))}const R=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new H,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&"function"==typeof V[n])try{const t=V[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function bm(){const e=new Blob([Sm]);return URL.createObjectURL(e)}class Xs extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Hs}.`)}}class Ga{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>Hs)throw new Xs;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map(n=>n.timestamp).sort()[0];return t?Gs(t):null}}class Em{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():n()},{once:!0}),this._worker.addEventListener("error",r=>{n(r)},{once:!0})}),this._ensureReadyPromise)}destroy(){I&&R.info("Destroying compression worker"),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((s,o)=>{const i=({data:c})=>{const a=c;if(a.method===t&&a.id===r){if(this._worker.removeEventListener("message",i),!a.success){I&&R.error("Error in compression worker: ",a.response),o(new Error("Error in compression worker"));return}s(a.response)}};this._worker.addEventListener("message",i),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}}class vm{constructor(t){this._worker=new Em(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const n=Gs(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>Hs?Promise.reject(new Xs):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{I&&R.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class wm{constructor(t){this._fallback=new Ga,this._compression=new vm(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){I&&R.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n}=this._fallback,r=[];for(const s of t)r.push(this._compression.addEvent(s));this._compression.hasCheckout=n,this._used=this._compression;try{await Promise.all(r)}catch(s){I&&R.exception(s,"Failed to add events when switching buffers.")}}}function km({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=Cm(t);if(n)return n}return I&&R.info("Using simple buffer"),new Ga}function Cm(e){try{const t=e||Im();if(!t)return;I&&R.info(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new wm(n)}catch(t){I&&R.exception(t,"Failed to create compression worker")}}function Im(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?bm():""}function Vs(){try{return"sessionStorage"in ee&&!!ee.sessionStorage}catch{return!1}}function xm(e){Tm(),e.session=void 0}function Tm(){if(Vs())try{ee.sessionStorage.removeItem(Bs)}catch{}}function Xa(e){return e===void 0?!1:Math.random()<e}function Va(e){const t=Date.now(),n=e.id||Ee(),r=e.started||t,s=e.lastActivity||t,o=e.segmentId||0,i=e.sampled,c=e.previousSessionId;return{id:n,started:r,lastActivity:s,segmentId:o,sampled:i,previousSessionId:c}}function Ks(e){if(Vs())try{ee.sessionStorage.setItem(Bs,JSON.stringify(e))}catch{}}function Mm(e,t){return Xa(e)?"session":t?"buffer":!1}function ci({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const s=Mm(e,t),o=Va({sampled:s,previousSessionId:r});return n&&Ks(o),o}function Rm(){if(!Vs())return null;try{const e=ee.sessionStorage.getItem(Bs);if(!e)return null;const t=JSON.parse(e);return I&&R.infoTick("Loading existing session"),Va(t)}catch{return null}}function fs(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function Ka(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return fs(e.started,t,r)||fs(e.lastActivity,n,r)}function Ja(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!Ka(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Or({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const s=r.stickySession&&Rm();return s?Ja(s,{sessionIdleExpire:e,maxReplayDuration:t})?(I&&R.infoTick("Session in sessionStorage is expired, creating new one..."),ci(r,{previousSessionId:s.id})):s:(I&&R.infoTick("Creating new session"),ci(r,{previousSessionId:n}))}function Nm(e){return e.type===A.Custom}function Js(e,t,n){return Qa(e,t)?(Za(e,t,n),!0):!1}function Dm(e,t,n){return Qa(e,t)?Za(e,t,n):Promise.resolve(null)}async function Za(e,t,n){if(!e.eventBuffer)return null;try{n&&e.recordingMode==="buffer"&&e.eventBuffer.clear(),n&&(e.eventBuffer.hasCheckout=!0);const r=e.getOptions(),s=Am(t,r.beforeAddRecordingEvent);return s?await e.eventBuffer.addEvent(s):void 0}catch(r){const s=r&&r instanceof Xs?"addEventSizeExceeded":"addEvent";e.handleException(r),await e.stop({reason:s});const o=Z();o&&o.recordDroppedEvent("internal_sdk_error","replay")}}function Qa(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=Gs(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(I&&R.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function Am(e,t){try{if(typeof t=="function"&&Nm(e))return t(e)}catch(n){return I&&R.exception(n,"An error occured in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function Zs(e){return!e.type}function hs(e){return e.type==="transaction"}function Om(e){return e.type==="replay_event"}function ui(e){return e.type==="feedback"}function Lm(e){return(t,n)=>{if(!e.isEnabled()||!Zs(t)&&!hs(t))return;const r=n&&n.statusCode;if(!(!r||r<200||r>=300)){if(hs(t)){Pm(e,t);return}Fm(e,t)}}}function Pm(e,t){const n=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function Fm(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||$t(()=>{e.sendBufferedReplayOrFlush()})}function $m(e){return t=>{!e.isEnabled()||!Zs(t)||Bm(e,t)}}function Bm(e,t){const n=t.exception&&t.exception.values&&t.exception.values[0]&&t.exception.values[0].value;if(typeof n=="string"&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const r=Oe({category:"replay.hydrate-error",data:{url:ks()}});wn(e,r)}}function Um(e){const t=Z();t&&t.on("beforeAddBreadcrumb",n=>Hm(e,n))}function Hm(e,t){if(!e.isEnabled()||!ec(t))return;const n=zm(t);n&&wn(e,n)}function zm(e){return!ec(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?Wm(e):Oe(e)}function Wm(e){const t=e.data&&e.data.arguments;if(!Array.isArray(t)||t.length===0)return Oe(e);let n=!1;const r=t.map(s=>{if(!s)return s;if(typeof s=="string")return s.length>An?(n=!0,`${s.slice(0,An)}…`):s;if(typeof s=="object")try{const o=De(s,7);return JSON.stringify(o).length>An?(n=!0,`${JSON.stringify(o,null,2).slice(0,An)}…`):o}catch{}return s});return Oe({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function ec(e){return!!e.category}function jm(e,t){return e.type||!e.exception||!e.exception.values||!e.exception.values.length?!1:!!(t.originalException&&t.originalException.__rrweb__)}function qm(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:A.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function Ym(e,t){return e.recordingMode!=="buffer"||t.message===Us||!t.exception||t.type?!1:Xa(e.getOptions().errorSampleRate)}function Gm(e){return Object.assign((t,n)=>e.isEnabled()?Om(t)?(delete t.breadcrumbs,t):!Zs(t)&&!hs(t)&&!ui(t)||!e.checkAndHandleExpiredSession()?t:ui(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),qm(e,t),t):jm(t,n)&&!e.getOptions()._experiments.captureExceptions?(I&&R.log("Ignoring error from rrweb internals",t),null):((Ym(e,t)||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),t):t,{id:"Replay"})}function vr(e,t){return t.map(({type:n,start:r,end:s,name:o,data:i})=>{const c=e.throttledAddEvent({type:A.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:o,startTimestamp:r,endTimestamp:s,data:i}}});return typeof c=="string"?Promise.resolve(null):c})}function Xm(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function Vm(e){return t=>{if(!e.isEnabled())return;const n=Xm(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(vr(e,[n]),!1)))}}function Km(e,t){return I&&e.getOptions()._experiments.traceInternals?!1:jl(t,Z())}function tc(e,t){e.isEnabled()&&t!==null&&(Km(e,t.name)||e.addUpdate(()=>(vr(e,[t]),!0)))}function wr(e){if(!e)return;const t=new TextEncoder;try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=oc(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function nc(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function rc(e){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[oc(e)];if(!e)return[void 0]}catch(t){return I&&R.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return I&&R.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function cr(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function sc(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:s,method:o,statusCode:i,request:c,response:a}=t;return{type:e,start:n/1e3,end:r/1e3,name:s,data:me({method:o,statusCode:i,request:c,response:a})}}function fn(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function rt(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:s,warnings:o}=Jm(n);return r.body=s,o&&o.length>0&&(r._meta={warnings:o}),r}function ps(e,t){return Object.entries(e).reduce((n,[r,s])=>{const o=r.toLowerCase();return t.includes(o)&&e[r]&&(n[o]=s),n},{})}function oc(e){return new URLSearchParams(e).toString()}function Jm(e){if(!e||typeof e!="string")return{body:e};const t=e.length>Yo,n=Zm(e);if(t){const r=e.slice(0,Yo);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function Zm(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function ur(e,t){const n=Qm(e);return pn(n,t)}function Qm(e,t=ee.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(ee.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function e_(e,t,n){try{const r=await n_(e,t,n),s=sc("resource.fetch",r);tc(n.replay,s)}catch(r){I&&R.exception(r,"Failed to capture fetch breadcrumb")}}function t_(e,t){const{input:n,response:r}=t,s=n?ic(n):void 0,o=wr(s),i=r?nc(r.headers.get("content-length")):void 0;o!==void 0&&(e.data.request_body_size=o),i!==void 0&&(e.data.response_body_size=i)}async function n_(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:o=r}=t,{url:i,method:c,status_code:a=0,request_body_size:u,response_body_size:d}=e.data,l=ur(i,n.networkDetailAllowUrls)&&!ur(i,n.networkDetailDenyUrls),f=l?r_(n,t.input,u):fn(u),h=await s_(l,n,t.response,d);return{startTimestamp:s,endTimestamp:o,url:i,method:c,statusCode:a,request:f,response:h}}function r_({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const s=n?a_(n,t):{};if(!e)return rt(s,r,void 0);const o=ic(n),[i,c]=rc(o),a=rt(s,r,i);return c?cr(a,c):a}async function s_(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,s){if(!e&&s!==void 0)return fn(s);const o=r?ac(r.headers,n):{};if(!r||!t&&s!==void 0)return rt(o,s,void 0);const[i,c]=await i_(r),a=o_(i,{networkCaptureBodies:t,responseBodySize:s,captureDetails:e,headers:o});return c?cr(a,c):a}function o_(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:s}){try{const o=e&&e.length&&n===void 0?wr(e):n;return r?t?rt(s,o,e):rt(s,o,void 0):fn(o)}catch(o){return I&&R.exception(o,"Failed to serialize response body"),rt(s,n,void 0)}}async function i_(e){const t=c_(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await u_(t)]}catch(n){return I&&R.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"]}}function ic(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}function ac(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function a_(e,t){return e.length===1&&typeof e[0]!="string"?li(e[0],t):e.length===2?li(e[1],t):{}}function li(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?ac(n,t):Array.isArray(n)?{}:ps(n,t):{}}function c_(e){try{return e.clone()}catch(t){I&&R.exception(t,"Failed to clone response body")}}function u_(e){return new Promise((t,n)=>{const r=$t(()=>n(new Error("Timeout while trying to read response body")),500);l_(e).then(s=>t(s),s=>n(s)).finally(()=>clearTimeout(r))})}async function l_(e){return await e.text()}async function d_(e,t,n){try{const r=h_(e,t,n),s=sc("resource.xhr",r);tc(n.replay,s)}catch(r){I&&R.exception(r,"Failed to capture xhr breadcrumb")}}function f_(e,t){const{xhr:n,input:r}=t;if(!n)return;const s=wr(r),o=n.getResponseHeader("content-length")?nc(n.getResponseHeader("content-length")):g_(n.response,n.responseType);s!==void 0&&(e.data.request_body_size=s),o!==void 0&&(e.data.response_body_size=o)}function h_(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:o=r,input:i,xhr:c}=t,{url:a,method:u,status_code:d=0,request_body_size:l,response_body_size:f}=e.data;if(!a)return null;if(!c||!ur(a,n.networkDetailAllowUrls)||ur(a,n.networkDetailDenyUrls)){const k=fn(l),E=fn(f);return{startTimestamp:s,endTimestamp:o,url:a,method:u,statusCode:d,request:k,response:E}}const h=c[Ct],p=h?ps(h.request_headers,n.networkRequestHeaders):{},y=ps(p_(c),n.networkResponseHeaders),[g,_]=n.networkCaptureBodies?rc(i):[void 0],[v,x]=n.networkCaptureBodies?m_(c):[void 0],T=rt(p,l,g),P=rt(y,f,v);return{startTimestamp:s,endTimestamp:o,url:a,method:u,statusCode:d,request:_?cr(T,_):T,response:x?cr(P,x):P}}function p_(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
|
|
22
|
+
`).reduce((n,r)=>{const[s,o]=r.split(": ");return o&&(n[s.toLowerCase()]=o),n},{}):{}}function m_(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return __(e.response,e.responseType)}catch(n){t.push(n)}return I&&R.warn("Failed to get xhr response body",...t),[void 0]}function __(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return I&&R.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return I&&R.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function g_(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return wr(n)}catch{return}}function y_(e){const t=Z();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:o,networkResponseHeaders:i}=e.getOptions(),c={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:o,networkResponseHeaders:i};t&&t.on("beforeAddBreadcrumb",(a,u)=>S_(c,a,u))}catch{}}function S_(e,t,n){if(t.data)try{b_(t)&&v_(n)&&(f_(t,n),d_(t,n,e)),E_(t)&&w_(n)&&(t_(t,n),e_(t,n,e))}catch(r){I&&R.exception(r,"Error when enriching network breadcrumb")}}function b_(e){return e.category==="xhr"}function E_(e){return e.category==="fetch"}function v_(e){return e&&e.xhr}function w_(e){return e&&e.response}function k_(e){const t=Z();ga(em(e)),$s(Vm(e)),Um(e),y_(e);const n=Gm(e);Tl(n),t&&(t.on("beforeSendEvent",$m(e)),t.on("afterSendEvent",Lm(e)),t.on("createDsc",r=>{const s=e.getSessionId();s&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(r.replay_id=s)}),t.on("spanStart",r=>{e.lastActiveSpan=r}),t.on("spanEnd",r=>{e.lastActiveSpan=r}),t.on("beforeSendFeedback",(r,s)=>{const o=e.getSessionId();s&&s.includeReplay&&e.isEnabled()&&o&&r.contexts&&r.contexts.feedback&&(r.contexts.feedback.replay_id=o)}))}async function C_(e){try{return Promise.all(vr(e,[I_(ee.performance.memory)]))}catch{return[]}}function I_(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,s=Date.now()/1e3;return{type:"memory",name:"memory",start:s,end:s,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function x_(e,t,n){let r,s,o;const i=n&&n.maxWait?Math.max(n.maxWait,t):0;function c(){return a(),r=e(),r}function a(){s!==void 0&&clearTimeout(s),o!==void 0&&clearTimeout(o),s=o=void 0}function u(){return s!==void 0||o!==void 0?c():r}function d(){return s&&clearTimeout(s),s=$t(c,t),i&&o===void 0&&(o=$t(c,i)),r}return d.cancel=a,d.flush=u,d}function T_(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){I&&R.warn("Received replay event after session expired.");return}const s=r||!t;t=!0,e.clickDetector&&Vp(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&s&&e.setInitialState(),!Js(e,n,s))return!0;if(!s)return!1;if(R_(e,s),e.session&&e.session.previousSessionId)return!0;if(e.recordingMode==="buffer"&&e.session&&e.eventBuffer){const o=e.eventBuffer.getEarliestTimestamp();o&&(I&&R.info(`Updating session start time to earliest event in buffer to ${new Date(o)}`),e.session.started=o,e.getOptions().stickySession&&Ks(e.session))}return e.recordingMode==="session"&&e.flush(),!0})}}function M_(e){const t=e.getOptions();return{type:A.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function R_(e,t){!t||!e.session||e.session.segmentId!==0||Js(e,M_(e),!1)}function N_(e,t,n,r){return Yt(ji(e,Is(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function D_({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
|
|
23
|
+
`;if(typeof e=="string")n=`${r}${e}`;else{const o=new TextEncoder().encode(r);n=new Uint8Array(o.length+e.length),n.set(o),n.set(e,o.length)}return n}async function A_({client:e,scope:t,replayId:n,event:r}){const s=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,o={event_id:n,integrations:s};e.emit("preprocessEvent",r,o);const i=await Ki(e.getOptions(),r,o,t,e,Ge());if(!i)return null;i.platform=i.platform||"javascript";const c=e.getSdkMetadata(),{name:a,version:u}=c&&c.sdk||{};return i.sdk={...i.sdk,name:a||"sentry.javascript.unknown",version:u||"0.0.0"},i}async function O_({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:s,session:o}){const i=D_({recordingData:e,headers:{segment_id:n}}),{urls:c,errorIds:a,traceIds:u,initialTimestamp:d}=r,l=Z(),f=ye(),h=l&&l.getTransport(),p=l&&l.getDsn();if(!l||!h||!p||!o.sampled)return qe({});const y={type:_h,replay_start_timestamp:d/1e3,timestamp:s/1e3,error_ids:a,trace_ids:u,urls:c,replay_id:t,segment_id:n,replay_type:o.sampled},g=await A_({scope:f,client:l,replayId:t,event:y});if(!g)return l.recordDroppedEvent("event_processor","replay",y),I&&R.info("An event processor returned `null`, will not send event."),qe({});delete g.sdkProcessingMetadata;const _=N_(g,i,p,l.getOptions().tunnel);let v;try{v=await h.send(_)}catch(T){const P=new Error(Us);try{P.cause=T}catch{}throw P}if(typeof v.statusCode=="number"&&(v.statusCode<200||v.statusCode>=300))throw new cc(v.statusCode);const x=Yi({},v);if(qi(x,"replay"))throw new uc(x);return v}class cc extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class uc extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function lc(e,t={count:0,interval:vh}){const{recordingData:n,options:r}=e;if(n.length)try{return await O_(e),!0}catch(s){if(s instanceof cc||s instanceof uc)throw s;if(Il("Replays",{_retryCount:t.count}),I&&r._experiments&&r._experiments.captureExceptions&&Ns(s),t.count>=wh){const o=new Error(`${Us} - max retries exceeded`);try{o.cause=s}catch{}throw o}return t.interval*=++t.count,new Promise((o,i)=>{$t(async()=>{try{await lc(e,t),o(!0)}catch(c){i(c)}},t.interval)})}}const dc="__THROTTLED",L_="__SKIPPED";function P_(e,t,n){const r=new Map,s=c=>{const a=c-n;r.forEach((u,d)=>{d<a&&r.delete(d)})},o=()=>[...r.values()].reduce((c,a)=>c+a,0);let i=!1;return(...c)=>{const a=Math.floor(Date.now()/1e3);if(s(a),o()>=t){const d=i;return i=!0,d?L_:dc}i=!1;const u=r.get(a)||0;return r.set(a,u+1),e(...c)}}class et{constructor({options:t,recordingOptions:n}){et.prototype.__init.call(this),et.prototype.__init2.call(this),et.prototype.__init3.call(this),et.prototype.__init4.call(this),et.prototype.__init5.call(this),et.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:gh,sessionIdleExpire:yh},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=x_(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=P_((i,c)=>Dm(this,i,c),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:s}=this.getOptions(),o=r?{threshold:Math.min(kh,r),timeout:r,scrollTimeout:Ch,ignoreSelector:s?s.join(","):""}:void 0;if(o&&(this.clickDetector=new qp(this,o)),I){const i=t._experiments;R.setConfig({captureExceptions:!!i.captureExceptions,traceInternals:!!i.traceInternals})}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){I&&R.exception(t)}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options,s=n<=0&&r<=0;if(this._requiresManualStart=s,!s){if(this._initializeSessionForSampling(t),!this.session){I&&R.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",I&&R.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){I&&R.info("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){I&&R.info("Buffering is in progress, call `flush()` to save the replay");return}I&&R.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=Or({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this._initializeRecording()}startBuffering(){if(this._isEnabled){I&&R.info("Buffering is in progress, call `flush()` to save the replay");return}I&&R.infoTick("Starting replay in buffer mode");const t=Or({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=We({...this._recordingOptions,...this.recordingMode==="buffer"&&{checkoutEveryNms:Eh},emit:T_(this),onMutation:this._onMutationHandler,...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){if(this._isEnabled){this._isEnabled=!1;try{I&&R.info(`Stopping Replay${n?` triggered by ${n}`:""}`),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,xm(this)}catch(r){this.handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),I&&R.info("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),I&&R.info("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();I&&R.info("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode!=="buffer"&&n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(this._lastActivity&&fs(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${ee.location.pathname}${ee.location.hash}${ee.location.search}`,n=`${ee.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const r=this._throttledAddEvent(t,n);if(r===dc){const s=Oe({category:"replay.throttled"});this.addUpdate(()=>!Js(this,{type:$p,timestamp:s.timestamp||0,data:{tag:"breadcrumb",payload:s,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||rl(),n=t&&Ms(t),s=(n&&Pt(n).data||{})[Xi];if(!(!n||!s||!["route","custom"].includes(s)))return Pt(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=km({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=Or({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const t=this.session;return Ja(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{ee.document.addEventListener("visibilitychange",this._handleVisibilityChange),ee.addEventListener("blur",this._handleWindowBlur),ee.addEventListener("focus",this._handleWindowFocus),ee.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(k_(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=ym(this)}_removeListeners(){try{ee.document.removeEventListener("visibilitychange",this._handleVisibilityChange),ee.removeEventListener("blur",this._handleWindowBlur),ee.removeEventListener("focus",this._handleWindowFocus),ee.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}__init(){this._handleVisibilityChange=()=>{ee.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const t=Oe({category:"ui.blur"});this._doChangeToBackgroundTasks(t)}}__init3(){this._handleWindowFocus=()=>{const t=Oe({category:"ui.focus"});this._doChangeToForegroundTasks(t)}}__init4(){this._handleKeyboardEvent=t=>{sm(this,t)}}_doChangeToBackgroundTasks(t){!this.session||Ka(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){I&&R.info("Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:A.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){const t=cm(this.performanceEntries).concat(this.replayPerformanceEntries);return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(vr(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){I&&R.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!(!this.eventBuffer||!this.eventBuffer.hasEvents)&&(await C_(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const r=this._popEventContext(),s=this.session.segmentId++;this._maybeSaveSession();const o=await this.eventBuffer.finish();await lc({replayId:t,recordingData:o,segmentId:s,eventContext:r,session:this.session,options:this.getOptions(),timestamp:n})}catch(n){this.handleException(n),this.stop({reason:"sendReplay"});const r=Z();r&&r.recordDroppedEvent("send_error","replay")}}__init5(){this._flush=async({force:t=!1}={})=>{if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){I&&R.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,s=Date.now()-n;this._debouncedFlush.cancel();const o=s<this._options.minReplayDuration,i=s>this._options.maxReplayDuration+5e3;if(o||i){I&&R.info(`Session duration (${Math.floor(s/1e3)}s) is too ${o?"short":"long"}, not sending replay.`),o&&this._debouncedFlush();return}const c=this.eventBuffer;if(c&&this.session.segmentId===0&&!c.hasCheckout&&I&&R.info("Flushing initial segment without checkout."),!this._flushLock){this._flushLock=this._runFlush(),await this._flushLock,this._flushLock=void 0;return}try{await this._flushLock}catch(a){I&&R.error(a)}finally{this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&Ks(this.session)}__init6(){this._onMutationHandler=t=>{const n=t.length,r=this._options.mutationLimit,s=this._options.mutationBreadcrumbLimit,o=r&&n>r;if(n>s||o){const i=Oe({category:"replay.mutations",data:{count:n,limit:o}});this._createCustomBreadcrumb(i)}return o?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}}function Jt(e,t){return[...e,...t].join(",")}function F_({mask:e,unmask:t,block:n,unblock:r,ignore:s}){const o=['base[href="/"]'],i=Jt(e,[".sentry-mask","[data-sentry-mask]"]),c=Jt(t,[]);return{maskTextSelector:i,unmaskTextSelector:c,blockSelector:Jt(n,[".sentry-block","[data-sentry-block]",...o]),unblockSelector:Jt(r,[]),ignoreSelector:Jt(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function $_({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:s,value:o}){return!r||s.unmaskTextSelector&&e.matches(s.unmaskTextSelector)?o:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?o.replace(/[\S]/g,"*"):o}const di='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',B_=["content-length","content-type","accept"];let fi=!1;const U_=e=>new kr(e);class kr{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:t=Sh,flushMaxDelay:n=bh,minReplayDuration:r=Ih,maxReplayDuration:s=Go,stickySession:o=!0,useCompression:i=!0,workerUrl:c,_experiments:a={},maskAllText:u=!0,maskAllInputs:d=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:f=750,mutationLimit:h=1e4,slowClickTimeout:p=7e3,slowClickIgnoreSelectors:y=[],networkDetailAllowUrls:g=[],networkDetailDenyUrls:_=[],networkCaptureBodies:v=!0,networkRequestHeaders:x=[],networkResponseHeaders:T=[],mask:P=[],maskAttributes:k=["title","placeholder"],unmask:E=[],block:N=[],unblock:S=[],ignore:m=[],maskFn:b,beforeAddRecordingEvent:w,beforeErrorSampling:O}={}){this.name=kr.id;const z=F_({mask:P,unmask:E,block:N,unblock:S,ignore:m});if(this._recordingOptions={maskAllInputs:d,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:b,maskInputFn:b,maskAttributeFn:($,M,ue)=>$_({maskAttributes:k,maskAllText:u,privacyOptions:z,key:$,value:M,el:ue}),...z,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:$=>{try{$.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,xh),maxReplayDuration:Math.min(s,Go),stickySession:o,useCompression:i,workerUrl:c,blockAllMedia:l,maskAllInputs:d,maskAllText:u,mutationBreadcrumbLimit:f,mutationLimit:h,slowClickTimeout:p,slowClickIgnoreSelectors:y,networkDetailAllowUrls:g,networkDetailDenyUrls:_,networkCaptureBodies:v,networkRequestHeaders:hi(x),networkResponseHeaders:hi(T),beforeAddRecordingEvent:w,beforeErrorSampling:O,_experiments:a},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${di}`:di),this._isInitialized&&qr())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return fi}set _isInitialized(t){fi=t}afterAllSetup(t){!qr()||this._replay||(this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){if(!(!this._replay||!this._replay.isEnabled()))return this._replay.getSessionId()}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=H_(this._initialOptions,t);this._replay=new et({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}kr.__initStatic();function H_(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...me(e)},s=Jr(n.replaysSessionSampleRate),o=Jr(n.replaysOnErrorSampleRate);return s==null&&o==null&&qt(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),s!=null&&(r.sessionSampleRate=s),o!=null&&(r.errorSampleRate=o),r}function hi(e){return[...B_,...e.map(t=>t.toLowerCase())]}const Le=B,G=Le.document,Qt=Le.navigator,fc="Report a Bug",z_="Cancel",W_="Send Bug Report",j_="Confirm",q_="Report a Bug",Y_="your.email@example.org",G_="Email",X_="What's the bug? What did you expect?",V_="Description",K_="Your Name",J_="Name",Z_="Thank you for your report!",Q_="(required)",eg="Add a screenshot",tg="Remove screenshot",ng="widget",rg="api",sg=5e3,og=(e,t={includeReplay:!0})=>{if(!e.message)throw new Error("Unable to submit feedback with empty message");const n=Z();if(!n)throw new Error("No client setup, cannot send feedback.");e.tags&&Object.keys(e.tags).length&&ye().setTags(e.tags);const r=oa({source:rg,url:ks(),...e},t);return new Promise((s,o)=>{const i=setTimeout(()=>o("Unable to determine if Feedback was correctly sent."),5e3),c=n.on("afterSendEvent",(a,u)=>{if(a.event_id===r)return clearTimeout(i),c(),u&&typeof u.statusCode=="number"&&u.statusCode>=200&&u.statusCode<300&&s(r),u&&typeof u.statusCode=="number"&&u.statusCode===0?o("Unable to send Feedback. This is because of network issues, or because you are using an ad-blocker."):u&&typeof u.statusCode=="number"&&u.statusCode===403?o("Unable to send Feedback. This could be because this domain is not in your list of allowed domains."):o("Unable to send Feedback. This could be because of network issues, or because you are using an ad-blocker")})})},jn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function ig(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(Qt.userAgent)||/Macintosh/i.test(Qt.userAgent)&&Qt.maxTouchPoints&&Qt.maxTouchPoints>1||!isSecureContext)}function Fn(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 ag(e){const t=G.createElement("style");return t.textContent=`
|
|
24
|
+
.widget__actor {
|
|
25
|
+
position: fixed;
|
|
26
|
+
z-index: var(--z-index);
|
|
27
|
+
margin: var(--page-margin);
|
|
28
|
+
inset: var(--actor-inset);
|
|
29
|
+
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
gap: 8px;
|
|
33
|
+
padding: 16px;
|
|
34
|
+
|
|
35
|
+
font-family: inherit;
|
|
36
|
+
font-size: var(--font-size);
|
|
37
|
+
font-weight: 600;
|
|
38
|
+
line-height: 1.14em;
|
|
39
|
+
text-decoration: none;
|
|
40
|
+
|
|
41
|
+
background: var(--actor-background, var(--background));
|
|
42
|
+
border-radius: var(--actor-border-radius, 1.7em/50%);
|
|
43
|
+
border: var(--actor-border, var(--border));
|
|
44
|
+
box-shadow: var(--actor-box-shadow, var(--box-shadow));
|
|
45
|
+
color: var(--actor-color, var(--foreground));
|
|
46
|
+
fill: var(--actor-color, var(--foreground));
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
opacity: 1;
|
|
49
|
+
transition: transform 0.2s ease-in-out;
|
|
50
|
+
transform: translate(0, 0) scale(1);
|
|
51
|
+
}
|
|
52
|
+
.widget__actor[aria-hidden="true"] {
|
|
53
|
+
opacity: 0;
|
|
54
|
+
pointer-events: none;
|
|
55
|
+
visibility: hidden;
|
|
56
|
+
transform: translate(0, 16px) scale(0.98);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.widget__actor:hover {
|
|
60
|
+
background: var(--actor-hover-background, var(--background));
|
|
61
|
+
filter: var(--interactive-filter);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.widget__actor svg {
|
|
65
|
+
width: 1.14em;
|
|
66
|
+
height: 1.14em;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@media (max-width: 600px) {
|
|
70
|
+
.widget__actor span {
|
|
71
|
+
display: none;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
`,e&&t.setAttribute("nonce",e),t}function be(e,t){return Object.entries(t).forEach(([n,r])=>{e.setAttributeNS(null,n,r)}),e}const wt=20,cg="http://www.w3.org/2000/svg";function ug(){const e=c=>Le.document.createElementNS(cg,c),t=be(e("svg"),{width:`${wt}`,height:`${wt}`,viewBox:`0 0 ${wt} ${wt}`,fill:"var(--foreground)"}),n=be(e("g"),{clipPath:"url(#clip0_57_80)"}),r=be(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 s=e("defs"),o=be(e("clipPath"),{id:"clip0_57_80"}),i=be(e("rect"),{width:`${wt}`,height:`${wt}`,fill:"white"});return o.appendChild(i),s.appendChild(o),t.appendChild(s).appendChild(o).appendChild(i),t}function lg({triggerLabel:e,triggerAriaLabel:t,shadow:n,styleNonce:r}){const s=G.createElement("button");if(s.type="button",s.className="widget__actor",s.ariaHidden="false",s.ariaLabel=t||e||fc,s.appendChild(ug()),e){const i=G.createElement("span");i.appendChild(G.createTextNode(e)),s.appendChild(i)}const o=ag(r);return{el:s,appendToDom(){n.appendChild(o),n.appendChild(s)},removeFromDom(){n.removeChild(s),n.removeChild(o)},show(){s.ariaHidden="false"},hide(){s.ariaHidden="true"}}}const hc="rgba(88, 74, 192, 1)",dg={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:hc,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%)"},pi={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackground:hc,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 mi(e){return`
|
|
75
|
+
--foreground: ${e.foreground};
|
|
76
|
+
--background: ${e.background};
|
|
77
|
+
--accent-foreground: ${e.accentForeground};
|
|
78
|
+
--accent-background: ${e.accentBackground};
|
|
79
|
+
--success-color: ${e.successColor};
|
|
80
|
+
--error-color: ${e.errorColor};
|
|
81
|
+
--border: ${e.border};
|
|
82
|
+
--box-shadow: ${e.boxShadow};
|
|
83
|
+
--outline: ${e.outline};
|
|
84
|
+
--interactive-filter: ${e.interactiveFilter};
|
|
85
|
+
`}function fg({colorScheme:e,themeDark:t,themeLight:n,styleNonce:r}){const s=G.createElement("style");return s.textContent=`
|
|
86
|
+
:host {
|
|
87
|
+
--font-family: system-ui, 'Helvetica Neue', Arial, sans-serif;
|
|
88
|
+
--font-size: 14px;
|
|
89
|
+
--z-index: 100000;
|
|
90
|
+
|
|
91
|
+
--page-margin: 16px;
|
|
92
|
+
--inset: auto 0 0 auto;
|
|
93
|
+
--actor-inset: var(--inset);
|
|
94
|
+
|
|
95
|
+
font-family: var(--font-family);
|
|
96
|
+
font-size: var(--font-size);
|
|
97
|
+
|
|
98
|
+
${e!=="system"?"color-scheme: only light;":""}
|
|
99
|
+
|
|
100
|
+
${mi(e==="dark"?{...pi,...t}:{...dg,...n})}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
${e==="system"?`
|
|
104
|
+
@media (prefers-color-scheme: dark) {
|
|
105
|
+
:host {
|
|
106
|
+
${mi({...pi,...t})}
|
|
107
|
+
}
|
|
108
|
+
}`:""}
|
|
109
|
+
}
|
|
110
|
+
`,r&&s.setAttribute("nonce",r),s}const hg=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>({id:s="sentry-feedback",autoInject:o=!0,showBranding:i=!0,isEmailRequired:c=!1,isNameRequired:a=!1,showEmail:u=!0,showName:d=!0,enableScreenshot:l=!0,useSentryUser:f={email:"email",name:"username"},tags:h,styleNonce:p,scriptNonce:y,colorScheme:g="system",themeLight:_={},themeDark:v={},addScreenshotButtonLabel:x=eg,cancelButtonLabel:T=z_,confirmButtonLabel:P=j_,emailLabel:k=G_,emailPlaceholder:E=Y_,formTitle:N=q_,isRequiredLabel:S=Q_,messageLabel:m=V_,messagePlaceholder:b=X_,nameLabel:w=J_,namePlaceholder:O=K_,removeScreenshotButtonLabel:z=tg,submitButtonLabel:$=W_,successMessageText:M=Z_,triggerLabel:ue=fc,triggerAriaLabel:F="",onFormOpen:ne,onFormClose:fe,onSubmitSuccess:Ce,onSubmitError:it,onFormSubmitted:Gt}={})=>{const Ne={id:s,autoInject:o,showBranding:i,isEmailRequired:c,isNameRequired:a,showEmail:u,showName:d,enableScreenshot:l,useSentryUser:f,tags:h,styleNonce:p,scriptNonce:y,colorScheme:g,themeDark:v,themeLight:_,triggerLabel:ue,triggerAriaLabel:F,cancelButtonLabel:T,submitButtonLabel:$,confirmButtonLabel:P,formTitle:N,emailLabel:k,emailPlaceholder:E,messageLabel:m,messagePlaceholder:b,nameLabel:w,namePlaceholder:O,successMessageText:M,isRequiredLabel:S,addScreenshotButtonLabel:x,removeScreenshotButtonLabel:z,onFormClose:fe,onFormOpen:ne,onSubmitError:it,onSubmitSuccess:Ce,onFormSubmitted:Gt};let ve=null,Pe=[];const St=X=>{if(!ve){const ie=G.createElement("div");ie.id=String(X.id),G.body.appendChild(ie),ve=ie.attachShadow({mode:"open"}),ve.appendChild(fg(X))}return ve},bt=async(X,ie,de)=>{const te=Z(),ae=te&&te.getIntegrationByName(X);if(ae)return ae;const Ie=(ie&&ie()||await e(de,y))();return te&&te.addIntegration(Ie),Ie},Xt=async X=>{const ie=X.enableScreenshot&&ig(),[de,te]=await Promise.all([bt("FeedbackModal",t,"feedbackModalIntegration"),ie?bt("FeedbackScreenshot",n,"feedbackScreenshotIntegration"):void 0]);if(!de)throw jn&&C.error("[Feedback] Missing feedback modal integration. Try using `feedbackSyncIntegration` in your `Sentry.init`."),new Error("[Feedback] Missing feedback modal integration!");ie&&!te&&jn&&C.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.");const ae=de.createDialog({options:{...X,onFormClose:()=>{ae&&ae.close(),X.onFormClose&&X.onFormClose()},onFormSubmitted:()=>{ae&&ae.close(),X.onFormSubmitted&&X.onFormSubmitted()}},screenshotIntegration:ie?te:void 0,sendFeedback:og,shadow:St(X)});return ae},at=(X,ie={})=>{const de=Fn(Ne,ie),te=typeof X=="string"?G.querySelector(X):typeof X.addEventListener=="function"?X:null;if(!te)throw jn&&C.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let ae=null;const ct=async()=>{ae||(ae=await Xt({...de,onFormSubmitted:()=>{ae&&ae.removeFromDom(),de.onFormSubmitted&&de.onFormSubmitted()}})),ae.appendToDom(),ae.open()};te.addEventListener("click",ct);const Ie=()=>{Pe=Pe.filter(Vt=>Vt!==Ie),ae&&ae.removeFromDom(),ae=null,te.removeEventListener("click",ct)};return Pe.push(Ie),Ie},Et=(X={})=>{const ie=Fn(Ne,X),de=St(ie),te=lg({triggerLabel:ie.triggerLabel,triggerAriaLabel:ie.triggerAriaLabel,shadow:de,styleNonce:p});return at(te.el,{...ie,onFormOpen(){te.hide()},onFormClose(){te.show()},onFormSubmitted(){te.show()}}),te};return{name:"Feedback",setupOnce(){!qr()||!Ne.autoInject||(G.readyState==="loading"?G.addEventListener("DOMContentLoaded",()=>Et().appendToDom()):Et().appendToDom())},attachTo:at,createWidget(X={}){const ie=Et(Fn(Ne,X));return ie.appendToDom(),ie},async createForm(X={}){return Xt(Fn(Ne,X))},remove(){ve&&(ve.parentElement&&ve.parentElement.remove(),ve=null),Pe.forEach(X=>X()),Pe=[]}}};var Cr,J,pc,lt,_i,mc,ms,hn={},Qs=[],pg=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,eo=Array.isArray;function tt(e,t){for(var n in t)e[n]=t[n];return e}function _c(e){var t=e.parentNode;t&&t.removeChild(e)}function L(e,t,n){var r,s,o,i={};for(o in t)o=="key"?r=t[o]:o=="ref"?s=t[o]:i[o]=t[o];if(arguments.length>2&&(i.children=arguments.length>3?Cr.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)i[o]===void 0&&(i[o]=e.defaultProps[o]);return qn(e,i,r,s,null)}function qn(e,t,n,r,s){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:s??++pc,__i:-1,__u:0};return s==null&&J.vnode!=null&&J.vnode(o),o}function kn(e){return e.children}function Yn(e,t){this.props=e,this.context=t}function zt(e,t){if(t==null)return e.__?zt(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"?zt(e):null}function mg(e,t,n){var r,s=e.__v,o=s.__e,i=e.__P;if(i)return(r=tt({},s)).__v=s.__v+1,J.vnode&&J.vnode(r),to(i,r,s,e.__n,i.ownerSVGElement!==void 0,32&s.__u?[o]:null,t,o??zt(s),!!(32&s.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=o&&gc(r),r}function gc(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 gc(e)}}function gi(e){(!e.__d&&(e.__d=!0)&<.push(e)&&!lr.__r++||_i!==J.debounceRendering)&&((_i=J.debounceRendering)||mc)(lr)}function lr(){var e,t,n,r=[],s=[];for(lt.sort(ms);e=lt.shift();)e.__d&&(n=lt.length,t=mg(e,r,s)||t,n===0||lt.length>n?(_s(r,t,s),s.length=r.length=0,t=void 0,lt.sort(ms)):t&&J.__c&&J.__c(t,Qs));t&&_s(r,t,s),lr.__r=0}function yc(e,t,n,r,s,o,i,c,a,u,d){var l,f,h,p,y,g=r&&r.__k||Qs,_=t.length;for(n.__d=a,_g(n,t,g),a=n.__d,l=0;l<_;l++)(h=n.__k[l])!=null&&typeof h!="boolean"&&typeof h!="function"&&(f=h.__i===-1?hn:g[h.__i]||hn,h.__i=l,to(e,h,f,s,o,i,c,a,u,d),p=h.__e,h.ref&&f.ref!=h.ref&&(f.ref&&no(f.ref,null,h),d.push(h.ref,h.__c||p,h)),y==null&&p!=null&&(y=p),65536&h.__u||f.__k===h.__k?a=Sc(h,a,e):typeof h.type=="function"&&h.__d!==void 0?a=h.__d:p&&(a=p.nextSibling),h.__d=void 0,h.__u&=-196609);n.__d=a,n.__e=y}function _g(e,t,n){var r,s,o,i,c,a=t.length,u=n.length,d=u,l=0;for(e.__k=[],r=0;r<a;r++)(s=e.__k[r]=(s=t[r])==null||typeof s=="boolean"||typeof s=="function"?null:typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?qn(null,s,null,null,s):eo(s)?qn(kn,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?qn(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s)!=null?(s.__=e,s.__b=e.__b+1,c=gg(s,n,i=r+l,d),s.__i=c,o=null,c!==-1&&(d--,(o=n[c])&&(o.__u|=131072)),o==null||o.__v===null?(c==-1&&l--,typeof s.type!="function"&&(s.__u|=65536)):c!==i&&(c===i+1?l++:c>i?d>a-i?l+=c-i:l--:l=c<i&&c==i-1?c-i:0,c!==r+l&&(s.__u|=65536))):(o=n[r])&&o.key==null&&o.__e&&(o.__e==e.__d&&(e.__d=zt(o)),gs(o,o,!1),n[r]=null,d--);if(d)for(r=0;r<u;r++)(o=n[r])!=null&&!(131072&o.__u)&&(o.__e==e.__d&&(e.__d=zt(o)),gs(o,o))}function Sc(e,t,n){var r,s;if(typeof e.type=="function"){for(r=e.__k,s=0;r&&s<r.length;s++)r[s]&&(r[s].__=e,t=Sc(r[s],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 gg(e,t,n,r){var s=e.key,o=e.type,i=n-1,c=n+1,a=t[n];if(a===null||a&&s==a.key&&o===a.type)return n;if(r>(a!=null&&!(131072&a.__u)?1:0))for(;i>=0||c<t.length;){if(i>=0){if((a=t[i])&&!(131072&a.__u)&&s==a.key&&o===a.type)return i;i--}if(c<t.length){if((a=t[c])&&!(131072&a.__u)&&s==a.key&&o===a.type)return c;c++}}return-1}function yi(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||pg.test(t)?n:n+"px"}function $n(e,t,n,r,s){var o;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||yi(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||yi(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=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+o]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,o?bi:Si,o)):e.removeEventListener(t,o?bi:Si,o);else{if(s)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 Si(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(J.event?J.event(e):e)}}function bi(e){if(this.l)return this.l[e.type+!0](J.event?J.event(e):e)}function to(e,t,n,r,s,o,i,c,a,u){var d,l,f,h,p,y,g,_,v,x,T,P,k,E,N,S=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(a=!!(32&n.__u),o=[c=t.__e=n.__e]),(d=J.__b)&&d(t);e:if(typeof S=="function")try{if(_=t.props,v=(d=S.contextType)&&r[d.__c],x=d?v?v.props.value:d.__:r,n.__c?g=(l=t.__c=n.__c).__=l.__E:("prototype"in S&&S.prototype.render?t.__c=l=new S(_,x):(t.__c=l=new Yn(_,x),l.constructor=S,l.render=Sg),v&&v.sub(l),l.props=_,l.state||(l.state={}),l.context=x,l.__n=r,f=l.__d=!0,l.__h=[],l._sb=[]),l.__s==null&&(l.__s=l.state),S.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=tt({},l.__s)),tt(l.__s,S.getDerivedStateFromProps(_,l.__s))),h=l.props,p=l.state,l.__v=t,f)S.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(S.getDerivedStateFromProps==null&&_!==h&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(_,x),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(_,l.__s,x)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(l.props=_,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(m){m&&(m.__=t)}),T=0;T<l._sb.length;T++)l.__h.push(l._sb[T]);l._sb=[],l.__h.length&&i.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(_,l.__s,x),l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(h,p,y)})}if(l.context=x,l.props=_,l.__P=e,l.__e=!1,P=J.__r,k=0,"prototype"in S&&S.prototype.render){for(l.state=l.__s,l.__d=!1,P&&P(t),d=l.render(l.props,l.state,l.context),E=0;E<l._sb.length;E++)l.__h.push(l._sb[E]);l._sb=[]}else do l.__d=!1,P&&P(t),d=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++k<25);l.state=l.__s,l.getChildContext!=null&&(r=tt(tt({},r),l.getChildContext())),f||l.getSnapshotBeforeUpdate==null||(y=l.getSnapshotBeforeUpdate(h,p)),yc(e,eo(N=d!=null&&d.type===kn&&d.key==null?d.props.children:d)?N:[N],t,n,r,s,o,i,c,a,u),l.base=t.__e,t.__u&=-161,l.__h.length&&i.push(l),g&&(l.__E=l.__=null)}catch(m){t.__v=null,a||o!=null?(t.__e=c,t.__u|=a?160:32,o[o.indexOf(c)]=null):(t.__e=n.__e,t.__k=n.__k),J.__e(m,t,n)}else o==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=yg(n.__e,t,n,r,s,o,i,a,u);(d=J.diffed)&&d(t)}function _s(e,t,n){for(var r=0;r<n.length;r++)no(n[r],n[++r],n[++r]);J.__c&&J.__c(t,e),e.some(function(s){try{e=s.__h,s.__h=[],e.some(function(o){o.call(s)})}catch(o){J.__e(o,s.__v)}})}function yg(e,t,n,r,s,o,i,c,a){var u,d,l,f,h,p,y,g=n.props,_=t.props,v=t.type;if(v==="svg"&&(s=!0),o!=null){for(u=0;u<o.length;u++)if((h=o[u])&&"setAttribute"in h==!!v&&(v?h.localName===v:h.nodeType===3)){e=h,o[u]=null;break}}if(e==null){if(v===null)return document.createTextNode(_);e=s?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,_.is&&_),o=null,c=!1}if(v===null)g===_||c&&e.data===_||(e.data=_);else{if(o=o&&Cr.call(e.childNodes),g=n.props||hn,!c&&o!=null)for(g={},u=0;u<e.attributes.length;u++)g[(h=e.attributes[u]).name]=h.value;for(u in g)h=g[u],u=="children"||(u=="dangerouslySetInnerHTML"?l=h:u==="key"||u in _||$n(e,u,null,h,s));for(u in _)h=_[u],u=="children"?f=h:u=="dangerouslySetInnerHTML"?d=h:u=="value"?p=h:u=="checked"?y=h:u==="key"||c&&typeof h!="function"||g[u]===h||$n(e,u,h,g[u],s);if(d)c||l&&(d.__html===l.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(l&&(e.innerHTML=""),yc(e,eo(f)?f:[f],t,n,r,s&&v!=="foreignObject",o,i,o?o[0]:n.__k&&zt(n,0),c,a),o!=null)for(u=o.length;u--;)o[u]!=null&&_c(o[u]);c||(u="value",p!==void 0&&(p!==e[u]||v==="progress"&&!p||v==="option"&&p!==g[u])&&$n(e,u,p,g[u],!1),u="checked",y!==void 0&&y!==e[u]&&$n(e,u,y,g[u],!1))}return e}function no(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){J.__e(r,n)}}function gs(e,t,n){var r,s;if(J.unmount&&J.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||no(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){J.__e(o,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(s=0;s<r.length;s++)r[s]&&gs(r[s],t,n||typeof e.type!="function");n||e.__e==null||_c(e.__e),e.__=e.__e=e.__d=void 0}function Sg(e,t,n){return this.constructor(e,n)}function bg(e,t,n){var r,s,o,i;J.__&&J.__(e,t),s=(r=typeof n=="function")?null:n&&n.__k||t.__k,o=[],i=[],to(t,e=(!r&&n||t).__k=L(kn,null,[e]),s||hn,hn,t.ownerSVGElement!==void 0,!r&&n?[n]:s?null:t.firstChild?Cr.call(t.childNodes):null,o,!r&&n?n:s?s.__e:t.firstChild,r,i),e.__d=void 0,_s(o,e,i)}Cr=Qs.slice,J={__e:function(e,t,n,r){for(var s,o,i;t=t.__;)if((s=t.__c)&&!s.__)try{if((o=s.constructor)&&o.getDerivedStateFromError!=null&&(s.setState(o.getDerivedStateFromError(e)),i=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(e,r||{}),i=s.__d),i)return s.__E=s}catch(c){e=c}throw e}},pc=0,Yn.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=tt({},this.state),typeof e=="function"&&(e=e(tt({},n),this.props)),e&&tt(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),gi(this))},Yn.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),gi(this))},Yn.prototype.render=kn,lt=[],mc=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ms=function(e,t){return e.__v.__b-t.__v.__b},lr.__r=0;var Ye,K,Lr,Ei,Wt=0,bc=[],Gn=[],oe=J,vi=oe.__b,wi=oe.__r,ki=oe.diffed,Ci=oe.__c,Ii=oe.unmount,xi=oe.__;function yt(e,t){oe.__h&&oe.__h(K,e,Wt||t),Wt=0;var n=K.__H||(K.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Gn}),n.__[e]}function Nt(e){return Wt=1,Ec(wc,e)}function Ec(e,t,n){var r=yt(Ye++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):wc(void 0,t),function(c){var a=r.__N?r.__N[0]:r.__[0],u=r.t(a,c);a!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=K,!K.u)){var s=function(c,a,u){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(f){return!!f.__c});if(d.every(function(f){return!f.__N}))return!o||o.call(this,c,a,u);var l=!1;return d.forEach(function(f){if(f.__N){var h=f.__[0];f.__=f.__N,f.__N=void 0,h!==f.__[0]&&(l=!0)}}),!(!l&&r.__c.props===c)&&(!o||o.call(this,c,a,u))};K.u=!0;var o=K.shouldComponentUpdate,i=K.componentWillUpdate;K.componentWillUpdate=function(c,a,u){if(this.__e){var d=o;o=void 0,s(c,a,u),o=d}i&&i.call(this,c,a,u)},K.shouldComponentUpdate=s}return r.__N||r.__}function Eg(e,t){var n=yt(Ye++,3);!oe.__s&&ro(n.__H,t)&&(n.__=e,n.i=t,K.__H.__h.push(n))}function vc(e,t){var n=yt(Ye++,4);!oe.__s&&ro(n.__H,t)&&(n.__=e,n.i=t,K.__h.push(n))}function vg(e){return Wt=5,Cn(function(){return{current:e}},[])}function wg(e,t,n){Wt=6,vc(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 Cn(e,t){var n=yt(Ye++,7);return ro(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Dt(e,t){return Wt=8,Cn(function(){return e},t)}function kg(e){var t=K.context[e.__c],n=yt(Ye++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(K)),t.props.value):e.__}function Cg(e,t){oe.useDebugValue&&oe.useDebugValue(t?t(e):e)}function Ig(e){var t=yt(Ye++,10),n=Nt();return t.__=e,K.componentDidCatch||(K.componentDidCatch=function(r,s){t.__&&t.__(r,s),n[1](r)}),[n[0],function(){n[1](void 0)}]}function xg(){var e=yt(Ye++,11);if(!e.__){for(var t=K.__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 Tg(){for(var e;e=bc.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Xn),e.__H.__h.forEach(ys),e.__H.__h=[]}catch(t){e.__H.__h=[],oe.__e(t,e.__v)}}oe.__b=function(e){K=null,vi&&vi(e)},oe.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),xi&&xi(e,t)},oe.__r=function(e){wi&&wi(e),Ye=0;var t=(K=e.__c).__H;t&&(Lr===K?(t.__h=[],K.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Gn,n.__N=n.i=void 0})):(t.__h.forEach(Xn),t.__h.forEach(ys),t.__h=[],Ye=0)),Lr=K},oe.diffed=function(e){ki&&ki(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(bc.push(t)!==1&&Ei===oe.requestAnimationFrame||((Ei=oe.requestAnimationFrame)||Mg)(Tg)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Gn&&(n.__=n.__V),n.i=void 0,n.__V=Gn})),Lr=K=null},oe.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Xn),n.__h=n.__h.filter(function(r){return!r.__||ys(r)})}catch(r){t.some(function(s){s.__h&&(s.__h=[])}),t=[],oe.__e(r,n.__v)}}),Ci&&Ci(e,t)},oe.unmount=function(e){Ii&&Ii(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Xn(r)}catch(s){t=s}}),n.__H=void 0,t&&oe.__e(t,n.__v))};var Ti=typeof requestAnimationFrame=="function";function Mg(e){var t,n=function(){clearTimeout(r),Ti&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Ti&&(t=requestAnimationFrame(n))}function Xn(e){var t=K,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),K=t}function ys(e){var t=K;e.__c=e.__(),K=t}function ro(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function wc(e,t){return typeof t=="function"?t(e):t}const Rg={__proto__:null,useCallback:Dt,useContext:kg,useDebugValue:Cg,useEffect:Eg,useErrorBoundary:Ig,useId:xg,useImperativeHandle:wg,useLayoutEffect:vc,useMemo:Cn,useReducer:Ec,useRef:vg,useState:Nt},Ng="http://www.w3.org/2000/svg";function Dg(){const e=r=>G.createElementNS(Ng,r),t=be(e("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),n=be(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 Mi="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/modal/components/DialogHeader.tsx";function Ag({options:e}){const t=Cn(()=>({__html:Dg().outerHTML}),[]);return L("h2",{class:"dialog__header",__self:this,__source:{fileName:Mi,lineNumber:16}},e.formTitle,e.showBranding?L("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:t,__self:this,__source:{fileName:Mi,lineNumber:19}}):null)}function Og(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 re="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/modal/components/Form.tsx";function Pr(e,t){const n=e.get(t);return typeof n=="string"?n.trim():""}function Lg({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:s,onSubmitSuccess:o,onSubmitError:i,showEmail:c,showName:a,screenshotInput:u}){const{tags:d,addScreenshotButtonLabel:l,removeScreenshotButtonLabel:f,cancelButtonLabel:h,emailLabel:p,emailPlaceholder:y,isEmailRequired:g,isNameRequired:_,messageLabel:v,messagePlaceholder:x,nameLabel:T,namePlaceholder:P,submitButtonLabel:k,isRequiredLabel:E}=e,[N,S]=Nt(null),[m,b]=Nt(!1),w=u&&u.input,[O,z]=Nt(null),$=Dt(F=>{z(F),b(!1)},[]),M=Dt(F=>{const ne=Og(F,{emailLabel:p,isEmailRequired:g,isNameRequired:_,messageLabel:v,nameLabel:T});return ne.length>0?S(`Please enter in the following required fields: ${ne.join(", ")}`):S(null),ne.length===0},[p,g,_,v,T]),ue=Dt(async F=>{try{if(F.preventDefault(),!(F.target instanceof HTMLFormElement))return;const ne=new FormData(F.target),fe=await(u&&m?u.value():void 0),Ce={name:Pr(ne,"name"),email:Pr(ne,"email"),message:Pr(ne,"message"),attachments:fe?[fe]:void 0};if(!M(Ce))return;try{await s({name:Ce.name,email:Ce.email,message:Ce.message,source:ng,tags:d},{attachments:Ce.attachments}),o(Ce)}catch(it){jn&&C.error(it),S(it),i(it)}}catch{}},[u&&m,o,i]);return L("form",{class:"form",onSubmit:ue,__self:this,__source:{fileName:re,lineNumber:144}},w&&m?L(w,{onError:$,__self:this,__source:{fileName:re,lineNumber:146}}):null,L("div",{class:"form__right","data-sentry-feedback":!0,__self:this,__source:{fileName:re,lineNumber:149}},L("div",{class:"form__top",__self:this,__source:{fileName:re,lineNumber:150}},N?L("div",{class:"form__error-container",__self:this,__source:{fileName:re,lineNumber:151}},N):null,a?L("label",{for:"name",class:"form__label",__self:this,__source:{fileName:re,lineNumber:154}},L(Fr,{label:T,isRequiredLabel:E,isRequired:_,__self:this,__source:{fileName:re,lineNumber:155}}),L("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:P,required:_,type:"text",__self:this,__source:{fileName:re,lineNumber:156}})):L("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden",__self:this,__source:{fileName:re,lineNumber:167}}),c?L("label",{for:"email",class:"form__label",__self:this,__source:{fileName:re,lineNumber:171}},L(Fr,{label:p,isRequiredLabel:E,isRequired:g,__self:this,__source:{fileName:re,lineNumber:172}}),L("input",{class:"form__input",defaultValue:t,id:"email",name:"email",placeholder:y,required:g,type:"email",__self:this,__source:{fileName:re,lineNumber:173}})):L("input",{"aria-hidden":!0,value:t,name:"email",type:"hidden",__self:this,__source:{fileName:re,lineNumber:184}}),L("label",{for:"message",class:"form__label",__self:this,__source:{fileName:re,lineNumber:187}},L(Fr,{label:v,isRequiredLabel:E,isRequired:!0,__self:this,__source:{fileName:re,lineNumber:188}}),L("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:x,required:!0,rows:5,__self:this,__source:{fileName:re,lineNumber:189}})),w?L("label",{for:"screenshot",class:"form__label",__self:this,__source:{fileName:re,lineNumber:201}},L("button",{class:"btn btn--default",type:"button",onClick:()=>{z(null),b(F=>!F)},__self:this,__source:{fileName:re,lineNumber:202}},m?f:l),O?L("div",{class:"form__error-container",__self:this,__source:{fileName:re,lineNumber:212}},O.message):null):null),L("div",{class:"btn-group",__self:this,__source:{fileName:re,lineNumber:216}},L("button",{class:"btn btn--primary",type:"submit",__self:this,__source:{fileName:re,lineNumber:217}},k),L("button",{class:"btn btn--default",type:"button",onClick:r,__self:this,__source:{fileName:re,lineNumber:220}},h))))}function Fr({label:e,isRequired:t,isRequiredLabel:n}){return L("span",{class:"form__label__text",__self:this,__source:{fileName:re,lineNumber:239}},e,t&&L("span",{class:"form__label__text--required",__self:this,__source:{fileName:re,lineNumber:241}},n))}const Bn=16,Ri=17,Pg="http://www.w3.org/2000/svg";function Fg(){const e=a=>Le.document.createElementNS(Pg,a),t=be(e("svg"),{width:`${Bn}`,height:`${Ri}`,viewBox:`0 0 ${Bn} ${Ri}`,fill:"inherit"}),n=be(e("g"),{clipPath:"url(#clip0_57_156)"}),r=be(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"}),s=be(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(s,r);const o=e("defs"),i=be(e("clipPath"),{id:"clip0_57_156"}),c=be(e("rect"),{width:`${Bn}`,height:`${Bn}`,fill:"white",transform:"translate(0 0.5)"});return i.appendChild(c),o.appendChild(i),t.appendChild(o).appendChild(i).appendChild(c),t}const Fe="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/modal/components/Dialog.tsx";function $g({open:e,onFormSubmitted:t,...n}){const r=n.options,s=Cn(()=>({__html:Fg().outerHTML}),[]),[o,i]=Nt(null),c=Dt(()=>{o&&(clearTimeout(o),i(null)),t()},[o]),a=Dt(u=>{n.onSubmitSuccess(u),i(setTimeout(()=>{t(),i(null)},sg))},[t]);return L(kn,{__self:this,__source:{fileName:Fe,lineNumber:48}},o?L("div",{class:"success__position",onClick:c,__self:this,__source:{fileName:Fe,lineNumber:50}},L("div",{class:"success__content",__self:this,__source:{fileName:Fe,lineNumber:51}},r.successMessageText,L("span",{class:"success__icon",dangerouslySetInnerHTML:s,__self:this,__source:{fileName:Fe,lineNumber:53}}))):L("dialog",{class:"dialog",onClick:r.onFormClose,open:e,__self:this,__source:{fileName:Fe,lineNumber:57}},L("div",{class:"dialog__position",__self:this,__source:{fileName:Fe,lineNumber:58}},L("div",{class:"dialog__content",onClick:u=>{u.stopPropagation()},__self:this,__source:{fileName:Fe,lineNumber:59}},L(Ag,{options:r,__self:this,__source:{fileName:Fe,lineNumber:66}}),L(Lg,{...n,onSubmitSuccess:a,__self:this,__source:{fileName:Fe,lineNumber:67}})))))}const Bg=`
|
|
111
|
+
.dialog {
|
|
112
|
+
position: fixed;
|
|
113
|
+
z-index: var(--z-index);
|
|
114
|
+
margin: 0;
|
|
115
|
+
inset: 0;
|
|
116
|
+
|
|
117
|
+
display: flex;
|
|
118
|
+
align-items: center;
|
|
119
|
+
justify-content: center;
|
|
120
|
+
padding: 0;
|
|
121
|
+
height: 100vh;
|
|
122
|
+
width: 100vw;
|
|
123
|
+
|
|
124
|
+
color: var(--dialog-color, var(--foreground));
|
|
125
|
+
fill: var(--dialog-color, var(--foreground));
|
|
126
|
+
line-height: 1.75em;
|
|
127
|
+
|
|
128
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
129
|
+
border: none;
|
|
130
|
+
inset: 0;
|
|
131
|
+
opacity: 1;
|
|
132
|
+
transition: opacity 0.2s ease-in-out;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.dialog__position {
|
|
136
|
+
position: fixed;
|
|
137
|
+
z-index: var(--z-index);
|
|
138
|
+
inset: var(--dialog-inset);
|
|
139
|
+
padding: var(--page-margin);
|
|
140
|
+
display: flex;
|
|
141
|
+
max-height: calc(100vh - (2 * var(--page-margin)));
|
|
142
|
+
}
|
|
143
|
+
@media (max-width: 600px) {
|
|
144
|
+
.dialog__position {
|
|
145
|
+
inset: var(--page-margin);
|
|
146
|
+
padding: 0;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.dialog__position:has(.editor) {
|
|
151
|
+
inset: var(--page-margin);
|
|
152
|
+
padding: 0;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.dialog:not([open]) {
|
|
156
|
+
opacity: 0;
|
|
157
|
+
pointer-events: none;
|
|
158
|
+
visibility: hidden;
|
|
159
|
+
}
|
|
160
|
+
.dialog:not([open]) .dialog__content {
|
|
161
|
+
transform: translate(0, -16px) scale(0.98);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.dialog__content {
|
|
165
|
+
display: flex;
|
|
166
|
+
flex-direction: column;
|
|
167
|
+
gap: 16px;
|
|
168
|
+
padding: var(--dialog-padding, 24px);
|
|
169
|
+
max-width: 100%;
|
|
170
|
+
width: 100%;
|
|
171
|
+
max-height: 100%;
|
|
172
|
+
overflow: auto;
|
|
173
|
+
|
|
174
|
+
background: var(--dialog-background, var(--background));
|
|
175
|
+
border-radius: var(--dialog-border-radius, 20px);
|
|
176
|
+
border: var(--dialog-border, var(--border));
|
|
177
|
+
box-shadow: var(--dialog-box-shadow, var(--box-shadow));
|
|
178
|
+
transform: translate(0, 0) scale(1);
|
|
179
|
+
transition: transform 0.2s ease-in-out;
|
|
180
|
+
}
|
|
181
|
+
`,Ug=`
|
|
182
|
+
.dialog__header {
|
|
183
|
+
display: flex;
|
|
184
|
+
align-items: center;
|
|
185
|
+
justify-content: space-between;
|
|
186
|
+
font-weight: var(--dialog-header-weight, 600);
|
|
187
|
+
margin: 0;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.brand-link {
|
|
191
|
+
display: inline-flex;
|
|
192
|
+
}
|
|
193
|
+
.brand-link:focus-visible {
|
|
194
|
+
outline: var(--outline);
|
|
195
|
+
}
|
|
196
|
+
`,Hg=`
|
|
197
|
+
.form {
|
|
198
|
+
display: flex;
|
|
199
|
+
overflow: auto;
|
|
200
|
+
flex-direction: row;
|
|
201
|
+
gap: 16px;
|
|
202
|
+
flex: 1 0;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.form__right {
|
|
206
|
+
flex: 0 0 var(--form-width, 272px);
|
|
207
|
+
width: var(--form-width, 272px);
|
|
208
|
+
display: flex;
|
|
209
|
+
overflow: auto;
|
|
210
|
+
flex-direction: column;
|
|
211
|
+
justify-content: space-between;
|
|
212
|
+
gap: 20px;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
@media (max-width: 600px) {
|
|
216
|
+
.form__right {
|
|
217
|
+
width: auto;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.form__top {
|
|
222
|
+
display: flex;
|
|
223
|
+
flex-direction: column;
|
|
224
|
+
gap: 8px;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.form__error-container {
|
|
228
|
+
color: var(--error-color);
|
|
229
|
+
fill: var(--error-color);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.form__label {
|
|
233
|
+
display: flex;
|
|
234
|
+
flex-direction: column;
|
|
235
|
+
gap: 4px;
|
|
236
|
+
margin: 0px;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.form__label__text {
|
|
240
|
+
display: flex;
|
|
241
|
+
gap: 4px;
|
|
242
|
+
align-items: center;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.form__label__text--required {
|
|
246
|
+
font-size: 0.85em;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.form__input {
|
|
250
|
+
font-family: inherit;
|
|
251
|
+
line-height: inherit;
|
|
252
|
+
background: transparent;
|
|
253
|
+
box-sizing: border-box;
|
|
254
|
+
border: var(--input-border, var(--border));
|
|
255
|
+
border-radius: var(--input-border-radius, 6px);
|
|
256
|
+
color: var(--input-color, inherit);
|
|
257
|
+
fill: var(--input-color, inherit);
|
|
258
|
+
font-size: var(--input-font-size, inherit);
|
|
259
|
+
font-weight: var(--input-font-weight, 500);
|
|
260
|
+
padding: 6px 12px;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.form__input::placeholder {
|
|
264
|
+
opacity: 0.65;
|
|
265
|
+
color: var(--input-placeholder-color, inherit);
|
|
266
|
+
filter: var(--interactive-filter);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.form__input:focus-visible {
|
|
270
|
+
outline: var(--input-focus-outline, var(--outline));
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.form__input--textarea {
|
|
274
|
+
font-family: inherit;
|
|
275
|
+
resize: vertical;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.error {
|
|
279
|
+
color: var(--error-color);
|
|
280
|
+
fill: var(--error-color);
|
|
281
|
+
}
|
|
282
|
+
`,zg=`
|
|
283
|
+
.btn-group {
|
|
284
|
+
display: grid;
|
|
285
|
+
gap: 8px;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.btn {
|
|
289
|
+
line-height: inherit;
|
|
290
|
+
border: var(--button-border, var(--border));
|
|
291
|
+
border-radius: var(--button-border-radius, 6px);
|
|
292
|
+
cursor: pointer;
|
|
293
|
+
font-family: inherit;
|
|
294
|
+
font-size: var(--button-font-size, inherit);
|
|
295
|
+
font-weight: var(--button-font-weight, 600);
|
|
296
|
+
padding: var(--button-padding, 6px 16px);
|
|
297
|
+
}
|
|
298
|
+
.btn[disabled] {
|
|
299
|
+
opacity: 0.6;
|
|
300
|
+
pointer-events: none;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.btn--primary {
|
|
304
|
+
color: var(--button-primary-color, var(--accent-foreground));
|
|
305
|
+
fill: var(--button-primary-color, var(--accent-foreground));
|
|
306
|
+
background: var(--button-primary-background, var(--accent-background));
|
|
307
|
+
border: var(--button-primary-border, var(--border));
|
|
308
|
+
border-radius: var(--button-primary-border-radius, 6px);
|
|
309
|
+
font-weight: var(--button-primary-font-weight, 500);
|
|
310
|
+
}
|
|
311
|
+
.btn--primary:hover {
|
|
312
|
+
color: var(--button-primary-hover-color, var(--accent-foreground));
|
|
313
|
+
fill: var(--button-primary-hover-color, var(--accent-foreground));
|
|
314
|
+
background: var(--button-primary-hover-background, var(--accent-background));
|
|
315
|
+
filter: var(--interactive-filter);
|
|
316
|
+
}
|
|
317
|
+
.btn--primary:focus-visible {
|
|
318
|
+
background: var(--button-primary-hover-background, var(--accent-background));
|
|
319
|
+
filter: var(--interactive-filter);
|
|
320
|
+
outline: var(--button-primary-focus-outline, var(--outline));
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.btn--default {
|
|
324
|
+
color: var(--button-color, var(--foreground));
|
|
325
|
+
fill: var(--button-color, var(--foreground));
|
|
326
|
+
background: var(--button-background, var(--background));
|
|
327
|
+
border: var(--button-border, var(--border));
|
|
328
|
+
border-radius: var(--button-border-radius, 6px);
|
|
329
|
+
font-weight: var(--button-font-weight, 500);
|
|
330
|
+
}
|
|
331
|
+
.btn--default:hover {
|
|
332
|
+
color: var(--button-color, var(--foreground));
|
|
333
|
+
fill: var(--button-color, var(--foreground));
|
|
334
|
+
background: var(--button-hover-background, var(--background));
|
|
335
|
+
filter: var(--interactive-filter);
|
|
336
|
+
}
|
|
337
|
+
.btn--default:focus-visible {
|
|
338
|
+
background: var(--button-hover-background, var(--background));
|
|
339
|
+
filter: var(--interactive-filter);
|
|
340
|
+
outline: var(--button-focus-outline, var(--outline));
|
|
341
|
+
}
|
|
342
|
+
`,Wg=`
|
|
343
|
+
.success__position {
|
|
344
|
+
position: fixed;
|
|
345
|
+
inset: var(--dialog-inset);
|
|
346
|
+
padding: var(--page-margin);
|
|
347
|
+
z-index: var(--z-index);
|
|
348
|
+
}
|
|
349
|
+
.success__content {
|
|
350
|
+
background: var(--success-background, var(--background));
|
|
351
|
+
border: var(--success-border, var(--border));
|
|
352
|
+
border-radius: var(--success-border-radius, 1.7em/50%);
|
|
353
|
+
box-shadow: var(--success-box-shadow, var(--box-shadow));
|
|
354
|
+
font-weight: var(--success-font-weight, 600);
|
|
355
|
+
color: var(--success-color);
|
|
356
|
+
fill: var(--success-color);
|
|
357
|
+
padding: 12px 24px;
|
|
358
|
+
line-height: 1.75em;
|
|
359
|
+
|
|
360
|
+
display: grid;
|
|
361
|
+
align-items: center;
|
|
362
|
+
grid-auto-flow: column;
|
|
363
|
+
gap: 6px;
|
|
364
|
+
cursor: default;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.success__icon {
|
|
368
|
+
display: flex;
|
|
369
|
+
}
|
|
370
|
+
`;function jg(e){const t=G.createElement("style");return t.textContent=`
|
|
371
|
+
:host {
|
|
372
|
+
--dialog-inset: var(--inset);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
${Bg}
|
|
376
|
+
${Ug}
|
|
377
|
+
${Hg}
|
|
378
|
+
${zg}
|
|
379
|
+
${Wg}
|
|
380
|
+
`,e&&t.setAttribute("nonce",e),t}const qg="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/modal/integration.tsx";function Yg(){const e=ye().getUser(),t=Ge().getUser(),n=Gi().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}const Gg=()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{const s=r,o=e.useSentryUser,i=Yg(),c=G.createElement("div"),a=jg(e.styleNonce);let u="";const d={get el(){return c},appendToDom(){!s.contains(a)&&!s.contains(c)&&(s.appendChild(a),s.appendChild(c))},removeFromDom(){s.removeChild(c),s.removeChild(a),G.body.style.overflow=u},open(){f(!0),e.onFormOpen&&e.onFormOpen(),u=G.body.style.overflow,G.body.style.overflow="hidden"},close(){f(!1),G.body.style.overflow=u}},l=t&&t.createInput({h:L,hooks:Rg,dialog:d,options:e}),f=h=>{bg(L($g,{options:e,screenshotInput:l,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:o&&i&&i[o.name]||"",defaultEmail:o&&i&&i[o.email]||"",onFormClose:()=>{f(!1),e.onFormClose&&e.onFormClose()},onSubmit:n,onSubmitSuccess:p=>{f(!1),e.onSubmitSuccess&&e.onSubmitSuccess(p)},onSubmitError:p=>{e.onSubmitError&&e.onSubmitError(p)},onFormSubmitted:()=>{e.onFormSubmitted&&e.onFormSubmitted()},open:h,__self:void 0,__source:{fileName:qg,lineNumber:67}}),c)};return d}}),Xg="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/screenshot/components/CropCorner.tsx";function Vg({h:e}){return function({top:n,left:r,corner:s,onGrabButton:o}){return e("button",{class:`editor__crop-corner editor__crop-corner--${s} `,style:{top:n,left:r},onMouseDown:i=>{i.preventDefault(),o(i,s)},onClick:i=>{i.preventDefault()},__self:this,__source:{fileName:Xg,lineNumber:22}})}}function Kg(e){const t=G.createElement("style"),n="#1A141F",r="#302735";return t.textContent=`
|
|
381
|
+
.editor {
|
|
382
|
+
padding: 10px;
|
|
383
|
+
padding-top: 65px;
|
|
384
|
+
padding-bottom: 65px;
|
|
385
|
+
flex-grow: 1;
|
|
386
|
+
|
|
387
|
+
background-color: ${n};
|
|
388
|
+
background-image: repeating-linear-gradient(
|
|
389
|
+
-145deg,
|
|
390
|
+
transparent,
|
|
391
|
+
transparent 8px,
|
|
392
|
+
${n} 8px,
|
|
393
|
+
${n} 11px
|
|
394
|
+
),
|
|
395
|
+
repeating-linear-gradient(
|
|
396
|
+
-45deg,
|
|
397
|
+
transparent,
|
|
398
|
+
transparent 15px,
|
|
399
|
+
${r} 15px,
|
|
400
|
+
${r} 16px
|
|
401
|
+
);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
.editor__canvas-container {
|
|
405
|
+
width: 100%;
|
|
406
|
+
height: 100%;
|
|
407
|
+
position: relative;
|
|
408
|
+
display: flex;
|
|
409
|
+
align-items: center;
|
|
410
|
+
justify-content: center;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
.editor__canvas-container canvas {
|
|
414
|
+
object-fit: contain;
|
|
415
|
+
position: relative;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.editor__crop-btn-group {
|
|
419
|
+
padding: 8px;
|
|
420
|
+
gap: 8px;
|
|
421
|
+
border-radius: var(--menu-border-radius, 6px);
|
|
422
|
+
background: var(--button-primary-background, var(--background));
|
|
423
|
+
width: 175px;
|
|
424
|
+
position: absolute;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
.editor__crop-corner {
|
|
428
|
+
width: 30px;
|
|
429
|
+
height: 30px;
|
|
430
|
+
position: absolute;
|
|
431
|
+
background: none;
|
|
432
|
+
border: 3px solid #ffffff;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
.editor__crop-corner--top-left {
|
|
436
|
+
cursor: nwse-resize;
|
|
437
|
+
border-right: none;
|
|
438
|
+
border-bottom: none;
|
|
439
|
+
}
|
|
440
|
+
.editor__crop-corner--top-right {
|
|
441
|
+
cursor: nesw-resize;
|
|
442
|
+
border-left: none;
|
|
443
|
+
border-bottom: none;
|
|
444
|
+
}
|
|
445
|
+
.editor__crop-corner--bottom-left {
|
|
446
|
+
cursor: nesw-resize;
|
|
447
|
+
border-right: none;
|
|
448
|
+
border-top: none;
|
|
449
|
+
}
|
|
450
|
+
.editor__crop-corner--bottom-right {
|
|
451
|
+
cursor: nwse-resize;
|
|
452
|
+
border-left: none;
|
|
453
|
+
border-top: none;
|
|
454
|
+
}
|
|
455
|
+
`,e&&t.setAttribute("nonce",e),t}function Jg({hooks:e}){return function({onBeforeScreenshot:n,onScreenshot:r,onAfterScreenshot:s,onError:o}){e.useEffect(()=>{(async()=>{n();const c=await Qt.mediaDevices.getDisplayMedia({video:{width:Le.innerWidth*Le.devicePixelRatio,height:Le.innerHeight*Le.devicePixelRatio},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),a=G.createElement("video");await new Promise((u,d)=>{a.srcObject=c,a.onloadedmetadata=()=>{r(a),c.getTracks().forEach(l=>l.stop()),u()},a.play().catch(d)}),s()})().catch(o)},[])}}const we="/home/runner/work/sentry-javascript/sentry-javascript/packages/feedback/src/screenshot/components/ScreenshotEditor.tsx",en=30,$e=3,Xe=en+$e,_e=Le.devicePixelRatio,Zt=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)}),$r=e=>{const t=e.clientHeight,n=e.clientWidth,r=e.width/e.height;let s=t*r,o=t;s>n&&(s=n,o=n/r);const i=(n-s)/2,c=(t-o)/2;return{startX:i,startY:c,endX:s+i,endY:o+c}};function Zg({h:e,hooks:t,imageBuffer:n,dialog:r,options:s}){const o=Jg({hooks:t});return function({onError:c}){const a=t.useMemo(()=>({__html:Kg(s.styleNonce).innerText}),[]),u=Vg({h:e}),d=t.useRef(null),l=t.useRef(null),f=t.useRef(null),[h,p]=t.useState({startX:0,startY:0,endX:0,endY:0}),[y,g]=t.useState(!1),[_,v]=t.useState(!1);t.useEffect(()=>{Le.addEventListener("resize",x,!1)},[]);function x(){const S=f.current,m=Zt($r(n));if(S){S.width=m.width*_e,S.height=m.height*_e,S.style.width=`${m.width}px`,S.style.height=`${m.height}px`;const w=S.getContext("2d");w&&w.scale(_e,_e)}const b=l.current;b&&(b.style.width=`${m.width}px`,b.style.height=`${m.height}px`),p({startX:0,startY:0,endX:m.width,endY:m.height})}t.useEffect(()=>{const S=f.current;if(!S)return;const m=S.getContext("2d");if(!m)return;const b=Zt($r(n)),w=Zt(h);m.clearRect(0,0,b.width,b.height),m.fillStyle="rgba(0, 0, 0, 0.5)",m.fillRect(0,0,b.width,b.height),m.clearRect(w.x,w.y,w.width,w.height),m.strokeStyle="#ffffff",m.lineWidth=3,m.strokeRect(w.x+1,w.y+1,w.width-2,w.height-2),m.strokeStyle="#000000",m.lineWidth=1,m.strokeRect(w.x+3,w.y+3,w.width-6,w.height-6)},[h]);function T(S,m){g(!1),v(!0);const b=P(m),w=()=>{G.removeEventListener("mousemove",b),G.removeEventListener("mouseup",w),g(!0),v(!1)};G.addEventListener("mouseup",w),G.addEventListener("mousemove",b)}const P=t.useCallback(S=>function(m){if(!f.current)return;const b=f.current,w=b.getBoundingClientRect(),O=m.clientX-w.x,z=m.clientY-w.y;switch(S){case"top-left":p($=>({...$,startX:Math.min(Math.max(0,O),$.endX-Xe),startY:Math.min(Math.max(0,z),$.endY-Xe)}));break;case"top-right":p($=>({...$,endX:Math.max(Math.min(O,b.width/_e),$.startX+Xe),startY:Math.min(Math.max(0,z),$.endY-Xe)}));break;case"bottom-left":p($=>({...$,startX:Math.min(Math.max(0,O),$.endX-Xe),endY:Math.max(Math.min(z,b.height/_e),$.startY+Xe)}));break;case"bottom-right":p($=>({...$,endX:Math.max(Math.min(O,b.width/_e),$.startX+Xe),endY:Math.max(Math.min(z,b.height/_e),$.startY+Xe)}));break}},[]),k=t.useRef({initialX:0,initialY:0});function E(S){if(_)return;k.current={initialX:S.clientX,initialY:S.clientY};const m=w=>{const O=f.current;if(!O)return;const z=w.clientX-k.current.initialX,$=w.clientY-k.current.initialY;p(M=>{const ue=Math.max(0,Math.min(M.startX+z,O.width/_e-(M.endX-M.startX))),F=Math.max(0,Math.min(M.startY+$,O.height/_e-(M.endY-M.startY))),ne=ue+(M.endX-M.startX),fe=F+(M.endY-M.startY);return k.current.initialX=w.clientX,k.current.initialY=w.clientY,{startX:ue,startY:F,endX:ne,endY:fe}})},b=()=>{G.removeEventListener("mousemove",m),G.removeEventListener("mouseup",b)};G.addEventListener("mousemove",m),G.addEventListener("mouseup",b)}function N(){const S=G.createElement("canvas"),m=Zt($r(n)),b=Zt(h);S.width=b.width*_e,S.height=b.height*_e;const w=S.getContext("2d");w&&n&&w.drawImage(n,b.x/m.width*n.width,b.y/m.height*n.height,b.width/m.width*n.width,b.height/m.height*n.height,0,0,S.width,S.height);const O=n.getContext("2d");O&&(O.clearRect(0,0,n.width,n.height),n.width=S.width,n.height=S.height,n.style.width=`${b.width}px`,n.style.height=`${b.height}px`,O.drawImage(S,0,0),x())}return o({onBeforeScreenshot:t.useCallback(()=>{r.el.style.display="none"},[]),onScreenshot:t.useCallback(S=>{const m=n.getContext("2d");if(!m)throw new Error("Could not get canvas context");n.width=S.videoWidth,n.height=S.videoHeight,n.style.width="100%",n.style.height="100%",m.drawImage(S,0,0)},[n]),onAfterScreenshot:t.useCallback(()=>{r.el.style.display="block";const S=d.current;S&&S.appendChild(n),x()},[]),onError:t.useCallback(S=>{r.el.style.display="block",c(S)},[])}),e("div",{class:"editor",__self:this,__source:{fileName:we,lineNumber:315}},e("style",{nonce:s.styleNonce,dangerouslySetInnerHTML:a,__self:this,__source:{fileName:we,lineNumber:316}}),e("div",{class:"editor__canvas-container",ref:d,__self:this,__source:{fileName:we,lineNumber:317}},e("div",{class:"editor__crop-container",style:{position:"absolute",zIndex:1},ref:l,__self:this,__source:{fileName:we,lineNumber:318}},e("canvas",{onMouseDown:E,style:{position:"absolute",cursor:y?"move":"auto"},ref:f,__self:this,__source:{fileName:we,lineNumber:319}}),e(u,{left:h.startX-$e,top:h.startY-$e,onGrabButton:T,corner:"top-left",__self:this,__source:{fileName:we,lineNumber:324}}),e(u,{left:h.endX-en+$e,top:h.startY-$e,onGrabButton:T,corner:"top-right",__self:this,__source:{fileName:we,lineNumber:330}}),e(u,{left:h.startX-$e,top:h.endY-en+$e,onGrabButton:T,corner:"bottom-left",__self:this,__source:{fileName:we,lineNumber:336}}),e(u,{left:h.endX-en+$e,top:h.endY-en+$e,onGrabButton:T,corner:"bottom-right",__self:this,__source:{fileName:we,lineNumber:342}}),e("div",{style:{left:Math.max(0,h.endX-191),top:Math.max(0,h.endY+8),display:y?"flex":"none"},class:"editor__crop-btn-group",__self:this,__source:{fileName:we,lineNumber:348}},e("button",{onClick:S=>{S.preventDefault(),f.current&&p({startX:0,startY:0,endX:f.current.width/_e,endY:f.current.height/_e}),g(!1)},class:"btn btn--default",__self:this,__source:{fileName:we,lineNumber:356}},s.cancelButtonLabel),e("button",{onClick:S=>{S.preventDefault(),N(),g(!1)},class:"btn btn--primary",__self:this,__source:{fileName:we,lineNumber:373}},s.confirmButtonLabel)))))}}const Qg=()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{const s=G.createElement("canvas");return{input:Zg({h:e,hooks:t,imageBuffer:s,dialog:n,options:r}),value:async()=>{const o=await new Promise(i=>{s.toBlob(i,"image/png")});if(o)return{data:new Uint8Array(await o.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}}),ey=hg({lazyLoadIntegration:ph,getModalIntegration:()=>Gg,getScreenshotIntegration:()=>Qg});exports.captureFeedback=oa;exports.captureMessage=Cl;exports.feedbackSyncIntegration=ey;exports.init=dh;exports.isInitialized=xl;exports.replayIntegration=U_;
|