@letscooee/web-sdk 13.1.11 → 13.1.13
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/.release-it.json +1 -1
- package/dist/chunk-BIEFC1bG-O9o-0wf6.js +15 -0
- package/dist/debugger.component-BNl5T8Oq-CCsu6jm4.js +12 -0
- package/dist/esm-DKhFdjmg-vxI_Qn9S.js +23 -0
- package/dist/main.min.js +68 -5
- package/dist/renderer-BZ_aYsz_-DBEn5kf6.js +6 -0
- package/dist/share-dialog.component-C0AjtP26-CmZTeB2B.js +8 -0
- package/dist/{widget.min.css → styles.min.css} +1 -1
- package/dist/video-detail-dialog.component-mG6ikv4x-DowKli6K.js +15 -0
- package/dist/widgets-B3EF6aEn-B8-8vMIl.js +45 -0
- package/package.json +26 -27
- package/dist/chunk-7XDM4HDH.js +0 -1
- package/dist/chunk-BJ5UBWZZ.js +0 -1
- package/dist/chunk-CFZOV3EF.js +0 -6
- package/dist/chunk-GIEYLCFF.js +0 -4
- package/dist/chunk-JAIJ74CO.js +0 -39
- package/dist/chunk-MHKDPBHM.js +0 -8
- package/dist/chunk-U4XWPFUW.js +0 -1
- package/dist/chunk-Z7UUW7XD.js +0 -10
- package/dist/chunk-ZFMH37WK.js +0 -2
- package/dist/debugger.component-UQRQT3KM.js +0 -7
- package/dist/esm-EYV26LOR.js +0 -498
- package/dist/renderer-7THALERZ.js +0 -1
- package/dist/sdk-debug-logs-PG5BE6E3.js +0 -1
- package/dist/share-dialog.component-OXWTLKYG.js +0 -1
- package/dist/video-detail-dialog.component-E4FB7GMC.js +0 -2
- package/dist/widget.min.js +0 -20
package/dist/esm-EYV26LOR.js
DELETED
|
@@ -1,498 +0,0 @@
|
|
|
1
|
-
import{a as m,b as E,d as dn,f as eg}from"./chunk-U4XWPFUW.js";var T=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var x=globalThis;var ut="9.42.0";function Ve(){return fn(x),x}function fn(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||ut,t[ut]=t[ut]||{}}function Qt(e,t,n=x){let r=n.__SENTRY__=n.__SENTRY__||{},o=r[ut]=r[ut]||{};return o[e]||(o[e]=t())}var Mn=["debug","info","warn","error","log","assert","trace"],tg="Sentry Logger ",ar={};function Be(e){if(!("console"in x))return e();let t=x.console,n={},r=Object.keys(ar);r.forEach(o=>{let i=ar[o];n[o]=t[o],t[o]=i});try{return e()}finally{r.forEach(o=>{t[o]=n[o]})}}function ng(){ma().enabled=!0}function rg(){ma().enabled=!1}function Tl(){return ma().enabled}function og(...e){pa("log",...e)}function ig(...e){pa("warn",...e)}function sg(...e){pa("error",...e)}function pa(e,...t){T&&Tl()&&Be(()=>{x.console[e](`${tg}[${e}]:`,...t)})}function ma(){return T?Qt("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var g={enable:ng,disable:rg,isEnabled:Tl,log:og,warn:ig,error:sg};var Il=/\(error: (.*)\)/,vl=/captureMessage|captureException/;function ti(...e){let t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,o=0)=>{let i=[],s=n.split(`
|
|
2
|
-
`);for(let a=r;a<s.length;a++){let c=s[a];if(c.length>1024)continue;let u=Il.test(c)?c.replace(Il,"$1"):c;if(!u.match(/\S*Error: /)){for(let d of t){let l=d(u);if(l){i.push(l);break}}if(i.length>=50+o)break}}return wl(i.slice(o))}}function ga(e){return Array.isArray(e)?ti(...e):e}function wl(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(ei(t).function||"")&&t.pop(),t.reverse(),vl.test(ei(t).function||"")&&(t.pop(),vl.test(ei(t).function||"")&&t.pop()),t.slice(0,50).map(n=>E(m({},n),{filename:n.filename||ei(t).filename,function:n.function||"?"}))}function ei(e){return e[e.length-1]||{}}var ha="<anonymous>";function tt(e){try{return!e||typeof e!="function"?ha:e.name||ha}catch{return ha}}function cr(e){let t=e.exception;if(t){let n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}var ni={},Rl={};function He(e,t){ni[e]=ni[e]||[],ni[e].push(t)}function $e(e,t){if(!Rl[e]){Rl[e]=!0;try{t()}catch(n){T&&g.error(`Error while instrumenting ${e}`,n)}}}function xe(e,t){let n=e&&ni[e];if(n)for(let r of n)try{r(t)}catch(o){T&&g.error(`Error while triggering instrumentation handler.
|
|
3
|
-
Type: ${e}
|
|
4
|
-
Name: ${tt(r)}
|
|
5
|
-
Error:`,o)}}var _a=null;function Kr(e){let t="error";He(t,e),$e(t,ag)}function ag(){_a=x.onerror,x.onerror=function(e,t,n,r,o){return xe("error",{column:r,error:o,line:n,msg:e,url:t}),_a?_a.apply(this,arguments):!1},x.onerror.__SENTRY_INSTRUMENTED__=!0}var Sa=null;function Xr(e){let t="unhandledrejection";He(t,e),$e(t,cg)}function cg(){Sa=x.onunhandledrejection,x.onunhandledrejection=function(e){return xe("unhandledrejection",e),Sa?Sa.apply(this,arguments):!0},x.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var xl=Object.prototype.toString;function nt(e){switch(xl.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return lt(e,Error)}}function ur(e,t){return xl.call(e)===`[object ${t}]`}function ri(e){return ur(e,"ErrorEvent")}function oi(e){return ur(e,"DOMError")}function ya(e){return ur(e,"DOMException")}function Me(e){return ur(e,"String")}function pn(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function yt(e){return e===null||pn(e)||typeof e!="object"&&typeof e!="function"}function We(e){return ur(e,"Object")}function On(e){return typeof Event<"u"&<(e,Event)}function Ea(e){return typeof Element<"u"&<(e,Element)}function ba(e){return ur(e,"RegExp")}function Mt(e){return!!(e?.then&&typeof e.then=="function")}function Ta(e){return We(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function lt(e,t){try{return e instanceof t}catch{return!1}}function Zr(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function ii(e){return typeof Request<"u"&<(e,Request)}var Ia=x,ug=80;function Ce(e,t={}){if(!e)return"<unknown>";try{let n=e,r=5,o=[],i=0,s=0,a=" > ",c=a.length,u,d=Array.isArray(t)?t:t.keyAttrs,l=!Array.isArray(t)&&t.maxStringLength||ug;for(;n&&i++<r&&(u=lg(n,d),!(u==="html"||i>1&&s+o.length*c+u.length>=l));)o.push(u),s+=u.length,n=n.parentNode;return o.reverse().join(a)}catch{return"<unknown>"}}function lg(e,t){let n=e,r=[];if(!n?.tagName)return"";if(Ia.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());let o=t?.length?t.filter(s=>n.getAttribute(s)).map(s=>[s,n.getAttribute(s)]):null;if(o?.length)o.forEach(s=>{r.push(`[${s[0]}="${s[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let s=n.className;if(s&&Me(s)){let a=s.split(/\s+/);for(let c of a)r.push(`.${c}`)}}let i=["aria-label","type","name","title","alt"];for(let s of i){let a=n.getAttribute(s);a&&r.push(`[${s}="${a}"]`)}return r.join("")}function Ye(){try{return Ia.document.location.href}catch{return""}}function Qr(e){if(!Ia.HTMLElement)return null;let t=e,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}function Et(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function eo(e,t){let n=e,r=n.length;if(r<=150)return n;t>r&&(t=r);let o=Math.max(t-60,0);o<5&&(o=0);let i=Math.min(o+140,r);return i>r-5&&(i=r),i===r&&(o=Math.max(i-140,0)),n=n.slice(o,i),o>0&&(n=`'{snip} ${n}`),i<r&&(n+=" {snip}"),n}function Ln(e,t){if(!Array.isArray(e))return"";let n=[];for(let r=0;r<e.length;r++){let o=e[r];try{Zr(o)?n.push("[VueViewModel]"):n.push(String(o))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function Cl(e,t,n=!1){return Me(e)?ba(t)?t.test(e):Me(t)?n?e===t:e.includes(t):!1:!1}function Pe(e,t=[],n=!1){return t.some(r=>Cl(e,r,n))}function Ee(e,t,n){if(!(t in e))return;let r=e[t];if(typeof r!="function")return;let o=n(r);typeof o=="function"&&si(o,r);try{e[t]=o}catch{T&&g.log(`Failed to replace method "${t}" in object`,e)}}function he(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{T&&g.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function si(e,t){try{let n=t.prototype||{};e.prototype=t.prototype=n,he(e,"__sentry_original__",t)}catch{}}function Dn(e){return e.__sentry_original__}function ai(e){if(nt(e))return m({message:e.message,name:e.name,stack:e.stack},kl(e));if(On(e)){let t=m({type:e.type,target:Al(e.target),currentTarget:Al(e.currentTarget)},kl(e));return typeof CustomEvent<"u"&<(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Al(e){try{return Ea(e)?Ce(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function kl(e){if(typeof e=="object"&&e!==null){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function va(e,t=40){let n=Object.keys(ai(e));n.sort();let r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return Et(r,t);for(let o=n.length;o>0;o--){let i=n.slice(0,o).join(", ");if(!(i.length>t))return o===n.length?i:Et(i,t)}return""}function dg(){let e=x;return e.crypto||e.msCrypto}function ge(e=dg()){let t=()=>Math.random()*16;try{if(e?.randomUUID)return e.randomUUID().replace(/-/g,"");e?.getRandomValues&&(t=()=>{let n=new Uint8Array(1);return e.getRandomValues(n),n[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(t()&15)>>n/4).toString(16))}function Nl(e){return e.exception?.values?.[0]}function zt(e){let{message:t,event_id:n}=e;if(t)return t;let r=Nl(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function lr(e,t,n){let r=e.exception=e.exception||{},o=r.values=r.values||[],i=o[0]=o[0]||{};i.value||(i.value=t||""),i.type||(i.type=n||"Error")}function rt(e,t){let n=Nl(e);if(!n)return;let r={type:"generic",handled:!0},o=n.mechanism;if(n.mechanism=m(m(m({},r),o),t),t&&"data"in t){let i=m(m({},o?.data),t.data);n.mechanism.data=i}}function wa(e,t,n=5){if(t.lineno===void 0)return;let r=e.length,o=Math.max(Math.min(r-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,o-n),o).map(s=>eo(s,0));let i=Math.min(r-1,o);t.context_line=eo(e[i],t.colno||0),t.post_context=e.slice(Math.min(o+1,r),o+1+n).map(s=>eo(s,0))}function ci(e){if(fg(e))return!0;try{he(e,"__sentry_captured__",!0)}catch{}return!1}function fg(e){try{return e.__sentry_captured__}catch{}}var Ol=1e3;function dt(){return Date.now()/Ol}function pg(){let{performance:e}=x;if(!e?.now||!e.timeOrigin)return dt;let t=e.timeOrigin;return()=>(t+e.now())/Ol}var Ml;function re(){return(Ml??(Ml=pg()))()}var Ra;function mg(){let{performance:e}=x;if(!e?.now)return[void 0,"none"];let t=3600*1e3,n=e.now(),r=Date.now(),o=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,i=o<t,s=e.timing?.navigationStart,c=typeof s=="number"?Math.abs(s+n-r):t,u=c<t;return i||u?o<=c?[e.timeOrigin,"timeOrigin"]:[s,"navigationStart"]:[r,"dateNow"]}function fe(){return Ra||(Ra=mg()),Ra[0]}function Ll(e){let t=re(),n={sid:ge(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>hg(n)};return e&&en(n,e),n}function en(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||re(),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:ge()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{let 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 Dl(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),en(e,n)}function hg(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function mn(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;let r=m({},e);for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=mn(r[o],t[o],n-1));return r}function Ge(){return ge()}function Ot(){return ge().substring(16)}var xa="_sentrySpan";function jt(e,t){t?he(e,xa,t):delete e[xa]}function tn(e){return e[xa]}var gg=100,Je=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Ge(),sampleRand:Math.random()}}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags=m({},this._tags),t._extra=m({},this._extra),t._contexts=m({},this._contexts),this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),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._attachments=[...this._attachments],t._sdkProcessingMetadata=m({},this._sdkProcessingMetadata),t._propagationContext=m({},this._propagationContext),t._client=this._client,t._lastEventId=this._lastEventId,jt(t,tn(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&&en(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(t){return this._tags=m(m({},this._tags),t),this._notifyScopeListeners(),this}setTag(t,n){return this._tags=E(m({},this._tags),{[t]:n}),this._notifyScopeListeners(),this}setExtras(t){return this._extra=m(m({},this._extra),t),this._notifyScopeListeners(),this}setExtra(t,n){return this._extra=E(m({},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;let n=typeof t=="function"?t(this):t,r=n instanceof e?n.getScopeData():We(n)?t:void 0,{tags:o,extra:i,user:s,contexts:a,level:c,fingerprint:u=[],propagationContext:d}=r||{};return this._tags=m(m({},this._tags),o),this._extra=m(m({},this._extra),i),this._contexts=m(m({},this._contexts),a),s&&Object.keys(s).length&&(this._user=s),c&&(this._level=c),u.length&&(this._fingerprint=u),d&&(this._propagationContext=d),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._session=void 0,jt(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Ge(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){let r=typeof n=="number"?n:gg;if(r<=0)return this;let o=E(m({timestamp:dt()},t),{message:t.message?Et(t.message,2048):t.message});return this._breadcrumbs.push(o),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client?.recordDroppedEvent("buffer_overflow","log_item")),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:tn(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=mn(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){let r=n?.event_id||ge();if(!this._client)return T&&g.warn("No client configured on scope - will not capture exception!"),r;let o=new Error("Sentry syntheticException");return this._client.captureException(t,E(m({originalException:t,syntheticException:o},n),{event_id:r}),this),r}captureMessage(t,n,r){let o=r?.event_id||ge();if(!this._client)return T&&g.warn("No client configured on scope - will not capture message!"),o;let i=new Error(t);return this._client.captureMessage(t,n,E(m({originalException:t,syntheticException:i},r),{event_id:o}),this),o}captureEvent(t,n){let r=n?.event_id||ge();return this._client?(this._client.captureEvent(t,E(m({},n),{event_id:r}),this),r):(T&&g.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}};function Pl(){return Qt("defaultCurrentScope",()=>new Je)}function Fl(){return Qt("defaultIsolationScope",()=>new Je)}var Ca=class{constructor(t,n){let r;t?r=t:r=new Je;let o;n?o=n:o=new Je,this._stack=[{scope:r}],this._isolationScope=o}withScope(t){let n=this._pushScope(),r;try{r=t(n)}catch(o){throw this._popScope(),o}return Mt(r)?r.then(o=>(this._popScope(),o),o=>{throw this._popScope(),o}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let 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 dr(){let e=Ve(),t=fn(e);return t.stack=t.stack||new Ca(Pl(),Fl())}function _g(e){return dr().withScope(e)}function Sg(e,t){let n=dr();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Ul(e){return dr().withScope(()=>e(dr().getIsolationScope()))}function Bl(){return{withIsolationScope:Ul,withScope:_g,withSetScope:Sg,withSetIsolationScope:(e,t)=>Ul(t),getCurrentScope:()=>dr().getScope(),getIsolationScope:()=>dr().getIsolationScope()}}function bt(e){let t=fn(e);return t.acs?t.acs:Bl()}function M(){let e=Ve();return bt(e).getCurrentScope()}function ce(){let e=Ve();return bt(e).getIsolationScope()}function hn(){return Qt("globalScope",()=>new Je)}function Oe(...e){let t=Ve(),n=bt(t);if(e.length===2){let[r,o]=e;return r?n.withSetScope(r,o):n.withScope(o)}return n.withScope(e[0])}function Aa(...e){let t=Ve(),n=bt(t);if(e.length===2){let[r,o]=e;return r?n.withSetIsolationScope(r,o):n.withIsolationScope(o)}return n.withIsolationScope(e[0])}function v(){return M().getClient()}function ui(e){let t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:o}=t,i={trace_id:n,span_id:o||Ot()};return r&&(i.parent_span_id=r),i}var ve="sentry.source",gn="sentry.sample_rate",to="sentry.previous_trace_sample_rate",ye="sentry.op",Q="sentry.origin",Pn="sentry.idle_span_finish_reason",qt="sentry.measurement_unit",Vt="sentry.measurement_value",fr="sentry.custom_span_name",pr="sentry.profile_id",Tt="sentry.exclusive_time";var ka="http.request.method",Na="url.full",Ma="sentry.link.type";function Oa(e){if(e<400&&e>=100)return{code:1};if(e>=400&&e<500)switch(e){case 401:return{code:2,message:"unauthenticated"};case 403:return{code:2,message:"permission_denied"};case 404:return{code:2,message:"not_found"};case 409:return{code:2,message:"already_exists"};case 413:return{code:2,message:"failed_precondition"};case 429:return{code:2,message:"resource_exhausted"};case 499:return{code:2,message:"cancelled"};default:return{code:2,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:2,message:"unimplemented"};case 503:return{code:2,message:"unavailable"};case 504:return{code:2,message:"deadline_exceeded"};default:return{code:2,message:"internal_error"}}return{code:2,message:"unknown_error"}}function nn(e,t){e.setAttribute("http.response.status_code",t);let n=Oa(t);n.message!=="unknown_error"&&e.setStatus(n)}var Hl="_sentryScope",$l="_sentryIsolationScope";function Wl(e,t,n){e&&(he(e,$l,n),he(e,Hl,t))}function Fn(e){return{scope:e[Hl],isolationScope:e[$l]}}var li="sentry-",yg=/^sentry-/,Eg=8192;function di(e){let t=bg(e);if(!t)return;let n=Object.entries(t).reduce((r,[o,i])=>{if(o.match(yg)){let s=o.slice(li.length);r[s]=i}return r},{});if(Object.keys(n).length>0)return n}function fi(e){if(!e)return;let t=Object.entries(e).reduce((n,[r,o])=>(o&&(n[`${li}${r}`]=o),n),{});return Tg(t)}function bg(e){if(!(!e||!Me(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{let r=Gl(n);return Object.entries(r).forEach(([o,i])=>{t[o]=i}),t},{}):Gl(e)}function Gl(e){return e.split(",").map(t=>t.split("=").map(n=>{try{return decodeURIComponent(n.trim())}catch{return}})).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function Tg(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],o)=>{let i=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,s=o===0?i:`${t},${i}`;return s.length>Eg?(T&&g.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):s},"")}function ft(e){if(typeof e=="boolean")return Number(e);let t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}var pi=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function zl(e){if(!e)return;let t=e.match(pi);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function no(e,t){let n=zl(e),r=di(t);if(!n?.traceId)return{traceId:Ge(),sampleRand:Math.random()};let o=Ig(n,r);r&&(r.sample_rand=o.toString());let{traceId:i,parentSpanId:s,parentSampled:a}=n;return{traceId:i,parentSpanId:s,sampled:a,dsc:r||{},sampleRand:o}}function ro(e=Ge(),t=Ot(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function Ig(e,t){let n=ft(t?.sample_rand);if(n!==void 0)return n;let r=ft(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?Math.random()*r:r+Math.random()*(1-r):Math.random()}var mi=0,hi=1,jl=!1;function Vl(e){let{spanId:t,traceId:n}=e.spanContext(),{data:r,op:o,parent_span_id:i,status:s,origin:a,links:c}=O(e);return{parent_span_id:i,span_id:t,trace_id:n,data:r,op:o,status:s,origin:a,links:c}}function oo(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext(),o=r?t:O(e).parent_span_id,i=Fn(e).scope,s=r?i?.getPropagationContext().propagationSpanId||Ot():t;return{parent_span_id:o,span_id:s,trace_id:n}}function gi(e){let{traceId:t,spanId:n}=e.spanContext(),r=It(e);return ro(t,n,r)}function _i(e){if(e&&e.length>0)return e.map(s=>{var a=s,{context:c}=a,u=c,{spanId:t,traceId:n,traceFlags:r}=u,o=dn(u,["spanId","traceId","traceFlags"]),{attributes:i}=a;return m({span_id:t,trace_id:n,sampled:r===hi,attributes:i},o)})}function Lt(e){return typeof e=="number"?ql(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?ql(e.getTime()):re()}function ql(e){return e>9999999999?e/1e3:e}function O(e){if(Rg(e))return e.getSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(wg(e)){let{attributes:r,startTime:o,name:i,endTime:s,status:a,links:c}=e,u="parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0;return{span_id:t,trace_id:n,data:r,description:i,parent_span_id:u,start_timestamp:Lt(o),timestamp:Lt(s)||void 0,status:Si(a),op:r[ye],origin:r[Q],links:_i(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function wg(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function Rg(e){return typeof e.getSpanJSON=="function"}function It(e){let{traceFlags:t}=e.spanContext();return t===hi}function Si(e){if(!(!e||e.code===0))return e.code===1?"ok":e.message||"unknown_error"}var Un="_sentryChildSpans",La="_sentryRootSpan";function yi(e,t){let n=e[La]||e;he(t,La,n),e[Un]?e[Un].add(t):he(e,Un,new Set([t]))}function Yl(e,t){e[Un]&&e[Un].delete(t)}function _n(e){let t=new Set;function n(r){if(!t.has(r)&&It(r)){t.add(r);let o=r[Un]?Array.from(r[Un]):[];for(let i of o)n(i)}}return n(e),Array.from(t)}function oe(e){return e[La]||e}function te(){let e=Ve(),t=bt(e);return t.getActiveSpan?t.getActiveSpan():tn(M())}function io(){jl||(Be(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),jl=!0)}function Jl(e,t){e.updateName(t),e.setAttributes({[ve]:"custom",[fr]:t})}var Kl=!1;function Ei(){if(Kl)return;function e(){let t=te(),n=t&&oe(t);if(n){let r="internal_error";T&&g.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:2,message:r})}}e.tag="sentry_tracingErrorCallback",Kl=!0,Kr(e),Xr(e)}function Ke(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let t=e||v()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}var rn="production";var xg=/^o(\d+)\./,Cg=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Ag(e){return e==="http"||e==="https"}function ot(e,t=!1){let{host:n,path:r,pass:o,port:i,projectId:s,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&o?`:${o}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${s}`}function bi(e){let t=Cg.exec(e);if(!t){Be(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,o="",i="",s="",a=""]=t.slice(1),c="",u=a,d=u.split("/");if(d.length>1&&(c=d.slice(0,-1).join("/"),u=d.pop()),u){let l=u.match(/^\d+/);l&&(u=l[0])}return Xl({host:i,pass:o,path:c,projectId:u,port:s,protocol:n,publicKey:r})}function Xl(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function kg(e){if(!T)return!0;let{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(g.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:n.match(/^\d+$/)?Ag(r)?t&&isNaN(parseInt(t,10))?(g.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(g.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(g.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Zl(e){return e.match(xg)?.[1]}function so(e){let t=typeof e=="string"?bi(e):Xl(e);if(!(!t||!kg(t)))return t}var Ql="_frozenDsc";function mr(e,t){he(e,Ql,t)}function Pa(e,t){let n=t.getOptions(),{publicKey:r,host:o}=t.getDsn()||{},i;n.orgId?i=String(n.orgId):o&&(i=Zl(o));let s={environment:n.environment||rn,release:n.release,public_key:r,trace_id:e,org_id:i};return t.emit("createDsc",s),s}function hr(e,t){let n=t.getPropagationContext();return n.dsc||Pa(n.traceId,e)}function we(e){let t=v();if(!t)return{};let n=oe(e),r=O(n),o=r.data,i=n.spanContext().traceState,s=i?.get("sentry.sample_rate")??o[gn]??o[to];function a(h){return(typeof s=="number"||typeof s=="string")&&(h.sample_rate=`${s}`),h}let c=n[Ql];if(c)return a(c);let u=i?.get("sentry.dsc"),d=u&&di(u);if(d)return a(d);let l=Pa(e.spanContext().traceId,t),f=o[ve],p=r.description;return f!=="url"&&p&&(l.transaction=p),Ke()&&(l.sampled=String(It(n)),l.sample_rand=i?.get("sentry.sample_rand")??Fn(n).scope?.getPropagationContext().sampleRand.toString()),a(l),t.emit("createDsc",l,n),l}function ed(e){let t=we(e);return fi(t)}var ze=class{constructor(t={}){this._traceId=t.traceId||Ge(),this._spanId=t.spanId||Ot()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:mi}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,n,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}};function Ne(e,t=100,n=1/0){try{return Fa("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Ti(e,t=3,n=100*1024){let r=Ne(e,t);return Lg(r)>n?Ti(e,t-1,n):r}function Fa(e,t,n=1/0,r=1/0,o=Dg()){let[i,s]=o;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;let a=Ng(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;let c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(i(t))return"[Circular ~]";let u=t;if(u&&typeof u.toJSON=="function")try{let p=u.toJSON();return Fa("",p,c-1,r,o)}catch{}let d=Array.isArray(t)?[]:{},l=0,f=ai(t);for(let p in f){if(!Object.prototype.hasOwnProperty.call(f,p))continue;if(l>=r){d[p]="[MaxProperties ~]";break}let h=f[p];d[p]=Fa(p,h,c-1,r,o),l++}return s(t),d}function Ng(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Zr(t))return"[VueViewModel]";if(Ta(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${tt(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;let n=Mg(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function Mg(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function Og(e){return~-encodeURI(e).split(/%..|./).length}function Lg(e){return Og(JSON.stringify(e))}function Dg(){let e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}function n(r){e.delete(r)}return[t,n]}function Fe(e,t=[]){return[e,t]}function Ua(e,t){let[n,r]=e;return[n,[...r,t]]}function pt(e,t){let n=e[1];for(let r of n){let o=r[0].type;if(t(r,o))return!0}return!1}function vi(e,t){return pt(e,(n,r)=>t.includes(r))}function Ii(e){let t=fn(x);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function Pg(e){let t=fn(x);return t.decodePolyfill?t.decodePolyfill(e):new TextDecoder().decode(e)}function Sn(e){let[t,n]=e,r=JSON.stringify(t);function o(i){typeof r=="string"?r=typeof i=="string"?r+i:[Ii(r),i]:r.push(typeof i=="string"?Ii(i):i)}for(let i of n){let[s,a]=i;if(o(`
|
|
6
|
-
${JSON.stringify(s)}
|
|
7
|
-
`),typeof a=="string"||a instanceof Uint8Array)o(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(Ne(a))}o(c)}}return typeof r=="string"?r:Fg(r)}function Fg(e){let t=e.reduce((o,i)=>o+i.length,0),n=new Uint8Array(t),r=0;for(let o of e)n.set(o,r),r+=o.length;return n}function Ba(e){let t=typeof e=="string"?Ii(e):e;function n(s){let a=t.subarray(0,s);return t=t.subarray(s+1),a}function r(){let s=t.indexOf(10);return s<0&&(s=t.length),JSON.parse(Pg(n(s)))}let o=r(),i=[];for(;t.length;){let s=r(),a=typeof s.length=="number"?s.length:void 0;i.push([s,a?n(a):r()])}return[o,i]}function Ha(e){return[{type:"span"},e]}function $a(e){let t=typeof e.data=="string"?Ii(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var Ug={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",raw_security:"security",log:"log_item"};function wi(e){return Ug[e]}function gr(e){if(!e?.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function ao(e,t,n,r){let o=e.sdkProcessingMetadata?.dynamicSamplingContext;return m(m(m({event_id:e.event_id,sent_at:new Date().toISOString()},t&&{sdk:t}),!!n&&r&&{dsn:ot(r)}),o&&{trace:o})}function Bg(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 td(e,t,n,r){let o=gr(n),i=m(m({sent_at:new Date().toISOString()},o&&{sdk:o}),!!r&&t&&{dsn:ot(t)}),s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Fe(i,[s])}function nd(e,t,n,r){let o=gr(n),i=e.type&&e.type!=="replay_event"?e.type:"event";Bg(e,n?.sdk);let s=ao(e,o,r,t);return delete e.sdkProcessingMetadata,Fe(s,[[{type:i},e]])}function rd(e,t){function n(d){return!!d.trace_id&&!!d.public_key}let r=we(e[0]),o=t?.getDsn(),i=t?.getOptions().tunnel,s=m(m({sent_at:new Date().toISOString()},n(r)&&{trace:r}),!!i&&o&&{dsn:ot(o)}),a=t?.getOptions().beforeSendSpan,c=a?d=>{let l=O(d),f=a(l);return f||(io(),l)}:O,u=[];for(let d of e){let l=c(d);l&&u.push(Ha(l))}return Fe(s,u)}function od(e){if(!T)return;let{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=O(e),{spanId:o}=e.spanContext(),i=It(e),s=oe(e),a=s===e,c=`[Tracing] Starting ${i?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${o}`];if(r&&u.push(`parent ID: ${r}`),!a){let{op:d,description:l}=O(s);u.push(`root ID: ${s.spanContext().spanId}`),d&&u.push(`root op: ${d}`),l&&u.push(`root description: ${l}`)}g.log(`${c}
|
|
8
|
-
${u.join(`
|
|
9
|
-
`)}`)}function id(e){if(!T)return;let{description:t="< unknown name >",op:n="< unknown op >"}=O(e),{spanId:r}=e.spanContext(),i=oe(e)===e,s=`[Tracing] Finishing "${n}" ${i?"root ":""}span "${t}" with ID ${r}`;g.log(s)}function Ri(e,t,n,r=te()){let o=r&&oe(r);o&&(T&&g.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),o.addEvent(e,{[Vt]:t,[qt]:n}))}function xi(e){if(!e||e.length===0)return;let t={};return e.forEach(n=>{let r=n.attributes||{},o=r[qt],i=r[Vt];typeof o=="string"&&typeof i=="number"&&(t[n.name]={value:i,unit:o})}),t}var sd=1e3,yn=class{constructor(t={}){this._traceId=t.traceId||Ge(),this._spanId=t.spanId||Ot(),this._startTime=t.startTimestamp||re(),this._links=t.links,this._attributes={},this.setAttributes(m({[Q]:"manual",[ye]:t.op},t.attributes)),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this._links?this._links.push(t):this._links=[t],this}addLinks(t){return this._links?this._links.push(...t):this._links=t,this}recordException(t,n){}spanContext(){let{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?hi:mi}}setAttribute(t,n){return n===void 0?delete this._attributes[t]:this._attributes[t]=n,this}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._startTime=Lt(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(ve,"custom"),this}end(t){this._endTime||(this._endTime=Lt(t),id(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[ye],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Si(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[Q],profile_id:this._attributes[pr],exclusive_time:this._attributes[Tt],measurements:xi(this._events),is_segment:this._isStandaloneSpan&&oe(this)===this||void 0,segment_id:this._isStandaloneSpan?oe(this).spanContext().spanId:void 0,links:_i(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){T&&g.log("[Tracing] Adding an event to span:",t);let o=ad(n)?n:r||re(),i=ad(n)?{}:n||{},s={name:t,time:Lt(o),attributes:i};return this._events.push(s),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){let t=v();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===oe(this)))return;if(this._isStandaloneSpan){this._sampled?$g(rd([this],t)):(T&&g.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}let r=this._convertSpanToTransaction();r&&(Fn(this).scope||M()).captureEvent(r)}_convertSpanToTransaction(){if(!cd(O(this)))return;this._name||(T&&g.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");let{scope:t,isolationScope:n}=Fn(this),r=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;let i=_n(this).filter(d=>d!==this&&!Hg(d)).map(d=>O(d)).filter(cd),s=this._attributes[ve];delete this._attributes[fr],i.forEach(d=>{delete d.data[fr]});let a=m({contexts:{trace:Vl(this)},spans:i.length>sd?i.sort((d,l)=>d.start_timestamp-l.start_timestamp).slice(0,sd):i,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:we(this)},request:r},s&&{transaction_info:{source:s}}),c=xi(this._events);return c&&Object.keys(c).length&&(T&&g.log("[Measurements] Adding measurements to transaction event",JSON.stringify(c,void 0,2)),a.measurements=c),a}};function ad(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function cd(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function Hg(e){return e instanceof yn&&e.isStandaloneSpan()}function $g(e){let t=v();if(!t)return;let n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function Wa(e,t,n=()=>{}){let r;try{r=e()}catch(o){throw t(o),n(),o}return Wg(r,t,n)}function Wg(e,t,n){return Mt(e)?e.then(r=>(n(),r),r=>{throw t(r),n(),r}):(n(),e)}function ud(e,t,n){if(!Ke(e))return[!1];let r,o;typeof e.tracesSampler=="function"?(o=e.tracesSampler(E(m({},t),{inheritOrSampleWith:a=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):a})),r=!0):t.parentSampled!==void 0?o=t.parentSampled:typeof e.tracesSampleRate<"u"&&(o=e.tracesSampleRate,r=!0);let i=ft(o);if(i===void 0)return T&&g.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(o)} of type ${JSON.stringify(typeof o)}.`),[!1];if(!i)return T&&g.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,i,r];let s=n<i;return s||T&&g.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(o)})`),[s,i,r]}var Ci="__SENTRY_SUPPRESS_TRACING__";function Bn(e,t){let n=co();if(n.startSpan)return n.startSpan(e,t);let r=za(e),{forceTransaction:o,parentSpan:i,scope:s}=e,a=s?.clone();return Oe(a,()=>hd(i)(()=>{let u=M(),d=ja(u,i),f=e.onlyIfParent&&!d?new ze:Ga({parentSpan:d,spanArguments:r,forceTransaction:o,scope:u});return jt(u,f),Wa(()=>t(f),()=>{let{status:p}=O(f);f.isRecording()&&(!p||p==="ok")&&f.setStatus({code:2,message:"internal_error"})},()=>{f.end()})}))}function dd(e,t){let n=co();if(n.startSpanManual)return n.startSpanManual(e,t);let r=za(e),{forceTransaction:o,parentSpan:i,scope:s}=e,a=s?.clone();return Oe(a,()=>hd(i)(()=>{let u=M(),d=ja(u,i),f=e.onlyIfParent&&!d?new ze:Ga({parentSpan:d,spanArguments:r,forceTransaction:o,scope:u});return jt(u,f),Wa(()=>t(f,()=>f.end()),()=>{let{status:p}=O(f);f.isRecording()&&(!p||p==="ok")&&f.setStatus({code:2,message:"internal_error"})})}))}function mt(e){let t=co();if(t.startInactiveSpan)return t.startInactiveSpan(e);let n=za(e),{forceTransaction:r,parentSpan:o}=e;return(e.scope?s=>Oe(e.scope,s):o!==void 0?s=>Hn(o,s):s=>s())(()=>{let s=M(),a=ja(s,o);return e.onlyIfParent&&!a?new ze:Ga({parentSpan:a,spanArguments:n,forceTransaction:r,scope:s})})}var fd=(e,t)=>{let n=Ve(),r=bt(n);if(r.continueTrace)return r.continueTrace(e,t);let{sentryTrace:o,baggage:i}=e;return Oe(s=>{let a=no(o,i);return s.setPropagationContext(a),t()})};function Hn(e,t){let n=co();return n.withActiveSpan?n.withActiveSpan(e,t):Oe(r=>(jt(r,e||void 0),t(r)))}function pd(e){let t=co();return t.suppressTracing?t.suppressTracing(e):Oe(n=>{n.setSDKProcessingMetadata({[Ci]:!0});let r=e();return n.setSDKProcessingMetadata({[Ci]:void 0}),r})}function md(e){return Oe(t=>(t.setPropagationContext({traceId:Ge(),sampleRand:Math.random()}),T&&g.log(`Starting a new trace with id ${t.getPropagationContext().traceId}`),Hn(null,e)))}function Ga({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!Ke()){let s=new ze;if(n||!e){let a=m({sampled:"false",sample_rate:"0",transaction:t.name},we(s));mr(s,a)}return s}let o=ce(),i;if(e&&!n)i=Gg(e,r,t),yi(e,i);else if(e){let s=we(e),{traceId:a,spanId:c}=e.spanContext(),u=It(e);i=ld(m({traceId:a,parentSpanId:c},t),r,u),mr(i,s)}else{let{traceId:s,dsc:a,parentSpanId:c,sampled:u}=m(m({},o.getPropagationContext()),r.getPropagationContext());i=ld(m({traceId:s,parentSpanId:c},t),r,u),a&&mr(i,a)}return od(i),Wl(i,r,o),i}function za(e){let t=e.experimental||{},n=m({isStandalone:t.standalone},e);if(e.startTime){let r=m({},n);return r.startTimestamp=Lt(e.startTime),delete r.startTime,r}return n}function co(){let e=Ve();return bt(e)}function ld(e,t,n){let r=v(),o=r?.getOptions()||{},{name:i=""}=e,s={spanAttributes:m({},e.attributes),spanName:i,parentSampled:n};r?.emit("beforeSampling",s,{decision:!1});let a=s.parentSampled??n,c=s.spanAttributes,u=t.getPropagationContext(),[d,l,f]=t.getScopeData().sdkProcessingMetadata[Ci]?[!1]:ud(o,{name:i,parentSampled:a,attributes:c,parentSampleRate:ft(u.dsc?.sample_rate)},u.sampleRand),p=new yn(E(m({},e),{attributes:m({[ve]:"custom",[gn]:l!==void 0&&f?l:void 0},c),sampled:d}));return!d&&r&&(T&&g.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate","transaction")),r&&r.emit("spanStart",p),p}function Gg(e,t,n){let{spanId:r,traceId:o}=e.spanContext(),i=t.getScopeData().sdkProcessingMetadata[Ci]?!1:It(e),s=i?new yn(E(m({},n),{parentSpanId:r,traceId:o,sampled:i})):new ze({traceId:o});yi(e,s);let a=v();return a&&(a.emit("spanStart",s),n.endTimestamp&&a.emit("spanEnd",s)),s}function ja(e,t){if(t)return t;if(t===null)return;let n=tn(e);if(!n)return;let r=v();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?oe(n):n}function hd(e){return e!==void 0?t=>Hn(e,t):t=>t()}var _r={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},zg="heartbeatFailed",jg="idleTimeout",qg="finalTimeout",Vg="externalFinish";function Ai(e,t={}){let n=new Map,r=!1,o,i=Vg,s=!t.disableAutoFinish,a=[],{idleTimeout:c=_r.idleTimeout,finalTimeout:u=_r.finalTimeout,childSpanTimeout:d=_r.childSpanTimeout,beforeSpanEnd:l}=t,f=v();if(!f||!Ke()){let b=new ze,C=m({sample_rate:"0",sampled:"false"},we(b));return mr(b,C),b}let p=M(),h=te(),_=Yg(e);_.end=new Proxy(_.end,{apply(b,C,P){if(l&&l(_),C instanceof ze)return;let[w,...A]=P,G=w||re(),R=Lt(G),F=_n(_).filter(B=>B!==_);if(!F.length)return L(R),Reflect.apply(b,C,[R,...A]);let V=F.map(B=>O(B).timestamp).filter(B=>!!B),H=V.length?Math.max(...V):void 0,D=O(_).start_timestamp,z=Math.min(D?D+u/1e3:1/0,Math.max(D||-1/0,Math.min(R,H||1/0)));return L(z),Reflect.apply(b,C,[z,...A])}});function S(){o&&(clearTimeout(o),o=void 0)}function y(b){S(),o=setTimeout(()=>{!r&&n.size===0&&s&&(i=jg,_.end(b))},c)}function I(b){o=setTimeout(()=>{!r&&s&&(i=zg,_.end(b))},d)}function W(b){S(),n.set(b,!0);let C=re();I(C+d/1e3)}function N(b){if(n.has(b)&&n.delete(b),n.size===0){let C=re();y(C+c/1e3)}}function L(b){r=!0,n.clear(),a.forEach(R=>R()),jt(p,h);let C=O(_),{start_timestamp:P}=C;if(!P)return;C.data[Pn]||_.setAttribute(Pn,i),g.log(`[Tracing] Idle span "${C.op}" finished`);let A=_n(_).filter(R=>R!==_),G=0;A.forEach(R=>{R.isRecording()&&(R.setStatus({code:2,message:"cancelled"}),R.end(b),T&&g.log("[Tracing] Cancelling span since span ended early",JSON.stringify(R,void 0,2)));let F=O(R),{timestamp:V=0,start_timestamp:H=0}=F,D=H<=b,z=(u+c)/1e3,B=V-H<=z;if(T){let J=JSON.stringify(R,void 0,2);D?B||g.log("[Tracing] Discarding span since it finished after idle span final timeout",J):g.log("[Tracing] Discarding span since it happened after idle span was finished",J)}(!B||!D)&&(Yl(_,R),G++)}),G>0&&_.setAttribute("sentry.idle_span_discarded_spans",G)}return a.push(f.on("spanStart",b=>{if(r||b===_||O(b).timestamp||b instanceof yn&&b.isStandaloneSpan())return;_n(_).includes(b)&&W(b.spanContext().spanId)})),a.push(f.on("spanEnd",b=>{r||N(b.spanContext().spanId)})),a.push(f.on("idleSpanEnableAutoFinish",b=>{b===_&&(s=!0,y(),n.size&&I())})),t.disableAutoFinish||y(),setTimeout(()=>{r||(_.setStatus({code:2,message:"deadline_exceeded"}),i=qg,_.end())},u),_}function Yg(e){let t=mt(e);return jt(M(),t),T&&g.log("[Tracing] Started span is an idle span"),t}var qa=0,gd=1,_d=2;function Xe(e){return new Dt(t=>{t(e)})}function En(e){return new Dt((t,n)=>{n(e)})}var Dt=class e{constructor(t){this._state=qa,this._handlers=[],this._runExecutor(t)}then(t,n){return new e((r,o)=>{this._handlers.push([!1,i=>{if(!t)r(i);else try{r(t(i))}catch(s){o(s)}},i=>{if(!n)o(i);else try{r(n(i))}catch(s){o(s)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new e((n,r)=>{let o,i;return this.then(s=>{i=!1,o=s,t&&t()},s=>{i=!0,o=s,t&&t()}).then(()=>{if(i){r(o);return}n(o)})})}_executeHandlers(){if(this._state===qa)return;let t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===gd&&n[1](this._value),this._state===_d&&n[2](this._value),n[0]=!0)})}_runExecutor(t){let n=(i,s)=>{if(this._state===qa){if(Mt(s)){s.then(r,o);return}this._state=i,this._value=s,this._executeHandlers()}},r=i=>{n(gd,i)},o=i=>{n(_d,i)};try{t(r,o)}catch(i){o(i)}}};function ki(e,t,n,r=0){return new Dt((o,i)=>{let s=e[r];if(t===null||typeof s!="function")o(t);else{let a=s(m({},t),n);T&&s.id&&a===null&&g.log(`Event processor "${s.id}" dropped event`),Mt(a)?a.then(c=>ki(e,c,n,r+1).then(o)).then(null,i):ki(e,a,n,r+1).then(o).then(null,i)}})}function Sd(e,t){let{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:i}=t;Jg(e,t),r&&Zg(e,r),Qg(e,n),Kg(e,o),Xg(e,i)}function Sr(e,t){let{extra:n,tags:r,user:o,contexts:i,level:s,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:d,attachments:l,propagationContext:f,transactionName:p,span:h}=t;Ni(e,"extra",n),Ni(e,"tags",r),Ni(e,"user",o),Ni(e,"contexts",i),e.sdkProcessingMetadata=mn(e.sdkProcessingMetadata,a,2),s&&(e.level=s),p&&(e.transactionName=p),h&&(e.span=h),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),l.length&&(e.attachments=[...e.attachments,...l]),e.propagationContext=m(m({},e.propagationContext),f)}function Ni(e,t,n){e[t]=mn(e[t],n,1)}function Jg(e,t){let{extra:n,tags:r,user:o,contexts:i,level:s,transactionName:a}=t;Object.keys(n).length&&(e.extra=m(m({},n),e.extra)),Object.keys(r).length&&(e.tags=m(m({},r),e.tags)),Object.keys(o).length&&(e.user=m(m({},o),e.user)),Object.keys(i).length&&(e.contexts=m(m({},i),e.contexts)),s&&(e.level=s),a&&e.type!=="transaction"&&(e.transaction=a)}function Kg(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Xg(e,t){e.sdkProcessingMetadata=m(m({},e.sdkProcessingMetadata),t)}function Zg(e,t){e.contexts=m({trace:oo(t)},e.contexts),e.sdkProcessingMetadata=m({dynamicSamplingContext:we(t)},e.sdkProcessingMetadata);let n=oe(t),r=O(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function Qg(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}var Mi,yd,Oi;function Li(e){let t=x._sentryDebugIds;if(!t)return{};let n=Object.keys(t);return Oi&&n.length===yd||(yd=n.length,Oi=n.reduce((r,o)=>{Mi||(Mi={});let i=Mi[o];if(i)r[i[0]]=i[1];else{let s=e(o);for(let a=s.length-1;a>=0;a--){let u=s[a]?.filename,d=t[o];if(u&&d){r[u]=d,Mi[o]=[u,d];break}}}return r},{})),Oi}function Va(e,t){let n=Li(e);if(!n)return[];let r=[];for(let o of t)o&&n[o]&&r.push({type:"sourcemap",code_file:o,debug_id:n[o]});return r}function uo(e,t,n,r,o,i){let{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,c=E(m({},t),{event_id:t.event_id||n.event_id||ge(),timestamp:t.timestamp||dt()}),u=n.integrations||e.integrations.map(S=>S.name);e_(c,e),r_(c,u),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&t_(c,e.stackParser);let d=i_(r,n.captureContext);n.mechanism&&rt(c,n.mechanism);let l=o?o.getEventProcessors():[],f=hn().getScopeData();if(i){let S=i.getScopeData();Sr(f,S)}if(d){let S=d.getScopeData();Sr(f,S)}let p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),Sd(c,f);let h=[...l,...f.eventProcessors];return ki(h,c,n).then(S=>(S&&n_(S),typeof s=="number"&&s>0?o_(S,s,a):S))}function e_(e,t){let{environment:n,release:r,dist:o,maxValueLength:i=250}=t;e.environment=e.environment||n||rn,!e.release&&r&&(e.release=r),!e.dist&&o&&(e.dist=o);let s=e.request;s?.url&&(s.url=Et(s.url,i))}function t_(e,t){let n=Li(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.filename&&(o.debug_id=n[o.filename])})})}function n_(e){let t={};if(e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.debug_id&&(o.abs_path?t[o.abs_path]=o.debug_id:o.filename&&(t[o.filename]=o.debug_id),delete o.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach(([r,o])=>{n.push({type:"sourcemap",code_file:r,debug_id:o})})}function r_(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function o_(e,t,n){if(!e)return null;let r=m(m(m(m(m({},e),e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>m(m({},o),o.data&&{data:Ne(o.data,t,n)}))}),e.user&&{user:Ne(e.user,t,n)}),e.contexts&&{contexts:Ne(e.contexts,t,n)}),e.extra&&{extra:Ne(e.extra,t,n)});return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Ne(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(o=>m(m({},o),o.data&&{data:Ne(o.data,t,n)}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=Ne(e.contexts.flags,3,n)),r}function i_(e,t){if(!t)return e;let n=e?e.clone():new Je;return n.update(t),n}function Ed(e){if(e)return s_(e)?{captureContext:e}:c_(e)?{captureContext:e}:e}function s_(e){return e instanceof Je||typeof e=="function"}var a_=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function c_(e){return Object.keys(e).some(t=>a_.includes(t))}function wt(e,t){return M().captureException(e,Ed(t))}function $n(e,t){let n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return M().captureMessage(e,n,r)}function bn(e,t){return M().captureEvent(e,t)}function Di(e,t){ce().setContext(e,t)}function bd(e){ce().setExtras(e)}function Td(e,t){ce().setExtra(e,t)}function Id(e){ce().setTags(e)}function vd(e,t){ce().setTag(e,t)}function wd(e){ce().setUser(e)}function Pi(){return ce().lastEventId()}async function Rd(e){let t=v();return t?t.flush(e):(T&&g.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function xd(e){let t=v();return t?t.close(e):(T&&g.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}function Cd(){return!!v()}function Fi(){let e=v();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function Ui(e){ce().addEventProcessor(e)}function lo(e){let t=ce(),n=M(),{userAgent:r}=x.navigator||{},o=Ll(m(m({user:n.getUser()||t.getUser()},r&&{userAgent:r}),e)),i=t.getSession();return i?.status==="ok"&&en(i,{status:"exited"}),Bi(),t.setSession(o),o}function Bi(){let e=ce(),n=M().getSession()||e.getSession();n&&Dl(n),Ad(),e.setSession()}function Ad(){let e=ce(),t=v(),n=e.getSession();n&&t&&t.captureSession(n)}function fo(e=!1){if(e){Bi();return}Ad()}var u_="7";function kd(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function l_(e){return`${kd(e)}${e.projectId}/envelope/`}function d_(e,t){let n={sentry_version:u_};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function po(e,t,n){return t||`${l_(e)}?${d_(e,n)}`}function Ya(e,t){let n=so(e);if(!n)return"";let r=`${kd(n)}embed/error-page/`,o=`dsn=${ot(n)}`;for(let i in t)if(i!=="dsn"&&i!=="onClose")if(i==="user"){let s=t.user;if(!s)continue;s.name&&(o+=`&name=${encodeURIComponent(s.name)}`),s.email&&(o+=`&email=${encodeURIComponent(s.email)}`)}else o+=`&${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`;return`${r}?${o}`}var Nd=[];function f_(e){let t={};return e.forEach(n=>{let{name:r}=n,o=t[r];o&&!o.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function Ja(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){let o=n(t);r=Array.isArray(o)?o:[o]}else r=t;return f_(r)}function Md(e,t){let n={};return t.forEach(r=>{r&&Xa(e,r,n)}),n}function Ka(e,t){for(let n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function Xa(e,t,n){if(n[t.name]){T&&g.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,Nd.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),Nd.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){let r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(o,i)=>r(o,i,e))}if(typeof t.processEvent=="function"){let r=t.processEvent.bind(t),o=Object.assign((i,s)=>r(i,s,e),{id:t.name});e.addEventProcessor(o)}T&&g.log(`Integration installed: ${t.name}`)}function mo(e){let t=v();if(!t){T&&g.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function Od(e,t,n){let r=[{type:"client_report"},{timestamp:n||dt(),discarded_events:e}];return Fe(t?{dsn:t}:{},[r])}function Hi(e){let t=[];e.message&&t.push(e.message);try{let n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function Ld(e){let{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:i,data:s,op:a}=e.contexts?.trace??{};return{data:s??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:t??"",origin:i,profile_id:s?.[pr],exclusive_time:s?.[Tt],measurements:e.measurements,is_segment:!0}}function Dd(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:m(m(m({},e.data),e.profile_id&&{[pr]:e.profile_id}),e.exclusive_time&&{[Tt]:e.exclusive_time})}},measurements:e.measurements}}var Pd="Not capturing exception because it's already been captured.",Fd="Discarded session because of missing or non-string release",Hd=Symbol.for("SentryInternalError"),$d=Symbol.for("SentryDoNotSendEventError");function $i(e){return{message:e,[Hd]:!0}}function Za(e){return{message:e,[$d]:!0}}function Ud(e){return!!e&&typeof e=="object"&&Hd in e}function Bd(e){return!!e&&typeof e=="object"&&$d in e}var ho=class{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=so(t.dsn):T&&g.warn("No DSN provided, client will not send events."),this._dsn){let n=po(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport(E(m({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},t.transportOptions),{url:n}))}}captureException(t,n,r){let o=ge();if(ci(t))return T&&g.log(Pd),o;let i=m({event_id:o},n);return this._process(this.eventFromException(t,i).then(s=>this._captureEvent(s,i,r))),i.event_id}captureMessage(t,n,r,o){let i=m({event_id:ge()},r),s=pn(t)?t:String(t),a=yt(t)?this.eventFromMessage(s,n,i):this.eventFromException(t,i);return this._process(a.then(c=>this._captureEvent(c,i,o))),i.event_id}captureEvent(t,n,r){let o=ge();if(n?.originalException&&ci(n.originalException))return T&&g.log(Pd),o;let i=m({event_id:o},n),s=t.sdkProcessingMetadata||{},a=s.capturedSpanScope,c=s.capturedSpanIsolationScope;return this._process(this._captureEvent(t,i,a||r,c)),i.event_id}captureSession(t){this.sendSession(t),en(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){let n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(o=>r&&o))):Xe(!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){let n=this._integrations[t.name];Xa(this,t,this._integrations),n||Ka(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=nd(t,this._dsn,this._options._metadata,this._options.tunnel);for(let i of n.attachments||[])r=Ua(r,$a(i));let o=this.sendEnvelope(r);o&&o.then(i=>this.emit("afterSendEvent",t,i),null)}sendSession(t){let{release:n,environment:r=rn}=this._options;if("aggregates"in t){let i=t.attrs||{};if(!i.release&&!n){T&&g.warn(Fd);return}i.release=i.release||n,i.environment=i.environment||r,t.attrs=i}else{if(!t.release&&!n){T&&g.warn(Fd);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);let o=td(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(o)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){let o=`${t}:${n}`;T&&g.log(`Recording outcome: "${o}"${r>1?` (${r} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+r}}on(t,n){let r=this._hooks[t]=this._hooks[t]||[];return r.push(n),()=>{let o=r.indexOf(n);o>-1&&r.splice(o,1)}}emit(t,...n){let r=this._hooks[t];r&&r.forEach(o=>o(...n))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,n=>(T&&g.error("Error while sending envelope:",n),n)):(T&&g.error("Transport disabled"),Xe({}))}_setupIntegrations(){let{integrations:t}=this._options;this._integrations=Md(this,t),Ka(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",o=!1,i=n.exception?.values;if(i){o=!0;for(let c of i)if(c.mechanism?.handled===!1){r=!0;break}}let s=t.status==="ok";(s&&t.errors===0||s&&r)&&(en(t,E(m({},r&&{status:"crashed"}),{errors:t.errors||Number(o||r)})),this.captureSession(t))}_isClientDoneProcessing(t){return new Dt(n=>{let r=0,o=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=o,t&&r>=t&&(clearInterval(i),n(!1)))},o)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,o){let i=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&s?.length&&(n.integrations=s),this.emit("preprocessEvent",t,n),t.type||o.setLastEventId(t.event_id||n.event_id),uo(i,t,n,r,this,o).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts=m({trace:ui(r)},a.contexts);let c=hr(this,r);return a.sdkProcessingMetadata=m({dynamicSamplingContext:c},a.sdkProcessingMetadata),a})}_captureEvent(t,n={},r=M(),o=ce()){return T&&Qa(t)&&g.log(`Captured error event \`${Hi(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,o).then(i=>i.event_id,i=>{T&&(Bd(i)?g.log(i.message):Ud(i)?g.warn(i.message):g.warn(i))})}_processEvent(t,n,r,o){let i=this.getOptions(),{sampleRate:s}=i,a=Wd(t),c=Qa(t),u=t.type||"error",d=`before send for type \`${u}\``,l=typeof s>"u"?void 0:ft(s);if(c&&typeof l=="number"&&Math.random()>l)return this.recordDroppedEvent("sample_rate","error"),En(Za(`Discarding event because it's not included in the random sample (sampling rate = ${s})`));let f=u==="replay_event"?"replay":u;return this._prepareEvent(t,n,r,o).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",f),Za("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return p;let _=m_(this,i,p,n);return p_(_,d)}).then(p=>{if(p===null){if(this.recordDroppedEvent("before_send",f),a){let y=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",y)}throw Za(`${d} returned \`null\`, will not send event.`)}let h=r.getSession()||o.getSession();if(c&&h&&this._updateSessionFromEvent(h,p),a){let S=p.sdkProcessingMetadata?.spanCountBeforeProcessing||0,y=p.spans?p.spans.length:0,I=S-y;I>0&&this.recordDroppedEvent("before_send","span",I)}let _=p.transaction_info;if(a&&_&&p.transaction!==t.transaction){let S="custom";p.transaction_info=E(m({},_),{source:S})}return this.sendEvent(p,n),p}).then(null,p=>{throw Bd(p)||Ud(p)?p:(this.captureException(p,{data:{__sentry__:!0},originalException:p}),$i(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
10
|
-
Reason: ${p}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){let t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{let[o,i]=n.split(":");return{reason:o,category:i,quantity:r}})}_flushOutcomes(){T&&g.log("Flushing outcomes...");let t=this._clearOutcomes();if(t.length===0){T&&g.log("No outcomes to send");return}if(!this._dsn){T&&g.log("No dsn provided, will not send outcomes");return}T&&g.log("Sending outcomes:",t);let n=Od(t,this._options.tunnel&&ot(this._dsn));this.sendEnvelope(n)}};function p_(e,t){let n=`${t} must return \`null\` or a valid event.`;if(Mt(e))return e.then(r=>{if(!We(r)&&r!==null)throw $i(n);return r},r=>{throw $i(`${t} rejected with ${r}`)});if(!We(e)&&e!==null)throw $i(n);return e}function m_(e,t,n,r){let{beforeSend:o,beforeSendTransaction:i,beforeSendSpan:s}=t,a=n;if(Qa(a)&&o)return o(a,r);if(Wd(a)){if(s){let c=s(Ld(a));if(c?a=mn(n,Dd(c)):io(),a.spans){let u=[];for(let d of a.spans){let l=s(d);l?u.push(l):(io(),u.push(d))}a.spans=u}}if(i){if(a.spans){let c=a.spans.length;a.sdkProcessingMetadata=E(m({},n.sdkProcessingMetadata),{spanCountBeforeProcessing:c})}return i(a,r)}}return a}function Qa(e){return e.type===void 0}function Wd(e){return e.type==="transaction"}function Gd(e,t){return t?Oe(t,()=>{let n=te(),r=n?oo(n):ui(t);return[n?we(n):hr(e,t),r]}):[void 0,void 0]}var zd={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function h_(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function jd(e,t,n,r){let o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=ot(r)),Fe(o,[h_(e)])}var g_=100;function __(e){switch(typeof e){case"number":return Number.isInteger(e)?{value:e,type:"integer"}:{value:e,type:"double"};case"boolean":return{value:e,type:"boolean"};case"string":return{value:e,type:"string"};default:{let t="";try{t=JSON.stringify(e)??""}catch{}return{value:t,type:"string"}}}}function Tn(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function qd(e,t){let n=ec(),r=Vd(e);r===void 0?n.set(e,[t]):(n.set(e,[...r,t]),r.length>=g_&&Er(e,r))}function yr(e,t=v(),n=M(),r=qd){if(!t){T&&g.warn("No client available to capture log.");return}let{release:o,environment:i,enableLogs:s,beforeSendLog:a,_experiments:c}=t.getOptions();if(!(s??c?.enableLogs)){T&&g.warn("logging option not enabled, log will not be captured.");return}let d=a??c?.beforeSendLog,[,l]=Gd(t,n),f=m({},e.attributes),{user:{id:p,email:h,username:_}}=S_(n);Tn(f,"user.id",p,!1),Tn(f,"user.email",h,!1),Tn(f,"user.name",_,!1),Tn(f,"sentry.release",o),Tn(f,"sentry.environment",i);let{name:S,version:y}=t.getSdkMetadata()?.sdk??{};Tn(f,"sentry.sdk.name",S),Tn(f,"sentry.sdk.version",y);let I=e.message;if(pn(I)){let{__sentry_template_string__:G,__sentry_template_values__:R=[]}=I;f["sentry.message.template"]=G,R.forEach((F,V)=>{f[`sentry.message.parameter.${V}`]=F})}let W=tn(n);Tn(f,"sentry.trace.parent_span_id",W?.spanContext().spanId);let N=E(m({},e),{attributes:f});t.emit("beforeCaptureLog",N);let L=d?Be(()=>d(N)):N;if(!L){t.recordDroppedEvent("before_send","log_item",1),T&&g.warn("beforeSendLog returned null, log will not be captured.");return}let{level:b,message:C,attributes:P={},severityNumber:w}=L,A={timestamp:re(),level:b,body:C,trace_id:l?.trace_id,severity_number:w??zd[b],attributes:Object.keys(P).reduce((G,R)=>(G[R]=__(P[R]),G),{})};r(t,A),t.emit("afterCaptureLog",L)}function Er(e,t){let n=t??Vd(e)??[];if(n.length===0)return;let r=e.getOptions(),o=jd(n,r._metadata,r.tunnel,e.getDsn());ec().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function Vd(e){return ec().get(e)}function S_(e){let t=hn().getScopeData();return Sr(t,ce().getScopeData()),Sr(t,e.getScopeData()),t}function ec(){return Qt("clientToLogBufferMap",()=>new WeakMap)}function tc(e,t){t.debug===!0&&(T?g.enable():Be(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),M().update(t.initialScope);let r=new e(t);return nc(r),r.init(),r}function nc(e){M().setClient(e)}var rc=Symbol.for("SentryBufferFullError");function Yd(e){let t=[];function n(){return e===void 0||t.length<e}function r(s){return t.splice(t.indexOf(s),1)[0]||Promise.resolve(void 0)}function o(s){if(!n())return En(rc);let a=s();return t.indexOf(a)===-1&&t.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function i(s){return new Dt((a,c)=>{let u=t.length;if(!u)return a(!0);let d=setTimeout(()=>{s&&s>0&&a(!1)},s);t.forEach(l=>{Xe(l).then(()=>{--u||(clearTimeout(d),a(!0))},c)})})}return{$:t,add:o,drain:i}}function Wi(e,t=Date.now()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}function Jd(e,t){return e[t]||e.all||0}function go(e,t,n=Date.now()){return Jd(e,t)>n}function _o(e,{statusCode:t,headers:n},r=Date.now()){let o=m({},e),i=n?.["x-sentry-rate-limits"],s=n?.["retry-after"];if(i)for(let a of i.trim().split(",")){let[c,u,,,d]=a.split(":",5),l=parseInt(c,10),f=(isNaN(l)?60:l)*1e3;if(!u)o.all=r+f;else for(let p of u.split(";"))p==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(o[p]=r+f):o[p]=r+f}else s?o.all=r+Wi(s,r):t===429&&(o.all=r+60*1e3);return o}var y_=64;function Gi(e,t,n=Yd(e.bufferSize||y_)){let r={},o=s=>n.drain(s);function i(s){let a=[];if(pt(s,(l,f)=>{let p=wi(f);go(r,p)?e.recordDroppedEvent("ratelimit_backoff",p):a.push(l)}),a.length===0)return Xe({});let c=Fe(s[0],a),u=l=>{pt(c,(f,p)=>{e.recordDroppedEvent(l,wi(p))})},d=()=>t({body:Sn(c)}).then(l=>(l.statusCode!==void 0&&(l.statusCode<200||l.statusCode>=300)&&T&&g.warn(`Sentry responded with status code ${l.statusCode} to sent event.`),r=_o(r,l),l),l=>{throw u("network_error"),T&&g.error("Encountered error running transport request:",l),l});return n.add(d).then(l=>l,l=>{if(l===rc)return T&&g.error("Skipped sending event because buffer is full."),u("queue_overflow"),Xe({});throw l})}return{send:i,flush:o}}var oc=100,ic=5e3,E_=36e5;function sc(e){function t(...n){T&&g.log("[Offline]:",...n)}return n=>{let r=e(n);if(!n.createStore)throw new Error("No `createStore` function was provided");let o=n.createStore(n),i=ic,s;function a(l,f,p){return vi(l,["client_report"])?!1:n.shouldStore?n.shouldStore(l,f,p):!0}function c(l){s&&clearTimeout(s),s=setTimeout(async()=>{s=void 0;let f=await o.shift();f&&(t("Attempting to send previously queued event"),f[0].sent_at=new Date().toISOString(),d(f,!0).catch(p=>{t("Failed to retry sending",p)}))},l),typeof s!="number"&&s.unref&&s.unref()}function u(){s||(c(i),i=Math.min(i*2,E_))}async function d(l,f=!1){if(!f&&vi(l,["replay_event","replay_recording"]))return await o.push(l),c(oc),{};try{if(n.shouldSend&&await n.shouldSend(l)===!1)throw new Error("Envelope not sent because `shouldSend` callback returned false");let p=await r.send(l),h=oc;if(p){if(p.headers?.["retry-after"])h=Wi(p.headers["retry-after"]);else if(p.headers?.["x-sentry-rate-limits"])h=6e4;else if((p.statusCode||0)>=400)return p}return c(h),i=ic,p}catch(p){if(await a(l,p,i))return f?await o.unshift(l):await o.push(l),u(),t("Error sending. Event queued.",p),{};throw p}}return n.flushAtStartup&&u(),{send:d,flush:l=>(l===void 0&&(i=ic,c(oc)),r.flush(l))}}}function Kd(e,t){let n;return pt(e,(r,o)=>(t.includes(o)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function b_(e,t){return n=>{let r=e(n);return E(m({},r),{send:async o=>{let i=Kd(o,["event","transaction","profile","replay_event"]);return i&&(i.release=t),r.send(o)}})}}function T_(e,t){return Fe(t?E(m({},e[0]),{dsn:t}):e[0],e[1])}function Xd(e,t){return n=>{let r=e(n),o=new Map;function i(c,u){let d=u?`${c}:${u}`:c,l=o.get(d);if(!l){let f=bi(c);if(!f)return;let p=po(f,n.tunnel);l=u?b_(e,u)(E(m({},n),{url:p})):e(E(m({},n),{url:p})),o.set(d,l)}return[c,l]}async function s(c){function u(p){let h=p?.length?p:["event"];return Kd(c,h)}let d=t({envelope:c,getEvent:u}).map(p=>typeof p=="string"?i(p,void 0):i(p.dsn,p.release)).filter(p=>!!p),l=d.length?d:[["",r]];return(await Promise.all(l.map(([p,h])=>h.send(T_(c,p)))))[0]}async function a(c){let u=[...o.values(),r];return(await Promise.all(u.map(l=>l.flush(c)))).every(l=>l)}return{send:s,flush:a}}}function So(e,t){let n=t?.getDsn(),r=t?.getOptions().tunnel;return v_(e,n)||I_(e,r)}function I_(e,t){return t?Zd(e)===Zd(t):!1}function v_(e,t){return t?e.includes(t.host):!1}function Zd(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function ac(e,...t){let n=new String(String.raw(e,...t));return n.__sentry_template_string__=e.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),n.__sentry_template_values__=t,n}var cc=ac;function uc(e){e.user?.ip_address===void 0&&(e.user=E(m({},e.user),{ip_address:"{{auto}}"}))}function lc(e){"aggregates"in e?e.attrs?.ip_address===void 0&&(e.attrs=E(m({},e.attrs),{ip_address:"{{auto}}"})):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function dc(e,t,n=[t],r="npm"){let o=e._metadata||{};o.sdk||(o.sdk={name:`sentry.javascript.${t}`,packages:n.map(i=>({name:`${r}:@sentry/${i}`,version:ut})),version:ut}),e._metadata=o}function br(e={}){let t=e.client||v();if(!Fi()||!t)return{};let n=Ve(),r=bt(n);if(r.getTraceData)return r.getTraceData(e);let o=e.scope||M(),i=e.span||te(),s=i?gi(i):w_(o),a=i?we(i):hr(t,o),c=fi(a);return pi.test(s)?{"sentry-trace":s,baggage:c}:(g.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}function w_(e){let{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return ro(t,r,n)}function fc(e,t,n){let r,o,i,s=n?.maxWait?Math.max(n.maxWait,t):0,a=n?.setTimeoutImpl||setTimeout;function c(){return u(),r=e(),r}function u(){o!==void 0&&clearTimeout(o),i!==void 0&&clearTimeout(i),o=i=void 0}function d(){return o!==void 0||i!==void 0?c():r}function l(){return o&&clearTimeout(o),o=a(c,t),s&&i===void 0&&(i=a(c,s)),r}return l.cancel=u,l.flush=d,l}var R_=100;function it(e,t){let n=v(),r=ce();if(!n)return;let{beforeBreadcrumb:o=null,maxBreadcrumbs:i=R_}=n.getOptions();if(i<=0)return;let s=dt(),a=m({timestamp:s},e),c=o?Be(()=>o(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,i))}var Qd,x_="FunctionToString",ef=new WeakMap,C_=()=>({name:x_,setupOnce(){Qd=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=Dn(this),n=ef.has(v())&&t!==void 0?t:this;return Qd.apply(n,e)}}catch{}},setup(e){ef.set(e,!0)}}),zi=C_;var A_=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],k_="EventFilters",pc=(e={})=>{let t;return{name:k_,setup(n){let r=n.getOptions();t=tf(e,r)},processEvent(n,r,o){if(!t){let i=o.getOptions();t=tf(e,i)}return N_(n,t)?null:n}}},qi=(e={})=>E(m({},pc(e)),{name:"InboundFilters"});function tf(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:A_],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function N_(e,t){if(e.type){if(e.type==="transaction"&&O_(e,t.ignoreTransactions))return T&&g.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
11
|
-
Event: ${zt(e)}`),!0}else{if(M_(e,t.ignoreErrors))return T&&g.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
12
|
-
Event: ${zt(e)}`),!0;if(F_(e))return T&&g.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
13
|
-
Event: ${zt(e)}`),!0;if(L_(e,t.denyUrls))return T&&g.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
14
|
-
Event: ${zt(e)}.
|
|
15
|
-
Url: ${ji(e)}`),!0;if(!D_(e,t.allowUrls))return T&&g.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
16
|
-
Event: ${zt(e)}.
|
|
17
|
-
Url: ${ji(e)}`),!0}return!1}function M_(e,t){return t?.length?Hi(e).some(n=>Pe(n,t)):!1}function O_(e,t){if(!t?.length)return!1;let n=e.transaction;return n?Pe(n,t):!1}function L_(e,t){if(!t?.length)return!1;let n=ji(e);return n?Pe(n,t):!1}function D_(e,t){if(!t?.length)return!0;let n=ji(e);return n?Pe(n,t):!0}function P_(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function ji(e){try{let n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?P_(n):null}catch{return T&&g.error(`Cannot extract url for event ${zt(e)}`),null}}function F_(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function hc(e,t,n,r,o,i){if(!o.exception?.values||!i||!lt(i.originalException,Error))return;let s=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;s&&(o.exception.values=mc(e,t,r,i.originalException,n,o.exception.values,s,0))}function mc(e,t,n,r,o,i,s,a){if(i.length>=n+1)return i;let c=[...i];if(lt(r[o],Error)){nf(s,a);let u=e(t,r[o]),d=c.length;rf(u,o,d,a),c=mc(e,t,n,r[o],o,[u,...c],u,d)}return Array.isArray(r.errors)&&r.errors.forEach((u,d)=>{if(lt(u,Error)){nf(s,a);let l=e(t,u),f=c.length;rf(l,`errors[${d}]`,f,a),c=mc(e,t,n,u,o,[l,...c],l,f)}}),c}function nf(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=E(m(m({},e.mechanism),e.type==="AggregateError"&&{is_exception_group:!0}),{exception_id:t})}function rf(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism=E(m({},e.mechanism),{type:"chained",source:t,exception_id:n,parent_id:r})}var sf=new Map,of=new Set;function U_(e){if(x._sentryModuleMetadata)for(let t of Object.keys(x._sentryModuleMetadata)){let n=x._sentryModuleMetadata[t];if(of.has(t))continue;of.add(t);let r=e(t);for(let o of r.reverse())if(o.filename){sf.set(o.filename,n);break}}}function B_(e,t){return U_(e),sf.get(t)}function Vi(e,t){try{t.exception.values.forEach(n=>{if(n.stacktrace)for(let r of n.stacktrace.frames||[]){if(!r.filename||r.module_metadata)continue;let o=B_(e,r.filename);o&&(r.module_metadata=o)}})}catch{}}function Yi(e){try{e.exception.values.forEach(t=>{if(t.stacktrace)for(let n of t.stacktrace.frames||[])delete n.module_metadata})}catch{}}var af=()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",t=>{pt(t,(n,r)=>{if(r==="event"){let o=Array.isArray(n)?n[1]:void 0;o&&(Yi(o),n[1]=o)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;let n=e.getOptions().stackParser;Vi(n,t)})}});function Wn(e){let t="console";He(t,e),$e(t,H_)}function H_(){"console"in x&&Mn.forEach(function(e){e in x.console&&Ee(x.console,e,function(t){return ar[e]=t,function(...n){xe("console",{args:n,level:e}),ar[e]?.apply(x.console,n)}})})}function Gn(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}var $_="CaptureConsole",W_=(e={})=>{let t=e.levels||Mn,n=e.handled??!0;return{name:$_,setup(r){"console"in x&&Wn(({args:o,level:i})=>{v()!==r||!t.includes(i)||G_(o,i,n)})}}},cf=W_;function G_(e,t,n){let r={level:Gn(t),extra:{arguments:e}};Oe(o=>{if(o.addEventProcessor(a=>(a.logger="console",rt(a,{handled:n,type:"console"}),a)),t==="assert"){if(!e[0]){let a=`Assertion failed: ${Ln(e.slice(1)," ")||"console.assert"}`;o.setExtra("arguments",e.slice(1)),$n(a,r)}return}let i=e.find(a=>a instanceof Error);if(i){wt(i,r);return}let s=Ln(e," ");$n(s,r)})}var z_="Dedupe",j_=()=>{let e;return{name:z_,processEvent(t){if(t.type)return t;try{if(q_(t,e))return T&&g.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},Ji=j_;function q_(e,t){return t?!!(V_(e,t)||Y_(e,t)):!1}function V_(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!df(e,t)||!lf(e,t))}function Y_(e,t){let n=uf(t),r=uf(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!df(e,t)||!lf(e,t))}function lf(e,t){let n=cr(e),r=cr(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let o=0;o<r.length;o++){let i=r[o],s=n[o];if(i.filename!==s.filename||i.lineno!==s.lineno||i.colno!==s.colno||i.function!==s.function)return!1}return!0}function df(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 uf(e){return e.exception?.values?.[0]}var J_="ExtraErrorData",K_=(e={})=>{let{depth:t=3,captureErrorCause:n=!0}=e;return{name:J_,processEvent(r,o,i){let{maxValueLength:s=250}=i.getOptions();return X_(r,o,t,n,s)}}},ff=K_;function X_(e,t={},n,r,o){if(!t.originalException||!nt(t.originalException))return e;let i=t.originalException.name||t.originalException.constructor.name,s=Z_(t.originalException,r,o);if(s){let a=m({},e.contexts),c=Ne(s,n);return We(c)&&(he(c,"__sentry_skip_normalization__",!0),a[i]=c),E(m({},e),{contexts:a})}return e}function Z_(e,t,n){try{let r=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],o={};for(let i of Object.keys(e)){if(r.indexOf(i)!==-1)continue;let s=e[i];o[i]=nt(s)||typeof s=="string"?Et(`${s}`,n):s}if(t&&e.cause!==void 0&&(o.cause=nt(e.cause)?e.cause.toString():e.cause),typeof e.toJSON=="function"){let i=e.toJSON();for(let s of Object.keys(i)){let a=i[s];o[s]=nt(a)?a.toString():a}}return o}catch(r){T&&g.error("Unable to extract extra data from the Error object:",r)}return null}function Q_(e,t){let n=0;for(let r=e.length-1;r>=0;r--){let o=e[r];o==="."?e.splice(r,1):o===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}var eS=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function tS(e){let t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=eS.exec(t);return n?n.slice(1):[]}function pf(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let o=r>=0?e[r]:"/";o&&(t=`${o}/${t}`,n=o.charAt(0)==="/")}return t=Q_(t.split("/").filter(r=>!!r),!n).join("/"),(n?"/":"")+t||"."}function mf(e){let t=0;for(;t<e.length&&e[t]==="";t++);let n=e.length-1;for(;n>=0&&e[n]==="";n--);return t>n?[]:e.slice(t,n-t+1)}function hf(e,t){e=pf(e).slice(1),t=pf(t).slice(1);let n=mf(e.split("/")),r=mf(t.split("/")),o=Math.min(n.length,r.length),i=o;for(let a=0;a<o;a++)if(n[a]!==r[a]){i=a;break}let s=[];for(let a=i;a<n.length;a++)s.push("..");return s=s.concat(r.slice(i)),s.join("/")}function gf(e,t){let n=tS(e)[2]||"";return t&&n.slice(t.length*-1)===t&&(n=n.slice(0,n.length-t.length)),n}var nS="RewriteFrames",_f=(e={})=>{let t=e.root,n=e.prefix||"app:///",r="window"in x&&!!x.window,o=e.iteratee||rS({isBrowser:r,root:t,prefix:n});function i(a){try{return E(m({},a),{exception:E(m({},a.exception),{values:a.exception.values.map(c=>m(m({},c),c.stacktrace&&{stacktrace:s(c.stacktrace)}))})})}catch{return a}}function s(a){return E(m({},a),{frames:a?.frames?.map(c=>o(c))})}return{name:nS,processEvent(a){let c=a;return a.exception&&Array.isArray(a.exception.values)&&(c=i(c)),c}}};function rS({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;let o=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes("\\")&&!r.filename.includes("/"),i=/^\//.test(r.filename);if(e){if(t){let s=r.filename;s.indexOf(t)===0&&(r.filename=s.replace(t,n))}}else if(o||i){let s=o?r.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):r.filename,a=t?hf(t,s):gf(s);r.filename=`${n}${a}`}return r}}var oS=["reauthenticate","signInAnonymously","signInWithOAuth","signInWithIdToken","signInWithOtp","signInWithPassword","signInWithSSO","signOut","signUp","verifyOtp"],iS=["createUser","deleteUser","listUsers","getUserById","updateUserById","inviteUserByEmail"],sS={eq:"eq",neq:"neq",gt:"gt",gte:"gte",lt:"lt",lte:"lte",like:"like","like(all)":"likeAllOf","like(any)":"likeAnyOf",ilike:"ilike","ilike(all)":"ilikeAllOf","ilike(any)":"ilikeAnyOf",is:"is",in:"in",cs:"contains",cd:"containedBy",sr:"rangeGt",nxl:"rangeGte",sl:"rangeLt",nxr:"rangeLte",adj:"rangeAdjacent",ov:"overlaps",fts:"",plfts:"plain",phfts:"phrase",wfts:"websearch",not:"not"},yf=["select","insert","upsert","update","delete"];function Ki(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch{}}function Xi(e){try{return e.__SENTRY_INSTRUMENTED__}catch{return!1}}function aS(e,t={}){switch(e){case"GET":return"select";case"POST":return t.Prefer?.includes("resolution=")?"upsert":"insert";case"PATCH":return"update";case"DELETE":return"delete";default:return"<unknown-op>"}}function cS(e,t){if(t===""||t==="*")return"select(*)";if(e==="select")return`select(${t})`;if(e==="or"||e.endsWith(".or"))return`${e}${t}`;let[n,...r]=t.split("."),o;return n?.startsWith("fts")?o="textSearch":n?.startsWith("plfts")?o="textSearch[plain]":n?.startsWith("phfts")?o="textSearch[phrase]":n?.startsWith("wfts")?o="textSearch[websearch]":o=n&&sS[n]||"filter",`${o}(${e}, ${r.join(".")})`}function Sf(e,t=!1){return new Proxy(e,{apply(n,r,o){return Bn({name:`auth ${t?"(admin) ":""}${e.name}`,attributes:{[Q]:"auto.db.supabase",[ye]:"db","db.system":"postgresql","db.operation":`auth.${t?"admin.":""}${e.name}`}},i=>Reflect.apply(n,r,o).then(s=>(s&&typeof s=="object"&&"error"in s&&s.error?(i.setStatus({code:2}),wt(s.error,{mechanism:{handled:!1}})):i.setStatus({code:1}),i.end(),s)).catch(s=>{throw i.setStatus({code:2}),i.end(),wt(s,{mechanism:{handled:!1}}),s}).then(...o))}})}function uS(e){let t=e.auth;if(!(!t||Xi(e.auth))){for(let n of oS){let r=t[n];r&&typeof e.auth[n]=="function"&&(e.auth[n]=Sf(r))}for(let n of iS){let r=t.admin[n];r&&typeof e.auth.admin[n]=="function"&&(e.auth.admin[n]=Sf(r,!0))}Ki(e.auth)}}function lS(e){Xi(e.prototype.from)||(e.prototype.from=new Proxy(e.prototype.from,{apply(t,n,r){let o=Reflect.apply(t,n,r),i=o.constructor;return fS(i),o}}),Ki(e.prototype.from))}function dS(e){Xi(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(t,n,r){let o=yf,i=n,s=aS(i.method,i.headers);if(!o.includes(s)||!i?.url?.pathname||typeof i.url.pathname!="string")return Reflect.apply(t,n,r);let a=i.url.pathname.split("/"),c=a.length>0?a[a.length-1]:"",u=[];for(let[p,h]of i.url.searchParams.entries())u.push(cS(p,h));let d=Object.create(null);if(We(i.body))for(let[p,h]of Object.entries(i.body))d[p]=h;let l=`${s==="select"?"":`${s}${d?"(...) ":""}`}${u.join(" ")} from(${c})`,f={"db.table":c,"db.schema":i.schema,"db.url":i.url.origin,"db.sdk":i.headers["X-Client-Info"],"db.system":"postgresql","db.operation":s,[Q]:"auto.db.supabase",[ye]:"db"};return u.length&&(f["db.query"]=u),Object.keys(d).length&&(f["db.body"]=d),Bn({name:l,attributes:f},p=>Reflect.apply(t,n,[]).then(h=>{if(p&&(h&&typeof h=="object"&&"status"in h&&nn(p,h.status||500),p.end()),h.error){let y=new Error(h.error.message);h.error.code&&(y.code=h.error.code),h.error.details&&(y.details=h.error.details);let I={};u.length&&(I.query=u),Object.keys(d).length&&(I.body=d),wt(y,{contexts:{supabase:I}})}let _={type:"supabase",category:`db.${s}`,message:l},S={};return u.length&&(S.query=u),Object.keys(d).length&&(S.body=d),Object.keys(S).length&&(_.data=S),it(_),h},h=>{throw p&&(nn(p,500),p.end()),h}).then(...r))}}),Ki(e.prototype.then))}function fS(e){for(let t of yf)Xi(e.prototype[t])||(e.prototype[t]=new Proxy(e.prototype[t],{apply(n,r,o){let i=Reflect.apply(n,r,o),s=i.constructor;return T&&g.log(`Instrumenting ${t} operation's PostgRESTFilterBuilder`),dS(s),i}}),Ki(e.prototype[t]))}var gc=e=>{if(!e){T&&g.warn("Supabase integration was not installed because no Supabase client was provided.");return}let t=e.constructor===Function?e:e.constructor;lS(t),uS(e)},pS="Supabase",mS=e=>({setupOnce(){gc(e)},name:pS}),Ef=e=>mS(e.supabaseClient);var hS=10,gS="ZodErrors";function _S(e){return nt(e)&&e.name==="ZodError"&&Array.isArray(e.issues)}function SS(e){return E(m({},e),{path:"path"in e&&Array.isArray(e.path)?e.path.join("."):void 0,keys:"keys"in e?JSON.stringify(e.keys):void 0,unionErrors:"unionErrors"in e?JSON.stringify(e.unionErrors):void 0})}function yS(e){return e.map(t=>typeof t=="number"?"<array>":t).join(".")}function ES(e){let t=new Set;for(let r of e.issues){let o=yS(r.path);o.length>0&&t.add(o)}let n=Array.from(t);if(n.length===0){let r="variable";if(e.issues.length>0){let o=e.issues[0];o!==void 0&&"expected"in o&&typeof o.expected=="string"&&(r=o.expected)}return`Failed to validate ${r}`}return`Failed to validate keys: ${Et(n.join(", "),100)}`}function bS(e,t=!1,n,r){if(!n.exception?.values||!r.originalException||!_S(r.originalException)||r.originalException.issues.length===0)return n;try{let i=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(SS);return t&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({filename:"zod_issues.json",data:JSON.stringify({issues:i})})),E(m({},n),{exception:E(m({},n.exception),{values:[E(m({},n.exception.values[0]),{value:ES(r.originalException)}),...n.exception.values.slice(1)]}),extra:E(m({},n.extra),{"zoderror.issues":i.slice(0,e)})})}catch(o){return E(m({},n),{extra:E(m({},n.extra),{"zoderrors sentry integration parse error":{message:"an exception was thrown while processing ZodError within applyZodErrorsToEvent()",error:o instanceof Error?`${o.name}: ${o.message}
|
|
18
|
-
${o.stack}`:"unknown"}})})}}var TS=(e={})=>{let t=e.limit??hS;return{name:gS,processEvent(n,r){return bS(t,e.saveZodIssuesAsAttachment,n,r)}}},bf=TS;var If=e=>({name:"ThirdPartyErrorsFilter",setup(t){t.on("beforeEnvelope",n=>{pt(n,(r,o)=>{if(o==="event"){let i=Array.isArray(r)?r[1]:void 0;i&&(Yi(i),r[1]=i)}})}),t.on("applyFrameMetadata",n=>{if(n.type)return;let r=t.getOptions().stackParser;Vi(r,n)})},processEvent(t){let n=IS(t);if(n){let r=e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="apply-tag-if-contains-third-party-frames"?"some":"every";if(n[r](i=>!i.some(s=>e.filterKeys.includes(s)))){if(e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="drop-error-if-exclusively-contains-third-party-frames")return null;t.tags=E(m({},t.tags),{third_party_code:!0})}}return t}});function IS(e){let t=cr(e);if(t)return t.filter(n=>!!n.filename).map(n=>n.module_metadata?Object.keys(n.module_metadata).filter(r=>r.startsWith(Tf)).map(r=>r.slice(Tf.length)):[])}var Tf="_sentryBundlerPluginAppKey:";var vf=100,wf=10,Zi="flag.evaluation.";function Pt(e){let n=M().getScopeData().contexts.flags,r=n?n.values:[];return r.length&&(e.contexts===void 0&&(e.contexts={}),e.contexts.flags={values:[...r]}),e}function Rt(e,t,n=vf){let r=M().getScopeData().contexts;r.flags||(r.flags={values:[]});let o=r.flags.values;vS(o,e,t,n)}function vS(e,t,n,r){if(typeof n!="boolean")return;if(e.length>r){T&&g.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${r}`);return}let o=e.findIndex(i=>i.flag===t);o!==-1&&e.splice(o,1),e.length===r&&e.shift(),e.push({flag:t,result:n})}function xt(e,t,n=wf){if(typeof t!="boolean")return;let r=te();if(!r)return;let o=O(r).data;if(`${Zi}${e}`in o){r.setAttribute(`${Zi}${e}`,t);return}Object.keys(o).filter(s=>s.startsWith(Zi)).length<n&&r.setAttribute(`${Zi}${e}`,t)}var Rf=()=>({name:"FeatureFlags",processEvent(e,t,n){return Pt(e)},addFeatureFlag(e,t){Rt(e,t),xt(e,t)}});var wS="thismessage:/";function Qi(e){return"isRelative"in e}function yo(e,t){let n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=t??(n?wS:void 0);try{if("canParse"in URL&&!URL.canParse(e,r))return;let o=new URL(e,r);return n?{isRelative:n,pathname:o.pathname,search:o.search,hash:o.hash}:o}catch{}}function _c(e){if(Qi(e))return e.pathname;let t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function Ft(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function Eo(e){return e.split(/[?#]/,1)[0]}function Sc(e,t,n,r,o="auto.http.browser"){if(!e.fetchData)return;let{method:i,url:s}=e.fetchData,a=Ke()&&t(s);if(e.endTimestamp&&a){let l=e.fetchData.__span;if(!l)return;let f=r[l];f&&(xS(f,e),delete r[l]);return}let c=!!te(),u=a&&c?mt(AS(s,i,o)):new ze;if(e.fetchData.__span=u.spanContext().spanId,r[u.spanContext().spanId]=u,n(e.fetchData.url)){let l=e.args[0],f=e.args[1]||{},p=RS(l,f,Ke()&&c?u:void 0);p&&(e.args[1]=f,f.headers=p)}let d=v();if(d){let l={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};d.emit("beforeOutgoingRequestSpan",u,l)}return u}function RS(e,t,n){let r=br({span:n}),o=r["sentry-trace"],i=r.baggage;if(!o)return;let s=t.headers||(ii(e)?e.headers:void 0);if(s)if(CS(s)){let a=new Headers(s);if(a.get("sentry-trace")||a.set("sentry-trace",o),i){let c=a.get("baggage");c?es(c)||a.set("baggage",`${c},${i}`):a.set("baggage",i)}return a}else if(Array.isArray(s)){let a=[...s];s.find(u=>u[0]==="sentry-trace")||a.push(["sentry-trace",o]);let c=s.find(u=>u[0]==="baggage"&&es(u[1]));return i&&!c&&a.push(["baggage",i]),a}else{let a="sentry-trace"in s?s["sentry-trace"]:void 0,c="baggage"in s?s.baggage:void 0,u=c?Array.isArray(c)?[...c]:[c]:[],d=c&&(Array.isArray(c)?c.find(l=>es(l)):es(c));return i&&!d&&u.push(i),E(m({},s),{"sentry-trace":a??o,baggage:u.length>0?u.join(","):void 0})}else return m({},r)}function xS(e,t){if(t.response){nn(e,t.response.status);let n=t.response?.headers?.get("content-length");if(n){let r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus({code:2,message:"internal_error"});e.end()}function es(e){return e.split(",").some(t=>t.trim().startsWith(li))}function CS(e){return typeof Headers<"u"&<(e,Headers)}function AS(e,t,n){let r=yo(e);return{name:r?`${t} ${_c(r)}`:t,attributes:kS(e,r,t,n)}}function kS(e,t,n,r){let o={url:e,type:"fetch","http.method":n,[Q]:r,[ye]:"http.client"};return t&&(Qi(t)||(o["http.url"]=t.href,o["server.address"]=t.host),t.search&&(o["http.query"]=t.search),t.hash&&(o["http.fragment"]=t.hash)),o}function ts(e,t={},n=M()){let{message:r,name:o,email:i,url:s,source:a,associatedEventId:c,tags:u}=e,d={contexts:{feedback:{contact_email:i,name:o,message:r,url:s,source:a,associated_event_id:c}},type:"feedback",level:"info",tags:u},l=n?.getClient()||v();return l&&l.emit("beforeSendFeedback",d,t),n.captureEvent(d,t)}var NS="ConsoleLogs",xf={[Q]:"auto.console.logging"},MS=(e={})=>{let t=e.levels||Mn;return{name:NS,setup(n){let{enableLogs:r,_experiments:o,normalizeDepth:i=3,normalizeMaxBreadth:s=1e3}=n.getOptions();if(!(r??o?.enableLogs)){T&&g.warn("`enableLogs` is not enabled, ConsoleLogs integration disabled");return}Wn(({args:c,level:u})=>{if(v()!==n||!t.includes(u))return;if(u==="assert"){if(!c[0]){let l=c.slice(1),f=l.length>0?`Assertion failed: ${Cf(l,i,s)}`:"Assertion failed";yr({level:"error",message:f,attributes:xf})}return}let d=u==="log";yr({level:d?"info":u,message:Cf(c,i,s),severityNumber:d?10:void 0,attributes:xf})})}}},Af=MS;function Cf(e,t,n){return"util"in x&&typeof x.util.format=="function"?x.util.format(...e):OS(e,t,n)}function OS(e,t,n){return e.map(r=>yt(r)?String(r):JSON.stringify(Ne(r,t,n))).join(" ")}function ns(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}var Tr=x;function yc(){return"history"in Tr&&!!Tr.history}function LS(){if(!("fetch"in Tr))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function bo(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function To(){if(typeof EdgeRuntime=="string")return!0;if(!LS())return!1;if(bo(Tr.fetch))return!0;let e=!1,t=Tr.document;if(t&&typeof t.createElement=="function")try{let n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=bo(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){T&&g.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function Ec(){return"ReportingObserver"in Tr}function zn(e,t){let n="fetch";He(n,e),$e(n,()=>Nf(void 0,t))}function Tc(e){let t="fetch-body-resolved";He(t,e),$e(t,()=>Nf(PS))}function Nf(e,t=!1){t&&!To()||Ee(x,"fetch",function(n){return function(...r){let o=new Error,{method:i,url:s}=FS(r),a={args:r,fetchData:{method:i,url:s},startTimestamp:re()*1e3,virtualError:o,headers:US(r)};return e||xe("fetch",m({},a)),n.apply(x,r).then(async c=>(e?e(c):xe("fetch",E(m({},a),{endTimestamp:re()*1e3,response:c})),c),c=>{if(xe("fetch",E(m({},a),{endTimestamp:re()*1e3,error:c})),nt(c)&&c.stack===void 0&&(c.stack=o.stack,he(c,"framesToPop",1)),c instanceof TypeError&&(c.message==="Failed to fetch"||c.message==="Load failed"||c.message==="NetworkError when attempting to fetch resource."))try{let u=new URL(a.fetchData.url);c.message=`${c.message} (${u.host})`}catch{}throw c})}})}async function DS(e,t){if(e?.body){let n=e.body,r=n.getReader(),o=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3),i=!0;for(;i;){let s;try{s=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);let{done:a}=await r.read();clearTimeout(s),a&&(t(),i=!1)}catch{i=!1}finally{clearTimeout(s)}}clearTimeout(o),r.releaseLock(),n.cancel().then(null,()=>{})}}function PS(e){let t;try{t=e.clone()}catch{return}DS(t,()=>{xe("fetch-body-resolved",{endTimestamp:re()*1e3,response:e})})}function bc(e,t){return!!e&&typeof e=="object"&&!!e[t]}function kf(e){return typeof e=="string"?e:e?bc(e,"url")?e.url:e.toString?e.toString():"":""}function FS(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){let[n,r]=e;return{url:kf(n),method:bc(r,"method")?String(r.method).toUpperCase():"GET"}}let t=e[0];return{url:kf(t),method:bc(t,"method")?String(t.method).toUpperCase():"GET"}}function US(e){let[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(ii(t))return new Headers(t.headers)}catch{}}function Ic(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function vc(){return"npm"}function Mf(){return!Ic()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function Ir(){return typeof window<"u"&&(!Mf()||BS())}function BS(){return x.process?.type==="renderer"}var Bt=x,ue=Bt.document,Io=Bt.navigator,Jf="Report a Bug",HS="Cancel",$S="Send Bug Report",WS="Confirm",GS="Report a Bug",zS="your.email@example.org",jS="Email",qS="What's the bug? What did you expect?",VS="Description",YS="Your Name",JS="Name",KS="Thank you for your report!",XS="(required)",ZS="Add a screenshot",QS="Remove screenshot",ey="widget",ty="api",ny=5e3,Kf=(e,t={includeReplay:!0})=>{if(!e.message)throw new Error("Unable to submit feedback with empty message");let n=v();if(!n)throw new Error("No client setup, cannot send feedback.");e.tags&&Object.keys(e.tags).length&&M().setTags(e.tags);let r=ts(m({source:ty,url:Ye()},e),t);return new Promise((o,i)=>{let s=setTimeout(()=>i("Unable to determine if Feedback was correctly sent."),3e4),a=n.on("afterSendEvent",(c,u)=>{if(c.event_id===r)return clearTimeout(s),a(),u&&typeof u.statusCode=="number"&&u.statusCode>=200&&u.statusCode<300?o(r):u&&typeof u.statusCode=="number"&&u.statusCode===0?i("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?i("Unable to send Feedback. This could be because this domain is not in your list of allowed domains."):i("Unable to send Feedback. This could be because of network issues, or because you are using an ad-blocker")})})},ss=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function ry(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(Io.userAgent)||/Macintosh/i.test(Io.userAgent)&&Io.maxTouchPoints&&Io.maxTouchPoints>1||!isSecureContext)}function rs(e,t){return E(m(m({},e),t),{tags:m(m({},e.tags),t.tags),onFormOpen:()=>{t.onFormOpen?.(),e.onFormOpen?.()},onFormClose:()=>{t.onFormClose?.(),e.onFormClose?.()},onSubmitSuccess:(n,r)=>{t.onSubmitSuccess?.(n,r),e.onSubmitSuccess?.(n,r)},onSubmitError:n=>{t.onSubmitError?.(n),e.onSubmitError?.(n)},onFormSubmitted:()=>{t.onFormSubmitted?.(),e.onFormSubmitted?.()},themeDark:m(m({},e.themeDark),t.themeDark),themeLight:m(m({},e.themeLight),t.themeLight)})}function oy(e){let t=ue.createElement("style");return t.textContent=`
|
|
19
|
-
.widget__actor {
|
|
20
|
-
position: fixed;
|
|
21
|
-
z-index: var(--z-index);
|
|
22
|
-
margin: var(--page-margin);
|
|
23
|
-
inset: var(--actor-inset);
|
|
24
|
-
|
|
25
|
-
display: flex;
|
|
26
|
-
align-items: center;
|
|
27
|
-
gap: 8px;
|
|
28
|
-
padding: 16px;
|
|
29
|
-
|
|
30
|
-
font-family: inherit;
|
|
31
|
-
font-size: var(--font-size);
|
|
32
|
-
font-weight: 600;
|
|
33
|
-
line-height: 1.14em;
|
|
34
|
-
text-decoration: none;
|
|
35
|
-
|
|
36
|
-
background: var(--actor-background, var(--background));
|
|
37
|
-
border-radius: var(--actor-border-radius, 1.7em/50%);
|
|
38
|
-
border: var(--actor-border, var(--border));
|
|
39
|
-
box-shadow: var(--actor-box-shadow, var(--box-shadow));
|
|
40
|
-
color: var(--actor-color, var(--foreground));
|
|
41
|
-
fill: var(--actor-color, var(--foreground));
|
|
42
|
-
cursor: pointer;
|
|
43
|
-
opacity: 1;
|
|
44
|
-
transition: transform 0.2s ease-in-out;
|
|
45
|
-
transform: translate(0, 0) scale(1);
|
|
46
|
-
}
|
|
47
|
-
.widget__actor[aria-hidden="true"] {
|
|
48
|
-
opacity: 0;
|
|
49
|
-
pointer-events: none;
|
|
50
|
-
visibility: hidden;
|
|
51
|
-
transform: translate(0, 16px) scale(0.98);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.widget__actor:hover {
|
|
55
|
-
background: var(--actor-hover-background, var(--background));
|
|
56
|
-
filter: var(--interactive-filter);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.widget__actor svg {
|
|
60
|
-
width: 1.14em;
|
|
61
|
-
height: 1.14em;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
@media (max-width: 600px) {
|
|
65
|
-
.widget__actor span {
|
|
66
|
-
display: none;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
`,e&&t.setAttribute("nonce",e),t}function ht(e,t){return Object.entries(t).forEach(([n,r])=>{e.setAttributeNS(null,n,r)}),e}var vr=20,iy="http://www.w3.org/2000/svg";function sy(){let e=a=>Bt.document.createElementNS(iy,a),t=ht(e("svg"),{width:`${vr}`,height:`${vr}`,viewBox:`0 0 ${vr} ${vr}`,fill:"var(--actor-color, var(--foreground))"}),n=ht(e("g"),{clipPath:"url(#clip0_57_80)"}),r=ht(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);let o=e("defs"),i=ht(e("clipPath"),{id:"clip0_57_80"}),s=ht(e("rect"),{width:`${vr}`,height:`${vr}`,fill:"white"});return i.appendChild(s),o.appendChild(i),t.appendChild(o).appendChild(i).appendChild(s),t}function ay({triggerLabel:e,triggerAriaLabel:t,shadow:n,styleNonce:r}){let o=ue.createElement("button");if(o.type="button",o.className="widget__actor",o.ariaHidden="false",o.ariaLabel=t||e||Jf,o.appendChild(sy()),e){let s=ue.createElement("span");s.appendChild(ue.createTextNode(e)),o.appendChild(s)}let i=oy(r);return{el:o,appendToDom(){n.appendChild(i),n.appendChild(o)},removeFromDom(){o.remove(),i.remove()},show(){o.ariaHidden="false"},hide(){o.ariaHidden="true"}}}var Xf="rgba(88, 74, 192, 1)",cy={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:Xf,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%)"},Of={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackground:Xf,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 Lf(e){return`
|
|
70
|
-
--foreground: ${e.foreground};
|
|
71
|
-
--background: ${e.background};
|
|
72
|
-
--accent-foreground: ${e.accentForeground};
|
|
73
|
-
--accent-background: ${e.accentBackground};
|
|
74
|
-
--success-color: ${e.successColor};
|
|
75
|
-
--error-color: ${e.errorColor};
|
|
76
|
-
--border: ${e.border};
|
|
77
|
-
--box-shadow: ${e.boxShadow};
|
|
78
|
-
--outline: ${e.outline};
|
|
79
|
-
--interactive-filter: ${e.interactiveFilter};
|
|
80
|
-
`}function uy({colorScheme:e,themeDark:t,themeLight:n,styleNonce:r}){let o=ue.createElement("style");return o.textContent=`
|
|
81
|
-
:host {
|
|
82
|
-
--font-family: system-ui, 'Helvetica Neue', Arial, sans-serif;
|
|
83
|
-
--font-size: 14px;
|
|
84
|
-
--z-index: 100000;
|
|
85
|
-
|
|
86
|
-
--page-margin: 16px;
|
|
87
|
-
--inset: auto 0 0 auto;
|
|
88
|
-
--actor-inset: var(--inset);
|
|
89
|
-
|
|
90
|
-
font-family: var(--font-family);
|
|
91
|
-
font-size: var(--font-size);
|
|
92
|
-
|
|
93
|
-
${e!=="system"?"color-scheme: only light;":""}
|
|
94
|
-
|
|
95
|
-
${Lf(e==="dark"?m(m({},Of),t):m(m({},cy),n))}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
${e==="system"?`
|
|
99
|
-
@media (prefers-color-scheme: dark) {
|
|
100
|
-
:host {
|
|
101
|
-
${Lf(m(m({},Of),t))}
|
|
102
|
-
}
|
|
103
|
-
}`:""}
|
|
104
|
-
}
|
|
105
|
-
`,r&&o.setAttribute("nonce",r),o}var fs=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>({id:o="sentry-feedback",autoInject:i=!0,showBranding:s=!0,isEmailRequired:a=!1,isNameRequired:c=!1,showEmail:u=!0,showName:d=!0,enableScreenshot:l=!0,useSentryUser:f={email:"email",name:"username"},tags:p,styleNonce:h,scriptNonce:_,colorScheme:S="system",themeLight:y={},themeDark:I={},addScreenshotButtonLabel:W=ZS,cancelButtonLabel:N=HS,confirmButtonLabel:L=WS,emailLabel:b=jS,emailPlaceholder:C=zS,formTitle:P=GS,isRequiredLabel:w=XS,messageLabel:A=VS,messagePlaceholder:G=qS,nameLabel:R=JS,namePlaceholder:F=YS,removeScreenshotButtonLabel:V=QS,submitButtonLabel:H=$S,successMessageText:D=KS,triggerLabel:z=Jf,triggerAriaLabel:B="",onFormOpen:J,onFormClose:Z,onSubmitSuccess:_e,onSubmitError:St,onFormSubmitted:Ae}={})=>{let Re={id:o,autoInject:i,showBranding:s,isEmailRequired:a,isNameRequired:c,showEmail:u,showName:d,enableScreenshot:l,useSentryUser:f,tags:p,styleNonce:h,scriptNonce:_,colorScheme:S,themeDark:I,themeLight:y,triggerLabel:z,triggerAriaLabel:B,cancelButtonLabel:N,submitButtonLabel:H,confirmButtonLabel:L,formTitle:P,emailLabel:b,emailPlaceholder:C,messageLabel:A,messagePlaceholder:G,nameLabel:R,namePlaceholder:F,successMessageText:D,isRequiredLabel:w,addScreenshotButtonLabel:W,removeScreenshotButtonLabel:V,onFormClose:Z,onFormOpen:J,onSubmitError:St,onSubmitSuccess:_e,onFormSubmitted:Ae},ct=null,Zt=[],or=Se=>{if(!ct){let De=ue.createElement("div");De.id=String(Se.id),ue.body.appendChild(De),ct=De.attachShadow({mode:"open"}),ct.appendChild(uy(Se))}return ct},ir=async Se=>{let De=Se.enableScreenshot&&ry(),Wt,Ie;try{Wt=(t?t():await e("feedbackModalIntegration",_))(),mo(Wt)}catch{throw ss&&g.error("[Feedback] Error when trying to load feedback integrations. Try using `feedbackSyncIntegration` in your `Sentry.init`."),new Error("[Feedback] Missing feedback modal integration!")}try{let Gt=De?n?n():await e("feedbackScreenshotIntegration",_):void 0;Gt&&(Ie=Gt(),mo(Ie))}catch{ss&&g.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.")}let ke=Wt.createDialog({options:E(m({},Se),{onFormClose:()=>{ke?.close(),Se.onFormClose?.()},onFormSubmitted:()=>{ke?.close(),Se.onFormSubmitted?.()}}),screenshotIntegration:Ie,sendFeedback:Kf,shadow:or(Se)});return ke},Jr=(Se,De={})=>{let Wt=rs(Re,De),Ie=typeof Se=="string"?ue.querySelector(Se):typeof Se.addEventListener=="function"?Se:null;if(!Ie)throw ss&&g.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let ke=null,Gt=async()=>{ke||(ke=await ir(E(m({},Wt),{onFormSubmitted:()=>{ke?.removeFromDom(),Wt.onFormSubmitted?.()}}))),ke.appendToDom(),ke.open()};Ie.addEventListener("click",Gt);let Nn=()=>{Zt=Zt.filter(sr=>sr!==Nn),ke?.removeFromDom(),ke=null,Ie.removeEventListener("click",Gt)};return Zt.push(Nn),Nn},ln=(Se={})=>{let De=rs(Re,Se),Wt=or(De),Ie=ay({triggerLabel:De.triggerLabel,triggerAriaLabel:De.triggerAriaLabel,shadow:Wt,styleNonce:h});return Jr(Ie.el,E(m({},De),{onFormOpen(){Ie.hide()},onFormClose(){Ie.show()},onFormSubmitted(){Ie.show()}})),Ie};return{name:"Feedback",setupOnce(){!Ir()||!Re.autoInject||(ue.readyState==="loading"?ue.addEventListener("DOMContentLoaded",()=>ln().appendToDom()):ln().appendToDom())},attachTo:Jr,createWidget(Se={}){let De=ln(rs(Re,Se));return De.appendToDom(),De},async createForm(Se={}){return ir(rs(Re,Se))},remove(){ct&&(ct.parentElement?.remove(),ct=null),Zt.forEach(Se=>Se()),Zt=[]}}};function ly(){return v()?.getIntegrationByName("Feedback")}var ps,de,Zf,jn,Df,Qf,kc,vo={},Lc=[],dy=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Dc=Array.isArray;function vn(e,t){for(var n in t)e[n]=t[n];return e}function ep(e){var t=e.parentNode;t&&t.removeChild(e)}function K(e,t,n){var r,o,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?ps.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return as(e,s,r,o,null)}function as(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++Zf,__i:-1,__u:0};return o==null&&de.vnode!=null&&de.vnode(i),i}function wo(e){return e.children}function cs(e,t){this.props=e,this.context=t}function Rr(e,t){if(t==null)return e.__?Rr(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"?Rr(e):null}function fy(e,t,n){var r,o=e.__v,i=o.__e,s=e.__P;if(s)return(r=vn({},o)).__v=o.__v+1,de.vnode&&de.vnode(r),Pc(s,r,o,e.__n,s.ownerSVGElement!==void 0,32&o.__u?[i]:null,t,i??Rr(o),!!(32&o.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=i&&tp(r),r}function tp(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 tp(e)}}function Pf(e){(!e.__d&&(e.__d=!0)&&jn.push(e)&&!ds.__r++||Df!==de.debounceRendering)&&((Df=de.debounceRendering)||Qf)(ds)}function ds(){var e,t,n,r=[],o=[];for(jn.sort(kc);e=jn.shift();)e.__d&&(n=jn.length,t=fy(e,r,o)||t,n===0||jn.length>n?(Nc(r,t,o),o.length=r.length=0,t=void 0,jn.sort(kc)):t&&de.__c&&de.__c(t,Lc));t&&Nc(r,t,o),ds.__r=0}function np(e,t,n,r,o,i,s,a,c,u,d){var l,f,p,h,_,S=r&&r.__k||Lc,y=t.length;for(n.__d=c,py(n,t,S),c=n.__d,l=0;l<y;l++)(p=n.__k[l])!=null&&typeof p!="boolean"&&typeof p!="function"&&(f=p.__i===-1?vo:S[p.__i]||vo,p.__i=l,Pc(e,p,f,o,i,s,a,c,u,d),h=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&Fc(f.ref,null,p),d.push(p.ref,p.__c||h,p)),_==null&&h!=null&&(_=h),65536&p.__u||f.__k===p.__k?c=rp(p,c,e):typeof p.type=="function"&&p.__d!==void 0?c=p.__d:h&&(c=h.nextSibling),p.__d=void 0,p.__u&=-196609);n.__d=c,n.__e=_}function py(e,t,n){var r,o,i,s,a,c=t.length,u=n.length,d=u,l=0;for(e.__k=[],r=0;r<c;r++)(o=e.__k[r]=(o=t[r])==null||typeof o=="boolean"||typeof o=="function"?null:typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?as(null,o,null,null,o):Dc(o)?as(wo,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?as(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)!=null?(o.__=e,o.__b=e.__b+1,a=my(o,n,s=r+l,d),o.__i=a,i=null,a!==-1&&(d--,(i=n[a])&&(i.__u|=131072)),i==null||i.__v===null?(a==-1&&l--,typeof o.type!="function"&&(o.__u|=65536)):a!==s&&(a===s+1?l++:a>s?d>c-s?l+=a-s:l--:l=a<s&&a==s-1?a-s:0,a!==r+l&&(o.__u|=65536))):(i=n[r])&&i.key==null&&i.__e&&(i.__e==e.__d&&(e.__d=Rr(i)),Mc(i,i,!1),n[r]=null,d--);if(d)for(r=0;r<u;r++)(i=n[r])!=null&&(131072&i.__u)==0&&(i.__e==e.__d&&(e.__d=Rr(i)),Mc(i,i))}function rp(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=rp(r[o],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function my(e,t,n,r){var o=e.key,i=e.type,s=n-1,a=n+1,c=t[n];if(c===null||c&&o==c.key&&i===c.type)return n;if(r>(c!=null&&(131072&c.__u)==0?1:0))for(;s>=0||a<t.length;){if(s>=0){if((c=t[s])&&(131072&c.__u)==0&&o==c.key&&i===c.type)return s;s--}if(a<t.length){if((c=t[a])&&(131072&c.__u)==0&&o==c.key&&i===c.type)return a;a++}}return-1}function Ff(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||dy.test(t)?n:n+"px"}function os(e,t,n,r,o){var i;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Ff(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Ff(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,i?Bf:Uf,i)):e.removeEventListener(t,i?Bf:Uf,i);else{if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t!=="role"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function Uf(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(de.event?de.event(e):e)}}function Bf(e){if(this.l)return this.l[e.type+!0](de.event?de.event(e):e)}function Pc(e,t,n,r,o,i,s,a,c,u){var d,l,f,p,h,_,S,y,I,W,N,L,b,C,P,w=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),i=[a=t.__e=n.__e]),(d=de.__b)&&d(t);e:if(typeof w=="function")try{if(y=t.props,I=(d=w.contextType)&&r[d.__c],W=d?I?I.props.value:d.__:r,n.__c?S=(l=t.__c=n.__c).__=l.__E:("prototype"in w&&w.prototype.render?t.__c=l=new w(y,W):(t.__c=l=new cs(y,W),l.constructor=w,l.render=gy),I&&I.sub(l),l.props=y,l.state||(l.state={}),l.context=W,l.__n=r,f=l.__d=!0,l.__h=[],l._sb=[]),l.__s==null&&(l.__s=l.state),w.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=vn({},l.__s)),vn(l.__s,w.getDerivedStateFromProps(y,l.__s))),p=l.props,h=l.state,l.__v=t,f)w.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(w.getDerivedStateFromProps==null&&y!==p&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(y,W),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(y,l.__s,W)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(l.props=y,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(A){A&&(A.__=t)}),N=0;N<l._sb.length;N++)l.__h.push(l._sb[N]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(y,l.__s,W),l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(p,h,_)})}if(l.context=W,l.props=y,l.__P=e,l.__e=!1,L=de.__r,b=0,"prototype"in w&&w.prototype.render){for(l.state=l.__s,l.__d=!1,L&&L(t),d=l.render(l.props,l.state,l.context),C=0;C<l._sb.length;C++)l.__h.push(l._sb[C]);l._sb=[]}else do l.__d=!1,L&&L(t),d=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++b<25);l.state=l.__s,l.getChildContext!=null&&(r=vn(vn({},r),l.getChildContext())),f||l.getSnapshotBeforeUpdate==null||(_=l.getSnapshotBeforeUpdate(p,h)),np(e,Dc(P=d!=null&&d.type===wo&&d.key==null?d.props.children:d)?P:[P],t,n,r,o,i,s,a,c,u),l.base=t.__e,t.__u&=-161,l.__h.length&&s.push(l),S&&(l.__E=l.__=null)}catch(A){t.__v=null,c||i!=null?(t.__e=a,t.__u|=c?160:32,i[i.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),de.__e(A,t,n)}else i==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=hy(n.__e,t,n,r,o,i,s,c,u);(d=de.diffed)&&d(t)}function Nc(e,t,n){for(var r=0;r<n.length;r++)Fc(n[r],n[++r],n[++r]);de.__c&&de.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){de.__e(i,o.__v)}})}function hy(e,t,n,r,o,i,s,a,c){var u,d,l,f,p,h,_,S=n.props,y=t.props,I=t.type;if(I==="svg"&&(o=!0),i!=null){for(u=0;u<i.length;u++)if((p=i[u])&&"setAttribute"in p==!!I&&(I?p.localName===I:p.nodeType===3)){e=p,i[u]=null;break}}if(e==null){if(I===null)return document.createTextNode(y);e=o?document.createElementNS("http://www.w3.org/2000/svg",I):document.createElement(I,y.is&&y),i=null,a=!1}if(I===null)S===y||a&&e.data===y||(e.data=y);else{if(i=i&&ps.call(e.childNodes),S=n.props||vo,!a&&i!=null)for(S={},u=0;u<e.attributes.length;u++)S[(p=e.attributes[u]).name]=p.value;for(u in S)p=S[u],u=="children"||(u=="dangerouslySetInnerHTML"?l=p:u==="key"||u in y||os(e,u,null,p,o));for(u in y)p=y[u],u=="children"?f=p:u=="dangerouslySetInnerHTML"?d=p:u=="value"?h=p:u=="checked"?_=p:u==="key"||a&&typeof p!="function"||S[u]===p||os(e,u,p,S[u],o);if(d)a||l&&(d.__html===l.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(l&&(e.innerHTML=""),np(e,Dc(f)?f:[f],t,n,r,o&&I!=="foreignObject",i,s,i?i[0]:n.__k&&Rr(n,0),a,c),i!=null)for(u=i.length;u--;)i[u]!=null&&ep(i[u]);a||(u="value",h!==void 0&&(h!==e[u]||I==="progress"&&!h||I==="option"&&h!==S[u])&&os(e,u,h,S[u],!1),u="checked",_!==void 0&&_!==e[u]&&os(e,u,_,S[u],!1))}return e}function Fc(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){de.__e(r,n)}}function Mc(e,t,n){var r,o;if(de.unmount&&de.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Fc(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){de.__e(i,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&Mc(r[o],t,n||typeof e.type!="function");n||e.__e==null||ep(e.__e),e.__=e.__e=e.__d=void 0}function gy(e,t,n){return this.constructor(e,n)}function _y(e,t,n){var r,o,i,s;de.__&&de.__(e,t),o=(r=!1)?null:t.__k,i=[],s=[],Pc(t,e=t.__k=K(wo,null,[e]),o||vo,vo,t.ownerSVGElement!==void 0,o?null:t.firstChild?ps.call(t.childNodes):null,i,o?o.__e:t.firstChild,r,s),e.__d=void 0,Nc(i,e,s)}ps=Lc.slice,de={__e:function(e,t,n,r){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),s=o.__d),s)return o.__E=o}catch(a){e=a}throw e}},Zf=0,cs.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=vn({},this.state),typeof e=="function"&&(e=e(vn({},n),this.props)),e&&vn(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Pf(this))},cs.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Pf(this))},cs.prototype.render=wo,jn=[],Qf=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,kc=function(e,t){return e.__v.__b-t.__v.__b},ds.__r=0;var on,le,wc,Hf,xr=0,op=[],us=[],be=de,$f=be.__b,Wf=be.__r,Gf=be.diffed,zf=be.__c,jf=be.unmount,qf=be.__;function Vn(e,t){be.__h&&be.__h(le,e,xr||t),xr=0;var n=le.__H||(le.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:us}),n.__[e]}function qn(e){return xr=1,ip(ap,e)}function ip(e,t,n){var r=Vn(on++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):ap(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=le,!le.u)){var o=function(a,c,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!i||i.call(this,a,c,u);var l=!1;return d.forEach(function(f){if(f.__N){var p=f.__[0];f.__=f.__N,f.__N=void 0,p!==f.__[0]&&(l=!0)}}),!(!l&&r.__c.props===a)&&(!i||i.call(this,a,c,u))};le.u=!0;var i=le.shouldComponentUpdate,s=le.componentWillUpdate;le.componentWillUpdate=function(a,c,u){if(this.__e){var d=i;i=void 0,o(a,c,u),i=d}s&&s.call(this,a,c,u)},le.shouldComponentUpdate=o}return r.__N||r.__}function Sy(e,t){var n=Vn(on++,3);!be.__s&&Uc(n.__H,t)&&(n.__=e,n.i=t,le.__H.__h.push(n))}function sp(e,t){var n=Vn(on++,4);!be.__s&&Uc(n.__H,t)&&(n.__=e,n.i=t,le.__h.push(n))}function yy(e){return xr=5,Ro(function(){return{current:e}},[])}function Ey(e,t,n){xr=6,sp(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 Ro(e,t){var n=Vn(on++,7);return Uc(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function wr(e,t){return xr=8,Ro(function(){return e},t)}function by(e){var t=le.context[e.__c],n=Vn(on++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(le)),t.props.value):e.__}function Ty(e,t){be.useDebugValue&&be.useDebugValue(t?t(e):e)}function Iy(e){var t=Vn(on++,10),n=qn();return t.__=e,le.componentDidCatch||(le.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function vy(){var e=Vn(on++,11);if(!e.__){for(var t=le.__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 wy(){for(var e;e=op.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ls),e.__H.__h.forEach(Oc),e.__H.__h=[]}catch(t){e.__H.__h=[],be.__e(t,e.__v)}}be.__b=function(e){le=null,$f&&$f(e)},be.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),qf&&qf(e,t)},be.__r=function(e){Wf&&Wf(e),on=0;var t=(le=e.__c).__H;t&&(wc===le?(t.__h=[],le.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=us,n.__N=n.i=void 0})):(t.__h.forEach(ls),t.__h.forEach(Oc),t.__h=[],on=0)),wc=le},be.diffed=function(e){Gf&&Gf(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(op.push(t)!==1&&Hf===be.requestAnimationFrame||((Hf=be.requestAnimationFrame)||Ry)(wy)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==us&&(n.__=n.__V),n.i=void 0,n.__V=us})),wc=le=null},be.__c=function(e,t){t.some(function(n){try{n.__h.forEach(ls),n.__h=n.__h.filter(function(r){return!r.__||Oc(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],be.__e(r,n.__v)}}),zf&&zf(e,t)},be.unmount=function(e){jf&&jf(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{ls(r)}catch(o){t=o}}),n.__H=void 0,t&&be.__e(t,n.__v))};var Vf=typeof requestAnimationFrame=="function";function Ry(e){var t,n=function(){clearTimeout(r),Vf&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Vf&&(t=requestAnimationFrame(n))}function ls(e){var t=le,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),le=t}function Oc(e){var t=le;e.__c=e.__(),le=t}function Uc(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function ap(e,t){return typeof t=="function"?t(e):t}var xy=Object.defineProperty({__proto__:null,useCallback:wr,useContext:by,useDebugValue:Ty,useEffect:Sy,useErrorBoundary:Iy,useId:vy,useImperativeHandle:Ey,useLayoutEffect:sp,useMemo:Ro,useReducer:ip,useRef:yy,useState:qn},Symbol.toStringTag,{value:"Module"}),Cy="http://www.w3.org/2000/svg";function Ay(){let e=r=>ue.createElementNS(Cy,r),t=ht(e("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),n=ht(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}function ky({options:e}){let t=Ro(()=>({__html:Ay().outerHTML}),[]);return K("h2",{class:"dialog__header"},K("span",{class:"dialog__title"},e.formTitle),e.showBranding?K("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:t}):null)}function Ny(e,t){let 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}function Rc(e,t){let n=e.get(t);return typeof n=="string"?n.trim():""}function My({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:o,onSubmitSuccess:i,onSubmitError:s,showEmail:a,showName:c,screenshotInput:u}){let{tags:d,addScreenshotButtonLabel:l,removeScreenshotButtonLabel:f,cancelButtonLabel:p,emailLabel:h,emailPlaceholder:_,isEmailRequired:S,isNameRequired:y,messageLabel:I,messagePlaceholder:W,nameLabel:N,namePlaceholder:L,submitButtonLabel:b,isRequiredLabel:C}=e,[P,w]=qn(!1),[A,G]=qn(null),[R,F]=qn(!1),V=u?.input,[H,D]=qn(null),z=wr(Z=>{D(Z),F(!1)},[]),B=wr(Z=>{let _e=Ny(Z,{emailLabel:h,isEmailRequired:S,isNameRequired:y,messageLabel:I,nameLabel:N});return _e.length>0?G(`Please enter in the following required fields: ${_e.join(", ")}`):G(null),_e.length===0},[h,S,y,I,N]),J=wr(async Z=>{w(!0);try{if(Z.preventDefault(),!(Z.target instanceof HTMLFormElement))return;let _e=new FormData(Z.target),St=await(u&&R?u.value():void 0),Ae={name:Rc(_e,"name"),email:Rc(_e,"email"),message:Rc(_e,"message"),attachments:St?[St]:void 0};if(!B(Ae))return;try{let Re=await o({name:Ae.name,email:Ae.email,message:Ae.message,source:ey,tags:d},{attachments:Ae.attachments});i(Ae,Re)}catch(Re){ss&&g.error(Re),G(Re),s(Re)}}finally{w(!1)}},[u&&R,i,s]);return K("form",{class:"form",onSubmit:J},V&&R?K(V,{onError:z}):null,K("fieldset",{class:"form__right","data-sentry-feedback":!0,disabled:P},K("div",{class:"form__top"},A?K("div",{class:"form__error-container"},A):null,c?K("label",{for:"name",class:"form__label"},K(xc,{label:N,isRequiredLabel:C,isRequired:y}),K("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:L,required:y,type:"text"})):K("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden"}),a?K("label",{for:"email",class:"form__label"},K(xc,{label:h,isRequiredLabel:C,isRequired:S}),K("input",{class:"form__input",defaultValue:t,id:"email",name:"email",placeholder:_,required:S,type:"email"})):K("input",{"aria-hidden":!0,value:t,name:"email",type:"hidden"}),K("label",{for:"message",class:"form__label"},K(xc,{label:I,isRequiredLabel:C,isRequired:!0}),K("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:W,required:!0,rows:5})),V?K("label",{for:"screenshot",class:"form__label"},K("button",{class:"btn btn--default",disabled:P,type:"button",onClick:()=>{D(null),F(Z=>!Z)}},R?f:l),H?K("div",{class:"form__error-container"},H.message):null):null),K("div",{class:"btn-group"},K("button",{class:"btn btn--primary",disabled:P,type:"submit"},b),K("button",{class:"btn btn--default",disabled:P,type:"button",onClick:r},p))))}function xc({label:e,isRequired:t,isRequiredLabel:n}){return K("span",{class:"form__label__text"},e,t&&K("span",{class:"form__label__text--required"},n))}var is=16,Yf=17,Oy="http://www.w3.org/2000/svg";function Ly(){let e=c=>Bt.document.createElementNS(Oy,c),t=ht(e("svg"),{width:`${is}`,height:`${Yf}`,viewBox:`0 0 ${is} ${Yf}`,fill:"inherit"}),n=ht(e("g"),{clipPath:"url(#clip0_57_156)"}),r=ht(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),o=ht(e("path"),{d:"M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});t.appendChild(n).append(o,r);let i=e("defs"),s=ht(e("clipPath"),{id:"clip0_57_156"}),a=ht(e("rect"),{width:`${is}`,height:`${is}`,fill:"white",transform:"translate(0 0.5)"});return s.appendChild(a),i.appendChild(s),t.appendChild(i).appendChild(s).appendChild(a),t}function Dy(r){var o=r,{open:e,onFormSubmitted:t}=o,n=dn(o,["open","onFormSubmitted"]);let i=n.options,s=Ro(()=>({__html:Ly().outerHTML}),[]),[a,c]=qn(null),u=wr(()=>{a&&(clearTimeout(a),c(null)),t()},[a]),d=wr((l,f)=>{n.onSubmitSuccess(l,f),c(setTimeout(()=>{t(),c(null)},ny))},[t]);return K(wo,null,a?K("div",{class:"success__position",onClick:u},K("div",{class:"success__content"},i.successMessageText,K("span",{class:"success__icon",dangerouslySetInnerHTML:s}))):K("dialog",{class:"dialog",onClick:i.onFormClose,open:e},K("div",{class:"dialog__position"},K("div",{class:"dialog__content",onClick:l=>{l.stopPropagation()}},K(ky,{options:i}),K(My,E(m({},n),{onSubmitSuccess:d}))))))}var Py=`
|
|
106
|
-
.dialog {
|
|
107
|
-
position: fixed;
|
|
108
|
-
z-index: var(--z-index);
|
|
109
|
-
margin: 0;
|
|
110
|
-
inset: 0;
|
|
111
|
-
|
|
112
|
-
display: flex;
|
|
113
|
-
align-items: center;
|
|
114
|
-
justify-content: center;
|
|
115
|
-
padding: 0;
|
|
116
|
-
height: 100vh;
|
|
117
|
-
width: 100vw;
|
|
118
|
-
|
|
119
|
-
color: var(--dialog-color, var(--foreground));
|
|
120
|
-
fill: var(--dialog-color, var(--foreground));
|
|
121
|
-
line-height: 1.75em;
|
|
122
|
-
|
|
123
|
-
background-color: rgba(0, 0, 0, 0.05);
|
|
124
|
-
border: none;
|
|
125
|
-
inset: 0;
|
|
126
|
-
opacity: 1;
|
|
127
|
-
transition: opacity 0.2s ease-in-out;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.dialog__position {
|
|
131
|
-
position: fixed;
|
|
132
|
-
z-index: var(--z-index);
|
|
133
|
-
inset: var(--dialog-inset);
|
|
134
|
-
padding: var(--page-margin);
|
|
135
|
-
display: flex;
|
|
136
|
-
max-height: calc(100vh - (2 * var(--page-margin)));
|
|
137
|
-
}
|
|
138
|
-
@media (max-width: 600px) {
|
|
139
|
-
.dialog__position {
|
|
140
|
-
inset: var(--page-margin);
|
|
141
|
-
padding: 0;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.dialog__position:has(.editor) {
|
|
146
|
-
inset: var(--page-margin);
|
|
147
|
-
padding: 0;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.dialog:not([open]) {
|
|
151
|
-
opacity: 0;
|
|
152
|
-
pointer-events: none;
|
|
153
|
-
visibility: hidden;
|
|
154
|
-
}
|
|
155
|
-
.dialog:not([open]) .dialog__content {
|
|
156
|
-
transform: translate(0, -16px) scale(0.98);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
.dialog__content {
|
|
160
|
-
display: flex;
|
|
161
|
-
flex-direction: column;
|
|
162
|
-
gap: 16px;
|
|
163
|
-
padding: var(--dialog-padding, 24px);
|
|
164
|
-
max-width: 100%;
|
|
165
|
-
width: 100%;
|
|
166
|
-
max-height: 100%;
|
|
167
|
-
overflow: auto;
|
|
168
|
-
|
|
169
|
-
background: var(--dialog-background, var(--background));
|
|
170
|
-
border-radius: var(--dialog-border-radius, 20px);
|
|
171
|
-
border: var(--dialog-border, var(--border));
|
|
172
|
-
box-shadow: var(--dialog-box-shadow, var(--box-shadow));
|
|
173
|
-
transform: translate(0, 0) scale(1);
|
|
174
|
-
transition: transform 0.2s ease-in-out;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
`,Fy=`
|
|
178
|
-
.dialog__header {
|
|
179
|
-
display: flex;
|
|
180
|
-
gap: 4px;
|
|
181
|
-
justify-content: space-between;
|
|
182
|
-
font-weight: var(--dialog-header-weight, 600);
|
|
183
|
-
margin: 0;
|
|
184
|
-
}
|
|
185
|
-
.dialog__title {
|
|
186
|
-
align-self: center;
|
|
187
|
-
width: var(--form-width, 272px);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
@media (max-width: 600px) {
|
|
191
|
-
.dialog__title {
|
|
192
|
-
width: auto;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.dialog__position:has(.editor) .dialog__title {
|
|
197
|
-
width: auto;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
.brand-link {
|
|
202
|
-
display: inline-flex;
|
|
203
|
-
}
|
|
204
|
-
.brand-link:focus-visible {
|
|
205
|
-
outline: var(--outline);
|
|
206
|
-
}
|
|
207
|
-
`,Uy=`
|
|
208
|
-
.form {
|
|
209
|
-
display: flex;
|
|
210
|
-
overflow: auto;
|
|
211
|
-
flex-direction: row;
|
|
212
|
-
gap: 16px;
|
|
213
|
-
flex: 1 0;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
.form fieldset {
|
|
217
|
-
border: none;
|
|
218
|
-
margin: 0;
|
|
219
|
-
padding: 0;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
.form__right {
|
|
223
|
-
flex: 0 0 auto;
|
|
224
|
-
display: flex;
|
|
225
|
-
overflow: auto;
|
|
226
|
-
flex-direction: column;
|
|
227
|
-
justify-content: space-between;
|
|
228
|
-
gap: 20px;
|
|
229
|
-
width: var(--form-width, 100%);
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
.dialog__position:has(.editor) .form__right {
|
|
233
|
-
width: var(--form-width, 272px);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.form__top {
|
|
237
|
-
display: flex;
|
|
238
|
-
flex-direction: column;
|
|
239
|
-
gap: 8px;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
.form__error-container {
|
|
243
|
-
color: var(--error-color);
|
|
244
|
-
fill: var(--error-color);
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
.form__label {
|
|
248
|
-
display: flex;
|
|
249
|
-
flex-direction: column;
|
|
250
|
-
gap: 4px;
|
|
251
|
-
margin: 0px;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
.form__label__text {
|
|
255
|
-
display: flex;
|
|
256
|
-
gap: 4px;
|
|
257
|
-
align-items: center;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
.form__label__text--required {
|
|
261
|
-
font-size: 0.85em;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
.form__input {
|
|
265
|
-
font-family: inherit;
|
|
266
|
-
line-height: inherit;
|
|
267
|
-
background: transparent;
|
|
268
|
-
box-sizing: border-box;
|
|
269
|
-
border: var(--input-border, var(--border));
|
|
270
|
-
border-radius: var(--input-border-radius, 6px);
|
|
271
|
-
color: var(--input-color, inherit);
|
|
272
|
-
fill: var(--input-color, inherit);
|
|
273
|
-
font-size: var(--input-font-size, inherit);
|
|
274
|
-
font-weight: var(--input-font-weight, 500);
|
|
275
|
-
padding: 6px 12px;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
.form__input::placeholder {
|
|
279
|
-
opacity: 0.65;
|
|
280
|
-
color: var(--input-placeholder-color, inherit);
|
|
281
|
-
filter: var(--interactive-filter);
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
.form__input:focus-visible {
|
|
285
|
-
outline: var(--input-focus-outline, var(--outline));
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
.form__input--textarea {
|
|
289
|
-
font-family: inherit;
|
|
290
|
-
resize: vertical;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
.error {
|
|
294
|
-
color: var(--error-color);
|
|
295
|
-
fill: var(--error-color);
|
|
296
|
-
}
|
|
297
|
-
`,By=`
|
|
298
|
-
.btn-group {
|
|
299
|
-
display: grid;
|
|
300
|
-
gap: 8px;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
.btn {
|
|
304
|
-
line-height: inherit;
|
|
305
|
-
border: var(--button-border, var(--border));
|
|
306
|
-
border-radius: var(--button-border-radius, 6px);
|
|
307
|
-
cursor: pointer;
|
|
308
|
-
font-family: inherit;
|
|
309
|
-
font-size: var(--button-font-size, inherit);
|
|
310
|
-
font-weight: var(--button-font-weight, 600);
|
|
311
|
-
padding: var(--button-padding, 6px 16px);
|
|
312
|
-
}
|
|
313
|
-
.btn[disabled] {
|
|
314
|
-
opacity: 0.6;
|
|
315
|
-
pointer-events: none;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
.btn--primary {
|
|
319
|
-
color: var(--button-primary-color, var(--accent-foreground));
|
|
320
|
-
fill: var(--button-primary-color, var(--accent-foreground));
|
|
321
|
-
background: var(--button-primary-background, var(--accent-background));
|
|
322
|
-
border: var(--button-primary-border, var(--border));
|
|
323
|
-
border-radius: var(--button-primary-border-radius, 6px);
|
|
324
|
-
font-weight: var(--button-primary-font-weight, 500);
|
|
325
|
-
}
|
|
326
|
-
.btn--primary:hover {
|
|
327
|
-
color: var(--button-primary-hover-color, var(--accent-foreground));
|
|
328
|
-
fill: var(--button-primary-hover-color, var(--accent-foreground));
|
|
329
|
-
background: var(--button-primary-hover-background, var(--accent-background));
|
|
330
|
-
filter: var(--interactive-filter);
|
|
331
|
-
}
|
|
332
|
-
.btn--primary:focus-visible {
|
|
333
|
-
background: var(--button-primary-hover-background, var(--accent-background));
|
|
334
|
-
filter: var(--interactive-filter);
|
|
335
|
-
outline: var(--button-primary-focus-outline, var(--outline));
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
.btn--default {
|
|
339
|
-
color: var(--button-color, var(--foreground));
|
|
340
|
-
fill: var(--button-color, var(--foreground));
|
|
341
|
-
background: var(--button-background, var(--background));
|
|
342
|
-
border: var(--button-border, var(--border));
|
|
343
|
-
border-radius: var(--button-border-radius, 6px);
|
|
344
|
-
font-weight: var(--button-font-weight, 500);
|
|
345
|
-
}
|
|
346
|
-
.btn--default:hover {
|
|
347
|
-
color: var(--button-color, var(--foreground));
|
|
348
|
-
fill: var(--button-color, var(--foreground));
|
|
349
|
-
background: var(--button-hover-background, var(--background));
|
|
350
|
-
filter: var(--interactive-filter);
|
|
351
|
-
}
|
|
352
|
-
.btn--default:focus-visible {
|
|
353
|
-
background: var(--button-hover-background, var(--background));
|
|
354
|
-
filter: var(--interactive-filter);
|
|
355
|
-
outline: var(--button-focus-outline, var(--outline));
|
|
356
|
-
}
|
|
357
|
-
`,Hy=`
|
|
358
|
-
.success__position {
|
|
359
|
-
position: fixed;
|
|
360
|
-
inset: var(--dialog-inset);
|
|
361
|
-
padding: var(--page-margin);
|
|
362
|
-
z-index: var(--z-index);
|
|
363
|
-
}
|
|
364
|
-
.success__content {
|
|
365
|
-
background: var(--success-background, var(--background));
|
|
366
|
-
border: var(--success-border, var(--border));
|
|
367
|
-
border-radius: var(--success-border-radius, 1.7em/50%);
|
|
368
|
-
box-shadow: var(--success-box-shadow, var(--box-shadow));
|
|
369
|
-
font-weight: var(--success-font-weight, 600);
|
|
370
|
-
color: var(--success-color);
|
|
371
|
-
fill: var(--success-color);
|
|
372
|
-
padding: 12px 24px;
|
|
373
|
-
line-height: 1.75em;
|
|
374
|
-
|
|
375
|
-
display: grid;
|
|
376
|
-
align-items: center;
|
|
377
|
-
grid-auto-flow: column;
|
|
378
|
-
gap: 6px;
|
|
379
|
-
cursor: default;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
.success__icon {
|
|
383
|
-
display: flex;
|
|
384
|
-
}
|
|
385
|
-
`;function $y(e){let t=ue.createElement("style");return t.textContent=`
|
|
386
|
-
:host {
|
|
387
|
-
--dialog-inset: var(--inset);
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
${Py}
|
|
391
|
-
${Fy}
|
|
392
|
-
${Uy}
|
|
393
|
-
${By}
|
|
394
|
-
${Hy}
|
|
395
|
-
`,e&&t.setAttribute("nonce",e),t}function Wy(){let e=M().getUser(),t=ce().getUser(),n=hn().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}var cp=()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{let o=r,i=e.useSentryUser,s=Wy(),a=ue.createElement("div"),c=$y(e.styleNonce),u="",d={get el(){return a},appendToDom(){!o.contains(c)&&!o.contains(a)&&(o.appendChild(c),o.appendChild(a))},removeFromDom(){a.remove(),c.remove(),ue.body.style.overflow=u},open(){f(!0),e.onFormOpen?.(),v()?.emit("openFeedbackWidget"),u=ue.body.style.overflow,ue.body.style.overflow="hidden"},close(){f(!1),ue.body.style.overflow=u}},l=t?.createInput({h:K,hooks:xy,dialog:d,options:e}),f=p=>{_y(K(Dy,{options:e,screenshotInput:l,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:i&&s?.[i.name]||"",defaultEmail:i&&s?.[i.email]||"",onFormClose:()=>{f(!1),e.onFormClose?.()},onSubmit:n,onSubmitSuccess:(h,_)=>{f(!1),e.onSubmitSuccess?.(h,_)},onSubmitError:h=>{e.onSubmitError?.(h)},onFormSubmitted:()=>{e.onFormSubmitted?.()},open:p}),a)};return d}});function Gy({h:e}){return function(){return e("svg",{"data-test-id":"icon-close",viewBox:"0 0 16 16",fill:"#2B2233",height:"25px",width:"25px"},e("circle",{r:"7",cx:"8",cy:"8",fill:"white"}),e("path",{strokeWidth:"1.5",d:"M8,16a8,8,0,1,1,8-8A8,8,0,0,1,8,16ZM8,1.53A6.47,6.47,0,1,0,14.47,8,6.47,6.47,0,0,0,8,1.53Z"}),e("path",{strokeWidth:"1.5",d:"M5.34,11.41a.71.71,0,0,1-.53-.22.74.74,0,0,1,0-1.06l5.32-5.32a.75.75,0,0,1,1.06,1.06L5.87,11.19A.74.74,0,0,1,5.34,11.41Z"}),e("path",{strokeWidth:"1.5",d:"M10.66,11.41a.74.74,0,0,1-.53-.22L4.81,5.87A.75.75,0,0,1,5.87,4.81l5.32,5.32a.74.74,0,0,1,0,1.06A.71.71,0,0,1,10.66,11.41Z"}))}}function zy(e){let t=ue.createElement("style"),n="#1A141F",r="#302735";return t.textContent=`
|
|
396
|
-
.editor {
|
|
397
|
-
display: flex;
|
|
398
|
-
flex-grow: 1;
|
|
399
|
-
flex-direction: column;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
.editor__image-container {
|
|
403
|
-
justify-items: center;
|
|
404
|
-
padding: 15px;
|
|
405
|
-
position: relative;
|
|
406
|
-
height: 100%;
|
|
407
|
-
border-radius: var(--menu-border-radius, 6px);
|
|
408
|
-
|
|
409
|
-
background-color: ${n};
|
|
410
|
-
background-image: repeating-linear-gradient(
|
|
411
|
-
-145deg,
|
|
412
|
-
transparent,
|
|
413
|
-
transparent 8px,
|
|
414
|
-
${n} 8px,
|
|
415
|
-
${n} 11px
|
|
416
|
-
),
|
|
417
|
-
repeating-linear-gradient(
|
|
418
|
-
-45deg,
|
|
419
|
-
transparent,
|
|
420
|
-
transparent 15px,
|
|
421
|
-
${r} 15px,
|
|
422
|
-
${r} 16px
|
|
423
|
-
);
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
.editor__canvas-container {
|
|
427
|
-
width: 100%;
|
|
428
|
-
height: 100%;
|
|
429
|
-
position: relative;
|
|
430
|
-
display: flex;
|
|
431
|
-
align-items: center;
|
|
432
|
-
justify-content: center;
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
.editor__canvas-container > * {
|
|
436
|
-
object-fit: contain;
|
|
437
|
-
position: absolute;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
.editor__tool-container {
|
|
441
|
-
padding-top: 8px;
|
|
442
|
-
display: flex;
|
|
443
|
-
justify-content: center;
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
.editor__tool-bar {
|
|
447
|
-
display: flex;
|
|
448
|
-
gap: 8px;
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
.editor__tool {
|
|
452
|
-
display: flex;
|
|
453
|
-
padding: 8px 12px;
|
|
454
|
-
justify-content: center;
|
|
455
|
-
align-items: center;
|
|
456
|
-
border: var(--button-border, var(--border));
|
|
457
|
-
border-radius: var(--button-border-radius, 6px);
|
|
458
|
-
background: var(--button-background, var(--background));
|
|
459
|
-
color: var(--button-color, var(--foreground));
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
.editor__tool--active {
|
|
463
|
-
background: var(--button-primary-background, var(--accent-background));
|
|
464
|
-
color: var(--button-primary-color, var(--accent-foreground));
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
.editor__rect {
|
|
468
|
-
position: absolute;
|
|
469
|
-
z-index: 2;
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
.editor__rect button {
|
|
473
|
-
opacity: 0;
|
|
474
|
-
position: absolute;
|
|
475
|
-
top: -12px;
|
|
476
|
-
right: -12px;
|
|
477
|
-
cursor: pointer;
|
|
478
|
-
padding: 0;
|
|
479
|
-
z-index: 3;
|
|
480
|
-
border: none;
|
|
481
|
-
background: none;
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
.editor__rect:hover button {
|
|
485
|
-
opacity: 1;
|
|
486
|
-
}
|
|
487
|
-
`,e&&t.setAttribute("nonce",e),t}function jy({h:e}){return function({action:n,setAction:r}){return e("div",{class:"editor__tool-container"},e("div",{class:"editor__tool-bar"},e("button",{type:"button",class:`editor__tool ${n==="highlight"?"editor__tool--active":""}`,onClick:()=>{r(n==="highlight"?"":"highlight")}},"Highlight"),e("button",{type:"button",class:`editor__tool ${n==="hide"?"editor__tool--active":""}`,onClick:()=>{r(n==="hide"?"":"hide")}},"Hide")))}}function qy({hooks:e}){function t(){let[n,r]=e.useState(Bt.devicePixelRatio??1);return e.useEffect(()=>{let o=()=>{r(Bt.devicePixelRatio)},i=matchMedia(`(resolution: ${Bt.devicePixelRatio}dppx)`);return i.addEventListener("change",o),()=>{i.removeEventListener("change",o)}},[]),n}return function({onBeforeScreenshot:r,onScreenshot:o,onAfterScreenshot:i,onError:s}){let a=t();e.useEffect(()=>{(async()=>{r();let u=await Io.mediaDevices.getDisplayMedia({video:{width:Bt.innerWidth*a,height:Bt.innerHeight*a},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),d=ue.createElement("video");await new Promise((l,f)=>{d.srcObject=u,d.onloadedmetadata=()=>{o(d,a),u.getTracks().forEach(p=>p.stop()),l()},d.play().catch(f)}),i()})().catch(s)},[])}}function Vy(e,t,n){switch(e.type){case"highlight":{t.shadowColor="rgba(0, 0, 0, 0.7)",t.shadowBlur=50,t.fillStyle=n,t.fillRect(e.x-1,e.y-1,e.w+2,e.h+2),t.clearRect(e.x,e.y,e.w,e.h);break}case"hide":t.fillStyle="rgb(0, 0, 0)",t.fillRect(e.x,e.y,e.w,e.h);break}}function In(e,t,n){if(!e)return;let r=e.getContext("2d",t);r&&n(e,r)}function Cc(e,t){In(e,{alpha:!0},(n,r)=>{r.drawImage(t,0,0,t.width,t.height,0,0,n.width,n.height)})}function Ac(e,t,n){In(e,{alpha:!0},(r,o)=>{n.length&&(o.fillStyle="rgba(0, 0, 0, 0.25)",o.fillRect(0,0,r.width,r.height)),n.forEach(i=>{Vy(i,o,t)})})}function Yy({h:e,hooks:t,outputBuffer:n,dialog:r,options:o}){let i=qy({hooks:t}),s=jy({h:e}),a=Gy({h:e}),c={__html:zy(o.styleNonce).innerText},u=r.el.style,d=({screenshot:l})=>{let[f,p]=t.useState("highlight"),[h,_]=t.useState([]),S=t.useRef(null),y=t.useRef(null),I=t.useRef(null),W=t.useRef(null),[N,L]=t.useState(1),b=t.useMemo(()=>{let R=ue.getElementById(o.id);if(!R)return"white";let F=getComputedStyle(R);return F.getPropertyValue("--button-primary-background")||F.getPropertyValue("--accent-background")},[o.id]);t.useLayoutEffect(()=>{let R=()=>{let F=S.current;F&&(In(l.canvas,{alpha:!1},V=>{let H=Math.min(F.clientWidth/V.width,F.clientHeight/V.height);L(H)}),(F.clientHeight===0||F.clientWidth===0)&&setTimeout(R,0))};return R(),Bt.addEventListener("resize",R),()=>{Bt.removeEventListener("resize",R)}},[l]);let C=t.useCallback((R,F)=>{In(R,{alpha:!0},(V,H)=>{H.scale(F,F),V.width=l.canvas.width,V.height=l.canvas.height})},[l]);t.useEffect(()=>{C(y.current,l.dpi),Cc(y.current,l.canvas)},[l]),t.useEffect(()=>{C(I.current,l.dpi),In(I.current,{alpha:!0},(R,F)=>{F.clearRect(0,0,R.width,R.height)}),Ac(I.current,b,h)},[h,b]),t.useEffect(()=>{C(n,l.dpi),Cc(n,l.canvas),In(ue.createElement("canvas"),{alpha:!0},(R,F)=>{F.scale(l.dpi,l.dpi),R.width=l.canvas.width,R.height=l.canvas.height,Ac(R,b,h),Cc(n,R)})},[h,l,b]);let P=R=>{if(!f||!W.current)return;let F=W.current.getBoundingClientRect(),V={type:f,x:R.offsetX/N,y:R.offsetY/N},H=(B,J)=>{let Z=(J.clientX-F.x)/N,_e=(J.clientY-F.y)/N;return{type:B.type,x:Math.min(B.x,Z),y:Math.min(B.y,_e),w:Math.abs(Z-B.x),h:Math.abs(_e-B.y)}},D=B=>{In(I.current,{alpha:!0},(J,Z)=>{Z.clearRect(0,0,J.width,J.height)}),Ac(I.current,b,[...h,H(V,B)])},z=B=>{let J=H(V,B);J.w*N>=1&&J.h*N>=1&&_(Z=>[...Z,J]),ue.removeEventListener("mousemove",D),ue.removeEventListener("mouseup",z)};ue.addEventListener("mousemove",D),ue.addEventListener("mouseup",z)},w=t.useCallback(R=>F=>{F.preventDefault(),F.stopPropagation(),_(V=>{let H=[...V];return H.splice(R,1),H})},[]),A={width:`${l.canvas.width*N}px`,height:`${l.canvas.height*N}px`},G=R=>{R.stopPropagation()};return e("div",{class:"editor"},e("style",{nonce:o.styleNonce,dangerouslySetInnerHTML:c}),e("div",{class:"editor__image-container"},e("div",{class:"editor__canvas-container",ref:S},e("canvas",{ref:y,id:"background",style:A}),e("canvas",{ref:I,id:"foreground",style:A}),e("div",{ref:W,onMouseDown:P,style:A},h.map((R,F)=>e("div",{key:F,class:"editor__rect",style:{top:`${R.y*N}px`,left:`${R.x*N}px`,width:`${R.w*N}px`,height:`${R.h*N}px`}},e("button",{"aria-label":"Remove",onClick:w(F),onMouseDown:G,onMouseUp:G,type:"button"},e(a,null))))))),e(s,{action:f,setAction:p}))};return function({onError:f}){let[p,h]=t.useState();return i({onBeforeScreenshot:t.useCallback(()=>{u.display="none"},[]),onScreenshot:t.useCallback((_,S)=>{In(ue.createElement("canvas"),{alpha:!1},(y,I)=>{I.scale(S,S),y.width=_.videoWidth,y.height=_.videoHeight,I.drawImage(_,0,0,y.width,y.height),h({canvas:y,dpi:S})}),n.width=_.videoWidth,n.height=_.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{u.display="block"},[]),onError:t.useCallback(_=>{u.display="block",f(_)},[])}),p?e(d,{screenshot:p}):e("div",null)}}var up=()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{let o=ue.createElement("canvas");return{input:Yy({h:e,hooks:t,outputBuffer:o,dialog:n,options:r}),value:async()=>{let i=await new Promise(s=>{o.toBlob(s,"image/png")});if(i)return{data:new Uint8Array(await i.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}});var k=x,Bc=0;function Hc(){return Bc>0}function Jy(){Bc++,setTimeout(()=>{Bc--})}function Yn(e,t={}){function n(o){return typeof o=="function"}if(!n(e))return e;try{let o=e.__sentry_wrapped__;if(o)return typeof o=="function"?o:e;if(Dn(e))return e}catch{return e}let r=function(...o){try{let i=o.map(s=>Yn(s,t));return e.apply(this,i)}catch(i){throw Jy(),Oe(s=>{s.addEventProcessor(a=>(t.mechanism&&(lr(a,void 0,void 0),rt(a,t.mechanism)),a.extra=E(m({},a.extra),{arguments:o}),a)),wt(i)}),i}};try{for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}catch{}si(r,e),he(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function xo(){let e=Ye(),{referrer:t}=k.document||{},{userAgent:n}=k.navigator||{},r=m(m({},t&&{Referer:t}),n&&{"User-Agent":n});return{url:e,headers:r}}var Ky={replayIntegration:"replay",replayCanvasIntegration:"replay-canvas",feedbackIntegration:"feedback",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot",captureConsoleIntegration:"captureconsole",contextLinesIntegration:"contextlines",linkedErrorsIntegration:"linkederrors",dedupeIntegration:"dedupe",extraErrorDataIntegration:"extraerrordata",graphqlClientIntegration:"graphqlclient",httpClientIntegration:"httpclient",reportingObserverIntegration:"reportingobserver",rewriteFramesIntegration:"rewriteframes",browserProfilingIntegration:"browserprofiling",moduleMetadataIntegration:"modulemetadata"},lp=k;async function $c(e,t){let n=Ky[e],r=lp.Sentry=lp.Sentry||{};if(!n)throw new Error(`Cannot lazy load integration: ${e}`);let o=r[e];if(typeof o=="function"&&!("_isShim"in o))return o;let i=Xy(n),s=k.document.createElement("script");s.src=i,s.crossOrigin="anonymous",s.referrerPolicy="strict-origin",t&&s.setAttribute("nonce",t);let a=new Promise((l,f)=>{s.addEventListener("load",()=>l()),s.addEventListener("error",f)}),c=k.document.currentScript,u=k.document.body||k.document.head||c?.parentElement;if(u)u.appendChild(s);else throw new Error(`Could not find parent element to insert lazy-loaded ${e} script`);try{await a}catch{throw new Error(`Error when loading integration: ${e}`)}let d=r[e];if(typeof d!="function")throw new Error(`Could not load integration: ${e}`);return d}function Xy(e){let n=v()?.getOptions()?.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${ut}/${e}.min.js`,n).toString()}var Zy=fs({lazyLoadIntegration:$c});var dp=fs({getModalIntegration:()=>cp,getScreenshotIntegration:()=>up});var fp={};eg(fp,{debug:()=>eE,error:()=>rE,fatal:()=>oE,fmt:()=>cc,info:()=>tE,trace:()=>Qy,warn:()=>nE});function Cr(e,t,n,r){yr({level:e,message:t,attributes:n,severityNumber:r})}function Qy(e,t){Cr("trace",e,t)}function eE(e,t){Cr("debug",e,t)}function tE(e,t){Cr("info",e,t)}function nE(e,t){Cr("warn",e,t)}function rE(e,t){Cr("error",e,t)}function oE(e,t){Cr("fatal",e,t)}function Co(e,t){let n=zc(e,t),r={type:uE(t),value:lE(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function iE(e,t,n,r){let i=v()?.getOptions().normalizeDepth,s=pE(t),a={__serialized__:Ti(t,i)};if(s)return{exception:{values:[Co(e,s)]},extra:a};let c={exception:{values:[{type:On(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:dE(t,{isUnhandledRejection:r})}]},extra:a};if(n){let u=zc(e,n);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function Wc(e,t){return{exception:{values:[Co(e,t)]}}}function zc(e,t){let n=t.stacktrace||t.stack||"",r=aE(t),o=cE(t);try{return e(n,r,o)}catch{}return[]}var sE=/Minified React error #\d+;/i;function aE(e){return e&&sE.test(e.message)?1:0}function cE(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function pp(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function uE(e){let t=e?.name;return!t&&pp(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function lE(e){let t=e?.message;return pp(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function jc(e,t,n,r){let o=n?.syntheticException||void 0,i=ms(e,t,o,r);return rt(i),i.level="error",n?.event_id&&(i.event_id=n.event_id),Xe(i)}function qc(e,t,n="info",r,o){let i=r?.syntheticException||void 0,s=Gc(e,t,i,o);return s.level=n,r?.event_id&&(s.event_id=r.event_id),Xe(s)}function ms(e,t,n,r,o){let i;if(ri(t)&&t.error)return Wc(e,t.error);if(oi(t)||ya(t)){let s=t;if("stack"in t)i=Wc(e,t);else{let a=s.name||(oi(s)?"DOMError":"DOMException"),c=s.message?`${a}: ${s.message}`:a;i=Gc(e,c,n,r),lr(i,c)}return"code"in s&&(i.tags=E(m({},i.tags),{"DOMException.code":`${s.code}`})),i}return nt(t)?Wc(e,t):We(t)||On(t)?(i=iE(e,t,n,o),rt(i,{synthetic:!0}),i):(i=Gc(e,t,n,r),lr(i,`${t}`,void 0),rt(i,{synthetic:!0}),i)}function Gc(e,t,n,r){let o={};if(r&&n){let i=zc(e,n);i.length&&(o.exception={values:[{value:t,stacktrace:{frames:i}}]}),rt(o,{synthetic:!0})}if(pn(t)){let{__sentry_template_string__:i,__sentry_template_values__:s}=t;return o.logentry={message:i,params:s},o}return o.message=t,o}function dE(e,{isUnhandledRejection:t}){let n=va(e),r=t?"promise rejection":"exception";return ri(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:On(e)?`Event \`${fE(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function fE(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function pE(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];if(n instanceof Error)return n}}var mE=5e3,Ao=class extends ho{constructor(t){let n=hE(t),r=k.SENTRY_SDK_SOURCE||vc();dc(n,"browser",["browser"],r),super(n);let{sendDefaultPii:o,sendClientReports:i,enableLogs:s,_experiments:a}=this._options,c=s??a?.enableLogs;k.document&&(i||c)&&k.document.addEventListener("visibilitychange",()=>{k.document.visibilityState==="hidden"&&(i&&this._flushOutcomes(),c&&Er(this))}),c&&(this.on("flush",()=>{Er(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{Er(this)},mE)})),o&&(this.on("postprocessEvent",uc),this.on("beforeSendSession",lc))}eventFromException(t,n){return jc(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return qc(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,o){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,o)}};function hE(e){return m({release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:k.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0},e)}var Ht=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var U=x;var gE=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",Ct=(e,t,n,r)=>{let o,i;return s=>{t.value>=0&&(s||r)&&(i=t.value-(o??0),(i||o===void 0)&&(o=t.value,t.delta=i,t.rating=gE(t.value,n),e(t)))}};var mp=()=>`v5-${Date.now()}-${Math.floor(Math.random()*8999999999999)+1e12}`;var sn=(e=!0)=>{let t=U.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t};var At=()=>sn()?.activationStart??0;var kt=(e,t=-1)=>{let n=sn(),r="navigate";return n&&(U.document?.prerendering||At()>0?r="prerender":U.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:mp(),navigationType:r}};var Vc=new WeakMap;function Ar(e,t){return Vc.get(e)||Vc.set(e,new t),Vc.get(e)}var hs=class e{constructor(){e.prototype.__init.call(this),e.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(t){if(t.hadRecentInput)return;let n=this._sessionEntries[0],r=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this._sessionValue+=t.value,this._sessionEntries.push(t)):(this._sessionValue=t.value,this._sessionEntries=[t]),this._onAfterProcessingUnexpectedShift?.(t)}};var st=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(o=>{Promise.resolve().then(()=>{t(o.getEntries())})});return r.observe(m({type:e,buffered:!0},n)),r}}catch{}};var wn=e=>{let t=!1;return()=>{t||(e(),t=!0)}};var ko=-1,_E=()=>U.document?.visibilityState==="hidden"&&!U.document?.prerendering?0:1/0,gs=e=>{U.document.visibilityState==="hidden"&&ko>-1&&(ko=e.type==="visibilitychange"?e.timeStamp:0,yE())},SE=()=>{addEventListener("visibilitychange",gs,!0),addEventListener("prerenderingchange",gs,!0)},yE=()=>{removeEventListener("visibilitychange",gs,!0),removeEventListener("prerenderingchange",gs,!0)},Rn=()=>{if(U.document&&ko<0){let e=At();ko=(U.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(n=>n.name==="hidden"&&n.startTime>e)[0]?.startTime)??_E(),SE()}return{get firstHiddenTime(){return ko}}};var Yt=e=>{U.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()};var EE=[1800,3e3],hp=(e,t={})=>{Yt(()=>{let n=Rn(),r=kt("FCP"),o,s=st("paint",a=>{for(let c of a)c.name==="first-contentful-paint"&&(s.disconnect(),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-At(),0),r.entries.push(c),o(!0)))});s&&(o=Ct(e,r,EE,t.reportAllChanges))})};var bE=[.1,.25],gp=(e,t={})=>{hp(wn(()=>{let n=kt("CLS",0),r,o=Ar(t,hs),i=a=>{for(let c of a)o._processEntry(c);o._sessionValue>n.value&&(n.value=o._sessionValue,n.entries=o._sessionEntries,r())},s=st("layout-shift",i);s&&(r=Ct(e,n,bE,t.reportAllChanges),U.document?.addEventListener("visibilitychange",()=>{U.document?.visibilityState==="hidden"&&(i(s.takeRecords()),r(!0))}),U?.setTimeout?.(r))}))};var xn=e=>{let t=n=>{(n.type==="pagehide"||U.document?.visibilityState==="hidden")&&e(n)};U.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))};var TE=[100,300],_p=(e,t={})=>{Yt(()=>{let n=Rn(),r=kt("FID"),o,i=c=>{c.startTime<n.firstHiddenTime&&(r.value=c.processingStart-c.startTime,r.entries.push(c),o(!0))},s=c=>{c.forEach(i)},a=st("first-input",s);o=Ct(e,r,TE,t.reportAllChanges),a&&xn(wn(()=>{s(a.takeRecords()),a.disconnect()}))})};var Sp=0,Yc=1/0,_s=0,IE=e=>{e.forEach(t=>{t.interactionId&&(Yc=Math.min(Yc,t.interactionId),_s=Math.max(_s,t.interactionId),Sp=_s?(_s-Yc)/7+1:0)})},Jc,Kc=()=>Jc?Sp:performance.interactionCount||0,yp=()=>{"interactionCount"in performance||Jc||(Jc=st("event",IE,{type:"event",buffered:!0,durationThreshold:0}))};var Xc=10,Ep=0,vE=()=>Kc()-Ep,Ss=class e{constructor(){e.prototype.__init.call(this),e.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){Ep=Kc(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){let t=Math.min(this._longestInteractionList.length-1,Math.floor(vE()/50));return this._longestInteractionList[t]}_processEntry(t){if(this._onBeforeProcessingEntry?.(t),!(t.interactionId||t.entryType==="first-input"))return;let n=this._longestInteractionList.at(-1),r=this._longestInteractionMap.get(t.interactionId);if(r||this._longestInteractionList.length<Xc||t.duration>n._latency){if(r?t.duration>r._latency?(r.entries=[t],r._latency=t.duration):t.duration===r._latency&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(r.id,r),this._longestInteractionList.push(r)),this._longestInteractionList.sort((o,i)=>i._latency-o._latency),this._longestInteractionList.length>Xc){let o=this._longestInteractionList.splice(Xc);for(let i of o)this._longestInteractionMap.delete(i.id)}this._onAfterProcessingINPCandidate?.(r)}}};var ys=e=>{let t=U.requestIdleCallback||U.setTimeout;U.document?.visibilityState==="hidden"?e():(e=wn(e),t(e),xn(e))};var wE=[200,500],RE=40,bp=(e,t={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&Yt(()=>{yp();let n=kt("INP"),r,o=Ar(t,Ss),i=a=>{ys(()=>{for(let u of a)o._processEntry(u);let c=o._estimateP98LongestInteraction();c&&c._latency!==n.value&&(n.value=c._latency,n.entries=c.entries,r())})},s=st("event",i,{durationThreshold:t.durationThreshold??RE});r=Ct(e,n,wE,t.reportAllChanges),s&&(s.observe({type:"first-input",buffered:!0}),xn(()=>{i(s.takeRecords()),r(!0)}))})};var Es=class{_processEntry(t){this._onBeforeProcessingEntry?.(t)}};var xE=[2500,4e3],Tp=(e,t={})=>{Yt(()=>{let n=Rn(),r=kt("LCP"),o,i=Ar(t,Es),s=c=>{t.reportAllChanges||(c=c.slice(-1));for(let u of c)i._processEntry(u),u.startTime<n.firstHiddenTime&&(r.value=Math.max(u.startTime-At(),0),r.entries=[u],o())},a=st("largest-contentful-paint",s);if(a){o=Ct(e,r,xE,t.reportAllChanges);let c=wn(()=>{s(a.takeRecords()),a.disconnect(),o(!0)});for(let u of["keydown","click","visibilitychange"])U.document&&addEventListener(u,()=>ys(c),{capture:!0,once:!0})}})};var CE=[800,1800],Zc=e=>{U.document?.prerendering?Yt(()=>Zc(e)):U.document?.readyState!=="complete"?addEventListener("load",()=>Zc(e),!0):setTimeout(e)},Ip=(e,t={})=>{let n=kt("TTFB"),r=Ct(e,n,CE,t.reportAllChanges);Zc(()=>{let o=sn();o&&(n.value=Math.max(o.responseStart-At(),0),n.entries=[o],r(!0))})};var No={},bs={},vp,wp,Rp,xp,Cp;function Jn(e,t=!1){return Lo("cls",e,AE,vp,t)}function Kn(e,t=!1){return Lo("lcp",e,NE,Rp,t)}function Mo(e){return Lo("fid",e,kE,wp)}function Qc(e){return Lo("ttfb",e,ME,xp)}function Oo(e){return Lo("inp",e,OE,Cp)}function gt(e,t){return Ap(e,t),bs[e]||(LE(e),bs[e]=!0),kp(e,t)}function kr(e,t){let n=No[e];if(n?.length)for(let r of n)try{r(t)}catch(o){Ht&&g.error(`Error while triggering instrumentation handler.
|
|
488
|
-
Type: ${e}
|
|
489
|
-
Name: ${tt(r)}
|
|
490
|
-
Error:`,o)}}function AE(){return gp(e=>{kr("cls",{metric:e}),vp=e},{reportAllChanges:!0})}function kE(){return _p(e=>{kr("fid",{metric:e}),wp=e})}function NE(){return Tp(e=>{kr("lcp",{metric:e}),Rp=e},{reportAllChanges:!0})}function ME(){return Ip(e=>{kr("ttfb",{metric:e}),xp=e})}function OE(){return bp(e=>{kr("inp",{metric:e}),Cp=e})}function Lo(e,t,n,r,o=!1){Ap(e,t);let i;return bs[e]||(i=n(),bs[e]=!0),r&&t({metric:r}),kp(e,t,o?i:void 0)}function LE(e){let t={};e==="event"&&(t.durationThreshold=0),st(e,n=>{kr(e,{entries:n})},t)}function Ap(e,t){No[e]=No[e]||[],No[e].push(t)}function kp(e,t,n){return()=>{n&&n();let r=No[e];if(!r)return;let o=r.indexOf(t);o!==-1&&r.splice(o,1)}}function Np(e){return"duration"in e}function Ts(e){return typeof e=="number"&&isFinite(e)}function Jt(e,t,n,o){var r=dn(o,[]);let i=O(e).start_timestamp;return i&&i>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),Hn(e,()=>{let s=mt(m({startTime:t},r));return s&&s.end(n),s})}function Nr(e){let t=v();if(!t)return;let{name:n,transaction:r,attributes:o,startTime:i}=e,{release:s,environment:a,sendDefaultPii:c}=t.getOptions(),d=t.getIntegrationByName("Replay")?.getReplayId(),l=M(),f=l.getUser(),p=f!==void 0?f.email||f.id||f.ip_address:void 0,h;try{h=l.getScopeData().contexts.profile.profile_id}catch{}let _=m({release:s,environment:a,user:p||void 0,profile_id:h||void 0,replay_id:d||void 0,transaction:r,"user_agent.original":U.navigator?.userAgent,"client.address":c?"{{auto}}":void 0},o);return mt({name:n,attributes:_,startTime:i,experimental:{standalone:!0}})}function Xn(){return U.addEventListener&&U.performance}function se(e){return e/1e3}function Do(e){let t="unknown",n="unknown",r="";for(let o of e){if(o==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(o))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=o}return r===e&&(t=r),{name:t,version:n}}function Is(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function vs(e,t){let n,r=!1;function o(a){!r&&n&&t(a,n),r=!0}xn(()=>{o("pagehide")});let i=e.on("beforeStartNavigationSpan",(a,c)=>{c?.isRedirect||(o("navigation"),i?.(),s?.())}),s=e.on("afterStartPageLoadSpan",a=>{n=a.spanContext().spanId,s?.()})}function Mp(e){let t=0,n;if(!Is("layout-shift"))return;let r=Jn(({metric:o})=>{let i=o.entries[o.entries.length-1];i&&(t=o.value,n=i)},!0);vs(e,(o,i)=>{DE(t,n,i,o),r()})}function DE(e,t,n,r){Ht&&g.log(`Sending CLS span (${e})`);let o=se((fe()||0)+(t?.startTime||0)),i=M().getScopeData().transactionName,s=t?Ce(t.sources[0]?.node):"Layout shift",a={[Q]:"auto.http.browser.cls",[ye]:"ui.webvital.cls",[Tt]:t?.duration||0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((u,d)=>{a[`cls.source.${d+1}`]=Ce(u.node)});let c=Nr({name:s,transaction:i,attributes:a,startTime:o});c&&(c.addEvent("cls",{[qt]:"",[Vt]:e}),c.end(o))}function Op(e){let t=0,n;if(!Is("largest-contentful-paint"))return;let r=Kn(({metric:o})=>{let i=o.entries[o.entries.length-1];i&&(t=o.value,n=i)},!0);vs(e,(o,i)=>{PE(t,n,i,o),r()})}function PE(e,t,n,r){Ht&&g.log(`Sending LCP span (${e})`);let o=se((fe()||0)+(t?.startTime||0)),i=M().getScopeData().transactionName,s=t?Ce(t.element):"Largest contentful paint",a={[Q]:"auto.http.browser.lcp",[ye]:"ui.webvital.lcp",[Tt]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(a["lcp.element"]=Ce(t.element)),t.id&&(a["lcp.id"]=t.id),t.url&&(a["lcp.url"]=t.url.trim().slice(0,200)),t.loadTime!=null&&(a["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(a["lcp.renderTime"]=t.renderTime),t.size!=null&&(a["lcp.size"]=t.size));let c=Nr({name:s,transaction:i,attributes:a,startTime:o});c&&(c.addEvent("lcp",{[qt]:"millisecond",[Vt]:e}),c.end(o))}var FE=2147483647,Lp=0,Ue={},at,Rs;function tu({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){let r=Xn();if(r&&fe()){r.mark&&U.performance.mark("sentry-tracing-init");let o=HE(),i=t?Op(n):BE(),s=$E(),a=e?Mp(n):UE();return()=>{o(),i?.(),s(),a?.()}}return()=>{}}function nu(){gt("longtask",({entries:e})=>{let t=te();if(!t)return;let{op:n,start_timestamp:r}=O(t);for(let o of e){let i=se(fe()+o.startTime),s=se(o.duration);n==="navigation"&&r&&i<r||Jt(t,i,i+s,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[Q]:"auto.ui.browser.metrics"}})}})}function ru(){new PerformanceObserver(t=>{let n=te();if(n)for(let r of t.getEntries()){if(!r.scripts[0])continue;let o=se(fe()+r.startTime),{start_timestamp:i,op:s}=O(n);if(s==="navigation"&&i&&o<i)continue;let a=se(r.duration),c={[Q]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:d,invokerType:l,sourceURL:f,sourceFunctionName:p,sourceCharPosition:h}=u;c["browser.script.invoker"]=d,c["browser.script.invoker_type"]=l,f&&(c["code.filepath"]=f),p&&(c["code.function"]=p),h!==-1&&(c["browser.script.source_char_position"]=h),Jt(n,o,o+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:c})}}).observe({type:"long-animation-frame",buffered:!0})}function ou(){gt("event",({entries:e})=>{let t=te();if(t){for(let n of e)if(n.name==="click"){let r=se(fe()+n.startTime),o=se(n.duration),i={name:Ce(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[Q]:"auto.ui.browser.metrics"}},s=Qr(n.target);s&&(i.attributes["ui.component_name"]=s),Jt(t,r,r+o,i)}}})}function UE(){return Jn(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(Ue.cls={value:e.value,unit:""},Rs=t)},!0)}function BE(){return Kn(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(Ue.lcp={value:e.value,unit:"millisecond"},at=t)},!0)}function HE(){return Mo(({metric:e})=>{let t=e.entries[e.entries.length-1];if(!t)return;let n=se(fe()),r=se(t.startTime);Ue.fid={value:e.value,unit:"millisecond"},Ue["mark.fid"]={value:n+r,unit:"second"}})}function $E(){return Qc(({metric:e})=>{e.entries[e.entries.length-1]&&(Ue.ttfb={value:e.value,unit:"millisecond"})})}function iu(e,t){let n=Xn(),r=fe();if(!n?.getEntries||!r)return;let o=se(r),i=n.getEntries(),{op:s,start_timestamp:a}=O(e);if(i.slice(Lp).forEach(c=>{let u=se(c.startTime),d=se(Math.max(0,c.duration));if(!(s==="navigation"&&a&&o+u<a))switch(c.entryType){case"navigation":{zE(e,c,o);break}case"mark":case"paint":case"measure":{WE(e,c,u,d,o,t.ignorePerformanceApiSpans);let l=Rn(),f=c.startTime<l.firstHiddenTime;c.name==="first-paint"&&f&&(Ue.fp={value:c.startTime,unit:"millisecond"}),c.name==="first-contentful-paint"&&f&&(Ue.fcp={value:c.startTime,unit:"millisecond"});break}case"resource":{VE(e,c,c.name,u,d,o,t.ignoreResourceSpans);break}}}),Lp=Math.max(i.length-1,0),YE(e),s==="pageload"){KE(Ue);let c=Ue["mark.fid"];c&&Ue.fid&&(Jt(e,c.value,c.value+se(Ue.fid.value),{name:"first input delay",op:"ui.action",attributes:{[Q]:"auto.ui.browser.metrics"}}),delete Ue["mark.fid"]),t.recordClsOnPageloadSpan||delete Ue.cls,t.recordLcpOnPageloadSpan||delete Ue.lcp,Object.entries(Ue).forEach(([u,d])=>{Ri(u,d.value,d.unit)}),e.setAttribute("performance.timeOrigin",o),e.setAttribute("performance.activationStart",At()),JE(e,t)}at=void 0,Rs=void 0,Ue={}}function WE(e,t,n,r,o,i){if(["mark","measure"].includes(t.entryType)&&Pe(t.name,i))return;let s=sn(!1),a=se(s?s.requestStart:0),c=o+Math.max(n,a),u=o+n,d=u+r,l={[Q]:"auto.resource.browser.metrics"};c!==u&&(l["sentry.browser.measure_happened_before_request"]=!0,l["sentry.browser.measure_start_time"]=c),GE(l,t),c<=d&&Jt(e,c,d,{name:t.name,op:t.entryType,attributes:l})}function GE(e,t){try{let n=t.detail;if(!n)return;if(typeof n=="object"){for(let[r,o]of Object.entries(n))if(o&&yt(o))e[`sentry.browser.measure.detail.${r}`]=o;else if(o!==void 0)try{e[`sentry.browser.measure.detail.${r}`]=JSON.stringify(o)}catch{}return}if(yt(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function zE(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{ws(e,t,r,n)}),ws(e,t,"secureConnection",n,"TLS/SSL"),ws(e,t,"fetch",n,"cache"),ws(e,t,"domainLookup",n,"DNS"),qE(e,t,n)}function ws(e,t,n,r,o=n){let i=jE(n),s=t[i],a=t[`${n}Start`];!a||!s||Jt(e,r+se(a),r+se(s),{op:`browser.${o}`,name:t.name,attributes:m({[Q]:"auto.ui.browser.metrics"},n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{})})}function jE(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function qE(e,t,n){let r=n+se(t.requestStart),o=n+se(t.responseEnd),i=n+se(t.responseStart);t.responseEnd&&(Jt(e,r,o,{op:"browser.request",name:t.name,attributes:{[Q]:"auto.ui.browser.metrics"}}),Jt(e,i,o,{op:"browser.response",name:t.name,attributes:{[Q]:"auto.ui.browser.metrics"}}))}function VE(e,t,n,r,o,i,s){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;let a=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(s?.includes(a))return;let c=Ft(n),u={[Q]:"auto.resource.browser.metrics"};eu(u,t,"transferSize","http.response_transfer_size"),eu(u,t,"encodedBodySize","http.response_content_length"),eu(u,t,"decodedBodySize","http.decoded_response_content_length");let d=t.deliveryType;d!=null&&(u["http.response_delivery_type"]=d);let l=t.renderBlockingStatus;if(l&&(u["resource.render_blocking_status"]=l),c.protocol&&(u["url.scheme"]=c.protocol.split(":").pop()),c.host&&(u["server.address"]=c.host),u["url.same_origin"]=n.includes(U.location.origin),t.nextHopProtocol!=null){let{name:h,version:_}=Do(t.nextHopProtocol);u["network.protocol.name"]=h,u["network.protocol.version"]=_}let f=i+r,p=f+o;Jt(e,f,p,{name:n.replace(U.location.origin,""),op:a,attributes:u})}function YE(e){let t=U.navigator;if(!t)return;let n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),Ts(n.rtt)&&(Ue["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Ts(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),Ts(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function JE(e,t){at&&t.recordLcpOnPageloadSpan&&(at.element&&e.setAttribute("lcp.element",Ce(at.element)),at.id&&e.setAttribute("lcp.id",at.id),at.url&&e.setAttribute("lcp.url",at.url.trim().slice(0,200)),at.loadTime!=null&&e.setAttribute("lcp.loadTime",at.loadTime),at.renderTime!=null&&e.setAttribute("lcp.renderTime",at.renderTime),e.setAttribute("lcp.size",at.size)),Rs?.sources&&t.recordClsOnPageloadSpan&&Rs.sources.forEach((n,r)=>e.setAttribute(`cls.source.${r+1}`,Ce(n.node)))}function eu(e,t,n,r){let o=t[n];o!=null&&o<FE&&(e[r]=o)}function KE(e){let t=sn(!1);if(!t)return;let{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}function su(){return Xn()&&fe()?gt("element",XE):()=>{}}var XE=({entries:e})=>{let t=te(),n=t?oe(t):void 0,r=n?O(n).description:M().getScopeData().transactionName;e.forEach(o=>{let i=o;if(!i.identifier)return;let s=i.name,a=i.renderTime,c=i.loadTime,[u,d]=c?[se(c),"load-time"]:a?[se(a),"render-time"]:[re(),"entry-emission"],l=s==="image-paint"?se(Math.max(0,(a??0)-(c??0))):0,f={[Q]:"auto.ui.browser.elementtiming",[ye]:"ui.elementtiming",[ve]:"component","sentry.span_start_time_source":d,"sentry.transaction_name":r,"element.id":i.id,"element.type":i.element?.tagName?.toLowerCase()||"unknown","element.size":i.naturalWidth&&i.naturalHeight?`${i.naturalWidth}x${i.naturalHeight}`:void 0,"element.render_time":a,"element.load_time":c,"element.url":i.url||void 0,"element.identifier":i.identifier,"element.paint_type":s};Bn({name:`element[${i.identifier}]`,attributes:f,startTime:u,onlyIfParent:!0},p=>{p.end(u+l)})})};var ZE=1e3,Dp,au,cu;function Po(e){He("dom",e),$e("dom",QE)}function QE(){if(!U.document)return;let e=xe.bind(null,"dom"),t=Pp(e,!0);U.document.addEventListener("click",t,!1),U.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{let o=U[n]?.prototype;o?.hasOwnProperty?.("addEventListener")&&(Ee(o,"addEventListener",function(i){return function(s,a,c){if(s==="click"||s=="keypress")try{let u=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},d=u[s]=u[s]||{refCount:0};if(!d.handler){let l=Pp(e);d.handler=l,i.call(this,s,l,c)}d.refCount++}catch{}return i.call(this,s,a,c)}}),Ee(o,"removeEventListener",function(i){return function(s,a,c){if(s==="click"||s=="keypress")try{let u=this.__sentry_instrumentation_handlers__||{},d=u[s];d&&(d.refCount--,d.refCount<=0&&(i.call(this,s,d.handler,c),d.handler=void 0,delete u[s]),Object.keys(u).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return i.call(this,s,a,c)}}))})}function eb(e){if(e.type!==au)return!1;try{if(!e.target||e.target._sentryId!==cu)return!1}catch{}return!0}function tb(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function Pp(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=nb(n);if(tb(n.type,r))return;he(n,"_sentryCaptured",!0),r&&!r._sentryId&&he(r,"_sentryId",ge());let o=n.type==="keypress"?"input":n.type;eb(n)||(e({event:n,name:o,global:t}),au=n.type,cu=r?r._sentryId:void 0),clearTimeout(Dp),Dp=U.setTimeout(()=>{cu=void 0,au=void 0},ZE)}}function nb(e){try{return e.target}catch{return null}}var xs;function an(e){let t="history";He(t,e),$e(t,rb)}function rb(){if(U.addEventListener("popstate",()=>{let t=U.location.href,n=xs;if(xs=t,n===t)return;xe("history",{from:n,to:t})}),!yc())return;function e(t){return function(...n){let r=n.length>2?n[2]:void 0;if(r){let o=xs,i=ob(String(r));if(xs=i,o===i)return t.apply(this,n);xe("history",{from:o,to:i})}return t.apply(this,n)}}Ee(U.history,"pushState",e),Ee(U.history,"replaceState",e)}function ob(e){try{return new URL(e,U.location.origin).toString()}catch{return e}}var Cs={};function Mr(e){let t=Cs[e];if(t)return t;let n=U[e];if(bo(n))return Cs[e]=n.bind(U);let r=U.document;if(r&&typeof r.createElement=="function")try{let o=r.createElement("iframe");o.hidden=!0,r.head.appendChild(o);let i=o.contentWindow;i?.[e]&&(n=i[e]),r.head.removeChild(o)}catch(o){Ht&&g.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,o)}return n&&(Cs[e]=n.bind(U))}function As(e){Cs[e]=void 0}function Zn(...e){return Mr("setTimeout")(...e)}var Ze="__sentry_xhr_v3__";function Qn(e){He("xhr",e),$e("xhr",ib)}function ib(){if(!U.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){let o=new Error,i=re()*1e3,s=Me(r[0])?r[0].toUpperCase():void 0,a=sb(r[1]);if(!s||!a)return t.apply(n,r);n[Ze]={method:s,url:a,request_headers:{}},s==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);let c=()=>{let u=n[Ze];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}let d={endTimestamp:re()*1e3,startTimestamp:i,xhr:n,virtualError:o};xe("xhr",d)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,d,l){return c(),u.apply(d,l)}}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,d,l){let[f,p]=l,h=d[Ze];return h&&Me(f)&&Me(p)&&(h.request_headers[f.toLowerCase()]=p),u.apply(d,l)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){let o=n[Ze];if(!o)return t.apply(n,r);r[0]!==void 0&&(o.body=r[0]);let i={startTimestamp:re()*1e3,xhr:n};return xe("xhr",i),t.apply(n,r)}})}function sb(e){if(Me(e))return e;try{return e.toString()}catch{}}function ks(e){return new URLSearchParams(e).toString()}function er(e,t=g){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[ks(e)];if(!e)return[void 0]}catch(n){return Ht&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Ht&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Or(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}var uu=[],Ns=new Map,ab=60;function lu(){if(Xn()&&fe()){let t=cb();return()=>{t()}}return()=>{}}var Fp={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function cb(){return Oo(ub)}var ub=({metric:e})=>{if(e.value==null)return;let t=se(e.value);if(t>ab)return;let n=e.entries.find(h=>h.duration===e.value&&Fp[h.name]);if(!n)return;let{interactionId:r}=n,o=Fp[n.name],i=se(fe()+n.startTime),s=te(),a=s?oe(s):void 0,u=(r!=null?Ns.get(r):void 0)||a,d=u?O(u).description:M().getScopeData().transactionName,l=Ce(n.target),f={[Q]:"auto.http.browser.inp",[ye]:`ui.interaction.${o}`,[Tt]:n.duration},p=Nr({name:l,transaction:d,attributes:f,startTime:i});p&&(p.addEvent("inp",{[qt]:"millisecond",[Vt]:e.value}),p.end(i+t))};function du(){let e=({entries:t})=>{let n=te(),r=n&&oe(n);t.forEach(o=>{if(!Np(o)||!r)return;let i=o.interactionId;if(i!=null&&!Ns.has(i)){if(uu.length>10){let s=uu.shift();Ns.delete(s)}uu.push(i),Ns.set(i,r)}})};gt("event",e),gt("first-input",e)}function Fo(e,t=Mr("fetch")){let n=0,r=0;function o(i){let s=i.body.length;n+=s,r++;let a=m({body:i.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15},e.fetchOptions);if(!t)return As("fetch"),En("No fetch implementation available");try{return t(e.url,a).then(c=>(n-=s,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return As("fetch"),n-=s,r--,En(c)}}return Gi(e,o)}var lb=10,db=20,fb=30,pb=40,mb=50;function Lr(e,t,n,r){let o={filename:e,function:t==="<anonymous>"?"?":t,in_app:!0};return n!==void 0&&(o.lineno=n),r!==void 0&&(o.colno=r),o}var hb=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,gb=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,_b=/\((\S*)(?::(\d+))(?::(\d+))\)/,Sb=e=>{let t=hb.exec(e);if(t){let[,r,o,i]=t;return Lr(r,"?",+o,+i)}let n=gb.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){let s=_b.exec(n[2]);s&&(n[2]=s[1],n[3]=s[2],n[4]=s[3])}let[o,i]=$p(n[1]||"?",n[2]);return Lr(i,o,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},Up=[fb,Sb],yb=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Eb=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,bb=e=>{let t=yb.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let i=Eb.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],o=t[1]||"?";return[o,r]=$p(o,r),Lr(r,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},Bp=[mb,bb],Tb=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Ib=e=>{let t=Tb.exec(e);return t?Lr(t[2],t[1]||"?",+t[3],t[4]?+t[4]:void 0):void 0},vb=[pb,Ib],wb=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,Rb=e=>{let t=wb.exec(e);return t?Lr(t[2],t[3]||"?",+t[1]):void 0},xb=[lb,Rb],Cb=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,Ab=e=>{let t=Cb.exec(e);return t?Lr(t[5],t[3]||t[4]||"?",+t[1],+t[2]):void 0},kb=[db,Ab],Hp=[Up,Bp],fu=ti(...Hp),$p=(e,t)=>{let n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:"?",n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function Nb(e,{metadata:t,tunnel:n,dsn:r}){let o=m(m({event_id:e.event_id,sent_at:new Date().toISOString()},t?.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}}),!!n&&!!r&&{dsn:ot(r)}),i=Mb(e);return Fe(o,[i])}function Mb(e){return[{type:"user_report"},e]}var $=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var Ms=1024,Ob="Breadcrumbs",Lb=(e={})=>{let t=m({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},e);return{name:Ob,setup(n){t.console&&Wn(Fb(n)),t.dom&&Po(Pb(n,t.dom)),t.xhr&&Qn(Ub(n)),t.fetch&&zn(Bb(n)),t.history&&an(Hb(n)),t.sentry&&n.on("beforeSendEvent",Db(n))}}},pu=Lb;function Db(e){return function(n){v()===e&&it({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:zt(n)},{event:n})}}function Pb(e,t){return function(r){if(v()!==e)return;let o,i,s=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>Ms&&($&&g.warn(`\`dom.maxStringLength\` cannot exceed ${Ms}, but a value of ${a} was configured. Sentry will use ${Ms} instead.`),a=Ms),typeof s=="string"&&(s=[s]);try{let u=r.event,d=$b(u)?u.target:u;o=Ce(d,{keyAttrs:s,maxStringLength:a}),i=Qr(d)}catch{o="<unknown>"}if(o.length===0)return;let c={category:`ui.${r.name}`,message:o};i&&(c.data={"ui.component_name":i}),it(c,{event:r.event,name:r.name,global:r.global})}}function Fb(e){return function(n){if(v()!==e)return;let r={category:"console",data:{arguments:n.args,logger:"console"},level:Gn(n.level),message:Ln(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Ln(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;it(r,{input:n.args,level:n.level})}}function Ub(e){return function(n){if(v()!==e)return;let{startTimestamp:r,endTimestamp:o}=n,i=n.xhr[Ze];if(!r||!o||!i)return;let{method:s,url:a,status_code:c,body:u}=i,d={method:s,url:a,status_code:c},l={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:o},f={category:"xhr",data:d,type:"http",level:ns(c)};e.emit("beforeOutgoingRequestBreadcrumb",f,l),it(f,l)}}function Bb(e){return function(n){if(v()!==e)return;let{startTimestamp:r,endTimestamp:o}=n;if(o&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){let i=n.fetchData,s={data:n.error,input:n.args,startTimestamp:r,endTimestamp:o},a={category:"fetch",data:i,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",a,s),it(a,s)}else{let i=n.response,s=E(m({},n.fetchData),{status_code:i?.status});n.fetchData.request_body_size,n.fetchData.response_body_size,i?.status;let a={input:n.args,response:i,startTimestamp:r,endTimestamp:o},c={category:"fetch",data:s,type:"http",level:ns(s.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",c,a),it(c,a)}}}function Hb(e){return function(n){if(v()!==e)return;let r=n.from,o=n.to,i=Ft(k.location.href),s=r?Ft(r):void 0,a=Ft(o);s?.path||(s=i),i.protocol===a.protocol&&i.host===a.host&&(o=a.relative),i.protocol===s.protocol&&i.host===s.host&&(r=s.relative),it({category:"navigation",data:{from:r,to:o}})}}function $b(e){return!!e&&!!e.target}var Wb=["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"],Gb="BrowserApiErrors",zb=(e={})=>{let t=m({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1},e);return{name:Gb,setupOnce(){t.setTimeout&&Ee(k,"setTimeout",Wp),t.setInterval&&Ee(k,"setInterval",Wp),t.requestAnimationFrame&&Ee(k,"requestAnimationFrame",jb),t.XMLHttpRequest&&"XMLHttpRequest"in k&&Ee(XMLHttpRequest.prototype,"send",qb);let n=t.eventTarget;n&&(Array.isArray(n)?n:Wb).forEach(o=>Vb(o,t))}}},mu=zb;function Wp(e){return function(...t){let n=t[0];return t[0]=Yn(n,{mechanism:{data:{function:tt(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function jb(e){return function(t){return e.apply(this,[Yn(t,{mechanism:{data:{function:"requestAnimationFrame",handler:tt(e)},handled:!1,type:"instrument"}})])}}function qb(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in n&&typeof n[o]=="function"&&Ee(n,o,function(i){let s={mechanism:{data:{function:o,handler:tt(i)},handled:!1,type:"instrument"}},a=Dn(i);return a&&(s.mechanism.data.handler=tt(a)),Yn(i,s)})}),e.apply(this,t)}}function Vb(e,t){let r=k[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(Ee(r,"addEventListener",function(o){return function(i,s,a){try{Yb(s)&&(s.handleEvent=Yn(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:tt(s),target:e},handled:!1,type:"instrument"}}))}catch{}return t.unregisterOriginalCallbacks&&Jb(this,i,s),o.apply(this,[i,Yn(s,{mechanism:{data:{function:"addEventListener",handler:tt(s),target:e},handled:!1,type:"instrument"}}),a])}}),Ee(r,"removeEventListener",function(o){return function(i,s,a){try{let c=s.__sentry_wrapped__;c&&o.call(this,i,c,a)}catch{}return o.call(this,i,s,a)}}))}function Yb(e){return typeof e.handleEvent=="function"}function Jb(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}var hu=()=>({name:"BrowserSession",setupOnce(){if(typeof k.document>"u"){$&&g.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}lo({ignoreDuration:!0}),fo(),an(({from:e,to:t})=>{e!==void 0&&e!==t&&(lo({ignoreDuration:!0}),fo())})}});var Kb="GlobalHandlers",Xb=(e={})=>{let t=m({onerror:!0,onunhandledrejection:!0},e);return{name:Kb,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(Zb(n),Gp("onerror")),t.onunhandledrejection&&(Qb(n),Gp("onunhandledrejection"))}}},gu=Xb;function Zb(e){Kr(t=>{let{stackParser:n,attachStacktrace:r}=zp();if(v()!==e||Hc())return;let{msg:o,url:i,line:s,column:a,error:c}=t,u=nT(ms(n,c||o,void 0,r,!1),i,s,a);u.level="error",bn(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function Qb(e){Xr(t=>{let{stackParser:n,attachStacktrace:r}=zp();if(v()!==e||Hc())return;let o=eT(t),i=yt(o)?tT(o):ms(n,o,void 0,r,!0);i.level="error",bn(i,{originalException:o,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function eT(e){if(yt(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 tT(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function nT(e,t,n,r){let o=e.exception=e.exception||{},i=o.values=o.values||[],s=i[0]=i[0]||{},a=s.stacktrace=s.stacktrace||{},c=a.frames=a.frames||[],u=r,d=n,l=Me(t)&&t.length>0?t:Ye();return c.length===0&&c.push({colno:u,filename:l,function:"?",in_app:!0,lineno:d}),e}function Gp(e){$&&g.log(`Global Handler attached: ${e}`)}function zp(){return v()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var _u=()=>({name:"HttpContext",preprocessEvent(e){if(!k.navigator&&!k.location&&!k.document)return;let t=xo(),n=m(m({},t.headers),e.request?.headers);e.request=E(m(m({},t),e.request),{headers:n})}});var rT="cause",oT=5,iT="LinkedErrors",sT=(e={})=>{let t=e.limit||oT,n=e.key||rT;return{name:iT,preprocessEvent(r,o,i){let s=i.getOptions();hc(Co,s.stackParser,n,t,r,o)}}},Su=sT;function jp(){return aT()?($&&Be(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function aT(){if(typeof k.window>"u")return!1;let e=k;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;let n=Ye(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(k===k.top&&r.some(i=>n.startsWith(`${i}://`)))}function qp(e){return[qi(),zi(),mu(),pu(),gu(),Su(),Ji(),_u(),hu()]}function cT(e={}){let t=!e.skipBrowserExtensionCheck&&jp(),n=E(m({},e),{enabled:t?!1:e.enabled,stackParser:ga(e.stackParser||fu),integrations:Ja({integrations:e.integrations,defaultIntegrations:e.defaultIntegrations==null?qp():e.defaultIntegrations}),transport:e.transport||Fo});return tc(Ao,n)}function uT(){}function lT(e){e()}function dT(e={}){let t=k.document,n=t?.head||t?.body;if(!n){$&&g.error("[showReportDialog] Global document not defined");return}let r=M(),i=v()?.getDsn();if(!i){$&&g.error("[showReportDialog] DSN not configured");return}let s=E(m({},e),{user:m(m({},r.getUser()),e.user),eventId:e.eventId||Pi()}),a=k.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=Ya(i,s);let{onLoad:c,onClose:u}=s;if(c&&(a.onload=c),u){let d=l=>{if(l.data==="__sentry_reportdialog_closed__")try{u()}finally{k.removeEventListener("message",d)}};k.addEventListener("message",d)}n.appendChild(a)}var fT=x,pT="ReportingObserver",Vp=new WeakMap,mT=(e={})=>{let t=e.types||["crash","deprecation","intervention"];function n(r){if(Vp.has(v()))for(let o of r)Oe(i=>{i.setExtra("url",o.url);let s=`ReportingObserver [${o.type}]`,a="No details available";if(o.body){let c={};for(let u in o.body)c[u]=o.body[u];if(i.setExtra("body",c),o.type==="crash"){let u=o.body;a=[u.crashId||"",u.reason||""].join(" ").trim()||a}else a=o.body.message||a}$n(`${s}: ${a}`)})}return{name:pT,setupOnce(){if(!Ec())return;new fT.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){Vp.set(r,!0)}}},hT=mT;var gT="HttpClient",_T=(e={})=>{let t=m({failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/]},e);return{name:gT,setup(n){RT(n,t),xT(n,t)}}},ST=_T;function yT(e,t,n,r,o){if(Kp(e,n.status,n.url)){let i=CT(t,r),s,a,c,u;Zp()&&([s,c]=Yp("Cookie",i),[a,u]=Yp("Set-Cookie",n));let d=Xp({url:i.url,method:i.method,status:n.status,requestHeaders:s,responseHeaders:a,requestCookies:c,responseCookies:u,error:o});bn(d)}}function Yp(e,t){let n=TT(t.headers),r;try{let o=n[e]||n[e.toLowerCase()]||void 0;o&&(r=Jp(o))}catch{}return[n,r]}function ET(e,t,n,r,o){if(Kp(e,t.status,t.responseURL)){let i,s,a;if(Zp()){try{let u=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;u&&(s=Jp(u))}catch{}try{a=IT(t)}catch{}i=r}let c=Xp({url:t.responseURL,method:n,status:t.status,requestHeaders:i,responseHeaders:a,responseCookies:s,error:o});bn(c)}}function bT(e){if(e){let t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function Jp(e){return e.split("; ").reduce((t,n)=>{let[r,o]=n.split("=");return r&&o&&(t[r]=o),t},{})}function TT(e){let t={};return e.forEach((n,r)=>{t[r]=n}),t}function IT(e){let t=e.getAllResponseHeaders();return t?t.split(`\r
|
|
491
|
-
`).reduce((n,r)=>{let[o,i]=r.split(": ");return o&&i&&(n[o]=i),n},{}):{}}function vT(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}function wT(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}function RT(e,t){To()&&zn(n=>{if(v()!==e)return;let{response:r,args:o,error:i,virtualError:s}=n,[a,c]=o;r&&yT(t,a,r,c,i||s)},!1)}function xT(e,t){"XMLHttpRequest"in x&&Qn(n=>{if(v()!==e)return;let{error:r,virtualError:o}=n,i=n.xhr,s=i[Ze];if(!s)return;let{method:a,request_headers:c}=s;try{ET(t,i,a,c,r||o)}catch(u){$&&g.warn("Error while extracting response event form XHR response",u)}})}function Kp(e,t,n){return wT(e.failedRequestStatusCodes,t)&&vT(e.failedRequestTargets,n)&&!So(n,v())}function Xp(e){let t=v(),n=t&&e.error&&e.error instanceof Error?e.error.stack:void 0,r=n&&t?t.getOptions().stackParser(n,0,1):void 0,o=`HTTP Client Error with status code: ${e.status}`,i={message:o,exception:{values:[{type:"Error",value:o,stacktrace:r?{frames:r}:void 0}]},request:{url:e.url,method:e.method,headers:e.requestHeaders,cookies:e.requestCookies},contexts:{response:{status_code:e.status,headers:e.responseHeaders,cookies:e.responseCookies,body_size:bT(e.responseHeaders)}}};return rt(i,{type:"http.client",handled:!1}),i}function CT(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function Zp(){let e=v();return e?!!e.getOptions().sendDefaultPii:!1}var yu=x,AT=7,kT="ContextLines",NT=(e={})=>{let t=e.frameContextLines!=null?e.frameContextLines:AT;return{name:kT,processEvent(n){return OT(n,t)}}},MT=NT;function OT(e,t){let n=yu.document,r=yu.location&&Eo(yu.location.href);if(!n||!r)return e;let o=e.exception?.values;if(!o?.length)return e;let i=n.documentElement.innerHTML;if(!i)return e;let s=["<!DOCTYPE html>","<html>",...i.split(`
|
|
492
|
-
`),"</html>"];return o.forEach(a=>{let c=a.stacktrace;c?.frames&&(c.frames=c.frames.map(u=>LT(u,s,r,t)))}),e}function LT(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||wa(t,e,r),e}var DT="GraphQLClient",PT=e=>({name:DT,setup(t){FT(t,e),UT(t,e)}});function FT(e,t){e.on("beforeOutgoingRequestSpan",(n,r)=>{let i=O(n).data||{};if(!(i[ye]==="http.client"))return;let c=i[Na]||i["http.url"],u=i[ka]||i["http.method"];if(!Me(c)||!Me(u))return;let{endpoints:d}=t,l=Pe(c,d),f=em(r);if(l&&f){let p=tm(f);if(p){let h=Qp(p);n.updateName(`${u} ${c} (${h})`),n.setAttribute("graphql.document",f)}}})}function UT(e,t){e.on("beforeOutgoingRequestBreadcrumb",(n,r)=>{let{category:o,type:i,data:s}=n;if(i==="http"&&(o==="fetch"||o==="xhr")){let d=s?.url,{endpoints:l}=t,f=Pe(d,l),p=em(r);if(f&&s&&p){let h=tm(p);if(!s.graphql&&h){let _=Qp(h);s["graphql.document"]=h.query,s["graphql.operation"]=_}}}})}function Qp(e){let{query:t,operationName:n}=e,{operationName:r=n,operationType:o}=BT(t);return r?`${o} ${r}`:`${o}`}function em(e){let t="xhr"in e,n;if(t){let r=e.xhr[Ze];n=r&&er(r.body)[0]}else{let r=Or(e.input);n=er(r)[0]}return n}function BT(e){let t=/^(?:\s*)(query|mutation|subscription)(?:\s*)(\w+)(?:\s*)[{(]/,n=/^(?:\s*)(query|mutation|subscription)(?:\s*)[{(]/,r=e.match(t);if(r)return{operationType:r[1],operationName:r[2]};let o=e.match(n);return o?{operationType:o[1],operationName:void 0}:{operationType:void 0,operationName:void 0}}function tm(e){let t;try{let n=JSON.parse(e);!!n.query&&(t=n)}finally{return t}}var HT=PT;var me=x,Vu="sentryReplaySession",$T="replay_event",Yu="Unable to send Replay",WT=3e5,GT=9e5,zT=5e3,jT=5500,qT=6e4,VT=5e3,YT=3,nm=15e4,Os=5e3,JT=3e3,KT=300,Ju=2e7,XT=4999,ZT=15e3,rm=36e5,QT=Object.defineProperty,eI=(e,t,n)=>t in e?QT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,om=(e,t,n)=>eI(e,typeof t!="symbol"?t+"":t,n),Le=(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",e))(Le||{});function tI(e){return e.nodeType===e.ELEMENT_NODE}function Ho(e){return e?.host?.shadowRoot===e}function $o(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function nI(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function rI(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let 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 Bs(e){try{let t=e.rules||e.cssRules;return t?nI(Array.from(t,Rm).join("")):null}catch{return null}}function oI(e){let t="";for(let n=0;n<e.style.length;n++){let r=e.style,o=r[n],i=r.getPropertyPriority(o);t+=`${o}:${r.getPropertyValue(o)}${i?" !important":""};`}return`${e.selectorText} { ${t} }`}function Rm(e){let t;if(sI(e))try{t=Bs(e.styleSheet)||rI(e)}catch{}else if(aI(e)){let n=e.cssText,r=e.selectorText.includes(":"),o=typeof e.style.all=="string"&&e.style.all;if(o&&(n=oI(e)),r&&(n=iI(n)),r||o)return n}return t||e.cssText}function iI(e){let t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function sI(e){return"styleSheet"in e}function aI(e){return"selectorText"in e}var Hs=class{constructor(){om(this,"idNodeMap",new Map),om(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-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){let 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){let r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){let r=this.getNode(t);if(r){let o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function cI(){return new Hs}function Xs({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 Go({isMasked:e,element:t,value:n,maskInputFn:r}){let o=n||"";return e?(r&&(o=r(o,t)),"*".repeat(o.length)):o}function Wr(e){return e.toLowerCase()}function vu(e){return e.toUpperCase()}var im="__rrweb_original__";function uI(e){let t=e.getContext("2d");if(!t)return!0;let n=50;for(let r=0;r<e.width;r+=n)for(let o=0;o<e.height;o+=n){let i=t.getImageData,s=im in i?i[im]:i;if(new Uint32Array(s.call(t,r,o,Math.min(n,e.width-r),Math.min(n,e.height-o)).data.buffer).some(c=>c!==0))return!1}return!0}function Ku(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Wr(t):null}function $s(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function xm(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}let r=/\.([0-9a-z]+)(?:$)/i;return n.pathname.match(r)?.[1]??null}var sm={};function Cm(e){let t=sm[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement=="function")try{let o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);let i=o.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(o)}catch{}return sm[e]=r.bind(window)}function wu(...e){return Cm("setTimeout")(...e)}function Am(...e){return Cm("clearTimeout")(...e)}function km(e){try{return e.contentDocument}catch{}}var lI=1,dI=new RegExp("[^a-z0-9-_:]"),zo=-2;function Xu(){return lI++}function fI(e){if(e instanceof HTMLFormElement)return"form";let t=Wr(e.tagName);return dI.test(t)?"div":t}function pI(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var Dr,am,mI=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,hI=/^(?:[a-z+]+:)?\/\//i,gI=/^www\..*/i,_I=/^(data:)([^,]*),(.*)/i;function Ws(e,t){return(e||"").replace(mI,(n,r,o,i,s,a)=>{let c=o||s||a,u=r||i||"";if(!c)return n;if(hI.test(c)||gI.test(c))return`url(${u}${c}${u})`;if(_I.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${pI(t)+c}${u})`;let d=t.split("/"),l=c.split("/");d.pop();for(let f of l)f!=="."&&(f===".."?d.pop():d.push(f));return`url(${u}${d.join("/")}${u})`})}var SI=/^[^ \t\n\r\u000c]+/,yI=/^[, \t\n\r\u000c]+/;function EI(e,t){if(t.trim()==="")return t;let n=0;function r(i){let s,a=i.exec(t.substring(n));return a?(s=a[0],n+=s.length,s):""}let o=[];for(;r(yI),!(n>=t.length);){let i=r(SI);if(i.slice(-1)===",")i=Ur(e,i.substring(0,i.length-1)),o.push(i);else{let s="";i=Ur(e,i);let a=!1;for(;;){let c=t.charAt(n);if(c===""){o.push((i+s).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,o.push((i+s).trim());break}else c==="("&&(a=!0);s+=c,n+=1}}}return o.join(", ")}var cm=new WeakMap;function Ur(e,t){return!t||t.trim()===""?t:Zs(e,t)}function bI(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Zs(e,t){let n=cm.get(e);if(n||(n=e.createElement("a"),cm.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function Nm(e,t,n,r,o,i){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?Ur(e,r):n==="srcset"?EI(e,r):n==="style"?Ws(r,Zs(e)):t==="object"&&n==="data"?Ur(e,r):typeof i=="function"?i(n,r,o):r)}function Mm(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function Om(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 o=e.classList.length;o--;){let i=e.classList[o];if(t.test(i))return!0}if(n)return e.matches(n)}catch{}return!1}function TI(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}function tr(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:tr(e.parentNode,t,n,r+1)}function Br(e,t){return n=>{let r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(TI(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function Gr(e,t,n,r,o,i){try{let s=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(s===null)return!1;if(s.tagName==="INPUT"){let u=s.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let a=-1,c=-1;if(i){if(c=tr(s,Br(r,o)),c<0)return!0;a=tr(s,Br(t,n),c>=0?c:1/0)}else{if(a=tr(s,Br(t,n)),a<0)return!1;c=tr(s,Br(r,o),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!i}catch{}return!!i}function II(e,t,n){let r=e.contentWindow;if(!r)return;let o=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){let a=wu(()=>{o||(t(),o=!0)},n);e.addEventListener("load",()=>{Am(a),o=!0,t()});return}let s="about:blank";if(r.location.href!==s||e.src===s||e.src==="")return wu(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function vI(e,t,n){let r=!1,o;try{o=e.sheet}catch{return}if(o)return;let i=wu(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{Am(i),r=!0,t()})}function wI(e,t){let{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:h={},maskTextFn:_,maskInputFn:S,dataURLOptions:y={},inlineImages:I,recordCanvas:W,keepIframeSrcFn:N,newlyAddedElement:L=!1}=t,b=RI(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:b};case e.ELEMENT_NODE:return CI(e,{doc:n,blockClass:o,blockSelector:i,unblockSelector:s,inlineStylesheet:p,maskAttributeFn:c,maskInputOptions:h,maskInputFn:S,dataURLOptions:y,inlineImages:I,recordCanvas:W,keepIframeSrcFn:N,newlyAddedElement:L,rootId:b,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:f});case e.TEXT_NODE:return xI(e,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:f,maskTextFn:_,maskInputOptions:h,maskInputFn:S,rootId:b});case e.CDATA_SECTION_NODE:return{type:Le.CDATA,textContent:"",rootId:b};case e.COMMENT_NODE:return{type:Le.Comment,textContent:e.textContent||"",rootId:b};default:return!1}}function RI(e,t){if(!t.hasNode(e))return;let n=t.getId(e);return n===1?void 0:n}function xI(e,t){let{maskAllText:n,maskTextClass:r,unmaskTextClass:o,maskTextSelector:i,unmaskTextSelector:s,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:d}=t,l=e.parentNode&&e.parentNode.tagName,f=e.textContent,p=l==="STYLE"?!0:void 0,h=l==="SCRIPT"?!0:void 0,_=l==="TEXTAREA"?!0:void 0;if(p&&f){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(f=Bs(e.parentNode.sheet))}catch(y){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${y}`,e)}f=Ws(f,Zs(t.doc))}h&&(f="SCRIPT_PLACEHOLDER");let S=Gr(e,r,i,o,s,n);if(!p&&!h&&!_&&f&&S&&(f=a?a(f,e.parentElement):f.replace(/[\S]/g,"*")),_&&f&&(c.textarea||S)&&(f=u?u(f,e.parentNode):f.replace(/[\S]/g,"*")),l==="OPTION"&&f){let y=Xs({type:null,tagName:l,maskInputOptions:c});f=Go({isMasked:Gr(e,r,i,o,s,y),element:e,value:f,maskInputFn:u})}return{type:Le.Text,textContent:f||"",isStyle:p,rootId:d}}function CI(e,t){let{doc:n,blockClass:r,blockSelector:o,unblockSelector:i,inlineStylesheet:s,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:d={},inlineImages:l,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:h=!1,rootId:_,maskTextClass:S,unmaskTextClass:y,maskTextSelector:I,unmaskTextSelector:W}=t,N=Om(e,r,o,i),L=fI(e),b={},C=e.attributes.length;for(let w=0;w<C;w++){let A=e.attributes[w];A.name&&!Mm(L,A.name,A.value)&&(b[A.name]=Nm(n,L,Wr(A.name),A.value,e,c))}if(L==="link"&&s){let w=Array.from(n.styleSheets).find(G=>G.href===e.href),A=null;w&&(A=Bs(w)),A&&(b.rel=null,b.href=null,b.crossorigin=null,b._cssText=Ws(A,w.href))}if(L==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){let w=Bs(e.sheet);w&&(b._cssText=Ws(w,Zs(n)))}if(L==="input"||L==="textarea"||L==="select"||L==="option"){let w=e,A=Ku(w),G=$s(w,vu(L),A),R=w.checked;if(A!=="submit"&&A!=="button"&&G){let F=Gr(w,S,I,y,W,Xs({type:A,tagName:vu(L),maskInputOptions:a}));b.value=Go({isMasked:F,element:w,value:G,maskInputFn:u})}R&&(b.checked=R)}if(L==="option"&&(e.selected&&!a.select?b.selected=!0:delete b.selected),L==="canvas"&&f){if(e.__context==="2d")uI(e)||(b.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){let w=e.toDataURL(d.type,d.quality),A=n.createElement("canvas");A.width=e.width,A.height=e.height;let G=A.toDataURL(d.type,d.quality);w!==G&&(b.rr_dataURL=w)}}if(L==="img"&&l){Dr||(Dr=n.createElement("canvas"),am=Dr.getContext("2d"));let w=e,A=w.currentSrc||w.getAttribute("src")||"<unknown-src>",G=w.crossOrigin,R=()=>{w.removeEventListener("load",R);try{Dr.width=w.naturalWidth,Dr.height=w.naturalHeight,am.drawImage(w,0,0),b.rr_dataURL=Dr.toDataURL(d.type,d.quality)}catch(F){if(w.crossOrigin!=="anonymous"){w.crossOrigin="anonymous",w.complete&&w.naturalWidth!==0?R():w.addEventListener("load",R);return}else console.warn(`Cannot inline img src=${A}! Error: ${F}`)}w.crossOrigin==="anonymous"&&(G?b.crossOrigin=G:w.removeAttribute("crossorigin"))};w.complete&&w.naturalWidth!==0?R():w.addEventListener("load",R)}if((L==="audio"||L==="video")&&(b.rr_mediaState=e.paused?"paused":"played",b.rr_mediaCurrentTime=e.currentTime),h||(e.scrollLeft&&(b.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(b.rr_scrollTop=e.scrollTop)),N){let{width:w,height:A}=e.getBoundingClientRect();b={class:b.class,rr_width:`${w}px`,rr_height:`${A}px`}}L==="iframe"&&!p(b.src)&&(!N&&!km(e)&&(b.rr_src=b.src),delete b.src);let P;try{customElements.get(L)&&(P=!0)}catch{}return{type:Le.Element,tagName:L,attributes:b,childNodes:[],isSVG:bI(e)||void 0,needBlock:N,rootId:_,isCustom:P}}function pe(e){return e==null?"":e.toLowerCase()}function AI(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.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&xm(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(pe(e.attributes.name).match(/^msapplication-tile(image|color)$/)||pe(e.attributes.name)==="application-name"||pe(e.attributes.rel)==="icon"||pe(e.attributes.rel)==="apple-touch-icon"||pe(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&pe(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(pe(e.attributes.property).match(/^(og|twitter|fb):/)||pe(e.attributes.name).match(/^(og|twitter):/)||pe(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(pe(e.attributes.name)==="robots"||pe(e.attributes.name)==="googlebot"||pe(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(pe(e.attributes.name)==="author"||pe(e.attributes.name)==="generator"||pe(e.attributes.name)==="framework"||pe(e.attributes.name)==="publisher"||pe(e.attributes.name)==="progid"||pe(e.attributes.property).match(/^article:/)||pe(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(pe(e.attributes.name)==="google-site-verification"||pe(e.attributes.name)==="yandex-verification"||pe(e.attributes.name)==="csrf-token"||pe(e.attributes.name)==="p:domain_verify"||pe(e.attributes.name)==="verify-v1"||pe(e.attributes.name)==="verification"||pe(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Hr(e,t){let{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:f=!1,inlineStylesheet:p=!0,maskInputOptions:h={},maskAttributeFn:_,maskTextFn:S,maskInputFn:y,slimDOMOptions:I,dataURLOptions:W={},inlineImages:N=!1,recordCanvas:L=!1,onSerialize:b,onIframeLoad:C,iframeLoadTimeout:P=5e3,onStylesheetLoad:w,stylesheetLoadTimeout:A=5e3,keepIframeSrcFn:G=()=>!1,newlyAddedElement:R=!1}=t,{preserveWhiteSpace:F=!0}=t,V=wI(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,maskAllText:a,unblockSelector:s,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:_,maskTextFn:S,maskInputFn:y,dataURLOptions:W,inlineImages:N,recordCanvas:L,keepIframeSrcFn:G,newlyAddedElement:R});if(!V)return console.warn(e,"not serialized"),null;let H;r.hasNode(e)?H=r.getId(e):AI(V,I)||!F&&V.type===Le.Text&&!V.isStyle&&!V.textContent.replace(/^\s+|\s+$/gm,"").length?H=zo:H=Xu();let D=Object.assign(V,{id:H});if(r.add(e,D),H===zo)return null;b&&b(e);let z=!f;if(D.type===Le.Element){z=z&&!D.needBlock,delete D.needBlock;let B=e.shadowRoot;B&&$o(B)&&(D.isShadowHost=!0)}if((D.type===Le.Document||D.type===Le.Element)&&z){I.headWhitespace&&D.type===Le.Element&&D.tagName==="head"&&(F=!1);let B={doc:n,mirror:r,blockClass:o,blockSelector:i,maskAllText:a,unblockSelector:s,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:f,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:_,maskTextFn:S,maskInputFn:y,slimDOMOptions:I,dataURLOptions:W,inlineImages:N,recordCanvas:L,preserveWhiteSpace:F,onSerialize:b,onIframeLoad:C,iframeLoadTimeout:P,onStylesheetLoad:w,stylesheetLoadTimeout:A,keepIframeSrcFn:G};for(let J of Array.from(e.childNodes)){let Z=Hr(J,B);Z&&D.childNodes.push(Z)}if(tI(e)&&e.shadowRoot)for(let J of Array.from(e.shadowRoot.childNodes)){let Z=Hr(J,B);Z&&($o(e.shadowRoot)&&(Z.isShadow=!0),D.childNodes.push(Z))}}return e.parentNode&&Ho(e.parentNode)&&$o(e.parentNode)&&(D.isShadow=!0),D.type===Le.Element&&D.tagName==="iframe"&&!Om(e,o,i,s)&&II(e,()=>{let B=km(e);if(B&&C){let J=Hr(B,{doc:B,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:_,maskTextFn:S,maskInputFn:y,slimDOMOptions:I,dataURLOptions:W,inlineImages:N,recordCanvas:L,preserveWhiteSpace:F,onSerialize:b,onIframeLoad:C,iframeLoadTimeout:P,onStylesheetLoad:w,stylesheetLoadTimeout:A,keepIframeSrcFn:G});J&&C(e,J)}},P),D.type===Le.Element&&D.tagName==="link"&&typeof D.attributes.rel=="string"&&(D.attributes.rel==="stylesheet"||D.attributes.rel==="preload"&&typeof D.attributes.href=="string"&&xm(D.attributes.href)==="css")&&vI(e,()=>{if(w){let B=Hr(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:_,maskTextFn:S,maskInputFn:y,slimDOMOptions:I,dataURLOptions:W,inlineImages:N,recordCanvas:L,preserveWhiteSpace:F,onSerialize:b,onIframeLoad:C,iframeLoadTimeout:P,onStylesheetLoad:w,stylesheetLoadTimeout:A,keepIframeSrcFn:G});B&&w(e,B)}},A),D}function kI(e,t){let{mirror:n=new Hs,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:i=null,maskAllText:s=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:d=null,inlineStylesheet:l=!0,inlineImages:f=!1,recordCanvas:p=!1,maskAllInputs:h=!1,maskAttributeFn:_,maskTextFn:S,maskInputFn:y,slimDOM:I=!1,dataURLOptions:W,preserveWhiteSpace:N,onSerialize:L,onIframeLoad:b,iframeLoadTimeout:C,onStylesheetLoad:P,stylesheetLoadTimeout:w,keepIframeSrcFn:A=()=>!1}=t||{};return Hr(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,maskAllText:s,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:l,maskInputOptions:h===!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}:h===!1?{}:h,maskAttributeFn:_,maskTextFn:S,maskInputFn:y,slimDOMOptions:I===!0||I==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:I==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:I===!1?{}:I,dataURLOptions:W,inlineImages:f,recordCanvas:p,preserveWhiteSpace:N,onSerialize:L,onIframeLoad:b,iframeLoadTimeout:C,onStylesheetLoad:P,stylesheetLoadTimeout:w,keepIframeSrcFn:A,newlyAddedElement:!1})}function et(e,t,n=document){let r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}var Pr=`Please stop import mirror directly. Instead of that,\r
|
|
493
|
-
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
494
|
-
or you can use record.mirror to access the mirror instance during recording.`,um={map:{},getId(){return console.error(Pr),-1},getNode(){return console.error(Pr),null},removeNodeFromMap(){console.error(Pr)},has(){return console.error(Pr),!1},reset(){console.error(Pr)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(um=new Proxy(um,{get(e,t,n){return t==="map"&&console.error(Pr),Reflect.get(e,t,n)}}));function jo(e,t,n={}){let r=null,o=0;return function(...i){let s=Date.now();!o&&n.leading===!1&&(o=s);let a=t-(s-o),c=this;a<=0||a>t?(r&&(PI(r),r=null),o=s,e.apply(c,i)):!r&&n.trailing!==!1&&(r=Qs(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(c,i)},a))}}function Lm(e,t,n,r,o=window){let i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(s){Qs(()=>{n.set.call(this,s)},0),i&&i.set&&i.set.call(this,s)}}),()=>Lm(e,t,i||{},!0)}function Zu(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}var Gs=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Gs=()=>new Date().getTime());function Dm(e){let t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function Pm(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Fm(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Um(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function _t(e,t,n,r,o){if(!e)return!1;let i=Um(e);if(!i)return!1;let s=Br(t,n);if(!o){let u=r&&i.matches(r);return s(i)&&!u}let a=tr(i,s),c=-1;return a<0?!1:(r&&(c=tr(i,Br(null,r))),a>-1&&c<0?!0:a<c)}function NI(e,t){return t.getId(e)!==-1}function Eu(e,t){return t.getId(e)===zo}function Bm(e,t){if(Ho(e))return!1;let n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?Bm(e.parentNode,t):!0:!0}function Ru(e){return!!e.changedTouches}function MI(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 Hm(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function $m(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function xu(e){return!!e?.shadowRoot}var Cu=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return 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 Wm(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function OI(e){let t=e,n;for(;n=Wm(t);)t=n;return t}function LI(e){let t=e.ownerDocument;if(!t)return!1;let n=OI(e);return t.contains(n)}function Gm(e){let t=e.ownerDocument;return t?t.contains(e)||LI(e):!1}var lm={};function Qu(e){let t=lm[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement=="function")try{let o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);let i=o.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(o)}catch{}return lm[e]=r.bind(window)}function DI(...e){return Qu("requestAnimationFrame")(...e)}function Qs(...e){return Qu("setTimeout")(...e)}function PI(...e){return Qu("clearTimeout")(...e)}var X=(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))(X||{}),Y=(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))(Y||{}),Qe=(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))(Qe||{}),cn=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(cn||{}),Fr=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Fr||{});function el(e){try{return e.contentDocument}catch{}}function FI(e){try{return e.contentWindow}catch{}}function dm(e){return"__ln"in e}var Au=class{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=n?.next||null;return n}addNode(t){let n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&dm(t.previousSibling)){let 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&&dm(t.nextSibling)&&t.nextSibling.__ln.previous){let 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){let 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--)}},fm=(e,t)=>`${e}@${t}`,ku=class{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;let t=[],n=new Set,r=new Au,o=c=>{let u=c,d=zo;for(;d===zo;)u=u&&u.nextSibling,d=u&&this.mirror.getId(u);return d},i=c=>{if(!c.parentNode||!Gm(c))return;let u=Ho(c.parentNode)?this.mirror.getId(Wm(c)):this.mirror.getId(c.parentNode),d=o(c);if(u===-1||d===-1)return r.addNode(c);let l=Hr(c,{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=>{Hm(f,this.mirror)&&!_t(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(f),$m(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),xu(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(f,p)=>{_t(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(f,p),f.contentWindow&&this.canvasManager.addWindow(f.contentWindow),this.shadowDomManager.observeAttachShadow(f))},onStylesheetLoad:(f,p)=>{this.stylesheetManager.attachLinkElement(f,p)}});l&&(t.push({parentId:u,nextId:d,node:l}),n.add(l.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let c of this.movedSet)pm(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||i(c);for(let c of this.addedSet)!mm(this.droppedSet,c)&&!pm(this.removes,c,this.mirror)||mm(this.movedSet,c)?i(c):this.droppedSet.add(c);let s=null;for(;r.length;){let c=null;if(s){let u=this.mirror.getId(s.value.parentNode),d=o(s.value);u!==-1&&d!==-1&&(c=s)}if(!c){let u=r.tail;for(;u;){let d=u;if(u=u.previous,d){let l=this.mirror.getId(d.value.parentNode);if(o(d.value)===-1)continue;if(l!==-1){c=d;break}else{let p=d.value;if(p.parentNode&&p.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let h=p.parentNode.host;if(this.mirror.getId(h)!==-1){c=d;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}s=c.previous,r.removeNode(c.value),i(c.value)}let a={texts:this.texts.map(c=>({id:this.mirror.getId(c.node),value:c.value})).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{let{attributes:u}=c;if(typeof u.style=="string"){let d=JSON.stringify(c.styleDiff),l=JSON.stringify(c._unchangedStyles);d.length<u.style.length&&(d+l).split("var(").length===u.style.split("var(").length&&(u.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:u}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.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(a))},this.processMutation=t=>{if(!Eu(t.target,this.mirror))switch(t.type){case"characterData":{let n=t.target.textContent;!_t(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:Gr(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,Um(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{let n=t.target,r=t.attributeName,o=t.target.getAttribute(r);if(r==="value"){let s=Ku(n),a=n.tagName;o=$s(n,a,s);let c=Xs({maskInputOptions:this.maskInputOptions,tagName:a,type:s}),u=Gr(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c);o=Go({isMasked:u,element:n,value:o,maskInputFn:this.maskInputFn})}if(_t(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||o===t.oldValue)return;let i=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(o))if(!el(n))r="rr_src";else return;if(i||(i={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(t.target,i)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!Mm(n.tagName,r)&&(i.attributes[r]=Nm(this.doc,Wr(n.tagName),Wr(r),o,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let s=this.unattachedDoc.createElement("span");t.oldValue&&s.setAttribute("style",t.oldValue);for(let a of Array.from(n.style)){let c=n.style.getPropertyValue(a),u=n.style.getPropertyPriority(a);c!==s.style.getPropertyValue(a)||u!==s.style.getPropertyPriority(a)?u===""?i.styleDiff[a]=c:i.styleDiff[a]=[c,u]:i._unchangedStyles[a]=[c,u]}for(let a of Array.from(s.style))n.style.getPropertyValue(a)===""&&(i.styleDiff[a]=!1)}break}case"childList":{if(_t(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{let r=this.mirror.getId(n),o=Ho(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);_t(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Eu(n,this.mirror)||!NI(n,this.mirror)||(this.addedSet.has(n)?(Nu(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||Bm(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[fm(r,o)]?Nu(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:Ho(t.target)&&$o(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(Eu(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[fm(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);_t(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes.forEach(r=>this.genAdds(r)),xu(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 Nu(e,t){e.delete(t),t.childNodes.forEach(n=>Nu(e,n))}function pm(e,t,n){return e.length===0?!1:UI(e,t,n)}function UI(e,t,n){let r=t.parentNode;for(;r;){let o=n.getId(r);if(e.some(i=>i.id===o))return!0;r=r.parentNode}return!1}function mm(e,t){return e.size===0?!1:zm(e,t)}function zm(e,t){let{parentNode:n}=t;return n?e.has(n)?!0:zm(e,n):!1}var Wo;function BI(e){Wo=e}function HI(){Wo=void 0}var ne=e=>Wo?(...n)=>{try{return e(...n)}catch(r){if(Wo&&Wo(r)===!0)return()=>{};throw r}}:e,$r=[];function Ko(e){try{if("composedPath"in e){let 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 jm(e,t){let n=new ku;$r.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver,o=window?.Zone?.__symbol__?.("MutationObserver");o&&window[o]&&(r=window[o]);let i=new r(ne(s=>{e.onMutation&&e.onMutation(s)===!1||n.processMutations.bind(n)(s)}));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function $I({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};let o=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500,s=[],a,c=jo(ne(l=>{let f=Date.now()-a;e(s.map(p=>(p.timeOffset-=f,p)),l),s=[],a=null}),i),u=ne(jo(ne(l=>{let f=Ko(l),{clientX:p,clientY:h}=Ru(l)?l.changedTouches[0]:l;a||(a=Gs()),s.push({x:p,y:h,id:r.getId(f),timeOffset:Gs()-a}),c(typeof DragEvent<"u"&&l instanceof DragEvent?Y.Drag:l instanceof MouseEvent?Y.MouseMove:Y.TouchMove)}),o,{trailing:!1})),d=[et("mousemove",u,n),et("touchmove",u,n),et("drag",u,n)];return ne(()=>{d.forEach(l=>l())})}function WI({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,sampling:s}){if(s.mouseInteraction===!1)return()=>{};let a=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,c=[],u=null,d=l=>f=>{let p=Ko(f);if(_t(p,r,o,i,!0))return;let h=null,_=l;if("pointerType"in f){switch(f.pointerType){case"mouse":h=cn.Mouse;break;case"touch":h=cn.Touch;break;case"pen":h=cn.Pen;break}h===cn.Touch?Qe[l]===Qe.MouseDown?_="TouchStart":Qe[l]===Qe.MouseUp&&(_="TouchEnd"):cn.Pen}else Ru(f)&&(h=cn.Touch);h!==null?(u=h,(_.startsWith("Touch")&&h===cn.Touch||_.startsWith("Mouse")&&h===cn.Mouse)&&(h=null)):Qe[l]===Qe.Click&&(h=u,u=null);let S=Ru(f)?f.changedTouches[0]:f;if(!S)return;let y=n.getId(p),{clientX:I,clientY:W}=S;ne(e)(m({type:Qe[_],id:y,x:I,y:W},h!==null&&{pointerType:h}))};return Object.keys(Qe).filter(l=>Number.isNaN(Number(l))&&!l.endsWith("_Departed")&&a[l]!==!1).forEach(l=>{let f=Wr(l),p=d(l);if(window.PointerEvent)switch(Qe[l]){case Qe.MouseDown:case Qe.MouseUp:f=f.replace("mouse","pointer");break;case Qe.TouchStart:case Qe.TouchEnd:return}c.push(et(f,p,t))}),ne(()=>{c.forEach(l=>l())})}function qm({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,sampling:s}){let a=ne(jo(ne(c=>{let u=Ko(c);if(!u||_t(u,r,o,i,!0))return;let d=n.getId(u);if(u===t&&t.defaultView){let l=Dm(t.defaultView);e({id:d,x:l.left,y:l.top})}else e({id:d,x:u.scrollLeft,y:u.scrollTop})}),s.scroll||100));return et("scroll",a,t)}function GI({viewportResizeCb:e},{win:t}){let n=-1,r=-1,o=ne(jo(ne(()=>{let i=Pm(),s=Fm();(n!==i||r!==s)&&(e({width:Number(s),height:Number(i)}),n=i,r=s)}),200));return et("resize",o,t)}var zI=["INPUT","TEXTAREA","SELECT"],hm=new WeakMap;function jI({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,ignoreClass:s,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:d,userTriggeredOnInput:l,maskTextClass:f,unmaskTextClass:p,maskTextSelector:h,unmaskTextSelector:_}){function S(C){let P=Ko(C),w=C.isTrusted,A=P&&vu(P.tagName);if(A==="OPTION"&&(P=P.parentElement),!P||!A||zI.indexOf(A)<0||_t(P,r,o,i,!0))return;let G=P;if(G.classList.contains(s)||a&&G.matches(a))return;let R=Ku(P),F=$s(G,A,R),V=!1,H=Xs({maskInputOptions:c,tagName:A,type:R}),D=Gr(P,f,h,p,_,H);(R==="radio"||R==="checkbox")&&(V=P.checked),F=Go({isMasked:D,element:P,value:F,maskInputFn:u}),y(P,l?{text:F,isChecked:V,userTriggered:w}:{text:F,isChecked:V});let z=P.name;R==="radio"&&z&&V&&t.querySelectorAll(`input[type="radio"][name="${z}"]`).forEach(B=>{if(B!==P){let J=Go({isMasked:D,element:B,value:$s(B,A,R),maskInputFn:u});y(B,l?{text:J,isChecked:!V,userTriggered:!1}:{text:J,isChecked:!V})}})}function y(C,P){let w=hm.get(C);if(!w||w.text!==P.text||w.isChecked!==P.isChecked){hm.set(C,P);let A=n.getId(C);ne(e)(E(m({},P),{id:A}))}}let W=(d.input==="last"?["change"]:["input","change"]).map(C=>et(C,ne(S),t)),N=t.defaultView;if(!N)return()=>{W.forEach(C=>C())};let L=N.Object.getOwnPropertyDescriptor(N.HTMLInputElement.prototype,"value"),b=[[N.HTMLInputElement.prototype,"value"],[N.HTMLInputElement.prototype,"checked"],[N.HTMLSelectElement.prototype,"value"],[N.HTMLTextAreaElement.prototype,"value"],[N.HTMLSelectElement.prototype,"selectedIndex"],[N.HTMLOptionElement.prototype,"selected"]];return L&&L.set&&W.push(...b.map(C=>Lm(C[0],C[1],{set(){ne(S)({target:this,isTrusted:!1})}},!1,N))),ne(()=>{W.forEach(C=>C())})}function zs(e){let t=[];function n(r,o){if(Ls("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Ls("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Ls("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Ls("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){let s=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(s)}else if(r.parentStyleSheet){let s=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(s)}return o}return n(e,t)}function Cn(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function qI({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:ne((d,l,f)=>{let[p,h]=f,{id:_,styleId:S}=Cn(l,t,n.styleMirror);return(_&&_!==-1||S&&S!==-1)&&e({id:_,styleId:S,adds:[{rule:p,index:h}]}),d.apply(l,f)})});let i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:ne((d,l,f)=>{let[p]=f,{id:h,styleId:_}=Cn(l,t,n.styleMirror);return(h&&h!==-1||_&&_!==-1)&&e({id:h,styleId:_,removes:[{index:p}]}),d.apply(l,f)})});let s;r.CSSStyleSheet.prototype.replace&&(s=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:ne((d,l,f)=>{let[p]=f,{id:h,styleId:_}=Cn(l,t,n.styleMirror);return(h&&h!==-1||_&&_!==-1)&&e({id:h,styleId:_,replace:p}),d.apply(l,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:ne((d,l,f)=>{let[p]=f,{id:h,styleId:_}=Cn(l,t,n.styleMirror);return(h&&h!==-1||_&&_!==-1)&&e({id:h,styleId:_,replaceSync:p}),d.apply(l,f)})}));let c={};Ds("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Ds("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Ds("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Ds("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));let u={};return Object.entries(c).forEach(([d,l])=>{u[d]={insertRule:l.prototype.insertRule,deleteRule:l.prototype.deleteRule},l.prototype.insertRule=new Proxy(u[d].insertRule,{apply:ne((f,p,h)=>{let[_,S]=h,{id:y,styleId:I}=Cn(p.parentStyleSheet,t,n.styleMirror);return(y&&y!==-1||I&&I!==-1)&&e({id:y,styleId:I,adds:[{rule:_,index:[...zs(p),S||0]}]}),f.apply(p,h)})}),l.prototype.deleteRule=new Proxy(u[d].deleteRule,{apply:ne((f,p,h)=>{let[_]=h,{id:S,styleId:y}=Cn(p.parentStyleSheet,t,n.styleMirror);return(S&&S!==-1||y&&y!==-1)&&e({id:S,styleId:y,removes:[{index:[...zs(p),_]}]}),f.apply(p,h)})})}),ne(()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=i,s&&(r.CSSStyleSheet.prototype.replace=s),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([d,l])=>{l.prototype.insertRule=u[d].insertRule,l.prototype.deleteRule=u[d].deleteRule})})}function Vm({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);let o=n.nodeName==="#document"?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,i=o?.prototype?Object.getOwnPropertyDescriptor(o?.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!o||!i?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return i.get?.call(this)},set(s){let a=i.set?.call(this,s);if(r!==null&&r!==-1)try{t.adoptStyleSheets(s,r)}catch{}return a}}),ne(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function VI({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){let i=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:ne((a,c,u)=>{let[d,l,f]=u;if(n.has(d))return i.apply(c,[d,l,f]);let{id:p,styleId:h}=Cn(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(p&&p!==-1||h&&h!==-1)&&e({id:p,styleId:h,set:{property:d,value:l,priority:f},index:zs(c.parentRule)}),a.apply(c,u)})});let s=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:ne((a,c,u)=>{let[d]=u;if(n.has(d))return s.apply(c,[d]);let{id:l,styleId:f}=Cn(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(l&&l!==-1||f&&f!==-1)&&e({id:l,styleId:f,remove:{property:d},index:zs(c.parentRule)}),a.apply(c,u)})}),ne(()=>{o.CSSStyleDeclaration.prototype.setProperty=i,o.CSSStyleDeclaration.prototype.removeProperty=s})}function YI({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:o,sampling:i,doc:s}){let a=ne(u=>jo(ne(d=>{let l=Ko(d);if(!l||_t(l,t,n,r,!0))return;let{currentTime:f,volume:p,muted:h,playbackRate:_}=l;e({type:u,id:o.getId(l),currentTime:f,volume:p,muted:h,playbackRate:_})}),i.media||500)),c=[et("play",a(Fr.Play),s),et("pause",a(Fr.Pause),s),et("seeked",a(Fr.Seeked),s),et("volumechange",a(Fr.VolumeChange),s),et("ratechange",a(Fr.RateChange),s)];return ne(()=>{c.forEach(u=>u())})}function JI({fontCb:e,doc:t}){let n=t.defaultView;if(!n)return()=>{};let r=[],o=new WeakMap,i=n.FontFace;n.FontFace=function(c,u,d){let l=new i(c,u,d);return o.set(l,{family:c,buffer:typeof u!="string",descriptors:d,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),l};let s=Zu(t.fonts,"add",function(a){return function(c){return Qs(ne(()=>{let u=o.get(c);u&&(e(u),o.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=i}),r.push(s),ne(()=>{r.forEach(a=>a())})}function KI(e){let{doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,selectionCb:s}=e,a=!0,c=ne(()=>{let u=t.getSelection();if(!u||a&&u?.isCollapsed)return;a=u.isCollapsed||!1;let d=[],l=u.rangeCount||0;for(let f=0;f<l;f++){let p=u.getRangeAt(f),{startContainer:h,startOffset:_,endContainer:S,endOffset:y}=p;_t(h,r,o,i,!0)||_t(S,r,o,i,!0)||d.push({start:n.getId(h),startOffset:_,end:n.getId(S),endOffset:y})}s({ranges:d})});return c(),et("selectionchange",c)}function XI({doc:e,customElementCb:t}){let n=e.defaultView;return!n||!n.customElements?()=>{}:Zu(n.customElements,"define",function(o){return function(i,s,a){try{t({define:{name:i}})}catch{}return o.apply(this,[i,s,a])}})}function ZI(e,t={}){let n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=jm(e,e.doc));let o=$I(e),i=WI(e),s=qm(e),a=GI(e,{win:n}),c=jI(e),u=YI(e),d=()=>{},l=()=>{},f=()=>{},p=()=>{};e.recordDOM&&(d=qI(e,{win:n}),l=Vm(e,e.doc),f=VI(e,{win:n}),e.collectFonts&&(p=JI(e)));let h=KI(e),_=XI(e),S=[];for(let y of e.plugins)S.push(y.observer(y.callback,n,y.options));return ne(()=>{$r.forEach(y=>y.reset()),r?.disconnect(),o(),i(),s(),a(),c(),u(),d(),l(),f(),p(),h(),_(),S.forEach(y=>y())})}function Ls(e){return typeof window[e]<"u"}function Ds(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var qo=class{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,o){let i=r||this.getIdToRemoteIdMap(t),s=o||this.getRemoteIdToIdMap(t),a=i.get(n);return a||(a=this.generateIdFn(),i.set(n,a),s.set(a,n)),a}getIds(t,n){let r=this.getIdToRemoteIdMap(t),o=this.getRemoteIdToIdMap(t);return n.map(i=>this.getId(t,i,r,o))}getRemoteId(t,n,r){let o=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;let i=o.get(n);return i||-1}getRemoteIds(t,n){let r=this.getRemoteIdToIdMap(t);return n.map(o=>this.getRemoteId(t,o,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}},Mu=class{constructor(){this.crossOriginIframeMirror=new qo(Xu),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}},Ou=class{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new qo(Xu),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new qo(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}),this.recordCrossOriginIframes&&t.contentWindow?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(t);let r=el(t);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(t){let n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;let o=this.crossOriginIframeMap.get(t.source);if(!o)return;let i=this.transformCrossOriginEvent(o,n.data.event);i&&this.wrappedEmit(i,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case X.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);let r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:X.IncrementalSnapshot,data:{source:Y.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case X.Meta:case X.Load:case X.DomContentLoaded:return!1;case X.Plugin:return n;case X.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case X.IncrementalSnapshot:switch(n.data.source){case Y.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);let o=this.crossOriginIframeRootIdMap.get(t);o&&this.patchRootIdOnNode(r.node,o)}),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 Y.Drag:case Y.TouchMove:case Y.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case Y.ViewportResize:return!1;case Y.MediaInteraction:case Y.MouseInteraction:case Y.Scroll:case Y.CanvasMutation:case Y.Input:return this.replaceIds(n.data,t,["id"]),n;case Y.StyleSheetRule:case Y.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case Y.Font:return n;case Y.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case Y.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),n.data.styles?.forEach(r=>{this.replaceStyleIds(r,t,["styleId"])}),n}}return!1}replace(t,n,r,o){for(let i of o)!Array.isArray(n[i])&&typeof n[i]!="number"||(Array.isArray(n[i])?n[i]=t.getIds(r,n[i]):n[i]=t.getId(r,n[i]));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)})}},Lu=class{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}},Du=class{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(!$o(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);let r=jm(E(m({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(qm(E(m({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),Qs(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(Vm({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){let n=el(t),r=FI(t);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(t,n){let r=this;this.restoreHandlers.push(Zu(t.prototype,"attachShadow",function(o){return function(i){let s=o.call(this,i);return this.shadowRoot&&Gm(this)&&r.addShadowRoot(this.shadowRoot,n),s}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}},gm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",QI=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(Uo=0;Uo<gm.length;Uo++)QI[gm.charCodeAt(Uo)]=Uo;var Uo,js=class{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}},Pu=class{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new Cu,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;let r={id:n,styleIds:[]},o=[];for(let i of t){let s;this.styleMirror.has(i)?s=this.styleMirror.getId(i):(s=this.styleMirror.add(i),o.push({styleId:s,rules:Array.from(i.rules||CSSRule,(a,c)=>({rule:Rm(a),index:c}))})),r.styleIds.push(s)}o.length>0&&(r.styles=o),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}},Fu=class{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,n){let r=this.nodeMap.get(t);return r&&Array.from(r).some(o=>o!==n)}add(t,n){this.active||(this.active=!0,DI(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}},Te,qs;try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var $t=cI();function un(e={}){let{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:i=null,unblockSelector:s=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:d="rr-mask",unmaskTextClass:l=null,maskTextSelector:f=null,unmaskTextSelector:p=null,inlineStylesheet:h=!0,maskAllInputs:_,maskInputOptions:S,slimDOMOptions:y,maskAttributeFn:I,maskInputFn:W,maskTextFn:N,maxCanvasSize:L=null,packFn:b,sampling:C={},dataURLOptions:P={},mousemoveWait:w,recordDOM:A=!0,recordCanvas:G=!1,recordCrossOriginIframes:R=!1,recordAfter:F=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:V=!1,collectFonts:H=!1,inlineImages:D=!1,plugins:z,keepIframeSrcFn:B=()=>!1,ignoreCSSAttributes:J=new Set([]),errorHandler:Z,onMutation:_e,getCanvasManager:St}=e;BI(Z);let Ae=R?window.parent===window:!0,Re=!1;if(!Ae)try{window.parent.document&&(Re=!1)}catch{Re=!0}if(Ae&&!t)throw new Error("emit function is required");if(!Ae&&!Re)return()=>{};w!==void 0&&C.mousemove===void 0&&(C.mousemove=w),$t.reset();let ct=_===!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}:S!==void 0?S:{},Zt=y===!0||y==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:y==="all",headMetaDescKeywords:y==="all"}:y||{};MI();let or,ir=0,Jr=ie=>{for(let Nt of z||[])Nt.eventProcessor&&(ie=Nt.eventProcessor(ie));return b&&!Re&&(ie=b(ie)),ie};Te=(ie,Nt)=>{let ee=ie;if(ee.timestamp=Gs(),$r[0]?.isFrozen()&&ee.type!==X.FullSnapshot&&!(ee.type===X.IncrementalSnapshot&&ee.data.source===Y.Mutation)&&$r.forEach(qe=>qe.unfreeze()),Ae)t?.(Jr(ee),Nt);else if(Re){let qe={type:"rrweb",event:Jr(ee),origin:window.location.origin,isCheckout:Nt};window.parent.postMessage(qe,"*")}if(ee.type===X.FullSnapshot)or=ee,ir=0;else if(ee.type===X.IncrementalSnapshot){if(ee.data.source===Y.Mutation&&ee.data.isAttachIframe)return;ir++;let qe=r&&ir>=r,ae=n&&or&&ee.timestamp-or.timestamp>n;(qe||ae)&&da(!0)}};let ln=ie=>{Te({type:X.IncrementalSnapshot,data:m({source:Y.Mutation},ie)})},Se=ie=>Te({type:X.IncrementalSnapshot,data:m({source:Y.Scroll},ie)}),De=ie=>Te({type:X.IncrementalSnapshot,data:m({source:Y.CanvasMutation},ie)}),Wt=ie=>Te({type:X.IncrementalSnapshot,data:m({source:Y.AdoptedStyleSheet},ie)}),Ie=new Pu({mutationCb:ln,adoptedStyleSheetCb:Wt}),ke=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new Mu:new Ou({mirror:$t,mutationCb:ln,stylesheetManager:Ie,recordCrossOriginIframes:R,wrappedEmit:Te});for(let ie of z||[])ie.getMirror&&ie.getMirror({nodeMirror:$t,crossOriginIframeMirror:ke.crossOriginIframeMirror,crossOriginIframeStyleMirror:ke.crossOriginIframeStyleMirror});let Gt=new Fu,Nn=tv(St,{mirror:$t,win:window,mutationCb:ie=>Te({type:X.IncrementalSnapshot,data:m({source:Y.CanvasMutation},ie)}),recordCanvas:G,blockClass:o,blockSelector:i,unblockSelector:s,maxCanvasSize:L,sampling:C.canvas,dataURLOptions:P,errorHandler:Z}),sr=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Lu:new Du({mutationCb:ln,scrollCb:Se,bypassOptions:{onMutation:_e,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:ct,dataURLOptions:P,maskAttributeFn:I,maskTextFn:N,maskInputFn:W,recordCanvas:G,inlineImages:D,sampling:C,slimDOMOptions:Zt,iframeManager:ke,stylesheetManager:Ie,canvasManager:Nn,keepIframeSrcFn:B,processedNodeManager:Gt},mirror:$t}),da=(ie=!1)=>{if(!A)return;Te({type:X.Meta,data:{href:window.location.href,width:Fm(),height:Pm()}},ie),Ie.reset(),sr.init(),$r.forEach(ee=>ee.lock());let Nt=kI(document,{mirror:$t,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:h,maskAllInputs:ct,maskAttributeFn:I,maskInputFn:W,maskTextFn:N,slimDOM:Zt,dataURLOptions:P,recordCanvas:G,inlineImages:D,onSerialize:ee=>{Hm(ee,$t)&&ke.addIframe(ee),$m(ee,$t)&&Ie.trackLinkElement(ee),xu(ee)&&sr.addShadowRoot(ee.shadowRoot,document)},onIframeLoad:(ee,qe)=>{ke.attachIframe(ee,qe),ee.contentWindow&&Nn.addWindow(ee.contentWindow),sr.observeAttachShadow(ee)},onStylesheetLoad:(ee,qe)=>{Ie.attachLinkElement(ee,qe)},keepIframeSrcFn:B});if(!Nt)return console.warn("Failed to snapshot the document");Te({type:X.FullSnapshot,data:{node:Nt,initialOffset:Dm(window)}}),$r.forEach(ee=>ee.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Ie.adoptStyleSheets(document.adoptedStyleSheets,$t.getId(document))};qs=da;try{let ie=[],Nt=qe=>ne(ZI)({onMutation:_e,mutationCb:ln,mousemoveCb:(ae,fa)=>Te({type:X.IncrementalSnapshot,data:{source:fa,positions:ae}}),mouseInteractionCb:ae=>Te({type:X.IncrementalSnapshot,data:m({source:Y.MouseInteraction},ae)}),scrollCb:Se,viewportResizeCb:ae=>Te({type:X.IncrementalSnapshot,data:m({source:Y.ViewportResize},ae)}),inputCb:ae=>Te({type:X.IncrementalSnapshot,data:m({source:Y.Input},ae)}),mediaInteractionCb:ae=>Te({type:X.IncrementalSnapshot,data:m({source:Y.MediaInteraction},ae)}),styleSheetRuleCb:ae=>Te({type:X.IncrementalSnapshot,data:m({source:Y.StyleSheetRule},ae)}),styleDeclarationCb:ae=>Te({type:X.IncrementalSnapshot,data:m({source:Y.StyleDeclaration},ae)}),canvasMutationCb:De,fontCb:ae=>Te({type:X.IncrementalSnapshot,data:m({source:Y.Font},ae)}),selectionCb:ae=>{Te({type:X.IncrementalSnapshot,data:m({source:Y.Selection},ae)})},customElementCb:ae=>{Te({type:X.IncrementalSnapshot,data:m({source:Y.CustomElement},ae)})},blockClass:o,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:p,maskInputOptions:ct,inlineStylesheet:h,sampling:C,recordDOM:A,recordCanvas:G,inlineImages:D,userTriggeredOnInput:V,collectFonts:H,doc:qe,maskAttributeFn:I,maskInputFn:W,maskTextFn:N,keepIframeSrcFn:B,blockSelector:i,unblockSelector:s,slimDOMOptions:Zt,dataURLOptions:P,mirror:$t,iframeManager:ke,stylesheetManager:Ie,shadowDomManager:sr,processedNodeManager:Gt,canvasManager:Nn,ignoreCSSAttributes:J,plugins:z?.filter(ae=>ae.observer)?.map(ae=>({observer:ae.observer,options:ae.options,callback:fa=>Te({type:X.Plugin,data:{plugin:ae.name,payload:fa}})}))||[]},{});ke.addLoadListener(qe=>{try{ie.push(Nt(qe.contentDocument))}catch(ae){console.warn(ae)}});let ee=()=>{da(),ie.push(Nt(document))};return document.readyState==="interactive"||document.readyState==="complete"?ee():(ie.push(et("DOMContentLoaded",()=>{Te({type:X.DomContentLoaded,data:{}}),F==="DOMContentLoaded"&&ee()})),ie.push(et("load",()=>{Te({type:X.Load,data:{}}),F==="load"&&ee()},window))),()=>{ie.forEach(qe=>qe()),Gt.destroy(),qs=void 0,HI()}}catch(ie){console.warn(ie)}}function ev(e){if(!qs)throw new Error("please take full snapshot after start recording");qs(e)}un.mirror=$t;un.takeFullSnapshot=ev;function tv(e,t){try{return e?e(t):new js}catch{return console.warn("Unable to initialize CanvasManager"),new js}}var _m;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(_m||(_m={}));var nv=3,rv=5;function tl(e){return e>9999999999?e:e*1e3}function bu(e){return e>9999999999?e/1e3:e}function Xo(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:X.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Ne(t,10,1e3)}}),t.category==="console")))}var ov="button,a";function Ym(e){return e.closest(ov)||e}function Jm(e){let t=Km(e);return!t||!(t instanceof Element)?t:Ym(t)}function Km(e){return iv(e)?e.target:e}function iv(e){return typeof e=="object"&&!!e&&"target"in e}var An;function sv(e){return An||(An=[],av()),An.push(e),()=>{let t=An?An.indexOf(e):-1;t>-1&&An.splice(t,1)}}function av(){Ee(me,"open",function(e){return function(...t){if(An)try{An.forEach(n=>n())}catch{}return e.apply(me,t)}})}var cv=new Set([Y.Mutation,Y.StyleSheetRule,Y.StyleDeclaration,Y.AdoptedStyleSheet,Y.CanvasMutation,Y.Selection,Y.MediaInteraction]);function uv(e,t,n){e.handleClick(t,n)}var Uu=class{constructor(t,n,r=Xo){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scrollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){let t=sv(()=>{this._lastMutation=Sm()});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(dv(n,this._ignoreSelector)||!fv(t))return;let r={timestamp:bu(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(o=>o.node===r.node&&Math.abs(o.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=bu(t)}registerScroll(t=Date.now()){this._lastScroll=bu(t)}registerClick(t){let n=Ym(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){let t=[],n=Sm();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(let r of t){let o=this._clicks.indexOf(r);o>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(o,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){let n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,o=t.mutationAfter&&t.mutationAfter<=this._threshold,i=!r&&!o,{clickCount:s,clickBreadcrumb:a}=t;if(i){let c=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=c<this._timeout*1e3?"mutation":"timeout",d={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:E(m({},a.data),{url:me.location.href,route:n.getCurrentRoute(),timeAfterClickMs:c,endReason:u,clickCount:s||1})};this._addBreadcrumbEvent(n,d);return}if(s>1){let c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:E(m({},a.data),{url:me.location.href,route:n.getCurrentRoute(),clickCount:s,metric:!0})};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=Zn(()=>this._checkClicks(),1e3)}},lv=["A","BUTTON","INPUT"];function dv(e,t){return!!(!lv.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 fv(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function Sm(){return Date.now()/1e3}function pv(e,t){try{if(!mv(t))return;let{source:n}=t.data;if(cv.has(n)&&e.registerMutation(t.timestamp),n===Y.Scroll&&e.registerScroll(t.timestamp),hv(t)){let{type:r,id:o}=t.data,i=un.mirror.getNode(o);i instanceof HTMLElement&&r===Qe.Click&&e.registerClick(i)}}catch{}}function mv(e){return e.type===nv}function hv(e){return e.data.source===Y.MouseInteraction}function Kt(e){return m({timestamp:Date.now()/1e3,type:"default"},e)}var nl=(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",e))(nl||{}),gv=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function _v(e){let t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(let n in e)if(gv.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}var Sv=e=>t=>{if(!e.isEnabled())return;let n=yv(t);if(!n)return;let r=t.name==="click",o=r?t.event:void 0;r&&e.clickDetector&&o?.target&&!o.altKey&&!o.metaKey&&!o.ctrlKey&&!o.shiftKey&&uv(e.clickDetector,n,Jm(t.event)),Xo(e,n)};function Xm(e,t){let n=un.mirror.getId(e),r=n&&un.mirror.getNode(n),o=r&&un.mirror.getMeta(r),i=o&&bv(o)?o:null;return{message:t,data:i?{nodeId:n,node:{id:n,tagName:i.tagName,textContent:Array.from(i.childNodes).map(s=>s.type===nl.Text&&s.textContent).filter(Boolean).map(s=>s.trim()).join(""),attributes:_v(i.attributes)}}:{}}}function yv(e){let{target:t,message:n}=Ev(e);return Kt(m({category:`ui.${e.name}`},Xm(t,n)))}function Ev(e){let t=e.name==="click",n,r=null;try{r=t?Jm(e.event):Km(e.event),n=Ce(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function bv(e){return e.type===nl.Element}function Tv(e,t){if(!e.isEnabled())return;e.updateUserActivity();let n=Iv(t);n&&Xo(e,n)}function Iv(e){let{metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:i,target:s}=e;if(!s||vv(s)||!i)return null;let a=t||r||o,c=i.length===1;if(!a&&c)return null;let u=Ce(s,{maxStringLength:200})||"<unknown>",d=Xm(s,u);return Kt({category:"ui.keyDown",message:u,data:E(m({},d.data),{metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:i})})}function vv(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}var wv={resource:kv,paint:Cv,navigation:Av};function Ps(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function Rv(e){return e.map(xv).filter(Boolean)}function xv(e){let t=wv[e.entryType];return t?t(e):null}function zr(e){return((fe()||me.performance.timeOrigin)+e)/1e3}function Cv(e){let{duration:t,entryType:n,name:r,startTime:o}=e,i=zr(o);return{type:n,name:r,start:i,end:i+t,data:void 0}}function Av(e){let{entryType:t,name:n,decodedBodySize:r,duration:o,domComplete:i,encodedBodySize:s,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:d,loadEventEnd:l,redirectCount:f,startTime:p,transferSize:h,type:_}=e;return o===0?null:{type:`${t}.${_}`,start:zr(p),end:zr(i),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:s,duration:o,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:d,loadEventEnd:l,domComplete:i,redirectCount:f}}}function kv(e){let{entryType:t,initiatorType:n,name:r,responseEnd:o,startTime:i,decodedBodySize:s,encodedBodySize:a,responseStatus:c,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:zr(i),end:zr(o),name:r,data:{size:u,statusCode:c,decodedBodySize:s,encodedBodySize:a}}}function Nv(e){let t=e.entries[e.entries.length-1],n=t?.element?[t.element]:void 0;return ea(e,"largest-contentful-paint",n)}function Mv(e){return e.sources!==void 0}function Ov(e){let t=[],n=[];for(let r of e.entries)if(Mv(r)){let o=[];for(let i of r.sources)if(i.node){n.push(i.node);let s=un.mirror.getId(i.node);s&&o.push(s)}t.push({value:r.value,nodeIds:o.length?o:void 0})}return ea(e,"cumulative-layout-shift",n,t)}function Lv(e){let t=e.entries[e.entries.length-1],n=t?.target?[t.target]:void 0;return ea(e,"first-input-delay",n)}function Dv(e){let t=e.entries[e.entries.length-1],n=t?.target?[t.target]:void 0;return ea(e,"interaction-to-next-paint",n)}function ea(e,t,n,r){let o=e.value,i=e.rating,s=zr(o);return{type:"web-vital",name:t,start:s,end:s,data:{value:o,size:o,rating:i,nodeIds:n?n.map(a=>un.mirror.getId(a)):void 0,attributions:r}}}function Pv(e){function t(o){e.performanceEntries.includes(o)||e.performanceEntries.push(o)}function n({entries:o}){o.forEach(t)}let r=[];return["navigation","paint","resource"].forEach(o=>{r.push(gt(o,n))}),r.push(Kn(Ps(Nv,e)),Jn(Ps(Ov,e)),Mo(Ps(Lv,e)),Oo(Ps(Dv,e))),()=>{r.forEach(o=>o())}}var j=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Fv='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]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(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,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(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},_=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},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=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:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,n){return p[n.s]-p[t.s]||t.f-n.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(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,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}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 s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),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=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+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(U,C,0),R=U;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[s[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=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(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;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=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,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];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}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[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=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),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(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[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-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=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(L(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 s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),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(s),32768),this.s.z=n.length-s+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.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=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}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return 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&&O(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)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(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=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=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 B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[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 Uv(){let e=new Blob([Fv]);return URL.createObjectURL(e)}var ym=["log","warn","error"],Us="[Replay] ";function Tu(e,t="info"){it({category:"console",data:{logger:"replay"},level:t,message:`${Us}${e}`},{level:t})}function Bv(){let e=!1,t=!1,n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return j?(ym.forEach(r=>{n[r]=(...o)=>{g[r](Us,...o),t&&Tu(o.join(""),Gn(r))}}),n.exception=(r,...o)=>{o.length&&n.error&&n.error(...o),g.error(Us,r),e?wt(r):t&&Tu(r,"error")},n.infoTick=(...r)=>{g.log(Us,...r),t&&setTimeout(()=>Tu(r[0]),0)}):ym.forEach(r=>{n[r]=()=>{}}),n}var q=Bv(),Vo=class extends Error{constructor(){super(`Event buffer exceeded maximum size of ${Ju}.`)}},Vs=class{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){let n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>Ju)throw new Vo;this.events.push(t)}finish(){return new Promise(t=>{let n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let t=this.events.map(n=>n.timestamp).sort()[0];return t?tl(t):null}},Bu=class{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(){j&&q.log("Destroying compression worker"),this._worker.terminate()}postMessage(t,n){let r=this._getAndIncrementId();return new Promise((o,i)=>{let s=({data:a})=>{let c=a;if(c.method===t&&c.id===r){if(this._worker.removeEventListener("message",s),!c.success){j&&q.error("Error in compression worker: ",c.response),i(new Error("Error in compression worker"));return}o(c.response)}};this._worker.addEventListener("message",s),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}},Hu=class{constructor(t){this._worker=new Bu(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){let n=tl(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);let r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>Ju?Promise.reject(new Vo):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{j&&q.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){let t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}},$u=class{constructor(t){this._fallback=new Vs,this._compression=new Hu(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}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}set waitForCheckout(t){this._used.waitForCheckout=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){j&&q.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){let{events:t,hasCheckout:n,waitForCheckout:r}=this._fallback,o=[];for(let i of t)o.push(this._compression.addEvent(i));this._compression.hasCheckout=n,this._compression.waitForCheckout=r,this._used=this._compression;try{await Promise.all(o),this._fallback.clear()}catch(i){j&&q.exception(i,"Failed to add events when switching buffers.")}}};function Hv({useCompression:e,workerUrl:t}){if(e&&window.Worker){let n=$v(t);if(n)return n}return j&&q.log("Using simple buffer"),new Vs}function $v(e){try{let t=e||Wv();if(!t)return;j&&q.log(`Using compression worker${e?` from ${e}`:""}`);let n=new Worker(t);return new $u(n)}catch(t){j&&q.exception(t,"Failed to create compression worker")}}function Wv(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?Uv():""}function rl(){try{return"sessionStorage"in me&&!!me.sessionStorage}catch{return!1}}function Gv(e){zv(),e.session=void 0}function zv(){if(rl())try{me.sessionStorage.removeItem(Vu)}catch{}}function Zm(e){return e===void 0?!1:Math.random()<e}function ol(e){if(rl())try{me.sessionStorage.setItem(Vu,JSON.stringify(e))}catch{}}function Qm(e){let t=Date.now(),n=e.id||ge(),r=e.started||t,o=e.lastActivity||t,i=e.segmentId||0,s=e.sampled,a=e.previousSessionId;return{id:n,started:r,lastActivity:o,segmentId:i,sampled:s,previousSessionId:a}}function jv(e,t){return Zm(e)?"session":t?"buffer":!1}function Em({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){let o=jv(e,t),i=Qm({sampled:o,previousSessionId:r});return n&&ol(i),i}function qv(){if(!rl())return null;try{let e=me.sessionStorage.getItem(Vu);if(!e)return null;let t=JSON.parse(e);return j&&q.infoTick("Loading existing session"),Qm(t)}catch{return null}}function Wu(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function eh(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Wu(e.started,t,r)||Wu(e.lastActivity,n,r)}function th(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!eh(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Iu({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){let o=r.stickySession&&qv();return o?th(o,{sessionIdleExpire:e,maxReplayDuration:t})?(j&&q.infoTick("Session in sessionStorage is expired, creating new one..."),Em(r,{previousSessionId:o.id})):o:(j&&q.infoTick("Creating new session"),Em(r,{previousSessionId:n}))}function Vv(e){return e.type===X.Custom}function il(e,t,n){return rh(e,t)?(nh(e,t,n),!0):!1}function Yv(e,t,n){return rh(e,t)?nh(e,t,n):Promise.resolve(null)}async function nh(e,t,n){let{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;let o=e.recordingMode==="buffer";try{n&&o&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);let i=e.getOptions(),s=Jv(t,i.beforeAddRecordingEvent);return s?await r.addEvent(s):void 0}catch(i){let s=i&&i instanceof Vo,a=s?"addEventSizeExceeded":"addEvent";if(s&&o)return r.clear(),r.waitForCheckout=!0,null;e.handleException(i),await e.stop({reason:a});let c=v();c&&c.recordDroppedEvent("internal_sdk_error","replay")}}function rh(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;let n=tl(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(j&&q.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function Jv(e,t){try{if(typeof t=="function"&&Vv(e))return t(e)}catch(n){return j&&q.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function sl(e){return!e.type}function Gu(e){return e.type==="transaction"}function Kv(e){return e.type==="replay_event"}function bm(e){return e.type==="feedback"}function Xv(e){return(t,n)=>{if(!e.isEnabled()||!sl(t)&&!Gu(t))return;let r=n?.statusCode;if(!(!r||r<200||r>=300)){if(Gu(t)){Zv(e,t);return}Qv(e,t)}}}function Zv(e,t){let n=e.getContext();t.contexts?.trace?.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function Qv(e,t){let 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;let{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||Zn(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(o){e.handleException(o)}})}function e0(e){return t=>{!e.isEnabled()||!sl(t)||t0(e,t)}}function t0(e,t){let n=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))){let r=Kt({category:"replay.hydrate-error",data:{url:Ye()}});Xo(e,r)}}function n0(e){let t=v();t&&t.on("beforeAddBreadcrumb",n=>r0(e,n))}function r0(e,t){if(!e.isEnabled()||!oh(t))return;let n=o0(t);n&&Xo(e,n)}function o0(e){return!oh(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?i0(e):Kt(e)}function i0(e){let t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return Kt(e);let n=!1,r=t.map(o=>{if(!o)return o;if(typeof o=="string")return o.length>Os?(n=!0,`${o.slice(0,Os)}\u2026`):o;if(typeof o=="object")try{let i=Ne(o,7);return JSON.stringify(i).length>Os?(n=!0,`${JSON.stringify(i,null,2).slice(0,Os)}\u2026`):i}catch{}return o});return Kt(E(m({},e),{data:m(E(m({},e.data),{arguments:r}),n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{})}))}function oh(e){return!!e.category}function s0(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function ih(){let e=M().getPropagationContext().dsc;e&&delete e.replay_id;let t=te();if(t){let n=we(t);delete n.replay_id}}function a0(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:X.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 c0(e,t){return e.recordingMode!=="buffer"||t.message===Yu||!t.exception||t.type?!1:Zm(e.getOptions().errorSampleRate)}function u0(e){return Object.assign((t,n)=>!e.isEnabled()||e.isPaused()?t:Kv(t)?(delete t.breadcrumbs,t):!sl(t)&&!Gu(t)&&!bm(t)?t:e.checkAndHandleExpiredSession()?bm(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),a0(e,t),t):s0(t,n)&&!e.getOptions()._experiments.captureExceptions?(j&&q.log("Ignoring error from rrweb internals",t),null):((c0(e,t)||e.recordingMode==="session")&&(t.tags=E(m({},t.tags),{replayId:e.getSessionId()})),t):(ih(),t),{id:"Replay"})}function ta(e,t){return t.map(({type:n,start:r,end:o,name:i,data:s})=>{let a=e.throttledAddEvent({type:X.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:i,startTimestamp:r,endTimestamp:o,data:s}}});return typeof a=="string"?Promise.resolve(null):a})}function l0(e){let{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function d0(e){return t=>{if(!e.isEnabled())return;let n=l0(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(ta(e,[n]),!1)))}}function f0(e,t){return j&&e.getOptions()._experiments.traceInternals?!1:So(t,v())}function sh(e,t){e.isEnabled()&&t!==null&&(f0(e,t.name)||e.addUpdate(()=>(ta(e,[t]),!0)))}function na(e){if(!e)return;let 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){let n=ks(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function ah(e){if(!e)return;let t=parseInt(e,10);return isNaN(t)?void 0:t}function Ys(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};let n=m({},e._meta),r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function ch(e,t){if(!t)return null;let{startTimestamp:n,endTimestamp:r,url:o,method:i,statusCode:s,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:o,data:{method:i,statusCode:s,request:a,response:c}}}function Yo(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function kn(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};let r={headers:e,size:t},{body:o,warnings:i}=p0(n);return r.body=o,i?.length&&(r._meta={warnings:i}),r}function zu(e,t){return Object.entries(e).reduce((n,[r,o])=>{let i=r.toLowerCase();return t.includes(i)&&e[r]&&(n[i]=o),n},{})}function p0(e){if(!e||typeof e!="string")return{body:e};let t=e.length>nm,n=m0(e);if(t){let r=e.slice(0,nm);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}\u2026`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function m0(e){let t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function Js(e,t){let n=h0(e);return Pe(n,t)}function h0(e,t=me.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(me.location.origin))return e;let n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;let r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function g0(e,t,n){try{let r=await S0(e,t,n),o=ch("resource.fetch",r);sh(n.replay,o)}catch(r){j&&q.exception(r,"Failed to capture fetch breadcrumb")}}function _0(e,t){let{input:n,response:r}=t,o=n?Or(n):void 0,i=na(o),s=r?ah(r.headers.get("content-length")):void 0;i!==void 0&&(e.data.request_body_size=i),s!==void 0&&(e.data.response_body_size=s)}async function S0(e,t,n){let r=Date.now(),{startTimestamp:o=r,endTimestamp:i=r}=t,{url:s,method:a,status_code:c=0,request_body_size:u,response_body_size:d}=e.data,l=Js(s,n.networkDetailAllowUrls)&&!Js(s,n.networkDetailDenyUrls),f=l?y0(n,t.input,u):Yo(u),p=await E0(l,n,t.response,d);return{startTimestamp:o,endTimestamp:i,url:s,method:a,statusCode:c,request:f,response:p}}function y0({networkCaptureBodies:e,networkRequestHeaders:t},n,r){let o=n?I0(n,t):{};if(!e)return kn(o,r,void 0);let i=Or(n),[s,a]=er(i,q),c=kn(o,r,s);return a?Ys(c,a):c}async function E0(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,o){if(!e&&o!==void 0)return Yo(o);let i=r?uh(r.headers,n):{};if(!r||!t&&o!==void 0)return kn(i,o,void 0);let[s,a]=await T0(r),c=b0(s,{networkCaptureBodies:t,responseBodySize:o,captureDetails:e,headers:i});return a?Ys(c,a):c}function b0(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:o}){try{let i=e?.length&&n===void 0?na(e):n;return r?t?kn(o,i,e):kn(o,i,void 0):Yo(i)}catch(i){return j&&q.exception(i,"Failed to serialize response body"),kn(o,n,void 0)}}async function T0(e){let t=v0(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await w0(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(j&&q.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(j&&q.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function uh(e,t){let n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function I0(e,t){return e.length===1&&typeof e[0]!="string"?Tm(e[0],t):e.length===2?Tm(e[1],t):{}}function Tm(e,t){if(!e)return{};let n=e.headers;return n?n instanceof Headers?uh(n,t):Array.isArray(n)?{}:zu(n,t):{}}function v0(e){try{return e.clone()}catch(t){j&&q.exception(t,"Failed to clone response body")}}function w0(e){return new Promise((t,n)=>{let r=Zn(()=>n(new Error("Timeout while trying to read response body")),500);R0(e).then(o=>t(o),o=>n(o)).finally(()=>clearTimeout(r))})}async function R0(e){return await e.text()}async function x0(e,t,n){try{let r=A0(e,t,n),o=ch("resource.xhr",r);sh(n.replay,o)}catch(r){j&&q.exception(r,"Failed to capture xhr breadcrumb")}}function C0(e,t){let{xhr:n,input:r}=t;if(!n)return;let o=na(r),i=n.getResponseHeader("content-length")?ah(n.getResponseHeader("content-length")):O0(n.response,n.responseType);o!==void 0&&(e.data.request_body_size=o),i!==void 0&&(e.data.response_body_size=i)}function A0(e,t,n){let r=Date.now(),{startTimestamp:o=r,endTimestamp:i=r,input:s,xhr:a}=t,{url:c,method:u,status_code:d=0,request_body_size:l,response_body_size:f}=e.data;if(!c)return null;if(!a||!Js(c,n.networkDetailAllowUrls)||Js(c,n.networkDetailDenyUrls)){let b=Yo(l),C=Yo(f);return{startTimestamp:o,endTimestamp:i,url:c,method:u,statusCode:d,request:b,response:C}}let p=a[Ze],h=p?zu(p.request_headers,n.networkRequestHeaders):{},_=zu(k0(a),n.networkResponseHeaders),[S,y]=n.networkCaptureBodies?er(s,q):[void 0],[I,W]=n.networkCaptureBodies?N0(a):[void 0],N=kn(h,l,S),L=kn(_,f,I);return{startTimestamp:o,endTimestamp:i,url:c,method:u,statusCode:d,request:y?Ys(N,y):N,response:W?Ys(L,W):L}}function k0(e){let t=e.getAllResponseHeaders();return t?t.split(`\r
|
|
495
|
-
`).reduce((n,r)=>{let[o,i]=r.split(": ");return i&&(n[o.toLowerCase()]=i),n},{}):{}}function N0(e){let t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return M0(e.response,e.responseType)}catch(n){t.push(n)}return j&&q.warn("Failed to get xhr response body",...t),[void 0]}function M0(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 j&&q.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return j&&q.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function O0(e,t){try{let n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return na(n)}catch{return}}function L0(e){let t=v();try{let{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:i,networkResponseHeaders:s}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:i,networkResponseHeaders:s};t&&t.on("beforeAddBreadcrumb",(c,u)=>D0(a,c,u))}catch{}}function D0(e,t,n){if(t.data)try{P0(t)&&U0(n)&&(C0(t,n),x0(t,n,e)),F0(t)&&B0(n)&&(_0(t,n),g0(t,n,e))}catch(r){j&&q.exception(r,"Error when enriching network breadcrumb")}}function P0(e){return e.category==="xhr"}function F0(e){return e.category==="fetch"}function U0(e){return e?.xhr}function B0(e){return e?.response}function H0(e,{autoFlushOnFeedback:t}){let n=v();Po(Sv(e)),an(d0(e)),n0(e),L0(e);let r=u0(e);Ui(r),n&&(n.on("beforeSendEvent",e0(e)),n.on("afterSendEvent",Xv(e)),n.on("createDsc",o=>{let i=e.getSessionId();i&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(o.replay_id=i)}),n.on("spanStart",o=>{e.lastActiveSpan=o}),n.on("spanEnd",o=>{e.lastActiveSpan=o}),n.on("beforeSendFeedback",async(o,i)=>{let s=e.getSessionId();i?.includeReplay&&e.isEnabled()&&s&&o.contexts?.feedback&&(o.contexts.feedback.source==="api"&&t&&await e.flush(),o.contexts.feedback.replay_id=s)}),t&&n.on("openFeedbackWidget",async()=>{await e.flush()}))}async function $0(e){try{return Promise.all(ta(e,[W0(me.performance.memory)]))}catch{return[]}}function W0(e){let{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,o=Date.now()/1e3;return{type:"memory",name:"memory",start:o,end:o,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function G0(e,t,n){return fc(e,t,E(m({},n),{setTimeoutImpl:Zn}))}var Fs=x.navigator;function z0(){return/iPhone|iPad|iPod/i.test(Fs?.userAgent??"")||/Macintosh/i.test(Fs?.userAgent??"")&&Fs?.maxTouchPoints&&Fs?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function j0(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){j&&q.warn("Received replay event after session expired.");return}let o=r||!t;t=!0,e.clickDetector&&pv(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&o&&e.setInitialState(),!il(e,n,o))return!0;if(!o)return!1;let i=e.session;if(V0(e,o),e.recordingMode==="buffer"&&i&&e.eventBuffer){let s=e.eventBuffer.getEarliestTimestamp();s&&(j&&q.log(`Updating session start time to earliest event in buffer to ${new Date(s)}`),i.started=s,e.getOptions().stickySession&&ol(i))}return i?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function q0(e){let t=e.getOptions();return{type:X.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 V0(e,t){!t||!e.session||e.session.segmentId!==0||il(e,q0(e),!1)}function Y0(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function J0(e,t,n,r){return Fe(ao(e,gr(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function K0({recordingData:e,headers:t}){let n,r=`${JSON.stringify(t)}
|
|
496
|
-
`;if(typeof e=="string")n=`${r}${e}`;else{let i=new TextEncoder().encode(r);n=new Uint8Array(i.length+e.length),n.set(i),n.set(e,i.length)}return n}async function X0({client:e,scope:t,replayId:n,event:r}){let o=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,i={event_id:n,integrations:o};e.emit("preprocessEvent",r,i);let s=await uo(e.getOptions(),r,i,t,e,ce());if(!s)return null;e.emit("postprocessEvent",s,i),s.platform=s.platform||"javascript";let a=e.getSdkMetadata(),{name:c,version:u}=a?.sdk||{};return s.sdk=E(m({},s.sdk),{name:c||"sentry.javascript.unknown",version:u||"0.0.0"}),s}async function Z0({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:o,session:i}){let s=K0({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,initialTimestamp:d}=r,l=v(),f=M(),p=l?.getTransport(),h=l?.getDsn();if(!l||!p||!h||!i.sampled)return Xe({});let _={type:$T,replay_start_timestamp:d/1e3,timestamp:o/1e3,error_ids:c,trace_ids:u,urls:a,replay_id:t,segment_id:n,replay_type:i.sampled},S=await X0({scope:f,client:l,replayId:t,event:_});if(!S)return l.recordDroppedEvent("event_processor","replay"),j&&q.log("An event processor returned `null`, will not send event."),Xe({});delete S.sdkProcessingMetadata;let y=J0(S,s,h,l.getOptions().tunnel),I;try{I=await p.send(y)}catch(N){let L=new Error(Yu);try{L.cause=N}catch{}throw L}if(typeof I.statusCode=="number"&&(I.statusCode<200||I.statusCode>=300))throw new Ks(I.statusCode);let W=_o({},I);if(go(W,"replay"))throw new Jo(W);return I}var Ks=class extends Error{constructor(t){super(`Transport returned status code ${t}`)}},Jo=class extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}};async function lh(e,t={count:0,interval:VT}){let{recordingData:n,onError:r}=e;if(n.length)try{return await Z0(e),!0}catch(o){if(o instanceof Ks||o instanceof Jo)throw o;if(Di("Replays",{_retryCount:t.count}),r&&r(o),t.count>=YT){let i=new Error(`${Yu} - max retries exceeded`);try{i.cause=o}catch{}throw i}return t.interval*=++t.count,new Promise((i,s)=>{Zn(async()=>{try{await lh(e,t),i(!0)}catch(a){s(a)}},t.interval)})}}var dh="__THROTTLED",Q0="__SKIPPED";function ew(e,t,n){let r=new Map,o=a=>{let c=a-n;r.forEach((u,d)=>{d<c&&r.delete(d)})},i=()=>[...r.values()].reduce((a,c)=>a+c,0),s=!1;return(...a)=>{let c=Math.floor(Date.now()/1e3);if(o(c),i()>=t){let d=s;return s=!0,d?Q0:dh}s=!1;let u=r.get(c)||0;return r.set(c,u+1),e(...a)}}var ju=class{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:WT,sessionIdleExpire:GT},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=G0(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=ew((s,a)=>Yv(this,s,a),300,5);let{slowClickTimeout:r,slowClickIgnoreSelectors:o}=this.getOptions(),i=r?{threshold:Math.min(JT,r),timeout:r,scrollTimeout:KT,ignoreSelector:o?o.join(","):""}:void 0;if(i&&(this.clickDetector=new Uu(this,i)),j){let s=t._experiments;q.setConfig({captureExceptions:!!s.captureExceptions,traceInternals:!!s.traceInternals})}this._handleVisibilityChange=()=>{me.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{let s=Kt({category:"ui.blur"});this._doChangeToBackgroundTasks(s)},this._handleWindowFocus=()=>{let s=Kt({category:"ui.focus"});this._doChangeToForegroundTasks(s)},this._handleKeyboardEvent=s=>{Tv(this,s)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){j&&q.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){let{errorSampleRate:n,sessionSampleRate:r}=this._options,o=n<=0&&r<=0;if(this._requiresManualStart=o,!o){if(this._initializeSessionForSampling(t),!this.session){j&&q.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",j&&q.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){j&&q.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){j&&q.log("Buffering is in progress, call `flush()` to save the replay");return}j&&q.infoTick("Starting replay in session mode"),this._updateUserActivity();let t=Iu({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){j&&q.log("Buffering is in progress, call `flush()` to save the replay");return}j&&q.infoTick("Starting replay in buffer mode");let t=Iu({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{let t=this._canvas;this._stopRecording=un(m(E(m(E(m(m({},this._recordingOptions),this.recordingMode==="buffer"?{checkoutEveryNms:qT}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)}),{emit:j0(this)}),z0()),{onMutation:this._onMutationHandler.bind(this)}),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{j&&q.log(`Stopping Replay${n?` triggered by ${n}`:""}`),ih(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,Gv(this)}catch(r){this.handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),j&&q.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),j&&q.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();let n=Date.now();j&&q.log("Converting buffer to session"),await this.flushImmediate();let 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){let 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?.id}checkAndHandleExpiredSession(){if(this._lastActivity&&Wu(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){let t=`${me.location.pathname}${me.location.hash}${me.location.search}`,n=`${me.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){let r=this._throttledAddEvent(t,n);if(r===dh){let o=Kt({category:"replay.throttled"});this.addUpdate(()=>!il(this,{type:rv,timestamp:o.timestamp||0,data:{tag:"breadcrumb",payload:o,metric:!0}}))}return r}getCurrentRoute(){let t=this.lastActiveSpan||te(),n=t&&oe(t),o=(n&&O(n).data||{})[ve];if(!(!n||!o||!["route","custom"].includes(o)))return O(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Hv({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(t){let n=this._options.errorSampleRate>0,r=Iu({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;let t=this.session;return th(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{me.document.addEventListener("visibilitychange",this._handleVisibilityChange),me.addEventListener("blur",this._handleWindowBlur),me.addEventListener("focus",this._handleWindowFocus),me.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(H0(this,{autoFlushOnFeedback:this._options._experiments.autoFlushOnFeedback}),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=Pv(this)}_removeListeners(){try{me.document.removeEventListener("visibilitychange",this._handleVisibilityChange),me.removeEventListener("blur",this._handleWindowBlur),me.removeEventListener("focus",this._handleWindowFocus),me.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){!this.session||eh(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()){j&&q.log("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:X.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=Rv(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){let n=this._context.initialTimestamp/1e3;t=t.filter(r=>r.start>=n)}return Promise.all(ta(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){let{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;let r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){let 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(){let t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){j&&q.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await $0(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();let n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");let r=this._popEventContext(),o=this.session.segmentId++;this._maybeSaveSession();let i=await this.eventBuffer.finish();await lh({replayId:t,recordingData:i,segmentId:o,eventContext:r,session:this.session,timestamp:n,onError:s=>this.handleException(s)})}catch(n){this.handleException(n),this.stop({reason:"sendReplay"});let r=v();if(r){let o=n instanceof Jo?"ratelimit_backoff":"send_error";r.recordDroppedEvent(o,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){j&&q.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;let n=this.session.started,o=Date.now()-n;this._debouncedFlush.cancel();let i=o<this._options.minReplayDuration,s=o>this._options.maxReplayDuration+5e3;if(i||s){j&&q.log(`Session duration (${Math.floor(o/1e3)}s) is too ${i?"short":"long"}, not sending replay.`),i&&this._debouncedFlush();return}let a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&j&&q.log("Flushing initial segment without checkout.");let c=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(u){this.handleException(u)}finally{this._flushLock=void 0,c&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&ol(this.session)}_onMutationHandler(t){let{ignoreMutations:n}=this._options._experiments;if(n?.length&&t.some(a=>{let c=Y0(a.target),u=n.join(",");return c?.matches(u)}))return!1;let r=t.length,o=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,s=o&&r>o;if(r>i||s){let a=Kt({category:"replay.mutations",data:{count:r,limit:s}});this._createCustomBreadcrumb(a)}return s?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}};function Bo(e,t){return[...e,...t].join(",")}function tw({mask:e,unmask:t,block:n,unblock:r,ignore:o}){let i=["base","iframe[srcdoc]:not([src])"],s=Bo(e,[".sentry-mask","[data-sentry-mask]"]),a=Bo(t,[]);return{maskTextSelector:s,unmaskTextSelector:a,blockSelector:Bo(n,[".sentry-block","[data-sentry-block]",...i]),unblockSelector:Bo(r,[]),ignoreSelector:Bo(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function nw({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:o,value:i}){return!r||o.unmaskTextSelector&&e.matches(o.unmaskTextSelector)?i:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?i.replace(/[\S]/g,"*"):i}var Im='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',rw=["content-length","content-type","accept"],vm=!1,ow=e=>new qu(e),qu=class{constructor({flushMinDelay:t=zT,flushMaxDelay:n=jT,minReplayDuration:r=XT,maxReplayDuration:o=rm,stickySession:i=!0,useCompression:s=!0,workerUrl:a,_experiments:c={},maskAllText:u=!0,maskAllInputs:d=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:f=750,mutationLimit:p=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:_=[],networkDetailAllowUrls:S=[],networkDetailDenyUrls:y=[],networkCaptureBodies:I=!0,networkRequestHeaders:W=[],networkResponseHeaders:N=[],mask:L=[],maskAttributes:b=["title","placeholder","aria-label"],unmask:C=[],block:P=[],unblock:w=[],ignore:A=[],maskFn:G,beforeAddRecordingEvent:R,beforeErrorSampling:F,onError:V}={}){this.name="Replay";let H=tw({mask:L,unmask:C,block:P,unblock:w,ignore:A});if(this._recordingOptions=E(m({maskAllInputs:d,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:G,maskInputFn:G,maskAttributeFn:(D,z,B)=>nw({maskAttributes:b,maskAllText:u,privacyOptions:H,key:D,value:z,el:B})},H),{slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:D=>{try{D.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!c.recordCrossOriginIframes}),this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,ZT),maxReplayDuration:Math.min(o,rm),stickySession:i,useCompression:s,workerUrl:a,blockAllMedia:l,maskAllInputs:d,maskAllText:u,mutationBreadcrumbLimit:f,mutationLimit:p,slowClickTimeout:h,slowClickIgnoreSelectors:_,networkDetailAllowUrls:S,networkDetailDenyUrls:y,networkCaptureBodies:I,networkRequestHeaders:wm(W),networkResponseHeaders:wm(N),beforeAddRecordingEvent:R,beforeErrorSampling:F,onError:V,_experiments:c},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Im}`:Im),this._isInitialized&&Ir())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return vm}set _isInitialized(t){vm=t}afterAllSetup(t){!Ir()||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?.isEnabled())return this._replay.getSessionId()}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){let n=iw(this._initialOptions,t);this._replay=new ju({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{let n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}};function iw(e,t){let n=t.getOptions(),r=m({sessionSampleRate:0,errorSampleRate:0},e),o=ft(n.replaysSessionSampleRate),i=ft(n.replaysOnErrorSampleRate);return o==null&&i==null&&Be(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),o!=null&&(r.sessionSampleRate=o),i!=null&&(r.errorSampleRate=i),r}function wm(e){return[...rw,...e.map(t=>t.toLowerCase())]}function sw(){return v()?.getIntegrationByName("Replay")}var aw=Object.defineProperty,cw=(e,t,n)=>t in e?aw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fh=(e,t,n)=>cw(e,typeof t!="symbol"?t+"":t,n),cl=class{constructor(){fh(this,"idNodeMap",new Map),fh(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-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){let 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){let r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){let r=this.getNode(t);if(r){let o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function uw(){return new cl}function lw(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}function ul(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:ul(e.parentNode,t,n,r+1)}function ph(e,t){return n=>{let r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(lw(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}var jr=`Please stop import mirror directly. Instead of that,\r
|
|
497
|
-
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
498
|
-
or you can use record.mirror to access the mirror instance during recording.`,mh={map:{},getId(){return console.error(jr),-1},getNode(){return console.error(jr),null},removeNodeFromMap(){console.error(jr)},has(){return console.error(jr),!1},reset(){console.error(jr)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(mh=new Proxy(mh,{get(e,t,n){return t==="map"&&console.error(jr),Reflect.get(e,t,n)}}));function dl(e,t,n,r,o=window){let i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(s){Th(()=>{n.set.call(this,s)},0),i&&i.set&&i.set.call(this,s)}}),()=>dl(e,t,i||{},!0)}function fl(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}Date.now().toString();function dw(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function sa(e,t,n,r,o){if(!e)return!1;let i=dw(e);if(!i)return!1;let s=ph(t,n);if(!o){let u=r&&i.matches(r);return s(i)&&!u}let a=ul(i,s),c=-1;return a<0?!1:(r&&(c=ul(i,ph(null,r))),a>-1&&c<0?!0:a<c)}var hh={};function bh(e){let t=hh[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement=="function")try{let o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);let i=o.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(o)}catch{}return hh[e]=r.bind(window)}function nr(...e){return bh("requestAnimationFrame")(...e)}function Th(...e){return bh("setTimeout")(...e)}var Vr=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Vr||{}),oa;function fw(e){oa=e}var al=e=>oa?(...n)=>{try{return e(...n)}catch(r){if(oa&&oa(r)===!0)return()=>{};throw r}}:e,qr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",pw=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(Zo=0;Zo<qr.length;Zo++)pw[qr.charCodeAt(Zo)]=Zo;var Zo,mw=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=qr[t[n]>>2],o+=qr[(t[n]&3)<<4|t[n+1]>>4],o+=qr[(t[n+1]&15)<<2|t[n+2]>>6],o+=qr[t[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o},gh=new Map;function hw(e,t){let n=gh.get(e);return n||(n=new Map,gh.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}var Ih=(e,t,n)=>{if(!e||!(wh(e,t)||typeof e=="object"))return;let r=e.constructor.name,o=hw(n,r),i=o.indexOf(e);return i===-1&&(i=o.length,o.push(e)),i};function ia(e,t,n){if(e instanceof Array)return e.map(r=>ia(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){let r=e.constructor.name,o=mw(e);return{rr_type:r,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[ia(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let r=e.constructor.name,{src:o}=e;return{rr_type:r,src:o}}else if(e instanceof HTMLCanvasElement){let r="HTMLImageElement",o=e.toDataURL();return{rr_type:r,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[ia(e.data,t,n),e.width,e.height]};if(wh(e,t)||typeof e=="object"){let r=e.constructor.name,o=Ih(e,t,n);return{rr_type:r,index:o}}}}return e}var vh=(e,t,n)=>e.map(r=>ia(r,t,n)),wh=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(o=>typeof t[o]=="function").find(o=>e instanceof t[o]);function gw(e,t,n,r,o){let i=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let a of s)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;let c=fl(t.CanvasRenderingContext2D.prototype,a,function(u){return function(...d){return sa(this.canvas,n,r,o,!0)||Th(()=>{let l=vh(d,t,this);e(this.canvas,{type:Vr["2D"],property:a,args:l})},0),u.apply(this,d)}});i.push(c)}catch{let c=dl(t.CanvasRenderingContext2D.prototype,a,{set(u){e(this.canvas,{type:Vr["2D"],property:a,args:[u],setter:!0})}});i.push(c)}return()=>{i.forEach(a=>a())}}function _w(e){return e==="experimental-webgl"?"webgl":e}function _h(e,t,n,r,o){let i=[];try{let s=fl(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(c,...u){if(!sa(this,t,n,r,!0)){let d=_w(c);if("__context"in this||(this.__context=d),o&&["webgl","webgl2"].includes(d))if(u[0]&&typeof u[0]=="object"){let l=u[0];l.preserveDrawingBuffer||(l.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[c,...u])}});i.push(s)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(s=>s())}}function Sh(e,t,n,r,o,i,s,a){let c=[],u=Object.getOwnPropertyNames(e);for(let d of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(d))try{if(typeof e[d]!="function")continue;let l=fl(e,d,function(f){return function(...p){let h=f.apply(this,p);if(Ih(h,a,this),"tagName"in this.canvas&&!sa(this.canvas,r,o,i,!0)){let _=vh(p,a,this),S={type:t,property:d,args:_};n(this.canvas,S)}return h}});c.push(l)}catch{let l=dl(e,d,{set(f){n(this.canvas,{type:t,property:d,args:[f],setter:!0})}});c.push(l)}return c}function Sw(e,t,n,r,o,i){let s=[];return s.push(...Sh(t.WebGLRenderingContext.prototype,Vr.WebGL,e,n,r,o,i,t)),typeof t.WebGL2RenderingContext<"u"&&s.push(...Sh(t.WebGL2RenderingContext.prototype,Vr.WebGL2,e,n,r,o,i,t)),()=>{s.forEach(a=>a())}}var yw='for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s="";for(a=0;a<r;a+=3)s+=e[n[a]>>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+"-"+t;if("OffscreenCanvas"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext("2d");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return""}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext("bitmaprenderer"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:"low"});w.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};';function Ew(){let e=new Blob([yw]);return URL.createObjectURL(e)}var ll=class{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.shadowDoms=new Set,this.windowsSet=new WeakSet,this.windows=[],this.restoreHandlers=[],this.frozen=!1,this.locked=!1,this.snapshotInProgressMap=new Map,this.worker=null,this.lastSnapshotTime=0,this.processMutation=(l,f)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(f)};let{sampling:n="all",win:r,blockClass:o,blockSelector:i,unblockSelector:s,maxCanvasSize:a,recordCanvas:c,dataURLOptions:u,errorHandler:d}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.options=t,d&&fw(d),(c&&typeof n=="number"||t.enableManualSnapshot)&&(this.worker=this.initFPSWorker()),this.addWindow(r),!t.enableManualSnapshot&&al(()=>{c&&n==="all"&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),c&&typeof n=="number"&&this.initCanvasFPSObserver(n,o,i,s,a,{dataURLOptions:u})})()}reset(){this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.windowsSet=new WeakSet,this.windows=[],this.shadowDoms=new Set,this.worker?.terminate(),this.worker=null,this.snapshotInProgressMap=new Map}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}addWindow(t){let{sampling:n="all",blockClass:r,blockSelector:o,unblockSelector:i,recordCanvas:s,enableManualSnapshot:a}=this.options;if(!this.windowsSet.has(t)){if(a){this.windowsSet.add(t),this.windows.push(new WeakRef(t));return}al(()=>{if(s&&n==="all"&&this.initCanvasMutationObserver(t,r,o,i),s&&typeof n=="number"){let c=_h(t,r,o,i,!0);this.restoreHandlers.push(()=>{c()})}})(),this.windowsSet.add(t),this.windows.push(new WeakRef(t))}}addShadowRoot(t){this.shadowDoms.add(new WeakRef(t))}resetShadowRoots(){this.shadowDoms=new Set}initFPSWorker(){let t=new Worker(Ew());return t.onmessage=n=>{let r=n.data,{id:o}=r;if(this.snapshotInProgressMap.set(o,!1),!("base64"in r))return;let{base64:i,type:s,width:a,height:c}=r;this.mutationCb({id:o,type:Vr["2D"],commands:[{property:"clearRect",args:[0,0,a,c]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:i}],type:s}]},0,0,a,c]}]})},t}initCanvasFPSObserver(t,n,r,o,i,s){let a=this.takeSnapshot(!1,t,n,r,o,i,s.dataURLOptions);this.restoreHandlers.push(()=>{cancelAnimationFrame(a)})}initCanvasMutationObserver(t,n,r,o){let i=_h(t,n,r,o,!1),s=gw(this.processMutation.bind(this),t,n,r,o),a=Sw(this.processMutation.bind(this),t,n,r,o,this.mirror);this.restoreHandlers.push(()=>{i(),s(),a()})}snapshot(t){let{options:n}=this,r=this.takeSnapshot(!0,n.sampling==="all"?2:n.sampling||2,n.blockClass,n.blockSelector,n.unblockSelector,n.maxCanvasSize,n.dataURLOptions,t);this.restoreHandlers.push(()=>{cancelAnimationFrame(r)})}takeSnapshot(t,n,r,o,i,s,a,c){let u=1e3/n,d,l=p=>{if(p)return[p];let h=[],_=S=>{S.querySelectorAll("canvas").forEach(y=>{sa(y,r,o,i,!0)||h.push(y)})};for(let S of this.windows){let y=S.deref(),I;try{I=y&&y.document}catch{}I&&_(I)}for(let S of this.shadowDoms){let y=S.deref();y&&_(y)}return h},f=p=>{if(this.windows.length){if(this.lastSnapshotTime&&p-this.lastSnapshotTime<u){d=nr(f);return}this.lastSnapshotTime=p,l(c).forEach(h=>{if(!this.mirror.hasNode(h))return;let _=this.mirror.getId(h);if(!this.snapshotInProgressMap.get(_)&&!(!h.width||!h.height)){if(this.snapshotInProgressMap.set(_,!0),!t&&["webgl","webgl2"].includes(h.__context)){let S=h.getContext(h.__context);S?.getContextAttributes()?.preserveDrawingBuffer===!1&&S.clear(S.COLOR_BUFFER_BIT)}createImageBitmap(h).then(S=>{this.worker?.postMessage({id:_,bitmap:S,width:h.width,height:h.height,dataURLOptions:a,maxCanvasSize:s},[S])}).catch(S=>{al(()=>{throw S})()})}}),t||(d=nr(f))}};return d=nr(f),d}startPendingCanvasMutationFlusher(){nr(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let t=n=>{this.rafStamps.latestId=n,nr(t)};nr(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{let r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),nr(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;let o=r.map(s=>{let u=s,{type:a}=u;return dn(u,["type"])}),{type:i}=r[0];this.mutationCb({id:n,type:i,commands:o}),this.pendingCanvasMutations.delete(t)}};try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}uw();var yh;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(yh||(yh={}));var Eh={low:{sampling:{canvas:1},dataURLOptions:{type:"image/webp",quality:.25}},medium:{sampling:{canvas:2},dataURLOptions:{type:"image/webp",quality:.4}},high:{sampling:{canvas:4},dataURLOptions:{type:"image/webp",quality:.5}}},bw="ReplayCanvas",ra=1280,Tw=(e={})=>{let[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,ra):ra,n?Math.min(n,ra):ra]},o,i=new Promise(s=>o=s);return{name:bw,getOptions(){let{quality:s,enableManualSnapshot:a,maxCanvasSize:c}=r;return m({enableManualSnapshot:a,recordCanvas:!0,getCanvasManager:u=>{let d=new ll(E(m({},u),{enableManualSnapshot:a,maxCanvasSize:c,errorHandler:l=>{try{typeof l=="object"&&(l.__rrweb__=!0)}catch{}}}));return o(d),d}},Eh[s]||Eh.medium)},async snapshot(s){(await i).snapshot(s)}}},Iw=Tw;function Xt(e=0){return((fe()||performance.timeOrigin)+e)/1e3}function Rh(e){let t=[];if(e.nextHopProtocol!=null){let{name:n,version:r}=Do(e.nextHopProtocol);t.push(["network.protocol.version",r],["network.protocol.name",n])}return fe()?[...t,["http.request.redirect_start",Xt(e.redirectStart)],["http.request.fetch_start",Xt(e.fetchStart)],["http.request.domain_lookup_start",Xt(e.domainLookupStart)],["http.request.domain_lookup_end",Xt(e.domainLookupEnd)],["http.request.connect_start",Xt(e.connectStart)],["http.request.secure_connection_start",Xt(e.secureConnectionStart)],["http.request.connection_end",Xt(e.connectEnd)],["http.request.request_start",Xt(e.requestStart)],["http.request.response_start",Xt(e.responseStart)],["http.request.response_end",Xt(e.responseEnd)]]:t}var xh=new WeakMap,pl=new Map,aa={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function ml(e,t){let{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:o,shouldCreateSpanForRequest:i,enableHTTPTimings:s,tracePropagationTargets:a,onRequestSpanStart:c}=m(m({},aa),t),u=typeof i=="function"?i:f=>!0,d=f=>ww(f,a),l={};n&&(e.addEventProcessor(f=>(f.type==="transaction"&&f.spans&&f.spans.forEach(p=>{if(p.op==="http.client"){let h=pl.get(p.span_id);h&&(p.timestamp=h/1e3,pl.delete(p.span_id))}}),f)),o&&Tc(f=>{if(f.response){let p=xh.get(f.response);p&&f.endTimestamp&&pl.set(p,f.endTimestamp)}}),zn(f=>{let p=Sc(f,u,d,l);if(f.response&&f.fetchData.__span&&xh.set(f.response,f.fetchData.__span),p){let h=Ah(f.fetchData.url),_=h?Ft(h).host:void 0;p.setAttributes({"http.url":h,"server.address":_}),s&&Ch(p),c?.(p,{headers:f.headers})}})),r&&Qn(f=>{let p=Rw(f,u,d,l);if(p){s&&Ch(p);let h;try{h=new Headers(f.xhr.__sentry_xhr_v3__?.request_headers)}catch{}c?.(p,{headers:h})}})}function vw(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function Ch(e){let{url:t}=O(e).data;if(!t||typeof t!="string")return;let n=gt("resource",({entries:r})=>{r.forEach(o=>{vw(o)&&o.name.endsWith(t)&&(Rh(o).forEach(s=>e.setAttribute(...s)),setTimeout(n))})})}function ww(e,t){let n=Ye();if(n){let r,o;try{r=new URL(e,n),o=new URL(n).origin}catch{return!1}let i=r.origin===o;return t?Pe(r.toString(),t)||i&&Pe(r.pathname,t):i}else{let r=!!e.match(/^\/(?!\/)/);return t?Pe(e,t):r}}function Rw(e,t,n,r){let o=e.xhr,i=o?.[Ze];if(!o||o.__sentry_own_request__||!i)return;let{url:s,method:a}=i,c=Ke()&&t(s);if(e.endTimestamp&&c){let _=o.__sentry_xhr_span_id__;if(!_)return;let S=r[_];S&&i.status_code!==void 0&&(nn(S,i.status_code),S.end(),delete r[_]);return}let u=Ah(s),d=u?Ft(u):Ft(s),l=Eo(s),f=!!te(),p=c&&f?mt({name:`${a} ${l}`,attributes:m(m({url:s,type:"xhr","http.method":a,"http.url":u,"server.address":d?.host,[Q]:"auto.http.browser",[ye]:"http.client"},d?.search&&{"http.query":d?.search}),d?.hash&&{"http.fragment":d?.hash})}):new ze;o.__sentry_xhr_span_id__=p.spanContext().spanId,r[o.__sentry_xhr_span_id__]=p,n(s)&&xw(o,Ke()&&f?p:void 0);let h=v();return h&&h.emit("beforeOutgoingRequestSpan",p,e),p}function xw(e,t){let{"sentry-trace":n,baggage:r}=br({span:t});n&&Cw(e,n,r)}function Cw(e,t,n){let r=e.__sentry_xhr_v3__?.request_headers;if(!r?.["sentry-trace"])try{if(e.setRequestHeader("sentry-trace",t),n){let o=r?.baggage;(!o||!Aw(o))&&e.setRequestHeader("baggage",n)}}catch{}}function Aw(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function Ah(e){try{return new URL(e,k.location.origin).href}catch{return}}function kh(){k.document?k.document.addEventListener("visibilitychange",()=>{let e=te();if(!e)return;let t=oe(e);if(k.document.hidden&&t){let n="cancelled",{op:r,status:o}=O(t);$&&g.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),o||t.setStatus({code:2,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):$&&g.warn("[Tracing] Could not set up background tab detection due to lack of global document")}var kw=3600,Nh="sentry_previous_trace",Nw="sentry.previous_trace";function Mh(e,{linkPreviousTrace:t,consistentTraceSampling:n}){let r=t==="session-storage",o=r?Lw():void 0;e.on("spanStart",s=>{if(oe(s)!==s)return;let a=M().getPropagationContext();o=Mw(o,s,a),r&&Ow(o)});let i=!0;n&&e.on("beforeSampling",s=>{if(!o)return;let a=M(),c=a.getPropagationContext();if(i&&c.parentSpanId){i=!1;return}a.setPropagationContext(E(m({},c),{dsc:E(m({},c.dsc),{sample_rate:String(o.sampleRate),sampled:String(hl(o.spanContext))}),sampleRand:o.sampleRand})),s.parentSampled=hl(o.spanContext),s.parentSampleRate=o.sampleRate,s.spanAttributes=E(m({},s.spanAttributes),{[to]:o.sampleRate})})}function Mw(e,t,n){let r=O(t);function o(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[gn])}catch{return 0}}let i={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:o(),sampleRand:n.sampleRand};if(!e)return i;let s=e.spanContext;return s.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=kw&&($&&g.log(`Adding previous_trace ${s} link to span ${m({op:r.op},t.spanContext())}`),t.addLink({context:s,attributes:{[Ma]:"previous_trace"}}),t.setAttribute(Nw,`${s.traceId}-${s.spanId}-${hl(s)?1:0}`)),i)}function Ow(e){try{k.sessionStorage.setItem(Nh,JSON.stringify(e))}catch(t){$&&g.warn("Could not store previous trace in sessionStorage",t)}}function Lw(){try{let e=k.sessionStorage?.getItem(Nh);return JSON.parse(e)}catch{return}}function hl(e){return e.traceFlags===1}var Dw="BrowserTracing",Pw=m(E(m({},_r),{instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,_experiments:{}}),aa),Fw=(e={})=>{let t={name:void 0,source:void 0},n=k.document,{enableInp:r,enableElementTiming:o,enableLongTask:i,enableLongAnimationFrame:s,_experiments:{enableInteractions:a,enableStandaloneClsSpans:c,enableStandaloneLcpSpans:u},beforeStartSpan:d,idleTimeout:l,finalTimeout:f,childSpanTimeout:p,markBackgroundSpan:h,traceFetch:_,traceXHR:S,trackFetchStreamPerformance:y,shouldCreateSpanForRequest:I,enableHTTPTimings:W,ignoreResourceSpans:N,ignorePerformanceApiSpans:L,instrumentPageLoad:b,instrumentNavigation:C,detectRedirects:P,linkPreviousTrace:w,consistentTraceSampling:A,onRequestSpanStart:G}=m(m({},Pw),e),R,F;function V(H,D,z=!0){let B=D.op==="pageload",J=d?d(D):D,Z=J.attributes||{};if(D.name!==J.name&&(Z[ve]="custom",J.attributes=Z),!z){let Ae=dt();mt(E(m({},J),{startTime:Ae})).end(Ae);return}t.name=J.name,t.source=Z[ve];let _e=Ai(J,{idleTimeout:l,finalTimeout:f,childSpanTimeout:p,disableAutoFinish:B,beforeSpanEnd:Ae=>{R?.(),iu(Ae,{recordClsOnPageloadSpan:!c,recordLcpOnPageloadSpan:!u,ignoreResourceSpans:N,ignorePerformanceApiSpans:L}),Lh(H,void 0);let Re=M(),ct=Re.getPropagationContext();Re.setPropagationContext(E(m({},ct),{traceId:_e.spanContext().traceId,sampled:It(_e),dsc:we(Ae)}))}});Lh(H,_e);function St(){n&&["interactive","complete"].includes(n.readyState)&&H.emit("idleSpanEnableAutoFinish",_e)}B&&n&&(n.addEventListener("readystatechange",()=>{St()}),St())}return{name:Dw,setup(H){if(Ei(),R=tu({recordClsStandaloneSpans:c||!1,recordLcpStandaloneSpans:u||!1,client:H}),r&&lu(),o&&su(),s&&x.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?ru():i&&nu(),a&&ou(),P&&n){let z=()=>{F=re()};addEventListener("click",z,{capture:!0}),addEventListener("keydown",z,{capture:!0,passive:!0})}function D(){let z=Qo(H);z&&!O(z).timestamp&&($&&g.log(`[Tracing] Finishing current active span with op: ${O(z).op}`),z.setAttribute(Pn,"cancelled"),z.end())}H.on("startNavigationSpan",(z,B)=>{if(v()!==H)return;if(B?.isRedirect){$&&g.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),V(H,m({op:"navigation.redirect"},z),!1);return}D(),ce().setPropagationContext({traceId:Ge(),sampleRand:Math.random()});let J=M();J.setPropagationContext({traceId:Ge(),sampleRand:Math.random()}),J.setSDKProcessingMetadata({normalizedRequest:void 0}),V(H,m({op:"navigation"},z))}),H.on("startPageLoadSpan",(z,B={})=>{if(v()!==H)return;D();let J=B.sentryTrace||Oh("sentry-trace"),Z=B.baggage||Oh("baggage"),_e=no(J,Z),St=M();St.setPropagationContext(_e),St.setSDKProcessingMetadata({normalizedRequest:xo()}),V(H,m({op:"pageload"},z))})},afterAllSetup(H){let D=Ye();if(w!=="off"&&Mh(H,{linkPreviousTrace:w,consistentTraceSampling:A}),k.location){if(b){let z=fe();Ph(H,{name:k.location.pathname,startTime:z?z/1e3:void 0,attributes:{[ve]:"url",[Q]:"auto.pageload.browser"}})}C&&an(({to:z,from:B})=>{if(B===void 0&&D?.indexOf(z)!==-1){D=void 0;return}D=void 0;let J=yo(z),Z=Qo(H),_e=Z&&P&&Bw(Z,F);Fh(H,{name:J?.pathname||k.location.pathname,attributes:{[ve]:"url",[Q]:"auto.navigation.browser"}},{url:z,isRedirect:_e})})}h&&kh(),a&&Uw(H,l,f,p,t),r&&du(),ml(H,{traceFetch:_,traceXHR:S,trackFetchStreamPerformance:y,tracePropagationTargets:H.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:I,enableHTTPTimings:W,onRequestSpanStart:G})}}};function Ph(e,t,n){e.emit("startPageLoadSpan",t,n),M().setTransactionName(t.name);let r=Qo(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function Fh(e,t,n){let{url:r,isRedirect:o}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:o}),e.emit("startNavigationSpan",t,{isRedirect:o});let i=M();return i.setTransactionName(t.name),r&&!o&&i.setSDKProcessingMetadata({normalizedRequest:E(m({},xo()),{url:r})}),Qo(e)}function Oh(e){return k.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function Uw(e,t,n,r,o){let i=k.document,s,a=()=>{let c="ui.action.click",u=Qo(e);if(u){let d=O(u).op;if(["navigation","pageload"].includes(d)){$&&g.warn(`[Tracing] Did not create ${c} span because a pageload or navigation span is in progress.`);return}}if(s&&(s.setAttribute(Pn,"interactionInterrupted"),s.end(),s=void 0),!o.name){$&&g.warn(`[Tracing] Did not create ${c} transaction because _latestRouteName is missing.`);return}s=Ai({name:o.name,op:c,attributes:{[ve]:o.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};i&&addEventListener("click",a,{capture:!0})}var Uh="_sentry_idleSpan";function Qo(e){return e[Uh]}function Lh(e,t){he(e,Uh,t)}var Dh=.3;function Bw(e,t){let n=O(e),r=dt(),o=n.start_timestamp;return!(r-o>Dh||t&&r-t<=Dh)}function Yr(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Hw(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=Yr(n);return o=>r.then(i=>o(i.transaction(t,"readwrite").objectStore(t)))}function gl(e){return Yr(e.getAllKeys())}function $w(e,t,n){return e(r=>gl(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.max(...o,0)+1),Yr(r.transaction)}))}function Ww(e,t,n){return e(r=>gl(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.min(...o,0)-1),Yr(r.transaction)}))}function Gw(e){return e(t=>gl(t).then(n=>{let r=n[0];if(r!=null)return Yr(t.get(r)).then(o=>(t.delete(r),Yr(t.transaction).then(()=>o)))}))}function zw(e){let t;function n(){return t==null&&(t=Hw(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{push:async r=>{try{let o=await Sn(r);await $w(n(),o,e.maxQueueSize||30)}catch{}},unshift:async r=>{try{let o=await Sn(r);await Ww(n(),o,e.maxQueueSize||30)}catch{}},shift:async()=>{try{let r=await Gw(n());if(r)return Ba(r)}catch{}}}}function jw(e){return t=>{let n=e(E(m({},t),{createStore:zw}));return k.addEventListener("online",async r=>{await n.flush()}),n}}function qw(e=Fo){return jw(sc(e))}var Bh=1e6,ca=String(0),Vw="main",ua=k.navigator,$h="",Wh="",Gh="",_l=ua?.userAgent||"",zh="",Yw=ua?.language||ua?.languages?.[0]||"";function Jw(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}var Hh=ua?.userAgentData;Jw(Hh)&&Hh.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if($h=e.platform||"",Gh=e.architecture||"",zh=e.model||"",Wh=e.platformVersion||"",e.fullVersionList?.length){let t=e.fullVersionList[e.fullVersionList.length-1];_l=`${t.brand} ${t.version}`}}).catch(e=>{});function Kw(e){return!("thread_metadata"in e)}function Xw(e){return Kw(e)?eR(e):e}function Zw(e){let t=e.contexts?.trace?.trace_id;return typeof t=="string"&&t.length!==32&&$&&g.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t!="string"?"":t}function Qw(e,t,n,r){if(r.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(n==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);let o=Zw(r),i=Xw(n),s=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:re()*1e3),a=typeof r.timestamp=="number"?r.timestamp*1e3:re()*1e3;return{event_id:e,timestamp:new Date(s).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||rn,runtime:{name:"javascript",version:k.navigator.userAgent},os:{name:$h,version:Wh,build_number:_l},device:{locale:Yw,model:zh,manufacturer:_l,architecture:Gh,is_emulator:!1},debug_meta:{images:tR(n.resources)},profile:i,transactions:[{name:r.transaction||"",id:r.event_id||ge(),trace_id:o,active_thread_id:ca,relative_start_ns:"0",relative_end_ns:((a-s)*1e6).toFixed(0)}]}}function la(e){return O(e).op==="pageload"}function eR(e){let t,n=0,r={samples:[],stacks:[],frames:[],thread_metadata:{[ca]:{name:Vw}}},o=e.samples[0];if(!o)return r;let i=o.timestamp,s=fe(),a=typeof performance.timeOrigin=="number"?performance.timeOrigin:s||0,c=a-(s||a);return e.samples.forEach((u,d)=>{if(u.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[d]={elapsed_since_start_ns:((u.timestamp+c-i)*Bh).toFixed(0),stack_id:t,thread_id:ca};return}let l=e.stacks[u.stackId],f=[];for(;l;){f.push(l.frameId);let h=e.frames[l.frameId];h&&r.frames[l.frameId]===void 0&&(r.frames[l.frameId]={function:h.name,abs_path:typeof h.resourceId=="number"?e.resources[h.resourceId]:void 0,lineno:h.line,colno:h.column}),l=l.parentId===void 0?void 0:e.stacks[l.parentId]}let p={elapsed_since_start_ns:((u.timestamp+c-i)*Bh).toFixed(0),stack_id:n,thread_id:ca};r.stacks[n]=f,r.samples[d]=p,n++}),r}function jh(e,t){if(!t.length)return e;for(let n of t)e[1].push([{type:"profile"},n]);return e}function qh(e){let t=[];return pt(e,(n,r)=>{if(r==="transaction")for(let o=1;o<n.length;o++)n[o]?.contexts?.profile?.profile_id&&t.push(n[o])}),t}function tR(e){let r=v()?.getOptions()?.stackParser;return r?Va(r,e):[]}function nR(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?($&&g.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e===!0||e===!1?!0:e<0||e>1?($&&g.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function rR(e){return e.samples.length<2?($&&g.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):e.frames.length?!0:($&&g.log("[Profiling] Discarding profile because it contains no frames"),!1)}var Vh=!1,Sl=3e4;function oR(e){return typeof e=="function"}function Yh(){let e=k.Profiler;if(!oR(e)){$&&g.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}let t=10,n=Math.floor(Sl/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch{$&&(g.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),g.log("[Profiling] Disabling profiling for current user session.")),Vh=!0}}function yl(e){if(Vh)return $&&g.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return $&&g.log("[Profiling] Discarding profile because transaction was not sampled."),!1;let n=v()?.getOptions();if(!n)return $&&g.log("[Profiling] Profiling disabled, no options found."),!1;let r=n.profilesSampleRate;return nR(r)?r?(r===!0?!0:Math.random()<r)?!0:($&&g.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):($&&g.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):($&&g.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function Jh(e,t,n,r){return rR(n)?Qw(e,t,n,r):null}var rr=new Map;function Kh(){return rr.size}function Xh(e){let t=rr.get(e);return t&&rr.delete(e),t}function Zh(e,t){if(rr.set(e,t),rr.size>30){let n=rr.keys().next().value;rr.delete(n)}}function El(e){let t;la(e)&&(t=re()*1e3);let n=Yh();if(!n)return;$&&g.log(`[Profiling] started profiling span: ${O(e).description}`);let r=ge();M().setContext("profile",{profile_id:r,start_timestamp:t});async function o(){if(e&&n)return n.stop().then(c=>{if(i&&(k.clearTimeout(i),i=void 0),$&&g.log(`[Profiling] stopped profiling of span: ${O(e).description}`),!c){$&&g.log(`[Profiling] profiler returned null profile for: ${O(e).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started");return}Zh(r,c)}).catch(c=>{$&&g.log("[Profiling] error while stopping profiler:",c)})}let i=k.setTimeout(()=>{$&&g.log("[Profiling] max profile duration elapsed, stopping profiling for:",O(e).description),o()},Sl),s=e.end.bind(e);function a(){return e?(o().then(()=>{s()},()=>{s()}),e):s()}e.end=a}var iR="BrowserProfiling",sR=()=>({name:iR,setup(e){let t=te(),n=t&&oe(t);n&&la(n)&&yl(n)&&El(n),e.on("spanStart",r=>{r===oe(r)&&yl(r)&&El(r)}),e.on("beforeEnvelope",r=>{if(!Kh())return;let o=qh(r);if(!o.length)return;let i=[];for(let s of o){let a=s?.contexts,c=a?.profile?.profile_id,u=a?.profile?.start_timestamp;if(typeof c!="string"){$&&g.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!c){$&&g.log("[Profiling] cannot find profile for a span without a profile context");continue}a?.profile&&delete a.profile;let d=Xh(c);if(!d){$&&g.log(`[Profiling] Could not retrieve profile for span: ${c}`);continue}let l=Jh(c,u,d,s);l&&i.push(l)}jh(r,i)})}}),aR=sR;var cR="SpotlightBrowser",uR=(e={})=>{let t=e.sidecarUrl||"http://localhost:8969/stream";return{name:cR,setup:()=>{$&&g.log("Using Sidecar URL",t)},processEvent:n=>fR(n)?null:n,afterAllSetup:n=>{lR(n,t)}}};function lR(e,t){let n=Mr("fetch"),r=0;e.on("beforeEnvelope",o=>{if(r>3){g.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",r);return}n(t,{method:"POST",body:Sn(o),headers:{"Content-Type":"application/x-sentry-envelope"},mode:"cors"}).then(i=>{i.status>=200&&i.status<400&&(r=0)},i=>{r++,g.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/",i)})})}var dR=uR;function fR(e){return!!(e.type==="transaction"&&e.spans&&e.contexts?.trace&&e.contexts.trace.op==="ui.action.click"&&e.spans.some(({description:t})=>t?.includes("#sentry-spotlight")))}var pR=()=>({name:"LaunchDarkly",processEvent(e,t,n){return Pt(e)}});function mR(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(e,t,n)=>{Rt(e,t.value),xt(e,t.value)}}}var hR=()=>({name:"OpenFeature",processEvent(e,t,n){return Pt(e)}}),bl=class{after(t,n){Rt(n.flagKey,n.value),xt(n.flagKey,n.value)}error(t,n,r){Rt(t.flagKey,t.defaultValue),xt(t.flagKey,t.defaultValue)}};var gR=({featureFlagClientClass:e})=>({name:"Unleash",setupOnce(){let t=e.prototype;Ee(t,"isEnabled",_R)},processEvent(t,n,r){return Pt(t)}});function _R(e){return function(...t){let n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"?(Rt(n,r),xt(n,r)):$&&g.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}var SR=({featureFlagClient:e})=>({name:"Statsig",setup(t){e.on("gate_evaluation",n=>{Rt(n.gate.name,n.gate.value),xt(n.gate.name,n.gate.value)})},processEvent(t,n,r){return Pt(t)}});async function yR(){let e=v();if(!e)return"no-client-active";if(!e.getDsn())return"no-dsn-configured";try{await fetch("https://o447951.ingest.sentry.io/api/4509632503087104/envelope/?sentry_version=7&sentry_key=c1dfb07d783ad5325c245c1fd3725390&sentry_client=sentry.javascript.browser%2F1.33.7",{body:"{}",method:"POST",mode:"cors",credentials:"omit"})}catch{return"sentry-unreachable"}}var ER="WebWorker",bR=({worker:e})=>({name:ER,setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(t=>Qh(t))},addWorker:t=>Qh(t)});function Qh(e){e.addEventListener("message",t=>{IR(t.data)&&(t.stopImmediatePropagation(),$&&g.log("Sentry debugId web worker message received",t.data),k._sentryDebugIds=m(m({},t.data._sentryDebugIds),k._sentryDebugIds))})}function TR({self:e}){e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0})}function IR(e){return We(e)&&e._sentryMessage===!0&&"_sentryDebugIds"in e&&(We(e._sentryDebugIds)||e._sentryDebugIds===void 0)}export{Ao as BrowserClient,bl as OpenFeatureIntegrationHook,ut as SDK_VERSION,ye as SEMANTIC_ATTRIBUTE_SENTRY_OP,Q as SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,gn as SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,ve as SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,Je as Scope,k as WINDOW,it as addBreadcrumb,Ui as addEventProcessor,mo as addIntegration,pu as breadcrumbsIntegration,mu as browserApiErrorsIntegration,aR as browserProfilingIntegration,hu as browserSessionIntegration,Fw as browserTracingIntegration,mR as buildLaunchDarklyFlagUsedHandler,cf as captureConsoleIntegration,bn as captureEvent,wt as captureException,ts as captureFeedback,$n as captureMessage,fo as captureSession,Up as chromeStackLineParser,xd as close,Af as consoleLoggingIntegration,MT as contextLinesIntegration,fd as continueTrace,Gi as createTransport,Nb as createUserFeedbackEnvelope,Ji as dedupeIntegration,aa as defaultRequestInstrumentationOptions,Hp as defaultStackLineParsers,fu as defaultStackParser,yR as diagnoseSdkConnectivity,Bi as endSession,pc as eventFiltersIntegration,jc as eventFromException,qc as eventFromMessage,Co as exceptionFromError,ff as extraErrorDataIntegration,Rf as featureFlagsIntegration,Zy as feedbackAsyncIntegration,dp as feedbackIntegration,dp as feedbackSyncIntegration,Rd as flush,uT as forceLoad,zi as functionToStringIntegration,Bp as geckoStackLineParser,te as getActiveSpan,v as getClient,M as getCurrentScope,qp as getDefaultIntegrations,ly as getFeedback,hn as getGlobalScope,ce as getIsolationScope,sw as getReplay,oe as getRootSpan,_n as getSpanDescendants,Oa as getSpanStatusFromHttpCode,br as getTraceData,gu as globalHandlersIntegration,HT as graphqlClientIntegration,ST as httpClientIntegration,_u as httpContextIntegration,qi as inboundFiltersIntegration,cT as init,ml as instrumentOutgoingRequests,gc as instrumentSupabaseClient,Fi as isEnabled,Cd as isInitialized,Pi as lastEventId,pR as launchDarklyIntegration,$c as lazyLoadIntegration,Su as linkedErrorsIntegration,fp as logger,qw as makeBrowserOfflineTransport,Fo as makeFetchTransport,Xd as makeMultiplexedTransport,af as moduleMetadataIntegration,lT as onLoad,hR as openFeatureIntegration,xb as opera10StackLineParser,kb as opera11StackLineParser,ac as parameterize,Ei as registerSpanErrorInstrumentation,TR as registerWebWorker,Iw as replayCanvasIntegration,ow as replayIntegration,hT as reportingObserverIntegration,_f as rewriteFramesIntegration,Kf as sendFeedback,Di as setContext,nc as setCurrentClient,Td as setExtra,bd as setExtras,nn as setHttpStatus,Ri as setMeasurement,vd as setTag,Id as setTags,wd as setUser,dT as showReportDialog,ed as spanToBaggageHeader,O as spanToJSON,gi as spanToTraceHeader,dR as spotlightBrowserIntegration,Fh as startBrowserTracingNavigationSpan,Ph as startBrowserTracingPageLoadSpan,mt as startInactiveSpan,md as startNewTrace,lo as startSession,Bn as startSpan,dd as startSpanManual,SR as statsigIntegration,Ef as supabaseIntegration,pd as suppressTracing,If as thirdPartyErrorFilterIntegration,gR as unleashIntegration,Jl as updateSpanName,bR as webWorkerIntegration,vb as winjsStackLineParser,Hn as withActiveSpan,Aa as withIsolationScope,Oe as withScope,bf as zodErrorsIntegration};
|