PageSourceSearch

https://app.pollbolt.com/static/js/sentry.41886d3b.chunk.js

js pollbolt.com collected 2026-09-25 21:04:59 UTC 520,468 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[326],{22514:(t,e,n)=>{n.r(e),n.d(e,{BrowserClient:()=>Up,ErrorBoundary:()=>Hw,MULTIPLEXED_TRANSPORT_EXTRA_KEY:()=>bs,OpenFeatureIntegrationHook:()=>ow,Profiler:()=>jw,SDK_VERSION:()=>c,SEMANTIC_ATTRIBUTE_SENTRY_OP:()=>Fr,SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN:()=>jr,SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE:()=>Lr,SEMANTIC_ATTRIBUTE_SENTRY_SOURCE:()=>Nr,Scope:()=>Pt,WINDOW:()=>Gi,addBreadcrumb:()=>As,addEventProcessor:()=>Wi,addIntegration:()=>se,breadcrumbsIntegration:()=>Xf,browserApiErrorsIntegration:()=>Qf,browserProfilingIntegration:()=>Zk,browserSessionIntegration:()=>rh,browserTracingIntegration:()=>ZS,buildLaunchDarklyFlagUsedHandler:()=>nw,captureConsoleIntegration:()=>Ns,captureEvent:()=>Ci,captureException:()=>Ti,captureFeedback:()=>Zt,captureMessage:()=>Ii,captureReactException:()=>yw,captureSession:()=>Ji,chromeStackLineParser:()=>sf,close:()=>Bi,consoleLoggingIntegration:()=>ea,contextLinesIntegration:()=>Hh,continueTrace:()=>Sa,createConsolaReporter:()=>La,createLangChainCallbackHandler:()=>ml,createReduxEnhancer:()=>Yw,createTransport:()=>Al,createUserFeedbackEnvelope:()=>_f,cultureContextIntegration:()=>ch,dedupeIntegration:()=>xl,defaultRequestInstrumentationOptions:()=>fS,defaultStackLineParsers:()=>gf,defaultStackParser:()=>vf,diagnoseSdkConnectivity:()=>dw,elementTimingIntegration:()=>ak,endSession:()=>Hi,eventFiltersIntegration:()=>Ml,eventFromException:()=>Lp,eventFromMessage:()=>Dp,exceptionFromError:()=>Tp,extraErrorDataIntegration:()=>Ll,featureFlagsIntegration:()=>zl,feedbackAsyncIntegration:()=>ns,feedbackIntegration:()=>rs,feedbackSyncIntegration:()=>rs,fetchStreamPerformanceIntegration:()=>HS,flush:()=>ji,forceLoad:()=>Ih,functionToStringIntegration:()=>Jl,geckoStackLineParser:()=>lf,getActiveSpan:()=>di,getClient:()=>$t,getCurrentScope:()=>Vt,getDefaultIntegrations:()=>Eh,getFeedback:()=>Xe,getGlobalScope:()=>Gt,getIsolationScope:()=>Jt,getReplay:()=>yb,getRootSpan:()=>li,getSpanDescendants:()=>ci,getSpanStatusFromHttpCode:()=>Io,getTraceData:()=>Gl,globalHandlersIntegration:()=>uh,graphqlClientIntegration:()=>nm,growthbookIntegration:()=>lw,httpClientIntegration:()=>Dh,httpContextIntegration:()=>gh,inboundFiltersIntegration:()=>Ol,init:()=>gw,instrumentAnthropicAiClient:()=>pu,instrumentCreateReactAgent:()=>bu,instrumentGoogleGenAIClient:()=>Ou,instrumentLangChainEmbeddings:()=>Nu,instrumentLangGraph:()=>Su,instrumentOpenAiClient:()=>Gu,instrumentOutgoingRequests:()=>hS,instrumentSupabaseClient:()=>id,isBotUserAgent:()=>$S,isEnabled:()=>qi,isInitialized:()=>Ui,lastEventId:()=>Fi,launchDarklyIntegration:()=>ew,lazyLoadIntegration:()=>es,linkedErrorsIntegration:()=>kh,logger:()=>r,makeBrowserOfflineTransport:()=>bk,makeFetchTransport:()=>Xp,makeMultiplexedTransport:()=>ks,metrics:()=>o,moduleMetadataIntegration:()=>Pd,normalizeStringifyValue:()=>Ah,onLoad:()=>Ch,openFeatureIntegration:()=>rw,opera10StackLineParser:()=>ff,opera11StackLineParser:()=>mf,parameterize:()=>ad,reactErrorHandler:()=>_w,reactRouterV3BrowserTracingIntegration:()=>$w,reactRouterV4BrowserTracingIntegration:()=>tA,reactRouterV5BrowserTracingIntegration:()=>eA,reactRouterV6BrowserTracingIntegration:()=>_x,reactRouterV7BrowserTracingIntegration:()=>Ax,registerSpanErrorInstrumentation:()=>qd,registerWebWorker:()=>hw,replayCanvasIntegration:()=>Zb,replayIntegration:()=>mb,reportPageLoaded:()=>ck,reportingObserverIntegration:()=>Ph,rewriteFramesIntegration:()=>Gd,sendFeedback:()=>Be,setActiveSpanInBrowser:()=>lk,setContext:()=>Ri,setConversationId:()=>Di,setCurrentClient:()=>Kd,setExtra:()=>Oi,setExtras:()=>Mi,setHttpStatus:()=>Co,setMeasurement:()=>pa,setTag:()=>Ni,setTags:()=>Pi,setUser:()=>Li,showReportDialog:()=>Rh,spanStreamingIntegration:()=>pk,spanToBaggageHeader:()=>_i,spanToJSON:()=>$o,spanToTraceHeader:()=>Vo,spotlightBrowserIntegration:()=>tw,startBrowserTracingNavigationSpan:()=>tk,startBrowserTracingPageLoadSpan:()=>QS,startInactiveSpan:()=>ba,startNewTrace:()=>Aa,startSession:()=>zi,startSpan:()=>ya,startSpanManual:()=>_a,statsigIntegration:()=>uw,supabaseIntegration:()=>sd,suppressTracing:()=>wa,tanstackRouterBrowserTracingIntegration:()=>Zw,thirdPartyErrorFilterIntegration:()=>Yd,uiProfiler:()=>Qp,unleashIntegration:()=>iw,updateSpanName:()=>fi,useProfiler:()=>Uw,viewHierarchyIntegration:()=>rm,webWorkerIntegration:()=>pw,winjsStackLineParser:()=>df,withActiveSpan:()=>ka,withErrorBoundary:()=>Vw,withIsolationScope:()=>Yt,withProfiler:()=>Bw,withScope:()=>Kt,withSentryReactRouterV6Routing:()=>wx,withSentryReactRouterV7Routing:()=>xx,withSentryRouting:()=>
1oA,withStreamedSpan:()=>la,wrapCreateBrowserRouterV6:()=>Sx,wrapCreateBrowserRouterV7:()=>Ex,wrapCreateMemoryRouterV6:()=>kx,wrapCreateMemoryRouterV7:()=>Tx,wrapUseRoutesV6:()=>bx,wrapUseRoutesV7:()=>Ix,zodErrorsIntegration:()=>np});var r={};n.r(r),n.d(r,{debug:()=>dd,error:()=>hd,fatal:()=>md,fmt:()=>cd,info:()=>pd,trace:()=>ud,warn:()=>fd});var o={};n.r(o),n.d(o,{count:()=>xd,distribution:()=>Td,gauge:()=>Ed});var i=n(80045),s=n(89379);const a=globalThis,c="10.55.0";function l(){return u(a),a}function u(t){const e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||c,e[c]=e[c]||{}}function d(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a;const r=n.__SENTRY__=n.__SENTRY__||{},o=r[c]=r[c]||{};return o[t]||(o[t]=e())}const p="undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,f=["debug","info","warn","error","log","assert","trace"],h={};function m(t){if(!("console"in a))return t();const e=a.console,n={},r=Object.keys(h);r.forEach((t=>{const r=h[t];n[t]=e[t],e[t]=r}));try{return t()}finally{r.forEach((t=>{e[t]=n[t]}))}}function g(){return y().enabled}function v(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];p&&g()&&m((()=>{a.console[t]("".concat("Sentry Logger ","[").concat(t,"]:"),...n)}))}function y(){return p?d("loggerSettings",(()=>({enabled:!1}))):{enabled:!1}}const _={enable:function(){y().enabled=!0},disable:function(){y().enabled=!1},isEnabled:g,log:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];v("log",...e)},warn:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];v("warn",...e)},error:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];v("error",...e)}},b=Object.prototype.toString;function S(t){switch(b.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return M(t,Error)}}function k(t,e){return b.call(t)==="[object ".concat(e,"]")}function w(t){return k(t,"ErrorEvent")}function A(t){return k(t,"DOMError")}function x(t){return k(t,"String")}function E(t){return"object"===typeof t&&null!==t&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function T(t){return null===t||E(t)||"object"!==typeof t&&"function"!==typeof t}function I(t){return k(t,"Object")}function C(t){return"undefined"!==typeof Event&&M(t,Event)}function R(t){return Boolean((null===t||void 0===t?void 0:t.then)&&"function"===typeof t.then)}function M(t,e){try{return t instanceof e}catch(n){return!1}}function O(t){return"undefined"!==typeof Request&&M(t,Request)}function P(t,e,n){if(!(e in t))return;const r=t[e];if("function"!==typeof r)return;const o=n(r);"function"===typeof o&&L(o,r);try{t[e]=o}catch(i){p&&_.log('Failed to replace method "'.concat(e,'" in object'),t)}}function N(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch(r){p&&_.log('Failed to add non-enumerable property "'.concat(String(e),'" to object'),t)}}function L(t,e){try{const n=e.prototype||{};t.prototype=e.prototype=n,N(t,"__sentry_original__",e)}catch(n){}}function D(t){return t.__sentry_original__}function F(t){if(S(t))return(0,s.A)({message:t.message,name:t.name,stack:t.stack},j(t));if(C(t)){const{type:e,target:n,currentTarget:r,detail:o}=t;return(0,s.A)((0,s.A)({type:e,target:n,currentTarget:r},o?{detail:o}:{}),j(t))}return t}function j(t){return"object"===typeof t&&null!==t?Object.fromEntries(Object.entries(t)):{}}let B;function U(t){if(void 0!==B)return B?B(t):t();const e=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=a;return e in n&&"function"===typeof n[e]?(B=n[e],B(t)):(B=null,t())}function q(){return U((()=>Math.random()))}function W(){return U((()=>Date.now()))}const z=Symbol.for("sentry.skipNormalization"),H=Symbol.for("sentry.overrideNormalizationDepth");const V=50,J="?",G=/\(error: (.*)\)/,K=/captureMessage|captureException/;function Y(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];const r=e.sort(((t,e)=>t[0]-e[0])).map((t=>t[1]));return function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const o=[],i=t.split("\n");for(let s=e;s<i.length;s++){let t=i[s];t.length>1024&&(t=t.slice(0,1024));const e=G.test(t)?t.replace(G,"$1"):t;if(!e.includes("Error: ")){for(const t of r){const n=t(e);if(n){o.push(n);break}}if(o.length>=V+n)break}}return function(t){if(!t.length)return[];const e=Array.from(t);/sentryWrapped/.test($(e).function||"")&&e.pop();e.reverse(),K.test($(e).function||"")&&(e.pop(),K.test($(e).function||"")&&e.pop());return e.slice(0,V).map((t=>(0,s.A)((0,s.A)({},t),{},{filename:t.filename||$(e).filename,function:t.function||J})))}(o.slice(n))}}function $(t){return t[t.length-1]||{}}const X="<anonymous>";function Z(t){try{return t&&"function"===typeof t&&t.name||X}catch(e){return X}}function Q(t){const e=t.exception;if(e){const t=[];
1try{return e.values.forEach((e=>{e.stacktrace.frames&&t.push(...e.stacktrace.frames)})),t}catch(n){return}}}function tt(t){var e;let n=null!==t&&void 0!==t&&t.startsWith("file://")?t.slice(7):t;return null!==(e=n)&&void 0!==e&&e.match(/\/[A-Z]:/)&&(n=n.slice(1)),n}let et,nt;function rt(t){et=t}function ot(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0;try{return st("",t,e,n)}catch(r){return{ERROR:"**non-serializable** (".concat(r,")")}}}function it(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:102400;const r=ot(t,e);return o=r,function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(o))>n?it(t,e-1,n):r;var o}function st(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1/0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){const t=new WeakSet;function e(e){return!!t.has(e)||(t.add(e),!1)}function n(e){t.delete(e)}return[e,n]}();const[i,s]=o;if(null==e||["boolean","string"].includes(typeof e)||"number"===typeof e&&Number.isFinite(e))return e;const a=at(t,e);if(!a.startsWith("[object "))return a;if(function(t){return Boolean(t[z])}(e))return e;const c=function(t){const e=t[H];return"number"===typeof e?e:void 0}(e),l=void 0!==c?c:n;
1if(0===l)return a.replace("object ","");if(i(e))return"[Circular ~]";const u=e;if(u&&"function"===typeof u.toJSON)try{return st("",u.toJSON(),l-1,r,o)}catch(h){}const d=Array.isArray(e)?[]:{};let p=0;const f=F(e);for(const m in f){if(!Object.prototype.hasOwnProperty.call(f,m))continue;if(p>=r){d[m]="[MaxProperties ~]";break}const t=f[m];d[m]=st(m,t,l-1,r,o),p++}return s(e),d}function at(t,e){try{if(et){const t=et(e);if(t)return t}if("undefined"!==typeof global&&e===global)return"[Global]";if("number"===typeof e&&!Number.isFinite(e))return"[".concat(e,"]");if("function"===typeof e)return"[Function: ".concat(Z(e),"]");if("symbol"===typeof e)return"[".concat(String(e),"]");if("bigint"===typeof e)return"[BigInt: ".concat(String(e),"]");const t=function(t){const e=Object.getPrototypeOf(t);return null!==e&&void 0!==e&&e.constructor?e.constructor.name:"null prototype"}(e);return"[object ".concat(t,"]")}catch(n){return"**non-serializable** (".concat(n,")")}}function ct(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"string"!==typeof t||0===e||t.length<=e?t:"".concat(t.slice(0,e),"...")}function lt(t,e){let n=t;const r=n.length;if(r<=150)return n;e>r&&(e=r);let o=Math.max(e-60,0);o<5&&(o=0);let i=Math.min(o+140,r);return i>r-5&&(i=r),i===r&&(o=Math.max(i-140,0)),n=n.slice(o,i),o>0&&(n="'{snip} ".concat(n)),i<r&&(n+=" {snip}"),n}function ut(t,e){if(!Array.isArray(t))return"";const n=[];for(let r=0;r<t.length;r++){const e=t[r];T(e)?n.push(String(e)):e instanceof Error?n.push(e.message?"".concat(e.name,": ").concat(e.message):e.name):n.push(at(0,e))}return n.join(e)}function dt(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!!x(t)&&(k(e,"RegExp")?e.test(t):x(e)?n?t===e:t.includes(e):"function"===typeof e&&e(t))}function pt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(const r of e)if(dt(t,r,n))return!0;return!1}function ft(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){const t=a;return t.crypto||t.msCrypto}();try{if(null!==t&&void 0!==t&&t.randomUUID)return U((()=>t.randomUUID())).replace(/-/g,"")}catch(e){}return nt||(nt="10000000100040008000100000000000"),nt.replace(/[018]/g,(t=>(t^(16*q()&15)>>t/4).toString(16)))}function ht(t){var e;return null===(e=t.exception)||void 0===e||null===(e=e.values)||void 0===e?void 0:e[0]}function mt(t){const{message:e,event_id:n}=t;if(e)return e;const r=ht(t);return r?r.type&&r.value?"".concat(r.type,": ").concat(r.value):r.type||r.value||n||"<unknown>":n||"<unknown>"}function gt(t,e,n){const r=t.exception=t.exception||{},o=r.values=r.values||[],i=o[0]=o[0]||{};i.value||(i.value=e||""),i.type||(i.type=n||"Error")}function vt(t,e){const n=ht(t);if(!n)return;const r=n.mechanism;if(n.mechanism=(0,s.A)((0,s.A)((0,s.A)({},{type:"generic",handled:!0}),r),e),e&&"data"in e){const t=(0,s.A)((0,s.A)({},null===r||void 0===r?void 0:r.data),e.data);n.mechanism.data=t}}function yt(t){if(function(t){try{return t.__sentry_captured__}catch(e){}}(t))return!0;try{N(t,"__sentry_captured__",!0)}catch(e){}return!1}const _t=1e3;function bt(){return W()/_t}let St;function kt(){var t;return(null!==(t=St)&&void 0!==t?t:St=function(){const{performance:t}=a;if(null===t||void 0===t||!t.now||!t.timeOrigin)return bt;const e=t.timeOrigin;return()=>(e+U((()=>t.now())))/_t}())()}let wt=null;function At(){return null===wt&&(wt=function(){var t;const{performance:e}=a;if(null===e||void 0===e||!e.now)return;const n=3e5,r=U((()=>e.now())),o=W(),i=e.timeOrigin;if("number"===typeof i&&Math.abs(i+r-o)<n)return i;const s=null===(t=e.timing)||void 0===t?void 0:t.navigationStart;if("number"===typeof s&&Math.abs(s+r-o)<n)return s;return o-r}()),wt}function xt(t){const e=kt(),n={sid:ft(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return{sid:"".concat(t.sid),init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"===typeof t.did||"string"===typeof t.did?"".concat(t.did):void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}}}(n)};return t&&Et(n,t),n}function Et(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),t.did||e.did||(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||kt(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=32===e.sid.length?e.sid:ft()),void 0!==e.init&&(t.init=e.init),!t.did&&e.did&&(t.did="".concat(e.did)),"number"===typeof e.started&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if("number"===typeof e.duration)t.duration=e.duration;else{const e=t.timestamp-t.started;t.duration=e>=0?e:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),"number"===typeof e.errors&&(t.errors=e.errors),e.status&&(t.status=e.status)}function Tt(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;if(!e||"object"!==typeof e||n<=0)return e;if(t&&0===Object.keys(e).length)return t;const r=(0,s.A)({},t);for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=Tt(r[o],e[o],n-1));return r}function It(){return ft()}function Ct(){return ft().substring(16)}const Rt="_sentrySpan";function Mt(t,e){e?N(t,Rt,e):delete t[Rt]}function Ot(t){return t[Rt]}class Pt{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:It(),sampleRand:q()}}clone(){const t=new Pt;return t._breadcrumbs=[...this._breadcrumbs],t._tags=(0,s.A)({},this._tags),t._attributes=(0,s.A)({},this._attributes),t._extra=(0,s.A)({},this._extra),t._contexts=(0,s.A)({},this._contexts),this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata=(0,s.A)({},this._sdkProcessingMetadata),t._propagationContext=(0,s.A)({},this._propagationContext),t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,Mt(t,Ot(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Et(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(t){return this._conversationId=t||void 0,this._notifyScopeListeners(),this}setTags(t){return this._tags=(0,s.A)((0,s.A)({},this._tags),t),this._notifyScopeListeners(),this}setTag(t,e){return this.setTags({[t]:e})}setAttributes(t){return this._attributes=(0,s.A)((0,s.A)({},this._attributes),t),this._notifyScopeListeners(),this}setAttribute(t,e){return this.setAttributes({[t]:e})}removeAttribute(t){return t in this._attributes&&(delete this._attributes[t],this._notifyScopeListeners()),this}setExtras(t){return this._extra=(0,s.A)((0,s.A)({},this._extra),t),this._notifyScopeListeners(),this}setExtra(t,e){return this._extra=(0,s.A)((0,s.A)({},this._extra),{},{[t]:e}),this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,e){return null===e?delete this._contexts[t]:this._contexts[t]=e,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const e="function"===typeof t?t(this):t,n=e instanceof Pt?e.getScopeData():I(e)?t:void 0,{tags:r,attributes:o,extra:i,user:a,contexts:c,level:l,fingerprint:u=[],propagationContext:d,conversationId:p}=n||{};return this._tags=(0,s.A)((0,s.A)({},this._tags),r),this._attributes=(0,s.A)((0,s.A)({},this._attributes),o),this._extra=(0,s.A)((0,s.A)({},this._extra),i),this._contexts=(0,s.A)((0,s.A)({},this._contexts),c),a&&Object.keys(a).length&&(this._user=a),l&&(this._level=l),u.length&&(this._fingerprint=u),d&&(this._propagationContext=d),p&&(this._conversationId=p),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,Mt(this,void 0),this._attachments=[],this.setPropagationContext({traceId:It(),sampleRand:q()}),this._notifyScopeListeners(),this}addBreadcrumb(t,e){const n="number"===typeof e?e:100;if(n<=0)return this;const r=(0,s.A)((0,s.A)({timestamp:bt()},t),{},{message:t.message?ct(t.message,2048):t.message});var o;(this._breadcrumbs.push(r),this._breadcrumbs.length>n)&&(this._breadcrumbs=this._breadcrumbs.slice(-n),null===(o=this._client)||void 0===o||o.recordDroppedEvent("buffer_overflow","log_item"));return this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,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:Ot(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Tt(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,e){const n=(null===e||void 0===e?void 0:e.event_id)||ft();if(!this._client)return p&&_.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(t,(0,s.A)((0,s.A)({originalException:t,syntheticException:r},e),{},{event_id:n}),this),n}captureMessage(t,e,n){var r;const o=(null===n||void 0===n?void 0:n.event_id)||ft();if(!this._client)return p&&_.warn("No client configured on scope - will not capture message!"),o;const i=null!==(r=null===n||void 0===n?void 0:n.syntheticException)&&void 0!==r?r:new Error(t);return this._client.captureMessage(t,e,(0,s.A)((0,s.A)({originalException:t,syntheticException:i},n),{},{event_id:o}),this),o}
1captureEvent(t,e){const n=t.event_id||(null===e||void 0===e?void 0:e.event_id)||ft();return this._client?(this._client.captureEvent(t,(0,s.A)((0,s.A)({},e),{},{event_id:n}),this),n):(p&&_.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((t=>{t(this)})),this._notifyingListeners=!1)}}const Nt=t=>t instanceof Promise&&!t[Lt],Lt=Symbol("chained PromiseLike"),Dt=(t,e,n)=>{const r=t.then((t=>(e(t),t)),(t=>{throw n(t),t}));return Nt(r)&&Nt(t)?r:Ft(t,r)},Ft=(t,e)=>{if(!e)return t;let n=!1;for(const r in t){if(r in e)continue;n=!0;const o=t[r];"function"===typeof o?Object.defineProperty(e,r,{value:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return o.apply(t,n)},enumerable:!0,configurable:!0,writable:!0}):e[r]=o}return n&&Object.assign(e,{[Lt]:!0}),e};class jt{constructor(t,e){let n,r;n=t||new Pt,r=e||new Pt,this._stack=[{scope:n}],this._isolationScope=r}withScope(t){const e=this._pushScope();let n;try{n=t(e)}catch(qn){throw this._popScope(),qn}return R(n)?Dt(n,(()=>this._popScope()),(()=>this._popScope())):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function Bt(){const t=u(l());return t.stack=t.stack||new jt(d("defaultCurrentScope",(()=>new Pt)),d("defaultIsolationScope",(()=>new Pt)))}function Ut(t){return Bt().withScope(t)}
1function qt(t,e){const n=Bt();return n.withScope((()=>(n.getStackTop().scope=t,e(t))))}function Wt(t){return Bt().withScope((()=>t(Bt().getIsolationScope())))}function zt(t){const e=u(t);return e.acs?e.acs:{withIsolationScope:Wt,withScope:Ut,withSetScope:qt,withSetIsolationScope:(t,e)=>Wt(e),getCurrentScope:()=>Bt().getScope(),getIsolationScope:()=>Bt().getIsolationScope()}}let Ht;function Vt(){return zt(l()).getCurrentScope()}function Jt(){return zt(l()).getIsolationScope()}function Gt(){return d("globalScope",(()=>new Pt))}function Kt(){const t=zt(l());for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];if(2===n.length){const[e,r]=n;return e?t.withSetScope(e,r):t.withScope(r)}return t.withScope(n[0])}function Yt(){const t=zt(l());for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];if(2===n.length){const[e,r]=n;return e?t.withSetIsolationScope(e,r):t.withIsolationScope(r)}return t.withIsolationScope(n[0])}function $t(){return Vt().getClient()}function Xt(t){const e=function(){var t;return null===(t=Ht)||void 0===t?void 0:t()}();if(e)return{trace_id:e.traceId,span_id:e.spanId};const n=t.getPropagationContext(),{traceId:r,parentSpanId:o,propagationSpanId:i}=n,s={trace_id:r,span_id:i||Ct()};return o&&(s.parent_span_id=o),s}function Zt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Vt();const{message:r,name:o,email:i,url:s,source:a,associatedEventId:c,tags:l}=t,u={contexts:{feedback:{contact_email:i,name:o,message:r,url:s,source:a,associated_event_id:c}},type:"feedback",level:"info",tags:l},d=(null===n||void 0===n?void 0:n.getClient())||$t();d&&d.emit("beforeSendFeedback",u,e);return n.captureEvent(u,e)}const Qt=a;function te(){try{return Qt.document.location.href}catch(t){return""}}function ee(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if(!Qt.HTMLElement)return null;let n=t;for(let r=0;r<e;r++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null}const ne=[];function re(t){const e=t.defaultIntegrations||[],n=t.integrations;let r;if(e.forEach((t=>{t.isDefaultInstance=!0})),Array.isArray(n))r=[...e,...n];else if("function"===typeof n){const t=n(e);r=Array.isArray(t)?t:[t]}else r=e;return function(t){const e={};return t.forEach((t=>{const{name:n}=t,r=e[n];r&&!r.isDefaultInstance&&t.isDefaultInstance||(e[n]=t)})),Object.values(e)}(r)}function oe(t,e){for(const n of e)null!==n&&void 0!==n&&n.afterAllSetup&&n.afterAllSetup(t)}function ie(t,e,n){if(n[e.name])p&&_.log("Integration skipped because it was already installed: ".concat(e.name));else{if(n[e.name]=e,ne.includes(e.name)||"function"!==typeof e.setupOnce||(e.setupOnce(),ne.push(e.name)),e.setup&&"function"===typeof e.setup&&e.setup(t),"function"===typeof e.preprocessEvent){const n=e.preprocessEvent.bind(e);t.on("preprocessEvent",((e,r)=>n(e,r,t)))}if("function"===typeof e.processEvent){const n=e.processEvent.bind(e),r=Object.assign(((e,r)=>n(e,r,t)),{id:e.name});t.addEventProcessor(r)}["processSpan","processSegmentSpan"].forEach((n=>{const r=e[n];"function"===typeof r&&t.on(n,(n=>r.call(e,n,t)))})),p&&_.log("Integration installed: ".concat(e.name))}}function se(t){const e=$t();e?e.addIntegration(t):p&&_.warn('Cannot add integration "'.concat(t.name,'" because no SDK Client is available.'))}function ae(){return!("undefined"!==typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!==typeof process?process:0)}function ce(){return"undefined"!==typeof window&&(!ae()||function(){const t=a.process;return"renderer"===(null===t||void 0===t?void 0:t.type)}())}const le=["open","onFormSubmitted"],ue=a,de=ue.document,pe=ue.navigator,fe="Report a Bug",he="Cancel",me="Send Bug Report",ge="Confirm",ve="Report a Bug",ye="[email protected]",_e="Email",be="What's the bug? What did you expect?",Se="Description",ke="Your Name",we="Name",Ae="Thank y
1ou for your report!",xe="(required)",Ee="Add a screenshot",Te="Remove screenshot",Ie="Highlight",Ce="Hide",Re="Remove",Me="Unable to submit feedback with empty message",Oe="No client setup, cannot send feedback.",Pe="Unable to determine if Feedback was correctly sent.",Ne="Unable to send feedback. This could be because this domain is not in your list of allowed domains.",Le="Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.",De={ERROR_EMPTY_MESSAGE:Me,ERROR_NO_CLIENT:Oe,ERROR_TIMEOUT:Pe,ERROR_FORBIDDEN:Ne,ERROR_GENERIC:Le};function Fe(t,e){var n;return null!==(n=null===e||void 0===e?void 0:e[t])&&void 0!==n?n:De[t]}function je(t,e){return new Error(Fe(t,e))}const Be=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{includeReplay:!0};const n=e.errorMessages;if(!t.message)throw je("ERROR_EMPTY_MESSAGE",n);const r=$t();if(!r)throw je("ERROR_NO_CLIENT",n);t.tags&&Object.keys(t.tags).length&&Vt().setTags(t.tags);const o=Zt((0,s.A)({source:"api",url:te()},t),e);return new Promise(((t,e)=>{const i=setTimeout((()=>{s(),e(Fe("ERROR_TIMEOUT",n))}),3e4),s=r.on("afterSendEvent",((r,a)=>{if(r.event_id===o)return clearTimeout(i),s(),null!==a&&void 0!==a&&a.statusCode&&a.statusCode>=200&&a.statusCode<300?t(o):403===(null===a||void 0===a?void 0:a.statusCode)?e(Fe("ERROR_FORBIDDEN",n)):e(Fe("ERROR_GENERIC",n))}
1))}))},Ue="undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function qe(t,e){return(0,s.A)((0,s.A)((0,s.A)({},t),e),{},{tags:(0,s.A)((0,s.A)({},t.tags),e.tags),onFormOpen:()=>{var n,r;null===(n=e.onFormOpen)||void 0===n||n.call(e),null===(r=t.onFormOpen)||void 0===r||r.call(t)},onFormClose:()=>{var n,r;null===(n=e.onFormClose)||void 0===n||n.call(e),null===(r=t.onFormClose)||void 0===r||r.call(t)},onSubmitSuccess:(n,r)=>{var o,i;null===(o=e.onSubmitSuccess)||void 0===o||o.call(e,n,r),null===(i=t.onSubmitSuccess)||void 0===i||i.call(t,n,r)},onSubmitError:n=>{var r,o;null===(r=e.onSubmitError)||void 0===r||r.call(e,n),null===(o=t.onSubmitError)||void 0===o||o.call(t,n)},onFormSubmitted:()=>{var n,r;null===(n=e.onFormSubmitted)||void 0===n||n.call(e),null===(r=t.onFormSubmitted)||void 0===r||r.call(t)},themeDark:(0,s.A)((0,s.A)({},t.themeDark),e.themeDark),themeLight:(0,s.A)((0,s.A)({},t.themeLight),e.themeLight)})}function We(t,e){return Object.entries(e).forEach((e=>{let[n,r]=e;t.setAttributeNS(null,n,r)})),t}const ze=20;function He(t){let{triggerLabel:e,triggerAriaLabel:n,shadow:r,styleNonce:o}=t;const i=de.createElement("button");if(i.type="button",i.className="widget__actor",i.ariaHidden="false",i.ariaLabel=n||e||fe,i.appendChild(function(){const t=t=>ue.document.createElementNS("http://www.w3.org/2000/svg",t),e=We(t("svg"),{width:"".concat(ze),height:"".concat(ze),viewBox:"0 0 ".concat(ze," ").concat(ze),fill:"var(--actor-color, var(--foreground))"}),n=We(t("g"),{clipPath:"url(#clip0_57_80)"}),r=We(t("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z"});e.appendChild(n).appendChild(r);const o=t("defs"),i=We(t("clipPath"),{id:"clip0_57_80"}),s=We(t("rect"),{width:"".concat(ze),height:"".concat(ze),fill:"white"});return i.appendChild(s),o.appendChild(i),e.appendChild(o).appendChild(i).appendChild(s),e}()),e){const t=de.createElement("span");t.appendChild(de.createTextNode(e)),i.appendChild(t)}const s=function(t){const e=de.createElement("style");return e.textContent='\n.widget__actor {\n  position: fixed;\n  z-index: var(--z-index);\n  margin: var(--page-margin);\n  inset: var(--actor-inset);\n\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  padding: 16px;\n\n  font-family: inherit;\n  font-size: var(--font-size);\n  font-weight: 600;\n  line-height: 1.14em;\n  text-decoration: none;\n\n  background: var(--actor-background, var(--background));\n  border-radius: var(--actor-border-radius, 1.7em/50%);\n  border: var(--actor-border, var(--border));
1\n  box-shadow: var(--actor-box-shadow, var(--box-shadow));\n  color: var(--actor-color, var(--foreground));\n  fill: var(--actor-color, var(--foreground));\n  cursor: pointer;\n  opacity: 1;\n  transition: transform 0.2s ease-in-out;\n  transform: translate(0, 0) scale(1);\n}\n.widget__actor[aria-hidden="true"] {\n  opacity: 0;\n  pointer-events: none;\n  visibility: hidden;\n  transform: translate(0, 16px) scale(0.98);\n}\n\n.widget__actor:hover {\n  background: var(--actor-hover-background, var(--background));\n  filter: var(--interactive-filter);\n}\n\n.widget__actor svg {\n  width: 1.14em;\n  height: 1.14em;\n}\n\n@media (max-width: 600px) {\n  .widget__actor span {\n    display: none;\n  }\n}\n',t&&e.setAttribute("nonce",t),e}(o);return{el:i,appendToDom(){r.appendChild(s),r.appendChild(i)},removeFromDom(){i.remove(),s.remove()},show(){i.ariaHidden="false"},hide(){i.ariaHidden="true"}}}const Ve="rgba(88, 74, 192, 1)",Je={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:Ve,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%)"},Ge={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackground:Ve,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 Ke(t){return"\n  --foreground: ".concat(t.foreground,";\n  --background: ").concat(t.background,";\n  --accent-foreground: ").concat(t.accentForeground,";\n  --accent-background: ").concat(t.accentBackground,";\n  --success-color: ").concat(t.successColor,";\n  --error-color: ").concat(t.errorColor,";\n  --border: ").concat(t.border,";\n  --box-shadow: ").concat(t.boxShadow,";\n  --outline: ").concat(t.outline,";\n  --interactive-filter: ").concat(t.interactiveFilter,";\n  ")}function Ye(t){let{colorScheme:e,themeDark:n,themeLight:r,styleNonce:o}=t;const i=de.createElement("style");return i.textContent="\n:host {\n  --font-family: system-ui, 'Helvetica Neue', Arial, sans-serif;\n  --font-size: 14px;\n  --z-index: 100000;\n\n  --page-margin: 16px;\n  --inset: auto 0 0 auto;\n  --actor-inset: var(--inset);\n\n  font-family: var(--font-family);\n  font-size: var(--font-size);\n\n  ".concat("system"!==e?"color-scheme: only ".concat(e,";"):"","\n\n  ").concat(Ke("dark"===e?(0,s.A)((0,s.A)({},Ge),n):(0,s.A)((0,s.A)({},Je),r)),"\n}\n\n").concat("system"===e?"\n@media (prefers-color-scheme: dark) {\n  :host {\n    color-scheme: only dark;\n\n    ".concat(Ke((0,s.A)((0,s.A)({},Ge),n)),"\n  }\n}"):"","\n"),o&&i.setAttribute("nonce",o),i}const $e=t=>{let{lazyLoadIntegration:e,getModalIntegration:n,getScreenshotIntegration:r}=t;return function(){let{id:t="sentry-feedback",autoInject:o=!0,showBranding:i=!0,isEmailRequired:a=!1,isNameRequired:c=!1,showEmail:l=!0,showName:u=!0,enableScreenshot:d=!0,useSentryUser:p={email:"email",name:"username"},tags:f,styleNonce:h,scriptNonce:m,colorScheme:g="system",themeLight:v={},themeDark:y={},addScreenshotButtonLabel:b=Ee,cancelButtonLabel:S=he,confirmButtonLabel:k=ge,emailLabel:w=_e,emailPlaceholder:A=ye,formTitle:x=ve,isRequiredLabel:E=xe,messageLabel:T=Se,messagePlaceholder:I=be,nameLabel:C=we,namePlaceholder:R=ke,removeScreenshotButtonLabel:M=Te,submitButtonLabel:O=me,successMessageText:P=Ae,triggerLabel:N=fe,triggerAriaLabel:L="",highlightToolText:D=Ie,hideToolText:F=Ce,removeHighlightText:j=Re,errorEmptyMessageText:B=Me,errorNoClientText:U=Oe,errorTimeoutText:q=Pe,errorForbiddenText:W=Ne,errorGenericText:z=Le,onFormOpen:H,onFormClose:V,onSubmitSuccess:J,onSubmitError:G,onFormSubmitted:K}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const Y={id:t,autoInject:o,showBranding:i,isEmailRequired:a,isNameRequired:c,showEmail:l,showName:u,enableScreenshot:d,useSentryUser:p,tags:f,styleNonce:h,scriptNonce:m,colorScheme:g,themeDark:y,themeLight:v,triggerLabel:N,triggerAriaLabel:L,cancelButtonLabel:S,submitButtonLabel:O,confirmButtonLabel:k,formTitle:x,emailLabel:w,emailPlaceholder:A,messageLabel:T,messagePlaceholder:I,nameLabel:C,namePlaceholder:R,successMessageText:P,isRequiredLabel:E,addScreenshotButtonLabel:b,removeScreenshotButtonLabel:M,highlightToolText:D,hideToolText:F,removeHighlightText:j,errorEmptyMessageText:B,errorNoClientText:U,errorTimeoutText:q,errorForbiddenText:W,errorGenericText:z,onFormClose:V,onFormOpen:H,onSubmitError:G,onSubmitSuccess:J,onFormSubmitted:K};let $=null,X=null,Z=[];const Q=t=>{if(!$){const e=de.createElement("div");e.id=String(t.id),de.body.appendChild(e),$=e.attachShadow({mode:"open"}),X=Ye(t),$.appendChild(X)}return $},tt=async t=>{const o=t.enableScreenshot&&!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(pe.userAgent)&&!(/Macintosh/i.test(pe.userAgent)&&pe.maxTouchPoints&&pe.maxTouchPoints>1)&&!!isSecureContext;let i,a;try{i=(n?n():await e("feedbackModalIntegration",m))(),se(i)}catch(u){throw Ue&&_.error("[Feedback] Error when trying to load feedback integrations. Try using `feedbackSyncIntegration` in your `Sentry.init`."),new Error("[Feedback] Missing feedback modal integration!")}try{const t=o?r?r():await e("feedbackScreenshotIntegration",m):void 0;t&&(a=t(),se(a))}catch(d){Ue&&_.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.")}const c={ERROR_EMPTY_MESSAGE:t.errorEmptyMessageText,ERROR_NO_CLIENT:t.errorNoClientText,E
1RROR_TIMEOUT:t.errorTimeoutText,ERROR_FORBIDDEN:t.errorForbiddenText,ERROR_GENERIC:t.errorGenericText},l=i.createDialog({options:(0,s.A)((0,s.A)({},t),{},{onFormClose:()=>{var e;null===l||void 0===l||l.close(),null===(e=t.onFormClose)||void 0===e||e.call(t)},onFormSubmitted:()=>{var e;null===l||void 0===l||l.close(),null===(e=t.onFormSubmitted)||void 0===e||e.call(t)}}),screenshotIntegration:a,sendFeedback:(t,e)=>Be(t,(0,s.A)((0,s.A)({includeReplay:!0},e),{},{errorMessages:c})),shadow:Q(t)});return l},et=function(t){const e=qe(Y,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),n="string"===typeof t?de.querySelector(t):"function"===typeof t.addEventListener?t:null;if(!n)throw Ue&&_.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let r=null;const o=async()=>{r||(r=await tt((0,s.A)((0,s.A)({},e),{},{onFormSubmitted:()=>{var t,n;null===(t=r)||void 0===t||t.removeFromDom(),null===(n=e.onFormSubmitted)||void 0===n||n.call(e)}}))),r.appendToDom(),r.open()};n.addEventListener("click",o);const i=()=>{var t;Z=Z.filter((t=>t!==i)),null===(t=r)||void 0===t||t.removeFromDom(),r=null,n.removeEventListener("click",o)};return Z.push(i),i},nt=function(){const t=qe(Y,arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),e=Q(t),n=He({triggerLabel:t.triggerLabel,triggerAriaLabel:t.triggerAriaLabel,shadow:e,styleNonce:h});return et(n.el,(0,s.A)((0,s.A)({},t),{},{onFormOpen(){n.hide()},onFormClose(){n.show()},onFormSubmitted(){n.show()}})),n};return{name:"Feedback",setupOnce(){ce()&&Y.autoInject&&("loading"===de.readyState?de.addEventListener("DOMContentLoaded",(()=>nt().appendToDom())):nt().appendToDom())},attachTo:et,createWidget(){const t=nt(qe(Y,arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}));return t.appendToDom(),t},async createForm(){return tt(qe(Y,arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}))},setTheme(t){if(Y.colorScheme=t,$){const t=Ye(Y);X?$.replaceChild(t,X):$.prepend(t),X=t}},remove(){var t;$&&(null===(t=$.parentElement)||void 0===t||t.remove(),$=null,X=null);Z.forEach((t=>t())),Z=[]}}}};function Xe(){const t=$t();return null===t||void 0===t?void 0:t.getIntegrationByName("Feedback")}var Ze,Qe,tn,en,nn,rn,on,sn={},an=[],cn=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ln=Array.isArray;function un(t,e){for(var n in e)t[n]=e[n];return t}function dn(t){var e=t.parentNode;e&&e.removeChild(t)}function pn(t,e,n){var r,o,i,s={};for(i in e)"key"==i?r=e[i]:"ref"==i?o=e[i]:s[i]=e[i];if(arguments.length>2&&(s.children=arguments.length>3?Ze.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(i in t.defaultProps)void 0===s[i]&&(s[i]=t.defaultProps[i]);return fn(t,s,r,o,null)}function fn(t,e,n,r,o){var i={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==o?++tn:o,__i:-1,__u:0};return null==o&&null!=Qe.vnode&&Qe.vnode(i),i}function hn(t){return t.children}function mn(t,e){this.props=t,this.context=e}function gn(t,e){if(null==e)return t.__?gn(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?gn(t):null}function vn(t,e,n){var r,o=t.__v,i=o.__e,s=t.__P;if(s)return(r=un({},o)).__v=o.__v+1,Qe.vnode&&Qe.vnode(r),In(s,r,o,t.__n,void 0!==s.ownerSVGElement,32&o.__u?[i]:null,e,null==i?gn(o):i,!!(32&o.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=i&&yn(r),r}function yn(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return yn(t)}}function _n(t){(!t.__d&&(t.__d=!0)&&en.push(t)&&!bn.__r++||nn!==Qe.debounceRendering)&&((nn=Qe.debounceRendering)||rn)(bn)}function bn(){var t,e,n,r=[],o=[];for(en.sort(on);t=en.shift();)t.__d&&(n=en.length,e=vn(t,r,o)||e,0===n||en.length>n?(Cn(r,e,o),o.length=r.length=0,e=void 0,en.sort(on)):e&&Qe.__c&&Qe.__c(e,an));e&&Cn(r,e,o),bn.__r=0}function Sn(t,e,n,r,o,i,s,a,c,l,u){var d,p,f,h,m,g=r&&r.__k||an,v=e.length;for(n.__d=c,function(t,e,n){var r,o,i,s,a,c=e.length,l=n.length,u=l,d=0;for(t.__k=[],r=0;r<c;r++)null!=(o=t.__k[r]=null==(o=e[r])||"boolean"==typeof o||"function"==typeof o?null:"string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?fn(null,o,null,null,o):ln(o)?fn(hn,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?fn(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)?(o.__=t,o.__b=t.__b+1,a=wn(o,n,s=r+d,u),o.__i=a,i=null,-1!==a&&(u--,(i=n[a])&&(i.__u|=131072)),null==i||null===i.__v?(-1==a&&d--,"function"!=typeof o.type&&(o.__u|=65536)):a!==s&&(a===s+1?d++:a>s?u>
vendor: 6,184 bytes, line 1
1c-s?d+=a-s:d--:d=a<s&&a==s-1?a-s:0,a!==r+d&&(o.__u|=65536))):(i=n[r])&&null==i.key&&i.__e&&(i.__e==t.__d&&(t.__d=gn(i)),On(i,i,!1),n[r]=null,u--);if(u)for(r=0;r<l;r++)null!=(i=n[r])&&0==(131072&i.__u)&&(i.__e==t.__d&&(t.__d=gn(i)),On(i,i))}(n,e,g),c=n.__d,d=0;d<v;d++)null!=(f=n.__k[d])&&"boolean"!=typeof f&&"function"!=typeof f&&(p=-1===f.__i?sn:g[f.__i]||sn,f.__i=d,In(t,f,p,o,i,s,a,c,l,u),h=f.__e,f.ref&&p.ref!=f.ref&&(p.ref&&Mn(p.ref,null,f),u.push(f.ref,f.__c||h,f)),null==m&&null!=h&&(m=h),65536&f.__u||p.__k===f.__k?c=kn(f,c,t):"function"==typeof f.type&&void 0!==f.__d?c=f.__d:h&&(c=h.nextSibling),f.__d=void 0,f.__u&=-196609);n.__d=c,n.__e=m}function kn(t,e,n){var r,o;if("function"==typeof t.type){for(r=t.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=t,e=kn(r[o],e,n));return e}t.__e!=e&&(n.insertBefore(t.__e,e||null),e=t.__e);do{e=e&&e.nextSibling}while(null!=e&&8===e.nodeType);return e}function wn(t,e,n,r){var o=t.key,i=t.type,s=n-1,a=n+1,c=e[n];if(null===c||c&&o==c.key&&i===c.type)return n;if(r>(null!=c&&0==(131072&c.__u)?1:0))for(;s>=0||a<e.length;){if(s>=0){if((c=e[s])&&0==(131072&c.__u)&&o==c.key&&i===c.type)return s;s--}if(a<e.length){if((c=e[a])&&0==(131072&c.__u)&&o==c.key&&i===c.type)return a;a++}}return-1}function An(t,e,n){"-"===e[0]?t.setProperty(e,null==n?"":n):t[e]=null==n?"":"number"!=typeof n||cn.test(e)?n:n+"px"}function xn(t,e,n,r,o){var i;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof r&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||An(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||An(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])i=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=n,n?r?n.u=r.u:(n.u=Date.now(),t.addEventListener(e,i?Tn:En,i)):t.removeEventListener(e,i?Tn:En,i);else{if(o)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==e&&"height"!==e&&"href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&"rowSpan"!==e&&"colSpan"!==e&&"role"!==e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null==n||!1===n&&"-"!==e[4]?t.removeAttribute(e):t.setAttribute(e,n))}}function En(t){if(this.l){var e=this.l[t.type+!1];if(t.t){if(t.t<=e.u)return}else t.t=Date.now();return e(Qe.event?Qe.event(t):t)}}function Tn(t){if(this.l)return this.l[t.type+!0](Qe.event?Qe.event(t):t)}function In(t,e,n,r,o,i,s,a,c,l){var u,d,p,f,h,m,g,v,y,_,b,S,k,w,A,x=e.type;if(void 0!==e.constructor)return null;128&n.__u&&(c=!!(32&n.__u),i=[a=e.__e=n.__e]),(u=Qe.__b)&&u(e);t:if("function"==typeof x)try{if(v=e.props,y=(u=x.contextType)&&r[u.__c],_=u?y?y.props.value:u.__:r,n.__c?g=(d=e.__c=n.__c).__=d.__E:("prototype"in x&&x.prototype.render?e.__c=d=new x(v,_):(e.__c=d=new mn(v,_),d.constructor=x,d.render=Pn),y&&y.sub(d),d.props=v,d.state||(d.state={}),d.context=_,d.__n=r,p=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=x.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=un({},d.__s)),un(d.__s,x.getDerivedStateFromProps(v,d.__s))),f=d.props,h=d.state,d.__v=e,p)null==x.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==x.getDerivedStateFromProps&&v!==f&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(v,_),!d.__e&&(null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(v,d.__s,_)||e.__v===n.__v)){for(e.__v!==n.__v&&(d.props=v,d.state=d.__s,d.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.forEach((function(t){t&&(t.__=e)})),b=0;b<d._sb.length;b++)d.__h.push(d._sb[b]);d._sb=[],d.__h.length&&s.push(d);break t}null!=d.componentWillUpdate&&d.componentWillUpdate(v,d.__s,_),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(f,h,m)}))}if(d.context=_,d.props=v,d.__P=t,d.__e=!1,S=Qe.__r,k=0,"prototype"in x&&x.prototype.render){for(d.state=d.__s,d.__d=!1,S&&S(e),u=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(e),u=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=un(un({},r),d.getChildContext())),p||null==d.getSnapshotBeforeUpdate||(m=d.getSnapshotBeforeUpdate(f,h)),Sn(t,ln(A=null!=u&&u.type===hn&&null==u.key?u.props.children:u)?A:[A],e,n,r,o,i,s,a,c,l),d.base=e.__e,e.__u&=-161,d.__h.length&&s.push(d),g&&(d.__E=d.__=null)}catch(t){e.__v=null,c||null!=i?(e.__e=a,e.__u|=c?160:32,i[i.indexOf(a)]=null):(e.__e=n.__e,e.__k=n.__k),Qe.__e(t,e,n)}else null==i&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=Rn(n.__e,e,n,r,o,i,s,c,l);(u=Qe.diffed)&&u(e)}function Cn(t,e,n){for(var r=0;r<n.length;r++)Mn(n[r],n[++r],n[++r]);Qe.__c&&Qe.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){Qe.__e(t,e.__v)}}))}function Rn(t,e,n,r,o,i,s,a,c){var l,u,d,p,f,h,m,g=n.props,v=e.props,y=e.type;if("svg"===y&&(o=!0),null!=i)for(l=0;l<i.length;l++)if((f=i[l])&&"setAttribute"in f==!!y&&(y?f.localName===y:3===f.nodeType)){t=f,i[l]=null;break}if(null==t){if(null===y)return document.createTextNode(v);t=o?document.createElementNS("http://www.w3.org/2000/svg",y):document.createElement(y,v.is&&v),i=null,a=!1}if(null===y)g===v||a&&t.data===v||(t.data=v);else{if(i=i&&Ze.call(t.childNodes),g=n.props||sn,!a&&null!=i)for(g={},l=0;l<t.attributes.length;l++)g[(f=t.attributes[l]).name]=f.value;for(l in g)f=g[l],"children"==l||("dangerouslySetInnerHTML"==l?d=f:"key"===l||l in v||xn(t,l,null,f,o));for(l in v)f=v[l],"children"==l?p=f:"dangerouslySetInnerHTML"==l?u=f:"value"==l?h=f:"checked"==l?m=f:"key"===l||a&&"function"!=typeof f||g[l]===f||xn(t,l,f,g[l],o);if(u)a||d&&(u.__html===d.__html||u.__html===t.innerHTML)||(t.innerHTML=u.__html),e.__k=[];else if(d&&(t.innerHTML=""),Sn(t,ln(p)?p:[p],e,n,r,o&&"foreignObject"!==y,i,s,i?i[0]:n.__k&&gn(n,0),a,c),null!=i)for(l=i.length;l--;)null!=i[l]&&dn(i[l]);a||(l="value",void 0!==h&&(h!==t[l]||"progress"===y&&!h||"option"===y&&h!==g[l])&&xn(t,l,h,g[l],!1),l="checked",void 0!==m&&m!==t[l]&&xn(t,l,m,g[l],!1))}return t}function Mn(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){Qe.__e(t,n)}}function On(t,e,n){var r,o;
vendor: 1,101 bytes, line 1
1if(Qe.unmount&&Qe.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||Mn(r,null,e)),null!=(r=t.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(t){Qe.__e(t,e)}r.base=r.__P=null,t.__c=void 0}if(r=t.__k)for(o=0;o<r.length;o++)r[o]&&On(r[o],e,n||"function"!=typeof t.type);n||null==t.__e||dn(t.__e),t.__=t.__e=t.__d=void 0}function Pn(t,e,n){return this.constructor(t,n)}Ze=an.slice,Qe={__e:function(t,e,n,r){for(var o,i,s;e=e.__;)if((o=e.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(t)),s=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(t,r||{}),s=o.__d),s)return o.__E=o}catch(e){t=e}throw t}},tn=0,mn.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=un({},this.state),"function"==typeof t&&(t=t(un({},n),this.props)),t&&un(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),_n(this))},mn.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),_n(this))},mn.prototype.render=hn,en=[],rn="function"==typeof Promise?Promise.prototype.then.bind(Prom
1ise.resolve()):setTimeout,on=function(t,e){return t.__v.__b-e.__v.__b},bn.__r=0;var Nn,Ln,Dn,Fn,jn=0,Bn=[],Un=[],qn=Qe,Wn=qn.__b,zn=qn.__r,Hn=qn.diffed,Vn=qn.__c,Jn=qn.unmount,Gn=qn.__;function Kn(t,e){qn.__h&&qn.__h(Ln,t,jn||e),jn=0;var n=Ln.__H||(Ln.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({__V:Un}),n.__[t]}function Yn(t){return jn=1,$n(sr,t)}function $n(t,e,n){var r=Kn(Nn++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):sr(void 0,e),function(t){var e=r.__N?r.__N[0]:r.__[0],n=r.t(e,t);e!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=Ln,!Ln.u)){var o=function(t,e,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(t){return!!t.__c}));if(o.every((function(t){return!t.__N})))return!i||i.call(this,t,e,n);var s=!1;return o.forEach((function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(s=!0)}})),!(!s&&r.__c.props===t)&&(!i||i.call(this,t,e,n))};Ln.u=!0;var i=Ln.shouldComponentUpdate,s=Ln.componentWillUpdate;Ln.componentWillUpdate=function(t,e,n){if(this.__e){var r=i;i=void 0,o(t,e,n),i=r}s&&s.call(this,t,e,n)},Ln.shouldComponentUpdate=o}return r.__N||r.__}function Xn(t,e){var n=Kn(Nn++,4);!qn.__s&&ir(n.__H,e)&&(n.__=t,n.i=e,Ln.__h.push(n))}function Zn(t,e){var n=Kn(Nn++,7);return ir(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function Qn(t,e){return jn=8,Zn((function(){return t}),e)}function tr(){for(var t;t=Bn.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(rr),t.__H.__h.forEach(or),t.__H.__h=[]}catch(Nn){t.__H.__h=[],qn.__e(Nn,t.__v)}}qn.__b=function(t){Ln=null,Wn&&Wn(t)},qn.__=function(t,e){e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Gn&&Gn(t,e)},qn.__r=function(t){zn&&zn(t),Nn=0;var e=(Ln=t.__c).__H;e&&(Dn===Ln?(e.__h=[],Ln.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.__V=Un,t.__N=t.i=void 0}))):(e.__h.forEach(rr),e.__h.forEach(or),e.__h=[],Nn=0)),Dn=Ln},qn.diffed=function(t){Hn&&Hn(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==Bn.push(e)&&Fn===qn.requestAnimationFrame||((Fn=qn.requestAnimationFrame)||nr)(tr)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.__V!==Un&&(t.__=t.__V),t.i=void 0,t.__V=Un}))),Dn=Ln=null},qn.__c=function(t,e){e.some((function(t){try{t.__h.forEach(rr),t.__h=t.__h.filter((function(t){return!t.__||or(t)}))}catch(Ln){e.some((function(t){t.__h&&(t.__h=[])})),e=[],qn.__e(Ln,t.__v)}})),Vn&&Vn(t,e)},qn.unmount=function(t){Jn&&Jn(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{rr(t)}catch(t){e=t}})),n.__H=void 0,e&&qn.__e(e,n.__v))};var er="function"==typeof requestAnimationFrame;function nr(t){var e,n=function(){clearTimeout(r),er&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);er&&(e=requestAnimationFrame(n))}function rr(t){var e=Ln,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),Ln=e}function or(t){var e=Ln;t.__c=t.__(),Ln=e}function ir(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function sr(t,e){return"function"==typeof e?e(t):e}const ar=Object.defineProperty({__proto__:null,useCallback:Qn,useContext:function(t){var e=Ln.context[t.__c],n=Kn(Nn++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(Ln)),e.props.value):t.__},useDebugValue:function(t,e){qn.useDebugValue&&qn.useDebugValue(e?e(t):t)},useEffect:function(t,e){var n=Kn(Nn++,3);!qn.__s&&ir(n.__H,e)&&(n.__=t,n.i=e,Ln.__H.__h.push(n))},useErrorBoundary:function(t){var e=Kn(Nn++,10),n=Yn();return e.__=t,Ln.componentDidCatch||(Ln.componentDidCatch=function(t,r){e.__&&e.__(t,r),n[1](t)}),[n[0],function(){n[1](void 0)}]},useId:function(){var t=Kn(Nn++,11);if(!t.__){for(var e=Ln.__v;null!==e&&!e.__m&&null!==e.__;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__},useImperativeHandle:function(t,e,n){jn=6,Xn((function(){return"function"==typeof t?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0}),null==n?n:n.concat(t))},useLayoutEffect:Xn,useMemo:Zn,useReducer:$n,useRef:function(t){return jn=5,Zn((function(){return{current:t}}),[])},useState:Yn},Symbol.toStringTag,{value:"Module"});function cr(){const t=t=>de.createElementNS("http://www.w3.org/2000/svg",t),e=We(t("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),n=We(t("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 e.appendChild(n),e}function lr(t){let{options:e}=t;const n=Zn((()=>({__html:cr().outerHTML})),[]);return pn("h2",{class:"dialog__header"},pn("span",{class:"dialog__title"},e.formTitle),e.showBranding?pn("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:n}):null)}function ur(t,e){const n=t.get(e);return"string"===typeof n?n.trim():""}function dr(t){let{options:e,defaultEmail:n,defaultName:r,onFormClose:o,onSubmit:i,onSubmitSuccess:s,onSubmitError:a,showEmail
1:c,showName:l,screenshotInput:u}=t;const{tags:d,addScreenshotButtonLabel:p,removeScreenshotButtonLabel:f,cancelButtonLabel:h,emailLabel:m,emailPlaceholder:g,isEmailRequired:v,isNameRequired:y,messageLabel:b,messagePlaceholder:S,nameLabel:k,namePlaceholder:w,submitButtonLabel:A,isRequiredLabel:x}=e,[E,T]=Yn(!1),[I,C]=Yn(null),[R,M]=Yn(!1),O=null===u||void 0===u?void 0:u.input,[P,N]=Yn(null),L=Qn((t=>{N(t),M(!1)}),[]),D=Qn((t=>{const e=function(t,e){const n=[];return e.isNameRequired&&!t.name&&n.push(e.nameLabel),e.isEmailRequired&&!t.email&&n.push(e.emailLabel),t.message||n.push(e.messageLabel),n}(t,{emailLabel:m,isEmailRequired:v,isNameRequired:y,messageLabel:b,nameLabel:k});return e.length>0?C("Please enter in the following required fields: ".concat(e.join(", "))):C(null),0===e.length}),[m,v,y,b,k]),F=Qn((async t=>{T(!0);try{if(t.preventDefault(),!(t.target instanceof HTMLFormElement))return;const n=new FormData(t.target),r=await(u&&R?u.value():void 0),o={name:ur(n,"name"),email:ur(n,"email"),message:ur(n,"message"),attachments:r?[r]:void 0};
1if(!D(o))return;try{const t=await i({name:o.name,email:o.email,message:o.message,source:"widget",tags:d},{attachments:o.attachments});s(o,t)}catch(e){Ue&&_.error(e);const t=e instanceof Error?e:new Error(String(e));C(t.message),a(t)}}finally{T(!1)}}),[u&&R,s,a]);return pn("form",{class:"form",onSubmit:F},O&&R?pn(O,{onError:L}):null,pn("fieldset",{class:"form__right","data-sentry-feedback":!0,disabled:E},pn("div",{class:"form__top"},I?pn("div",{class:"form__error-container"},I):null,l?pn("label",{for:"name",class:"form__label"},pn(pr,{label:k,isRequiredLabel:x,isRequired:y}),pn("input",{class:"form__input",defaultValue:r,id:"name",name:"name",placeholder:w,required:y,type:"text"})):pn("input",{"aria-hidden":!0,value:r,name:"name",type:"hidden"}),c?pn("label",{for:"email",class:"form__label"},pn(pr,{label:m,isRequiredLabel:x,isRequired:v}),pn("input",{class:"form__input",defaultValue:n,id:"email",name:"email",placeholder:g,required:v,type:"email"})):pn("input",{"aria-hidden":!0,value:n,name:"email",type:"hidden"}),pn("label",{for:"message",class:"form__label"},pn(pr,{label:b,isRequiredLabel:x,isRequired:!0}),pn("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:S,required:!0,rows:5})),O?pn("label",{for:"screenshot",class:"form__label"},pn("button",{class:"btn btn--default",disabled:E,type:"button",onClick:()=>{N(null),M((t=>!t))}},R?f:p),P?pn("div",{class:"form__error-container"},P.message):null):null),pn("div",{class:"btn-group"},pn("button",{class:"btn btn--primary",disabled:E,type:"submit"},A),pn("button",{class:"btn btn--default",disabled:E,type:"button",onClick:o},h))))}function pr(t){let{label:e,isRequired:n,isRequiredLabel:r}=t;return pn("span",{class:"form__label__text"},e,n&&pn("span",{class:"form__label__text--required"},r))}function fr(){const t=t=>ue.document.createElementNS("http://www.w3.org/2000/svg",t),e=We(t("svg"),{width:"".concat(16),height:"".concat(17),viewBox:"0 0 ".concat(16," ").concat(17),fill:"inherit"}),n=We(t("g"),{clipPath:"url(#clip0_57_156)"}),r=We(t("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),o=We(t("path"),{d:"M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});e.appendChild(n).append(o,r);const i=t("defs"),s=We(t("clipPath"),{id:"clip0_57_156"}),a=We(t("rect"),{width:"".concat(16),height:"".concat(16),fill:"white",transform:"translate(0 0.5)"});return s.appendChild(a),i.appendChild(s),e.appendChild(i).appendChild(s).appendChild(a),e}function hr(t){let{open:e,onFormSubmitted:n}=t,r=(0,i.A)(t,le);const o=r.options,a=Zn((()=>({__html:fr().outerHTML})),[]),[c,l]=Yn(null),u=Qn((()=>{c&&(clearTimeout(c),l(null)),n()}),[c]),d=Qn(((t,e)=>{r.onSubmitSuccess(t,e),l(setTimeout((()=>{n(),l(null)}),5e3))}),[n]);return pn(hn,null,c?pn("div",{class:"success__position",onClick:u},pn("div",{class:"success__content"},o.successMessageText,pn("span",{class:"success__icon",dangerouslySetInnerHTML:a}))):pn("dialog",{class:"dialog",onClick:o.onFormClose,open:e},pn("div",{class:"dialog__position"},pn("div",{class:"dialog__content",onClick:t=>{t.stopPropagation()}},pn(lr,{options:o}),pn(dr,(0,s.A)((0,s.A)({},r),{},{onSubmitSuccess:d}))))))}const mr=()=>({name:"FeedbackModal",setupOnce(){},createDialog:t=>{let{options:e,screenshotIntegration:n,sendFeedback:r,shadow:o}=t;const i=o,s=e.useSentryUser,a=function(){const t=Vt().getUser(),e=Jt().getUser(),n=Gt().getUser();return t&&Object.keys(t).length?t:e&&Object.keys(e).length?e:n}(),c=de.createElement("div"),l=function(t){const e=de.createElement("style");return e.textContent="\n:host {\n  --dialog-inset: var(--inset);\n}\n\n".concat("\n.dialog {\n  position: fixed;\n  z-index: var(--z-index);\n  margin: 0;\n  inset: 0;\n\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  padding: 0;\n  height: 100vh;\n  width: 100vw;\n\n  color: var(--dialog-color, var(--foreground));\n  fill: var(--dialog-color, var(--foreground));\n  line-height: 1.75em;\n\n  background-color: rgba(0, 0, 0, 0.05);\n  border: none;\n  inset: 0;\n  opacity: 1;\n  transition: opacity 0.2s ease-in-out;\n}\n\n.dialog__position {\n  position: fixed;\n  z-index: var(--z-index);\n  inset: var(--dialog-inset);\n  padding: var(--page-margin);\n  display: flex;\n  max-height: calc(100vh - (2 * var(--page-margin)));\n}\n@media (max-width: 600px) {\n  .dialog__position {\n    inset: var(--page-margin);\n    padding: 0;\n  }\n}\n\n.dialog__position:has(.editor) {\n  inset: var(--page-margin);\n  padding: 0;\n}\n\n.dialog:not([open]) {\n  opacity: 0;\n  pointer-events: none;\n  visibility: hidden;\n}\n.dialog:not([open]) .dialog__content {\n  transform: translate(0, -16px) scale(0.98);\n}\n\n.dialog__content {\n  display: flex;\n  flex-direction: column;\n  gap: 16px;\n  padding: var(--dialog-padding, 24px);\n  max-width: 100%;\n  width: 100%;\n  max-height: 100%;\n  overflow: auto;\n\n  background: var(--dialog-background, var(--background));\n  border-radius: var(--dialog-border-radius, 20px);\n  border: var(--dialog-border, var(--border));
1\n  box-shadow: var(--dialog-box-shadow, var(--box-shadow));\n  transform: translate(0, 0) scale(1);\n  transition: transform 0.2s ease-in-out;\n}\n\n","\n").concat("\n.dialog__header {\n  display: flex;\n  gap: 4px;\n  justify-content: space-between;\n  font-weight: var(--dialog-header-weight, 600);\n  margin: 0;\n}\n.dialog__title {\n  align-self: center;\n  width: var(--form-width, 272px);\n}\n\n@media (max-width: 600px) {\n  .dialog__title {\n    width: auto;\n  }\n}\n\n.dialog__position:has(.editor) .dialog__title {\n  width: auto;\n}\n\n\n.brand-link {\n  display: inline-flex;\n}\n.brand-link:focus-visible {\n  outline: var(--outline);\n}\n","\n").concat("\n.form {\n  display: flex;\n  overflow: auto;\n  flex-direction: row;\n  gap: 16px;\n  flex: 1 0;\n}\n\n.form fieldset {\n  border: none;\n  margin: 0;\n  padding: 0;\n}\n\n.form__right {\n  flex: 0 0 auto;\n  display: flex;\n  overflow: auto;\n  flex-direction: column;\n  justify-content: space-between;\n  gap: 20px;\n  width: var(--form-width, 100%);\n}\n\n.dialog__position:has(.editor) .form__right {\n  width: var(--form-width, 272px);\n}\n\n.form__top {\n  display: flex;\n  flex-direction: column;\n  gap: 8px;\n}\n\n.form__error-container {\n  color: var(--error-color);\n  fill: var(--error-color);\n}\n\n.form__label {\n  display: flex;\n  flex-direction: column;\n  gap: 4px;\n  margin: 0px;\n}\n\n.form__label__text {\n  display: flex;\n  gap: 4px;\n  align-items: center;\n}\n\n.form__label__text--required {\n  font-size: 0.85em;\n}\n\n.form__input {\n  font-family: inherit;\n  line-height: inherit;\n  background: transparent;\n  box-sizing: border-box;\n  border: var(--input-border, var(--border));\n  border-radius: var(--input-border-radius, 6px);\n  color: var(--input-color, inherit);\n  fill: var(--input-color, inherit);\n  font-size: var(--input-font-size, inherit);\n  font-weight: var(--input-font-weight, 500);\n  padding: 6px 12px;\n}\n\n.form__input::placeholder {\n  opacity: 0.65;\n  color: var(--input-placeholder-color, inherit);\n  filter: var(--interactive-filter);\n}\n\n.form__input:focus-visible {\n  outline: var(--input-focus-outline, var(--outline));\n}\n\n.form__input--textarea {\n  font-family: inherit;\n  resize: vertical;\n}\n\n.error {\n  color: var(--error-color);\n  fill: var(--error-color);\n}\n","\n").concat("\n.btn-group {\n  display: grid;\n  gap: 8px;\n}\n\n.btn {\n  line-height: inherit;\n  border: var(--button-border, var(--border));\n  border-radius: var(--button-border-radius, 6px);\n  cursor: pointer;\n  font-family: inherit;\n  font-size: var(--button-font-size, inherit);\n  font-weight: var(--button-font-weight, 600);\n  padding: var(--button-padding, 6px 16px);\n}\n.btn[disabled] {\n  opacity: 0.6;\n  pointer-events: none;\n}\n\n.btn--primary {\n  color: var(--button-primary-color, var(--accent-foreground));\n  fill: var(--button-primary-color, var(--accent-foreground));\n  background: var(--button-primary-background, var(--accent-background));\n  border: var(--button-primary-border, var(--border));\n  border-radius: var(--button-primary-border-radius, 6px);\n  font-weight: var(--button-primary-font-weight, 500);\n}\n.btn--primary:hover {\n  color: var(--button-primary-hover-color, var(--accent-foreground));\n  fill: var(--button-primary-hover-color, var(--accent-foreground));\n  background: var(--button-primary-hover-background, var(--accent-background));\n  filter: var(--interactive-filter);\n}\n.btn--primary:focus-visible {\n  background: var(--button-primary-hover-background, var(--accent-background));\n  filter: var(--interactive-filter);\n  outline: var(--button-primary-focus-outline, var(--outline));\n}\n\n.btn--default {\n  color: var(--button-color, var(--foreground));\n  fill: var(--button-color, var(--foreground));\n  background: var(--button-background, var(--background));\n  border: var(--button-border, var(--border));\n  border-radius: var(--button-border-radius, 6px);\n  font-weight: var(--button-font-weight, 500);\n}\n.btn--default:hover {\n  color: var(--button-color, var(--foreground));\n  fill: var(--button-color, var(--foreground));\n  background: var(--button-hover-background, var(--background));\n  filter: var(--interactive-filter);\n}\n.btn--default:focus-visible {\n  background: var(--button-hover-background, var(--background));\n  filter: var(--interactive-filter);\n  outline: var(--button-focus-outline, var(--outline));\n}\n","\n").concat("\n.success__position {\n  position: fixed;\n  inset: var(--dialog-inset);\n  padding: var(--page-margin);\n  z-index: var(--z-index);\n}\n.success__content {\n  background: var(--success-background, var(--background));\n  border: var(--success-border, var(--border));\n  border-radius: var(--success-border-radius, 1.7em/50%);
1\n  box-shadow: var(--success-box-shadow, var(--box-shadow));\n  font-weight: var(--success-font-weight, 600);\n  color: var(--success-color);\n  fill: var(--success-color);\n  padding: 12px 24px;\n  line-height: 1.75em;\n\n  display: grid;\n  align-items: center;\n  grid-auto-flow: column;\n  gap: 6px;\n  cursor: default;\n}\n\n.success__icon {\n  display: flex;\n}\n","\n"),t&&e.setAttribute("nonce",t),e}(e.styleNonce);let u="";const d={get el(){return c},appendToDom(){i.contains(l)||i.contains(c)||(i.appendChild(l),i.appendChild(c))},removeFromDom(){c.remove(),l.remove(),de.body.style.overflow=u},open(){var t,n;f(!0),null===(t=e.onFormOpen)||void 0===t||t.call(e),null===(n=$t())||void 0===n||n.emit("openFeedbackWidget"),u=de.body.style.overflow,de.body.style.overflow="hidden"},close(){f(!1),de.body.style.overflow=u}},p=null===n||void 0===n?void 0:n.createInput({h:pn,hooks:ar,dialog:d,options:e}),f=t=>{!function(t,e){var n,r,o;Qe.__&&Qe.__(t,e),n=e.__k,r=[],o=[],In(e,t=e.__k=pn(hn,null,[t]),n||sn,sn,void 0!==e.ownerSVGElement,n?null:e.firstChild?Ze.call(e.childNodes):null,r,n?n.__e:e.firstChild,!1,o),t.__d=void 0,Cn(r,t,o)}(pn(hr,{options:e,screenshotInput:p,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:String(s&&(null===a||void 0===a?void 0:a[s.name])||""),defaultEmail:String(s&&(null===a||void 0===a?void 0:a[s.email])||""),onFormClose:()=>{var t;f(!1),null===(t=e.onFormClose)||void 0===t||t.call(e)},onSubmit:r,onSubmitSuccess:(t,n)=>{var r;f(!1),null===(r=e.onSubmitSuccess)||void 0===r||r.call(e,t,n)},onSubmitError:t=>{var n;null===(n=e.onSubmitError)||void 0===n||n.call(e,t)},onFormSubmitted:()=>{var t;null===(t=e.onFormSubmitted)||void 0===t||t.call(e)},open:t}),c)};return d}});function gr(t){const e=de.createElement("style"),n="#1A141F",r="#302735";return e.textContent="\n.editor {\n  display: flex;\n  flex-grow: 1;\n  flex-direction: column;\n}\n\n.editor__image-container {\n  justify-items: center;\n  padding: 15px;\n  position: relative;\n  height: 100%;\n  border-radius: var(--menu-border-radius, 6px);\n\n  background-color: ".concat(n,";\n  background-image: repeating-linear-gradient(\n      -145deg,\n      transparent,\n      transparent 8px,\n      ").concat(n," 8px,\n      ").concat(n," 11px\n    ),\n    repeating-linear-gradient(\n      -45deg,\n      transparent,\n      transparent 15px,\n      ").concat(r," 15px,\n      ").concat(r," 16px\n    );\n}\n\n.editor__canvas-container {\n  width: 100%;\n  height: 100%;\n  position: relative;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n}\n\n.editor__canvas-container > * {\n  object-fit: contain;\n  position: absolute;\n}\n\n.editor__tool-container {\n  padding-top: 8px;\n  display: flex;\n  justify-content: center;\n}\n\n.editor__tool-bar {\n  display: flex;\n  gap: 8px;\n}\n\n.editor__tool {\n  display: flex;\n  padding: 8px 12px;\n  justify-content: center;\n  align-items: center;\n  border: var(--button-border, var(--border));\n  border-radius: var(--button-border-radius, 6px);\n  background: var(--button-background, var(--background));\n  color: var(--button-color, var(--foreground));\n}\n\n.editor__tool--active {\n  background: var(--button-primary-background, var(--accent-background));\n  color: var(--button-primary-color, var(--accent-foreground));\n}\n\n.editor__rect {\n  position: absolute;\n  z-index: 2;\n}\n\n.editor__rect button {\n  opacity: 0;\n  position: absolute;\n  top: -12px;\n  right: -12px;\n  cursor: pointer;\n  padding: 0;\n  z-index: 3;\n  border: none;\n  background: none;\n}\n\n.editor__rect:hover button {\n  opacity: 1;\n}\n"),t&&e.setAttribute("nonce",t),e}function vr(t){let{hooks:e}=t;return function(t){let{onBeforeScreenshot:n,onScreenshot:r,onAfterScreenshot:o,onError:i}=t;const s=function(){var t;const[n,r]=e.useState(null!==(t=ue.devicePixelRatio)&&void 0!==t?t:1);return e.useEffect((()=>{const t=()=>{r(ue.devicePixelRatio)},e=matchMedia("(resolution: ".concat(ue.devicePixelRatio,"dppx)"));return e.addEventListener("change",t),()=>{e.removeEventListener("change",t)}}),[]),n}();e.useEffect((()=>{(async()=>{n();const t=await pe.mediaDevices.getDisplayMedia({video:{width:ue.innerWidth*s,height:ue.innerHe
1ight*s},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),e=de.createElement("video");await new Promise(((n,o)=>{e.srcObject=t,e.onloadedmetadata=()=>{r(e,s),t.getTracks().forEach((t=>t.stop())),n()},e.play().catch(o)})),o()})().catch(i)}),[])}}function yr(t,e,n){if(!t)return;const r=t.getContext("2d",e);r&&n(t,r)}function _r(t,e){yr(t,{alpha:!0},((t,n)=>{n.drawImage(e,0,0,e.width,e.height,0,0,t.width,t.height)}))}function br(t,e,n){yr(t,{alpha:!0},((t,r)=>{n.length&&(r.fillStyle="rgba(0, 0, 0, 0.25)",r.fillRect(0,0,t.width,t.height)),n.forEach((t=>{!function(t,e,n){switch(t.type){case"highlight":e.shadowColor="rgba(0, 0, 0, 0.7)",e.shadowBlur=50,e.fillStyle=n,e.fillRect(t.x-1,t.y-1,t.w+2,t.h+2),e.clearRect(t.x,t.y,t.w,t.h);break;case"hide":e.fillStyle="rgb(0, 0, 0)",e.fillRect(t.x,t.y,t.w,t.h)}}(t,r,e)}))}))}function Sr(t){let{h:e,hooks:n,outputBuffer:r,dialog:o,options:i}=t;const s=vr({hooks:n}),a=function(t){let{h:e}=t;return function(t){let{action:n,setAction:r,options:o}=t;return e("div",{class:"editor__tool-container"},e("div",{class:"editor__tool-bar"},e("button",{type:"button",class:"editor__tool ".concat("highlight"===n?"editor__tool--active":""),onClick:()=>{r("highlight"===n?"":"highlight")}},o.highlightToolText),e("button",{type:"button",class:"editor__tool ".concat("hide"===n?"editor__tool--active":""),onClick:()=>{r("hide"===n?"":"hide")}},o.hideToolText)))}}({h:e}),c=function(t){let{h:e}=t;return function(){return e("svg",{"data-test-id":"icon-close",viewBox:"0 0 16 16",fill:"#2B2233",height:"25px",width:"25px"},e("circle",{r:"7",cx:"8",cy:"8",fill:"white"}),e("path",{strokeWidth:"1.5",d:"M8,16a8,8,0,1,1,8-8A8,8,0,0,1,8,16ZM8,1.53A6.47,6.47,0,1,0,14.47,8,6.47,6.47,0,0,0,8,1.53Z"}),e("path",{strokeWidth:"1.5",d:"M5.34,11.41a.71.71,0,0,1-.53-.22.74.74,0,0,1,0-1.06l5.32-5.32a.75.75,0,0,1,1.06,1.06L5.87,11.19A.74.74,0,0,1,5.34,11.41Z"}),e("path",{strokeWidth:"1.5",d:"M10.66,11.41a.74.74,0,0,1-.53-.22L4.81,5.87A.75.75,0,0,1,5.87,4.81l5.32,5.32a.74.74,0,0,1,0,1.06A.71.71,0,0,1,10.66,11.41Z"}))}}({h:e}),l={__html:gr(i.styleNonce).innerText},u=o.el.style,d=t=>{let{screenshot:o}=t;const[s,u]=n.useState("highlight"),[d,p]=n.useState([]),f=n.useRef(null),h=n.useRef(null),m=n.useRef(null),g=n.useRef(null),[v,y]=n.useState(1),_=n.useMemo((()=>{const t=de.getElementById(i.id);if(!t)return"white";const e=getComputedStyle(t);return e.getPropertyValue("--button-primary-background")||e.getPropertyValue("--accent-background")}),[i.id]);n.useLayoutEffect((()=>{const t=()=>{const e=f.current;e&&(yr(o.canvas,{alpha:!1},(t=>{const n=Math.min(e.clientWidth/t.width,e.clientHeight/t.height);y(n)})),0!==e.clientHeight&&0!==e.clientWidth||setTimeout(t,0))};return t(),ue.addEventListener("resize",t),()=>{ue.removeEventListener("resize",t)}}),[o]);const b=n.useCallback(((t,e)=>{yr(t,{alpha:!0},((t,n)=>{n.scale(e,e),t.width=o.canvas.width,t.height=o.canvas.height}))}),[o]);n.useEffect((()=>{b(h.current,o.dpi),_r(h.current,o.canvas)}),[o]),n.useEffect((()=>{b(m.current,o.dpi),yr(m.current,{alpha:!0},((t,e)=>{e.clearRect(0,0,t.width,t.height)})),br(m.current,_,d)}),[d,_]),n.useEffect((()=>{b(r,o.dpi),_r(r,o.canvas),yr(de.createElement("canvas"),{alpha:!0},((t,e)=>{e.scale(o.dpi,o.dpi),t.width=o.canvas.width,t.height=o.canvas.height,br(t,_,d),_r(r,t)}))}),[d,o,_]);const S=n.useCallback((t=>e=>{e.preventDefault(),e.stopPropagation(),p((e=>{const n=[...e];return n.splice(t,1),n}))}),[]),k={width:"".concat(o.canvas.width*v,"px"),height:"".concat(o.canvas.height*v,"px")},w=t=>{t.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:f},e("canvas",{ref:h,id:"background",style:k}),e("canvas",{ref:m,id:"foreground",style:k}),e("div",{ref:g,onMouseDown:t=>{if(!s||!g.current)return;const e=g.current.getBoundingClientRect(),n={type:s,x:t.offsetX/v,y:t.offsetY/v},r=(t,n)=>{const r=(n.clientX-e.x)/v,o=(n.clientY-e.y)/v;return{type:t.type,x:Math.min(t.x,r),y:Math.min(t.y,o),w:Math.abs(r-t.x),h:Math.abs(o-t.y)}},o=t=>
1{yr(m.current,{alpha:!0},((t,e)=>{e.clearRect(0,0,t.width,t.height)})),br(m.current,_,[...d,r(n,t)])},i=t=>{const e=r(n,t);e.w*v>=1&&e.h*v>=1&&p((t=>[...t,e])),de.removeEventListener("mousemove",o),de.removeEventListener("mouseup",i)};de.addEventListener("mousemove",o),de.addEventListener("mouseup",i)},style:k},d.map(((t,n)=>e("div",{key:n,class:"editor__rect",style:{top:"".concat(t.y*v,"px"),left:"".concat(t.x*v,"px"),width:"".concat(t.w*v,"px"),height:"".concat(t.h*v,"px")}},e("button",{"aria-label":i.removeHighlightText,onClick:S(n),onMouseDown:w,onMouseUp:w,type:"button"},e(c,null)))))))),e(a,{options:i,action:s,setAction:u}))};return function(t){let{onError:o}=t;const[i,a]=n.useState();return s({onBeforeScreenshot:n.useCallback((()=>{u.display="none"}),[]),onScreenshot:n.useCallback(((t,e)=>{yr(de.createElement("canvas"),{alpha:!1},((n,r)=>{r.scale(e,e),n.width=t.videoWidth,n.height=t.videoHeight,r.drawImage(t,0,0,n.width,n.height),a({canvas:n,dpi:e})})),r.width=t.videoWidth,r.height=t.videoHeight}),[]),onAfterScreenshot:n.useCallback((()=>{u.display="block"}),[]),onError:n.useCallback((t=>{u.display="block",o(t)}),[])}),i?e(d,{screenshot:i}):e("div",null)}}const kr=()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:t=>{let{h:e,hooks:n,dialog:r,options:o}=t;const i=de.createElement("canvas");return{input:Sr({h:e,hooks:n,outputBuffer:i,dialog:r,options:o}),value:async()=>{const t=await new Promise((t=>{i.toBlob(t,"image/png")}));if(t){return{data:new Uint8Array(await t.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}}}),wr="production";function Ar(t){return new Er((e=>{e(t)}))}function xr(t){return new Er(((e,n)=>{n(t)}))}class Er{constructor(t){this._state=0,this._handlers=[],this._runExecutor(t)}then(t,e){return new Er(((n,r)=>{this._handlers.push([!1,e=>{if(t)try{n(t(e))}catch(qn){r(qn)}else n(e)},t=>{if(e)try{n(e(t))}catch(qn){r(qn)}else r(t)}]),this._executeHandlers()}))}catch(t){return this.then((t=>t),t)}finally(t){return new Er(((e,n)=>{let r,o;return this.then((e=>{o=!1,r=e,t&&t()}),(e=>{o=!0,r=e,t&&t()})).then((()=>{o?n(r):e(r)}))}))}_executeHandlers(){if(0===this._state)return;const t=this._handlers.slice();this._handlers=[],t.forEach((t=>{t[0]||(1===this._state&&t[1](this._value),2===this._state&&t[2](this._value),t[0]=!0)}))}_runExecutor(t){const e=(t,e)=>{0===this._state&&(R(e)?e.then(n,r):(this._state=t,this._value=e,this._executeHandlers()))},n=t=>{e(1,t)},r=t=>{e(2,t)};try{t(n,r)}catch(qn){r(qn)}}}function Tr(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;try{const o=Ir(e,n,t,r);return R(o)?o:Ar(o)}catch(o){return xr(o)}}function Ir(t,e,n,r){const o=n[r];if(!t||!o)return t;const i=o((0,s.A)({},t),e);return p&&null===i&&_.log('Event processor "'.concat(o.id||"?",'" dropped event')),R(i)?i.then((t=>Ir(t,e,n,r+1))):Ir(i,e,n,r+1)}let Cr,Rr,Mr,Or;function Pr(t){const e=a._sentryDebugIds,n=a._debugIds;if(!e&&!n)return{};const r=e?Object.keys(e):[],o=n?Object.keys(n):[];if(Or&&r.length===Rr&&o.length===Mr)return Or;Rr=r.length,Mr=o.length,Or={},Cr||(Cr={});const i=(e,n)=>{for(const o of e){var r;const e=n[o],i=null===(r=Cr)||void 0===r?void 0:r[o];if(i&&Or&&e)Or[i[0]]=e,Cr&&(Cr[o]=[i[0],e]);else if(e){const n=t(o);for(let t=n.length-1;t>=0;t--){const r=n[t],i=null===r||void 0===r?void 0:r.filename;if(i&&Or&&Cr){Or[i]=e,Cr[o]=[i,e];break}}}}};return e&&i(r,e),n&&i(o,n),Or}const Nr="sentry.source",Lr="sentry.sample_rate",Dr="sentry.previous_trace_sample_rate",Fr="sentry.op",jr="sentry.origin",Br="sentry.idle_span_finish_reason",Ur="sentry.measurement_unit",qr="sentry.measurement_value",Wr="sentry.release",zr="sentry.environment",Hr="sentry.segment.name",Vr="sentry.segment.id",Jr="sentry.sdk.name",Gr="sentry.sdk.version",Kr="sentry.sdk.integrations",Yr="user.id",$r="user.email",Xr="user.ip_address",Zr="user.name",Qr="sentry.custom_span_name",to="sentry.profile_id",eo="sentry.exclusive_time",no="http.request.method",ro="url.full",oo="sentry.link.type",io="sentry-",so=8192;function ao(t){const e=lo(t);if(!e)return;const n=Object.entries(e).reduce(((t,e)=>
1{let[n,r]=e;if(n.startsWith(io)){t[n.slice(io.length)]=r}return t}),{});return Object.keys(n).length>0?n:void 0}function co(t){if(!t)return;return po(Object.entries(t).reduce(((t,e)=>{let[n,r]=e;return r&&(t["".concat(io).concat(n)]=r),t}),{}))}function lo(t){if(t&&(x(t)||Array.isArray(t)))return Array.isArray(t)?t.reduce(((t,e)=>{const n=uo(e);return Object.entries(n).forEach((e=>{let[n,r]=e;t[n]=r})),t}),{}):uo(t)}function uo(t){return t.split(",").map((t=>{const e=t.indexOf("=");if(-1===e)return[];return[t.slice(0,e),t.slice(e+1)].map((t=>{try{return decodeURIComponent(t.trim())}catch(e){return}}))})).reduce(((t,e)=>{let[n,r]=e;return n&&r&&(t[n]=r),t}),{})}function po(t){if(0!==Object.keys(t).length)return Object.entries(t).reduce(((t,e,n)=>{let[r,o]=e;const i="".concat(encodeURIComponent(r),"=").concat(encodeURIComponent(o)),s=0===n?i:"".concat(t,",").concat(i);return s.length>so?(p&&_.warn("Not adding key: ".concat(r," with val: ").concat(o," to baggage header due to exceeding baggage size limits.")),t):s}),"")}const fo=/^o(\d+)\./,ho=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function mo(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{host:n,path:r,pass:o,port:i,projectId:s,protocol:a,publicKey:c}=t;return"".concat(a,"://").concat(c).concat(e&&o?":".concat(o):"","@").concat(n).concat(i?":".concat(i):"","/").concat(r?"".concat(r,"/"):r).concat(s)}function go(t){const e=ho.exec(t);if(!e)return void m((()=>{console.error("Invalid Sentry Dsn: ".concat(t))}));const[n,r,o="",i="",s="",a=""]=e.slice(1);let c="",l=a;const u=l.split("/");if(u.length>1&&(c=u.slice(0,-1).join("/"),l=u.pop()),l){const t=l.match(/^\d+/);t&&(l=t[0])}return vo({host:i,pass:o,path:c,projectId:l,port:s,protocol:n,publicKey:r})}function vo(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function yo(t){const e=t.getOptions(),{host:n}=t.getDsn()||{};let r;return e.orgId?r=String(e.orgId):n&&(r=function(t){const e=t.match(fo);return null===e||void 0===e?void 0:e[1]}(n)),r}function _o(t){const e="string"===typeof t?go(t):vo(t);if(e&&function(t){if(!p)return!0;const{port:e,projectId:n,protocol:r}=t;return!["protocol","publicKey","host","projectId"].find((e=>!t[e]&&(_.error("Invalid Sentry Dsn: ".concat(e," missing")),!0)))&&(n.match(/^\d+$/)?function(t){return"http"===t||"https"===t}(r)?!e||!isNaN(parseInt(e,10))||(_.error("Invalid Sentry Dsn: Invalid port ".concat(e)),!1):(_.error("Invalid Sentry Dsn: Invalid protocol ".concat(r)),!1):(_.error("Invalid Sentry Dsn: Invalid projectId ".concat(n)),!1))}(e))return e}function bo(t){var e;if("boolean"===typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const n=t||(null===(e=$t())||void 0===e?void 0:e.getOptions());return!!n&&(null!=n.tracesSampleRate||!!n.tracesSampler)}function So(t,e){const{value:n,unit:r}="object"===typeof(o=t)&&null!=o&&!Array.isArray(o)&&Object.keys(o).includes("value")?t:{value:t,unit:void 0};var o;const i=function(t){if(Array.isArray(t))return{value:t,type:"array"};const e="string"===typeof t?"string":"boolean"===typeof t?"boolean":"number"!==typeof t||Number.isNaN(t)?null:Number.isInteger(t)?"integer":"double";if(e)return{value:t,type:e}}(n),a=r&&"string"===typeof r?{unit:r}:{};if(i)return(0,s.A)((0,s.A)({},i),a);if(!e||"skip-undefined"===e&&void 0===n)return;let c="";try{var l;c=null!==(l=JSON.stringify(n))&&void 0!==l?l:""}catch(u){}return(0,s.A)({value:c,type:"string"},a)}function ko(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n={};for(const[r,o]of Object.entries(null!==t&&void 0!==t?t:{})){const t=So(o,e);t&&(n[r]=t)}return n}function wo(t){if(!t)return 0;let e=0;for(const[o,i]of Object.entries(t)){var n,r;e+=2*o.length,e+=2*i.type.length,e+=2*(null!==(n=null===(r=i.unit)||void 0===r?void 0:r.length)&&void 0!==n?n:0);const t=i.value;Array.isArray(t)?e+=Ao(t[0])*t.length:T(t)?e+=Ao(t):e+=100}return e}function Ao(t){return"string"===typeof t?2*t.length:"boolean"===typeof t?4:"number"===typeof t?8:0}const xo=0,Eo=1,To=2;function Io(t){if(t<400&&t>=100)return{code:Eo};if(t>=400&&t<500)switch(t){case 401:return{code:To,message:"unauthenticated"};case 403:return{code:To,message:"permission_denied"};case 404:return{code:To,message:"not_found"};case 409:return{code:To,message:"already_exists"};case 413:return{code:To,message:"failed_precondition"};case 429:return{code:To,message:"resource_exhausted"};case 499:return{code:To,message:"cancelled"};default:return{code:To,message:"invalid_argument"}}if(t>=500&&t<600)switch(t){case 501:return{code:To,message:"unimplemented"};case 503:return{code:To,message:"unavailable"};case 504:return{code:To,message:"deadline_exceeded"};default:return{code:To,message:"internal_error"}}return{code:To,message:"internal_error"}}function Co(t,e){t.setAttribute("http.response.status_code",e);const n=Io(e);"unknown_error"!==n.message&&t.setStatus(n)}function Ro(t){if(t){if("object"===typeof t&&"deref"in t&&"function"===typeof t.deref)try{return t.deref()}catch(e){return}return t}}const Mo="_sentryScope",Oo="_sentryIsolationScope";function Po(t,e,n){t&&(N(t,Oo,function(t){try{const e=a.WeakRef;if("function"===typeof e)return new e(t)}catch(e){}return t}(n)),N(t,Mo,e))}function No(t){const e=t;return{scope:e[Mo],isolationScope:Ro(e[Oo])}}function Lo(t){if("boolean"===typeof t)return Number(t);const e="string"===typeof t?parseFloat(t):t;return"number"!==typeof e||isNaN(e)||e<0||e>1?void 0:e}const Do=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Fo(t,e){const n=function(t){if(!t)return;const e=t.match(Do);if(!e)return;let n;return"1"===e[3]?n=!0:"0"===e[3]&&(n=!1),{traceId:e[1],parentSampled:n,parentSpanId:e[2]}}(t),r=ao(e);if(null===n||void 0===n||!n.traceId)return{traceId:It(),sampleRand:q()};const o=function(t,e){const n=Lo(null===e||void 0===e?void 0:e.sample_rand);if(void 0!==n)return n;const r=Lo(null===e||void 0===e?void 0:e.sample_rate);return r&&void 0!==(null===t||void 0===t?void 0:t.parentSampled)?t.parentSampled?q()*r:r+q()*(1-r):q()}(n,r);r&&(r.sample_rand=o.toString());const{traceId:i,parentSpanId:s,parentSampled:a}=n;return{traceId:i,parentSpanId:s,sampled:a,dsc:r||{},sampleRand:o}}function jo(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:It(),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ct(),n=arguments.length>2?arguments[2]:void 0,r="";return void 0!==n&&(r=n?"-1":"-0"),"".concat(t,"-").concat(e).concat(r)}function Bo(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:It(),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ct(),n=arguments.length>2?arguments[2]:void 0;return"00-".concat(t,"-").concat(e,"-").concat(n?"01":"00")}const Uo=["spanId","traceId","traceFlags"],qo=1;let Wo=!1;function zo(t){const{spanId:e,traceId:n}=t.spanContext(),{data:r,op:o,parent_span_id:i,status:s,origin:a,links:c}=$o(t);return{parent_span_id:i,span_id:e,trace_id:n,data:r,op:o,status:s,origin:a,links:c}}function Ho(t){const{spanId:e,traceId:n,isRemote:r}=t.spanContext(),o=r?e:$o(t).parent_span_id,i=No(t).scope;return{parent_span_id:o,span_id:r?(null===i||void 0===i?void 0:i.getPropagationContext().propagationSpanId)||Ct():e,trace_id:n}}function Vo(t){const{traceId:e,spanId:n}=t.spanContext();return jo(e,n,ni(t))}function Jo(t){return t&&t.length>0?t.map((t=>{let{context:{spanId:e,traceId:n,traceFlags:r},attributes:o}=t,a=(0,i.A)(t.context,Uo);return(0,s.A)({span_id:e,trace_id:n,sampled:r===qo,attributes:o},a)})):void 0}function Go(t){return null!==t&&void 0!==t&&t.length?t.map((t=>{let{context:{spanId:e,traceId:n,traceFlags:r},attributes:o}=t;return{span_id:e,trace_id:n,sampled:r===qo,attributes:o}})):void 0}function Ko(t){return"number"===typeof t?Yo(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?Yo(t.getTime()):kt()}function Yo(t){return t>9999999999?t/1e3:t}function $o(t){if(ei(t))return t.getSpanJSON();const{spanId:e,traceId:n}=t.spanContext();if(ti(t)){const{attributes:r,startTime:o,name:i,endTime:s,status:a,links:c}=t;return{span_id:e,trace_id:n,data:r,description:i,parent_span_id:Zo(t),start_timestamp:Ko(o),timestamp:Ko(s)||void 0,status:ri(a),op:r[Fr],origin:r[jr],links:Jo(c)}}return{span_id:e,trace_id:n,start_timestamp:0,data:{}}}function Xo(t){if(ei(t))return t.getStreamedSpanJSON();const{spanId:e,traceId:n}=t.spanContext();if(ti(t)){const{attributes:r,startTime:o,name:i,endTime:s,status:a,links:c}=t;return{name:i,span_id:e,trace_id:n,parent_span_id:Zo(t),start_timestamp:Ko(o),end_timestamp:Ko(s),is_segment:t===ui(t),status:oi(a),attributes:r,links:Go(c)}}return{span_id:e,trace_id:n,start_timestamp:0,name:"",end_timestamp:0,status:"ok",is_segment:t===ui(t)}}function Zo(t){var e;return"parentSpanId"in t?t.parentSpanId:"parentSpanContext"in t?null===(e=t.parentSpanContext)||void 0===e?void 0:e.spanId:void 0}function Qo(t){var e;return(0,s.A)((0,s.A)({},t),{},{attributes:ko(t.attributes),links:null===(e=t.links)||void 0===e?void 0:e.map((t=>(0,s.A)((0,s.A)({},t),{},{attributes:ko(t.attributes)})))})}function ti(t){const e=t;return!!e.attributes&&!!e.startTime&&!!e.name&&!!e.endTime&&!!e.status}function ei(t){return"function"===typeof t.getSpanJSON}function ni(t){const{traceFlags:e}=t.spanContext();return e===qo}function ri(t){if(t&&t.code!==xo)return t.code===Eo?"ok":t.message||"internal_error"}function oi(t){return t&&t.code!==Eo&&t.code!==xo&&"cancelled"!==t.message?"error":"ok"}const ii="_sentryChildSpans",si="_sentryRootSpan";function ai(t,e){const n=t[si]||t;N(e,si,n),t[ii]?t[ii].add(e):N(t,ii,new Set([e]))}function ci(t){const e=new Set;return function t(n){if(!e.has(n)&&ni(n)){e.add(n);const r=n[ii]?Array.from(n[ii]):[];for(const e of r)t(e)}}(t),Array.from(e)}const li=ui;function ui(t){return t[si]||t}function di(){const t=zt(l());return t.getActiveSpan?t.getActiveSpan():Ot(Vt())}function pi(){Wo||(m((()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")})),Wo=!0)}function fi(t,e){t.updateName(e),t.setAttributes({[Nr]:"custom",[Qr]:e})}const hi="_frozenDsc";function mi(t,e){N(t,hi,e)}function gi(t,e){const n=e.getOptions(),{publicKey:r}=e.getDsn()||{},o={environment:n.environment||wr,release:n.release,public_key:r,trace_id:t,org_id:yo(e)};return e.emit("createDsc",o),o}function vi(t,e){const n=e.getPropagationContext();return n.dsc||gi(n.traceId,t)}function yi(t){var e,n,r;const o=$t();if(!o)return{};const i=li(t),s=$o(i),a=s.data,c=i.spanContext().traceState,l=null!==(e=null!==(n=null===c||void 0===c?void 0:c.get("sentry.sample_rate"))&&void 0!==n?n:a[Lr])&&void 0!==e?e:a[Dr];function u(t){return"number"!==typeof l&&"string"!==typeof l||(t.sample_rate="".concat(l)),t}const d=i[hi];if(d)return u(d);const p=null===c||void 0===c?void 0:c.get("sentry.dsc"),f=p&&ao(p);if(f)return u(f);const h=gi(t.spanContext().traceId,o),m=null!==(r=a[Nr])&&void 0!==r?r:a["sentry.span.source"],g=s.description;var v,y;("url"!==m&&g&&(h.transaction=g),bo())&&(h.sampled=String(ni(i)),h.sample_rand=null!==(v=null===c||void 0===c?void 0:c.get("sentry.sample_rand"))&&void 0!==v?v:null===(y=No(i).scope)||void 0===y?void 0:y.getPropagationContext().sampleRand.toString());return u(h),o.emit("createDsc",h,i),h}function _i(t){return co(yi(t))}function bi(t,e){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:i}=e;!function(t,e){const{extra:n,tags:r,user:o,contexts:i,level:a,transactionName:c}=e;Object.keys(n).length&&(t.extra=(0,s.A)((0,s.A)({},n),t.extra));Object.keys(r).length&&(t.tags=(0,s.A)((0,s.A)({},r),t.tags));Object.keys(o).length&&(t.user=(0,s.A)((0,s.A)({},o),t.user));Object.keys(i).length&&(t.contexts=(0,s.A)((0,s.A)({},i),t.contexts));a&&(t.level=a);c&&"transaction"!==t.type&&(t.transaction=c)}(t,e),r&&function(t,e){t.contexts=(0,s.A)({trace:Ho(e)},t.contexts),t.sdkProcessingMetadata=(0,s.A)({dynamicSamplingContext:yi(e)},t.sdkProcessingMetadata);const n=li(e),r=$o(n).description;r&&!t.transaction&&"transaction"===t.type&&(t.transaction=r)}(t,r),function(t,e){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],e&&(t.fingerprint=t.fingerprint.concat(e));t.fingerprint.length||delete t.fingerprint}(t,n),function(t,e){const n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}(t,o),function(t,e){t.sdkProcessingMetadata=(0,s.A)((0,s.A)({},t.sdkProcessingMetadata),e)}(t,i)}function Si(t,e){const{extra:n,tags:r,attributes:o,user:i,contexts:a,level:c,sdkProcessingMetadata:l,breadcrumbs:u,fingerprint:d,eventProcessors:p,attachments:f,propagationContext:h,transactionName:m,span:g}=e;ki(t,"extra",n),ki(t,"tags",r),ki(t,"attributes",o),ki(t,"user",i),ki(t,"contexts",a),t.sdkProcessingMetadata=Tt(t.sdkProcessingMetadata,l,2),c&&(t.level=c),m&&(t.transactionName=m),g&&(t.span=g),u.length&&(t.breadcrumbs=[...t.breadcrumbs,...u]),d.length&&(t.fingerprint=[...t.fingerprint,...d]),p.length&&(t.eventProcessors=[...t.eventProcessors,...p]),f.length&&(t.attachments=[...t.attachments,...f]),t.propagationContext=(0,s.A)((0,s.A)({},t.propagationContext),h)}function ki(t,e,n){t[e]=Tt(t[e],n,1)}function wi(t,e){const n=Gt().getScopeData();return t&&Si(n,t.getScopeData()),e&&Si(n,e.getScopeData()),n}function Ai(t,e,n,r,o,i){const{normalizeDepth:a=3,normalizeMaxBreadth:c=1e3}=t,l=(0,s.A)((0,s.A)({},e),{},{event_id:e.event_id||n.event_id||ft(),timestamp:e.timestamp||bt()}),u=n.integrations||t.integrations.map((t=>t.name));!function(t,e){const{environment:n,release:r,dist:o,maxValueLength:i}=e;t.environment=t.environment||n||wr,!t.release&&r&&(t.release=r);!t.dist&&o&&(t.dist=o);const s=t.request;null!==s&&void 0!==s&&s.url&&i&&(s.url=ct(s.url,i));var a;i&&(null===(a=t.exception)||void 0===a||null===(a=a.values)||void 0===a||a.forEach((t=>{t.value&&(t.value=ct(t.value,i))})))}(l,t),function(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}(l,u),o&&o.emit("applyFrameMetadata",e),void 0===e.type&&function(t,e){var n;const r=Pr(e);null===(n=t.exception)||void 0===n||null===(n=n.values)||void 0===n||n.forEac
1h((t=>{var e;null===(e=t.stacktrace)||void 0===e||null===(e=e.frames)||void 0===e||e.forEach((t=>{t.filename&&(t.debug_id=r[t.filename])}))}))}(l,t.stackParser);const d=function(t,e){if(!e)return t;const n=t?t.clone():new Pt;return n.update(e),n}(r,n.captureContext);n.mechanism&&vt(l,n.mechanism);const p=o?o.getEventProcessors():[],f=wi(i,d),h=[...n.attachments||[],...f.attachments];h.length&&(n.attachments=h),bi(l,f);const m=[...p,...f.eventProcessors];return(n.data&&!0===n.data.__sentry__?Ar(l):Tr(m,l,n)).then((t=>(t&&function(t){var e;const n={};if(null===(e=t.exception)||void 0===e||null===(e=e.values)||void 0===e||e.forEach((t=>{var e;null===(e=t.stacktrace)||void 0===e||null===(e=e.frames)||void 0===e||e.forEach((t=>{t.debug_id&&(t.abs_path?n[t.abs_path]=t.debug_id:t.filename&&(n[t.filename]=t.debug_id),delete t.debug_id)}))})),0===Object.keys(n).length)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const r=t.debug_meta.images;Object.entries(n).forEach((t=>{let[e,n]=t;r.push({type:"sourcemap",code_file:e,debug_id:n})}))}(t),"number"===typeof a&&a>0?function(t,e,n){var r,o;if(!t)return null;const i=(0,s.A)((0,s.A)((0,s.A)((0,s.A)((0,s.A)({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map((t=>(0,s.A)((0,s.A)({}
1,t),t.data&&{data:ot(t.data,e,n)})))}),t.user&&{user:ot(t.user,e,n)}),t.contexts&&{contexts:ot(t.contexts,e,n)}),t.extra&&{extra:ot(t.extra,e,n)});null!==(r=t.contexts)&&void 0!==r&&r.trace&&i.contexts&&(i.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(i.contexts.trace.data=ot(t.contexts.trace.data,e,n)));t.spans&&(i.spans=t.spans.map((t=>(0,s.A)((0,s.A)({},t),t.data&&{data:ot(t.data,e,n)}))));null!==(o=t.contexts)&&void 0!==o&&o.flags&&i.contexts&&(i.contexts.flags=ot(t.contexts.flags,3,n));return i}(t,a,c):t)))}function xi(t){if(t)return function(t){return t instanceof Pt||"function"===typeof t}(t)||function(t){return Object.keys(t).some((t=>Ei.includes(t)))}(t)?{captureContext:t}:t}const Ei=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Ti(t,e){return Vt().captureException(t,xi(e))}function Ii(t,e){const n="string"===typeof e?e:void 0,r="string"!==typeof e?{captureContext:e}:void 0;return Vt().captureMessage(t,n,r)}function Ci(t,e){return Vt().captureEvent(t,e)}function Ri(t,e){Jt().setContext(t,e)}function Mi(t){Jt().setExtras(t)}function Oi(t,e){Jt().setExtra(t,e)}function Pi(t){Jt().setTags(t)}function Ni(t,e){Jt().setTag(t,e)}function Li(t){Jt().setUser(t)}function Di(t){Jt().setConversationId(t)}function Fi(){return Jt().lastEventId()}async function ji(t){const e=$t();return e?e.flush(t):(p&&_.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function Bi(t){const e=$t();return e?e.close(t):(p&&_.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}function Ui(){return!!$t()}function qi(){const t=$t();return!1!==(null===t||void 0===t?void 0:t.getOptions().enabled)&&!(null===t||void 0===t||!t.getTransport())}function Wi(t){Jt().addEventProcessor(t)}function zi(t){const e=Jt(),{user:n}=wi(e,Vt()),{userAgent:r}=a.navigator||{},o=xt((0,s.A)((0,s.A)({user:n},r&&{userAgent:r}),t)),i=e.getSession();return"ok"===(null===i||void 0===i?void 0:i.status)&&Et(i,{status:"exited"}),Hi(),e.setSession(o),o}function Hi(){const t=Jt(),e=Vt().getSession()||t.getSession();e&&function(t,e){let n={};e?n={status:e}:"ok"===t.status&&(n={status:"exited"}),Et(t,n)}(e),Vi(),t.setSession()}function Vi(){const t=Jt(),e=$t(),n=t.getSession();n&&e&&e.captureSession(n)}function Ji(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]?Hi():Vi()}const Gi=a;let Ki=0;function Yi(){return Ki>0}function $i(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("function"!==typeof t)return t;try{const e=t.__sentry_wrapped__;if(e)return"function"===typeof e?e:t;if(D(t))return t}catch(r){return t}const n=function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];a._sentryWrappedDepth=(a._sentryWrappedDepth||0)+1;try{const n=r.map((t=>$i(t,e)));return t.apply(this,n)}catch(i){throw Ki++,setTimeout((()=>{Ki--})),Kt((t=>{t.addEventProcessor((t=>(e.mechanism&&(gt(t,void 0,void 0),vt(t,e.mechanism)),t.extra=(0,s.A)((0,s.A)({},t.extra),{},{arguments:r}),t))),Ti(i)})),i}finally{a._sentryWrappedDepth=(a._sentryWrappedDepth||0)-1}};try{for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e])}catch(o){}L(n,t),N(t,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>t.name})}catch(i){}return n}function Xi(){const t=te(),{referrer:e}=Gi.document||{},{userAgent:n}=Gi.navigator||{};return{url:t,headers:(0,s.A)((0,s.A)({},e&&{Referer:e}),n&&{"User-Agent":n})}}const Zi=["replayIntegration","replayCanvasIntegration","feedbackIntegration","feedbackModalIntegration","feedbackScreenshotIntegration","captureConsoleIntegration","contextLinesIntegration","linkedErrorsIntegration","dedupeIntegration","extraErrorDataIntegration","graphqlClientIntegration","httpClientIntegration","reportingObserverIntegration","rewriteFramesIntegration","browserProfilingIntegration","moduleMetadataIntegration","instrumentAnthropicAiClient","instrumentOpenAiClient","instrumentGoogleGenAIClient","instrumentLangGraph","createLangChainCallbackHandler","instrumentLangChainEmbeddings"],Qi={replayCanvasIntegration:"replay-canvas",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot"};const ts=Gi;async function es(t,e){const n=Zi.includes(t)?function(t){return Qi[t]||t.replace("Integration","").toLowerCase()}(t):void 0,r=ts.Sentry=ts.Sentry||{};if(!n)throw new Error("Cannot lazy load integration: ".concat(t));const o=r[t];if("function"===typeof o&&!("_isShim"in o))return o;const i=function(t){var e;const n=$t(),r=(null===n||void 0===n||null===(e=n.getOptions())||void 0===e?void 0:e.cdnBaseUrl)||"https://browser.sentry-cdn.com";return new URL("/".concat(c,"/").concat(t,".min.js"),r).toString()}(n),s=Gi.document.createElement("script");
1s.src=i,s.crossOrigin="anonymous",s.referrerPolicy="strict-origin",e&&s.setAttribute("nonce",e);const a=new Promise(((t,e)=>{s.addEventListener("load",(()=>t())),s.addEventListener("error",e)})),l=Gi.document.currentScript,u=Gi.document.body||Gi.document.head||(null===l||void 0===l?void 0:l.parentElement);if(!u)throw new Error("Could not find parent element to insert lazy-loaded ".concat(t," script"));u.appendChild(s);try{await a}catch(p){throw new Error("Error when loading integration: ".concat(t))}const d=r[t];if("function"!==typeof d)throw new Error("Could not load integration: ".concat(t));return d}const ns=$e({lazyLoadIntegration:es}),rs=$e({getModalIntegration:()=>mr,getScreenshotIntegration:()=>kr}),os="7";function is(t){const e=t.protocol?"".concat(t.protocol,":"):"",n=t.port?":".concat(t.port):"";return"".concat(e,"//").concat(t.host).concat(n).concat(t.path?"/".concat(t.path):"","/api/")}function ss(t,e,n){return e||"".concat(function(t){return"".concat(is(t)).concat(t.projectId,"/envelope/")}(t),"?").concat(function(t,e){const n={sentry_version:os};return t.publicKey&&(n.sentry_key=t.publicKey),e&&(n.sentry_client="".concat(e.name,"/").concat(e.version)),new URLSearchParams(n).toString()}(t,n))}function as(t){return[t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]]}function cs(t,e){const[n,r]=t;return[n,[...r,e]]}function ls(t,e){const n=t[1];for(const r of n){if(e(r,r[0].type))return!0}return!1}function us(t,e){return ls(t,((t,n)=>e.includes(n)))}function ds(t){const e=u(a);return e.encodePolyfill?e.encodePolyfill(t):(new TextEncoder).encode(t)}function ps(t){const[e,n]=t;let r=JSON.stringify(e);function o(t){"string"===typeof r?r="string"===typeof t?r+t:[ds(r),t]:r.push("string"===typeof t?ds(t):t)}for(const s of n){const[t,e]=s;if(o("\n".concat(JSON.stringify(t),"\n")),"string"===typeof e||e instanceof Uint8Array)o(e);else{let t;try{t=JSON.stringify(e)}catch(i){t=JSON.stringify(ot(e))}o(t)}}return"string"===typeof r?r:function(t){const e=t.reduce(((t,e)=>t+e.length),0),n=new Uint8Array(e);let r=0;for(const o of t)n.set(o,r),r+=o.length;return n}(r)}function fs(t){let e="string"===typeof t?ds(t):t;function n(t){const n=e.subarray(0,t);return e=e.subarray(t+1),n}function r(){let t=e.indexOf(10);return t<0&&(t=e.length),JSON.parse(function(t){const e=u(a);return e.decodePolyfill?e.decodePolyfill(t):(new TextDecoder).decode(t)}(n(t)))}const o=r(),i=[];for(;e.length;){const t=r(),e="number"===typeof t.length?t.length:void 0;i.push([t,e?n(e):r()])}return[o,i]}function hs(t){return[{type:"span"},t]}function ms(t){const e="string"===typeof t.data?ds(t.data):t.data;return[{type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType},e]}const gs={sessions:"session",event:"error",client_report:"internal",user_report:"default",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",raw_security:"security",log:"log_item",trace_metric:"metric"};function vs(t){return function(t){return t in gs}(t)?gs[t]:t}function ys(t){if(null===t||void 0===t||!t.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function _s(t,e,n,r){var o;const i=null===(o=t.sdkProcessingMetadata)||void 0===o?void 0:o.dynamicSamplingContext;return(0,s.A)((0,s.A)((0,s.A)({event_id:t.event_id,sent_at:(new Date).toISOString()},e&&{sdk:e}),!!n&&r&&{dsn:mo(r)}),i&&{trace:i})}const bs="MULTIPLEXED_TRANSPORT_EXTRA_KEY";function Ss(t,e){let n;return ls(t,((t,r)=>(e.includes(r)&&(n=Array.isArray(t)?t[1]:void 0),!!n))),n}function ks(t,e){return n=>{const r=t(n),o=new Map,i=e||(t=>{var e;const n=t.getEvent();return null!==n&&void 0!==n&&null!==(e=n.extra)&&void 0!==e&&e[bs]&&Array.isArray(n.extra[bs])?n.extra[bs]:[]});function a(e,r){const i=r?"".concat(e,":").concat(r):e;let a=o.get(i);if(!a){const c=go(e);if(!c)return;const l=ss(c,n.tunnel);a=r?function(t,e){return n=>{const r=t(n);return(0,s.A)((0,s.A)({},r),{},{send:async t=>{const n=Ss(t,["event","transaction","profile","replay_event"]);return n&&(n.release=e),r.send(t)}})}}(t,r)((0,s.A)((0,s.A)({},n),{},{url:l})):t((0,s.A)((0,s.A)({},n),{},{url:l})),o.set(i,a)}return[e,a]}return{send:async function(t){const e=i({envelope:t,getEvent:function(e){const n=null!==e&&void 0!==e&&e.length?e:["event"];return Ss(t,n)}}).map((t=>"string"===typeof t?a(t,void 0):a(t.dsn,t.release))).filter((t=>!!t)),n=e.length?e:[["",r]];return(await Promise.all(n.map((e=>{let[n,r]=e;return r.send(function(t,e){return as(e?(0,s.A)((0,s.A)({},t[0]),{},{dsn:e}):t[0],t[1])}(t,n))}
1))))[0]},flush:async function(t){const e=[...o.values(),r];return(await Promise.all(e.map((e=>e.flush(t))))).every((t=>t))}}}}const ws=100;function As(t,e){const n=$t(),r=Jt();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:i=ws}=n.getOptions();if(i<=0)return;const a=bt(),c=(0,s.A)({timestamp:a},t),l=o?m((()=>o(c,e))):c;null!==l&&(n.emit&&n.emit("beforeAddBreadcrumb",l,e),r.addBreadcrumb(l,i))}const xs={},Es={};function Ts(t,e){return xs[t]=xs[t]||[],xs[t].push(e),()=>{const n=xs[t];if(n){const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}}function Is(t,e){if(!Es[t]){Es[t]=!0;try{e()}catch(qn){p&&_.error("Error while instrumenting ".concat(t),qn)}}}function Cs(t,e){const n=t&&xs[t];if(n)for(const r of n)try{r(e)}catch(qn){p&&_.error("Error while triggering instrumentation handler.\nType: ".concat(t,"\nName: ").concat(Z(r),"\nError:"),qn)}}const Rs=new Set([]);function Ms(t){const e="console",n=Ts(e,t);return Is(e,Os),n}function Os(){"console"in a&&f.forEach((function(t){t in a.console&&P(a.console,t,(function(e){return h[t]=e,function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];const o=n[0],i=h[t],s=Rs.size&&"string"===typeof o&&pt(o,Rs);s||Cs("console",{args:n,level:t}),(!s||p&&_.isEnabled())&&(null===i||void 0===i||i.apply(a.console,n))}}))}))}function Ps(t){return"warn"===t?"warning":["fatal","error","warning","log","info","debug"].includes(t)?t:"log"}const Ns=function(){var t;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=e.levels||f,r=null===(t=e.handled)||void 0===t||t;return{name:"CaptureConsole",setup(t){"console"in a&&Ms((e=>{let{args:o,level:i}=e;$t()===t&&n.includes(i)&&function(t,e,n){const r=Ps(e),o=new Error,i={level:Ps(e),extra:{arguments:t}};Kt((s=>{if(s.addEventProcessor((t=>(t.logger="console",vt(t,{handled:n,type:"auto.core.capture_console"}),t))),"assert"===e){if(!t[0]){const e="Assertion failed: ".concat(ut(t.slice(1)," ")||"console.assert");s.setExtra("arguments",t.slice(1)),s.captureMessage(e,r,{captureContext:i,syntheticException:o})}return}const a=t.find((t=>t instanceof Error));if(a)return void Ti(a,i);const c=ut(t," ");s.captureMessage(c,r,{captureContext:i,syntheticException:o})}))}(o,i,r)}))}}};const Ls="sentry.timestamp.sequence";let Ds,Fs=0;function js(t){const e=Math.floor(1e3*t);void 0!==Ds&&e!==Ds&&(Fs=0);const n=Fs;return Fs++,Ds=e,{key:Ls,value:{value:n,type:"integer"}}}function Bs(t,e){return e?Kt(e,(()=>{const n=di(),r=n?Ho(n):Xt(e);return[n?yi(n):vi(t,e),r]})):[void 0,void 0]}const Us={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function qs(t,e){const n=e?"auto":"never";return[{type:"log",item_count:t.length,content_type:"application/vnd.sentry.items.log+json"},(0,s.A)((0,s.A)({version:2},ce()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}}),{},{items:t})]}const Ws=100;function zs(t,e,n){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];!n||t[e]&&!r||(t[e]=n)}function Hs(t,e){const n=Ks(),r=Gs(t);void 0===r?n.set(t,[e]):r.length>=Ws?(Js(t,r),n.set(t,[e])):n.set(t,[...r,e])}function Vs(t){var e,n,r;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Vt(),i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Hs;const a=null!==(e=null===o||void 0===o?void 0:o.getClient())&&void 0!==e?e:$t();if(!a)return void(p&&_.warn("No client available to capture log."));const{release:c,environment:l,enableLogs:u=!1,beforeSendLog:d}=a.getOptions();if(!u)return void(p&&_.warn("logging option not enabled, log will not be captured."));const[,f]=Bs(a,o),h=(0,s.A)({},t.attributes),{user:{id:g,email:v,username:y},attributes:b={}}=wi(Jt(),o);zs(h,"user.id",g,!1),zs(h,"user.email",v,!1),zs(h,"user.name",y,!1),zs(h,"sentry.release",c),zs(h,"sentry.environment",l);const{name:S,version:k}=null!==(n=null===(r=a.getSdkMetadata())||void 0===r?void 0:r.sdk)&&void 0!==n?n:{};zs(h,"sentry.sdk.name",S),zs(h,"sentry.sdk.version",k);const w=a.getIntegrationByName("Replay"),A=null===w||void 0===w?void 0:w.getReplayId(!0);zs(h,"sentry.replay_id",A),A&&"buffer"===(null===w||void 0===w?void 0:w.getRecordingMode())&&zs(h,"sentry._internal.replay_is_buffering",!0);const x=t.message;
1if(E(x)){const{__sentry_template_string__:t,__sentry_template_values__:e=[]}=x;null!==e&&void 0!==e&&e.length&&(h["sentry.message.template"]=t),e.forEach(((t,e)=>{h["sentry.message.parameter.".concat(e)]=t}))}const T=Ot(o);zs(h,"sentry.trace.parent_span_id",null===T||void 0===T?void 0:T.spanContext().spanId);const I=(0,s.A)((0,s.A)({},t),{},{attributes:h});a.emit("beforeCaptureLog",I);const C=d?m((()=>d(I))):I;if(!C)return a.recordDroppedEvent("before_send","log_item",1),void(p&&_.warn("beforeSendLog returned null, log will not be captured."));const{level:R,message:M,attributes:O={},severityNumber:P}=C,N=kt(),L=js(N);i(a,{timestamp:N,level:R,body:$s(String(M)),trace_id:null===f||void 0===f?void 0:f.trace_id,severity_number:null!==P&&void 0!==P?P:Us[R],attributes:Ys((0,s.A)((0,s.A)((0,s.A)({},ko(b)),ko(O,!0)),{},{[L.key]:L.value}))}),a.emit("afterCaptureLog",C)}function Js(t,e){var n;const r=null!==(n=null!==e&&void 0!==e?e:Gs(t))&&void 0!==n?n:[];if(0===r.length)return;const o=t.getOptions(),i=function(t,e,n,r,o){const i={};return null!==e&&void 0!==e&&e.sdk&&(i.sdk={name:e.sdk.name,version:e.sdk.version}),n&&r&&(i.dsn=mo(r)),as(i,[qs(t,o)])}(r,o._metadata,o.tunnel,t.getDsn(),t.getDataCollectionOptions().userInfo);Ks().set(t,[]),t.emit("flushLogs"),t.sendEnvelope(i)}function Gs(t){return Ks().get(t)}function Ks(){return d("clientToLogBufferMap",(()=>new WeakMap))}function Ys(t){const e={};for(const[n,r]of Object.entries(t)){const t=$s(n);"string"===r.type?e[t]=(0,s.A)((0,s.A)({},r),{},{value:$s(r.value)}):e[t]=r}return e}function $s(t){const e=Object(t),n=e.isWellFormed,r=e.toWellFormed;return"function"===typeof n&&"function"===typeof r?n.call(t)?t:r.call(t):t}function Xs(t,e,n){return"util"in a&&"function"===typeof a.util.format?a.util.format(...t):function(t,e,n){return t.map((t=>T(t)?String(t):JSON.stringify(ot(t,e,n)))).join(" ")}(t,e,n)}function Zs(t){return/%[sdifocO]/.test(t)}function Qs(t,e){const n={},r=new Array(e.length).fill("{}").join(" ");return n["sentry.message.template"]="".concat(t," ").concat(r),e.forEach(((t,e)=>{n["sentry.message.parameter.".concat(e)]=t})),n}const ta={[jr]:"auto.log.console"},ea=function(){const t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).levels||f;return{name:"ConsoleLogs",setup(e){const{enableLogs:n,normalizeDepth:r=3,normalizeMaxBreadth:o=1e3}=e.getOptions();if(!n)return void(p&&_.warn("`enableLogs` is not enabled, ConsoleLogs integration disabled"));const i=Ms((n=>{let{args:i,level:a}=n;if($t()!==e||!t.includes(a))return;const c=i[0],l=i.slice(1);if("assert"===a){if(!c){Vs({level:"error",message:l.length>0?"Assertion failed: ".concat(Xs(l,r,o)):"Assertion failed",attributes:ta})}return}const u="log"===a,d=i.length>1&&"string"===typeof i[0]&&!Zs(i[0]),p=(0,s.A)((0,s.A)({},ta),d?Qs(c,l):{});Vs({level:u?"info":a,message:Xs(i,r,o),severityNumber:u?10:void 0,attributes:p})}));e.registerCleanup(i)}}};function na(t,e){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:()=>{};try{n=t()}catch(qn){throw e(qn),r(),qn}return function(t,e,n,r){if(R(t))return Dt(t,(t=>{n(),r(t)}),(t=>{e(t),n()}));return n(),r(t),t}(n,e,r,o)}function ra(t){_.log("Ignoring span ".concat(t.op," - ").concat(t.description," because it matches `ignoreSpans`."))}function oa(t,e){if(null===e||void 0===e||!e.length)return!1;for(const r of e){if("string"===typeof(n=r)||n instanceof RegExp){if(t.description&&dt(t.description,r))return p&&ra(t),!0;continue}const e=!!r.attributes&&Object.keys(r.attributes).length>0;if(!r.name&&!r.op&&!e)continue;const o=!r.name||t.description&&dt(t.description,r.name),i=!r.op||t.op&&dt(t.op,r.op),s=!r.attributes||Object.entries(r.attributes).every((e=>{var n;let[r,o]=e;return ia(null===(n=t.attributes)||void 0===n?void 0:n[r],o)}));if(o&&i&&s)return p&&ra(t),!0}var n;return!1}function ia(t,e){return"string"===typeof t&&("string"===typeof e||e instanceof RegExp)?dt(t,e):Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every(((t,n)=>t===e[n])):t===e}function sa(t,e){const n=e.parent_span_id,r=e.span_id;if(n)for(const o of t)o.parent_span_id===r&&(o.parent_span_id=n)}function aa(t){return"stream"===t.getOptions().traceLifecycle}class ca{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._traceId=t.traceId||It(),this._spanId=t.spanId||Ct(),this.dropReason=t.dropReason}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(t){}setAttribute(t,e){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}
1addEvent(t,e,n){return this}addLink(t){return this}addLinks(t){return this}recordException(t,e){}}function la(t){return N(t,"_streamed",!0),t}function ua(t){return!!t&&"function"===typeof t&&"_streamed"in t&&!!t._streamed}function da(t,e,n,r){const o=ys(n),i=t.type&&"replay_event"!==t.type?t.type:"event";!function(t,e){var n,r,o,i;if(!e)return t;const a=t.sdk||{};t.sdk=(0,s.A)((0,s.A)({},a),{},{name:a.name||e.name,version:a.version||e.version,integrations:[...(null===(n=t.sdk)||void 0===n?void 0:n.integrations)||[],...e.integrations||[]],packages:[...(null===(r=t.sdk)||void 0===r?void 0:r.packages)||[],...e.packages||[]],settings:null!==(o=t.sdk)&&void 0!==o&&o.settings||e.settings?(0,s.A)((0,s.A)({},null===(i=t.sdk)||void 0===i?void 0:i.settings),e.settings):void 0})}(t,null===n||void 0===n?void 0:n.sdk);const a=_s(t,o,r,e);delete t.sdkProcessingMetadata;return as(a,[[{type:i},t]])}function pa(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:di();const o=r&&li(r);o&&(p&&_.log("[Measurement] Setting measurement on root span: ".concat(t," = ").concat(e," ").concat(n)),o.addEvent(t,{[qr]:e,[Ur]:n}))}function fa(t){if(!t||0===t.length)return;const e={};return t.forEach((t=>{const n=t.attributes||{},r=n[Ur],o=n[qr];"string"===typeof r&&"number"===typeof o&&(e[t.name]={value:o,unit:r})})),e}class ha{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._traceId=t.traceId||It(),this._spanId=t.spanId||Ct(),this._startTime=t.startTimestamp||kt(),this._links=t.links,this._attributes={},this.setAttributes((0,s.A)({[jr]:"manual",[Fr]:t.op},t.attributes)),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this._links?this._links.push(t):this._links=[t],this}addLinks(t){return this._links?this._links.push(...t):this._links=t,this}recordException(t,e){}spanContext(){const{_spanId:t,_traceId:e,_sampled:n}=this;return{spanId:t,traceId:e,traceFlags:n?qo:0}}setAttribute(t,e){return void 0===e?delete this._attributes[t]:this._attributes[t]=e,this}setAttributes(t){return Object.keys(t).forEach((e=>this.setAttribute(e,t[e]))),this}updateStartTime(t){this._startTime=Ko(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(Nr,"custom"),this}end(t){this._endTime||(this._endTime=Ko(t),function(t){if(!p)return;const{description:e="< unknown name >",op:n="< unknown op >"}=$o(t),{spanId:r}=t.spanContext(),o=li(t)===t,i='[Tracing] Finishing "'.concat(n,'" ').concat(o?"root ":"",'span "').concat(e,'" with ID ').concat(r);_.log(i)}(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[Fr],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:ri(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[jr],profile_id:this._attributes[to],exclusive_time:this._attributes[eo],measurements:fa(this._events),is_segment:this._isStandaloneSpan&&li(this)===this||void 0,segment_id:this._isStandaloneSpan?li(this).spanContext().spanId:void 0,links:Jo(this._links)}}getStreamedSpanJSON(){var t,e;return{name:null!==(t=this._name)&&void 0!==t?t:"",span_id:this._spanId,trace_id:this._traceId,parent_span_id:this._parentSpanId,start_timestamp:this._startTime,end_timestamp:null!==(e=this._endTime)&&void 0!==e?e:this._startTime,is_segment:this._isStandaloneSpan||this===li(this),status:oi(this._status),attributes:this._attributes,links:Go(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,e,n){p&&_.log("[Tracing] Adding an event to span:",t);const r=ma(e)?e:n||kt(),o=ma(e)?{}:e||{},i={name:t,time:Ko(r),attributes:o};return this._events.push(i),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=$t();t&&(t.emit("spanEnd",this),this._isStandaloneSpan||t.emit("afterSpanEnd",this));if(!(this._isStandaloneSpan||this===li(this)))return;if(this._isStandaloneSpan)return void(this._sampled?function(t){const e=$t();if(!e)return;const n=t[1];
1if(!n||0===n.length)return void e.recordDroppedEvent("before_send","span");e.sendEnvelope(t)}(function(t,e){const n=yi(t[0]),r=null===e||void 0===e?void 0:e.getDsn(),o=null===e||void 0===e?void 0:e.getOptions().tunnel,i=(0,s.A)((0,s.A)({sent_at:(new Date).toISOString()},!!(a=n).trace_id&&!!a.public_key&&{trace:n}),!!o&&r&&{dsn:mo(r)});var a;const{beforeSendSpan:c,ignoreSpans:l}=(null===e||void 0===e?void 0:e.getOptions())||{},u=null!==l&&void 0!==l&&l.length?t.filter((t=>{const e=$o(t);return!oa({description:e.description,op:e.op,attributes:e.data},l)})):t,d=t.length-u.length;d&&(null===e||void 0===e||e.recordDroppedEvent("before_send","span",d));const p=c?t=>{const e=$o(t);return(ua(c)?e:c(e))||(pi(),e)}:$o,f=[];for(const s of u){const t=p(s);t&&f.push(hs(t))}return as(i,f)}([this],t)):(p&&_.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span")));if(t&&aa(t))return void t.emit("afterSegmentSpanEnd",this);const e=this._convertSpanToTransaction();if(e){(No(this).scope||Vt()).captureEvent(e)}}_convertSpanToTransaction(){var t;if(!ga($o(this)))return;this._name||(p&&_.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:e,isolationScope:n}=No(this),r=null===e||void 0===e||null===(t=e.getScopeData().sdkProcessingMetadata)||void 0===t?void 0:t.normalizedRequest;if(!0!==this._sampled)return;const o=ci(this).filter((t=>t!==this&&!function(t){return t instanceof ha&&t.isStandaloneSpan()}(t))).map((t=>$o(t))).filter(ga),i=this._attributes[Nr];delete this._attributes[Qr];let a=!1;o.forEach((t=>{var e;delete t.data[Qr],null!==(e=t.op)&&void 0!==e&&e.startsWith("gen_ai.")&&(a=!0)}));const c=(0,s.A)({contexts:{trace:zo(this)},spans:o.length>1e3?o.sort(((t,e)=>t.start_timestamp-e.start_timestamp)).slice(0,1e3):o,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:n,dynamicSamplingContext:yi(this),hasGenAiSpans:a},request:r},i&&{transaction_info:{source:i}}),l=fa(this._events);return l&&Object.keys(l).length&&(p&&_.log("[Measurements] Adding measurements to transaction event",JSON.stringify(l,void 0,2)),c.measurements=l),c}}function ma(t){return t&&"number"===typeof t||t instanceof Date||Array.isArray(t)}function ga(t){return!!t.start_timestamp&&!!t.timestamp&&!!t.span_id&&!!t.trace_id}const va="__SENTRY_SUPPRESS_TRACING__";function ya(t,e){const n=Ta();if(n.startSpan)return n.startSpan(t,e);const r=Ea(t),{forceTransaction:o,parentSpan:i,scope:s}=t;return Kt(null===s||void 0===s?void 0:s.clone(),(()=>Ra(i)((()=>{const n=Vt(),s=Ca(n,i),a=$t(),c=t.onlyIfParent&&!s,l=c?new ca:xa({parentSpan:s,spanArguments:r,forceTransaction:o,scope:n});return c&&(null===a||void 0===a||a.recordDroppedEvent("no_parent_span","span")),Ma(l)&&s||Mt(n,l),na((()=>e(l)),(()=>{const{status:t}=$o(l);!l.isRecording()||t&&"ok"!==t||l.setStatus({code:To,message:"internal_error"})}),(()=>{l.end()}))}))))}function _a(t,e){const n=Ta();if(n.startSpanManual)return n.startSpanManual(t,e);const r=Ea(t),{forceTransaction:o,parentSpan:i,scope:s}=t;return Kt(null===s||void 0===s?void 0:s.clone(),(()=>Ra(i)((()=>{const n=Vt(),s=Ca(n,i),a=t.onlyIfParent&&!s,c=a?new ca:xa({parentSpan:s,spanArguments:r,forceTransaction:o,scope:n});var l;a&&(null===(l=$t())||void 0===l||l.recordDroppedEvent("no_parent_span","span"));return Ma(c)&&s||Mt(n,c),na((()=>e(c,(()=>c.end()))),(()=>{const{status:t}=$o(c);!c.isRecording()||t&&"ok"!==t||c.setStatus({code:To,message:"internal_error"})}))}))))}function ba(t){const e=Ta();if(e.startInactiveSpan)return e.startInactiveSpan(t);const n=Ea(t),{forceTransaction:r,parentSpan:o}=t;return(t.scope?e=>Kt(t.scope,e):void 0!==o?t=>ka(o,t):t=>t())((()=>{const e=Vt(),i=Ca(e,o),s=$t();return t.onlyIfParent&&!i?(null===s||void 0===s||s.recordDroppedEvent("no_parent_span","span"),new ca):xa({parentSpan:i,spanArguments:n,forceTransaction:r,scope:e})}))}const Sa=(t,e)=>{const n=zt(l());if(n.continueTrace)return n.continueTrace(t,e);const{sentryTrace:r,baggage:o}=t,i=$t(),s=ao(o);return i&&!function(t,e){const n=yo(t);return e&&n&&e!==n?(_.log("Won't continue trace because org IDs don't match (incoming baggage: ".concat(e,", SDK options: ").concat(n,")")),!1):!t.getOptions().strictTraceContinuation||!(e&&!n||!e&&n)||(_.log("Starting a new trace because strict trace continuation is enabled but one org ID is missing (incoming baggage: ".concat(e,", Sentry client: ").concat(n,")")),!1)}(i,null===s||void 0===s?void 0:s.org_id)?Aa(e):Kt((t=>{const n=Fo(r,o);return t.setPropagationContext(n),Mt(t,void 0),e()}))};function ka(t,e){const n=Ta();return n.withActiveSpan?n.withActiveSpan(t,e):Kt((n=>(Mt(n,t||void 0),e(n))))}function wa(t){const e=Ta();return e.suppressTracing?e.suppressTracing(t):Kt((e=>{e.setSDKProcessingMetadata({[va]:!0});const n=t();return e.setSDKProcessingMetadata({[va]:void 0}),n}))}function Aa(t){const e=Ta();return e.startNewTrace?e.startNewTrace(t):Kt((e=>(e.setPropagationContext({traceId:It(),sampleRand:q()}
1),p&&_.log("Starting a new trace with id ".concat(e.getPropagationContext().traceId)),ka(null,t))))}function xa(t){let{parentSpan:e,spanArguments:n,forceTransaction:r,scope:o}=t;if(!bo()){const t=new ca;if(r||!e){mi(t,(0,s.A)({sampled:"false",sample_rate:"0",transaction:n.name},yi(t)))}return t}const i=$t();var a;if(function(t,e){var n;const r=null===t||void 0===t?void 0:t.getOptions().ignoreSpans;if(!t||!aa(t)||null===r||void 0===r||!r.length)return!1;return oa({description:e.name||"",op:(null===(n=e.attributes)||void 0===n?void 0:n[Fr])||e.op,attributes:e.attributes},r)}(i,n))return Oa(o)||null===i||void 0===i||i.recordDroppedEvent("ignored","span"),new ca({dropReason:"ignored",traceId:null!==(a=null===e||void 0===e?void 0:e.spanContext().traceId)&&void 0!==a?a:o.getPropagationContext().traceId});const c=Jt();let l;if(e&&!r)l=function(t,e,n){const{spanId:r,traceId:o}=t.spanContext(),i=Oa(e),a=!i&&ni(t),c=a?new ha((0,s.A)((0,s.A)({},n),{},{parentSpanId:r,traceId:o,sampled:a})):new ca({traceId:o});ai(t,c);const l=$t();if(!l)return c;aa(l)&&c instanceof ca&&(t instanceof ca&&t.dropReason?(c.dropReason=t.dropReason,l.recordDroppedEvent(t.dropReason,"span")):i||(c.dropReason="sample_rate",l.recordDroppedEvent("sample_rate","span")));l.emit("spanStart",c),n.endTimestamp&&(l.emit("spanEnd",c),l.emit("afterSpanEnd",c));return c}(e,o,n),ai(e,l);else if(e){const t=yi(e),{traceId:r,spanId:i}=e.spanContext(),a=ni(e);l=Ia((0,s.A)({traceId:r,parentSpanId:i},n),o,a),mi(l,t)}else{const{traceId:t,dsc:e,parentSpanId:r,sampled:i}=(0,s.A)((0,s.A)({},c.getPropagationContext()),o.getPropagationContext());l=Ia((0,s.A)({traceId:t,parentSpanId:r},n),o,i),e&&mi(l,e)}return function(t){if(!p)return;const{description:e="< unknown name >",op:n="< unknown op >",parent_span_id:r}=$o(t),{spanId:o}=t.spanContext(),i=ni(t),s=li(t),a=s===t,c="[Tracing] Starting ".concat(i?"sampled":"unsampled"," ").concat(a?"root ":"","span"),l=["op: ".concat(n),"name: ".concat(e),"ID: ".concat(o)];if(r&&l.push("parent ID: ".concat(r)),!a){const{op:t,description:e}=$o(s);l.push("root ID: ".concat(s.spanContext().spanId)),t&&l.push("root op: ".concat(t)),e&&l.push("root description: ".concat(e))}_.log("".concat(c,"\n  ").concat(l.join("\n  ")))}(l),Po(l,o,c),l}function Ea(t){const e=t.experimental||{},n=(0,s.A)({isStandalone:e.standalone},t);if(t.startTime){const e=(0,s.A)({},n);return e.startTimestamp=Ko(t.startTime),delete e.startTime,e}return n}function Ta(){return zt(l())}function Ia(t,e,n){var r,o;const i=$t(),a=(null===i||void 0===i?void 0:i.getOptions())||{},{name:c=""}=t,l={spanAttributes:(0,s.A)({},t.attributes),spanName:c,parentSampled:n};null===i||void 0===i||i.emit("beforeSampling",l,{decision:!1});const u=null!==(r=l.parentSampled)&&void 0!==r?r:n,d=l.spanAttributes,f=e.getPropagationContext(),h=Oa(e),[m,g,v]=h?[!1]:function(t,e,n){if(!bo(t))return[!1];let r,o;"function"===typeof t.tracesSampler?(o=t.tracesSampler((0,s.A)((0,s.A)({},e),{},{inheritOrSampleWith:t=>"number"===typeof e.parentSampleRate?e.parentSampleRate:"boolean"===typeof e.parentSampled?Number(e.parentSampled):t})),r=!0):void 0!==e.parentSampled?o=e.parentSampled:"undefined"!==typeof t.tracesSampleRate&&(o=t.tracesSampleRate,r=!0);const i=Lo(o);if(void 0===i)return p&&_.warn("[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ".concat(JSON.stringify(o)," of type ").concat(JSON.stringify(typeof o),".")),[!1];if(!i)return p&&_.log("[Tracing] Discarding transaction because ".concat("function"===typeof t.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),[!1,i,r];const a=n<i;return a||p&&_.log("[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ".concat(Number(o),")")),[a,i,r]}(a,{name:c,parentSampled:u,attributes:d,parentSampleRate:Lo(null===(o=f.dsc)||void 0===o?void 0:o.sample_rate)},f.sampleRand),y=new ha((0,s.A)((0,s.A)({},t),{},{attributes:(0,s.A)({[Nr]:"custom",[Lr]:void 0!==g&&v?g:void 0},d),sampled:m}));return m||!i||h||(p&&_.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),i.recordDroppedEvent("sample_rate",aa(i)?"span":"transaction")),i&&i.emit("spanStart",y),y}function Ca(t,e){if(e)return e;if(null===e)return;const n=Ot(t);if(!n)return;const r=$t();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?li(n):n}function Ra(t){return void 0!==t?e=>ka(t,e):t=>t()}function Ma(t){return t instanceof ca&&"ignored"===t.dropReason}function Oa(t){return!0===t.getScopeData().sdkProcessingMetadata[va]}const Pa=["type","level","message","args","tag","date"],Na=["trace","debug","info","warn","error","fatal"];function La(){var t;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new Set(null!==(t=e.levels)&&void 0!==t?t:Na),r=e.client;return{log(t){const{type:e,level:o,message:a,args:c,tag:l,date:u}=t,d=(0,i.A)(t,Pa),p=r||$t();if(!p)return;const f=function(t,e){if("verbose"===t)return"debug";if("silent"===t)return"trace";if(t){const e=Da[t];if(e)return e}if("number"===typeof e){const t=Fa[e];if(t)return t}return"info"}(e,o);if(!n.has(f))return;const{normalizeDepth:h=3,normalizeMaxBreadth:m=1e3}=p.getOptions(),g={};for(const[n,r]of Object.entries(d))g[n]=ot(r,h,m);g["sentry.origin"]="auto.log.consola",l&&(g["consola.tag"]=l),e&&(g["consola.type"]=e),null!=o&&"number"===typeof o&&(g["consola.level"]=o);const v=function(t,e,n){const{message:r,attributes:o,messageTemplate:i,messageParameters:a}=t,c={};if(i&&a){const t=Qs(i,a);for(const[r,o]of Object.entries(t))c[r]=r.startsWith("sentry.message.parameter.")?ot(o,e,n):o}else a&&a.length>0&&a.forEach(((t,r)=>{c["sentry.message.parameter.".concat(r)]=ot(t,e,n)}
1));return{message:r,attributes:(0,s.A)((0,s.A)({},ot(o,e,n)),c)}}(function(t,e,n){if(null===t||void 0===t||!t.length)return{message:""};const r=Xs(t,e,n),o=t[0];if(I(o)){const e="string"===typeof t[1]?2:1;return{message:r,attributes:o,messageParameters:t.slice(e)}}{const e=t.slice(1),n=e.length>0&&"string"===typeof o&&!Zs(o);return{message:r,messageTemplate:n?o:void 0,messageParameters:n?e:void 0}}}(c,h,m),h,m);null!==v&&void 0!==v&&v.attributes&&Object.assign(g,v.attributes),Vs({level:f,message:(null===v||void 0===v?void 0:v.message)||a||c&&Xs(c,h,m)||"",attributes:g})}}}const Da={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"},Fa={0:"fatal",1:"warn",2:"info",3:"info",4:"debug",5:"trace"};const ja="gen_ai.prompt",Ba="gen_ai.system",Ua="gen_ai.request.model",qa="gen_ai.request.stream",Wa="gen_ai.request.temperature",za="gen_ai.request.max_tokens",Ha="gen_ai.request.frequency_penalty",Va="gen_ai.request.presence_penalty",Ja="gen_ai.request.top_p",Ga="gen_ai.request.top_k",Ka="gen_ai.request.encoding_format",Ya="gen_ai.request.dimensions",$a="gen_ai.response.finish_reasons",Xa="gen_ai.response.model",Za="gen_ai.response.id",Qa="gen_ai.response.stop_reason",tc="gen_ai.usage.input_tokens",ec="gen_ai.usage.output_tokens",nc="gen_ai.usage.total_tokens",rc="gen_ai.operation.name",oc="sentry.sdk_meta.gen_ai.input.messages.original_length",ic="gen_ai.input.messages",sc="gen_ai.system_instructions",ac="gen_ai.response.text",cc="gen_ai.request.available_tools",lc="gen_ai.response.streaming",uc="gen_ai.response.tool_calls",dc="gen_ai.agent.name",pc="gen_ai.pipeline.name",fc="gen_ai.conversation.id",hc="gen_ai.usage.cache_creation_input_tokens",mc="gen_ai.usage.cache_read_input_tokens",gc="gen_ai.invoke_agent",vc="gen_ai.embeddings.input",yc="gen_ai.embeddings",_c="gen_ai.execute_tool",bc="gen_ai.tool.name",Sc="gen_ai.tool.call.id",kc="gen_ai.tool.type",wc="gen_ai.tool.input",Ac="gen_ai.tool.output",xc="gen_ai.tool.description";function Ec(t){return!(!t||"object"!==typeof t)&&(function(t){return"type"in t&&"string"===typeof t.type&&"source"in t&&Ec(t.source)}(t)||Ic(t)||function(t){return"image_url"in t&&("string"===typeof t.image_url?t.image_url.startsWith("data:"):Tc(t))}(t)||Cc(t)||Rc(t)||function(t){return"media_type"in t&&"string"===typeof t.media_type&&"data"in t}(t)||function(t){return"type"in t&&"file"===t.type&&"mediaType"in t&&"string"===typeof t.mediaType&&"data"in t&&"string"===typeof t.data&&!t.data.startsWith("http://")&&!t.data.startsWith("https://")}(t)||function(t){return"type"in t&&"image"===t.type&&"image"in t&&"string"===typeof t.image&&!t.image.startsWith("http://")&&!t.image.startsWith("https://")}(t)||function(t){return"type"in t&&("blob"===t.type||"base64"===t.type)}(t)||function(t){return"b64_json"in t}(t)||function(t){return"type"in t&&"result"in t&&"image_generation"===t.type}(t)||function(t){return"uri"in t&&"string"===typeof t.uri&&t.uri.startsWith("data:")}(t))}function Tc(t){return"image_url"in t&&!!t.image_url&&"object"===typeof t.image_url&&"url"in t.image_url&&"string"===typeof t.image_url.url&&t.image_url.url.startsWith("data:")}function Ic(t){return"inlineData"in t&&!!t.inlineData&&"object"===typeof t.inlineData&&"data"in t.inlineData&&"string"===typeof t.inlineData.data}function Cc(t){return"type"in t&&"input_audio"===t.type&&"input_audio"in t&&!!t.input_audio&&"object"===typeof t.input_audio&&"data"in t.input_audio&&"string"===typeof t.input_audio.data}function Rc(t){return"type"in t&&"file"===t.type&&"file"in t&&!!t.file&&"object"===typeof t.file&&"file_data"in t.file&&"string"===typeof t.file.file_data}const Mc="[Blob substitute]",Oc=["image_url","data","content","b64_json","result","uri","image"];function Pc(t){const e=(0,s.A)({},t);Ec(e.source)&&(e.source=Pc(e.source)),Ic(t)&&(e.inlineData=(0,s.A)((0,s.A)({},t.inlineData),{},{data:Mc})),Tc(t)&&(e.image_url=(0,s.A)((0,s.A)({},t.image_url),{},{url:Mc})),Cc(t)&&(e.input_audio=(0,s.A)((0,s.A)({},t.input_audio),{},{data:Mc})),Rc(t)&&(e.file=(0,s.A)((0,s.A)({},t.file),{},{file_data:Mc}));for(const n of Oc)"string"===typeof e[n]&&(e[n]=Mc);return e}const Nc=2e4,Lc=t=>(new TextEncoder).encode(t).length,Dc=t=>Lc(JSON.stringify(t));function Fc(t,e){if(Lc(t)<=e)return t;let n=0,r=t.length,o="";for(;n<=r;){const i=Math.floor((n+r)/2),s=t.slice(0,i);Lc(s)<=e?(o=s,n=i+1):r=i-1}return o}function jc(t){return"string"===typeof t?t:"text"in t&&"string"===typeof t.text?t.text:""}function Bc(t,e){return"string"===typeof t?e:(0,s.A)((0,s.A)({},t),{},{text:e})}function Uc(t){return null!==t&&"object"===typeof t&&"content"in t&&Array.isArray(t.content)}function qc(t){return null!==t&&"object"===typeof t&&"parts"in t&&Array.isArray(t.parts)&&t.parts.length>0}function Wc(t,e){const{key:n,items:r}=function(t){return"parts"in t&&Array.isArray(t.parts)?{key:"parts",items:t.parts}
1:"content"in t&&Array.isArray(t.content)?{key:"content",items:t.content}:{key:null,items:[]}}(t);if(null===n||0===r.length)return[];const o=r.map((t=>Bc(t,"")));let i=e-Dc((0,s.A)((0,s.A)({},t),{},{[n]:o}));if(i<=0)return[];const a=[];for(const s of r){const t=jc(s),e=Lc(t);if(!(e<=i)){if(0===a.length){const e=Fc(t,i);e&&a.push(Bc(s,e));break}break}a.push(s),i-=e}return a.length<=0?[]:[(0,s.A)((0,s.A)({},t),{},{[n]:a})]}function zc(t,e){if(!t)return[];if("string"===typeof t){const n=Fc(t,e);return n?[n]:[]}return"object"!==typeof t?[]:function(t){return null!==t&&"object"===typeof t&&"content"in t&&"string"===typeof t.content}(t)?function(t,e){const n=(0,s.A)((0,s.A)({},t),{},{content:""}),r=e-Dc(n);if(r<=0)return[];const o=Fc(t.content,r);return[(0,s.A)((0,s.A)({},t),{},{content:o})]}(t,e):Uc(t)||qc(t)?Wc(t,e):[]}function Hc(t){return t.map((t=>{var e;let n;if(t&&"object"===typeof t){var r;if(Uc(t)?n=(0,s.A)((0,s.A)({},t),{},{content:Hc(t.content)}):"content"in t&&Ec(t.content)&&(n=(0,s.A)((0,s.A)({},t),{},{content:Pc(t.content)})),qc(t))n=(0,s.A)((0,s.A)({},null!==(r=n)&&void 0!==r?r:t),{},{parts:Hc(t.parts)});Ec(n)?n=Pc(n):Ec(t)&&(n=Pc(t))}return null!==(e=n)&&void 0!==e?e:t}))}function Vc(t,e){if(!Array.isArray(t)||0===t.length)return t;const n=e-2,r=Hc([t[t.length-1]]),o=r[0];return Dc(o)<=n?r:zc(o,n)}function Jc(t){var e,n,r;const o=Boolean(null===(e=$t())||void 0===e?void 0:e.getOptions().sendDefaultPii);return(0,s.A)((0,s.A)({},t),{},{recordInputs:null!==(n=null===t||void 0===t?void 0:t.recordInputs)&&void 0!==n?n:o,recordOutputs:null!==(r=null===t||void 0===t?void 0:t.recordOutputs)&&void 0!==r?r:o})}function Gc(t){const e=$t();return null!==t&&void 0!==t?t:!(e&&aa(e))}function Kc(t,e){return t?"".concat(t,".").concat(e):e}function Yc(t,e,n){if(!t.isRecording())return;const r={[lc]:!0};if(e.responseId&&(r[Za]=e.responseId),e.responseModel&&(r[Xa]=e.responseModel),void 0!==e.promptTokens&&(r[tc]=e.promptTokens),void 0!==e.completionTokens&&(r[ec]=e.completionTokens),void 0!==e.totalTokens)r[nc]=e.totalTokens;else if(void 0!==e.promptTokens||void 0!==e.completionTokens||void 0!==e.cacheCreationInputTokens||void 0!==e.cacheReadInputTokens){var o,i,s,a;r[nc]=(null!==(o=e.promptTokens)&&void 0!==o?o:0)+(null!==(i=e.completionTokens)&&void 0!==i?i:0)+(null!==(s=e.cacheCreationInputTokens)&&void 0!==s?s:0)+(null!==(a=e.cacheReadInputTokens)&&void 0!==a?a:0)}e.finishReasons.length&&(r[$a]=JSON.stringify(e.finishReasons)),n&&e.responseTexts.length&&(r[ac]=e.responseTexts.join("")),n&&e.toolCalls.length&&(r[uc]=JSON.stringify(e.toolCalls)),t.setAttributes(r),t.end()}function $c(t){return"string"===typeof t?t:JSON.stringify(t)}function Xc(t){if("string"===typeof t)return Fc(t,Nc);if(Array.isArray(t)){const e=Vc(t,Nc);return JSON.stringify(e)}return JSON.stringify(t)}function Zc(t){if(!Array.isArray(t))return{systemInstructions:void 0,filteredMessages:t};const e=t.findIndex((t=>t&&"object"===typeof t&&"role"in t&&"system"===t.role));if(-1===e)return{systemInstructions:void 0,filteredMessages:t};const n=t[e],r="string"===typeof n.content?n.content:void 0!==n.content?JSON.stringify(n.content):void 0;if(!r)return{systemInstructions:void 0,filteredMessages:t};return{systemInstructions:JSON.stringify([{type:"text",content:r}]),filteredMessages:[...t.slice(0,e),...t.slice(e+1)]}}function Qc(t,e,n){return R(t)?new Proxy(t,{get(t,r){const o=r in Promise.prototype||r===Symbol.toStringTag?e:t,i=Reflect.get(o,r);return"withResponse"===r&&"function"===typeof i?function(){return async function(t,e,n){const r=t.catch((t=>{throw Ti(t,{mechanism:{handled:!1,type:n}}),t})),o=await e,i=await r;return i&&"object"===typeof i&&"data"in i?(0,s.A)((0,s.A)({},i),{},{data:o}):o}(i.call(t),e,n)}:"function"===typeof i?i.bind(o):i}}):e}const tl="auto.ai.langchain",el={human:"user",ai:"assistant",assistant:"assistant",system:"system",function:"function",tool:"tool"},nl=(t,e,n)=>{null!=n&&(t[e]=n)},rl=(t,e,n)=>{const r=Number(n);Number.isNaN(r)||(t[e]=r)};function ol(t){if("string"===typeof t)return t;try{return JSON.stringify(t)}catch(e){return String(t)}}function il(t){if(Array.isArray(t))try{const e=t.map((t=>t&&"object"===typeof t&&Ec(t)?Pc(t):t));return JSON.stringify(e)}catch(e){return String(t)}return ol(t)}function sl(t){var e;const n=t.toLowerCase();return null!==(e=el[n])&&void 0!==e?e:n}function al(t){return t.includes("System")?"system":t.includes("Human")?"user":t.includes("AI")||t.includes("Assistant")?"assistant":t.includes("Function")?"function":t.includes("Tool")?"tool":"user"}function cl(t){if(t&&!Array.isArray(t))return t.invocation_params}function ll(t){return t.map((t=>{var e;const n=t._getType;if("function"===typeof n){return{role:sl(n.call(t)),content:il(t.content)}}if(1===t.lc&&t.kwargs){var r;const e=t.id,n=Array.isArray(e)&&e.length>0?e[e.length-1]:"";return{role:sl("string"===typeof n?al(n):"user"),content:il(null===(r=t.kwargs)||void 0===r?void 0:r.content)}}if(t.type){return{role:sl(String(t.type).toLowerCase()),content:il(t.content)}}if(t.role)return{role:sl(String(t.role)),content:il(t.content)};const o=null===(e=t.constructor)||void 0===e?void 0:e.name;return o&&"Object"!==o?{role:sl(al(o)),content:il(t.content)}:{role:"user",content:il(t.content)}}))}function ul(t,e,n,r,o){return(0,s.A)({[Ba]:ol(null!==t&&void 0!==t?t:"langchain"),[rc]:"chat",[Ua]:ol(e),[jr]:tl},function(t,e,n){var r,o,i,s,a;const c={},l="kwargs"in t?t.kwargs:void 0,u=null!==(r=null!==(o=null===e||void 0===e?void 0:e.temperature)&&void 0!==o?o:null===n||void 0===n?void 0:n.ls_temperature)&&void 0!==r?r:null===l||void 0===l?void 0:l.temperature;rl(c,Wa,u);const d=null!==(i=null!==(s=null===e||void 0===e?void 0:e.max_tokens)&&void 0!==s?s:null===n||void 0===n?void 0:n.ls_max_tokens)&&void 0!==i?i:null===l||void 0===l?void 0:l.max_tokens;rl(c,za,d);const p=null!==(a=null===e||void 0===e?void 0:e.top_p)&&void 0!==a?a:null===l||void 0===l?void 0:l.top_p;rl(c,Ja,p);const f=null===e||void 0===e?void 0:e.frequency_penalty;rl(c,Ha,f);const h=null===e||void 0===e?void 0:e.presence_penalty;return rl(c,Va,h),e&&"stream"in e&&nl(c,qa,Boolean(e.stream)),c}(n,r,o))}function dl(t,e){var n,r,o,i,s,a,c;if(!t)return;const l={};if(Array.isArray(t.generations)){const n=t.generations.flat().map((t=>{var e,n;return null!==(e=t.generationInfo)&&void 0!==e&&e.finish_reason?t.generationInfo.finish_reason:null!==(n=t.generation_info)&&void 0!==n&&n.finish_reason?t.generation_info.finish_reason:null})).filter((t=>"string"===typeof t));if(n.length>0&&nl(l,$a,ol(n)),function(t,e){const n=[],r=t.flat();for(const i of r){const t=i.message,e=null===t||void 0===t?void 0:t.tool_calls;if(Array.isArray(e)&&e.length>0)n.push(...e);else{var o;const t=null===(o=i.message)||void 0===o?void 0:o.content;if(Array.isArray(t))for(const e of t){const t=e;"tool_use"===t.type&&n.push(t)}}}n.length>0&&nl(e,uc,ol(n))}(t.generations,l),e){const e=t.generations.flat().map((t=>{var e,n;return null!==(e=t.text)&&void 0!==e?e:null===(n=t.message)||void 0===n?void 0:n.content})).filter((t=>"string"===typeof t));e.length>0&&nl(l,ac,ol(e))}}!function(t,e){if(!t)return;const n=t.tokenUsage,r=t.usage;if(n)rl(e,tc,n.promptTokens),rl(e,ec,n.completionTokens),rl(e,nc,n.totalTokens);else if(r){rl(e,tc,r.input_tokens),rl(e,ec,r.output_tokens);const t=Number(r.input_tokens),n=Number(r.output_tokens),o=(Number.isNaN(t)?0:t)+(Number.isNaN(n)?0:n);o>0&&rl(e,nc,o),void 0!==r.cache_creation_input_tokens&&rl(e,hc,r.cache_creation_input_tokens),void 0!==r.cache_read_input_tokens&&rl(e,mc,r.cache_read_input_tokens)}}(t.llmOutput,l);const u=t.llmOutput,d=null===(n=t.generations)||void 0===n||null===(n=n[0])||void 0===n?void 0:n[0],p=null===d||void 0===d?void 0:d.message,f=null!==(r=null!==(o=null===u||void 0===u?void 0:u.model_name)&&void 0!==o?o:null===u||void 0===u?void 0:u.model)&&void 0!==r?r:null===p||void 0===p||null===(i=p.response_metadata)||void 0===i?void 0:i.model_name;f&&nl(l,Xa,f);const h=null!==(s=null===u||void 0===u?void 0:u.id)&&void 0!==s?s:null===p||void 0===p?void 0:p.id;h&&nl(l,Za,h);const m=null!==(a=null===u||void 0===u?void 0:u.stop_reason)&&void 0!==a?a:null===p||void 0===p||null===(c=p.response_metadata)||void 0===c?void 0:c.finish_reason;return m&&nl(l,Qa,ol(m)),l}function pl(t){const e={},n=null===t||void 0===t?void 0:t.lc_agent_name;return"string"===typeof n&&(e[dc]=n),e}function fl(t){return"object"===typeof t&&"SentryCallbackHandler"===(null===t||void 0===t?void 0:t.name)}function hl(t){return t.some(fl)}function ml(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{recordInputs:e,recordOutputs:n}
1=Jc(t),r=Gc(t.enableTruncation),o=new Map,i=t=>{const e=o.get(t);null!==e&&void 0!==e&&e.isRecording()&&(e.end(),o.delete(t))},a={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(t,n,i,a,c,l,u,d){const p=cl(l),f=function(t,e,n,r,o,i){var s,a;const c=ul(null===i||void 0===i?void 0:i.ls_provider,null!==(s=null!==(a=null===o||void 0===o?void 0:o.model)&&void 0!==a?a:null===i||void 0===i?void 0:i.ls_model_name)&&void 0!==s?s:"unknown",t,o,i);if(n&&Array.isArray(e)&&e.length>0){nl(c,oc,e.length);const t=e.map((t=>({role:"user",content:t})));nl(c,ic,r?Xc(t):$c(t))}return c}(t,n,e,r,p,u),h=f[Ua],m=f[rc];_a({name:"".concat(m," ").concat(h),op:"gen_ai.chat",attributes:(0,s.A)((0,s.A)((0,s.A)({},pl(u)),f),{},{[Fr]:"gen_ai.chat"})},(t=>(o.set(i,t),t)))},handleChatModelStart(t,n,i,a,c,l,u,d){const p=cl(l),f=function(t,e,n,r,o,i){var s,a,c,l;const u=ul(null!==(s=null===i||void 0===i?void 0:i.ls_provider)&&void 0!==s?s:null===(a=t.id)||void 0===a?void 0:a[2],null!==(c=null!==(l=null===o||void 0===o?void 0:o.model)&&void 0!==l?l:null===i||void 0===i?void 0:i.ls_model_name)&&void 0!==c?c:"unknown",t,o,i);if(n&&Array.isArray(e)&&e.length>0){const t=ll(e.flat()),{systemInstructions:n,filteredMessages:o}=Zc(t);n&&nl(u,sc,n);const i=Array.isArray(o)?o.length:0;nl(u,oc,i),nl(u,ic,r?Xc(o):$c(o))}return u}(t,n,e,r,p,u),h=function(t){var e,n,r;const o=null!==(e=null===t||void 0===t||null===(n=t.invocation_params)||void 0===n?void 0:n.tools)&&void 0!==e?e:null===t||void 0===t||null===(r=t.options)||void 0===r?void 0:r.tools;if(!Array.isArray(o)||0===o.length)return;const i=o.map((t=>{var e,n,r;const o=t.function;return{type:"function",name:null!==(e=null!==(n=t.name)&&void 0!==n?n:null===o||void 0===o?void 0:o.name)&&void 0!==e?e:"",description:null!==(r=t.description)&&void 0!==r?r:null===o||void 0===o?void 0:o.description}}));return JSON.stringify(i)}(c);h&&(f[cc]=h);const m=f[Ua],g=f[rc];_a({name:"".concat(g," ").concat(m),op:"gen_ai.chat",attributes:(0,s.A)((0,s.A)((0,s.A)({},pl(u)),f),{},{[Fr]:"gen_ai.chat"})},(t=>(o.set(i,t),t)))},handleLLMEnd(t,e,r,s,a){const c=o.get(e);if(null!==c&&void 0!==c&&c.isRecording()){const r=dl(t,n);r&&c.setAttributes(r),i(e)}},handleLLMError(t,e){const n=o.get(e);null!==n&&void 0!==n&&n.isRecording()&&(n.setStatus({code:To,message:"internal_error"}),i(e)),Ti(t,{mechanism:{handled:!1,type:"".concat(tl,".llm_error_handler")}})},handleChainStart(t,n,r,i,a,c,l,u){if(null!==c&&void 0!==c&&c.__sentry_langgraph__)return;const d=u||t.name||"unknown_chain",p={[jr]:"auto.ai.langchain","langchain.chain.name":d};e&&(p["langchain.chain.inputs"]=JSON.stringify(n)),_a({name:"chain ".concat(d),op:"gen_ai.invoke_agent",attributes:(0,s.A)((0,s.A)({},p),{},{[Fr]:"gen_ai.invoke_agent"})},(t=>(o.set(r,t),t)))},handleChainEnd(t,e){const r=o.get(e);null!==r&&void 0!==r&&r.isRecording()&&(n&&r.setAttributes({"langchain.chain.outputs":JSON.stringify(t)}),i(e))},handleChainError(t,e){const n=o.get(e);null!==n&&void 0!==n&&n.isRecording()&&(n.setStatus({code:To,message:"internal_error"}),i(e)),Ti(t,{mechanism:{handled:!1,type:"".concat(tl,".chain_error_handler")}})},handleToolStart(t,n,r,i,a,c,l){if(null!==c&&void 0!==c&&c.__sentry_langgraph__)return;const u=l||t.name||"unknown_tool",d=(0,s.A)((0,s.A)({},pl(c)),{},{[jr]:tl,[rc]:"execute_tool",[bc]:u});e&&(d[wc]=n),_a({name:"execute_tool ".concat(u),op:"gen_ai.execute_tool",attributes:(0,s.A)((0,s.A)({},d),{},{[Fr]:"gen_ai.execute_tool"})},(t=>(o.set(r,t),t)))},handleToolEnd(t,e){const r=o.get(e);if(null!==r&&void 0!==r&&r.isRecording()){if(n){const e=t&&"object"===typeof t&&"content"in t?t.content:t;r.setAttributes({[Ac]:"string"===typeof e?e:JSON.stringify(e)})}i(e)}},handleToolError(t,e){const n=o.get(e);null!==n&&void 0!==n&&n.isRecording()&&(n.setStatus({code:To,message:"internal_error"}),i(e)),Ti(t,{mechanism:{handled:!1,type:"".concat(tl,".tool_error_handler")}})},copy:()=>a,toJSON:()=>
1({lc:1,type:"not_implemented",id:a.lc_id}),toJSONNotImplemented:()=>({lc:1,type:"not_implemented",id:a.lc_id})};return a}function gl(t){return"object"===typeof t&&"function"===typeof t.unref&&t.unref(),t}const vl=Symbol.for("SentryBufferFullError");function yl(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;const e=new Set;function n(t){e.delete(t)}return{get $(){return Array.from(e)},add:function(r){if(!(e.size<t))return xr(vl);const o=r();return e.add(o),o.then((()=>n(o)),(()=>n(o))),o},drain:function(t){if(!e.size)return Ar(!0);const n=Promise.allSettled(Array.from(e)).then((()=>!0));if(!t)return n;const r=[n,new Promise((e=>gl(setTimeout((()=>e(!1)),t))))];return Promise.race(r)}}}const _l=6e4;function bl(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:W();const n=parseInt("".concat(t),10);if(!isNaN(n))return 1e3*n;const r=Date.parse("".concat(t));return isNaN(r)?_l:r-e}function Sl(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:W();return function(t,e){return t[e]||t.all||0}(t,e)>n}function kl(t,e){let{statusCode:n,headers:r}=e,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:W();const i=(0,s.A)({},t),a=null===r||void 0===r?void 0:r["x-sentry-rate-limits"],c=null===r||void 0===r?void 0:r["retry-after"];if(a)for(const s of a.trim().split(",")){const[t,e,,,n]=s.split(":",5),r=parseInt(t,10),a=1e3*(isNaN(r)?60:r);if(e)for(const s of e.split(";"))"metric_bucket"===s&&n&&!n.split(";").includes("custom")||(i[s]=o+a);else i.all=o+a}else c?i.all=o+bl(c,o):429===n&&(i.all=o+6e4);return i}const wl=64;function Al(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:yl(t.bufferSize||wl),r={};return{send:function(o){const i=[];if(ls(o,((e,n)=>{const o=vs(n);Sl(r,o)?t.recordDroppedEvent("ratelimit_backoff",o):i.push(e)})),0===i.length)return Promise.resolve({});const s=as(o[0],i),a=e=>{us(s,["client_report"])?p&&_.warn("Dropping client report. Will not send outcomes (reason: ".concat(e,").")):ls(s,((n,r)=>{t.recordDroppedEvent(e,vs(r))}))};return n.add((()=>e({body:ps(s)}).then((t=>413===t.statusCode?(p&&_.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),a("send_error"),t):(p&&void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&&_.warn("Sentry responded with status code ".concat(t.statusCode," to sent event.")),r=kl(r,t),t)),(t=>{throw a("network_error"),p&&_.error("Encountered error running transport request:",t),t})))).then((t=>t),(t=>{if(t===vl)return p&&_.error("Skipped sending event because buffer is full."),a("queue_overflow"),Promise.resolve({});throw t}))},flush:t=>n.drain(t)}}const xl=()=>{let t;return{name:"Dedupe",processEvent(e){if(e.type)return e;try{if(function(t,e){if(!e)return!1;if(function(t,e){const n=t.message,r=e.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!Tl(t,e))return!1;if(!El(t,e))return!1;return!0}(t,e))return!0;if(function(t,e){const n=Il(e),r=Il(t);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!Tl(t,e))return!1;if(!El(t,e))return!1;return!0}(t,e))return!0;return!1}(e,t))return p&&_.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(n){}return t=e}}};function El(t,e){let n=Q(t),r=Q(e);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let o=0;o<r.length;o++){const t=r[o],e=n[o];if(t.filename!==e.filename||t.lineno!==e.lineno||t.colno!==e.colno||t.function!==e.function)return!1}return!0}function Tl(t,e){let n=t.fingerprint,r=e.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch(o){return!1}}function Il(t){var e;return null===(e=t.exception)||void 0===e||null===(e=e.values)||void 0===e?void 0:e[0]}function Cl(t){const e=[];t.message&&e.push(t.message);try{const n=t.exception.values[t.exception.values.length-1];null!==n&&void 0!==n&&n.value&&(e.push(n.value),n.type&&e.push("".concat(n.type,": ").concat(n.value)))}catch(n){}return e}const Rl=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/^Java exception was raised during method invocation$/],Ml=function(){let t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{name:"EventFilters",setup(n){const r=n.getOptions();t=Pl(e,r)},processEvent(n,r,o){if(!t){const n=o.getOptions();t=Pl(e,n)}return function(t,e){if(t.type){if("transaction"===t.type&&function(t,e){if(null===e||void 0===e||!e.length)return!1;const n=t.transaction;return!!n&&pt(n,e)}(t,e.ignoreTransactions))return p&&_.warn("Event dropped due to being matched by `ignoreTransactions` option.\nEvent: ".concat(mt(t))),!0}else{if(function(t,e){if(null===e||void 0===e||!e.length)return!1;return Cl(t).some((t=>pt(t,e)))}(t,e.ignoreErrors))return p&&_.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: ".concat(mt(t))),!0;if(function(t){var e;if(null===(e=t.exception)||void 0===e||null===(e=e.values)||void 0===e||!e.length)return!1;return!t.message&&!t.exception.values.some((t=>t.stacktrace||t.type&&"Error"!==t.type||t.value))}(t))return p&&_.warn("Event dropped due to not having an error message, error type or stacktrace.\nEvent: ".concat(mt(t))),!0;if(function(t,e){if(null===e||void 0===e||!e.length)return!1;const n=Nl(t);return!!n&&pt(n,e)}(t,e.denyUrls))return p&&_.warn("Event dropped due to being matched by `denyUrls` option.\nEvent: ".concat(mt(t),".\nUrl: ").concat(Nl(t))),!0;if(!function(t,e){if(null===e||void 0===e||!e.length)return!0;const n=Nl(t);return!n||pt(n,e)}(t,e.allowUrls))return p&&_.warn("Event dropped due to not being matched by `allowUrls` option.\nEvent: ".concat(mt(t),".\nUrl: ").concat(Nl(t))),!0}return!1}(n,t)?null:n}}},Ol=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,s.A)((0,s.A)({},Ml(t)),{},{name:"InboundFilters"})};function Pl(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:Rl],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]]}}function Nl(t){try{var e,n,r;const o=[...null!==(e=null===(n=t.exception)||void 0===n?void 0:n.values)&&void 0!==e?e:[]].reverse().find((t=>{var e,n;return void 0===(null===(e=t.mechanism)||void 0===e?void 0:e.parent_id)&&(null===(n=t.stacktrace)||void 0===n||null===(n=n.frames)||void 0===n?void 0:n.length)})),i=null===o||void 0===o||null===(r=o.stacktrace)||void 0===r?void 0:r.frames;return i?function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(i):null}catch(o){return p&&_.error("Cannot extract url for event ".concat(mt(t))),null}}const Ll=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{depth:e=3,captureErrorCause:n=!0}=t;return{name:"ExtraErrorData",processEvent(t,r,o){const{maxValueLength:i}=o.getOptions();return function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;if(!e.originalException||!S(e.originalException))return t;const i=e.originalException.name||e.originalException.constructor.name,a=Dl(e.originalException,r,o);if(a){const e=(0,s.A)({},t.contexts),r=ot(a,n);return I(r)&&(N(r,z,!0),e[i]=r),(0,s.A)((0,s.A)({},t),{},{contexts:e})}return t}(t,r,e,n,i)}}};
1function Dl(t,e,n){try{const r=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],o={};for(const e of Object.keys(t)){if(-1!==r.indexOf(e))continue;const i=t[e];o[e]=S(i)||"string"===typeof i?n?ct("".concat(i),n):"".concat(i):i}if(e&&void 0!==t.cause)if(S(t.cause)){const e=t.cause.name||t.cause.constructor.name;o.cause={[e]:Dl(t.cause,!1,n)}}else o.cause=t.cause;if("function"===typeof t.toJSON){const e=t.toJSON();for(const t of Object.keys(e)){const n=e[t];o[t]=S(n)?n.toString():n}}return o}catch(r){p&&_.error("Unable to extract extra data from the Error object:",r)}return null}const Fl=100,jl=10,Bl="flag.evaluation.";function Ul(t){if(t.type)return t;const e=Vt().getScopeData().contexts.flags,n=e?e.values:[];return n.length?(void 0===t.contexts&&(t.contexts={}),t.contexts.flags={values:[...n]},t):t}function ql(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Fl;const r=Vt().getScopeData().contexts;r.flags||(r.flags={values:[]});!function(t,e,n,r){if("boolean"!==typeof n)return;if(t.length>r)return void(p&&_.error("[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=".concat(r)));const o=t.findIndex((t=>t.flag===e));-1!==o&&t.splice(o,1);t.length===r&&t.shift();t.push({flag:e,result:n})}(r.flags.values,t,e,n)}function Wl(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:jl;if("boolean"!==typeof e)return;const r=di();if(!r)return;const o=$o(r).data;if("".concat(Bl).concat(t)in o)return void r.setAttribute("".concat(Bl).concat(t),e);Object.keys(o).filter((t=>t.startsWith(Bl))).length<n&&r.setAttribute("".concat(Bl).concat(t),e)}const zl=()=>({name:"FeatureFlags",processEvent:(t,e,n)=>Ul(t),addFeatureFlag(t,e){ql(t,e),Wl(t,e)}});let Hl;const Vl=new WeakMap,Jl=()=>({name:"FunctionToString",setupOnce(){Hl=Function.prototype.toString;try{Function.prototype.toString=function(){const t=D(this),e=Vl.has($t())&&void 0!==t?t:this;for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Hl.apply(e,r)}}catch(t){}},setup(t){Vl.set(t,!0)}});function Gl(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=t.client||$t();if(!qi()||!e)return{};const n=zt(l());if(n.getTraceData)return n.getTraceData(t);const r=t.scope||Vt(),o=t.span||di();if(!o&&void 0!==Ht)return{};const i=o?Vo(o):function(t){const{traceId:e,sampled:n,propagationSpanId:r}=t.getPropagationContext();return jo(e,r,n)}(r),s=co(o?yi(o):vi(e,r));if(!Do.test(i))return _.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const a={"sentry-trace":i,baggage:s};return t.propagateTraceparent&&(a.traceparent=o?function(t){const{traceId:e,spanId:n}=t.spanContext();return Bo(e,n,ni(t))}(o):function(t){const{traceId:e,sampled:n,propagationSpanId:r}=t.getPropagationContext();return Bo(e,r,n)}(r)),a}const Kl={"messages.create":{operation:"chat"},"messages.stream":{operation:"chat",streaming:!0},"messages.countTokens":{operation:"chat"},"models.get":{operation:"models"},"completions.create":{operation:"chat"},"models.retrieve":{operation:"models"},"beta.messages.create":{operation:"chat"}};function Yl(t,e){this.v=t,this.k=e}function $l(t){return new Yl(t,0)}function Xl(t){return function(){return new Zl(t.apply(this,arguments))}}function Zl(t){var e,n;function r(e,n){try{var i=t[e](n),s=i.value,a=s instanceof Yl;Promise.resolve(a?s.v:s).then((function(n){if(a){var c="return"===e?"return":"next";if(!s.k||n.done)return r(c,n);n=t[c](n).value}o(i.done?"return":"normal",n)}),(function(t){r("throw",t)}))}catch(t){o("throw",t)}}function o(t,o){switch(t){case"return":e.resolve({value:o,done:!0});break;case"throw":e.reject(o);break;default:e.resolve({value:o,done:!1})}(e=e.next)?r(e.key,e.arg):n=null}this._invoke=function(t,o){return new Promise((function(i,s){var a={key:t,arg:o,resolve:i,reject:s,next:null};n?n=n.next=a:(e=n=a,r(t,o))}))},"function"!=typeof t.return&&(this.return=void 0)}function Ql(t){var e,n,r,o=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);o--;){if(n&&null!=(e=t[n]))return e.call(t);if(r&&null!=(e=t[r]))return new tu(e.call(t));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function tu(t){function e(t){if(Object(t)!==t)return Promise.reject(new TypeError(t+" is not an object."));var e=t.done;return Promise.resolve(t.value).then((function(t){return{value:t,done:e}}))}return tu=function(t){this.s=t,this.n=t.next},tu.prototype={s:null,n:null,next:function(){return e(this.n.apply(this.s,arguments))},return:function(t){var n=this.s.return;return void 0===n?Promise.resolve({value:t,done:!0}):e(n.apply(this.s,arguments))},throw:function(t){var n=this.s.return;return void 0===n?Promise.reject(t):e(n.apply(this.s,arguments))}},new tu(t)}Zl.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},Zl.prototype.next=function(t){return this._invoke("next",t)},Zl.prototype.throw=function(t){return this._invoke("throw",t)},Zl.prototype.return=function(t){return this._invoke("return",t)};
1const eu={invalid_request_error:"invalid_argument",authentication_error:"unauthenticated",permission_error:"permission_denied",not_found_error:"not_found",request_too_large:"failed_precondition",rate_limit_error:"resource_exhausted",api_error:"internal_error",overloaded_error:"unavailable"};function nu(t){return t&&eu[t]||"internal_error"}function ru(t,e,n,r){if(!t||"object"!==typeof t)return;const o=function(t,e){var n;return"type"in t&&"string"===typeof t.type&&"error"===t.type&&(e.setStatus({code:To,message:nu(null===(n=t.error)||void 0===n?void 0:n.type)}),Ti(t.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}),!0)}(t,r);o||(function(t,e){if("message_delta"===t.type&&t.usage&&"output_tokens"in t.usage&&"number"===typeof t.usage.output_tokens&&(e.completionTokens=t.usage.output_tokens),t.message){const n=t.message;n.id&&(e.responseId=n.id),n.model&&(e.responseModel=n.model),n.stop_reason&&e.finishReasons.push(n.stop_reason),n.usage&&("number"===typeof n.usage.input_tokens&&(e.promptTokens=n.usage.input_tokens),"number"===typeof n.usage.cache_creation_input_tokens&&(e.cacheCreationInputTokens=n.usage.cache_creation_input_tokens),"number"===typeof n.usage.cache_read_input_tokens&&(e.cacheReadInputTokens=n.usage.cache_read_input_tokens))}}(t,e),function(t,e){"content_block_start"===t.type&&"number"===typeof t.index&&t.content_block&&("tool_use"!==t.content_block.type&&"server_tool_use"!==t.content_block.type||(e.activeToolBlocks[t.index]={id:t.content_block.id,name:t.content_block.name,inputJsonParts:[]}))}(t,e),function(t,e,n){if("content_block_delta"===t.type&&t.delta){if("number"===typeof t.index&&"partial_json"in t.delta&&"string"===typeof t.delta.partial_json){const n=e.activeToolBlocks[t.index];n&&n.inputJsonParts.push(t.delta.partial_json)}n&&"string"===typeof t.delta.text&&e.responseTexts.push(t.delta.text)}}(t,e,n),function(t,e){if("content_block_stop"!==t.type||"number"!==typeof t.index)return;const n=e.activeToolBlocks[t.index];if(!n)return;const r=n.inputJsonParts.join("");let o;try{o=r?JSON.parse(r):{}}catch(i){o={__unparsed:r}}e.toolCalls.push({type:"tool_use",id:n.id,name:n.name,input:o}),delete e.activeToolBlocks[t.index]}(t,e))}function ou(){return(ou=Xl((function*(t,e,n){const r={responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};try{var o,i=!1,s=!1;try{for(var a,c=Ql(t);i=!(a=yield $l(c.next())).done;i=!1){const t=a.value;ru(t,r,n,e),yield t}}catch(l){s=!0,o=l}finally{try{i&&null!=c.return&&(yield $l(c.return()))}finally{if(s)throw o}}}finally{Yc(e,r,n)}}))).apply(this,arguments)}function iu(t,e,n){const r=function(t){const{system:e,messages:n,input:r}=t,o="string"===typeof e?[{role:"system",content:t.system}]:[],i=Array.isArray(r)?r:null!=r?[r]:void 0,s=Array.isArray(n)?n:null!=n?[n]:[];return[...o,...null!==i&&void 0!==i?i:s]}(e);!function(t,e,n){if(Array.isArray(e)&&0===e.length)return;const{systemInstructions:r,filteredMessages:o}=Zc(e);r&&t.setAttributes({[sc]:r});const i=Array.isArray(o)?o.length:1;t.setAttributes({[ic]:n?Xc(o):$c(o),[oc]:i})}(t,r,n),"prompt"in e&&t.setAttributes({[ja]:JSON.stringify(e.prompt)})}function su(t,e){"id"in e&&"model"in e&&(t.setAttributes({[Za]:e.id,[Xa]:e.model}),"usage"in e&&e.usage&&function(t,e,n,r,o){if(void 0!==e&&t.setAttributes({[tc]:e}),void 0!==n&&t.setAttributes({[ec]:n}),void 0!==e||void 0!==n||void 0!==r||void 0!==o){const i=(null!==e&&void 0!==e?e:0)+(null!==n&&void 0!==n?n:0)+(null!==r&&void 0!==r?r:0)+(null!==o&&void 0!==o?o:0);t.setAttributes({[nc]:i})}}(t,e.usage.input_tokens,e.usage.output_tokens,e.usage.cache_creation_input_tokens,e.usage.cache_read_input_tokens))}function au(t,e,n){e&&"object"===typeof e&&("type"in e&&"error"===e.type?function(t,e){e.error&&(t.setStatus({code:To,message:nu(e.error.type)}),Ti(e.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}))}(t,e):(n&&function(t,e){if("content"in e&&Array.isArray(e.content)){t.setAttributes({[ac]:e.content.map((t=>t.text)).filter((t=>!!t)).join("")});const n=[];for(const t of e.content)"tool_use"!==t.type&&"server_tool_use"!==t.type||n.push(t);n.length>0&&t.setAttributes({[uc]:JSON.stringify(n)})}"completion"in e&&t.setAttributes({[ac]:e.completion}),"input_tokens"in e&&t.setAttributes({[ac]:JSON.stringify(e.input_tokens)})}(t,e),su(t,e)))}function cu(t,e,n){throw Ti(t,{mechanism:{handled:!1,type:"auto.ai.anthropic",data:{function:n}}}),e.isRecording()&&(e.setStatus({code:To,message:"internal_error"}),e.end()),t}function lu(t,e,n,r,o,i,s,a,c,l,u){var d;const p=null!==(d=o[Ua])&&void 0!==d?d:"unknown",f={name:"".concat(i," ").concat(p),op:"gen_ai.".concat(i),attributes:o};if(l&&!u){let e;const o=_a(f,(o=>(e=t.apply(n,r),c.recordInputs&&a&&iu(o,a,Gc(c.enableTruncation)),(async()=>{try{var t;return function(t,e,n){return ou.apply(this,arguments)}(await e,o,null!==(t=c.recordOutputs)&&void 0!==t&&t)}catch(n){return cu(n,o,s)}})())));return Qc(e,o,"auto.ai.anthropic")}return _a(f,(t=>{try{var o;c.recordInputs&&a&&iu(t,a,Gc(c.enableTruncation));return function(t,e,n){const r={responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};return t.on("streamEvent",(t=>{ru(t,r,n,e)})),t.on("message",(()=>{Yc(e,r,n)})),t.on("error",(t=>{Ti(t,{mechanism:{handled:!1,type:"auto.ai.anthropic.stream_error"}}),e.isRecording()&&(e.setStatus({code:To,message:"internal_error"}),e.end())})),t}(e.apply(n,r),t,null!==(o=c.recordOutputs)&&void 0!==o&&o)}catch(i){return cu(i,t,s)}}))}function uu(t,e,n,r,o){return new Proxy(t,{apply(i,s,a){var c;const l=n.operation||"unknown",u=function(t,e,n){const r={[Ba]:"anthropic",[rc]:n,[jr]:"auto.ai.anthropic"};if(t.length>0&&"object"===typeof t[0]&&null!==t[0]){var o;const e=t[0];e.tools&&Array.isArray(e.tools)&&(r[cc]=JSON.stringify(e.tools)),r[U
1a]=null!==(o=e.model)&&void 0!==o?o:"unknown","temperature"in e&&(r[Wa]=e.temperature),"top_p"in e&&(r[Ja]=e.top_p),"stream"in e&&(r[qa]=e.stream),"top_k"in e&&(r[Ga]=e.top_k),"frequency_penalty"in e&&(r[Ha]=e.frequency_penalty),"max_tokens"in e&&(r[za]=e.max_tokens)}else r[Ua]="models.retrieve"===e||"models.get"===e?t[0]:"unknown";return r}(a,e,l),d=null!==(c=u[Ua])&&void 0!==c?c:"unknown",p="object"===typeof a[0]?a[0]:void 0,f=Boolean(null===p||void 0===p?void 0:p.stream),h=!0===n.streaming;if(f||h)return lu(t,i,r,a,u,l,e,p,o,f,h);let m;const g=ya({name:"".concat(l," ").concat(d),op:"gen_ai.".concat(l),attributes:u},(t=>(m=i.apply(r,a),o.recordInputs&&p&&iu(t,p,Gc(o.enableTruncation)),m.then((e=>(au(t,e,o.recordOutputs),e)),(t=>{throw Ti(t,{mechanism:{handled:!1,type:"auto.ai.anthropic",data:{function:e}}}),t})))));return Qc(m,g,"auto.ai.anthropic")}})}function du(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0;return new Proxy(t,{get(t,r){const o=t[r],i=Kc(e,String(r)),s=Kl[i];return"function"===typeof o&&s?uu(o,i,s,t,n):"function"===typeof o?o.bind(t):o&&"object"===typeof o?du(o,i,n):o}})}function pu(t,e){return du(t,"",Jc(e))}const fu="auto.ai.langgraph";function hu(t){const e=t;let n=0,r=0,o=0;if(e.usage_metadata&&"object"===typeof e.usage_metadata){const t=e.usage_metadata;return"number"===typeof t.input_tokens&&(n=t.input_tokens),"number"===typeof t.output_tokens&&(r=t.output_tokens),"number"===typeof t.total_tokens&&(o=t.total_tokens),{inputTokens:n,outputTokens:r,totalTokens:o}}if(e.response_metadata&&"object"===typeof e.response_metadata){const t=e.response_metadata;if(t.tokenUsage&&"object"===typeof t.tokenUsage){const e=t.tokenUsage;"number"===typeof e.promptTokens&&(n=e.promptTokens),"number"===typeof e.completionTokens&&(r=e.completionTokens),"number"===typeof e.totalTokens&&(o=e.totalTokens)}}return{inputTokens:n,outputTokens:r,totalTokens:o}}function mu(t,e){const n=e;if(n.response_metadata&&"object"===typeof n.response_metadata){const e=n.response_metadata;e.model_name&&"string"===typeof e.model_name&&t.setAttribute(Xa,e.model_name),e.finish_reason&&"string"===typeof e.finish_reason&&t.setAttribute($a,[e.finish_reason])}}function gu(t,e,n){var r;const o=null===n||void 0===n?void 0:n.messages;if(!o||!Array.isArray(o))return;const i=null!==(r=null===e||void 0===e?void 0:e.length)&&void 0!==r?r:0,s=o.length>i?o.slice(i):[];if(0===s.length)return;const a=function(t){if(!t||0===t.length)return null;const e=[];for(const n of t)if(n&&"object"===typeof n){const t=n.tool_calls;t&&Array.isArray(t)&&e.push(...t)}return e.length>0?e:null}(s);a&&t.setAttribute(uc,JSON.stringify(a));const c=ll(s);t.setAttribute(ac,JSON.stringify(c));let l=0,u=0,d=0;for(const p of s){const e=hu(p);l+=e.inputTokens,u+=e.outputTokens,d+=e.totalTokens,mu(t,p)}l>0&&t.setAttribute(tc,l),u>0&&t.setAttribute(ec,u),d>0&&t.setAttribute(nc,d)}let vu=!1;const yu="__sentry_patched__";function _u(t,e,n,r,o,i){return new Proxy(t,{apply(t,a,c){var l;const u=null!==(l=null===o||void 0===o?void 0:o.modelName)&&void 0!==l?l:null===o||void 0===o?void 0:o.model;return ya({op:"gen_ai.invoke_agent",name:"invoke_agent",attributes:{[jr]:fu,[Fr]:gc,[rc]:"invoke_agent"}},(async o=>{try{var l,d;const h=null===n||void 0===n?void 0:n.name;h&&"string"===typeof h&&(o.setAttribute(pc,h),o.setAttribute(dc,h),o.updateName("invoke_agent ".concat(h))),u&&o.setAttribute(Ua,u);const m=c.length>1?c[1]:void 0,g=null===m||void 0===m?void 0:m.configurable,v=null===g||void 0===g?void 0:g.thread_id;if(v&&"string"===typeof v&&o.setAttribute(fc,v),i){var p,f;const t=null!==(p=c[1])&&void 0!==p?p:{};c[1]=t;const e=null!==(f=t.metadata)&&void 0!==f?f:{};t.metadata=(0,s.A)((0,s.A)({},e),{},{__sentry_langgraph__:!0},"string"===typeof h?{lc_agent_name:h}:{}),t.callbacks=function(t,e){if(!t)return[e];if(function(t){if(!t||"object"!==typeof t)return!1;const e=t;return"function"===typeof e.addHandler&&"function"===typeof e.copy}(t)){var n;if(hl(null!==(n=t.handlers)&&void 0!==n?n:[]))return t;const r=t.copy();return r.addHandler(e,!0),r}const r=Array.isArray(t)?t:[t];return hl(r)?t:[...r,e]}(t.callbacks,i)}const y=function(t){var e,n;if(null===(e=t.builder)||void 0===e||null===(e=e.nodes)||void 0===e||null===(e=e.tools)||void 0===e||null===(e=e.runnable)||void 0===e||!e.tools)return null;const r=null===(n=t.builder)||void 0===n||null===(n=n.nodes)||void 0===n||null===(n=n.tools)||void 0===n||null===(n=n.runnable)||void 0===n?void 0:n.tools;return r&&Array.isArray(r)&&0!==r.length?r.map((t=>{var e,n,r;return{name:null===(e=t.lc_kwargs)||void 0===e?void 0:e.name,description:null===(n=t.lc_kwargs)||void 0===n?void 0:n.description,schema:null===(r=t.lc_kwargs)||void 0===r?void 0:r.schema}})):null}(e);y&&o.setAttribute(cc,JSON.stringify(y));const _=r.recordInputs,b=r.recordOutputs,S=c.length>0&&null!==(l=null===(d=c[0])||void 0===d?void 0:d.messages)&&void 0!==l?l:[];
1if(S&&_){const t=ll(S),{systemInstructions:e,filteredMessages:n}=Zc(t);e&&o.setAttribute(sc,e);const i=Gc(r.enableTruncation),s=Array.isArray(n)?n.length:0;o.setAttributes({[ic]:i?Xc(n):$c(n),[oc]:s})}const k=await Reflect.apply(t,a,c);return b&&gu(o,null!==S&&void 0!==S?S:null,k),k}catch(h){throw o.setStatus({code:To,message:"internal_error"}),Ti(h,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),h}}))}})}function bu(t,e){if(Object.prototype.hasOwnProperty.call(t,yu))return t;const n=Jc(e),r=ml(n),o=new Proxy(t,{apply(t,e,o){const i=function(t){const e=t[0];if("object"!==typeof e||!e||!("llm"in e)||!e.llm||"object"!==typeof e.llm)return null;const n=e.llm;return"string"!==typeof n.modelName&&"string"!==typeof n.model?null:n}(o),s=function(t){const e=t[0];return"object"===typeof e&&e&&"name"in e&&"string"===typeof e.name?e.name:null}(o),a=o[0];let c;a&&Array.isArray(a.tools)&&a.tools.length>0&&function(t,e,n){const r="__sentry_tool_wrapped__";for(const o of t){if(!o||"object"!==typeof o)continue;const t=o,i=t.invoke;if("function"!==typeof i||Object.prototype.hasOwnProperty.call(t,r))continue;const s="string"===typeof t.name?t.name:"unknown_tool",a="string"===typeof t.description?t.description:void 0,c=new Proxy(i,{apply(t,r,o){var i,c;const l={[jr]:fu,[Fr]:_c,[rc]:"execute_tool",[bc]:s,[kc]:"function"},u=o[1],d=null!==(i=null===u||void 0===u||null===(c=u.metadata)||void 0===c?void 0:c.lc_agent_name)&&void 0!==i?i:n;"string"===typeof d&&(l[dc]=d),a&&(l[xc]=a);const p=o[0];if("object"===typeof p&&p&&("id"in p&&"string"===typeof p.id&&(l[Sc]=p.id),e.recordInputs)){const t="args"in p&&"object"===typeof p.args?p.args:p;try{l[wc]=JSON.stringify(t)}catch(f){}}return ya({op:_c,name:"execute_tool ".concat(s),attributes:l},(async n=>{try{const s=await Reflect.apply(t,r,o);if(e.recordOutputs)try{const t=s&&"object"===typeof s&&"content"in s?s.content:s;n.setAttribute(Ac,"string"===typeof t?t:JSON.stringify(t))}catch(i){}return s}catch(s){throw n.setStatus({code:To,message:"internal_error"}),Ti(s,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),s}}))}});t.invoke=c,Object.defineProperty(t,r,{value:!0,enumerable:!1})}}(a.tools,n,null!==s&&void 0!==s?s:void 0),vu=!0;try{c=Reflect.apply(t,e,o)}finally{vu=!1}const l=c.invoke;if(l&&"function"===typeof l){const t={};s&&(t.name=s),c.invoke=_u(l.bind(c),c,t,n,i,r)}return c}});return Object.defineProperty(o,yu,{value:!0,enumerable:!1}),o}function Su(t,e){return t.compile=function(t,e){if(Object.prototype.hasOwnProperty.call(t,yu))return t;const n=ml(e),r=new Proxy(t,{apply:(t,r,o)=>vu?Reflect.apply(t,r,o):ya({op:"gen_ai.create_agent",name:"create_agent",attributes:{[jr]:fu,[Fr]:"gen_ai.create_agent",[rc]:"create_agent"}},(i=>{try{const s=Reflect.apply(t,r,o),a=o.length>0?o[0]:{};null!==a&&void 0!==a&&a.name&&"string"===typeof a.name&&(i.setAttribute(dc,a.name),i.updateName("create_agent ".concat(a.name)));const c=s.invoke;return c&&"function"===typeof c&&(s.invoke=_u(c.bind(s),s,a,e,void 0,n)),s}catch(s){throw i.setStatus({code:To,message:"internal_error"}),Ti(s,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),s}}))});return Object.defineProperty(r,yu,{value:!0,enumerable:!1}),r}(t.compile,Jc(e)),t}const ku={"models.generateContent":{operation:"generate_content"},"models.generateContentStream":{operation:"generate_content",streaming:!0},"models.embedContent":{operation:"embeddings"},"chats.create":{proxyResultPath:"chat"},"chat.sendMessage":{operation:"chat"},"chat.sendMessageStream":{operation:"chat",streaming:!0}},wu="google_genai";function Au(t,e,n,r){t&&!function(t,e){const n=null===t||void 0===t?void 0:t.promptFeedback;if(null!==n&&void 0!==n&&n.blockReason){var r;const t=null!==(r=n.blockReasonMessage)&&void 0!==r?r:n.blockReason;return e.setStatus({code:To,message:"internal_error"}),Ti("Content blocked: ".concat(t),{mechanism:{handled:!1,type:"auto.ai.google_genai"}}),!0}return!1}(t,r)&&(function(t,e){"string"===typeof t.responseId&&(e.responseId=t.responseId),"string"===typeof t.modelVersion&&(e.responseModel=t.modelVersion);const n=t.usageMetadata;n&&("number"===typeof n.promptTokenCount&&(e.promptTokens=n.promptTokenCount),"number"===typeof n.candidatesTokenCount&&(e.completionTokens=n.candidatesTokenCount),"number"===typeof n.totalTokenCount&&(e.totalTokens=n.totalTokenCount))}(t,e),function(t,e,n){Array.isArray(t.functionCalls)&&e.toolCalls.push(...t.functionCalls);for(const s of null!==(r=t.candidates)&&void 0!==r?r:[]){var r;null!==s&&void 0!==s&&s.finishReason&&!e.finishReasons.includes(s.finishReason)&&e.finishReasons.push(s.finishReason);for(const t of null!==(o=null===s||void 0===s||null===(i=s.content)||void 0===i?void 0:i.parts)&&void 0!==o?o:[]){var o,i;n&&t.text&&e.responseTexts.push(t.text),t.functionCall&&e.toolCalls.push({type:"function",id:t.functionCall.id,name:t.functionCall.name,arguments:t.functionCall.args})}}}(t,e,n))}function xu(){return(xu=Xl((function*(t,e,n){const r={responseTexts:[],finishReasons:[],toolCalls:[]};try{var o,i=!1,s=!1;try{for(var a,c=Ql(t);i=!(a=yield $l(c.next())).done;i=!1){const t=a.value;Au(t,r,n,e),yield t}}catch(l){s=!0,o=l}
1finally{try{i&&null!=c.return&&(yield $l(c.return()))}finally{if(s)throw o}}}finally{Yc(e,r,n)}}))).apply(this,arguments)}function Eu(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"user";return"string"===typeof t?[{role:e,content:t}]:Array.isArray(t)?t.flatMap((t=>Eu(t,e))):"object"===typeof t&&t?"role"in t&&"string"===typeof t.role?[t]:"parts"in t?[(0,s.A)((0,s.A)({},t),{},{role:e})]:[{role:e,content:t}]:[]}function Tu(t,e){if("model"in t&&"string"===typeof t.model)return t.model;if(e&&"object"===typeof e){const t=e;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 Iu(t,e,n){const r={[Ba]:wu,[rc]:t,[jr]:"auto.ai.google_genai"};if(e){if(r[Ua]=Tu(e,n),"config"in e&&"object"===typeof e.config&&e.config){const t=e.config;if(Object.assign(r,function(t){const e={};return"temperature"in t&&"number"===typeof t.temperature&&(e[Wa]=t.temperature),"topP"in t&&"number"===typeof t.topP&&(e[Ja]=t.topP),"topK"in t&&"number"===typeof t.topK&&(e[Ga]=t.topK),"maxOutputTokens"in t&&"number"===typeof t.maxOutputTokens&&(e[za]=t.maxOutputTokens),"frequencyPenalty"in t&&"number"===typeof t.frequencyPenalty&&(e[Ha]=t.frequencyPenalty),"presencePenalty"in t&&"number"===typeof t.presencePenalty&&(e[Va]=t.presencePenalty),e}(t)),"tools"in t&&Array.isArray(t.tools)){const e=t.tools.flatMap((t=>t.functionDeclarations));r[cc]=JSON.stringify(e)}}}else r[Ua]=Tu({},n);return r}function Cu(t,e,n,r){if(n){const n=e.contents;return void(null!=n&&t.setAttribute(vc,"string"===typeof n?n:JSON.stringify(n)))}const o=[];if("config"in e&&e.config&&"object"===typeof e.config&&"systemInstruction"in e.config&&e.config.systemInstruction&&o.push(...Eu(e.config.systemInstruction,"system")),"history"in e&&o.push(...Eu(e.history,"user")),"contents"in e&&o.push(...Eu(e.contents,"user")),"message"in e&&o.push(...Eu(e.message,"user")),Array.isArray(o)&&o.length){const{systemInstructions:e,filteredMessages:n}=Zc(o);e&&t.setAttribute(sc,e);const i=Array.isArray(n)?n.length:0;t.setAttributes({[oc]:i,[ic]:r?Xc(n):$c(n)})}}function Ru(t,e,n,r,o){const i="embeddings"===n.operation;return new Proxy(t,{apply(t,s,a){var c;const l=n.operation||"unknown",u=a[0],d=Iu(l,u,r),p=null!==(c=d[Ua])&&void 0!==c?c:"unknown";return n.streaming?_a({name:"".concat(l," ").concat(p),op:"gen_ai.".concat(l),attributes:d},(async n=>{try{o.recordInputs&&u&&Cu(n,u,i,Gc(o.enableTruncation));return function(t,e,n){return xu.apply(this,arguments)}(await t.apply(r,a),n,Boolean(o.recordOutputs))}catch(s){throw n.setStatus({code:To,message:"internal_error"}),Ti(s,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:e}}}),n.end(),s}})):ya({name:"".concat(l," ").concat(p),op:"gen_ai.".concat(l),attributes:d},(n=>(o.recordInputs&&u&&Cu(n,u,i,Gc(o.enableTruncation)),na((()=>t.apply(r,a)),(t=>{Ti(t,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:e}}})}),(()=>{}),(t=>{i||function(t,e,n){if(e&&"object"===typeof e){if(e.modelVersion&&t.setAttribute(Xa,e.modelVersion),e.usageMetadata&&"object"===typeof e.usageMetadata){const n=e.usageMetadata;"number"===typeof n.promptTokenCount&&t.setAttributes({[tc]:n.promptTokenCount}),"number"===typeof n.candidatesTokenCount&&t.setAttributes({[ec]:n.candidatesTokenCount}),"number"===typeof n.totalTokenCount&&t.setAttributes({[nc]:n.totalTokenCount})}if(n&&Array.isArray(e.candidates)&&e.candidates.length>0){const n=e.candidates.map((t=>{var e;return null!==(e=t.content)&&void 0!==e&&e.parts&&Array.isArray(t.content.parts)?t.content.parts.map((t=>"string"===typeof t.text?t.text:"")).filter((t=>t.length>0)).join(""):""})).filter((t=>t.length>0));n.length>0&&t.setAttributes({[ac]:n.join("")})}if(n&&e.functionCalls){const n=e.functionCalls;Array.isArray(n)&&n.length>0&&t.setAttributes({[uc]:JSON.stringify(n)})}}}(n,t,o.recordOutputs)})))))}})}function Mu(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0;return new Proxy(t,{get:(t,r,o)=>{const i=Reflect.get(t,r,o),s=Kc(e,String(r)),a=ku[s];if("function"===typeof i&&a){const e=a.operation?Ru(i,s,a,t,n):i.bind(t);return a.proxyResultPath?function(){const t=e(...arguments);return t&&"object"===typeof t?Mu(t,a.proxyResultPath,n):t}:e}return"function"===typeof i?i.bind(t):i&&"object"===typeof i?Mu(i,s,n):i}})}function Ou(t,e){return Mu(t,"",Jc(e))}function Pu(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{recordInputs:n}=Jc(e);return new Proxy(t,{apply(t,e,r){const o=function(t){var e;const n=null!==t&&void 0!==t?t:{},r={[jr]:tl,[Fr]:yc,[rc]:"embeddings",[Ua]:null!==(e=n.model)&&void 0!==e?e:"unknown"};return r[Ba]=function(t){var e,n;const r=null!==(e=null===(n=t.constructor)||void 0===n?void 0:n.name)&&void 0!==e?e:"";return r.includes("OpenAI")?"openai":r.includes("Google")?"google_genai":r.includes("Mistral")?"mistralai":r.includes("Vertex")?"google_vertexai":r.
1includes("Bedrock")?"aws_bedrock":r.includes("Ollama")?"ollama":r.includes("Cloudflare")?"cloudflare":r.includes("Cohere")?"cohere":"langchain"}(n),"dimensions"in n&&(r[Ya]=n.dimensions),"encodingFormat"in n&&(r[Ka]=n.encodingFormat),r}(e),i=o[Ua]||"unknown";if(n){const t=r[0];null!=t&&(o[vc]="string"===typeof t?t:JSON.stringify(t))}return ya({name:"embeddings ".concat(i),op:yc,attributes:o},(()=>Reflect.apply(t,e,r).then(void 0,(t=>{throw Ti(t,{mechanism:{handled:!1,type:"auto.ai.langchain"}}),t}))))}})}function Nu(t,e){const n=t;return"function"===typeof n.embedQuery&&(n.embedQuery=Pu(n.embedQuery,e)),"function"===typeof n.embedDocuments&&(n.embedDocuments=Pu(n.embedDocuments,e)),t}const Lu={"responses.create":{operation:"chat"},"chat.completions.create":{operation:"chat"},"embeddings.create":{operation:"embeddings"},"conversations.create":{operation:"chat"}},Du=["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 Fu(t){return null!==t&&"object"===typeof t&&"type"in t&&"string"===typeof t.type&&t.type.startsWith("response.")}function ju(t){return null!==t&&"object"===typeof t&&"object"in t&&"chat.completion.chunk"===t.object}function Bu(t,e){for(const n of t){const t=n.index;if(void 0!==t&&n.function)if(t in e.chatCompletionToolCalls){const r=e.chatCompletionToolCalls[t];n.function.arguments&&null!==r&&void 0!==r&&r.function&&(r.function.arguments+=n.function.arguments)}else e.chatCompletionToolCalls[t]=(0,s.A)((0,s.A)({},n),{},{function:{name:n.function.name,arguments:n.function.arguments||""}})}}function Uu(t,e,n){var r,o;e.responseId=null!==(r=t.id)&&void 0!==r?r:e.responseId,e.responseModel=null!==(o=t.model)&&void 0!==o?o:e.responseModel,t.usage&&(e.promptTokens=t.usage.prompt_tokens,e.completionTokens=t.usage.completion_tokens,e.totalTokens=t.usage.total_tokens);for(const c of null!==(i=t.choices)&&void 0!==i?i:[]){var i,s,a;if(n)null!==(s=c.delta)&&void 0!==s&&s.content&&e.responseTexts.push(c.delta.content),null!==(a=c.delta)&&void 0!==a&&a.tool_calls&&Bu(c.delta.tool_calls,e);c.finish_reason&&e.finishReasons.push(c.finish_reason)}}function qu(t,e,n,r){if(!t||"object"!==typeof t)return void e.eventTypes.push("unknown:non-object");if(t instanceof Error)return r.setStatus({code:To,message:"internal_error"}),void Ti(t,{mechanism:{handled:!1,type:"auto.ai.openai.stream-response"}});if(!("type"in t))return;const o=t;if(Du.includes(o.type)){if(n&&("response.output_item.done"===o.type&&"item"in o&&e.responsesApiToolCalls.push(o.item),"response.output_text.delta"===o.type&&"delta"in o&&o.delta))e.responseTexts.push(o.delta);else if("response"in o){var i,s;const{response:t}=o;e.responseId=null!==(i=t.id)&&void 0!==i?i:e.responseId,e.responseModel=null!==(s=t.model)&&void 0!==s?s:e.responseModel,t.usage&&(e.promptTokens=t.usage.input_tokens,e.completionTokens=t.usage.output_tokens,e.totalTokens=t.usage.total_tokens),t.status&&e.finishReasons.push(t.status),n&&t.output_text&&e.responseTexts.push(t.output_text)}}else e.eventTypes.push(o.type)}function Wu(){return(Wu=Xl((function*(t,e,n){const r={eventTypes:[],responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,totalTokens:void 0,chatCompletionToolCalls:{},responsesApiToolCalls:[]};try{var o,i=!1,a=!1;try{for(var c,l=Ql(t);i=!(c=yield $l(l.next())).done;i=!1){const t=c.value;ju(t)?Uu(t,r,n):Fu(t)&&qu(t,r,n,e),yield t}}catch(u){a=!0,o=u}finally{try{i&&null!=l.return&&(yield $l(l.return()))}finally{if(a)throw o}}}finally{const t=[...Object.values(r.chatCompletionToolCalls),...r.responsesApiToolCalls];Yc(e,(0,s.A)((0,s.A)({},r),{},{toolCalls:t}),n)}}))).apply(this,arguments)}function zu(t,e){const n={[Ba]:"openai",[rc]:e,[jr]:"auto.ai.openai"};if(t.length>0&&"object"===typeof t[0]&&null!==t[0]){const e=t[0],r=function(t){const e=[...Array.isArray(t.tools)?t.tools:[],...t.web_search_options&&"object"===typeof t.web_search_options?[(0,s.A)({type:"web_search_options"},t.web_search_options)]:[]];if(0!==e.length)try{return JSON.stringify(e)}catch(n){return void(p&&_.error("Failed to serialize OpenAI tools:",n))}}(e);r&&(n[cc]=r),Object.assign(n,function(t){var e;const n={[Ua]:null!==(e=t.model)&&void 0!==e?e:"unknown"};"temperature"in t&&(n[Wa]=t.temperature),"top_p"in t&&(n[Ja]=t.top_p),"frequency_penalty"in t&&(n[Ha]=t.frequency_penalty),"presence_penalty"in t&&(n[Va]=t.presence_penalty),"stream"in t&&(n[qa]=t.stream),"encoding_format"in t&&(n[Ka]=t.encoding_format),"dimensions"in t&&(n[Ya]=t.dimensions);const r=function(t){return"conversation"in t&&"string"===typeof t.conversation?t.conversation:"previous_response_id"in t&&"string"===typeof t.previous_response_id?t.previous_response_id:void 0}(t);return r&&(n[fc]=r),n}(e))}else n[Ua]="unknown";return n}function Hu(t,e,n,r){if("embeddings"===n&&"input"in e){const n=e.input;if(null==n)return;if("string"===typeof n&&0===n.length)return;if(Array.isArray(n)&&0===n.length)return;return void t.setAttribute(vc,"string"===typeof n?n:JSON.stringify(n))}const o="input"in e?e.input:"messages"in e?e.messages:void 0;if(!o)return;if(Array.isArray(o)&&0===o.length)return;const{systemInstructions:i,filteredMessages:s}=Zc(o);i&&t.setAttribute(sc,i),t.setAttribute(ic,r?Xc(s):$c(s)),Array.isArray(s)?t.setAttribute(oc,s.length):t.setAttribute(oc,1)}function Vu(t,e,n,r,o){return function(){for(var i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];const c=n.operation||"unknown",l=zu(s,c),u=l[Ua]||"unknown",d=s[0],p=d&&"object"===typeof d&&!0===d.stream,f={name:"".concat(c," ").concat(u),op:"gen_ai.".concat(c),attributes:l};if(p){let n;const i=_a(f,(i=>(n=t.apply(r,s),o.recordInputs&&d&&Hu(i,d,c,Gc(o.enableTruncation)),(async()=>{try{var t;return function(t,e,n){return Wu.apply(this,arguments)}(await n,i,null!==(t=o.recordOutputs)&&void 0!==t&&t)}catch(r){throw i.setStatus({code:To,message:"internal_error"}),Ti(r,{mechanism:{handled:!1,type:"auto.ai.openai.stream",data:{function:e}}}),i.end(),r}})())));return Qc(n,i,"auto.ai.openai")}let h;const m=ya(f,(n=>(h=t.apply(r,s),o.recordInputs&&d&&Hu(n,d,c,Gc(o.enableTruncation)),h.then((t=>(function(t,e,n){if(!e||"object"!==typeof e)return;const r=e,o={};if("string"===typeof r.id&&(o[Za]=r.id),"string"===typeof r.model&&(o[Xa]=r.model),"conversation"===r.object&&"string"===typeof r.id&&(o[fc]=r.id),r.usage&&"object"===typeof r.usage){var i,s;const t=r.usage,e=null!==(i=t.prompt_tokens)&&void 0!==i?i:t.input_tokens;"number"===typeof e&&(o[tc]=e);const n=null!==(s=t.completion_tokens)&&void 0!==s?s:t.output_tokens;"number"===typeof n&&(o[ec]=n),"number"===typeof t.total_tokens&&(o[nc]=t.total_tokens)}if(Array.isArray(r.choices)){const t=r.choices,e=t.map((t=>t.finish_reason)).filter((t=>"string"===typeof t));if(e.length>0&&(o[$a]=JSON.stringify(e)),n){const e=t.map((t=>{const e=t.message;return(null===e||void 0===e?void 0:e.content)||""}));o[ac]=JSON.stringify(e);const n=t.map((t=>{const e=t.message;return null===e||void 0===e?void 0:e.tool_calls})).filter((t=>Array.isArray(t)&&t.length>0)).flat();n.length>0&&(o[uc]=JSON.stringify(n))}}if("string"===typeof r.status&&(o[$a]||(o[$a]=JSON.stringify([r.status]))),n&&("string"!==typeof r.output_text||o[ac]||
1(o[ac]=r.output_text),Array.isArray(r.output)&&r.output.length>0&&!o[uc])){const t=r.output.filter((t=>"function_call"===(null===t||void 0===t?void 0:t.type)));t.length>0&&(o[uc]=JSON.stringify(t))}t.setAttributes(o)}(n,t,o.recordOutputs),t)),(t=>{throw Ti(t,{mechanism:{handled:!1,type:"auto.ai.openai",data:{function:e}}}),t})))));return Qc(h,m,"auto.ai.openai")}}function Ju(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0;return new Proxy(t,{get(t,r){const o=t[r],i=Kc(e,String(r)),s=Lu[i];return"function"===typeof o&&s?Vu(o,i,s,t,n):"function"===typeof o?o.bind(t):o&&"object"===typeof o?Ju(o,i,n):o}})}function Gu(t,e){return Ju(t,"",Jc(e))}const Ku=["reauthenticate","signInAnonymously","signInWithOAuth","signInWithIdToken","signInWithOtp","signInWithPassword","signInWithSSO","signOut","signUp","verifyOtp"],Yu=["createUser","deleteUser","listUsers","getUserById","updateUserById","inviteUserByEmail"],$u={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"},Xu=["select","insert","upsert","update","delete"];function Zu(t){try{t.__SENTRY_INSTRUMENTED__=!0}catch(e){}}function Qu(t){try{return t.__SENTRY_INSTRUMENTED__}catch(e){return!1}}function td(t,e){return Object.keys(e).length>0?e:Array.isArray(t)&&t.length>0?t:void 0}function ed(t,e){if(""===e||"*"===e)return"select(*)";if("select"===t)return"select(".concat(e,")");if("or"===t||t.endsWith(".or"))return"".concat(t).concat(e);const[n,...r]=e.split(".");let o;return o=null!==n&&void 0!==n&&n.startsWith("fts")?"textSearch":null!==n&&void 0!==n&&n.startsWith("plfts")?"textSearch[plain]":null!==n&&void 0!==n&&n.startsWith("phfts")?"textSearch[phrase]":null!==n&&void 0!==n&&n.startsWith("wfts")?"textSearch[websearch]":n&&$u[n]||"filter","".concat(o,"(").concat(t,", ").concat(r.join("."),")")}function nd(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Proxy(t,{apply:(n,r,o)=>ya({name:"auth ".concat(e?"(admin) ":"").concat(t.name),attributes:{[jr]:"auto.db.supabase",[Fr]:"db","db.system":"postgresql","db.operation":"auth.".concat(e?"admin.":"").concat(t.name)}},(t=>Reflect.apply(n,r,o).then((e=>(e&&"object"===typeof e&&"error"in e&&e.error?(t.setStatus({code:To}),Ti(e.error,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}})):t.setStatus({code:Eo}),t.end(),e))).catch((e=>{throw t.setStatus({code:To}),t.end(),Ti(e,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}}),e})).then(...o)))})}function rd(t,e){Qu(t.prototype.from)||(t.prototype.from=new Proxy(t.prototype.from,{apply(t,n,r){const o=Reflect.apply(t,n,r);return function(t,e){for(const n of Xu)Qu(t.prototype[n])||(t.prototype[n]=new Proxy(t.prototype[n],{apply(t,r,o){const i=Reflect.apply(t,r,o),s=i.constructor;return p&&_.log("Instrumenting ".concat(n," operation's PostgRESTFilterBuilder")),od(s,e),i}}),Zu(t.prototype[n]))}(o.constructor,e),o}}),Zu(t.prototype.from))}function od(t,e){Qu(t.prototype.then)||(t.prototype.then=new Proxy(t.prototype.then,{apply(t,n,r){var o,i;const s=Xu,a=n,c=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(t){case"GET":return"select";case"POST":var n;return null!==(n=e.Prefer)&&void 0!==n&&n.includes("resolution=")?"upsert":"insert";case"PATCH":return"update";case"DELETE":return"delete";default:return"<unknown-op>"}}(a.method,a.headers);if(!s.includes(c))return Reflect.apply(t,n,r);if(null===a||void 0===a||null===(o=a.url)||void 0===o||!o.pathname||"string"!==typeof a.url.pathname)return Reflect.apply(t,n,r);const l=a.url.pathname.split("/"),u=l.length>0?l[l.length-1]:"",d=[];for(const[e,S]of a.url.searchParams.entries())d.push(ed(e,S));const p=Object.create(null);if(I(a.body))for(const[e,S]of Object.entries(a.body))p[e]=S;const f=$t(),h=null!==(i=e.sendOperationData)&&void 0!==i?i:!0===(null===f||void 0===f?void 0:f.getDataCollectionOptions().userInfo),m=td(a.body,p),g="select"===c?"":"".concat(c).concat(void 0!==td(a.body,p)?"(...) ":"");const v=h?d.join(" "):d.length>
10?"[redacted]":"",y=[g.trimEnd(),v].filter(Boolean).join(" "),_=y?"".concat(y," from(").concat(u,")"):"from(".concat(u,")"),b={"db.table":u,"db.schema":a.schema,"db.url":a.url.origin,"db.sdk":a.headers["X-Client-Info"],"db.system":"postgresql","db.operation":c,[jr]:"auto.db.supabase",[Fr]:"db"};return d.length&&h&&(b["db.query"]=d),void 0!==m&&h&&(b["db.body"]=m),ya({name:_,attributes:b},(e=>Reflect.apply(t,n,[]).then((t=>{if(e&&(t&&"object"===typeof t&&"status"in t&&Co(e,t.status||500),e.end()),null!==t&&void 0!==t&&t.error){const e=new Error(t.error.message);t.error.code&&(e.code=t.error.code),t.error.details&&(e.details=t.error.details);const n={};d.length&&h&&(n.query=d),void 0!==m&&h&&(n.body=m),Ti(e,(t=>(t.addEventProcessor((t=>(vt(t,{handled:!1,type:"auto.db.supabase.postgres"}),t))),t.setContext("supabase",n),t)))}const n={type:"supabase",category:"db.".concat(c),message:_},r={};return d.length&&h&&(r.query=d),void 0!==m&&h&&(r.body=m),Object.keys(r).length&&(n.data=r),As(n),t}),(t=>{throw e&&(Co(e,500),e.end()),t})).then(...r)))}}),Zu(t.prototype.then))}const id=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t)return void(p&&_.warn("Supabase integration was not installed because no Supabase client was provided."));rd(t.constructor===Function?t:t.constructor,e),function(t){const e=t.auth;if(e&&!Qu(t.auth)){for(const n of Ku){const r=e[n];r&&"function"===typeof t.auth[n]&&(t.auth[n]=nd(r))}for(const n of Yu){const r=e.admin[n];r&&"function"===typeof t.auth.admin[n]&&(t.auth.admin[n]=nd(r,!0))}Zu(t.auth)}}(t)},sd=t=>((t,e)=>({setupOnce(){id(t,e)},name:"Supabase"}))(t.supabaseClient,{sendOperationData:t.sendOperationData});function ad(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];const o=new String(String.raw(t,...n));return o.__sentry_template_string__=t.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),o.__sentry_template_values__=n,o}const cd=ad;function ld(t,e,n,r,o){Vs({level:t,message:e,attributes:n,severityNumber:o},r)}function ud(t,e){let{scope:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};ld("trace",t,e,n)}function dd(t,e){let{scope:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};ld("debug",t,e,n)}function pd(t,e){let{scope:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};ld("info",t,e,n)}function fd(t,e){let{scope:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};ld("warn",t,e,n)}function hd(t,e){let{scope:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};ld("error",t,e,n)}function md(t,e){let{scope:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};ld("fatal",t,e,n)}function gd(t,e){const n=e?"auto":"never";return[{type:"trace_metric",item_count:t.length,content_type:"application/vnd.sentry.items.trace-metric+json"},(0,s.A)((0,s.A)({version:2},ce()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}}),{},{items:t})]}const vd=1e3;function yd(t,e,n){!n||!(!(arguments.length>3&&void 0!==arguments[3])||arguments[3])&&e in t||(t[e]=n)}function _d(t,e){const n=wd(),r=kd(t);void 0===r?n.set(t,[e]):r.length>=vd?(Sd(t,r),n.set(t,[e])):n.set(t,[...r,e])}function bd(t,e){var n,r,o,i;const a=null!==(n=null===e||void 0===e?void 0:e.scope)&&void 0!==n?n:Vt(),c=null!==(r=null===e||void 0===e?void 0:e.captureSerializedMetric)&&void 0!==r?r:_d,l=null!==(o=null===a||void 0===a?void 0:a.getClient())&&void 0!==o?o:$t();if(!l)return void(p&&_.warn("No client available to capture metric."));const{_experiments:u,enableMetrics:d,beforeSendMetric:f}=l.getOptions();if(!(null===(i=null!==d&&void 0!==d?d:null===u||void 0===u?void 0:u.enableMetrics)||void 0===i||i))return void(p&&_.warn("metrics option not enabled, metric will not be captured."));const{user:h,attributes:m}=wi(Jt(),a),g=function(t,e,n){var r,o;const{release:i,environment:a}=e.getOptions(),c=(0,s.A)({},t.attributes);yd(c,"user.id",n.id,!1),yd(c,"user.email",n.email,!1),yd(c,"user.name",n.username,!1),yd(c,"sentry.release",i),yd(c,"sentry.environment",a);const{name:l,version:u}=null!==(r=null===(o=e.getSdkMetadata())||void 0===o?void 0:o.sdk)&&void 0!==r?r:{};yd(c,"sentry.sdk.name",l),yd(c,"sentry.sdk.version",u);const d=e.getIntegrationByName("Replay"),p=null===d||void 0===d?void 0:d.getReplayId(!0);return yd(c,"sentry.replay_id",p),p&&"buffer"===(null===d||void 0===d?void 0:d.getRecordingMode())&&yd(c,"sentry._internal.replay_is_buffering",!0),(0,s.A)((0,s.A)({},t),{},{attributes:c})}(t,l,h);l.emit("processMetric",g);const v=f||(null===u||void 0===u?void 0:u.beforeSendMetric),y=v?v(g):g;if(!y)return void(p&&_.log("`beforeSendMetric` returned `null`, will not send metric."));const b=function(t,e,n,r){const[,o]=Bs(e,n),i=Ot(n),a=i?i.spanContext().traceId:null===o||void 0===o?void 0:o.trace_id,c=i?i.spanContext().spanId:void 0,l=kt(),u=js(l);return{timestamp:l,trace_id:null!==a&&void 0!==a?a:"",span_id:c,name:t.name,type:t.type,unit:t.unit,value:t.value,attributes:(0,s.A)((0,s.A)((0,s.A)({},ko(r)),ko(t.attributes,"skip-undefined")),{},{[u.key]:u.value})}}(y,l,a,m);p&&_.log("[Metric]",b),c(l,b),l.emit("afterCaptureMetric",y)}function Sd(t,e){var n;const r=null!==(n=null!==e&&void 0!==e?e:kd(t))&&void 0!==n?n:[];if(0===r.length)return;const o=t.getOptions(),i=function(t,e,n,r,o){const i={};return null!==e&&void 0!==e&&e.sdk&&(i.sdk={name:e.sdk.name,version:e.sdk.version}),n&&r&&(i.dsn=mo(r)),as(i,[gd(t,o)])}(r,o._metadata,o.tunnel,t.getDsn(),t.getDataCollectionOptions().userInfo);wd().set(t,[]),t.emit("flushMetrics"),t.sendEnvelope(i)}function kd(t){return wd().get(t)}function wd(){return d("clientToMetricBufferMap",(()=>new WeakMap))}function Ad(t,e,n,r){bd({type:t,name:e,value:n,unit:null===r||void 0===r?void 0:r.unit,attributes:null===r||void 0===r?void 0:r.attributes},{scope:null===r||void 0===r?void 0:r.scope})}function xd(t){Ad("counter",t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,arguments.length>2?arguments[2]:void 0)}function Ed(t,e,n){Ad("gauge",t,e,n)}function Td(t,e,n){Ad("distribution",t,e,n)}const Id=new Map,Cd=new Set;function Rd(t,e){return function(t){if(a._sentryModuleMetadata)for(const e of Object.keys(a._sentryModuleMetadata)){const n=a._sentryModuleMetadata[e];if(Cd.has(e))continue;Cd.add(e);const r=t(e);for(const t of r.reverse())if(t.filename){Id.set(t.filename,n);break}}}(t),Id.get(e)}function Md(t,e){var n;null===(n=e.exception)||void 0===n||null===(n=n.values)||void 0===n||n.forEac
1h((e=>{var n;null===(n=e.stacktrace)||void 0===n||null===(n=n.frames)||void 0===n||n.forEach((e=>{if(!e.filename||e.module_metadata)return;const n=Rd(t,e.filename);n&&(e.module_metadata=n)}))}))}function Od(t){var e;null===(e=t.exception)||void 0===e||null===(e=e.values)||void 0===e||e.forEach((t=>{var e;null===(e=t.stacktrace)||void 0===e||null===(e=e.frames)||void 0===e||e.forEach((t=>{delete t.module_metadata}))}))}const Pd=()=>({name:"ModuleMetadata",setup(t){t.on("beforeEnvelope",(t=>{ls(t,((t,e)=>{if("event"===e){const e=Array.isArray(t)?t[1]:void 0;e&&(Od(e),t[1]=e)}}))})),t.on("applyFrameMetadata",(e=>{if(e.type)return;Md(t.getOptions().stackParser,e)}))}});let Nd=null;function Ld(t){const e="error";Ts(e,t),Is(e,Dd)}function Dd(){Nd=a.onerror,a.onerror=function(t,e,n,r,o){return Cs("error",{column:r,error:o,line:n,msg:t,url:e}),!!Nd&&Nd.apply(this,arguments)},a.onerror.__SENTRY_INSTRUMENTED__=!0}let Fd=null;function jd(t){const e="unhandledrejection";Ts(e,t),Is(e,Bd)}function Bd(){Fd=a.onunhandledrejection,a.onunhandledrejection=function(t){return Cs("unhandledrejection",t),!Fd||Fd.apply(this,arguments)},a.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}let Ud=!1;function qd(){function t(){const t=di(),e=t&&li(t);if(e){const t="internal_error";p&&_.log("[Tracing] Root span: ".concat(t," -> Global error occurred")),e.setStatus({code:To,message:t})}}Ud||(Ud=!0,Ld(t),jd(t))}function Wd(t,e){let n=0;for(let r=t.length-1;r>=0;r--){const e=t[r];"."===e?t.splice(r,1):".."===e?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}const zd=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function Hd(t){const e=t.length>1024?"<truncated>".concat(t.slice(-1024)):t,n=zd.exec(e);return n?n.slice(1):[]}function Vd(){let t="",e=!1;for(let n=arguments.length-1;n>=-1&&!e;n--){const r=n>=0?n<0||arguments.length<=n?void 0:arguments[n]:"/";r&&(t="".concat(r,"/").concat(t),e="/"===r.charAt(0))}return t=Wd(t.split("/").filter((t=>!!t)),!e).join("/"),(e?"/":"")+t||"."}function Jd(t){let e=0;for(;e<t.length&&""===t[e];e++);let n=t.length-1;for(;n>=0&&""===t[n];n--);return e>n?[]:t.slice(e,n-e+1)}const Gd=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=t.root,n=t.prefix||"app:///",r="window"in a&&!!a.window,o=t.iteratee||function(t){let{isBrowser:e,root:n,prefix:r}=t;return t=>{if(!t.filename)return t;const o=/^[a-zA-Z]:\\/.test(t.filename)||t.filename.includes("\\")&&!t.filename.includes("/"),i=/^\//.test(t.filename);if(e){if(n){const e=t.filename;0===e.indexOf(n)&&(t.filename=e.replace(n,r))}}else if(o||i){const e=o?t.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):t.filename,i=n?function(t,e){t=Vd(t).slice(1),e=Vd(e).slice(1);const n=Jd(t.split("/")),r=Jd(e.split("/")),o=Math.min(n.length,r.length);let i=o;for(let a=0;a<o;a++)if(n[a]!==r[a]){i=a;break}let s=[];for(let a=i;a<n.length;a++)s.push("..");return s=s.concat(r.slice(i)),s.join("/")}(n,e):function(t,e){let n=Hd(t)[2]||"";return e&&n.slice(-1*e.length)===e&&(n=n.slice(0,n.length-e.length)),n}(e);t.filename="".concat(r).concat(i)}return t}}({isBrowser:r,root:e,prefix:n});function i(t){var e;return(0,s.A)((0,s.A)({},t),{},{frames:null===t||void 0===t||null===(e=t.frames)||void 0===e?void 0:e.map((t=>o(t)))})}return{name:"RewriteFrames",processEvent(t){let e=t;return t.exception&&Array.isArray(t.exception.values)&&(e=function(t){try{return(0,s.A)((0,s.A)({},t),{},{exception:(0,s.A)((0,s.A)({},t.exception),{},{values:t.exception.values.map((t=>(0,s.A)((0,s.A)({},t),t.stacktrace&&{stacktrace:i(t.stacktrace)})))})})}catch(e){return t}}(e)),e}}};function Kd(t){Vt().setClient(t)}const Yd=t=>({name:"ThirdPartyErrorsFilter",setup(t){t.on("beforeEnvelope",(t=>{ls(t,((t,e)=>{if("event"===e){const e=Array.isArray(t)?t[1]:void 0;e&&(Od(e),t[1]=e)}}))})),t.on("applyFrameMetadata",(e=>{if(e.type)return;Md(t.getOptions().stackParser,e)}))},preprocessEvent(e){var n;t.ignoreSentryInternalFrames&&(null!==(n=a._sentryWrappedDepth)&&void 0!==n?n:0)>0&&(e.sdkProcessingMetadata=(0,s.A)((0,s.A)({},e.sdkProcessingMetadata),{},{insideSentryWrapped:!0}))},processEvent(e){var n,r;const o=!!t.ignoreSentryInternalFrames&&(!0===(null===(n=e.sdkProcessingMetadata)||void 0===n?void 0:n.insideSentryWrapped)&&1===(null===(r=e.exception)||void 0===r||null===(r=r.values)||void 0===r?void 0:r.length)),i=function(t,e,n){const r=Q(t);if(!r)return;return r.filter(((t,r)=>!!t.filename&&((null!=t.lineno||null!=t.colno||null!=t.instruction_addr)&&(!e||!function(t,e,n){if(0!==e)return!1;if(n&&function(t){return!t.context_line&&!t.pre_context&&!!t.function&&t.function.length<=2}(t))return!0;
1if("sentryWrapped"===t.function)return!0;if(!t.context_line||!t.filename)return!1;if(!t.filename.includes("sentry")||!t.filename.includes("helpers")||!t.context_line.includes(Zd))return!1;if(t.pre_context){const e=t.pre_context.length;for(let n=0;n<e;n++){var r;if(null!==(r=t.pre_context[n])&&void 0!==r&&r.includes(Xd))return!0}}return!1}(t,r,!!n))))).map((t=>t.module_metadata?Object.keys(t.module_metadata).filter((t=>t.startsWith($d))).map((t=>t.slice($d.length))):[]))}(e,t.ignoreSentryInternalFrames,o);if(i){const n=i["drop-error-if-contains-third-party-frames"===t.behaviour||"apply-tag-if-contains-third-party-frames"===t.behaviour?"some":"every"]((e=>!e.some((e=>t.filterKeys.includes(e)))));if(n){if("drop-error-if-contains-third-party-frames"===t.behaviour||"drop-error-if-exclusively-contains-third-party-frames"===t.behaviour)return null;e.tags=(0,s.A)((0,s.A)({},e.tags),{},{third_party_code:!0})}}return e}});const $d="_sentryBundlerPluginAppKey:",Xd="Attempt to invoke user-land function",Zd="fn.apply(this, wrappedArguments)";function Qd(t){return(0,s.A)((0,s.A)({},t),{},{path:"path"in t&&Array.isArray(t.path)?t.path.join("."):void 0,keys:"keys"in t?JSON.stringify(t.keys):void 0,unionErrors:"unionErrors"in t?JSON.stringify(t.unionErrors):void 0})}function tp(t){const e=new Set;for(const r of t.issues){const t=r.path.map((t=>"number"===typeof t?"<array>":t)).join(".");t.length>0&&e.add(t)}const n=Array.from(e);if(0===n.length){let e="variable";if(t.issues.length>0){const n=t.issues[0];void 0!==n&&"expected"in n&&"string"===typeof n.expected&&(e=n.expected)}return"Failed to validate ".concat(e)}return"Failed to validate keys: ".concat(ct(n.join(", "),100))}function ep(t){var e;let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0;if(null===(e=r.exception)||void 0===e||!e.values||!o.originalException||(!S(i=o.originalException)||"ZodError"!==i.name||!Array.isArray(i.issues))||0===o.originalException.issues.length)return r;var i;try{const e=(n?o.originalException.issues:o.originalException.issues.slice(0,t)).map(Qd);return n&&(Array.isArray(o.attachments)||(o.attachments=[]),o.attachments.push({filename:"zod_issues.json",data:JSON.stringify({issues:e})})),(0,s.A)((0,s.A)({},r),{},{exception:(0,s.A)((0,s.A)({},r.exception),{},{values:[(0,s.A)((0,s.A)({},r.exception.values[0]),{},{value:tp(o.originalException)}),...r.exception.values.slice(1)]}),extra:(0,s.A)((0,s.A)({},r.extra),{},{"zoderror.issues":e.slice(0,t)})})}catch(qn){return(0,s.A)((0,s.A)({},r),{},{extra:(0,s.A)((0,s.A)({},r.extra),{},{"zoderrors sentry integration parse error":{message:"an exception was thrown while processing ZodError within applyZodErrorsToEvent()",error:qn instanceof Error?"".concat(qn.name,": ").concat(qn.message,"\n").concat(qn.stack):"unknown"}})})}}const np=function(){var t;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=null!==(t=e.limit)&&void 0!==t?t:10;return{name:"ZodErrors",processEvent:(t,r)=>ep(n,e.saveZodIssuesAsAttachment,t,r)}};function rp(t){return Qo({trace_id:t.trace_id,span_id:t.span_id,parent_span_id:t.parent_span_id,name:t.description||"",start_timestamp:t.start_timestamp,end_timestamp:t.timestamp||t.start_timestamp,status:t.status&&"ok"!==t.status&&"cancelled"!==t.status?"error":"ok",is_segment:!1,attributes:(0,s.A)({},t.data),links:t.links})}const op=["forwarded","-ip","remote-","via","-user"];const ip={userInfo:!1,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:[],queryParams:!0,genAI:{inputs:!0,outputs:!0},stackFrameVariables:!0,frameContextLines:5};function sp(t){var e,n,r,o,i,s,a,c,l,u,d,p,f,h,m;const g=null!=t.dataCollection?ip:!0===t.sendDefaultPii?{userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],queryParams:!0,genAI:{inputs:!0,outputs:!0},stackFrameVariables:!0,frameContextLines:5}:{userInfo:!1,cookies:{deny:op},httpHeaders:{request:{deny:op},response:{deny:op}},httpBodies:[],queryParams:{deny:op},genAI:{inputs:!1,outputs:!1}
1,stackFrameVariables:!0,frameContextLines:5};const v=null!==(e=t.dataCollection)&&void 0!==e?e:{};return{userInfo:null!==(n=v.userInfo)&&void 0!==n?n:g.userInfo,cookies:null!==(r=v.cookies)&&void 0!==r?r:g.cookies,httpHeaders:{request:null!==(o=null===(i=v.httpHeaders)||void 0===i?void 0:i.request)&&void 0!==o?o:g.httpHeaders.request,response:null!==(s=null===(a=v.httpHeaders)||void 0===a?void 0:a.response)&&void 0!==s?s:g.httpHeaders.response},httpBodies:null!==(c=v.httpBodies)&&void 0!==c?c:g.httpBodies,queryParams:null!==(l=v.queryParams)&&void 0!==l?l:g.queryParams,genAI:{inputs:null!==(u=null===(d=v.genAI)||void 0===d?void 0:d.inputs)&&void 0!==u?u:g.genAI.inputs,outputs:null!==(p=null===(f=v.genAI)||void 0===f?void 0:f.outputs)&&void 0!==p?p:g.genAI.outputs},stackFrameVariables:null!==(h=v.stackFrameVariables)&&void 0!==h?h:g.stackFrameVariables,frameContextLines:null!==(m=v.frameContextLines)&&void 0!==m?m:g.frameContextLines}}const ap="Not capturing exception because it's already been captured.",cp="Discarded session because of missing or non-string release",lp=Symbol.for("SentryInternalError"),up=Symbol.for("SentryDoNotSendEventError");function dp(t){return{message:t,[lp]:!0}}function pp(t){return{message:t,[up]:!0}}function fp(t){return!!t&&"object"===typeof t&&lp in t}function hp(t){return!!t&&"object"===typeof t&&up in t}function mp(t,e,n,r,o){let i,s=0,a=!1;t.on(n,(()=>{s=0,clearTimeout(i),a=!1})),t.on(e,(e=>{if(s+=r(e),s>=8e5)o(t);else if(!a){var n;const e=null!==(n=t.getOptions()._flushInterval)&&void 0!==n?n:5e3;e>0&&(a=!0,i=gl(setTimeout((()=>{o(t)}),e)))}})),t.on("flush",(()=>{o(t)}))}class gp{constructor(t){var e,n,r,o,i,a,c;if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=yl(null!==(e=null===(n=t.transportOptions)||void 0===n?void 0:n.bufferSize)&&void 0!==e?e:wl),this._dataCollection=sp(t),t.dsn?this._dsn=_o(t.dsn):p&&_.warn("No DSN provided, client will not send events."),this._dsn){const e=ss(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport((0,s.A)((0,s.A)({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},t.transportOptions),{},{url:e}))}this._options.enableLogs=null!==(r=this._options.enableLogs)&&void 0!==r?r:null===(o=this._options._experiments)||void 0===o?void 0:o.enableLogs,this._options.enableLogs&&mp(this,"afterCaptureLog","flushLogs",Sp,Js);(null===(i=null!==(a=this._options.enableMetrics)&&void 0!==a?a:null===(c=this._options._experiments)||void 0===c?void 0:c.enableMetrics)||void 0===i||i)&&mp(this,"afterCaptureMetric","flushMetrics",bp,Sd)}captureException(t,e,n){const r=ft();if(yt(t))return p&&_.log(ap),r;const o=(0,s.A)({event_id:r},e);return this._process((()=>this.eventFromException(t,o).then((t=>this._captureEvent(t,o,n))).then((t=>t))),"error"),o.event_id}captureMessage(t,e,n,r){const o=(0,s.A)({event_id:ft()},n),i=E(t)?t:String(t),a=T(t),c=a?this.eventFromMessage(i,e,o):this.eventFromException(t,o);return this._process((()=>c.then((t=>this._captureEvent(t,o,r)))),a?"unknown":"error"),o.event_id}captureEvent(t,e,n){const r=ft();if(null!==e&&void 0!==e&&e.originalException&&yt(e.originalException))return p&&_.log(ap),r;const o=(0,s.A)({event_id:r},e),i=t.sdkProcessingMetadata||{},a=i.capturedSpanScope,c=i.capturedSpanIsolationScope,l=vp(t.type);return this._process((()=>this._captureEvent(t,o,a||n,c)),l),o.event_id}captureSession(t){this.sendSession(t),Et(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getDataCollectionOptions(){return this._dataCollection}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){const e=this._transport;if(this.emit("flush"),!e)return!0;const n=await this._isClientDoneProcessing(t),r=await e.flush(t);return n&&r}async close(t){Js(this);const e=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),e}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some((t=>{let{name:e}=t;return e.startsWith("Spotlight")})))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(t){const e=this._integrations[t.name];!e&&t.beforeSetup&&t.beforeSetup(this),ie(this,t,this._integrations),e||oe(this,[t])}sendEvent(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};
1this.emit("beforeSendEvent",t,e);const n=function(t,e){var n,r;if("transaction"!==t.type||null===(n=t.spans)||void 0===n||!n.length||null===(r=t.sdkProcessingMetadata)||void 0===r||!r.hasGenAiSpans||!e.getOptions().streamGenAiSpans||aa(e))return;const o=[],i=[];for(const s of t.spans){var a;null!==(a=s.op)&&void 0!==a&&a.startsWith("gen_ai.")?o.push(rp(s)):i.push(s)}if(0===o.length)return;t.spans=i;const c=e.getOptions().sendDefaultPii?"auto":"never";return[{type:"span",item_count:o.length,content_type:"application/vnd.sentry.items.span.v2+json"},(0,s.A)((0,s.A)({version:2},ce()&&{ingest_settings:{infer_ip:c,infer_user_agent:c}}),{},{items:o})]}(t,this);let r=da(t,this._dsn,this._options._metadata,this._options.tunnel);for(const o of e.attachments||[])r=cs(r,ms(o));n&&(r=cs(r,n)),this.sendEnvelope(r).then((e=>this.emit("afterSendEvent",t,e)))}sendSession(t){const{release:e,environment:n=wr}=this._options;if("aggregates"in t){const r=t.attrs||{};if(!r.release&&!e)return void(p&&_.warn(cp));r.release=r.release||e,r.environment=r.environment||n,t.attrs=r}else{if(!t.release&&!e)return void(p&&_.warn(cp));t.release=t.release||e,t.environment=t.environment||n}this.emit("beforeSendSession",t);const r=function(t,e,n,r){const o=ys(n);return as((0,s.A)((0,s.A)({sent_at:(new Date).toISOString()},o&&{sdk:o}),!!r&&e&&{dsn:mo(e)}),["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(this._options.sendClientReports){const r="".concat(t,":").concat(e);p&&_.log('Recording outcome: "'.concat(r,'"').concat(n>1?" (".concat(n," times)"):"")),this._outcomes[r]=(this._outcomes[r]||0)+n}}on(t,e){const n=this._hooks[t]=this._hooks[t]||new Set,r=function(){return e(...arguments)};return n.add(r),()=>{n.delete(r)}}emit(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];const o=this._hooks[t];o&&o.forEach((t=>t(...n)))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(e){return p&&_.error("Error while sending envelope:",e),{}}return p&&_.error("Transport disabled"),{}}registerCleanup(t){}dispose(){}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=function(t,e){const n={};return e.forEach((e=>{null!==e&&void 0!==e&&e.beforeSetup&&e.beforeSetup(t)})),e.forEach((e=>{e&&ie(t,e,n)}
1)),n}(this,t),oe(this,t)}_updateSessionFromEvent(t,e){var n;let r="fatal"===e.level,o=!1;const i=null===(n=e.exception)||void 0===n?void 0:n.values;if(i){o=!0,r=!1;for(const t of i){var a;if(!1===(null===(a=t.mechanism)||void 0===a?void 0:a.handled)){r=!0;break}}}const c="ok"===t.status;(c&&0===t.errors||c&&r)&&(Et(t,(0,s.A)((0,s.A)({},r&&{status:"crashed"}),{},{errors:t.errors||Number(o||r)})),this.captureSession(t))}async _isClientDoneProcessing(t){let e=0;for(;!t||e<t;){if(await new Promise((t=>setTimeout(t,1))),!this._numProcessing)return!0;e++}return!1}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(t,e,n,r){const o=this.getOptions(),i=this.getIntegrationNames();return!e.integrations&&i.length&&(e.integrations=i),this.emit("preprocessEvent",t,e),t.type||r.setLastEventId(t.event_id||e.event_id),Ai(o,t,e,n,this,r).then((t=>{var r;if(null===t)return t;this.emit("postprocessEvent",t,e),t.contexts=(0,s.A)({trace:(0,s.A)((0,s.A)({},null===(r=t.contexts)||void 0===r?void 0:r.trace),Xt(n))},t.contexts);const o=vi(this,n);return t.sdkProcessingMetadata=(0,s.A)({dynamicSamplingContext:o},t.sdkProcessingMetadata),t}))}_captureEvent(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Vt(),r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Jt();return p&&yp(t)&&_.log("Captured error event `".concat(Cl(t)[0]||"<unknown>","`")),this._processEvent(t,e,n,r).then((t=>t.event_id),(t=>{p&&(hp(t)?_.log(t.message):fp(t)?_.warn(t.message):_.warn(t))}))}_processEvent(t,e,n,r){const o=this.getOptions(),{sampleRate:i}=o,a=_p(t),c=yp(t),l=t.type||"error",u="before send for type `".concat(l,"`"),d="undefined"===typeof i?void 0:Lo(i);if(c&&"number"===typeof d&&q()>d)return this.recordDroppedEvent("sample_rate","error"),xr(pp("Discarding event because it's not included in the random sample (sampling rate = ".concat(i,")")));const p=vp(t.type);return this._prepareEvent(t,e,n,r).then((t=>{var n;if(null===t)throw this.recordDroppedEvent("event_processor",p),pp("An event processor returned `null`, will not send event.");if(!0===(null===(n=e.data)||void 0===n?void 0:n.__sentry__))return t;const r=function(t,e,n,r){const{beforeSend:o,beforeSendTransaction:i,ignoreSpans:a}=e,c=!ua(e.beforeSendSpan)&&e.beforeSendSpan;let l=n;if(yp(l)&&o)return o(l,r);if(_p(l)){if(c||a){const e=function(t){var e,n,r;const{trace_id:o,parent_span_id:i,span_id:s,status:a,origin:c,data:l,op:u}=null!==(e=null===(n=t.contexts)||void 0===n?void 0:n.trace)&&void 0!==e?e:{};return{data:null!==l&&void 0!==l?l:{},description:t.transaction,op:u,parent_span_id:i,span_id:null!==s&&void 0!==s?s:"",start_timestamp:null!==(r=t.start_timestamp)&&void 0!==r?r:0,status:a,timestamp:t.timestamp,trace_id:null!==o&&void 0!==o?o:"",origin:c,profile_id:null===l||void 0===l?void 0:l[to],exclusive_time:null===l||void 0===l?void 0:l[eo],measurements:t.measurements,is_segment:!0}}(l);if(null!==a&&void 0!==a&&a.length&&oa({description:e.description,op:e.op,attributes:e.data},a))return null;if(c){const t=c(e);t?l=Tt(n,{type:"transaction",timestamp:(u=t).timestamp,start_timestamp:u.start_timestamp,transaction:u.description,contexts:{trace:{trace_id:u.trace_id,span_id:u.span_id,parent_span_id:u.parent_span_id,op:u.op,status:u.status,origin:u.origin,data:(0,s.A)((0,s.A)((0,s.A)({},u.data),u.profile_id&&{[to]:u.profile_id}),u.exclusive_time&&{[eo]:u.exclusive_time})}},measurements:u.measurements}):pi()}if(l.spans){const e=[],n=l.spans;for(const t of n)if(null!==a&&void 0!==a&&a.length&&oa({description:t.description,op:t.op,attributes:t.data},a))sa(n,t);else if(c){const n=c(t);n?e.push(n):(pi(),e.push(t))}else e.push(t);const r=l.spans.length-e.length;r&&t.recordDroppedEvent("before_send","span",r),l.spans=e}}if(i){if(l.spans){const t=l.spans.length;l.sdkProcessingMetadata=(0,s.A)((0,s.A)({},n.sdkProcessingMetadata),{},{spanCountBeforeProcessing:t})}return i(l,r)}}var u;return l}(this,o,t,e);return function(t,e){const n="".concat(e," must return `null` or a valid event.");if(R(t))return t.then((t=>{if(!I(t)&&null!==t)throw dp(n);return t}),(t=>{throw dp("".concat(e," rejected with ").concat(t))}));if(!I(t)&&null!==t)throw dp(n);return t}(r,u)})).then((o=>
1{if(null===o){if(this.recordDroppedEvent("before_send",p),a){const e=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",e)}throw pp("".concat(u," returned `null`, will not send event."))}const i=n.getSession()||r.getSession();if(c&&i&&this._updateSessionFromEvent(i,o),a){var l;const t=((null===(l=o.sdkProcessingMetadata)||void 0===l?void 0:l.spanCountBeforeProcessing)||0)-(o.spans?o.spans.length:0);t>0&&this.recordDroppedEvent("before_send","span",t)}const d=o.transaction_info;if(a&&d&&o.transaction!==t.transaction){const t="custom";o.transaction_info=(0,s.A)((0,s.A)({},d),{},{source:t})}return this.sendEvent(o,e),o})).then(null,(t=>{if(hp(t)||fp(t))throw t;throw this.captureException(t,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:t}),dp("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ".concat(t))}))}_process(t,e){this._numProcessing++,this._promiseBuffer.add(t).then((t=>(this._numProcessing--,t)),(t=>(this._numProcessing--,t===vl&&this.recordDroppedEvent("queue_overflow",e),t)))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map((t=>{let[e,n]=t;const[r,o]=e.split(":");return{reason:r,category:o,quantity:n}}))}_flushOutcomes(){p&&_.log("Flushing outcomes...");const t=this._clearOutcomes();if(0===t.length)return void(p&&_.log("No outcomes to send"));if(!this._dsn)return void(p&&_.log("No dsn provided, will not send outcomes"));p&&_.log("Sending outcomes:",t);const e=(n=t,as((r=this._options.tunnel&&mo(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:o||bt(),discarded_events:n}]]));var n,r,o;this.sendEnvelope(e)}}function vp(t){return"replay_event"===t?"replay":t||"error"}function yp(t){return void 0===t.type}function _p(t){return"transaction"===t.type}function bp(t){let e=0;return t.name&&(e+=2*t.name.length),e+=8,e+kp(t.attributes)}function Sp(t){let e=0;return t.message&&(e+=2*t.message.length),e+kp(t.attributes)}function kp(t){if(!t)return 0;let e=0;return Object.values(t).forEach((t=>{Array.isArray(t)?e+=t.length*wp(t[0]):T(t)?e+=wp(t):e+=100})),e}function wp(t){return"string"===typeof t?2*t.length:"number"===typeof t?8:"boolean"===typeof t?4:0}function Ap(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[e],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"npm";const o=(t._metadata=t._metadata||{}).sdk=t._metadata.sdk||{};o.name||(o.name="sentry.javascript.".concat(e),o.packages=n.map((t=>({name:"".concat(r,":@sentry/").concat(t),version:c}))),o.version=c)}function xp(t){var e;"aggregates"in t?void 0===(null===(e=t.attrs)||void 0===e?void 0:e.ip_address)&&(t.attrs=(0,s.A)((0,s.A)({},t.attrs),{},{ip_address:"{{auto}}"})):void 0===t.ipAddress&&(t.ipAddress="{{auto}}")}function Ep(t){return function(t){return S(t)&&"__sentry_fetch_url_host__"in t&&"string"===typeof t.__sentry_fetch_url_host__}(t)?"".concat(t.message," (").concat(t.__sentry_fetch_url_host__,")"):t.message}function Tp(t,e){const n=Rp(t,e),r={type:Pp(e),value:Np(e)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function Ip(t,e,n,r){const o=$t(),i=null===o||void 0===o?void 0:o.getOptions().normalizeDepth,s=(a=e,Object.values(a).find((t=>t instanceof Error)));var a;const c={__serialized__:it(e,i)};if(s)return{exception:{values:[Tp(t,s)]},extra:c};const l={exception:{values:[{type:C(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:Bp(e,{isUnhandledRejection:r})}]},extra:c};if(n){const e=Rp(t,n);e.length&&(l.exception.values[0].stacktrace={frames:e})}return l}function Cp(t,e){return{exception:{values:[Tp(t,e)]}}}function Rp(t,e){const n=e.stacktrace||e.stack||"",r=function(t){if(t&&Mp.test(t.message))return 1;return 0}(e),o=function(t){if("number"===typeof t.framesToPop)return t.framesToPop;return 0}(e);try{return t(n,r,o)}catch(i){}return[]}const Mp=/Minified React error #\d+;/i;function Op(t){return"undefined"!==typeof WebAssembly&&"undefined"!==typeof WebAssembly.Exception&&t instanceof WebAssembly.Exception}function Pp(t){const e=null===t||void 0===t?void 0:t.name;if(!e&&Op(t)){return t.message&&Array.isArray(t.message)&&2==t.message.length?t.message[0]:"WebAssembly.Exception"}return e}function Np(t){const e=null===t||void 0===t?void 0:t.message;return Op(t)?Array.isArray(t.message)&&2==t.message.length?t.message[1]:"wasm exception":e?e.error&&"string"===typeof e.error.message?Ep(e.error):E
1p(t):"No error message"}function Lp(t,e,n,r){const o=Fp(t,e,(null===n||void 0===n?void 0:n.syntheticException)||void 0,r);return vt(o),o.level="error",null!==n&&void 0!==n&&n.event_id&&(o.event_id=n.event_id),Ar(o)}function Dp(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"info",r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;const i=jp(t,e,(null===r||void 0===r?void 0:r.syntheticException)||void 0,o);return i.level=n,null!==r&&void 0!==r&&r.event_id&&(i.event_id=r.event_id),Ar(i)}function Fp(t,e,n,r,o){let i;if(w(e)&&e.error){return Cp(t,e.error)}if(A(e)||k(e,"DOMException")){const o=e;if("stack"in e){var a;i=Cp(t,e);const o=null===(a=i.exception)||void 0===a||null===(a=a.values)||void 0===a?void 0:a[0];if(r&&n&&o&&!o.stacktrace){const e=Rp(t,n);e.length&&(o.stacktrace={frames:e},vt(i,{synthetic:!0}))}}else{const e=o.name||(A(o)?"DOMError":"DOMException"),s=o.message?"".concat(e,": ").concat(o.message):e;i=jp(t,s,n,r),gt(i,s)}return"code"in o&&(i.tags=(0,s.A)((0,s.A)({},i.tags),{},{"DOMException.code":"".concat(o.code)})),i}if(S(e))return Cp(t,e);if(I(e)||C(e)){return i=Ip(t,e,n,o),vt(i,{synthetic:!0}),i}return i=jp(t,e,n,r),gt(i,"".concat(e),void 0),vt(i,{synthetic:!0}),i}function jp(t,e,n,r){const o={};if(r&&n){const r=Rp(t,n);r.length&&(o.exception={values:[{value:e,stacktrace:{frames:r}}]}),vt(o,{synthetic:!0})}if(E(e)){const{__sentry_template_string__:t,__sentry_template_values__:n}=e;return o.logentry={message:t,params:n},o}return o.message=e,o}function Bp(t,e){let{isUnhandledRejection:n}=e;const r=function(t){const e=Object.keys(F(t));return e.sort(),e[0]?e.join(", "):"[object has no keys]"}(t),o=n?"promise rejection":"exception";if(w(t))return"Event `ErrorEvent` captured as ".concat(o," with message `").concat(t.message,"`");if(C(t)){const e=function(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch(e){}}(t);return"Event `".concat(e,"` (type=").concat(t.type,") captured as ").concat(o)}return"Object captured as ".concat(o," with keys: ").concat(r)}class Up extends gp{constructor(t){var e,n;const r=function(t){var e;return(0,s.A)({release:"string"===typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:null===(e=Gi.SENTRY_RELEASE)||void 0===e?void 0:e.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0},t)}(t);Ap(r,"browser",["browser"],Gi.SENTRY_SDK_SOURCE||"npm"),null!==(e=r._metadata)&&void 0!==e&&e.sdk&&(r._metadata.sdk.settings=(0,s.A)({infer_ip:r.sendDefaultPii?"auto":"never"},r._metadata.sdk.settings)),super(r);const{sendDefaultPii:o,sendClientReports:i,enableLogs:a,_experiments:c,enableMetrics:l}=this._options,u=null===(n=null!==l&&void 0!==l?l:null===c||void 0===c?void 0:c.enableMetrics)||void 0===n||n;Gi.document&&(i||a||u)&&Gi.document.addEventListener("visibilitychange",(()=>{"hidden"===Gi.document.visibilityState&&(i&&this._flushOutcomes(),a&&Js(this),u&&Sd(this))})),o&&this.on("beforeSendSession",xp)}eventFromException(t,e){return Lp(this._options.stackParser,t,e,this._options.attachStacktrace)}eventFromMessage(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",n=arguments.length>2?arguments[2]:void 0;return Dp(this._options.stackParser,t,e,n,this._options.attachStacktrace)}_prepareEvent(t,e,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,e,n,r)}}const qp=a;function Wp(){if(!("fetch"in qp))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch(t){return!1}}function zp(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Hp(){if("string"===typeof EdgeRuntime)return!0;if(!Wp())return!1;if(zp(qp.fetch))return!0;let t=!1;const e=qp.document;if(e&&"function"===typeof e.createElement)try{var n;const r=e.createElement("iframe");r.hidden=!0,e.head.appendChild(r),null!==(n=r.contentWindow)&&void 0!==n&&n.fetch&&(t=zp(r.contentWindow.fetch)),e.head.removeChild(r)}catch(r){p&&_.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return t}const Vp="undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Jp=a,Gp={};function Kp(t){const e=Gp[t];if(e)return e;let n=Jp[t];if(zp(n))return Gp[t]=n.bind(Jp);const r=Jp.document;if(r&&"function"===typeof r.createElement)try{const e=r.createElement("iframe");e.hidden=!0,r.head.appendChild(e);const o=e.contentWindow;null!==o&&void 0!==o&&o[t]&&(n=o[t]),r.head.removeChild(e)}catch(qn){Vp&&_.warn("Could not create sandbox iframe for ".concat(t," check, bailing to window.").concat(t,": "),qn)}return n?Gp[t]=n.bind(Jp):n}function Yp(){return Kp("setTimeout")(...arguments)}const $p=40;function Xp(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Kp("fetch"),n=0,r=0;return Al(t,(async function(o){const i=o.body.length;n+=i,r++;
1const a=(0,s.A)({body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:t.headers,keepalive:n<=6e4&&r<15},t.fetchOptions);try{const n=await e(t.url,a);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get("X-Sentry-Rate-Limits"),"retry-after":n.headers.get("Retry-After")}}}catch(qn){throw Gp["fetch"]=void 0,qn}finally{n-=i,r--}}),yl(t.bufferSize||$p))}const Zp="undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;const Qp={startProfiler:function(){const t=$t();if(!t)return void(Zp&&_.warn("No Sentry client available, profiling is not started"));t.getIntegrationByName("BrowserProfiling")?t.emit("startUIProfiler"):Zp&&_.warn("BrowserProfiling integration is not available")},stopProfiler:function(){const t=$t();if(!t)return void(Zp&&_.warn("No Sentry client available, profiling is not started"));t.getIntegrationByName("BrowserProfiling")?t.emit("stopUIProfiler"):Zp&&_.warn("ProfilingIntegration is not available")}};function tf(t,e,n,r){const o={filename:t,function:"<anonymous>"===e?J:e,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==r&&(o.colno=r),o}const ef=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,nf=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,rf=/\((\S*)(?::(\d+))(?::(\d+))\)/,of=/at (.+?) ?\(data:(.+?),/,sf=[30,t=>{const e=t.match(of);if(e)return{filename:"<data:".concat(e[2],">"),function:e[1]};const n=ef.exec(t);if(n){const[,t,e,r]=n;return tf(t,J,+e,+r)}const r=nf.exec(t);if(r){var o;if(0===(null===(o=r[2])||void 0===o?void 0:o.indexOf("eval"))){const t=rf.exec(r[2]);t&&(r[2]=t[1],r[3]=t[2],r[4]=t[3])}const[t,e]=yf(r[1]||J,r[2]);return tf(e,t,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],af=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,cf=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,lf=[50,t=>{const e=af.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const t=cf.exec(e[3]);t&&(e[1]=e[1]||"eval",e[3]=t[1],e[4]=t[2],e[5]="")}let t=e[3],n=e[1]||J;return[n,t]=yf(n,t),tf(t,n,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}],uf=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,df=[40,t=>{const e=uf.exec(t);return e?tf(e[2],e[1]||J,+e[3],e[4]?+e[4]:void 0):void 0}],pf=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,ff=[10,t=>{const e=pf.exec(t);return e?tf(e[2],e[3]||J,+e[1]):void 0}],hf=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,mf=[20,t=>{const e=hf.exec(t);return e?tf(e[5],e[3]||e[4]||J,+e[1],+e[2]):void 0}],gf=[sf,lf],vf=Y(...gf),yf=(t,e)=>{const n=-1!==t.indexOf("safari-extension"),r=-1!==t.indexOf("safari-web-extension");return n||r?[-1!==t.indexOf("@")?t.split("@")[0]:J,n?"safari-extension:".concat(e):"safari-web-extension:".concat(e)]:[t,e]};function _f(t,e){let{metadata:n,tunnel:r,dsn:o}=e;const i=(0,s.A)((0,s.A)({event_id:t.event_id,sent_at:(new Date).toISOString()},(null===n||void 0===n?void 0:n.sdk)&&{sdk:{name:n.sdk.name,version:n.sdk.version}}),!!r&&!!o&&{dsn:mo(o)}),a=function(t){return[{type:"user_report"},t]}(t);return as(i,[a])}const bf=()=>({name:"ConversationId",setup(t){t.on("spanStart",(t=>{const e=Vt().getScopeData(),n=Jt().getScopeData(),r=e.conversationId||n.conversationId;if(r){const{op:e,data:n,description:o}=$o(t);if((null===e||void 0===e||!e.startsWith("gen_ai."))&&!n["ai.operationId"]&&(null===o||void 0===o||!o.startsWith("ai.")))return;t.setAttribute("gen_ai.conversation.id",r)}}))}});function Sf(t,e){const n="fetch",r=Ts(n,t);return Is(n,(()=>kf(void 0,e))),r}function kf(t){arguments.length>
11&&void 0!==arguments[1]&&arguments[1]&&!Hp()||P(a,"fetch",(function(e){return function(){const n=new Error;for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];const{method:c,url:l}=function(t){if(0===t.length)return{method:"GET",url:""};if(2===t.length){const[e,n]=t;return{url:xf(e),method:Af(n,"method")?String(n.method).toUpperCase():O(e)&&Af(e,"method")?String(e.method).toUpperCase():"GET"}}const e=t[0];return{url:xf(e),method:Af(e,"method")?String(e.method).toUpperCase():"GET"}}(o),u={args:o,fetchData:{method:c,url:l},startTimestamp:1e3*kt(),virtualError:n,headers:Ef(o)};return t||Cs("fetch",(0,s.A)({},u)),e.apply(a,o).then((async e=>(t?t(e):Cs("fetch",(0,s.A)((0,s.A)({},u),{},{endTimestamp:1e3*kt(),response:e})),e)),(t=>{var e;Cs("fetch",(0,s.A)((0,s.A)({},u),{},{endTimestamp:1e3*kt(),error:t})),S(t)&&void 0===t.stack&&(t.stack=n.stack,N(t,"framesToPop",1));const r=$t(),o=null!==(e=null===r||void 0===r?void 0:r.getOptions().enhanceFetchErrorMessages)&&void 0!==e?e:"always";if(!1!==o&&t instanceof TypeError&&("Failed to fetch"===t.message||"Load failed"===t.message||"NetworkError when attempting to fetch resource."===t.message))try{const e=new URL(u.fetchData.url).host;"always"===o?t.message="".concat(t.message," (").concat(e,")"):N(t,"__sentry_fetch_url_host__",e)}catch(i){}throw t}))}}))}function wf(t){let e;try{e=t.clone()}catch(n){return}!async function(t,e){if(null!==t&&void 0!==t&&t.body){const r=t.body,o=r.getReader(),i=setTimeout((()=>{r.cancel().then(null,(()=>{}))}),9e4);let s=!0;for(;s;){let t;try{t=setTimeout((()=>{r.cancel().then(null,(()=>{}))}),5e3);const{done:n}=await o.read();clearTimeout(t),n&&(e(),s=!1)}catch(n){s=!1}finally{clearTimeout(t)}}clearTimeout(i),o.releaseLock(),r.cancel().then(null,(()=>{}))}}(e,(()=>{Cs("fetch-body-resolved",{endTimestamp:1e3*kt(),response:t})}))}function Af(t,e){return!!t&&"object"===typeof t&&!!t[e]}function xf(t){return"string"===typeof t?t:t?Af(t,"url")?t.url:t.toString?t.toString():"":""}function Ef(t){const[e,n]=t;try{if("object"===typeof n&&null!==n&&"headers"in n&&n.headers)return new Headers(n.headers);if(O(e))return new Headers(e.headers)}catch(r){}}function Tf(t){return void 0===t?void 0:t>=400&&t<500?"warning":t>=500?"error":void 0}const If="thismessage:/";function Cf(t){return"isRelative"in t}function Rf(t,e){const n=t.indexOf("://")<=0&&0!==t.indexOf("//"),r=null!==e&&void 0!==e?e:n?If:void 0;try{if("canParse"in URL&&!URL.canParse(t,r))return;const e=new URL(t,r);return n?{isRelative:n,pathname:e.pathname,search:e.search,hash:e.hash}:e}catch(o){}}function Mf(t){if(Cf(t))return t.pathname;const e=new URL(t);return e.search="",e.hash="",["80","443"].includes(e.port)&&(e.port=""),e.password&&(e.password="%filtered%"),e.username&&(e.username="%filtered%"),e.toString()}function Of(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}function Pf(t){return t.split(/[?#]/,1)[0]}function Nf(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(t.startsWith("data:")){const n=t.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",o=t.includes(";base64,"),i=t.indexOf(",");let s="";if(e&&-1!==i){const e=t.slice(i+1);s=e.length>10?"".concat(e.slice(0,10),"... [truncated]"):e}return"data:".concat(r).concat(o?",base64":"").concat(s?",".concat(s):"")}return t}let Lf,Df,Ff;function jf(t){Ts("dom",t),Is("dom",Bf)}function Bf(){if(!Jp.document)return;const t=Cs.bind(null,"dom"),e=Uf(t,!0);Jp.document.addEventListener("click",e,!1),Jp.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach((e=>{var n,r;const o=null===(n=Jp[e])||void 0===n?void 0:n.prototype;null!==o&&void 0!==o&&null!==(r=o.hasOwnProperty)&&void 0!==r&&r.call(o,"addEventListener")&&(P(o,"addEventListener",(function(e){return function(n,r,o){if("click"===n||"keypress"==n)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},i=r[n]=r[n]||{refCount:0};if(!i.handler){const r=Uf(t);i.handler=r,e.call(this,n,r,o)}i.refCount++}catch(i){}return e.call(this,n,r,o)}})),P(o,"removeEventListener",(function(t){return function(e,n,r){if("click"===e||"keypress"==e)try{const n=this.__sentry_instrumentation_handlers__||{},o=n[e];o&&(o.refCount--,o.refCount<=0&&(t.call(this,e,o.handler,r),o.handler=void 0,delete n[e]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch(o){}return t.call(this,e,n,r)}})))}))}function Uf(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n=>{if(!n||n._sentryCaptured)return;const r=function(t){try{return t.target}catch(e){return null}}(n);if(function(t,e){return"keypress"===t&&(null===e||void 0===e||!e.tagName||"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName&&!e.isContentEditable)}
1(n.type,r))return;N(n,"_sentryCaptured",!0),r&&!r._sentryId&&N(r,"_sentryId",ft());const o="keypress"===n.type?"input":n.type;if(!function(t){if(t.type!==Df)return!1;try{if(!t.target||t.target._sentryId!==Ff)return!1}catch(e){}return!0}(n)){t({event:n,name:o,global:e}),Df=n.type,Ff=r?r._sentryId:void 0}clearTimeout(Lf),Lf=Jp.setTimeout((()=>{Ff=void 0,Df=void 0}),1e3)}}const qf="__sentry_xhr_v3__";function Wf(t){Ts("xhr",t),Is("xhr",zf)}function zf(){if(!Jp.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(t,e,n){const r=new Error,o=1e3*kt(),i=x(n[0])?n[0].toUpperCase():void 0,s=function(t){if(x(t))return t;try{return t.toString()}catch(e){}return}(n[1]);if(!i||!s)return t.apply(e,n);e[qf]={method:i,url:s,request_headers:{}},"POST"===i&&s.match(/sentry_key/)&&(e.__sentry_own_request__=!0);const a=()=>{const t=e[qf];if(t&&4===e.readyState){try{t.status_code=e.status}catch(n){}Cs("xhr",{endTimestamp:1e3*kt(),startTimestamp:o,xhr:e,virtualError:r})}};return"onreadystatechange"in e&&"function"===typeof e.onreadystatechange?e.onreadystatechange=new Proxy(e.onreadystatechange,{apply:(t,e,n)=>(a(),t.apply(e,n))}):e.addEventListener("readystatechange",a),e.setRequestHeader=new Proxy(e.setRequestHeader,{apply(t,e,n){const[r,o]=n,i=e[qf];return i&&x(r)&&x(o)&&(i.request_headers[r.toLowerCase()]=o),t.apply(e,n)}}),t.apply(e,n)}}),t.send=new Proxy(t.send,{apply(t,e,n){const r=e[qf];if(!r)return t.apply(e,n);void 0!==n[0]&&(r.body=n[0]);return Cs("xhr",{startTimestamp:1e3*kt(),xhr:e}),t.apply(e,n)}})}let Hf;function Vf(t){const e="history";Ts(e,t),Is(e,Jf)}function Jf(){function t(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];const o=n.length>2?n[2]:void 0;if(o){const e=Hf,r=function(t){try{return new URL(t,Jp.location.origin).toString()}catch(e){return t}}(String(o));if(Hf=r,e===r)return t.apply(this,n);Cs("history",{from:e,to:r})}return t.apply(this,n)}}Jp.addEventListener("popstate",(()=>{const t=Jp.location.href,e=Hf;if(Hf=t,e===t)return;Cs("history",{from:e,to:t})})),"history"in qp&&qp.history&&(P(Jp.history,"pushState",t),P(Jp.history,"replaceState",t))}const Gf=80;function Kf(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t)return"<unknown>";try{let n=t;const r=5,o=[];let i=0,s=0;const a=" > ",c=a.length;let l;const u=Array.isArray(e)?e:e.keyAttrs,d=!Array.isArray(e)&&e.maxStringLength||Gf;for(;n&&i++<r&&(l=Yf(n,u),!("html"===l||i>1&&s+o.length*c+l.length>=d));)o.push(l),s+=l.length,n=n.parentNode;return o.reverse().join(a)}catch(n){return"<unknown>"}}function Yf(t,e){const n=t,r=[];if(null===n||void 0===n||!n.tagName)return"";if("undefined"!==typeof HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const o=null!==e&&void 0!==e&&e.length?e.filter((t=>n.getAttribute(t))).map((t=>[t,n.getAttribute(t)])):null;if(null!==o&&void 0!==o&&o.length)o.forEach((t=>{r.push("[".concat(t[0],'="').concat(t[1],'"]'))}));else{n.id&&r.push("#".concat(n.id));const t=n.className;if(t&&x(t)){const e=t.split(/\s+/);for(const t of e)r.push(".".concat(t))}}for(const i of["aria-label","type","name","title","alt"]){const t=n.getAttribute(i);t&&r.push("[".concat(i,'="').concat(t,'"]'))}return r.join("")}const $f=1024,Xf=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=(0,s.A)({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t);return{name:"Breadcrumbs",setup(t){e.console&&Ms(function(t){return function(e){if($t()!==t)return;const n={category:"console",data:{arguments:e.args,logger:"console"},level:Ps(e.level),message:ut(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;n.message="Assertion failed: ".concat(ut(e.args.slice(1)," ")||"console.assert"),n.data.arguments=e.args.slice(1)}As(n,{input:e.args,level:e.level})}}(t)),e.dom&&jf(function(t,e){return function(n){if($t()!==t)return;let r,o,i="object"===typeof e?e.serializeAttribute:void 0,s="object"===typeof e&&"number"===typeof e.maxStringLength?e.maxStringLength:void 0;s&&s>$f&&(Zp&&_.warn("`dom.maxStringLength` cannot exceed ".concat($f,", but a value of ").concat(s," was configured. Sentry will use ").concat($f," instead.")),s=$f),"string"===typeof i&&(i=[i]);try{const t=n.event,e=function(t){return!!t&&!!t.target}(t)?t.target:t;r=Kf(e,{keyAttrs:i,maxStringLength:s}),o=ee(e)}catch(c){r="<unknown>"}if(0===r.length)return;const a={category:"ui.".concat(n.name),message:r};o&&(a.data={"ui.component_name":o}),As(a,{event:n.event,name:n.name,global:n.global})}}(t,e.dom)),e.xhr&&Wf(function(t){return function(e){if($t()!==t)return;const{startTimestamp:n,endTimestamp:r}=e,o=e.xhr[qf];if(!n||!r||!o)return;const{method:i,url:s,status_code:a,body:c}=o,l={method:i,url:s,status_code:a},u={xhr:e.xhr,input:c,startTimestamp:n,endTimestamp:r},d={category:"xhr",data:l,type:"http",level:Tf(a)};t.emit("beforeOutgoingRequestBreadcrumb",d,u),As(d,u)}}(t)),e.fetch&&Sf(function(t){return function(e){if($t()!==t)return;const{startTimestamp:n,endTimestamp:r}=e;
1if(r&&(!e.fetchData.url.match(/sentry_key/)||"POST"!==e.fetchData.method))if(e.error){const o={data:e.error,input:e.args,startTimestamp:n,endTimestamp:r},i={category:"fetch",data:e.fetchData,level:"error",type:"http"};t.emit("beforeOutgoingRequestBreadcrumb",i,o),As(i,o)}else{const o=e.response,i=(0,s.A)((0,s.A)({},e.fetchData),{},{status_code:null===o||void 0===o?void 0:o.status}),a={input:e.args,response:o,startTimestamp:n,endTimestamp:r},c={category:"fetch",data:i,type:"http",level:Tf(i.status_code)};t.emit("beforeOutgoingRequestBreadcrumb",c,a),As(c,a)}}}(t)),e.history&&Vf(function(t){return function(e){var n;if($t()!==t)return;let r=e.from,o=e.to;const i=Of(Gi.location.href);let s=r?Of(r):void 0;const a=Of(o);null!==(n=s)&&void 0!==n&&n.path||(s=i),i.protocol===a.protocol&&i.host===a.host&&(o=a.relative),i.protocol===s.protocol&&i.host===s.host&&(r=s.relative),As({category:"navigation",data:{from:r,to:o}})}}(t)),e.sentry&&t.on("beforeSendEvent",function(t){return function(e){$t()===t&&As({category:"sentry.".concat("transaction"===e.type?"transaction":"event"),event_id:e.event_id,level:e.level,message:mt(e)},{event:e})}}(t))}}};const Zf="EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(","),Qf=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=(0,s.A)({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1},t);return{name:"BrowserApiErrors",setupOnce(){e.setTimeout&&P(Gi,"setTimeout",th),e.setInterval&&P(Gi,"setInterval",th),e.requestAnimationFrame&&P(Gi,"requestAnimationFrame",eh),e.XMLHttpRequest&&"XMLHttpRequest"in Gi&&P(XMLHttpRequest.prototype,"send",nh);const t=e.eventTarget;if(t){(Array.isArray(t)?t:Zf).forEach((t=>function(t,e){var n,r;const o=null===(n=Gi[t])||void 0===n?void 0:n.prototype;if(null===o||void 0===o||null===(r=o.hasOwnProperty)||void 0===r||!r.call(o,"addEventListener"))return;P(o,"addEventListener",(function(n){return function(r,o,i){try{"function"===typeof o.handleEvent&&(o.handleEvent=$i(o.handleEvent,{mechanism:{data:{handler:Z(o),target:t},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch(s){}return e.unregisterOriginalCallbacks&&function(t,e,n){t&&"object"===typeof t&&"removeEventListener"in t&&"function"===typeof t.removeEventListener&&t.removeEventListener(e,n)}(this,r,o),n.apply(this,[r,$i(o,{mechanism:{data:{handler:Z(o),target:t},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),i])}})),P(o,"removeEventListener",(function(t){return function(e,n,r){try{const o=n.__sentry_wrapped__;o&&t.call(this,e,o,r)}catch(o){}return t.call(this,e,n,r)}}))}(t,e)))}}}};function th(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];const o=n[0];return n[0]=$i(o,{mechanism:{handled:!1,type:"auto.browser.browserapierrors.".concat(Z(t))}}),t.apply(this,n)}}function eh(t){return function(e){return t.apply(this,[$i(e,{mechanism:{data:{handler:Z(t)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function nh(t){return function(){const e=this;["onload","onerror","onprogress","onreadystatechange"].forEach((t=>{t in e&&"function"===typeof e[t]&&P(e,t,(function(e){const n={mechanism:{data:{handler:Z(e)},handled:!1,type:"auto.browser.browserapierrors.xhr.".concat(t)}},r=D(e);return r&&(n.mechanism.data.handler=Z(r)),$i(e,n)}))}));for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.apply(this,r)}}const rh=function(){var t;const e=null!==(t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).lifecycle)&&void 0!==t?t:"route";return{name:"BrowserSession",setupOnce(){if("undefined"===typeof Gi.document)return void(Zp&&_.warn("Using the `browserSessionIntegration` in non-browser environments is not supported."));zi({ignoreDuration:!0}),Ji();const t=Jt();let n=t.getUser();t.addScopeListener((t=>{var e,r;const o=t.getUser();(null===(e=n)||void 0===e?void 0:e.id)===(null===o||void 0===o?void 0:o.id)&&(null===(r=n)||void 0===r?void 0:r.ip_address)===(null===o||void 0===o?void 0:o.ip_address)||(Ji(),n=o)})),"route"===e&&Vf((t=>{let{from:e,to:n}=t;e!==n&&(zi({ignoreDuration:!0}),Ji())}))}}};function oh(t,e){var n;
1const r=Xo(t),o=ui(t),i=Xo(o),{isolationScope:a,scope:c}=No(t),l=wi(a,c);!function(t,e,n,r){var o,i,a,c,l,u;const d=n.getSdkMetadata(),{release:p,environment:f}=n.getOptions();ih(t,(0,s.A)({[Wr]:p,[zr]:f,[Hr]:e.name,[Vr]:e.span_id,[Jr]:null===d||void 0===d||null===(o=d.sdk)||void 0===o?void 0:o.name,[Gr]:null===d||void 0===d||null===(i=d.sdk)||void 0===i?void 0:i.version,[Yr]:null===(a=r.user)||void 0===a?void 0:a.id,[$r]:null===(c=r.user)||void 0===c?void 0:c.email,[Xr]:null===(l=r.user)||void 0===l?void 0:l.ip_address,[Zr]:null===(u=r.user)||void 0===u?void 0:u.username},r.attributes))}(r,i,e,l);!function(t,e){const n=t.attributes;if(!n)return;const r=n["http.request.method"]||n["http.method"];if(r)return void function(t,e,n,r){const o=["http"];n===ah?o.push("client"):n===sh&&o.push("server");e["sentry.http.prefetch"]&&o.push("prefetch");ih(t,{[Fr]:o.join(".")});const i=e[Qr];if("string"===typeof i)return void(t.name=i);if("custom"===e[Nr])return;const s=e["http.route"];if("string"===typeof s)t.name="".concat(r," ").concat(s),ih(t,{[Nr]:"route"});else{if(n===ah||n===sh){const o=function(t,e){const n=t["http.url"]||t["url.full"],r=t["http.target"],o="string"===typeof n?Of(n):void 0,i=o?function(t){const{protocol:e,host:n,path:r}=t,o=(null===n||void 0===n?void 0:n.replace(/^.*@/,"[filtered]:[filtered]@").replace(/(:80)$/,"").replace(/(:443)$/,""))||"";return"".concat(e?"".concat(e,"://"):"").concat(o).concat(r)}(o):void 0;if(e===sh&&"string"===typeof r)return Pf(r);if(i)return i;if("string"===typeof r)return Pf(r);return}(e,n);o&&(t.name="".concat(r," ").concat(o))}ih(t,{[Nr]:"url"})}}(t,n,e,r);const o=n["db.system.name"]||n["db.system"],i="string"===typeof n[Fr]&&"".concat(n[Fr]).startsWith("cache.");if(o&&!i)return void function(t,e){ih(t,{[Fr]:"db"});const n=e[Qr];if("string"===typeof n)return void(t.name=n);if("custom"===e[Nr])return;const r=e["db.statement"];r&&(t.name="".concat(r),ih(t,{[Nr]:"task"}))}(t,n);if(n["rpc.service"])return void ih(t,{[Fr]:"rpc"});if(n["messaging.system"])return void ih(t,{[Fr]:"message"});const s=n["faas.trigger"];s&&ih(t,{[Fr]:"".concat(s)})}(r,t.kind),r.is_segment&&(!function(t,e){const n=function(t){const e={},{response:n,profile:r,cloud_resource:o,culture:i,state:s}=t;if(n&&(null!=n.status_code&&(e["http.response.status_code"]=n.status_code),null!=n.body_size&&(e["http.response.body.size"]=n.body_size)),r&&(r.profile_id&&(e["sentry.profile_id"]=r.profile_id),r.profiler_id&&(e["sentry.profiler_id"]=r.profiler_id)),o)for(const[l,u]of Object.entries(o))null!=u&&(e[l]=u);i&&(i.locale&&(e["culture.locale"]=i.locale),i.timezone&&(e["culture.timezone"]=i.timezone)),null!==s&&void 0!==s&&s.state&&"string"===typeof s.state.type&&(e["state.type"]=s.state.type);const a=t.angular;if(a){const t=a.version;"string"!==typeof t&&"number"!==typeof t||(e["angular.version"]=t)}const c=t.react;if(c){const t=c.version;"string"!==typeof t&&"number"!==typeof t||(e["react.version"]=t)}return e}(e.contexts);ih(t,n)}(r,l),function(t,e){const n=e.getIntegrationNames();if(!n.length)return;ih(t,{[Kr]:n})}(r,e),e.emit("processSegmentSpan",r)),e.emit("processSpan",r);const{beforeSendSpan:u}=e.getOptions(),d=u&&ua(u)?function(t,e){const n=e(t);if(!n)return pi(),t;return n}(r,u):r,p=null===(n=d.attributes)||void 0===n?void 0:n[Nr];return p&&ih(d,{"sentry.span.source":p}),(0,s.A)((0,s.A)({},Qo(d)),{},{_segmentSpan:o})}function ih(t,e){var n;const r=null!==(n=t.attributes)&&void 0!==n?n:t.attributes={};Object.entries(e).forEach((t=>{let[e,n]=t;null==n||e in r||(r[e]=n)}))}const sh=1,ah=2;const ch=()=>({name:"CultureContext",preprocessEvent(t){const e=lh();var n;e&&(t.contexts=(0,s.A)((0,s.A)({},t.contexts),{},{culture:(0,s.A)((0,s.A)({},e),null===(n=t.contexts)||void 0===n?void 0:n.culture)}))},processSegmentSpan(t){const e=lh();e&&ih(t,{"culture.locale":e.locale,"culture.timezone":e.timezone,"culture.calendar":e.calendar})}});function lh(){try{const t=Gi.Intl;if(!t)return;const e=t.DateTimeFormat().resolvedOptions();return{locale:e.locale,timezone:e.timeZone,calendar:e.calendar}}catch(t){return}}const uh=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=(0,s.A)({onerror:!0,onunhandledrejection:!0}
1,t);return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(t){e.onerror&&(!function(t){Ld((e=>{const{stackParser:n,attachStacktrace:r}=hh();if($t()!==t||Yi())return;const{msg:o,url:i,line:s,column:a,error:c}=e,l=function(t,e,n,r){const o=t.exception=t.exception||{},i=o.values=o.values||[],s=i[0]=i[0]||{},a=s.stacktrace=s.stacktrace||{},c=a.frames=a.frames||[];var l;0===c.length&&c.push({colno:r,lineno:n,filename:null!==(l=mh(e))&&void 0!==l?l:te(),function:J,in_app:!0});return t}(Fp(n,c||o,void 0,r,!1),i,s,a);l.level="error",Ci(l,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})}))}(t),fh("onerror")),e.onunhandledrejection&&(!function(t){jd((e=>{const{stackParser:n,attachStacktrace:r}=hh();if($t()!==t||Yi())return;const o=dh(e),i=T(o)?ph(o):Fp(n,o,void 0,r,!0);i.level="error",Ci(i,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})}))}(t),fh("onunhandledrejection"))}}};function dh(t){if(T(t))return t;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch(e){}return t}function ph(t){return{exception:{values:[{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: ".concat(String(t))}]}}}function fh(t){Zp&&_.log("Global Handler attached: ".concat(t))}function hh(){const t=$t();return(null===t||void 0===t?void 0:t.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}function mh(t){if(x(t)&&0!==t.length)return t.startsWith("data:")?"<".concat(Nf(t,!1),">"):t}const gh=()=>({name:"HttpContext",preprocessEvent(t){var e;if(!Gi.navigator&&!Gi.location&&!Gi.document)return;const n=Xi(),r=(0,s.A)((0,s.A)({},n.headers),null===(e=t.request)||void 0===e?void 0:e.headers);t.request=(0,s.A)((0,s.A)((0,s.A)({},n),t.request),{},{headers:r})},processSegmentSpan(t){if(!Gi.navigator&&!Gi.location&&!Gi.document)return;const e=Xi();ih(t,{"url.full":e.url||void 0,"http.request.header.user_agent":e.headers["User-Agent"],"http.request.header.referer":e.headers.Referer})}});function vh(t,e,n,r,o,i){var s;if(null===(s=o.exception)||void 0===s||!s.values||!i||!M(i.originalException,Error))return;const a=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;a&&(o.exception.values=yh(t,e,r,i.originalException,n,o.exception.values,a,0))}function yh(t,e,n,r,o,i,s,a){if(i.length>=n+1)return i;let c=[...i];if(M(r[o],Error)){bh(s,a,r);const i=t(e,r[o]),l=c.length;Sh(i,o,l,a),c=yh(t,e,n,r[o],o,[i,...c],i,l)}return _h(r)&&r.errors.forEach(((i,l)=>{if(M(i,Error)){bh(s,a,r);const u=t(e,i),d=c.length;Sh(u,"errors[".concat(l,"]"),d,a),c=yh(t,e,n,i,o,[u,...c],u,d)}})),c}function _h(t){return Array.isArray(t.errors)}function bh(t,e,n){t.mechanism=(0,s.A)((0,s.A)((0,s.A)({handled:!0,type:"auto.core.linked_errors"},_h(n)&&{is_exception_group:!0}),t.mechanism),{},{exception_id:e})}function Sh(t,e,n,r){t.mechanism=(0,s.A)((0,s.A)({handled:!0},t.mechanism),{},{type:"chained",source:e,exception_id:n,parent_id:r})}const kh=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=t.limit||5,n=t.key||"cause";return{name:"LinkedErrors",preprocessEvent(t,r,o){vh(Tp,o.getOptions().stackParser,n,e,t,r)}}};const wh=/^HTML(\w*)Element$/;function Ah(t){if("undefined"!==typeof window&&t===window)return"[Window]";if("undefined"!==typeof document&&t===document)return"[Document]";if(function(t){if("undefined"===typeof Element)return!1;try{return t instanceof Element}catch(e){return!1}}(t)){const e=function(t){const e=Object.getPrototypeOf(t);return null!==e&&void 0!==e&&e.constructor?e.constructor.name:"null prototype"}(t);if(wh.test(e))return"[HTMLElement: ".concat(Kf(t),"]")}}function xh(){return!!function(){var t;if("undefined"===typeof Gi.window)return!1;const e=Gi;if(e.nw)return!1;const n=e.chrome||e.browser;if(null===n||void 0===n||null===(t=n.runtime)||void 0===t||!t.id)return!1;const r=te();return!(Gi===Gi.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(r))}()&&(Zp&&m((()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")})),!0)}function Eh(t){return[Ol(),Jl(),bf(),Qf(),Xf(),uh(),kh(),xl(),gh(),ch(),rh()]}function Th(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=!t.skipBrowserExtensionCheck&&xh();let n=null==t.defaultIntegrations?Eh():t.defaultIntegrations;const r=(0,s.A)((0,s.A)({},t),{},{enabled:!e&&t.enabled,stackParser:(o=t.stackParser||vf,Array.isArray(o)?Y(...o):o),integrations:re({integrations:t.integrations,defaultIntegrations:n}),transport:t.transport||Xp});var o;return rt(Ah),function(t,e){!0===e.debug&&(p?_.enable():m((()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")}))),Vt().update(e.initialScope);const n=new t(e);return Kd(n),n.init(),n}(Up,r)}function Ih(){}function Ch(t){t()}function Rh(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=Gi.document,n=(null===e||void 0===e?void 0:e.head)||(null===e||void 0===e?void 0:e.body);if(!n)return void(Zp&&_.error("[showReportDialog] Global document not defined"));const r=Vt(),o=$t(),i=null===o||void 0===o?void 0:o.getDsn();if(!i)return void(Zp&&_.error("[showReportDialog] DSN not configured"));const a=(0,s.A)((0,s.A)({},t),{},{user:(0,s.A)((0,s.A)({},r.getUser()),t.user),eventId:t.eventId||Fi()}),c=Gi.document.createElement("script");c.async=!0,c.crossOrigin="anonymous",c.src=function(t,e){const n=_o(t);if(!n)return"";const r="".concat(is(n),"embed/error-page/");let o="dsn=".concat(mo(n));for(const i in e)if("dsn"!==i&&"onClose"!==i)if("user"===i){const t=e.user;if(!t)continue;t.name&&(o+="&name=".concat(encodeURIComponent(t.name))),t.email&&(o+="&email=".concat(encodeURIComponent(t.email)))}else o+="&".concat(encodeURIComponent(i),"=").concat(encodeURIComponent(e[i]));return"".concat(r,"?").concat(o)}(i,a);const{onLoad:l,onClose:u}=a;if(l&&(c.onload=l),u){const t=e=>{if("__sentry_reportdialog_closed__"===e.data)try{u()}finally{Gi.removeEventListener("message",t)}};Gi.addEventListener("message",t)}n.appendChild(c)}const Mh=a,Oh=new WeakMap,Ph=function(){const t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).types||["crash","deprecation","intervention"];function e(t){if(Oh.has($t()))for(const e of t)Kt((t=>{t.setExtra("url",e.url);const n="ReportingObserver [".concat(e.type,"]");let r="No details available";if(e.body){const n={};for(const t in e.body)n[t]=e.body[t];if(t.setExtra("body",n),"crash"===e.type){const t=e.body;r=[t.crashId||"",t.reason||""].join(" ").trim()||r}else{r=e.body.message||r}}Ii("".concat(n,": ").concat(r))}))}return{name:"ReportingObserver",setupOnce(){if(!("ReportingObserver"in qp))return;new Mh.ReportingObserver(e,{buffered:!0,types:t}).observe()},setup(t){Oh.set(t,!0)}}};function Nh(t,e){const n=null===e||void 0===e?void 0:e.getDsn(),r=null===e||void 0===e?void 0:e.getOptions().tunnel;return function(t,e){const n=Rf(t);if(!n||Cf(n))return!1;if(!e)return!1;return r=n.hostname,o=e.host,(r===o||o.length>0&&r.endsWith(".".concat(o)))&&/(^|&|\?)sentry_key=/.test(n.search);var r,o}(t,n)||function(t,e){if(!e)return!1;return Lh(t)===Lh(e)}(t,r)}function Lh(t){return"/"===t[t.length-1]?t.slice(0,-1):t}const Dh=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=(0,s.A)({failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/]},t);return{name:"HttpClient",setup(t){!function(t,e){if(!Hp())return;Sf((n=>{if($t()!==t)return;const{response:r,args:o,error:i,virtualError:s}=n,[a,c]=o;r&&function(t,e,n,r,o){if(Uh(t,n.status,n.url)){const t=function(t,e){if(!e&&t instanceof Request)return t;if(t instanceof Request&&t.bodyUsed)return t;
1return new Request(t,e)}(e,r);let i,s,a,c;Wh()&&([i,a]=Fh("Cookie",t),[s,c]=Fh("Set-Cookie",n));Ci(qh({url:t.url,method:t.method,status:n.status,requestHeaders:i,responseHeaders:s,requestCookies:a,responseCookies:c,error:o,type:"fetch"}))}}(e,a,r,c,i||s)}),!1)}(t,e),function(t,e){if(!("XMLHttpRequest"in a))return;Wf((n=>{if($t()!==t)return;const{error:r,virtualError:o}=n,i=n.xhr,s=i[qf];if(!s)return;const{method:a,request_headers:c}=s;try{!function(t,e,n,r,o){if(Uh(t,e.status,e.responseURL)){let t,a,c;if(Wh()){try{const t=e.getResponseHeader("Set-Cookie")||e.getResponseHeader("set-cookie")||void 0;t&&(a=Bh(t))}catch(i){}try{c=function(t){const e=t.getAllResponseHeaders();if(!e)return{};return e.split("\r\n").reduce(((t,e)=>{const[n,r]=e.split(": ");return n&&r&&(t[n]=r),t}),{})}(e)}catch(s){}t=r}Ci(qh({url:e.responseURL,method:n,status:e.status,requestHeaders:t,responseHeaders:c,responseCookies:a,error:o,type:"xhr"}))}}(e,i,a,c,r||o)}catch(qn){Zp&&_.warn("Error while extracting response event form XHR response",qn)}}))}(t,e)}}};function Fh(t,e){const n=function(t){const e={};return t.forEach(((t,n)=>{e[n]=t})),e}(e.headers);let r;try{const e=n[t]||n[t.toLowerCase()]||void 0;e&&(r=Bh(e))}catch(o){}return[n,r]}function jh(t){if(t){const e=t["Content-Length"]||t["content-length"];if(e)return parseInt(e,10)}}function Bh(t){return t.split("; ").reduce(((t,e)=>{const[n,r]=e.split("=");return n&&r&&(t[n]=r),t}),{})}function Uh(t,e,n){return function(t,e){return t.some((t=>"number"===typeof t?t===e:e>=t[0]&&e<=t[1]))}(t.failedRequestStatusCodes,e)&&(r=t.failedRequestTargets,o=n,r.some((t=>"string"===typeof t?o.includes(t):t.test(o))))&&!Nh(n,$t());var r,o}function qh(t){const e=$t(),n=e&&t.error&&t.error instanceof Error?t.error.stack:void 0,r=n&&e?e.getOptions().stackParser(n,0,1):void 0,o="HTTP Client Error with status code: ".concat(t.status),i={message:o,exception:{values:[{type:"Error",value:o,stacktrace:r?{frames:r}:void 0}]},request:{url:t.url,method:t.method,headers:t.requestHeaders,cookies:t.requestCookies},contexts:{response:{status_code:t.status,headers:t.responseHeaders,cookies:t.responseCookies,body_size:jh(t.responseHeaders)}}};return vt(i,{type:"auto.http.client.".concat(t.type),handled:!1}),i}function Wh(){const t=$t();return!!t&&Boolean(t.getOptions().sendDefaultPii)}const zh=a,Hh=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=null!=t.frameContextLines?t.frameContextLines:7;return{name:"ContextLines",processEvent:t=>function(t,e){var n;const r=zh.document,o=zh.location&&Pf(zh.location.href);if(!r||!o)return t;const i=null===(n=t.exception)||void 0===n?void 0:n.values;if(null===i||void 0===i||!i.length)return t;const s=r.documentElement.innerHTML;if(!s)return t;const a=["<!DOCTYPE html>","<html>",...s.split("\n"),"</html>"];return i.forEach((t=>{const n=t.stacktrace;null!==n&&void 0!==n&&n.frames&&(n.frames=n.frames.map((t=>function(t,e,n,r){if(t.filename!==n||!t.lineno||!e.length)return t;return function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5;if(void 0===e.lineno)return;const r=t.length,o=Math.max(Math.min(r-1,e.lineno-1),0);e.pre_context=t.slice(Math.max(0,o-n),o).map((t=>lt(t,0)));const i=Math.min(r-1,o);e.context_line=lt(t[i],e.colno||0),e.post_context=t.slice(Math.min(o+1,r),o+1+n).map((t=>lt(t,0)))}(e,t,r),t}(t,a,o,e))))})),t}(t,e)}};const Vh=Symbol.for("sentry__originalRequestBody");function Jh(t){return new URLSearchParams(t).toString()}function Gh(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_;try{if("string"===typeof t)return[t];if(t instanceof URLSearchParams)return[t.toString()];if(t instanceof FormData)return[Jh(t)];if(!t)return[void 0]}catch(n){return Vp&&e.error(n,"Failed to serialize body",t),[void 0,"BODY_PARSE_ERROR"]}return Vp&&e.log("Skipping network body because of body type",t),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Kh(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(t.length>=2&&t[1]&&"object"===typeof t[1]&&"body"in t[1])return t[1].body;if(t.length>=1&&t[0]instanceof Request){const e=t[0][Vh];return void 0!==e?e:void 0}}function Yh(t){let e;try{e=t.getAllResponseHeaders()}catch(n){return Vp&&_.error(n,"Failed to get xhr response headers",t),{}}return e?e.split("\r\n").reduce(((t,e)=>{const[n,r]=e.split(": ");return r&&(t[n.toLowerCase()]=r),t}),{}):{}}function $h(t){if(tm(t))return"persisted ".concat(t.operationName);if(Qh(t)){const{query:e,operationName:n}=t,{operationName:r=n,operationType:o}=function(t){const e=/^(?:\s*)(query|mutation|subscription)(?:\s*)(\w+)(?:\s*)[{(]/,n=/^(?:\s*)(query|mutation|subscription)(?:\s*)[{(]/,r=t.match(e);if(r)return{operationType:r[1],operationName:r[2]};const o=t.match(n);if(o)return{operationType:o[1],operationName:void 0};return{operationType:void 0,operationName:void 0}}(e);return r?"".concat(o," ").concat(r):"".concat(o)}return"unknown"}function Xh(t){let e;if("xhr"in t){const n=t.xhr[qf];e=n&&Gh(n.body)[0]}else{e=Gh(Kh(t.input))[0]}return e}function Zh(t){return"object"===typeof t&&null!==t}function Qh(t){return Zh(t)&&"string"===typeof t.query}function tm(t){return Zh(t)&&"string"===typeof t.operationName&&Zh(t.extensions)&&Zh(t.extensions.persistedQuery)&&"string"===typeof t.extensions.persistedQuery.sha256Hash&&"number"===typeof t.extensions.persistedQuery.version}function em(t){try{const e=JSON.parse(t);return Qh(e)||tm(e)?e:void 0}catch(e){return}}const nm=t=>({name:"GraphQLClient",setup(e){!function(t,e){t.on("beforeOutgoingRequestSpan",((t,n)=>{const r=$o(t).data||{};if(!("http.client"===r[Fr]))return;const o=r[ro]||r["http.url"]||r.url,i=r[no]||r["http.method"];
1if(!x(o)||!x(i))return;const{endpoints:s}=e,a=pt(o,s),c=Xh(n);if(a&&c){const e=em(c);if(e){const n=$h(e);t.updateName("".concat(i," ").concat(o," (").concat(n,")")),Qh(e)&&t.setAttribute("graphql.document",e.query),tm(e)&&(t.setAttribute("graphql.persisted_query.hash.sha256",e.extensions.persistedQuery.sha256Hash),t.setAttribute("graphql.persisted_query.version",e.extensions.persistedQuery.version))}}}))}(e,t),function(t,e){t.on("beforeOutgoingRequestBreadcrumb",((t,n)=>{const{category:r,type:o,data:i}=t;if("http"===o&&("fetch"===r||"xhr"===r)){const t=null===i||void 0===i?void 0:i.url,{endpoints:r}=e,o=pt(t,r),s=Xh(n);if(o&&i&&s){const t=em(s);if(!i.graphql&&t){const e=$h(t);i["graphql.operation"]=e,Qh(t)&&(i["graphql.document"]=t.query),tm(t)&&(i["graphql.persisted_query.hash.sha256"]=t.extensions.persistedQuery.sha256Hash,i["graphql.persisted_query.version"]=t.extensions.persistedQuery.version)}}}}))}(e,t)}}),rm=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=["script"];function n(r,o){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!r)return;const a="shadowRoot"in r&&r.shadowRoot?r.shadowRoot.children:r.children;for(const l of a){var c;if(!(l instanceof HTMLElement))continue;const r=ee(l,1)||void 0,a=l.tagName.toLowerCase();if(e.includes(a))continue;const u=(null===(c=t.onElement)||void 0===c?void 0:c.call(t,{element:l,componentName:r,tagName:a,depth:i}))||{};if("skip"===u)continue;if("children"===u){n(l,o,i+1);continue}const{x:d,y:p,width:f,height:h}=l.getBoundingClientRect(),m=(0,s.A)({identifier:l.id||void 0,type:r||a,visible:!0,alpha:1,height:h,width:f,x:d,y:p},u),g=[];m.children=g,n(l,m.children,i+1),o.push(m)}}return{name:"ViewHierarchy",processEvent:(e,r)=>{var o,i;if(void 0!==e.type||!1===(null===(o=t.shouldAttach)||void 0===o?void 0:o.call(t,e,r)))return e;const s={rendering_system:"DOM",positioning:"absolute",windows:[]};n((null===(i=t.rootElement)||void 0===i?void 0:i.call(t))||Gi.document.body,s.windows);const a={filename:"view-hierarchy.json",attachmentType:"event.view_hierarchy",contentType:"application/json",data:JSON.stringify(s)};return r.attachments=r.attachments||[],r.attachments.push(a),e}}};const om=(t,e,n,r)=>{let o,i;return s=>{var a;e.value>=0&&((s||r)&&(i=e.value-(null!==(a=o)&&void 0!==a?a:0),(i||void 0===o)&&(o=e.value,e.delta=i,e.rating=((t,e)=>t>e[1]?"poor":t>e[0]?"needs-improvement":"good")(e.value,n),t(e))))}},im=function(){var t,e;let n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const r=null===(t=Jp.performance)||void 0===t||null===(e=t.getEntriesByType)||void 0===e?void 0:e.call(t,"navigation")[0];if(!n||r&&r.responseStart>0&&r.responseStart<performance.now())return r},sm=()=>{var t;const e=im();return null!==(t=null===e||void 0===e?void 0:e.activationStart)&&void 0!==t?t:0};function am(t,e,n){Jp.document&&Jp.addEventListener(t,e,n)}function cm(t,e,n){Jp.document&&Jp.removeEventListener(t,e,n)}let lm=-1;const um=new Set,dm=t=>{if(function(t){var e;return"pagehide"===t.type||"hidden"===(null===(e=Jp.document)||void 0===e?void 0:e.visibilityState)}(t)&&lm>-1){if("visibilitychange"===t.type||"pagehide"===t.type)for(const t of um)t();isFinite(lm)||(lm="visibilitychange"===t.type?t.timeStamp:0,cm("prerenderingchange",dm,!0))}},pm=()=>{if(Jp.document&&lm<0){var t;const e=sm(),n=Jp.document.prerendering||null===(t=globalThis.performance.getEntriesByType("visibility-state").filter((t=>"hidden"===t.name&&t.startTime>e))[0])||void 0===t?void 0:t.startTime;lm=null!==n&&void 0!==n?n:(()=>{var t,e;return"hidden"!==(null===(t=Jp.document)||void 0===t?void 0:t.visibilityState)||null!==(e=Jp.document)&&void 0!==e&&e.prerendering?1/0:0})(),am("visibilitychange",dm,!0),am("pagehide",dm,!0),am("prerenderingchange",dm,!0)}return{get firstHiddenTime(){return lm},onHidden(t){um.add(t)}}};const fm=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;const n=im();let r="navigate";var o,i;n&&(null!==(o=Jp.document)&&void 0!==o&&o.prerendering||sm()>0?r="prerender":null!==(i=Jp.document)&&void 0!==i&&i.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-")));return{name:t,value:e,rating:"good",delta:0,entries:[],id:"v5-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},hm=new WeakMap;function mm(t,e){try{return hm.get(t)||hm.set(t,new e),hm.get(t)}catch(n){return new e}}class gm{constructor(){this._sessionValue=0,this._sessionEntries=[]}_processEntry(t){var e;if(t.hadRecentInput)return;const n=this._sessionEntries[0],r=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this._sessionValue+=t.value,this._sessionEntries.push(t)):(this._sessionValue=t.value,this._sessionEntries=[t]),null===(e=this._onAfterProcessingUnexpectedShift)||void 0===e||e.call(this,t)}}const vm=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver((t=>{Promise.resolve().then((()=>{e(t.getEntries())}))}));return r.observe((0,s.A)({type:t,buffered:!0},n)),r}}catch(r){}},ym=t=>{let e=!1;return()=>{e||(t(),e=!0)}},_m=t=>{var e;null!==(e=Jp.document)&&void 0!==e&&e.prerendering?addEventListener("prerenderingchange",(()=>t()),!0):t()},bm=[1800,3e3],Sm=[.1,.25],km=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};_m((()=>
1{const n=pm(),r=fm("FCP");let o;const i=vm("paint",(t=>{for(const e of t)"first-contentful-paint"===e.name&&(i.disconnect(),e.startTime<n.firstHiddenTime&&(r.value=Math.max(e.startTime-sm(),0),r.entries.push(e),o(!0)))}));i&&(o=om(t,r,bm,e.reportAllChanges))}))}(ym((()=>{const n=fm("CLS",0);let r;const o=pm(),i=mm(e,gm),s=t=>{for(const e of t)i._processEntry(e);i._sessionValue>n.value&&(n.value=i._sessionValue,n.entries=i._sessionEntries,r())},a=vm("layout-shift",s);var c;a&&(r=om(t,n,Sm,e.reportAllChanges),o.onHidden((()=>{s(a.takeRecords()),r(!0)})),null===Jp||void 0===Jp||null===(c=Jp.setTimeout)||void 0===c||c.call(Jp,r))})))};let wm=0,Am=1/0,xm=0;const Em=t=>{t.forEach((t=>{t.interactionId&&(Am=Math.min(Am,t.interactionId),xm=Math.max(xm,t.interactionId),wm=xm?(xm-Am)/7+1:0)}))};let Tm;const Im=()=>Tm?wm:performance.interactionCount||0,Cm=()=>{"interactionCount"in performance||Tm||(Tm=vm("event",Em,{type:"event",buffered:!0,durationThreshold:0}))};let Rm=0;class Mm{constructor(){this._longestInteractionList=[],this._longestInteractionMap=new Map}_resetInteractions(){Rm=Im(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor((Im()-Rm)/50));return this._longestInteractionList[t]}_processEntry(t){var e;if(null===(e=this._onBeforeProcessingEntry)||void 0===e||e.call(this,t),!t.interactionId&&"first-input"!==t.entryType)return;const n=this._longestInteractionList.at(-1);let r=this._longestInteractionMap.get(t.interactionId);if(r||this._longestInteractionList.length<10||t.duration>n._latency){var o;if(r?t.duration>r._latency?(r.entries=[t],r._latency=t.duration):t.duration===r._latency&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(r.id,r),this._longestInteractionList.push(r)),this._longestInteractionList.sort(((t,e)=>e._latency-t._latency)),this._longestInteractionList.length>10){const t=this._longestInteractionList.splice(10);for(const e of t)this._longestInteractionMap.delete(e.id)}null===(o=this._onAfterProcessingINPCandidate)||void 0===o||o.call(this,r)}}}const Om=t=>{var e;const n=Jp.requestIdleCallback||Jp.setTimeout;"hidden"===(null===(e=Jp.document)||void 0===e?void 0:e.visibilityState)?t():(am("visibilitychange",t=ym(t),{once:!0,capture:!0}),am("pagehide",t,{once:!0,capture:!0}),n((()=>{t(),cm("visibilitychange",t,{capture:!0}),cm("pagehide",t,{capture:!0})})))},Pm=[200,500];class Nm{_processEntry(t){var e;null===(e=this._onBeforeProcessingEntry)||void 0===e||e.call(this,t)}}const Lm=[2500,4e3],Dm=[800,1800],Fm=t=>{var e,n;null!==(e=Jp.document)&&void 0!==e&&e.prerendering?_m((()=>Fm(t))):"complete"!==(null===(n=Jp.document)||void 0===n?void 0:n.readyState)?addEventListener("load",(()=>Fm(t)),!0):setTimeout(t)},jm={},Bm={};let Um,qm,Wm,zm;function Hm(t){return Qm("cls",t,Ym,Um,arguments.length>1&&void 0!==arguments[1]&&arguments[1])}function Vm(t){return Qm("lcp",t,$m,qm,arguments.length>1&&void 0!==arguments[1]&&arguments[1])}function Jm(t){return Qm("inp",t,Zm,zm)}function Gm(t,e){return tg(t,e),Bm[t]||(!function(t){const e={};"event"===t&&(e.durationThreshold=0);vm(t,(e=>{Km(t,{entries:e})}),e)}(t),Bm[t]=!0),eg(t,e)}function Km(t,e){const n=jm[t];if(null!==n&&void 0!==n&&n.length)for(const r of n)try{r(e)}catch(qn){Vp&&_.error("Error while triggering instrumentation handler.\nType: ".concat(t,"\nName: ").concat(Z(r),"\nError:"),qn)}}function Ym(){return km((t=>{Km("cls",{metric:t}),Um=t}),{reportAllChanges:!0})}function $m(){return function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};_m((()=>{const n=pm(),r=fm("LCP");let o;const i=mm(e,Nm),s=t=>{e.reportAllChanges||(t=t.slice(-1));for(const e of t)i._processEntry(e),e.startTime<n.firstHiddenTime&&(r.value=Math.max(e.startTime-sm(),0),r.entries=[e],o())},a=vm("largest-contentful-paint",s);if(a){o=om(t,r,Lm,e.reportAllChanges);const n=ym((()=>{s(a.takeRecords()),a.disconnect(),o(!0)})),i=t=>{t.isTrusted&&(Om(n),cm(t.type,i,{capture:!0}))};for(const t of["keydown","click","visibilitychange"])am(t,i,{capture:!0})}}))}((t=>{Km("lcp",{metric:t}),qm=t}),{reportAllChanges:!0})}function Xm(){return function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=fm("TTFB"),r=om(t,n,Dm,e.reportAllChanges);Fm((()=>{const t=im();t&&(n.value=Math.max(t.responseStart-sm(),0),n.entries=[t],r(!0))}))}((t=>{Km("ttfb",{metric:t}),Wm=t}))}function Zm(){return function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=pm();_m((()=>{var r;Cm();const o=fm("INP");let i;const s=mm(e,Mm),a=t=>{Om((()=>{for(const n of t)s._processEntry(n);const e=s._estimateP98LongestInteraction();e&&e._latency!==o.value&&(o.value=e._latency,o.entries=e.entries,i())}))},c=vm("event",a,{durationThreshold:null!==(r=e.durationThreshold)&&void 0!==r?r:40});i=om(t,o,Pm,e.reportAllChanges),c&&(c.observe({type:"first-input",buffered:!0}),n.onHidden((()=>{a(c.takeRecords()),i(!0)})))}))}((t=>{Km("inp",{metric:t}),zm=t}))}function Qm(t,e,n,r){let o,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return tg(t,e),Bm[t]||(o=n(),Bm[t]=!0),r&&e({metric:r}),eg(t,e,i?o:void 0)}function tg(t,e){jm[t]=jm[t]||[],jm[t].push(e)}function eg(t,e,n){return()=>{n&&n();const r=jm[t];if(!r)return;const o=r.indexOf(e);-1!==o&&r.splice(o,1)}}const ng=a,rg="sentryReplaySession",og="Unable to send Replay",ig=5e3,sg=5500,ag=15e4,cg=5e3,lg=2e7,ug=4999,dg=36e5;var pg=Object.defineProperty,fg=(t,e,n)=>((t,e,n)=>e in t?pg(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!==typeof e?e+"":e,n),hg=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(hg||{});function mg(t){const e=null===t||void 0===t?void 0:t.host;return Boolean((null===e||void 0===e?void 0:e.shadowRoot)===t)}function gg(t){return"[object ShadowRoot]"===Object.prototype.toString.call(t)}function vg(t){try{const n=t.rules||t.cssRules;return n?((e=Array.from(n,yg).join("")).includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e):null}catch(n){return null}var e}function yg(t){let e;if(function(t){return"styleSheet"in t}(t))try{e=vg(t.styleSheet)||function(t){const{cssText:e}=t;if(e.split('"').length<3)return e;const n=["@import","url(".concat(JSON.stringify(t.href),")")];return""===t.layerName?n.push("layer"):t.layerName&&n.push("layer(".concat(t.layerName,")")),t.supportsText&&n.push("supports(".concat(t.supp
1ortsText,")")),t.media.length&&n.push(t.media.mediaText),n.join(" ")+";"}(t)}catch(n){}else if(function(t){return"selectorText"in t}(t)){let e=t.cssText;const n=t.selectorText.includes(":"),r="string"===typeof t.style.all&&t.style.all;if(r&&(e=function(t){let e="";for(let n=0;n<t.style.length;n++){const r=t.style,o=r[n],i=r.getPropertyPriority(o);e+="".concat(o,":").concat(r.getPropertyValue(o)).concat(i?" !important":"",";")}return"".concat(t.selectorText," { ").concat(e," }")}(t)),n&&(e=function(t){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}(e)),n||r)return e}return e||t.cssText}class _g{constructor(){fg(this,"idNodeMap",new Map),fg(this,"nodeMetaMap",new WeakMap)}getId(t){var e;if(!t)return-1;const n=null===(e=this.getMeta(t))||void 0===e?void 0:e.id;return null!==n&&void 0!==n?n:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const e=this.getId(t);this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach((t=>this.removeNodeFromMap(t)))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){const n=e.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,e)}replace(t,e){const n=this.getNode(t);if(n){const t=this.nodeMetaMap.get(n);t&&this.nodeMetaMap.set(e,t)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function bg(t){let{maskInputOptions:e,tagName:n,type:r}=t;return"OPTION"===n&&(n="SELECT"),Boolean(e[n.toLowerCase()]||r&&e[r]||"password"===r||"INPUT"===n&&!r&&e.text)}function Sg(t){let{isMasked:e,element:n,value:r,maskInputFn:o}=t,i=r||"";return e?(o&&(i=o(i,n)),"*".repeat(i.length)):i}function kg(t){return t.toLowerCase()}function wg(t){return t.toUpperCase()}const Ag="__rrweb_original__";function xg(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?kg(e):null}function Eg(t,e,n){return"INPUT"!==e||"radio"!==n&&"checkbox"!==n?t.value:t.getAttribute("value")||""}function Tg(t,e){var n;let r;try{r=new URL(t,null!==e&&void 0!==e?e:window.location.href)}catch(i){return null}const o=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(n=null===o||void 0===o?void 0:o[1])&&void 0!==n?n:null}const Ig={};function Cg(t){const e=Ig[t];if(e)return e;const n=window.document;let r=window[t];if(n&&"function"===typeof n.createElement)try{const e=n.createElement("iframe");e.hidden=!0,n.head.appendChild(e);const o=e.contentWindow;o&&o[t]&&(r=o[t]),n.head.removeChild(e)}catch(qn){}return Ig[t]=r.bind(window)}function Rg(){return Cg("setTimeout")(...arguments)}function Mg(){return Cg("clearTimeout")(...arguments)}function Og(t){try{return t.contentDocument}catch(e){}}let Pg=1;const Ng=new RegExp("[^a-z0-9-_:]");function Lg(){return Pg++}let Dg,Fg;const jg=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Bg=/^(?:[a-z+]+:)?\/\//i,Ug=/^www\..*/i,qg=/^(data:)([^,]*),(.*)/i;function Wg(t,e){return(t||"").replace(jg,((t,n,r,o,i,s)=>{const a=r||i||s,c=n||o||"";if(!a)return t;if(Bg.test(a)||Ug.test(a))return"url(".concat(c).concat(a).concat(c,")");if(qg.test(a))return"url(".concat(c).concat(a).concat(c,")");if("/"===a[0])return"url(".concat(c).concat(function(t){let e="";return e=t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0],e=e.split("?")[0],e}(e)+a).concat(c,")");const l=e.split("/"),u=a.split("/");l.pop();for(const e of u)"."!==e&&(".."===e?l.pop():l.push(e));return"url(".concat(c).concat(l.join("/")).concat(c,")")}))}const zg=/^[^ \t\n\r\u000c]+/,Hg=/^[, \t\n\r\u000c]+/;const Vg=new WeakMap;function Jg(t,e){return e&&""!==e.trim()?Kg(t,e):e}function Gg(t){return Boolean("svg"===t.tagName||t.ownerSVGElement)}function Kg(t,e){let n=Vg.get(t);if(n||(n=t.createElement("a"),Vg.set(t,n)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return n.setAttribute("href",e),n.href}function Yg(t,e,n,r,o,i,s){if(!r)return r;if("src"===n||"href"===n&&("use"!==e||"#"!==r[0]))return Jg(t,r);if("xlink:href"===n&&"#"!==r[0])return Jg(t,r);if("background"===n&&("table"===e||"td"===e||"th"===e))return Jg(t,r);
1if("srcset"===n)return function(t,e){if(""===e.trim())return e;let n=0;function r(t){let r;const o=t.exec(e.substring(n));return o?(r=o[0],n+=r.length,r):""}const o=[];for(;r(Hg),!(n>=e.length);){let i=r(zg);if(","===i.slice(-1))i=Jg(t,i.substring(0,i.length-1)),o.push(i);else{let r="";i=Jg(t,i);let s=!1;for(;;){const t=e.charAt(n);if(""===t){o.push((i+r).trim());break}if(s)")"===t&&(s=!1);else{if(","===t){n+=1,o.push((i+r).trim());break}"("===t&&(s=!0)}r+=t,n+=1}}}return o.join(", ")}(t,r);if("style"===n){let e=Wg(r,Kg(t));return s&&s.size>0&&(e=function(t,e){if(!t||0===e.size)return t;try{const n=t.split(";"),r=[];for(let t of n){if(t=t.trim(),!t)continue;const n=t.indexOf(":");if(-1===n){r.push(t);continue}const o=t.slice(0,n).trim();e.has(o)||r.push(t)}return r.join("; ")+(r.length>0&&t.endsWith(";")?";":"")}catch(n){return console.warn("Error filtering CSS properties:",n),t}}(e,s)),e}return"object"===e&&"data"===n?Jg(t,r):"function"===typeof i?i(n,r,o):r}function $g(t,e,n){return("video"===t||"audio"===t)&&"autoplay"===e}function Xg(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return t?t.nodeType!==t.ELEMENT_NODE||r>n?-1:e(t)?r:Xg(t.parentNode,e,n,r+1):-1}function Zg(t,e){return n=>{const r=n;if(null===r)return!1;try{if(t)if("string"===typeof t){if(r.matches(".".concat(t)))return!0}else if(function(t,e){for(let n=t.classList.length;n--;){const r=t.classList[n];if(e.test(r))return!0}return!1}(r,t))return!0;return!(!e||!r.matches(e))}catch(o){return!1}}}function Qg(t,e,n,r,o,i){try{const s=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;if(null===s)return!1;if("INPUT"===s.tagName){const t=s.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(t))return!0}let a=-1,c=-1;if(i){if(c=Xg(s,Zg(r,o)),c<0)return!0;a=Xg(s,Zg(e,n),c>=0?c:1/0)}else{if(a=Xg(s,Zg(e,n)),a<0)return!1;c=Xg(s,Zg(r,o),a>=0?a:1/0)}return a>=0?!(c>=0)||a<=c:!(c>=0)&&!!i}catch(qn){}return!!i}function tv(t,e){const{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskAttributeFn:c,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:f,maskInputOptions:h={},maskTextFn:m,maskInputFn:g,dataURLOptions:v={},inlineImages:y,recordCanvas:_,keepIframeSrcFn:b,newlyAddedElement:S=!1,ignoreCSSAttributes:k}=e,w=function(t,e){if(!e.hasNode(t))return;const n=e.getId(t);return 1===n?void 0:n}(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:hg.Document,childNodes:[],compatMode:t.compatMode}:{type:hg.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:hg.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:w};case t.ELEMENT_NODE:return function(t,e){const{doc:n,blockClass:r,blockSelector:o,unblockSelector:i,inlineStylesheet:s,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:l,dataURLOptions:u={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:f,newlyAddedElement:h=!1,rootId:m,maskTextClass:g,unmaskTextClass:v,maskTextSelector:y,unmaskTextSelector:_,ignoreCSSAttributes:b}=e,S=function(t,e,n,r){try{if(r&&t.matches(r))return!1;if("string"===typeof e){if(t.classList.contains(e))return!0}else for(let n=t.classList.length;n--;){const r=t.classList[n];if(e.test(r))return!0}if(n)return t.matches(n)}catch(qn){}return!1}(t,r,o,i),k=function(t){if(t instanceof HTMLFormElement)return"form";const e=kg(t.tagName);return Ng.test(e)?"div":e}(t);let w={};const A=t.attributes.length;for(let E=0;E<A;E++){const e=t.attributes[E];e.name&&!$g(k,e.name,e.value)&&(w[e.name]=Yg(n,k,kg(e.name),e.value,t,c,b))}if("link"===k&&s){const e=Array.from(n.styleSheets).find((e=>e.href===t.href));let r=null;e&&(r=vg(e)),r&&(w.rel=null,w.href=null,w.crossorigin=null,w._cssText=Wg(r,e.href))}if("style"===k&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){const e=vg(t.sheet);e&&(w._cssText=Wg(e,Kg(n)))}if("input"===k||"textarea"===k||"select"===k||"option"===k){const e=t,n=xg(e),r=Eg(e,wg(k),n),o=e.checked;if("submit"!==n&&"button"!==n&&r){const t=Qg(e,g,y,v,_,bg({type:n,tagName:wg(k),maskInputOptions:a}));w.value=Sg({isMasked:t,element:e,value:r,maskInputFn:l})}o&&(w.checked=o)}"option"===k&&(t.selected&&!a.select?w.selected=!0:delete w.selected);if("canvas"===k&&p)if("2d"===t.__context)(function(t){const e=t.getContext("2d");if(!e)return!0;for(let n=0;n<t.width;n+=50)for(let r=0;r<t.height;r+=50){const o=e.getImageData,i=Ag in o?o[Ag]:o;
1if(new Uint32Array(i.call(e,n,r,Math.min(50,t.width-n),Math.min(50,t.height-r)).data.buffer).some((t=>0!==t)))return!1}return!0})(t)||(w.rr_dataURL=t.toDataURL(u.type,u.quality));else if(!("__context"in t)){const e=t.toDataURL(u.type,u.quality),r=n.createElement("canvas");r.width=t.width,r.height=t.height;e!==r.toDataURL(u.type,u.quality)&&(w.rr_dataURL=e)}if("img"===k&&d){Dg||(Dg=n.createElement("canvas"),Fg=Dg.getContext("2d"));const e=t,r=e.currentSrc||e.getAttribute("src")||"<unknown-src>",o=e.crossOrigin,i=()=>{e.removeEventListener("load",i);try{Dg.width=e.naturalWidth,Dg.height=e.naturalHeight,Fg.drawImage(e,0,0),w.rr_dataURL=Dg.toDataURL(u.type,u.quality)}catch(t){if("anonymous"!==e.crossOrigin)return e.crossOrigin="anonymous",void(e.complete&&0!==e.naturalWidth?i():e.addEventListener("load",i));console.warn("Cannot inline img src=".concat(r,"! Error: ").concat(t))}"anonymous"===e.crossOrigin&&(o?w.crossOrigin=o:e.removeAttribute("crossorigin"))};e.complete&&0!==e.naturalWidth?i():e.addEventListener("load",i)}"audio"!==k&&"video"!==k||(w.rr_mediaState=t.paused?"paused":"played",w.rr_mediaCurrentTime=t.currentTime);h||(t.scrollLeft&&(w.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(w.rr_scrollTop=t.scrollTop));if(S){const{width:e,height:n}=t.getBoundingClientRect();w={class:w.class,rr_width:"".concat(e,"px"),rr_height:"".concat(n,"px")}}"iframe"!==k||f(w.src)||(S||Og(t)||(w.rr_src=w.src),delete w.src);let x;try{customElements.get(k)&&(x=!0)}catch(qn){}return{type:hg.Element,tagName:k,attributes:w,childNodes:[],isSVG:Gg(t)||void 0,needBlock:S,rootId:m,isCustom:x}}(t,{doc:n,blockClass:o,blockSelector:i,unblockSelector:s,inlineStylesheet:f,maskAttributeFn:c,maskInputOptions:h,maskInputFn:g,dataURLOptions:v,inlineImages:y,recordCanvas:_,keepIframeSrcFn:b,newlyAddedElement:S,rootId:w,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,ignoreCSSAttributes:k});case t.TEXT_NODE:return function(t,e){const{maskAllText:n,maskTextClass:r,unmaskTextClass:o,maskTextSelector:i,unmaskTextSelector:s,maskTextFn:a,maskInputOptions:c,maskInputFn:l,rootId:u}=e,d=t.parentNode&&t.parentNode.tagName;let p=t.textContent;const f="STYLE"===d||void 0,h="SCRIPT"===d||void 0,m="TEXTAREA"===d||void 0;if(f&&p){try{var g;t.nextSibling||t.previousSibling||null!==(g=t.parentNode.sheet)&&void 0!==g&&g.cssRules&&(p=vg(t.parentNode.sheet))}catch(y){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(y),t)}p=Wg(p,Kg(e.doc))}h&&(p="SCRIPT_PLACEHOLDER");const v=Qg(t,r,i,o,s,n);f||h||m||!p||!v||(p=a?a(p,t.parentElement):p.replace(/[\S]/g,"*"));m&&p&&(c.textarea||v)&&(p=l?l(p,t.parentNode):p.replace(/[\S]/g,"*"));if("OPTION"===d&&p){p=Sg({isMasked:Qg(t,r,i,o,s,bg({type:null,tagName:d,maskInputOptions:c})),element:t,value:p,maskInputFn:l})}return{type:hg.Text,textContent:p||"",isStyle:f,rootId:u}}(t,{doc:n,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,maskTextFn:m,maskInputOptions:h,maskInputFn:g,rootId:w});case t.CDATA_SECTION_NODE:return{type:hg.CDATA,textContent:"",rootId:w};case t.COMMENT_NODE:return{type:hg.Comment,textContent:t.textContent||"",rootId:w};default:return!1}}function ev(t){return void 0===t||null===t?"":t.toLowerCase()}function nv(t,e){const{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:p=!1,inlineStylesheet:f=!0,maskInputOptions:h={},maskAttributeFn:m,maskTextFn:g,maskInputFn:v,slimDOMOptions:y,dataURLOptions:_={},inlineImages:b=!1,recordCanvas:S=!1,onSerialize:k,onIframeLoad:w,iframeLoadTimeout:A=5e3,onBlockedImageLoad:x,onStylesheetLoad:E,stylesheetLoadTimeout:T=5e3,keepIframeSrcFn:I=()=>!1,newlyAddedElement:C=!1,ignoreCSSAttributes:R}=e;let{preserveWhiteSpace:M=!0}=e;const O=tv(t,{doc:n,mirror:r,blockClass:o,blockSelector:i,maskAllText:a,unblockSelector:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:v,dataURLOptions:_,inlineImages:b,recordCanvas:S,keepIframeSrcFn:I,newlyAddedElement:C,ignoreCSSAttributes:R});if(!O)return console.warn(t,"not serialized"),null;let P;P=r.hasNode(t)?r.getId(t):!function(t,e){if(e.comment&&t.type===hg.Comment)return!0;
1if(t.type===hg.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel||"modulepreload"===t.attributes.rel)||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"===typeof t.attributes.href&&"js"===Tg(t.attributes.href)))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(ev(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===ev(t.attributes.name)||"icon"===ev(t.attributes.rel)||"apple-touch-icon"===ev(t.attributes.rel)||"shortcut icon"===ev(t.attributes.rel))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&ev(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(ev(t.attributes.property).match(/^(og|twitter|fb):/)||ev(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===ev(t.attributes.name)))return!0;if(e.headMetaRobots&&("robots"===ev(t.attributes.name)||"googlebot"===ev(t.attributes.name)||"bingbot"===ev(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&("author"===ev(t.attributes.name)||"generator"===ev(t.attributes.name)||"framework"===ev(t.attributes.name)||"publisher"===ev(t.attributes.name)||"progid"===ev(t.attributes.name)||ev(t.attributes.property).match(/^article:/)||ev(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&("google-site-verification"===ev(t.attributes.name)||"yandex-verification"===ev(t.attributes.name)||"csrf-token"===ev(t.attributes.name)||"p:domain_verify"===ev(t.attributes.name)||"verify-v1"===ev(t.attributes.name)||"verification"===ev(t.attributes.name)||"shopify-checkout-api-token"===ev(t.attributes.name)))return!0}}return!1}(O,y)&&(M||O.type!==hg.Text||O.isStyle||O.textContent.trim().length)?Lg():-2;const N=Object.assign(O,{id:P});if(r.add(t,N),-2===P)return null;k&&k(t);let L=!p;if(N.type===hg.Element){L=L&&!N.needBlock;const e=t.shadowRoot;e&&gg(e)&&(N.isShadowHost=!0)}if((N.type===hg.Document||N.type===hg.Element)&&L){y.headWhitespace&&N.type===hg.Element&&"head"===N.tagName&&(M=!1);const e={doc:n,mirror:r,blockClass:o,blockSelector:i,maskAllText:a,unblockSelector:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:p,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:v,slimDOMOptions:y,dataURLOptions:_,inlineImages:b,recordCanvas:S,preserveWhiteSpace:M,onSerialize:k,onIframeLoad:w,iframeLoadTimeout:A,onBlockedImageLoad:x,onStylesheetLoad:E,stylesheetLoadTimeout:T,keepIframeSrcFn:I,ignoreCSSAttributes:R},C=t.childNodes?Array.from(t.childNodes):[];for(const t of C){const n=nv(t,e);n&&N.childNodes.push(n)}if(function(t){return t.nodeType===t.ELEMENT_NODE}(t)&&t.shadowRoot)for(const n of Array.from(t.shadowRoot.childNodes)){const r=nv(n,e);r&&(gg(t.shadowRoot)&&(r.isShadow=!0),N.childNodes.push(r))}}if(t.parentNode&&mg(t.parentNode)&&gg(t.parentNode)&&(N.isShadow=!0),N.type!==hg.Element||"iframe"!==N.tagName||N.needBlock||function(t,e,n){const r=function(t){try{return t.contentWindow}catch(e){}}(t);if(!r)return;let o,i=!1;try{o=r.document.readyState}catch(a){return}if("complete"!==o){const r=Rg((()=>{i||(e(),i=!0)}),n);return void t.addEventListener("load",(()=>{Mg(r),i=!0,e()}))}const s="about:blank";if(r.location.href!==s||t.src===s||""===t.src)return Rg(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}(t,(()=>{const e=Og(t);if(e&&w){const n=nv(e,{doc:e,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:v,slimDOMOptions:y,dataURLOptions:_,inlineImages:b,recordCanvas:S,preserveWhiteSpace:M,onSerialize:k,onIframeLoad:w,iframeLoadTimeout:A,onStylesheetLoad:E,stylesheetLoadTimeout:T,keepIframeSrcFn:I,ignoreCSSAttributes:R});n&&w(t,n)}}),A),N.type===hg.Element&&"img"===N.tagName&&!t.complete&&N.needBlock){const e=t,n=()=>{if(e.isConnected&&!e.complete&&x)try{const t=e.getBoundingClientRect();t.width>0&&t.height>0&&x(e,N,t)}catch(t){}e.removeEventListener("load",n)};e.isConnected&&e.addEventListener("load",n)}return N.type===hg.Element&&"link"===N.tagName&&"string"===typeof N.attributes.rel&&("stylesheet"===N.attributes.rel||"preload"===N.attributes.rel&&"string"===typeof N.attributes.href&&"css"===Tg(N.attributes.href))&&function(t,e,n){let r,o=!1;try{r=t.sheet}catch(s){r=null}if(r)return;const i=Rg((()=>{o||(e(),o=!0)}),n);t.addEventListener("load",(()=>{Mg(i),o=!0,e()}))}(t,(()=>{if(E){const e=nv(t,{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:v,slimDOMOptions:y,dataURLOptions:_,inlineImages:b,recordCanvas:S,preserveWhiteSpace:M,onSerialize:k,onIframeLoad:w,iframeLoadTimeout:A,onStylesheetLoad:E,stylesheetLoadTimeout:T,keepIframeSrcFn:I,ignoreCSSAttributes:R});e&&E(t,e)}}),T),N.type===hg.Element&&delete N.needBlock,N}function rv(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document;const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}const ov="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let iv={map:{},getId:()=>(console.error(ov),-1),getNode:()=>(console.error(ov),null),removeNodeFromMap(){console.error(ov)},has:()=>(console.error(ov),!1),reset(){console.error(ov)}};function sv(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null,o=0;return function(){for(var i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];const c=Date.now();o||!1!==n.leading||(o=c);const l=e-(c-o),u=this;l<=0||l>e?(r&&(!function(){Ev("clearTimeout")(...arguments)}(r),r=null),o=c,t.apply(u,s)):r||!1===n.trailing||(r=Tv((()=>{o=!1===n.leading?0:Date.now(),r=null,t.apply(u,s)}),l))}}function av(t,e,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window;const i=o.Object.getOwnPropertyDescriptor(t,e);return o.Object.defineProperty(t,e,r?n:{set(t){Tv((()=>{n.set.call(this,t)}),0),i&&i.set&&i.set.call(this,t)}}),()=>av(t,e,i||{},!0)}function cv(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],o=n(r);return"function"===typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=o,()=>{t[e]=r}}catch(r){return()=>{}}}"undefined"!==typeof window&&window.Proxy&&window.Reflect&&(iv=new Proxy(iv,{get:(t,e,n)=>("map"===e&&console.error(ov),Reflect.get(t,e,n))}));let lv=Date.now;function uv(t){var e,n,r,o;const i=t.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:void 0!==t.pageXOffset?t.pageXOffset:(null===i||void 0===i?void 0:i.documentElement.scrollLeft)||(null===i||void 0===i||null===(e=i.body)||void 0===e||null===(e=e.parentElement)||void 0===e?void 0:e.scrollLeft)||(null===i||void 0===i||null===(n=i.body)||void 0===n?void 0:n.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:void 0!==t.pageYOffset?t.pageYOffset:(null===i||void 0===i?void 0:i.documentElement.scrollTop)||(null===i||void 0===i||null===(r=i.body)||void 0===r||null===(r=r.parentElement)||void 0===r?void 0:r.scrollTop)||(null===i||void 0===i||null===(o=i.body)||void 0===o?void 0:o.scrollTop)||0}}function dv(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function pv(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function fv(t){if(!t)return null;try{return t.nodeType===t.ELEMENT_NODE?t:t.parentElement}catch(e){return null}}function hv(t,e,n,r,o){if(!t)return!1;const i=fv(t);if(!i)return!1;const s=Zg(e,n);if(!o){const t=r&&i.matches(r);return s(i)&&!t}const a=Xg(i,s);let c=-1;return!(a<0)&&(r&&(c=Xg(i,Zg(null,r))),a>-1&&c<0||a<c)}function mv(t,e){return-2===e.getId(t)}
1function gv(t,e){if(mg(t))return!1;const n=e.getId(t);return!e.has(n)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||gv(t.parentNode,e))}function vv(t){return Boolean(t.changedTouches)}function yv(t,e){return Boolean("IFRAME"===t.nodeName&&e.getMeta(t))}function _v(t,e){return Boolean("LINK"===t.nodeName&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&"stylesheet"===t.getAttribute("rel")&&e.getMeta(t))}function bv(t){return Boolean(null===t||void 0===t?void 0:t.shadowRoot)}/[1-9][0-9]{12}/.test(Date.now().toString())||(lv=()=>(new Date).getTime());class Sv{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){var e;return null!==(e=this.styleIDMap.get(t))&&void 0!==e?e:-1}has(t){return this.styleIDMap.has(t)}add(t,e){if(this.has(t))return this.getId(t);let n;return n=void 0===e?this.id++:e,this.styleIDMap.set(t,n),this.idStyleMap.set(n,t),n}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function kv(t){var e;let n=null;return(null===(e=t.getRootNode)||void 0===e||null===(e=e.call(t))||void 0===e?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&t.getRootNode().host&&(n=t.getRootNode().host),n}function wv(t){const e=t.ownerDocument;if(!e)return!1;const n=function(t){let e,n=t;for(;e=kv(n);)n=e;return n}(t);return e.contains(n)}function Av(t){const e=t.ownerDocument;return!!e&&(e.contains(t)||wv(t))}const xv={};function Ev(t){const e=xv[t];if(e)return e;const n=window.document;let r=window[t];if(n&&"function"===typeof n.createElement)try{const e=n.createElement("iframe");e.hidden=!0,n.head.appendChild(e);const o=e.contentWindow;o&&o[t]&&(r=o[t]),n.head.removeChild(e)}catch(qn){}return xv[t]=r.bind(window)}function Tv(){return Ev("setTimeout")(...arguments)}var Iv=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(Iv||{}),Cv=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(Cv||{}),Rv=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(Rv||{}),Mv=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(Mv||{}),Ov=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(Ov||{});let Pv;function Nv(t){Pv=t}function Lv(){Pv=void 0}const Dv=t=>{if(!Pv)return t;return function(){try{return t(...arguments)}catch(e){if(Pv&&!0===Pv(e))return()=>{};throw e}}};for(var Fv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",jv="undefined"===typeof Uint8Array?[]:new Uint8Array(256),Bv=0;Bv<64;Bv++)jv[Fv.charCodeAt(Bv)]=Bv;class Uv{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}function qv(t){try{return t.contentDocument}catch(e){}}function Wv(t){try{return t.contentWindow}catch(e){}}class zv{constructor(t){this.doc=t,this.unattachedDoc=null}parse(t){return this.parseWithConstructableStylesheet(t)||this.parseWithDetachedElement(t)}parseWithConstructableStylesheet(t){if("undefined"===typeof CSSStyleSheet||"function"!==typeof CSSStyleSheet.prototype.replaceSync)return null;try{const e=new CSSStyleSheet;e.replaceSync("x { ".concat(t," }"));const n=e.cssRules[0];
1return n&&n.type===CSSRule.STYLE_RULE?n.style:null}catch(e){return null}}parseWithDetachedElement(t){const e=this.getUnattachedDoc().createElement("span");return e.setAttribute("style",t),e.style}getUnattachedDoc(){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}return this.unattachedDoc}}function Hv(t){return"__ln"in t}class Vv{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let e=this.head;for(let r=0;r<t;r++){var n;e=(null===(n=e)||void 0===n?void 0:n.next)||null}return e}addNode(t){const e={value:t,previous:null,next:null};if(t.__ln=e,t.previousSibling&&Hv(t.previousSibling)){const n=t.previousSibling.__ln.next;e.next=n,e.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=e,n&&(n.previous=e)}else if(t.nextSibling&&Hv(t.nextSibling)&&t.nextSibling.__ln.previous){const n=t.nextSibling.__ln.previous;e.previous=n,e.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=e,n&&(n.next=e)}else this.head&&(this.head.previous=e),e.next=this.head,this.head=e;null===e.next&&(this.tail=e),this.length++}removeNode(t){const e=t.__ln;this.head&&(e.previous?(e.previous.next=e.next,e.next?e.next.previous=e.previous:this.tail=e.previous):(this.head=e.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const Jv=(t,e)=>"".concat(t,"@").concat(e);class Gv{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],e=new Set,n=new Vv,r=t=>{let e=t,n=-2;for(;-2===n;)e=e&&e.nextSibling,n=e&&this.mirror.getId(e);return n},o=o=>{if(!o.parentNode||!Av(o))return;const i=mg(o.parentNode)?this.mirror.getId(kv(o)):this.mirror.getId(o.parentNode),s=r(o);if(-1===i||-1===s)return n.addNode(o);const a=nv(o,{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:t=>{yv(t,this.mirror)&&!hv(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(t),_v(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),bv(o)&&this.shadowDomManager.addShadowRoot(o.shadowRoot,this.doc)},onIframeLoad:(t,e)=>{if(hv(t,this.blockClass,this.blockSelector,this.unblockSelector,!1))return;this.iframeManager.attachIframe(t,e);const n=Wv(t);n&&this.canvasManager.addWindow(n),this.shadowDomManager.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{this.stylesheetManager.attachLinkElement(t,e)},onBlockedImageLoad:(t,e,n)=>{let{width:r,height:o}=n;this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:{style:{width:"".concat(r,"px"),height:"".concat(o,"px")}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});a&&(t.push({parentId:i,nextId:s,node:a}),e.add(a.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)Yv(this.removes,a,this.mirror)&&!this.movedSet.has(a.parentNode)||o(a);for(const a of this.addedSet)$v(this.droppedSet,a)||Yv(this.removes,a,this.mirror)?$v(this.movedSet,a)?o(a):this.droppedSet.add(a):o(a);let i=null;for(;n.length;){let t=null;if(i){const e=this.mirror.getId(i.value.parentNode),n=r(i.value);-1!==e&&-1!==n&&(t=i)}if(!t){let e=n.tail;for(;e;){const n=e;if(e=e.previous,n){const e=this.mirror.getId(n.value.parentNode);
1if(-1===r(n.value))continue;if(-1!==e){t=n;break}{const e=n.value;if(e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const r=e.parentNode.host;if(-1!==this.mirror.getId(r)){t=n;break}}}}}}if(!t){for(;n.head;)n.removeNode(n.head.value);break}i=t.previous,n.removeNode(t.value),o(t.value)}const s={texts:this.texts.map((t=>({id:this.mirror.getId(t.node),value:t.value}))).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),attributes:this.attributes.map((t=>{const{attributes:e}=t;if("string"===typeof e.style){const n=JSON.stringify(t.styleDiff),r=JSON.stringify(t._unchangedStyles);n.length<e.style.length&&(n+r).split("var(").length===e.style.split("var(").length&&(e.style=t.styleDiff)}return{id:this.mirror.getId(t.node),attributes:e}})).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),removes:this.removes,adds:t};(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=t=>{if(!mv(t.target,this.mirror))switch(t.type){case"characterData":{const e=t.target.textContent;hv(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||e===t.oldValue||this.texts.push({value:Qg(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&e?this.maskTextFn?this.maskTextFn(e,fv(t.target)):e.replace(/[\S]/g,"*"):e,node:t.target});break}case"attributes":{const e=t.target;let n=t.attributeName,r=t.target.getAttribute(n);if("value"===n){const n=xg(e),o=e.tagName;r=Eg(e,o,n);const i=bg({maskInputOptions:this.maskInputOptions,tagName:o,type:n});r=Sg({isMasked:Qg(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,i),element:e,value:r,maskInputFn:this.maskInputFn})}if(hv(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===t.oldValue)return;let o=this.attributeMap.get(t.target);if("IFRAME"===e.tagName&&"src"===n&&!this.keepIframeSrcFn(r)){if(qv(e))return;n="rr_src"}if(o||(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(t.target,o)),"type"===n&&"INPUT"===e.tagName&&"password"===(t.oldValue||"").toLowerCase()&&e.setAttribute("data-rr-is-password","true"),!$g(e.tagName,n)&&(o.attributes[n]=Yg(this.doc,kg(e.tagName),kg(n),r,e,this.maskAttributeFn),"style"===n)){const n=t.oldValue?this.styleDeclarationParser.parse(t.oldValue):null;for(const t of Array.from(e.style)){const r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);r!==((null===n||void 0===n?void 0:n.getPropertyValue(t))||"")||i!==((null===n||void 0===n?void 0:n.getPropertyPriority(t))||"")?o.styleDiff[t]=""===i?r:[r,i]:o._unchangedStyles[t]=[r,i]}if(n)for(const t of Array.from(n))""===e.style.getPropertyValue(t)&&(o.styleDiff[t]=!1)}break}case"childList":if(hv(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach((e=>this.genAdds(e,t.target))),t.removedNodes.forEach((e=>{const n=this.mirror.getId(e),r=mg(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);hv(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||mv(e,this.mirror)||!function(t,e){return-1!==e.getId(t)}(e,this.mirror)||(this.addedSet.has(e)?(Kv(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===n||gv(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[Jv(n,r)]?Kv(this.movedSet,e):this.removes.push({parentId:r,id:n,isShadow:!(!mg(t.target)||!gg(t.target))||void 0})),this.mapRemoves.push(e))}))}},this.genAdds=(t,e)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!this.addedSet.has(t)&&!this.movedSet.has(t)){if(this.mirror.hasNode(t)){if(mv(t,this.mirror))return;this.movedSet.add(t);let n=null;e&&this.mirror.hasNode(e)&&(n=this.mirror.getId(e)),n&&-1!==n&&(this.movedMap[Jv(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);hv(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEac
1h((t=>this.genAdds(t))),bv(t)&&t.shadowRoot.childNodes.forEach((e=>{this.processedNodeManager.add(e,this),this.genAdds(e,t)})))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager","ignoreCSSAttributes"].forEach((e=>{this[e]=t[e]})),this.styleDeclarationParser=new zv(this.doc)}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 Kv(t,e){var n;t.delete(e),null===(n=e.childNodes)||void 0===n||n.forEach((e=>Kv(t,e)))}function Yv(t,e,n){return 0!==t.length&&function(t,e,n){let r=e.parentNode;for(;r;){const e=n.getId(r);if(t.some((t=>t.id===e)))return!0;r=r.parentNode}return!1}(t,e,n)}function $v(t,e){return 0!==t.size&&Xv(t,e)}function Xv(t,e){const{parentNode:n}=e;return!!n&&(!!t.has(n)||Xv(t,n))}const Zv=[];function Qv(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch(e){}return t&&t.target}function ty(t,e){var n,r;const o=new Gv;Zv.push(o),o.init(t);let i=window.MutationObserver||window.__rrMutationObserver;const s=null===(n=window)||void 0===n||null===(n=n.Zone)||void 0===n||null===(r=n.__symbol__)||void 0===r?void 0:r.call(n,"MutationObserver");s&&window[s]&&(i=window[s]);const a=new i(Dv((e=>{t.onMutation&&!1===t.onMutation(e)||o.processMutations.bind(o)(e)})));return a.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function ey(t){let{mouseInteractionCb:e,doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:a,sampling:c}=t;if(!1===c.mouseInteraction)return()=>{};const l=!0===c.mouseInteraction||void 0===c.mouseInteraction?{}:c.mouseInteraction,u=[];let d=null;return Object.keys(Rv).filter((t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==l[t])).forEach((t=>{let c=kg(t);const l=(t=>n=>{const c=Qv(n);if(hv(c,o,i,a,!0))return;let l=null,u=t;if("pointerType"in n){switch(n.pointerType){case"mouse":l=Mv.Mouse;break;case"touch":l=Mv.Touch;break;case"pen":l=Mv.Pen}l===Mv.Touch?Rv[t]===Rv.MouseDown?u="TouchStart":Rv[t]===Rv.MouseUp&&(u="TouchEnd"):Mv.Pen}else vv(n)&&(l=Mv.Touch);null!==l?(d=l,(u.startsWith("Touch")&&l===Mv.Touch||u.startsWith("Mouse")&&l===Mv.Mouse)&&(l=null)):Rv[t]===Rv.Click&&(l=d,d=null);const p=vv(n)?n.changedTouches[0]:n;if(!p)return;const f=r.getId(c),{clientX:h,clientY:m}=p;Dv(e)((0,s.A)({type:Rv[u],id:f,x:h,y:m},null!==l&&{pointerType:l}))})(t);if(window.PointerEvent)switch(Rv[t]){case Rv.MouseDown:case Rv.MouseUp:c=c.replace("mouse","pointer");break;case Rv.TouchStart:case Rv.TouchEnd:return}u.push(rv(c,l,n))})),Dv((()=>{u.forEach((t=>t()))}))}function ny(t){let{scrollCb:e,doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:s,sampling:a}=t;return rv("scroll",Dv(sv(Dv((t=>{const a=Qv(t);if(!a||hv(a,o,i,s,!0))return;const c=r.getId(a);if(a===n&&n.defaultView){const t=uv(n.defaultView);e({id:c,x:t.left,y:t.top})}else e({id:c,x:a.scrollLeft,y:a.scrollTop})})),a.scroll||100)),n)}const ry=["INPUT","TEXTAREA","SELECT"],oy=new WeakMap;function iy(t){let{inputCb:e,doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:a,ignoreClass:c,ignoreSelector:l,maskInputOptions:u,maskInputFn:d,sampling:p,userTriggeredOnInput:f,maskTextClass:h,unmaskTextClass:m,maskTextSelector:g,unmaskTextSelector:v}=t;function y(t){let e=Qv(t);const r=t.isTrusted,s=e&&wg(e.tagName);if("OPTION"===s&&(e=e.parentElement),!e||!s||ry.indexOf(s)<0||hv(e,o,i,a,!0))return;const p=e;if(p.classList.contains(c)||l&&p.matches(l))return;const y=xg(e);let b=Eg(p,s,y),S=!1;const k=bg({maskInputOptions:u,tagName:s,type:y}),w=Qg(e,h,g,m,v,k);"radio"!==y&&"checkbox"!==y||(S=e.checked),b=Sg({isMasked:w,element:e,value:b,maskInputFn:d}),_(e,f?{text:b,isChecked:S,userTriggered:r}:{text:b,isChecked:S});const A=e.name;"radio"===y&&A&&S&&n.querySelectorAll('input[type="radio"][name="'.concat(A,'"]')).forEac
1h((t=>{if(t!==e){const e=Sg({isMasked:w,element:t,value:Eg(t,s,y),maskInputFn:d});_(t,f?{text:e,isChecked:!S,userTriggered:!1}:{text:e,isChecked:!S})}}))}function _(t,n){const o=oy.get(t);if(!o||o.text!==n.text||o.isChecked!==n.isChecked){oy.set(t,n);const o=r.getId(t);Dv(e)((0,s.A)((0,s.A)({},n),{},{id:o}))}}const b=("last"===p.input?["change"]:["input","change"]).map((t=>rv(t,Dv(y),n))),S=n.defaultView;if(!S)return()=>{b.forEach((t=>t()))};const k=S.Object.getOwnPropertyDescriptor(S.HTMLInputElement.prototype,"value"),w=[[S.HTMLInputElement.prototype,"value"],[S.HTMLInputElement.prototype,"checked"],[S.HTMLSelectElement.prototype,"value"],[S.HTMLTextAreaElement.prototype,"value"],[S.HTMLSelectElement.prototype,"selectedIndex"],[S.HTMLOptionElement.prototype,"selected"]];return k&&k.set&&b.push(...w.map((t=>av(t[0],t[1],{set(){Dv(y)({target:this,isTrusted:!1})}},!1,S)))),Dv((()=>{b.forEach((t=>t()))}))}function sy(t){return function(t,e){if(uy("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||uy("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||uy("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||uy("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule){const n=Array.from(t.parentRule.cssRules).indexOf(t);e.unshift(n)}else if(t.parentStyleSheet){const n=Array.from(t.parentStyleSheet.cssRules).indexOf(t);e.unshift(n)}return e}(t,[])}function ay(t,e,n){let r,o;return t?(t.ownerNode?r=e.getId(t.ownerNode):o=n.getId(t),{styleId:o,id:r}):{}}function cy(t,e){var n,r;let{mirror:o,stylesheetManager:i}=t,s=null;s="#document"===e.nodeName?o.getId(e):o.getId(e.host);const a="#document"===e.nodeName?null===(n=e.defaultView)||void 0===n?void 0:n.Document:null===(r=e.ownerDocument)||void 0===r||null===(r=r.defaultView)||void 0===r?void 0:r.ShadowRoot,c=null!==a&&void 0!==a&&a.prototype?Object.getOwnPropertyDescriptor(null===a||void 0===a?void 0:a.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&a&&c?(Object.defineProperty(e,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get(){var t;return null===(t=c.get)||void 0===t?void 0:t.call(this)},set(t){var e;const n=null===(e=c.set)||void 0===e?void 0:e.call(this,t);if(null!==s&&-1!==s)try{i.adoptStyleSheets(t,s)}catch(r){}return n}}),Dv((()=>{Object.defineProperty(e,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))):()=>{}}function ly(t){const e=t.doc.defaultView;if(!e)return()=>{};let n;t.recordDOM&&(n=ty(t,t.doc));const r=function(t){let{mousemoveCb:e,sampling:n,doc:r,mirror:o}=t;if(!1===n.mousemove)return()=>{};const i="number"===typeof n.mousemove?n.mousemove:50,s="number"===typeof n.mousemoveCallback?n.mousemoveCallback:500;let a,c=[];const l=sv(Dv((t=>{const n=Date.now()-a;e(c.map((t=>(t.timeOffset-=n,t))),t),c=[],a=null})),s),u=Dv(sv(Dv((t=>{const e=Qv(t),{clientX:n,clientY:r}=vv(t)?t.changedTouches[0]:t;a||(a=lv()),c.push({x:n,y:r,id:o.getId(e),timeOffset:lv()-a}),l("undefined"!==typeof DragEvent&&t instanceof DragEvent?Cv.Drag:t instanceof MouseEvent?Cv.MouseMove:Cv.TouchMove)})),i,{trailing:!1})),d=[rv("mousemove",u,r),rv("touchmove",u,r),rv("drag",u,r)];return Dv((()=>{d.forEach((t=>t()))}))}(t),o=ey(t),i=ny(t),s=function(t,e){let{viewportResizeCb:n}=t,{win:r}=e,o=-1,i=-1;return rv("resize",Dv(sv(Dv((()=>{const t=dv(),e=pv();o===t&&i===e||(n({width:Number(e),height:Number(t)}),o=t,i=e)})),200)),r)}(t,{win:e}),a=iy(t),c=function(t){let{mediaInteractionCb:e,blockClass:n,blockSelector:r,unblockSelector:o,mirror:i,sampling:s,doc:a}=t;const c=Dv((t=>sv(Dv((s=>{const a=Qv(s);if(!a||hv(a,n,r,o,!0))return;const{currentTime:c,volume:l,muted:u,playbackRate:d}=a;e({type:t,id:i.getId(a),currentTime:c,volume:l,muted:u,playbackRate:d})})),s.media||500))),l=[rv("play",c(Ov.Play),a),rv("pause",c(Ov.Pause),a),rv("seeked",c(Ov.Seeked),a),rv("volumechange",c(Ov.VolumeChange),a),rv("ratechange",c(Ov.RateChange),a)];return Dv((()=>{l.forEach((t=>t()))}))}(t);let l=()=>{},u=()=>{},d=()=>{},p=()=>{};t.recordDOM&&(l=function(t,e){let{styleSheetRuleCb:n,mirror:r,stylesheetManager:o}=t,{win:i}=e;if(!i.CSSStyleSheet||!i.CSSStyleSheet.prototype)return()=>{};const s=i.CSSStyleSheet.prototype.insertRule;i.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:Dv(((t,e,i)=>{const[s,a]=i,{id:c,styleId:l}=ay(e,r,o.styleMirror);return(c&&-1!==c||l&&-1!==l)&&n({id:c,styleId:l,adds:[{rule:s,index:a}]}),t.apply(e,i)}))});const a=i.CSSStyleSheet.prototype.deleteRule;
1let c,l;i.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:Dv(((t,e,i)=>{const[s]=i,{id:a,styleId:c}=ay(e,r,o.styleMirror);return(a&&-1!==a||c&&-1!==c)&&n({id:a,styleId:c,removes:[{index:s}]}),t.apply(e,i)}))}),i.CSSStyleSheet.prototype.replace&&(c=i.CSSStyleSheet.prototype.replace,i.CSSStyleSheet.prototype.replace=new Proxy(c,{apply:Dv(((t,e,i)=>{const[s]=i,{id:a,styleId:c}=ay(e,r,o.styleMirror);return(a&&-1!==a||c&&-1!==c)&&n({id:a,styleId:c,replace:s}),t.apply(e,i)}))})),i.CSSStyleSheet.prototype.replaceSync&&(l=i.CSSStyleSheet.prototype.replaceSync,i.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:Dv(((t,e,i)=>{const[s]=i,{id:a,styleId:c}=ay(e,r,o.styleMirror);return(a&&-1!==a||c&&-1!==c)&&n({id:a,styleId:c,replaceSync:s}),t.apply(e,i)}))}));const u={};dy("CSSGroupingRule")?u.CSSGroupingRule=i.CSSGroupingRule:(dy("CSSMediaRule")&&(u.CSSMediaRule=i.CSSMediaRule),dy("CSSConditionRule")&&(u.CSSConditionRule=i.CSSConditionRule),dy("CSSSupportsRule")&&(u.CSSSupportsRule=i.CSSSupportsRule));const d={};return Object.entries(u).forEach((t=>{let[e,i]=t;d[e]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(d[e].insertRule,{apply:Dv(((t,e,i)=>{const[s,a]=i,{id:c,styleId:l}=ay(e.parentStyleSheet,r,o.styleMirror);return(c&&-1!==c||l&&-1!==l)&&n({id:c,styleId:l,adds:[{rule:s,index:[...sy(e),a||0]}]}),t.apply(e,i)}))}),i.prototype.deleteRule=new Proxy(d[e].deleteRule,{apply:Dv(((t,e,i)=>{const[s]=i,{id:a,styleId:c}=ay(e.parentStyleSheet,r,o.styleMirror);return(a&&-1!==a||c&&-1!==c)&&n({id:a,styleId:c,removes:[{index:[...sy(e),s]}]}),t.apply(e,i)}))})})),Dv((()=>{i.CSSStyleSheet.prototype.insertRule=s,i.CSSStyleSheet.prototype.deleteRule=a,c&&(i.CSSStyleSheet.prototype.replace=c),l&&(i.CSSStyleSheet.prototype.replaceSync=l),Object.entries(u).forEach((t=>{let[e,n]=t;n.prototype.insertRule=d[e].insertRule,n.prototype.deleteRule=d[e].deleteRule}))}))}(t,{win:e}),u=cy(t,t.doc),d=function(t,e){let{styleDeclarationCb:n,mirror:r,ignoreCSSAttributes:o,stylesheetManager:i}=t,{win:s}=e;const a=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:Dv(((t,e,s)=>{var c;const[l,u,d]=s;if(o.has(l))return a.apply(e,[l,u,d]);const{id:p,styleId:f}=ay(null===(c=e.parentRule)||void 0===c?void 0:c.parentStyleSheet,r,i.styleMirror);return(p&&-1!==p||f&&-1!==f)&&n({id:p,styleId:f,set:{property:l,value:u,priority:d},index:sy(e.parentRule)}),t.apply(e,s)}))});const c=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(c,{apply:Dv(((t,e,s)=>{var a;const[l]=s;if(o.has(l))return c.apply(e,[l]);const{id:u,styleId:d}=ay(null===(a=e.parentRule)||void 0===a?void 0:a.parentStyleSheet,r,i.styleMirror);return(u&&-1!==u||d&&-1!==d)&&n({id:u,styleId:d,remove:{property:l},index:sy(e.parentRule)}),t.apply(e,s)}))}),Dv((()=>{s.CSSStyleDeclaration.prototype.setProperty=a,s.CSSStyleDeclaration.prototype.removeProperty=c}))}(t,{win:e}),t.collectFonts&&(p=function(t){let{fontCb:e,doc:n}=t;const r=n.defaultView;if(!r)return()=>{};const o=[],i=new WeakMap,s=r.FontFace;r.FontFace=function(t,e,n){const r=new s(t,e,n);return i.set(r,{family:t,buffer:"string"!==typeof e,descriptors:n,fontSource:"string"===typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),r};const a=cv(n.fonts,"add",(function(t){return function(n){return Tv(Dv((()=>{const t=i.get(n);t&&(e(t),i.delete(n))})),0),t.apply(this,[n])}}));return o.push((()=>{r.FontFace=s})),o.push(a),Dv((()=>{o.forEach((t=>t()))}))}(t)));const f=function(t){const{doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,selectionCb:s}=t;let a=!0;const c=Dv((()=>{const t=e.getSelection();if(!t||a&&null!==t&&void 0!==t&&t.isCollapsed)return;a=t.isCollapsed||!1;const c=[],l=t.rangeCount||0;for(let e=0;e<l;e++){const s=t.getRangeAt(e),{startContainer:a,startOffset:l,endContainer:u,endOffset:d}=s;hv(a,r,o,i,!0)||hv(u,r,o,i,!0)||c.push({start:n.getId(a),startOffset:l,end:n.getId(u),endOffset:d})}s({ranges:c})}));return c(),rv("selectionchange",c)}(t),h=function(t){let{doc:e,customElementCb:n}=t;const r=e.defaultView;return r&&r.customElements?cv(r.customElements,"define",(function(t){return function(e,r,o){try{n({define:{name:e}})}catch(i){}return t.apply(this,[e,r,o])}})):()=>{}}(t),m=[];for(const g of t.plugins)m.push(g.observer(g.callback,e,g.options));return Dv((()=>{var t;Zv.forEach((t=>t.reset())),null===(t=n)||void 0===t||t.disconnect(),r(),o(),i(),s(),a(),c(),l(),u(),d(),p(),f(),h(),m.forEach((t=>t()))}))}function uy(t){return"undefined"!==typeof window[t]}function dy(t){return Boolean("undefined"!==typeof window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class py{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,e,n,r){const o=n||this.getIdToRemoteIdMap(t),i=r||this.getRemoteIdToIdMap(t);let s=o.get(e);return s||(s=this.generateIdFn(),o.set(e,s),i.set(s,e)),s}getIds(t,e){const n=this.getIdToRemoteIdMap(t),r=this.getRemoteIdToIdMap(t);return e.map((e=>this.getId(t,e,n,r)))}getRemoteId(t,e,n){const r=n||this.getRemoteIdToIdMap(t);if("number"!==typeof e)return e;const o=r.get(e);return o||-1}getRemoteIds(t,e){const n=this.getRemoteIdToIdMap(t);return e.map((e=>this.getRemoteId(t,e,n)))}reset(t){if(!t)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let e=this.iframeIdToRemoteIdMap.get(t);return e||(e=new Map,this.iframeIdToRemoteIdMap.set(t,e)),e}getRemoteIdToIdMap(t){let e=this.iframeRemoteIdToIdMap.get(t);return e||(e=new Map,this.iframeRemoteIdToIdMap.set(t,e)),e}}
1class fy{constructor(){this.crossOriginIframeMirror=new py(Lg),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class hy{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new py(Lg),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new py(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0);const e=Wv(t);e&&this.crossOriginIframeMap.set(e,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,e){var n,r;(this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes)&&(null===(r=Wv(t))||void 0===r||r.addEventListener("message",this.handleMessage.bind(this)));null===(n=this.loadListener)||void 0===n||n.call(this,t);const o=qv(t);o&&o.adoptedStyleSheets&&o.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(o.adoptedStyleSheets,this.mirror.getId(o))}handleMessage(t){const e=t;if("rrweb"!==e.data.type||e.origin!==e.data.origin)return;if(!t.source)return;const n=this.crossOriginIframeMap.get(t.source);if(!n)return;const r=this.transformCrossOriginEvent(n,e.data.event);r&&this.wrappedEmit(r,e.data.isCheckout)}transformCrossOriginEvent(t,e){switch(e.type){case Iv.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(e.data.node,t);const n=e.data.node.id;return this.crossOriginIframeRootIdMap.set(t,n),this.patchRootIdOnNode(e.data.node,n),{timestamp:e.timestamp,type:Iv.IncrementalSnapshot,data:{source:Cv.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Iv.Meta:case Iv.Load:case Iv.DomContentLoaded:return!1;case Iv.Plugin:return e;case Iv.Custom:return this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]),e;case Iv.IncrementalSnapshot:switch(e.data.source){case Cv.Mutation:return e.data.adds.forEach((e=>{this.replaceIds(e,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(e.node,t);const n=this.crossOriginIframeRootIdMap.get(t);n&&this.patchRootIdOnNode(e.node,n)})),e.data.removes.forEach((e=>{this.replaceIds(e,t,["parentId","id"])})),e.data.attributes.forEach((e=>{this.replaceIds(e,t,["id"])})),e.data.texts.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case Cv.Drag:case Cv.TouchMove:case Cv.MouseMove:return e.data.positions.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case Cv.ViewportResize:return!1;case Cv.MediaInteraction:case Cv.MouseInteraction:case Cv.Scroll:case Cv.CanvasMutation:case Cv.Input:return this.replaceIds(e.data,t,["id"]),e;case Cv.StyleSheetRule:case Cv.StyleDeclaration:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleId"]),e;case Cv.Font:return e;case Cv.Selection:return e.data.ranges.forEach((e=>{this.replaceIds(e,t,["start","end"])})),e;case Cv.AdoptedStyleSheet:var n;return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleIds"]),null===(n=e.data.styles)||void 0===n||n.forEach((e=>{this.replaceStyleIds(e,t,["styleId"])})),e}}return!1}replace(t,e,n,r){for(const o of r)(Array.isArray(e[o])||"number"===typeof e[o])&&(Array.isArray(e[o])?e[o]=t.getIds(n,e[o]):e[o]=t.getId(n,e[o]));return e}replaceIds(t,e,n){return this.replace(this.crossOriginIframeMirror,t,e,n)}replaceStyleIds(t,e,n){return this.replace(this.crossOriginIframeStyleMirror,t,e,n)}replaceIdOnNode(t,e){this.replaceIds(t,e,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach((t=>{this.replaceIdOnNode(t,e)}))}patchRootIdOnNode(t,e){t.type===hg.Document||t.rootId||(t.rootId=e),"childNodes"in t&&t.childNodes.forEach((t=>{this.patchRootIdOnNode(t,e)}))}}
1class my{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class gy{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,e){if(!gg(t))return;if(this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const n=ty((0,s.A)((0,s.A)({},this.bypassOptions),{},{doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push((()=>n.disconnect())),this.restoreHandlers.push(ny((0,s.A)((0,s.A)({},this.bypassOptions),{},{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),Tv((()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(cy({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))}),0)}observeAttachShadow(t){const e=qv(t),n=Wv(t);e&&n&&this.patchAttachShadow(n.Element,e)}patchAttachShadow(t,e){const n=this;this.restoreHandlers.push(cv(t.prototype,"attachShadow",(function(t){return function(r){const o=t.call(this,r);return this.shadowRoot&&Av(this)&&n.addShadowRoot(this.shadowRoot,e),o}})))}reset(){this.restoreHandlers.forEach((t=>{try{t()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class vy{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new Sv,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,e){"_cssText"in e.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,e){if(0===t.length)return;const n={id:e,styleIds:[]},r=[];for(const o of t){let t;this.styleMirror.has(o)?t=this.styleMirror.getId(o):(t=this.styleMirror.add(o),r.push({styleId:t,rules:Array.from(o.rules||CSSRule,((t,e)=>({rule:yg(t),index:e})))})),n.styleIds.push(t)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class yy{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,e){const n=this.nodeMap.get(t);return n&&Array.from(n).some((t=>t!==e))}add(t,e){this.active||(this.active=!0,function(){Ev("requestAnimationFrame")(...arguments)}((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(e))}destroy(){}}let _y,by;try{if(2!==Array.from([1],(t=>2*t))[0]){var Sy;const t=document.createElement("iframe");document.body.appendChild(t),Array.from=(null===(Sy=t.contentWindow)||void 0===Sy?void 0:Sy.Array.from)||Array.from,document.body.removeChild(t)}}catch(Cx){console.debug("Unable to override Array.from",Cx)}const ky=new _g;function wy(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{emit:e,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:i=null,unblockSelector:a=null,ignoreClass:c="rr-ignore",ignoreSelector:l=null,maskAllText:u=!1,maskTextClass:d="rr-mask",unmaskTextClass:p=null,maskTextSelector:f=null,unmaskTextSelector:h=null,inlineStylesheet:m=!0,maskAllInputs:g,maskInputOptions:v,slimDOMOptions:y,maskAttributeFn:_,maskInputFn:b,maskTextFn:S,maxCanvasSize:k=null,packFn:w,sampling:A={},dataURLOptions:x={},mousemoveWait:E,recordDOM:T=!0,recordCanvas:I=!1,recordCrossOriginIframes:C=!1,recordAfter:R=("DOMContentLoaded"===t.recordAfter?t.recordAfter:"load"),userTriggeredOnInput:M=!1,collectFonts:O=!1,inlineImages:P=!1,plugins:N,keepIframeSrcFn:L=()=>!1,ignoreCSSAttributes:D=new Set([]),errorHandler:F,onMutation:j,getCanvasManager:B}=t;Nv(F);const U=!C||window.parent===window;let q=!1;if(!U)try{window.parent.document&&(q=!1)}catch(nt){q=!0}if(U&&!e)throw new Error("emit function is required");if(!U&&!q)return()=>{};void 0!==E&&void 0===A.mousemove&&(A.mousemove=E),ky.reset();const W=!0===g?{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!==v?v:{},z=!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||{};let H;!function(){var t=this;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]: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=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];let o=n[0];if(!(0 in n))throw new TypeError("1 argument is required");do{if(t===o)return!0}while(o=o&&o.parentNode);return!1})}();let V=0;const J=t=>{for(const e of N||[])e.eventProcessor&&(t=e.eventProcessor(t));return w&&!q&&(t=w(t)),t};_y=(t,o)=>{var i;const s=t;if(s.timestamp=lv(),null===(i=Zv[0])||void 0===i||!i.isFrozen()||s.type===Iv.FullSnapshot||s.type===Iv.IncrementalSnapshot&&s.data.source===Cv.Mutation||Zv.forEach((t=>t.unfreeze())),U)null===e||void 0===e||e(J(s),o);else if(q){const t={type:"rrweb",event:J(s),origin:window.location.origin,isCheckout:o};window.parent.postMessage(t,"*")}if(s.type===Iv.FullSnapshot)H=s,V=0;else if(s.type===Iv.IncrementalSnapshot){if(s.data.source===Cv.Mutation&&s.data.isAttachIframe)return;V++;const t=r&&V>=r,e=n&&H&&s.timestamp-H.timestamp>n;(t||e)&&et(!0)}};const G=t=>{_y({type:Iv.IncrementalSnapshot,data:(0,s.A)({source:Cv.Mutation},t)})},K=t=>
1_y({type:Iv.IncrementalSnapshot,data:(0,s.A)({source:Cv.Scroll},t)}),Y=t=>_y({type:Iv.IncrementalSnapshot,data:(0,s.A)({source:Cv.CanvasMutation},t)}),$=new vy({mutationCb:G,adoptedStyleSheetCb:t=>_y({type:Iv.IncrementalSnapshot,data:(0,s.A)({source:Cv.AdoptedStyleSheet},t)})}),X="boolean"===typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new fy:new hy({mirror:ky,mutationCb:G,stylesheetManager:$,recordCrossOriginIframes:C,wrappedEmit:_y});for(const s of N||[])s.getMirror&&s.getMirror({nodeMirror:ky,crossOriginIframeMirror:X.crossOriginIframeMirror,crossOriginIframeStyleMirror:X.crossOriginIframeStyleMirror});const Z=new yy,Q=function(t,e){try{return t?t(e):new Uv}catch(n){return console.warn("Unable to initialize CanvasManager"),new Uv}}(B,{mirror:ky,win:window,mutationCb:t=>_y({type:Iv.IncrementalSnapshot,data:(0,s.A)({source:Cv.CanvasMutation},t)}),recordCanvas:I,blockClass:o,blockSelector:i,unblockSelector:a,maxCanvasSize:k,sampling:A.canvas,dataURLOptions:x,errorHandler:F}),tt="boolean"===typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new my:new gy({mutationCb:G,scrollCb:K,bypassOptions:{onMutation:j,blockClass:o,blockSelector:i,unblockSelector:a,maskAllText:u,maskTextClass:d,unmaskTextClass:p,maskTextSelector:f,unmaskTextSelector:h,inlineStylesheet:m,maskInputOptions:W,dataURLOptions:x,maskAttributeFn:_,maskTextFn:S,maskInputFn:b,recordCanvas:I,inlineImages:P,sampling:A,slimDOMOptions:z,iframeManager:X,stylesheetManager:$,canvasManager:Q,keepIframeSrcFn:L,processedNodeManager:Z,ignoreCSSAttributes:D},mirror:ky}),et=function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!T)return;_y({type:Iv.Meta,data:{href:window.location.href,width:pv(),height:dv()}},t),$.reset(),tt.init(),Zv.forEach((t=>t.lock()));const e=function(t,e){const{mirror:n=new _g,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:i=null,maskAllText:s=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:l=null,unmaskTextSelector:u=null,inlineStylesheet:d=!0,inlineImages:p=!1,recordCanvas:f=!1,maskAllInputs:h=!1,maskAttributeFn:m,maskTextFn:g,maskInputFn:v,slimDOM:y=!1,dataURLOptions:_,preserveWhiteSpace:b,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:w,onBlockedImageLoad:A,onStylesheetLoad:x,stylesheetLoadTimeout:E,keepIframeSrcFn:T=()=>!1,ignoreCSSAttributes:I=new Set([])}=e||{};return nv(t,{doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,maskAllText:s,maskTextClass:a,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:u,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:v,slimDOMOptions:!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===y,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===y?{}:y,dataURLOptions:_,inlineImages:p,recordCanvas:f,preserveWhiteSpace:b,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:w,onBlockedImageLoad:A,onStylesheetLoad:x,stylesheetLoadTimeout:E,keepIframeSrcFn:T,newlyAddedElement:!1,ignoreCSSAttributes:I})}(document,{mirror:ky,blockClass:o,blockSelector:i,unblockSelector:a,maskAllText:u,maskTextClass:d,unmaskTextClass:p,maskTextSelector:f,unmaskTextSelector:h,inlineStylesheet:m,maskAllInputs:W,maskAttributeFn:_,maskInputFn:b,maskTextFn:S,slimDOM:z,dataURLOptions:x,recordCanvas:I,inlineImages:P,onSerialize:t=>{yv(t,ky)&&X.addIframe(t),_v(t,ky)&&$.trackLinkElement(t),bv(t)&&tt.addShadowRoot(t.shadowRoot,document)},onIframeLoad:(t,e)=>{X.attachIframe(t,e);const n=Wv(t);n&&Q.addWindow(n),tt.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{$.attachLinkElement(t,e)},onBlockedImageLoad:(t,e,n)=>{let{width:r,height:o}=n;G({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:{style:{width:"".concat(r,"px"),height:"".concat(o,"px")}}}]})},keepIframeSrcFn:L,ignoreCSSAttributes:D});if(!e)return console.warn("Failed to snapshot the document");_y({type:Iv.FullSnapshot,data:{node:e,initialOffset:uv(window)}}),Zv.forEach((t=>t.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&$.adoptStyleSheets(document.adoptedStyleSheets,ky.getId(document))};by=et;try{const t=[],e=t=>{var e;return Dv(ly)({onMutation:j,mutationCb:G,mousemoveCb:(t,e)=>_y({type:Iv.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>_y({type:Iv.IncrementalSnapshot,data:(0,s.A)({source:Cv.MouseInteraction},t)}),scrollCb:K,viewportResizeCb:t=>_y({type:Iv.IncrementalSnapshot,data:(0,s.A)({source:Cv.ViewportResize},t)}),inputCb:t=>_y({type:Iv.IncrementalSnapshot,data:(0,s.A)({source:Cv.Input},t)}),mediaInteractionCb:t=>_y({type:Iv.IncrementalSnapshot,data:(0,s.A)({source:Cv.MediaInteraction},t)}),styleSheetRuleCb:t=>_y({type:Iv.IncrementalSnapshot,data:(0,s.A)({source:Cv.StyleSheetRule},t)}),styleDeclarationCb:t=>_y({type:Iv.IncrementalSnapshot,data:(0,s.A)({source:Cv.StyleDeclaration},t)}),canvasMutationCb:Y,fontCb:t=>_y({type:Iv.IncrementalSnapshot,data:(0,s.A)({source:Cv.Font},t)}),selectionCb:t=>{_y({type:Iv.IncrementalSnapshot,data:(0,s.A)({source:Cv.Selection},t)})},customElementCb:t=>{_y({type:Iv.IncrementalSnapshot,data:(0,s.A)({source:Cv.CustomElement},t)})},blockClass:o,ignoreClass:c,ignoreSelector:l,maskAllText:u,maskTextClass:d,unmaskTextClass:p,maskTextSelector:f,unmaskTextSelector:h,maskInputOptions:W,inlineStylesheet:m,sampling:A,recordDOM:T,recordCanvas:I,inlineImages:P,userTriggeredOnInput:M,c
1ollectFonts:O,doc:t,maskAttributeFn:_,maskInputFn:b,maskTextFn:S,keepIframeSrcFn:L,blockSelector:i,unblockSelector:a,slimDOMOptions:z,dataURLOptions:x,mirror:ky,iframeManager:X,stylesheetManager:$,shadowDomManager:tt,processedNodeManager:Z,canvasManager:Q,ignoreCSSAttributes:D,plugins:(null===N||void 0===N||null===(e=N.filter((t=>t.observer)))||void 0===e?void 0:e.map((t=>({observer:t.observer,options:t.options,callback:e=>_y({type:Iv.Plugin,data:{plugin:t.name,payload:e}})}))))||[]},{})};X.addLoadListener((n=>{try{t.push(e(n.contentDocument))}catch(r){console.warn(r)}}));const n=()=>{et(),t.push(e(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(t.push(rv("DOMContentLoaded",(()=>{_y({type:Iv.DomContentLoaded,data:{}}),"DOMContentLoaded"===R&&n()}))),t.push(rv("load",(()=>{_y({type:Iv.Load,data:{}}),"load"===R&&n()}),window))),()=>{t.forEach((t=>t())),Z.destroy(),by=void 0,Lv()}}catch(rt){console.warn(rt)}}var Ay,xy;wy.mirror=ky,wy.takeFullSnapshot=function(t){if(!by)throw new Error("please take full snapshot after start recording");by(t)},(xy=Ay||(Ay={}))[xy.NotStarted=0]="NotStarted",xy[xy.Running=1]="Running",xy[xy.Stopped=2]="Stopped";function Ey(t){return t>9999999999?t:1e3*t}function Ty(t){return t>9999999999?t/1e3:t}function Iy(t,e){"sentry.transaction"!==e.category&&(["ui.click","ui.input"].includes(e.category)?t.triggerUserActivity():t.checkAndHandleExpiredSession(),t.addUpdate((()=>(t.throttledAddEvent({type:Iv.Custom,timestamp:1e3*(e.timestamp||0),data:{tag:"breadcrumb",payload:ot(e,10,1e3)}}),"console"===e.category))))}function Cy(t){return t.closest("button,a")||t}function Ry(t){const e=My(t);return e&&e instanceof Element?Cy(e):e}function My(t){return function(t){return"object"===typeof t&&!!t&&"target"in t}(t)?t.target:t}let Oy;function Py(t){return Oy||(Oy=[],P(ng,"open",(function(t){return function(){if(Oy)try{Oy.forEach((t=>t()))}catch(o){}for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.apply(ng,n)}}))),Oy.push(t),()=>{const e=Oy?Oy.indexOf(t):-1;e>-1&&Oy.splice(e,1)}}const Ny=new Set([Cv.Mutation,Cv.StyleSheetRule,Cv.StyleDeclaration,Cv.AdoptedStyleSheet,Cv.CanvasMutation,Cv.Selection,Cv.MediaInteraction]);class Ly{constructor(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Iy;this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=e.timeout/1e3,this._threshold=e.threshold/1e3,this._scrollTimeout=e.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=e.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){const t=Py((()=>{this._lastMutation=Fy()}));this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,e){if(function(t,e){if(!Dy.includes(t.tagName))return!0;if("INPUT"===t.tagName&&!["submit","button"].includes(t.getAttribute("type")||""))return!0;if("A"===t.tagName&&(t.hasAttribute("download")||t.hasAttribute("target")&&"_self"!==t.getAttribute("target")))return!0;if(e&&t.matches(e))return!0;return!1}(e,this._ignoreSelector)||!function(t){return!(!t.data||"number"!==typeof t.data.nodeId||!t.timestamp)}(t))return;const n={timestamp:Ty(t.timestamp),clickBreadcrumb:t,clickCount:0,node:e};this._clicks.some((t=>t.node===n.node&&Math.abs(t.timestamp-n.timestamp)<1))||(this._clicks.push(n),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now();this._lastMutation=Ty(t)}registerScroll(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now();this._lastScroll=Ty(t)}registerClick(t){const e=Cy(t);this._handleMultiClick(e)}_handleMultiClick(t){this._getClicks(t).forEach((t=>{t.clickCount++}))}_getClicks(t){return this._clicks.filter((e=>e.node===t))}_checkClicks(){const t=[],e=Fy();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<=e&&t.push(n)}));for(const n of t){const t=this._clicks.indexOf(n);t>
1-1&&(this._generateBreadcrumbs(n),this._clicks.splice(t,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const e=this._replay,n=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,r=t.mutationAfter&&t.mutationAfter<=this._threshold,o=!n&&!r,{clickCount:i,clickBreadcrumb:a}=t;if(o){const n=1e3*Math.min(t.mutationAfter||this._timeout,this._timeout),r=n<1e3*this._timeout?"mutation":"timeout",o={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:(0,s.A)((0,s.A)({},a.data),{},{url:ng.location.href,route:e.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:i||1})};this._addBreadcrumbEvent(e,o)}else if(i>1){const t={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:(0,s.A)((0,s.A)({},a.data),{},{url:ng.location.href,route:e.getCurrentRoute(),clickCount:i,metric:!0})};this._addBreadcrumbEvent(e,t)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=Yp((()=>this._checkClicks()),1e3)}}const Dy=["A","BUTTON","INPUT"];function Fy(){return Date.now()/1e3}function jy(t,e){try{if(!function(t){return 3===t.type}(e))return;const{source:n}=e.data;if(Ny.has(n)&&t.registerMutation(e.timestamp),n===Cv.Scroll&&t.registerScroll(e.timestamp),function(t){return t.data.source===Cv.MouseInteraction}(e)){const{type:n,id:r}=e.data,o=wy.mirror.getNode(r);o instanceof HTMLElement&&n===Rv.Click&&t.registerClick(o)}}catch(n){}}function By(t){return(0,s.A)({timestamp:Date.now()/1e3,type:"default"},t)}var Uy=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(Uy||{});const qy=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function Wy(t){const e={};!t["data-sentry-component"]&&t["data-sentry-element"]&&(t["data-sentry-component"]=t["data-sentry-element"]);for(const n in t)if(qy.has(n)){let r=n;"data-testid"!==n&&"data-test-id"!==n||(r="testId"),e[r]=t[n]}return e}const zy=t=>e=>{if(!t.isEnabled())return;const n=function(t){const{target:e,message:n}=function(t){const e="click"===t.name;let n,r=null;try{r=e?Ry(t.event):My(t.event),n=Kf(r,{maxStringLength:200})||"<unknown>"}catch(o){n="<unknown>"}return{target:r,message:n}}(t);return By((0,s.A)({category:"ui.".concat(t.name)},Hy(e,n)))}(e);if(!n)return;const r="click"===e.name,o=r?e.event:void 0;var i,a,c;!(r&&t.clickDetector&&null!==o&&void 0!==o&&o.target)||o.altKey||o.metaKey||o.ctrlKey||o.shiftKey||(i=t.clickDetector,a=n,c=Ry(e.event),i.handleClick(a,c)),Iy(t,n)};function Hy(t,e){const n=wy.mirror.getId(t),r=n&&wy.mirror.getNode(n),o=r&&wy.mirror.getMeta(r),i=o&&function(t){return t.type===Uy.Element}(o)?o:null;return{message:e,data:i?{nodeId:n,node:{id:n,tagName:i.tagName,textContent:Array.from(i.childNodes).map((t=>t.type===Uy.Text&&t.textContent)).filter(Boolean).map((t=>t.trim())).join(""),attributes:Wy(i.attributes)}}:{}}}function Vy(t,e){if(!t.isEnabled())return;t.updateUserActivity();const n=function(t){const{metaKey:e,shiftKey:n,ctrlKey:r,altKey:o,key:i,target:a}=t;if(!a||function(t){return"INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable}(a)||!i)return null;const c=e||r||o,l=1===i.length;if(!c&&l)return null;const u=Kf(a,{maxStringLength:200})||"<unknown>",d=Hy(a,u);return By({category:"ui.keyDown",message:u,data:(0,s.A)((0,s.A)({},d.data),{},{metaKey:e,shiftKey:n,ctrlKey:r,altKey:o,key:i})})}(e);n&&Iy(t,n)}const Jy={resource:function(t){const{entryType:e,initiatorType:n,name:r,responseEnd:o,startTime:i,decodedBodySize:s,encodedBodySize:a,responseStatus:c,transferSize:l}=t;if(["fetch","xmlhttprequest"].includes(n))return null;return{type:"".concat(e,".").concat(n),start:Yy(i),end:Yy(o),name:r,data:{size:l,statusCode:c,decodedBodySize:s,encodedBodySize:a}}},paint:function(t){const{duration:e,entryType:n,name:r,startTime:o}=t,i=Yy(o);return{type:n,name:r,start:i,end:i+e,data:void 0}},navigation:function(t){const{entryType:e,name:n,decodedBodySize:r,duration:o,domComplete:i,encodedBodySize:s,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:d,redirectCount:p,startTime:f,transferSize:h,type:m}=t;if(0===o)return null;return{type:"".concat(e,".").concat(m),start:Yy(f),end:Yy(i),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:s,duration:o,domInteractive:l,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:d,domComplete:i,redirectCount:p}}}};function Gy(t,e){return n=>{let{metric:r}=n;e.replayPerformanceEntries.push(t(r))}}function Ky(t){const e=Jy[t.entryType];return e?e(t):null}function Yy(t){return((At()||ng.performance.timeOrigin)+t)/1e3}function $y(t){const e=t.entries[t.entries.length-1];return t_(t,"largest-contentful-paint",null!==e&&void 0!==e&&e.element?[e.element]:void 0)}function Xy(t){return void 0!==t.sources}function Zy(t){const e=[],n=[];for(const r of t.entries)if(Xy(r)){const t=[];for(const e of r.sources)if(e.node){n.push(e.node);
1const r=wy.mirror.getId(e.node);r&&t.push(r)}e.push({value:r.value,nodeIds:t.length?t:void 0})}return t_(t,"cumulative-layout-shift",n,e)}function Qy(t){const e=t.entries[t.entries.length-1];return t_(t,"interaction-to-next-paint",null!==e&&void 0!==e&&e.target?[e.target]:void 0)}function t_(t,e,n,r){const o=t.value,i=t.rating,s=Yy(o);return{type:"web-vital",name:e,start:s,end:s,data:{value:o,size:o,rating:i,nodeIds:n?n.map((t=>wy.mirror.getId(t))):void 0,attributions:r}}}const e_="undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;const n_=["log","warn","error"],r_="[Replay] ";function o_(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info";As({category:"console",data:{logger:"replay"},level:e,message:"".concat(r_).concat(t)},{level:e})}const i_=function(){let t=!1,e=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:n=>{t=!!n.captureExceptions,e=!!n.traceInternals}};return e_?(n_.forEach((t=>{n[t]=function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];_[t](r_,...r),e&&o_(r.join(""),Ps(t))}})),n.exception=function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];i.length&&n.error&&n.error(...i),_.error(r_,r),t?Ti(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):e&&o_(r,"error")},n.infoTick=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];_.log(r_,...n),e&&setTimeout((()=>o_(n[0])),0)}):n_.forEach((t=>{n[t]=()=>{}})),n}();class s_ extends Error{constructor(){super("Event buffer exceeded maximum size of ".concat(lg,"."))}}class a_{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const e=JSON.stringify(t).length;if(this._totalSize+=e,this._totalSize>lg)throw new s_;this.events.push(t)}finish(){return new Promise((t=>{const e=this.events;this.clear(),t(JSON.stringify(e))}))}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let t=null;for(const{timestamp:e}of this.events)(null===t||e<t)&&(t=e);return null===t?t:Ey(t)}}class c_{constructor(t){this._onMessage=t=>{let{data:e}=t;const n=e;if("number"!==typeof n.id)return;const r=this._pending.get(n.id);if(r&&r.method===n.method){if(this._pending.delete(n.id),!n.success)return e_&&i_.error("Error in compression worker: ",n.response),void r.reject(new Error("Error in compression worker"));r.resolve(n.response)}},this._worker=t,this._id=0,this._pending=new Map,this._worker.addEventListener("message",this._onMessage)}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise(((t,e)=>{this._worker.addEventListener("message",(n=>{let{data:r}=n;r.success?t():(e_&&i_.warn("Received worker message with unsuccessful status",r),e(new Error("Received worker message with unsuccessful status")))}),{once:!0}),this._worker.addEventListener("error",(t=>{e_&&i_.warn("Failed to load Replay compression worker",t),e(new Error("Failed to load Replay compression worker: ".concat(t instanceof ErrorEvent&&t.message?t.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(){e_&&i_.log("Destroying compression worker"),this._worker.removeEventListener("message",this._onMessage),this._pending.forEach((t=>t.reject(new Error("Worker destroyed")))),this._pending.clear(),this._worker.terminate()}postMessage(t,e){const n=this._getAndIncrementId();return new Promise(((r,o)=>{this._pending.set(n,{method:t,resolve:r,reject:o});try{this._worker.postMessage({id:n,method:t,arg:e})}catch(i){this._pending.delete(n),o(i)}}))}_getAndIncrementId(){return this._id++}}class l_{constructor(t){this._worker=new c_(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const e=Ey(t.timestamp);(!this._earliestTimestamp||e<this._earliestTimestamp)&&(this._earliestTimestamp=e);const n=JSON.stringify(t);return this._totalSize+=n.length,this._totalSize>lg?Promise.reject(new s_):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,(t=>{e_&&i_.exception(t,'Sending "clear" message to worker failed',t)}))}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class u_{constructor(t){this._fallback=new a_,this._compression=new l_(t),this._used=this._fallback,this._ensureWorkerIsLoadedProm
1ise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}set waitForCheckout(t){this._used.waitForCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){return void(e_&&i_.exception(t,"Failed to load the compression worker, falling back to simple buffer"))}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:e,waitForCheckout:n}=this._fallback,r=[];for(const i of t)r.push(this._compression.addEvent(i));this._compression.hasCheckout=e,this._compression.waitForCheckout=n,this._used=this._compression;try{await Promise.all(r),this._fallback.clear()}catch(o){e_&&i_.exception(o,"Failed to add events when switching buffers.")}}}function d_(t){let{useCompression:e,workerUrl:n}=t;if(e&&window.Worker){const t=function(t){try{const e=t||function(){if("undefined"===typeof __SENTRY_EXCLUDE_REPLAY_WORKER__||!__SENTRY_EXCLUDE_REPLAY_WORKER__)return function(){const t=new Blob(['
vendor: 10,329 bytes, line 1
1var 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});
1']);return URL.createObjectURL(t)}();return""}();if(!e)return;e_&&i_.log("Using compression worker".concat(t?" from ".concat(t):""));const n=new Worker(e);return new u_(n)}catch(e){e_&&i_.exception(e,"Failed to create compression worker")}}(n);if(t)return t}return e_&&i_.log("Using simple buffer"),new a_}function p_(){try{return"sessionStorage"in ng&&!!ng.sessionStorage}catch(t){return!1}}function f_(t){!function(){if(!p_())return;try{ng.sessionStorage.removeItem(rg)}catch(t){}}(),t.session=void 0}function h_(t){return void 0!==t&&Math.random()<t}function m_(t){if(p_())try{ng.sessionStorage.setItem(rg,JSON.stringify(t))}catch(e){}}function g_(t){const e=Date.now();return{id:t.id||ft(),started:t.started||e,lastActivity:t.lastActivity||e,segmentId:t.segmentId||0,sampled:t.sampled,previousSessionId:t.previousSessionId,dirty:t.dirty||!1}}function v_(t){let{sessionSampleRate:e,allowBuffering:n,stickySession:r=!1}=t,{previousSessionId:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=function(t,e){return h_(t)?"session":!!e&&"buffer"}(e,n),s=g_({sampled:i,previousSessionId:o});return r&&m_(s),s}function y_(t,e){return null===t||void 0===e||e<0||0!==e&&t+e<=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:+new Date)}function __(t,e){let{sessionIdleExpire:n,maxReplayDuration:r}=e;return!!function(t,e){let{maxReplayDuration:n,sessionIdleExpire:r,targetTime:o=Date.now()}=e;return y_(t.started,n,o)||y_(t.lastActivity,r,o)}(t,{sessionIdleExpire:n,maxReplayDuration:r})&&("buffer"!==t.sampled||0!==t.segmentId)}function b_(t,e){let{sessionIdleExpire:n,maxReplayDuration:r,previousSessionId:o}=t;const i=e.stickySession&&function(){if(!p_())return null;try{const t=ng.sessionStorage.getItem(rg);if(!t)return null;const e=JSON.parse(t);return e_&&i_.infoTick("Loading existing session"),g_(e)}catch(t){return null}}();return i?__(i,{sessionIdleExpire:n,maxReplayDuration:r})?(e_&&i_.infoTick("Session in sessionStorage is expired, creating new one..."),v_(e,{previousSessionId:i.id})):i:(e_&&i_.infoTick("Creating new session"),v_(e,{previousSessionId:o}))}function S_(t,e,n){return!!w_(t,e)&&(k_(t,e,n),!0)}async function k_(t,e,n){const{eventBuffer:r}=t;if(!r||r.waitForCheckout&&!n)return null;const o="buffer"===t.recordingMode;try{n&&o&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const i=function(t,e){try{if("function"===typeof e&&function(t){return t.type===Iv.Custom}(t))return e(t)}catch(n){return e_&&i_.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return t}(e,t.getOptions().beforeAddRecordingEvent);if(!i)return;return await r.addEvent(i)}catch(i){const e=i&&i instanceof s_,n=e?"eventBufferOverflow":"eventBufferError",s=$t();if(s){const t=e?"buffer_overflow":"internal_sdk_error";s.recordDroppedEvent(t,"replay")}if(e&&o)return r.clear(),r.waitForCheckout=!0,null;t.handleException(i),await t.stop({reason:n})}}function w_(t,e){if(!t.eventBuffer||t.isPaused()||!t.isEnabled())return!1;const n=Ey(e.timestamp);return!(n+t.timeouts.sessionIdlePause<Date.now())&&(!(n>t.getContext().initialTimestamp+t.getOptions().maxReplayDuration)||(e_&&i_.infoTick("Skipping event with timestamp ".concat(n," because it is after maxReplayDuration")),!1))}function A_(t){return!t.type}function x_(t){return"transaction"===t.type}function E_(t){return"feedback"===t.type}function T_(t){return(e,n)=>{if(!t.isEnabled()||!A_(e)&&!x_(e))return;const r=n.statusCode;!r||r<200||r>=300||(x_(e)?function(t,e){var n;const r=t.getContext();null!==(n=e.contexts)&&void 0!==n&&null!==(n=n.trace)&&void 0!==n&&n.trace_id&&r.traceIds.size<100&&r.traceIds.add(e.contexts.trace.trace_id)}(t,e):function(t,e){var n;const r=t.getContext();e.event_id&&r.errorIds.size<100&&r.errorIds.add(e.event_id);if("buffer"!==t.recordingMode||null===(n=e.tags)||void 0===n||!n.replayId)return;const{beforeErrorSampling:o}=t.getOptions();if("function"===typeof o&&!o(e))return;Yp((async()=>{try{await t.sendBufferedReplayOrFlush()}catch(Cx){t.handleException(Cx)}}))}(t,e))}}function I_(t){return e=>{t.isEnabled()&&A_(e)&&function(t,e){var n;const r=null===(n=e.exception)||void 0===n||null===(n=n.values)||void 0===n||null===(n=n[0])||void 0===n?void 0:n.value;if("string"!==typeof r)return;if(r.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||r.match(/(does not match server-rendered HTML|Hydration failed because)/i)){Iy(t,By({category:"replay.hydrate-error",data:{url:te()}}))}}(t,e)}}function C_(t){const e=$t();e&&e.on("beforeAddBreadcrumb",(e=>function(t,e){if(!t.isEnabled()||!R_(e))return;const n=function(t){if(!R_(t)||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui."))return null;if("console"===t.category)return function(t){var e;const n=null===(e=t.data)||void 0===e?void 0:e.arguments;if(!Array.isArray(n)||0===n.length)return By(t);let r=!1;const o=n.map((t=>{if(!t)return t;if("string"===typeof t)return t.length>cg?(r=!0,"".concat(t.slice(0,cg),"\u2026")):t;if("object"===typeof t)try{const e=ot(t,7);return JSON.stringify(e).length>cg?(r=!0,"".concat(JSON.stringify(e,null,2).slice(0,cg),"\u2026")):e}catch(e){}return t}));return By((0,s.A)((0,s.A)({},t),{},{data:(0,s.A)((0,s.A)({},t.data),{},{arguments:o},r?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{})}))}(t);return By(t)}(e);n&&Iy(t,n)}(t,e)))}function R_(t){return!!t.category}function M_(){const t=Vt().getPropagationContext().dsc;t&&delete t.replay_id;const e=di();if(e){delete yi(e).replay_id}}function O_(t){const e=Vt().getPropagationContext().dsc;e&&(e.replay_id=t);const n=di();if(n){yi(n).replay_id=t}}function P_(t){return Object.assign(((e,n)=>{var r;if(t.session&&__(t.session,{maxReplayDuration:t.getOptions().maxReplayDuration,sessionIdleExpire:t.timeouts.sessionIdleExpire})&&M_(),!t.isEnabled()||t.isPaused())return e;if(function(t){return"replay_event"===t.type}(e))return delete e.breadcrumbs,e;if(!A_(e)&&!x_(e)&&!E_(e))return e;if(!t.checkAndHandleExpiredSession())return M_(),e;if(E_(e))return t.flush(),e.contexts.feedback.replay_id=t.getSessionId(),function(t,e){t.triggerUserActivity(),t.addUpdate((()=>!e.timestamp||(t.throttledAddEvent({type:Iv.Custom,timestamp:1e3*e.timestamp,data:{tag:"breadcrumb",payload:{timestamp:e.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:e.event_id}}}}),!1)))}(t,e),e;if(function(t,e){var n,r;return!(t.type||null===(n=t.exception)||void 0===n||null===(n=n.values)||void 0===n||!n.length)&&!(null===(r=e.originalException)||void 0===r||!r.__rrweb__)}(e,n)&&!t.getOptions()._experiments.captureExceptions)return e_&&i_.log("Ignoring error from rrweb internals",e),null;const o=function(t,e){return"buffer"===t.recordingMode&&e.message!==og&&!(!e.exception||e.type)&&h_(t.getOptions().errorSampleRate)}(t,e);if((o||"session"===t.recordingMode)&&(e.tags=(0,s.A)((0,s.A)({},e.tags),{},{replayId:t.getSessionId()})),o&&"buffer"===t.recordingMode&&"buffer"===(null===(r=t.session)||void 0===r?void 0:r.sampled)){const e=t.session;e.dirty=!0,t.getOptions().stickySession&&m_(e)}return e}),{id:"Replay"})}function N_(t,e){return e.map((e=>{let{type:n,start:r,end:o,name:i,data:s}=e;const a=t.throttledAddEvent({type:Iv.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:i,startTimestamp:r,endTimestamp:o,data:s}}});return"string"===typeof a?Promise.resolve(null):a}))}function L_(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{from:e,to:n}=t,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:e}}}(e);null!==n&&(t.getContext().urls.push(n.name),t.triggerUserActivity(),t.addUpdate((()=>(N_(t,[n]),!1))))}}function D_(t,e){t.isEnabled()&&null!==e&&(function(t,e){return(!e_||!t.getOptions()._experiments.traceInternals)&&Nh(e,$t())}(t,e.name)||t.addUpdate((()=>(N_(t,[e]),!0))))}function F_(t){if(!t)return;const e=new TextEncoder;try{if("string"===typeof t)return e.encode(t).length;if(t instanceof URLSearchParams)return e.encode(t.toString()).length;if(t instanceof FormData){const n=Jh(t);return e.encode(n).length}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength}catch(n){}}function j_(t){if(!t)return;const e=parseInt(t,10);return isNaN(e)?void 0:e}function B_(t,e){if(!t)return{headers:{},size:void 0,_meta:{warnings:[e]}};const n=(0,s.A)({},t._meta),r=n.warnings||[];return n.warnings=[...r,e],t._meta=n,t}function U_(t,e){if(!e)return null;const{startTimestamp:n,endTimestamp:r,url:o,method:i,statusCode:s,request:a,response:c}=e;return{type:t,start:n/1e3,end:r/1e3,name:o,data:{method:i,statusCode:s,request:a,response:c}}}function q_(t){return{headers:{},size:t,_meta:{warnings:["URL_SKIPPED"]}}}function W_(t,e,n){if(!e&&0===Object.keys(t).length)return;if(!e)return{headers:t};if(!n)return{headers:t,size:e};const r={headers:t,size:e},{body:o,warnings:i}=function(t){if(!t||"string"!==typeof t)return{body:t};const e=t.length>ag,n=function(t){const e=t[0],n=t[t.length-1];return"["===e&&"]"===n||"{"===e&&"}"===n}(t);if(e){const e=t.slice(0,ag);return n?{body:e,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:"".concat(e,"\u2026"),warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(t)}}catch(r){}return{body:t}}(n);return r.body=o,null!==i&&void 0!==i&&i.length&&(r._meta={warnings:i}),r}function z_(t,e){return Object.entries(t).reduce(((n,r)=>{let[o,i]=r;const s=o.toLowerCase();return e.includes(s)&&t[o]&&(n[s]=i),n}),{})}function H_(t,e){const n=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ng.document.baseURI;if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith(ng.location.origin))return t;const n=new URL(t,e);if(n.origin!==new URL(e).origin)return t;const r=n.href;if(!t.endsWith("/")&&r.endsWith("/"))return r.slice(0,-1);return r}(t);return pt(n,e)}async function V_(t,e,n){try{const r=await async function(t,e,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:i=r}=e,{url:s,method:a,status_code:c=0,request_body_size:l,response_body_size:u}=t.data,d=H_(s,n.networkDetailAllowUrls)&&!H_(s,n.networkDetailDenyUrls),p=d?function(t,e,n){let{networkCaptureBodies:r,networkRequestHeaders:o}=t;const i=e?function(t,e){if(1===t.length&&"string"!==typeof t[0])return G_(t[0],e);if(2===t.length)return G_(t[1],e);return{}}(e,o):{};if(!r)return W_(i,n,void 0);const s=Kh(e),[a,c]=Gh(s,i_),l=W_(i,n,a);if(c)return B_(l,c);return l}(n,e.input,l):q_(l),f=await async function(t,e,n,r){let{networkCaptureBodies:o,networkResponseHeaders:i}=e;if(!t&&void 0!==r)return q_(r);const s=n?J_(n.headers,i):{};if(!n||!o&&void 0!==r)return W_(s,r,void 0);const[a,c]=await async function(t){const e=function(t){try{return t.clone()}catch(e){e_&&i_.exception(e,"Failed to clone response body")}}(t);if(!e)return[void 0,"BODY_PARSE_ERROR"];try{const t=await function(t){return new Promise(((e,n)=>{const r=Yp((()=>n(new Error("Timeout while trying to read response body"))),500);(async function(t){return await t.text()})(t).then((t=>e(t)),(t=>n(t))).finally((()=>clearTimeout(r)))}))}(e);return[t]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(e_&&i_.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(e_&&i_.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}(n),l=function(t,e){let{networkCaptureBodies:n,responseBodySize:r,captureDetails:o,headers:i}=e;try{const e=null!==t&&void 0!==t&&t.length&&void 0===r?F_(t):r;return o?W_(i,e,n?t:void 0):q_(e)}catch(s){return e_&&i_.exception(s,"Failed to serialize response body"),W_(i,r,void 0)}}(a,{networkCaptureBodies:o,responseBodySize:r,captureDetails:t,headers:s});if(c)return B_(l,c);return l}(d,n,e.response,u);return{startTimestamp:o,endTimestamp:i,url:s,method:a,statusCode:c,request:p,response:f}}(t,e,n),o=U_("resource.fetch",r);D_(n.replay,o)}catch(r){e_&&i_.exception(r,"Failed to capture fetch breadcrumb")}}function J_(t,e){const n={};return e.forEach((e=>{t.get(e)&&(n[e]=t.get(e))})),n}function G_(t,e){if(!t)return{};const n=t.headers;return n?n instanceof Headers?J_(n,e):Array.isArray(n)?{}:z_(n,e):{}}async function K_(t,e,n){try{const r=function(t,e,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:i=r,input:s,xhr:a}=e,{url:c,method:l,status_code:u=0,request_body_size:d,response_body_size:p}=t.data;if(!c)return null;if(!a||!H_(c,n.networkDetailAllowUrls)||H_(c,n.networkDetailDenyUrls)){return{startTimestamp:o,endTimestamp:i,url:c,method:l,statusCode:u,request:q_(d),response:q_
1(p)}}const f=a[qf],h=f?z_(f.request_headers,n.networkRequestHeaders):{},m=z_(Yh(a),n.networkResponseHeaders),[g,v]=n.networkCaptureBodies?Gh(s,i_):[void 0],[y,_]=n.networkCaptureBodies?function(t){const e=[];try{return[t.responseText]}catch(qn){e.push(qn)}try{return function(t,e){try{if("string"===typeof t)return[t];if(t instanceof Document)return[t.body.outerHTML];if("json"===e&&t&&"object"===typeof t)return[JSON.stringify(t)];if(!t)return[void 0]}catch(n){return e_&&i_.exception(n,"Failed to serialize body",t),[void 0,"BODY_PARSE_ERROR"]}return e_&&i_.log("Skipping network body because of body type",t),[void 0,"UNPARSEABLE_BODY_TYPE"]}(t.response,t.responseType)}catch(qn){e.push(qn)}return e_&&i_.warn("Failed to get xhr response body",...e),[void 0]}(a):[void 0],b=W_(h,d,g),S=W_(m,p,y);return{startTimestamp:o,endTimestamp:i,url:c,method:l,statusCode:u,request:v?B_(b,v):b,response:_?B_(S,_):S}}(t,e,n),o=U_("resource.xhr",r);D_(n.replay,o)}catch(r){e_&&i_.exception(r,"Failed to capture xhr breadcrumb")}}function Y_(t,e){const{xhr:n,input:r}=e;if(!n)return;const o=F_(r),i=n.getResponseHeader("content-length")?j_(n.getResponseHeader("content-length")):function(t,e){try{return F_("json"===e&&t&&"object"===typeof t?JSON.stringify(t):t)}catch(n){return}}(n.response,n.responseType);void 0!==o&&(t.data.request_body_size=o),void 0!==i&&(t.data.response_body_size=i)}function $_(t){const e=$t();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:i,networkResponseHeaders:s}=t.getOptions(),a={replay:t,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:i,networkResponseHeaders:s};e&&e.on("beforeAddBreadcrumb",((t,e)=>function(t,e,n){if(!e.data)return;try{(function(t){return"xhr"===t.category})(e)&&function(t){return null===t||void 0===t?void 0:t.xhr}(n)&&(Y_(e,n),K_(e,n,t)),function(t){return"fetch"===t.category}(e)&&function(t){return void 0!==(null===t||void 0===t?void 0:t.input)}(n)&&(!function(t,e){const{input:n,response:r}=e,o=F_(n?Kh(n):void 0),i=r?j_(r.headers.get("content-length")):void 0;void 0!==o&&(t.data.request_body_size=o),void 0!==i&&(t.data.response_body_size=i)}(e,n),V_(e,n,t))}catch(qn){e_&&i_.exception(qn,"Error when enriching network breadcrumb")}}(a,t,e)))}catch(n){}}function X_(t){const{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}=t,o=Date.now()/1e3;return{type:"memory",name:"memory",start:o,end:o,data:{memory:{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}}}}function Z_(t,e,n){return function(t,e,n){let r,o,i;const s=null!==n&&void 0!==n&&n.maxWait?Math.max(n.maxWait,e):0,a=(null===n||void 0===n?void 0:n.setTimeoutImpl)||setTimeout;function c(){return l(),r=t(),r}function l(){void 0!==o&&clearTimeout(o),void 0!==i&&clearTimeout(i),o=i=void 0}function u(){return o&&clearTimeout(o),o=a(c,e),s&&void 0===i&&(i=a(c,s)),r}return u.cancel=l,u.flush=function(){return void 0!==o||void 0!==i?c():r},u}(t,e,(0,s.A)((0,s.A)({},n),{},{setTimeoutImpl:Yp}))}const Q_=a.navigator;function tb(t){let e=!1;return(n,r)=>{if(!t.checkAndHandleExpiredSession())return void(e_&&i_.warn("Received replay event after session expired."));const o=r||!e;e=!0,function(t){const e=t.data;if(t.type!==Iv.IncrementalSnapshot||!e||"object"!==typeof e||!("source"in e)||e.source!==Cv.Mutation||!("attributes"in e)||!Array.isArray(e.attributes))return;for(const n of e.attributes){const t=wy.mirror.getNode(n.id),e=t&&wy.mirror.getMeta(t);if((null===e||void 0===e?void 0:e.type)===Uy.Element)for(const[r,o]of Object.entries(n.attributes))null===o?delete e.attributes[r]:e.attributes[r]=o}}(n),t.clickDetector&&jy(t.clickDetector,n),t.addUpdate((()=>{if("buffer"===t.recordingMode&&o&&t.setInitialState(),!S_(t,n,o))return!0;if(!o)return!1;const e=t.session;if(function(t,e){var n;if(!e||0!==(null===(n=t.session)||void 0===n?void 0:n.segmentId))return;S_(t,function(t){const e=t.getOptions();return{type:Iv.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:t.isRecordingCanvas(),sessionSampleRate:e.sessionSampleRate,errorSampleRate:e.errorSampleRate,useCompressionOption:e.useCompression,blockAllMedia:e.blockAllMedia,maskAllText:e.maskAllText,maskAllInputs:e.maskAllInputs,useCompression:!!t.eventBuffer&&"worker"===t.eventBuffer.type,networkDetailHasUrls:e.networkDetailAllowUrls.length>0,networkCaptureBodies:e.networkCaptureBodies,networkRequestHasHeaders:e.networkRequestHeaders.length>0,networkResponseHasHeaders:e.networkResponseHeaders.length>0}}}}(t),!1)}(t,o),"buffer"===t.recordingMode&&e&&t.eventBuffer&&!e.dirty){const n=t.eventBuffer.getEarliestTimestamp();n&&(e_&&i_.log("Updating session start time to earliest event in buffer to ".concat(new Date(n))),e.started=n,t.getOptions().stickySession&&m_(e))}return null!==e&&void 0!==e&&e.previousSessionId||"session"===t.recordingMode&&t.flush(),!0}))}}async function eb(t){let{recordingData:e,replayId:n,segmentId:r,eventContext:o,timestamp:i,session:a}=t;const c=function(t){let e,{recordingData:n,headers:r}=t;const o="".concat(JSON.stringify(r),"\n");if("string"===typeof n)e="".concat(o).concat(n);else{const t=(new TextEncoder).encode(o);e=new Uint8Array(t.length+n.length),e.set(t),e.set(n,t.length)}return e}({recordingData:e,headers:{segment_id:r}}),{urls:l,errorIds:u,traceIds:d,initialTimestamp:p}=o,f=$t(),h=Vt(),m=null===f||void 0===f?void 0:f.getTransport(),g=null===f||void 0===f?void 0:f.getDsn();if(!f||!m||!g||!a.sampled)return Promise.resolve({});const v={type:"replay_event",replay_start_timestamp:p/1e3,timestamp:i/1e3,error_ids:u,trace_ids:d,urls:l,replay_id:n,segment_id:r,replay_type:a.sampled},y=await async function(t){let{client:e,scope:n,replayId:r,event:o}=t;const i={event_id:r,integrations:"object"!==typeof e._integrations||null===e._integrations||Array.isArray(e._integrations)?void 0:Object.keys(e._integrations)};e.emit("preprocessEvent",o,i);const a=await Ai(e.getOptions(),o,i,n,e,Jt());if(!a)return null;e.emit("postprocessEvent",a,i),a.platform=a.platform||"javascript";
1const c=e.getSdkMetadata(),{name:l,version:u,settings:d}=(null===c||void 0===c?void 0:c.sdk)||{};return a.sdk=(0,s.A)((0,s.A)({},a.sdk),{},{name:l||"sentry.javascript.unknown",version:u||"0.0.0",settings:d}),a}({scope:h,client:f,replayId:n,event:v});if(!y)return f.recordDroppedEvent("event_processor","replay"),e_&&i_.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete y.sdkProcessingMetadata;const _=function(t,e,n,r){return as(_s(t,ys(t),r,n),[[{type:"replay_event"},t],[{type:"replay_recording",length:"string"===typeof e?(new TextEncoder).encode(e).length:e.length},e]])}(y,c,g,f.getOptions().tunnel);let b;try{b=await m.send(_)}catch(Cx){const e=new Error(og);try{e.cause=Cx}catch(k){}throw e}const S=kl({},b);if(Sl(S,"replay"))throw new rb(S);if("number"===typeof b.statusCode&&(b.statusCode<200||b.statusCode>=300))throw new nb(b.statusCode);return b}class nb extends Error{constructor(t){super("Transport returned status code ".concat(t))}}class rb extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}class ob extends Error{constructor(){super("Session is too long, not sending replay")}}async function ib(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{count:0,interval:5e3};const{recordingData:n,onError:r}=t;if(n.length)try{return await eb(t),!0}catch(Cx){if(Cx instanceof nb||Cx instanceof rb)throw Cx;if(Ri("Replays",{_retryCount:e.count}),r&&r(Cx),e.count>=3){const t=new Error("".concat(og," - max retries exceeded"));try{t.cause=Cx}catch(o){}throw t}return e.interval*=++e.count,new Promise(((n,r)=>{Yp((async()=>{try{await ib(t,e),n(!0)}catch(o){r(o)}}),e.interval)}))}}const sb="__THROTTLED";function ab(t,e,n){const r=new Map;let o=!1;return function(){const i=Math.floor(Date.now()/1e3);if((t=>{const e=t-n;r.forEach(((t,n)=>{n<e&&r.delete(n)}))})(i),[...r.values()].reduce(((t,e)=>t+e),0)>=e){const t=o;return o=!0,t?"__SKIPPED":sb}o=!1;const s=r.get(i)||0;return r.set(i,s+1),t(...arguments)}}class cb{constructor(t){let{options:e,recordingOptions:n}=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=n,this._options=e,this._debouncedFlush=Z_((()=>this._flush()),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=ab(((t,e)=>function(t,e,n){return w_(t,e)?k_(t,e,n):Promise.resolve(null)}(this,t,e)),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:o}=this.getOptions(),i=r?{threshold:Math.min(3e3,r),timeout:r,scrollTimeout:300,ignoreSelector:o?o.join(","):""}:void 0;if(i&&(this.clickDetector=new Ly(this,i)),e_){const t=e._experiments;i_.setConfig({captureExceptions:!!t.captureExceptions,traceInternals:!!t.traceInternals})}this._handleVisibilityChange=()=>{"visible"===ng.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const t=By({category:"ui.blur"});this._doChangeToBackgroundTasks(t)},this._handleWindowFocus=()=>{const t=By({category:"ui.focus"});this._doChangeToForegroundTasks(t)},this._handleKeyboardEvent=t=>{Vy(this,t)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return Boolean(this._canvas)}getOptions(){return this._options}handleException(t){e_&&i_.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){const{errorSampleRate:e,sessionSampleRate:n}=this._options,r=e<=0&&n<=0;this._requiresManualStart=r,r||(this._initializeSessionForSampling(t),this.session?!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",e_&&i_.infoTick("Starting replay in ".concat(this.recordingMode," mode")),this._initializeRecording()):e_&&i_.exception(new Error("Unable to initialize and create session")))}
1start(){if(this._isEnabled&&"session"===this.recordingMode)return void(e_&&i_.log("Recording is already in progress"));if(this._isEnabled&&"buffer"===this.recordingMode)return void(e_&&i_.log("Buffering is in progress, call `flush()` to save the replay"));e_&&i_.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=b_({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled)return void(e_&&i_.log("Buffering is in progress, call `flush()` to save the replay"));e_&&i_.infoTick("Starting replay in buffer mode");const t=b_({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=wy((0,s.A)((0,s.A)((0,s.A)((0,s.A)({},this._recordingOptions),"buffer"===this.recordingMode?{checkoutEveryNms:6e4}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)}),{},{emit:tb(this)},function(){var t,e;return/iPhone|iPad|iPod/i.test(null!==(t=null===Q_||void 0===Q_?void 0:Q_.userAgent)&&void 0!==t?t:"")||/Macintosh/i.test(null!==(e=null===Q_||void 0===Q_?void 0:Q_.userAgent)&&void 0!==e?e:"")&&null!==Q_&&void 0!==Q_&&Q_.maxTouchPoints&&(null===Q_||void 0===Q_?void 0:Q_.maxTouchPoints)>1?{sampling:{mousemove:!1}}:{}}()),{},{onMutation:this._onMutationHandler.bind(this)},t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}))}catch(Cx){this.handleException(Cx)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(Cx){return this.handleException(Cx),!1}}async stop(){var t,e;let{forceFlush:n=!1,reason:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this._isEnabled)return;this._isEnabled=!1,this.recordingMode="buffer";const o=null!==r&&void 0!==r?r:"manual";null===(t=$t())||void 0===t||t.emit("replayEnd",{sessionId:null===(e=this.session)||void 0===e?void 0:e.id,reason:o});try{var i;e_&&i_.log("Stopping Replay triggered by ".concat(o)),M_(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),n&&await this._flush({force:!0}),null===(i=this.eventBuffer)||void 0===i||i.destroy(),this.eventBuffer=null,f_(this)}catch(Cx){this.handleException(Cx)}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),e_&&i_.log("Pausing replay"))}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),e_&&i_.log("Resuming replay"))}async sendBufferedReplayOrFlush(){let{continueRecording:t=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("session"===this.recordingMode)return this.flushImmediate();const e=Date.now();e_&&i_.log("Converting buffer to session"),await this.flushImmediate();const n=this.stopRecording();t&&n&&"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,this._updateUserActivity(e),this._updateSessionActivity(e),this._maybeSaveSession(),O_(this.session.id)),this.startRecording())}addUpdate(t){const e=t();"buffer"!==this.recordingMode&&this._isEnabled&&!0!==e&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._checkSession())return;this.resume()}}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(t){var e,n;if(!t||!1!==(null===(e=this.session)||void 0===e?void 0:e.sampled))return null===(n=this.session)||void 0===n?void 0:n.id}
1checkAndHandleExpiredSession(){var t;if(!this._lastActivity||!y_(this._lastActivity,this.timeouts.sessionIdlePause)||"session"!==(null===(t=this.session)||void 0===t?void 0:t.sampled))return!!this._checkSession();this.pause()}setInitialState(){const t="".concat(ng.location.pathname).concat(ng.location.hash).concat(ng.location.search),e="".concat(ng.location.origin).concat(t);this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=e,this._context.initialTimestamp=Date.now(),this._context.urls.push(e)}throttledAddEvent(t,e){const n=this._throttledAddEvent(t,e);if(n===sb){const t=By({category:"replay.throttled"});this.addUpdate((()=>!S_(this,{type:5,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t,metric:!0}})))}return n}getCurrentRoute(){const t=this.lastActiveSpan||di(),e=t&&li(t),n=(e&&$o(e).data||{})[Nr];if(e&&n&&["route","custom"].includes(n))return $o(e).description}_initializeRecording(){var t;(this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=d_({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.session)&&(null===(t=$t())||void 0===t||t.emit("replayStart",{sessionId:this.session.id,recordingMode:this.recordingMode}));this.startRecording(),"session"===this.recordingMode&&this.session&&O_(this.session.id)}_initializeSessionForSampling(t){const e=this._options.errorSampleRate>0,n=b_({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:e});this.session=n}_checkSession(){if(!this.session)return!1;const t=this.session;return!__(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(t),!1)}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"sessionExpired"}),this.initializeSampling(t.id))}_addListeners(){try{ng.document.addEventListener("visibilitychange",this._handleVisibilityChange),ng.addEventListener("blur",this._handleWindowBlur),ng.addEventListener("focus",this._handleWindowFocus),ng.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(!function(t){const e=$t();jf(zy(t)),Vf(L_(t)),C_(t),$_(t),Wi(P_(t)),e&&(e.on("beforeSendEvent",I_(t)),e.on("afterSendEvent",T_(t)),e.on("createDsc",(e=>{const n=t.getSessionId();n&&t.isEnabled()&&"session"===t.recordingMode&&t.checkAndHandleExpiredSession()&&(e.replay_id=n)})),e.on("spanStart",(e=>{t.lastActiveSpan=e})),e.on("spanEnd",(e=>{t.lastActiveSpan=e})),e.on("beforeSendFeedback",(async(e,n)=>{var r;const o=t.getSessionId();null!==n&&void 0!==n&&n.includeReplay&&t.isEnabled()&&o&&null!==(r=e.contexts)&&void 0!==r&&r.feedback&&("api"===e.contexts.feedback.source&&await t.sendBufferedReplayOrFlush(),e.contexts.feedback.replay_id=o)})),e.on("openFeedbackWidget",(async()=>{await t.sendBufferedReplayOrFlush()})))}(this),this._hasInitializedCoreListeners=!0)}catch(Cx){this.handleException(Cx)}this._performanceCleanupCallback=function(t){function e(e){t.performanceEntries.includes(e)||t.performanceEntries.push(e)}function n(t){let{entries:n}=t;n.forEach(e)}const r=[];return["navigation","paint","resource"].forEach((t=>{r.push(Gm(t,n))})),r.push(Vm(Gy($y,t)),Hm(Gy(Zy,t)),Jm(Gy(Qy,t))),()=>{r.forEach((t=>t()))}}(this)}_removeListeners(){try{ng.document.removeEventListener("visibilitychange",this._handleVisibilityChange),ng.removeEventListener("blur",this._handleWindowBlur),ng.removeEventListener("focus",this._handleWindowFocus),ng.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(Cx){this.handleException(Cx)}}_doChangeToBackgroundTasks(t){if(!this.session)return;__(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})?M_():(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;this.checkAndHandleExpiredSession()?t&&this._createCustomBreadcrumb(t):e_&&i_.log("Document has become active, but session has expired")}_updateUserActivity(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now();this._lastActivity=t}_updateSessionActivity(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now();this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate((()=>{this.throttledAddEvent({type:Iv.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}}
1)}))}_addPerformanceEntries(){let t=(e=this.performanceEntries,e.map(Ky).filter(Boolean)).concat(this.replayPerformanceEntries);var e;if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const e=this._context.initialTimestamp/1e3;t=t.filter((t=>t.start>=e))}return Promise.all(N_(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:e}=this;if(!t||!e||this._requiresManualStart)return;if(t.segmentId)return;const n=e.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){var t;const e=this.getSessionId();if(this.session&&this.eventBuffer&&e){if(await this._addPerformanceEntries(),null!==(t=this.eventBuffer)&&void 0!==t&&t.hasEvents&&(await async function(t){try{return Promise.all(N_(t,[X_(ng.performance.memory)]))}catch(e){return[]}}(this),this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new ob;const n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession();const o=await this.eventBuffer.finish();await ib({replayId:e,recordingData:o,segmentId:r,eventContext:n,session:this.session,timestamp:t,onError:t=>this.handleException(t)})}catch(Cx){this.handleException(Cx),this.stop({reason:"sendError"});const e=$t();if(e){let n;n=Cx instanceof rb?"ratelimit_backoff":Cx instanceof ob?"invalid":"send_error",e.recordDroppedEvent(n,"replay")}}}else e_&&i_.error("No session or eventBuffer found to flush.")}async _flush(){let{force:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession())return void(e_&&i_.error("Attempting to finish replay event after session expired."));if(!this.session)return;const e=this.session.started,n=Date.now()-e;this._debouncedFlush.cancel();const r=n<this._options.minReplayDuration,o=n>this._options.maxReplayDuration+5e3;if(r||o)return e_&&i_.log("Session duration (".concat(Math.floor(n/1e3),"s) is too ").concat(r?"short":"long",", not sending replay.")),void(r&&this._debouncedFlush());const i=this.eventBuffer;i&&0===this.session.segmentId&&!i.hasCheckout&&e_&&i_.log("Flushing initial segment without checkout.");const s=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(Cx){this.handleException(Cx)}finally{this._flushLock=void 0,s&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&m_(this.session)}_onMutationHandler(t){const{ignoreMutations:e}=this._options._experiments;if(null!==e&&void 0!==e&&e.length&&t.some((t=>{const n=function(t){if(!t)return null;try{return t.nodeType===t.ELEMENT_NODE?t:t.parentElement}catch(e){return null}}(t.target),r=e.join(",");return null===n||void 0===n?void 0:n.matches(r)})))return!1;const n=t.length,r=this._options.mutationLimit,o=r&&n>r;if(n>this._options.mutationBreadcrumbLimit||o){const t=By({category:"replay.mutations",data:{count:n,limit:o}});this._createCustomBreadcrumb(t)}return!o||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}function lb(t,e){return[...t,...e].join(",")}const ub='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',db=["content-length","content-type","accept"],pb=Symbol.for("sentry__originalRequestBody");let fb=!1,hb=!1;const mb=t=>new gb(t);class gb{constructor(){let{flushMinDelay:t=ig,flushMaxDelay:e=sg,minReplayDuration:n=ug,maxReplayDuration:r=dg,stickySession:o=!0,useCompression:i=!0,workerUrl:a,_experiments:c={},maskAllText:l=!0,maskAllInputs:u=!0,blockAllMedia:d=!0,mutationBreadcrumbLimit:p=750,mutationLimit:f=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:g=[],networkDetailDenyUrls:v=[],networkCaptureBodies:y=!0,networkRequestHeaders:_=[],networkResponseHeaders:b=[],mask:S=[],maskAttributes:k=["title","placeholder","aria-label"],unmask:w=[],block:A=[],unblock:x=[],ignore:E=[],maskFn:T,beforeAddRecordingEvent:I,beforeErrorSampling:C,onError:R,attachRawBodyFromRequest:M=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.name="Replay";const O=function(t){let{mask:e,unmask:n,block:r,unblock:o,ignore:i}=t;return{maskTextSelector:lb(e,[".sentry-mask","[data-sentry-mask]"]),unmaskTextSelector:lb(n,[]),blockSelector:lb(r,[".sentry-block","[data-sentry-block]","base","iframe[srcdoc]:not
1([src])"]),unblockSelector:lb(o,[]),ignoreSelector:lb(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}({mask:S,unmask:w,block:A,unblock:x,ignore:E});if(this._recordingOptions=(0,s.A)((0,s.A)({maskAllInputs:u,maskAllText:l,maskInputOptions:{password:!0},maskTextFn:T,maskInputFn:T,maskAttributeFn:(t,e,n)=>function(t){let{el:e,key:n,maskAttributes:r,maskAllText:o,privacyOptions:i,value:s}=t;if(i.unmaskTextSelector&&e.matches(i.unmaskTextSelector))return s;const a=r.includes(n),c=o&&"value"===n&&"INPUT"===e.tagName&&["submit","button"].includes(e.getAttribute("type")||"");return a||c?s.replace(/[\S]/g,"*"):s}({maskAttributes:k,maskAllText:l,privacyOptions:O,key:t,value:e,el:n})},O),{},{slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:t=>{try{t.__rrweb__=!0}catch(e){}},recordCrossOriginIframes:Boolean(c.recordCrossOriginIframes)}),this._initialOptions={flushMinDelay:t,flushMaxDelay:e,minReplayDuration:Math.min(n,5e4),maxReplayDuration:Math.min(r,dg),stickySession:o,useCompression:i,workerUrl:a,blockAllMedia:d,maskAllInputs:u,maskAllText:l,mutationBreadcrumbLimit:p,mutationLimit:f,slowClickTimeout:h,slowClickIgnoreSelectors:m,networkDetailAllowUrls:g,networkDetailDenyUrls:v,networkCaptureBodies:y,networkRequestHeaders:vb(_),networkResponseHeaders:vb(b),beforeAddRecordingEvent:I,beforeErrorSampling:C,onError:R,attachRawBodyFromRequest:M,_experiments:c},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?"".concat(this._recordingOptions.blockSelector,",").concat(ub):ub,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&ce())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return fb}set _isInitialized(t){fb=t}afterAllSetup(t){ce()&&!this._replay&&(this._initialOptions.attachRawBodyFromRequest&&function(){if("undefined"===typeof Request||hb)return;const t=Request;try{const e=function(e,n){const r=new t(e,n);return null!=(null===n||void 0===n?void 0:n.body)&&(r[pb]=n.body),r};e.prototype=t.prototype,a.Request=e,hb=!0}catch(e){}}(),this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:"session"===this._replay.recordingMode,reason:"manual"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(t){var e;if(null!==(e=this._replay)&&void 0!==e&&e.isEnabled())return this._replay.getSessionId(t)}getRecordingMode(){var t;if(null!==(t=this._replay)&&void 0!==t&&t.isEnabled())return this._replay.recordingMode}processSpan(t){const e=this.getReplayId(!0);e&&ih(t,{"sentry.replay_id":e})}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const e=function(t,e){const n=e.getOptions(),r=(0,s.A)({sessionSampleRate:0,errorSampleRate:0},t),o=Lo(n.replaysSessionSampleRate),i=Lo(n.replaysOnErrorSampleRate);null==o&&null==i&&m((()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}));null!=o&&(r.sessionSampleRate=o);null!=i&&(r.errorSampleRate=i);return r}(this._initialOptions,t);this._replay=new cb({options:e,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const e=t.getIntegrationByName("ReplayCanvas");if(!e)return;this._replay._canvas=e.getOptions()}catch(e){}}}function vb(t){return[...db,...t.map((t=>t.toLowerCase()))]}function yb(){const t=$t();return null===t||void 0===t?void 0:t.getIntegrationByName("Replay")}const _b=["type"];var bb=Object.defineProperty,Sb=(t,e,n)=>((t,e,n)=>e in t?bb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!==typeof e?e+"":e,n);class kb{constructor(){Sb(this,"idNodeMap",new Map),Sb(this,"nodeMetaMap",new WeakMap)}getId(t){var e;if(!t)return-1;const n=null===(e=this.getMeta(t))||void 0===e?void 0:e.id;return null!==n&&void 0!==n?n:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const e=this.getId(t);
1this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach((t=>this.removeNodeFromMap(t)))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){const n=e.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,e)}replace(t,e){const n=this.getNode(t);if(n){const t=this.nodeMetaMap.get(n);t&&this.nodeMetaMap.set(e,t)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function wb(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return t?t.nodeType!==t.ELEMENT_NODE||r>n?-1:e(t)?r:wb(t.parentNode,e,n,r+1):-1}function Ab(t,e){return n=>{const r=n;if(null===r)return!1;try{if(t)if("string"===typeof t){if(r.matches(".".concat(t)))return!0}else if(function(t,e){for(let n=t.classList.length;n--;){const r=t.classList[n];if(e.test(r))return!0}return!1}(r,t))return!0;return!(!e||!r.matches(e))}catch(o){return!1}}}const xb="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let Eb={map:{},getId:()=>(console.error(xb),-1),getNode:()=>(console.error(xb),null),removeNodeFromMap(){console.error(xb)},has:()=>(console.error(xb),!1),reset(){console.error(xb)}};function Tb(t,e,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window;const i=o.Object.getOwnPropertyDescriptor(t,e);return o.Object.defineProperty(t,e,r?n:{set(t){Pb((()=>{n.set.call(this,t)}),0),i&&i.set&&i.set.call(this,t)}}),()=>Tb(t,e,i||{},!0)}function Ib(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],o=n(r);return"function"===typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=o,()=>{t[e]=r}}catch(r){return()=>{}}}function Cb(t,e,n,r,o){if(!t)return!1;const i=function(t){if(!t)return null;try{return t.nodeType===t.ELEMENT_NODE?t:t.parentElement}catch(e){return null}}(t);if(!i)return!1;const s=Ab(e,n);if(!o){const t=r&&i.matches(r);return s(i)&&!t}const a=wb(i,s);let c=-1;return!(a<0)&&(r&&(c=wb(i,Ab(null,r))),a>-1&&c<0||a<c)}"undefined"!==typeof window&&window.Proxy&&window.Reflect&&(Eb=new Proxy(Eb,{get:(t,e,n)=>("map"===e&&console.error(xb),Reflect.get(t,e,n))})),Date.now().toString();const Rb={};function Mb(t){const e=Rb[t];if(e)return e;const n=window.document;let r=window[t];if(n&&"function"===typeof n.createElement)try{const e=n.createElement("iframe");e.hidden=!0,n.head.appendChild(e);const o=e.contentWindow;o&&o[t]&&(r=o[t]),n.head.removeChild(e)}catch(qn){}return Rb[t]=r.bind(window)}function Ob(){return Mb("requestAnimationFrame")(...arguments)}function Pb(){return Mb("setTimeout")(...arguments)}var Nb=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(Nb||{});let Lb;const Db=t=>{if(!Lb)return t;return function(){try{return t(...arguments)}catch(e){if(Lb&&!0===Lb(e))return()=>{};throw e}}};for(var Fb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",jb="undefined"===typeof Uint8Array?[]:new Uint8Array(256),Bb=0;Bb<64;Bb++)jb[Fb.charCodeAt(Bb)]=Bb;const Ub=new Map;const qb=(t,e,n)=>{if(!t||!Hb(t,e)&&"object"!==typeof t)return;const r=function(t,e){let n=Ub.get(t);return n||(n=new Map,Ub.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}(n,t.constructor.name);let o=r.indexOf(t);return-1===o&&(o=r.length,r.push(t)),o};function Wb(t,e,n){if(t instanceof Array)return t.map((t=>Wb(t,e,n)));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){const e=t.constructor.name,n=function(t){var e,n=new Uint8Array(t),r=n.length,o="";for(e=0;e<r;e+=3)o+=Fb[n[e]>>2],o+=Fb[(3&n[e])<<4|n[e+1]>>4],o+=Fb[(15&n[e+1])<<2|n[e+2]>>6],o+=Fb[63&n[e+2]];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o}(t);return{rr_type:e,base64:n}}if(t instanceof DataView){return{rr_type:t.constructor.name,args:[Wb(t.buffer,e,n),t.byteOffset,t.byteLength]}}if(t instanceof HTMLImageElement){const e=t.constructor.name,{src:n}=t;return{rr_type:e,src:n}}if(t instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:t.toDataURL()}}if(t instanceof ImageData){return{rr_type:t.constructor.name,args:[Wb(t.data,e,
1n),t.width,t.height]}}if(Hb(t,e)||"object"===typeof t){return{rr_type:t.constructor.name,index:qb(t,e,n)}}return t}const zb=(t,e,n)=>t.map((t=>Wb(t,e,n))),Hb=(t,e)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((t=>"function"===typeof e[t]));return Boolean(n.find((n=>t instanceof e[n])))};function Vb(t,e,n,r,o){const i=[];try{const s=Ib(t.HTMLCanvasElement.prototype,"getContext",(function(t){return function(i){for(var s=arguments.length,a=new Array(s>1?s-1:0),c=1;c<s;c++)a[c-1]=arguments[c];if(!Cb(this,e,n,r,!0)){const t=function(t){return"experimental-webgl"===t?"webgl":t}(i);if("__context"in this||(this.__context=t),o&&["webgl","webgl2"].includes(t))if(a[0]&&"object"===typeof a[0]){const t=a[0];t.preserveDrawingBuffer||(t.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return t.apply(this,[i,...a])}}));i.push(s)}catch(s){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach((t=>t()))}}function Jb(t,e,n,r,o,i,s,a){const c=[],l=Object.getOwnPropertyNames(t);for(const d of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(d))try{if("function"!==typeof t[d])continue;const s=Ib(t,d,(function(t){return function(){for(var s=arguments.length,c=new Array(s),l=0;l<s;l++)c[l]=arguments[l];const u=t.apply(this,c);if(qb(u,a,this),"tagName"in this.canvas&&!Cb(this.canvas,r,o,i,!0)){const t=zb(c,a,this),r={type:e,property:d,args:t};n(this.canvas,r)}return u}}));c.push(s)}catch(u){const r=Tb(t,d,{set(t){n(this.canvas,{type:e,property:d,args:[t],setter:!0})}});c.push(r)}return c}class Gb{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.shadowDoms=new Set,this.windowsSet=new WeakSet,this.windows=[],this.restoreHandlers=[],this.frozen=!1,this.locked=!1,this.snapshotInProgressMap=new Map,this.worker=null,this.lastSnapshotTime=0,this.processMutation=(t,e)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(t)||this.pendingCanvasMutations.set(t,[]),this.pendingCanvasMutations.get(t).push(e)};const{enableManualSnapshot:e,sampling:n="all",win:r,recordCanvas:o,errorHandler:i}=t;t.sampling=n,this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.options=t,i&&(Lb=i),(o&&"number"===typeof n||e)&&(this.worker=this.initFPSWorker()),this.addWindow(r),e||Db((()=>{o&&"all"===n&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),o&&"number"===typeof n&&this.initCanvasFPSObserver()}))()}reset(){var t;this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach((t=>{try{t()}catch(qn){}})),this.restoreHandlers=[],this.windowsSet=new WeakSet,this.windows=[],this.shadowDoms=new Set,null===(t=this.worker)||void 0===t||t.terminate(),this.worker=null,this.snapshotInProgressMap=new Map}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}addWindow(t){const{sampling:e="all",blockClass:n,blockSelector:r,unblockSelector:o,recordCanvas:i,enableManualSnapshot:s}=this.options;if(!this.windowsSet.has(t)){if(s)return this.windowsSet.add(t),void this.windows.push(new WeakRef(t));Db((()=>{if(i&&"all"===e&&this.initCanvasMutationObserver(t,n,r,o),i&&"number"===typeof e){const e=Vb(t,n,r,o,!0);this.restoreHandlers.push((()=>{e()}))}}))(),this.windowsSet.add(t),this.windows.push(new WeakRef(t))}}addShadowRoot(t){this.shadowDoms.add(new WeakRef(t))}resetShadowRoots(){this.shadowDoms=new Set}snapshot(t,e){null!==e&&void 0!==e&&e.skipRequestAnimationFrame?this.takeSnapshot(performance.now(),!0,t):Ob((e=>this.takeSnapshot(e,!0,t)))}initFPSWorker(){const t=new Worker(function(){const t=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;
1if("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(t)}());return t.onmessage=t=>{const e=t.data,{id:n}=e;if(this.snapshotInProgressMap.set(n,!1),!("base64"in e))return;const{base64:r,type:o,width:i,height:s}=e;this.mutationCb({id:n,type:Nb["2D"],commands:[{property:"clearRect",args:[0,0,i,s]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:o}]},0,0,i,s]}]})},t}initCanvasFPSObserver(){let t;if(!this.windows.length&&!this.shadowDoms.size)return;const e=n=>{this.takeSnapshot(n,!1),t=Ob(e)};t=Ob(e),this.restoreHandlers.push((()=>{t&&cancelAnimationFrame(t)}))}initCanvasMutationObserver(t,e,n,r){const o=Vb(t,e,n,r,!1),i=function(t,e,n,r,o){const i=[],s=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const c of s)try{if("function"!==typeof e.CanvasRenderingContext2D.prototype[c])continue;const s=Ib(e.CanvasRenderingContext2D.prototype,c,(function(i){return function(){for(var s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];return Cb(this.canvas,n,r,o,!0)||Pb((()=>{const n=zb(a,e,this);t(this.canvas,{type:Nb["2D"],property:c,args:n})}),0),i.apply(this,a)}}));i.push(s)}catch(a){const n=Tb(e.CanvasRenderingContext2D.prototype,c,{set(e){t(this.canvas,{type:Nb["2D"],property:c,args:[e],setter:!0})}});i.push(n)}return()=>{i.forEach((t=>t()))}}(this.processMutation.bind(this),t,e,n,r),s=function(t,e,n,r,o){const i=[];return i.push(...Jb(e.WebGLRenderingContext.prototype,Nb.WebGL,t,n,r,o,0,e)),"undefined"!==typeof e.WebGL2RenderingContext&&i.push(...Jb(e.WebGL2RenderingContext.prototype,Nb.WebGL2,t,n,r,o,0,e)),()=>{i.forEach((t=>t()))}}(this.processMutation.bind(this),t,e,n,r,this.mirror);this.restoreHandlers.push((()=>{o(),i(),s()}))}getCanvasElements(t,e,n){const r=[],o=o=>{o.querySelectorAll("canvas").forEach((o=>{Cb(o,t,e,n,!0)||r.push(o)}))};for(const s of this.windows){const t=s.deref();let e;try{e=t&&t.document}catch(i){}e&&o(e)}for(const s of this.shadowDoms){const t=s.deref();t&&o(t)}return r}takeSnapshot(t,e,n){const{sampling:r,blockClass:o,blockSelector:i,unblockSelector:s,dataURLOptions:a,maxCanvasSize:c}=this.options,l=1e3/("all"===r?2:r||2);if(this.lastSnapshotTime&&t-this.lastSnapshotTime<l)return!1;this.lastSnapshotTime=t;return(n?[n]:this.getCanvasElements(o,i,s)).forEach((t=>{const n=this.mirror.getId(t);if(this.mirror.hasNode(t)&&t.width&&t.height&&!this.snapshotInProgressMap.get(n)){if(this.snapshotInProgressMap.set(n,!0),!e&&["webgl","webgl2"].includes(t.__context)){var r;const e=t.getContext(t.__context);!1===(null===e||void 0===e||null===(r=e.getContextAttributes())||void 0===r?void 0:r.preserveDrawingBuffer)&&e.clear(e.COLOR_BUFFER_BIT)}createImageBitmap(t).then((e=>{var r;null===(r=this.worker)||void 0===r||r.postMessage({id:n,bitmap:e,width:t.width,height:t.height,dataURLOptions:a,maxCanvasSize:c},[e])})).catch((t=>{Db((()=>{throw this.snapshotInProgressMap.delete(n),t}))()}))}})),!0}startPendingCanvasMutationFlusher(){Ob((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){const t=e=>{this.rafStamps.latestId=e,Ob(t)};Ob(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((t,e)=>{const n=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,n)})),Ob((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(t,e){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(t);if(!n||-1===e)return;const r=n.map((t=>{const{type:e}=t;return(0,i.A)(t,_b)})),{type:o}=n[0];this.mutationCb({id:e,type:o,commands:r}),this.pendingCanvasMutations.delete(t)}}try{if(2!==Array.from([1],(t=>2*t))[0]){var Kb;const t=document.createElement("iframe");document.body.appendChild(t),Array.from=(null===(Kb=t.contentWindow)||void 0===Kb?void 0:Kb.Array.from)||Array.from,document.body.removeChild(t)}}catch(Cx){console.debug("Unable to override Array.from",Cx)}var Yb;new kb,function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"}(Yb||(Yb={}));const $b={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}}},Xb=1280,Zb=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[e,n]=t.maxCanvasSize||[],r={quality:t.quality||"medium",enableManualSnapshot:t.enableManualSnapshot,maxCanvasSize:[e?Math.min(e,Xb):Xb,n?Math.min(n,Xb):Xb]};let o,i;const a=new Promise((t=>i=t));return{name:"ReplayCanvas",getOptions(){const{quality:t,enableManualSnapshot:e,maxCanvasSize:n}=r;return(0,s.A)({enableManualSnapshot:e,recordCanvas:!0,getCanvasManager:t=>{const r=new Gb((0,s.A)((0,s.A)({},t),{},{enableManualSnapshot:e,maxCanvasSize:n,errorHandler:t=>{try{"object"===typeof t&&(t.__rrweb__=!0)}catch(e){}}}));return o=r,i(r),r}},$b[t]||$b.medium)},async snapshot(t,e){(o||await a).snapshot(t,e)}}};function Qb(t,e,n,r,o){if(!t.fetchData)return;const{method:i,url:a}=t.fetchData,c=bo()&&e(a);if(t.endTimestamp){const e=t.fetchData.__span;if(!e)return;const n=r[e];return void(n&&(c&&(function(t,e){if(e.response){var n;Co(t,e.response.status);const r=null===(n=e.response)||void 0===n||null===(n=n.headers)||void 0===n?void 0:n.get("content-length");if(r){const e=parseInt(r);e>0&&t.setAttribute("http.response_content_length",e)}}else e.error&&t.setStatus({code:To,message:"internal_error"});t.end()}(n,t),function(t,e,n){var r;const o="object"===typeof n&&null!==n?n.onRequestSpanEnd:void 0;null===o||void 0===o||o(t,{headers:null===(r=e.response)||void 0===r?void 0:r.headers,error:e.error})}(n,t,o)),delete r[e]))}const{spanOrigin:l="auto.http.browser",propagateTraceparent:u=!1}="object"===typeof o?o:{spanOrigin:o},d=$t(),p=!!di()||!!d&&aa(d),f=c&&p?ba(function(t,e,n){if(t.startsWith("data:")){const r=Nf(t);return{name:"".concat(e," ").concat(r),attributes:eS(t,void 0,e,n)}}const r=Rf(t),o=r?Mf(r):t;return{name:"".concat(e," ").concat(o),attributes:eS(t,r,e,n)}}(a,i,l)):new ca;if(c&&!p&&(null===d||void 0===d||d.recordDroppedEvent("no_parent_span","span")),t.fetchData.__span=f.spanContext().spanId,r[f.spanContext().spanId]=f,n(t.fetchData.url)){const e=t.args[0],n=(0,s.A)({},t.args[1]||{}),r=function(t,e,n,r){const o=Gl({span:n,propagateTraceparent:r}),i=o["sentry-trace"],a=o.baggage,c=o.traceparent;if(!i)return;const l=e.headers||(O(t)?t.headers:void 0);if(l){if(function(t){return"undefined"!==typeof Headers&&M(t,Headers)}(l)){const t=new Headers(l);if(t.get("sentry-trace")||t.set("sentry-trace",i),r&&c&&!t.get("traceparent")&&t.set("traceparent",c),a){const e=t.get("baggage");e?tS(e)||t.set("baggage","".concat(e,",").concat(a)):t.set("baggage",a)}return t}if(function(t){if(!Array.isArray(t))return!1;return t.every((t=>Array.isArray(t)&&2===t.length&&"string"===typeof t[0]))}(l)){const t=[...l];t.find((t=>
1"sentry-trace"===t[0]))||t.push(["sentry-trace",i]),r&&c&&!t.find((t=>"traceparent"===t[0]))&&t.push(["traceparent",c]);const e=l.find((t=>"baggage"===t[0]&&"string"===typeof t[1]&&tS(t[1])));return a&&!e&&t.push(["baggage",a]),t}{const t="sentry-trace"in l?l["sentry-trace"]:void 0,e="traceparent"in l?l.traceparent:void 0,n="baggage"in l?l.baggage:void 0,o=n?Array.isArray(n)?[...n]:[n]:[],s=n&&(Array.isArray(n)?n.find((t=>tS(t))):tS(n));a&&!s&&o.push(a);const u=Object.assign({},l,{"sentry-trace":null!==t&&void 0!==t?t:i,baggage:o.length>0?o.join(","):void 0});return r&&c&&!e&&(u.traceparent=c),u}}return(0,s.A)({},o)}(e,n,bo()&&p?f:void 0,u);r&&(t.args[1]=n,n.headers=r)}if(d){const e={input:t.args,response:t.response,startTimestamp:t.startTimestamp,endTimestamp:t.endTimestamp};d.emit("beforeOutgoingRequestSpan",f,e)}return f}function tS(t){return"string"===typeof t&&t.split(",").some((t=>t.trim().startsWith(io)))}function eS(t,e,n,r){const o={url:Nf(t),type:"fetch","http.method":n,[jr]:r,[Fr]:"http.client"};return e&&(Cf(e)||(o["http.url"]=Nf(e.href),o["server.address"]=e.host),e.search&&(o["http.query"]=e.search),e.hash&&(o["http.fragment"]=e.hash)),o}function nS(t){return"number"===typeof t&&isFinite(t)}function rS(t,e,n,r){let o=Object.assign({},(function(t){if(null==t)throw new TypeError("Cannot destructure "+t)}(r),r));const i=$o(t).start_timestamp;return i&&i>e&&"function"===typeof t.updateStartTime&&t.updateStartTime(e),ka(t,(()=>{const t=ba((0,s.A)({startTime:e},o));return t&&t.end(n),t}))}function oS(t){var e;const n=$t();if(!n)return;const{name:r,transaction:o,attributes:i,startTime:a}=t,{release:c,environment:l}=n.getOptions(),{userInfo:u}=n.getDataCollectionOptions(),d=n.getIntegrationByName("Replay"),p=null===d||void 0===d?void 0:d.getReplayId(),f=Vt(),h=f.getUser(),m=void 0!==h?h.email||h.id||h.ip_address:void 0;let g;try{g=f.getScopeData().contexts.profile.profile_id}catch(v){}return ba({name:r,attributes:(0,s.A)({release:c,environment:l,user:m||void 0,profile_id:g||void 0,replay_id:p||void 0,transaction:o,"user_agent.original":null===(e=Jp.navigator)||void 0===e?void 0:e.userAgent,"client.address":u?"{{auto}}":void 0},i),startTime:a,experimental:{standalone:!0}})}function iS(){return Jp.addEventListener&&Jp.performance}function sS(t){return t/1e3}function aS(t){try{return PerformanceObserver.supportedEntryTypes.includes(t)}catch(e){return!1}}function cS(t,e){let n,r=!1;function o(t){!r&&n&&e(t,n.spanContext().spanId,n),r=!0}(t=>{const e=e=>{var n;"pagehide"!==e.type&&"hidden"!==(null===(n=Jp.document)||void 0===n?void 0:n.visibilityState)||t(e)};am("visibilitychange",e,{capture:!0,once:!0}),am("pagehide",e,{capture:!0,once:!0})})((()=>{o("pagehide")}));const i=t.on("beforeStartNavigationSpan",((t,e)=>{null!==e&&void 0!==e&&e.isRedirect||(o("navigation"),i(),s())})),s=t.on("afterStartPageLoadSpan",(t=>{n=t,s()}))}function lS(t){return t?((At()||performance.timeOrigin)+t)/1e3:t}function uS(t){var e;const n={};if(void 0!=t.nextHopProtocol){const{name:e,version:r}=function(t){let e="unknown",n="unknown",r="";for(const o of t){if("/"===o){[e,n]=t.split("/");break}if(!isNaN(Number(o))){e="h"===r?"http":r,n=t.split(r)[1];break}r+=o}return r===t&&(e=r),{name:e,version:n}}(t.nextHopProtocol);n["network.protocol.version"]=r,n["network.protocol.name"]=e}return At()||null!==(e=iS())&&void 0!==e&&e.timeOrigin?(r=(0,s.A)((0,s.A)({},n),{},{"http.request.redirect_start":lS(t.redirectStart),"http.request.redirect_end":lS(t.redirectEnd),"http.request.worker_start":lS(t.workerStart),"http.request.fetch_start":lS(t.fetchStart),"http.request.domain_lookup_start":lS(t.domainLookupStart),"http.request.domain_lookup_end":lS(t.domainLookupEnd),"http.request.connect_start":lS(t.connectStart),"http.request.secure_connection_start":lS(t.secureConnectionStart),"http.request.connection_end":lS(t.connectEnd),"http.request.request_start":lS(t.requestStart),"http.request.response_start":lS(t.responseStart),"http.request.response_end":lS(t.responseEnd),"http.request.time_to_first_byte":null!=t.responseStart?t.responseStart/1e3:void 0}),Object.fromEntries(Object.entries(r).filter((t=>{let[,e]=t;return null!=e})))):n;var r}function dS(t){try{return new URL(t,Gi.location.origin).href}catch(e){return}}function pS(t){try{return new Headers(t)}catch(e){return}}const fS={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function hS(t,e){const{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:o,enableHTTPTimings:i,tracePropagationTargets:a,onRequestSpanStart:c,onRequestSpanEnd:l}=(0,s.A)((0,s.A)({},fS),e),u="function"===typeof o?o:t=>!0,d=t=>function(t,e){const n=te();if(n){let o,i;try{o=new URL(t,n),i=new URL(n).origin}catch(r){return!1}const s=o.origin===i;return e?pt(o.toString(),e)||s&&pt(o.pathname,e):s}{const n=!!t.match(/^\/(?!\/)/);return e?pt(t,e):n}}(t,a),p={},f=t.getOptions().propagateTraceparent;n&&Sf((e=>{const n=Qb(e,u,d,p,{propagateTraceparent:f,onRequestSpanEnd:l});if(n){const r=dS(e.fetchData.url),o=r?Of(r).host:void 0;n.setAttributes({"http.url":r?Nf(r):void 0,"server.address":o}),i&&gS(n,t),null===c||void 0===c||c(n,{headers:e.headers})}})),r&&Wf((e=>{const n=function(t,e,n,r,o,i){const a=t.xhr,c=null===a||void 0===a?void 0:a[qf];if(!a||a.__sentry_own_request__||!c)return;const{url:l,method:u}=c,d=bo()&&e(l);if(t.endTimestamp){const e=a.__sentry_xhr_span_id__;if(!e)return;const n=r[e];return void(n&&(d&&void 0!==c.status_code&&(Co(n,c.status_code),n.end(),null===i||void 0===i||i(n,{headers:pS(Yh(a)),error:t.error})),delete r[e]))}const p=dS(l),f=Of(p||l),h=Nf(Pf(l)),m=$t(),g=!!di()||!!m&&aa(m),v=d&&g?ba({name:"".concat(u," ").concat(h),attributes:(0,s.A)((0,s.A)({url:Nf(l),type:"xhr","http.method":u,"http.url":p?Nf
1(p):void 0,"server.address":null===f||void 0===f?void 0:f.host,[jr]:"auto.http.browser",[Fr]:"http.client"},(null===f||void 0===f?void 0:f.search)&&{"http.query":null===f||void 0===f?void 0:f.search}),(null===f||void 0===f?void 0:f.hash)&&{"http.fragment":null===f||void 0===f?void 0:f.hash})}):new ca;d&&!g&&(null===m||void 0===m||m.recordDroppedEvent("no_parent_span","span"));a.__sentry_xhr_span_id__=v.spanContext().spanId,r[a.__sentry_xhr_span_id__]=v,n(l)&&function(t,e,n){const{"sentry-trace":r,baggage:o,traceparent:i}=Gl({span:e,propagateTraceparent:n});r&&function(t,e,n,r){var o;const i=null===(o=t.__sentry_xhr_v3__)||void 0===o?void 0:o.request_headers;if(null!==i&&void 0!==i&&i["sentry-trace"]||!t.setRequestHeader)return;try{if(t.setRequestHeader("sentry-trace",e),!r||null!==i&&void 0!==i&&i.traceparent||t.setRequestHeader("traceparent",r),n){const e=null===i||void 0===i?void 0:i.baggage;e&&e.split(",").some((t=>t.trim().startsWith("sentry-")))||t.setRequestHeader("baggage",n)}}catch(s){}}(t,r,o,i)}(a,bo()&&g?v:void 0,o);m&&m.emit("beforeOutgoingRequestSpan",v,t);return v}(e,u,d,p,f,l);var r;n&&(i&&gS(n,t),null===c||void 0===c||c(n,{headers:pS(null===(r=e.xhr.__sentry_xhr_v3__)||void 0===r?void 0:r.request_headers)}))}))}const mS=300;function gS(t,e){const{url:n}=$o(t).data;if(!n||"string"!==typeof n)return;let r=()=>{setTimeout(o)};if(aa(e)){const e=t.end.bind(t);t.end=t=>{const n=null!==t&&void 0!==t?t:kt();let i=!1;const s=()=>{i||(i=!0,setTimeout(o),e(n),clearTimeout(a))};r=s;const a=setTimeout(s,mS)}}const o=Gm("resource",(e=>{let{entries:o}=e;o.forEach((e=>{(function(t){return"resource"===t.entryType&&"initiatorType"in t&&"string"===typeof t.nextHopProtocol&&("fetch"===t.initiatorType||"xmlhttprequest"===t.initiatorType)})(e)&&e.name.endsWith(n)&&(t.setAttributes(uS(e)),r())}))}))}const vS={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3};function yS(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=new Map;let r,o=!1,i="externalFinish",a=!e.disableAutoFinish;const c=[],{idleTimeout:l=vS.idleTimeout,finalTimeout:u=vS.finalTimeout,childSpanTimeout:d=vS.childSpanTimeout,beforeSpanEnd:f,trimIdleSpanEndTimestamp:h=!0}=e,m=$t();if(!m||!bo()){const t=new ca;return mi(t,(0,s.A)({sample_rate:"0",sampled:"false"},yi(t))),t}const g=Vt(),v=di(),y=function(t){const e=ba(t);return Mt(Vt(),e),p&&_.log("[Tracing] Started span is an idle span"),e}(t);function b(){r&&(clearTimeout(r),r=void 0)}function S(t){b(),r=setTimeout((()=>{!o&&0===n.size&&a&&(i="idleTimeout",y.end(t))}),l)}function k(t){r=setTimeout((()=>{!o&&a&&(i="heartbeatFailed",y.end(t))}),d)}function w(t){o=!0,n.clear(),c.forEach((t=>t())),Mt(g,v);const e=$o(y),{start_timestamp:r}=e;if(!r)return;e.data[Br]||y.setAttribute(Br,i);const s=e.status;s&&"unknown"!==s||y.setStatus({code:Eo}),_.log('[Tracing] Idle span "'.concat(e.op,'" finished'));const a=ci(y).filter((t=>t!==y));let d=0;a.forEach((e=>{e.isRecording()&&(e.setStatus({code:To,message:"cancelled"}),e.end(t),p&&_.log("[Tracing] Cancelling span since span ended early",JSON.stringify(e,void 0,2)));const n=$o(e),{timestamp:r=0,start_timestamp:o=0}=n,i=o<=t,s=r-o<=(u+l)/1e3;if(p){const t=JSON.stringify(e,void 0,2);i?s||_.log("[Tracing] Discarding span since it finished after idle span final timeout",t):_.log("[Tracing] Discarding span since it happened after idle span was finished",t)}s&&i||(!function(t,e){t[ii]&&t[ii].delete(e)}(y,e),d++)})),d>0&&y.setAttribute("sentry.idle_span_discarded_spans",d)}return y.end=new Proxy(y.end,{apply(t,e,n){if(f&&f(y),e instanceof ca)return;const[r,...o]=n,i=Ko(r||kt()),s=ci(y).filter((t=>t!==y)),a=$o(y);if(!s.length||!h)return w(i),Reflect.apply(t,e,[i,...o]);const c=m.getOptions().ignoreSpans,l=null===s||void 0===s?void 0:s.reduce(((t,e)=>{const n=$o(e);return n.timestamp?c&&oa({description:n.description,op:n.op,attributes:n.data},c)?t:t?Math.max(t,n.timestamp):n.timestamp:t}),void 0),d=a.start_timestamp,p=Math.min(d?d+u/1e3:1/0,Math.max(d||-1/0,Math.min(i,l||1/0)));return w(p),Reflect.apply(t,e,[p,...o])}}),c.push(m.on("spanStart",(t=>{if(o||t===y||$o(t).timestamp||t instanceof ha&&t.isStandaloneSpan())return;var e;ci(y).includes(t)&&(e=t.spanContext().spanId,b(),n.set(e,!0),k(kt()+d/1e3))}))),c.push(m.on("spanEnd",(t=>{var e;o||(e=t.spanContext().spanId,n.has(e)&&n.delete(e),0===n.size&&S(kt()+l/1e3))}))),c.push(m.on("idleSpanEnableAutoFinish",(t=>{t===y&&(a=!0,S(),n.size&&k())}))),e.disableAutoFinish||S(),setTimeout((()=>{o||(y.setStatus({code:To,message:"deadline_exceeded"}),i="finalTimeout",y.end())}),u),y}function _S(t){let e,n=0;if(!aS("layout-shift"))return;const r=Hm((t=>{let{metric:r}=t;const o=r.entries[r.entries.length-1];o&&(n=r.value,e=o)}),!0);cS(t,((t,o)=>{!function(t,e,n,r){var o;Vp&&_.log("Sending CLS span (".concat(t,")"));const i=e?sS((At()||0)+e.startTime):kt(),s=Vt().getScopeData().transactionName,a=e?Kf(null===(o=e.sources[0])||void 0===o?void 0:o.node):"Layout shift",c={[jr]:"auto.http.browser.cls",[Fr]:"ui.webvital.cls",[eo]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};
1null!==e&&void 0!==e&&e.sources&&e.sources.forEach(((t,e)=>{c["cls.source.".concat(e+1)]=Kf(t.node)}));const l=oS({name:a,transaction:s,attributes:c,startTime:i});l&&(l.addEvent("cls",{[Ur]:"",[qr]:t}),l.end(i))}(n,e,o,t),r()}))}function bS(t){return null!=t&&t>0&&t<=6e4}function SS(t){let e,n=0;if(!aS("largest-contentful-paint"))return;const r=Vm((t=>{let{metric:r}=t;const o=r.entries[r.entries.length-1];o&&bS(r.value)&&(n=r.value,e=o)}),!0);cS(t,((t,o)=>{!function(t,e,n,r){if(!bS(t))return;Vp&&_.log("Sending LCP span (".concat(t,")"));const o=sS((At()||0)+((null===e||void 0===e?void 0:e.startTime)||0)),i=Vt().getScopeData().transactionName,s=e?Kf(e.element):"Largest contentful paint",a={[jr]:"auto.http.browser.lcp",[Fr]:"ui.webvital.lcp",[eo]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};e&&(e.element&&(a["lcp.element"]=Kf(e.element)),e.id&&(a["lcp.id"]=e.id),e.url&&(a["lcp.url"]=e.url),null!=e.loadTime&&(a["lcp.loadTime"]=e.loadTime),null!=e.renderTime&&(a["lcp.renderTime"]=e.renderTime),null!=e.size&&(a["lcp.size"]=e.size));const c=oS({name:s,transaction:i,attributes:a,startTime:o});c&&(c.addEvent("lcp",{[Ur]:"millisecond",[qr]:t}),c.end(o))}(n,e,o,t),r()}))}const kS=2147483647;let wS,AS,xS=0,ES={};function TS(t){let{recordClsStandaloneSpans:e,recordLcpStandaloneSpans:n,client:r}=t;const o=iS();if(o&&At()){o.mark&&Jp.performance.mark("sentry-tracing-init");const t=n?SS(r):!1===n?Vm((t=>{let{metric:e}=t;const n=e.entries[e.entries.length-1];n&&bS(e.value)&&(ES.lcp={value:e.value,unit:"millisecond"},wS=n)}),!0):void 0,i=e?_S(r):!1===e?Hm((t=>{let{metric:e}=t;const n=e.entries[e.entries.length-1];n&&(ES.cls={value:e.value,unit:""},AS=n)}),!0):void 0,s=function(){return t=t=>{let{metric:e}=t;e.entries[e.entries.length-1]&&(ES.ttfb={value:e.value,unit:"millisecond"})},Qm("ttfb",t,Xm,Wm);var t}();return()=>{s(),null===t||void 0===t||t(),null===i||void 0===i||i()}}return()=>{}}function IS(t,e){const n=iS(),r=At();if(null===n||void 0===n||!n.getEntries||!r)return;const{spanStreamingEnabled:o,ignorePerformanceApiSpans:i,ignoreResourceSpans:a,recordClsOnPageloadSpan:c,recordLcpOnPageloadSpan:l}=e,u=sS(r),d=n.getEntries(),{op:p,start_timestamp:f}=$o(t);if(d.slice(xS).forEach((e=>{const n=sS(e.startTime),r=sS(Math.max(0,e.duration));if(!("navigation"===p&&f&&u+n<f))switch(e.entryType){case"navigation":!function(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach((r=>{CS(t,e,r,n)})),CS(t,e,"secureConnection",n,"TLS/SSL"),CS(t,e,"fetch",n,"cache"),CS(t,e,"domainLookup",n,"DNS"),function(t,e,n){const r=n+sS(e.requestStart),o=n+sS(e.responseEnd),i=n+sS(e.responseStart);e.responseEnd&&(rS(t,r,o,{op:"browser.request",name:e.name,attributes:{[jr]:"auto.ui.browser.metrics"}}),rS(t,i,o,{op:"browser.response",name:e.name,attributes:{[jr]:"auto.ui.browser.metrics"}}))}(t,e,n)}(t,e,u);break;case"mark":case"paint":case"measure":{!function(t,e,n,r,o,i){if(function(t){if("measure"!==(null===t||void 0===t?void 0:t.entryType))return;try{return"Components \u269b"===t.detail.devtools.track}catch(e){return}}(e))return;if(["mark","measure"].includes(e.entryType)&&pt(e.name,i))return;const s=im(!1),a=sS(s?s.requestStart:0),c=o+Math.max(n,a),l=o+n,u=l+r,d={[jr]:"auto.resource.browser.metrics"};c!==l&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=c);(function(t,e){try{const o=e.detail;if(!o)return;if("object"===typeof o){for(const[e,r]of Object.entries(o))if(r&&T(r))t["sentry.browser.measure.detail.".concat(e)]=r;else if(void 0!==r)try{t["sentry.browser.measure.detail.".concat(e)]=JSON.stringify(r)}catch(n){}return}if(T(o))return void(t["sentry.browser.measure.detail"]=o);try{t["sentry.browser.measure.detail"]=JSON.stringify(o)}catch(r){}}catch(o){}})(d,e),c<=u&&rS(t,c,u,{name:e.name,op:e.entryType,attributes:d})}(t,e,n,r,u,i);const o=pm(),s=e.startTime<o.firstHiddenTime;"first-paint"===e.name&&s&&(ES.fp={value:e.startTime,unit:"millisecond"}),"first-contentful-paint"===e.name&&s&&(ES.fcp={value:e.startTime,unit:"millisecond"});break}case"resource":!function(t,e,n,r,o,i,a){if("xmlhttprequest"===e.initiatorType||"fetch"===e.initiatorType)return;const c=e.initiatorType?"resource.".concat(e.initiatorType):"resource.other";if(null!==a&&void 0!==a&&a.includes(c))return;const l={[jr]:"auto.resource.browser.metrics"},u=Of(n);u.protocol&&(l["url.scheme"]=u.protocol.split(":").pop());u.host&&(l["server.address"]=u.host);l["url.same_origin"]=n.includes(Jp.location.origin),function(t,e,n){n.forEac
1h((n=>{let[r,o]=n;const i=t[r];null!=i&&("number"===typeof i&&i<kS||"string"===typeof i)&&(e[o]=i)}))}(e,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"]]);const d=(0,s.A)((0,s.A)({},l),uS(e)),p=i+r,f=p+o;rS(t,p,f,{name:n.replace(Jp.location.origin,""),op:c,attributes:d})}(t,e,e.name,n,r,u,a)}})),xS=Math.max(d.length-1,0),function(t,e){const n=Jp.navigator;if(!n)return;const r=n.connection;r&&(r.effectiveType&&t.setAttribute(e?"network.connection.effective_type":"effectiveConnectionType",r.effectiveType),r.type&&t.setAttribute(e?"network.connection.type":"connectionType",r.type),nS(r.rtt)&&(ES["connection.rtt"]={value:r.rtt,unit:"millisecond"},e&&t.setAttribute("network.connection.rtt",r.rtt)));nS(n.deviceMemory)&&(e?t.setAttribute("device.memory.estimated_capacity",n.deviceMemory):t.setAttribute("deviceMemory","".concat(n.deviceMemory," GB")));nS(n.hardwareConcurrency)&&(e?t.setAttribute("device.processor_count",n.hardwareConcurrency):t.setAttribute("hardwareConcurrency",String(n.hardwareConcurrency)))}(t,o),"pageload"===p){if(function(t){const e=im(!1);if(!e)return;const{responseStart:n,requestStart:r}=e;r<=n&&(t["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}(ES),o){const e=(e,n,r)=>{const o=null!==r&&void 0!==r?r:"browser.web_vital.".concat(e,".value");t.setAttribute(o,n),Vp&&_.log("Setting web vital attribute",{[o]:n},"on pageload span")};["ttfb","fp","fcp"].forEach((t=>{ES[t]&&e(t,ES[t].value)})),ES["ttfb.requestTime"]&&e("ttfb.requestTime",ES["ttfb.requestTime"].value,"browser.web_vital.ttfb.request_time")}else c||delete ES.cls,l||delete ES.lcp,Object.entries(ES).forEach((t=>{let[e,n]=t;pa(e,n.value,n.unit)})),function(t,e){var n;wS&&e.recordLcpOnPageloadSpan&&(wS.element&&t.setAttribute("lcp.element",Kf(wS.element)),wS.id&&t.setAttribute("lcp.id",wS.id),wS.url&&t.setAttribute("lcp.url",wS.url.trim().slice(0,200)),null!=wS.loadTime&&t.setAttribute("lcp.loadTime",wS.loadTime),null!=wS.renderTime&&t.setAttribute("lcp.renderTime",wS.renderTime),t.setAttribute("lcp.size",wS.size));null!==(n=AS)&&void 0!==n&&n.sources&&e.recordClsOnPageloadSpan&&AS.sources.forEach(((e,n)=>t.setAttribute("cls.source.".concat(n+1),Kf(e.node))))}(t,e);t.setAttribute(o?"browser.performance.time_origin":"performance.timeOrigin",u),t.setAttribute(o?"browser.performance.navigation.activation_start":"performance.activationStart",sm())}wS=void 0,AS=void 0,ES={}}function CS(t,e,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:n;const i=function(t){if("secureConnection"===t)return"connectEnd";if("fetch"===t)return"domainLookupStart";return"".concat(t,"End")}(n),a=e[i],c=e["".concat(n,"Start")];c&&a&&rS(t,r+sS(c),r+sS(a),{op:"browser.".concat(o),name:e.name,attributes:(0,s.A)({[jr]:"auto.ui.browser.metrics"},"redirect"===n&&null!=e.redirectCount?{"http.redirect_count":e.redirectCount}:{})})}const RS=[],MS=new Map,OS=new Map;function PS(){if(iS()&&At()){const t=Jm(LS);return()=>{t()}}return()=>{}}const NS={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"};const LS=t=>{let{metric:e}=t;if(void 0==e.value)return;const n=sS(e.value);if(n>60)return;const r=e.entries.find((t=>t.duration===e.value&&NS[t.name]));if(!r)return;const{interactionId:o}=r,i=NS[r.name],s=sS(At()+r.startTime),a=di(),c=a?li(a):void 0,l=null!=o?MS.get(o):void 0,u=(null===l||void 0===l?void 0:l.span)||c,d=u?$o(u).description:Vt().getScopeData().transactionName,p=oS({name:(null===l||void 0===l?void 0:l.elementName)||Kf(r.target),transaction:d,attributes:{[jr]:"auto.http.browser.inp",[Fr]:"ui.interaction.".concat(i),[eo]:r.duration},startTime:s});p&&(p.addEvent("inp",{[Ur]:"millisecond",[qr]:e.value}),p.end(s+n))};function DS(){const t=Object.keys(NS);function e(t){const e=t.target;if(!e)return;const n=Kf(e),r=Math.round(t.timeStamp);if(OS.set(r,n),OS.size>50){const t=OS.keys().next().value;void 0!==t&&OS.delete(t)}}ce()&&t.forEach((t=>{Jp.addEventListener(t,e,{capture:!0,passive:!0})}
1));const n=t=>{let{entries:e}=t;const n=di(),r=n&&li(n);e.forEach((t=>{if(!function(t){return"duration"in t}(t))return;const e=t.interactionId;if(null==e)return;if(MS.has(e))return;const n=t.target?Kf(t.target):function(t){const e=Math.round(t.startTime);let n=OS.get(e);if(!n)for(let r=-5;r<=5;r++){const t=OS.get(e+r);if(t){n=t;break}}return n||"<unknown>"}(t);if(RS.length>10){const t=RS.shift();MS.delete(t)}RS.push(e),MS.set(e,{span:r,elementName:n})}))};Gm("event",n),Gm("first-input",n)}function FS(t){var e,n;const{name:r,op:o,origin:i,metricName:a,value:c,attributes:l,parentSpan:u,reportEvent:d,startTime:p,endTime:f}=t,h=Vt().getScopeData().transactionName,m=(0,s.A)({[jr]:i,[Fr]:o,[eo]:0,["browser.web_vital.".concat(a,".value")]:c,"sentry.transaction":h,"user_agent.original":null===(e=Jp.navigator)||void 0===e?void 0:e.userAgent},l);u&&"pageload"===(null===(n=Xo(u).attributes)||void 0===n?void 0:n[Fr])&&(m["sentry.pageload.span_id"]=u.spanContext().spanId),d&&(m["browser.web_vital.".concat(a,".report_event")]=d);const g=ba({name:r,attributes:m,startTime:p,parentSpan:u});g&&g.end(null!==f&&void 0!==f?f:p)}function jS(t){let e,n=0;if(!aS("largest-contentful-paint"))return;const r=Vm((t=>{let{metric:r}=t;const o=r.entries[r.entries.length-1];o&&bS(r.value)&&(n=r.value,e=o)}),!0);cS(t,((t,o,i)=>{!function(t,e,n,r){if(!bS(t))return;Vp&&_.log("Sending LCP span (".concat(t,")"));const o=At()||0,i=sS(o),s=sS(o+((null===e||void 0===e?void 0:e.startTime)||0)),a=e?Kf(e.element):"Largest contentful paint",c={};(null===e||void 0===e?void 0:e.element)&&(c["browser.web_vital.lcp.element"]=Kf(e.element)),(null===e||void 0===e?void 0:e.id)&&(c["browser.web_vital.lcp.id"]=e.id),(null===e||void 0===e?void 0:e.url)&&(c["browser.web_vital.lcp.url"]=e.url),null!=(null===e||void 0===e?void 0:e.loadTime)&&(c["browser.web_vital.lcp.load_time"]=e.loadTime),null!=(null===e||void 0===e?void 0:e.renderTime)&&(c["browser.web_vital.lcp.render_time"]=e.renderTime),null!=(null===e||void 0===e?void 0:e.size)&&(c["browser.web_vital.lcp.size"]=e.size),FS({name:a,op:"ui.webvital.lcp",origin:"auto.http.browser.lcp",metricName:"lcp",value:t,attributes:c,parentSpan:n,reportEvent:r,startTime:i,endTime:s})}(n,e,i,t),r()}))}function BS(t){let e,n=0;if(!aS("layout-shift"))return;const r=Hm((t=>{let{metric:r}=t;const o=r.entries[r.entries.length-1];o&&(n=r.value,e=o)}),!0);cS(t,((t,o,i)=>{!function(t,e,n,r){var o;Vp&&_.log("Sending CLS span (".concat(t,")"));const i=e?sS((At()||0)+e.startTime):kt(),s=e?Kf(null===(o=e.sources[0])||void 0===o?void 0:o.node):"Layout shift",a={};null!==e&&void 0!==e&&e.sources&&e.sources.forEach(((t,e)=>{a["browser.web_vital.cls.source.".concat(e+1)]=Kf(t.node)}));FS({name:s,op:"ui.webvital.cls",origin:"auto.http.browser.cls",metricName:"cls",value:t,attributes:a,parentSpan:n,reportEvent:r,startTime:i})}(n,e,i,t),r()}))}function US(){if(!iS()||!At())return;Jm((t=>{let{metric:e}=t;if(null==e.value)return;if(sS(e.value)>60)return;const n=e.entries.find((t=>t.duration===e.value&&NS[t.name]));n&&function(t,e){Vp&&_.log("Sending INP span (".concat(t,")"));const n=sS(At()+e.startTime),r=sS(t),o=NS[e.name],i=(d=e.interactionId,null!=d?MS.get(d):void 0),s=di(),a=s?li(s):void 0,c=(null===i||void 0===i?void 0:i.span)||a,l=c?Xo(c).name:Vt().getScopeData().transactionName,u=(null===i||void 0===i?void 0:i.elementName)||Kf(e.target);var d;FS({name:u,op:"ui.interaction.".concat(o),origin:"auto.http.browser.inp",metricName:"inp",value:t,attributes:{[eo]:e.duration,"sentry.transaction":l},startTime:n,endTime:n+r,parentSpan:c})}(e.value,n)}))}const qS=new WeakMap,WS=new WeakMap,zS=["text/event-stream","application/x-ndjson","application/stream+json"],HS=()=>({name:"FetchStreamPerformance",setup(){!function(t){const e="fetch-body-resolved",n=Ts(e,t);Is(e,(()=>kf(wf)))}((t=>{if(t.response){const e=qS.get(t.response);if(e&&t.endTimestamp){e.end(t.endTimestamp);const n=WS.get(t.response);n&&clearTimeout(n)}}})),Sf((t=>{if(t.endTimestamp&&t.response){var e,n,r,o;const i=(null===(e=t.response.headers)||void 0===e?void 0:e.get("
1content-type"))||"";if(null!==(n=t.response.headers)&&void 0!==n&&n.get("content-length")||!zS.some((t=>i.startsWith(t))))return;const s=(null===(r=t.fetchData)||void 0===r?void 0:r.url)||"",a=(null===(o=t.fetchData)||void 0===o?void 0:o.method)||"GET",c=Rf(s),l=s.startsWith("data:")?Nf(s):c?Mf(c):s,u=ba({name:"".concat(a," ").concat(l),startTime:t.endTimestamp,attributes:{url:Nf(s),"http.method":a,type:"fetch",[Fr]:"http.client.stream",[jr]:"auto.http.browser.stream"}});qS.set(t.response,u);const d=setTimeout((()=>{u.isRecording()&&u.end()}),9e4);WS.set(t.response,d)}}))}});const VS="sentry_previous_trace",JS="sentry.previous_trace";function GS(t,e){let{linkPreviousTrace:n,consistentTraceSampling:r}=e;const o="session-storage"===n;let i=o?function(){try{var t;const e=null===(t=Gi.sessionStorage)||void 0===t?void 0:t.getItem(VS);return JSON.parse(e)}catch(e){return}}():void 0;t.on("spanStart",(t=>{if(li(t)!==t)return;const e=Vt().getPropagationContext();i=function(t,e,n){const r=$o(e);function o(){try{var t,e,o;return null!==(t=Number(null===(e=n.dsc)||void 0===e?void 0:e.sample_rate))&&void 0!==t?t:Number(null===(o=r.data)||void 0===o?void 0:o[Lr])}catch(i){return 0}}const i={spanContext:e.spanContext(),startTimestamp:r.start_timestamp,sampleRate:o(),sampleRand:n.sampleRand};if(!t)return i;const a=t.spanContext;if(a.traceId===r.trace_id)return t;Date.now()/1e3-t.startTimestamp<=3600&&(Zp&&_.log("Adding previous_trace `".concat(JSON.stringify(a),"` link to span `").concat(JSON.stringify((0,s.A)({op:r.op},e.spanContext())),"`")),e.addLink({context:a,attributes:{[oo]:"previous_trace"}}),e.setAttribute(JS,"".concat(a.traceId,"-").concat(a.spanId,"-").concat(KS(a)?1:0)));return i}(i,t,e),o&&function(t){try{Gi.sessionStorage.setItem(VS,JSON.stringify(t))}catch(qn){Zp&&_.warn("Could not store previous trace in sessionStorage",qn)}}(i)}));let a=!0;r&&t.on("beforeSampling",(t=>{if(!i)return;const e=Vt(),n=e.getPropagationContext();a&&n.parentSpanId?a=!1:(e.setPropagationContext((0,s.A)((0,s.A)({},n),{},{dsc:(0,s.A)((0,s.A)({},n.dsc),{},{sample_rate:String(i.sampleRate),sampled:String(KS(i.spanContext))}),sampleRand:i.sampleRand})),t.parentSampled=KS(i.spanContext),t.parentSampleRate=i.sampleRate,t.spanAttributes=(0,s.A)((0,s.A)({},t.spanAttributes),{},{[Dr]:i.sampleRate}))}))}function KS(t){return 1===t.traceFlags}const YS=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function $S(){const t=Gi.navigator;return!(null===t||void 0===t||!t.userAgent)&&YS.test(t.userAgent)}const XS=(0,s.A)((0,s.A)({},vS),{},{instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{}},fS),ZS=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"enableElementTiming"in t&&m((()=>{console.warn("[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.")}));const e={name:void 0,source:void 0},n=Gi.document,{enableInp:r,enableLongTask:o,enableLongAnimationFrame:i,_experiments:{enableInteractions:c,enableStandaloneClsSpans:l,enableStandaloneLcpSpans:u},beforeStartSpan:d,idleTimeout:p,finalTimeout:f,childSpanTimeout:h,markBackgroundSpan:g,traceFetch:v,traceXHR:y,trackFetchStreamPerformance:b,shouldCreateSpanForRequest:S,enableHTTPTimings:k,ignoreResourceSpans:w,ignorePerformanceApiSpans:A,instrumentPageLoad:x,instrumentNavigation:E,detectRedirects:T,linkPreviousTrace:I,consistentTraceSampling:C,enableReportPageLoaded:R,onRequestSpanStart:M,onRequestSpanEnd:O}=(0,s.A)((0,s.A)({},XS),t),P=$S();let N,L,D;function F(t,r){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];
1const i="pageload"===r.op,a=r.name,c=d?d(r):r,m=c.attributes||{};if(a!==c.name&&(m[Nr]="custom",c.attributes=m),!o){const t=bt();return void ba((0,s.A)((0,s.A)({},c),{},{startTime:t})).end(t)}e.name=c.name,e.source=m[Nr];const g=yS(c,{idleTimeout:p,finalTimeout:f,childSpanTimeout:h,disableAutoFinish:i,beforeSpanEnd:e=>{var n;null===(n=N)||void 0===n||n();const r=aa(t);IS(e,{recordClsOnPageloadSpan:!r&&!l,recordLcpOnPageloadSpan:!r&&!u,ignoreResourceSpans:w,ignorePerformanceApiSpans:A,spanStreamingEnabled:r}),ik(t,void 0);const o=Vt(),a=o.getPropagationContext();o.setPropagationContext((0,s.A)((0,s.A)({},a),{},{traceId:g.spanContext().traceId,sampled:ni(g),dsc:yi(e)})),i&&(D=void 0)},trimIdleSpanEndTimestamp:!R});function v(){n&&["interactive","complete"].includes(n.readyState)&&t.emit("idleSpanEnableAutoFinish",g)}i&&R&&(D=g),ik(t,g),i&&!R&&n&&(n.addEventListener("readystatechange",(()=>{v()})),v())}return{name:"BrowserTracing",setup(t){var e;if(P)return void(Zp&&_.log("[Tracing] Skipping browserTracingIntegration setup for bot user agent."));qd();const d=aa(t);if(N=TS({recordClsStandaloneSpans:d?void 0:l||!1,recordLcpStandaloneSpans:d?void 0:u||!1,client:t}),d?(jS(t),BS(t),r&&US()):r&&PS(),i&&a.PerformanceObserver&&null!==(e=PerformanceObserver.supportedEntryTypes)&&void 0!==e&&e.includes("long-animation-frame")?new PerformanceObserver((t=>{const e=di();if(e)for(const n of t.getEntries()){if(!n.scripts[0])continue;const t=sS(At()+n.startTime),{start_timestamp:r,op:o}=$o(e);if("navigation"===o&&r&&t<r)continue;const i=sS(n.duration),s={[jr]:"auto.ui.browser.metrics"},a=n.scripts[0],{invoker:c,invokerType:l,sourceURL:u,sourceFunctionName:d,sourceCharPosition:p}=a;s["browser.script.invoker"]=c,s["browser.script.invoker_type"]=l,u&&(s["code.filepath"]=u),d&&(s["code.function"]=d),-1!==p&&(s["browser.script.source_char_position"]=p),rS(e,t,t+i,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:s})}})).observe({type:"long-animation-frame",buffered:!0}):o&&Gm("longtask",(t=>{let{entries:e}=t;const n=di();if(!n)return;const{op:r,start_timestamp:o}=$o(n);for(const i of e){const t=sS(At()+i.startTime),e=sS(i.duration);"navigation"===r&&o&&t<o||rS(n,t,t+e,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[jr]:"auto.ui.browser.metrics"}})}})),c&&Gm("event",(t=>{let{entries:e}=t;const n=di();
1if(n)for(const r of e)if("click"===r.name){const t=sS(At()+r.startTime),e=sS(r.duration),o={name:Kf(r.target),op:"ui.interaction.".concat(r.name),startTime:t,attributes:{[jr]:"auto.ui.browser.metrics"}},i=ee(r.target);i&&(o.attributes["ui.component_name"]=i),rS(n,t,t+e,o)}})),T&&n){const t=()=>{L=kt()};addEventListener("click",t,{capture:!0}),addEventListener("keydown",t,{capture:!0,passive:!0})}function p(){const e=ok(t);e&&!$o(e).timestamp&&(Zp&&_.log("[Tracing] Finishing current active span with op: ".concat($o(e).op)),e.setAttribute(Br,"cancelled"),e.end())}t.on("startNavigationSpan",((e,n)=>{if($t()!==t)return;if(null!==n&&void 0!==n&&n.isRedirect)return Zp&&_.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),void F(t,(0,s.A)({op:"navigation.redirect"},e),!1);L=void 0,p(),Jt().setPropagationContext({traceId:It(),sampleRand:Math.random(),propagationSpanId:bo()?void 0:Ct()});const r=Vt();r.setPropagationContext({traceId:It(),sampleRand:Math.random(),propagationSpanId:bo()?void 0:Ct()}),r.setSDKProcessingMetadata({normalizedRequest:void 0}),F(t,(0,s.A)((0,s.A)({op:"navigation"},e),{},{parentSpan:null,forceTransaction:!0}))})),t.on("startPageLoadSpan",(function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if($t()!==t)return;p();const r=Fo(n.sentryTrace||ek("sentry-trace")||nk("sentry-trace"),n.baggage||ek("baggage")||nk("baggage")),o=Vt();o.setPropagationContext(r),bo()||(o.getPropagationContext().propagationSpanId=Ct()),o.setSDKProcessingMetadata({normalizedRequest:Xi()}),F(t,(0,s.A)({op:"pageload"},e))})),t.on("endPageloadSpan",(()=>{R&&D&&(D.setAttribute(Br,"reportPageLoaded"),D.end())}))},afterAllSetup(t){if(P)return;let n=te();if("off"!==I&&GS(t,{linkPreviousTrace:I,consistentTraceSampling:C}),Gi.location){if(x){const e=At();QS(t,{name:Gi.location.pathname,startTime:e?e/1e3:void 0,attributes:{[Nr]:"url",[jr]:"auto.pageload.browser"}})}E&&Vf((e=>{var r;let{to:o,from:i}=e;if(void 0===i&&-1!==(null===(r=n)||void 0===r?void 0:r.indexOf(o)))return void(n=void 0);n=void 0;const s=Rf(o),a=ok(t),c=a&&T&&function(t,e){const n=$o(t),r=bt(),o=n.start_timestamp;if(r-o>sk)return!1;if(e&&r-e<=sk)return!1;return!0}(a,L);tk(t,{name:(null===s||void 0===s?void 0:s.pathname)||Gi.location.pathname,attributes:{[Nr]:"url",[jr]:"auto.navigation.browser"}},{url:o,isRedirect:c})}))}g&&(Gi.document?Gi.document.addEventListener("visibilitychange",(()=>{const t=di();if(!t)return;const e=li(t);if(Gi.document.hidden&&e){const t="cancelled",{op:n,status:r}=$o(e);Zp&&_.log("[Tracing] Transaction: ".concat(t," -> since tab moved to the background, op: ").concat(n)),r||e.setStatus({code:To,message:t}),e.setAttribute("sentry.cancellation_reason","document.hidden"),e.end()}})):Zp&&_.warn("[Tracing] Could not set up background tab detection due to lack of global document")),c&&function(t,e,n,r,o){const i=Gi.document;let s;const a=()=>{const i="ui.action.click",a=ok(t);if(a){const t=$o(a).op;if(["navigation","pageload"].includes(t))return void(Zp&&_.warn("[Tracing] Did not create ".concat(i," span because a pageload or navigation span is in progress.")))}s&&(s.setAttribute(Br,"interactionInterrupted"),s.end(),s=void 0),o.name?s=yS({name:o.name,op:i,attributes:{[Nr]:o.source||"url"}},{idleTimeout:e,finalTimeout:n,childSpanTimeout:r}):Zp&&_.warn("[Tracing] Did not create ".concat(i," transaction because _latestRouteName is missing."))};i&&addEventListener("click",a,{capture:!0})}(t,p,f,h,e),r&&DS(),hS(t,{traceFetch:v,traceXHR:y,tracePropagationTargets:t.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:S,enableHTTPTimings:k,onRequestSpanStart:M,onRequestSpanEnd:O}),b&&t.addIntegration(HS())}}};function QS(t,e,n){t.emit("startPageLoadSpan",e,n),Vt().setTransactionName(e.name);const r=ok(t);return r&&t.emit("afterStartPageLoadSpan",r),r}function tk(t,e,n){const{url:r,isRedirect:o}=n||{};t.emit("beforeStartNavigationSpan",e,{isRedirect:o}),t.emit("startNavigationSpan",e,{isRedirect:o});const i=Vt();return i.setTransactionName(e.name),r&&!o&&i.setSDKProcessingMetadata({normalizedRequest:(0,s.A)((0,s.A)({},Xi()),{},{url:r})}),ok(t)}function ek(t){const e=Gi.document,n=null===e||void 0===e?void 0:e.querySelector("meta[name=".concat(t,"]"));return(null===n||void 0===n?void 0:n.getAttribute("content"))||void 0}function nk(t){var e,n,r;const o=null===(e=Gi.performance)||void 0===e||null===(n=e.getEntriesByType)||void 0===n?void 0:n.call(e,"navigation")[0],i=null===o||void 0===o||null===(r=o.serverTiming)||void 0===r?void 0:r.find((e=>e.name===t));return null===i||void 0===i?void 0:i.description}const rk="_sentry_idleSpan";function ok(t){return t[rk]}function ik(t,e){N(t,rk,e)}const sk=1.5;const ak=()=>({name:"ElementTiming",setup(){iS()&&At()&&Gm("element",(t=>{let{entries:e}=t;for(const n of e){const t=n;if(!t.identifier)continue;const e=t.identifier,r=t.name,o=t.renderTime,i=t.loadTime,s={"sentry.origin":"auto.ui.browser.element_timing","ui.element.i
1dentifier":e};r&&(s["ui.element.paint_type"]=r),t.id&&(s["ui.element.id"]=t.id),t.element&&(s["ui.element.type"]=t.element.tagName.toLowerCase()),t.url&&(s["ui.element.url"]=t.url),t.naturalWidth&&(s["ui.element.width"]=t.naturalWidth),t.naturalHeight&&(s["ui.element.height"]=t.naturalHeight),o>0&&Td("ui.element.render_time",o,{unit:"millisecond",attributes:s}),i>0&&Td("ui.element.load_time",i,{unit:"millisecond",attributes:s})}}))}});function ck(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$t();null===t||void 0===t||t.emit("endPageloadSpan")}function lk(t){const e=di();if(e===t)return;const n=Vt();t.end=new Proxy(t.end,{apply:(t,r,o)=>(Mt(n,e),Reflect.apply(t,r,o))}),Mt(n,t)}const uk=["_segmentSpan"];class dk{constructor(t,e){this._traceBuckets=new Map,this._client=t;const{maxSpanLimit:n,flushInterval:r,maxTraceWeightInBytes:o}=null!==e&&void 0!==e?e:{};this._maxSpanLimit=n&&n>0&&n<=1e3?n:1e3,this._flushInterval=r&&r>0?r:5e3,this._maxTraceWeight=o&&o>0?o:5e6,this._client.on("flush",(()=>{this.drain()})),this._client.on("close",(()=>{this._traceBuckets.forEach((t=>{clearTimeout(t.timeout)})),this._traceBuckets.clear()}))}add(t){const e=t.trace_id;let n=this._traceBuckets.get(e);n||(n={spans:new Set,size:0,timeout:gl(setTimeout((()=>{this.flush(e)}),this._flushInterval))},this._traceBuckets.set(e,n)),n.spans.add(t),n.size+=function(t){let e=156;if(e+=2*t.name.length,e+=wo(t.attributes),t.links&&t.links.length>0){const n=t.links[0],r=null===n||void 0===n?void 0:n.attributes;e+=(100+(r?wo(r):0))*t.links.length}return e}(t),(n.spans.size>=this._maxSpanLimit||n.size>=this._maxTraceWeight)&&this.flush(e)}drain(){this._traceBuckets.size&&(p&&_.log("Flushing span tree map with ".concat(this._traceBuckets.size," traces")),this._traceBuckets.forEach(((t,e)=>{this.flush(e)})))}flush(t){var e;const n=this._traceBuckets.get(t);if(!n)return;if(!n.spans.size)return void this._removeTrace(t);const r=Array.from(n.spans),o=null===(e=r[0])||void 0===e?void 0:e._segmentSpan;if(!o)return p&&_.warn("No segment span reference found on span JSON, cannot compute DSC"),void this._removeTrace(t);const a=yi(o),c=r.map((t=>{const{_segmentSpan:e}=t;return(0,i.A)(t,uk)})),l=function(t,e,n){const r=n.getOptions(),o=n.getDsn(),i=r.tunnel,a=ys(r._metadata),c=(0,s.A)((0,s.A)((0,s.A)({sent_at:(new Date).toISOString()},function(t){return!!t.trace_id&&!!t.public_key}(e)&&{trace:e}),a&&{sdk:a}),!!i&&o&&{dsn:mo(o)}),l=n.getDataCollectionOptions().userInfo?"auto":"never";return as(c,[[{type:"span",item_count:t.length,content_type:"application/vnd.sentry.items.span.v2+json"},(0,s.A)((0,s.A)({version:2},ce()&&{ingest_settings:{infer_ip:l,infer_user_agent:l}}),{},{items:t})]])}(c,a,this._client);p&&_.log("Sending span envelope for trace ".concat(t," with ").concat(c.length," spans")),this._client.sendEnvelope(l).then(null,(t=>{p&&_.error("Error while sending streamed span envelope:",t)})),this._removeTrace(t)}_removeTrace(t){const e=this._traceBuckets.get(t);e&&clearTimeout(e.timeout),this._traceBuckets.delete(t)}}const pk=()=>({name:"SpanStreaming",beforeSetup(t){const e=t.getOptions();e.traceLifecycle||(Zp&&_.log('[SpanStreaming] setting `traceLifecycle` to "stream"'),e.traceLifecycle="stream")},setup(t){const e="SpanStreaming integration requires",n="Falling back to static trace lifecycle.",r=t.getOptions();if(!aa(t))return r.traceLifecycle="static",void(Zp&&_.warn("".concat(e,' `traceLifecycle` to be set to "stream"! ').concat(n)));const o=r.beforeSendSpan;if(o&&!ua(o))return r.traceLifecycle="static",void(Zp&&_.warn("".concat(e," a beforeSendSpan callback using `withStreamedSpan`! ").concat(n)));const i=new dk(t);t.on("afterSpanEnd",(e=>{ni(e)&&i.add(oh(e,t))})),t.on("afterSegmentSpanEnd",(t=>{const e=t.spanContext().traceId;setTimeout((()=>{i.flush(e)}),500)}))}}),fk=100,hk=5e3,mk=36e5;function gk(t){function e(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];p&&_.log("[Offline]:",...e)}return n=>{const r=t(n);if(!n.createStore)throw new Error("No `createStore` function was provided");const o=n.createStore(n);let i,s=hk;function a(t){i&&clearTimeout(i),i=gl(setTimeout((async()=>{i=void 0;const t=await o.shift();t&&(e("Attempting to send previously queued event"),t[0].sent_at=(new Date).toISOString(),l(t,!0).catch((t=>{e("Failed to retry sending",t)})))}),t))}function c(){i||(a(s),s=Math.min(2*s,mk))}async function l(t){let i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!i&&us(t,["replay_event","replay_recording"]))return await o.push(t),a(fk),{};
1try{if(n.shouldSend&&!1===await n.shouldSend(t))throw new Error("Envelope not sent because `shouldSend` callback returned false");const e=await r.send(t);let o=fk;var l,u;if(e)if(null!==(l=e.headers)&&void 0!==l&&l["retry-after"])o=bl(e.headers["retry-after"]);else if(null!==(u=e.headers)&&void 0!==u&&u["x-sentry-rate-limits"])o=6e4;else if((e.statusCode||0)>=400)return e;return a(o),s=hk,e}catch(qn){if(await function(t,e,r){return!us(t,["client_report"])&&(!n.shouldStore||n.shouldStore(t,e,r))}(t,qn,s))return i?await o.unshift(t):await o.push(t),c(),e("Error sending. Event queued.",qn),{};throw qn}}return n.flushAtStartup&&c(),{send:l,flush:t=>(void 0===t&&(s=hk,a(fk)),r.flush(t))}}}function vk(t){return new Promise(((e,n)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>n(t.error)}))}function yk(t){return vk(t.getAllKeys())}function _k(t){let e;function n(){return void 0==e&&(e=function(t,e){const n=indexedDB.open(t);n.onupgradeneeded=()=>n.result.createObjectStore(e);const r=vk(n);return t=>r.then((n=>t(n.transaction(e,"readwrite").objectStore(e))))}(t.dbName||"sentry-offline",t.storeName||"queue")),e}return{push:async e=>{try{const r=ps(e);await function(t,e,n){return t((t=>yk(t).then((r=>{if(!(r.length>=n))return t.put(e,Math.max(...r,0)+1),vk(t.transaction)}))))}(n(),r,t.maxQueueSize||30)}catch(r){}},unshift:async e=>{try{const r=ps(e);await function(t,e,n){return t((t=>yk(t).then((r=>{if(!(r.length>=n))return t.put(e,Math.min(...r,0)-1),vk(t.transaction)}))))}(n(),r,t.maxQueueSize||30)}catch(r){}},shift:async()=>{try{const t=await function(t){return t((t=>yk(t).then((e=>{const n=e[0];if(null!=n)return vk(t.get(n)).then((e=>(t.delete(n),vk(t.transaction).then((()=>e)))))}))))}(n());if(t)return fs(t)}catch(t){}}}}function bk(){return function(t){return e=>{const n=t((0,s.A)((0,s.A)({},e),{},{createStore:_k}));return Gi.addEventListener("online",(async t=>{await n.flush()})),n}}(gk(arguments.length>0&&void 0!==arguments[0]?arguments[0]:Xp))}var Sk;const kk=1e6,wk="window"in a&&a.window===a&&"undefined"===typeof importScripts,Ak=String(0),xk=wk?"main":"worker",Ek=Gi.navigator;let Tk="",Ik="",Ck="",Rk=(null===Ek||void 0===Ek?void 0:Ek.userAgent)||"",Mk="";const Ok=(null===Ek||void 0===Ek?void 0:Ek.language)||(null===Ek||void 0===Ek||null===(Sk=Ek.languages)||void 0===Sk?void 0:Sk[0])||"";const Pk=null===Ek||void 0===Ek?void 0:Ek.userAgentData;var Nk;function Lk(t){return function(t){return!("thread_metadata"in t)}(t)?function(t){let e,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[Ak]:{name:xk}}},o=t.samples[0];if(!o)return r;const i=o.timestamp,s=At(),a="number"===typeof performance.timeOrigin?performance.timeOrigin:s||0,c=a-(s||a);return t.samples.forEach(((o,s)=>{if(void 0===o.stackId)return void 0===e&&(e=n,r.stacks[e]=[],n++),void(r.samples[s]={elapsed_since_start_ns:((o.timestamp+c-i)*kk).toFixed(0),stack_id:e,thread_id:Ak});let a=t.stacks[o.stackId];const l=[];for(;a;){l.push(a.frameId);const e=t.frames[a.frameId];e&&void 0===r.frames[a.frameId]&&(r.frames[a.frameId]={function:e.name,abs_path:"number"===typeof e.resourceId?t.resources[e.resourceId]:void 0,lineno:e.line,colno:e.column}),a=void 0===a.parentId?void 0:t.stacks[a.parentId]}const u={elapsed_since_start_ns:((o.timestamp+c-i)*kk).toFixed(0),stack_id:n,thread_id:Ak};r.stacks[n]=l,r.samples[s]=u,n++})),r}(t):t}function Dk(t,e,n,r){if("transaction"!==r.type)throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(void 0===n||null===n)throw new TypeError("Cannot construct profiling event envelope without a valid profile. Got ".concat(n," instead."));const o=function(t){var e;const n=null===(e=t.contexts)||void 0===e||null===(e=e.trace)||void 0===e?void 0:e.trace_id;return"string"===typeof n&&32!==n.length&&Zp&&_.log("[Profiling] Invalid traceId: ".concat(n," on profiled event")),"string"!==typeof n?"":n}(r),i=Lk(n),s=e||("number"===typeof r.start_timestamp?1e3*r.start_timestamp:1e3*kt()),a="number"===typeof r.timestamp?1e3*r.timestamp:1e3*kt();return{event_id:t,timestamp:new Date(s).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||wr,runtime:{name:"javascript",version:Gi.navigator.userAgent}
1,os:{name:Tk,version:Ik,build_number:Rk},device:{locale:Ok,model:Mk,manufacturer:Rk,architecture:Ck,is_emulator:!1},debug_meta:{images:Bk(n.resources)},profile:i,transactions:[{name:r.transaction||"",id:r.event_id||ft(),trace_id:o,active_thread_id:Ak,relative_start_ns:"0",relative_end_ns:(1e6*(a-s)).toFixed(0)}]}}function Fk(t,e,n){var r,o,i,s,a;if(null==t)throw new TypeError("Cannot construct profiling event envelope without a valid profile. Got ".concat(t," instead."));const c=function(t){const e=[];for(let c=0;c<t.frames.length;c++){const n=t.frames[c];n&&(e[c]={function:n.name,abs_path:"number"===typeof n.resourceId?t.resources[n.resourceId]:void 0,lineno:n.line,colno:n.column})}const n=[];for(let c=0;c<t.stacks.length;c++){const e=t.stacks[c];if(!e)continue;const r=[];let o=e;for(;o;)r.push(o.frameId),o=void 0===o.parentId?void 0:t.stacks[o.parentId];n[c]=r}const r=At(),o="number"===typeof performance.timeOrigin?performance.timeOrigin:r||0,i=o-(r||o),s=[];for(let c=0;c<t.samples.length;c++){var a;const e=t.samples[c];if(!e)continue;const n=(o+(e.timestamp-i))/1e3;s[c]={stack_id:null!==(a=e.stackId)&&void 0!==a?a:0,thread_id:Ak,timestamp:n}}return{frames:e,stacks:n,samples:s,thread_metadata:{[Ak]:{name:xk}}}}(t),l=e.getOptions(),u=null===(r=e.getSdkMetadata)||void 0===r||null===(r=r.call(e))||void 0===r?void 0:r.sdk;return{chunk_id:ft(),client_sdk:{name:null!==(o=null===u||void 0===u?void 0:u.name)&&void 0!==o?o:"sentry.javascript.browser",version:null!==(i=null===u||void 0===u?void 0:u.version)&&void 0!==i?i:"0.0.0"},profiler_id:n||ft(),platform:"javascript",version:"2",release:null!==(s=l.release)&&void 0!==s?s:"",environment:null!==(a=l.environment)&&void 0!==a?a:"production",debug_meta:{images:Bk(t.resources)},profile:c}}function jk(t){return"pageload"===$o(t).op}function Bk(t){const e=$t(),n=null===e||void 0===e?void 0:e.getOptions(),r=null===n||void 0===n?void 0:n.stackParser;return r?function(t,e){const n=Pr(t);if(!n)return[];const r=[];for(const o of e){const t=tt(o);t&&n[t]&&r.push({type:"sourcemap",code_file:o,debug_id:n[t]})}return r}(r,t):[]}function Uk(t){return"number"!==typeof t&&"boolean"!==typeof t||"number"===typeof t&&isNaN(t)?(Zp&&_.warn("[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ".concat(JSON.stringify(t)," of type ").concat(JSON.stringify(typeof t),".")),!1):!0===t||!1===t||(!(t<0||t>1)||(Zp&&_.warn("[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ".concat(t,".")),!1))}"object"===typeof(Nk=Pk)&&null!==Nk&&"getHighEntropyValues"in Nk&&Pk.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then((t=>{var e;if(Tk=t.platform||"",Ck=t.architecture||"",Mk=t.model||"",Ik=t.platformVersion||"",null!==(e=t.fullVersionList)&&void 0!==e&&e.length){const e=t.fullVersionList[t.fullVersionList.length-1];Rk="".concat(e.brand," ").concat(e.version)}})).catch((t=>{}));let qk=!1;function Wk(){const t=Gi.Profiler;if("function"!==typeof t)return void(Zp&&_.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object."));const e=Math.floor(3e3);try{return new t({sampleInterval:10,maxBufferSize:e})}catch(n){Zp&&(_.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),_.log("[Profiling] Disabling profiling for current user session.")),qk=!0}}function zk(t){if(qk)return Zp&&_.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!t.isRecording())return Zp&&_.log("[Profiling] Discarding profile because root span was not sampled."),!1;const e=$t(),n=null===e||void 0===e?void 0:e.getOptions();if(!n)return Zp&&_.log("[Profiling] Profiling disabled, no options found."),!1;const r=n.profilesSampleRate;if(!Uk(r))return Zp&&_.warn("[Profiling] Discarding profile because of invalid sample rate."),!1;if(!r)return Zp&&_.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1;return!!(!0===r||Math.random()<r)||(Zp&&_.log("[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ".concat(Number(r),")")),!1)}function Hk(t){return"undefined"!==typeof t.profilesSampleRate}function Vk(t,e,n,r){return function(t){return t.samples.length<2?(Zp&&_.log("[Profiling] Discarding profile because it c
1ontains less than 2 samples"),!1):!!t.frames.length||(Zp&&_.log("[Profiling] Discarding profile because it contains no frames"),!1)}(n)?Dk(t,e,n,r):null}const Jk=new Map;function Gk(t){const e=Jk.get(t);return e&&Jk.delete(t),e}const Kk=new WeakSet;function Yk(t){t.setAttribute("thread.id",Ak),t.setAttribute("thread.name",xk)}function $k(t){let e;jk(t)&&(e=1e3*kt());const n=Wk();if(!n)return;Zp&&_.log("[Profiling] started profiling span: ".concat($o(t).description));const r=ft();let o=null;async function i(){if(t&&n){if(!o)return n.stop().then((e=>{s&&(Gi.clearTimeout(s),s=void 0),Zp&&_.log("[Profiling] stopped profiling of span: ".concat($o(t).description)),e?(o=e,function(t,e){if(Jk.set(t,e),Jk.size>30){const t=Jk.keys().next().value;void 0!==t&&Jk.delete(t)}}(r,e)):Zp&&_.log("[Profiling] profiler returned null profile for: ".concat($o(t).description),"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started")})).catch((t=>{Zp&&_.log("[Profiling] error while stopping profiler:",t)}));Zp&&_.log("[Profiling] profile for:",$o(t).description,"already exists, returning early")}}Vt().setContext("profile",{profile_id:r,start_timestamp:e}),Kk.add(t),Yk(t);let s=Gi.setTimeout((()=>{Zp&&_.log("[Profiling] max profile duration elapsed, stopping profiling for:",$o(t).description),i()}),3e4);const a=t.end.bind(t);t.end=function(){return t?(i().then((()=>{a()}),(()=>{a()})),t):a()}}class Xk{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(t){const e=t.getOptions().profileLifecycle,n=function(t){if(qk)return Zp&&_.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"!==t.profileLifecycle&&"manual"!==t.profileLifecycle)return Zp&&_.warn("[Profiling] Session not sampled. Invalid `profileLifecycle` option."),!1;const e=t.profileSessionSampleRate;return Uk(e)?e?Math.random()<=e:(Zp&&_.log("[Profiling] Discarding profile because profileSessionSampleRate is not defined or set to 0"),!1):(Zp&&_.warn("[Profiling] Discarding profile because of invalid profileSessionSampleRate."),!1)}(t.getOptions());Zp&&_.log("[Profiling] Initializing profiler (lifecycle='".concat(e,"').")),n||Zp&&_.log("[Profiling] Session not sampled. Skipping lifecycle profiler initialization."),this._profilerId=ft(),this._client=t,this._sessionSampled=n,this._lifecycleMode=e,"trace"===e&&this._setupTraceLifecycleListeners(t),t.on("spanStart",(t=>{this._isRunning&&Yk(t)}))}start(){"trace"!==this._lifecycleMode?this._isRunning?Zp&&_.warn("[Profiling] Profile session is already running, `uiProfiler.start()` is a no-op."):this._sessionSampled?this._beginProfiling():Zp&&_.warn("[Profiling] Session is not sampled, `uiProfiler.start()` is a no-op."):Zp&&_.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.start()` are ignored in trace mode.')}stop(){"trace"!==this._lifecycleMode?this._isRunning?this._endProfiling():Zp&&_.warn("[Profiling] Profiler is not running, `uiProfiler.stop()` is a no-op."):Zp&&_.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.stop()` are ignored in trace mode.')}notifyRootSpanActive(t){if("trace"!==this._lifecycleMode||!this._sessionSampled)return;const e=t.spanContext().spanId;if(!e||this._activeRootSpanIds.has(e))return;this._registerTraceRootSpan(e);const n=this._activeRootSpanIds.size;1===n&&(Zp&&_.log("[Profiling] Detected already active root span during setup. Active root spans now:",n),this._beginProfiling()),this._isRunning&&Yk(t)}_beginProfiling(){if(!this._isRunning){if(this._isRunning=!0,Zp&&_.log("[Profiling] Started profiling with profiler ID:",this._profilerId),Gt().setContext("profile",{profiler_id:this._profilerId}),this._startProfilerInstance(),!this._profiler)return Zp&&_.log("[Profiling] Failed to start JS Profiler; stopping."),void this._resetProfilerInfo();this._startPeriodicChunking()}}_endProfiling(){this._isRunning&&(this._isRunning=!1,this._chunkTimer&&(clearTimeout(this._chunkTimer),this._chunkTimer=void 0),this._clearAllRootSpanTimeouts(),this._collectCurrentChunk().catch((t=>{Zp&&_.error("[Profiling] Failed to collect current profile chunk on `stop()`:",t)})),"manual"===this._lifecycleMode&&Gt().setContext("profile",{}))}_setupTraceLifecycleListeners(t){t.on("spanStart",(t=>{if(!this._sessionSampled)return void(Zp&&_.log("[Profiling] Span not profiled because of negative sampling decision for user session."));if(t!==li(t))return;if(!t.isRecording())return void(Zp&&_.log("[Profiling] Discarding profile because root span was not sampled."));const e=t.spanContext().spanId;if(!e||this._activeRootSpanIds.has(e))return;this._registerTraceRootSpan(e);const n=this._activeRootSpanIds.size;1===n&&(Zp&&_.log("[Profiling] Root span ".concat(e," started. Profiling active while there are active root spans (count=").concat(n,").")),this._beginProfiling())})),t.on("spanEnd",(t=>{if(!this._sessionSampled)return;const e=t.spanContext().spanId;if(!e||!this._activeRootSpanIds.has(e))return;this._activeRootSpanIds.delete(e);const n=this._activeRootSpanIds.size;Zp&&_.log("[Profiling] Root span with ID ".concat(e," ended. Will continue profiling for as long as there are active root spans (currently: ").concat(n,").")),0===n&&(this._collectCurrentChunk().catch((t=>{Zp&&_.error("[Profiling] Failed to collect current profile chunk on last `spanEnd`:",t)})),this._endProfiling())}))}_resetProfilerInfo(){this._isRunning=!1,Gt().setContext("profile",{})}
1_clearAllRootSpanTimeouts(){this._rootSpanTimeouts.forEach((t=>clearTimeout(t))),this._rootSpanTimeouts.clear()}_registerTraceRootSpan(t){this._activeRootSpanIds.add(t);const e=setTimeout((()=>this._onRootSpanTimeout(t)),3e5);this._rootSpanTimeouts.set(t,e)}_startProfilerInstance(){var t;if(!1===(null===(t=this._profiler)||void 0===t?void 0:t.stopped))return;const e=Wk();e?this._profiler=e:Zp&&_.log("[Profiling] Failed to start JS Profiler.")}_startPeriodicChunking(){this._isRunning&&(this._chunkTimer=setTimeout((()=>{if(this._collectCurrentChunk().catch((t=>{Zp&&_.error("[Profiling] Failed to collect current profile chunk during periodic chunking:",t)})),this._isRunning){if(this._startProfilerInstance(),!this._profiler)return void this._resetProfilerInfo();this._startPeriodicChunking()}}),6e4))}_onRootSpanTimeout(t){this._rootSpanTimeouts.has(t)&&(this._rootSpanTimeouts.delete(t),this._activeRootSpanIds.has(t)&&(Zp&&_.log("[Profiling] Reached 5-minute timeout for root span ".concat(t,". You likely started a manual root span that never called `.end()`.")),this._activeRootSpanIds.delete(t),0===this._activeRootSpanIds.size&&this._endProfiling()))}async _collectCurrentChunk(){const t=this._profiler;if(this._profiler=void 0,t)try{const e=Fk(await t.stop(),this._client,this._profilerId),n=function(t){try{if(!t||"object"!==typeof t)return{reason:"chunk is not an object"};const e=t=>"string"===typeof t&&/^[a-f0-9]{32}$/.test(t);if(!e(t.profiler_id))return{reason:"missing or invalid profiler_id"};if(!e(t.chunk_id))return{reason:"missing or invalid chunk_id"};if(!t.client_sdk)return{reason:"missing client_sdk metadata"};const n=t.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(qn){return{reason:"unknown validation error: ".concat(qn)}}}(e);if("reason"in n)return void(Zp&&_.log("[Profiling] Discarding invalid profile chunk (this is probably a bug in the SDK):",n.reason));this._sendProfileChunk(e),Zp&&_.log("[Profiling] Collected browser profile chunk.")}catch(qn){Zp&&_.log("[Profiling] Error while stopping JS Profiler for chunk:",qn)}}_sendProfileChunk(t){var e;const n=this._client,r=ys(null===(e=n.getSdkMetadata)||void 0===e?void 0:e.call(n)),o=n.getDsn(),i=n.getOptions().tunnel,a=as((0,s.A)((0,s.A)({event_id:ft(),sent_at:(new Date).toISOString()},r&&{sdk:r}),!!i&&o&&{dsn:mo(o)}),[[{type:"profile_chunk",platform:"javascript"},t]]);n.sendEnvelope(a).then(null,(t=>{Zp&&_.error("Error while sending profile chunk envelope:",t)}))}}const Zk=()=>({name:"BrowserProfiling",setup(t){const e=t.getOptions(),n=new Xk;if(Hk(e)||e.profileLifecycle||(e.profileLifecycle="manual"),Hk(e)&&!e.profilesSampleRate)return void(Zp&&_.log("[Profiling] Profiling disabled, no profiling options found."));const r=di(),o=r&&li(r);if(Hk(e)&&void 0!==e.profileSessionSampleRate&&Zp&&_.warn("[Profiling] Both legacy profiling (`profilesSampleRate`) and UI profiling settings are defined. `profileSessionSampleRate` has no effect when legacy profiling is enabled."),Hk(e))o&&jk(o)&&zk(o)&&$k(o),t.on("spanStart",(t=>{const e=li(t);t===e?zk(t)&&$k(t):Kk.has(e)&&Yk(t)})),t.on("beforeEnvelope",(t=>{if(!Jk.size)return;const e=function(t){const e=[];return ls(t,((t,n)=>{if("transaction"===n)for(let o=1;o<t.length;o++){var r;const n=t[o];null!==n&&void 0!==n&&null!==(r=n.contexts)&&void 0!==r&&null!==(r=r.profile)&&void 0!==r&&r.profile_id&&e.push(t[o])}})),e}(t);if(!e.length)return;const n=[];for(const i of e){var r,o;const t=null===i||void 0===i?void 0:i.contexts,e=null===t||void 0===t||null===(r=t.profile)||void 0===r?void 0:r.profile_id,s=null===t||void 0===t||null===(o=t.profile)||void 0===o?void 0:o.start_timestamp;if("string"!==typeof e){Zp&&_.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!e){Zp&&_.log("[Profiling] cannot find profile for a span without a profile context");continue}null!==t&&void 0!==t&&t.profile&&delete t.profile;const a=Gk(e);if(!a){Zp&&_.log("[Profiling] Could not retrieve profile for span: ".concat(e));continue}const c=Vk(e,s,a,i);c&&n.push(c)}!function(t,e){if(!e.length)return t;for(const n of e)t[1].push([{type:"profile"},n])}(t,n)}));else{const r=e.profileLifecycle;if(t.on("startUIProfiler",(()=>n.start())),t.on("stopUIProfiler",(()=>n.stop())),"manual"===r)n.initialize(t);else if("trace"===r){if(!bo(e))return void(Zp&&_.warn("[Profiling] `profileLifecycle` is 'trace' but tracing is disabled. Set a `tracesSampleRate` or `tracesSampler` to enable span tracing."));n.initialize(t),o&&n.notifyRootSpanActive(o),Gi.setTimeout((()=>{const t=di(),e=t&&li(t);e&&n.notifyRootSpanActive(e)}),0)}}}}),Qk=[{op:"ui.interaction.click",name:"#sentry-spotlight"}];const tw=function(){const t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).sidecarUrl||"http://localhost:8969/stream";return{name:"SpotlightBrowser",setup:()=>{Zp&&_.log("Using Sidecar URL",t)},beforeSetup(t){const e=t.getOptions();e.ignoreSpans=[...e.ignoreSpans||[],...Qk]},afterAllSetup:e=>{!function(t,e){const n=Kp("fetch");let r=0;t.on("beforeEnvelope",(t=>{r>3?_.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",r):n(e,{method:"POST",body:ps(t),headers:{"Content-Type":"application/x-sentry-envelope"},mode:"cors"}).then((t=>{t.status>=200&&t.status<400&&(r=0)}),(t=>
1{r++,_.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/",t)}))}))}(e,t)}}},ew=()=>({name:"LaunchDarkly",processEvent:(t,e,n)=>Ul(t)});function nw(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(t,e,n)=>{ql(t,e.value),Wl(t,e.value)}}}const rw=()=>({name:"OpenFeature",processEvent:(t,e,n)=>Ul(t)});class ow{after(t,e){ql(e.flagKey,e.value),Wl(e.flagKey,e.value)}error(t,e,n){ql(t.flagKey,t.defaultValue),Wl(t.flagKey,t.defaultValue)}}const iw=t=>{let{featureFlagClientClass:e}=t;return{name:"Unleash",setupOnce(){P(e.prototype,"isEnabled",sw)},processEvent:(t,e,n)=>Ul(t)}};function sw(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];const o=n[0],i=t.apply(this,n);return"string"===typeof o&&"boolean"===typeof i?(ql(o,i),Wl(o,i)):Zp&&_.error("[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ".concat(o," (").concat(typeof o,"), result: ").concat(i," (").concat(typeof i,")")),i}}const aw=t=>{let{growthbookClass:e}=t;return{name:"GrowthBook",setupOnce(){const t=e.prototype;"function"===typeof t.isOn&&P(t,"isOn",cw),"function"===typeof t.getFeatureValue&&P(t,"getFeatureValue",cw)},processEvent:(t,e,n)=>Ul(t)}};function cw(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];const o=n[0],i=t.apply(this,n);return"string"===typeof o&&"boolean"===typeof i&&(ql(o,i),Wl(o,i)),i}}const lw=t=>{let{growthbookClass:e}=t;return aw({growthbookClass:e})},uw=t=>{let{featureFlagClient:e}=t;return{name:"Statsig",setup(t){e.on("gate_evaluation",(t=>{ql(t.gate.name,t.gate.value),Wl(t.gate.name,t.gate.value)}))},processEvent:(t,e,n)=>Ul(t)}};async function dw(){const t=$t();if(!t)return"no-client-active";if(!t.getDsn())return"no-dsn-configured";const e=t.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 wa((()=>fetch(e,{body:"{}",method:"POST",mode:"cors",credentials:"omit"})))}catch(n){return"sentry-unreachable"}}const pw=t=>{let{worker:e}=t;return{name:"WebWorker",setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach((t=>fw(t)))},addWorker:t=>fw(t)}};function fw(t){t.addEventListener("message",(t=>{if(function(t){if(!I(t)||!0!==t._sentryMessage)return!1;const e="_sentryDebugIds"in t,n="_sentryModuleMetadata"in t,r="_sentryWorkerError"in t,o="_sentryWasmImages"in t;if(!e&&!n&&!r&&!o)return!1;if(e&&!I(t._sentryDebugIds)&&void 0!==t._sentryDebugIds)return!1;if(n&&!I(t._sentryModuleMetadata)&&void 0!==t._sentryModuleMetadata)return!1;if(r&&!I(t._sentryWorkerError))return!1;if(o&&(!Array.isArray(t._sentryWasmImages)||!t._sentryWasmImages.every((t=>I(t)&&"string"===typeof t.code_file))))return!1;return!0}(t.data)){if(t.stopImmediatePropagation(),t.data._sentryDebugIds&&(Zp&&_.log("Sentry debugId web worker message received",t.data),Gi._sentryDebugIds=(0,s.A)((0,s.A)({},t.data._sentryDebugIds),Gi._sentryDebugIds)),t.data._sentryModuleMetadata&&(Zp&&_.log("Sentry module metadata web worker message received",t.data),Gi._sentryModuleMetadata=(0,s.A)((0,s.A)({},t.data._sentryModuleMetadata),Gi._sentryModuleMetadata)),t.data._sentryWasmImages){Zp&&_.log("Sentry WASM images web worker message received",t.data);const e=Gi._sentryWasmImages||[],n=t.data._sentryWasmImages.filter((t=>I(t)&&"string"===typeof t.code_file&&!e.some((e=>e.code_file===t.code_file))));Gi._sentryWasmImages=[...e,...n]}t.data._sentryWorkerError&&(Zp&&_.log("Sentry worker rejection message received",t.data._sentryWorkerError),function(t){const e=$t();if(!e)return;const n=e.getOptions().stackParser,r=e.getOptions().attachStacktrace,o=t.reason,i=T(o)?ph(o):Fp(n,o,void 0,r,!0);i.level="error",t.filename&&(i.contexts=(0,s.A)((0,s.A)({},i.contexts),{},{worker:{filename:t.filename}}));Ci(i,{originalException:o,mechanism:{handled:!1,type:"auto.browser.web_worker.onunhandledrejection"}}),Zp&&_.log("Captured worker unhandled rejection",o)}(t.data._sentryWorkerError))}}))}function hw(t){var e,n;let{self:r}=t;r.postMessage({_sentryMessage:!0,_sentryDebugIds:null!==(e=r._sentryDebugIds)&&void 0!==e?e:void 0,_sentryModuleMetadata:null!==(n=r._sentryModuleMetadata)&&void 0!==n?n:void 0}),r.addEventListener("unhandledrejection",(t=>{var e;const n={reason:dh(t),filename:null===(e=r.location)||void 0===e?void 0:e.href};r.postMessage({_sentryMessage:!0,_sentryWorkerError:n}
1),Zp&&_.log("[Sentry Worker] Forwarding unhandled rejection to parent",n)})),Zp&&_.log("[Sentry Worker] Registered worker with unhandled rejection handling")}var mw=n(65043);function gw(t){const e=(0,s.A)({},t);Ap(e,"react"),Ri("react",{version:mw.version});const n=Th(e);return rt(vw),n}function vw(t){return I(e=t)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e?"[SyntheticEvent]":Ah(t);var e}function yw(t,e,n){let{componentStack:r}=e;if(function(t){const e=t.match(/^([^.]+)/);return null!==e&&parseInt(e[0])>=17}(mw.version)&&S(t)&&r){const e=new Error(t.message);e.name="React ErrorBoundary ".concat(t.name),e.stack=r,function(t,e){const n=new WeakSet;!function t(e,r){if(!n.has(e))return e.cause?(n.add(e),t(e.cause,r)):void(e.cause=r)}(t,e)}(t,e)}return Kt((e=>(e.setContext("react",{componentStack:r}),Ti(t,n))))}function _w(t){return(e,n)=>{const r=!!t,o=yw(e,n,{mechanism:{handled:r,type:"auto.function.react.error_handler"}});r&&t(e,n,o)}}const bw="ui.react.render",Sw="ui.react.mount";var kw;const ww={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Aw={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},xw={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Ew=Symbol.for("react.forward_ref"),Tw=Symbol.for("react.memo");const Iw={};function Cw(t){if(function(t){return"object"===typeof t&&null!==t&&t.$$typeof===Tw}(t))return xw;const e=t.$$typeof;return e&&Iw[e]||ww}Iw[Ew]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Iw[Tw]=xw;const Rw=Object.defineProperty.bind(Object),Mw=Object.getOwnPropertyNames.bind(Object),Ow=null===(kw=Object.getOwnPropertySymbols)||void 0===kw?void 0:kw.bind(Object),Pw=Object.getOwnPropertyDescriptor.bind(Object),Nw=Object.getPrototypeOf.bind(Object),Lw=Object.prototype;function Dw(t,e,n){if("string"!==typeof e){if(Lw){const n=Nw(e);n&&n!==Lw&&Dw(t,n)}let n=Mw(e);Ow&&(n=n.concat(Ow(e)));const o=Cw(t),i=Cw(e);for(const s of n)if(!Aw[s]&&(null===i||void 0===i||!i[s])&&(null===o||void 0===o||!o[s])&&!Pw(t,s)){const n=Pw(e,s);if(n)try{Rw(t,s,n)}catch(r){}}}return t}const Fw="unknown";class jw extends mw.Component{constructor(t){super(t);const{name:e,disabled:n=!1}=this.props;n||(this._mountSpan=ba({name:"<".concat(e,">"),onlyIfParent:!0,op:Sw,attributes:{[jr]:"auto.ui.react.profiler","ui.component_name":e}}))}componentDidMount(){this._mountSpan&&this._mountSpan.end()}shouldComponentUpdate(t){let{updateProps:e,includeUpdates:n=!0}=t;if(n&&this._mountSpan&&e!==this.props.updateProps){const t=Object.keys(e).filter((t=>e[t]!==this.props.updateProps[t]));if(t.length>0){const e=kt();this._updateSpan=ka(this._mountSpan,(()=>ba({name:"<".concat(this.props.name,">"),onlyIfParent:!0,op:"ui.react.update",startTime:e,attributes:{[jr]:"auto.ui.react.profiler","ui.component_name":this.props.name,"ui.react.changed_props":t}})))}}return!0}componentDidUpdate(){this._updateSpan&&(this._updateSpan.end(),this._updateSpan=void 0)}componentWillUnmount(){const t=kt(),{name:e,includeRender:n=!0}=this.props;if(this._mountSpan&&n){const n=$o(this._mountSpan).timestamp;ka(this._mountSpan,(()=>{const r=ba({onlyIfParent:!0,name:"<".concat(e,">"),op:bw,startTime:n,attributes:{[jr]:"auto.ui.react.profiler","ui.component_name":e}});r&&r.end(t)}))}}render(){return this.props.children}}function Bw(t,e){const n=(null===e||void 0===e?void 0:e.name)||t.displayName||t.name||Fw,r=r=>mw.createElement(jw,(0,s.A)((0,s.A)({},e),{},{name:n,updateProps:r}),mw.createElement(t,(0,s.A)({},r)));return r.displayName="profiler(".concat(n,")"),Dw(r,t),r}function Uw(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{disabled:!1,hasRenderSpan:!0};const[n]=mw.useState((()=>{if(null===e||void 0===e||!e.disabled)return ba({name:"<".concat(t,">"),onlyIfParent:!0,op:Sw,attributes:{[jr]:"auto.ui.react.profiler","ui.component_name":t}})}));mw.useEffect((()=>(n&&n.end(),()=>{if(n&&e.hasRenderSpan){const e=$o(n).timestamp,r=kt(),o=ba({name:"<".concat(t,">"),onlyIfParent:!0,op:bw,startTime:e,attributes:{[jr]:"auto.ui.react.profiler","ui.component_name":t}});o&&o.end(r)}})),[])}Object.assign(jw,{defaultProps:{disabled:!1,includeRender:!0,includeUpdates:!0}});const qw="undefined"===typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Ww="unknown",zw={componentStack:null,error:null,eventId:null};class Hw extends mw.Component{constructor(t){super(t),this.state=zw,this._openFallbackReportDialog=!0;const e=$t();e&&t.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=e.on("afterSendEvent",(e=>{!e.type&&this._lastEventId&&e.event_id===this._lastEventId&&Rh((0,s.A)((0,s.A)({},t.dialogOptions),{},{eventId:this._lastEventId}))})))}componentDidCatch(t,e){const{componentStack:n}=e,{beforeCapture:r,onError:o,showDialog:i,dialogOptions:a}=this.props;Kt((c=>{r&&r(c,t,n);const l=null!=this.props.handled?this.props.handled:!!this.props.fallback,u=yw(t,e,{mechanism:{handled:l,type:"auto.function.react.error_boundary"}});o&&o(t,n,u),i&&(this._lastEventId=u,this._openFallbackReportDialog&&Rh((0,s.A)((0,s.A)({},a),{},{eventId:u}))),this.setState({error:t,componentStack:n,eventId:u})}))}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:e,eventId:n}=this.state,{onUnmount:r}=this.props;r&&(this.state===zw?r(null,null,null):r(t,e,n)),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}resetErrorBoundary(){const{onReset:t}=this.props,{error:e,componentStack:n,eventId:r}=this.state;t&&t(e,n,r),this.setState(zw)}render(){const{fallback:t,children:e}=this.props,n=this.state;if(null===n.componentStack)return"function"===typeof e?e():e;const r="function"===typeof t?mw.createElement(t,{error:n.error,componentStack:n.componentStack,resetError:()=>this.resetErrorBoundary(),eventId:n.eventId}):t;return mw.isValidElement(r)?r:(t&&qw&&_.warn("fallback did not produce a valid ReactElement"),null)}}function Vw(t,e){const n=t.displayName||t.name||Ww,r=mw.memo((n=>mw.createElement(Hw,(0,s.A)({},e),mw.createElement(t,(0,s.A)({},n)))));return r.displayName="errorBoundary(".concat(n,")"),Dw(r,t),r}const Jw="redux.action",Gw="info",Kw={attachReduxState:!0,actionTransformer:t=>t,stateTransformer:t=>t||null};function Yw(t){const e=(0,s.A)((0,s.A)({},Kw),t);return t=>(n,r)=>{function o(t){return(n,r)=>{const o=t(n,r),i=Vt(),s=e.actionTransformer(r);"undefined"!==typeof s&&null!==s&&As({category:Jw,data:s,type:Gw});const a=e.stateTransformer(o);if("undefined"!==typeof a&&null!==a){const t=$t(),e=null===t||void 0===t?void 0:t.getOptions(),n=(null===e||void 0===e?void 0:e.normalizeDepth)||3,r={state:{type:"redux",value:a}};N(r,H,3+n),i.setContext("state",r)}else i.setContext("state",null);const{configureScopeWithState:c}=e;return"function"===typeof c&&c(i,o),o}}e.attachReduxState&&Gt().addEventProcessor(((t,e)=>{try{void 0===t.type&&"redux"===t.contexts.state.state.type&&(e.attachments=[...e.attachments||[],{filename:"redux_state.json",data:JSON.stringify(t.contexts.state.state.value)}])}catch(n){}return t}));const i=t(o(n),r);return i.replaceReducer=new Proxy(i.replaceReducer,{apply:function(t,e,n){t.apply(e,[o(n[0])])}}),i}}function $w(t){const e=ZS((0,s.A)((0,s.A)({},t),{},{instrumentPageLoad:!1,instrumentNavigation:!1})),{history:n,routes:r,match:o,instrumentPageLoad:i=!0,instrumentNavigation:a=!0}=t;return(0,s.A)((0,s.A)({},e),{},{afterAllSetup(t){e.afterAllSetup(t),i&&Gi.location&&Xw(r,Gi.location,o,(function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"url";QS(t,{name:e,attributes:{[Fr]:"pageload",[jr]:"auto.pageload.react.reactrouter_v3",[Nr]:n}})})),a&&n.listen&&n.listen((e=>{"PUSH"!==e.action&&"POP"!==e.action||Xw(r,e,o,(function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"url";tk(t,{name:e,attributes:{[Fr]:"navigation",[jr]:"auto.navigation.react.reactrouter_v3",[Nr]:n}})}))}))}})}function Xw(t,e,n,r){let o=e.pathname;n({location:e,routes:t},((t,e,n)=>{if(t||!n)return r(o);const i=function(t){if(!Array.isArray(t)||0===t.length)return"";const e=t.filter((t=>!!t.path));let n=-1;for(let o=e.length-1;o>=0;o--){var r;if(null!==(r=e[o].path)&&void 0!==r&&r.startsWith("/")){n=o;break}}return e.slice(n).reduce(((t,e)=>{let{path:n}=e;const r="/"===t||""===t?n:"/".concat(n);return"".concat(t).concat(r)}),"")}(n.routes||[]);return 0===i.length||"/*"===i?r(o):(o=i,r(o,"route"))}))}function Zw(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=t,r=ZS((0,s.A)((0,s.A)({},e),{},{instrumentNavigation:!1,instrumentPageLoad:!1})),{instrumentPageLoad:o=!0,instrumentNavigation:i=!0}=e;return(0,s.A)((0,s.A)({},r),{},{afterAllSetup(t){r.afterAllSetup(t);const e=Gi.location;if(o&&e){const r=n.matchRoutes(e.pathname,n.options.parseSearch(e.search),{preload:!1,throwOnError:!1}),o=r[r.length-1],i="__root__"!==(null===o||void 0===o?void 0:o.routeId)?o:void 0;QS(t,{name:i?i.routeId:e.pathname,attributes:(0,s.A)({[Fr]:"pageload",[jr]:"auto.pageload.react.tanstack_router",[Nr]:i?"route":"url"},Qw(i))})}i&&n.subscribe("onBeforeNavigate",(e=>{if(!e.fromLocation||e.toLocation.state===e.fromLocation.state)return;const r=n.matchRoutes(e.toLocation.pathname,e.toLocation.search,{preload:!1,throwOnError:!1}),o=r[r.length-1],i="__root__"!==(null===o||void 0===o?void 0:o.routeId)?o:void 0,s=Gi.location,a=tk(t,{name:i?i.routeId:s.pathname,attributes:{[Fr]:"navigation",[jr]:"auto.navigation.react.tanstack_router",[Nr]:i?"route":"url"}}),c=n.subscribe("onResolved",(t=>{if(c(),a){const e=n.matchRoutes(t.toLocation.pathname,t.toLocation.search,{preload:!1,throwOnError:!1}),r=e[e.length-1],o="__root__"!==(null===r||void 0===r?void 0:r.routeId)?r:void 0;o&&(a.updateName(o.routeId),a.setAttribute(Nr,"route"),a.setAttributes(Qw(o)))}}))}))}})}function Qw(t){if(!t)return{};const e={};
1return Object.entries(t.params).forEach((t=>{let[n,r]=t;e["url.path.params.".concat(n)]=r,e["url.path.parameter.".concat(n)]=r,e["params.".concat(n)]=r})),e}function tA(t){const e=ZS((0,s.A)((0,s.A)({},t),{},{instrumentPageLoad:!1,instrumentNavigation:!1})),{history:n,routes:r,matchPath:o,instrumentPageLoad:i=!0,instrumentNavigation:a=!0}=t;return(0,s.A)((0,s.A)({},e),{},{afterAllSetup(t){e.afterAllSetup(t),nA(t,i,a,n,"reactrouter_v4",r,o)}})}function eA(t){const e=ZS((0,s.A)((0,s.A)({},t),{},{instrumentPageLoad:!1,instrumentNavigation:!1})),{history:n,routes:r,matchPath:o,instrumentPageLoad:i=!0,instrumentNavigation:a=!0}=t;return(0,s.A)((0,s.A)({},e),{},{afterAllSetup(t){e.afterAllSetup(t),nA(t,i,a,n,"reactrouter_v5",r,o)}})}function nA(t,e,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],s=arguments.length>6?arguments[6]:void 0;function a(t){if(0===i.length||!s)return[t,"url"];const e=rA(i,t,s);for(const n of e)if(n.match.isExact)return[n.match.path,"route"];return[t,"url"]}if(e){const e=r.location?r.location.pathname:Gi.location?Gi.location.pathname:void 0;if(e){const[n,r]=a(e);QS(t,{name:n,attributes:{[Fr]:"pageload",[jr]:"auto.pageload.react.".concat(o),[Nr]:r}})}}n&&r.listen&&r.listen(((e,n)=>{if(n&&("PUSH"===n||"POP"===n)){const[n,r]=a(e.pathname);tk(t,{name:n,attributes:{[Fr]:"navigation",[jr]:"auto.navigation.react.".concat(o),[Nr]:r}})}}))}function rA(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return t.some((t=>{const o=t.path?n(e,t):r.length?r[r.length-1].match:function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}}(e);return o&&(r.push({route:t,match:o}),t.routes&&rA(t.routes,e,n,r)),!!o})),r}function oA(t){const e=t.displayName||t.name,n=e=>{var n;if(null!==e&&void 0!==e&&null!==(n=e.computedMatch)&&void 0!==n&&n.isExact){const t=e.computedMatch.path,n=function(){const t=di(),e=t&&li(t);if(!e)return;const n=$o(e).op;return"navigation"===n||"pageload"===n?e:void 0}();Vt().setTransactionName(t),n&&(n.updateName(t),n.setAttribute(Nr,"route"))}return mw.createElement(t,(0,s.A)({},e))};return n.displayName="sentryRoute(".concat(e,")"),Dw(n,t),n}function iA(t,e){if(!e||"/"===e)return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return t;const n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&"/"!==r?t:t.slice(n)||"/"}const sA=new WeakMap;function aA(t,e,n){if(!t||null===e||void 0===e||!e.length)return null;const r=n?iA(t,n):t;let o=sA.get(e);o||(o=function(t){return[...t].sort(((t,e)=>{const n=gA(t);return gA(e)-n}))}(e),sA.set(e,o),qw&&_.log("[React Router] Sorted route manifest by specificity:",o.length,"patterns"));for(const i of o)if(cA(r,i))return qw&&_.log("[React Router] Matched pathname",r,"to pattern",i),i;return qw&&_.log("[React Router] No manifest match found for pathname:",r),null}function cA(t,e){if("/"===e)return"/"===t||""===t;const n=uA(t),r=uA(e);if(r.length>0&&"*"===r[r.length-1]){const t=r.slice(0,-1);if(n.length<t.length)return!1;for(const[e,r]of t.entries())if(!lA(n[e],r))return!1;return!0}if(n.length!==r.length)return!1;for(const[o,i]of r.entries())if(!lA(n[o],i))return!1;return!0}function lA(t,e){return void 0!==t&&void 0!==e&&(!!dA.test(e)||t===e)}function uA(t){return t.split("/").filter(Boolean)}const dA=/^:[\w-]+$/,pA=10,fA=3,hA=1,mA=-2;function gA(t){const e=t.split("/");let n=e.length;e.includes("*")&&(n+=mA);for(const r of e)"*"!==r&&(dA.test(r)?n+=fA:n+=""===r?hA:pA);return n}let vA,yA=!1;const _A=[],bA=10;function SA(){var t;const e=_A.length;return e>0&&null!==(t=_A[e-1])&&void 0!==t?t:null}function kA(t){return"*"===(e=t.route.path||"")[e.length-1]?e.slice(0,-1):e;var e}function wA(t){return t.params["*"]||""}function AA(t){return"/"===t[t.length-1]?t.slice(0,-1):t}function xA(t){return t.endsWith("*")}function EA(t){return t.includes("/*")||t.endsWith("*")}function TA(t,e){var n;return xA(t)&&!(null===(n=e.route.children)||void 0===n||!n.length)||!1}function IA(t){var e;return!(t.children||!t.element||null===(e=t.path)||void 0===e||!e.endsWith("/*"))}function CA(t,e,n){const r=t&&t.length>0?t:yA?iA(e,n):e;let o="/*"===r.slice(-2)?r.slice(0,-2):r;return o.length>1&&"/"===o[o.length-1]&&(o=o.slice(0,-1)),[o,"route"]}function RA(t){return t.split(/\\?\//).filter((t=>t.length>0&&","!==t)).length}function MA(t){return"/"===t[0]?t:"/".concat(t)}function OA(t,e){const n=vA(t,e);
1if(!n||0===n.length)return"";for(const r of n)if(r.route.path&&"*"!==r.route.path){const n=kA(r),o=iA(e.pathname,MA(r.pathnameBase));return e.pathname===o?AA(o):AA(AA(n||"")+MA(OA(t.filter((t=>t!==r.route)),{pathname:o})))}return""}function PA(t,e){return yA?iA(t.pathname,e):t.pathname||""}function NA(t,e,n,r){let o,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",s=arguments.length>5?arguments[5]:void 0;if((arguments.length>6?arguments[6]:void 0)&&s&&s.length>0){const e=aA(t.pathname,s,i);if(e)return[(yA?"":i)+e,"route"]}let a="url";const c=function(t,e){const n=vA(e,t);if(n)for(const r of n)if(IA(r.route)&&wA(r))return!0;return!1}(t,n);return c&&(o=MA(OA(n,t)),a="route"),c&&o||([o,a]=function(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(!t||0===t.length)return[yA?iA(e.pathname,r):e.pathname,"url"];if(!n)return[PA(e,r),"url"];let o="";for(const i of n){const t=i.route;if(!t)continue;if(t.index)return CA(o,i.pathname,r);const n=t.path;if(!n||TA(n,i))continue;const s="/"===n[0]||"/"===o[o.length-1]?n:"/".concat(n);if(o=AA(o)+MA(s),AA(e.pathname)===AA(r+i.pathname))return RA(o)===RA(i.pathname)||xA(o)?(TA(o,i)&&(o=o.slice(0,-1)),[(yA?"":r)+o,"route"]):[(yA?"":r)+s,"route"]}return[PA(e,r),"url"]}(e,t,r,i)),[o||t.pathname,a]}function LA(){const t=di(),e=t?li(t):void 0;if(!e)return;const n=$o(e).op;return"navigation"===n||"pageload"===n?e:void 0}function DA(t,e,n,r){const o=new Proxy(t,{apply(t,o,i){const s=function(){const t=SA();if(t)return t.targetPath?{pathname:t.targetPath,search:"",hash:"",state:null,key:"default"}:null;if("undefined"!==typeof Gi)try{const t=Gi.location;if(t)return{pathname:t.pathname,search:t.search||"",hash:t.hash||"",state:null,key:"default"}}catch(e){qw&&_.warn("[React Router] Could not access window.location")}return null}(),a=function(){const t=SA();return t?t.span:LA()}(),c=t.apply(o,i);return function(t,e,n,r,o,i){R(t)?t.then((t=>{Array.isArray(t)&&r(t,e,null!==o&&void 0!==o?o:void 0,i)})).catch((t=>{qw&&_.warn("Error resolving async handler '".concat(n,"' for route"),e,t)})):Array.isArray(t)&&r(t,e,null!==o&&void 0!==o?o:void 0,i)}(c,e,n,r,s,a),c}});return N(o,"__sentry_proxied__",!0),o}function FA(t,e){if(t.handle&&"object"===typeof t.handle)for(const n of Object.keys(t.handle)){const r=t.handle[n];"function"!==typeof r||r.__sentry_proxied__||(t.handle[n]=DA(r,t,n,e))}if(Array.isArray(t.children))for(const n of t.children)FA(n,e)}let jA,BA,UA,qA,WA,zA,HA=!1,VA=3e3,JA="";const GA=new WeakSet,KA=new WeakMap,YA=new Set,$A=new WeakMap,XA=new WeakMap;function ZA(t){null!==Gi&&void 0!==Gi&&Gi.cancelAnimationFrame?Gi.cancelAnimationFrame(t):clearTimeout(t)}function QA(t){return"".concat(t.pathname).concat(t.search||"").concat(t.hash||"")}function tx(t){return t.includes(":")||t.includes("*")}function ex(t,e){const n=e.children||[],r=t.filter((t=>!n.some((e=>e===t||t.path&&e.path===t.path||t.id&&e.id===t.id))));r.length>0&&(e.children=[...n,...r])}function nx(t,e){let n=$A.get(t);n||(n=new Set,$A.set(t,n)),n.add(e),e.finally((()=>{const n=$A.get(t);n&&n.delete(e)}))}function rx(t){const e=new Promise((e=>{XA.set(t,e)}));nx(t,e)}function ox(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3?arguments[3]:void 0;t.forEach((t=>{YA.add(t),HA&&FA(t,ox)})),e&&ex(t,e);const o=null!==r&&void 0!==r?r:LA();if(o){const t=$o(o);if(t.timestamp)return void(qw&&_.warn("[React Router] Lazy handler resolved after span ended - skipping update"));const e=t.op;let i=n;if(!i&&!r&&"undefined"!==typeof Gi){const t=Gi.location;null!==t&&void 0!==t&&t.pathname&&(i={pathname:t.pathname})}i&&("pageload"===e?mx({activeRootSpan:o,location:{pathname:i.pathname},routes:Array.from(YA),allRoutes:Array.from(YA)}):"navigation"===e&&ix(o,i,Array.from(YA),!1,WA))}}function ix(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0;const i=$o(t),s=i.description,a=null===t||void 0===t?void 0:t.__sentry_navigation_name_set__,c=s&&EA(s);if((!a||r||c)&&!i.timestamp){var l;const r=o(n,e),[u,d]=NA(e,n,n,r||[],JA,zA,HA),p=null===(l=i.data)||void 0===l?void 0:l[Nr];u&&(!s||!a&&("route"!==p||"route"===d)||"route"!==p&&"route"===d||"route"===p&&"route"===d&&c)&&(t.updateName(u),t.setAttribute(Nr,d),EA(u)||"route"!==d||N(t,"__sentry_navigation_name_set__",!0))}}function sx(t,e,n,r,o){let i=!1,s=!!o&&"pageload"===$o(o).op,a=!1,c=null,l=null;t.subscribe((t=>{if(!i){const e=LA();e&&"pageload"===$o(e).op?s=!0:s&&("POP"!==t.historyAction||a?i=!0:a=!0)}if("PUSH"===t.historyAction||"POP"===t.historyAction&&i){const i=QA(t.location),s=()=>{l!==i&&(l=i,c=null,px({location:t.location,routes:e,navigationType:t.historyAction,version:n,base
1name:r,allRoutes:Array.from(YA)}))};"idle"!==t.navigation.state?(l!==i&&(l=null),null!==c&&ZA(c),o=s,c=null!==Gi&&void 0!==Gi&&Gi.requestAnimationFrame?Gi.requestAnimationFrame(o):setTimeout(o,0)):(null!==c&&(ZA(c),c=null),s())}var o}))}function ax(t,e){return jA&&BA&&UA&&WA?function(n,r){if(fx(n),HA)for(const t of n)FA(t,ox);const o=LA();r&&"patchRoutesOnNavigation"in r&&"function"===typeof r.patchRoutesOnNavigation&&o&&(N(o,"__sentry_may_have_lazy_routes__",!0),rx(o));const i=dx(r,!1,o),s=t(n,i),a=null===r||void 0===r?void 0:r.basename;return"POP"===s.state.historyAction&&o&&mx({activeRootSpan:o,location:s.state.location,routes:n,basename:a,allRoutes:Array.from(YA)}),JA=a||"",sx(s,n,e,a,o),s}:(qw&&_.warn("reactRouterV".concat(e,"Instrumentation was unable to wrap the `createRouter` function because of one or more missing parameters.")),t)}function cx(t,e){return jA&&BA&&UA&&WA?function(n,r){if(fx(n),HA)for(const t of n)FA(t,ox);const o=LA();r&&"patchRoutesOnNavigation"in r&&"function"===typeof r.patchRoutesOnNavigation&&o&&(N(o,"__sentry_may_have_lazy_routes__",!0),rx(o));const i=dx(r,!0,o),s=t(n,i),a=null===r||void 0===r?void 0:r.basename;let c;const l=null===r||void 0===r?void 0:r.initialEntries,u=null===r||void 0===r?void 0:r.initialIndex,d=1===(null===l||void 0===l?void 0:l.length),p=void 0!==u&&(null===l||void 0===l?void 0:l[u]);c=d?l[0]:p?l[u]:void 0;const f=c?"string"===typeof c?{pathname:c}:c:s.state.location,h=LA();return"POP"===s.state.historyAction&&h&&mx({activeRootSpan:h,location:f,routes:n,basename:a,allRoutes:Array.from(YA)}),JA=a||"",sx(s,n,e,a,h),s}:(qw&&_.warn("reactRouterV".concat(e,"Instrumentation was unable to wrap the `createMemoryRouter` function because of one or more missing parameters.")),t)}function lx(t,e){const n=ZS((0,s.A)((0,s.A)({},t),{},{instrumentPageLoad:!1,instrumentNavigation:!1})),{useEffect:r,useLocation:o,useNavigationType:i,createRoutesFromChildren:a,matchRoutes:c,stripBasename:l,enableAsyncRouteHandlers:u=!1,instrumentPageLoad:d=!0,instrumentNavigation:p=!0,lazyRouteTimeout:f,lazyRouteManifest:h}=t;return(0,s.A)((0,s.A)({},n),{},{setup(e){var s,d;n.setup(e);const p=null!==(s=t.finalTimeout)&&void 0!==s?s:3e4,m=3*(null!==(d=t.idleTimeout)&&void 0!==d?d:1e3),g=null!==f&&void 0!==f?f:m;g===1/0?(VA=p,qw&&_.log("[React Router] lazyRouteTimeout set to Infinity, capping at finalTimeout:",p,"ms to prevent indefinite hangs")):Number.isNaN(g)?(qw&&_.warn("[React Router] lazyRouteTimeout must be a number, falling back to default:",m),VA=m):g<0?(qw&&_.warn("[React Router] lazyRouteTimeout must be non-negative or Infinity, got:",g,"falling back to:",m),VA=m):VA=g,jA=r,BA=o,UA=i,WA=c,qA=a,HA=u,zA=h,function(t){vA=t,yA=arguments.length>1&&void 0!==arguments[1]&&arguments[1]}(c,l||!1)},afterAllSetup(t){var r;n.afterAllSetup(t);const o=null===(r=Gi.location)||void 0===r?void 0:r.pathname;d&&o&&QS(t,{name:o,attributes:{[Nr]:"url",[Fr]:"pageload",[jr]:"auto.pageload.react.reactrouter_v".concat(e)}}),p&&GA.add(t)}})}function ux(t,e){if(!jA||!BA||!UA||!WA)return qw&&_.warn("reactRouterV6Instrumentation was unable to wrap `useRoutes` because of one or more missing parameters."),t;const n=n=>{const r=mw.useRef(!0),{routes:o,locationArg:i}=n,s=t(o,i),a=BA(),c=UA(),l="string"===typeof i||null!==i&&void 0!==i&&i.pathname?i:a;return jA((()=>{const t="string"===typeof l?{pathname:l}:l;r.current?(fx(o),mx({activeRootSpan:LA(),location:t,routes:o,allRoutes:Array.from(YA)}),r.current=!1):px({location:t,routes:o,navigationType:c,version:e,allRoutes:Array.from(YA)})}),[c,l]),s};return(t,e)=>mw.createElement(n,{routes:t,locationArg:e})}function dx(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0;if(!t||!("patchRoutesOnNavigation"in t)||"function"!==typeof t.patchRoutesOnNavigation)return t||{};const r=t.patchRoutesOnNavigation;return(0,s.A)((0,s.A)({},t),{},{patchRoutesOnNavigation:async t=>{var o;const i=null===t||void 0===t?void 0:t.path,s=null!==(o=LA())&&void 0!==o?o:n;if(!e){const e=null===t||void 0===t?void 0:t.patch,n=null===t||void 0===t?void 0:t.matches;e&&(t.patch=(t,r)=>{if(fx(r),n&&n.length>0){const e=n[n.length-1],o=null===e||void 0===e?void 0:e.route;if(o){const e=Array.from(YA).find((e=>{const n=void 0!==e.id&&e.id===t,r=e===o,i=void 0!==e.path&&void 0!==o.path&&e.path===o.path;return n||r||i}));e&&ex(r,e)}}const o=s?$o(s):void 0;return i&&s&&o&&!o.timestamp&&"navigation"===o.op&&ix(s,{pathname:i,search:"",hash:"",state:null,key:"default"},Array.from(YA),!0,WA),e(t,r)})}const a=(async()=>{const e=function(t,e){const n={};return _A.length>=bA&&(qw&&_.warn("[React Router] Navigation context stack overflow - removing oldest context"),_A.shift()),_A.push({token:n,targetPath:t,
1span:e}),n}(i,s);let n;try{n=await r(t)}finally{!function(t){const e=_A[_A.length-1];(null===e||void 0===e?void 0:e.token)===t&&_A.pop()}(e),s&&function(t){const e=XA.get(t);e&&(e(),XA.delete(t),t.__sentry_may_have_lazy_routes__&&(t.__sentry_may_have_lazy_routes__=!1))}(s)}const o=s?$o(s):void 0;if(s&&o&&!o.timestamp&&"navigation"===o.op){i&&ix(s,{pathname:i,search:"",hash:"",state:null,key:"default"},Array.from(YA),!1,WA)}return n})();return s&&nx(s,a),a}})}function px(t){const{location:e,routes:n,navigationType:r,version:o,matches:i,basename:s,allRoutes:a}=t,c=Array.isArray(i)?i:WA(a||n,e,s),l=$t();if(!l||!GA.has(l))return;const u=LA();if((!u||"pageload"!==$o(u).op||"POP"!==r)&&("PUSH"===r||"POP"===r)&&c){const[t,r]=NA(e,a||n,a||n,c,s,zA,HA),i=QA(e),u=KA.get(l),d=!(!u||u.isPlaceholder)&&!!$o(u.span).timestamp,{skip:p,shouldUpdate:f}=function(t,e,n,r){if(!t)return{skip:!1,shouldUpdate:!1};if(t.locationKey===e&&(t.isPlaceholder||!r)){var o;const e=!!t.routeName&&EA(t.routeName),r=EA(n),i=!!t.routeName&&tx(t.routeName),s=tx(n),a=e&&!r,c=!i&&s,l=n!==t.routeName&&n.length>((null===(o=t.routeName)||void 0===o?void 0:o.length)||0)&&!r;return{skip:!0,shouldUpdate:!(!t.routeName||!(a||c||l))}}return{skip:!1,shouldUpdate:!1}}(u,i,t,d);if(p){if(f&&u){const e=u.routeName;u.isPlaceholder?(u.routeName=t,qw&&_.log('[Tracing] Updated placeholder navigation name from "'.concat(e,'" to "').concat(t,'" (will apply to real span)'))):(u.span.updateName(t),u.span.setAttribute(Nr,r),N(u.span,"__sentry_navigation_name_set__",!0),u.routeName=t,qw&&_.log('[Tracing] Updated navigation span name from "'.concat(e,'" to "').concat(t,'"')))}else qw&&_.log("[Tracing] Skipping duplicate navigation for location: ".concat(i));return}const h={span:{end:()=>{}},routeName:t,pathname:e.pathname,locationKey:i,isPlaceholder:!0};let m;KA.set(l,h);try{m=tk(l,{name:h.routeName,attributes:{[Nr]:r,[Fr]:"navigation",[jr]:"auto.navigation.react.reactrouter_v".concat(o)}})}catch(qn){throw KA.delete(l),qn}m?(KA.set(l,{span:m,routeName:h.routeName,pathname:e.pathname,locationKey:i}),vx(m,e,n,s,"navigation")):KA.delete(l)}}function fx(t){t.forEach((t=>{hx(t).forEach((t=>{YA.add(t)}))}))}function hx(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Set;return e.has(t)||(e.add(t),t.children&&!t.index&&t.children.forEach((t=>{hx(t,e).forEach((t=>{e.add(t)}))}))),e}function mx(t){let{activeRootSpan:e,location:n,routes:r,matches:o,basename:i,allRoutes:s}=t;const a=Array.isArray(o)?o:WA(s||r,n,i);if(a){const[t,o]=NA(n,s||r,s||r,a,i,zA,HA);Vt().setTransactionName(t||"/"),e&&(e.updateName(t),e.setAttribute(Nr,o),vx(e,n,r,i,"pageload"))}else e&&vx(e,n,r,i,"pageload")}function gx(t,e,n,r,o,i,s,a){try{var c;const l=null===(c=e.data)||void 0===c?void 0:c[Nr];if("route"===l&&n&&!EA(n))return;const u=Array.from(a),d=u.length>0?u:o,p=WA(d,r,i);if(!p)return;const[f,h]=NA(r,d,d,p,i,zA,HA),m=function(t,e,n,r){return!!n&&(!!(!t&&arguments.length>4&&void 0!==arguments[4]&&arguments[4])||(!(!t||!EA(t)||"route"!==r||EA(n))||"route"!==e&&"route"===r))}(n,l,f,h,!0),g="pageload"===s||!e.timestamp;m&&g&&(t.updateName(f),t.setAttribute(Nr,h))}catch(l){qw&&_.warn("Error updating span details before ending: ".concat(l))}}function vx(t,e,n,r,o){const i="__sentry_".concat(o,"_end_patched__");
1if((null===t||void 0===t?void 0:t[i])||!t.end)return;const s=t.end.bind(t);let a=!1;t.end=function(){var i;if(a)return;a=!0;const c=arguments.length>0?arguments.length<=0?void 0:arguments[0]:Date.now()/1e3,l=$o(t),u=l.description,d=null===(i=l.data)||void 0===i?void 0:i[Nr],p=()=>{const e=$t();if(e&&"navigation"===o){const n=KA.get(e);n&&n.span===t&&KA.delete(e)}},f=$A.get(t),h=t.__sentry_may_have_lazy_routes__;if((f&&f.size>0||h)&&u&&(EA(u)||"route"!==d)){if(0===VA)return gx(t,l,u,e,n,r,o,YA),p(),void s(c);const i=new Promise((t=>setTimeout(t,VA)));let a;if(f&&f.size>0){const t=Promise.allSettled(f).then((()=>{}));a=VA===1/0?t:Promise.race([t,i])}else a=i;a.then((()=>{const i=$o(t);gx(t,i,i.description,e,n,r,o,YA),p(),s(c)})).catch((()=>{p(),s(c)}))}else gx(t,l,u,e,n,r,o,YA),p(),s(c)},N(t,i,!0)}function yx(t,e){if(!jA||!BA||!UA||!qA||!WA)return qw&&_.warn("reactRouterV6Instrumentation was unable to wrap Routes because of one or more missing parameters.\n      useEffect: ".concat(jA,". useLocation: ").concat(BA,". useNavigationType: ").concat(UA,".\n      createRoutesFromChildren: ").concat(qA,". matchRoutes: ").concat(WA,".")),t;const n=n=>{const r=mw.useRef(!0),o=BA(),i=UA();return jA((()=>{const t=qA(n.children);r.current?(fx(t),mx({activeRootSpan:LA(),location:o,routes:t,allRoutes:Array.from(YA)}),r.current=!1):px({location:o,routes:t,navigationType:i,version:e,allRoutes:Array.from(YA)})}),[o,i]),mw.createElement(t,(0,s.A)({},n))};return Dw(n,t),n}function _x(t){return lx(t,"6")}function bx(t){return ux(t,"6")}function Sx(t){return ax(t,"6")}function kx(t){return cx(t,"6")}function wx(t){return yx(t,"6")}function Ax(t){return lx(t,"7")}function xx(t){return yx(t,"7")}function Ex(t){return ax(t,"7")}function Tx(t){return cx(t,"7")}function Ix(t){return ux(t,"7")}}}]);
2//# sourceMappingURL=sentry.41886d3b.chunk.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.