PageSourceSearch

https://www.deshkeyboard.com/hindi-typing/_next/static/chunks/56bf262f.5dd36bcd0bff1f91.js

js deshkeyboard.com collected 2026-10-09 04:49:14 UTC 415,238 bytes, 500 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9801],{1605:function(e,t,n){let r,i,o,s,a,l,u,c,d,p,f,h,m,g,y,_,v,b,S,k,w,x,E,T,C,I,M,A,R,O,L,P;n.r(t),n.d(t,{BrowserClient:function(){return lR},MULTIPLEXED_TRANSPORT_EXTRA_KEY:function(){return r2},OpenFeatureIntegrationHook:function(){return mo},SDK_VERSION:function(){return W},SEMANTIC_ATTRIBUTE_SENTRY_OP:function(){return tS},SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN:function(){return tk},SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE:function(){return tv},SEMANTIC_ATTRIBUTE_SENTRY_SOURCE:function(){return t_},Scope:function(){return ti},WINDOW:function(){return lh},addBreadcrumb:function(){return is},addEventProcessor:function(){return rs},addIntegration:function(){return rg},breadcrumbsIntegration:function(){return cv},browserApiErrorsIntegration:function(){return cS},browserProfilingIntegration:function(){return mt},browserSessionIntegration:function(){return cE},browserTracingIntegration:function(){return hO},buildLaunchDarklyFlagUsedHandler:function(){return mr},captureConsoleIntegration:function(){return iT},captureEvent:function(){return n5},captureException:function(){return n2},captureFeedback:function(){return i7},captureMessage:function(){return n3},captureSession:function(){return rc},chromeStackLineParser:function(){return co},close:function(){return rr},consoleLoggingIntegration:function(){return or},contextLinesIntegration:function(){return cG},continueTrace:function(){return nD},createConsolaReporter:function(){return oa},createLangChainCallbackHandler:function(){return sC},createTransport:function(){return rD},createUserFeedbackEnvelope:function(){return c_},cultureContextIntegration:function(){return cT},dedupeIntegration:function(){return iC},defaultRequestInstrumentationOptions:function(){return hT},defaultStackLineParsers:function(){return cm},defaultStackParser:function(){return cg},diagnoseSdkConnectivity:function(){return mc},endSession:function(){return rl},eventFiltersIntegration:function(){return ic},eventFromException:function(){return lC},eventFromMessage:function(){return lI},exceptionFromError:function(){return lk},extraErrorDataIntegration:function(){return iR},featureFlagsIntegration:function(){return i2},feedbackAsyncIntegration:function(){return lb},feedbackIntegration:function(){return lS},feedbackSyncIntegration:function(){return lS},flush:function(){return rn},forceLoad:function(){return c$},functionToStringIntegration:function(){return il},geckoStackLineParser:function(){return cl},getActiveSpan:function(){return nt},getClient:function(){return tg},getCurrentScope:function(){return td},getDefaultIntegrations:function(){return cD},getFeedback:function(){return ao},getGlobalScope:function(){return tf},getIsolationScope:function(){return tp},getReplay:function(){return f1},getRootSpan:function(){return ne}
1,getSpanDescendants:function(){return t9},getSpanStatusFromHttpCode:function(){return tM},getTraceData:function(){return io},globalHandlersIntegration:function(){return cC},graphqlClientIntegration:function(){return c1},growthbookIntegration:function(){return ml},httpClientIntegration:function(){return cq},httpContextIntegration:function(){return cO},inboundFiltersIntegration:function(){return id},init:function(){return cN},instrumentAnthropicAiClient:function(){return sl},instrumentGoogleGenAIClient:function(){return sg},instrumentLangGraph:function(){return sM},instrumentOpenAiClient:function(){return sn},instrumentOutgoingRequests:function(){return hC},instrumentSupabaseClient:function(){return iz},isEnabled:function(){return ro},isInitialized:function(){return ri},lastEventId:function(){return rt},launchDarklyIntegration:function(){return mn},lazyLoadIntegration:function(){return lv},linkedErrorsIntegration:function(){return cL},logger:function(){return oe},makeBrowserOfflineTransport:function(){return hz},makeFetchTransport:function(){return u8},makeMultiplexedTransport:function(){return r5},metrics:function(){return oo},moduleMetadataIntegration:function(){return ik},onLoad:function(){return cF},openFeatureIntegration:function(){return mi},opera10StackLineParser:function(){return cp},opera11StackLineParser:function(){return ch},parameterize:function(){return ir},registerSpanErrorInstrumentation:function(){return no},registerWebWorker:function(){return mf},replayCanvasIntegration:function(){return hS},replayIntegration:function(){return fZ},reportPageLoaded:function(){return hF},reportingObserverIntegration:function(){return cU},rewriteFramesIntegration:function(){return iD},sendFeedback:function(){return s6},setActiveSpanInBrowser:function(){return hj},setContext:function(){return n4},setCurrentClient:function(){return r1},setExtra:function(){return n8},setExtras:function(){return n6},setHttpStatus:function(){return tA},setMeasurement:function(){return nE},setTag:function(){return n9},setTags:function(){return n7},setUser:function(){return re},showReportDialog:function(){return cj},spanToBaggageHeader:function(){return nh},spanToJSON:function(){return t3},spanToTraceHeader:function(){return tQ},spotlightBrowserIntegration:function(){return cP},startBrowserTracingNavigationSpan:function(){return hP},startBrowserTracingPageLoadSpan:function(){return hL},startInactiveSpan:function(){return nP},startNewTrace:function(){return nF},startSession:function(){return ra},startSpan:function(){return nO},startSpanManual:function(){return nL},statsigIntegration:function(){return mu},supabaseIntegration:function(){return iW},suppressTracing:function(){return n$},thirdPartyErrorFilterIntegration:function(){return iG},uiProfiler:function(){return u9},unleashIntegration:function(){return ms},updateSpanName:function(){return nr},webWorkerIntegration:function(){return md},winjsStackLineParser:function(){return cc},withActiveSpan:function(){return nN},withIsolationScope:function(){return tm},withScope:function(){return th},zodErrorsIntegration:function(){return iV}});var D,N,$,F,j,B,U,q=n(257);!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{};e.SENTRY_RELEASE={id:"2.4.21"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="4f729ec4-4ee9-434f-9b82-e752380ddc57",e._sentryDebugIdIdentifier="sentry-dbid-4f729ec4-4ee9-434f-9b82-e752380ddc57")}catch{}}();let z=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,H=globalThis,W="10.39.0";function J(){return V(H),H}function V(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||W,t[W]=t[W]||{}}function G(e,t,n=H){let r=n.__SENTRY__=n.__SENTRY__||{},i=r[W]=r[W]||{};return i[e]||(i[e]=t())}let K=["debug","info","warn","error","log","assert","trace"],Y={};function X(e){if(!("console"in H))return e();let t=H.console,n={},r=Object.keys(Y);r.forEach(e=>{let r=Y[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}function Z(){return ee().enabled}function Q(e,...t){z&&Z()&&X(()=>{H.console[e](`Sentry Logger [${e}]:`,...t)})}function ee(){return z?G("loggerSettings",()=>({enabled:!1})):{enabled:!1}}let et={enable:function(){ee().enabled=!0},disable:function(){ee().enabled=!1},isEnabled:Z,log:function(...e){Q("log",...e)},warn:function(...e){Q("warn",...e)},error:function(...e){Q("error",...e)}},en=/\(error: (.*)\)/,er=/captureMessage|captureException/;function ei(...e){let t=e.sort((e,t)=>
1e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{let i=[],o=e.split(`
2`);for(let e=n;e<o.length;e++){let n=o[e];n.length>1024&&(n=n.slice(0,1024));let s=en.test(n)?n.replace(en,"$1"):n;if(!s.match(/\S*Error: /)){for(let e of t){let t=e(s);if(t){i.push(t);break}}if(i.length>=50+r)break}}return function(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(eo(t).function||"")&&t.pop(),t.reverse(),er.test(eo(t).function||"")&&(t.pop(),er.test(eo(t).function||"")&&t.pop()),t.slice(0,50).map(e=>({...e,filename:e.filename||eo(t).filename,function:e.function||"?"}))}(i.slice(r))}}function eo(e){return e[e.length-1]||{}}let es="<anonymous>";function ea(e){try{return e&&"function"==typeof e&&e.name||es}catch{return es}}function el(e){let t=e.exception;if(t){let e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}function eu(e){return"__v_isVNode"in e&&e.__v_isVNode?"[VueVNode]":"[VueViewModel]"}let ec={},ed={};function ep(e,t){ec[e]=ec[e]||[],ec[e].push(t)}function ef(e,t){if(!ed[e]){ed[e]=!0;try{t()}catch(t){z&&et.error(`Error while instrumenting ${e}`,t)}}}function eh(e,t){let n=e&&ec[e];if(n)for(let r of n)try{r(t)}catch(t){z&&et.error(`Error while triggering instrumentation handler.
3Type: ${e}
4Name: ${ea(r)}
5Error:`,t)}}let em=null;function eg(e){let t="error";ep(t,e),ef(t,ey)}function ey(){em=H.onerror,H.onerror=function(e,t,n,r,i){return eh("error",{column:r,error:i,line:n,msg:e,url:t}),!!em&&em.apply(this,arguments)},H.onerror.__SENTRY_INSTRUMENTED__=!0}let e_=null;function ev(e){let t="unhandledrejection";ep(t,e),ef(t,eb)}function eb(){e_=H.onunhandledrejection,H.onunhandledrejection=function(e){return eh("unhandledrejection",e),!e_||e_.apply(this,arguments)},H.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}let eS=Object.prototype.toString;function ek(e){switch(eS.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return eO(e,Error)}}function ew(e,t){return eS.call(e)===`[object ${t}]`}function ex(e){return ew(e,"ErrorEvent")}function eE(e){return ew(e,"DOMError")}function eT(e){return ew(e,"String")}function eC(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function eI(e){return null===e||eC(e)||"object"!=typeof e&&"function"!=typeof e}function eM(e){return ew(e,"Object")}function eA(e){return"u">typeof Event&&eO(e,Event)}function eR(e){return!!(null!=e&&e.then&&"function"==typeof e.then)}function eO(e,t){try{return e instanceof t}catch{return!1}}function eL(e){return!!("object"==typeof e&&null!==e&&(e.__isVue||e._isVue||e.__v_isVNode))}function eP(e){return"u">typeof Request&&eO(e,Request)}function eD(e,t={}){if(!e)return"<unknown>";try{let n,r=e,i=[],o=0,s=0,a=Array.isArray(t)?t:t.keyAttrs,l=!Array.isArray(t)&&t.maxStringLength||80;for(;r&&o++<5&&(n=function(e,t){let n=[];if(!(null!=e&&e.tagName))return"";if(H.HTMLElement&&e instanceof HTMLElement&&e.dataset){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}n.push(e.tagName.toLowerCase());let r=null!=t&&t.length?t.filter(t=>e.getAttribute(t)).map(t=>[t,e.getAttribute(t)]):null;if(null!=r&&r.length)r.forEach(e=>{n.push(`[${e[0]}="${e[1]}"]`)});else{e.id&&n.push(`#${e.id}`);let t=e.className;if(t&&eT(t))for(let e of t.split(/\s+/))n.push(`.${e}`)}for(let t of["aria-label","type","name","title","alt"]){let r=e.getAttribute(t);r&&n.push(`[${t}="${r}"]`)}return n.join("")}(r,a),!("html"===n||o>1&&s+3*i.length+n.length>=l));)i.push(n),s+=n.length,r=r.parentNode;return i.reverse().join(" > ")}catch{return"<unknown>"}}function eN(){try{return H.document.location.href}catch{return""}}function e$(e){if(!H.HTMLElement)return null;let t=e;for(let e=0;e<5&&t;e++){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 eF(e,t,n){if(!(t in e))return;let r=e[t];if("function"!=typeof r)return;let i=n(r);"function"==typeof i&&eB(i,r);try{e[t]=i}catch{z&&et.log(`Failed to replace method "${t}" in object`,e)}}
5function ej(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{z&&et.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function eB(e,t){try{let n=t.prototype||{};e.prototype=t.prototype=n,ej(e,"__sentry_original__",t)}catch{}}function eU(e){return e.__sentry_original__}function eq(e){if(ek(e))return{message:e.message,name:e.name,stack:e.stack,...eH(e)};if(!eA(e))return e;{let t={type:e.type,target:ez(e.target),currentTarget:ez(e.currentTarget),...eH(e)};return"u">typeof CustomEvent&&eO(e,CustomEvent)&&(t.detail=e.detail),t}}function ez(e){try{return"u">typeof Element&&eO(e,Element)?eD(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function eH(e){if("object"!=typeof e||null===e)return{};{let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}}function eW(e){if(void 0!==r)return r?r(e):e();let t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__");return t in H&&"function"==typeof H[t]?(r=H[t])(e):(r=null,e())}function eJ(){return eW(()=>Math.random())}function eV(){return eW(()=>Date.now())}function eG(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function eK(e,t){let n=e,r=n.length;if(r<=150)return n;t>r&&(t=r);let i=Math.max(t-60,0);i<5&&(i=0);let o=Math.min(i+140,r);return o>r-5&&(o=r),o===r&&(i=Math.max(o-140,0)),n=n.slice(i,o),i>0&&(n=`'{snip} ${n}`),o<r&&(n+=" {snip}"),n}function eY(e,t){if(!Array.isArray(e))return"";let n=[];for(let t=0;t<e.length;t++){let r=e[t];try{eL(r)?n.push(eu(r)):n.push(String(r))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function eX(e,t,n=!1){return!!eT(e)&&(ew(t,"RegExp")?t.test(e):!!eT(t)&&(n?e===t:e.includes(t)))}function eZ(e,t=[],n=!1){return t.some(t=>eX(e,t,n))}function eQ(e=H.crypto||H.msCrypto){try{if(null!=e&&e.randomUUID)return eW(()=>e.randomUUID()).replace(/-/g,"")}catch{}return i||(i="10000000100040008000100000000000"),i.replace(/[018]/g,e=>(e^(15&16*eJ())>>e/4).toString(16))}function e0(e){var t,n;return null==(n=null==(t=e.exception)?void 0:t.values)?void 0:n[0]}function e1(e){let{message:t,event_id:n}=e;if(t)return t;let r=e0(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function e2(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type=n||"Error")}function e3(e,t){let n=e0(e);if(!n)return;let r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){let e={...null==r?void 0:r.data,...t.data};n.mechanism.data=e}}function e5(e){if(function(e){try{return e.__sentry_captured__}catch{}}(e))return!0;try{ej(e,"__sentry_captured__",!0)}catch{}return!1}function e4(){return eV()/1e3}function e6(){return(o??(o=function(){let{performance:e}=H;if(!(null!=e&&e.now)||!e.timeOrigin)return e4;let t=e.timeOrigin;return()=>(t+eW(()=>e.now()))/1e3}()))()}let e8=null;function e7(){return null===e8&&(e8=function(){var e;let{performance:t}=H;if(!(null!=t&&t.now))return;let n=eW(()=>t.now()),r=eV(),i=t.timeOrigin;if("number"==typeof i&&3e5>Math.abs(i+n-r))return i;let o=null==(e=t.timing)?void 0:e.navigationStart;return"number"==typeof o&&3e5>Math.abs(o+n-r)?o:r-n}()),e8}function e9(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||e6(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:eQ()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{let t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function te(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&0===Object.keys(t).length)return e;let r={...e};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=te(r[e],t[e],n-1));return r}function tt(){return eQ().substring(16)}let tn="_sentrySpan";function tr(e,t){t?ej(e,tn,t):delete e[tn]}class ti{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:eQ(),sampleRand:eJ()}}clone(){let e=new ti;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._attributes={...this._attributes},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,e._conversationId=this._conversationId,tr(e,this[tn]),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&e9(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(e){return this._conversationId=e||void 0,this._notifyScopeListeners(),this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],this._notifyScopeListeners()),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;let t="function"==typeof e?e(this):e,{tags:n,attributes:r,extra:i,user:o,contexts:s,level:a,fingerprint:l=[],propagationContext:u,conversationId:c}=(t instanceof ti?t.getScopeData():eM(t)?e:void 0)||{};return this._tags={...this._tags,...n},this._attributes={...this._attributes,...r},this._extra={...this._extra,...i},this._contexts={...this._contexts,...s},o&&Object.keys(o).length&&(this._user=o),a&&(this._level=a),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),c&&(this._conversationId=c),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,tr(this,void 0),this._attachments=[],this.setPropagationContext({traceId:eQ(),sampleRand:eJ()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){var n;let r="number"==typeof t?t:100;if(r<=0)return this;let i={timestamp:e4(),...e,message:e.message?eG(e.message,2048):e.message};return this._breadcrumbs.push(i),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),null==(n=this._client)||n.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:this[tn],conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=te(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){let n=(null==t?void 0:t.event_id)||eQ();if(!this._client)return z&&et.warn("No client configured on scope - will not capture exception!"),n;let r=Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){let r=(null==n?void 0:n.event_id)||eQ();if(!this._client)return z&&et.warn("No client configured on scope - will not capture message!"),r;let i=(null==n?void 0:n.syntheticException)??Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},this),r}
5captureEvent(e,t){let n=e.event_id||(null==t?void 0:t.event_id)||eQ();return this._client?this._client.captureEvent(e,{...t,event_id:n},this):z&&et.warn("No client configured on scope - will not capture event!"),n}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}}class to{constructor(e,t){let n,r;n=e||new ti,r=t||new ti,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t;let n=this._pushScope();try{t=e(n)}catch(e){throw this._popScope(),e}return eR(t)?t.then(e=>(this._popScope(),e),e=>{throw this._popScope(),e}):(this._popScope(),t)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function ts(){let e=V(J());return e.stack=e.stack||new to(G("defaultCurrentScope",()=>new ti),G("defaultIsolationScope",()=>new ti))}function ta(e){return ts().withScope(e)}function tl(e,t){let n=ts();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function tu(e){return ts().withScope(()=>e(ts().getIsolationScope()))}function tc(e){let t=V(e);return t.acs?t.acs:{withIsolationScope:tu,withScope:ta,withSetScope:tl,withSetIsolationScope:(e,t)=>tu(t),getCurrentScope:()=>ts().getScope(),getIsolationScope:()=>ts().getIsolationScope()}}function td(){return tc(J()).getCurrentScope()}function tp(){return tc(J()).getIsolationScope()}function tf(){return G("globalScope",()=>new ti)}function th(...e){let t=tc(J());if(2===e.length){let[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function tm(...e){let t=tc(J());if(2===e.length){let[n,r]=e;return n?t.withSetIsolationScope(n,r):t.withIsolationScope(r)}return t.withIsolationScope(e[0])}function tg(){return td().getClient()}function ty(e){let{traceId:t,parentSpanId:n,propagationSpanId:r}=e.getPropagationContext(),i={trace_id:t,span_id:r||tt()};return n&&(i.parent_span_id=n),i}let t_="sentry.source",tv="sentry.sample_rate",tb="sentry.previous_trace_sample_rate",tS="sentry.op",tk="sentry.origin",tw="sentry.idle_span_finish_reason",tx="sentry.measurement_unit",tE="sentry.measurement_value",tT="sentry.custom_span_name",tC="sentry.profile_id",tI="sentry.exclusive_time";function tM(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"}}return{code:2,message:"internal_error"}}function tA(e,t){e.setAttribute("http.response.status_code",t);let n=tM(t);"unknown_error"!==n.message&&e.setStatus(n)}let tR="_sentryScope",tO="_sentryIsolationScope";function tL(e){return{scope:e[tR],isolationScope:function(e){if(e){if("object"==typeof e&&"deref"in e&&"function"==typeof e.deref)try{return e.deref()}catch{return}return e}}(e[tO])}}let tP="sentry-",tD=/^sentry-/;function tN(e){let t=function(e){if(!(!e||!eT(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>(Object.entries(tF(t)).forEach(([t,n])=>{e[t]=n}),e),{}):tF(e)}(e);if(!t)return;let n=Object.entries(t).reduce((e,[t,n])=>(t.match(tD)&&(e[t.slice(tP.length)]=n),e),{});if(Object.keys(n).length>0)return n}function t$(e){if(e)return function(e){if(0!==Object.keys(e).length)return Object.entries(e).reduce((e,[t,n],r)=>{let i=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`,o=0===r?i:`${e},${i}`;return o.length>8192?(z&&et.warn(`Not adding key: ${t} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):o},"")}(Object.entries(e).reduce((e,[t,n])=>(n&&(e[`${tP}${t}`]=n),e),{}))}function tF(e){return e.split(",").map(e=>{let t=e.indexOf("=");return -1===t?[]:[e.slice(0,t),e.slice(t+1)].map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})}).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}let tj=/^o(\d+)\./,tB=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function tU(e,t=!1){let{host:n,path:r,pass:i,port:o,projectId:s,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${s}`}function tq(e){let t=tB.exec(e);if(!t){X(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,i="",o="",s="",a=""]=t.slice(1),l="",u=a,c=u.split("/");if(c.length>1&&(l=c.slice(0,-1).join("/"),u=c.pop()),u){let e=u.match(/^\d+/);e&&(u=e[0])}return tz({host:o,pass:i,path:l,projectId:u,port:s,protocol:n,publicKey:r})}function tz(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function tH(e){let t;let n=e.getOptions(),{host:r}=e.getDsn()||{};return n.orgId?t=String(n.orgId):r&&(t=function(e){let t=e.match(tj);return null==t?void 0:t[1]}(r)),t}function tW(e){let t="string"==typeof e?tq(e):tz(e);if(!(!t||!function(e){if(!z)return!0;let{port:t,projectId:n,protocol:r}=e;return!["protocol","publicKey","host","projectId"].find(t=>!e[t]&&(et.error(`Invalid Sentry Dsn: ${t} missing`),!0))&&(n.match(/^\d+$/)?"http"===r||"https"===r?!(t&&isNaN(parseInt(t,10)))||(et.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):(et.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(et.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1))}(t)))return t}function tJ(e){if("boolean"==typeof e)return Number(e);let t="string"==typeof e?parseFloat(e):e;if(!("number"!=typeof t||isNaN(t)||t<0||t>1))return t}let tV=RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function tG(e,t){let n=function(e){let t;if(!e)return;let n=e.match(tV);if(n)return"1"===n[3]?t=!0:"0"===n[3]&&(t=!1),{traceId:n[1],parentSampled:t,parentSpanId:n[2]}}(e),r=tN(t);if(!(null!=n&&n.traceId))return{traceId:eQ(),sampleRand:eJ()};let i=function(e,t){let n=tJ(null==t?void 0:t.sample_rand);if(void 0!==n)return n;let r=tJ(null==t?void 0:t.sample_rate);return r&&(null==e?void 0:e.parentSampled)!==void 0?e.parentSampled?eJ()*r:r+eJ()*(1-r):eJ()}(n,r);r&&(r.sample_rand=i.toString());let{traceId:o,parentSpanId:s,parentSampled:a}=n;return{traceId:o,parentSpanId:s,sampled:a,dsc:r||{},sampleRand:i}}function tK(e=eQ(),t=tt(),n){let r="";return void 0!==n&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function tY(e=eQ(),t=tt(),n){return`00-${e}-${t}-${n?"01":"00"}`}let tX=!1;function tZ(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:t3(e).parent_span_id,o=tL(e).scope;return{parent_span_id:i,span_id:r?(null==o?void 0:o.getPropagationContext().propagationSpanId)||tt():t,trace_id:n}}function tQ(e){let{traceId:t,spanId:n}=e.spanContext();return tK(t,n,t5(e))}function t0(e){if(e&&e.length>0)return e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:i})=>({span_id:e,trace_id:t,sampled:1===n,attributes:i,...r}))}function t1(e){return"number"==typeof e?t2(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?t2(e.getTime()):e6()}function t2(e){return e>9999999999?e/1e3:e}function t3(e){var t;if("function"==typeof e.getSpanJSON)return e.getSpanJSON();let{spanId:n,traceId:r}=e.spanContext();if(e.attributes&&e.startTime&&e.name&&e.endTime&&e.status){let{attributes:i,startTime:o,name:s,endTime:a,status:l,links:u}=e;return{span_id:n,trace_id:r,data:i,description:s,parent_span_id:"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?null==(t=e.parentSpanContext)?void 0:t.spanId:void 0,start_timestamp:t1(o),timestamp:t1(a)||void 0,status:t4(l),op:i[tS],origin:i[tk],links:t0(u)}}return{span_id:n,trace_id:r,start_timestamp:0,data:{}}}function t5(e){let{traceFlags:t}=e.spanContext();return 1===t}function t4(e){if(!(!e||0===e.code))return 1===e.code?"ok":e.message||"internal_error"}let t6="_sentryChildSpans",t8="_sentryRootSpan";function t7(e,t){let n=e[t8]||e;ej(t,t8,n),e[t6]?e[t6].add(t):ej(e,t6,new Set([t]))}function t9(e){let t=new Set;return function e(n){if(!t.has(n)&&t5(n))for(let r of(t.add(n),n[t6]?Array.from(n[t6]):[]))e(r)}(e),Array.from(t)}function ne(e){return e[t8]||e}function nt(){let e=tc(J());return e.getActiveSpan?e.getActiveSpan():td()[tn]}function nn(){tX||(X(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),tX=!0)}function nr(e,t){e.updateName(t),e.setAttributes({[t_]:"custom",[tT]:t})}let ni=!1;function no(){ni||(e.tag="sentry_tracingErrorCallback",ni=!0,eg(e),ev(e));function e(){let e=nt(),t=e&&ne(e);if(t){let e="internal_error";z&&et.log(`[Tracing] Root span: ${e} -> Global error occurred`),t.setStatus({code:2,message:e})}}}function ns(e){var t;if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;let n=e||(null==(t=tg())?void 0:t.getOptions());return!!n&&(null!=n.tracesSampleRate||!!n.tracesSampler)}function na(e){et.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function nl(e,t){if(!(null!=t&&t.length)||!e.description)return!1;
5for(let n of t){if("string"==typeof n||n instanceof RegExp){if(eX(e.description,n))return z&&na(e),!0;continue}if(!n.name&&!n.op)continue;let t=!n.name||eX(e.description,n.name),r=!n.op||e.op&&eX(e.op,n.op);if(t&&r)return z&&na(e),!0}return!1}let nu="production",nc="_frozenDsc";function nd(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||nu,release:n.release,public_key:r,trace_id:e,org_id:tH(t)};return t.emit("createDsc",i),i}function np(e,t){let n=t.getPropagationContext();return n.dsc||nd(n.traceId,e)}function nf(e){var t;let n=tg();if(!n)return{};let r=ne(e),i=t3(r),o=i.data,s=r.spanContext().traceState,a=(null==s?void 0:s.get("sentry.sample_rate"))??o[tv]??o[tb];function l(e){return("number"==typeof a||"string"==typeof a)&&(e.sample_rate=`${a}`),e}let u=r[nc];if(u)return l(u);let c=null==s?void 0:s.get("sentry.dsc"),d=c&&tN(c);if(d)return l(d);let p=nd(e.spanContext().traceId,n),f=o[t_],h=i.description;return"url"!==f&&h&&(p.transaction=h),ns()&&(p.sampled=String(t5(r)),p.sample_rand=(null==s?void 0:s.get("sentry.sample_rand"))??(null==(t=tL(r).scope)?void 0:t.getPropagationContext().sampleRand.toString())),l(p),n.emit("createDsc",p,r),p}function nh(e){return t$(nf(e))}class nm{constructor(e={}){this._traceId=e.traceId||eQ(),this._spanId=e.spanId||tt()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,t,n){return this}addLink(e){return this}addLinks(e){return this}recordException(e,t){}}function ng(e,t=100,n=1/0){try{return function e(t,n,r=1/0,i=1/0,o=function(){let e=new WeakSet;return[function(t){return!!e.has(t)||(e.add(t),!1)},function(t){e.delete(t)}]}()){let[s,a]=o;if(null==n||["boolean","string"].includes(typeof n)||"number"==typeof n&&Number.isFinite(n))return n;let l=function(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if("u">typeof global&&t===global)return"[Global]";if("u">typeof window&&t===window)return"[Window]";if("u">typeof document&&t===document)return"[Document]";if(eL(t))return eu(t);if(eM(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t)return"[SyntheticEvent]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${ea(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;let n=function(e){let t=Object.getPrototypeOf(e);return null!=t&&t.constructor?t.constructor.name:"null prototype"}(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(e){return`**non-serializable** (${e})`}}(t,n);if(!l.startsWith("[object "))return l;if(n.__sentry_skip_normalization__)return n;let u="number"==typeof n.__sentry_override_normalization_depth__?n.__sentry_override_normalization_depth__:r;if(0===u)return l.replace("object ","");if(s(n))return"[Circular ~]";if(n&&"function"==typeof n.toJSON)try{let t=n.toJSON();return e("",t,u-1,i,o)}catch{}let c=Array.isArray(n)?[]:{},d=0,p=eq(n);for(let t in p){if(!Object.prototype.hasOwnProperty.call(p,t))continue;if(d>=i){c[t]="[MaxProperties ~]";break}let n=p[t];c[t]=e(t,n,u-1,i,o),d++}return a(n),c}("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function ny(e,t=[]){return[e,t]}function n_(e,t){for(let n of e[1]){let e=n[0].type;if(t(n,e))return!0}return!1}function nv(e,t){return n_(e,(e,n)=>t.includes(n))}function nb(e){let t=V(H);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function nS(e){let[t,n]=e,r=JSON.stringify(t);function i(e){"string"==typeof r?r="string"==typeof e?r+e:[nb(r),e]:r.push("string"==typeof e?nb(e):e)}for(let e of n){let[t,n]=e;if(i(`
6${JSON.stringify(t)}
7`),"string"==typeof n||n instanceof Uint8Array)i(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(ng(n))}i(e)}}return"string"==typeof r?r:function(e){let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),n=0;for(let r of e)t.set(r,n),n+=r.length;return t}(r)}let nk={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",metric:"metric",trace_metric:"metric"};function nw(e){if(!(null!=e&&e.sdk))return;
7let{name:t,version:n}=e.sdk;return{name:t,version:n}}function nx(e,t,n,r){var i;let o=null==(i=e.sdkProcessingMetadata)?void 0:i.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:tU(r)},...o&&{trace:o}}}function nE(e,t,n,r=nt()){let i=r&&ne(r);i&&(z&&et.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),i.addEvent(e,{[tE]:t,[tx]:n}))}function nT(e){if(!e||0===e.length)return;let t={};return e.forEach(e=>{let n=e.attributes||{},r=n[tx],i=n[tE];"string"==typeof r&&"number"==typeof i&&(t[e.name]={value:i,unit:r})}),t}class nC{constructor(e={}){this._traceId=e.traceId||eQ(),this._spanId=e.spanId||tt(),this._startTime=e.startTimestamp||e6(),this._links=e.links,this._attributes={},this.setAttributes({[tk]:"manual",[tS]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this._links?this._links.push(e):this._links=[e],this}addLinks(e){return this._links?this._links.push(...e):this._links=e,this}recordException(e,t){}spanContext(){let{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:n?1:0}}setAttribute(e,t){return void 0===t?delete this._attributes[e]:this._attributes[e]=t,this}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._startTime=t1(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this.setAttribute(t_,"custom"),this}end(e){this._endTime||(this._endTime=t1(e),function(e){if(!z)return;let{description:t="< unknown name >",op:n="< unknown op >"}=t3(e),{spanId:r}=e.spanContext(),i=ne(e)===e,o=`[Tracing] Finishing "${n}" ${i?"root ":""}span "${t}" with ID ${r}`;et.log(o)}(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[tS],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:t4(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[tk],profile_id:this._attributes[tC],exclusive_time:this._attributes[tI],measurements:nT(this._events),is_segment:this._isStandaloneSpan&&ne(this)===this||void 0,segment_id:this._isStandaloneSpan?ne(this).spanContext().spanId:void 0,links:t0(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,t,n){z&&et.log("[Tracing] Adding an event to span:",e);let r=nI(t)?t:n||e6(),i=nI(t)?{}:t||{},o={name:e,time:t1(r),attributes:i};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){let e=tg();if(e&&e.emit("spanEnd",this),!(this._isStandaloneSpan||this===ne(this)))return;if(this._isStandaloneSpan){this._sampled?function(e){let t=tg();if(!t)return;let n=e[1];if(!n||0===n.length){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}(function(e,t){let n=nf(e[0]),r=null==t?void 0:t.getDsn(),i=null==t?void 0:t.getOptions().tunnel,o={sent_at:new Date().toISOString(),...!!n.trace_id&&!!n.public_key&&{trace:n},...!!i&&r&&{dsn:tU(r)}},{beforeSendSpan:s,ignoreSpans:a}=(null==t?void 0:t.getOptions())||{},l=null!=a&&a.length?e.filter(e=>!nl(t3(e),a)):e,u=e.length-l.length;u&&(null==t||t.recordDroppedEvent("before_send","span",u));let c=s?e=>{let t=t3(e);return s(t)||(nn(),t)}:t3,d=[];for(let e of l){let t=c(e);t&&d.push([{type:"span"},t])}return ny(o,d)}([this],e)):(z&&et.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),e&&e.recordDroppedEvent("sample_rate","span"));return}let t=this._convertSpanToTransaction();t&&(tL(this).scope||td()).captureEvent(t)}_convertSpanToTransaction(){var e;if(!nM(t3(this)))return;this._name||(z&&et.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");let{scope:t,isolationScope:n}=tL(this),r=null==(e=null==t?void 0:t.getScopeData().sdkProcessingMetadata)?void 0:e.normalizedRequest;if(!0!==this._sampled)return;let i=t9(this).filter(e=>e!==this&&!(e instanceof nC&&e.isStandaloneSpan())).map(e=>t3(e)).filter(nM),o=this._attributes[t_];
7delete this._attributes[tT],i.forEach(e=>{delete e.data[tT]});let s={contexts:{trace:function(e){let{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:o,status:s,origin:a,links:l}=t3(e);return{parent_span_id:o,span_id:t,trace_id:n,data:r,op:i,status:s,origin:a,links:l}}(this)},spans:i.length>1e3?i.sort((e,t)=>e.start_timestamp-t.start_timestamp).slice(0,1e3):i,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:nf(this)},request:r,...o&&{transaction_info:{source:o}}},a=nT(this._events);return a&&Object.keys(a).length&&(z&&et.log("[Measurements] Adding measurements to transaction event",JSON.stringify(a,void 0,2)),s.measurements=a),s}}function nI(e){return e&&"number"==typeof e||e instanceof Date||Array.isArray(e)}function nM(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function nA(e,t,n=()=>{},r=()=>{}){var i;let o;try{o=e()}catch(e){throw t(e),n(),e}return eR(i=o)?i.then(e=>(n(),r(e),e),e=>{throw t(e),n(),e}):(n(),r(i),i)}let nR="__SENTRY_SUPPRESS_TRACING__";function nO(e,t){let n=nU();if(n.startSpan)return n.startSpan(e,t);let r=nB(e),{forceTransaction:i,parentSpan:o,scope:s}=e;return th(null==s?void 0:s.clone(),()=>nH(o)(()=>{let n=td(),s=nz(n,o),a=e.onlyIfParent&&!s?new nm:nj({parentSpan:s,spanArguments:r,forceTransaction:i,scope:n});return tr(n,a),nA(()=>t(a),()=>{let{status:e}=t3(a);a.isRecording()&&(!e||"ok"===e)&&a.setStatus({code:2,message:"internal_error"})},()=>{a.end()})}))}function nL(e,t){let n=nU();if(n.startSpanManual)return n.startSpanManual(e,t);let r=nB(e),{forceTransaction:i,parentSpan:o,scope:s}=e;return th(null==s?void 0:s.clone(),()=>nH(o)(()=>{let n=td(),s=nz(n,o),a=e.onlyIfParent&&!s?new nm:nj({parentSpan:s,spanArguments:r,forceTransaction:i,scope:n});return tr(n,a),nA(()=>t(a,()=>a.end()),()=>{let{status:e}=t3(a);a.isRecording()&&(!e||"ok"===e)&&a.setStatus({code:2,message:"internal_error"})})}))}function nP(e){let t=nU();if(t.startInactiveSpan)return t.startInactiveSpan(e);let n=nB(e),{forceTransaction:r,parentSpan:i}=e;return(e.scope?t=>th(e.scope,t):void 0!==i?e=>nN(i,e):e=>e())(()=>{let t=td(),o=nz(t,i);return e.onlyIfParent&&!o?new nm:nj({parentSpan:o,spanArguments:n,forceTransaction:r,scope:t})})}let nD=(e,t)=>{let n=tc(J());if(n.continueTrace)return n.continueTrace(e,t);let{sentryTrace:r,baggage:i}=e,o=tg(),s=tN(i);return o&&!function(e,t){let n=tH(e);return t&&n&&t!==n?(et.log(`Won't continue trace because org IDs don't match (incoming baggage: ${t}, SDK options: ${n})`),!1):!e.getOptions().strictTraceContinuation||(!t||!!n)&&(!!t||!n)||(et.log(`Starting a new trace because strict trace continuation is enabled but one org ID is missing (incoming baggage: ${t}, Sentry client: ${n})`),!1)}(o,null==s?void 0:s.org_id)?nF(t):th(e=>{let n=tG(r,i);return e.setPropagationContext(n),tr(e,void 0),t()})};function nN(e,t){let n=nU();return n.withActiveSpan?n.withActiveSpan(e,t):th(n=>(tr(n,e||void 0),t(n)))}function n$(e){let t=nU();return t.suppressTracing?t.suppressTracing(e):th(t=>{t.setSDKProcessingMetadata({[nR]:!0});let n=e();return t.setSDKProcessingMetadata({[nR]:void 0}),n})}function nF(e){return th(t=>(t.setPropagationContext({traceId:eQ(),sampleRand:eJ()}),z&&et.log(`Starting a new trace with id ${t.getPropagationContext().traceId}`),nN(null,e)))}function nj({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){var i;let o;if(!ns()){let r=new nm;if(n||!e){let e={sampled:"false",sample_rate:"0",transaction:t.name,...nf(r)};ej(r,nc,e)}return r}let s=tp();if(e&&!n)o=function(e,t,n){let{spanId:r,traceId:i}=e.spanContext(),o=!t.getScopeData().sdkProcessingMetadata[nR]&&t5(e),s=o?new nC({...n,parentSpanId:r,traceId:i,sampled:o}):new nm({traceId:i});t7(e,s);let a=tg();return a&&(a.emit("spanStart",s),n.endTimestamp&&a.emit("spanEnd",s)),s}(e,r,t),t7(e,o);else if(e){let n=nf(e),{traceId:i,spanId:s}=e.spanContext(),a=t5(e);ej(o=nq({traceId:i,parentSpanId:s,...t},r,a),nc,n)}else{let{traceId:e,dsc:n,parentSpanId:i,sampled:a}={...s.getPropagationContext(),...r.getPropagationContext()};o=nq({traceId:e,parentSpanId:i,...t},r,a),n&&ej(o,nc,n)}return function(e){if(!z)return;let{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=t3(e),{spanId:i}=e.spanContext(),o=t5(e),s=ne(e),a=s===e,l=`[Tracing] Starting ${o?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${i}`];
7if(r&&u.push(`parent ID: ${r}`),!a){let{op:e,description:t}=t3(s);u.push(`root ID: ${s.spanContext().spanId}`),e&&u.push(`root op: ${e}`),t&&u.push(`root description: ${t}`)}et.log(`${l}
8  ${u.join(`
9  `)}`)}(o),(i=o)&&(ej(i,tO,function(e){try{let t=H.WeakRef;if("function"==typeof t)return new t(e)}catch{}return e}(s)),ej(i,tR,r)),o}function nB(e){let t={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){let n={...t};return n.startTimestamp=t1(e.startTime),delete n.startTime,n}return t}function nU(){return tc(J())}function nq(e,t,n){var r;let i=tg(),o=(null==i?void 0:i.getOptions())||{},{name:s=""}=e,a={spanAttributes:{...e.attributes},spanName:s,parentSampled:n};null==i||i.emit("beforeSampling",a,{decision:!1});let l=a.parentSampled??n,u=a.spanAttributes,c=t.getPropagationContext(),[d,p,f]=t.getScopeData().sdkProcessingMetadata[nR]?[!1]:function(e,t,n){let r,i;if(!ns(e))return[!1];"function"==typeof e.tracesSampler?(i=e.tracesSampler({...t,inheritOrSampleWith:e=>"number"==typeof t.parentSampleRate?t.parentSampleRate:"boolean"==typeof t.parentSampled?Number(t.parentSampled):e}),r=!0):void 0!==t.parentSampled?i=t.parentSampled:"u">typeof e.tracesSampleRate&&(i=e.tracesSampleRate,r=!0);let o=tJ(i);if(void 0===o)return z&&et.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(i)} of type ${JSON.stringify(typeof i)}.`),[!1];if(!o)return z&&et.log(`[Tracing] Discarding transaction because ${"function"==typeof e.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,o,r];let s=n<o;return s||z&&et.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(i)})`),[s,o,r]}(o,{name:s,parentSampled:l,attributes:u,parentSampleRate:tJ(null==(r=c.dsc)?void 0:r.sample_rate)},c.sampleRand),h=new nC({...e,attributes:{[t_]:"custom",[tv]:void 0!==p&&f?p:void 0,...u},sampled:d});return!d&&i&&(z&&et.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),i.recordDroppedEvent("sample_rate","transaction")),i&&i.emit("spanStart",h),h}function nz(e,t){if(t)return t;if(null===t)return;let n=e[tn];if(!n)return;let r=tg();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?ne(n):n}function nH(e){return void 0!==e?t=>nN(e,t):e=>e()}let nW={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3};function nJ(e,t={}){let n=new Map,r=!1,i,o="externalFinish",s=!t.disableAutoFinish,a=[],{idleTimeout:l=nW.idleTimeout,finalTimeout:u=nW.finalTimeout,childSpanTimeout:c=nW.childSpanTimeout,beforeSpanEnd:d,trimIdleSpanEndTimestamp:p=!0}=t,f=tg();if(!f||!ns()){let e=new nm,t={sample_rate:"0",sampled:"false",...nf(e)};return ej(e,nc,t),e}let h=td(),m=nt(),g=function(e){let t=nP(e);return tr(td(),t),z&&et.log("[Tracing] Started span is an idle span"),t}(e);function y(){i&&(clearTimeout(i),i=void 0)}function _(e){y(),i=setTimeout(()=>{!r&&0===n.size&&s&&(o="idleTimeout",g.end(e))},l)}function v(e){i=setTimeout(()=>{!r&&s&&(o="heartbeatFailed",g.end(e))},c)}function b(e){r=!0,n.clear(),a.forEach(e=>e()),tr(h,m);let t=t3(g),{start_timestamp:i}=t;if(!i)return;t.data[tw]||g.setAttribute(tw,o);let s=t.status;s&&"unknown"!==s||g.setStatus({code:1}),et.log(`[Tracing] Idle span "${t.op}" finished`);let c=t9(g).filter(e=>e!==g),d=0;
9c.forEach(t=>{t.isRecording()&&(t.setStatus({code:2,message:"cancelled"}),t.end(e),z&&et.log("[Tracing] Cancelling span since span ended early",JSON.stringify(t,void 0,2)));let{timestamp:n=0,start_timestamp:r=0}=t3(t),i=r<=e,o=n-r<=(u+l)/1e3;if(z){let e=JSON.stringify(t,void 0,2);i?o||et.log("[Tracing] Discarding span since it finished after idle span final timeout",e):et.log("[Tracing] Discarding span since it happened after idle span was finished",e)}(!o||!i)&&(g[t6]&&g[t6].delete(t),d++)}),d>0&&g.setAttribute("sentry.idle_span_discarded_spans",d)}return g.end=new Proxy(g.end,{apply(e,t,n){if(d&&d(g),t instanceof nm)return;let[r,...i]=n,o=t1(r||e6()),s=t9(g).filter(e=>e!==g),a=t3(g);if(!s.length||!p)return b(o),Reflect.apply(e,t,[o,...i]);let l=f.getOptions().ignoreSpans,c=null==s?void 0:s.reduce((e,t)=>{let n=t3(t);return!n.timestamp||l&&nl(n,l)?e:e?Math.max(e,n.timestamp):n.timestamp},void 0),h=a.start_timestamp,m=Math.min(h?h+u/1e3:1/0,Math.max(h||-1/0,Math.min(o,c||1/0)));return b(m),Reflect.apply(e,t,[m,...i])}}),a.push(f.on("spanStart",e=>{if(!(r||e===g||t3(e).timestamp||e instanceof nC&&e.isStandaloneSpan())){var t;t9(g).includes(e)&&(t=e.spanContext().spanId,y(),n.set(t,!0),v(e6()+c/1e3))}})),a.push(f.on("spanEnd",e=>{var t;r||(t=e.spanContext().spanId,n.has(t)&&n.delete(t),0===n.size&&_(e6()+l/1e3))})),a.push(f.on("idleSpanEnableAutoFinish",e=>{e===g&&(s=!0,_(),n.size&&v())})),t.disableAutoFinish||_(),setTimeout(()=>{r||(g.setStatus({code:2,message:"deadline_exceeded"}),o="finalTimeout",g.end())},u),g}function nV(e){return new nK(t=>{t(e)})}function nG(e){return new nK((t,n)=>{n(e)})}class nK{constructor(e){this._state=0,this._handlers=[],this._runExecutor(e)}then(e,t){return new nK((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(e){return new nK((t,n)=>{let r,i;return this.then(t=>{i=!1,r=t,e&&e()},t=>{i=!0,r=t,e&&e()}).then(()=>{if(i){n(r);return}t(r)})})}_executeHandlers(){if(0===this._state)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(1===this._state&&e[1](this._value),2===this._state&&e[2](this._value),e[0]=!0)})}_runExecutor(e){let t=(e,t)=>{if(0===this._state){if(eR(t)){t.then(n,r);return}this._state=e,this._value=t,this._executeHandlers()}},n=e=>{t(1,e)},r=e=>{t(2,e)};try{e(n,r)}catch(e){r(e)}}}function nY(e){let t=H._sentryDebugIds,n=H._debugIds;if(!t&&!n)return{};let r=t?Object.keys(t):[],i=n?Object.keys(n):[];if(u&&r.length===a&&i.length===l)return u;a=r.length,l=i.length,u={},s||(s={});let o=(t,n)=>{for(let r of t){let t=n[r],i=null==s?void 0:s[r];if(i&&u&&t)u[i[0]]=t,s&&(s[r]=[i[0],t]);else if(t){let n=e(r);for(let e=n.length-1;e>=0;e--){let i=n[e],o=null==i?void 0:i.filename;if(o&&u&&s){u[o]=t,s[r]=[o,t];break}}}}};return t&&o(r,t),n&&o(i,n),u}function nX(e,t){let{extra:n,tags:r,attributes:i,user:o,contexts:s,level:a,sdkProcessingMetadata:l,breadcrumbs:u,fingerprint:c,eventProcessors:d,attachments:p,propagationContext:f,transactionName:h,span:m}=t;nZ(e,"extra",n),nZ(e,"tags",r),nZ(e,"attributes",i),nZ(e,"user",o),nZ(e,"contexts",s),e.sdkProcessingMetadata=te(e.sdkProcessingMetadata,l,2),a&&(e.level=a),h&&(e.transactionName=h),m&&(e.span=m),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),c.length&&(e.fingerprint=[...e.fingerprint,...c]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),p.length&&(e.attachments=[...e.attachments,...p]),e.propagationContext={...e.propagationContext,...f}}function nZ(e,t,n){e[t]=te(e[t],n,1)}function nQ(e,t){let n=tf().getScopeData();return e&&nX(n,e.getScopeData()),t&&nX(n,t.getScopeData()),n}function n0(e,t,n,r,i,o){let{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,l={...t,event_id:t.event_id||n.event_id||eQ(),timestamp:t.timestamp||e4()},u=n.integrations||e.integrations.map(e=>e.name);(function(e,t){var n,r;let{environment:i,release:o,dist:s,maxValueLength:a}=t;e.environment=e.environment||i||nu,!e.release&&o&&(e.release=o),!e.dist&&s&&(e.dist=s);let l=e.request;null!=l&&l.url&&a&&(l.url=eG(l.url,a)),a&&(null==(r=null==(n=e.exception)?void 0:n.values)||r.forEach(e
9=>{e.value&&(e.value=eG(e.value,a))}))})(l,e),u.length>0&&(l.sdk=l.sdk||{},l.sdk.integrations=[...l.sdk.integrations||[],...u]),i&&i.emit("applyFrameMetadata",t),void 0===t.type&&function(e,t){var n,r;let i=nY(t);null==(r=null==(n=e.exception)?void 0:n.values)||r.forEach(e=>{var t,n;null==(n=null==(t=e.stacktrace)?void 0:t.frames)||n.forEach(e=>{e.filename&&(e.debug_id=i[e.filename])})})}(l,e.stackParser);let c=function(e,t){if(!t)return e;let n=e?e.clone():new ti;return n.update(t),n}(r,n.captureContext);n.mechanism&&e3(l,n.mechanism);let d=i?i.getEventProcessors():[],p=nQ(o,c),f=[...n.attachments||[],...p.attachments];f.length&&(n.attachments=f),function(e,t){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=t;(function(e,t){let{extra:n,tags:r,user:i,contexts:o,level:s,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(i).length&&(e.user={...i,...e.user}),Object.keys(o).length&&(e.contexts={...o,...e.contexts}),s&&(e.level=s),a&&"transaction"!==e.type&&(e.transaction=a)})(e,t),r&&function(e,t){e.contexts={trace:tZ(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:nf(t),...e.sdkProcessingMetadata};let n=t3(ne(t)).description;n&&!e.transaction&&"transaction"===e.type&&(e.transaction=n)}(e,r),e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],n&&(e.fingerprint=e.fingerprint.concat(n)),e.fingerprint.length||delete e.fingerprint,function(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,i),e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...o}}(l,p);let h=[...d,...p.eventProcessors];return(n.data&&!0===n.data.__sentry__?nV(l):function(e,t,n,r=0){try{let i=function e(t,n,r,i){let o=r[i];if(!t||!o)return t;let s=o({...t},n);return z&&null===s&&et.log(`Event processor "${o.id||"?"}" dropped event`),eR(s)?s.then(t=>e(t,n,r,i+1)):e(s,n,r,i+1)}(t,n,e,r);return eR(i)?i:nV(i)}catch(e){return nG(e)}}(h,l,n)).then(e=>(e&&function(e){var t,n;let r={};if(null==(n=null==(t=e.exception)?void 0:t.values)||n.forEach(e=>{var t,n;null==(n=null==(t=e.stacktrace)?void 0:t.frames)||n.forEach(e=>{e.debug_id&&(e.abs_path?r[e.abs_path]=e.debug_id:e.filename&&(r[e.filename]=e.debug_id),delete e.debug_id)})}),0===Object.keys(r).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let i=e.debug_meta.images;Object.entries(r).forEach(([e,t])=>{i.push({type:"sourcemap",code_file:e,debug_id:t})})}(e),"number"==typeof s&&s>0?function(e,t,n){var r,i;if(!e)return null;let o={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:ng(e.data,t,n)}}))},...e.user&&{user:ng(e.user,t,n)},...e.contexts&&{contexts:ng(e.contexts,t,n)},...e.extra&&{extra:ng(e.extra,t,n)}};return null!=(r=e.contexts)&&r.trace&&o.contexts&&(o.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(o.contexts.trace.data=ng(e.contexts.trace.data,t,n))),e.spans&&(o.spans=e.spans.map(e=>({...e,...e.data&&{data:ng(e.data,t,n)}}))),null!=(i=e.contexts)&&i.flags&&o.contexts&&(o.contexts.flags=ng(e.contexts.flags,3,n)),o}(e,s,a):e))}let n1=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function n2(e,t){return td().captureException(e,function(e){if(e)return e instanceof ti||"function"==typeof e?{captureContext:e}:Object.keys(e).some(e=>n1.includes(e))?{captureContext:e}:e}(t))}function n3(e,t){let n="string"==typeof t?t:void 0,r="string"!=typeof t?{captureContext:t}:void 0;return td().captureMessage(e,n,r)}function n5(e,t){return td().captureEvent(e,t)}function n4(e,t){tp().setContext(e,t)}function n6(e){tp().setExtras(e)}function n8(e,t){tp().setExtra(e,t)}function n7(e){tp().setTags(e)}function n9(e,t){tp().setTag(e,t)}function re(e){tp().setUser(e)}function rt(){return tp().lastEventId()}async function rn(e){let t=tg();return t?t.flush(e):(z&&et.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function rr(e){let t=tg();return t?t.close(e):(z&&et.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}function ri(){return!!tg()}function ro(){let e=tg();return(null==e?void 0:e.getOptions().enabled)!==!1&&!!(null!=e&&e.getTransport())}function rs(e){tp().addEventProcessor(e)}function ra(e){let t=tp(),n=td(),{userAgent:r}=H.navigator||{},i=function(e){let t=e6(),n={sid:eQ(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>({sid:`${n.sid}`,init:n.init,started:new Date(1e3*n.started).toISOString(),timestamp:new Date(1e3*n.timestamp).toISOString(),status:n.status,errors:n.errors,did:"number"==typeof n.did||"string"==typeof n.did?`${n.did}`:void 0,duration:n.duration,abnormal_mechanism:n.abnormal_mechanism,attrs:{release:n.release,environment:n.environment,ip_address:n.ipAddress,user_agent:n.userAgent}})};return e&&e9(n,e),n}({user:n.getUser()||t.getUser(),...r&&{userAgent:r},...e}),o=t.getSession();return(null==o?void 0:o.status)==="ok"&&e9(o,{status:"exited"}
9),rl(),t.setSession(i),i}function rl(){let e;let t=tp(),n=td().getSession()||t.getSession();n&&(e={},"ok"===n.status&&(e={status:"exited"}),e9(n,e)),ru(),t.setSession()}function ru(){let e=tp(),t=tg(),n=e.getSession();n&&t&&t.captureSession(n)}function rc(e=!1){if(e){rl();return}ru()}function rd(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function rp(e,t,n){return t||`${rd(e)}${e.projectId}/envelope/?${function(e,t){let n={sentry_version:"7"};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}(e,n)}`}let rf=[];function rh(e,t){for(let n of t)null!=n&&n.afterAllSetup&&n.afterAllSetup(e)}function rm(e,t,n){if(n[t.name]){z&&et.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,rf.includes(t.name)||"function"!=typeof t.setupOnce||(t.setupOnce(),rf.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),"function"==typeof t.preprocessEvent){let n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(t,r)=>n(t,r,e))}if("function"==typeof t.processEvent){let n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}z&&et.log(`Integration installed: ${t.name}`)}function rg(e){let t=tg();if(!t){z&&et.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function ry(e,t=!1){let n={};for(let[r,i]of Object.entries(e??{})){let e=function(e,t){let{value:n,unit:r}="object"==typeof e&&null!=e&&!Array.isArray(e)&&Object.keys(e).includes("value")?e:{value:e,unit:void 0},i=function(e){let t="string"==typeof e?"string":"boolean"==typeof e?"boolean":"number"!=typeof e||Number.isNaN(e)?null:Number.isInteger(e)?"integer":"double";if(t)return{value:e,type:t}}(n),o=r&&"string"==typeof r?{unit:r}:{};if(i)return{...i,...o};if(!t||"skip-undefined"===t&&void 0===n)return;let s="";try{s=JSON.stringify(n)??""}catch{}return{value:s,type:"string",...o}}(i,t);e&&(n[r]=e)}return n}function r_(e,t){return t?th(t,()=>{let n=nt(),r=n?tZ(n):ty(t);return[n?nf(n):np(e,t),r]}):[void 0,void 0]}let rv={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function rb(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function rS(e,t){let n=rx(),r=rx().get(e);void 0===r?n.set(e,[t]):r.length>=100?(rw(e,r),n.set(e,[t])):n.set(e,[...r,t])}function rk(e,t=td(),n=rS){var r;let i=(null==t?void 0:t.getClient())??tg();if(!i){z&&et.warn("No client available to capture log.");return}let{release:o,environment:s,enableLogs:a=!1,beforeSendLog:l}=i.getOptions();if(!a){z&&et.warn("logging option not enabled, log will not be captured.");return}let[,u]=r_(i,t),c={...e.attributes},{user:{id:d,email:p,username:f},attributes:h={}}=nQ(tp(),t);rb(c,"user.id",d,!1),rb(c,"user.email",p,!1),rb(c,"user.name",f,!1),rb(c,"sentry.release",o),rb(c,"sentry.environment",s);let{name:m,version:g}=(null==(r=i.getSdkMetadata())?void 0:r.sdk)??{};rb(c,"sentry.sdk.name",m),rb(c,"sentry.sdk.version",g);let y=i.getIntegrationByName("Replay"),_=null==y?void 0:y.getReplayId(!0);rb(c,"sentry.replay_id",_),_&&(null==y?void 0:y.getRecordingMode())==="buffer"&&rb(c,"sentry._internal.replay_is_buffering",!0);let v=e.message;if(eC(v)){let{__sentry_template_string__:e,__sentry_template_values__:t=[]}=v;null!=t&&t.length&&(c["sentry.message.template"]=e),t.forEach((e,t)=>{c[`sentry.message.parameter.${t}`]=e})}let b=t[tn];rb(c,"sentry.trace.parent_span_id",null==b?void 0:b.spanContext().spanId);let S={...e,attributes:c};i.emit("beforeCaptureLog",S);let k=l?X(()=>l(S)):S;if(!k){i.recordDroppedEvent("before_send","log_item",1),z&&et.warn("beforeSendLog returned null, log will not be captured.");return}let{level:w,message:x,attributes:E={},severityNumber:T}=k;n(i,{timestamp:e6(),level:w,body:x,trace_id:null==u?void 0:u.trace_id,severity_number:T??rv[w],attributes:{...ry(h),...ry(E,!0)}}),i.emit("afterCaptureLog",k)}function rw(e,t){let n=t??rx().get(e)??[];if(0===n.length)return;let r=e.getOptions(),i=function(e,t,n,r){let i={};return null!=t&&t.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(i.dsn=tU(r)),ny(i,[[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]])}(n,r._metadata,r.tunnel,e.getDsn());rx().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(i)}function rx(){return G("clientToLogBufferMap",()=>new WeakMap)}function rE(e,t,n,r=!0){!n||!r&&t in e||(e[t]=n)}function rT(e,t){let n=rI(),r=rI().get(e);void 0===r?n.set(e,[t]):r.length>=1e3?(rC(e,r),n.set(e,[t])):n.set(e,[...r,t])}function rC(e,t){let n=t??rI().get(e)??[];if(0===n.length)return;let r=e.getOptions(),i=function(e,t,n,r){let i={};return null!=t&&t.sdk&&(i.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(i.dsn=tU(r)),ny(i,[[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:e}]])}(n,r._metadata,r.tunnel,e.getDsn());rI().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(i)}function rI(){return G("clientToMetricBufferMap",()=>new WeakMap)}function rM(e){return"object"==typeof e&&"function"==typeof e.unref&&e.unref(),e}let rA=Symbol.for("SentryBufferFullError");function rR(e=100){let t=new Set;return{get $(){return Array.from(t)},add:function(n){if(!(t.size<e))return nG(rA);let r=n();return t.add(r),r.then(()=>{t.delete(r)},()=>{t.delete(r)}),r},drain:function(e){if(!t.size)return nV(!0);let n=Promise.allSettled(Array.from(t)).then(()=>!0);return e?Promise.race([n,new Promise(t=>rM(setTimeout(()=>t(!1),e)))]):n}}}function rO(e,t=eV()){let n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;let r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}function rL(e,t,n=eV()){return(e[t]||e.all||0)>n}function rP(e,{statusCode:t,headers:n},r=eV()){let i={...e},o=null==n?void 0:n["x-sentry-rate-limits"],s=null==n?void 0:n["retry-after"];if(o)for(let e of o.trim().split(",")){let[t,n,,,o]=e.split(":",5),s=parseInt(t,10),a=(isNaN(s)?60:s)*1e3;if(n)for(let e of n.split(";"))"metric_bucket"===e?(!o||o.split(";
9").includes("custom"))&&(i[e]=r+a):i[e]=r+a;else i.all=r+a}else s?i.all=r+rO(s,r):429===t&&(i.all=r+6e4);return i}function rD(e,t,n=rR(e.bufferSize||64)){let r={};return{send:function(i){let o=[];if(n_(i,(t,n)=>{let i=nk[n];rL(r,i)?e.recordDroppedEvent("ratelimit_backoff",i):o.push(t)}),0===o.length)return Promise.resolve({});let s=ny(i[0],o),a=t=>{if(nv(s,["client_report"])){z&&et.warn(`Dropping client report. Will not send outcomes (reason: ${t}).`);return}n_(s,(n,r)=>{e.recordDroppedEvent(t,nk[r])})};return n.add(()=>t({body:nS(s)}).then(e=>(413===e.statusCode?(z&&et.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),a("send_error")):(z&&void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&et.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=rP(r,e)),e),e=>{throw a("network_error"),z&&et.error("Encountered error running transport request:",e),e})).then(e=>e,e=>{if(e===rA)return z&&et.error("Skipped sending event because buffer is full."),a("queue_overflow"),Promise.resolve({});throw e})},flush:e=>n.drain(e)}}function rN(e){let t=[];e.message&&t.push(e.message);try{let n=e.exception.values[e.exception.values.length-1];null!=n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}let r$="Not capturing exception because it's already been captured.",rF="Discarded session because of missing or non-string release",rj=Symbol.for("SentryInternalError"),rB=Symbol.for("SentryDoNotSendEventError");function rU(e){return{message:e,[rj]:!0}}function rq(e){return{message:e,[rB]:!0}}function rz(e){return!!e&&"object"==typeof e&&rj in e}function rH(e){return!!e&&"object"==typeof e&&rB in e}function rW(e,t,n,r,i){let o=0,s,a=!1;e.on(n,()=>{o=0,clearTimeout(s),a=!1}),e.on(t,t=>{(o+=r(t))>=8e5?i(e):a||(a=!0,s=rM(setTimeout(()=>{i(e)},5e3)))}),e.on("flush",()=>{i(e)})}class rJ{constructor(e){var t,n,r;if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=rR((null==(t=e.transportOptions)?void 0:t.bufferSize)??64),e.dsn?this._dsn=tW(e.dsn):z&&et.warn("No DSN provided, client will not send events."),this._dsn){let t=rp(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}this._options.enableLogs=this._options.enableLogs??(null==(n=this._options._experiments)?void 0:n.enableLogs),this._options.enableLogs&&rW(this,"afterCaptureLog","flushLogs",rX,rw),(this._options.enableMetrics??(null==(r=this._options._experiments)?void 0:r.enableMetrics)??!0)&&rW(this,"afterCaptureMetric","flushMetrics",rY,rC)}captureException(e,t,n){let r=eQ();if(e5(e))return z&&et.log(r$),r;let i={event_id:r,...t};return this._process(()=>this.eventFromException(e,i).then(e=>this._captureEvent(e,i,n)).then(e=>e),"error"),i.event_id}captureMessage(e,t,n,r){let i={event_id:eQ(),...n},o=eC(e)?e:String(e),s=eI(e),a=s?this.eventFromMessage(o,t,i):this.eventFromException(e,i);return this._process(()=>a.then(e=>this._captureEvent(e,i,r)),s?"unknown":"error"),i.event_id}captureEvent(e,t,n){let r=eQ();if(null!=t&&t.originalException&&e5(t.originalException))return z&&et.log(r$),r;let i={event_id:r,...t},o=e.sdkProcessingMetadata||{},s=o.capturedSpanScope,a=o.capturedSpanIsolationScope,l=rV(e.type);return this._process(()=>this._captureEvent(e,i,s||n,a),l),i.event_id}captureSession(e){this.sendSession(e),e9(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(e){let t=this._transport;if(!t)return!0;this.emit("flush");let n=await this._isClientDoneProcessing(e),r=await t.flush(e);return n&&r}async close(e){let t=await this.flush(e);return this.getOptions().enabled=!1,this.emit("close"),t}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){let t=this._integrations[e.name];rm(this,e,this._integrations),t||rh(this,[e])}sendEvent(e,t={}
9){this.emit("beforeSendEvent",e,t);let n=function(e,t,n,r){let i=nw(n),o=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){var n,r,i,o;if(!t)return;let s=e.sdk||{};e.sdk={...s,name:s.name||t.name,version:s.version||t.version,integrations:[...(null==(n=e.sdk)?void 0:n.integrations)||[],...t.integrations||[]],packages:[...(null==(r=e.sdk)?void 0:r.packages)||[],...t.packages||[]],settings:null!=(i=e.sdk)&&i.settings||t.settings?{...null==(o=e.sdk)?void 0:o.settings,...t.settings}:void 0}}(e,null==n?void 0:n.sdk);let s=nx(e,i,r,t);return delete e.sdkProcessingMetadata,ny(s,[[{type:o},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);for(let e of t.attachments||[])n=function(e,t){let[n,r]=e;return[n,[...r,t]]}(n,function(e){let t="string"==typeof e.data?nb(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}(e));this.sendEnvelope(n).then(t=>this.emit("afterSendEvent",e,t))}sendSession(e){let{release:t,environment:n=nu}=this._options;if("aggregates"in e){let r=e.attrs||{};if(!r.release&&!t){z&&et.warn(rF);return}r.release=r.release||t,r.environment=r.environment||n,e.attrs=r}else{if(!e.release&&!t){z&&et.warn(rF);return}e.release=e.release||t,e.environment=e.environment||n}this.emit("beforeSendSession",e);let r=function(e,t,n,r){let i=nw(n);return ny({sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:tU(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(e,t,n=1){if(this._options.sendClientReports){let r=`${e}:${t}`;z&&et.log(`Recording outcome: "${r}"${n>1?` (${n} times)`:""}`),this._outcomes[r]=(this._outcomes[r]||0)+n}}on(e,t){let n=this._hooks[e]=this._hooks[e]||new Set,r=(...e)=>t(...e);return n.add(r),()=>{n.delete(r)}}emit(e,...t){let n=this._hooks[e];n&&n.forEach(e=>e(...t))}async sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)try{return await this._transport.send(e)}catch(e){return z&&et.error("Error while sending envelope:",e),{}}return z&&et.error("Transport disabled"),{}}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=function(e,t){let n={};return t.forEach(t=>{t&&rm(e,t,n)}),n}(this,e),rh(this,e)}_updateSessionFromEvent(e,t){var n,r;let i="fatal"===t.level,o=!1,s=null==(n=t.exception)?void 0:n.values;if(s){for(let e of(o=!0,i=!1,s))if((null==(r=e.mechanism)?void 0:r.handled)===!1){i=!0;break}}let a="ok"===e.status;(a&&0===e.errors||a&&i)&&(e9(e,{...i&&{status:"crashed"},errors:e.errors||Number(o||i)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(e=>setTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n,r){let i=this.getOptions(),o=Object.keys(this._integrations);return!t.integrations&&null!=o&&o.length&&(t.integrations=o),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),n0(i,e,t,n,this,r).then(e=>{if(null===e)return e;this.emit("postprocessEvent",e,t),e.contexts={trace:ty(n),...e.contexts};let r=np(this,n);return e.sdkProcessingMetadata={dynamicSamplingContext:r,...e.sdkProcessingMetadata},e})}_captureEvent(e,t={},n=td(),r=tp()){return z&&rG(e)&&et.log(`Captured error event \`${rN(e)[0]||"<unknown>"}\``),this._processEvent(e,t,n,r).then(e=>e.event_id,e=>{z&&(rH(e)?et.log(e.message):rz(e)?et.warn(e.message):et.warn(e))})}_processEvent(e,t,n,r){let i=this.getOptions(),{sampleRate:o}=i,s=rK(e),a=rG(e),l=`before send for type \`${e.type||"error"}\``,u=typeof o>"u"?void 0:tJ(o);if(a&&"number"==typeof u&&eJ()>u)return this.recordDroppedEvent("sample_rate","error"),nG(rq(`Discarding event because it's not included in the random sample (sampling rate = ${o})`));let c=rV(e.type);return this._prepareEvent(e,t,n,r).then(e=>{if(null===e)throw this.recordDroppedEvent("event_processor",c),rq("An event processor returned `null`, will not send event.");return t.data&&!0===t.data.__sentry__?e:function(e,t){let n=`${t} must return \`null\` or a valid event.`;if(eR(e))return e.then(e=>{if(!eM(e)&&null!==e)throw rU(n);return e},e=>{throw rU(`${t} rejected with ${e}`)});if(!eM(e)&&null!==e)throw rU(n);return e}(function(e,t,n,r){let{beforeSend:i,beforeSendTransaction:o,beforeSendSpan:s,ignoreSpans:a}=t,l=n;if(rG(l)&&i)return i(l,r);if(rK(l)){if(s||a){let t=function(e){var t;let{trace_id:n,parent_span_id:r,span_id:i,status:o,origin:s,data:a,op:l}=(null==(t=e.contexts)?void 0:t.trace)??{};return{data:a??{},description:e.transaction,op:l,parent_span_id:r,span_id:i??"",start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:n??"",origin:s,profile_id:null==a?void 0:a[tC],exclusive_time:null==a?void 0:a[tI],measurements:e.measurements,is_segment:!0}}(l);if(null!=a&&a.length&&nl(t,a))return null;if(s){let e=s(t);e?l=te(n,{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[tC]:e.profile_id},...e.exclusive_time&&{[tI]:e.exclusive_time}}}},measurements:e.measurements}):nn()}if(l.spans){let t=[],n=l.spans;for(let e of n){if(null!=a&&a.length&&nl(e,a)){!function(e,t){let n=t.parent_span_id,r=t.span_id;if(n)for(let t of e)t.parent_span_id===r&&(t.parent_span_id=n)}(n,e);continue}if(s){let n=s(e);n?t.push(n):(nn(),t.push(e))}else t.push(e)}let r=l.spans.length-t.length;r&&e.recordDroppedEvent("before_send","span",r),l.spans=t}}if(o){if(l.spans){let e=l.spans.length;l.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return o(l,r)}}return l}(this,i,e,t),l)}).then(i=>{var o;
9if(null===i){if(this.recordDroppedEvent("before_send",c),s){let t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw rq(`${l} returned \`null\`, will not send event.`)}let u=n.getSession()||r.getSession();if(a&&u&&this._updateSessionFromEvent(u,i),s){let e=((null==(o=i.sdkProcessingMetadata)?void 0:o.spanCountBeforeProcessing)||0)-(i.spans?i.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}let d=i.transaction_info;return s&&d&&i.transaction!==e.transaction&&(i.transaction_info={...d,source:"custom"}),this.sendEvent(i,t),i}).then(null,e=>{throw rH(e)||rz(e)?e:(this.captureException(e,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:e}),rU(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
10Reason: ${e}`))})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===rA&&this.recordDroppedEvent("queue_overflow",t),e))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{let[n,r]=e.split(":");return{reason:n,category:r,quantity:t}})}_flushOutcomes(){var e;z&&et.log("Flushing outcomes...");let t=this._clearOutcomes();if(0===t.length){z&&et.log("No outcomes to send");return}if(!this._dsn){z&&et.log("No dsn provided, will not send outcomes");return}z&&et.log("Sending outcomes:",t);let n=ny((e=this._options.tunnel&&tU(this._dsn))?{dsn:e}:{},[[{type:"client_report"},{timestamp:e4(),discarded_events:t}]]);this.sendEnvelope(n)}}function rV(e){return"replay_event"===e?"replay":e||"error"}function rG(e){return void 0===e.type}function rK(e){return"transaction"===e.type}function rY(e){let t=0;return e.name&&(t+=2*e.name.length),(t+=8)+rZ(e.attributes)}function rX(e){let t=0;return e.message&&(t+=2*e.message.length),t+rZ(e.attributes)}function rZ(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*rQ(e[0]):eI(e)?t+=rQ(e):t+=100}),t}function rQ(e){return"string"==typeof e?2*e.length:"number"==typeof e?8:"boolean"==typeof e?4:0}function r0(e){return ek(e)&&"__sentry_fetch_url_host__"in e&&"string"==typeof e.__sentry_fetch_url_host__?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function r1(e){td().setClient(e)}let r2="MULTIPLEXED_TRANSPORT_EXTRA_KEY";function r3(e,t){let n;return n_(e,(e,r)=>(t.includes(r)&&(n=Array.isArray(e)?e[1]:void 0),!!n)),n}function r5(e,t){return n=>{let r=e(n),i=new Map,o=t||(e=>{var t;let n=e.getEvent();return null!=(t=null==n?void 0:n.extra)&&t[r2]&&Array.isArray(n.extra[r2])?n.extra[r2]:[]});function s(t,r){let o=r?`${t}:${r}`:t,s=i.get(o);if(!s){let a=tq(t);if(!a)return;let l=rp(a,n.tunnel);s=r?(t=>{let n=e(t);return{...n,send:async e=>{let t=r3(e,["event","transaction","profile","replay_event"]);return t&&(t.release=r),n.send(e)}}})({...n,url:l}):e({...n,url:l}),i.set(o,s)}return[t,s]}return{send:async function(e){let t=o({envelope:e,getEvent:function(t){return r3(e,null!=t&&t.length?t:["event"])}}).map(e=>"string"==typeof e?s(e,void 0):s(e.dsn,e.release)).filter(e=>!!e),n=t.length?t:[["",r]];return(await Promise.all(n.map(([t,n])=>n.send(ny(t?{...e[0],dsn:t}:e[0],e[1])))))[0]},flush:async function(e){let t=[...i.values(),r];return(await Promise.all(t.map(t=>t.flush(e)))).every(e=>e)}}}}function r4(e){return"isRelative"in e}function r6(e,t){let n=0>=e.indexOf("://")&&0!==e.indexOf("//"),r=t??(n?"thismessage:/":void 0);try{if("canParse"in URL&&!URL.canParse(e,r))return;let t=new URL(e,r);return n?{isRelative:n,pathname:t.pathname,search:t.search,hash:t.hash}:t}catch{}}function r8(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 r7(e){return e.split(/[?#]/,1)[0]}function r9(e,t=!0){if(e.startsWith("data:")){let n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",i=e.includes(";base64,"),o=e.indexOf(","),s="";if(t&&-1!==o){let t=e.slice(o+1);s=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${i?",base64":""}${s?`,${s}`:""}`}return e}function ie(e,t){let n=null==t?void 0:t.getDsn(),r=null==t?void 0:t.getOptions().tunnel;return function(e,t){let n=r6(e);return!(!n||r4(n))&&!!t&&n.host.includes(t.host)&&/(^|&|\?)sentry_key=/.test(n.search)}
10(e,n)||!!r&&it(e)===it(r)}function it(e){return"/"===e[e.length-1]?e.slice(0,-1):e}function ir(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}function ii(e){var t;"aggregates"in e?(null==(t=e.attrs)?void 0:t.ip_address)===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):void 0===e.ipAddress&&(e.ipAddress="{{auto}}")}function io(e={}){let t=e.client||tg();if(!ro()||!t)return{};let n=tc(J());if(n.getTraceData)return n.getTraceData(e);let r=e.scope||td(),i=e.span||nt(),o=i?tQ(i):function(e){let{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return tK(t,r,n)}(r),s=t$(i?nf(i):np(t,r));if(!tV.test(o))return et.warn("Invalid sentry-trace data. Cannot generate trace data"),{};let a={"sentry-trace":o,baggage:s};return e.propagateTraceparent&&(a.traceparent=i?function(e){let{traceId:t,spanId:n}=e.spanContext();return tY(t,n,t5(e))}(i):function(e){let{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return tY(t,r,n)}(r)),a}function is(e,t){let n=tg(),r=tp();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:o=100}=n.getOptions();if(o<=0)return;let s={timestamp:e4(),...e},a=i?X(()=>i(s,t)):s;null!==a&&(n.emit&&n.emit("beforeAddBreadcrumb",a,t),r.addBreadcrumb(a,o))}let ia=new WeakMap,il=()=>({name:"FunctionToString",setupOnce(){c=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=eU(this),n=ia.has(tg())&&void 0!==t?t:this;return c.apply(n,e)}}catch{}},setup(e){ia.set(e,!0)}}),iu=[/^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$/],ic=(e={})=>{let t;return{name:"EventFilters",setup(n){t=ip(e,n.getOptions())},processEvent:(n,r,i)=>(t||(t=ip(e,i.getOptions())),!function(e,t){if(e.type){if("transaction"===e.type&&function(e,t){if(!(null!=t&&t.length))return!1;let n=e.transaction;return!!n&&eZ(n,t)}(e,t.ignoreTransactions))return z&&et.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
11Event: ${e1(e)}`),!0}else{var n,r,i;if(null!=(n=t.ignoreErrors)&&n.length&&rN(e).some(e=>eZ(e,n)))return z&&et.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
12Event: ${e1(e)}`),!0;if(null!=(i=null==(r=e.exception)?void 0:r.values)&&i.length&&!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&"Error"!==e.type||e.value))return z&&et.warn(`Event dropped due to not having an error message, error type or stacktrace.
13Event: ${e1(e)}`),!0;if(function(e,t){if(!(null!=t&&t.length))return!1;let n=ih(e);return!!n&&eZ(n,t)}(e,t.denyUrls))return z&&et.warn(`Event dropped due to being matched by \`denyUrls\` option.
14Event: ${e1(e)}.
15Url: ${ih(e)}`),!0;if(!function(e,t){if(!(null!=t&&t.length))return!0;let n=ih(e);return!n||eZ(n,t)}(e,t.allowUrls))return z&&et.warn(`Event dropped due to not being matched by \`allowUrls\` option.
16Event: ${e1(e)}.
17Url: ${ih(e)}`),!0}return!1}(n,t)?n:null)}},id=(e={})=>({...ic(e),name:"InboundFilters"});function ip(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:iu],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function ih(e){var t,n;try{let r=[...(null==(t=e.exception)?void 0:t.values)??[]].reverse().find(e=>{var t,n,r;return(null==(t=e.mechanism)?void 0:t.parent_id)===void 0&&(null==(r=null==(n=e.stacktrace)?void 0:n.frames)?void 0:r.length)}),i=null==(n=null==r?void 0:r.stacktrace)?void 0:n.frames;return i?function(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(i):null}catch{return z&&et.error(`Cannot extract url for event ${e1(e)}`),null}}function im(e){return Array.isArray(e.errors)}function ig(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...im(n)&&{is_exception_group:!0}
17,...e.mechanism,exception_id:t}}function iy(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}let i_=new Map,iv=new Set;function ib(e,t){var n,r;null==(r=null==(n=t.exception)?void 0:n.values)||r.forEach(t=>{var n,r;null==(r=null==(n=t.stacktrace)?void 0:n.frames)||r.forEach(t=>{var n;if(!t.filename||t.module_metadata)return;let r=(n=t.filename,function(e){if(H._sentryModuleMetadata)for(let t of Object.keys(H._sentryModuleMetadata)){let n=H._sentryModuleMetadata[t];if(!iv.has(t)){for(let r of(iv.add(t),e(t).reverse()))if(r.filename){i_.set(r.filename,n);break}}}}(e),i_.get(n));r&&(t.module_metadata=r)})})}function iS(e){var t,n;null==(n=null==(t=e.exception)?void 0:t.values)||n.forEach(e=>{var t,n;null==(n=null==(t=e.stacktrace)?void 0:t.frames)||n.forEach(e=>{delete e.module_metadata})})}let ik=()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",e=>{n_(e,(e,t)=>{if("event"===t){let t=Array.isArray(e)?e[1]:void 0;t&&(iS(t),e[1]=t)}})}),e.on("applyFrameMetadata",t=>{t.type||ib(e.getOptions().stackParser,t)})}});function iw(e){let t="console";ep(t,e),ef(t,ix)}function ix(){"console"in H&&K.forEach(function(e){e in H.console&&eF(H.console,e,function(t){return Y[e]=t,function(...t){eh("console",{args:t,level:e});let n=Y[e];null==n||n.apply(H.console,t)}})})}function iE(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}let iT=(e={})=>{let t=e.levels||K,n=e.handled??!0;return{name:"CaptureConsole",setup(e){"console"in H&&iw(({args:r,level:i})=>{tg()===e&&t.includes(i)&&function(e,t,n){let r=iE(t),i=Error(),o={level:iE(t),extra:{arguments:e}};th(s=>{if(s.addEventProcessor(e=>(e.logger="console",e3(e,{handled:n,type:"auto.core.capture_console"}),e)),"assert"===t){if(!e[0]){let t=`Assertion failed: ${eY(e.slice(1)," ")||"console.assert"}`;s.setExtra("arguments",e.slice(1)),s.captureMessage(t,r,{captureContext:o,syntheticException:i})}return}let a=e.find(e=>e instanceof Error);if(a){n2(a,o);return}let l=eY(e," ");s.captureMessage(l,r,{captureContext:o,syntheticException:i})})}(r,i,n)})}}},iC=()=>{let e;return{name:"Dedupe",processEvent(t){if(t.type)return t;try{var n;if((n=e)&&(function(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!iM(e,t)||!iI(e,t))}(t,n)||function(e,t){let n=iA(t),r=iA(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!iM(e,t)||!iI(e,t))}(t,n)))return z&&et.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}};function iI(e,t){let n=el(e),r=el(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||r.length!==n.length)return!1;for(let e=0;e<r.length;e++){let t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function iM(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return n.join("")===r.join("")}catch{return!1}}function iA(e){var t,n;return null==(n=null==(t=e.exception)?void 0:t.values)?void 0:n[0]}let iR=(e={})=>{let{depth:t=3,captureErrorCause:n=!0}=e;return{name:"ExtraErrorData",processEvent(e,r,i){let{maxValueLength:o}=i.getOptions();return function(e,t={},n,r,i){if(!t.originalException||!ek(t.originalException))return e;let o=t.originalException.name||t.originalException.constructor.name,s=function e(t,n,r){try{let i=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],o={};for(let e of Object.keys(t)){if(-1!==i.indexOf(e))continue;let n=t[e];o[e]=ek(n)||"string"==typeof n?r?eG(`${n}`,r):`${n}`:n}if(n&&void 0!==t.cause){if(ek(t.cause)){let n=t.cause.name||t.cause.constructor.name;o.cause={[n]:e(t.cause,!1,r)}}else o.cause=t.cause}if("function"==typeof t.toJSON){let e=t.toJSON();for(let t of Object.keys(e)){let n=e[t];o[t]=ek(n)?n.toString():n}}return o}catch(e){z&&et.error("Unable to extract extra data from the Error object:",e)}return null}(t.originalException,r,i);if(s){let t={...e.contexts},r=ng(s,n);return eM(r)&&(ej(r,"__sentry_skip_normalization__",!0),t[o]=r),{...e,contexts:t}}return e}(e,r,t,n,o)}}},iO=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function iL(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:"/";i&&(t=`${i}/${t}`,n="/"===i.charAt(0))}return t=(function(e,t){let n=0;for(let t=e.length-1;t>=0;t--){let r=e[t];"."===r?e.splice(t,1):".."===r?(e.splice(t,1),n++):n&&(e.splice(t,1),n--)}if(t)for(;n--;n)e.unshift("..");return e})(t.split("/").filter(e=>!!e),!n).join("/"),(n?"/":"")+t||"."}function iP(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)}let iD=(e={})=>{let t=e.root,n=e.prefix||"app:///",r="window"in H&&!!H.window,i=e.iteratee||function({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;let i=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes("\\")&&!r.filename.includes("/"),o=/^\//.test(r.filename);if(e){if(t){let e=r.filename;0===e.indexOf(t)&&(r.filename=e.replace(t,n))}}else if(i||o){let e;let o=i?r.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):r.filename,s=t?function(e,t){e=iL(e).slice(1),t=iL(t).slice(1);let n=iP(e.split("/")),r=iP(t.split("/")),i=Math.min(n.length,r.length),o=i;for(let e=0;e<i;e++)if(n[e]!==r[e]){o=e;break}let s=[];for(let e=o;e<n.length;e++)s.push("..");return(s=s.concat(r.slice(o))).join("/")}(t,o):function(e){let t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=iO.exec(t);return n?n.slice(1):[]}(o)[2]||"";r.filename=`${n}${s}`}return r}}({isBrowser:r,root:t,prefix:n});return{name:"RewriteFrames",processEvent(e){let t=e;return e.exception&&Array.isArray(e.exception.values)&&(t=function(e){try{return{...e,exception:{...e.exception,values:e.exception.values.map(e=>{var t,n;return{...e,...e.stacktrace&&{stacktrace:{...t=e.stacktrace,frames:null==(n=null==t?void 0:t.frames)?void 0:n.map(e=>i(e))}}}})}}}catch{return e}}(t)),t}}},iN=["reauthenticate","signInAnonymously","signInWithOAuth","signInWithIdToken","signInWithOtp","signInWithPassword","signInWithSSO","signOut","signUp","verifyOtp"],i$=["createUser","deleteUser","listUsers","getUserById","updateUserById","inviteUserByEmail"],iF={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"},ij=["select","insert","upsert","update","delete"];function iB(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch{}}function iU(e){try{return e.__SENTRY_INSTRUMENTED__}catch{return!1}}function iq(e,t=!1){return new Proxy(e,{apply:(n,r,i)=>nO({name:`auth ${t?"(admin) ":""}${e.name}`,attributes:{[tk]:"auto.db.supabase",[tS]:"db","db.system":"postgresql","db.operation":`auth.${t?"admin.":""}${e.name}`}},e=>Reflect.apply(n,r,i).then(t=>(t&&"object"==typeof t&&"error"in t&&t.error?(e.setStatus({code:2}),n2(t.error,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}})):e.setStatus({code:1}),e.end(),t)).catch(t=>{throw e.setStatus({code:2}),e.end(),n2(t,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}}),t}).then(...i))})}let iz=e=>{var t;if(!e){z&&et.warn("Supabase integration was not installed because no Supabase client was provided.");return}iU((t=e.constructor===Function?e:e.constructor).prototype.from)||(t.prototype.from=new Proxy(t.prototype.from,{apply(e,t,n){let r=Reflect.apply(e,t,n);return function(e){for(let t of ij)iU(e.prototype[t])||(e.prototype[t]=new Proxy(e.prototype[t],{apply(e,n,r){let i=Reflect.apply(e,n,r),o=i.constructor;return z&&et.log(`Instrumenting ${t} operation's PostgRESTFilterBuilder`),iU(o.prototype.then)||(o.prototype.then=new Proxy(o.prototype.then,{apply(e,t,n){var r;let i=function(e,t={}){var n;switch(e){case"GET":return"select";case"POST":return null!=(n=t.Prefer)&&n.includes("resolution=")?"upsert":"insert";case"PATCH":return"update";case"DELETE":return"delete";default:return"<unknown-op>"}}(t.method,t.headers);if(!ij.includes(i)||!(null!=(r=null==t?void 0:t.url)&&r.pathname)||"string"!=typeof t.url.pathname)return Reflect.apply(e,t,n);let o=t.url.pathname.split("/"),s=o.length>0?o[o.length-1]:"",a=[];
17for(let[e,n]of t.url.searchParams.entries())a.push(function(e,t){let n;if(""===t||"*"===t)return"select(*)";if("select"===e)return`select(${t})`;if("or"===e||e.endsWith(".or"))return`${e}${t}`;let[r,...i]=t.split(".");return n=null!=r&&r.startsWith("fts")?"textSearch":null!=r&&r.startsWith("plfts")?"textSearch[plain]":null!=r&&r.startsWith("phfts")?"textSearch[phrase]":null!=r&&r.startsWith("wfts")?"textSearch[websearch]":r&&iF[r]||"filter",`${n}(${e}, ${i.join(".")})`}(e,n));let l=Object.create(null);if(eM(t.body))for(let[e,n]of Object.entries(t.body))l[e]=n;let u=`${"select"===i?"":`${i}${l?"(...) ":""}`}${a.join(" ")} from(${s})`,c={"db.table":s,"db.schema":t.schema,"db.url":t.url.origin,"db.sdk":t.headers["X-Client-Info"],"db.system":"postgresql","db.operation":i,[tk]:"auto.db.supabase",[tS]:"db"};return a.length&&(c["db.query"]=a),Object.keys(l).length&&(c["db.body"]=l),nO({name:u,attributes:c},r=>Reflect.apply(e,t,[]).then(e=>{if(r&&(e&&"object"==typeof e&&"status"in e&&tA(r,e.status||500),r.end()),e.error){let t=Error(e.error.message);e.error.code&&(t.code=e.error.code),e.error.details&&(t.details=e.error.details);let n={};a.length&&(n.query=a),Object.keys(l).length&&(n.body=l),n2(t,e=>(e.addEventProcessor(e=>(e3(e,{handled:!1,type:"auto.db.supabase.postgres"}),e)),e.setContext("supabase",n),e))}let t={type:"supabase",category:`db.${i}`,message:u},n={};return a.length&&(n.query=a),Object.keys(l).length&&(n.body=l),Object.keys(n).length&&(t.data=n),is(t),e},e=>{throw r&&(tA(r,500),r.end()),e}).then(...n))}}),iB(o.prototype.then)),i}}),iB(e.prototype[t]))}(r.constructor),r}}),iB(t.prototype.from)),function(e){let t=e.auth;if(!(!t||iU(e.auth))){for(let n of iN){let r=t[n];r&&"function"==typeof e.auth[n]&&(e.auth[n]=iq(r))}for(let n of i$){let r=t.admin[n];r&&"function"==typeof e.auth.admin[n]&&(e.auth.admin[n]=iq(r,!0))}iB(e.auth)}}(e)},iH=e=>({setupOnce(){iz(e)},name:"Supabase"}),iW=e=>iH(e.supabaseClient);function iJ(e){return{...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}}let iV=(e={})=>{let t=e.limit??10;return{name:"ZodErrors",processEvent:(n,r)=>(function(e,t=!1,n,r){var i,o;if(!(null!=(i=n.exception)&&i.values)||!r.originalException||!(ek(o=r.originalException)&&"ZodError"===o.name&&Array.isArray(o.issues))||0===r.originalException.issues.length)return n;try{let i=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(iJ);return t&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({filename:"zod_issues.json",data:JSON.stringify({issues:i})})),{...n,exception:{...n.exception,values:[{...n.exception.values[0],value:function(e){let t=new Set;for(let n of e.issues){let e=n.path.map(e=>"number"==typeof e?"<array>":e).join(".");e.length>0&&t.add(e)}let n=Array.from(t);if(0===n.length){let t="variable";if(e.issues.length>0){let n=e.issues[0];void 0!==n&&"expected"in n&&"string"==typeof n.expected&&(t=n.expected)}return`Failed to validate ${t}`}return`Failed to validate keys: ${eG(n.join(", "),100)}`}(r.originalException)},...n.exception.values.slice(1)]},extra:{...n.extra,"zoderror.issues":i.slice(0,e)}}}catch(e){return{...n,extra:{...n.extra,"zoderrors sentry integration parse error":{message:"an exception was thrown while processing ZodError within applyZodErrorsToEvent()",error:e instanceof Error?`${e.name}: ${e.message}
18${e.stack}`:"unknown"}}}}})(t,e.saveZodIssuesAsAttachment,n,r)}},iG=e=>({name:"ThirdPartyErrorsFilter",setup(e){e.on("beforeEnvelope",e=>{n_(e,(e,t)=>{if("event"===t){let t=Array.isArray(e)?e[1]:void 0;t&&(iS(t),e[1]=t)}})}),e.on("applyFrameMetadata",t=>{t.type||ib(e.getOptions().stackParser,t)})},processEvent(t){let n=function(e,t){let n=el(e);
18if(n)return n.filter((e,n)=>!!e.filename&&(null!=e.lineno||null!=e.colno||null!=e.instruction_addr)&&(!t||!function(e,t){var n;if(0!==t||!e.context_line||!e.filename||!e.filename.includes("sentry")||!e.filename.includes("helpers")||!e.context_line.includes(iX))return!1;if(e.pre_context){let t=e.pre_context.length;for(let r=0;r<t;r++)if(null!=(n=e.pre_context[r])&&n.includes(iY))return!0}return!1}(e,n))).map(e=>e.module_metadata?Object.keys(e.module_metadata).filter(e=>e.startsWith(iK)).map(e=>e.slice(iK.length)):[])}(t,e.ignoreSentryInternalFrames);if(n&&n["drop-error-if-contains-third-party-frames"===e.behaviour||"apply-tag-if-contains-third-party-frames"===e.behaviour?"some":"every"](t=>!t.some(t=>e.filterKeys.includes(t)))){if("drop-error-if-contains-third-party-frames"===e.behaviour||"drop-error-if-exclusively-contains-third-party-frames"===e.behaviour)return null;t.tags={...t.tags,third_party_code:!0}}return t}}),iK="_sentryBundlerPluginAppKey:",iY="Attempt to invoke user-land function",iX="fn.apply(this, wrappedArguments)",iZ="flag.evaluation.";function iQ(e){let t=td().getScopeData().contexts.flags,n=t?t.values:[];return n.length&&(void 0===e.contexts&&(e.contexts={}),e.contexts.flags={values:[...n]}),e}function i0(e,t,n=100){let r=td().getScopeData().contexts;r.flags||(r.flags={values:[]}),function(e,t,n,r){if("boolean"!=typeof n)return;if(e.length>r){z&&et.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${r}`);return}let i=e.findIndex(e=>e.flag===t);-1!==i&&e.splice(i,1),e.length===r&&e.shift(),e.push({flag:t,result:n})}(r.flags.values,e,t,n)}function i1(e,t,n=10){if("boolean"!=typeof t)return;let r=nt();if(!r)return;let i=t3(r).data;if(`${iZ}${e}` in i){r.setAttribute(`${iZ}${e}`,t);return}Object.keys(i).filter(e=>e.startsWith(iZ)).length<n&&r.setAttribute(`${iZ}${e}`,t)}let i2=()=>
18({name:"FeatureFlags",processEvent:(e,t,n)=>iQ(e),addFeatureFlag(e,t){i0(e,t),i1(e,t)}}),i3=({growthbookClass:e})=>({name:"GrowthBook",setupOnce(){let t=e.prototype;"function"==typeof t.isOn&&eF(t,"isOn",i5),"function"==typeof t.getFeatureValue&&eF(t,"getFeatureValue",i5)},processEvent:(e,t,n)=>iQ(e)});function i5(e){return function(...t){let n=t[0],r=e.apply(this,t);return"string"==typeof n&&"boolean"==typeof r&&(i0(n,r),i1(n,r)),r}}let i4=()=>({name:"ConversationId",setup(e){e.on("spanStart",e=>{let t=td().getScopeData(),n=tp().getScopeData(),r=t.conversationId||n.conversationId;r&&e.setAttribute("gen_ai.conversation.id",r)})}});function i6(e){return e.split(",").some(e=>e.trim().startsWith(tP))}function i8(e,t,n,r){let i={url:r9(e),type:"fetch","http.method":n,[tk]:r,[tS]:"http.client"};return t&&(r4(t)||(i["http.url"]=r9(t.href),i["server.address"]=t.host),t.search&&(i["http.query"]=t.search),t.hash&&(i["http.fragment"]=t.hash)),i}function i7(e,t={},n=td()){let{message:r,name:i,email:o,url:s,source:a,associatedEventId:l,tags:u}=e,c={contexts:{feedback:{contact_email:o,name:i,message:r,url:s,source:a,associated_event_id:l}},type:"feedback",level:"info",tags:u},d=(null==n?void 0:n.getClient())||tg();return d&&d.emit("beforeSendFeedback",c,t),n.captureEvent(c,t)}function i9(e,t,n,r,i){rk({level:e,message:t,attributes:n,severityNumber:i},r)}let oe=Object.freeze(Object.defineProperty({__proto__:null,debug:function(e,t,{scope:n}={}){i9("debug",e,t,n)},error:function(e,t,{scope:n}={}){i9("error",e,t,n)},fatal:function(e,t,{scope:n}={}){i9("fatal",e,t,n)},fmt:ir,info:function(e,t,{scope:n}={}){i9("info",e,t,n)},trace:function(e,t,{scope:n}={}){i9("trace",e,t,n)},warn:function(e,t,{scope:n}={}){i9("warn",e,t,n)}},Symbol.toStringTag,{value:"Module"}));function ot(e,t,n){return"util"in H&&"function"==typeof H.util.format?H.util.format(...e):e.map(e=>eI(e)?String(e):JSON.stringify(ng(e,t,n))).join(" ")}let on={[tk]:"auto.log.console"},or=(e={})=>{let t=e.levels||K;return{name:"ConsoleLogs",setup(e){let{enableLogs:n,normalizeDepth:r=3,normalizeMaxBreadth:i=1e3}=e.getOptions();if(!n){z&&et.warn("`enableLogs` is not enabled, ConsoleLogs integration disabled");return}iw(({args:n,level:o})=>{var s;if(tg()!==e||!t.includes(o))return;let a=n[0],l=n.slice(1);if("assert"===o){a||rk({level:"error",message:l.length>0?`Assertion failed: ${ot(l,r,i)}`:"Assertion failed",attributes:on});return}let u="log"===o,c=n.length>1&&"string"==typeof n[0]&&(s=n[0],!/%[sdifocO]/.test(s)),d={...on,...c?function(e,t){let n={},r=Array(t.length).fill("{}").join(" ");return n["sentry.message.template"]=`${e} ${r}`,t.forEach((e,t)=>{n[`sentry.message.parameter.${t}`]=e}),n}(a,l):{}};rk({level:u?"info":o,message:ot(n,r,i),severityNumber:u?10:void 0,attributes:d})})}}};function oi(e,t,n,r){!function(e,t){let n=(null==t?void 0:t.scope)??td(),r=(null==t?void 0:t.captureSerializedMetric)??rT,i=(null==n?void 0:n.getClient())??tg();if(!i){z&&et.warn("No client available to capture metric.");return}let{_experiments:o,enableMetrics:s,beforeSendMetric:a}=i.getOptions();if(!(s??(null==o?void 0:o.enableMetrics)??!0)){z&&et.warn("metrics option not enabled, metric will not be captured.");return}let{user:l,attributes:u}=nQ(tp(),n),c=function(e,t,n){var r;let{release:i,environment:o}=t.getOptions(),s={...e.attributes};rE(s,"user.id",n.id,!1),rE(s,"user.email",n.email,!1),rE(s,"user.name",n.username,!1),rE(s,"sentry.release",i),rE(s,"sentry.environment",o);let{name:a,version:l}=(null==(r=t.getSdkMetadata())?void 0:r.sdk)??{};rE(s,"sentry.sdk.name",a),rE(s,"sentry.sdk.version",l);let u=t.getIntegrationByName("Replay"),c=null==u?void 0:u.getReplayId(!0);return rE(s,"sentry.replay_id",c),c&&(null==u?void 0:u.getRecordingMode())==="buffer"&&rE(s,"sentry._internal.replay_is_buffering",!0),{...e,attributes:s}}(e,i,l);i.emit("processMetric",c);let d=a||(null==o?void 0:o.beforeSendMetric),p=d?d(c):c;if(!p){z&&et.log("`beforeSendMetric` returned `null`, will not send metric.");return}let f=function(e,t,n,r){let[,i]=r_(t,n),o=n[tn],s=o?o.spanContext().traceId:null==i?void 0:i.trace_id,a=o?o.spanContext().spanId:void 0;return{timestamp:e6(),trace_id:s??"",span_id:a,name:e.name,type:e.type,unit:e.unit,value:e.value,attributes:{...ry(r),...ry(e.attributes,"skip-undefined")}}}(p,i,n,u);z&&et.log("[Metric]",f),r(i,f),i.emit("afterCaptureMetric",p)}({type:e,name:t,value:n,unit:null==r?void 0:r.unit,attributes:null==r?void 0:r.attributes},{scope:null==r?void 0:r.scope})}let oo=Object.freeze(Object.defineProperty({__proto__:null,count:function(e,t=1,n){oi("counter",e,t,n)},distribution:function(e,t,n){oi("distribution",e,t,n)},gauge:function(e,t,n){oi("gauge",e,t,n)}},Symbol.toStringTag,{value:"Module"})),os=["trace","debug","info","warn","error","fatal"];function oa(e={}){let t=new Set(e.levels??os),n=e.client;return{log(e){let{type:r,level:i,message:o,args:s,tag:a,date:l,...u}=e,c=n||tg();if(!c)return;let d=function(e,t){if("verbose"===e)return"debug";if("silent"===e)return"trace";if(e){let t=ol[e];if(t)return t}if("number"==typeof t){let e=ou[t];if(e)return e}return"info"}(r,i);if(!t.has(d))return;
18let{normalizeDepth:p=3,normalizeMaxBreadth:f=1e3}=c.getOptions(),h=[];o&&h.push(o),s&&s.length>0&&h.push(ot(s,p,f));let m=h.join(" ");u["sentry.origin"]="auto.log.consola",a&&(u["consola.tag"]=a),r&&(u["consola.type"]=r),null!=i&&"number"==typeof i&&(u["consola.level"]=i),rk({level:d,message:m,attributes:u})}}}let ol={silent:"trace",fatal:"fatal",error:"error",warn:"warn",log:"info",info:"info",success:"info",fail:"error",ready:"info",start:"info",box:"info",debug:"debug",trace:"trace",verbose:"debug",critical:"fatal",notice:"info"},ou={0:"fatal",1:"warn",2:"info",3:"info",4:"debug",5:"trace"},oc="gen_ai.system",od="gen_ai.request.model",op="gen_ai.request.stream",of="gen_ai.request.temperature",oh="gen_ai.request.max_tokens",om="gen_ai.request.frequency_penalty",og="gen_ai.request.presence_penalty",oy="gen_ai.request.top_p",o_="gen_ai.request.top_k",ov="gen_ai.response.finish_reasons",ob="gen_ai.response.model",oS="gen_ai.response.id",ok="gen_ai.usage.input_tokens",ow="gen_ai.usage.output_tokens",ox="gen_ai.usage.total_tokens",oE="gen_ai.operation.name",oT="sentry.sdk_meta.gen_ai.input.messages.original_length",oC="gen_ai.input.messages",oI="gen_ai.system_instructions",oM="gen_ai.response.text",oA="gen_ai.request.available_tools",oR="gen_ai.response.streaming",oO="gen_ai.response.tool_calls",oL="gen_ai.agent.name",oP="gen_ai.conversation.id",oD="openai.response.id",oN="openai.response.model",o$="openai.response.timestamp",oF={CHAT:"chat",EMBEDDINGS:"embeddings"},oj="anthropic.response.timestamp",oB=e=>new TextEncoder().encode(e).length,oU=e=>oB(JSON.stringify(e));function oq(e,t){if(oB(e)<=t)return e;let n=0,r=e.length,i="";for(;n<=r;){let o=Math.floor((n+r)/2),s=e.slice(0,o);oB(s)<=t?(i=s,n=o+1):r=o-1}return i}function oz(e,t){return"string"==typeof e?t:{...e,text:t}}function oH(e){return!!e&&"object"==typeof e&&("type"in e&&"string"==typeof e.type&&"source"in e&&oH(e.source)||oW(e)||"media_type"in e&&"string"==typeof e.media_type&&"data"in e||"image_url"in e&&"string"==typeof e.image_url&&e.image_url.startsWith("data:")||"type"in e&&("blob"===e.type||"base64"===e.type)||"b64_json"in e||"type"in e&&"result"in e&&"image_generation"===e.type||"uri"in e&&"string"==typeof e.uri&&e.uri.startsWith("data:"))}function oW(e){return"inlineData"in e&&!!e.inlineData&&"object"==typeof e.inlineData&&"data"in e.inlineData&&"string"==typeof e.inlineData.data}function oJ(e){return null!==e&&"object"==typeof e&&"parts"in e&&Array.isArray(e.parts)&&e.parts.length>0}let oV="[Filtered]",oG=["image_url","data","content","b64_json","result","uri"];function oK(e){let t={...e};for(let n of(oH(t.source)&&(t.source=oK(t.source)),oW(e)&&(t.inlineData={...e.inlineData,data:oV}),oG))"string"==typeof t[n]&&(t[n]=oV);return t}function oY(e){return function(e,t){if(!Array.isArray(e)||0===e.length)return e;let n=function e(t){return t.map(t=>{let n;return t&&"object"==typeof t&&(null!==t&&"object"==typeof t&&"content"in t&&Array.isArray(t.content)?n={...t,content:e(t.content)}:"content"in t&&oH(t.content)&&(n={...t,content:oK(t.content)}),oJ(t)&&(n={...n??t,parts:e(t.parts)}),oH(n)?n=oK(n):oH(t)&&(n=oK(t))),n??t})}([e[e.length-1]]),r=n[0];return 2e4>=oU(r)?n:function(e,t){if(!e)return[];if("string"==typeof e){let t=oq(e,2e4);return t?[t]:[]}return"object"!=typeof e?[]:null!==e&&"object"==typeof e&&"content"in e&&"string"==typeof e.content?function(e,t){let n=t-oU({...e,content:""});if(n<=0)return[];let r=oq(e.content,n);return[{...e,content:r}]}(e,t):oJ(e)?function(e,t){let{parts:n}=e,r=n.map(e=>oz(e,"")),i=t-oU({...e,parts:r});if(i<=0)return[];let o=[];for(let e of n){let t="string"==typeof e?e:"text"in e?e.text:"",n=oB(t);if(n<=i)o.push(e),i-=n;else if(0===o.length){let n=oq(t,i);n&&o.push(oz(e,n));break}else break}return o.length<=0?[]:[{...e,parts:o}]}(e,t):[]}(r,2e4)}(e,0)}function oX(e){return e.includes("messages")?"chat":e.includes("completions")?"text_completion":e.includes("generateContent")?"generate_content":e.includes("models")?"models":e.includes("chat")?"chat":e.split(".").pop()||"unknown"}function oZ(e){return`gen_ai.${oX(e)}`}function oQ(e,t){return e?`${e}.${t}`:t}function o0(e,t,n,r,i){void 0!==t&&e.setAttributes({[ok]:t}),void 0!==n&&e.setAttributes({[ow]:n}),(void 0!==t||void 0!==n||void 0!==r||void 0!==i)&&e.setAttributes({[ox]:(t??0)+(n??0)+(r??0)+(i??0)})}function o1(e){return"string"==typeof e?oq(e,2e4):Array.isArray(e)?JSON.stringify(oY(e)):JSON.stringify(e)}function o2(e){if(!Array.isArray(e))return{systemInstructions:void 0,filteredMessages:e};let t=e.findIndex(e=>e&&"object"==typeof e&&"role"in e&&"system"===e.role);if(-1===t)return{systemInstructions:void 0,filteredMessages:e};let n=e[t],r="string"==typeof n.content?n.content:void 0!==n.content?JSON.stringify(n.content):void 0;return r?{systemInstructions:JSON.stringify([{type:"text",content:r}]),filteredMessages:[...e.slice(0,t),...e.slice(t+1)]}:{systemInstructions:void 0,filteredMessages:e}}
18let o3=["responses.create","chat.completions.create","embeddings.create","conversations.create"],o5=["response.created","response.in_progress","response.failed","response.completed","response.incomplete","response.queued","response.output_text.delta","response.output_item.added","response.function_call_arguments.delta","response.function_call_arguments.done","response.output_item.done"];function o4(e){return e.includes("chat.completions")||e.includes("responses")?oF.CHAT:e.includes("embeddings")?oF.EMBEDDINGS:e.includes("conversations")?oF.CHAT:e.split(".").pop()||"unknown"}function o6(e,t,n,r){void 0!==t&&e.setAttributes({"openai.usage.prompt_tokens":t,[ok]:t}),void 0!==n&&e.setAttributes({"openai.usage.completion_tokens":n,[ow]:n}),void 0!==r&&e.setAttributes({[ox]:r})}function o8(e,t,n,r){e.setAttributes({[oD]:t,[oS]:t}),e.setAttributes({[oN]:n,[ob]:n}),e.setAttributes({[o$]:new Date(1e3*r).toISOString()})}async function*o7(e,t,n){let r={eventTypes:[],responseTexts:[],finishReasons:[],responseId:"",responseModel:"",responseTimestamp:0,promptTokens:void 0,completionTokens:void 0,totalTokens:void 0,chatCompletionToolCalls:{},responsesApiToolCalls:[]};try{for await(let i of e)null!==i&&"object"==typeof i&&"object"in i&&"chat.completion.chunk"===i.object?function(e,t,n){var r,i;for(let o of(t.responseId=e.id??t.responseId,t.responseModel=e.model??t.responseModel,t.responseTimestamp=e.created??t.responseTimestamp,e.usage&&(t.promptTokens=e.usage.prompt_tokens,t.completionTokens=e.usage.completion_tokens,t.totalTokens=e.usage.total_tokens),e.choices??[]))n&&(null!=(r=o.delta)&&r.content&&t.responseTexts.push(o.delta.
18content),null!=(i=o.delta)&&i.tool_calls&&function(e,t){for(let n of e){let e=n.index;if(!(void 0===e||!n.function)){if(e in t.chatCompletionToolCalls){let r=t.chatCompletionToolCalls[e];n.function.arguments&&null!=r&&r.function&&(r.function.arguments+=n.function.arguments)}else t.chatCompletionToolCalls[e]={...n,function:{name:n.function.name,arguments:n.function.arguments||""}}}}}(o.delta.tool_calls,t)),o.finish_reason&&t.finishReasons.push(o.finish_reason)}(i,r,n):null!==i&&"object"==typeof i&&"type"in i&&"string"==typeof i.type&&i.type.startsWith("response.")&&function(e,t,n,r){if(!(e&&"object"==typeof e)){t.eventTypes.push("unknown:non-object");return}if(e instanceof Error){r.setStatus({code:2,message:"internal_error"}),n2(e,{mechanism:{handled:!1,type:"auto.ai.openai.stream-response"}});return}if("type"in e){if(!o5.includes(e.type)){t.eventTypes.push(e.type);return}if(n&&("response.output_item.done"===e.type&&"item"in e&&t.responsesApiToolCalls.push(e.item),"response.output_text.delta"===e.type&&"delta"in e&&e.delta)){t.responseTexts.push(e.delta);return}if("response"in e){let{response:r}=e;t.responseId=r.id??t.responseId,t.responseModel=r.model??t.responseModel,t.responseTimestamp=r.created_at??t.responseTimestamp,r.usage&&(t.promptTokens=r.usage.input_tokens,t.completionTokens=r.usage.output_tokens,t.totalTokens=r.usage.total_tokens),r.status&&t.finishReasons.push(r.status),n&&r.output_text&&t.responseTexts.push(r.output_text)}}}(i,r,n,t),yield i}finally{o8(t,r.responseId,r.responseModel,r.responseTimestamp),o6(t,r.promptTokens,r.completionTokens,r.totalTokens),t.setAttributes({[oR]:!0}),r.finishReasons.length&&t.setAttributes({[ov]:JSON.stringify(r.finishReasons)}),n&&r.responseTexts.length&&t.setAttributes({[oM]:r.responseTexts.join("")});let e=[...Object.values(r.chatCompletionToolCalls),...r.responsesApiToolCalls];e.length>0&&t.setAttributes({[oO]:JSON.stringify(e)}),t.end()}}function o9(e,t,n){if(n===oF.EMBEDDINGS&&"input"in t){let n=t.input;if(null==n||"string"==typeof n&&0===n.length||Array.isArray(n)&&0===n.length)return;e.setAttribute("gen_ai.embeddings.input","string"==typeof n?n:JSON.stringify(n));return}let r="input"in t?t.input:"messages"in t?t.messages:void 0;if(!r||Array.isArray(r)&&0===r.length)return;let{systemInstructions:i,filteredMessages:o}=o2(r);i&&e.setAttribute(oI,i);let s=o1(o);e.setAttribute(oC,s),Array.isArray(o)?e.setAttribute(oT,o.length):e.setAttribute(oT,1)}async function se(e,t){let n=e.catch(e=>{throw n2(e,{mechanism:{handled:!1,type:"auto.ai.openai"}}),e}),r=await t,i=await n;return i&&"object"==typeof i&&"data"in i?{...i,data:r}:r}function st(e,t){return eR(e)?new Proxy(e,{get(e,n){let r=n in Promise.prototype||n===Symbol.toStringTag?t:e,i=Reflect.get(r,n);return"withResponse"===n&&"function"==typeof i?function(){return se(i.call(e),t)}:"function"==typeof i?i.bind(r):i}}):t}function sn(e,t){var n;let r=!!(null!=(n=tg())&&n.getOptions().sendDefaultPii);return function e(t,n="",r){return new Proxy(t,{get(t,i){var o;let s=t[i],a=(o=String(i),n?`${n}.${o}`:o);return"function"==typeof s&&o3.includes(a)?function(...e){let n;let i=function(e,t){let n={[oc]:"openai",[oE]:o4(t),[tk]:"auto.ai.openai"};if(e.length>0&&"object"==typeof e[0]&&null!==e[0]){let t=e[0],r=function(e){let t=[...Array.isArray(e.tools)?e.tools:[],...e.web_search_options&&"object"==typeof e.web_search_options?[{type:"web_search_options",...e.web_search_options}]:[]];if(0!==t.length)try{return JSON.stringify(t)}catch(e){z&&et.error("Failed to serialize OpenAI tools:",e);return}}(t);r&&(n[oA]=r),Object.assign(n,function(e){let t={[od]:e.model??"unknown"};"temperature"in e&&(t[of]=e.temperature),"top_p"in e&&(t[oy]=e.top_p),"frequency_penalty"in e&&(t[om]=e.frequency_penalty),"presence_penalty"in e&&(t[og]=e.presence_penalty),"stream"in e&&(t[op]=e.stream),"encoding_format"in e&&(t["gen_ai.request.encoding_format"]=e.encoding_format),"dimensions"in e&&(t["gen_ai.request.dimensions"]=e.dimensions);let n="conversation"in e&&"string"==typeof e.conversation?e.conversation:"previous_response_id"in e&&"string"==typeof e.previous_response_id?e.previous_response_id:void 0;return n&&(t[oP]=n),t}(t))}else n[od]="unknown";return n}(e,a),o=i[od]||"unknown",l=o4(a),u=e[0],c=u&&"object"==typeof u&&!0===u.stream,d={name:`${l} ${o}${c?" stream-response":""}`,op:`gen_ai.${o4(a)}`,attributes:i};if(c){let n;let i=nL(d,i=>(n=s.apply(t,e),r.recordInputs&&u&&o9(i,u,l),(async()=>{try{let e=await n;return o7(e,i,r.recordOutputs??!1)}catch(e){throw i.setStatus({code:2,message:"internal_error"}),n2(e,{mechanism:{handled:!1,type:"auto.ai.openai.stream",data:{function:a}}}),i.end(),e}})()));return st(n,i)}let p=nO(d,i=>(n=s.apply(t,e),r.recordInputs&&u&&o9(i,u,l),n.then(e=>((function(e,t,n){var r;if(t&&"object"==typeof t){if(null!==t&&"object"==typeof t&&"object"in t&&"chat.completion"===t.object){if(function(e,t,n){if(o8(e,t.id,t.model,t.created),t.usage&&o6(e,t.usage.prompt_tokens,t.usage.completion_tokens,t.usage.total_tokens),Array.isArray(t.choices)){let r=t.choices.map(e=>e.finish_reason).filter(e=>null!==e);if(r.length>0&&e.setAttributes({[ov]:JSON.stringify(r)}),n){let n=t.choices.map(e=>{var t;return null==(t=e.message)?void 0:t.tool_calls}).filter(e=>Array.isArray(e)&&e.length>0).flat();n.length>0&&e.setAttributes({[oO]:JSON.stringify(n)})}}}
18(e,t,n),n&&null!=(r=t.choices)&&r.length){let n=t.choices.map(e=>{var t;return(null==(t=e.message)?void 0:t.content)||""});e.setAttributes({[oM]:JSON.stringify(n)})}}else null!==t&&"object"==typeof t&&"object"in t&&"response"===t.object?(function(e,t,n){if(o8(e,t.id,t.model,t.created_at),t.status&&e.setAttributes({[ov]:JSON.stringify([t.status])}),t.usage&&o6(e,t.usage.input_tokens,t.usage.output_tokens,t.usage.total_tokens),n&&Array.isArray(t.output)&&t.output.length>0){let n=t.output.filter(e=>"object"==typeof e&&null!==e&&"function_call"===e.type);n.length>0&&e.setAttributes({[oO]:JSON.stringify(n)})}}(e,t,n),n&&t.output_text&&e.setAttributes({[oM]:t.output_text})):null!==t&&"object"==typeof t&&"object"in t&&"list"===t.object&&"string"==typeof t.model&&t.model.toLowerCase().includes("embedding")?(e.setAttributes({[oN]:t.model,[ob]:t.model}),t.usage&&o6(e,t.usage.prompt_tokens,void 0,t.usage.total_tokens)):null!==t&&"object"==typeof t&&"object"in t&&"conversation"===t.object&&function(e,t){let{id:n,created_at:r}=t;e.setAttributes({[oD]:n,[oS]:n,[oP]:n}),r&&e.setAttributes({[o$]:new Date(1e3*r).toISOString()})}(e,t)}})(i,e,r.recordOutputs),e),e=>{throw n2(e,{mechanism:{handled:!1,type:"auto.ai.openai",data:{function:a}}}),e})));return st(n,p)}:"function"==typeof s?s.bind(t):s&&"object"==typeof s?e(s,a,r):s}})}(e,"",{recordInputs:r,recordOutputs:r,...t})}function sr(e,t,n,r){var i;!(e&&"object"==typeof e)||"type"in e&&"string"==typeof e.type&&"error"===e.type&&(r.setStatus({code:2,message:(null==(i=e.error)?void 0:i.type)??"internal_error"}),n2(e.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}),1)||(function(e,t){if("message_delta"===e.type&&e.usage&&"output_tokens"in e.usage&&"number"==typeof e.usage.output_tokens&&(t.completionTokens=e.usage.output_tokens),e.message){let n=e.message;n.id&&(t.responseId=n.id),n.model&&(t.responseModel=n.model),n.stop_reason&&t.finishReasons.push(n.stop_reason),n.usage&&("number"==typeof n.usage.input_tokens&&(t.promptTokens=n.usage.input_tokens),"number"==typeof n.usage.cache_creation_input_tokens&&(t.cacheCreationInputTokens=n.usage.cache_creation_input_tokens),"number"==typeof n.usage.cache_read_input_tokens&&(t.cacheReadInputTokens=n.usage.cache_read_input_tokens))}}(e,t),"content_block_start"===e.type&&"number"==typeof e.index&&e.content_block&&("tool_use"===e.content_block.type||"server_tool_use"===e.content_block.type)&&(t.activeToolBlocks[e.index]={id:e.content_block.id,name:e.content_block.name,inputJsonParts:[]}),function(e,t,n){if(!("content_block_delta"!==e.type||!e.delta)){if("number"==typeof e.index&&"partial_json"in e.delta&&"string"==typeof e.delta.partial_json){let n=t.activeToolBlocks[e.index];n&&n.inputJsonParts.push(e.delta.partial_json)}n&&"string"==typeof e.delta.text&&t.responseTexts.push(e.delta.text)}}(e,t,n),function(e,t){let n;if("content_block_stop"!==e.type||"number"!=typeof e.index)return;let r=t.activeToolBlocks[e.index];if(!r)return;let i=r.inputJsonParts.join("");try{n=i?JSON.parse(i):{}}catch{n={__unparsed:i}}t.toolCalls.push({type:"tool_use",id:r.id,name:r.name,input:n}),delete t.activeToolBlocks[e.index]}(e,t))}async function*si(e,t,n){let r={responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};try{for await(let i of e)sr(i,r,n,t),yield i}finally{r.responseId&&t.setAttributes({[oS]:r.responseId}),r.responseModel&&t.setAttributes({[ob]:r.responseModel}),o0(t,r.promptTokens,r.completionTokens,r.cacheCreationInputTokens,r.cacheReadInputTokens),t.setAttributes({[oR]:!0}),r.finishReasons.length>0&&t.setAttributes({[ov]:JSON.stringify(r.finishReasons)}),n&&r.responseTexts.length>0&&t.setAttributes({[oM]:r.responseTexts.join("")}),n&&r.toolCalls.length>0&&t.setAttributes({[oO]:JSON.stringify(r.toolCalls)}),t.end()}}let so=["messages.create","messages.stream","messages.countTokens","models.get","completions.create","models.retrieve","beta.messages.create"];function ss(e,t){(function(e,t){if(Array.isArray(t)&&0===t.length)return;let{systemInstructions:n,filteredMessages:r}=o2(t);n&&e.setAttributes({[oI]:n});let i=Array.isArray(r)?r.length:1;
18e.setAttributes({[oC]:o1(r),[oT]:i})})(e,function(e){let{system:t,messages:n,input:r}=e,i="string"==typeof t?[{role:"system",content:e.system}]:[],o=Array.isArray(r)?r:null!=r?[r]:void 0,s=Array.isArray(n)?n:null!=n?[n]:[];return[...i,...o??s]}(t)),"prompt"in t&&e.setAttributes({"gen_ai.prompt":JSON.stringify(t.prompt)})}function sa(e,t,n){throw n2(e,{mechanism:{handled:!1,type:"auto.ai.anthropic",data:{function:n}}}),t.isRecording()&&(t.setStatus({code:2,message:"internal_error"}),t.end()),e}function sl(e,t){var n;let r=!!(null!=(n=tg())&&n.getOptions().sendDefaultPii);return function e(t,n="",r){return new Proxy(t,{get(t,i){let o=t[i],s=oQ(n,String(i));return"function"==typeof o&&so.includes(s)?new Proxy(o,{apply(e,n,i){let a=function(e,t){let n={[oc]:"anthropic",[oE]:oX(t),[tk]:"auto.ai.anthropic"};if(e.length>0&&"object"==typeof e[0]&&null!==e[0]){let t=e[0];t.tools&&Array.isArray(t.tools)&&(n[oA]=JSON.stringify(t.tools)),n[od]=t.model??"unknown","temperature"in t&&(n[of]=t.temperature),"top_p"in t&&(n[oy]=t.top_p),"stream"in t&&(n[op]=t.stream),"top_k"in t&&(n[o_]=t.top_k),"frequency_penalty"in t&&(n[om]=t.frequency_penalty),"max_tokens"in t&&(n[oh]=t.max_tokens)}else"models.retrieve"===t||"models.get"===t?n[od]=e[0]:n[od]="unknown";return n}(i,s),l=a[od]??"unknown",u=oX(s),c="object"==typeof i[0]?i[0]:void 0,d=!!(null!=c&&c.stream),p="messages.stream"===s;return d||p?function(e,t,n,r,i,o,s,a,l,u,c){let d=i[od]??"unknown",p={name:`${o} ${d} stream-response`,op:oZ(s),attributes:i};return u&&!c?nL(p,async t=>{try{l.recordInputs&&a&&ss(t,a);let i=await e.apply(n,r);return si(i,t,l.recordOutputs??!1)}catch(e){return sa(e,t,s)}}):nL(p,e=>{try{l.recordInputs&&a&&ss(e,a);let i=t.apply(n,r);return function(e,t,n){let r={responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};return e.on("streamEvent",e=>{sr(e,r,n,t)}),e.on("message",()=>{t.isRecording()&&(r.responseId&&t.setAttributes({[oS]:r.responseId}),r.responseModel&&t.setAttributes({[ob]:r.responseModel}),o0(t,r.promptTokens,r.completionTokens,r.cacheCreationInputTokens,r.cacheReadInputTokens),t.setAttributes({[oR]:!0}),r.finishReasons.length>0&&t.setAttributes({[ov]:JSON.stringify(r.finishReasons)}),n&&r.responseTexts.length>0&&t.setAttributes({[oM]:r.responseTexts.join("")}),n&&r.toolCalls.length>0&&t.setAttributes({[oO]:JSON.stringify(r.toolCalls)}),t.end())}),e.on("error",e=>{n2(e,{mechanism:{handled:!1,type:"auto.ai.anthropic.stream_error"}}),t.isRecording()&&(t.setStatus({code:2,message:"stream_error"}),t.end())}),e}(i,e,l.recordOutputs??!1)}catch(t){return sa(t,e,s)}})}(o,e,t,i,a,u,s,c,r,d,p):nO({name:`${u} ${l}`,op:oZ(s),attributes:a},n=>(r.recordInputs&&c&&ss(n,c),nA(()=>e.apply(t,i),e=>{n2(e,{mechanism:{handled:!1,type:"auto.ai.anthropic",data:{function:s}}})},()=>{},e=>(function(e,t,n){if(!(!t||"object"!=typeof t)){if("type"in t&&"error"===t.type){t.error&&(e.setStatus({code:2,message:t.error.type||"internal_error"}),n2(t.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}));return}n&&function(e,t){if("content"in t&&Array.isArray(t.content)){e.setAttributes({[oM]:t.content.map(e=>e.text).filter(e=>!!e).join("")});let n=[];for(let e of t.content)("tool_use"===e.type||"server_tool_use"===e.type)&&n.push(e);n.length>0&&e.setAttributes({[oO]:JSON.stringify(n)})}"completion"in t&&e.setAttributes({[oM]:t.completion}),"input_tokens"in t&&e.setAttributes({[oM]:JSON.stringify(t.input_tokens)})}(e,t),"id"in t&&"model"in t&&(e.setAttributes({[oS]:t.id,[ob]:t.model}),"created"in t&&"number"==typeof t.created&&e.setAttributes({[oj]:new Date(1e3*t.created).toISOString()}),"created_at"in t&&"number"==typeof t.created_at&&e.setAttributes({[oj]:new Date(1e3*t.created_at).toISOString()}),"usage"in t&&t.usage&&o0(e,t.usage.input_tokens,t.usage.output_tokens,t.usage.cache_creation_input_tokens,t.usage.cache_read_input_tokens))}})(n,e,r.recordOutputs))))}}):"function"==typeof o?o.bind(t):o&&"object"==typeof o?e(o,s,r):o}})}(e,"",{recordInputs:r,recordOutputs:r,...t})}let su=["models.generateContent","models.generateContentStream","chats.create","sendMessage","sendMessageStream"],sc="chats.create";
18async function*sd(e,t,n){let r={responseTexts:[],finishReasons:[],toolCalls:[]};try{for await(let i of e)!i||function(e,t){let n=null==e?void 0:e.promptFeedback;if(null!=n&&n.blockReason){let e=n.blockReasonMessage??n.blockReason;return t.setStatus({code:2,message:`Content blocked: ${e}`}),n2(`Content blocked: ${e}`,{mechanism:{handled:!1,type:"auto.ai.google_genai"}}),!0}return!1}(i,t)||(function(e,t){"string"==typeof e.responseId&&(t.responseId=e.responseId),"string"==typeof e.modelVersion&&(t.responseModel=e.modelVersion);let n=e.usageMetadata;n&&("number"==typeof n.promptTokenCount&&(t.promptTokens=n.promptTokenCount),"number"==typeof n.candidatesTokenCount&&(t.completionTokens=n.candidatesTokenCount),"number"==typeof n.totalTokenCount&&(t.totalTokens=n.totalTokenCount))}(i,r),function(e,t,n){var r;for(let i of(Array.isArray(e.functionCalls)&&t.toolCalls.push(...e.functionCalls),e.candidates??[]))for(let e of(null!=i&&i.finishReason&&!t.finishReasons.includes(i.finishReason)&&t.finishReasons.push(i.finishReason),(null==(r=null==i?void 0:i.content)?void 0:r.parts)??[]))n&&e.text&&t.responseTexts.push(e.text),e.functionCall&&t.toolCalls.push({type:"function",id:e.functionCall.id,name:e.functionCall.name,arguments:e.functionCall.args})}(i,r,n)),yield i}finally{let e={[oR]:!0};r.responseId&&(e[oS]=r.responseId),r.responseModel&&(e[ob]=r.responseModel),void 0!==r.promptTokens&&(e[ok]=r.promptTokens),void 0!==r.completionTokens&&(e[ow]=r.completionTokens),void 0!==r.totalTokens&&(e[ox]=r.totalTokens),r.finishReasons.length&&(e[ov]=JSON.stringify(r.finishReasons)),n&&r.responseTexts.length&&(e[oM]=r.responseTexts.join("")),n&&r.toolCalls.length&&(e[oO]=JSON.stringify(r.toolCalls)),t.setAttributes(e),t.end()}}function sp(e,t="user"){return"string"==typeof e?[{role:t,content:e}]:Array.isArray(e)?e.flatMap(e=>sp(e,t)):"object"==typeof e&&e?"role"in e&&"string"==typeof e.role?[e]:"parts"in e?[{...e,role:t}]:[{role:t,content:e}]:[]}function sf(e,t){if("model"in e&&"string"==typeof e.model)return e.model;if(t&&"object"==typeof t){if("model"in t&&"string"==typeof t.model)return t.model;if("modelVersion"in t&&"string"==typeof t.modelVersion)return t.modelVersion}return"unknown"}function sh(e,t){let n=[];if("config"in t&&t.config&&"object"==typeof t.config&&"systemInstruction"in t.config&&t.config.systemInstruction&&n.push(...sp(t.config.systemInstruction,"system")),"history"in t&&n.push(...sp(t.history,"user")),"contents"in t&&n.push(...sp(t.contents,"user")),"message"in t&&n.push(...sp(t.message,"user")),Array.isArray(n)&&n.length){let{systemInstructions:t,filteredMessages:r}=o2(n);t&&e.setAttribute(oI,t);let i=Array.isArray(r)?r.length:0;e.setAttributes({[oT]:i,[oC]:JSON.stringify(oY(r))})}}function sm(e,t,n,r){let i=t===sc;return new Proxy(e,{apply(e,o,s){let a=s[0],l=function(e,t,n){let r={[oc]:"google_genai",[oE]:oX(e),[tk]:"auto.ai.google_genai"};if(t){if(r[od]=sf(t,n),"config"in t&&"object"==typeof t.config&&t.config){let e=t.config;if(Object.assign(r,function(e){let t={};return"temperature"in e&&"number"==typeof e.temperature&&(t[of]=e.temperature),"topP"in e&&"number"==typeof e.topP&&(t[oy]=e.topP),"topK"in e&&"number"==typeof e.topK&&(t[o_]=e.topK),"maxOutputTokens"in e&&"number"==typeof e.maxOutputTokens&&(t[oh]=e.maxOutputTokens),"frequencyPenalty"in e&&"number"==typeof e.frequencyPenalty&&(t[om]=e.frequencyPenalty),"presencePenalty"in e&&"number"==typeof e.presencePenalty&&(t[og]=e.presencePenalty),t}(e)),"tools"in e&&Array.isArray(e.tools)){let t=e.tools.flatMap(e=>e.functionDeclarations);r[oA]=JSON.stringify(t)}}}else r[od]=sf({},n);return r}(t,a,n),u=l[od]??"unknown",c=oX(t);return t.includes("Stream")?nL({name:`${c} ${u} stream-response`,op:oZ(t),attributes:l},async i=>{try{r.recordInputs&&a&&sh(i,a);let t=await e.apply(n,s);return sd(t,i,!!r.recordOutputs)}catch(e){throw i.setStatus({code:2,message:"internal_error"}),n2(e,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:t}}}),i.end(),e}}):nO({name:i?`${c} ${u} create`:`${c} ${u}`,op:oZ(t),attributes:l},o=>(r.recordInputs&&a&&sh(o,a),nA(()=>e.apply(n,s),e=>{n2(e,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:t}}})},()=>{},e=>{i||function(e,t,n){if(!(!t||"object"!=typeof t)){if(t.modelVersion&&e.setAttribute(ob,t.modelVersion),t.usageMetadata&&"object"==typeof t.usageMetadata){let n=t.usageMetadata;"number"==typeof n.promptTokenCount&&e.setAttributes({[ok]:n.promptTokenCount}),"number"==typeof n.candidatesTokenCount&&e.setAttributes({[ow]:n.
18candidatesTokenCount}),"number"==typeof n.totalTokenCount&&e.setAttributes({[ox]:n.totalTokenCount})}if(n&&Array.isArray(t.candidates)&&t.candidates.length>0){let n=t.candidates.map(e=>{var t;return null!=(t=e.content)&&t.parts&&Array.isArray(e.content.parts)?e.content.parts.map(e=>"string"==typeof e.text?e.text:"").filter(e=>e.length>0).join(""):""}).filter(e=>e.length>0);n.length>0&&e.setAttributes({[oM]:n.join("")})}if(n&&t.functionCalls){let n=t.functionCalls;Array.isArray(n)&&n.length>0&&e.setAttributes({[oO]:JSON.stringify(n)})}}}(o,e,r.recordOutputs)})))}})}function sg(e,t){var n;let r=!!(null!=(n=tg())&&n.getOptions().sendDefaultPii);return function e(t,n="",r){return new Proxy(t,{get:(t,i,o)=>{let s=Reflect.get(t,i,o),a=oQ(n,String(i));if("function"==typeof s&&function(e){if(su.includes(e))return!0;let t=e.split(".").pop();return su.includes(t)}(a)){if(a===sc){let n=sm(s,a,t,r);return function(...t){let i=n(...t);return i&&"object"==typeof i?e(i,"chat",r):i}}return sm(s,a,t,r)}return"function"==typeof s?s.bind(t):s&&"object"==typeof s?e(s,a,r):s}})}(e,"",{recordInputs:r,recordOutputs:r,...t})}let sy="auto.ai.langchain",s_={human:"user",ai:"assistant",assistant:"assistant",system:"system",function:"function",tool:"tool"},sv=(e,t,n)=>{null!=n&&(e[t]=n)},sb=(e,t,n)=>{let r=Number(n);Number.isNaN(r)||(e[t]=r)};function sS(e){if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return String(e)}}function sk(e){let t=e.toLowerCase();return s_[t]??t}function sw(e){return e.includes("System")?"system":e.includes("Human")?"user":e.includes("AI")||e.includes("Assistant")?"assistant":e.includes("Function")?"function":e.includes("Tool")?"tool":"user"}function sx(e){if(!(!e||Array.isArray(e)))return e.invocation_params}function sE(e){return e.map(e=>{var t,n;let r=e._getType;if("function"==typeof r)return{role:sk(r.call(e)),content:sS(e.content)};if(1===e.lc&&e.kwargs){let n=e.id,r=Array.isArray(n)&&n.length>0?n[n.length-1]:"";return{role:sk("string"==typeof r?sw(r):"user"),content:sS(null==(t=e.kwargs)?void 0:t.content)}}if(e.type)return{role:sk(String(e.type).toLowerCase()),content:sS(e.content)};if(e.role)return{role:sk(String(e.role)),content:sS(e.content)};let i=null==(n=e.constructor)?void 0:n.name;return i&&"Object"!==i?{role:sk(sw(i)),content:sS(e.content)}:{role:"user",content:sS(e.content)}})}function sT(e,t,n,r,i){return{[oc]:sS(e??"langchain"),[oE]:"chat",[od]:sS(t),[tk]:sy,...function(e,t,n){let r={},i="kwargs"in e?e.kwargs:void 0;return sb(r,of,(null==t?void 0:t.temperature)??(null==n?void 0:n.ls_temperature)??(null==i?void 0:i.temperature)),sb(r,oh,(null==t?void 0:t.max_tokens)??(null==n?void 0:n.ls_max_tokens)??(null==i?void 0:i.max_tokens)),sb(r,oy,(null==t?void 0:t.top_p)??(null==i?void 0:i.top_p)),sb(r,om,null==t?void 0:t.frequency_penalty),sb(r,og,null==t?void 0:t.presence_penalty),t&&"stream"in t&&sv(r,op,!!t.stream),r}(n,r,i)}}function sC(e={}){let t=e.recordInputs??!1,n=e.recordOutputs??!1,r=new Map,i=e=>{let t=r.get(e);null!=t&&t.isRecording()&&(t.end(),r.delete(e))},o={lc_serializable:!1,lc_namespace:["langchain_core","callbacks","sentry"],lc_secrets:void 0,lc_attributes:void 0,lc_aliases:void 0,lc_serializable_keys:void 0,lc_id:["langchain_core","callbacks","sentry"],lc_kwargs:{},name:"SentryCallbackHandler",ignoreLLM:!1,ignoreChain:!1,ignoreAgent:!1,ignoreRetriever:!1,ignoreCustomEvent:!1,raiseError:!1,awaitHandlers:!0,handleLLMStart(e,n,i,o,s,a,l,u){let c=function(e,t,n,r,i){let o=sT(null==i?void 0:i.ls_provider,(null==r?void 0:r.model)??(null==i?void 0:i.ls_model_name)??"unknown",e,r,i);return n&&Array.isArray(t)&&t.length>0&&(sv(o,oT,t.length),sv(o,oC,sS(t.map(e=>({role:"user",content:e}))))),o}(e,n,t,sx(a),l),d=c[od],p=c[oE];nL({name:`${p} ${d}`,op:"gen_ai.chat",attributes:{...c,[tS]:"gen_ai.chat"}},e=>(r.set(i,e),e))},handleChatModelStart(e,n,i,o,s,a,l,u){let c=function(e,t,n,r,i){var o;let s=sT((null==i?void 0:i.ls_provider)??(null==(o=e.id)?void 0:o[2]),(null==r?void 0:r.model)??(null==i?void 0:i.ls_model_name)??"unknown",e,r,i);if(n&&Array.isArray(t)&&t.length>0){let{systemInstructions:e,filteredMessages:n}
18=o2(sE(t.flat()));e&&sv(s,oI,e),sv(s,oT,Array.isArray(n)?n.length:0),sv(s,oC,sS(oY(n)))}return s}(e,n,t,sx(a),l),d=c[od],p=c[oE];nL({name:`${p} ${d}`,op:"gen_ai.chat",attributes:{...c,[tS]:"gen_ai.chat"}},e=>(r.set(i,e),e))},handleLLMEnd(e,t,o,s,a){let l=r.get(t);if(null!=l&&l.isRecording()){let r=function(e,t){var n,r,i,o;if(!e)return;let s={};if(Array.isArray(e.generations)){let n=e.generations.flat().map(e=>{var t,n;return null!=(t=e.generationInfo)&&t.finish_reason?e.generationInfo.finish_reason:null!=(n=e.generation_info)&&n.finish_reason?e.generation_info.finish_reason:null}).filter(e=>"string"==typeof e);if(n.length>0&&sv(s,ov,sS(n)),function(e,t){var n;let r=[];for(let t of e.flat()){let e=null==(n=t.message)?void 0:n.content;if(Array.isArray(e))for(let t of e)"tool_use"===t.type&&r.push(t)}r.length>0&&sv(t,oO,sS(r))}(e.generations,s),t){let t=e.generations.flat().map(e=>{var t;return e.text??(null==(t=e.message)?void 0:t.content)}).filter(e=>"string"==typeof e);t.length>0&&sv(s,oM,sS(t))}}!function(e,t){if(!e)return;let n=e.tokenUsage,r=e.usage;if(n)sb(t,ok,n.promptTokens),sb(t,ow,n.completionTokens),sb(t,ox,n.totalTokens);else if(r){sb(t,ok,r.input_tokens),sb(t,ow,r.output_tokens);let e=Number(r.input_tokens),n=Number(r.output_tokens),i=(Number.isNaN(e)?0:e)+(Number.isNaN(n)?0:n);i>0&&sb(t,ox,i),void 0!==r.cache_creation_input_tokens&&sb(t,"gen_ai.usage.cache_creation_input_tokens",r.cache_creation_input_tokens),void 0!==r.cache_read_input_tokens&&sb(t,"gen_ai.usage.cache_read_input_tokens",r.cache_read_input_tokens)}}(e.llmOutput,s);let a=e.llmOutput,l=null==(r=null==(n=e.generations)?void 0:n[0])?void 0:r[0],u=null==l?void 0:l.message,c=(null==a?void 0:a.model_name)??(null==a?void 0:a.model)??(null==(i=null==u?void 0:u.response_metadata)?void 0:i.model_name);c&&sv(s,ob,c);let d=(null==a?void 0:a.id)??(null==u?void 0:u.id);d&&sv(s,oS,d);let p=(null==a?void 0:a.stop_reason)??(null==(o=null==u?void 0:u.response_metadata)?void 0:o.finish_reason);return p&&sv(s,"gen_ai.response.stop_reason",sS(p)),s}(e,n);r&&l.setAttributes(r),i(t)}},handleLLMError(e,t){let n=r.get(t);null!=n&&n.isRecording()&&(n.setStatus({code:2,message:"llm_error"}),i(t)),n2(e,{mechanism:{handled:!1,type:`${sy}.llm_error_handler`}})},handleChainStart(e,n,i,o){let s=e.name||"unknown_chain",a={[tk]:"auto.ai.langchain","langchain.chain.name":s};t&&(a["langchain.chain.inputs"]=JSON.stringify(n)),nL({name:`chain ${s}`,op:"gen_ai.invoke_agent",attributes:{...a,[tS]:"gen_ai.invoke_agent"}},e=>(r.set(i,e),e))},handleChainEnd(e,t){let o=r.get(t);null!=o&&o.isRecording()&&(n&&o.setAttributes({"langchain.chain.outputs":JSON.stringify(e)}),i(t))},handleChainError(e,t){let n=r.get(t);null!=n&&n.isRecording()&&(n.setStatus({code:2,message:"chain_error"}),i(t)),n2(e,{mechanism:{handled:!1,type:`${sy}.chain_error_handler`}})},handleToolStart(e,n,i,o){let s=e.name||"unknown_tool",a={[tk]:sy,"gen_ai.tool.name":s};t&&(a["gen_ai.tool.input"]=n),nL({name:`execute_tool ${s}`,op:"gen_ai.execute_tool",attributes:{...a,[tS]:"gen_ai.execute_tool"}},e=>(r.set(i,e),e))},handleToolEnd(e,t){let o=r.get(t);null!=o&&o.isRecording()&&(n&&o.setAttributes({"gen_ai.tool.output":JSON.stringify(e)}),i(t))},handleToolError(e,t){let n=r.get(t);null!=n&&n.isRecording()&&(n.setStatus({code:2,message:"tool_error"}),i(t)),n2(e,{mechanism:{handled:!1,type:`${sy}.tool_error_handler`}})},copy:()=>o,toJSON:()=>({lc:1,type:"not_implemented",id:o.lc_id}),toJSONNotImplemented:()=>({lc:1,type:"not_implemented",id:o.lc_id})};return o}let sI="auto.ai.langgraph";function sM(e,t){var n,r;return e.compile=(n=e.compile.bind(e),r=t||{},new Proxy(n,{apply:(e,t,n)=>nO({op:"gen_ai.create_agent",name:"create_agent",attributes:{[tk]:sI,[tS]:"gen_ai.create_agent",[oE]:"create_agent"}},i=>{try{var o;let s=Reflect.apply(e,t,n),a=n.length>0?n[0]:{};null!=a&&a.name&&"string"==typeof a.name&&(i.setAttribute(oL,a.name),i.updateName(`create_agent ${a.name}`));let l=s.invoke;return l&&"function"==typeof l&&(s.invoke=(o=l.bind(s),new Proxy(o,{apply:(e,t,n)=>nO({op:"gen_ai.invoke_agent",name:"invoke_agent",attributes:{[tk]:sI,[tS]:"gen_ai.invoke_agent",[oE]:"invoke_agent"}},async i=>{try{let o=null==a?void 0:a.name;o&&"string"==typeof o&&(i.setAttribute("gen_ai.pipeline.name",o),i.setAttribute(oL,o),i.updateName(`invoke_agent ${o}`));let l=n.length>1?n[1]:void 0,u=null==l?void 0:l.configurable,c=null==u?void 0:u.thread_id;c&&"string"==typeof c&&i.setAttribute(oP,c);let d=function(e){var t,n,r,i,o,s,a,l;if(!(null!=(i=null==(r=null==(n=null==(t=e.builder)?void 0:t.nodes)?void 0:n.tools)?void 0:r.runnable)&&i.tools))return null;let u=null==(l=null==(a=null==(s=null==(o=e.builder)?void 0:o.nodes)?void 0:s.tools)?void 0:a.runnable)?void 0:l.tools;return u&&Array.isArray(u)&&0!==u.length?u.map(e=>{var t,n,r;return{name:null==(t=e.lc_kwargs)?void 0:t.name,description:null==(n=e.lc_kwargs)?void 0:n.description,schema:null==(r=e.lc_kwargs)?void 0:r.schema}}):null}(s);d&&i.setAttribute(oA,JSON.stringify(d));let p=r.recordInputs,f=r.recordOutputs,h=n.length>0?n[0].messages??[]:[];if(h&&p){let e=sE(h),{systemInstructions:t,filteredMessages:n}
18=o2(e);t&&i.setAttribute(oI,t);let r=oY(n),o=Array.isArray(n)?n.length:0;i.setAttributes({[oC]:JSON.stringify(r),[oT]:o})}let m=await Reflect.apply(e,t,n);return f&&function(e,t,n){let r=null==n?void 0:n.messages;if(!r||!Array.isArray(r))return;let i=(null==t?void 0:t.length)??0,o=r.length>i?r.slice(i):[];if(0===o.length)return;let s=function(e){if(!e||0===e.length)return null;let t=[];for(let n of e)if(n&&"object"==typeof n){let e=n.tool_calls;e&&Array.isArray(e)&&t.push(...e)}return t.length>0?t:null}(o);s&&e.setAttribute(oO,JSON.stringify(s));let a=sE(o);e.setAttribute(oM,JSON.stringify(a));let l=0,u=0,c=0;for(let t of o){let n=function(e){let t=0,n=0,r=0;if(e.usage_metadata&&"object"==typeof e.usage_metadata){let i=e.usage_metadata;return"number"==typeof i.input_tokens&&(t=i.input_tokens),"number"==typeof i.output_tokens&&(n=i.output_tokens),"number"==typeof i.total_tokens&&(r=i.total_tokens),{inputTokens:t,outputTokens:n,totalTokens:r}}if(e.response_metadata&&"object"==typeof e.response_metadata){let i=e.response_metadata;if(i.tokenUsage&&"object"==typeof i.tokenUsage){let e=i.tokenUsage;"number"==typeof e.promptTokens&&(t=e.promptTokens),"number"==typeof e.completionTokens&&(n=e.completionTokens),"number"==typeof e.totalTokens&&(r=e.totalTokens)}}return{inputTokens:t,outputTokens:n,totalTokens:r}}(t);l+=n.inputTokens,u+=n.outputTokens,c+=n.totalTokens,function(e,t){if(t.response_metadata&&"object"==typeof t.response_metadata){let n=t.response_metadata;n.model_name&&"string"==typeof n.model_name&&e.setAttribute(ob,n.model_name),n.finish_reason&&"string"==typeof n.finish_reason&&e.setAttribute(ov,[n.finish_reason])}}(e,t)}l>0&&e.setAttribute(ok,l),u>0&&e.setAttribute(ow,u),c>0&&e.setAttribute(ox,c)}(i,h??null,m),m}catch(e){throw i.setStatus({code:2,message:"internal_error"}),n2(e,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),e}})}))),s}catch(e){throw i.setStatus({code:2,message:"internal_error"}),n2(e,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),e}})})),e}function sA(e){if(void 0!==e)return e>=400&&e<500?"warning":e>=500?"error":void 0}function sR(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function sO(){var e;if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in H))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}())return!1;if(sR(H.fetch))return!0;let t=!1,n=H.document;if(n&&"function"==typeof n.createElement)try{let r=n.createElement("iframe");r.hidden=!0,n.head.appendChild(r),null!=(e=r.contentWindow)&&e.fetch&&(t=sR(r.contentWindow.fetch)),n.head.removeChild(r)}catch(e){z&&et.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return t}function sL(e,t){let n="fetch";ep(n,e),ef(n,()=>sP(void 0,t))}function sP(e,t=!1){t&&!sO()||eF(H,"fetch",function(t){return function(...n){let r=Error(),{method:i,url:o}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){let[t,n]=e;return{url:sF(t),method:s$(n,"method")?String(n.method).toUpperCase():eP(t)&&s$(t,"method")?String(t.method).toUpperCase():"GET"}}let t=e[0];return{url:sF(t),method:s$(t,"method")?String(t.method).toUpperCase():"GET"}}(n),s={args:n,fetchData:{method:i,url:o},startTimestamp:1e3*e6(),virtualError:r,headers:function(e){let[t,n]=e;try{if("object"==typeof n&&null!==n&&"headers"in n&&n.headers)return new Headers(n.headers);if(eP(t))return new Headers(t.headers)}catch{}}(n)};return e||eh("fetch",{...s}),t.apply(H,n).then(async t=>(e?e(t):eh("fetch",{...s,endTimestamp:1e3*e6(),response:t}),t),e=>{eh("fetch",{...s,endTimestamp:1e3*e6(),error:e}),ek(e)&&void 0===e.stack&&(e.stack=r.stack,ej(e,"framesToPop",1));let t=tg(),n=(null==t?void 0:t.getOptions().enhanceFetchErrorMessages)??"always";if(!1!==n&&e instanceof TypeError&&("Failed to fetch"===e.message||"Load failed"===e.message||"NetworkError when attempting to fetch resource."===e.message))try{let t=new URL(s.fetchData.url).host;"always"===n?e.message=`${e.message} (${t})`:ej(e,"__sentry_fetch_url_host__",t)}catch{}throw e})}})}async function sD(e,t){if(null!=e&&e.body){let n=e.body,r=n.getReader(),i=setTimeout(()=>{n.cancel().then(null,()=>{})},9e4),o=!0;for(;o;){let e;try{e=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);let{done:i}=await r.read();clearTimeout(e),i&&(t(),o=!1)}catch{o=!1}
18finally{clearTimeout(e)}}clearTimeout(i),r.releaseLock(),n.cancel().then(null,()=>{})}}function sN(e){let t;try{t=e.clone()}catch{return}sD(t,()=>{eh("fetch-body-resolved",{endTimestamp:1e3*e6(),response:e})})}function s$(e,t){return!!e&&"object"==typeof e&&!!e[t]}function sF(e){return"string"==typeof e?e:e?s$(e,"url")?e.url:e.toString?e.toString():"":""}function sj(){return"u">typeof window&&(!(!("u">typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("u">typeof q?q:0))||function(){let e=H.process;return(null==e?void 0:e.type)==="renderer"}())}let sB=H.document,sU=H.navigator,sq="Report a Bug",sz="Cancel",sH="Send Bug Report",sW="Confirm",sJ="Report a Bug",sV="[email protected]",sG="Email",sK="What's the bug? What did you expect?",sY="Description",sX="Your Name",sZ="Name",sQ="Thank you for your report!",s0="(required)",s1="Add a screenshot",s2="Remove screenshot",s3="Highlight",s5="Hide",s4="Remove",s6=(e,t={includeReplay:!0})=>{if(!e.message)throw Error("Unable to submit feedback with empty message");let n=tg();if(!n)throw Error("No client setup, cannot send feedback.");e.tags&&Object.keys(e.tags).length&&td().setTags(e.tags);let r=i7({source:"api",url:eN(),...e},t);return new Promise((e,t)=>{let i=setTimeout(()=>t("Unable to determine if Feedback was correctly sent."),3e4),o=n.on("afterSendEvent",(n,s)=>{if(n.event_id===r)return clearTimeout(i),o(),null!=s&&s.statusCode&&s.statusCode>=200&&s.statusCode<300?e(r):(null==s?void 0:s.statusCode)===403?t("Unable to send feedback. This could be because this domain is not in your list of allowed domains."):t("Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.")})})},s8=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function s7(e,t){return{...e,...t,tags:{...e.tags,...t.tags},onFormOpen:()=>{var n,r;null==(n=t.onFormOpen)||n.call(t),null==(r=e.onFormOpen)||r.call(e)},onFormClose:()=>{var n,r;null==(n=t.onFormClose)||n.call(t),null==(r=e.onFormClose)||r.call(e)},onSubmitSuccess:(n,r)=>{var i,o;null==(i=t.onSubmitSuccess)||i.call(t,n,r),null==(o=e.onSubmitSuccess)||o.call(e,n,r)},onSubmitError:n=>{var r,i;null==(r=t.onSubmitError)||r.call(t,n),null==(i=e.onSubmitError)||i.call(e,n)},onFormSubmitted:()=>{var n,r;null==(n=t.onFormSubmitted)||n.call(t),null==(r=e.onFormSubmitted)||r.call(e)},themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function s9(e,t){return Object.entries(t).forEach(([t,n])=>{e.setAttributeNS(null,t,n)}),e}let ae="rgba(88, 74, 192, 1)",at={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:ae,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%)"},an={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackground:ae,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 ar(e){return`
19  --foreground: ${e.foreground};
20  --background: ${e.background};
21  --accent-foreground: ${e.accentForeground};
22  --accent-background: ${e.accentBackground};
23  --success-color: ${e.successColor};
24  --error-color: ${e.errorColor};
25  --border: ${e.border};
26  --box-shadow: ${e.boxShadow};
27  --outline: ${e.outline};
28  --interactive-filter: ${e.interactiveFilter};
29  `}let ai=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>({id:r="sentry-feedback",autoInject:i=!0,showBranding:o=!0,isEmailRequired:s=!1,isNameRequired:a=!1,showEmail:l=!0,showName:u=!0,enableScreenshot:c=!0,useSentryUser:d={email:"email",name:"username"},tags:p,styleNonce:f,scriptNonce:h,colorScheme:m="system",themeLight:g={},themeDark:y={},addScreenshotButtonLabel:_=s1,cancelButtonLabel:v=sz,confirmButtonLabel:b=sW,emailLabel:S=sG,emailPlaceholder:k=sV,formTitle:w=sJ,isRequiredLabel:x=s0,messageLabel:E=sY,messagePlaceholder:T=sK,nameLabel:C=sZ,namePlaceholder:I=sX,removeScreenshotButtonLabel:M=s2,submitButtonLabel:A=sH,successMessageText:R=sQ,triggerLabel:O=sq,triggerAriaLabel:L="",highlightToolText:P=s3,hideToolText:D=s5,removeHighlightText:N=s4,onFormOpen:$,onFormClose:F,onSubmitSuccess:j,onSubmitError:B,onFormSubmitted:U}={})=>{let q={id:r,autoInject:i,showBranding:o,isEmailRequired:s,isNameRequired:a,showEmail
29:l,showName:u,enableScreenshot:c,useSentryUser:d,tags:p,styleNonce:f,scriptNonce:h,colorScheme:m,themeDark:y,themeLight:g,triggerLabel:O,triggerAriaLabel:L,cancelButtonLabel:v,submitButtonLabel:A,confirmButtonLabel:b,formTitle:w,emailLabel:S,emailPlaceholder:k,messageLabel:E,messagePlaceholder:T,nameLabel:C,namePlaceholder:I,successMessageText:R,isRequiredLabel:x,addScreenshotButtonLabel:_,removeScreenshotButtonLabel:M,highlightToolText:P,hideToolText:D,removeHighlightText:N,onFormClose:F,onFormOpen:$,onSubmitError:B,onSubmitSuccess:j,onFormSubmitted:U},z=null,W=[],J=e=>{if(!z){let t=sB.createElement("div");t.id=String(e.id),sB.body.appendChild(t),(z=t.attachShadow({mode:"open"})).appendChild(function({colorScheme:e,themeDark:t,themeLight:n,styleNonce:r}){let i=sB.createElement("style");return i.textContent=`
30:host {
31  --font-family: system-ui, 'Helvetica Neue', Arial, sans-serif;
32  --font-size: 14px;
33  --z-index: 100000;
34
35  --page-margin: 16px;
36  --inset: auto 0 0 auto;
37  --actor-inset: var(--inset);
38
39  font-family: var(--font-family);
40  font-size: var(--font-size);
41
42  ${"system"!==e?`color-scheme: only ${e};`:""}
43
44  ${ar("dark"===e?{...an,...t}:{...at,...n})}
45}
46
47${"system"===e?`
48@media (prefers-color-scheme: dark) {
49  :host {
50    color-scheme: only dark;
51
52    ${ar({...an,...t})}
53  }
54}`:""}
55`,r&&i.setAttribute("nonce",r),i}(e))}return z},V=async r=>{let i,o;let s=r.enableScreenshot&&!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(sU.userAgent)||/Macintosh/i.test(sU.userAgent)&&sU.maxTouchPoints&&sU.maxTouchPoints>1||!isSecureContext);try{i=(t?t():await e("feedbackModalIntegration",h))(),rg(i)}catch{throw s8&&et.error("[Feedback] Error when trying to load feedback integrations. Try using `feedbackSyncIntegration` in your `Sentry.init`."),Error("[Feedback] Missing feedback modal integration!")}try{let t=s?n?n():await e("feedbackScreenshotIntegration",h):void 0;t&&(o=t(),rg(o))}catch{s8&&et.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.")}let a=i.createDialog({options:{...r,onFormClose:()=>{var e;null==a||a.close(),null==(e=r.onFormClose)||e.call(r)},onFormSubmitted:()=>{var e;null==a||a.close(),null==(e=r.onFormSubmitted)||e.call(r)}},screenshotIntegration:o,sendFeedback:s6,shadow:J(r)});return a},G=(e,t={})=>{let n=s7(q,t),r="string"==typeof e?sB.querySelector(e):"function"==typeof e.addEventListener?e:null;if(!r)throw s8&&et.error("[Feedback] Unable to attach to target element"),Error("Unable to attach to target element");let i=null,o=async()=>{i||(i=await V({...n,onFormSubmitted:()=>{var e;null==i||i.removeFromDom(),null==(e=n.onFormSubmitted)||e.call(n)}})),i.appendToDom(),i.open()};r.addEventListener("click",o);let s=()=>{W=W.filter(e=>e!==s),null==i||i.removeFromDom(),i=null,r.removeEventListener("click",o)};return W.push(s),s},K=(e={})=>{let t=s7(q,e),n=J(t),r=function({triggerLabel:e,triggerAriaLabel:t,shadow:n,styleNonce:r}){let i=sB.createElement("button");if(i.type="button",i.className="widget__actor",i.ariaHidden="false",i.ariaLabel=t||e||sq,i.appendChild(function(){let e=e=>H.document.createElementNS("http://www.w3.org/2000/svg",e),t=s9(e("svg"),{width:"20",height:"20",viewBox:"0 0 20 20",fill:"var(--actor-color, var(--foreground))"}),n=s9(e("g"),{clipPath:"url(#clip0_57_80)"}),r=s9(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.45
5556 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 i=e("defs"),o=s9(e("clipPath"),{id:"clip0_57_80"}),s=s9(e("rect"),{width:"20",height:"20",fill:"white"});return o.appendChild(s),i.appendChild(o),t.appendChild(i).appendChild(o).appendChild(s),t}()),e){let t=sB.createElement("span");t.appendChild(sB.createTextNode(e)),i.appendChild(t)}let o=function(e){let t=sB.createElement("style");return t.textContent=`
56.widget__actor {
57  position: fixed;
58  z-index: var(--z-index);
59  margin: var(--page-margin);
60  inset: var(--actor-inset);
61
62  display: flex;
63  align-items: center;
64  gap: 8px;
65  padding: 16px;
66
67  font-family: inherit;
68  font-size: var(--font-size);
69  font-weight: 600;
70  line-height: 1.14em;
71  text-decoration: none;
72
73  background: var(--actor-background, var(--background));
74  border-radius: var(--actor-border-radius, 1.7em/50%);
75  border: var(--actor-border, var(--border));
76  box-shadow: var(--actor-box-shadow, var(--box-shadow));
77  color: var(--actor-color, var(--foreground));
78  fill: var(--actor-color, var(--foreground));
79  cursor: pointer;
80  opacity: 1;
81  transition: transform 0.2s ease-in-out;
82  transform: translate(0, 0) scale(1);
83}
84.widget__actor[aria-hidden="true"] {
85  opacity: 0;
86  pointer-events: none;
87  visibility: hidden;
88  transform: translate(0, 16px) scale(0.98);
89}
90
91.widget__actor:hover {
92  background: var(--actor-hover-background, var(--background));
93  filter: var(--interactive-filter);
94}
95
96.widget__actor svg {
97  width: 1.14em;
98  height: 1.14em;
99}
100
101@media (max-width: 600px) {
102  .widget__actor span {
103    display: none;
104  }
105}
106`,e&&t.setAttribute("nonce",e),t}(r);return{el:i,appendToDom(){n.appendChild(o),n.appendChild(i)},removeFromDom(){i.remove(),o.remove()},show(){i.ariaHidden="false"},hide(){i.ariaHidden="true"}}}({triggerLabel:t.triggerLabel,triggerAriaLabel:t.triggerAriaLabel,shadow:n,styleNonce:f});return G(r.el,{...t,onFormOpen(){r.hide()},onFormClose(){r.show()},onFormSubmitted(){r.show()}}),r};return{name:"Feedback",setupOnce(){sj()&&q.autoInject&&("loading"===sB.readyState?sB.addEventListener("DOMContentLoaded",()=>K().appendToDom()):K().appendToDom())},attachTo:G,createWidget(e={}){let t=K(s7(q,e));return t.appendToDom(),t},createForm:async(e={})=>V(s7(q,e)),remove(){var e;z&&(null==(e=z.parentElement)||e.remove(),z=null),W.forEach(e=>e()),W=[]}}};function ao(){let e=tg();return null==e?void 0:e.getIntegrationByName("Feedback")}var as,aa,al,au,ac,ad,ap,af={},ah=[],am=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ag=Array.isArray;function ay(e,t){for(var n in t)e[n]=t[n];return e}function a_(e){var t=e.parentNode;t&&t.removeChild(e)}function av(e,t,n){var r,i,o,s={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?as.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return ab(e,s,r,i,null)}function ab(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i??++al,__i:-1,__u:0};return null==i&&null!=aa.vnode&&aa.vnode(o),o}function aS(e){return e.children}function ak(e,t){this.props=e,this.context=t}function aw(e,t){if(null==t)return e.__?aw(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?aw(e):null}function ax(e){(!e.__d&&(e.__d=!0)&&au.push(e)&&!aE.__r++||ac!==aa.debounceRendering)&&((ac=aa.debounceRendering)||ad)(aE)}function aE(){var e,t,n,r=[],i=[];for(au.sort(ap);e=au.shift();)e.__d&&(n=au.length,t=function(e,t,n){var r,i=e.__v,o=i.__e,s=e.__P;if(s)return(r=ay({},i)).__v=i.__v+1,aa.vnode&&aa.vnode(r),aR(s,r,i,e.__n,void 0!==s.ownerSVGElement,32&i.__u?[o]:null,t,o??aw(i),!!(32&i.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=o&&function e(t){var n,r;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,n=0;n<t.__k.length;n++)if(null!=(r=t.__k[n])&&null!=r.__e){t.__e=t.__c.base=r.__e;break}return e(t)}}(r),r}(e,r,i)||t,0===n||au.length>n?(aO(r,t,i),i.length=r.length=0,t=void 0,au.sort(ap)):t&&aa.__c&&aa.__c(t,ah));t&&aO(r,t,i),aE.__r=0}function aT(e,t,n,r,i,o,s,a,l,u,c){var d,p,f,h,m,g=r&&r.__k||ah,y=t.length;for(n.__d=l,function(e,t,n){var r,i,o,s,a,l=t.length,u=n.length,c=u,d=0;for(e.__k=[],r=0;r<l;r++)null!=(i=e.__k[r]=null==(i=t[r])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?ab(null,i,null,null,i):ag(i)?ab(aS,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?ab(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=e,i.__b=e.__b+1,a=function(e,t,n,r){var i=e.key,o=e.type,s=n-1,a=n+1,l=t[n];if(null===l||l&&i==l.key&&o===l.type)return n;if(r>(null==l||131072&l.__u?0:1))for(;s>=0||a<t.length;){if(s>=0){if((l=t[s])&&!(131072&l.__u)&&i==l.key&&o===l.type)return s;s--}if(a<t.length){if((l=t[a])&&!(131072&l.__u)&&i==l.key&&o===l.type)return a;a++}}return -1}(i,n,s=r+d,c),i.__i=a,o=null,-1!==a&&(c--,(o=n[a])&&(o.__u|=131072)),null==o||null===o.__v?(-1==a&&d--,"function"!=typeof i.type&&(i.__u|=65536)):a!==s&&(a===s+1?d++:a>s?c>
vendor: 6,917 bytes, line 106
106l-s?d+=a-s:d--:d=a<s&&a==s-1?a-s:0,a!==r+d&&(i.__u|=65536))):(o=n[r])&&null==o.key&&o.__e&&(o.__e==e.__d&&(e.__d=aw(o)),aP(o,o,!1),n[r]=null,c--);if(c)for(r=0;r<u;r++)null==(o=n[r])||131072&o.__u||(o.__e==e.__d&&(e.__d=aw(o)),aP(o,o))}(n,t,g),l=n.__d,d=0;d<y;d++)null!=(f=n.__k[d])&&"boolean"!=typeof f&&"function"!=typeof f&&(p=-1===f.__i?af:g[f.__i]||af,f.__i=d,aR(e,f,p,i,o,s,a,l,u,c),h=f.__e,f.ref&&p.ref!=f.ref&&(p.ref&&aL(p.ref,null,f),c.push(f.ref,f.__c||h,f)),null==m&&null!=h&&(m=h),65536&f.__u||p.__k===f.__k?l=function e(t,n,r){var i,o;if("function"==typeof t.type){for(i=t.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=t,n=e(i[o],n,r));return n}t.__e!=n&&(r.insertBefore(t.__e,n||null),n=t.__e);do n=n&&n.nextSibling;while(null!=n&&8===n.nodeType);return n}(f,l,e):"function"==typeof f.type&&void 0!==f.__d?l=f.__d:h&&(l=h.nextSibling),f.__d=void 0,f.__u&=-196609);n.__d=l,n.__e=m}function aC(e,t,n){"-"===t[0]?e.setProperty(t,n??""):e[t]=null==n?"":"number"!=typeof n||am.test(t)?n:n+"px"}function aI(e,t,n,r,i){var o;e:if("style"===t){if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||aC(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||aC(e.style,t,n[t])}}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase() in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,o?aA:aM,o)):e.removeEventListener(t,o?aA:aM,o);else{if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&"role"!==t&&t in e)try{e[t]=n??"";break e}catch{}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function aM(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(aa.event?aa.event(e):e)}}function aA(e){if(this.l)return this.l[e.type+!0](aa.event?aa.event(e):e)}function aR(e,t,n,r,i,o,s,a,l,u){var c,d,p,f,h,m,g,y,_,v,b,S,k,w,x,E=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(l=!!(32&n.__u),o=[a=t.__e=n.__e]),(c=aa.__b)&&c(t);e:if("function"==typeof E)try{if(y=t.props,_=(c=E.contextType)&&r[c.__c],v=c?_?_.props.value:c.__:r,n.__c?g=(d=t.__c=n.__c).__=d.__E:("prototype"in E&&E.prototype.render?t.__c=d=new E(y,v):(t.__c=d=new ak(y,v),d.constructor=E,d.render=aD),_&&_.sub(d),d.props=y,d.state||(d.state={}),d.context=v,d.__n=r,p=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=E.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=ay({},d.__s)),ay(d.__s,E.getDerivedStateFromProps(y,d.__s))),f=d.props,h=d.state,d.__v=t,p)null==E.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==E.getDerivedStateFromProps&&y!==f&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(y,v),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(y,d.__s,v)||t.__v===n.__v)){for(t.__v!==n.__v&&(d.props=y,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(e){e&&(e.__=t)}),b=0;b<d._sb.length;b++)d.__h.push(d._sb[b]);d._sb=[],d.__h.length&&s.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(y,d.__s,v),null!=d.componentDidUpdate&&d.__h.push(function(){d.componentDidUpdate(f,h,m)})}if(d.context=v,d.props=y,d.__P=e,d.__e=!1,S=aa.__r,k=0,"prototype"in E&&E.prototype.render){for(d.state=d.__s,d.__d=!1,S&&S(t),c=d.render(d.props,d.state,d.context),w=0;w<d._sb.length;w++)d.__h.push(d._sb[w]);d._sb=[]}else do d.__d=!1,S&&S(t),c=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++k<25);d.state=d.__s,null!=d.getChildContext&&(r=ay(ay({},r),d.getChildContext())),p||null==d.getSnapshotBeforeUpdate||(m=d.getSnapshotBeforeUpdate(f,h)),aT(e,ag(x=null!=c&&c.type===aS&&null==c.key?c.props.children:c)?x:[x],t,n,r,i,o,s,a,l,u),d.base=t.__e,t.__u&=-161,d.__h.length&&s.push(d),g&&(d.__E=d.__=null)}catch(e){t.__v=null,l||null!=o?(t.__e=a,t.__u|=l?160:32,o[o.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),aa.__e(e,t,n)}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,i,o,s,a,l){var u,c,d,p,f,h,m,g=n.props,y=t.props,_=t.type;if("svg"===_&&(i=!0),null!=o){for(u=0;u<o.length;u++)if((f=o[u])&&"setAttribute"in f==!!_&&(_?f.localName===_:3===f.nodeType)){e=f,o[u]=null;break}}if(null==e){if(null===_)return document.createTextNode(y);e=i?document.createElementNS("http://www.w3.org/2000/svg",_):document.createElement(_,y.is&&y),o=null,a=!1}if(null===_)g===y||a&&e.data===y||(e.data=y);else{if(o=o&&as.call(e.childNodes),g=n.props||af,!a&&null!=o)for(g={},u=0;u<e.attributes.length;u++)g[(f=e.attributes[u]).name]=f.value;for(u in g)f=g[u],"children"==u||("dangerouslySetInnerHTML"==u?d=f:"key"===u||u in y||aI(e,u,null,f,i));for(u in y)f=y[u],"children"==u?p=f:"dangerouslySetInnerHTML"==u?c=f:"value"==u?h=f:"checked"==u?m=f:"key"===u||a&&"function"!=typeof f||g[u]===f||aI(e,u,f,g[u],i);if(c)a||d&&(c.__html===d.__html||c.__html===e.innerHTML)||(e.innerHTML=c.__html),t.__k=[];else if(d&&(e.innerHTML=""),aT(e,ag(p)?p:[p],t,n,r,i&&"foreignObject"!==_,o,s,o?o[0]:n.__k&&aw(n,0),a,l),null!=o)for(u=o.length;u--;)null!=o[u]&&a_(o[u]);a||(u="value",void 0===h||h===e[u]&&("progress"!==_||h)&&("option"!==_||h===g[u])||aI(e,u,h,g[u],!1),u="checked",void 0!==m&&m!==e[u]&&aI(e,u,m,g[u],!1))}return e}(n.__e,t,n,r,i,o,s,l,u);(c=aa.diffed)&&c(t)}function aO(e,t,n){for(var r=0;r<n.length;r++)aL(n[r],n[++r],n[++r]);aa.__c&&aa.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){aa.__e(e,t.__v)}})}function aL(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){aa.__e(e,n)}}function aP(e,t,n){var r,i;if(aa.unmount&&aa.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||aL(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){aa.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&aP(r[i],t,n||"function"!=typeof e.type);n||null==e.__e||a_(e.__e),e.__=e.__e=e.__d=void 0}function aD(e,t,n){return this.constructor(e,n)}as=ah.slice,aa={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(t){e=t}throw e}},al=0,ak.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=ay({},this.state),"function"==typeof e&&(e=e(ay({},n),this.props)),e&&ay(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),ax(this))},ak.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),ax(this))},ak.prototype.render=aS,au=[],ad="function"==typeof Promise?Promise.prototype.then.bind(Prom
106ise.resolve()):setTimeout,ap=function(e,t){return e.__v.__b-t.__v.__b},aE.__r=0;var aN,a$,aF,aj,aB=0,aU=[],aq=[],az=aa,aH=az.__b,aW=az.__r,aJ=az.diffed,aV=az.__c,aG=az.unmount,aK=az.__;function aY(e,t){az.__h&&az.__h(a$,e,aB||t),aB=0;var n=a$.__H||(a$.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:aq}),n.__[e]}function aX(e){return aB=1,aZ(a8,e)}function aZ(e,t,n){var r=aY(aN++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):a8(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=a$,!a$.u)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return!!e.__c});if(i.every(function(e){return!e.__N}))return!o||o.call(this,e,t,n);var s=!1;return i.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}}),!(!s&&r.__c.props===e)&&(!o||o.call(this,e,t,n))};a$.u=!0;var o=a$.shouldComponentUpdate,s=a$.componentWillUpdate;a$.componentWillUpdate=function(e,t,n){if(this.__e){var r=o;o=void 0,i(e,t,n),o=r}s&&s.call(this,e,t,n)},a$.shouldComponentUpdate=i}return r.__N||r.__}function aQ(e,t){var n=aY(aN++,4);!az.__s&&a6(n.__H,t)&&(n.__=e,n.i=t,a$.__h.push(n))}function a0(e,t){var n=aY(aN++,7);return a6(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function a1(e,t){return aB=8,a0(function(){return e},t)}function a2(){for(var e;e=aU.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(a5),e.__H.__h.forEach(a4),e.__H.__h=[]}catch(t){e.__H.__h=[],az.__e(t,e.__v)}}az.__b=function(e){a$=null,aH&&aH(e)},az.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),aK&&aK(e,t)},az.__r=function(e){aW&&aW(e),aN=0;var t=(a$=e.__c).__H;t&&(aF===a$?(t.__h=[],a$.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.__V=aq,e.__N=e.i=void 0})):(t.__h.forEach(a5),t.__h.forEach(a4),t.__h=[],aN=0)),aF=a$},az.diffed=function(e){aJ&&aJ(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==aU.push(t)&&aj===az.requestAnimationFrame||((aj=az.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),a3&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);a3&&(t=requestAnimationFrame(n))})(a2)),t.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.__V!==aq&&(e.__=e.__V),e.i=void 0,e.__V=aq})),aF=a$=null},az.__c=function(e,t){t.some(function(e){try{e.__h.forEach(a5),e.__h=e.__h.filter(function(e){return!e.__||a4(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],az.__e(n,e.__v)}}),aV&&aV(e,t)},az.unmount=function(e){aG&&aG(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{a5(e)}catch(e){t=e}}),n.__H=void 0,t&&az.__e(t,n.__v))};var a3="function"==typeof requestAnimationFrame;function a5(e){var t=a$,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),a$=t}function a4(e){var t=a$;e.__c=e.__(),a$=t}function a6(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function a8(e,t){return"function"==typeof t?t(e):t}let a7=Object.defineProperty({__proto__:null,useCallback:a1,useContext:function(e){var t=a$.context[e.__c],n=aY(aN++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(a$)),t.props.value):e.__},useDebugValue:function(e,t){az.useDebugValue&&az.useDebugValue(t?t(e):e)},useEffect:function(e,t){var n=aY(aN++,3);!az.__s&&a6(n.__H,t)&&(n.__=e,n.i=t,a$.__H.__h.push(n))},useErrorBoundary:function(e){var t=aY(aN++,10),n=aX();return t.__=e,a$.componentDidCatch||(a$.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]},useId:function(){var e=aY(aN++,11);if(!e.__){for(var t=a$.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__},useImperativeHandle:function(e,t,n){aB=6,aQ(function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},null==n?n:n.concat(e))},useLayoutEffect:aQ,useMemo:a0,useReducer:aZ,useRef:function(e){return aB=5,a0(function(){return{current:e}},[])},useState:aX},Symbol.toStringTag,{value:"Module"});function a9({options:e}){let t=a0(()=>({__html:function(){let e=e=>sB.createElementNS("http://www.w3.org/2000/svg",e),t=s9(e("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),n=s9(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}().outerHTML}),[]);return av("h2",{class:"dialog__header"},av("span",{class:"dialog__title"},e.formTitle),e.showBranding?av("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:t}):null)}function le(e,t){let n=e.get(t);return"string"==typeof n?n.trim():""}function lt({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:i,onSubmitSuccess:o,onSubmitError:s,showEmail
106:a,showName:l,screenshotInput:u}){let{tags:c,addScreenshotButtonLabel:d,removeScreenshotButtonLabel:p,cancelButtonLabel:f,emailLabel:h,emailPlaceholder:m,isEmailRequired:g,isNameRequired:y,messageLabel:_,messagePlaceholder:v,nameLabel:b,namePlaceholder:S,submitButtonLabel:k,isRequiredLabel:w}=e,[x,E]=aX(!1),[T,C]=aX(null),[I,M]=aX(!1),A=null==u?void 0:u.input,[R,O]=aX(null),L=a1(e=>{O(e),M(!1)},[]),P=a1(e=>{let t=function(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}(e,{emailLabel:h,isEmailRequired:g,isNameRequired:y,messageLabel:_,nameLabel:b});return t.length>0?C(`Please enter in the following required fields: ${t.join(", ")}`):C(null),0===t.length},[h,g,y,_,b]);return av("form",{class:"form",onSubmit:a1(async e=>{E(!0);try{if(e.preventDefault(),!(e.target instanceof HTMLFormElement))return;let t=new FormData(e.target),n=await (u&&I?u.value():void 0),r={name:le(t,"name"),email:le(t,"email"),message:le(t,"message"),attachments:n?[n]:void 0};if(!P(r))return;try{let e=await i({name:r.name,email:r.email,message:r.message,source:"widget",tags:c},{attachments:r.attachments});o(r,e)}catch(e){s8&&et.error(e),C(e),s(e)}}finally{E(!1)}},[u&&I,o,s])},A&&I?av(A,{onError:L}):null,av("fieldset",{class:"form__right","data-sentry-feedback":!0,disabled:x},av("div",{class:"form__top"},T?av("div",{class:"form__error-container"},T):null,l?av("label",{for:"name",class:"form__label"},av(ln,{label:b,isRequiredLabel:w,isRequired:y}),av("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:S,required:y,type:"text"})):av("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden"}),a?av("label",{for:"email",class:"form__label"},av(ln,{label:h,isRequiredLabel:w,isRequired:g}),av("input",{class:"form__input",defaultValue:t,id:"email",name:"email",placeholder:m,required:g,type:"email"})):av("input",{"aria-hidden":!0,value:t,name:"email",type:"hidden"}),av("label",{for:"message",class:"form__label"},av(ln,{label:_,isRequiredLabel:w,isRequired:!0}),av("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:v,required:!0,rows:5})),A?av("label",{for:"screenshot",class:"form__label"},av("button",{class:"btn btn--default",disabled:x,type:"button",onClick:()=>{O(null),M(e=>!e)}},I?p:d),R?av("div",{class:"form__error-container"},R.message):null):null),av("div",{class:"btn-group"},av("button",{class:"btn btn--primary",disabled:x,type:"submit"},k),av("button",{class:"btn btn--default",disabled:x,type:"button",onClick:r},f))))}function ln({label:e,isRequired:t,isRequiredLabel:n}){return av("span",{class:"form__label__text"},e,t&&av("span",{class:"form__label__text--required"},n))}function lr({open:e,onFormSubmitted:t,...n}){let r=n.options,i=a0(()=>({__html:function(){let e=e=>H.document.createElementNS("http://www.w3.org/2000/svg",e),t=s9(e("svg"),{width:"16",height:"17",viewBox:"0 0 16 17",fill:"inherit"}),n=s9(e("g"),{clipPath:"url(#clip0_57_156)"}),r=s9(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"}),i=s9(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 
10610.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(i,r);let o=e("defs"),s=s9(e("clipPath"),{id:"clip0_57_156"}),a=s9(e("rect"),{width:"16",height:"16",fill:"white",transform:"translate(0 0.5)"});return s.appendChild(a),o.appendChild(s),t.appendChild(o).appendChild(s).appendChild(a),t}().outerHTML}),[]),[o,s]=aX(null),a=a1(()=>{o&&(clearTimeout(o),s(null)),t()},[o]),l=a1((e,r)=>{n.onSubmitSuccess(e,r),s(setTimeout(()=>{t(),s(null)},5e3))},[t]);return av(aS,null,o?av("div",{class:"success__position",onClick:a},av("div",{class:"success__content"},r.successMessageText,av("span",{class:"success__icon",dangerouslySetInnerHTML:i}))):av("dialog",{class:"dialog",onClick:r.onFormClose,open:e},av("div",{class:"dialog__position"},av("div",{class:"dialog__content",onClick:e=>{e.stopPropagation()}},av(a9,{options:r}),av(lt,{...n,onSubmitSuccess:l})))))}let li=`
107.dialog {
108  position: fixed;
109  z-index: var(--z-index);
110  margin: 0;
111  inset: 0;
112
113  display: flex;
114  align-items: center;
115  justify-content: center;
116  padding: 0;
117  height: 100vh;
118  width: 100vw;
119
120  color: var(--dialog-color, var(--foreground));
121  fill: var(--dialog-color, var(--foreground));
122  line-height: 1.75em;
123
124  background-color: rgba(0, 0, 0, 0.05);
125  border: none;
126  inset: 0;
127  opacity: 1;
128  transition: opacity 0.2s ease-in-out;
129}
130
131.dialog__position {
132  position: fixed;
133  z-index: var(--z-index);
134  inset: var(--dialog-inset);
135  padding: var(--page-margin);
136  display: flex;
137  max-height: calc(100vh - (2 * var(--page-margin)));
138}
139@media (max-width: 600px) {
140  .dialog__position {
141    inset: var(--page-margin);
142    padding: 0;
143  }
144}
145
146.dialog__position:has(.editor) {
147  inset: var(--page-margin);
148  padding: 0;
149}
150
151.dialog:not([open]) {
152  opacity: 0;
153  pointer-events: none;
154  visibility: hidden;
155}
156.dialog:not([open]) .dialog__content {
157  transform: translate(0, -16px) scale(0.98);
158}
159
160.dialog__content {
161  display: flex;
162  flex-direction: column;
163  gap: 16px;
164  padding: var(--dialog-padding, 24px);
165  max-width: 100%;
166  width: 100%;
167  max-height: 100%;
168  overflow: auto;
169
170  background: var(--dialog-background, var(--background));
171  border-radius: var(--dialog-border-radius, 20px);
172  border: var(--dialog-border, var(--border));
173  box-shadow: var(--dialog-box-shadow, var(--box-shadow));
174  transform: translate(0, 0) scale(1);
175  transition: transform 0.2s ease-in-out;
176}
177
178`,lo=`
179.dialog__header {
180  display: flex;
181  gap: 4px;
182  justify-content: space-between;
183  font-weight: var(--dialog-header-weight, 600);
184  margin: 0;
185}
186.dialog__title {
187  align-self: center;
188  width: var(--form-width, 272px);
189}
190
191@media (max-width: 600px) {
192  .dialog__title {
193    width: auto;
194  }
195}
196
197.dialog__position:has(.editor) .dialog__title {
198  width: auto;
199}
200
201
202.brand-link {
203  display: inline-flex;
204}
205.brand-link:focus-visible {
206  outline: var(--outline);
207}
208`,ls=`
209.form {
210  display: flex;
211  overflow: auto;
212  flex-direction: row;
213  gap: 16px;
214  flex: 1 0;
215}
216
217.form fieldset {
218  border: none;
219  margin: 0;
220  padding: 0;
221}
222
223.form__right {
224  flex: 0 0 auto;
225  display: flex;
226  overflow: auto;
227  flex-direction: column;
228  justify-content: space-between;
229  gap: 20px;
230  width: var(--form-width, 100%);
231}
232
233.dialog__position:has(.editor) .form__right {
234  width: var(--form-width, 272px);
235}
236
237.form__top {
238  display: flex;
239  flex-direction: column;
240  gap: 8px;
241}
242
243.form__error-container {
244  color: var(--error-color);
245  fill: var(--error-color);
246}
247
248.form__label {
249  display: flex;
250  flex-direction: column;
251  gap: 4px;
252  margin: 0px;
253}
254
255.form__label__text {
256  display: flex;
257  gap: 4px;
258  align-items: center;
259}
260
261.form__label__text--required {
262  font-size: 0.85em;
263}
264
265.form__input {
266  font-family: inherit;
267  line-height: inherit;
268  background: transparent;
269  box-sizing: border-box;
270  border: var(--input-border, var(--border));
271  border-radius: var(--input-border-radius, 6px);
272  color: var(--input-color, inherit);
273  fill: var(--input-color, inherit);
274  font-size: var(--input-font-size, inherit);
275  font-weight: var(--input-font-weight, 500);
276  padding: 6px 12px;
277}
278
279.form__input::placeholder {
280  opacity: 0.65;
281  color: var(--input-placeholder-color, inherit);
282  filter: var(--interactive-filter);
283}
284
285.form__input:focus-visible {
286  outline: var(--input-focus-outline, var(--outline));
287}
288
289.form__input--textarea {
290  font-family: inherit;
291  resize: vertical;
292}
293
294.error {
295  color: var(--error-color);
296  fill: var(--error-color);
297}
298`,la=`
299.btn-group {
300  display: grid;
301  gap: 8px;
302}
303
304.btn {
305  line-height: inherit;
306  border: var(--button-border, var(--border));
307  border-radius: var(--button-border-radius, 6px);
308  cursor: pointer;
309  font-family: inherit;
310  font-size: var(--button-font-size, inherit);
311  font-weight: var(--button-font-weight, 600);
312  padding: var(--button-padding, 6px 16px);
313}
314.btn[disabled] {
315  opacity: 0.6;
316  pointer-events: none;
317}
318
319.btn--primary {
320  color: var(--button-primary-color, var(--accent-foreground));
321  fill: var(--button-primary-color, var(--accent-foreground));
322  background: var(--button-primary-background, var(--accent-background));
323  border: var(--button-primary-border, var(--border));
324  border-radius: var(--button-primary-border-radius, 6px);
325  font-weight: var(--button-primary-font-weight, 500);
326}
327.btn--primary:hover {
328  color: var(--button-primary-hover-color, var(--accent-foreground));
329  fill: var(--button-primary-hover-color, var(--accent-foreground));
330  background: var(--button-primary-hover-background, var(--accent-background));
331  filter: var(--interactive-filter);
332}
333.btn--primary:focus-visible {
334  background: var(--button-primary-hover-background, var(--accent-background));
335  filter: var(--interactive-filter);
336  outline: var(--button-primary-focus-outline, var(--outline));
337}
338
339.btn--default {
340  color: var(--button-color, var(--foreground));
341  fill: var(--button-color, var(--foreground));
342  background: var(--button-background, var(--background));
343  border: var(--button-border, var(--border));
344  border-radius: var(--button-border-radius, 6px);
345  font-weight: var(--button-font-weight, 500);
346}
347.btn--default:hover {
348  color: var(--button-color, var(--foreground));
349  fill: var(--button-color, var(--foreground));
350  background: var(--button-hover-background, var(--background));
351  filter: var(--interactive-filter);
352}
353.btn--default:focus-visible {
354  background: var(--button-hover-background, var(--background));
355  filter: var(--interactive-filter);
356  outline: var(--button-focus-outline, var(--outline));
357}
358`,ll=`
359.success__position {
360  position: fixed;
361  inset: var(--dialog-inset);
362  padding: var(--page-margin);
363  z-index: var(--z-index);
364}
365.success__content {
366  background: var(--success-background, var(--background));
367  border: var(--success-border, var(--border));
368  border-radius: var(--success-border-radius, 1.7em/50%);
369  box-shadow: var(--success-box-shadow, var(--box-shadow));
370  font-weight: var(--success-font-weight, 600);
371  color: var(--success-color);
372  fill: var(--success-color);
373  padding: 12px 24px;
374  line-height: 1.75em;
375
376  display: grid;
377  align-items: center;
378  grid-auto-flow: column;
379  gap: 6px;
380  cursor: default;
381}
382
383.success__icon {
384  display: flex;
385}
386`,lu=()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{let i=e.useSentryUser,o=function(){let e=td().getUser(),t=tp().getUser(),n=tf().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}(),s=sB.createElement("div"),a=function(e){let t=sB.createElement("style");return t.textContent=`
387:host {
388  --dialog-inset: var(--inset);
389}
390
391${li}
392${lo}
393${ls}
394${la}
395${ll}
396`,e&&t.setAttribute("nonce",e),t}(e.styleNonce),l="",u={get el(){return s},appendToDom(){r.contains(a)||r.contains(s)||(r.appendChild(a),r.appendChild(s))},removeFromDom(){s.remove(),a.remove(),sB.body.style.overflow=l},open(){var t,n;d(!0),null==(t=e.onFormOpen)||t.call(e),null==(n=tg())||n.emit("openFeedbackWidget"),l=sB.body.style.overflow,sB.body.style.overflow="hidden"},close(){d(!1),sB.body.style.overflow=l}},c=null==t?void 0:t.createInput({h:av,hooks:a7,dialog:u,options:e}),d=t=>{var r,a,l,u;r=av(lr,{options:e,screenshotInput:c,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:String(i&&(null==o?void 0:o[i.name])||""),defaultEmail:String(i&&(null==o?void 0:o[i.email])||""),onFormClose:()=>{var t;d(!1),null==(t=e.onFormClose)||t.call(e)},onSubmit:n,onSubmitSuccess:(t,n)=>{var r;d(!1),null==(r=e.onSubmitSuccess)||r.call(e,t,n)},onSubmitError:t=>{var n;null==(n=e.onSubmitError)||n.call(e,t)},onFormSubmitted:()=>{var t;null==(t=e.onFormSubmitted)||t.call(e)},open:t}),aa.__&&aa.__(r,s),a=s.__k,l=[],u=[],aR(s,r=s.__k=av(aS,null,[r]),a||af,af,void 0!==s.ownerSVGElement,a?null:s.firstChild?as.call(s.childNodes):null,l,a?a.__e:s.firstChild,!1,u),r.__d=void 0,aO(l,r,u)};return u}});function lc(e,t,n){if(!e)return;let r=e.getContext("2d",t);r&&n(e,r)}function ld(e,t){lc(e,{alpha:!0},(e,n)=>{n.drawImage(t,0,0,t.width,t.height,0,0,e.width,e.height)})}function lp(e,t,n){lc(e,{alpha:!0},(e,r)=>{n.length&&(r.fillStyle="rgba(0, 0, 0, 0.25)",r.fillRect(0,0,e.width,e.height)),n.forEach(e=>{(function(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)}})(e,r,t)})})}let lf=()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{let i=sB.createElement("canvas");return{input:function({h:e,hooks:t,outputBuffer:n,dialog:r,options:i}){let o=function({hooks:e}){return function({onBeforeScreenshot:t,onScreenshot:n,onAfterScreenshot:r,onError:i}){let o=function(){let[t,n]=e.useState(H.devicePixelRatio??1);return e.useEffect(()=>{let e=()=>{n(H.devicePixelRatio)},t=matchMedia(`(resolution: ${H.devicePixelRatio}dppx)`);return t.addEventListener("change",e),()=>{t.removeEventListener("change",e)}},[]),t}();e.useEffect(()=>{(async()=>{t();let e=await sU.mediaDevices.getDisplayMedia({video:{width:H.innerWidth*o,height:H.innerHeight*o},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),i=sB.createElement("video");await new Promise((t,r)=>{i.srcObject=e,i.onloadedmetadata=()=>{n(i,o),e.getTracks().forEach(e=>e.stop()),t()},i.play().catch(r)}),r()})().catch(i)},[])}}({hooks:t}),s=function({h:e}){return function({action:t,setAction:n,options:r}){return e("div",{class:"editor__tool-container"},e("div",{class:"editor__tool-bar"},e("button",{type:"button",class:`editor__tool ${"highlight"===t?"editor__tool--active":""}`,onClick:()=>{n("highlight"===t?"":"highlight")}},r.highlightToolText),e("button",{type:"button",class:`editor__tool ${"hide"===t?"editor__tool--active":""}`,onClick:()=>{n("hide"===t?"":"hide")}},r.hideToolText)))}}({h:e}),a=function({h:e}){return function(){return e("svg",{"data-test-id":"icon-close",viewBox:"0 0 16 16",fill:"#2B2233",he
396ight:"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"}))}}({h:e}),l={__html:function(e){let t=sB.createElement("style"),n="#1A141F",r="#302735";return t.textContent=`
397.editor {
398  display: flex;
399  flex-grow: 1;
400  flex-direction: column;
401}
402
403.editor__image-container {
404  justify-items: center;
405  padding: 15px;
406  position: relative;
407  height: 100%;
408  border-radius: var(--menu-border-radius, 6px);
409
410  background-color: ${n};
411  background-image: repeating-linear-gradient(
412      -145deg,
413      transparent,
414      transparent 8px,
415      ${n} 8px,
416      ${n} 11px
417    ),
418    repeating-linear-gradient(
419      -45deg,
420      transparent,
421      transparent 15px,
422      ${r} 15px,
423      ${r} 16px
424    );
425}
426
427.editor__canvas-container {
428  width: 100%;
429  height: 100%;
430  position: relative;
431  display: flex;
432  align-items: center;
433  justify-content: center;
434}
435
436.editor__canvas-container > * {
437  object-fit: contain;
438  position: absolute;
439}
440
441.editor__tool-container {
442  padding-top: 8px;
443  display: flex;
444  justify-content: center;
445}
446
447.editor__tool-bar {
448  display: flex;
449  gap: 8px;
450}
451
452.editor__tool {
453  display: flex;
454  padding: 8px 12px;
455  justify-content: center;
456  align-items: center;
457  border: var(--button-border, var(--border));
458  border-radius: var(--button-border-radius, 6px);
459  background: var(--button-background, var(--background));
460  color: var(--button-color, var(--foreground));
461}
462
463.editor__tool--active {
464  background: var(--button-primary-background, var(--accent-background));
465  color: var(--button-primary-color, var(--accent-foreground));
466}
467
468.editor__rect {
469  position: absolute;
470  z-index: 2;
471}
472
473.editor__rect button {
474  opacity: 0;
475  position: absolute;
476  top: -12px;
477  right: -12px;
478  cursor: pointer;
479  padding: 0;
480  z-index: 3;
481  border: none;
482  background: none;
483}
484
485.editor__rect:hover button {
486  opacity: 1;
487}
488`,e&&t.setAttribute("nonce",e),t}(i.styleNonce).innerText},u=r.el.style,c=({screenshot:r})=>{let[o,u]=t.useState("highlight"),[c,d]=t.useState([]),p=t.useRef(null),f=t.useRef(null),h=t.useRef(null),m=t.useRef(null),[g,y]=t.useState(1),_=t.useMemo(()=>{let e=sB.getElementById(i.id);if(!e)return"white";let t=getComputedStyle(e);return t.getPropertyValue("--button-primary-background")||t.getPropertyValue("--accent-background")},[i.id]);t.useLayoutEffect(()=>{let e=()=>{let t=p.current;t&&(lc(r.canvas,{alpha:!1},e=>{y(Math.min(t.clientWidth/e.width,t.clientHeight/e.height))}),(0===t.clientHeight||0===t.clientWidth)&&setTimeout(e,0))};return e(),H.addEventListener("resize",e),()=>{H.removeEventListener("resize",e)}},[r]);let v=t.useCallback((e,t)=>{lc(e,{alpha:!0},(e,n)=>{n.scale(t,t),e.width=r.canvas.width,e.height=r.canvas.height})},[r]);t.useEffect(()=>{v(f.current,r.dpi),ld(f.current,r.canvas)},[r]),t.useEffect(()=>{v(h.current,r.dpi),lc(h.current,{alpha:!0},(e,t)=>{t.clearRect(0,0,e.width,e.height)}),lp(h.current,_,c)},[c,_]),t.useEffect(()=>{v(n,r.dpi),ld(n,r.canvas),lc(sB.createElement("canvas"),{alpha:!0},(e,t)=>{t.scale(r.dpi,r.dpi),e.width=r.canvas.width,e.height=r.canvas.height,lp(e,_,c),ld(n,e)})},[c,r,_]);let b=t.useCallback(e=>t=>{t.preventDefault(),t.stopPropagation(),d(t=>{let n=[...t];return n.splice(e,1),n})},[]),S={width:`${r.canvas.width*g}px`,height:`${r.canvas.height*g}px`},k=e=>{e.stopPropagation()};return e("div",{class:"editor"},e("style",{nonce:i.styleNonce,dangerouslySetInnerHTML:l}),e("div",{class:"editor__image-container"},e("div",{class:"editor__canvas-container",ref:p},e("canvas",{ref:f,id:"background",style:S}),e("canvas",{ref:h,id:"foreground",style:S}),e("div",{ref:m,onMouseDown:e=>{if(!o||!m.current)return;let t=m.current.getBoundingClientRect(),n={type:o,x:e.offsetX/g,y:e.offsetY/g},r=(e,n)=>
488{let r=(n.clientX-t.x)/g,i=(n.clientY-t.y)/g;return{type:e.type,x:Math.min(e.x,r),y:Math.min(e.y,i),w:Math.abs(r-e.x),h:Math.abs(i-e.y)}},i=e=>{lc(h.current,{alpha:!0},(e,t)=>{t.clearRect(0,0,e.width,e.height)}),lp(h.current,_,[...c,r(n,e)])},s=e=>{let t=r(n,e);t.w*g>=1&&t.h*g>=1&&d(e=>[...e,t]),sB.removeEventListener("mousemove",i),sB.removeEventListener("mouseup",s)};sB.addEventListener("mousemove",i),sB.addEventListener("mouseup",s)},style:S},c.map((t,n)=>e("div",{key:n,class:"editor__rect",style:{top:`${t.y*g}px`,left:`${t.x*g}px`,width:`${t.w*g}px`,height:`${t.h*g}px`}},e("button",{"aria-label":i.removeHighlightText,onClick:b(n),onMouseDown:k,onMouseUp:k,type:"button"},e(a,null))))))),e(s,{options:i,action:o,setAction:u}))};return function({onError:r}){let[i,s]=t.useState();return o({onBeforeScreenshot:t.useCallback(()=>{u.display="none"},[]),onScreenshot:t.useCallback((e,t)=>{lc(sB.createElement("canvas"),{alpha:!1},(n,r)=>{r.scale(t,t),n.width=e.videoWidth,n.height=e.videoHeight,r.drawImage(e,0,0,n.width,n.height),s({canvas:n,dpi:t})}),n.width=e.videoWidth,n.height=e.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{u.display="block"},[]),onError:t.useCallback(e=>{u.display="block",r(e)},[])}),i?e(c,{screenshot:i}):e("div",null)}}({h:e,hooks:t,outputBuffer:i,dialog:n,options:r}),value:async()=>{let e=await new Promise(e=>{i.toBlob(e,"image/png")});if(e)return{data:new Uint8Array(await e.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}}),lh=H,lm=0;function lg(e,t={}){if("function"!=typeof e)return e;try{let t=e.__sentry_wrapped__;if(t)return"function"==typeof t?t:e;if(eU(e))return e}catch{return e}let n=function(...n){try{let r=n.map(e=>lg(e,t));return e.apply(this,r)}catch(e){throw lm++,setTimeout(()=>{lm--}),th(r=>{r.addEventProcessor(e=>(t.mechanism&&(e2(e,void 0,void 0),e3(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),n2(e)}),e}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}eB(n,e),ej(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}function ly(){let e=eN(),{referrer:t}=lh.document||{},{userAgent:n}=lh.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}let l_={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",instrumentAnthropicAiClient:"instrumentanthropicaiclient",instrumentOpenAiClient:"instrumentopenaiclient",instrumentGoogleGenAIClient:"instrumentgooglegenaiclient",instrumentLangGraph:"instrumentlanggraph",createLangChainCallbackHandler:"createlangchaincallbackhandler"};async function lv(e,t){let n=l_[e],r=lh.Sentry=lh.Sentry||{};if(!n)throw Error(`Cannot lazy load integration: ${e}`);let i=r[e];if("function"==typeof i&&!("_isShim"in i))return i;let o=function(e){var t;let n=tg();return new URL(`/${W}/${e}.min.js`,(null==(t=null==n?void 0:n.getOptions())?void 0:t.cdnBaseUrl)||"https://browser.sentry-cdn.com").toString()}(n),s=lh.document.createElement("script");s.src=o,s.crossOrigin="anonymous",s.referrerPolicy="strict-origin",t&&s.setAttribute("nonce",t);let a=new Promise((e,t)=>{s.addEventListener("load",()=>e()),s.addEventListener("error",t)}),l=lh.document.currentScript,u=lh.document.body||lh.document.head||(null==l?void 0:l.parentElement);if(u)u.appendChild(s);else throw Error(`Could not find parent element to insert lazy-loaded ${e} script`);try{await a}catch{throw Error(`Error when loading integration: ${e}`)}let c=r[e];if("function"!=typeof c)throw Error(`Could not load integration: ${e}`);return c}let lb=ai({lazyLoadIntegration:lv}),lS=ai({getModalIntegration:()=>lu,getScreenshotIntegration:()=>lf});function lk(e,t){let n=lx(e,t),r={type:function(e){let t=null==e?void 0:e.name;return!t&&lT(e)?e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception":t}(t),value:function(e){let t=null==e?void 0:e.message;return lT(e)?Array.isArray(e.message)&&2==e.message.length?e.message[1]:"wasm exception":t?t.error&&"string"==typeof t.error.message?r0(t.error):r0(e):"No error message"}(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function lw(e,t){return{exception:{values:[lk(e,t)]}}}function lx(e,t){let n=t.stacktrace||t.stack||"",r=t&&lE.test(t.message)?1:0,i="number"==typeof t.framesToPop?t.framesToPop:0;try{return e(n,r,i)}catch{}return[]}let lE=/Minified React error #\d+;/i;function lT(e){return!!("u">typeof WebAssembly&&"u">typeof WebAssembly.Exception)&&e instanceof WebAssembly.Exception}function lC(e,t,n,r){let i=lM(e,t,(null==n?void 0:n.syntheticException)||void 0,r);return e3(i),i.level="error",null!=n&&n.event_id&&(i.event_id=n.event_id),nV(i)}function lI(e,t,n="info",r,i){let o=lA(e,t,(null==r?void 0:r.syntheticException)||void 0,i);return o.level=n,null!=r&&r.event_id&&(o.event_id=r.event_id),nV(o)}function lM(e,t,n,r,i){let o;if(ex(t)&&t.error)return lw(e,t.error);if(eE(t)||ew(t,"DOMException")){if("stack"in t)o=lw(e,t);else{let i=t.name||(eE(t)?"DOMError":"DOMException"),s=t.message?`${i}: ${t.message}`:i;e2(o=lA(e,s,n,r),s)}
488return"code"in t&&(o.tags={...o.tags,"DOMException.code":`${t.code}`}),o}return ek(t)?lw(e,t):(eM(t)||eA(t)?e3(o=function(e,t,n,r){let i=tg(),o=null==i?void 0:i.getOptions().normalizeDepth,s=function(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];if(n instanceof Error)return n}}(t),a={__serialized__:function e(t,n=3,r=102400){let i=ng(t,n);return~-encodeURI(JSON.stringify(i)).split(/%..|./).length>r?e(t,n-1,r):i}(t,o)};if(s)return{exception:{values:[lk(e,s)]},extra:a};let l={exception:{values:[{type:eA(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:function(e,{isUnhandledRejection:t}){let n=function(e){let t=Object.keys(eq(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}(e),r=t?"promise rejection":"exception";return ex(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:eA(e)?`Event \`${function(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}(t,{isUnhandledRejection:r})}]},extra:a};if(n){let t=lx(e,n);t.length&&(l.exception.values[0].stacktrace={frames:t})}return l}(e,t,n,i),{synthetic:!0}):(e2(o=lA(e,t,n,r),`${t}`,void 0),e3(o,{synthetic:!0})),o)}function lA(e,t,n,r){let i={};if(r&&n){let r=lx(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),e3(i,{synthetic:!0})}if(eC(t)){let{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}class lR extends rJ{constructor(e){var t,n;let r={release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:null==(n=lh.SENTRY_RELEASE)?void 0:n.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e};(function(e,t,n=[t],r="npm"){let i=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};i.name||(i.name=`sentry.javascript.${t}`,i.packages=n.map(e=>({name:`${r}:@sentry/${e}`,version:W})),i.version=W)})(r,"browser",["browser"],lh.SENTRY_SDK_SOURCE||"npm"),null!=(t=r._metadata)&&t.sdk&&(r._metadata.sdk.settings={infer_ip:r.sendDefaultPii?"auto":"never",...r._metadata.sdk.settings}),super(r);let{sendDefaultPii:i,sendClientReports:o,enableLogs:s,_experiments:a,enableMetrics:l}=this._options,u=l??(null==a?void 0:a.enableMetrics)??!0;lh.document&&(o||s||u)&&lh.document.addEventListener("visibilitychange",()=>{"hidden"===lh.document.visibilityState&&(o&&this._flushOutcomes(),s&&rw(this),u&&rC(this))}),i&&this.on("beforeSendSession",ii)}eventFromException(e,t){return lC(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return lI(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n,r)}}let lO=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,lL=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",lP=(e,t,n,r)=>{let i,o;return s=>{t.value>=0&&(s||r)&&((o=t.value-(i??0))||void 0===i)&&(i=t.value,t.delta=o,t.rating=lL(t.value,n),e(t))}},lD=(e=!0)=>{var t,n;let r=null==(n=null==(t=H.performance)?void 0:t.getEntriesByType)?void 0:n.call(t,"navigation")[0];if(!e||r&&r.responseStart>0&&r.responseStart<performance.now())return r},lN=()=>{let e=lD();return(null==e?void 0:e.activationStart)??0};function l$(e,t,n){H.document&&H.addEventListener(e,t,n)}function lF(e,t,n){H.document&&H.removeEventListener(e,t,n)}let lj=-1,lB=new Set,lU=()=>{var e,t;return(null==(e=H.document)?void 0:e.visibilityState)!=="hidden"||null!=(t=H.document)&&t.prerendering?1/0:0},lq=e=>{var t;if(("pagehide"===e.type||(null==(t=H.document)?void 0:t.visibilityState)==="hidden")&&lj>-1){if("visibilitychange"===e.type||"pagehide"===e.type)for(let e of lB)e();isFinite(lj)||(lj="visibilitychange"===e.type?e.timeStamp:0,lF("prerenderingchange",lq,!0))}},lz=()=>{var e;if(H.document&&lj<0){let t=lN();lj=(H.document.prerendering||null==(e=globalThis.performance.getEntriesByType("visibility-state").filter(e=>"hidden"===e.name&&e.startTime>t)[0])?void 0:e.startTime)??lU(),l$("visibilitychange",lq,!0),l$("pagehide",lq,!0),l$("prerenderingchange",lq,!0)}return{get firstHiddenTime(){return lj},onHidden(e){lB.add(e)}}},lH=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,lW=(e,t=-1)=>{var n,r;let i=lD(),o="navigate";return i&&(null!=(n=H.document)&&n.prerendering||lN()>
4880?o="prerender":null!=(r=H.document)&&r.wasDiscarded?o="restore":i.type&&(o=i.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:lH(),navigationType:o}},lJ=new WeakMap;function lV(e,t){try{return lJ.get(e)||lJ.set(e,new t),lJ.get(e)}catch{return new t}}class lG{constructor(){lG.prototype.__init.call(this),lG.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(e){var t;if(e.hadRecentInput)return;let n=this._sessionEntries[0],r=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&n&&r&&e.startTime-r.startTime<1e3&&e.startTime-n.startTime<5e3?(this._sessionValue+=e.value,this._sessionEntries.push(e)):(this._sessionValue=e.value,this._sessionEntries=[e]),null==(t=this._onAfterProcessingUnexpectedShift)||t.call(this,e)}}let lK=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},lY=e=>{let t=!1;return()=>{t||(e(),t=!0)}},lX=e=>{var t;null!=(t=H.document)&&t.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},lZ=[1800,3e3],lQ=(e,t={})=>{lX(()=>{let n;let r=lz(),i=lW("FCP"),o=lK("paint",e=>{for(let t of e)"first-contentful-paint"===t.name&&(o.disconnect(),t.startTime<r.firstHiddenTime&&(i.value=Math.max(t.startTime-lN(),0),i.entries.push(t),n(!0)))});o&&(n=lP(e,i,lZ,t.reportAllChanges))})},l0=[.1,.25],l1=(e,t={})=>{lQ(lY(()=>{var n;let r;let i=lW("CLS",0),o=lz(),s=lV(t,lG),a=e=>{for(let t of e)s._processEntry(t);s._sessionValue>
488i.value&&(i.value=s._sessionValue,i.entries=s._sessionEntries,r())},l=lK("layout-shift",a);l&&(r=lP(e,i,l0,t.reportAllChanges),o.onHidden(()=>{a(l.takeRecords()),r(!0)}),null==(n=null==H?void 0:H.setTimeout)||n.call(H,r))}))},l2=0,l3=1/0,l5=0,l4=e=>{e.forEach(e=>{e.interactionId&&(l3=Math.min(l3,e.interactionId),l2=(l5=Math.max(l5,e.interactionId))?(l5-l3)/7+1:0)})},l6=()=>d?l2:performance.interactionCount||0,l8=()=>{"interactionCount"in performance||d||(d=lK("event",l4,{type:"event",buffered:!0,durationThreshold:0}))},l7=0,l9=()=>l6()-l7;class ue{constructor(){ue.prototype.__init.call(this),ue.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){l7=l6(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){let e=Math.min(this._longestInteractionList.length-1,Math.floor(l9()/50));return this._longestInteractionList[e]}_processEntry(e){var t,n;if(null==(t=this._onBeforeProcessingEntry)||t.call(this,e),!(e.interactionId||"first-input"===e.entryType))return;let r=this._longestInteractionList.at(-1),i=this._longestInteractionMap.get(e.interactionId);if(i||this._longestInteractionList.length<10||e.duration>r._latency){if(i?e.duration>i._latency?(i.entries=[e],i._latency=e.duration):e.duration===i._latency&&e.startTime===i.entries[0].startTime&&i.entries.push(e):(i={id:e.interactionId,entries:[e],_latency:e.duration},this._longestInteractionMap.set(i.id,i),this._longestInteractionList.push(i)),this._longestInteractionList.sort((e,t)=>t._latency-e._latency),this._longestInteractionList.length>10)for(let e of this._longestInteractionList.splice(10))this._longestInteractionMap.delete(e.id);null==(n=this._onAfterProcessingINPCandidate)||n.call(this,i)}}}let ut=e=>{var t;let n=H.requestIdleCallback||H.setTimeout;(null==(t=H.document)?void 0:t.visibilityState)==="hidden"?e():(l$("visibilitychange",e=lY(e),{once:!0,capture:!0}),l$("pagehide",e,{once:!0,capture:!0}),n(()=>{e(),lF("visibilitychange",e,{capture:!0}),lF("pagehide",e,{capture:!0})}))},un=[200,500],ur=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return;let n=lz();lX(()=>{let r;l8();let i=lW("INP"),o=lV(t,ue),s=e=>{ut(()=>{for(let t of e)o._processEntry(t);let t=o._estimateP98LongestInteraction();t&&t._latency!==i.value&&(i.value=t._latency,i.entries=t.entries,r())})},a=lK("event",s,{durationThreshold:t.durationThreshold??40});r=lP(e,i,un,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{s(a.takeRecords()),r(!0)}))})};class ui{_processEntry(e){var t;null==(t=this._onBeforeProcessingEntry)||t.call(this,e)}}let uo=[2500,4e3],us=(e,t={})=>{lX(()=>{let n;let r=lz(),i=lW("LCP"),o=lV(t,ui),s=e=>{for(let s of(t.reportAllChanges||(e=e.slice(-1)),e))o._processEntry(s),s.startTime<r.firstHiddenTime&&(i.value=Math.max(s.startTime-lN(),0),i.entries=[s],n())},a=lK("largest-contentful-paint",s);if(a){n=lP(e,i,uo,t.reportAllChanges);let r=lY(()=>{s(a.takeRecords()),a.disconnect(),n(!0)}),o=e=>{e.isTrusted&&(ut(r),lF(e.type,o,{capture:!0}))};for(let e of["keydown","click","visibilitychange"])l$(e,o,{capture:!0})}})},ua=[800,1800],ul=e=>{var t,n;null!=(t=H.document)&&t.prerendering?lX(()=>ul(e)):(null==(n=H.document)?void 0:n.readyState)!=="complete"?addEventListener("load",()=>ul(e),!0):setTimeout(e)},uu=(e,t={})=>{let n=lW("TTFB"),r=lP(e,n,ua,t.reportAllChanges);ul(()=>{let e=lD();e&&(n.value=Math.max(e.responseStart-lN(),0),n.entries=[e],r(!0))})},uc={},ud={};function up(e,t=!1){return uS("cls",e,uy,p,t)}function uf(e,t=!1){return uS("lcp",e,u_,f,t)}function uh(e){return uS("inp",e,ub,m)}function um(e,t){return uk(e,t),ud[e]||(function(e){let t={};"event"===e&&(t.durationThreshold=0),lK(e,t=>{ug(e,{entries:t})},t)}(e),ud[e]=!0),uw(e,t)}function ug(e,t){let n=uc[e];if(null!=n&&n.length)for(let r of n)try{r(t)}catch(t){lO&&et.error(`Error while triggering instrumentation handler.
489Type: ${e}
490Name: ${ea(r)}
491Error:`,t)}}function uy(){return l1(e=>{ug("cls",{metric:e}),p=e},{reportAllChanges:!0})}
491function u_(){return us(e=>{ug("lcp",{metric:e}),f=e},{reportAllChanges:!0})}function uv(){return uu(e=>{ug("ttfb",{metric:e}),h=e})}function ub(){return ur(e=>{ug("inp",{metric:e}),m=e})}function uS(e,t,n,r,i=!1){let o;return uk(e,t),ud[e]||(o=n(),ud[e]=!0),r&&t({metric:r}),uw(e,t,i?o:void 0)}function uk(e,t){uc[e]=uc[e]||[],uc[e].push(t)}function uw(e,t,n){return()=>{n&&n();let r=uc[e];if(!r)return;let i=r.indexOf(t);-1!==i&&r.splice(i,1)}}let ux=e=>{let t=t=>{var n;("pagehide"===t.type||(null==(n=H.document)?void 0:n.visibilityState)==="hidden")&&e(t)};l$("visibilitychange",t,{capture:!0,once:!0}),l$("pagehide",t,{capture:!0,once:!0})};function uE(e){return"number"==typeof e&&isFinite(e)}function uT(e,t,n,{...r}){let i=t3(e).start_timestamp;return i&&i>t&&"function"==typeof e.updateStartTime&&e.updateStartTime(t),nN(e,()=>{let e=nP({startTime:t,...r});return e&&e.end(n),e})}function uC(e){var t;let n;let r=tg();if(!r)return;let{name:i,transaction:o,attributes:s,startTime:a}=e,{release:l,environment:u,sendDefaultPii:c}=r.getOptions(),d=r.getIntegrationByName("Replay"),p=null==d?void 0:d.getReplayId(),f=td(),h=f.getUser(),m=void 0!==h?h.email||h.id||h.ip_address:void 0;try{n=f.getScopeData().contexts.profile.profile_id}catch{}return nP({name:i,attributes:{release:l,environment:u,user:m||void 0,profile_id:n||void 0,replay_id:p||void 0,transaction:o,"user_agent.original":null==(t=H.navigator)?void 0:t.userAgent,"client.address":c?"{{auto}}":void 0,...s},startTime:a,experimental:{standalone:!0}})}function uI(){return H.addEventListener&&H.performance}function uM(e){return e/1e3}function uA(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function uR(e,t){let n,r=!1;function i(e){!r&&n&&t(e,n),r=!0}ux(()=>{i("pagehide")});let o=e.on("beforeStartNavigationSpan",(e,t)=>{null!=t&&t.isRedirect||(i("navigation"),o(),s())}),s=e.on("afterStartPageLoadSpan",e=>{n=e.spanContext().spanId,s()})}function uO(e){return e&&((e7()||performance.timeOrigin)+e)/1e3}function uL(e){var t;let n={};if(null!=e.nextHopProtocol){let{name:t,version:r}=function(e){let t="unknown",n="unknown",r="";for(let i of e){if("/"===i){[t,n]=e.split("/");break}if(!isNaN(Number(i))){t="h"===r?"http":r,n=e.split(r)[1];break}r+=i}return r===e&&(t=r),{name:t,version:n}}(e.nextHopProtocol);n["network.protocol.version"]=r,n["network.protocol.name"]=t}return e7()||null!=(t=uI())&&t.timeOrigin?Object.fromEntries(Object.entries({...n,"http.request.redirect_start":uO(e.redirectStart),"http.request.redirect_end":uO(e.redirectEnd),"http.request.worker_start":uO(e.workerStart),"http.request.fetch_start":uO(e.fetchStart),"http.request.domain_lookup_start":uO(e.domainLookupStart),"http.request.domain_lookup_end":uO(e.domainLookupEnd),"http.request.connect_start":uO(e.connectStart),"http.request.secure_connection_start":uO(e.secureConnectionStart),"http.request.connection_end":uO(e.connectEnd),"http.request.request_start":uO(e.requestStart),"http.request.response_start":uO(e.responseStart),"http.request.response_end":uO(e.responseEnd),"http.request.time_to_first_byte":null!=e.responseStart?e.responseStart/1e3:void 0}).filter(([,e])=>null!=e)):n}let uP=0,uD={},uN,u$;function uF(e,t,n,r,i=n){let o=t["secureConnection"===n?"connectEnd":"fetch"===n?"domainLookupStart":`${n}End`],s=t[`${n}Start`];s&&o&&uT(e,r+uM(s),r+uM(o),{op:`browser.${i}`,name:t.name,attributes:{[tk]:"auto.ui.browser.metrics",..."redirect"===n&&null!=t.redirectCount?{"http.redirect_count":t.redirectCount}:{}}})}let uj=({entries:e})=>{let t=nt(),n=t?ne(t):void 0,r=n?t3(n).description:td().getScopeData().transactionName;e.forEach(e=>{var t,n;if(!e.identifier)return;let i=e.name,o=e.renderTime,s=e.loadTime,[a,l]=s?[uM(s),"load-time"]:o?[uM(o),"render-time"]:[e6(),"entry-emission"],u="image-paint"===i?uM(Math.max(0,(o??0)-(s??0))):0,c={[tk]:"auto.ui.browser.elementtiming",[tS]:"ui.elementtiming",[t_]:"component","sentry.span_start_time_source":l,"sentry.transaction_name":r,"element.id":e.id,"element.type":(null==(n=null==(t=e.element)?void 0:t.tagName)?void 0:n.toLowerCase())||"unknown","element.size":e.naturalWi
491dth&&e.naturalHeight?`${e.naturalWidth}x${e.naturalHeight}`:void 0,"element.render_time":o,"element.load_time":s,"element.url":e.url||void 0,"element.identifier":e.identifier,"element.paint_type":i};nO({name:`element[${e.identifier}]`,attributes:c,startTime:a,onlyIfParent:!0},e=>{e.end(a+u)})})};function uB(e){ep("dom",e),ef("dom",uU)}function uU(){if(!H.document)return;let e=eh.bind(null,"dom"),t=uq(e,!0);H.document.addEventListener("click",t,!1),H.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{var n,r;let i=null==(n=H[t])?void 0:n.prototype;null!=(r=null==i?void 0:i.hasOwnProperty)&&r.call(i,"addEventListener")&&(eF(i,"addEventListener",function(t){return function(n,r,i){if("click"===n||"keypress"==n)try{let r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},o=r[n]=r[n]||{refCount:0};if(!o.handler){let r=uq(e);o.handler=r,t.call(this,n,r,i)}o.refCount++}catch{}return t.call(this,n,r,i)}}),eF(i,"removeEventListener",function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{let n=this.__sentry_instrumentation_handlers__||{},i=n[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function uq(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=function(e){try{return e.target}catch{return null}}(n);if("keypress"===n.type&&(null==r||!r.tagName||!("INPUT"===r.tagName||"TEXTAREA"===r.tagName||r.isContentEditable)))return;ej(n,"_sentryCaptured",!0),r&&!r._sentryId&&ej(r,"_sentryId",eQ());let i="keypress"===n.type?"input":n.type;(function(e){if(e.type!==y)return!1;try{if(!e.target||e.target._sentryId!==_)return!1}catch{}return!0})(n)||(e({event:n,name:i,global:t}),y=n.type,_=r?r._sentryId:void 0),clearTimeout(g),g=H.setTimeout(()=>{_=void 0,y=void 0},1e3)}}function uz(e){let t="history";ep(t,e),ef(t,uH)}function uH(){H.addEventListener("popstate",()=>{let e=H.location.href,t=v;v=e,t!==e&&eh("history",{from:t,to:e})}),"history"in H&&H.history&&(eF(H.history,"pushState",e),eF(H.history,"replaceState",e));function e(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let r=v,i=function(e){try{return new URL(e,H.location.origin).toString()}catch{return e}}(String(n));if(v=i,r===i)return e.apply(this,t);eh("history",{from:r,to:i})}return e.apply(this,t)}}}let uW={};function uJ(e){let t=uW[e];if(t)return t;let n=H[e];if(sR(n))return uW[e]=n.bind(H);let r=H.document;if(r&&"function"==typeof r.createElement)try{let t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);let i=t.contentWindow;null!=i&&i[e]&&(n=i[e]),r.head.removeChild(t)}catch(t){lO&&et.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n&&(uW[e]=n.bind(H))}function uV(...e){return uJ("setTimeout")(...e)}let uG="__sentry_xhr_v3__";function uK(e){ep("xhr",e),ef("xhr",uY)}function uY(){if(!H.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=Error(),i=1e3*e6(),o=eT(n[0])?n[0].toUpperCase():void 0,s=function(e){if(eT(e))return e;try{return e.toString()}catch{}}(n[1]);if(!o||!s)return e.apply(t,n);t[uG]={method:o,url:s,request_headers:{}},"POST"===o&&s.match(/sentry_key/)&&(t.__sentry_own_request__=!0);let a=()=>{let e=t[uG];if(e&&4===t.readyState){try{e.status_code=t.status}catch{}eh("xhr",{endTimestamp:1e3*e6(),startTimestamp:i,xhr:t,virtualError:r})}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(a(),e.apply(t,n))}):t.addEventListener("readystatechange",a),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){let[r,i]=n,o=t[uG];return o&&eT(r)&&eT(i)&&(o.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){let r=t[uG];return r&&(void 0!==n[0]&&(r.body=n[0]),eh("xhr",{startTimestamp:1e3*e6(),xhr:t})),e.apply(t,n)}})}let uX=Symbol.for("sentry__originalRequestBody");function uZ(e){return new URLSearchParams(e).toString()}function uQ(e,t=et){try{if("string"==typeof e)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[uZ(e)];if(!e)return[void 0]}catch(n){return lO&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return lO&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function u0(e=[]){if(e.length>=2&&e[1]&&"object"==typeof e[1]&&"body"in e[1])return e[1].body;if(e.length>=1&&e[0]instanceof Request){let t=e[0][uX];return void 0!==t?t:void 0}}function u1(e){let t;try{t=e.getAllResponseHeaders()}catch(t){return lO&&et.error(t,"Failed to get xhr response headers",e),{}}return t?t.split(`\r
492`).reduce((e,t)=>
492{let[n,r]=t.split(": ");return r&&(e[n.toLowerCase()]=r),e},{}):{}}let u2=[],u3=new Map,u5=new Map,u4={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"},u6=({metric:e})=>{if(null==e.value)return;let t=uM(e.value);if(t>60)return;let n=e.entries.find(t=>t.duration===e.value&&u4[t.name]);if(!n)return;let{interactionId:r}=n,i=u4[n.name],o=uM(e7()+n.startTime),s=nt(),a=s?ne(s):void 0,l=null!=r?u3.get(r):void 0,u=(null==l?void 0:l.span)||a,c=u?t3(u).description:td().getScopeData().transactionName,d=uC({name:(null==l?void 0:l.elementName)||eD(n.target),transaction:c,attributes:{[tk]:"auto.http.browser.inp",[tS]:`ui.interaction.${i}`,[tI]:n.duration},startTime:o});d&&(d.addEvent("inp",{[tx]:"millisecond",[tE]:e.value}),d.end(o+t))};function u8(e,t=uJ("fetch")){let n=0,r=0;async function i(i){let o=i.body.length;n+=o,r++;let s={body:i.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{let n=await t(e.url,s);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get("X-Sentry-Rate-Limits"),"retry-after":n.headers.get("Retry-After")}}}catch(e){throw uW.fetch=void 0,e}finally{n-=o,r--}}return rD(e,i,rR(e.bufferSize||40))}let u7=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,u9={startProfiler:function(){let e=tg();if(!e){u7&&et.warn("No Sentry client available, profiling is not started");return}if(!e.getIntegrationByName("BrowserProfiling")){u7&&et.warn("BrowserProfiling integration is not available");return}e.emit("startUIProfiler")},stopProfiler:function(){let e=tg();if(!e){u7&&et.warn("No Sentry client available, profiling is not started");return}if(!e.getIntegrationByName("BrowserProfiling")){u7&&et.warn("ProfilingIntegration is not available");return}e.emit("stopUIProfiler")}};function ce(e,t,n,r){let i={filename:e,function:"<anonymous>"===t?"?":t,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}let ct=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,cn=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,cr=/\((\S*)(?::(\d+))(?::(\d+))\)/,ci=/at (.+?) ?\(data:(.+?),/,co=[30,e=>{let t=e.match(ci);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};let n=ct.exec(e);if(n){let[,e,t,r]=n;return ce(e,"?",+t,+r)}let r=cn.exec(e);if(r){if(r[2]&&0===r[2].indexOf("eval")){let e=cr.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}let[e,t]=cy(r[1]||"?",r[2]);return ce(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],cs=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ca=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,cl=[50,e=>{let t=cs.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let e=ca.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||"?";return[n,e]=cy(n,e),ce(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],cu=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,cc=[40,e=>{let t=cu.exec(e);return t?ce(t[2],t[1]||"?",+t[3],t[4]?+t[4]:void 0):void 0}],cd=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,cp=[10,e=>{let t=cd.exec(e);return t?ce(t[2],t[3]||"?",+t[1]):void 0}],cf=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,ch=[20,e=>{let t=cf.exec(e);return t?ce(t[5],t[3]||t[4]||"?",+t[1],+t[2]):void 0}],cm=[co,cl],cg=ei(...cm),cy=(e,t)=>{let n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:"?",n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function c_(e,{metadata:t,tunnel:n,dsn:r}){return ny({event_id:e.event_id,sent_at:new Date().toISOString(),...(null==t?void 0:t.sdk)&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:tU(r)}},[[{type:"user_report"},e]])}let cv=(e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(e){var n;t.console&&iw(function(t){if(tg()!==e)return;let n={category:"console",data:{arguments:t.args,logger:"console"},level:iE(t.level),message:eY(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${eY(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}is(n,{input:t.args,level:t.level})}),t.dom&&uB((n=t.dom,function(t){if(tg()!==e)return;let r,i,o="object"==typeof n?n.serializeAttribute:void 0,s="object"==typeof n&&"number"==typeof n.maxStringLength?n.maxStringLength:void 0;s&&s>1024&&(u7&&et.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${s} was configured. Sentry will use 1024 instead.`),s=1024),"string"==typeof o&&(o=[o]);try{let e=t.event,n=e&&e.target?e.target:e;r=eD(n,{keyAttrs:o,maxStringLength:s}),i=e$(n)}catch{r="<unknown>"}if(0===r.length)return;let a={category:`ui.${t.name}`,message:r};
492i&&(a.data={"ui.component_name":i}),is(a,{event:t.event,name:t.name,global:t.global})})),t.xhr&&uK(function(t){if(tg()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[uG];if(!n||!r||!i)return;let{method:o,url:s,status_code:a,body:l}=i,u={xhr:t.xhr,input:l,startTimestamp:n,endTimestamp:r},c={category:"xhr",data:{method:o,url:s,status_code:a},type:"http",level:sA(a)};e.emit("beforeOutgoingRequestBreadcrumb",c,u),is(c,u)}),t.fetch&&sL(function(t){if(tg()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(r&&!(t.fetchData.url.match(/sentry_key/)&&"POST"===t.fetchData.method)){if(t.fetchData.method,t.fetchData.url,t.error){let i=t.fetchData,o={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},s={category:"fetch",data:i,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",s,o),is(s,o)}else{let i=t.response,o={...t.fetchData,status_code:null==i?void 0:i.status};t.fetchData.request_body_size,t.fetchData.response_body_size,null==i||i.status;let s={input:t.args,response:i,startTimestamp:n,endTimestamp:r},a={category:"fetch",data:o,type:"http",level:sA(o.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",a,s),is(a,s)}}}),t.history&&uz(function(t){if(tg()!==e)return;let n=t.from,r=t.to,i=r8(lh.location.href),o=n?r8(n):void 0,s=r8(r);null!=o&&o.path||(o=i),i.protocol===s.protocol&&i.host===s.host&&(r=s.relative),i.protocol===o.protocol&&i.host===o.host&&(n=o.relative),is({category:"navigation",data:{from:n,to:r}})}),t.sentry&&e.on("beforeSendEvent",function(t){tg()===e&&is({category:`sentry.${"transaction"===t.type?"transaction":"event"}`,event_id:t.event_id,level:t.level,message:e1(t)},{event:t})})}}},cb=["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"],cS=(e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&eF(lh,"setTimeout",ck),t.setInterval&&eF(lh,"setInterval",ck),t.requestAnimationFrame&&eF(lh,"requestAnimationFrame",cw),t.XMLHttpRequest&&"XMLHttpRequest"in lh&&eF(XMLHttpRequest.prototype,"send",cx);let e=t.eventTarget;e&&(Array.isArray(e)?e:cb).forEach(e=>(function(e,t){var n,r;let i=null==(n=lh[e])?void 0:n.prototype;null!=(r=null==i?void 0:i.hasOwnProperty)&&r.call(i,"addEventListener")&&(eF(i,"addEventListener",function(n){return function(r,i,o){try{"function"==typeof i.handleEvent&&(i.handleEvent=lg(i.handleEvent,{mechanism:{data:{handler:ea(i),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&this&&"object"==typeof this&&"removeEventListener"in this&&"function"==typeof this.removeEventListener&&this.removeEventListener(r,i),n.apply(this,[r,lg(i,{mechanism:{data:{handler:ea(i),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),o])}}),eF(i,"removeEventListener",function(e){return function(t,n,r){try{let i=n.__sentry_wrapped__;i&&e.call(this,t,i,r)}catch{}return e.call(this,t,n,r)}}))})(e,t))}}};function ck(e){return function(...t){let n=t[0];return t[0]=lg(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${ea(e)}`}}),e.apply(this,t)}}function cw(e){return function(t){return e.apply(this,[lg(t,{mechanism:{data:{handler:ea(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function cx(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&eF(n,e,function(t){let n={mechanism:{data:{handler:ea(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=eU(t);return r&&(n.mechanism.data.handler=ea(r)),lg(t,n)})}),e.apply(this,t)}}let cE=(e={})=>{let t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(typeof lh.document>"u"){u7&&et.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}ra({ignoreDuration:!0}),rc(),"route"===t&&uz(({from:e,to:t})=>{void 0!==e&&e!==t&&(ra({ignoreDuration:!0}),rc())})}}},cT=()=>({name:"CultureContext",preprocessEvent(e){var t;let n=function(){try{let e=lh.Intl;if(!e)return;let t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}();n&&(e.contexts={...e.contexts,culture:{...n,...null==(t=e.contexts)?void 0:t.culture}})}}),cC=(e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(eg(t=>{let{stackParser:n,attachStacktrace:r}=cR();if(tg()!==e||lm>0)return;let{msg:i,url:o,line:s,column:a,error:l}=t,u=function(e,t,n,r){let i=e.exception=e.exception||{},o=i.values=i.values||[],s=o[0]=o[0]||{},a=s.stacktrace=s.stacktrace||{},l=a.frames=a.frames||[],u=function(e){if(!(!eT(e)||0===e.length))return e.startsWith("data:")?`<${r9(e,!1)}>`:e}(t)??eN();return 0===l.length&&l.push({colno:r,filename:u,function:"?",in_app:!0,lineno:n}),e}(lM(n,l||i,void 0,r,!1),o,s,a);u.level="error",n5(u,{originalException:l,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})}),cA("onerror")),t.onunhandledrejection&&(ev(t=>{let{stackParser:n,attachStacktrace:r}=cR();if(tg()!==e||lm>0)return;let i=cI(t),o=eI(i)?cM(i):lM(n,i,void 0,r,!0);o.level="error",n5(o,{originalException:i,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})}),cA("onunhandledrejection"))}}};function cI(e){if(eI(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 cM(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function cA(e){u7&&et.log(`Global Handler attached: ${e}`)}function cR(){let e=tg();return(null==e?void 0:e.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}let cO=()=>({name:"HttpContext",preprocessEvent(e){var t;if(!lh.navigator&&!lh.location&&!lh.document)return;let n=ly(),r={...n.headers,...null==(t=e.request)?void 0:t.headers};e.request={...n,...e.request,headers:r}}}),cL=(e={})=>{let t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,i){!function(e,t,n,r,i,o){var s;if(!(null!=(s=i.exception)&&s.values)||!o||!eO(o.originalException,Error))return;let a=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;a&&(i.exception.values=function e(t,n,r,i,o,s,a,l){if(s.length>=r+1)return s;let u=[...s];if(eO(i[o],Error)){ig(a,l,i);let s=t(n,i[o]),c=u.length;iy(s,o,c,l),u=e(t,n,r,i[o],o,[s,...u],s,c)}
492return im(i)&&i.errors.forEach((s,c)=>{if(eO(s,Error)){ig(a,l,i);let d=t(n,s),p=u.length;iy(d,`errors[${c}]`,p,l),u=e(t,n,r,s,o,[d,...u],d,p)}}),u}(e,t,r,o.originalException,n,i.exception.values,a,0))}(lk,i.getOptions().stackParser,n,t,e,r)}}},cP=(e={})=>{let t=e.sidecarUrl||"http://localhost:8969/stream";return{name:"SpotlightBrowser",setup:()=>{u7&&et.log("Using Sidecar URL",t)},processEvent:e=>{var t;return"transaction"===e.type&&e.spans&&null!=(t=e.contexts)&&t.trace&&"ui.action.click"===e.contexts.trace.op&&e.spans.some(({description:e})=>null==e?void 0:e.includes("#sentry-spotlight"))?null:e},afterAllSetup:e=>{!function(e,t){let n=uJ("fetch"),r=0;e.on("beforeEnvelope",e=>{if(r>3){et.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",r);return}n(t,{method:"POST",body:nS(e),headers:{"Content-Type":"application/x-sentry-envelope"},mode:"cors"}).then(e=>{e.status>=200&&e.status<400&&(r=0)},e=>{r++,et.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/",e)})})}(e,t)}}};function cD(e){return[id(),il(),i4(),cS(),cv(),cC(),cL(),iC(),cO(),cT(),cE()]}function cN(e={}){var t;let n=!e.skipBrowserExtensionCheck&&!!function(){var e;if(typeof lh.window>"u"||lh.nw)return!1;let t=lh.chrome||lh.browser;if(!(null!=(e=null==t?void 0:t.runtime)&&e.id))return!1;let n=eN();return!(lh===lh.top&&["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"].some(e=>n.startsWith(`${e}://`)))}()&&(u7&&X(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0),r=null==e.defaultIntegrations?cD():e.defaultIntegrations;return function(e,t){!0===t.debug&&(z?et.enable():X(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),td().update(t.initialScope);let n=new e(t);return r1(n),n.init(),n}(lR,{...e,enabled:!n&&e.enabled,stackParser:Array.isArray(t=e.stackParser||cg)?ei(...t):t,integrations:function(e){let t;let n=e.defaultIntegrations||[],r=e.integrations;if(n.forEach(e=>{e.isDefaultInstance=!0}),Array.isArray(r))t=[...n,...r];else if("function"==typeof r){let e=r(n);t=Array.isArray(e)?e:[e]}else t=n;return function(e){let t={};return e.forEach(e=>{let{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}(t)}({integrations:e.integrations,defaultIntegrations:r}),transport:e.transport||u8})}function c$(){}function cF(e){e()}function cj(e={}){let t=lh.document,n=(null==t?void 0:t.head)||(null==t?void 0:t.body);if(!n){u7&&et.error("[showReportDialog] Global document not defined");return}let r=td(),i=tg(),o=null==i?void 0:i.getDsn();if(!o){u7&&et.error("[showReportDialog] DSN not configured");return}let s={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||rt()},a=lh.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=function(e,t){let n=tW(e);if(!n)return"";let r=`${rd(n)}embed/error-page/`,i=`dsn=${tU(n)}`;for(let e in t)if("dsn"!==e&&"onClose"!==e){if("user"===e){let e=t.user;if(!e)continue;e.name&&(i+=`&name=${encodeURIComponent(e.name)}`),e.email&&(i+=`&email=${encodeURIComponent(e.email)}`)}else i+=`&${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`}return`${r}?${i}`}(o,s);let{onLoad:l,onClose:u}=s;if(l&&(a.onload=l),u){let e=t=>{if("__sentry_reportdialog_closed__"===t.data)try{u()}finally{lh.removeEventListener("message",e)}};lh.addEventListener("message",e)}n.appendChild(a)}let cB=new WeakMap,cU=(e={})=>{let t=e.types||["crash","deprecation","intervention"];function n(e){if(cB.has(tg()))for(let t of e)th(e=>{e.setExtra("url",t.url);let n=`ReportingObserver [${t.type}]`,r="No details available";if(t.body){let n={};for(let e in t.body)n[e]=t.body[e];if(e.setExtra("body",n),"crash"===t.type){let e=t.body;r=[e.crashId||"",e.reason||""].join(" ").trim()||r}else r=t.body.message||r}n3(`${n}: ${r}`)})}return{name:"ReportingObserver",setupOnce(){"ReportingObserver"in H&&new H.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(e){cB.set(e,!0)}}},cq=(e={})=>{let t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};
492return{name:"HttpClient",setup(e){sO()&&sL(n=>{if(tg()!==e)return;let{response:r,args:i,error:o,virtualError:s}=n,[a,l]=i;r&&function(e,t,n,r,i){if(cW(e,n.status,n.url)){let e,o,s,a;let l=!r&&t instanceof Request||t instanceof Request&&t.bodyUsed?t:new Request(t,r);cV()&&([e,s]=cz("Cookie",l),[o,a]=cz("Set-Cookie",n)),n5(cJ({url:l.url,method:l.method,status:n.status,requestHeaders:e,responseHeaders:o,requestCookies:s,responseCookies:a,error:i,type:"fetch"}))}}(t,a,r,l,o||s)},!1),"XMLHttpRequest"in H&&uK(n=>{if(tg()!==e)return;let{error:r,virtualError:i}=n,o=n.xhr,s=o[uG];if(!s)return;let{method:a,request_headers:l}=s;try{!function(e,t,n,r,i){if(cW(e,t.status,t.responseURL)){let e,o,s;if(cV()){try{let e=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;e&&(o=cH(e))}catch{}try{s=function(e){let t=e.getAllResponseHeaders();return t?t.split(`\r
493`).reduce((e,t)=>{let[n,r]=t.split(": ");return n&&r&&(e[n]=r),e},{}):{}}(t)}catch{}e=r}n5(cJ({url:t.responseURL,method:n,status:t.status,requestHeaders:e,responseHeaders:s,responseCookies:o,error:i,type:"xhr"}))}}(t,o,a,l,r||i)}catch(e){u7&&et.warn("Error while extracting response event form XHR response",e)}})}}};function cz(e,t){let n;let r=function(e){let t={};return e.forEach((e,n)=>{t[n]=e}),t}(t.headers);try{let t=r[e]||r[e.toLowerCase()]||void 0;t&&(n=cH(t))}catch{}return[r,n]}function cH(e){return e.split("; ").reduce((e,t)=>{let[n,r]=t.split("=");return n&&r&&(e[n]=r),e},{})}function cW(e,t,n){return e.failedRequestStatusCodes.some(e=>"number"==typeof e?e===t:t>=e[0]&&t<=e[1])&&e.failedRequestTargets.some(e=>"string"==typeof e?n.includes(e):e.test(n))&&!ie(n,tg())}function cJ(e){let t=tg(),n=t&&e.error&&e.error instanceof Error?e.error.stack:void 0,r=n&&t?t.getOptions().stackParser(n,0,1):void 0,i=`HTTP Client Error with status code: ${e.status}`,o={message:i,exception:{values:[{type:"Error",value:i,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:function(e){if(e){let t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}(e.responseHeaders)}}};return e3(o,{type:`auto.http.client.${e.type}`,handled:!1}),o}function cV(){let e=tg();return!!e&&!!e.getOptions().sendDefaultPii}let cG=(e={})=>{let t=null!=e.frameContextLines?e.frameContextLines:7;return{name:"ContextLines",processEvent:e=>(function(e,t){var n;let r=H.document,i=H.location&&r7(H.location.href);if(!r||!i)return e;let o=null==(n=e.exception)?void 0:n.values;if(!(null!=o&&o.length))return e;let s=r.documentElement.innerHTML;if(!s)return e;let a=["<!DOCTYPE html>","<html>",...s.split(`
494`),"</html>"];return o.forEach(e=>{let n=e.stacktrace;null!=n&&n.frames&&(n.frames=n.frames.map(e=>(e.filename===i&&e.lineno&&a.length&&function(e,t,n=5){if(void 0===t.lineno)return;let r=e.length,i=Math.max(Math.min(r-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,i-n),i).map(e=>eK(e,0));let o=Math.min(r-1,i);t.context_line=eK(e[o],t.colno||0),t.post_context=e.slice(Math.min(i+1,r),i+1+n).map(e=>eK(e,0))}(a,e,t),e)))}),e})(e,t)}};function cK(e){if(cQ(e))return`persisted ${e.operationName}`;if(cZ(e)){let{query:t,operationName:n}=e,{operationName:r=n,operationType:i}=function(e){let t=e.match(/^(?:\s*)(query|mutation|subscription)(?:\s*)(\w+)(?:\s*)[{(]/);if(t)return{operationType:t[1],operationName:t[2]};let n=e.match(/^(?:\s*)(query|mutation|subscription)(?:\s*)[{(]/);return n?{operationType:n[1],operationName:void 0}:{operationType:void 0,operationName:void 0}}(t);return r?`${i} ${r}`:`${i}`}return"unknown"}function cY(e){let t;if("xhr"in e){let n=e.xhr[uG];t=n&&uQ(n.body)[0]}else t=uQ(u0(e.input))[0];return t}function cX(e){return"object"==typeof e&&null!==e}function cZ(e){return cX(e)&&"string"==typeof e.query}function cQ(e){return cX(e)&&"string"==typeof e.operationName&&cX(e.extensions)&&cX(e.extensions.persistedQuery)&&"string"==typeof e.extensions.persistedQuery.sha256Hash&&"number"==typeof e.extensions.persistedQuery.version}function c0(e){try{let t=JSON.parse(e);return cZ(t)||cQ(t)?t:void 0}catch{return}}let c1=e=>({name:"GraphQLClient",setup(t){(function(e,t){e.on("beforeOutgoingRequestSpan",(e,n)=>{let r=t3(e).data||{};if("http.client"!==r[tS])return;let i=r["url.full"]||r["http.url"],o=r["http.request.method"]||r["http.method"];
494if(!eT(i)||!eT(o))return;let{endpoints:s}=t,a=eZ(i,s),l=cY(n);if(a&&l){let t=c0(l);if(t){let n=cK(t);e.updateName(`${o} ${i} (${n})`),cZ(t)&&e.setAttribute("graphql.document",t.query),cQ(t)&&(e.setAttribute("graphql.persisted_query.hash.sha256",t.extensions.persistedQuery.sha256Hash),e.setAttribute("graphql.persisted_query.version",t.extensions.persistedQuery.version))}}})})(t,e),function(e,t){e.on("beforeOutgoingRequestBreadcrumb",(e,n)=>{let{category:r,type:i,data:o}=e;if("http"===i&&("fetch"===r||"xhr"===r)){let e=null==o?void 0:o.url,{endpoints:r}=t,i=eZ(e,r),s=cY(n);if(i&&o&&s){let e=c0(s);if(!o.graphql&&e){let t=cK(e);o["graphql.operation"]=t,cZ(e)&&(o["graphql.document"]=e.query),cQ(e)&&(o["graphql.persisted_query.hash.sha256"]=e.extensions.persistedQuery.sha256Hash,o["graphql.persisted_query.version"]=e.extensions.persistedQuery.version)}}}})}(t,e)}}),c2="sentryReplaySession",c3="Unable to send Replay";var c5=Object.defineProperty,c4=(e,t,n)=>t in e?c5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,c6=(e,t,n)=>c4(e,"symbol"!=typeof t?t+"":t,n),c8=((C=c8||{})[C.Document=0]="Document",C[C.DocumentType=1]="DocumentType",C[C.Element=2]="Element",C[C.Text=3]="Text",C[C.CDATA=4]="CDATA",C[C.Comment=5]="Comment",C);function c7(e){let t=null==e?void 0:e.host;return(null==t?void 0:t.shadowRoot)===e}function c9(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function de(e){try{var t;let n=e.rules||e.cssRules;return n?((t=Array.from(n,dt).join("")).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t):null}catch{return null}}function dt(e){let t;if("styleSheet"in e)try{t=de(e.styleSheet)||function(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(" ")+";"}(e)}catch{}else if("selectorText"in e){let t=e.cssText,n=e.selectorText.includes(":"),r="string"==typeof e.style.all&&e.style.all;if(r&&(t=function(e){let t="";for(let n=0;n<e.style.length;n++){let r=e.style,i=r[n],o=r.getPropertyPriority(i);t+=`${i}:${r.getPropertyValue(i)}${o?" !important":""};`}return`${e.selectorText} { ${t} }`}(e)),n&&(t=t.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),n||r)return t}return t||e.cssText}let dn=class{constructor(){c6(this,"idNodeMap",new Map),c6(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?(null==(t=this.getMeta(e))?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function dr({maskInputOptions:e,tagName:t,type:n}){return"OPTION"===t&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||"password"===n||"INPUT"===t&&!n&&e.text)}function di({isMasked:e,element:t,value:n,maskInputFn:r}){let i=n||"";return e?(r&&(i=r(i,t)),"*".repeat(i.length)):i}function ds(e){return e.toLowerCase()}function da(e){return e.toUpperCase()}let dl="__rrweb_original__";function du(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?ds(t):null}function dc(e,t,n){return"INPUT"===t&&("radio"===n||"checkbox"===n)?e.getAttribute("value")||"":e.value}function dd(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}let r=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==r?void 0:r[1])??null}let dp={};function df(e){let t=dp[e];if(t)return t;let n=window.document,r=window[e];if(n&&"function"==typeof n.createElement)try{let t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(t)}catch{}return dp[e]=r.bind(window)}function dh(...e){return df("setTimeout")(...e)}
494function dm(...e){return df("clearTimeout")(...e)}function dg(e){try{return e.contentDocument}catch{}}let dy=1,d_=RegExp("[^a-z0-9-_:]");function dv(){return dy++}let db=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,dS=/^(?:[a-z+]+:)?\/\//i,dk=/^www\..*/i,dw=/^(data:)([^,]*),(.*)/i;function dx(e,t){return(e||"").replace(db,(e,n,r,i,o,s)=>{let a=r||o||s,l=n||i||"";if(!a)return e;if(dS.test(a)||dk.test(a)||dw.test(a))return`url(${l}${a}${l})`;if("/"===a[0])return`url(${l}${(t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0]).split("?")[0]+a}${l})`;let u=t.split("/"),c=a.split("/");for(let e of(u.pop(),c))"."!==e&&(".."===e?u.pop():u.push(e));return`url(${l}${u.join("/")}${l})`})}let dE=/^[^ \t\n\r\u000c]+/,dT=/^[, \t\n\r\u000c]+/,dC=new WeakMap;function dI(e,t){return t&&""!==t.trim()?dM(e,t):t}function dM(e,t){let n=dC.get(e);if(n||(n=e.createElement("a"),dC.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function dA(e,t,n,r,i,o,s){if(!r)return r;if("src"===n||"href"===n&&!("use"===t&&"#"===r[0])||"xlink:href"===n&&"#"!==r[0]||"background"===n&&("table"===t||"td"===t||"th"===t))return dI(e,r);if("srcset"===n)return function(e,t){if(""===t.trim())return t;let n=0;function r(e){let r;let i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):""}let i=[];for(;r(dT),!(n>=t.length);){let o=r(dE);if(","===o.slice(-1))o=dI(e,o.substring(0,o.length-1)),i.push(o);else{let r="";o=dI(e,o);let s=!1;for(;;){let e=t.charAt(n);if(""===e){i.push((o+r).trim());break}if(s)")"===e&&(s=!1);else if(","===e){n+=1,i.push((o+r).trim());break}else"("===e&&(s=!0);r+=e,n+=1}}}return i.join(", ")}(e,r);if("style"===n){let t=dx(r,dM(e));return s&&s.size>0&&(t=function(e,t){if(!e||0===t.size)return e;try{let n=e.split(";"),r=[];for(let e of n){if(!(e=e.trim()))continue;let n=e.indexOf(":");if(-1===n){r.push(e);continue}let i=e.slice(0,n).trim();t.has(i)||r.push(e)}return r.join("; ")+(r.length>0&&e.endsWith(";")?";":"")}catch(t){return console.warn("Error filtering CSS properties:",t),e}}(t,s)),t}return"object"===t&&"data"===n?dI(e,r):"function"==typeof o?o(n,r,i):r}function dR(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function dO(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:dO(e.parentNode,t,n,r+1)}function dL(e,t){return n=>{if(null===n)return!1;try{if(e){if("string"==typeof e){if(n.matches(`.${e}`))return!0}else if(function(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}(n,e))return!0}return!!(t&&n.matches(t))}catch{return!1}}}function dP(e,t,n,r,i,o){try{let s=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===s)return!1;if("INPUT"===s.tagName){let e=s.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(e))return!0}let a=-1,l=-1;if(o){if((l=dO(s,dL(r,i)))<0)return!0;a=dO(s,dL(t,n),l>=0?l:1/0)}else{if((a=dO(s,dL(t,n)))<0)return!1;l=dO(s,dL(r,i),a>=0?a:1/0)}return a>=0?!(l>=0)||a<=l:!(l>=0)&&!!o}catch{}return!!o}function dD(e){return null==e?"":e.toLowerCase()}function dN(e,t){let n;let{doc:r,mirror:i,blockClass:o,blockSelector:s,unblockSelector:a,maskAllText:l,maskTextClass:u,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:p,skipChild:f=!1,inlineStylesheet:h=!0,maskInputOptions:m={},maskAttributeFn:g,maskTextFn:y,maskInputFn:_,slimDOMOptions:v,dataURLOptions:k={},inlineImages:w=!1,recordCanvas:x=!1,onSerialize:E,onIframeLoad:T,iframeLoadTimeout:C=5e3,onBlockedImageLoad:I,onStylesheetLoad:M,stylesheetLoadTimeout:A=5e3,keepIframeSrcFn:R=()=>!1,newlyAddedElement:O=!1,ignoreCSSAttributes:L}=t,{preserveWhiteSpace:P=!0}=t,D=function(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:a,maskAttributeFn:l,maskTextClass:u,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:f,maskInputOptions:h={},maskTextFn:m,maskInputFn:g,dataURLOptions:y={},inlineImages:_,recordCanvas:v,keepIframeSrcFn:k,newlyAddedElement:w=!1,ignoreCSSAttributes:x}=t,E=function(e,t){if(!t.hasNode(e))return;let n=t.getId(e);return 1===n?void 0:n}(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:c8.Document,childNodes:[],compatMode:e.compatMode}:{type:c8.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:c8.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:E};case e.ELEMENT_NODE:return function(e,t){let n;let{doc:r,blockClass:i,blockSelector:o,unblockSelector:s,inlineStylesheet:a,maskInputOptions:l={},maskAttributeFn:u,maskInputFn:c,dataURLOptions:d={},inlineImages:p,recordCanvas:f,keepIframeSrcFn:h,newlyAddedElement:m=!1,rootId:g,maskTextClass:y,unmaskTextClass:_,maskTextSelector:v,unmaskTextSelector:k,ignoreCSSAttributes:w}=t,x=function(e,t,n,r){try{if(r&&e.matches(r))return!1;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch{}return!1}(e,i,o,s),E=function(e){if(e instanceof HTMLFormElement)return"form";let t=ds(e.tagName);return d_.test(t)?"div":t}(e),T={},C=e.attributes.length;for(let t=0;t<C;t++){let n=e.attributes[t];n.name&&!dR(E,n.name,n.value)&&(T[n.name]=dA(r,E,ds(n.name),n.value,e,u,w))}if("link"===E&&a){let t=Array.from(r.styleSheets).find(t=>t.href===e.href),n=null;t&&(n=de(t)),n&&(T.rel=null,T.href=null,T.crossorigin=null,T._cssText=dx(n,t.href))}if("style"===E&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){let t=de(e.sheet);t&&(T._cssText=dx(t,dM(r)))}if("input"===E||"textarea"===E||"select"===E||"option"===E){let t=du(e),n=dc(e,da(E),t),r=e.checked;if("submit"!==t&&"button"!==t&&n){let r=dP(e,y,v,_,k,dr({type:t,tagName:da(E),maskInputOptions:l}));T.value=di({isMasked:r,element:e,value:n,maskInputFn:c})}r&&(T.checked=r)}if("option"===E&&(e.selected&&!l.select?T.selected=!0:delete T.selected),"canvas"===E&&f){if("2d"===e.__context)(function(e){let t=e.getContext("2d");if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){let i=t.getImageData;
494if(new Uint32Array((dl in i?i[dl]:i).call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some(e=>0!==e))return!1}return!0})(e)||(T.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){let t=e.toDataURL(d.type,d.quality),n=r.createElement("canvas");n.width=e.width,n.height=e.height,t!==n.toDataURL(d.type,d.quality)&&(T.rr_dataURL=t)}}if("img"===E&&p){b||(S=(b=r.createElement("canvas")).getContext("2d"));let t=e.currentSrc||e.getAttribute("src")||"<unknown-src>",n=e.crossOrigin,i=()=>{e.removeEventListener("load",i);try{b.width=e.naturalWidth,b.height=e.naturalHeight,S.drawImage(e,0,0),T.rr_dataURL=b.toDataURL(d.type,d.quality)}catch(n){if("anonymous"!==e.crossOrigin){e.crossOrigin="anonymous",e.complete&&0!==e.naturalWidth?i():e.addEventListener("load",i);return}console.warn(`Cannot inline img src=${t}! Error: ${n}`)}"anonymous"===e.crossOrigin&&(n?T.crossOrigin=n:e.removeAttribute("crossorigin"))};e.complete&&0!==e.naturalWidth?i():e.addEventListener("load",i)}if(("audio"===E||"video"===E)&&(T.rr_mediaState=e.paused?"paused":"played",T.rr_mediaCurrentTime=e.currentTime),m||(e.scrollLeft&&(T.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(T.rr_scrollTop=e.scrollTop)),x){let{width:t,height:n}=e.getBoundingClientRect();T={class:T.class,rr_width:`${t}px`,rr_height:`${n}px`}}"iframe"!==E||h(T.src)||(x||dg(e)||(T.rr_src=T.src),delete T.src);try{customElements.get(E)&&(n=!0)}catch{}return{type:c8.Element,tagName:E,attributes:T,childNodes:[],isSVG:!!("svg"===e.tagName||e.ownerSVGElement)||void 0,needBlock:x,rootId:g,isCustom:n}}(e,{doc:n,blockClass:i,blockSelector:o,unblockSelector:s,inlineStylesheet:f,maskAttributeFn:l,maskInputOptions:h,maskInputFn:g,dataURLOptions:y,inlineImages:_,recordCanvas:v,keepIframeSrcFn:k,newlyAddedElement:w,rootId:E,maskTextClass:u,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:p,ignoreCSSAttributes:x});case e.TEXT_NODE:return function(e,t){var n;let{maskAllText:r,maskTextClass:i,unmaskTextClass:o,maskTextSelector:s,unmaskTextSelector:a,maskTextFn:l,maskInputOptions:u,maskInputFn:c,rootId:d}=t,p=e.parentNode&&e.parentNode.tagName,f=e.textContent,h="STYLE"===p||void 0,m="SCRIPT"===p||void 0,g="TEXTAREA"===p||void 0;if(h&&f){try{e.nextSibling||e.previousSibling||null!=(n=e.parentNode.sheet)&&n.cssRules&&(f=de(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}f=dx(f,dM(t.doc))}m&&(f="SCRIPT_PLACEHOLDER");let y=dP(e,i,s,o,a,r);return h||m||g||!f||!y||(f=l?l(f,e.parentElement):f.replace(/[\S]/g,"*")),g&&f&&(u.textarea||y)&&(f=c?c(f,e.parentNode):f.replace(/[\S]/g,"*")),"OPTION"===p&&f&&(f=di({isMasked:dP(e,i,s,o,a,dr({type:null,tagName:p,maskInputOptions:u})),element:e,value:f,maskInputFn:c})),{type:c8.Text,textContent:f||"",isStyle:h,rootId:d}}(e,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:p,maskTextFn:m,maskInputOptions:h,maskInputFn:g,rootId:E});case e.CDATA_SECTION_NODE:return{type:c8.CDATA,textContent:"",rootId:E};case e.COMMENT_NODE:return{type:c8.Comment,textContent:e.textContent||"",rootId:E};default:return!1}}(e,{doc:r,mirror:i,blockClass:o,blockSelector:s,maskAllText:l,unblockSelector:a,maskTextClass:u,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:g,maskTextFn:y,maskInputFn:_,dataURLOptions:k,inlineImages:w,recordCanvas:x,keepIframeSrcFn:R,newlyAddedElement:O,ignoreCSSAttributes:L});if(!D)return console.warn(e,"not serialized"),null;n=i.hasNode(e)?i.getId(e):!(v.comment&&D.type===c8.Comment||D.type===c8.Element&&(v.script&&("script"===D.tagName||"link"===D.tagName&&("preload"===D.attributes.rel||"modulepreload"===D.attributes.rel)||"link"===D.tagName&&"prefetch"===D.attributes.rel&&"string"==typeof D.attributes.href&&"js"===dd(D.attributes.href))||v.headFavicon&&("link"===D.tagName&&"shortcut icon"===D.attributes.rel||"meta"===D.tagName&&(dD(D.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===dD(D.attributes.name)||"icon"===dD(D.attributes.rel)||"apple-touch-icon"===dD(D.attributes.rel)||"shortcut icon"===dD(D.attributes.rel)))||"meta"===D.tagName&&(v.headMetaDescKeywords&&dD(D.attributes.name).match(/^description|keywords$/)||v.headMetaSocial&&(dD(D.attributes.property).match(/^(og|twitter|fb):/)||dD(D.attributes.name).match(/^(og|twitter):/)||"pinterest"===dD(D.attributes.name))||v.headMetaRobots&&("robots"===dD(D.attributes.name)||"googlebot"===dD(D.attributes.name)||"bingbot"===dD(D.attributes.name))||v.headMetaHttpEquiv&&void 0!==D.attributes["http-equiv"]||v.headMetaAuthorship&&("author"===dD(D.attributes.name)||"generator"===dD(D.attributes.name)||"framework"===dD(D.attributes.name)||"publisher"===dD(D.attributes.name)||"progid"===dD(D.attributes.name)||dD(D.attributes.property).match(/^article:/)||dD(D.attributes.property).match(/^product:/))||v.headMetaVerification&&("google-site-verification"===dD(D.attributes.name)||"yandex-verification"===dD(D.attributes.name)||"csrf-token"===dD(D.attributes.name)||"p:domain_verify"===dD(D.attributes.name)||"verify-v1"===dD(D.attributes.name)||"verification"===dD(D.attributes.name)||"shopify-checkout-api-token"===dD(D.attributes.name)))))&&(P||D.type!==c8.Text||D.isStyle||D.textContent.replace(/^\s+|\s+$/gm,"").length)?dv():-2;let N=Object.assign(D,{id:n});if(i.add(e,N),-2===n)return null;E&&E(e);let $=!f;if(N.type===c8.Element){$=$&&!N.needBlock;let t=e.shadowRoot;t&&c9(t)&&(N.isShadowHost=!0)}if((N.type===c8.Document||N.type===c8.Element)&&$){v.headWhitespace&&N.type===c8.Element&&"head"===N.tagName&&(P=!1);let t={doc:r,mirror:i,blockClass:o,blockSelector:s,maskAllText:l,unblockSelector:a,maskTextClass:u,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:p,skipChild:f,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:g,maskTextFn:y,maskInputFn:_,slimDOMOptions:v,dataURLOptions:k,inlineImages:w,recordCanvas:x,preserveWhiteSpace:P,onSerialize:E,onIframeLoad:T,iframeLoadTimeout:C,onBlockedImageLoad:I,onStylesheetLoad:M,stylesheetLoadTimeout:A,keepIframeSrcFn:R,ignoreCSSAttributes:L};for(let n of e.childNodes?Array.from(e.childNodes):[]){let e=dN(n,t);e&&N.childNodes.push(e)}if(e.nodeType===e.ELEMENT_NODE&&e.shadowRoot)for(let n of Array.from(e.shadowRoot.childNodes)){let r=dN(n,t);r&&(c9(e.shadowRoot)&&(r.isShadow=!0),N.childNodes.push(r))}}if(e.parentNode&&c7(e.parentNode)&&c9(e.parentNode)&&(N.isShadow=!0),N.type!==c8.Element||"iframe"!==N.tagName||N.needBlock||function(e,t,n){let r=e.contentWindow;if(!r)return;let i=!1,o;try{o=r.document.readyState}catch{return}if("complete"!==o){let r=dh(()=>{i||(t(),i=!0)},n);e.addEventListener("load",()=>{dm(r),i=!0,t()});return}let s="about:blank";if(r.location.href!==s||e.src===s||""===e.src)return dh(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{let t=dg(e);
494if(t&&T){let n=dN(t,{doc:t,mirror:i,blockClass:o,blockSelector:s,unblockSelector:a,maskAllText:l,maskTextClass:u,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:p,skipChild:!1,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:g,maskTextFn:y,maskInputFn:_,slimDOMOptions:v,dataURLOptions:k,inlineImages:w,recordCanvas:x,preserveWhiteSpace:P,onSerialize:E,onIframeLoad:T,iframeLoadTimeout:C,onStylesheetLoad:M,stylesheetLoadTimeout:A,keepIframeSrcFn:R,ignoreCSSAttributes:L});n&&T(e,n)}},C),N.type===c8.Element&&"img"===N.tagName&&!e.complete&&N.needBlock){let t=()=>{if(e.isConnected&&!e.complete&&I)try{let t=e.getBoundingClientRect();t.width>0&&t.height>0&&I(e,N,t)}catch{}e.removeEventListener("load",t)};e.isConnected&&e.addEventListener("load",t)}return N.type===c8.Element&&"link"===N.tagName&&"string"==typeof N.attributes.rel&&("stylesheet"===N.attributes.rel||"preload"===N.attributes.rel&&"string"==typeof N.attributes.href&&"css"===dd(N.attributes.href))&&function(e,t,n){let r=!1,i;try{i=e.sheet}catch{return}if(i)return;let o=dh(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{dm(o),r=!0,t()})}(e,()=>{if(M){let t=dN(e,{doc:r,mirror:i,blockClass:o,blockSelector:s,unblockSelector:a,maskAllText:l,maskTextClass:u,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:p,skipChild:!1,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:g,maskTextFn:y,maskInputFn:_,slimDOMOptions:v,dataURLOptions:k,inlineImages:w,recordCanvas:x,preserveWhiteSpace:P,onSerialize:E,onIframeLoad:T,iframeLoadTimeout:C,onStylesheetLoad:M,stylesheetLoadTimeout:A,keepIframeSrcFn:R,ignoreCSSAttributes:L});t&&M(e,t)}},A),N.type===c8.Element&&delete N.needBlock,N}function d$(e,t,n=document){let r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}let dF=`Please stop import mirror directly. Instead of that,\r
495now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
496or you can use record.mirror to access the mirror instance during recording.`,dj={map:{},getId:()=>(console.error(dF),-1),getNode:()=>(console.error(dF),null),removeNodeFromMap(){console.error(dF)},has:()=>(console.error(dF),!1),reset(){console.error(dF)}};function dB(e,t,n={}){let r=null,i=0;return function(...o){let s=Date.now();i||!1!==n.leading||(i=s);let a=t-(s-i),l=this;a<=0||a>t?(r&&(function(...e){d3("clearTimeout")(...e)}(r),r=null),i=s,e.apply(l,o)):r||!1===n.trailing||(r=d5(()=>{i=!1===n.leading?0:Date.now(),r=null,e.apply(l,o)},a))}}function dU(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],i=n(r);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}"u">typeof window&&window.Proxy&&window.Reflect&&(dj=new Proxy(dj,{get:(e,t,n)=>("map"===t&&console.error(dF),Reflect.get(e,t,n))}));let dq=Date.now;function dz(e){var t,n,r,i,o,s;let a=e.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:(null==a?void 0:a.documentElement.scrollLeft)||(null==(n=null==(t=null==a?void 0:a.body)?void 0:t.parentElement)?void 0:n.scrollLeft)||(null==(r=null==a?void 0:a.body)?void 0:r.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==a?void 0:a.documentElement.scrollTop)||(null==(o=null==(i=null==a?void 0:a.body)?void 0:i.parentElement)?void 0:o.scrollTop)||(null==(s=null==a?void 0:a.body)?void 0:s.scrollTop)||0}}function dH(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function dW(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function dJ(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function dV(e,t,n,r,i){if(!e)return!1;let o=dJ(e);if(!o)return!1;let s=dL(t,n);if(!i){let e=r&&o.matches(r);return s(o)&&!e}let a=dO(o,s),l=-1;return!(a<0)&&(r&&(l=dO(o,dL(null,r))),a>-1&&l<0||a<l)}function dG(e,t){return -2===t.getId(e)}function dK(e){return!!e.changedTouches}
496function dY(e,t){return!!("IFRAME"===e.nodeName&&t.getMeta(e))}function dX(e,t){return!!("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function dZ(e){return!!(null!=e&&e.shadowRoot)}/[1-9][0-9]{12}/.test(Date.now().toString())||(dq=()=>new Date().getTime());class dQ{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){let n;return this.has(e)?this.getId(e):(n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n)}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function d0(e){var t,n;let r=null;return(null==(n=null==(t=e.getRootNode)?void 0:t.call(e))?void 0:n.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(r=e.getRootNode().host),r}function d1(e){let t=e.ownerDocument;return!!t&&(t.contains(e)||function(e){let t=e.ownerDocument;if(!t)return!1;let n=function(e){let t=e,n;for(;n=d0(t);)t=n;return t}(e);return t.contains(n)}(e))}let d2={};function d3(e){let t=d2[e];if(t)return t;let n=window.document,r=window[e];if(n&&"function"==typeof n.createElement)try{let t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(t)}catch{}return d2[e]=r.bind(window)}function d5(...e){return d3("setTimeout")(...e)}var d4=((I=d4||{})[I.DomContentLoaded=0]="DomContentLoaded",I[I.Load=1]="Load",I[I.FullSnapshot=2]="FullSnapshot",I[I.IncrementalSnapshot=3]="IncrementalSnapshot",I[I.Meta=4]="Meta",I[I.Custom=5]="Custom",I[I.Plugin=6]="Plugin",I),d6=((M=d6||{})[M.Mutation=0]="Mutation",M[M.MouseMove=1]="MouseMove",M[M.MouseInteraction=2]="MouseInteraction",M[M.Scroll=3]="Scroll",M[M.ViewportResize=4]="ViewportResize",M[M.Input=5]="Input",M[M.TouchMove=6]="TouchMove",M[M.MediaInteraction=7]="MediaInteraction",M[M.StyleSheetRule=8]="StyleSheetRule",M[M.CanvasMutation=9]="CanvasMutation",M[M.Font=10]="Font",M[M.Log=11]="Log",M[M.Drag=12]="Drag",M[M.StyleDeclaration=13]="StyleDeclaration",M[M.Selection=14]="Selection",M[M.AdoptedStyleSheet=15]="AdoptedStyleSheet",M[M.CustomElement=16]="CustomElement",M),d8=((A=d8||{})[A.MouseUp=0]="MouseUp",A[A.MouseDown=1]="MouseDown",A[A.Click=2]="Click",A[A.ContextMenu=3]="ContextMenu",A[A.DblClick=4]="DblClick",A[A.Focus=5]="Focus",A[A.Blur=6]="Blur",A[A.TouchStart=7]="TouchStart",A[A.TouchMove_Departed=8]="TouchMove_Departed",A[A.TouchEnd=9]="TouchEnd",A[A.TouchCancel=10]="TouchCancel",A),d7=((R=d7||{})[R.Mouse=0]="Mouse",R[R.Pen=1]="Pen",R[R.Touch=2]="Touch",R),d9=((O=d9||{})[O.Play=0]="Play",O[O.Pause=1]="Pause",O[O.Seeked=2]="Seeked",O[O.VolumeChange=3]="VolumeChange",O[O.RateChange=4]="RateChange",O);function pe(e){try{return e.contentDocument}catch{}}class pt{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&"__ln"in e.previousSibling){let n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&"__ln"in e.nextSibling&&e.nextSibling.__ln.previous){let n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){let t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}let pn=(e,t)=>`${e}@${t}`;class pr{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=e=>
496{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,n=new pt,r=e=>{let t=e,n=-2;for(;-2===n;)n=(t=t&&t.nextSibling)&&this.mirror.getId(t);return n},i=i=>{if(!i.parentNode||!d1(i))return;let o=c7(i.parentNode)?this.mirror.getId(d0(i)):this.mirror.getId(i.parentNode),s=r(i);if(-1===o||-1===s)return n.addNode(i);let a=dN(i,{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:e=>{dY(e,this.mirror)&&!dV(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(e),dX(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),dZ(i)&&this.shadowDomManager.addShadowRoot(i.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{dV(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(e,t),e.contentWindow&&this.canvasManager.addWindow(e.contentWindow),this.shadowDomManager.observeAttachShadow(e))},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:n,height:r})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${n}px`,height:`${r}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});a&&(e.push({parentId:o,nextId:s,node:a}),t.add(a.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());
496for(let e of this.movedSet)po(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||i(e);for(let e of this.addedSet)!ps(this.droppedSet,e)&&!po(this.removes,e,this.mirror)||ps(this.movedSet,e)?i(e):this.droppedSet.add(e);let o=null;for(;n.length;){let e=null;if(o){let t=this.mirror.getId(o.value.parentNode),n=r(o.value);-1!==t&&-1!==n&&(e=o)}if(!e){let t=n.tail;for(;t;){let n=t;if(t=t.previous,n){let t=this.mirror.getId(n.value.parentNode);if(-1===r(n.value))continue;if(-1!==t){e=n;break}{let t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let r=t.parentNode.host;if(-1!==this.mirror.getId(r)){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}o=e.previous,n.removeNode(e.value),i(e.value)}let s={texts:this.texts.map(e=>({id:this.mirror.getId(e.node),value:e.value})).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{let{attributes:t}=e;if("string"==typeof t.style){let n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(s.texts.length||s.attributes.length||s.removes.length||s.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(s))},this.processMutation=e=>{if(!dG(e.target,this.mirror))switch(e.type){case"characterData":{let t=e.target.textContent;dV(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||t===e.oldValue||this.texts.push({value:dP(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,dJ(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,n=e.attributeName,r=e.target.getAttribute(n);if("value"===n){let n=du(t),i=t.tagName;r=dc(t,i,n);let o=dr({maskInputOptions:this.maskInputOptions,tagName:i,type:n});r=di({isMasked:dP(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,o),element:t,value:r,maskInputFn:this.maskInputFn})}if(dV(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===e.oldValue)return;let i=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===n&&!this.keepIframeSrcFn(r)){if(pe(t))return;n="rr_src"}if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}}
496,this.attributes.push(i),this.attributeMap.set(e.target,i)),"type"===n&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!dR(t.tagName,n)&&(i.attributes[n]=dA(this.doc,ds(t.tagName),ds(n),r,t,this.maskAttributeFn),"style"===n)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let n=this.unattachedDoc.createElement("span");for(let r of(e.oldValue&&n.setAttribute("style",e.oldValue),Array.from(t.style))){let e=t.style.getPropertyValue(r),o=t.style.getPropertyPriority(r);e!==n.style.getPropertyValue(r)||o!==n.style.getPropertyPriority(r)?""===o?i.styleDiff[r]=e:i.styleDiff[r]=[e,o]:i._unchangedStyles[r]=[e,o]}for(let e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(i.styleDiff[e]=!1)}break}case"childList":if(dV(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let n=this.mirror.getId(t),r=c7(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);dV(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||dG(t,this.mirror)||-1===this.mirror.getId(t)||(this.addedSet.has(t)?(pi(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||function e(t,n){if(c7(t))return!1;let r=n.getId(t);return!n.has(r)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||e(t.parentNode,n))}(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[pn(n,r)]?pi(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!!(c7(e.target)&&c9(e.target))||void 0})),this.mapRemoves.push(t))})}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(dG(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[pn(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);dV(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes&&e.childNodes.forEach(e=>this.genAdds(e)),dZ(e)&&e.shadowRoot.childNodes.forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}}}init(e){["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","ignoreCSSAttributes"].forEach(t=>{this[t]=e[t]})}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 pi(e,t){var n;e.delete(t),null==(n=t.childNodes)||n.forEach(t=>pi(e,t))}function po(e,t,n){return 0!==e.length&&function(e,t,n){let r=t.parentNode;for(;r;){let t=n.getId(r);if(e.some(e=>e.id===t))return!0;r=r.parentNode}return!1}(e,t,n)}function ps(e,t){return 0!==e.size&&function e(t,n){let{parentNode:r}=n;return!!r&&(!!t.has(r)||e(t,r))}(e,t)}let pa=e=>k?(...t)=>{try{return e(...t)}catch(e){if(k&&!0===k(e))return()=>{};throw e}}:e,pl=[];function pu(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 pc(e,t){var n,r;let i=new pr;pl.push(i),i.init(e);let o=window.MutationObserver||window.__rrMutationObserver,s=null==(r=null==(n=null==window?void 0:window.Zone)?void 0:n.__symbol__)?void 0:r.call(n,"MutationObserver");s&&window[s]&&(o=window[s]);let a=new o(pa(t=>{e.onMutation&&!1===e.onMutation(t)||i.processMutations.bind(i)(t)}));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function pd({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,sampling:s}){return d$("scroll",pa(dB(pa(s=>{let a=pu(s);if(!a||dV(a,r,i,o,!0))return;let l=n.getId(a);if(a===t&&t.defaultView){let n=dz(t.defaultView);e({id:l,x:n.left,y:n.top})}else e({id:l,x:a.scrollLeft,y:a.scrollTop})}),s.scroll||100)),t)}let pp=["INPUT","TEXTAREA","SELECT"],pf=new WeakMap;function ph(e){var t;return t=[],p_("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||p_("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||p_("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||p_("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule?t.unshift(Array.from(e.parentRule.cssRules).indexOf(e)):e.parentStyleSheet&&t.unshift(Array.from(e.parentStyleSheet.cssRules).indexOf(e)),t}function pm(e,t,n){let r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function pg({mirror:e,stylesheetManager:t},n){var r,i,o;let s=null;s="#document"===n.nodeName?e.getId(n):e.getId(n.host);let a="#document"===n.nodeName?null==(r=n.defaultView)?void 0:r.Document:null==(o=null==(i=n.ownerDocument)?void 0:i.defaultView)?void 0:o.ShadowRoot,l=null!=a&&a.prototype?Object.getOwnPropertyDescriptor(null==a?void 0:a.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&a&&l?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var e;return null==(e=l.get)?void 0:e.call(this)},set(e){var n;let r=null==(n=l.set)?void 0:n.call(this,e);if(null!==s&&-1!==s)try{t.adoptStyleSheets(e,s)}catch{}return r}}),pa(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})):()=>{}}function py(e,t={}){let n;let r=e.doc.defaultView;if(!r)return()=>{};e.recordDOM&&(n=pc(e,e.doc));let i=function({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(!1===t.mousemove)return()=>{};let i="number"==typeof t.mousemove?t.mousemove:50,o="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500,s=[],a,l=dB(pa(t=>{let n=Date.now()-a;e(s.map(e=>(e.timeOffset-=n,e)),t),s=[],a=null}),o),u=pa(dB(pa(e=>{let t=pu(e),{clientX:n,clientY:i}=dK(e)?e.changedTouches[0]:e;a||(a=dq()),s.push({x:n,y:i,id:r.getId(t),timeOffset:dq()-a}),l("u">typeof DragEvent&&e instanceof DragEvent?d6.Drag:e instanceof MouseEvent?d6.MouseMove:d6.TouchMove)}),i,{trailing:!1})),c=[d$("mousemove",u,n),d$("touchmove",u,n),d$("drag",u,n)];return pa(()=>
496{c.forEach(e=>e())})}(e),o=function({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,sampling:s}){if(!1===s.mouseInteraction)return()=>{};let a=!0===s.mouseInteraction||void 0===s.mouseInteraction?{}:s.mouseInteraction,l=[],u=null,c=t=>s=>{let a=pu(s);if(dV(a,r,i,o,!0))return;let l=null,c=t;if("pointerType"in s){switch(s.pointerType){case"mouse":l=d7.Mouse;break;case"touch":l=d7.Touch;break;case"pen":l=d7.Pen}l===d7.Touch?d8[t]===d8.MouseDown?c="TouchStart":d8[t]===d8.MouseUp&&(c="TouchEnd"):d7.Pen}else dK(s)&&(l=d7.Touch);null!==l?(u=l,(c.startsWith("Touch")&&l===d7.Touch||c.startsWith("Mouse")&&l===d7.Mouse)&&(l=null)):d8[t]===d8.Click&&(l=u,u=null);let d=dK(s)?s.changedTouches[0]:s;if(!d)return;let p=n.getId(a),{clientX:f,clientY:h}=d;pa(e)({type:d8[c],id:p,x:f,y:h,...null!==l&&{pointerType:l}})};return Object.keys(d8).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e]).forEach(e=>{let n=ds(e),r=c(e);if(window.PointerEvent)switch(d8[e]){case d8.MouseDown:case d8.MouseUp:n=n.replace("mouse","pointer");break;case d8.TouchStart:case d8.TouchEnd:return}l.push(d$(n,r,t))}),pa(()=>{l.forEach(e=>e())})}(e),s=pd(e),a=function({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return d$("resize",pa(dB(pa(()=>{let t=dH(),i=dW();(n!==t||r!==i)&&(e({width:Number(i),height:Number(t)}),n=t,r=i)}),200)),t)}(e,{win:r}),l=function({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,ignoreClass:s,ignoreSelector:a,maskInputOptions:l,maskInputFn:u,sampling:c,userTriggeredOnInput:d,maskTextClass:p,unmaskTextClass:f,maskTextSelector:h,unmaskTextSelector:m}){function g(e){let n=pu(e),c=e.isTrusted,g=n&&da(n.tagName);if("OPTION"===g&&(n=n.parentElement),!n||!g||0>pp.indexOf(g)||dV(n,r,i,o,!0))return;let _=n;if(_.classList.contains(s)||a&&_.matches(a))return;let v=du(n),b=dc(_,g,v),S=!1,k=dr({maskInputOptions:l,tagName:g,type:v}),w=dP(n,p,h,f,m,k);("radio"===v||"checkbox"===v)&&(S=n.checked),b=di({isMasked:w,element:n,value:b,maskInputFn:u}),y(n,d?{text:b,isChecked:S,userTriggered:c}:{text:b,isChecked:S});let x=n.name;"radio"===v&&x&&S&&t.querySelectorAll(`input[type="radio"][name="${x}"]`).forEach(e=>{if(e!==n){let t=di({isMasked:w,element:e,value:dc(e,g,v),maskInputFn:u});y(e,d?{text:t,isChecked:!S,userTriggered:!1}:{text:t,isChecked:!S})}})}function y(t,r){let i=pf.get(t);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){pf.set(t,r);let i=n.getId(t);pa(e)({...r,id:i})}}let _=("last"===c.input?["change"]:["input","change"]).map(e=>d$(e,pa(g),t)),v=t.defaultView;if(!v)return()=>{_.forEach(e=>e())};let b=v.Object.getOwnPropertyDescriptor(v.HTMLInputElement.prototype,"value"),S=[[v.HTMLInputElement.prototype,"value"],[v.HTMLInputElement.prototype,"checked"],[v.HTMLSelectElement.prototype,"value"],[v.HTMLTextAreaElement.prototype,"value"],[v.HTMLSelectElement.prototype,"selectedIndex"],[v.HTMLOptionElement.prototype,"selected"]];return b&&b.set&&_.push(...S.map(e=>(function e(t,n,r,i,o=window){let s=o.Object.getOwnPropertyDescriptor(t,n);return o.Object.defineProperty(t,n,i?r:{set(e){d5(()=>{r.set.call(this,e)},0),s&&s.set&&s.set.call(this,e)}}),()=>e(t,n,s||{},!0)})(e[0],e[1],{set(){pa(g)({target:this,isTrusted:!1})}},!1,v))),pa(()=>{_.forEach(e=>e())})}(e),u=function({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:i,sampling:o,doc:s}){let a=pa(s=>dB(pa(o=>{let a=pu(o);if(!a||dV(a,t,n,r,!0))return;let{currentTime:l,volume:u,muted:c,playbackRate:d}=a;e({type:s,id:i.getId(a),currentTime:l,volume:u,muted:c,playbackRate:d})}),o.media||500)),l=[d$("play",a(d9.Play),s),d$("pause",a(d9.Pause),s),d$("seeked",a(d9.Seeked),s),d$("volumechange",a(d9.VolumeChange),s),d$("ratechange",a(d9.RateChange),s)];return pa(()=>{l.forEach(e=>e())})}(e),c=()=>{},d=()=>{},p=()=>{},f=()=>{};e.recordDOM&&(c=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){let i,o;if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:pa((r,i,o)=>{let[s,a]=o,{id:l,styleId:u}=pm(i,t,n.styleMirror);return(l&&-1!==l||u&&-1!==u)&&e({id:l,styleId:u,adds:[{rule:s,index:a}]}),r.apply(i,o)})});let a=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:pa((r,i,o)=>{let[s]=o,{id:a,styleId:l}=pm(i,t,n.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:s}]}),r.apply(i,o)})}),r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:pa((r,i,o)=>{let[s]=o,{id:a,styleId:l}=pm(i,t,n.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replace:s}),r.apply(i,o)})})),r.CSSStyleSheet.prototype.replaceSync&&(o=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(o,{apply:pa((r,i,o)=>{let[s]=o,{id:a,styleId:l}=pm(i,t,n.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replaceSync:s}),r.apply(i,o)})}));let l={};pv("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(pv("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),pv("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),pv("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));let u={};return Object.entries(l).forEach(([r,i])=>{u[r]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(u[r].insertRule,{apply:pa((r,i,o)=>{let[s,a]=o,{id:l,styleId:u}=pm(i.parentStyleSheet,t,n.styleMirror);return(l&&-1!==l||u&&-1!==u)&&e({id:l,styleId:u,adds:[{rule:s,index:[...ph(i),a||0]}]}),r.apply(i,o)})}),i.prototype.deleteRule=new Proxy(u[r].deleteRule,{apply:pa((r,i,o)=>{let[s]=o,{id:a,styleId:l}=pm(i.parentStyleSheet,t,n.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:[...ph(i),s]}]}),r.apply(i,o)})})}),pa(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=a,i&&(r.CSSStyleSheet.prototype.replace=i),o&&(r.CSSStyleSheet.prototype.replaceSync=o),Object.entries(l).forEach(([e,t])=>{t.prototype.insertRule=u[e].insertRule,t.prototype.deleteRule=u[e].deleteRule})})}(e,{win:r}),d=pg(e,e.doc),p=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){let o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:pa((i,s,a)=>{var l;let[u,c,d]=a;if(n.has(u))return o.apply(s,[u,c,d]);let{id:p,styleId:f}=pm(null==(l=s.parentRule)?void 0:l.parentStyleSheet,t,r.styleMirror);return(p&&-1!==p||f&&-1!==f)&&e({id:p,styleId:f,set:{property:u,value:c,priority:d},index:ph(s.parentRule)}),i.apply(s,a)})});let s=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:pa((i,o,a)=>{var l;let[u]=a;if(n.has(u))return s.apply(o,[u]);let{id:c,styleId:d}=pm(null==(l=o.parentRule)?void 0:l.parentStyleSheet,t,r.styleMirror);return(c&&-1!==c||d&&-1!==d)&&e({id:c,styleId:d,remove:{property:u},index:ph(o.parentRule)}),i.apply(o,a)})}),pa(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=s})}(e,{win:r}),e.collectFonts&&(f=function({fontCb:e,doc:t}){let n=t.defaultView;if(!n)return()=>{};let r=[],i=new WeakMap,o=n.FontFace;n.FontFace=function(e,t,n){let r=new o(e,t,n);return i.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};let s=dU(t.fonts,"add",function(t){return function(n){return d5(pa(()=>{let t=i.get(n);t&&(e(t),i.delete(n))}),0),t.apply(this,[n])}});return r.push(()=>{n.FontFace=o}),r.push(s),pa(()=>
496{r.forEach(e=>e())})}(e)));let h=function(e){let{doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,selectionCb:s}=e,a=!0,l=pa(()=>{let e=t.getSelection();if(!e||a&&null!=e&&e.isCollapsed)return;a=e.isCollapsed||!1;let l=[],u=e.rangeCount||0;for(let t=0;t<u;t++){let{startContainer:s,startOffset:a,endContainer:u,endOffset:c}=e.getRangeAt(t);dV(s,r,i,o,!0)||dV(u,r,i,o,!0)||l.push({start:n.getId(s),startOffset:a,end:n.getId(u),endOffset:c})}s({ranges:l})});return l(),d$("selectionchange",l)}(e),m=function({doc:e,customElementCb:t}){let n=e.defaultView;return n&&n.customElements?dU(n.customElements,"define",function(e){return function(n,r,i){try{t({define:{name:n}})}catch{}return e.apply(this,[n,r,i])}}):()=>{}}(e),g=[];for(let t of e.plugins)g.push(t.observer(t.callback,r,t.options));return pa(()=>{pl.forEach(e=>e.reset()),null==n||n.disconnect(),i(),o(),s(),a(),l(),u(),c(),d(),p(),f(),h(),m(),g.forEach(e=>e())})}function p_(e){return"u">typeof window[e]}function pv(e){return!!("u">typeof window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class pb{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){let i=n||this.getIdToRemoteIdMap(e),o=r||this.getRemoteIdToIdMap(e),s=i.get(t);return s||(s=this.generateIdFn(),i.set(t,s),o.set(s,t)),s}getIds(e,t){let n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,n,r))}
496getRemoteId(e,t,n){let r=n||this.getRemoteIdToIdMap(e);return"number"!=typeof t?t:r.get(t)||-1}getRemoteIds(e,t){let n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,n))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class pS{constructor(){this.crossOriginIframeMirror=new pb(dv),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class pk{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new pb(dv),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new pb(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var n,r;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(n=e.contentWindow)||n.addEventListener("message",this.handleMessage.bind(this))),null==(r=this.loadListener)||r.call(this,e);let i=pe(e);i&&i.adoptedStyleSheets&&i.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(i.adoptedStyleSheets,this.mirror.getId(i))}handleMessage(e){if("rrweb"!==e.data.type||e.origin!==e.data.origin||!e.source)return;let t=this.crossOriginIframeMap.get(e.source);if(!t)return;let n=this.transformCrossOriginEvent(t,e.data.event);n&&this.wrappedEmit(n,e.data.isCheckout)}transformCrossOriginEvent(e,t){var n;switch(t.type){case d4.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:d4.IncrementalSnapshot,data:{source:d6.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case d4.Meta:case d4.Load:case d4.DomContentLoaded:break;case d4.Plugin:return t;case d4.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case d4.IncrementalSnapshot:switch(t.data.source){case d6.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);let n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,["id"])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case d6.Drag:case d6.TouchMove:case d6.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case d6.ViewportResize:return!1;case d6.MediaInteraction:case d6.MouseInteraction:case d6.Scroll:case d6.CanvasMutation:case d6.Input:return this.replaceIds(t.data,e,["id"]),t;case d6.StyleSheetRule:case d6.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case d6.Font:return t;case d6.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case d6.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(n=t.data.styles)||n.forEach(t=>{this.replaceStyleIds(t,e,["styleId"])}),t}}return!1}replace(e,t,n,r){for(let i of r)(Array.isArray(t[i])||"number"==typeof t[i])&&(Array.isArray(t[i])?t[i]=e.getIds(n,t[i]):t[i]=e.getId(n,t[i]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEac
496h(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type===c8.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class pw{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class px{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!c9(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);let n=pc({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(pd({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),d5(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(pg({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){let t=pe(e),n=function(e){try{return e.contentWindow}catch{}}(e);t&&n&&this.patchAttachShadow(n.Element,t)}patchAttachShadow(e,t){let n=this;this.restoreHandlers.push(dU(e.prototype,"attachShadow",function(e){return function(r){let i=e.call(this,r);return this.shadowRoot&&d1(this)&&n.addShadowRoot(this.shadowRoot,t),i}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}for(var pE="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",pT=typeof Uint8Array>"u"?[]:new Uint8Array(256),pC=0;pC<pE.length;pC++)pT[pE.charCodeAt(pC)]=pC;class pI{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class pM{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new dQ,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;let n={id:t,styleIds:[]},r=[];for(let t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,t)=>({rule:dt(e),index:t}))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class pA{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,t){let n=this.nodeMap.get(e);return n&&Array.from(n).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,function(...e){d3("requestAnimationFrame")(...e)}(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}try{if(2!==Array.from([1],e=>2*e)[0]){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==($=e.contentWindow)?void 0:$.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}let pR=new dn;function pO(e={}){let{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:o=null,unblockSelector:s=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,maskAllText:u=!1,maskTextClass:c="rr-mask",unmaskTextClass:d=null,maskTextSelector:p=null,unmaskTextSelector:f=null,inlineStylesheet:h=!0,maskAllInputs:m,maskInputOptions:g,slimDOMOptions:y,maskAttributeFn:_,maskInputFn:v,maskTextFn:b,maxCanvasSize:S=null,packFn:E,sampling:T={},dataURLOptions:C={},mousemoveWait:I,recordDOM:M=!0,recordCanvas:A=!1,recordCrossOriginIframes:R=!1,recordAfter:O="DOMContentLoaded"===e.recordAfter?e.recordAfter:"load",userTriggeredOnInput:L=!1,collectFonts:P=!1,inlineImages:D=!1,plugins:N,keepIframeSrcFn:$=()=>!1,ignoreCSSAttributes:F=new Set([]),errorHandler:j,onMutation:B,getCanvasManager:U}=e;k=j;let q=!R||window.parent===window,z=!1;if(!q)try{window.parent.document&&(z=!1)}catch{z=!0}if(q&&!t)throw Error("emit function is required");if(!q&&!z)return()=>{};void 0!==I&&void 0===T.mousemove&&(T.mousemove=I),pR.reset();let H=!0===m?{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}:void 0!==g?g:{},W=!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===y,headMetaDescKeywords:"all"===y}:y||{};!function(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=(...e)=>{let t=e[0];if(!(0 in e))throw TypeError("1 argument is required");do if(this===t)return!0;while(t=t&&t.parentNode);return!1})}();let J,V=0,G=e=>{for(let t of N||[])t.eventProcessor&&(e=t.eventProcessor(e));return E&&!z&&(e=E(e)),e};w=(e,i)=>{var o;if(e.timestamp=dq(),null!=(o=pl[0])&&o.isFrozen()&&e.type!==d4.FullSnapshot&&!(e.type===d4.IncrementalSnapshot&&e.data.source===d6.Mutation)&&pl.forEach(e
496=>e.unfreeze()),q)null==t||t(G(e),i);else if(z){let t={type:"rrweb",event:G(e),origin:window.location.origin,isCheckout:i};window.parent.postMessage(t,"*")}if(e.type===d4.FullSnapshot)J=e,V=0;else if(e.type===d4.IncrementalSnapshot){if(e.data.source===d6.Mutation&&e.data.isAttachIframe)return;V++;let t=r&&V>=r,i=n&&J&&e.timestamp-J.timestamp>n;(t||i)&&er(!0)}};let K=e=>{w({type:d4.IncrementalSnapshot,data:{source:d6.Mutation,...e}})},Y=e=>w({type:d4.IncrementalSnapshot,data:{source:d6.Scroll,...e}}),X=e=>w({type:d4.IncrementalSnapshot,data:{source:d6.CanvasMutation,...e}}),Z=new pM({mutationCb:K,adoptedStyleSheetCb:e=>w({type:d4.IncrementalSnapshot,data:{source:d6.AdoptedStyleSheet,...e}})}),Q="boolean"==typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new pS:new pk({mirror:pR,mutationCb:K,stylesheetManager:Z,recordCrossOriginIframes:R,wrappedEmit:w});for(let e of N||[])e.getMirror&&e.getMirror({nodeMirror:pR,crossOriginIframeMirror:Q.crossOriginIframeMirror,crossOriginIframeStyleMirror:Q.crossOriginIframeStyleMirror});let ee=new pA,et=function(e,t){try{return e?e(t):new pI}catch{return console.warn("Unable to initialize CanvasManager"),new pI}}(U,{mirror:pR,win:window,mutationCb:e=>w({type:d4.IncrementalSnapshot,data:{source:d6.CanvasMutation,...e}}),recordCanvas:A,blockClass:i,blockSelector:o,unblockSelector:s,maxCanvasSize:S,sampling:T.canvas,dataURLOptions:C,errorHandler:j}),en="boolean"==typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new pw:new px({mutationCb:K,scrollCb:Y,bypassOptions:{onMutation:B,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:u,maskTextClass:c,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:f,inlineStylesheet:h,maskInputOptions:H,dataURLOptions:C,maskAttributeFn:_,maskTextFn:b,maskInputFn:v,recordCanvas:A,inlineImages:D,sampling:T,slimDOMOptions:W,iframeManager:Q,stylesheetManager:Z,canvasManager:et,keepIframeSrcFn:$,processedNodeManager:ee,ignoreCSSAttributes:F},mirror:pR}),er=(e=!1)=>{if(!M)return;w({type:d4.Meta,data:{href:window.location.href,width:dW(),height:dH()}},e),Z.reset(),en.init(),pl.forEach(e=>e.lock());let t=function(e,t){let{mirror:n=new dn,blockClass:r="rr-block",blockSelector:i=null,unblockSelector:o=null,maskAllText:s=!1,maskTextClass:a="rr-mask",unmaskTextClass:l=null,maskTextSelector:u=null,unmaskTextSelector:c=null,inlineStylesheet:d=!0,inlineImages:p=!1,recordCanvas:f=!1,maskAllInputs:h=!1,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOM:_=!1,dataURLOptions:v,preserveWhiteSpace:b,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:w,onBlockedImageLoad:x,onStylesheetLoad:E,stylesheetLoadTimeout:T,keepIframeSrcFn:C=()=>!1,ignoreCSSAttributes:I=new Set([])}=t||{};return dN(e,{doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:o,maskAllText:s,maskTextClass:a,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:c,skipChild:!1,inlineStylesheet:d,maskInputOptions:!0===h?{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}:!1===h?{}:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:!0===_||"all"===_?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===_,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===_?{}:_,dataURLOptions:v,inlineImages:p,recordCanvas:f,preserveWhiteSpace:b,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:w,onBlockedImageLoad:x,onStylesheetLoad:E,stylesheetLoadTimeout:T,keepIframeSrcFn:C,newlyAddedElement:!1,ignoreCSSAttributes:I})}(document,{mirror:pR,blockClass:i,blockSelector:o,unblockSelector:s,maskAllText:u,maskTextClass:c,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:f,inlineStylesheet:h,maskAllInputs:H,maskAttributeFn:_,maskInputFn:v,maskTextFn:b,slimDOM:W,dataURLOptions:C,recordCanvas:A,inlineImages:D,onSerialize:e=>{dY(e,pR)&&Q.addIframe(e),dX(e,pR)&&Z.trackLinkElement(e),dZ(e)&&en.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{Q.attachIframe(e,t),e.contentWindow&&et.addWindow(e.contentWindow),en.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{Z.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:n,height:r})=>{K({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${n}px`,height:`${r}px`}}}]})},keepIframeSrcFn:$,ignoreCSSAttributes:F});if(!t)return console.warn("Failed to snapshot the document");w({type:d4.FullSnapshot,data:{node:t,initialOffset:dz(window)}}
496),pl.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Z.adoptStyleSheets(document.adoptedStyleSheets,pR.getId(document))};x=er;try{let e=[],t=e=>{var t;return pa(py)({onMutation:B,mutationCb:K,mousemoveCb:(e,t)=>w({type:d4.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>w({type:d4.IncrementalSnapshot,data:{source:d6.MouseInteraction,...e}}),scrollCb:Y,viewportResizeCb:e=>w({type:d4.IncrementalSnapshot,data:{source:d6.ViewportResize,...e}}),inputCb:e=>w({type:d4.IncrementalSnapshot,data:{source:d6.Input,...e}}),mediaInteractionCb:e=>w({type:d4.IncrementalSnapshot,data:{source:d6.MediaInteraction,...e}}),styleSheetRuleCb:e=>w({type:d4.IncrementalSnapshot,data:{source:d6.StyleSheetRule,...e}}),styleDeclarationCb:e=>w({type:d4.IncrementalSnapshot,data:{source:d6.StyleDeclaration,...e}}),canvasMutationCb:X,fontCb:e=>w({type:d4.IncrementalSnapshot,data:{source:d6.Font,...e}}),selectionCb:e=>{w({type:d4.IncrementalSnapshot,data:{source:d6.Selection,...e}})},customElementCb:e=>{w({type:d4.IncrementalSnapshot,data:{source:d6.CustomElement,...e}})},blockClass:i,ignoreClass:a,ignoreSelector:l,maskAllText:u,maskTextClass:c,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:f,maskInputOptions:H,inlineStylesheet:h,sampling:T,recordDOM:M,recordCanvas:A,inlineImages:D,userTriggeredOnInput:L,collectFonts:P,doc:e,maskAttributeFn:_,maskInputFn:v,maskTextFn:b,keepIframeSrcFn:$,blockSelector:o,unblockSelector:s,slimDOMOptions:W,dataURLOptions:C,mirror:pR,iframeManager:Q,stylesheetManager:Z,shadowDomManager:en,processedNodeManager:ee,canvasManager:et,ignoreCSSAttributes:F,plugins:(null==(t=null==N?void 0:N.filter(e=>e.observer))?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>w({type:d4.Plugin,data:{plugin:e.name,payload:t}})})))||[]},{})};Q.addLoadListener(n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}});let n=()=>{er(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(e.push(d$("DOMContentLoaded",()=>{w({type:d4.DomContentLoaded,data:{}}),"DOMContentLoaded"===O&&n()})),e.push(d$("load",()=>{w({type:d4.Load,data:{}}),"load"===O&&n()},window))),()=>{e.forEach(e=>e()),ee.destroy(),x=void 0,k=void 0}}catch(e){console.warn(e)}}function pL(e){return e>9999999999?e:1e3*e}function pP(e){return e>9999999999?e/1e3:e}function pD(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:d4.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:ng(t,10,1e3)}}),"console"===t.category)))}function pN(e){return e.closest("button,a")||e}function p$(e){let t=pF(e);return t&&t instanceof Element?pN(t):t}function pF(e){return"object"==typeof e&&e&&"target"in e?e.target:e}pO.mirror=pR,pO.takeFullSnapshot=function(e){if(!x)throw Error("please take full snapshot after start recording");x(e)},(D=F||(F={}))[D.NotStarted=0]="NotStarted",D[D.Running=1]="Running",D[D.Stopped=2]="Stopped";let pj=new Set([d6.Mutation,d6.StyleSheetRule,d6.StyleDeclaration,d6.AdoptedStyleSheet,d6.CanvasMutation,d6.Selection,d6.MediaInteraction]);class pB{constructor(e,t,n=pD){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scrollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){var e;let t=(e=()=>{this._lastMutation=pq()},E||(E=[],eF(H,"open",function(e){return function(...t){if(E)try{E.forEach(e=>e())}catch{}return e.apply(H,t)}})),E.push(e),()=>{let t=E?E.indexOf(e):-1;t>-1&&E.splice(t,1)});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){var n;if(n=this._ignoreSelector,!pU.includes(t.tagName)||"INPUT"===t.tagName&&!["submit","button"].includes(t.getAttribute("type")||"")||"A"===t.tagName&&(t.hasAttribute("download")||t.hasAttribute("target")&&"_self"!==t.getAttribute("target"))||n&&t.matches(n)||!(e.data&&"number"==typeof e.data.nodeId&&e.timestamp))return;let r={timestamp:pP(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some(e=>e.node===r.node&&1>
496Math.abs(e.timestamp-r.timestamp))||(this._clicks.push(r),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=pP(e)}registerScroll(e=Date.now()){this._lastScroll=pP(e)}registerClick(e){let t=pN(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach(e=>{e.clickCount++})}_getClicks(e){return this._clicks.filter(t=>t.node===e)}_checkClicks(){let e=[],t=pq();for(let n of(this._clicks.forEach(n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)}),e)){let e=this._clicks.indexOf(n);e>-1&&(this._generateBreadcrumbs(n),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){let t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scrollTimeout,r=e.mutationAfter&&e.mutationAfter<=this._threshold,{clickCount:i,clickBreadcrumb:o}=e;if(!n&&!r){let n=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),r=n<1e3*this._timeout?"mutation":"timeout",s={type:"default",message:o.message,timestamp:o.timestamp,category:"ui.slowClickDetected",data:{...o.data,url:H.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:i||1}};this._addBreadcrumbEvent(t,s);return}if(i>1){let e={type:"default",message:o.message,timestamp:o.timestamp,category:"ui.multiClick",data:{...o.data,url:H.location.href,route:t.getCurrentRoute(),clickCount:i,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=uV(()=>this._checkClicks(),1e3)}}let pU=["A","BUTTON","INPUT"];function pq(){return Date.now()/1e3}function pz(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var pH=((L=pH||{})[L.Document=0]="Document",L[L.DocumentType=1]="DocumentType",L[L.Element=2]="Element",L[L.Text=3]="Text",L[L.CDATA=4]="CDATA",L[L.Comment=5]="Comment",L);let pW=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]),pJ=e=>t=>{if(!e.isEnabled())return;let n=function(e){let{target:t,message:n}=function(e){let t="click"===e.name,n,r=null;try{r=t?p$(e.event):pF(e.event),n=eD(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}(e);return pz({category:`ui.${e.name}`,...pV(t,n)})}(t);if(!n)return;let r="click"===t.name,i=r?t.event:void 0;!r||!e.clickDetector||null==i||!i.target||i.altKey||i.metaKey||i.ctrlKey||i.shiftKey||function(e,t,n){e.handleClick(t,n)}(e.clickDetector,n,p$(t.event)),pD(e,n)};function pV(e,t){let n=pO.mirror.getId(e),r=n&&pO.mirror.getNode(n),i=r&&pO.mirror.getMeta(r),o=i&&i.type===pH.Element?i:null;return{message:t,data:o?{nodeId:n,node:{id:n,tagName:o.tagName,textContent:Array.from(o.childNodes).map(e=>e.type===pH.Text&&e.textContent).filter(Boolean).map(e=>e.trim()).join(""),attributes:function(e){let t={};for(let n in!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]),e)if(pW.has(n)){let r=n;("data-testid"===n||"data-test-id"===n)&&(r="testId"),t[r]=e[n]}return t}(o.attributes)}}:{}}}let pG={resource:function(e){let{entryType:t,initiatorType:n,name:r,responseEnd:i,startTime:o,decodedBodySize:s,encodedBodySize:a,responseStatus:l,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:pX(o),end:pX(i),name:r,data:{size:u,statusCode:l,decodedBodySize:s,encodedBodySize:a}}},paint:function(e){let{duration:t,entryType:n,name:r,startTime:i}=e,o=pX(i);return{type:n,name:r,start:o,end:o+t,data:void 0}},navigation:function(e){let{entryType:t,name:n,decodedBodySize:r,duration:i,domComplete:o,encodedBodySize:s,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,domInteractive:u,loadEventStart:c,loadEventEnd:d,redirectCount:p,startTime:f,transferSize:h,type:m}=e;return 0===i?null:{type:`${t}.${m}`,start:pX(f),end:pX(o),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:s,duration:i,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,loadEventStart:c,loadEventEnd:d,domComplete:o,redirectCount:p}}}};function pK(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function pY(e){let t=pG[e.entryType];return t?t(e):null}function pX(e){return((e7()||H.performance.timeOrigin)+e)/1e3}function pZ(e){let t=e.entries[e.entries.length-1];return p1(e,"largest-contentful-paint",null!=t&&t.element?[t.element]:void 0)}function pQ(e){let t=[],n=[];for(let r of e.entries)if(void 0!==r.sources){let e=[];for(let t of r.sources)if(t.node){n.push(t.node);let r=pO.mirror.getId(t.node);r&&e.push(r)}t.push({value:r.value,nodeIds:e.length?e:void 0})}return p1(e,"cumulative-layout-shift",n,t)}function p0(e){let t=e.entries[e.entries.length-1];return p1(e,"interaction-to-next-paint",null!=t&&t.target?[t.target]:void 0)}function p1(e,t,n,r){let i=e.value,o=e.rating,s=pX(i);return{type:"web-vital",name:t,start:s,end:s,data:{value:i,size:i,rating:o,nodeIds:n?n.map(e=>pO.mirror.getId(e)):void 0,attributions:r}}}let p2=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,p3=["log","warn","error"],p5="[Replay] ";function p4(e,t="info"){is({category:"console",data:{logger:"replay"},level:t,message:`${p5}${e}`},{level:t})}let p6=function(){let e=!1,t=!1,n={exception:()=>{},infoTick:()=>{},setConfig:n=>{e=!!n.captureExceptions,t=!!n.traceInternals}};
496return p2?(p3.forEach(e=>{n[e]=(...n)=>{et[e](p5,...n),t&&p4(n.join(""),iE(e))}}),n.exception=(r,...i)=>{i.length&&n.error&&n.error(...i),et.error(p5,r),e?n2(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&p4(r,"error")},n.infoTick=(...e)=>{et.log(p5,...e),t&&setTimeout(()=>p4(e[0]),0)}):p3.forEach(e=>{n[e]=()=>{}}),n}();class p8 extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class p7{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(e){let t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>2e7)throw new p8;this.events.push(e)}finish(){return new Promise(e=>{let t=this.events;this.clear(),e(JSON.stringify(t))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let e=this.events.map(e=>e.timestamp).sort()[0];return e?pL(e):null}}class p9{constructor(e){this._worker=e,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise((e,t)=>{this._worker.addEventListener("message",({data:n})=>{n.success?e():(p2&&p6.warn("Received worker message with unsuccessful status",n),t(Error("Received worker message with unsuccessful status")))},{once:!0}),this._worker.addEventListener("error",e=>{p2&&p6.warn("Failed to load Replay compression worker",e),t(Error(`Failed to load Replay compression worker: ${e instanceof ErrorEvent&&e.message?e.message:"Unknown error. This can happen due to CSP policy restrictions, network issues, or the worker script failing to load."}`))},{once:!0})})),this._ensureReadyPromise}destroy(){p2&&p6.log("Destroying compression worker"),this._worker.terminate()}postMessage(e,t){let n=this._getAndIncrementId();return new Promise((r,i)=>{let o=({data:t})=>{if(t.method===e&&t.id===n){if(this._worker.removeEventListener("message",o),!t.success){p2&&p6.error("Error in compression worker: ",t.response),i(Error("Error in compression worker"));return}r(t.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:n,method:e,arg:t})})}_getAndIncrementId(){return this._id++}}class fe{constructor(e){this._worker=new p9(e),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(e){let t=pL(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);let n=JSON.stringify(e);return this._totalSize+=n.length,this._totalSize>2e7?Promise.reject(new p8):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,e=>{p2&&p6.exception(e,'Sending "clear" message to worker failed',e)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){let e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class ft{constructor(e){this._fallback=new p7,this._compression=new fe(e),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(e){this._used.hasCheckout=e}set waitForCheckout(e){this._used.waitForCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){p2&&p6.exception(e,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){let{events:e,hasCheckout:t,waitForCheckout:n}=this._fallback,r=[];for(let t of e)r.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._compression.waitForCheckout=n,this._used=this._compression;try{await Promise.all(r),this._fallback.clear()}catch(e){p2&&p6.exception(e,"Failed to add events when switching buffers.")}}}function fn(){try{return"sessionStorage"in H&&!!H.sessionStorage}catch{return!1}}function fr(e){return void 0!==e&&Math.random()<e}function fi(e){if(fn())try{H.sessionStorage.setItem(c2,JSON.stringify(e))}catch{}}function fo(e){let t=Date.now(),n=e.id||eQ(),r=e.started||t,i=e.lastActivity||t,o=e.segmentId||0;return{id:n,started:r,lastActivity:i,segmentId:o,sampled:e.sampled,previousSessionId:e.previousSessionId,dirty:e.dirty||!1}}function fs({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){let i=fo({sampled:fr(e)?"session":!!t&&"buffer",previousSessionId:r});return n&&fi(i),i}function fa(e,t,n=+new Date){return null===e||void 0===t||t<0||0!==t&&e+t<=n}function fl(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return fa(e.started,t,r)||fa(e.lastActivity,n,r)}function fu(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!fl(e,{sessionIdleExpire:t,maxReplayDuration:n})||"buffer"===e.sampled&&0===e.segmentId)}function fc({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){let i=r.stickySession&&function(){if(!fn())return null;try{let e=H.sessionStorage.getItem(c2);if(!e)return null;let t=JSON.parse(e);return p2&&p6.infoTick("Loading existing session"),fo(t)}catch{return null}}();return i?fu(i,{sessionIdleExpire:e,maxReplayDuration:t})?(p2&&p6.infoTick("Session in sessionStorage is expired, creating new one..."),fs(r,{previousSessionId:i.id})):i:(p2&&p6.infoTick("Creating new session"),fs(r,{previousSessionId:n}))}function fd(e,t,n){return!!ff(e,t)&&(fp(e,t,n),!0)}async function fp(e,t,n){let{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;let i="buffer"===e.recordingMode;
496try{n&&i&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);let o=e.getOptions(),s=function(e,t){try{if("function"==typeof t&&e.type===d4.Custom)return t(e)}catch(e){return p2&&p6.exception(e,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}(t,o.beforeAddRecordingEvent);return s?await r.addEvent(s):void 0}catch(o){let t=o&&o instanceof p8,n=tg();if(n&&n.recordDroppedEvent(t?"buffer_overflow":"internal_sdk_error","replay"),t&&i)return r.clear(),r.waitForCheckout=!0,null;e.handleException(o),await e.stop({reason:t?"addEventSizeExceeded":"addEvent"})}}function ff(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;let n=pL(t.timestamp);return!(n+e.timeouts.sessionIdlePause<Date.now())&&(!(n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration)||(p2&&p6.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1))}function fh(e){return"transaction"===e.type}function fm(e){return"feedback"===e.type}function fg(e){return!!e.category}function fy(){let e=td().getPropagationContext().dsc;e&&delete e.replay_id;let t=nt();if(t){let e=nf(t);delete e.replay_id}}function f_(e,t){return t.map(({type:t,start:n,end:r,name:i,data:o})=>{let s=e.throttledAddEvent({type:d4.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:t,description:i,startTimestamp:n,endTimestamp:r,data:o}}});return"string"==typeof s?Promise.resolve(null):s})}function fv(e,t){var n;e.isEnabled()&&null!==t&&(n=t.name,(!p2||!e.getOptions()._experiments.traceInternals)&&ie(n,tg())||e.addUpdate(()=>(f_(e,[t]),!0)))}function fb(e){if(!e)return;let t=new TextEncoder;try{if("string"==typeof e)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){let n=uZ(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function fS(e){if(!e)return;let t=parseInt(e,10);return isNaN(t)?void 0:t}function fk(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};let n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function fw(e,t){if(!t)return null;let{startTimestamp:n,endTimestamp:r,url:i,method:o,statusCode:s,request:a,response:l}=t;return{type:e,start:n/1e3,end:r/1e3,name:i,data:{method:o,statusCode:s,request:a,response:l}}}function fx(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function fE(e,t,n){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};let r={headers:e,size:t},{body:i,warnings:o}=function(e){if(!e||"string"!=typeof e)return{body:e};let t=e.length>15e4,n=function(e){let t=e[0],n=e[e.length-1];return"["===t&&"]"===n||"{"===t&&"}"===n}(e);if(t){let t=e.slice(0,15e4);return n?{body:t,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${t}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}(n);return r.body=i,null!=o&&o.length&&(r._meta={warnings:o}),r}function fT(e,t){return Object.entries(e).reduce((n,[r,i])=>{let o=r.toLowerCase();return t.includes(o)&&e[r]&&(n[o]=i),n},{})}function fC(e,t=H.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(H.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 fI(e,t,n){try{let r=await fM(e,t,n),i=fw("resource.fetch",r);fv(n.replay,i)}catch(e){p2&&p6.exception(e,"Failed to capture fetch breadcrumb")}}async function fM(e,t,n){var r,i;let o=Date.now(),{startTimestamp:s=o,endTimestamp:a=o}=t,{url:l,method:u,status_code:c=0,request_body_size:d,response_body_size:p}=e.data,f=(r=n.networkDetailAllowUrls,eZ(fC(l),r)&&(i=n.networkDetailDenyUrls,!eZ(fC(l),i)));return{startTimestamp:s,endTimestamp:a,url:l,method:u,statusCode:c,request:f?function({networkCaptureBodies:e,networkRequestHeaders:t},n,r){let i=n?1===n.length&&"string"!=typeof n[0]?fL(n[0],t):2===n.length?fL(n[1],t):{}:{};if(!e)return fE(i,r,void 0);let[o,s]=uQ(u0(n),p6),a=fE(i,r,o);return s?fk(a,s):a}(n,t.input,d):fx(d),response:await fA(f,n,t.response,p)}}async function fA(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,i){if(!e&&void 0!==i)return fx(i);let o=r?fO(r.headers,n):{};if(!r||!t&&void 0!==i)return fE(o,i,void 0);let[s,a]=await fR(r),l=function(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:i}){try{let o=null!=e&&e.length&&void 0===n?fb(e):n;return r?t?fE(i,o,e):fE(i,o,void 0):fx(o)}catch(e){return p2&&p6.exception(e,"Failed to serialize response body"),fE(i,n,void 0)}}(s,{networkCaptureBodies:t,responseBodySize:i,captureDetails:e,headers:o});return a?fk(l,a):l}async function fR(e){let t=function(e){try{return e.clone()}catch(e){p2&&p6.exception(e,"Failed to clone response body")}}(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];
496try{return[await new Promise((e,n)=>{let r=uV(()=>n(Error("Timeout while trying to read response body")),500);fP(t).then(t=>e(t),e=>n(e)).finally(()=>clearTimeout(r))})]}catch(e){return e instanceof Error&&e.message.indexOf("Timeout")>-1?(p2&&p6.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(p2&&p6.exception(e,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function fO(e,t){let n={};return t.forEach(t=>{e.get(t)&&(n[t]=e.get(t))}),n}function fL(e,t){if(!e)return{};let n=e.headers;return n?n instanceof Headers?fO(n,t):Array.isArray(n)?{}:fT(n,t):{}}async function fP(e){return await e.text()}async function fD(e,t,n){try{let r=function(e,t,n){var r,i;let o=Date.now(),{startTimestamp:s=o,endTimestamp:a=o,input:l,xhr:u}=t,{url:c,method:d,status_code:p=0,request_body_size:f,response_body_size:h}=e.data;if(!c)return null;if(!u||(r=n.networkDetailAllowUrls,!eZ(fC(c),r))||(i=n.networkDetailDenyUrls,eZ(fC(c),i))){let e=fx(f);return{startTimestamp:s,endTimestamp:a,url:c,method:d,statusCode:p,request:e,response:fx(h)}}let m=u[uG],g=m?fT(m.request_headers,n.networkRequestHeaders):{},y=fT(u1(u),n.networkResponseHeaders),[_,v]=n.networkCaptureBodies?uQ(l,p6):[void 0],[b,S]=n.networkCaptureBodies?function(e){let t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return function(e,t){try{if("string"==typeof e)return[e];if(e instanceof Document)return[e.body.outerHTML];if("json"===t&&e&&"object"==typeof e)return[JSON.stringify(e)];if(!e)return[void 0]}catch(t){return p2&&p6.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return p2&&p6.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}(e.response,e.responseType)}catch(e){t.push(e)}return p2&&p6.warn("Failed to get xhr response body",...t),[void 0]}(u):[void 0],k=fE(g,f,_),w=fE(y,h,b);return{startTimestamp:s,endTimestamp:a,url:c,method:d,statusCode:p,request:v?fk(k,v):k,response:S?fk(w,S):w}}(e,t,n),i=fw("resource.xhr",r);fv(n.replay,i)}catch(e){p2&&p6.exception(e,"Failed to capture xhr breadcrumb")}}async function fN(e){try{return Promise.all(f_(e,[function(e){let{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,i=Date.now()/1e3;return{type:"memory",name:"memory",start:i,end:i,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}(H.performance.memory)]))}catch{return[]}}let f$=H.navigator;async function fF({client:e,scope:t,replayId:n,event:r}){let i={event_id:n,integrations:"object"!=typeof e._integrations||null===e._integrations||Array.isArray(e._integrations)?void 0:Object.keys(e._integrations)};e.emit("preprocessEvent",r,i);let o=await n0(e.getOptions(),r,i,t,e,tp());if(!o)return null;e.emit("postprocessEvent",o,i),o.platform=o.platform||"javascript";let s=e.getSdkMetadata(),{name:a,version:l,settings:u}=(null==s?void 0:s.sdk)||{};return o.sdk={...o.sdk,name:a||"sentry.javascript.unknown",version:l||"0.0.0",settings:u},o}async function fj({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:i,session:o}){var s;let a;let l=function({recordingData:e,headers:t}){let n;let r=`${JSON.stringify(t)}
497`;if("string"==typeof e)n=`${r}${e}`;else{let t=new TextEncoder().encode(r);(n=new Uint8Array(t.length+e.length)).set(t),n.set(e,t.length)}return n}({recordingData:e,headers:{segment_id:n}}),{urls:u,errorIds:c,traceIds:d,initialTimestamp:p}=r,f=tg(),h=td(),m=null==f?void 0:f.getTransport(),g=null==f?void 0:f.getDsn();if(!f||!m||!g||!o.sampled)return Promise.resolve({});let y={type:"replay_event",replay_start_timestamp:p/1e3,timestamp:i/1e3,error_ids:c,trace_ids:d,urls:u,replay_id:t,segment_id:n,replay_type:o.sampled},_=await fF({scope:h,client:f,replayId:t,event:y});if(!_)return f.recordDroppedEvent("event_processor","replay"),p2&&p6.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete _.sdkProcessingMetadata;let v=(s=f.getOptions().tunnel,ny(nx(_,nw(_),s,g),[[{type:"replay_event"},_],[{type:"replay_recording",length:"string"==typeof l?new TextEncoder().encode(l).length:l.length},l]]));try{a=await m.send(v)}catch(t){let e=Error(c3);try{e.cause=t}catch{}throw e}let b=rP({},a);if(rL(b,"replay"))throw new fU(b);if("number"==typeof a.statusCode&&(a.statusCode<200||a.statusCode>=300))throw new fB(a.statusCode);return a}
497class fB extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class fU extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}class fq extends Error{constructor(){super("Session is too long, not sending replay")}}async function fz(e,t={count:0,interval:5e3}){let{recordingData:n,onError:r}=e;if(n.length)try{return await fj(e),!0}catch(n){if(n instanceof fB||n instanceof fU)throw n;if(n4("Replays",{_retryCount:t.count}),r&&r(n),t.count>=3){let e=Error(`${c3} - max retries exceeded`);try{e.cause=n}catch{}throw e}return t.interval*=++t.count,new Promise((n,r)=>{uV(async()=>{try{await fz(e,t),n(!0)}catch(e){r(e)}},t.interval)})}}let fH="__THROTTLED";class fW{constructor({options:e,recordingOptions:t}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5},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=t,this._options=e,this._debouncedFlush=function(e,t,n){let r,i,o;let s=null!=n&&n.maxWait?Math.max(n.maxWait,t):0,a=(null==n?void 0:n.setTimeoutImpl)||setTimeout;function l(){return u(),r=e()}function u(){void 0!==i&&clearTimeout(i),void 0!==o&&clearTimeout(o),i=o=void 0}function c(){return i&&clearTimeout(i),i=a(l,t),s&&void 0===o&&(o=a(l,s)),r}return c.cancel=u,c.flush=function(){return void 0!==i||void 0!==o?l():r},c}(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay,setTimeoutImpl:uV}),this._throttledAddEvent=function(e,t,n){let r=new Map,i=e=>{let t=e-5;r.forEach((e,n)=>{n<t&&r.delete(n)})},o=()=>[...r.values()].reduce((e,t)=>e+t,0),s=!1;return(...t)=>{let n=Math.floor(Date.now()/1e3);if(i(n),o()>=300){let e=s;return s=!0,e?"__SKIPPED":fH}s=!1;let a=r.get(n)||0;return r.set(n,a+1),e(...t)}}((e,t)=>ff(this,e)?fp(this,e,t):Promise.resolve(null),0,0);let{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),i=n?{threshold:Math.min(3e3,n),timeout:n,scrollTimeout:300,ignoreSelector:r?r.join(","):""}:void 0;if(i&&(this.clickDetector=new pB(this,i)),p2){let t=e._experiments;p6.setConfig({captureExceptions:!!t.captureExceptions,traceInternals:!!t.traceInternals})}this._handleVisibilityChange=()=>{"visible"===H.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{let e=pz({category:"ui.blur"});this._doChangeToBackgroundTasks(e)},this._handleWindowFocus=()=>{let e=pz({category:"ui.focus"});this._doChangeToForegroundTasks(e)},this._handleKeyboardEvent=e=>{(function(e,t){if(!e.isEnabled())return;e.updateUserActivity();let n=function(e){var t;let{metaKey:n,shiftKey:r,ctrlKey:i,altKey:o,key:s,target:a}=e;if(!a||"INPUT"===(t=a).tagName||"TEXTAREA"===t.tagName||t.isContentEditable||!s)return null;let l=n||i||o,u=1===s.length;if(!l&&u)return null;let c=eD(a,{maxStringLength:200})||"<unknown>",d=pV(a,c);return pz({category:"ui.keyDown",message:c,data:{...d.data,metaKey:n,shiftKey:r,ctrlKey:i,altKey:o,key:s}})}(t);n&&pD(e,n)})(this,e)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(e){p2&&p6.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){let{errorSampleRate:t,sessionSampleRate:n}=this._options,r=t<=0&&n<=0;if(this._requiresManualStart=r,!r){if(this._initializeSessionForSampling(e),!this.session){p2&&p6.exception(Error("Unable to initialize and create session"));return}!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",p2&&p6.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&"session"===this.recordingMode){p2&&p6.log("Recording is already in progress");return}if(this._isEnabled&&"buffer"===this.recordingMode){p2&&p6.log("Buffering is in progress, call `flush()` to save the replay");return}p2&&p6.infoTick("Starting replay in session mode"),this._updateUserActivity();let e=fc({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this.recordingMode="session",this._initializeRecording()}
497startBuffering(){if(this._isEnabled){p2&&p6.log("Buffering is in progress, call `flush()` to save the replay");return}p2&&p6.infoTick("Starting replay in buffer mode");let e=fc({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{var e;let t;let n=this._canvas;this._stopRecording=pO({...this._recordingOptions,..."buffer"===this.recordingMode?{checkoutEveryNms:6e4}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:(e=this,t=!1,(n,r)=>{if(!e.checkAndHandleExpiredSession()){p2&&p6.warn("Received replay event after session expired.");return}let i=r||!t;t=!0,e.clickDetector&&function(e,t){try{if(3!==t.type)return;let{source:n}=t.data;if(pj.has(n)&&e.registerMutation(t.timestamp),n===d6.Scroll&&e.registerScroll(t.timestamp),t.data.source===d6.MouseInteraction){let{type:n,id:r}=t.data,i=pO.mirror.getNode(r);i instanceof HTMLElement&&n===d8.Click&&e.registerClick(i)}}catch{}}(e.clickDetector,n),e.addUpdate(()=>{if("buffer"===e.recordingMode&&i&&e.setInitialState(),!fd(e,n,i))return!0;if(!i)return!1;let t=e.session;if(i&&e.session&&0===e.session.segmentId&&fd(e,function(e){let t=e.getOptions();return{type:d4.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&&"worker"===e.eventBuffer.type,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}(e),!1),"buffer"===e.recordingMode&&t&&e.eventBuffer&&!t.dirty){let n=e.eventBuffer.getEarliestTimestamp();n&&(p2&&p6.log(`Updating session start time to earliest event in buffer to ${new Date(n)}`),t.started=n,e.getOptions().stickySession&&fi(t))}return null!=t&&t.previousSessionId||"session"===e.recordingMode&&e.flush(),!0})}),.../iPhone|iPad|iPod/i.test((null==f$?void 0:f$.userAgent)??"")||/Macintosh/i.test((null==f$?void 0:f$.userAgent)??"")&&null!=f$&&f$.maxTouchPoints&&(null==f$?void 0:f$.maxTouchPoints)>1?{sampling:{mousemove:!1}}:{},onMutation:this._onMutationHandler.bind(this),...n?{recordCanvas:n.recordCanvas,getCanvasManager:n.getCanvasManager,sampling:n.sampling,dataURLOptions:n.dataURLOptions}:{}})}catch(e){this.handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this.handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){var n;if(this._isEnabled){this._isEnabled=!1,this.recordingMode="buffer";try{p2&&p6.log(`Stopping Replay${t?` triggered by ${t}`:""}`),fy(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),null==(n=this.eventBuffer)||n.destroy(),this.eventBuffer=null,function(){if(fn())try{H.sessionStorage.removeItem(c2)}catch{}}(),this.session=void 0}catch(e){this.handleException(e)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),p2&&p6.log("Pausing replay"))}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),p2&&p6.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();let t=Date.now();p2&&p6.log("Converting buffer to session"),await this.flushImmediate();let n=this.stopRecording();e&&n&&"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession()),this.startRecording())}addUpdate(e){let t=e();"buffer"!==this.recordingMode&&this._isEnabled&&!0!==t&&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"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(e){var t,n;if(!(e&&(null==(t=this.session)?void 0:t.sampled)===!1))return null==(n=this.session)?void 0:n.id}
497checkAndHandleExpiredSession(){if(this._lastActivity&&fa(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled){this.pause();return}return!!this._checkSession()}setInitialState(){let e=`${H.location.pathname}${H.location.hash}${H.location.search}`,t=`${H.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){let n=this._throttledAddEvent(e,t);if(n===fH){let e=pz({category:"replay.throttled"});this.addUpdate(()=>!fd(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}}))}return n}getCurrentRoute(){let e=this.lastActiveSpan||nt(),t=e&&ne(e),n=(t&&t3(t).data||{})[t_];if(!(!t||!n||!["route","custom"].includes(n)))return t3(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=function({useCompression:e,workerUrl:t}){if(e&&window.Worker){let e=function(e){try{let t=e||(typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?function(){let e=new Blob(['
vendor: 10,329 bytes, line 497
497var 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});
497']);return URL.createObjectURL(e)}():"");if(!t)return;p2&&p6.log(`Using compression worker${e?` from ${e}`:""}`);let n=new Worker(t);return new ft(n)}catch(e){p2&&p6.exception(e,"Failed to create compression worker")}}(t);if(e)return e}return p2&&p6.log("Using simple buffer"),new p7}({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(e){let t=this._options.errorSampleRate>0,n=fc({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=n}_checkSession(){if(!this.session)return!1;let e=this.session;return!fu(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(e.id))}_addListeners(){try{H.document.addEventListener("visibilitychange",this._handleVisibilityChange),H.addEventListener("blur",this._handleWindowBlur),H.addEventListener("focus",this._handleWindowFocus),H.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(function(e){let t=tg();uB(pJ(e)),uz(t=>{if(!e.isEnabled())return;let n=function(e){let{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}(t);null!==n&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(f_(e,[n]),!1)))}),function(e){let t=tg();t&&t.on("beforeAddBreadcrumb",t=>(function(e,t){if(!e.isEnabled()||!fg(t))return;let n=!fg(t)||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui.")?null:"console"===t.category?function(e){var t;let n=null==(t=e.data)?void 0:t.arguments;if(!Array.isArray(n)||0===n.length)return pz(e);let r=!1,i=n.map(e=>{if(!e)return e;if("string"==typeof e)return e.length>5e3?(r=!0,`${e.slice(0,5e3)}…`):e;if("object"==typeof e)try{let t=ng(e,7);return JSON.stringify(t).length>5e3?(r=!0,`${JSON.stringify(t,null,2).slice(0,5e3)}…`):t}catch{}return e});return pz({...e,data:{...e.data,arguments:i,...r?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(t):pz(t);n&&pD(e,n)})(e,t))}(e),function(e){let t=tg();try{let{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:s}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:o,networkResponseHeaders:s};t&&t.on("beforeAddBreadcrumb",(e,t)=>(function(e,t,n){if(t.data)try{"xhr"===t.category&&(null==n?void 0:n.xhr)&&(function(e,t){let{xhr:n,input:r}=t;if(!n)return;let i=fb(r),o=n.getResponseHeader("content-length")?fS(n.getResponseHeader("content-length")):function(e,t){try{let n="json"===t&&e&&"object"==typeof e?JSON.stringify(e):e;return fb(n)}catch{return}}(n.response,n.responseType);void 0!==i&&(e.data.request_body_size=i),void 0!==o&&(e.data.response_body_size=o)}(t,n),fD(t,n,e)),"fetch"===t.category&&(null==n?void 0:n.response)&&(function(e,t){let{input:n,response:r}=t,i=fb(n?u0(n):void 0),o=r?fS(r.headers.get("content-length")):void 0;void 0!==i&&(e.data.request_body_size=i),void 0!==o&&(e.data.response_body_size=o)}(t,n),fI(t,n,e))}catch(e){p2&&p6.exception(e,"Error when enriching network breadcrumb")}})(a,e,t))}catch{}}(e),rs(Object.assign((t,n)=>{var r,i,o,s;if(!e.isEnabled()||e.isPaused())return t;if("replay_event"===t.type)return delete t.breadcrumbs,t;if(t.type&&!fh(t)&&!fm(t))return t;if(!e.checkAndHandleExpiredSession())return fy(),t;if(fm(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),e.triggerUserActivity(),e.addUpdate(()=>!t.timestamp||(e.throttledAddEvent({type:d4.Custom,timestamp:1e3*t.timestamp,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1)),t;if(!t.type&&null!=(o=null==(i=t.exception)?void 0:i.values)&&o.length&&null!=(s=n.originalException)&&s.__rrweb__&&!e.getOptions()._experiments.captureExceptions)return p2&&p6.log("Ignoring error from rrweb internals",t),null;let a="buffer"===e.recordingMode&&t.message!==c3&&!!t.exception&&!t.type&&fr(e.getOptions().errorSampleRate);if((a||"session"===e.recordingMode)&&(t.tags={...t.tags,replayId:e.getSessionId()}),a&&"buffer"===e.recordingMode&&(null==(r=e.session)?void 0:r.sampled)==="buffer"){let t=e.session;t.dirty=!0,e.getOptions().stickySession&&fi(t)}return t},{id:"Replay"})),t&&(t.on("beforeSendEvent",t=>{e.isEnabled()&&!t.type&&function(e,t){var n,r,i;let o=null==(i=null==(r=null==(n=t.exception)?void 0:n.values)?void 0:r[0])?void 0:i.value;"string"==typeof o&&(o.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||o.match(/(does not match server-rendered HTML|Hydration failed because)/i))&&pD(e,pz({category:"replay.hydrate-error",data:{url:eN()}}))}(e,t)}),t.on("afterSendEvent",(t,n)=>{if(!e.isEnabled()||t.type&&!fh(t))return;let r=n.statusCode;if(!(!r||r<200||r>=300)){if(fh(t)){(function(e,t){var n,r;let i=e.getContext();null!=(r=null==(n=t.contexts)?void 0:n.trace)&&r.trace_id&&i.traceIds.size<100&&i.traceIds.add(t.contexts.trace.trace_id)})(e,t);return}(function(e,t){let n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),"buffer"!==e.recordingMode||!t.tags||!t.tags.replayId)return;let{beforeErrorSampling:r}=e.getOptions();("function"!=typeof r||r(t))&&uV(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(t){e.handleException(t)}})})(e,t)}}),t.on("createDsc",t=>{let n=e.getSessionId();n&&e.isEnabled()&&"session"===e.recordingMode&&e.checkAndHandleExpiredSession()&&(t.replay_id=n)}),t.on("spanStart",t=>{e.lastActiveSpan=t}),t.on("spanEnd",t=>{e.lastActiveSpan=t}),t.on("beforeSendFeedback",async(t,n)=>{var r;let i=e.getSessionId();null!=n&&n.includeReplay&&e.isEnabled()&&i&&null!=(r=t.contexts)&&r.feedback&&("api"===t.contexts.feedback.source&&await e.sendBufferedReplayOrFlush(),t.contexts.feedback.replay_id=i)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}(this),this._hasInitializedCoreListeners=!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=function(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}let r=[];
497return["navigation","paint","resource"].forEach(e=>{r.push(um(e,n))}),r.push(uf(pK(pZ,e)),up(pK(pQ,e)),uh(pK(p0,e))),()=>{r.forEach(e=>e())}}(this)}_removeListeners(){try{H.document.removeEventListener("visibilitychange",this._handleVisibilityChange),H.removeEventListener("blur",this._handleWindowBlur),H.removeEventListener("focus",this._handleWindowFocus),H.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}_doChangeToBackgroundTasks(e){!this.session||fl(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush())}_doChangeToForegroundTasks(e){if(this.session){if(!this.checkAndHandleExpiredSession()){p2&&p6.log("Document has become active, but session has expired");return}e&&this._createCustomBreadcrumb(e)}}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate(()=>{this.throttledAddEvent({type:d4.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})})}_addPerformanceEntries(){let e=this.performanceEntries.map(pY).filter(Boolean).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){let t=this._context.initialTimestamp/1e3;e=e.filter(e=>e.start>=t)}return Promise.all(f_(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){let{session:e,eventBuffer:t}=this;if(!e||!t||this._requiresManualStart||e.segmentId)return;let n=t.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}
497_popEventContext(){let e={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(),e}async _runFlush(){var e;let t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){p2&&p6.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),null!=(e=this.eventBuffer)&&e.hasEvents&&(await fN(this),this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();let e=Date.now();if(e-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new fq;let n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession();let i=await this.eventBuffer.finish();await fz({replayId:t,recordingData:i,segmentId:r,eventContext:n,session:this.session,timestamp:e,onError:e=>this.handleException(e)})}catch(t){this.handleException(t),this.stop({reason:"sendReplay"});let e=tg();if(e){let n;n=t instanceof fU?"ratelimit_backoff":t instanceof fq?"invalid":"send_error",e.recordDroppedEvent(n,"replay")}}}async _flush({force:e=!1}={}){if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession()){p2&&p6.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;let t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();let r=n<this._options.minReplayDuration,i=n>this._options.maxReplayDuration+5e3;if(r||i){p2&&p6.log(`Session duration (${Math.floor(n/1e3)}s) is too ${r?"short":"long"}, not sending replay.`),r&&this._debouncedFlush();return}let o=this.eventBuffer;o&&0===this.session.segmentId&&!o.hasCheckout&&p2&&p6.log("Flushing initial segment without checkout.");let s=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(e){this.handleException(e)}finally{this._flushLock=void 0,s&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&fi(this.session)}_onMutationHandler(e){let{ignoreMutations:t}=this._options._experiments;if(null!=t&&t.length&&e.some(e=>{let n=function(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}(e.target),r=t.join(",");return null==n?void 0:n.matches(r)}))return!1;let n=e.length,r=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,o=r&&n>r;if(n>i||o){let e=pz({category:"replay.mutations",data:{count:n,limit:o}});this._createCustomBreadcrumb(e)}return!o||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}function fJ(e,t){return[...e,...t].join(",")}let fV='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',fG=["content-length","content-type","accept"],fK=Symbol.for("sentry__originalRequestBody"),fY=!1,fX=!1,fZ=e=>new fQ(e);class fQ{constructor({flushMinDelay:e=5e3,flushMaxDelay:t=5500,minReplayDuration:n=4999,maxReplayDuration:r=36e5,stickySession:i=!0,useCompression:o=!0,workerUrl:s,_experiments:a={},maskAllText:l=!0,maskAllInputs:u=!0,blockAllMedia:c=!0,mutationBreadcrumbLimit:d=750,mutationLimit:p=1e4,slowClickTimeout:f=7e3,slowClickIgnoreSelectors:h=[],networkDetailAllowUrls:m=[],networkDetailDenyUrls:g=[],networkCaptureBodies:y=!0,networkRequestHeaders:_=[],networkResponseHeaders:v=[],mask:b=[],maskAttributes:S=["title","placeholder","aria-label"],unmask:k=[],block:w=[],unblock:x=[],ignore:E=[],maskFn:T,beforeAddRecordingEvent:C,beforeErrorSampling:I,onError:M,attachRawBodyFromRequest:A=!1}={}){this.name="Replay";let R=function({mask:e,unmask:t,block:n,unblock:r,ignore:i}){return{maskTextSelector:fJ(e,[".sentry-mask","[data-sentry-mask]"]),unmaskTextSelector:fJ(t,[]),blockSelector:fJ(n,[".sentry-block","[data-sentry-block]","base","iframe[srcdoc]:not([src])"]),unblockSelector:fJ(r,[]),ignoreSelector:fJ(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}({mask:b,unmask:k,block:w,unblock:x,ignore:E});if(this._recordingOptions={maskAllInputs:u,maskAllText:l,maskInputOptions:{password:!0},maskTextFn:T,maskInputFn:T,maskAttributeFn:(e,t,n)=>(function({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:i,value:o}){return!r||i.unmaskTextSelector&&e.matches(i.unmaskTextSelector)?o:n.includes(t)||"value"===t&&"INPUT"===e.tagName&&["submit","button"].includes(e.getAttribute("type")||"")?o.replace(/[\S]/g,"*"):o})({maskAttributes:S,maskAllText:l,privacyOptions:R,key:e,value:t,el:n}),...R,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!a.recordCrossOriginIframes},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,5e4),maxReplayDuration:Math.min(r,3
4976e5),stickySession:i,useCompression:o,workerUrl:s,blockAllMedia:c,maskAllInputs:u,maskAllText:l,mutationBreadcrumbLimit:d,mutationLimit:p,slowClickTimeout:f,slowClickIgnoreSelectors:h,networkDetailAllowUrls:m,networkDetailDenyUrls:g,networkCaptureBodies:y,networkRequestHeaders:f0(_),networkResponseHeaders:f0(v),beforeAddRecordingEvent:C,beforeErrorSampling:I,onError:M,attachRawBodyFromRequest:A,_experiments:a},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${fV}`:fV,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&sj())throw Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return fY}set _isInitialized(e){fY=e}afterAllSetup(e){!sj()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&function(){if(typeof Request>"u"||fX)return;let e=Request;try{let t=function(t,n){let r=new e(t,n);return(null==n?void 0:n.body)!=null&&(r[fK]=n.body),r};t.prototype=e.prototype,H.Request=t,fX=!0}catch{}}(),this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:"session"===this._replay.recordingMode}):Promise.resolve()}flush(e){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(e){var t;if(null!=(t=this._replay)&&t.isEnabled())return this._replay.getSessionId(e)}getRecordingMode(){var e;if(null!=(e=this._replay)&&e.isEnabled())return this._replay.recordingMode}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){let t=function(e,t){let n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},i=tJ(n.replaysSessionSampleRate),o=tJ(n.replaysOnErrorSampleRate);return null==i&&null==o&&X(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),null!=i&&(r.sessionSampleRate=i),null!=o&&(r.errorSampleRate=o),r}(this._initialOptions,e);this._replay=new fW({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{let t=e.getIntegrationByName("ReplayCanvas");if(!t)return;this._replay._canvas=t.getOptions()}catch{}}}function f0(e){return[...fG,...e.map(e=>e.toLowerCase())]}function f1(){let e=tg();return null==e?void 0:e.getIntegrationByName("Replay")}var f2=Object.defineProperty,f3=(e,t,n)=>t in e?f2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,f5=(e,t,n)=>f3(e,"symbol"!=typeof t?t+"":t,n);class f4{constructor(){f5(this,"idNodeMap",new Map),f5(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?(null==(t=this.getMeta(e))?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function f6(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:f6(e.parentNode,t,n,r+1)}function f8(e,t){return n=>{if(null===n)return!1;try{if(e){if("string"==typeof e){if(n.matches(`.${e}`))return!0}else if(function(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}(n,e))return!0}return!!(t&&n.matches(t))}catch{return!1}}}let f7=`Please stop import mirror directly. Instead of that,\r
498now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
499or you can use record.mirror to access the mirror instance during recording.`,f9={map:{},getId:()=>(console.error(f7),-1),getNode:()=>(console.error(f7),null),removeNodeFromMap(){console.error(f7)},has:()=>(console.error(f7),!1),reset(){console.error(f7)}};function he(e,t,n,r,i=window){let o=i.Object.getOwnPropertyDescriptor(e,t);
499return i.Object.defineProperty(e,t,r?n:{set(e){hs(()=>{n.set.call(this,e)},0),o&&o.set&&o.set.call(this,e)}}),()=>he(e,t,o||{},!0)}function ht(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],i=n(r);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}function hn(e,t,n,r,i){if(!e)return!1;let o=function(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}(e);if(!o)return!1;let s=f8(t,n);if(!i){let e=r&&o.matches(r);return s(o)&&!e}let a=f6(o,s),l=-1;return!(a<0)&&(r&&(l=f6(o,f8(null,r))),a>-1&&l<0||a<l)}"u">typeof window&&window.Proxy&&window.Reflect&&(f9=new Proxy(f9,{get:(e,t,n)=>("map"===t&&console.error(f7),Reflect.get(e,t,n))})),Date.now().toString();let hr={};function hi(e){let t=hr[e];if(t)return t;let n=window.document,r=window[e];if(n&&"function"==typeof n.createElement)try{let t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(t)}catch{}return hr[e]=r.bind(window)}function ho(...e){return hi("requestAnimationFrame")(...e)}function hs(...e){return hi("setTimeout")(...e)}var ha=((P=ha||{})[P["2D"]=0]="2D",P[P.WebGL=1]="WebGL",P[P.WebGL2=2]="WebGL2",P);let hl=e=>T?(...t)=>{try{return e(...t)}catch(e){if(T&&!0===T(e))return()=>{};throw e}}:e;for(var hu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",hc=typeof Uint8Array>"u"?[]:new Uint8Array(256),hd=0;hd<hu.length;hd++)hc[hu.charCodeAt(hd)]=hd;var hp=function(e){var t,n=new Uint8Array(e),r=n.length,i="";for(t=0;t<r;t+=3)i+=hu[n[t]>>2]+hu[(3&n[t])<<4|n[t+1]>>4]+hu[(15&n[t+1])<<2|n[t+2]>>6]+hu[63&n[t+2]];return r%3==2?i=i.substring(0,i.length-1)+"=":r%3==1&&(i=i.substring(0,i.length-2)+"=="),i};let hf=new Map,hh=(e,t,n)=>{let r;if(!e||!(hg(e,t)||"object"==typeof e))return;let i=e.constructor.name,o=((r=hf.get(n))||(r=new Map,hf.set(n,r)),r.has(i)||r.set(i,[]),r.get(i)),s=o.indexOf(e);return -1===s&&(s=o.length,o.push(e)),s},hm=(e,t,n)=>e.map(e=>(function e(t,n,r){if(t instanceof Array)return t.map(t=>e(t,n,r));if(null===t)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer)return{rr_type:t.constructor.name,base64:hp(t)};if(t instanceof DataView)return{rr_type:t.constructor.name,args:[e(t.buffer,n,r),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){let e=t.constructor.name,{src:n}=t;return{rr_type:e,src:n}}return t instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:t.toDataURL()}:t instanceof ImageData?{rr_type:t.constructor.name,args:[e(t.data,n,r),t.width,t.height]}:hg(t,n)||"object"==typeof t?{rr_type:t.constructor.name,index:hh(t,n,r)}:t})(e,t,n)),hg=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof t[e]).find(n=>e instanceof t[n]);function hy(e,t,n,r,i){let o=[];try{let s=ht(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(o,...s){if(!hn(this,t,n,r,!0)){let e="experimental-webgl"===o?"webgl":o;if("__context"in this||(this.__context=e),i&&["webgl","webgl2"].includes(e)){if(s[0]&&"object"==typeof s[0]){let e=s[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else s.splice(0,1,{preserveDrawingBuffer:!0})}}return e.apply(this,[o,...s])}});o.push(s)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach(e=>e())}}function h_(e,t,n,r,i,o,s,a){let l=[];for(let s of Object.getOwnPropertyNames(e))if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(s))try{if("function"!=typeof e[s])continue;let u=ht(e,s,function(e){return function(...l){let u=e.apply(this,l);if(hh(u,a,this),"tagName"in this.canvas&&!hn(this.canvas,r,i,o,!0)){let e=hm(l,a,this),r={type:t,property:s,args:e};n(this.canvas,r)}return u}});l.push(u)}catch{let r=he(e,s,{set(e){n(this.canvas,{type:t,property:s,args:[e],setter:!0})}});l.push(r)}return l}class hv{constructor(e){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=(e,t)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)};let{enableManualSnapshot:t,sampling:n="all",win:r,recordCanvas:i,errorHandler:o}=e;e.sampling=n,this.mutationCb=e.mutationCb,this.mirror=e.mirror,this.options=e,o&&(T=o),(i&&"number"==typeof n||t)&&(this.worker=this.initFPSWorker()),this.addWindow(r),t||hl(()=>{i&&"all"===n&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),i&&"number"==typeof n&&this.initCanvasFPSObserver()})()}reset(){var e;
499this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.windowsSet=new WeakSet,this.windows=[],this.shadowDoms=new Set,null==(e=this.worker)||e.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(e){let{sampling:t="all",blockClass:n,blockSelector:r,unblockSelector:i,recordCanvas:o,enableManualSnapshot:s}=this.options;if(!this.windowsSet.has(e)){if(s){this.windowsSet.add(e),this.windows.push(new WeakRef(e));return}hl(()=>{if(o&&"all"===t&&this.initCanvasMutationObserver(e,n,r,i),o&&"number"==typeof t){let t=hy(e,n,r,i,!0);this.restoreHandlers.push(()=>{t()})}})(),this.windowsSet.add(e),this.windows.push(new WeakRef(e))}}addShadowRoot(e){this.shadowDoms.add(new WeakRef(e))}resetShadowRoots(){this.shadowDoms=new Set}snapshot(e,t){if(null!=t&&t.skipRequestAnimationFrame){this.takeSnapshot(performance.now(),!0,e);return}ho(t=>this.takeSnapshot(t,!0,e))}initFPSWorker(){let e=new Worker(function(){let e=new Blob(['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)}};']);return URL.createObjectURL(e)}());return e.onmessage=e=>{let t=e.data,{id:n}=t;if(this.snapshotInProgressMap.set(n,!1),!("base64"in t))return;let{base64:r,type:i,width:o,height:s}=t;this.mutationCb({id:n,type:ha["2D"],commands:[{property:"clearRect",args:[0,0,o,s]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:i}]},0,0,o,s]}]})},e}initCanvasFPSObserver(){let e;if(!this.windows.length&&!this.shadowDoms.size)return;let t=n=>{this.takeSnapshot(n,!1),e=ho(t)};e=ho(t),this.restoreHandlers.push(()=>{e&&cancelAnimationFrame(e)})}initCanvasMutationObserver(e,t,n,r){let i=hy(e,t,n,r,!1),o=function(e,t,n,r,i){let o=[];for(let s of Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype))try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[s])continue;let a=ht(t.CanvasRenderingContext2D.prototype,s,function(o){return function(...a){return hn(this.canvas,n,r,i,!0)||hs(()=>{let n=hm(a,t,this);e(this.canvas,{type:ha["2D"],property:s,args:n})},0),o.apply(this,a)}});o.push(a)}catch{let n=he(t.CanvasRenderingContext2D.prototype,s,{set(t){e(this.canvas,{type:ha["2D"],property:s,args:[t],setter:!0})}});o.push(n)}return()=>{o.forEach(e=>e())}}(this.processMutation.bind(this),e,t,n,r),s=function(e,t,n,r,i,o){let s=[];return s.push(...h_(t.WebGLRenderingContext.prototype,ha.WebGL,e,n,r,i,o,t)),"u">typeof t.WebGL2RenderingContext&&s.push(...h_(t.WebGL2RenderingContext.prototype,ha.WebGL2,e,n,r,i,o,t)),()=>
499{s.forEach(e=>e())}}(this.processMutation.bind(this),e,t,n,r,this.mirror);this.restoreHandlers.push(()=>{i(),o(),s()})}getCanvasElements(e,t,n){let r=[],i=i=>{i.querySelectorAll("canvas").forEach(i=>{hn(i,e,t,n,!0)||r.push(i)})};for(let e of this.windows){let t;let n=e.deref();try{t=n&&n.document}catch{}t&&i(t)}for(let e of this.shadowDoms){let t=e.deref();t&&i(t)}return r}takeSnapshot(e,t,n){let{sampling:r,blockClass:i,blockSelector:o,unblockSelector:s,dataURLOptions:a,maxCanvasSize:l}=this.options;return(!this.lastSnapshotTime||!(e-this.lastSnapshotTime<1e3/("all"===r?2:r||2)))&&(this.lastSnapshotTime=e,(n?[n]:this.getCanvasElements(i,o,s)).forEach(e=>{var n;let r=this.mirror.getId(e);if(!(!this.mirror.hasNode(e)||!e.width||!e.height||this.snapshotInProgressMap.get(r))){if(this.snapshotInProgressMap.set(r,!0),!t&&["webgl","webgl2"].includes(e.__context)){let t=e.getContext(e.__context);(null==(n=null==t?void 0:t.getContextAttributes())?void 0:n.preserveDrawingBuffer)===!1&&t.clear(t.COLOR_BUFFER_BIT)}createImageBitmap(e).then(t=>{var n;null==(n=this.worker)||n.postMessage({id:r,bitmap:t,width:e.width,height:e.height,dataURLOptions:a,maxCanvasSize:l},[t])}).catch(e=>{hl(()=>{throw this.snapshotInProgressMap.delete(r),e})()})}}),!0)}startPendingCanvasMutationFlusher(){ho(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,ho(e)};ho(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)}),ho(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let n=this.pendingCanvasMutations.get(e);if(!n||-1===t)return;let r=n.map(e=>{let{type:t,...n}=e;return n}),{type:i}=n[0];this.mutationCb({id:t,type:i,commands:r}),this.pendingCanvasMutations.delete(e)}}try{if(2!==Array.from([1],e=>2*e)[0]){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(j=e.contentWindow)?void 0:j.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}new f4,(N=B||(B={}))[N.NotStarted=0]="NotStarted",N[N.Running=1]="Running",N[N.Stopped=2]="Stopped";let hb={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}}},hS=(e={})=>{let t,n;let[r,i]=e.maxCanvasSize||[],o={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[r?Math.min(r,1280):1280,i?Math.min(i,1280):1280]},s=new Promise(e=>n=e);return{name:"ReplayCanvas",getOptions(){let{quality:e,enableManualSnapshot:r,maxCanvasSize:i}=o;return{enableManualSnapshot:r,recordCanvas:!0,getCanvasManager:e=>{let o=new hv({...e,enableManualSnapshot:r,maxCanvasSize:i,errorHandler:e=>{try{"object"==typeof e&&(e.__rrweb__=!0)}catch{}}});return t=o,n(o),o},...hb[e]||hb.medium}},async snapshot(e,n){(t||await s).snapshot(e,n)}}};function hk(e){try{return new URL(e,lh.location.origin).href}catch{return}}function hw(e){try{return new Headers(e)}catch{return}}let hx=new WeakMap,hE=new Map,hT={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function hC(e,t){let{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:i,shouldCreateSpanForRequest:o,enableHTTPTimings:s,tracePropagationTargets:a,onRequestSpanStart:l,onRequestSpanEnd:u}={...hT,...t},c="function"==typeof o?o:e=>!0,d=e=>(function(e,t){let n=eN();if(n){let r,i;try{r=new URL(e,n),i=new URL(n).origin}catch{return!1}let o=r.origin===i;return t?eZ(r.toString(),t)||o&&eZ(r.pathname,t):o}{let n=!!e.match(/^\/(?!\/)/);return t?eZ(e,t):n}})(e,a),p={},f=e.getOptions().propagateTraceparent;n&&(e.addEventProcessor(e=>("transaction"===e.type&&e.spans&&e.spans.forEach(e=>{if("http.client"===e.op){let t=hE.get(e.span_id);t&&(e.timestamp=t/1e3,hE.delete(e.span_id))}}),e)),i&&function(e){let t="fetch-body-resolved";ep(t,e),ef(t,()=>sP(sN))}(e=>{if(e.response){let t=hx.get(e.response);t&&e.endTimestamp&&hE.set(t,e.endTimestamp)}}),sL(e=>{let t=function(e,t,n,r,i){if(!e.fetchData)return;let{method:o,url:s}=e.fetchData,a=ns()&&t(s);if(e.endTimestamp&&a){let t=e.fetchData.__span;if(!t)return;let n=r[t];n&&(function(e,t){var n,r;if(t.response){tA(e,t.response.status);let i=null==(r=null==(n=t.response)?void 0:n.headers)?void 0:r.get("content-length");if(i){let t=parseInt(i);t>0&&e.setAttribute("http.response_content_length",t)}}else t.error&&e.setStatus({code:2,message:"internal_error"});e.end()}(n,e),function(e,t,n){var r;let i="object"==typeof n&&null!==n?n.onRequestSpanEnd:void 0;null==i||i(e,{headers:null==(r=t.response)?void 0:r.headers,error:t.error})}(n,e,i),delete r[t]);return}let{spanOrigin:l="auto.http.browser",propagateTraceparent:u=!1}="object"==typeof i?i:{spanOrigin:i},c=!!nt(),d=a&&c?nP(function(e,t,n){if(e.startsWith("data:")){let r=r9(e);return{name:`${t} ${r}`,attributes:i8(e,void 0,t,n)}}let r=r6(e),i=r?function(e){if(r4(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()}(r):e;return{name:`${t} ${i}`,attributes:i8(e,r,t,n)}}(s,o,l)):new nm;if(e.fetchData.__span=d.spanContext().spanId,r[d.spanContext().spanId]=d,n(e.fetchData.url)){let t=e.args[0],n={...e.args[1]||{}},r=function(e,t,n,r){let i=io({span:n,propagateTraceparent:r}),o=i["sentry-trace"],s=i.baggage,a=i.traceparent;if(!o)return;let l=t.headers||(eP(e)?e.headers:void 0);if(!l)return{...i};if("u">typeof Headers&&eO(l,Headers)){let e=new Headers(l);if(e.get("sentry-trace")||e.set("sentry-trace",o),r&&a&&!e.get("traceparent")&&e.set("traceparent",a),s){let t=e.get("baggage");t?i6(t)||e.set("baggage",`${t},${s}`):e.set("baggage",s)}return e}if(Array.isArray(l)){let e=[...l];l.find(e=>"sentry-trace"===e[0])||e.push(["sentry-trace",o]),r&&a&&!l.find(e=>"traceparent"===e[0])&&e.push(["traceparent",a]);let t=l.find(e=>"baggage"===e[0]&&i6(e[1]));return s&&!t&&e.push(["baggage",s]),e}{let e="sentry-trace"in l?l["sentry-trace"]:void 0,t="traceparent"in l?l.traceparent:void 0,n="baggage"in l?l.baggage:void 0,i=n?Array.isArray(n)?[...n]:[n]:[],u=n&&(Array.isArray(n)?n.find(e=>i6(e)):i6(n));s&&!u&&i.push(s);let c={...l,"sentry-trace":e??o,baggage:i.length>0?i.join(","):void 0};return r&&a&&!t&&(c.traceparent=a),c}}(t,n,ns()&&c?d:void 0,u);r&&(e.args[1]=n,n.headers=r)}let p=tg();if(p){let t={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};p.emit("beforeOutgoingRequestSpan",d,t)}return d}(e,c,d,p,{propagateTraceparent:f,onRequestSpanEnd:u});if(e.response&&e.fetchData.__span&&hx.set(e.response,e.fetchData.__span),t){let n=hk(e.fetchData.url),r=n?r8(n).host:void 0;t.setAttributes({"http.url":n?r9(n):void 0,"server.address":r}),s&&hI(t),null==l||l(t,{headers:e.headers})}})),r&&uK(e=>{var t;let n=function(e,t,n,r,i,o){let s=e.xhr,a=null==s?void 0:s[uG];if(!s||s.__sentry_own_request__||!a)return;let{url:l,method:u}=a,c=ns()&&t(l);if(e.endTimestamp&&c){let t=s.__sentry_xhr_span_id__;if(!t)return;let n=r[t];n&&void 0!==a.status_code&&(tA(n,a.status_code),n.end(),null==o||o(n,{headers:hw(u1(s)),error:e.error}),delete r[t]);return}let d=hk(l),p=r8(d||l),f=r9(r7(l)),h=!!nt(),m=c&&h?nP({name:`${u} ${f}
499`,attributes:{url:r9(l),type:"xhr","http.method":u,"http.url":d?r9(d):void 0,"server.address":null==p?void 0:p.host,[tk]:"auto.http.browser",[tS]:"http.client",...(null==p?void 0:p.search)&&{"http.query":null==p?void 0:p.search},...(null==p?void 0:p.hash)&&{"http.fragment":null==p?void 0:p.hash}}}):new nm;s.__sentry_xhr_span_id__=m.spanContext().spanId,r[s.__sentry_xhr_span_id__]=m,n(l)&&function(e,t,n){let{"sentry-trace":r,baggage:i,traceparent:o}=io({span:t,propagateTraceparent:n});r&&function(e,t,n,r){var i;let o=null==(i=e.__sentry_xhr_v3__)?void 0:i.request_headers;if(!(null!=o&&o["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),r&&!(null!=o&&o.traceparent)&&e.setRequestHeader("traceparent",r),n){let t=null==o?void 0:o.baggage;t&&t.split(",").some(e=>e.trim().startsWith("sentry-"))||e.setRequestHeader("baggage",n)}}catch{}}(e,r,i,o)}(s,ns()&&h?m:void 0,i);let g=tg();return g&&g.emit("beforeOutgoingRequestSpan",m,e),m}(e,c,d,p,f,u);n&&(s&&hI(n),null==l||l(n,{headers:hw(null==(t=e.xhr.__sentry_xhr_v3__)?void 0:t.request_headers)}))})}function hI(e){let{url:t}=t3(e).data;if(!t||"string"!=typeof t)return;let n=um("resource",({entries:r})=>{r.forEach(r=>{"resource"===r.entryType&&"initiatorType"in r&&"string"==typeof r.nextHopProtocol&&("fetch"===r.initiatorType||"xmlhttprequest"===r.initiatorType)&&r.name.endsWith(t)&&(e.setAttributes(uL(r)),setTimeout(n))})})}let hM="sentry_previous_trace";function hA(e){return 1===e.traceFlags}let hR={...nW,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...hT},hO=(e={})=>{let t,n,r;let i={name:void 0,source:void 0},o=lh.document,{enableInp:s,enableElementTiming:a,enableLongTask:l,enableLongAnimationFrame:u,_experiments:{enableInteractions:c,enableStandaloneClsSpans:d,enableStandaloneLcpSpans:p},beforeStartSpan:f,idleTimeout:m,finalTimeout:g,childSpanTimeout:y,markBackgroundSpan:_,traceFetch:v,traceXHR:b,trackFetchStreamPerformance:S,shouldCreateSpanForRequest:k,enableHTTPTimings:w,ignoreResourceSpans:x,ignorePerformanceApiSpans:E,instrumentPageLoad:T,instrumentNavigation:C,detectRedirects:I,linkPreviousTrace:M,consistentTraceSampling:A,enableReportPageLoaded:R,onRequestSpanStart:O,onRequestSpanEnd:L}={...hR,...e};function P(e,n,s=!0){let a="pageload"===n.op,l=n.name,u=f?f(n):n,c=u.attributes||{};if(l!==u.name&&(c[t_]="custom",u.attributes=c),!s){let e=e4();nP({...u,startTime:e}).end(e);return}i.name=u.name,i.source=c[t_];let h=nJ(u,{idleTimeout:m,finalTimeout:g,childSpanTimeout:y,disableAutoFinish:a,beforeSpanEnd:n=>{null==t||t(),function(e,t){let n=uI(),r=e7();if(!(null!=n&&n.getEntries)||!r)return;let i=uM(r),o=n.getEntries(),{op:s,start_timestamp:a}=t3(e);o.slice(uP).forEach(n=>{let r=uM(n.startTime),o=uM(Math.max(0,n.duration));if(!("navigation"===s&&a&&i+r<a))switch(n.entryType){case"navigation":["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(t=>{uF(e,n,t,i)}),uF(e,n,"secureConnection",i,"TLS/SSL"),uF(e,n,"fetch",i,"cache"),uF(e,n,"domainLookup",i,"DNS"),function(e,t,n){let r=n+uM(t.requestStart),i=n+uM(t.responseEnd),o=n+uM(t.responseStart);t.responseEnd&&(uT(e,r,i,{op:"browser.request",name:t.name,attributes:{[tk]:"auto.ui.browser.metrics"}}),uT(e,o,i,{op:"browser.response",name:t.name,attributes:{[tk]:"auto.ui.browser.metrics"}}))}(e,n,i);break;case"mark":case"paint":case"measure":{(function(e,t,n,r,i,o){if(function(e){if((null==e?void 0:e.entryType)==="measure")try{return"Components ⚛"===e.detail.devtools.track}catch{return}}(t)||["mark","measure"].includes(t.entryType)&&eZ(t.name,o))return;let s=lD(!1),a=i+Math.max(n,uM(s?s.requestStart:0)),l=i+n,u=l+r,c={[tk]:"auto.resource.browser.metrics"};a!==l&&(c["sentry.browser.measure_happened_before_request"]=!0,c["sentry.browser.measure_start_time"]=a),function(e,t){try{let n=t.detail;if(!n)return;if("object"==typeof n){for(let[t,r]of Object.entries(n))if(r&&eI(r))e[`sentry.browser.measure.detail.${t}`]=r;else if(void 0!==r)try{e[`sentry.browser.measure.detail.${t}`]=JSON.stringify(r)}catch{}return}if(eI(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}(c,t),a<=u&&uT(e,a,u,{name:t.name,op:t.entryType,attributes:c})})(e,n,r,o,i,t.ignorePerformanceApiSpans);let s=lz(),a=n.startTime<s.firstHiddenTime;"first-paint"===n.name&&a&&(uD.fp={value:n.startTime,unit:"millisecond"}),"first-contentful-paint"===n.name&&a&&(uD.fcp={value:n.startTime,unit:"millisecond"});break}
499case"resource":(function(e,t,n,r,i,o,s){if("xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType)return;let a=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(null!=s&&s.includes(a))return;let l={[tk]:"auto.resource.browser.metrics"},u=r8(n);u.protocol&&(l["url.scheme"]=u.protocol.split(":").pop()),u.host&&(l["server.address"]=u.host),l["url.same_origin"]=n.includes(H.location.origin),function(e,t,n){n.forEach(([n,r])=>{let i=e[n];null!=i&&("number"==typeof i&&i<2147483647||"string"==typeof i)&&(t[r]=i)})}(t,l,[["responseStatus","http.response.status_code"],["transferSize","http.response_transfer_size"],["encodedBodySize","http.response_content_length"],["decodedBodySize","http.decoded_response_content_length"],["renderBlockingStatus","resource.render_blocking_status"],["deliveryType","http.response_delivery_type"]]);let c={...l,...uL(t)},d=o+r;uT(e,d,d+i,{name:n.replace(H.location.origin,""),op:a,attributes:c})})(e,n,n.name,r,o,i,t.ignoreResourceSpans)}}),uP=Math.max(o.length-1,0),function(e){let t=H.navigator;if(!t)return;let n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),uE(n.rtt)&&(uD["connection.rtt"]={value:n.rtt,unit:"millisecond"})),uE(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),uE(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}(e),"pageload"===s&&(function(e){let t=lD(!1);if(!t)return;let{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}(uD),t.recordClsOnPageloadSpan||delete uD.cls,t.recordLcpOnPageloadSpan||delete uD.lcp,Object.entries(uD).forEach(([e,t])=>{nE(e,t.value,t.unit)}),e.setAttribute("performance.timeOrigin",i),e.setAttribute("performance.activationStart",lN()),uN&&t.recordLcpOnPageloadSpan&&(uN.element&&e.setAttribute("lcp.element",eD(uN.element)),uN.id&&e.setAttribute("lcp.id",uN.id),uN.url&&e.setAttribute("lcp.url",uN.url.trim().slice(0,200)),null!=uN.loadTime&&e.setAttribute("lcp.loadTime",uN.loadTime),null!=uN.renderTime&&e.setAttribute("lcp.renderTime",uN.renderTime),e.setAttribute("lcp.size",uN.size)),null!=u$&&u$.sources&&t.recordClsOnPageloadSpan&&u$.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,eD(t.node)))),uN=void 0,u$=void 0,uD={}}(n,{recordClsOnPageloadSpan:!d,recordLcpOnPageloadSpan:!p,ignoreResourceSpans:x,ignorePerformanceApiSpans:E}),ej(e,h$,void 0);let i=td(),o=i.getPropagationContext();i.setPropagationContext({...o,traceId:h.spanContext().traceId,sampled:t5(h),dsc:nf(n)}),a&&(r=void 0)},trimIdleSpanEndTimestamp:!R});function _(){o&&["interactive","complete"].includes(o.readyState)&&e.emit("idleSpanEnableAutoFinish",h)}a&&R&&(r=h),ej(e,h$,h),a&&!R&&o&&(o.addEventListener("readystatechange",()=>{_()}),_())}return{name:"BrowserTracing",setup(e){if(no(),t=function({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){let r=uI();if(r&&e7()){r.mark&&H.performance.mark("sentry-tracing-init");let i=t?function(e){let t=0,n;if(!uA("largest-contentful-paint"))return;let r=uf(({metric:e})=>{let r=e.entries[e.entries.length-1];r&&(t=e.value,n=r)},!0);uR(e,(e,i)=>{(function(e,t,n,r){lO&&et.log(`Sending LCP span (${e})`);let i=uM((e7()||0)+((null==t?void 0:t.startTime)||0)),o=td().getScopeData().transactionName,s=t?eD(t.element):"Largest contentful paint",a={[tk]:"auto.http.browser.lcp",[tS]:"ui.webvital.lcp",[tI]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(a["lcp.element"]=eD(t.element)),t.id&&(a["lcp.id"]=t.id),t.url&&(a["lcp.url"]=t.url),null!=t.loadTime&&(a["lcp.loadTime"]=t.loadTime),null!=t.renderTime&&(a["lcp.renderTime"]=t.renderTime),null!=t.size&&(a["lcp.size"]=t.size));let l=uC({name:s,transaction:o,attributes:a,startTime:i});l&&(l.addEvent("lcp",{[tx]:"millisecond",[tE]:e}),l.end(i))})(t,n,i,e),r()})}(n):uf(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(uD.lcp={value:e.value,unit:"millisecond"},uN=t)},!0),o=uS("ttfb",({metric:e})=>{e.entries[e.entries.length-1]&&(uD.ttfb={value:e.value,unit:"millisecond"})},uv,h),s=e?function(e){let t=0,n;if(!uA("layout-shift"))return;let r=up(({metric:e})=>{let r=e.entries[e.entries.length-1];r&&(t=e.value,n=r)},!0);uR(e,(e,i)=>{(function(e,t,n,r){var i;lO&&et.log(`Sending CLS span (${e})`);let o=t?uM((e7()||0)+t.startTime):e6(),s=td().getScopeData().transactionName,a=t?eD(null==(i=t.sources[0])?void 0:i.node):"Layout shift",l={[tk]:"auto.http.browser.cls",[tS]:"ui.webvital.cls",[tI]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};
499null!=t&&t.sources&&t.sources.forEach((e,t)=>{l[`cls.source.${t+1}`]=eD(e.node)});let u=uC({name:a,transaction:s,attributes:l,startTime:o});u&&(u.addEvent("cls",{[tx]:"",[tE]:e}),u.end(o))})(t,n,i,e),r()})}(n):up(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(uD.cls={value:e.value,unit:""},u$=t)},!0);return()=>{null==i||i(),o(),null==s||s()}}return()=>{}}({recordClsStandaloneSpans:d||!1,recordLcpStandaloneSpans:p||!1,client:e}),s&&function(){if(uI()&&e7()){let e=uh(u6)}}(),a&&uI()&&e7()&&um("element",uj),u&&H.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?new PerformanceObserver(e=>{let t=nt();if(t)for(let n of e.getEntries()){if(!n.scripts[0])continue;let e=uM(e7()+n.startTime),{start_timestamp:r,op:i}=t3(t);if("navigation"===i&&r&&e<r)continue;let o=uM(n.duration),s={[tk]:"auto.ui.browser.metrics"},{invoker:a,invokerType:l,sourceURL:u,sourceFunctionName:c,sourceCharPosition:d}=n.scripts[0];s["browser.script.invoker"]=a,s["browser.script.invoker_type"]=l,u&&(s["code.filepath"]=u),c&&(s["code.function"]=c),-1!==d&&(s["browser.script.source_char_position"]=d),uT(t,e,e+o,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:s})}}).observe({type:"long-animation-frame",buffered:!0}):l&&um("longtask",({entries:e})=>{let t=nt();if(!t)return;let{op:n,start_timestamp:r}=t3(t);for(let i of e){let e=uM(e7()+i.startTime),o=uM(i.duration);"navigation"===n&&r&&e<r||uT(t,e,e+o,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[tk]:"auto.ui.browser.metrics"}})}}),c&&um("event",({entries:e})=>{let t=nt();if(t){for(let n of e)if("click"===n.name){let e=uM(e7()+n.startTime),r=uM(n.duration),i={name:eD(n.target),op:`ui.interaction.${n.name}`,startTime:e,attributes:{[tk]:"auto.ui.browser.metrics"}},o=e$(n.target);o&&(i.attributes["ui.component_name"]=o),uT(t,e,e+r,i)}}}),I&&o){let e=()=>{n=e6()};addEventListener("click",e,{capture:!0}),addEventListener("keydown",e,{capture:!0,passive:!0})}function i(){let t=e[h$];t&&!t3(t).timestamp&&(u7&&et.log(`[Tracing] Finishing current active span with op: ${t3(t).op}`),t.setAttribute(tw,"cancelled"),t.end())}e.on("startNavigationSpan",(t,r)=>{if(tg()!==e)return;if(null!=r&&r.isRedirect){u7&&et.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),P(e,{op:"navigation.redirect",...t},!1);return}n=void 0,i(),tp().setPropagationContext({traceId:eQ(),sampleRand:Math.random(),propagationSpanId:ns()?void 0:tt()});let o=td();o.setPropagationContext({traceId:eQ(),sampleRand:Math.random(),propagationSpanId:ns()?void 0:tt()}),o.setSDKProcessingMetadata({normalizedRequest:void 0}),P(e,{op:"navigation",...t,parentSpan:null,forceTransaction:!0})}),e.on("startPageLoadSpan",(t,n={})=>{if(tg()!==e)return;i();let r=tG(n.sentryTrace||hD("sentry-trace")||hN("sentry-trace"),n.baggage||hD("baggage")||hN("baggage")),o=td();o.setPropagationContext(r),ns()||(o.getPropagationContext().propagationSpanId=tt()),o.setSDKProcessingMetadata({normalizedRequest:ly()}),P(e,{op:"pageload",...t})}),e.on("endPageloadSpan",()=>{R&&r&&(r.setAttribute(tw,"reportPageLoaded"),r.end())})},afterAllSetup(e){let t,r=eN();if("off"!==M&&function(e,{linkPreviousTrace:t,consistentTraceSampling:n}){let r="session-storage"===t,i=r?function(){var e;try{let t=null==(e=lh.sessionStorage)?void 0:e.getItem(hM);return JSON.parse(t)}catch{return}}():void 0;e.on("spanStart",e=>{if(ne(e)!==e)return;let t=td().getPropagationContext();i=function(e,t,n){let r=t3(t),i={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:function(){var e,t;try{return Number(null==(e=n.dsc)?void 0:e.sample_rate)??Number(null==(t=r.data)?void 0:t[tv])}catch{return 0}}(),sampleRand:n.sampleRand};if(!e)return i;let o=e.spanContext;return o.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=3600&&(u7&&et.log(`Adding previous_trace \`${JSON.stringify(o)}\` link to span \`${JSON.stringify({op:r.op,...t.spanContext()})}\``),t.addLink({context:o,attributes:{"sentry.link.type":"previous_trace"}}),t.setAttribute("sentry.previous_trace",`${o.traceId}-${o.spanId}-${hA(o)?1:0}`)),i)}(i,e,t),r&&function(e){try{lh.sessionStorage.setItem(hM,JSON.stringify(e))}catch(e){u7&&et.warn("Could not store previous trace in sessionStorage",e)}}(i)});let o=!0;n&&e.on("beforeSampling",e=>
499{if(!i)return;let t=td(),n=t.getPropagationContext();if(o&&n.parentSpanId){o=!1;return}t.setPropagationContext({...n,dsc:{...n.dsc,sample_rate:String(i.sampleRate),sampled:String(hA(i.spanContext))},sampleRand:i.sampleRand}),e.parentSampled=hA(i.spanContext),e.parentSampleRate=i.sampleRate,e.spanAttributes={...e.spanAttributes,[tb]:i.sampleRate}})}(e,{linkPreviousTrace:M,consistentTraceSampling:A}),lh.location){if(T){let t=e7();hL(e,{name:lh.location.pathname,startTime:t?t/1e3:void 0,attributes:{[t_]:"url",[tk]:"auto.pageload.browser"}})}C&&uz(({to:t,from:i})=>{if(void 0===i&&(null==r?void 0:r.indexOf(t))!==-1){r=void 0;return}r=void 0;let o=r6(t),s=e[h$],a=s&&I&&function(e,t){let n=t3(e),r=e4();return!(r-n.start_timestamp>1.5||t&&r-t<=1.5)}(s,n);hP(e,{name:(null==o?void 0:o.pathname)||lh.location.pathname,attributes:{[t_]:"url",[tk]:"auto.navigation.browser"}},{url:t,isRedirect:a})})}_&&(lh.document?lh.document.addEventListener("visibilitychange",()=>{let e=nt();if(!e)return;let t=ne(e);if(lh.document.hidden&&t){let e="cancelled",{op:n,status:r}=t3(t);u7&&et.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${n}`),r||t.setStatus({code:2,message:e}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):u7&&et.warn("[Tracing] Could not set up background tab detection due to lack of global document")),c&&lh.document&&addEventListener("click",()=>{let n="ui.action.click",r=e[h$];if(r&&["navigation","pageload"].includes(t3(r).op)){u7&&et.warn(`[Tracing] Did not create ${n} span because a pageload or navigation span is in progress.`);return}if(t&&(t.setAttribute(tw,"interactionInterrupted"),t.end(),t=void 0),!i.name){u7&&et.warn(`[Tracing] Did not create ${n} transaction because _latestRouteName is missing.`);return}t=nJ({name:i.name,op:n,attributes:{[t_]:i.source||"url"}},{idleTimeout:m,finalTimeout:g,childSpanTimeout:y})},{capture:!0}),s&&function(){let e=Object.keys(u4);function t(e){let t=e.target;if(!t)return;let n=eD(t),r=Math.round(e.timeStamp);if(u5.set(r,n),u5.size>50){let e=u5.keys().next().value;void 0!==e&&u5.delete(e)}}sj()&&e.forEach(e=>{H.addEventListener(e,t,{capture:!0,passive:!0})});let n=({entries:e})=>{let t=nt(),n=t&&ne(t);e.forEach(e=>{if(!("duration"in e))return;let t=e.interactionId;if(null==t||u3.has(t))return;let r=e.target?eD(e.target):function(e){let t=Math.round(e.startTime),n=u5.get(t);if(!n)for(let e=-5;e<=5;e++){let r=u5.get(t+e);if(r){n=r;break}}return n||"<unknown>"}(e);if(u2.length>10){let e=u2.shift();u3.delete(e)}u2.push(t),u3.set(t,{span:n,elementName:r})})};um("event",n),um("first-input",n)}(),hC(e,{traceFetch:v,traceXHR:b,trackFetchStreamPerformance:S,tracePropagationTargets:e.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:k,enableHTTPTimings:w,onRequestSpanStart:O,onRequestSpanEnd:L})}}};function hL(e,t,n){e.emit("startPageLoadSpan",t,n),td().setTransactionName(t.name);let r=e[h$];return r&&e.emit("afterStartPageLoadSpan",r),r}function hP(e,t,n){let{url:r,isRedirect:i}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:i}),e.emit("startNavigationSpan",t,{isRedirect:i});let o=td();return o.setTransactionName(t.name),r&&!i&&o.setSDKProcessingMetadata({normalizedRequest:{...ly(),url:r}}),e[h$]}function hD(e){let t=lh.document,n=null==t?void 0:t.querySelector(`meta[name=${e}]`);return(null==n?void 0:n.getAttribute("content"))||void 0}function hN(e){var t,n,r;let i=null==(n=null==(t=lh.performance)?void 0:t.getEntriesByType)?void 0:n.call(t,"navigation")[0],o=null==(r=null==i?void 0:i.serverTiming)?void 0:r.find(t=>t.name===e);return null==o?void 0:o.description}let h$="_sentry_idleSpan";function hF(e=tg()){null==e||e.emit("endPageloadSpan")}function hj(e){let t=nt();if(t===e)return;let n=td();e.end=new Proxy(e.end,{apply:(e,r,i)=>
499(tr(n,t),Reflect.apply(e,r,i))}),tr(n,e)}function hB(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function hU(e){return hB(e.getAllKeys())}function hq(e){let t;function n(){return null==t&&(t=function(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=hB(n);return e=>r.then(n=>e(n.transaction(t,"readwrite").objectStore(t)))}(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{push:async t=>{try{var r,i;let o=await nS(t);await (r=n(),i=e.maxQueueSize||30,r(e=>hU(e).then(t=>{if(!(t.length>=i))return e.put(o,Math.max(...t,0)+1),hB(e.transaction)})))}catch{}},unshift:async t=>{try{var r,i;let o=await nS(t);await (r=n(),i=e.maxQueueSize||30,r(e=>hU(e).then(t=>{if(!(t.length>=i))return e.put(o,Math.min(...t,0)-1),hB(e.transaction)})))}catch{}},shift:async()=>{try{let e=await n()(e=>hU(e).then(t=>{let n=t[0];if(null!=n)return hB(e.get(n)).then(t=>(e.delete(n),hB(e.transaction).then(()=>t)))}));if(e)return function(e){let t="string"==typeof e?nb(e):e;function n(e){let n=t.subarray(0,e);return t=t.subarray(e+1),n}function r(){let e=t.indexOf(10);return e<0&&(e=t.length),JSON.parse(function(e){let t=V(H);return t.decodePolyfill?t.decodePolyfill(e):new TextDecoder().decode(e)}(n(e)))}let i=r(),o=[];for(;t.length;){let e=r(),t="number"==typeof e.length?e.length:void 0;o.push([e,t?n(t):r()])}return[i,o]}(e)}catch{}}}}function hz(e=u8){var t;return t=function(e){function t(...e){z&&et.log("[Offline]:",...e)}return n=>{let r=e(n);if(!n.createStore)throw Error("No `createStore` function was provided");let i=n.createStore(n),o=5e3,s;function a(e){s&&clearTimeout(s),s=rM(setTimeout(async()=>{s=void 0;let e=await i.shift();e&&(t("Attempting to send previously queued event"),e[0].sent_at=new Date().toISOString(),u(e,!0).catch(e=>{t("Failed to retry sending",e)}))},e))}function l(){s||(a(o),o=Math.min(2*o,36e5))}async function u(e,s=!1){var u,c,d;if(!s&&nv(e,["replay_event","replay_recording"]))return await i.push(e),a(100),{};try{if(n.shouldSend&&await n.shouldSend(e)===!1)throw Error("Envelope not sent because `shouldSend` callback returned false");let t=await r.send(e),i=100;if(t){if(null!=(u=t.headers)&&u["retry-after"])i=rO(t.headers["retry-after"]);else if(null!=(c=t.headers)&&c["x-sentry-rate-limits"])i=6e4;else if((t.statusCode||0)>=400)return t}return a(i),o=5e3,t}catch(r){if(await (d=o,!nv(e,["client_report"])&&(!n.shouldStore||n.shouldStore(e,r,d))))return s?await i.unshift(e):await i.push(e),l(),t("Error sending. Event queued.",r),{};throw r}}return n.flushAtStartup&&l(),{send:u,flush:e=>(void 0===e&&(o=5e3,a(100)),r.flush(e))}}}(e),e=>{let n=t({...e,createStore:hq});return lh.addEventListener("online",async e=>{await n.flush()}),n}}let hH="window"in H&&H.window===H&&typeof importScripts>"u",hW=String(0),hJ=hH?"main":"worker",hV=lh.navigator,hG="",hK="",hY="",hX=(null==hV?void 0:hV.userAgent)||"",hZ="",hQ=(null==hV?void 0:hV.language)||(null==(U=null==hV?void 0:hV.languages)?void 0:U[0])||"",h0=null==hV?void 0:hV.userAgentData;function h1(e){return"pageload"===t3(e).op}function h2(e){let t=tg(),n=null==t?void 0:t.getOptions(),r=null==n?void 0:n.stackParser;return r?function(e,t){let n=nY(e);if(!n)return[];let r=[];for(let e of t){let t=function(e){let t=null!=e&&e.startsWith("file://")?e.slice(7):e;return null!=t&&t.match(/\/[A-Z]:/)&&(t=t.slice(1)),t}(e);t&&n[t]&&r.push({type:"sourcemap",code_file:e,debug_id:n[t]})}return r}(r,e):[]}function h3(e){return"number"!=typeof e&&"boolean"!=typeof e||"number"==typeof e&&isNaN(e)?(u7&&et.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):!0===e||!1===e||!(e<0)&&!(e>1)||(u7&&et.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1)}"object"==typeof h0&&null!==h0&&"getHighEntropyValues"in h0&&h0.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{var t;if(hG=e.platform||"",hY=e.architecture||"",hZ=e.model||"",hK=e.platformVersion||"",null!=(t=e.fullVersionList)&&t.length){let t=e.fullVersionList[e.fullVersionList.length-1];hX=`${t.brand} ${t.version}`}}).catch(e=>{});let h5=!1;function h4(){let e=lh.Profiler;if("function"!=typeof e){u7&&et.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}try{return new e({sampleInterval:10,maxBufferSize:Math.floor(3e3)})}catch{u7&&(et.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),et.log("[Profiling] Disabling profiling for current user session.")),h5=!0}}function h6(e){if(h5)return u7&&et.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return u7&&et.log("[Profiling] Discarding profile because root span was not sampled."),!1;let t=tg(),n=null==t?void 0:t.getOptions();if(!n)return u7&&et.log("[Profiling] Profiling disabled, no options foun
499d."),!1;let r=n.profilesSampleRate;return h3(r)?r?!!(!0===r||Math.random()<r)||(u7&&et.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):(u7&&et.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):(u7&&et.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function h8(e){return"u">typeof e.profilesSampleRate}let h7=new Map;function h9(e){let t;h1(e)&&(t=1e3*e6());let n=h4();if(!n)return;u7&&et.log(`[Profiling] started profiling span: ${t3(e).description}`);let r=eQ(),i=null;async function o(){if(e&&n){if(i){u7&&et.log("[Profiling] profile for:",t3(e).description,"already exists, returning early");return}return n.stop().then(t=>{if(s&&(lh.clearTimeout(s),s=void 0),u7&&et.log(`[Profiling] stopped profiling of span: ${t3(e).description}`),!t){u7&&et.log(`[Profiling] profiler returned null profile for: ${t3(e).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started");return}i=t,function(e,t){if(h7.set(e,t),h7.size>30){let e=h7.keys().next().value;void 0!==e&&h7.delete(e)}}(r,t)}).catch(e=>{u7&&et.log("[Profiling] error while stopping profiler:",e)})}}td().setContext("profile",{profile_id:r,start_timestamp:t});let s=lh.setTimeout(()=>{u7&&et.log("[Profiling] max profile duration elapsed, stopping profiling for:",t3(e).description),o()},3e4),a=e.end.bind(e);e.end=function(){return e?(o().then(()=>{a()},()=>{a()}),e):a()}}class me{constructor(){this._client=void 0,this._profiler=void 0,this._chunkTimer=void 0,this._profilerId=void 0,this._isRunning=!1,this._sessionSampled=!1,this._lifecycleMode=void 0,this._activeRootSpanIds=new Set,this._rootSpanTimeouts=new Map}initialize(e){let t=e.getOptions().profileLifecycle,n=function(e){if(h5)return u7&&et.log("[Profiling] Profiling has been disabled for the duration of the current user session as the JS Profiler could not be started."),!1;if("trace"!==e.profileLifecycle&&"manual"!==e.profileLifecycle)return u7&&et.warn("[Profiling] Session not sampled. Invalid `profileLifecycle` option."),!1;let t=e.profileSessionSampleRate;return h3(t)?t?Math.random()<=t:(u7&&et.log("[Profiling] Discarding profile because profileSessionSampleRate is not defined or set to 0"),!1):(u7&&et.warn("[Profiling] Discarding profile because of invalid profileSessionSampleRate."),!1)}(e.getOptions());u7&&et.log(`[Profiling] Initializing profiler (lifecycle='${t}').`),n||u7&&et.log("[Profiling] Session not sampled. Skipping lifecycle profiler initialization."),this._profilerId=eQ(),this._client=e,this._sessionSampled=n,this._lifecycleMode=t,"trace"===t&&this._setupTraceLifecycleListeners(e)}start(){if("trace"===this._lifecycleMode){u7&&et.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.start()` are ignored in trace mode.');return}if(this._isRunning){u7&&et.warn("[Profiling] Profile session is already running, `uiProfiler.start()` is a no-op.");return}if(!this._sessionSampled){u7&&et.warn("[Profiling] Session is not sampled, `uiProfiler.start()` is a no-op.");return}this._beginProfiling()}stop(){if("trace"===this._lifecycleMode){u7&&et.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.stop()` are ignored in trace mode.');return}if(!this._isRunning){u7&&et.warn("[Profiling] Profiler is not running, `uiProfiler.stop()` is a no-op.");return}this._endProfiling()}notifyRootSpanActive(e){if("trace"!==this._lifecycleMode||!this._sessionSampled)return;let t=e.spanContext().spanId;if(!t||this._activeRootSpanIds.has(t))return;this._registerTraceRootSpan(t);let n=this._activeRootSpanIds.size;1===n&&(u7&&et.log("[Profiling] Detected already active root span during setup. Active root spans now:",n),this._beginProfiling())}_beginProfiling(){if(!this._isRunning){if(this._isRunning=!0,u7&&et.log("[Profiling] Started profiling with profiler ID:",this._profilerId),tf().setContext("profile",{profiler_id:this._profilerId}),this._startProfilerInstance(),!this._profiler){u7&&et.log("[Profiling] Failed to start JS Profiler; stopping."),this._resetProfilerInfo();return}this._startPeriodicChunking()}}_endProfiling(){this._isRunning&&(this._isRunning=!1,this._chunkTimer&&(clearTimeout(this._chunkTimer),this._chunkTimer=void 0),this._clearAllRootSpanTimeouts(),this._collectCurrentChunk().catch(e=>{u7&&et.error("[Profiling] Failed to collect current profile chunk on `stop()`:",e)}),"manual"===this._lifecycleMode&&tf().setContext("profile",{}))}_setupTraceLifecycleListeners(e){e.on("spanStart",e=>{if(!this._sessionSampled){u7&&et.log("[Profiling] Span not profiled because of negative sampling decision for user session.");return}if(e!==ne(e))return;if(!e.isRecording()){u7&&et.log("[Profiling] Discarding profile because root span was not sampled.");return}let t=e.spanContext().spanId;if(!t||this._activeRootSpanIds.has(t))return;this._registerTraceRootSpan(t);let n=this._activeRootSpanIds.size;1===n&&(u7&&et.log(`[Profiling] Root span ${t} started. Profiling active while there are active root spans (count=${n}).`),this._beginProfiling())}),e.on("spanEnd",e=>{if(!this._sessionSampled)return;let t=e.spanContext().spanId;if(!t||!this._activeRootSpanIds.has(t))return;this._activeRootSpanIds.delete(t);let n=this._activeRootSpanIds.size;u7&&et.log(`[Profiling] Root span with ID ${t} ended. Will continue profiling for as long as there are active root spans (currently: ${n}).`),0===n&&(this._collectCurrentChunk().catch(e=>{u7&&et.error("[Profiling] Failed to collect current profile chunk on last `spanEnd`:",e)}),this._endProfiling())})}_resetProfilerInfo(){this._isRunning=!1,tf().setContext("profile",{})}
499_clearAllRootSpanTimeouts(){this._rootSpanTimeouts.forEach(e=>clearTimeout(e)),this._rootSpanTimeouts.clear()}_registerTraceRootSpan(e){this._activeRootSpanIds.add(e);let t=setTimeout(()=>this._onRootSpanTimeout(e),3e5);this._rootSpanTimeouts.set(e,t)}_startProfilerInstance(){var e;if((null==(e=this._profiler)?void 0:e.stopped)===!1)return;let t=h4();if(!t){u7&&et.log("[Profiling] Failed to start JS Profiler.");return}this._profiler=t}_startPeriodicChunking(){this._isRunning&&(this._chunkTimer=setTimeout(()=>{if(this._collectCurrentChunk().catch(e=>{u7&&et.error("[Profiling] Failed to collect current profile chunk during periodic chunking:",e)}),this._isRunning){if(this._startProfilerInstance(),!this._profiler){this._resetProfilerInfo();return}this._startPeriodicChunking()}},6e4))}_onRootSpanTimeout(e){this._rootSpanTimeouts.has(e)&&(this._rootSpanTimeouts.delete(e),this._activeRootSpanIds.has(e)&&(u7&&et.log(`[Profiling] Reached 5-minute timeout for root span ${e}. You likely started a manual root span that never called \`.end()\`.`),this._activeRootSpanIds.delete(e),0===this._activeRootSpanIds.size&&this._endProfiling()))}async _collectCurrentChunk(){let e=this._profiler;if(this._profiler=void 0,e)try{let t=await e.stop(),n=function(e,t,n){var r,i;if(null==e)throw TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${e} instead.`);let o=function(e){let t=[];for(let n=0;n<e.frames.length;n++){let r=e.frames[n];r&&(t[n]={function:r.name,abs_path:"number"==typeof r.resourceId?e.resources[r.resourceId]:void 0,lineno:r.line,colno:r.column})}let n=[];for(let t=0;t<e.stacks.length;t++){let r=e.stacks[t];if(!r)continue;let i=[],o=r;for(;o;)i.push(o.frameId),o=void 0===o.parentId?void 0:e.stacks[o.parentId];n[t]=i}let r=e7(),i="number"==typeof performance.timeOrigin?performance.timeOrigin:r||0,o=i-(r||i),s=[];for(let t=0;t<e.samples.length;t++){let n=e.samples[t];if(!n)continue;let r=(i+(n.timestamp-o))/1e3;s[t]={stack_id:n.stackId??0,thread_id:hW,timestamp:r}}return{frames:t,stacks:n,samples:s,thread_metadata:{[hW]:{name:hJ}}}}(e),s=t.getOptions(),a=null==(i=null==(r=t.getSdkMetadata)?void 0:r.call(t))?void 0:i.sdk;return{chunk_id:eQ(),client_sdk:{name:(null==a?void 0:a.name)??"sentry.javascript.browser",version:(null==a?void 0:a.version)??"0.0.0"},profiler_id:n||eQ(),platform:"javascript",version:"2",release:s.release??"",environment:s.environment??"production",debug_meta:{images:h2(e.resources)},profile:o}}(t,this._client,this._profilerId),r=function(e){try{if(!e||"object"!=typeof e)return{reason:"chunk is not an object"};let t=e=>"string"==typeof e&&/^[a-f0-9]{32}$/.test(e);if(!t(e.profiler_id))return{reason:"missing or invalid profiler_id"};if(!t(e.chunk_id))return{reason:"missing or invalid chunk_id"};if(!e.client_sdk)return{reason:"missing client_sdk metadata"};let n=e.profile;return n?Array.isArray(n.frames)&&n.frames.length?Array.isArray(n.stacks)&&n.stacks.length?Array.isArray(n.samples)&&n.samples.length?{valid:!0}:{reason:"profile has no samples"}:{reason:"profile has no stacks"}:{reason:"profile has no frames"}:{reason:"missing profile data"}}catch(e){return{reason:`unknown validation error: ${e}`}}}(n);if("reason"in r){u7&&et.log("[Profiling] Discarding invalid profile chunk (this is probably a bug in the SDK):",r.reason);return}this._sendProfileChunk(n),u7&&et.log("[Profiling] Collected browser profile chunk.")}catch(e){u7&&et.log("[Profiling] Error while stopping JS Profiler for chunk:",e)}}_sendProfileChunk(e){var t;let n=this._client,r=nw(null==(t=n.getSdkMetadata)?void 0:t.call(n)),i=n.getDsn(),o=n.getOptions().tunnel,s=ny({event_id:eQ(),sent_at:new Date().toISOString(),...r&&{sdk:r},...!!o&&i&&{dsn:tU(i)}},[[{type:"profile_chunk",platform:"javascript"},e]]);n.sendEnvelope(s).then(null,e=>{u7&&et.error("Error while sending profile chunk envelope:",e)})}}let mt=()=>({name:"BrowserProfiling",setup(e){let t=e.getOptions(),n=new me;if(h8(t)||t.profileLifecycle||(t.profileLifecycle="manual"),h8(t)&&!t.profilesSampleRate){u7&&et.log("[Profiling] Profiling disabled, no profiling options foun
499d.");return}let r=nt(),i=r&&ne(r);if(h8(t)&&void 0!==t.profileSessionSampleRate&&u7&&et.warn("[Profiling] Both legacy profiling (`profilesSampleRate`) and UI profiling settings are defined. `profileSessionSampleRate` has no effect when legacy profiling is enabled."),h8(t))i&&h1(i)&&h6(i)&&h9(i),e.on("spanStart",e=>{e===ne(e)&&h6(e)&&h9(e)}),e.on("beforeEnvelope",e=>{var t,n,r,i,o,s;if(!h7.size)return;let a=function(e){let t=[];return n_(e,(e,n)=>{var r,i;if("transaction"===n)for(let n=1;n<e.length;n++){let o=e[n];null!=(i=null==(r=null==o?void 0:o.contexts)?void 0:r.profile)&&i.profile_id&&t.push(e[n])}}),t}(e);if(!a.length)return;let l=[];for(let e of a){let a=null==e?void 0:e.contexts,u=null==(t=null==a?void 0:a.profile)?void 0:t.profile_id,c=null==(n=null==a?void 0:a.profile)?void 0:n.start_timestamp;if("string"!=typeof u||!u){u7&&et.log("[Profiling] cannot find profile for a span without a profile context");continue}null!=a&&a.profile&&delete a.profile;let d=function(e){let t=h7.get(e);return t&&h7.delete(e),t}(u);if(!d){u7&&et.log(`[Profiling] Could not retrieve profile for span: ${u}`);continue}let p=(r=u,i=c,o=d,s=e,(o.samples.length<2?(u7&&et.log("[Profiling] Discarding profile because it contains less than 2 samples"),1):!o.frames.length&&(u7&&et.log("[Profiling] Discarding profile because it contains no frames"),1))?null:function(e,t,n,r){if("transaction"!==r.type)throw TypeError("Profiling events may only be attached to transactions, this should never occur.");if(null==n)throw TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);let i=function(e){var t,n;let r=null==(n=null==(t=e.contexts)?void 0:t.trace)?void 0:n.trace_id;return"string"==typeof r&&32!==r.length&&u7&&et.log(`[Profiling] Invalid traceId: ${r} on profiled event`),"string"!=typeof r?"":r}(r),o="thread_metadata"in n?n:function(e){let t,n=0,r={samples:[],stacks:[],frames:[],thread_metadata:{[hW]:{name:hJ}}},i=e.samples[0];if(!i)return r;let o=i.timestamp,s=e7(),a="number"==typeof performance.timeOrigin?performance.timeOrigin:s||0,l=a-(s||a);return e.samples.forEach((i,s)=>{if(void 0===i.stackId){void 0===t&&(t=n,r.stacks[t]=[],n++),r.samples[s]={elapsed_since_start_ns:((i.timestamp+l-o)*1e6).toFixed(0),stack_id:t,thread_id:hW};return}let a=e.stacks[i.stackId],u=[];for(;a;){u.push(a.frameId);let t=e.frames[a.frameId];t&&void 0===r.frames[a.frameId]&&(r.frames[a.frameId]={function:t.name,abs_path:"number"==typeof t.resourceId?e.resources[t.resourceId]:void 0,lineno:t.line,colno:t.column}),a=void 0===a.parentId?void 0:e.stacks[a.parentId]}let c={elapsed_since_start_ns:((i.timestamp+l-o)*1e6).toFixed(0),stack_id:n,thread_id:hW};r.stacks[n]=u,r.samples[s]=c,n++}),r}(n),s=t||("number"==typeof r.start_timestamp?1e3*r.start_timestamp:1e3*e6()),a="number"==typeof r.timestamp?1e3*r.timestamp:1e3*e6();return{event_id:e,timestamp:new Date(s).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||nu,runtime:{name:"javascript",version:lh.navigator.userAgent},os:{name:hG,version:hK,build_number:hX},device:{locale:hQ,model:hZ,manufacturer:hX,architecture:hY,is_emulator:!1},debug_meta:{images:h2(n.resources)},profile:o,transactions:[{name:r.transaction||"",id:r.event_id||eQ(),trace_id:i,active_thread_id:hW,relative_start_ns:"0",relative_end_ns:((a-s)*1e6).toFixed(0)}]}}(r,i,o,s));p&&l.push(p)}(function(e,t){if(t.length)for(let n of t)e[1].push([{type:"profile"},n])})(e,l)});else{let r=t.profileLifecycle;if(e.on("startUIProfiler",()=>n.start()),e.on("stopUIProfiler",()=>n.stop()),"manual"===r)n.initialize(e);else if("trace"===r){if(!ns(t)){u7&&et.warn("[Profiling] `profileLifecycle` is 'trace' but tracing is disabled. Set a `tracesSampleRate` or `tracesSampler` to enable span tracing.");return}n.initialize(e),i&&n.notifyRootSpanActive(i),lh.setTimeout(()=>{let e=nt(),t=e&&ne(e);t&&n.notifyRootSpanActive(t)},0)}}},processEvent:e=>{var t,n,r,i,o;return null!=(t=null==e?void 0:e.contexts)&&t.profile&&e.contexts&&(e.contexts.trace={...(null==(n=e.contexts)?void 0:n.trace)??{},data:{...(null==(i=null==(r=e.contexts)?void 0:r.trace)?void 0:i.data)??{},"thread.id":hW,"thread.name":hJ}}
499,null==(o=e.spans)||o.forEach(e=>{e.data={...e.data||{},"thread.id":hW,"thread.name":hJ}})),e}}),mn=()=>({name:"LaunchDarkly",processEvent:(e,t,n)=>iQ(e)});function mr(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(e,t,n)=>{i0(e,t.value),i1(e,t.value)}}}let mi=()=>({name:"OpenFeature",processEvent:(e,t,n)=>iQ(e)});class mo{after(e,t){i0(t.flagKey,t.value),i1(t.flagKey,t.value)}error(e,t,n){i0(e.flagKey,e.defaultValue),i1(e.flagKey,e.defaultValue)}}let ms=({featureFlagClientClass:e})=>({name:"Unleash",setupOnce(){eF(e.prototype,"isEnabled",ma)},processEvent:(e,t,n)=>iQ(e)});function ma(e){return function(...t){let n=t[0],r=e.apply(this,t);return"string"==typeof n&&"boolean"==typeof r?(i0(n,r),i1(n,r)):u7&&et.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}let ml=({growthbookClass:e})=>i3({growthbookClass:e}),mu=({featureFlagClient:e})=>({name:"Statsig",setup(t){e.on("gate_evaluation",e=>{i0(e.gate.name,e.gate.value),i1(e.gate.name,e.gate.value)})}
499,processEvent:(e,t,n)=>iQ(e)});async function mc(){let e=tg();if(!e)return"no-client-active";if(!e.getDsn())return"no-dsn-configured";let t=e.getOptions().tunnel||"https://o447951.ingest.sentry.io/api/4509632503087104/envelope/?sentry_version=7&sentry_key=c1dfb07d783ad5325c245c1fd3725390&sentry_client=sentry.javascript.browser%2F1.33.7";try{await n$(()=>fetch(t,{body:"{}",method:"POST",mode:"cors",credentials:"omit"}))}catch{return"sentry-unreachable"}}let md=({worker:e})=>({name:"WebWorker",setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(e=>mp(e))},addWorker:e=>mp(e)});function mp(e){e.addEventListener("message",e=>{if(function(e){if(!eM(e)||!0!==e._sentryMessage)return!1;let t="_sentryDebugIds"in e,n="_sentryModuleMetadata"in e,r="_sentryWorkerError"in e,i="_sentryWasmImages"in e;return!(!t&&!n&&!r&&!i||t&&!(eM(e._sentryDebugIds)||void 0===e._sentryDebugIds)||n&&!(eM(e._sentryModuleMetadata)||void 0===e._sentryModuleMetadata)||r&&!eM(e._sentryWorkerError)||i&&(!Array.isArray(e._sentryWasmImages)||!e._sentryWasmImages.every(e=>eM(e)&&"string"==typeof e.code_file)))}(e.data)){if(e.stopImmediatePropagation(),e.data._sentryDebugIds&&(u7&&et.log("Sentry debugId web worker message received",e.data),lh._sentryDebugIds={...e.data._sentryDebugIds,...lh._sentryDebugIds}),e.data._sentryModuleMetadata&&(u7&&et.log("Sentry module metadata web worker message received",e.data),lh._sentryModuleMetadata={...e.data._sentryModuleMetadata,...lh._sentryModuleMetadata}),e.data._sentryWasmImages){u7&&et.log("Sentry WASM images web worker message received",e.data);let t=lh._sentryWasmImages||[],n=e.data._sentryWasmImages.filter(e=>eM(e)&&"string"==typeof e.code_file&&!t.some(t=>t.code_file===e.code_file));lh._sentryWasmImages=[...t,...n]}e.data._sentryWorkerError&&(u7&&et.log("Sentry worker rejection message received",e.data._sentryWorkerError),function(e){let t=tg();if(!t)return;let n=t.getOptions().stackParser,r=t.getOptions().attachStacktrace,i=e.reason,o=eI(i)?cM(i):lM(n,i,void 0,r,!0);o.level="error",e.filename&&(o.contexts={...o.contexts,worker:{filename:e.filename}}),n5(o,{originalException:i,mechanism:{handled:!1,type:"auto.browser.web_worker.onunhandledrejection"}}),u7&&et.log("Captured worker unhandled rejection",i)}(e.data._sentryWorkerError))}})}function mf({self:e}){e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0,_sentryModuleMetadata:e._sentryModuleMetadata??void 0}),e.addEventListener("unhandledrejection",t=>{var n;let r={reason:cI(t),filename:null==(n=e.location)?void 0:n.href};e.postMessage({_sentryMessage:!0,_sentryWorkerError:r}),u7&&et.log("[Sentry Worker] Forwarding unhandled rejection to parent",r)}),u7&&et.log("[Sentry Worker] Registered worker with unhandled rejection handling")}}}]);
500//# sourceMappingURL=56bf262f.5dd36bcd0bff1f91.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.