PageSourceSearch

https://www.4earth.tech/assets/index-35ba79f8.js

js 4earth.tech collected 2026-10-07 14:00:20 UTC 379,858 bytes, 36 lines download raw bytes

1var gp=Object.defineProperty;var _p=(e,t,n)=>t in e?gp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var it=(e,t,n)=>(_p(e,typeof t!="symbol"?t+"":t,n),n);import{r as E,b as Fo,a as Ds,R as Ie,L as Te,u as Ii,d as un,N as pn,O as yp,f as Sp,h as vp,i as bp,j as Ep,m as wp,k as Tp}from"./react-vendor-91c466da.js";import{c as Ip,_ as X}from"./supabase-a2555f13.js";import{$ as po,_ as zr}from"./headlessui-dab4f4bd.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();var Pu={exports:{}},js={};/**
2 * @license React
3 * react-jsx-runtime.production.min.js
4 *
5 * Copyright (c) Facebook, Inc. and its affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var xp=E,kp=Symbol.for("react.element"),Cp=Symbol.for("react.fragment"),Rp=Object.prototype.hasOwnProperty,Ap=xp.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Np={key:!0,ref:!0,__self:!0,__source:!0};function Lu(e,t,n){var r,s={},o=null,i=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)Rp.call(t,r)&&!Np.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:kp,type:e,key:o,ref:i,props:s,_owner:Ap.current}}js.Fragment=Cp;js.jsx=Lu;js.jsxs=Lu;Pu.exports=js;var p=Pu.exports,$o={},Sa=Fo;$o.createRoot=Sa.createRoot,$o.hydrateRoot=Sa.hydrateRoot;const L=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,J=globalThis,Jt="10.70.0";function Ct(){return kr(J),J}function kr(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Jt,t[Jt]=t[Jt]||{}}function Un(e,t,n=J){const r=n.__SENTRY__=n.__SENTRY__||{},s=r[Jt]=r[Jt]||{};return s[e]||(s[e]=t())}const Op=["debug","info","warn","error","log","assert","trace"],Mp="Sentry Logger ",ms={};function Rt(e){if(!("console"in J))return e();const t=J.console,n={},r=Object.keys(ms);r.forEach(s=>{const o=ms[s];n[s]=t[s],t[s]=o});try{return e()}finally{r.forEach(s=>{t[s]=n[s]})}}function Pp(){ki().enabled=!0}function Lp(){ki().enabled=!1}function Du(){return ki().enabled}function Dp(...e){xi("log",...e)}function jp(...e){xi("warn",...e)}function Fp(...e){xi("error",...e)}function xi(e,...t){L&&Du()&&Rt(()=>{J.console[e](`${Mp}[${e}]:`,...t)})}function ki(){return L?Un("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const b={enable:Pp,disable:Lp,isEnabled:Du,log:Dp,warn:jp,error:Fp},ju=50,nn="?",va=/\(error: (.*)\)/,ba=/captureMessage|captureException/;function Fu(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,s=0)=>{const o=[],i=n.split(`
10`);for(let c=r;c<i.length;c++){let a=i[c];a.length>1024&&(a=a.slice(0,1024));const u=va.test(a)?a.replace(va,"$1"):a;if(!u.includes("Error: ")){for(const l of t){const d=l(u);if(d){o.push(d);break}}if(o.length>=ju+s)break}}return Bp(o.slice(s))}}function $p(e){return Array.isArray(e)?Fu(...e):e}function Bp(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(qr(t).function||"")&&t.pop(),t.reverse(),ba.test(qr(t).function||"")&&(t.pop(),ba.test(qr(t).function||"")&&t.pop()),t.slice(0,ju).map(n=>({...n,filename:n.filename||qr(t).filename,function:n.function||nn}))}function qr(e){return e[e.length-1]||{}}const ho="<anonymous>";function ft(e){try{return!e||typeof e!="function"?ho:e.name||ho}catch{return ho}}function Ea(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}const rr={},wa={};function At(e,t){return rr[e]=rr[e]||[],rr[e].push(t),()=>{const n=rr[e];
10if(n){const r=n.indexOf(t);r!==-1&&n.splice(r,1)}}}function Nt(e,t){if(!wa[e]){wa[e]=!0;try{t()}catch(n){L&&b.error(`Error while instrumenting ${e}`,n)}}}function Ge(e,t){const n=e&&rr[e];if(n)for(const r of n)try{r(t)}catch(s){L&&b.error(`Error while triggering instrumentation handler.
11Type: ${e}
12Name: ${ft(r)}
13Error:`,s)}}let mo=null;function $u(e){const t="error";At(t,e),Nt(t,Up)}function Up(){mo=J.onerror,J.onerror=function(e,t,n,r,s){return Ge("error",{column:r,error:s,line:n,msg:e,url:t}),mo?mo.apply(this,arguments):!1},J.onerror.__SENTRY_INSTRUMENTED__=!0}let go=null;function Bu(e){const t="unhandledrejection";At(t,e),Nt(t,Hp)}function Hp(){go=J.onunhandledrejection,J.onunhandledrejection=function(e){return Ge("unhandledrejection",e),go?go.apply(this,arguments):!0},J.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Uu=Object.prototype.toString;function pt(e){switch(Uu.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return $s(e,Error)}}function Hn(e,t){return Uu.call(e)===`[object ${t}]`}function Hu(e){return Hn(e,"ErrorEvent")}function Ta(e){return Hn(e,"DOMError")}function Wp(e){return Hn(e,"DOMException")}function ut(e){return Hn(e,"String")}function Ci(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function rn(e){return e===null||Ci(e)||typeof e!="object"&&typeof e!="function"}function dr(e){return Hn(e,"Object")}function ln(e){return typeof e=="object"&&e!==null}function Fs(e){return typeof Event<"u"&&$s(e,Event)}function zp(e){return Hn(e,"RegExp")}function Wn(e){return!!(e!=null&&e.then&&typeof e.then=="function")}function $s(e,t){try{return e instanceof t}catch{return!1}}function Ri(e){return typeof Request<"u"&&$s(e,Request)}function je(e,t,n){if(!(t in e))return;const r=e[t];if(typeof r!="function")return;const s=n(r);typeof s=="function"&&Wu(s,r);try{e[t]=s}catch{L&&b.log(`Failed to replace method "${t}" in object`,e)}}function fe(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{L&&b.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function Wu(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,fe(e,"__sentry_original__",t)}catch{}}function Ai(e){return e.__sentry_original__}function zu(e){if(pt(e))return{message:e.message,name:e.name,stack:e.stack,...Ia(e)};if(Fs(e)){const{type:t,target:n,currentTarget:r,detail:s}=e;return{type:t,target:n,currentTarget:r,...s?{detail:s}:{},...Ia(e)}}return e}function Ia(e){return ln(e)?Object.fromEntries(Object.entries(e)):{}}function qp(e){const t=Object.keys(zu(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}let hn;function Cr(e){if(hn!==void 0)return hn?hn(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=J;return t in n&&typeof n[t]=="function"?(hn=n[t],hn(e)):(hn=null,e())}function vt(){return Cr(()=>Math.random())}function Ot(){return Cr(()=>Date.now())}const Gp=Symbol.for("sentry.skipNormalization"),Vp=Symbol.for("sentry.overrideNormalizationDepth");function Yp(e){return!!e[Gp]}function Kp(e){const t=e[Vp];return typeof t=="number"?t:void 0}let Bo;function qu(e){Bo=e}function Ke(e,t=100,n=1/0){try{return Uo("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Gu(e,t=3,n=100*1024){const r=Ke(e,t);return Qp(r)>n?Gu(e,t-1,n):r}function Uo(e,t,n=1/0,r=1/0,s=Zp()){const[o,i]=s;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const c=Vu(e,t);if(!c.startsWith("[object "))return c;if(Yp(t))return t;const a=Kp(t),u=a!==void 0?a:n;if(u===0)return c.replace("object ","");if(o(t))return"[Circular ~]";const l=t;if(l&&typeof l.toJSON=="function")try{const m=l.toJSON();return Uo("",m,u-1,r,s)}catch{}const d=Array.isArray(t)?[]:{};let f=0;const h=zu(t);for(const m in h){if(!Object.prototype.hasOwnProperty.call(h,m))continue;if(f>=r){d[m]="[MaxProperties ~]";break}const g=h[m];d[m]=Uo(m,g,u-1,r,s),f++}return i(t),d}function Vu(e,t){try{if(Bo){const r=Bo(t);if(r)return r}return typeof global<"u"&&t===global?"[Global]":typeof t=="number"&&!Number.isFinite(t)?`[${t}]`:typeof t=="function"?`[Function: ${ft(t)}]`:typeof t=="symbol"?`[${String(t)}]`:typeof t=="bigint"?`[BigInt: ${String(t)}]`:`[object ${Jp(t)}]`}catch(n){return`**non-serializable** (${n})`}}function Jp(e){const t=Object.getPrototypeOf(e);return t!=null&&t.constructor?t.constructor.name:"null prototype"}function Xp(e){return~-encodeURI(e).split(/%..|./).length}function Qp(e){return Xp(JSON.stringify(e))}function Zp(){const e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}function n(r){e.delete(r)}return[t,n]}function Ho(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function xa(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const s=e[r];rn(s)?n.push(String(s)):s instanceof Error?n.push(s.message?`${s.name}: ${s.message}`:s.name):n.push(Vu(void 0,s))}return n.join(t)}function sr(e,t,n=!1){return ut(e)?zp(t)?t.test(e):ut(t)?n?e===t:e.includes(t):typeof t=="function"?t(e):!1:!1}function rt(e,t=[],n=!1){for(const r of t)if(sr(e,r,n))return!0;return!1}function eh(){const e=J;return e.crypto||e.msCrypto}let _o;function th(){return vt()*16}function Be(e=eh()){try{if(e!=null&&e.randomUUID)return Cr(()=>e.randomUUID()).replace(/-/g,"")}catch{}return _o||(_o="10000000100040008000"+1e11),_o.replace(/[018]/g,t=>(t^(th()&15)>>t/4).toString(16))}function Yu(e){var t,n;return(n=(t=e.exception)==null?void 0:t.values)==null?void 0:n[0]}function Wt(e){const{message:t,event_id:n}=e;if(t)return t;const r=Yu(e);return r?r.type&&r.value?`${r.type}: ${r.value}
13`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Wo(e,t,n){const r=e.exception=e.exception||{},s=r.values=r.values||[],o=s[0]=s[0]||{};o.value||(o.value=t||""),o.type||(o.type=n||"Error")}function Xt(e,t){const n=Yu(e);if(!n)return;const r={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism={...r,...s,...t},t&&"data"in t){const o={...s==null?void 0:s.data,...t.data};n.mechanism.data=o}}function ka(e){if(nh(e))return!0;try{fe(e,"__sentry_captured__",!0)}catch{}return!1}function nh(e){try{return e.__sentry_captured__}catch{}}const Ku=1e3;function dn(){return Ot()/Ku}function rh(){const{performance:e}=J;if(!(e!=null&&e.now)||!e.timeOrigin)return dn;const t=e.timeOrigin;return()=>(t+Cr(()=>e.now()))/Ku}let Ca;function ge(){return(Ca??(Ca=rh()))()}let yo=null;function sh(){var i;const{performance:e}=J;if(!(e!=null&&e.now))return;const t=3e5,n=Cr(()=>e.now()),r=Ot(),s=e.timeOrigin;if(typeof s=="number"&&Math.abs(s+n-r)<t)return s;const o=(i=e.timing)==null?void 0:i.navigationStart;return typeof o=="number"&&Math.abs(o+n-r)<t?o:r-n}function ve(){return yo===null&&(yo=sh()),yo}function oh(e){const t=ge(),n={sid:Be(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>ah(n)};return e&&Nn(n,e),n}function Nn(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||ge(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Be()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function ih(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),Nn(e,n)}function ah(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function Rr(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;const r={...e};for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=Rr(r[s],t[s],n-1));return r}function ht(){return Be()}function lt(){return Be().substring(16)}function Ju(e){try{const t=J.WeakRef;if(typeof t=="function")return new t(e)}catch{}return e}function Xu(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}const zo="_sentrySpan";function fr(e,t){t?fe(e,zo,Ju(t)):delete e[zo]}function gs(e){return Xu(e[zo])}const ch=100;class st{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:ht(),sampleRand:vt()}}clone(){const t=new st;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...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={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,fr(t,gs(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&&Nn(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={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this.setTags({[t]:n})}setAttributes(t){return this._attributes={...this._attributes,...t},this._notifyScopeListeners(),this}setAttribute(t,n){return this.setAttributes({[t]:n})}removeAttribute(t){return t in this._attributes&&(delete this._attributes[t],this._notifyScopeListeners()),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,r=n instanceof st?n.getScopeData():dr(n)?t:void 0,{tags:s,attributes:o,extra:i,user:c,contexts:a,level:u,fingerprint:l=[],propagationContext:d,conversationId:f}=r||{};return this._tags={...this._tags,...s},this._attributes={...this._attributes,...o},this._extra={...this._extra,...i},this._contexts={...this._contexts,...a},c&&Object.keys(c).length&&(this._user=c),u&&(this._level=u),l.length&&(this._fingerprint=l),d&&(this._propagationContext=d),f&&(this._conversationId=f),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,fr(this,void 0),this._attachments=[],this.setPropagationContext({traceId:ht(),sampleRand:vt()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){var o;const r=typeof n=="number"?n:ch;if(r<=0)return this;const s={timestamp:dn(),...t,message:t.message?Ho(t.message,2048):t.message};return this._breadcrumbs.push(s),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),(o=this._client)==null||o.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,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:gs(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Rr(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=(n==null?void 0:n.event_id)||Be();if(!this._client)return L&&b.warn("No client configured on scope - will not capture exception!"),r;const s=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:s,...n,event_id:r},this),r}captureMessage(t,n,r){const s=(r==null?void 0:r.event_id)||Be();if(!this._client)return L&&b.warn("No client configured on scope - will not capture message!"),s;const o=(r==null?void 0:r.syntheticException)??new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:o,...r,event_id:s},this),s}
13captureEvent(t,n){const r=t.event_id||(n==null?void 0:n.event_id)||Be();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(L&&b.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function uh(){return Un("defaultCurrentScope",()=>new st)}function lh(){return Un("defaultIsolationScope",()=>new st)}const Ra=e=>e instanceof Promise&&!e[Qu],Qu=Symbol("chained PromiseLike"),dh=(e,t,n)=>{const r=e.then(s=>(t(s),s),s=>{throw n(s),s});return Ra(r)&&Ra(e)?r:fh(e,r)},fh=(e,t)=>{if(!t)return e;let n=!1;for(const r in e){if(r in t)continue;n=!0;const s=e[r];typeof s=="function"?Object.defineProperty(t,r,{value:(...o)=>s.apply(e,o),enumerable:!0,configurable:!0,writable:!0}):t[r]=s}return n&&Object.assign(t,{[Qu]:!0}),t};class ph{constructor(t,n){let r;t?r=t:r=new st;let s;n?s=n:s=new st,this._stack=[{scope:r}],this._isolationScope=s}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(s){throw this._popScope(),s}return Wn(r)?dh(r,()=>this._popScope(),()=>this._popScope()):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function On(){const e=Ct(),t=kr(e);return t.stack=t.stack||new ph(uh(),lh())}function hh(e){return On().withScope(e)}function mh(e,t){const n=On();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Aa(e){return On().withScope(()=>e(On().getIsolationScope()))}function gh(){return{withIsolationScope:Aa,withScope:hh,withSetScope:mh,withSetIsolationScope:(e,t)=>Aa(t),getCurrentScope:()=>On().getScope(),getIsolationScope:()=>On().getIsolationScope()}}function zn(e){const t=kr(e);return t.acs?t.acs:gh()}function _h(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)&&Object.keys(e).includes("value")}function yh(e,t){const{value:n,unit:r}=_h(e)?e:{value:e,unit:void 0},s=Sh(n),o=r&&typeof r=="string"?{unit:r}:{};if(s)return{...s,...o};if(!t||t==="skip-undefined"&&n===void 0)return;let i="";try{i=JSON.stringify(n)??""}catch{}return{value:i,type:"string",...o}}function Na(e,t=!1){const n={};for(const[r,s]of Object.entries(e??{})){const o=yh(s,t);o&&(n[r]=o)}return n}function Sh(e){if(Array.isArray(e))return{value:e,type:"array"};const t=typeof e=="string"?"string":typeof e=="boolean"?"boolean":typeof e=="number"&&!Number.isNaN(e)?Number.isInteger(e)?"integer":"double":null;if(t)return{value:e,type:t}}let vh;function bh(){return vh!==void 0}function ne(){const e=Ct();return zn(e).getCurrentScope()}function Oe(){const e=Ct();return zn(e).getIsolationScope()}function Eh(){return Un("globalScope",()=>new st)}function Ni(...e){const t=Ct(),n=zn(t);if(e.length===2){const[r,s]=e;return r?n.withSetScope(r,s):n.withScope(s)}return n.withScope(e[0])}function Y(){return ne().getClient()}function wh(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:s}=t,o={trace_id:n,span_id:s||lt()};return r&&(o.parent_span_id=r),o}const he="sentry.source",Oi="sentry.sample_rate",Zu="sentry.previous_trace_sample_rate",Ne="sentry.op",de="sentry.origin",Th="sentry.status.message",pr="sentry.idle_span_finish_reason",Ar="sentry.measurement_unit",Nr="sentry.measurement_value",Oa="sentry.custom_span_name",Mi="sentry.profile_id",Mt="sentry.exclusive_time",Ih="sentry.link.type",xh="gen_ai.conversation.id",el=0,Bs=1,ye=2;function kh(e){if(e<400&&e>=100)return{code:Bs};if(e>=400&&e<500)switch(e){case 401:return{code:ye,message:"unauthenticated"};case 403:return{code:ye,message:"permission_denied"};case 404:return{code:ye,message:"not_found"};case 409:return{code:ye,message:"already_exists"};case 413:return{code:ye,message:"failed_precondition"};case 429:return{code:ye,message:"resource_exhausted"};case 499:return{code:ye,message:"cancelled"};default:return{code:ye,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:ye,message:"unimplemented"};case 503:return{code:ye,message:"unavailable"};case 504:return{code:ye,message:"deadline_exceeded"};default:return{code:ye,message:"internal_error"}}return{code:ye,message:"internal_error"}}function tl(e,t){e.setAttribute("http.response.status_code",t);const n=kh(t);n.message!=="unknown_error"&&e.setStatus(n)}const nl="_sentryScope",rl="_sentryIsolationScope",Ch=Symbol.for("sentry.otelSourceInference"),Rh=Symbol.for("sentry.otelSourceExplicitlySet"),Ah=Symbol.for("sentry.tracerProviderSpan");function Mn(e,t,n){e&&(fe(e,rl,Ju(n)),fe(e,nl,t))}function xn(e){const t=e;return{scope:t[nl],isolationScope:Xu(t[rl])}}function Ma(e){return e[Ch]===!0}function Nh(e){fe(e,Rh,!0)}function Pa(e){return e[Ah]===!0}const _s="sentry-",Oh=8192;function sl(e){const t=Ph(e);if(!t)return;const n=Object.entries(t).reduce((r,[s,o])=>{if(s.startsWith(_s)){const i=s.slice(_s.length);r[i]=o}return r},{});if(Object.keys(n).length>0)return n}function Mh(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,s])=>(s&&(n[`${_s}${r}`]=s),n),{});return Lh(t)}function Ph(e){if(!(!e||!ut(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=La(n);return Object.entries(r).forEach(([s,o])=>{t[s]=o}),t},{}):La(e)}function La(e){return e.split(",").map(t=>{const n=t.indexOf("=");if(n===-1)return[];const r=t.slice(0,n),s=t.slice(n+1);return[r,s].map(o=>{try{return decodeURIComponent(o.trim())}catch{return}})}).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function Lh(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],s)=>{const o=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,i=s===0?o:`${t},${o}`;return i.length>Oh?(L&&b.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):i},"")}const Dh=/^o(\d+)\./,jh=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function Fh(e){return e==="http"||e==="https"}function qn(e,t=!1){const{host:n,path:r,pass:s,port:o,projectId:i,protocol:c,publicKey:a}=e;return`${c}://${a}${t&&s?`:${s}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${i}`}function $h(e){const t=jh.exec(e);if(!t){Rt(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,s="",o="",i="",c=""]=t.slice(1);let a="",u=c;const l=u.split("/");if(l.length>1&&(a=l.slice(0,-1).join("/"),u=l.pop()),u){const d=u.match(/^\d+/);
13d&&(u=d[0])}return ol({host:o,pass:s,path:a,projectId:u,port:i,protocol:n,publicKey:r})}function ol(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Bh(e){if(!L)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(b.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?Fh(r)?t&&isNaN(parseInt(t,10))?(b.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(b.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(b.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Uh(e){const t=e.match(Dh);return t==null?void 0:t[1]}function Hh(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=Uh(n)),r}function Wh(e){const t=typeof e=="string"?$h(e):ol(e);if(!(!t||!Bh(t)))return t}function sn(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}const il=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function zh(e){if(!e)return;const t=e.match(il);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function qh(e,t){const n=zh(e),r=sl(t);if(!(n!=null&&n.traceId))return{traceId:ht(),sampleRand:vt()};const s=Gh(n,r);r&&(r.sample_rand=s.toString());const{traceId:o,parentSpanId:i,parentSampled:c}=n;return{traceId:o,parentSpanId:i,sampled:c,dsc:r||{},sampleRand:s}}function al(e=ht(),t=lt(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function cl(e=ht(),t=lt(),n){return`00-${e}-${t}-${n?"01":"00"}`}function Gh(e,t){const n=sn(t==null?void 0:t.sample_rand);if(n!==void 0)return n;const r=sn(t==null?void 0:t.sample_rate);return r&&(e==null?void 0:e.parentSampled)!==void 0?e.parentSampled?vt()*r:r+vt()*(1-r):vt()}const ul=0,Us=1;let Da=!1;function Vh(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:s,parent_span_id:o,status:i,origin:c,links:a}=G(e);return{parent_span_id:o,span_id:t,trace_id:n,data:r,op:s,status:i,origin:c,links:a}}function Yh(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),s=r?t:G(e).parent_span_id,o=xn(e).scope,i=r?(o==null?void 0:o.getPropagationContext().propagationSpanId)||lt():t;return{parent_span_id:s,span_id:i,trace_id:n}}function Kh(e){const{traceId:t,spanId:n}=e.spanContext(),r=Pt(e);return al(t,n,r)}function Jh(e){const{traceId:t,spanId:n}=e.spanContext(),r=Pt(e);return cl(t,n,r)}function ll(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:r,...s},attributes:o})=>({span_id:t,trace_id:n,sampled:r===Us,attributes:o,...s}))}function dl(e){if(e!=null&&e.length)return e.map(({context:{spanId:t,traceId:n,traceFlags:r},attributes:s})=>({span_id:t,trace_id:n,sampled:r===Us,attributes:s}))}function dt(e){return typeof e=="number"?ja(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?ja(e.getTime()):ge()}function ja(e){return e>9999999999?e/1e3:e}function G(e){if(ml(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(hl(e)){const{attributes:r,startTime:s,name:o,endTime:i,status:c,links:a}=e;return{span_id:t,trace_id:n,data:r,description:o,parent_span_id:pl(e),start_timestamp:dt(s),timestamp:dt(i)||void 0,status:gl(c),op:r[Ne],origin:r[de],links:ll(a)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function fl(e){if(ml(e))return e.getStreamedSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(hl(e)){const{attributes:r,startTime:s,name:o,endTime:i,status:c,links:a}=e;return{name:o,span_id:t,trace_id:n,parent_span_id:pl(e),start_timestamp:dt(s),end_timestamp:dt(i),is_segment:e===Go(e),status:Pi(c),attributes:_l(r,c),links:dl(a)}}return{span_id:t,trace_id:n,start_timestamp:0,name:"",end_timestamp:0,status:"ok",is_segment:e===Go(e)}}function pl(e){var t;return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?(t=e.parentSpanContext)==null?void 0:t.spanId:void 0}function Xh(e){var t;return{...e,attributes:Na(e.attributes),links:(t=e.links)==null?void 0:t.map(n=>({...n,attributes:Na(n.attributes)}))}}function hl(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function ml(e){return typeof e.getSpanJSON=="function"}function Pt(e){const{traceFlags:t}=e.spanContext();return t===Us}function gl(e){if(!(!e||e.code===el))return e.code===Bs?"ok":e.message||"internal_error"}function Pi(e){return!e||e.code===Bs||e.code===el||e.message==="cancelled"?"ok":"error"}function _l(e,t){const n=Pi(t)==="error"?t==null?void 0:t.message:void 0;return{...n&&{[Th]:n},...e}}const Qt="_sentryChildSpans",qo="_sentryRootSpan";function ss(e,t){const n=e[qo]||e;fe(t,qo,n),e[Qt]?e[Qt].add(t):fe(e,Qt,new Set([t]))}function Qh(e,t){e[Qt]&&e[Qt].delete(t)}function os(e){const t=new Set;function n(r){if(!t.has(r)&&Pt(r)){t.add(r);const s=r[Qt]?Array.from(r[Qt]):[];for(const o of s)n(o)}}return n(e),Array.from(t)}const Se=Go;function Go(e){return e[qo]||e}function Ee(){const e=Ct(),t=zn(e);return t.getActiveSpan?t.getActiveSpan():gs(ne())}function Vo(){Da||(Rt(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),Da=!0)}let Fa=!1;function Zh(){if(Fa)return;function e(){const t=Ee(),n=t&&Se(t);if(n){const r="internal_error";L&&b.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:ye,message:r})}}Fa=!0,$u(e),Bu(e)}function Ue(e){var n;if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||((n=Y())==null?void 0:n.getOptions());return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function $a(e){b.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function hr(e,t){if(!(t!=null&&t.length))return!1;for(const n of t){if(nm(n)){if(e.description&&sr(e.description,n))return L&&$a(e),!0;continue}const r=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!r)continue;const s=n.name?e.description&&sr(e.description,n.name):!0,o=n.op?e.op&&sr(e.op,n.op):!0,i=n.attributes?Object.entries(n.attributes).every(([c,a])=>{var u;return em((u=e.attributes)==null?void 0:u[c],a)}):!0;if(s&&o&&i)return L&&$a(e),!0}return!1}function em(e,t){return typeof e=="string"&&(typeof t=="string"||t instanceof RegExp)?sr(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e===t}function tm(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const s of e)s.parent_span_id===r&&(s.parent_span_id=n)}function nm(e){return typeof e=="string"||e instanceof RegExp}const yl=Symbol.for("sentry.nonRecordingSpan");class on{constructor(t={}){this._traceId=t.traceId||ht(),this._spanId=t.spanId||lt(),this.dropReason=t.dropReason,fe(this,yl,!0)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:ul}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}
13addEvent(t,n,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}}function Pn(e){return!!e&&e[yl]===!0}const Li="production",Sl="_frozenDsc";function Ba(e,t){fe(e,Sl,t)}function vl(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},s={environment:n.environment||Li,release:n.release,public_key:r,trace_id:e,org_id:Hh(t)};return t.emit("createDsc",s),s}function Di(e,t){const n=t.getPropagationContext();return n.dsc||vl(n.traceId,e)}function Lt(e){var _;const t=Y();if(!t)return{};const n=Se(e),r=G(n),s=r.data,o=n.spanContext().traceState,i=(o==null?void 0:o.get("sentry.sample_rate"))??s[Oi]??s[Zu];function c(v){return(typeof i=="number"||typeof i=="string")&&(v.sample_rate=`${i}`),v}const a=n[Sl];if(a)return c(a);const u=Pn(n),l=u&&n.dropReason==="ignored";if(u&&(!Ue(t.getOptions())||l)){const v=xn(n).scope;if(v){const S={...Di(t,v)};return l&&(S.sampled="false"),c(S)}}const d=o==null?void 0:o.get("sentry.dsc"),f=d&&sl(d);if(f)return c(f);const h=vl(e.spanContext().traceId,t),m=s[he]??s["sentry.segment.name.source"],g=r.description;return m!=="url"&&g&&(h.transaction=g),Ue()&&(h.sampled=String(Pt(n)),h.sample_rand=(o==null?void 0:o.get("sentry.sample_rand"))??((_=xn(n).scope)==null?void 0:_.getPropagationContext().sampleRand.toString())),c(h),t.emit("createDsc",h,n),h}function bl(e){return!!e&&typeof e=="function"&&"_streamed"in e&&!!e._streamed}function Dt(e,t=[]){return[e,t]}function Ua(e,t){const[n,r]=e;return[n,[...r,t]]}function Yo(e,t){const n=e[1];for(const r of n){const s=r[0].type;if(t(r,s))return!0}return!1}function rm(e,t){return Yo(e,(n,r)=>t.includes(r))}function Ko(e){const t=kr(J);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function sm(e){const[t,n]=e;let r=JSON.stringify(t);function s(o){typeof r=="string"?r=typeof o=="string"?r+o:[Ko(r),o]:r.push(typeof o=="string"?Ko(o):o)}for(const o of n){const[i,c]=o;if(s(`
14${JSON.stringify(i)}
15`),typeof c=="string"||c instanceof Uint8Array)s(c);else{let a;try{a=JSON.stringify(c)}catch{a=JSON.stringify(Ke(c))}s(a)}}return typeof r=="string"?r:om(r)}function om(e){const t=e.reduce((s,o)=>s+o.length,0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function im(e){return[{type:"span"},e]}function am(e){const t=typeof e.data=="string"?Ko(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const El={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 cm(e){return e in El}function Ha(e){return cm(e)?El[e]:e}function ji(e){if(!(e!=null&&e.sdk))return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function wl(e,t,n,r){var o;const s=(o=e.sdkProcessingMetadata)==null?void 0:o.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(Ot()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:qn(r)},...s&&{trace:s}}}function um(e,t){var r,s,o,i;if(!t)return e;const n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...((r=e.sdk)==null?void 0:r.integrations)||[],...t.integrations||[]],packages:[...((s=e.sdk)==null?void 0:s.packages)||[],...t.packages||[]],settings:(o=e.sdk)!=null&&o.settings||t.settings?{...(i=e.sdk)==null?void 0:i.settings,...t.settings}:void 0},e}function lm(e,t,n,r){const s=ji(n),o={sent_at:new Date(Ot()).toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:qn(t)}},i="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Dt(o,[i])}function dm(e,t,n,r){const s=ji(n),o=e.type&&e.type!=="replay_event"?e.type:"event";um(e,n==null?void 0:n.sdk);const i=wl(e,s,r,t);return delete e.sdkProcessingMetadata,Dt(i,[[{type:o},e]])}function fm(e,t){function n(h){return!!h.trace_id&&!!h.public_key}const r=Lt(e[0]),s=t==null?void 0:t.getDsn(),o=t==null?void 0:t.getOptions().tunnel,i={sent_at:new Date(Ot()).toISOString(),...n(r)&&{trace:r},...!!o&&s&&{dsn:qn(s)}},{beforeSendSpan:c,ignoreSpans:a}=(t==null?void 0:t.getOptions())||{},u=a!=null&&a.length?e.filter(h=>{const m=G(h);return!hr({description:m.description,op:m.op,attributes:m.data},a)}):e,l=e.length-u.length;l&&(t==null||t.recordDroppedEvent("before_send","span",l));const d=c?h=>{const m=G(h),g=bl(c)?m:c(m);return g||(Vo(),m)}:G,f=[];for(const h of u){const m=d(h);m&&f.push(im(m))}return Dt(i,f)}function pm(e){if(!L)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=G(e),{spanId:s}=e.spanContext(),o=Pt(e),i=Se(e),c=i===e,a=`[Tracing] Starting ${o?"sampled":"unsampled"} ${c?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${s}`];if(r&&u.push(`parent ID: ${r}`),!c){const{op:l,description:d}=G(i);u.push(`root ID: ${i.spanContext().spanId}`),l&&u.push(`root op: ${l}`),d&&u.push(`root description: ${d}`)}b.log(`${a}
16  ${u.join(`
17  `)}`)}function hm(e){if(!L)return;const{description:t="< unknown name >",op:n="< unknown op >"}=G(e),{spanId:r}=e.spanContext(),o=Se(e)===e,i=`[Tracing] Finishing "${n}" ${o?"root ":""}span "${t}" with ID ${r}`;b.log(i)}function Tl(e,t,n,r=Ee()){const s=r&&Se(r);s&&(L&&b.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),s.addEvent(e,{[Nr]:t,[Ar]:n}))}function Wa(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},s=r[Ar],o=r[Nr];typeof s=="string"&&typeof o=="number"&&(t[n.name]={value:o,unit:s})}),t}function za(){return kr(Ct()).segmentSpanCaptureStrategy}function ot(e){return e.getOptions().traceLifecycle==="stream"}const qa=1e3;class Hs{constructor(t={}){this._traceId=t.traceId||ht(),this._spanId=t.spanId||lt(),this._startTime=t.startTimestamp||ge(),this._links=t.links,this._attributes={},this.setAttributes({[de]:"manual",[Ne]: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()}
17addLink(t){return this._frozen?this:(this._links?this._links.push(t):this._links=[t],this)}addLinks(t){return this._frozen?this:(this._links?this._links.push(...t):this._links=t,this)}recordException(t,n){}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?Us:ul}}setAttribute(t,n){return this._frozen?this:(n===void 0?delete this._attributes[t]:this._attributes[t]=n,t===he&&n!==void 0&&Ma(this)&&Nh(this),this)}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._frozen||(this._startTime=dt(t))}setStatus(t){return this._frozen?this:(this._status=t,this)}updateName(t){return this._frozen?this:(this._name=t,Ma(this)||this.setAttribute(he,"custom"),this)}end(t){if(this._endTime){this._frozen=Pa(this);return}this._endTime=dt(t),hm(this),this._onSpanEnded(),this._frozen=Pa(this)}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[Ne],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:gl(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[de],profile_id:this._attributes[Mi],exclusive_time:this._attributes[Mt],measurements:Wa(this._events),is_segment:this._isStandaloneSpan&&Se(this)===this||void 0,segment_id:this._isStandaloneSpan?Se(this).spanContext().spanId:void 0,links:ll(this._links)}}getStreamedSpanJSON(){return{name:this._name??"",span_id:this._spanId,trace_id:this._traceId,parent_span_id:this._parentSpanId,start_timestamp:this._startTime,end_timestamp:this._endTime??this._startTime,is_segment:this._isStandaloneSpan||this===Se(this),status:Pi(this._status),attributes:_l(this._attributes,this._status),links:dl(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){if(this._frozen)return this;L&&b.log("[Tracing] Adding an event to span:",t);const s=Ga(n)?n:r||ge(),o=Ga(n)?{}:n||{},i={name:t,time:dt(s),attributes:o};return this._events.push(i),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=Y();t&&(t.emit("spanEnd",this),this._isStandaloneSpan||t.emit("afterSpanEnd",this));const n=Se(this),r=this._isStandaloneSpan||this===n;if(this._isStandaloneSpan){this._sampled?gm(fm([this],t)):(L&&b.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}if(!r){const i=za();if(i){const c=xn(this).scope||ne();i.onChildSpanEnded(this,n,a=>this._convertSpanToTransaction(a),c)}return}if(t&&ot(t)){t.emit("afterSegmentSpanEnd",this);return}const s=xn(this).scope||ne(),o=za();if(o)o.onSegmentSpanEnded(i=>this._convertSpanToTransaction(i),s);else{const i=this._convertSpanToTransaction();i&&s.captureEvent(i)}}_convertSpanToTransaction(t={}){var d,f,h,m;if(!Va(G(this)))return;this._name||(L&&b.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:n,isolationScope:r}=xn(this),s=(d=n==null?void 0:n.getScopeData().sdkProcessingMetadata)==null?void 0:d.normalizedRequest;if(this._sampled!==!0)return;(f=t.onSpanCaptured)==null||f.call(t,this);const o=[];for(const g of os(this)){if(g===this||mm(g)||(h=t.isSpanAlreadyCaptured)!=null&&h.call(t,g))continue;const _=G(g);Va(_)&&((m=t.onSpanCaptured)==null||m.call(t,g),o.push(_))}const i=this._attributes[he];delete this._attributes[Oa];let c=!1;o.forEach(g=>{var _;delete g.data[Oa],(_=g.op)!=null&&_.startsWith("gen_ai.")&&(c=!0)});const a={contexts:{trace:Vh(this)},spans:o.length>qa?o.sort((g,_)=>g.start_timestamp-_.start_timestamp).slice(0,qa):o,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:n,capturedSpanIsolationScope:r,dynamicSamplingContext:Lt(this),hasGenAiSpans:c},request:s,...i&&{transaction_info:{source:i}}},u=Wa(this._events);return u&&Object.keys(u).length&&(L&&b.log("[Measurements] Adding measurements to transaction event",JSON.stringify(u,void 0,2)),a.measurements=u),a}}function Ga(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function Va(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function mm(e){return e instanceof Hs&&e.isStandaloneSpan()}function gm(e){const t=Y();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function _m(e,t,n){if(!Ue(e))return[!1];let r,s;typeof e.tracesSampler=="function"?(s=e.tracesSampler({...t,inheritOrSampleWith:c=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):c}),r=!0):t.parentSampled!==void 0?s=t.parentSampled:typeof e.tracesSampleRate<"u"&&(s=e.tracesSampleRate,r=!0);const o=sn(s);if(o===void 0)return L&&b.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(s)} of type ${JSON.stringify(typeof s)}.`),[!1];if(!o)return L&&b.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,o,r];const i=n<o;return i||L&&b.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(s)})`),[i,o,r]}
17const ym="__SENTRY_SUPPRESS_TRACING__";function jt(e){const t=$i();return t.startInactiveSpan?t.startInactiveSpan(e):Sm(e)}function Sm(e){const t=Em(e),{forceTransaction:n,parentSpan:r}=e;return(e.scope?o=>Ni(e.scope,o):r!==void 0?o=>Il(r,o):o=>o())(()=>{const o=ne(),i=Tm(o,r),c=Y();return e.onlyIfParent&&!i?vm(o,c):bm({parentSpan:i,spanArguments:t,forceTransaction:n,scope:o})})}function Il(e,t){const n=$i();return n.withActiveSpan?n.withActiveSpan(e,t):Ni(r=>(fr(r,e||void 0),t(r)))}function Fi(e=ne()){const t=$i();return t.isTracingSuppressed?t.isTracingSuppressed(e):e.getScopeData().sdkProcessingMetadata[ym]===!0}function vm(e,t){t==null||t.recordDroppedEvent("no_parent_span","span");const n=new on({traceId:e.getPropagationContext().traceId});return Mn(n,e,Oe()),n}function bm({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){const s=Oe();if(!Ue()){const c={...s.getPropagationContext(),...r.getPropagationContext()},a=e?e.spanContext().traceId:c.traceId,u=new on({traceId:a});return e&&!n&&ss(e,u),Mn(u,r,s),u}const o=Y();if(Im(o,t)){Fi(r)||o==null||o.recordDroppedEvent("ignored","span");const c=new on({dropReason:"ignored",traceId:(e==null?void 0:e.spanContext().traceId)??r.getPropagationContext().traceId});return e&&!n&&ss(e,c),Mn(c,r,s),c}let i;if(e&&!n)i=wm(e,r,t,s),ss(e,i);else if(e){const c=Lt(e),{traceId:a,spanId:u}=e.spanContext(),l=Pt(e);i=Ya({traceId:a,parentSpanId:u,...t},r,s,l),Ba(i,c)}else{const{traceId:c,dsc:a,parentSpanId:u,sampled:l}={...s.getPropagationContext(),...r.getPropagationContext()};i=Ya({traceId:c,parentSpanId:u,...t},r,s,l),a&&Ba(i,a)}return pm(i),i}function Em(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=dt(e.startTime),delete r.startTime,r}return n}function $i(){const e=Ct();return zn(e)}function Ya(e,t,n,r){var _;const s=Y(),o=(s==null?void 0:s.getOptions())||{},{name:i=""}=e,c={spanAttributes:{...e.attributes},spanName:i,parentSampled:r};s==null||s.emit("beforeSampling",c,{decision:!1});const a=c.parentSampled??r,u=c.spanAttributes,l=t.getPropagationContext(),d=Fi(t),[f,h,m]=d?[!1]:_m(o,{name:i,parentSampled:a,attributes:u,normalizedRequest:n.getScopeData().sdkProcessingMetadata.normalizedRequest,parentSampleRate:sn((_=l.dsc)==null?void 0:_.sample_rate)},l.sampleRand),g=new Hs({...e,attributes:{[he]:"custom",[Oi]:h!==void 0&&m?h:void 0,...u},sampled:f});return!f&&s&&!d&&(L&&b.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),s.recordDroppedEvent("sample_rate",ot(s)?"span":"transaction")),Mn(g,t,n),s&&s.emit("spanStart",g),g}function wm(e,t,n,r){const{spanId:s,traceId:o}=e.spanContext(),i=Fi(t),c=i?!1:Pt(e),a=c?new Hs({...n,parentSpanId:s,traceId:o,sampled:c}):new on({traceId:o});ss(e,a),Mn(a,t,r);const u=Y();return u&&(ot(u)&&Pn(a)&&(Pn(e)&&e.dropReason?(a.dropReason=e.dropReason,u.recordDroppedEvent(e.dropReason,"span")):i||(a.dropReason="sample_rate",u.recordDroppedEvent("sample_rate","span"))),u.emit("spanStart",a),n.endTimestamp&&(u.emit("spanEnd",a),u.emit("afterSpanEnd",a))),a}function Tm(e,t){if(t)return t;if(t===null)return;const n=gs(e);if(!n)return;const r=Y();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?Se(n):n}function Im(e,t){var r;const n=e==null?void 0:e.getOptions().ignoreSpans;return!e||!ot(e)||!(n!=null&&n.length)?!1:hr({description:t.name||"",op:((r=t.attributes)==null?void 0:r[Ne])||t.op,attributes:t.attributes},n)}function xl(e){return Pn(e)&&e.dropReason==="ignored"}const is={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},xm="heartbeatFailed",km="idleTimeout",Cm="finalTimeout",Rm="externalFinish";function kl(e,t={}){const n=new Map;let r=!1,s,o=Rm,i=!t.disableAutoFinish;const c=[],{idleTimeout:a=is.idleTimeout,finalTimeout:u=is.finalTimeout,childSpanTimeout:l=is.childSpanTimeout,beforeSpanEnd:d,trimIdleSpanEndTimestamp:f=!0}=t,h=Y(),m=ne();if(!h||!Ue()){const y=new on({traceId:m.getPropagationContext().traceId});return Mn(y,m,Oe()),y}const g=Ee(),_=Am(e);_.end=new Proxy(_.end,{apply(y,N,j){if(d&&d(_),Pn(N))return;const[T,...C]=j,B=T||ge(),Z=dt(B),F=os(_).filter(A=>A!==_),ie=G(_);
17if(!F.length||!f)return P(Z),Reflect.apply(y,N,[Z,...C]);const I=h.getOptions().ignoreSpans,x=F==null?void 0:F.reduce((A,w)=>{const D=G(w);return!D.timestamp||I&&hr({description:D.description,op:D.op,attributes:D.data},I)?A:A?Math.max(A,D.timestamp):D.timestamp},void 0),k=ie.start_timestamp,V=Math.min(k?k+u/1e3:1/0,Math.max(k||-1/0,Math.min(Z,x||1/0)));return P(V),Reflect.apply(y,N,[V,...C])}});function v(){s&&(clearTimeout(s),s=void 0)}function S(y){v(),s=setTimeout(()=>{!r&&n.size===0&&i&&(o=km,_.end(y))},a)}function O(y){s=setTimeout(()=>{!r&&i&&(o=xm,_.end(y))},l)}function R(y){v(),n.set(y,!0);const N=ge();O(N+l/1e3)}function M(y){if(n.has(y)&&n.delete(y),n.size===0){const N=ge();S(N+a/1e3)}}function P(y){r=!0,n.clear(),c.forEach(F=>F()),fr(m,g);const N=G(_),{start_timestamp:j}=N;if(!j)return;N.data[pr]||_.setAttribute(pr,o);const C=N.status;(!C||C==="unknown")&&_.setStatus({code:Bs}),b.log(`[Tracing] Idle span "${N.op}" finished`);const B=os(_).filter(F=>F!==_);let Z=0;B.forEach(F=>{F.isRecording()&&(F.setStatus({code:ye,message:"cancelled"}),F.end(y),L&&b.log("[Tracing] Cancelling span since span ended early",JSON.stringify(F,void 0,2)));const ie=G(F),{timestamp:I=0,start_timestamp:x=0}=ie,k=x<=y,V=(u+a)/1e3,A=I-x<=V;if(L){const w=JSON.stringify(F,void 0,2);k?A||b.log("[Tracing] Discarding span since it finished after idle span final timeout",w):b.log("[Tracing] Discarding span since it happened after idle span was finished",w)}(!A||!k)&&(Qh(_,F),Z++)}),Z>0&&_.setAttribute("sentry.idle_span_discarded_spans",Z)}return c.push(h.on("spanStart",y=>{if(r||y===_||G(y).timestamp||y instanceof Hs&&y.isStandaloneSpan())return;os(_).includes(y)&&R(y.spanContext().spanId)})),c.push(h.on("spanEnd",y=>{r||M(y.spanContext().spanId)})),c.push(h.on("idleSpanEnableAutoFinish",y=>{y===_&&(i=!0,S(),n.size&&O())})),t.disableAutoFinish||S(),setTimeout(()=>{r||(_.setStatus({code:ye,message:"deadline_exceeded"}),o=Cm,_.end())},u),_}function Am(e){const t=jt(e);return fr(ne(),t),L&&b.log("[Tracing] Started span is an idle span"),t}function Nm(e,t,n){let r,s,o;const i=n!=null&&n.maxWait?Math.max(n.maxWait,t):0,c=(n==null?void 0:n.setTimeoutImpl)||setTimeout;function a(){return u(),r=e(),r}function u(){s!==void 0&&clearTimeout(s),o!==void 0&&clearTimeout(o),s=o=void 0}function l(){return s!==void 0||o!==void 0?a():r}function d(){return s&&clearTimeout(s),s=c(a,t),i&&o===void 0&&(o=c(a,i)),r}return d.cancel=u,d.flush=l,d}function Om(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:o}=t;Mm(e,t),r&&Dm(e,r),jm(e,n),Pm(e,s),Lm(e,o)}function Ka(e,t){const{extra:n,tags:r,attributes:s,user:o,contexts:i,level:c,sdkProcessingMetadata:a,breadcrumbs:u,fingerprint:l,eventProcessors:d,attachments:f,propagationContext:h,transactionName:m,span:g}=t;Zn(e,"extra",n),Zn(e,"tags",r),Zn(e,"attributes",s),Zn(e,"user",o),Zn(e,"contexts",i),e.sdkProcessingMetadata=Rr(e.sdkProcessingMetadata,a,2),c&&(e.level=c),m&&(e.transactionName=m),g&&(e.span=g),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...h}}function Zn(e,t,n){e[t]=Rr(e[t],n,1)}function Cl(e,t){const n=Eh().getScopeData();return e&&Ka(n,e.getScopeData()),t&&Ka(n,t.getScopeData()),n}function Mm(e,t){const{extra:n,tags:r,user:s,contexts:o,level:i,transactionName:c}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(s).length&&(e.user={...s,...e.user}),Object.keys(o).length&&(e.contexts={...o,...e.contexts}),i&&(e.level=i),c&&e.type!=="transaction"&&(e.transaction=c)}function Pm(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Lm(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Dm(e,t){e.contexts={trace:Yh(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Lt(t),...e.sdkProcessingMetadata};const n=Se(t),r=G(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function jm(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}const Rl="http.url",Al="sentry.segment.name",Nl="sentry.transaction",Gn="url.full",Fm="url.path",mr="url.template";function ys(e,t){const n=e.attributes??(e.attributes={});Object.entries(t).forEach(([r,s])=>{s!=null&&!(r in n)&&(n[r]=s)})}const So=0,Ja=1,Xa=2;function Or(e){return new gr(t=>{t(e)})}function Ol(e){return new gr((t,n)=>{n(e)})}class gr{constructor(t){this._state=So,this._handlers=[],this._runExecutor(t)}then(t,n){return new gr((r,s)=>{this._handlers.push([!1,o=>{if(!t)r(o);else try{r(t(o))}catch(i){s(i)}},o=>{if(!n)s(o);else try{r(n(o))}catch(i){s(i)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new gr((n,r)=>{let s,o;return this.then(i=>{o=!1,s=i,t&&t()},i=>{o=!0,s=i,t&&t()}).then(()=>
17{if(o){r(s);return}n(s)})})}_executeHandlers(){if(this._state===So)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Ja&&n[1](this._value),this._state===Xa&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(o,i)=>{if(this._state===So){if(Wn(i)){i.then(r,s);return}this._state=o,this._value=i,this._executeHandlers()}},r=o=>{n(Ja,o)},s=o=>{n(Xa,o)};try{t(r,s)}catch(o){s(o)}}}function $m(e,t,n,r=0){try{const s=Jo(t,n,e,r);return Wn(s)?s:Or(s)}catch(s){return Ol(s)}}function Jo(e,t,n,r){const s=n[r];if(!e||!s)return e;const o=s({...e},t);return L&&o===null&&b.log(`Event processor "${s.id||"?"}" dropped event`),Wn(o)?o.then(i=>Jo(i,t,n,r+1)):Jo(o,t,n,r+1)}let at,Qa,Za,mt;function Bm(e){const t=J._sentryDebugIds,n=J._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],s=n?Object.keys(n):[];if(mt&&r.length===Qa&&s.length===Za)return mt;Qa=r.length,Za=s.length,mt={},at||(at={});const o=(i,c)=>{for(const a of i){const u=c[a],l=at==null?void 0:at[a];if(l&&mt&&u)mt[l[0]]=u,at&&(at[a]=[l[0],u]);else if(u){const d=e(a);for(let f=d.length-1;f>=0;f--){const h=d[f],m=h==null?void 0:h.filename;if(m&&mt&&at){mt[m]=u,at[a]=[m,u];break}}}}};return t&&o(r,t),n&&o(s,n),mt}function Ml(e,t,n,r,s,o){const{normalizeDepth:i=3,normalizeMaxBreadth:c=1e3}=e,a={...t,event_id:t.event_id||n.event_id||Be(),timestamp:t.timestamp||dn()},u=n.integrations||e.integrations.map(v=>v.name);Um(a,e),zm(a,u),s&&s.emit("applyFrameMetadata",t),t.type===void 0&&Hm(a,e.stackParser);const l=Gm(r,n.captureContext);n.mechanism&&Xt(a,n.mechanism);const d=s?s.getEventProcessors():[],f=Cl(o,l),h=[...n.attachments||[],...f.attachments];h.length&&(n.attachments=h),Om(a,f);const m=[...d,...f.eventProcessors];return(n.data&&n.data.__sentry__===!0?Or(a):$m(m,a,n)).then(v=>(v&&Wm(v),typeof i=="number"&&i>0?qm(v,i,c):v))}function Um(e,t){var c,a;const{environment:n,release:r,dist:s,maxValueLength:o}=t;e.environment=e.environment||n||Li,!e.release&&r&&(e.release=r),!e.dist&&s&&(e.dist=s);const i=e.request;i!=null&&i.url&&o&&(i.url=Ho(i.url,o)),o&&((a=(c=e.exception)==null?void 0:c.values)==null||a.forEach(u=>{u.value&&(u.value=Ho(u.value,o))}))}function Hm(e,t){var r,s;const n=Bm(t);(s=(r=e.exception)==null?void 0:r.values)==null||s.forEach(o=>{var i,c;(c=(i=o.stacktrace)==null?void 0:i.frames)==null||c.forEach(a=>{a.filename&&(a.debug_id=n[a.filename])})})}function Wm(e){var r,s;const t={};if((s=(r=e.exception)==null?void 0:r.values)==null||s.forEach(o=>{var i,c;(c=(i=o.stacktrace)==null?void 0:i.frames)==null||c.forEach(a=>{a.debug_id&&(a.abs_path?t[a.abs_path]=a.debug_id:a.filename&&(t[a.filename]=a.debug_id),delete a.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([o,i])=>{n.push({type:"sourcemap",code_file:o,debug_id:i})})}function zm(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function qm(e,t,n){var s,o;if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:Ke(i.data,t,n)}}))},...e.user&&{user:Ke(e.user,t,n)},...e.contexts&&{contexts:Ke(e.contexts,t,n)},...e.extra&&{extra:Ke(e.extra,t,n)}};return(s=e.contexts)!=null&&s.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Ke(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(i=>({...i,...i.data&&{data:Ke(i.data,t,n)}}))),(o=e.contexts)!=null&&o.flags&&r.contexts&&(r.contexts.flags=Ke(e.contexts.flags,3,n)),r}function Gm(e,t){if(!t)return e;const n=e?e.clone():new st;return n.update(t),n}function Vm(e){if(e)return Ym(e)?{captureContext:e}:Jm(e)?{captureContext:e}:e}function Ym(e){return e instanceof st||typeof e=="function"}const Km=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Jm(e){return Object.keys(e).some(t=>Km.includes(t))}function Bi(e,t){return ne().captureException(e,Vm(t))}function Pl(e,t){return ne().captureEvent(e,t)}function Ll(e,t){Oe().setContext(e,t)}function ec(e){Oe().setUser(e)}function Xm(){const e=Y();return(e==null?void 0:e.getOptions().enabled)!==!1&&!!(e!=null&&e.getTransport())}function Qm(e){Oe().addEventProcessor(e)}function tc(e){const t=Oe(),{user:n}=Cl(t,ne()),{userAgent:r}=J.navigator||{},s=oh({user:n,...r&&{userAgent:r},...e}),o=t.getSession();return(o==null?void 0:o.status)==="ok"&&Nn(o,{status:"exited"}),Dl(),t.setSession(s),s}function Dl(){const e=Oe(),n=ne().getSession()||e.getSession();n&&ih(n),jl(),e.setSession()}function jl(){const e=Oe(),t=Y(),n=e.getSession();n&&t&&t.captureSession(n)}function vo(e=!1){if(e){Dl();return}jl()}function Fl(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}const Zm="7";function eg(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function tg(e){return`${eg(e)}${e.projectId}/envelope/`}function ng(e,t){const n={sentry_version:Zm};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function rg(e,t,n){return t||`${tg(e)}?${ng(e,n)}`}const nc=[];function sg(e){const t={};return e.forEach(n=>{const{name:r}=n,s=t[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function og(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(s=>{s.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const s=n(t);r=Array.isArray(s)?s:[s]}else r=t;return sg(r)}function ig(e,t){const n={};return t.forEach(r=>{r!=null&&r.beforeSetup&&r.beforeSetup(e)}),t.forEach(r=>{r&&$l(e,r,n)}),n}function rc(e,t){for(const n of t)n!=null&&n.afterAllSetup&&n.afterAllSetup(e)}function $l(e,t,n){if(n[t.name]){L&&b.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!nc.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),nc.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(s,o)=>r(s,o,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),s=Object.assign((o,i)=>r(o,i,e),{id:t.name});e.addEventProcessor(s)}["processSpan","processSegmentSpan"].forEach(r=>{const s=t[r];typeof s=="function"&&e.on(r,o=>s.call(t,o,e))}),L&&b.log(`Integration installed: ${t.name}`)}function ag(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function cg(){/*! __SENTRY_SDK_SOURCE__ */return"npm"}function ug(){return!ag()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function Ln(){return typeof window<"u"&&(!ug()||lg())}function lg(){const e=J.process;return(e==null?void 0:e.type)==="renderer"}function dg(e,t){const n=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...Ln()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}
17function fg(e,t,n,r,s){const o={};return t!=null&&t.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=qn(r)),Dt(o,[dg(e,s)])}function pg(e,t){const n=t??hg(e)??[];if(n.length===0)return;const r=e.getOptions(),s=fg(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);Bl().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(s)}function hg(e){return Bl().get(e)}function Bl(){return Un("clientToLogBufferMap",()=>new WeakMap)}function mg(e,t){const n=t?"auto":"never";return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{version:2,...Ln()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function gg(e,t,n,r,s){const o={};return t!=null&&t.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=qn(r)),Dt(o,[mg(e,s)])}function _g(e,t){const n=t??yg(e)??[];if(n.length===0)return;const r=e.getOptions(),s=gg(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);Ul().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(s)}function yg(e){return Ul().get(e)}function Ul(){return Un("clientToMetricBufferMap",()=>new WeakMap)}function Sg(e){const t={trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,name:e.description||"",start_timestamp:e.start_timestamp,end_timestamp:e.timestamp||e.start_timestamp,status:!e.status||e.status==="ok"||e.status==="cancelled"?"ok":"error",is_segment:!1,attributes:{...e.data},links:e.links};return Xh(t)}function vg(e,t){var o,i,c;if(e.type!=="transaction"||!((o=e.spans)!=null&&o.length)||!((i=e.sdkProcessingMetadata)!=null&&i.hasGenAiSpans)||t.getOptions().streamGenAiSpans===!1||ot(t))return;const n=[],r=[];for(const a of e.spans)(c=a.op)!=null&&c.startsWith("gen_ai.")?n.push(Sg(a)):r.push(a);if(n.length===0)return;e.spans=r;const s=t.getDataCollectionOptions().userInfo?"auto":"never";return[{type:"span",item_count:n.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...Ln()&&{ingest_settings:{infer_ip:s,infer_user_agent:s}},items:n}]}const Ui=Symbol.for("SentryBufferFullError");function Hi(e=100){const t=new Set;function n(){return t.size<e}function r(i){t.delete(i)}function s(i){if(!n())return Ol(Ui);const c=i();return t.add(c),c.then(()=>r(c),()=>r(c)),c}function o(i){if(!t.size)return Or(!0);const c=Promise.allSettled(Array.from(t)).then(()=>!0);if(!i)return c;const a=[c,new Promise(u=>Fl(setTimeout(()=>u(!1),i)))];return Promise.race(a)}return{get $(){return Array.from(t)},add:s,drain:o}}const bg=60*1e3;function Eg(e,t=Ot()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?bg:r-t}function wg(e,t){return e[t]||e.all||0}function Hl(e,t,n=Ot()){return wg(e,t)>n}function Wl(e,{statusCode:t,headers:n},r=Ot()){const s={...e},o=n==null?void 0:n["x-sentry-rate-limits"],i=n==null?void 0:n["retry-after"];if(o)for(const c of o.trim().split(",")){const[a,u,,,l]=c.split(":",5),d=parseInt(a,10),f=(isNaN(d)?60:d)*1e3;if(!u)s.all=r+f;else for(const h of u.split(";"))h==="metric_bucket"?(!l||l.split(";").includes("custom"))&&(s[h]=r+f):s[h]=r+f}else i?s.all=r+Eg(i,r):t===429&&(s.all=r+60*1e3);return s}const zl=64;function Tg(e,t,n=Hi(e.bufferSize||zl)){let r={};const s=i=>n.drain(i);function o(i){const c=[];if(Yo(i,(d,f)=>{const h=Ha(f);Hl(r,h)?e.recordDroppedEvent("ratelimit_backoff",h):c.push(d)}),c.length===0)return Promise.resolve({});const a=Dt(i[0],c),u=d=>{if(rm(a,["client_report"])){L&&b.warn(`Dropping client report. Will not send outcomes (reason: ${d}).`);return}Yo(a,(f,h)=>{e.recordDroppedEvent(d,Ha(h))})},l=()=>t({body:sm(a)}).then(d=>d.statusCode===413?(L&&b.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),u("send_error"),d):(L&&d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&b.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=Wl(r,d),d),d=>{throw u("network_error"),L&&b.error("Encountered error running transport request:",d),d});return n.add(l).then(d=>d,d=>{if(d===Ui)return L&&b.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw d})}return{send:o,flush:s}}function Ig(e,t,n){const r=[{type:"client_report"},{timestamp:n||dn(),discarded_events:e}];return Dt(t?{dsn:t}:{},[r])}function ql(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n!=null&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function xg(e){var a;const{trace_id:t,parent_span_id:n,span_id:r,status:s,origin:o,data:i,op:c}=((a=e.contexts)==null?void 0:a.trace)??{};return{data:i??{},description:e.transaction,op:c,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:s,timestamp:e.timestamp,trace_id:t??"",origin:o,profile_id:i==null?void 0:i[Mi],exclusive_time:i==null?void 0:i[Mt],measurements:e.measurements,is_segment:!0}}function kg(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[Mi]:e.profile_id},...e.exclusive_time&&{[Mt]:e.exclusive_time}}}},measurements:e.measurements}}const Gr=["forwarded","-ip","remote-","via","-user"];function Cg(e){return e===!0?{userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0}
17,databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:7}:{userInfo:!1,cookies:{deny:Gr},httpHeaders:{request:{deny:Gr},response:{deny:Gr}},httpBodies:[],urlQueryParams:{deny:Gr},graphQL:{document:!0,variables:!0},genAI:{inputs:!1,outputs:!1},databaseQueryData:!1,stackFrameVariables:!0,frameContextLines:7}}const Rg={userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:5};function Ag(e){var r,s,o,i,c,a;const t=e.dataCollection!=null?Rg:Cg(e.sendDefaultPii),n=e.dataCollection??{};return{userInfo:n.userInfo??t.userInfo,cookies:n.cookies??t.cookies,httpHeaders:{request:((r=n.httpHeaders)==null?void 0:r.request)??t.httpHeaders.request,response:((s=n.httpHeaders)==null?void 0:s.response)??t.httpHeaders.response},httpBodies:n.httpBodies??t.httpBodies,urlQueryParams:n.urlQueryParams??n.queryParams??t.urlQueryParams,graphQL:{document:((o=n.graphQL)==null?void 0:o.document)??t.graphQL.document,variables:((i=n.graphQL)==null?void 0:i.variables)??t.graphQL.variables},genAI:{inputs:((c=n.genAI)==null?void 0:c.inputs)??t.genAI.inputs,outputs:((a=n.genAI)==null?void 0:a.outputs)??t.genAI.outputs},databaseQueryData:n.databaseQueryData??t.databaseQueryData,stackFrameVariables:n.stackFrameVariables??t.stackFrameVariables,frameContextLines:n.frameContextLines??t.frameContextLines}}const sc="Not capturing exception because it's already been captured.",oc="Discarded session because of missing or non-string release",Gl=Symbol.for("SentryInternalError"),Vl=Symbol.for("SentryDoNotSendEventError"),Ng=5e3;function as(e){return{message:e,[Gl]:!0}}function bo(e){return{message:e,[Vl]:!0}}function ic(e){return ln(e)&&Gl in e}function ac(e){return ln(e)&&Vl in e}function cc(e,t,n,r,s){let o=0,i,c=!1;e.on(n,()=>{o=0,clearTimeout(i),c=!1}),e.on(t,a=>{if(o+=r(a),o>=8e5)s(e);else if(!c){const u=e.getOptions()._flushInterval??Ng;u>0&&(c=!0,i=Fl(setTimeout(()=>{s(e)},u)))}}),e.on("flush",()=>{s(e)})}class Og{constructor(t){var r,s,o;if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Hi(((r=t.transportOptions)==null?void 0:r.bufferSize)??zl),this._dataCollection=Ag(t),t.dsn?this._dsn=Wh(t.dsn):L&&b.warn("No DSN provided, client will not send events."),this._dsn){const i=rg(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:i})}this._options.enableLogs=this._options.enableLogs??((s=this._options._experiments)==null?void 0:s.enableLogs),this._options.enableLogs&&cc(this,"afterCaptureLog","flushLogs",Dg,pg),(this._options.enableMetrics??((o=this._options._experiments)==null?void 0:o.enableMetrics)??!0)&&cc(this,"afterCaptureMetric","flushMetrics",Lg,_g)}captureException(t,n,r){const s=Be();if(ka(t))return L&&b.log(sc),s;const o={event_id:s,...n};return this._process(()=>this.eventFromException(t,o).then(i=>this._captureEvent(i,o,r)).then(i=>i),"error"),o.event_id}captureMessage(t,n,r,s){const o={event_id:Be(),...r},i=Ci(t)?t:String(t),c=rn(t),a=c?this.eventFromMessage(i,n,o):this.eventFromException(t,o);return this._process(()=>a.then(u=>this._captureEvent(u,o,s)),c?"unknown":"error"),o.event_id}captureEvent(t,n,r){const s=Be();if(n!=null&&n.originalException&&ka(n.originalException))return L&&b.log(sc),s;const o={event_id:s,...n},i=t.sdkProcessingMetadata||{},c=i.capturedSpanScope,a=i.capturedSpanIsolationScope,u=uc(t.type);return this._process(()=>this._captureEvent(t,o,c||r,a),u),o.event_id}captureSession(t){this.sendSession(t),Nn(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 n=this._transport;
17if(this.emit("flush"),!n)return!0;const r=await this._isClientDoneProcessing(t),s=await n.flush(t);return r&&s}async close(t){const n=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),n}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(t){const n=this._integrations[t.name];!n&&t.beforeSetup&&t.beforeSetup(this),$l(this,t,this._integrations),n||rc(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);const r=vg(t,this);let s=dm(t,this._dsn,this._options._metadata,this._options.tunnel);for(const o of n.attachments||[])s=Ua(s,am(o));r&&(s=Ua(s,r)),this.sendEnvelope(s).then(o=>this.emit("afterSendEvent",t,o))}sendSession(t){const{release:n,environment:r=Li}=this._options;if("aggregates"in t){const o=t.attrs||{};if(!o.release&&!n){L&&b.warn(oc);return}o.release=o.release||n,o.environment=o.environment||r,t.attrs=o}else{if(!t.release&&!n){L&&b.warn(oc);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const s=lm(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(s)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const s=`${t}:${n}`;L&&b.log(`Recording outcome: "${s}"${r>1?` (${r} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||new Set,s=(...o)=>n(...o);return r.add(s),()=>{r.delete(s)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(s=>s(...n))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(n){return L&&b.error("Error while sending envelope:",n),{}}return L&&b.error("Transport disabled"),{}}registerCleanup(t){}dispose(){}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=ig(this,t),rc(this,t)}_updateSessionFromEvent(t,n){var a,u;let r=n.level==="fatal",s=!1;const o=(a=n.exception)==null?void 0:a.values;if(o){s=!0,r=!1;for(const l of o)if(((u=l.mechanism)==null?void 0:u.handled)===!1){r=!0;break}}const i=t.status==="ok";(i&&t.errors===0||i&&r)&&(Nn(t,{...r&&{status:"crashed"},errors:t.errors||Number(s||r)}),this.captureSession(t))}async _isClientDoneProcessing(t){let n=0;for(;!t||n<t;){if(await new Promise(r=>setTimeout(r,1)),!this._numProcessing)return!0;n++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,s){const o=this.getOptions(),i=this.getIntegrationNames();return!n.integrations&&i.length&&(n.integrations=i),this.emit("preprocessEvent",t,n),t.type||s.setLastEventId(t.event_id||n.event_id),Ml(o,t,n,r,this,s).then(c=>{var u;if(c===null)return c;this.emit("postprocessEvent",c,n),c.contexts={trace:{...(u=c.contexts)==null?void 0:u.trace,...wh(r)},...c.contexts};const a=Di(this,r);return c.sdkProcessingMetadata={dynamicSamplingContext:a,...c.sdkProcessingMetadata},c})}_captureEvent(t,n={},r=ne(),s=Oe()){return L&&Xo(t)&&b.log(`Captured error event \`${ql(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,s).then(o=>o.event_id,o=>{L&&(ac(o)?b.log(o.message):ic(o)?b.warn(o.message):b.warn(o))})}_processEvent(t,n,r,s){const o=this.getOptions(),{sampleRate:i}=o,c=Yl(t),a=Xo(t),l=`before send for type \`${t.type||"error"}\``,d=typeof i>"u"?void 0:sn(i),f=uc(t.type);return this._prepareEvent(t,n,r,s).then(h=>{var _;if(h===null)throw this.recordDroppedEvent("event_processor",f),bo("An event processor returned `null`, will not send event.");if(((_=n.data)==null?void 0:_.__sentry__)===!0)return h;const g=Pg(this,o,h,n);return Mg(g,l)}).then(h=>{var _;if(h===null){if(this.recordDroppedEvent("before_send",f),c){const S=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",S)}throw bo(`${l} returned \`null\`, will not send event.`)}const m=r.getSession()||s.getSession();if(a&&m&&this._updateSessionFromEvent(m,h),a&&typeof d=="number"&&vt()>d)throw this.recordDroppedEvent("sample_rate","error"),bo(`Discarding event because it's not included in the random sample (sampling rate = ${i})`);
17if(c){const v=((_=h.sdkProcessingMetadata)==null?void 0:_.spanCountBeforeProcessing)||0,S=h.spans?h.spans.length:0,O=v-S;O>0&&this.recordDroppedEvent("before_send","span",O)}const g=h.transaction_info;if(c&&g&&h.transaction!==t.transaction){const v="custom";h.transaction_info={...g,source:v}}return this.sendEvent(h,n),h}).then(null,h=>{throw ac(h)||ic(h)?h:(this.captureException(h,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:h}),as(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
18Reason: ${h}`))})}_process(t,n){this._numProcessing++,this._promiseBuffer.add(t).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===Ui&&this.recordDroppedEvent("queue_overflow",n),r))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[s,o]=n.split(":");return{reason:s,category:o,quantity:r}})}_flushOutcomes(){L&&b.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){L&&b.log("No outcomes to send");return}if(!this._dsn){L&&b.log("No dsn provided, will not send outcomes");return}L&&b.log("Sending outcomes:",t);const n=Ig(t,this._options.tunnel&&qn(this._dsn));this.sendEnvelope(n)}}function uc(e){return e==="replay_event"?"replay":e||"error"}function Mg(e,t){const n=`${t} must return \`null\` or a valid event.`;if(Wn(e))return e.then(r=>{if(!dr(r)&&r!==null)throw as(n);return r},r=>{throw as(`${t} rejected with ${r}`)});if(!dr(e)&&e!==null)throw as(n);return e}function Pg(e,t,n,r){const{beforeSend:s,beforeSendTransaction:o,ignoreSpans:i}=t,c=!bl(t.beforeSendSpan)&&t.beforeSendSpan;let a=n;if(Xo(a)&&s)return s(a,r);if(Yl(a)){if(c||i){const u=xg(a);if(i!=null&&i.length&&hr({description:u.description,op:u.op,attributes:u.data},i))return null;if(c){const l=c(u);l?a=Rr(n,kg(l)):Vo()}if(a.spans){const l=[],d=a.spans;for(const h of d){if(i!=null&&i.length&&hr({description:h.description,op:h.op,attributes:h.data},i)){tm(d,h);continue}if(c){const m=c(h);m?l.push(m):(Vo(),l.push(h))}else l.push(h)}const f=a.spans.length-l.length;f&&e.recordDroppedEvent("before_send","span",f),a.spans=l}}if(o){if(a.spans){const u=a.spans.length;a.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:u}}return o(a,r)}}return a}function Xo(e){return e.type===void 0}function Yl(e){return e.type==="transaction"}function Lg(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+Kl(e.attributes)}function Dg(e){let t=0;return e.message&&(t+=e.message.length*2),t+Kl(e.attributes)}function Kl(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*lc(n[0]):rn(n)?t+=lc(n):t+=100}),t}function lc(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function jg(e,t){t.debug===!0&&(L?b.enable():Rt(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),ne().update(t.initialScope);const r=new e(t);return Fg(r),r.init(),r}function Fg(e){ne().setClient(e)}const $g="thismessage:/";function Ws(e){return"isRelative"in e}function _r(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=t??(n?$g:void 0);try{if("canParse"in URL&&!URL.canParse(e,r))return;const s=new URL(e,r);return n?{isRelative:n,pathname:s.pathname,search:s.search,hash:s.hash}:s}catch{}}function Jl(e){if(Ws(e))return e.pathname;const t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function Zt(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function Bg(e){return e.split(/[?#]/,1)[0]}function Xe(e,t=!0){if(e.startsWith("data:")){const n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",s=e.includes(";base64,"),o=e.indexOf(",");let i="";if(t&&o!==-1){const c=e.slice(o+1);i=c.length>10?`${c.slice(0,10)}... [truncated]`:c}return`data:${r}${s?",base64":""}${i?`,${i}`:""}`}return e}function Ug(e,t){const n=t==null?void 0:t.getDsn(),r=t==null?void 0:t.getOptions().tunnel;return Wg(e,n)||Hg(e,r)}function Hg(e,t){return t?dc(e)===dc(t):!1}function Wg(e,t){const n=_r(e);return!n||Ws(n)||!t?!1:zg(n.hostname,t.host)&&/(^|&|\?)sentry_key=/.test(n.search)}function zg(e,t){return e===t||t.length>0&&e.endsWith(`.${t}`)}function dc(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function qg(e){var t;"aggregates"in e?((t=e.attrs)==null?void 0:t.ip_address)===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function Xl(e,t,n=[t],r="npm"){const s=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};s.name||(s.name=`sentry.javascript.${t}`,s.packages=n.map(o=>({name:`${r}:@sentry/${o}`,version:Jt})),s.version=Jt)}function Ql(e={}
18){const t=e.client||Y();if(!Xm()||!t)return{};const n=Ct(),r=zn(n);if(r.getTraceData)return r.getTraceData(e);const s=e.scope||ne(),o=e.span||Ee(),i=Pn(o)&&!Ue(t.getOptions());if(!o&&bh())return{};const c=o&&!i?Kh(o):Gg(s),a=o?Lt(o):Di(t,s),u=Mh(a);if(!il.test(c))return b.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const d={"sentry-trace":c,baggage:u};return e.propagateTraceparent&&(d.traceparent=o&&!i?Jh(o):Vg(s)),d}function Gg(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return al(t,r,n)}function Vg(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return cl(t,r,n)}const Yg=100;function Tt(e,t){const n=Y(),r=Oe();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:o=Yg}=n.getOptions();if(o<=0)return;const c={timestamp:dn(),...e},a=s?Rt(()=>s(c,t)):c;a!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",a,t),r.addBreadcrumb(a,o))}const Kg="FunctionToString",fc=new WeakMap,Jg=()=>({name:Kg,setupOnce(){const e=Function.prototype.toString;try{Function.prototype.toString=function(...t){const n=Ai(this);let r;try{fc.has(Y())&&n!==void 0&&(r=n)}catch{}return e.apply(r??this,t)}}catch{}},setup(e){fc.set(e,!0)}}),Xg=Jg,Qg=[/^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$/],Zg="EventFilters",e_=(e={})=>{let t;return{name:Zg,setup(n){const r=n.getOptions();t=pc(e,r)},processEvent(n,r,s){if(!t){const o=s.getOptions();t=pc(e,o)}return n_(n,t)?null:n}}},t_=(e={})=>({...e_(e),name:"InboundFilters"});function pc(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Qg],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function n_(e,t){if(e.type){if(e.type==="transaction"&&s_(e,t.ignoreTransactions))return L&&b.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
19Event: ${Wt(e)}`),!0}else{if(r_(e,t.ignoreErrors))return L&&b.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
20Event: ${Wt(e)}`),!0;if(c_(e))return L&&b.warn(`Event dropped due to not having an error message, error type or stacktrace.
21Event: ${Wt(e)}`),!0;if(o_(e,t.denyUrls))return L&&b.warn(`Event dropped due to being matched by \`denyUrls\` option.
22Event: ${Wt(e)}.
23Url: ${Ss(e)}`),!0;if(!i_(e,t.allowUrls))return L&&b.warn(`Event dropped due to not being matched by \`allowUrls\` option.
24Event: ${Wt(e)}.
25Url: ${Ss(e)}`),!0}return!1}function r_(e,t){return t!=null&&t.length?ql(e).some(n=>rt(n,t)):!1}function s_(e,t){if(!(t!=null&&t.length))return!1;const n=e.transaction;return n?rt(n,t):!1}function o_(e,t){if(!(t!=null&&t.length))return!1;const n=Ss(e);return n?rt(n,t):!1}function i_(e,t){if(!(t!=null&&t.length))return!0;const n=Ss(e);return n?rt(n,t):!0}function a_(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function Ss(e){var t,n;try{const r=[...((t=e.exception)==null?void 0:t.values)??[]].reverse().find(o=>{var i,c,a;return((i=o.mechanism)==null?void 0:i.parent_id)===void 0&&((a=(c=o.stacktrace)==null?void 0:c.frames)==null?void 0:a.length)}),s=(n=r==null?void 0:r.stacktrace)==null?void 0:n.frames;return s?a_(s):null}catch{return L&&b.error(`Cannot extract url for event ${Wt(e)}`),null}}function c_(e){var t,n;return(n=(t=e.exception)==null?void 0:t.values)!=null&&n.length?!e.message&&!e.exception.values.some(r=>r.stacktrace||r.type&&r.type!=="Error"||r.value):!1}function u_(e,t,n,r,s,o){var c;if(!((c=s.exception)!=null&&c.values)||!o||!pt(o.originalException))return;const i=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;i&&(s.exception.values=Qo(e,t,r,o.originalException,n,s.exception.values,i,0
25))}function Qo(e,t,n,r,s,o,i,c){if(o.length>=n+1)return o;let a=[...o];if(pt(r[s])){hc(i,c,r);const u=e(t,r[s]),l=a.length;mc(u,s,l,c),a=Qo(e,t,n,r[s],s,[u,...a],u,l)}return Zl(r)&&r.errors.forEach((u,l)=>{if(pt(u)){hc(i,c,r);const d=e(t,u),f=a.length;mc(d,`errors[${l}]`,f,c),a=Qo(e,t,n,u,s,[d,...a],d,f)}}),a}function Zl(e){return Array.isArray(e.errors)}function hc(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...Zl(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function mc(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function l_(e){return pt(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function gc(e){return l_(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}const _c=new Set([]);function d_(e){const t="console",n=At(t,e);return Nt(t,f_),n}const yc=new Set;function f_(){"console"in J&&Op.forEach(function(e){yc.has(e)||!(e in J.console)||(yc.add(e),je(J.console,e,function(t){return ms[e]=t,function(...n){const r=n[0],s=ms[e],o=_c.size&&typeof r=="string"&&rt(r,_c);o||Ge("console",{args:n,level:e}),(!o||L&&b.isEnabled())&&(s==null||s.apply(J.console,n))}}))})}function ed(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const p_="Dedupe",h_=()=>{let e;return{name:p_,processEvent(t){if(t.type)return t;try{if(g_(t,e))return L&&b.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},m_=h_;function g_(e,t){return t?!!(__(e,t)||y_(e,t)):!1}function __(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!nd(e,t)||!td(e,t))}function y_(e,t){const n=Sc(t),r=Sc(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!nd(e,t)||!td(e,t))}function td(e,t){let n=Ea(e),r=Ea(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s<r.length;s++){const o=r[s],i=n[s];if(o.filename!==i.filename||o.lineno!==i.lineno||o.colno!==i.colno||o.function!==i.function)return!1}return!0}function nd(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function Sc(e){var t,n;return(n=(t=e.exception)==null?void 0:t.values)==null?void 0:n[0]}const S_="ConversationId",v_=()=>({name:S_,setup(e){e.on("spanStart",t=>{const n=ne().getScopeData(),r=Oe().getScopeData(),s=n.conversationId||r.conversationId;if(s){const{op:o,data:i,description:c}=G(t);if(!(o!=null&&o.startsWith("gen_ai."))&&!i["ai.operationId"]&&!(c!=null&&c.startsWith("ai.")))return;t.setAttribute(xh,s)}})}}),b_=v_;function E_(e,t,n,r,s){if(!e.fetchData)return;const{method:o,url:i}=e.fetchData,c=Ue()&&t(i);if(e.endTimestamp){const g=e.fetchData.__span;if(!g)return;const _=r[g];_&&(c&&(I_(_,e),w_(_,e,s)),delete r[g]);return}const{spanOrigin:a="auto.http.browser",propagateTraceparent:u=!1}=typeof s=="object"?s:{spanOrigin:s},l=Y(),d=!!Ee(),f=d||!!l&&ot(l),h=c&&f?jt(C_(i,o,a)):new on,m=xl(h)&&d?void 0:h;if(c&&!f&&(l==null||l.recordDroppedEvent("no_parent_span","span")),e.fetchData.__span=h.spanContext().spanId,r[h.spanContext().spanId]=h,n(e.fetchData.url)){const g=e.args[0],_={...e.args[1]||{}},v=T_(g,_,Ue()&&f?m:void 0,u);v&&(e.args[1]=_,_.headers=v)}if(l){const g={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};l.emit("beforeOutgoingRequestSpan",h,g)}return h}function w_(e,t,n){var s;const r=typeof n=="object"&&n!==null?n.onRequestSpanEnd:void 0;r==null||r(e,{headers:(s=t.response)==null?void 0:s.headers,error:t.error})}function T_(e,t,n,r){const s=Ql({span:n,propagateTraceparent:r}),o=s["sentry-trace"],i=s.baggage,c=s.traceparent;if(!o)return;const a=t.headers||(Ri(e)?e.headers:void 0);if(a)if(x_(a)){const u=new Headers(a);if(u.get("sentry-trace")||u.set("sentry-trace",o),r&&c&&!u.get("traceparent")&&u.set("traceparent",c),i){const l=u.get("baggage");l?Vr(l)||u.set("baggage",`${l},${i}`):u.set("baggage",i)}return u}else if(k_(a)){const u=[...a];u.find(d=>d[0]==="sentry-trace")||u.push(["sentry-trace",o]),r&&c&&!u.find(d=>d[0]==="traceparent")&&u.push(["traceparent",c]);const l=a.find(d=>d[0]==="baggage"&&typeof d[1]=="string"&&Vr(d[1]));return i&&!l&&u.push(["baggage",i]),u}else{const u="sentry-trace"in a?a["sentry-trace"]:void 0,l="traceparent"in a?a.traceparent:void 0,d="baggage"in a?a.baggage:void 0,f=d?Array.isArray(d)?[...d]:[d]:[],h=d&&(Array.isArray(d)?d.find(g=>Vr(g)):Vr(d));i&&!h&&f.push(i);const m=Object.assign({},a,{"sentry-trace":u??o,...f.length>0&&{baggage:f.join(",")}});return r&&c&&!l&&(m.traceparent=c),m}else return{"sentry-trace":o,...i&&{baggage:i},...c&&{traceparent:c}}}function I_(e,t){var n,r;if(t.response){tl(e,t.response.status);const s=(r=(n=t.response)==null?void 0:n.headers)==null?void 0:r.get("content-length");if(s){const o=parseInt(s);o>0&&e.setAttribute("http.response_content_length",o)}}else t.error&&e.setStatus({code:ye,message:"internal_error"});e.end()}function Vr(e){return typeof e!="string"?!1:e.split(",").some(t=>t.trim().startsWith(_s))}function x_(e){return typeof Headers<"u"&&$s(e,Headers)}function k_(e){return Array.isArray(e)?e.every(t=>Array.isArray(t)&&t.length===2&&typeof t[0]=="string"):!1}function C_(e,t,n){if(e.startsWith("data:")){const o=Xe(e);return{name:`${t} ${o}`,attributes:vc(e,void 0,t,n)}}const r=_r(e),s=r?Jl(r):e;return{name:`${t} ${s}`,attributes:vc(e,r,t,n)}}function vc(e,t,n,r){const s={url:Xe(e),type:"fetch","http.method":n,[de]:r,[Ne]:"http.client"};return t&&(Ws(t)||(s[Rl]=Xe(t.href),s[Gn]=Xe(t.href),s["server.address"]=t.host),t.search&&(s["http.query"]=t.search),t.hash&&(s["http.fragment"]=t.hash)),s}function rd(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const yr=J;function R_(){return"history"in yr&&!!yr.history}
25function A_(){if(!("fetch"in yr))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function Zo(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function N_(){var n;if(typeof EdgeRuntime=="string")return!0;if(!A_())return!1;if(Zo(yr.fetch))return!0;let e=!1;const t=yr.document;if(t&&typeof t.createElement=="function")try{const r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r),(n=r.contentWindow)!=null&&n.fetch&&(e=Zo(r.contentWindow.fetch)),t.head.removeChild(r)}catch(r){L&&b.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}function Wi(e,t){const n="fetch",r=At(n,e);return Nt(n,()=>sd(void 0,t)),r}function O_(e){const t="fetch-body-resolved",n=At(t,e);return Nt(t,()=>sd(P_)),n}function sd(e,t=!1){t&&!N_()||je(J,"fetch",function(n){return function(...r){const s=new Error,{method:o,url:i}=L_(r),c={args:r,fetchData:{method:o,url:i},startTimestamp:ge()*1e3,virtualError:s,headers:D_(r)};return e||Ge("fetch",{...c}),n.apply(J,r).then(async a=>(e?e(a):Ge("fetch",{...c,endTimestamp:ge()*1e3,response:a}),a),a=>{Ge("fetch",{...c,endTimestamp:ge()*1e3,error:a}),pt(a)&&a.stack===void 0&&(a.stack=s.stack,fe(a,"framesToPop",1));const u=Y(),l=(u==null?void 0:u.getOptions().enhanceFetchErrorMessages)??"always";if(l!==!1&&pt(a)&&a.name==="TypeError"&&(a.message==="Failed to fetch"||a.message==="Load failed"||a.message==="NetworkError when attempting to fetch resource."))try{const h=new URL(c.fetchData.url).host;l==="always"?a.message=`${a.message} (${h})`:fe(a,"__sentry_fetch_url_host__",h)}catch{}throw a})}})}async function M_(e,t){if(e!=null&&e.body){const n=e.body,r=n.getReader(),s=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let o=!0;for(;o;){let i;try{i=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:c}=await r.read();clearTimeout(i),c&&(t(),o=!1)}catch{o=!1}finally{clearTimeout(i)}}clearTimeout(s),r.releaseLock(),n.cancel().then(null,()=>{})}}function P_(e){let t;try{t=e.clone()}catch{return}M_(t,()=>{Ge("fetch-body-resolved",{endTimestamp:ge()*1e3,response:e})})}function cs(e,t){return ln(e)&&!!e[t]}function bc(e){return typeof e=="string"?e:e?cs(e,"url")?e.url:e.toString?e.toString():"":""}function L_(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:bc(n),method:cs(r,"method")?String(r.method).toUpperCase():Ri(n)&&cs(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:bc(t),method:cs(t,"method")?String(t.method).toUpperCase():"GET"}}function D_(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(Ri(t))return new Headers(t.headers)}catch{}}const od=J;function an(){try{return od.document.location.href}catch{return""}}function id(e,t=5){if(!od.HTMLElement)return null;let n=e;for(let r=0;r<t;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 $=J;let ei=0;function ad(){return ei>0}function j_(){ei++,setTimeout(()=>{ei--})}function Dn(e,t={}){function n(s){return typeof s=="function"}if(!n(e))return e;try{if(Object.prototype.hasOwnProperty.call(e,"__sentry_wrapped__")){const o=e.__sentry_wrapped__;return typeof o=="function"?o:e}if(Ai(e))return e}catch{return e}const r=function(...s){J._sentryWrappedDepth=(J._sentryWrappedDepth||0)+1;try{const o=s.map(i=>Dn(i,t));return e.apply(this,o)}catch(o){throw j_(),Ni(i=>{i.addEventProcessor(c=>(t.mechanism&&(Wo(c,void 0,void 0),Xt(c,t.mechanism)),c.extra={...c.extra,arguments:s},c)),Bi(o)}),o}finally{J._sentryWrappedDepth=(J._sentryWrappedDepth||0)-1}};try{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}Wu(r,e),fe(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function vs(){const e=an(),{referrer:t}=$.document||{},{userAgent:n}=$.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}function zi(e,t){const n=zs(e,t),r={type:H_(t),value:W_(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function F_(e,t,n,r){const s=Y(),o=s==null?void 0:s.getOptions().normalizeDepth,i=Y_(t),c={__serialized__:Gu(t,o)};if(i)return{exception:{values:[zi(e,i)]},extra:c};const a={exception:{values:[{type:Fs(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:G_(t,{isUnhandledRejection:r})}]},extra:c};if(n){const u=zs(e,n);u.length&&(a.exception.values[0].stacktrace={frames:u})}return a}function Eo(e,t){return{exception:{values:[zi(e,t)]}}}function zs(e,t){const n=t.stacktrace||t.stack||"",r=B_(t),s=U_(t);try{return e(n,r,s)}catch{}return[]}const $_=/Minified React error #\d+;/i;function B_(e){return e&&$_.test(e.message)?1:0}function U_(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function cd(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function H_(e){const t=e==null?void 0:e.name;return!t&&cd(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function W_(e){const t=e==null?void 0:e.message;return cd(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?gc(t.error):gc(e):"No error message"}function z_(e,t,n,r){const s=(n==null?void 0:n.syntheticException)||void 0,o=qi(e,t,s,r);return Xt(o),o.level="error",n!=null&&n.event_id&&(o.event_id=n.event_id),Or(o)}function q_(e,t,n="info",r,s){const o=(r==null?void 0:r.syntheticException)||void 0,i=ti(e,t,o,s);return i.level=n,r!=null&&r.event_id&&(i.event_id=r.event_id),Or(i)}
25function qi(e,t,n,r,s){var i,c;let o;if(Hu(t)&&t.error)return Eo(e,t.error);if(Ta(t)||Wp(t)){const a=t;if("stack"in t){o=Eo(e,t);const u=(c=(i=o.exception)==null?void 0:i.values)==null?void 0:c[0];if(r&&n&&u&&!u.stacktrace){const l=zs(e,n);l.length&&(u.stacktrace={frames:l},Xt(o,{synthetic:!0}))}}else{const u=a.name||(Ta(a)?"DOMError":"DOMException"),l=a.message?`${u}: ${a.message}`:u;o=ti(e,l,n,r),Wo(o,l)}return"code"in a&&(o.tags={...o.tags,"DOMException.code":`${a.code}`}),o}return pt(t)?Eo(e,t):dr(t)||Fs(t)?(o=F_(e,t,n,s),Xt(o,{synthetic:!0}),o):(o=ti(e,t,n,r),Wo(o,`${t}`,void 0),Xt(o,{synthetic:!0}),o)}function ti(e,t,n,r){const s={};if(r&&n){const o=zs(e,n);o.length&&(s.exception={values:[{value:t,stacktrace:{frames:o}}]}),Xt(s,{synthetic:!0})}if(Ci(t)){const{__sentry_template_string__:o,__sentry_template_values__:i}=t;return s.logentry={message:o,params:i},s}return s.message=t,s}function G_(e,{isUnhandledRejection:t}){const n=qp(e),r=t?"promise rejection":"exception";return Hu(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Fs(e)?`Event \`${V_(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function V_(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Y_(e){return Object.values(e).find(pt)}class K_ extends Og{constructor(t){var i;const n=J_(t),r=$.SENTRY_SDK_SOURCE||cg();Xl(n,"browser",["browser"],r),super(n);const{userInfo:s}=this.getDataCollectionOptions();(i=n._metadata)!=null&&i.sdk&&(n._metadata.sdk.settings={infer_ip:s?"auto":"never",...n._metadata.sdk.settings});const{sendClientReports:o}=this._options;$.document&&$.document.addEventListener("visibilitychange",()=>{$.document.visibilityState==="hidden"&&(o&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}),s&&this.on("beforeSendSession",qg)}eventFromException(t,n){return z_(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return q_(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,s){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,s)}}function J_(e){var t;return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:(t=$.SENTRY_RELEASE)==null?void 0:t.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const Ze=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,z=J,X_=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",Mr=(e,t,n,r)=>{let s,o;return i=>{t.value>=0&&(i||r)&&(o=t.value-(s??0),(o||s===void 0)&&(s=t.value,t.delta=o,t.rating=X_(t.value,n),e(t)))}},Pr=(e=!0)=>{var n,r;const t=(r=(n=z.performance)==null?void 0:n.getEntriesByType)==null?void 0:r.call(n,"navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Vn=()=>{const e=Pr();return(e==null?void 0:e.activationStart)??0};function bt(e,t,n){z.document&&z.addEventListener(e,t,n)}function bs(e,t,n){z.document&&z.removeEventListener(e,t,n)}let kn=-1;const ud=new Set,Q_=()=>{var e,t;return((e=z.document)==null?void 0:e.visibilityState)==="hidden"&&!((t=z.document)!=null&&t.prerendering)?0:1/0},us=e=>{if(Z_(e)&&kn>-1){if(e.type==="visibilitychange"||e.type==="pagehide")for(const t of ud)t();isFinite(kn)||(kn=e.type==="visibilitychange"?e.timeStamp:0,bs("prerenderingchange",us,!0))}},Lr=()=>{var e;if(z.document&&kn<0){const t=Vn();kn=(z.document.prerendering||(e=globalThis.performance.getEntriesByType("visibility-state").filter(r=>r.name==="hidden"&&r.startTime>t)[0])==null?void 0:e.startTime)??Q_(),bt("visibilitychange",us,!0),bt("pagehide",us,!0),bt("prerenderingchange",us,!0)}return{get firstHiddenTime(){return kn},onHidden(t){ud.add(t)}}};function Z_(e){var t;return e.type==="pagehide"||((t=z.document)==null?void 0:t.visibilityState)==="hidden"}const ey=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,Dr=(e,t=-1)=>{var o,i;const n=Pr();let r="navigate";return n&&((o=z.document)!=null&&o.prerendering||Vn()>0?r="prerender":(i=z.document)!=null&&i.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:ey(),navigationType:r}},wo=new WeakMap;function Gi(e,t){try{return wo.get(e)||wo.set(e,new t),wo.get(e)}catch{return new t}}class ty{constructor(){this._sessionValue=0,this._sessionEntries=[]}_processEntry(t){var s;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]),(s=this._onAfterProcessingUnexpectedShift)==null||s.call(this,t)}}const Yn=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(s=>{Promise.resolve().then(()=>{t(s.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},Vi=e=>{let t=!1;return()=>{t||(e(),t=!0)}},qs=e=>{var t;(t=z.document)!=null&&t.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},ny=[1800,3e3],ry=(e,t={})=>{qs(()=>{const n=Lr(),r=Dr("FCP");let s;const i=Yn("paint",c=>{for(const a of c)a.name==="first-contentful-paint"&&(i.disconnect(),a.startTime<n.firstHiddenTime&&(r.value=Math.max(a.startTime-Vn(),0),r.entries.push(a),s(!0)))});i&&(s=Mr(e,r,ny,t.reportAllChanges))})},sy=[.1,.25],oy=(e,t={})=>{ry(Vi(()=>{var a;const n=Dr("CLS",0);let r;const s=Lr(),o=Gi(t,ty),i=u=>{for(const l of u)o._processEntry(l);o._sessionValue>
25n.value&&(n.value=o._sessionValue,n.entries=o._sessionEntries,r())},c=Yn("layout-shift",i);c&&(r=Mr(e,n,sy,t.reportAllChanges),s.onHidden(()=>{i(c.takeRecords()),r(!0)}),(a=z==null?void 0:z.setTimeout)==null||a.call(z,r))}))};let ld=0,To=1/0,Yr=0;const iy=e=>{e.forEach(t=>{t.interactionId&&(To=Math.min(To,t.interactionId),Yr=Math.max(Yr,t.interactionId),ld=Yr?(Yr-To)/7+1:0)})};let ni;const dd=()=>ni?ld:performance.interactionCount||0,ay=()=>{"interactionCount"in performance||ni||(ni=Yn("event",iy,{type:"event",buffered:!0,durationThreshold:0}))},Io=10;let fd=0;const cy=()=>dd()-fd;class uy{constructor(){this._longestInteractionList=[],this._longestInteractionMap=new Map}_resetInteractions(){fd=dd(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor(cy()/50));return this._longestInteractionList[t]}_processEntry(t){var s,o;if((s=this._onBeforeProcessingEntry)==null||s.call(this,t),!(t.interactionId||t.entryType==="first-input"))return;const n=this._longestInteractionList.at(-1);let r=this._longestInteractionMap.get(t.interactionId);if(r||this._longestInteractionList.length<Io||t.duration>n._latency){if(r?t.duration>r._latency?(r.entries=[t],r._latency=t.duration):t.duration===r._latency&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(r.id,r),this._longestInteractionList.push(r)),this._longestInteractionList.sort((i,c)=>c._latency-i._latency),this._longestInteractionList.length>Io){const i=this._longestInteractionList.splice(Io);for(const c of i)this._longestInteractionMap.delete(c.id)}(o=this._onAfterProcessingINPCandidate)==null||o.call(this,r)}}}const Yi=e=>{var n;const t=z.requestIdleCallback||z.setTimeout;((n=z.document)==null?void 0:n.visibilityState)==="hidden"?e():(e=Vi(e),bt("visibilitychange",e,{once:!0,capture:!0}),bt("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),bs("visibilitychange",e,{capture:!0}),bs("pagehide",e,{capture:!0})}))},ly=[200,500],dy=40,fy=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return;const n=Lr();qs(()=>{ay();const r=Dr("INP");let s;const o=Gi(t,uy),i=a=>{Yi(()=>{for(const l of a)o._processEntry(l);const u=o._estimateP98LongestInteraction();u&&u._latency!==r.value&&(r.value=u._latency,r.entries=u.entries,s())})},c=Yn("event",i,{durationThreshold:t.durationThreshold??dy});s=Mr(e,r,ly,t.reportAllChanges),c&&(c.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{i(c.takeRecords()),s(!0)}))})};class py{_processEntry(t){var n;(n=this._onBeforeProcessingEntry)==null||n.call(this,t)}}const hy=[2500,4e3],my=(e,t={})=>{qs(()=>{const n=Lr(),r=Dr("LCP");let s;const o=Gi(t,py),i=a=>{t.reportAllChanges||(a=a.slice(-1));for(const u of a)o._processEntry(u),u.startTime<n.firstHiddenTime&&(r.value=Math.max(u.startTime-Vn(),0),r.entries=[u],s())},c=Yn("largest-contentful-paint",i);if(c){s=Mr(e,r,hy,t.reportAllChanges);const a=Vi(()=>{i(c.takeRecords()),c.disconnect(),s(!0)}),u=l=>{l.isTrusted&&(Yi(a),bs(l.type,u,{capture:!0}))};for(const l of["keydown","click","visibilitychange"])bt(l,u,{capture:!0})}})},gy=[800,1800],ri=e=>{var t,n;(t=z.document)!=null&&t.prerendering?qs(()=>ri(e)):((n=z.document)==null?void 0:n.readyState)!=="complete"?addEventListener("load",()=>ri(e),!0):setTimeout(e)},_y=(e,t={})=>{const n=Dr("TTFB"),r=Mr(e,n,gy,t.reportAllChanges);ri(()=>{const s=Pr();s&&(n.value=Math.max(s.responseStart-Vn(),0),n.entries=[s],r(!0))})},or={},Es={};let pd,hd,md,gd;function Gs(e,t=!1){return Ys("cls",e,Sy,pd,t)}function Vs(e,t=!1){return Ys("lcp",e,vy,hd,t)}function yy(e){return Ys("ttfb",e,by,md)}function Ki(e){return Ys("inp",e,Ey,gd)}function cn(e,t){return _d(e,t),Es[e]||(wy(e),Es[e]=!0),yd(e,t)}function jr(e,t){const n=or[e];if(n!=null&&n.length)for(const r of n)try{r(t)}catch(s){Ze&&b.error(`Error while triggering instrumentation handler.
26Type: ${e}
27Name: ${ft(r)}
28Error:`,s)}}function Sy(){return oy(e=>{jr("cls",{metric:e}),pd=e},{reportAllChanges:!0})}function vy(){return my(e=>{jr("lcp",{metric:e}),hd=e},{reportAllChanges:!0})}function by(){return _y(e=>{jr("ttfb",{metric:e}),md=e})}function Ey(){return fy(e=>{jr("inp",{metric:e}),gd=e})}function Ys(e,t,n,r,s=!1){_d(e,t);let o;return Es[e]||(o=n(),Es[e]=!0),r&&t({metric:r}),yd(e,t,s?o:void 0)}function wy(e){const t={};e==="event"&&(t.durationThreshold=0),Yn(e,n=>{jr(e,{entries:n})},t)}function _d(e,t){or[e]=or[e]||[],or[e].push(t)}function yd(e,t,n){return()=>{n&&n();const r=or[e];if(!r)return;const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}function Ty(e){return"duration"in e}const Iy=80,Ht={};try{typeof Node<"u"&&(Ht.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode").get),typeof Element<"u"&&(Ht.tagName=Object.getOwnPropertyDescriptor(Element.prototype,"tagName").get,Ht.id=Object.getOwnPropertyDescriptor(Element.prototype,"id").get,Ht.className=Object.getOwnPropertyDescriptor(Element.prototype,"className").get,Ht.getAttribute=Element.prototype.getAttribute),typeof HTMLElement<"u"&&(Ht.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"dataset").get)}catch{}function gt(e,t,n){const r=Ht[t];if(r)try{return r.call(e,n)}catch{}const s=e[t];return typeof s=="function"?s.call(e,n):s}function _e(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,s=[];let o=0,i=0;const c=" > ",a=c.length;let u;const l=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||Iy;for(;n&&o++<r&&(u=xy(n,l),!(u==="html"||o>1&&i+s.length*a+u.length>=d));)s.push(u),i+=u.length,n=gt(n,"parentNode");return s.reverse().join(c)}catch{return"<unknown>"}}function xy(e,t){const n=[],r=gt(e,"tagName");if(!r)return"";if(typeof HTMLElement<"u"&&e instanceof HTMLElement){const o=gt(e,"dataset");if(o){if(o.sentryComponent)return o.sentryComponent;if(o.sentryElement)return o.sentryElement}}n.push(r.toLowerCase());const s=t!=null&&t.length?t.filter(o=>gt(e,"getAttribute",o)).map(o=>[o,gt(e,"getAttribute",o)]):null;if(s!=null&&s.length)s.forEach(o=>{n.push(`[${o[0]}="${o[1]}"]`)});else{const o=gt(e,"id");o&&n.push(`#${o}`);const i=gt(e,"className");if(i&&ut(i)){const c=i.split(/\s+/);for(const a of c)n.push(`.${a}`)}}for(const o of["aria-label","type","name","title","alt"]){const i=gt(e,"getAttribute",o);i&&n.push(`[${o}="${i}"]`)}return n.join("")}const ky=e=>{const t=n=>{var r;(n.type==="pagehide"||((r=z.document)==null?void 0:r.visibilityState)==="hidden")&&e(n)};bt("visibilitychange",t,{capture:!0,once:!0}),bt("pagehide",t,{capture:!0,once:!0})};function xo(e){return typeof e=="number"&&isFinite(e)}function It(e,t,n,{...r}){const s=G(e).start_timestamp;return s&&s>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),Il(e,()=>{const o=jt({startTime:t,...r});return o&&o.end(n),o})}function Ji(e){var _;const t=Y();if(!t)return;const{name:n,transaction:r,attributes:s,startTime:o}=e,{release:i,environment:c}=t.getOptions(),{userInfo:a}=t.getDataCollectionOptions(),u=t.getIntegrationByName("Replay"),l=u==null?void 0:u.getReplayId(),d=ne(),f=d.getUser(),h=f!==void 0?f.email||f.id||f.ip_address:void 0;let m;try{m=d.getScopeData().contexts.profile.profile_id}catch{}const g={release:i,environment:c,user:h||void 0,profile_id:m||void 0,replay_id:l||void 0,transaction:r,"user_agent.original":(_=z.navigator)==null?void 0:_.userAgent,"client.address":a?"{{auto}}":void 0,...s};return jt({name:n,attributes:g,startTime:o,experimental:{standalone:!0}})}function Kn(){return z.addEventListener&&z.performance}function ue(e){return e/1e3}function Cy(e){let t="unknown",n="unknown",r="";for(const s of e){if(s==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(s))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=s}
28return r===e&&(t=r),{name:t,version:n}}function Ks(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function Js(e,t){let n,r=!1;function s(c){!r&&n&&t(c,n.spanContext().spanId,n),r=!0}ky(()=>{s("pagehide")});const o=e.on("beforeStartNavigationSpan",(c,a)=>{a!=null&&a.isRedirect||(s("navigation"),o(),i())}),i=e.on("afterStartPageLoadSpan",c=>{n=c,i()})}function Ry(e){let t=0,n;if(!Ks("layout-shift"))return;const r=Gs(({metric:s})=>{const o=s.entries[s.entries.length-1];o&&(t=s.value,n=o)},!0);Js(e,(s,o)=>{Ay(t,n,o,s),r()})}function Ay(e,t,n,r){var u;Ze&&b.log(`Sending CLS span (${e})`);const s=t?ue((ve()||0)+t.startTime):ge(),o=ne().getScopeData().transactionName,i=t?_e((u=t.sources[0])==null?void 0:u.node):"Layout shift",c={[de]:"auto.http.browser.cls",[Ne]:"ui.webvital.cls",[Mt]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t!=null&&t.sources&&t.sources.forEach((l,d)=>{c[`cls.source.${d+1}`]=_e(l.node)});const a=Ji({name:i,transaction:o,attributes:c,startTime:s});a&&(a.addEvent("cls",{[Ar]:"",[Nr]:e}),a.end(s))}const Ny=6e4;function Fr(e){return e!=null&&e>0&&e<=Ny}function Oy(e){let t=0,n;if(!Ks("largest-contentful-paint"))return;const r=Vs(({metric:s})=>{const o=s.entries[s.entries.length-1];!o||!Fr(s.value)||(t=s.value,n=o)},!0);Js(e,(s,o)=>{My(t,n,o,s),r()})}function My(e,t,n,r){if(!Fr(e))return;Ze&&b.log(`Sending LCP span (${e})`);const s=ue((ve()||0)+((t==null?void 0:t.startTime)||0)),o=ne().getScopeData().transactionName,i=t?_e(t.element):"Largest contentful paint",c={[de]:"auto.http.browser.lcp",[Ne]:"ui.webvital.lcp",[Mt]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(c["lcp.element"]=_e(t.element)),t.id&&(c["lcp.id"]=t.id),t.url&&(c["lcp.url"]=t.url),t.loadTime!=null&&(c["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(c["lcp.renderTime"]=t.renderTime),t.size!=null&&(c["lcp.size"]=t.size));const a=Ji({name:i,transaction:o,attributes:c,startTime:s});a&&(a.addEvent("lcp",{[Ar]:"millisecond",[Nr]:e}),a.end(s))}function We(e){return e&&((ve()||performance.timeOrigin)+e)/1e3}function Sd(e){var n;const t={};if(e.nextHopProtocol!=null){const{name:r,version:s}=Cy(e.nextHopProtocol);t["network.protocol.version"]=s,t["network.protocol.name"]=r}return ve()||(n=Kn())!=null&&n.timeOrigin?Py({...t,"http.request.redirect_start":We(e.redirectStart),"http.request.redirect_end":We(e.redirectEnd),"http.request.worker_start":We(e.workerStart),"http.request.fetch_start":We(e.fetchStart),"http.request.domain_lookup_start":We(e.domainLookupStart),"http.request.domain_lookup_end":We(e.domainLookupEnd),"http.request.connect_start":We(e.connectStart),"http.request.secure_connection_start":We(e.secureConnectionStart),"http.request.connection_end":We(e.connectEnd),"http.request.request_start":We(e.requestStart),"http.request.response_start":We(e.responseStart),"http.request.response_end":We(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?e.responseStart/1e3:void 0}):t}function Py(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}const Ly=2147483647;let Ec=0,De={},Le,bn;function Dy({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=Kn();if(r&&ve()){r.mark&&z.performance.mark("sentry-tracing-init");const s=t?Oy(n):t===!1?Uy():void 0,o=e?Ry(n):e===!1?By():void 0,i=Hy(),c=Wy();return()=>{i(),c(),s==null||s(),o==null||o()}}return()=>{}}function jy(){cn("longtask",({entries:e})=>{const t=Ee();if(!t)return;const{op:n,start_timestamp:r}=G(t);for(const s of e){const o=ue(ve()+s.startTime),i=ue(s.duration);n==="navigation"&&r&&o<r||It(t,o,o+i,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[de]:"auto.ui.browser.metrics"}})}})}function Fy(){new PerformanceObserver(t=>{const n=Ee();if(n)for(const r of t.getEntries()){if(!r.scripts[0])continue;const s=ue(ve()+r.startTime),{start_timestamp:o,op:i}=G(n);if(i==="navigation"&&o&&s<o)continue;const c=ue(r.duration),a={[de]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:l,invokerType:d,sourceURL:f,sourceFunctionName:h,sourceCharPosition:m}=u;a["browser.script.invoker"]=l,a["browser.script.invoker_type"]=d,f&&(a["code.filepath"]=f),h&&(a["code.function"]=h),m!==-1&&(a["browser.script.source_char_position"]=m),It(n,s,s+c,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:a})}}).observe({type:"long-animation-frame",buffered:!0})}function $y(){cn("event",({entries:e})=>{const t=Ee();if(t){for(const n of e)if(n.name==="click"){const r=ue(ve()+n.startTime),s=ue(n.duration),o={name:_e(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[de]:"auto.ui.browser.metrics"}},i=id(n.target);i&&(o.attributes["ui.component_name"]=i),It(t,r,r+s,o)}}})}function By(){return Gs(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(De.cls={value:e.value,unit:""},bn=t)},!0)}function Uy(){return Vs(({metric:e})=>{const t=e.entries[e.entries.length-1];!t||!Fr(e.value)||(De.lcp={value:e.value,unit:"millisecond"},Le=t)}
28,!0)}function Hy(){return yy(({metric:e})=>{e.entries[e.entries.length-1]&&(De.ttfb={value:e.value,unit:"millisecond"})})}function Wy(){return cn("paint",({entries:e})=>{const t=Lr();for(const n of e){const r=n.startTime<t.firstHiddenTime;n.name==="first-paint"&&r&&(De.fp={value:n.startTime,unit:"millisecond"}),n.name==="first-contentful-paint"&&r&&(De.fcp={value:n.startTime,unit:"millisecond"})}})}function zy(e,t){const n=Kn(),r=ve();if(!(n!=null&&n.getEntries)||!r)return;const{spanStreamingEnabled:s,ignorePerformanceApiSpans:o,ignoreResourceSpans:i}=t,c=ue(r),a=n.getEntries(),{op:u,start_timestamp:l}=G(e);a.slice(Ec).forEach(d=>{const f=ue(d.startTime),h=ue(Math.max(0,d.duration));if(!(u==="navigation"&&l&&c+f<l))switch(d.entryType){case"navigation":{Ky(e,d,c);break}case"mark":case"paint":case"measure":{Vy(e,d,f,h,c,o);break}case"resource":{Qy(e,d,d.name,f,h,c,i);break}}}),Ec=Math.max(a.length-1,0),Zy(e,s)}function qy(e,t){var c;const n=ve();if(!((c=Kn())!=null&&c.getEntries)||!n){wc();return}const{spanStreamingEnabled:r,recordClsOnPageloadSpan:s,recordLcpOnPageloadSpan:o}=t,i=ue(n);if(G(e).op==="pageload"){if(nS(De),r){const a=(u,l,d)=>{const f=d??`browser.web_vital.${u}.value`;e.setAttribute(f,l),Ze&&b.log("Setting web vital attribute",{[f]:l},"on pageload span")};["ttfb","fp","fcp"].forEach(u=>{De[u]&&a(u,De[u].value)}),De["ttfb.requestTime"]&&a("ttfb.requestTime",De["ttfb.requestTime"].value,"browser.web_vital.ttfb.request_time")}else s||delete De.cls,o||delete De.lcp,Object.entries(De).forEach(([a,u])=>{Tl(a,u.value,u.unit,e)}),eS(e,t);e.setAttribute(r?"browser.performance.time_origin":"performance.timeOrigin",i),e.setAttribute(r?"browser.performance.navigation.activation_start":"performance.activationStart",Vn())}wc()}function wc(){Le=void 0,bn=void 0,De={}}function Gy(e){if((e==null?void 0:e.entryType)==="measure")try{return e.detail.devtools.track==="Components ⚛"}catch{return}}function Vy(e,t,n,r,s,o){if(Gy(t)||["mark","measure"].includes(t.entryType)&&rt(t.name,o))return;const i=Pr(!1),c=ue(i?i.requestStart:0),a=s+Math.max(n,c),u=s+n,l=u+r,d={[de]:"auto.resource.browser.metrics"};a!==u&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=a),Yy(d,t),a<=l&&It(e,a,l,{name:t.name,op:t.entryType,attributes:d})}function Yy(e,t){try{const n=t.detail;if(!n)return;if(typeof n=="object"){for(const[r,s]of Object.entries(n))if(s&&rn(s))e[`sentry.browser.measure.detail.${r}`]=s;else if(s!==void 0)try{e[`sentry.browser.measure.detail.${r}`]=JSON.stringify(s)}catch{}return}if(rn(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function Ky(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Kr(e,t,r,n)}),Kr(e,t,"secureConnection",n,"TLS/SSL"),Kr(e,t,"fetch",n,"cache"),Kr(e,t,"domainLookup",n,"DNS"),Xy(e,t,n)}function Kr(e,t,n,r,s=n){const o=Jy(n),i=t[o],c=t[`${n}Start`];!c||!i||It(e,r+ue(c),r+ue(i),{op:`browser.${s}`,name:t.name,attributes:{[de]:"auto.ui.browser.metrics",...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function Jy(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function Xy(e,t,n){const r=n+ue(t.requestStart),s=n+ue(t.responseEnd),o=n+ue(t.responseStart);t.responseEnd&&(It(e,r,s,{op:"browser.request",name:t.name,attributes:{[de]:"auto.ui.browser.metrics"}}),It(e,o,s,{op:"browser.response",name:t.name,attributes:{[de]:"auto.ui.browser.metrics"}}))}function Qy(e,t,n,r,s,o,i){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const c=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(i!=null&&i.includes(c))return;const a={[de]:"auto.resource.browser.metrics"},u=Zt(n);u.protocol&&(a["url.scheme"]=u.protocol.split(":").pop()),u.host&&(a["server.address"]=u.host),a["url.same_origin"]=n.includes(z.location.origin),a[Gn]=n,tS(t,a,[["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 l={...a,...Sd(t)},d=o+r,f=d+s;It(e,d,f,{name:n.replace(z.location.origin,""),op:c,attributes:l})}function Zy(e,t){const n=z.navigator;if(!n)return;const r=n.connection;r&&(r.effectiveType&&e.setAttribute(t?"network.connection.effective_type":"effectiveConnectionType",r.effectiveType),r.type&&e.setAttribute(t?"network.connection.type":"connectionType",r.type),xo(r.rtt)&&(t?e.setAttribute("network.connection.rtt",r.rtt):G(e).op==="pageload"&&Tl("connection.rtt",r.rtt,"millisecond"))),xo(n.deviceMemory)&&(t?e.setAttribute("device.memory.estimated_capacity",n.deviceMemory):e.setAttribute("deviceMemory",`${n.deviceMemory} GB`)),xo(n.hardwareConcurrency)&&(t?e.setAttribute("device.processor_count",n.hardwareConcurrency):e.setAttribute("hardwareConcurrency",String(n.hardwareConcurrency)))}function eS(e,t){Le&&t.recordLcpOnPageloadSpan&&(Le.element&&e.setAttribute("lcp.element",_e(Le.element)),Le.id&&e.setAttribute("lcp.id",Le.id),Le.url&&e.setAttribute("lcp.url",Le.url.trim().slice(0,200)),Le.loadTime!=null&&e.setAttribute("lcp.loadTime",Le.loadTime),Le.renderTime!=null&&e.setAttribute("lcp.renderTime",Le.renderTime),e.setAttribute("lcp.size",Le.size)),bn!=null&&bn.sources&&t.recordClsOnPageloadSpan&&bn.sources.forEac
28h((n,r)=>e.setAttribute(`cls.source.${r+1}`,_e(n.node)))}function tS(e,t,n){n.forEach(([r,s])=>{const o=e[r];o!=null&&(typeof o=="number"&&o<Ly||typeof o=="string")&&(t[s]=o)})}function nS(e){const t=Pr(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}const ko=[],ir=new Map,mn=new Map,vd=60;function rS(){if(Kn()&&ve()){const t=sS();return()=>{t()}}return()=>{}}const Sr={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function sS(){return Ki(oS)}const oS=({metric:e})=>{if(e.value==null)return;const t=ue(e.value);if(t>vd)return;const n=e.entries.find(m=>m.duration===e.value&&Sr[m.name]);if(!n)return;const{interactionId:r}=n,s=Sr[n.name],o=ue(ve()+n.startTime),i=Ee(),c=i?Se(i):void 0,a=r!=null?ir.get(r):void 0,u=(a==null?void 0:a.span)||c,l=u?G(u).description:ne().getScopeData().transactionName,d=(a==null?void 0:a.elementName)||_e(n.target),f={[de]:"auto.http.browser.inp",[Ne]:`ui.interaction.${s}`,[Mt]:n.duration},h=Ji({name:d,transaction:l,attributes:f,startTime:o});h&&(h.addEvent("inp",{[Ar]:"millisecond",[Nr]:e.value}),h.end(o+t))};function iS(e){return e!=null?ir.get(e):void 0}function aS(){const e=Object.keys(Sr);Ln()&&e.forEach(s=>{z.addEventListener(s,t,{capture:!0,passive:!0})});function t(s){const o=s.target;if(!o)return;const i=_e(o),c=Math.round(s.timeStamp);if(mn.set(c,i),mn.size>50){const a=mn.keys().next().value;a!==void 0&&mn.delete(a)}}function n(s){const o=Math.round(s.startTime);let i=mn.get(o);if(!i)for(let c=-5;c<=5;c++){const a=mn.get(o+c);if(a){i=a;break}}return i||"<unknown>"}const r=({entries:s})=>{const o=Ee(),i=o&&Se(o);s.forEach(c=>{if(!Ty(c))return;const a=c.interactionId;if(a==null||ir.has(a))return;const u=c.target?_e(c.target):n(c);if(ko.length>10){const l=ko.shift();ir.delete(l)}ko.push(a),ir.set(a,{span:i,elementName:u})})};cn("event",r),cn("first-input",r)}function Xi(e){var m,g;const{name:t,op:n,origin:r,metricName:s,value:o,attributes:i,parentSpan:c,reportEvent:a,startTime:u,endTime:l}=e,d=ne().getScopeData().transactionName,f={[de]:r,[Ne]:n,[Mt]:0,[`browser.web_vital.${s}.value`]:o,[Nl]:d,[Al]:d,"user_agent.original":(m=z.navigator)==null?void 0:m.userAgent,...i};c&&((g=fl(c).attributes)==null?void 0:g[Ne])==="pageload"&&(f["sentry.pageload.span_id"]=c.spanContext().spanId),a&&(f[`browser.web_vital.${s}.report_event`]=a);const h=jt({name:t,attributes:f,startTime:u,parentSpan:c});h&&h.end(l??u)}function cS(e){let t=0,n;if(!Ks("largest-contentful-paint"))return;const r=Vs(({metric:s})=>{const o=s.entries[s.entries.length-1];!o||!Fr(s.value)||(t=s.value,n=o)},!0);Js(e,(s,o,i)=>{uS(t,n,i,s),r()})}function uS(e,t,n,r){if(!Fr(e))return;Ze&&b.log(`Sending LCP span (${e})`);const s=ve()||0,o=ue(s),i=ue(s+((t==null?void 0:t.startTime)||0)),c=t?_e(t.element):"Largest contentful paint",a={};t!=null&&t.element&&(a["browser.web_vital.lcp.element"]=_e(t.element)),t!=null&&t.id&&(a["browser.web_vital.lcp.id"]=t.id),t!=null&&t.url&&(a["browser.web_vital.lcp.url"]=t.url),(t==null?void 0:t.loadTime)!=null&&(a["browser.web_vital.lcp.load_time"]=t.loadTime),(t==null?void 0:t.renderTime)!=null&&(a["browser.web_vital.lcp.render_time"]=t.renderTime),(t==null?void 0:t.size)!=null&&(a["browser.web_vital.lcp.size"]=t.size),Xi({name:c,op:"ui.webvital.lcp",origin:"auto.http.browser.lcp",metricName:"lcp",value:e,attributes:a,parentSpan:n,reportEvent:r,startTime:o,endTime:i})}function lS(e){let t=0,n;if(!Ks("layout-shift"))return;const r=Gs(({metric:s})=>{const o=s.entries[s.entries.length-1];o&&(t=s.value,n=o)},!0);Js(e,(s,o,i)=>{dS(t,n,i,s),r()})}function dS(e,t,n,r){var c;Ze&&b.log(`Sending CLS span (${e})`);const s=t?ue((ve()||0)+t.startTime):ge(),o=t?_e((c=t.sources[0])==null?void 0:c.node):"Layout shift",i={};
28t!=null&&t.sources&&t.sources.forEach((a,u)=>{i[`browser.web_vital.cls.source.${u+1}`]=_e(a.node)}),Xi({name:o,op:"ui.webvital.cls",origin:"auto.http.browser.cls",metricName:"cls",value:e,attributes:i,parentSpan:n,reportEvent:r,startTime:s})}function fS(){if(!Kn()||!ve())return;Ki(({metric:n})=>{if(n.value==null||ue(n.value)>vd)return;const s=n.entries.find(o=>o.duration===n.value&&Sr[o.name]);s&&pS(n.value,s)})}function pS(e,t){Ze&&b.log(`Sending INP span (${e})`);const n=ue(ve()+t.startTime),r=ue(e),s=Sr[t.name],o=iS(t.interactionId),i=Ee(),c=i?Se(i):void 0,a=(o==null?void 0:o.span)||c,u=a?fl(a).name:ne().getScopeData().transactionName,l=(o==null?void 0:o.elementName)||_e(t.target);Xi({name:l,op:`ui.interaction.${s}`,origin:"auto.http.browser.inp",metricName:"inp",value:e,attributes:{[Mt]:t.duration,[Nl]:u,[Al]:u},startTime:n,endTime:n+r,parentSpan:a})}const hS=1e3;let Tc,si,oi;function bd(e){const t="dom";At(t,e),Nt(t,mS)}function mS(){if(!z.document)return;const e=Ge.bind(null,"dom"),t=Ic(e,!0);z.document.addEventListener("click",t,!1),z.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{var o,i;const s=(o=z[n])==null?void 0:o.prototype;(i=s==null?void 0:s.hasOwnProperty)!=null&&i.call(s,"addEventListener")&&(je(s,"addEventListener",function(c){return function(a,u,l){if(a==="click"||a=="keypress")try{const d=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},f=d[a]=d[a]||{refCount:0};if(!f.handler){const h=Ic(e);f.handler=h,c.call(this,a,h,l)}f.refCount++}catch{}return c.call(this,a,u,l)}}),je(s,"removeEventListener",function(c){return function(a,u,l){if(a==="click"||a=="keypress")try{const d=this.__sentry_instrumentation_handlers__||{},f=d[a];f&&(f.refCount--,f.refCount<=0&&(c.call(this,a,f.handler,l),f.handler=void 0,delete d[a]),Object.keys(d).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return c.call(this,a,u,l)}}))})}function gS(e){if(e.type!==si)return!1;try{if(!e.target||e.target._sentryId!==oi)return!1}catch{}return!0}function _S(e,t){return e!=="keypress"?!1:t!=null&&t.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function Ic(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=yS(n);if(_S(n.type,r))return;fe(n,"_sentryCaptured",!0),r&&!r._sentryId&&fe(r,"_sentryId",Be());
28const s=n.type==="keypress"?"input":n.type;gS(n)||(e({event:n,name:s,global:t}),si=n.type,oi=r?r._sentryId:void 0),clearTimeout(Tc),Tc=z.setTimeout(()=>{oi=void 0,si=void 0},hS)}}function yS(e){try{return e.target}catch{return null}}let Jr;function Xs(e){const t="history";At(t,e),Nt(t,SS)}function SS(){if(z.addEventListener("popstate",()=>{const t=z.location.href,n=Jr;if(Jr=t,n===t)return;Ge("history",{from:n,to:t})}),!R_())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const s=Jr,o=vS(String(r));if(Jr=o,s===o)return t.apply(this,n);Ge("history",{from:s,to:o})}return t.apply(this,n)}}je(z.history,"pushState",e),je(z.history,"replaceState",e)}function vS(e){try{return new URL(e,z.location.origin).toString()}catch{return e}}const ls={};function Ed(e){const t=ls[e];if(t)return t;let n=z[e];if(Zo(n))return ls[e]=n.bind(z);const r=z.document;if(r&&typeof r.createElement=="function")try{const s=r.createElement("iframe");s.hidden=!0,r.head.appendChild(s);const o=s.contentWindow;o!=null&&o[e]&&(n=o[e]),r.head.removeChild(s)}catch(s){Ze&&b.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,s)}return n&&(ls[e]=n.bind(z))}function bS(e){ls[e]=void 0}function $r(...e){return Ed("setTimeout")(...e)}const Vt="__sentry_xhr_v3__";function wd(e){const t="xhr";At(t,e),Nt(t,ES)}function ES(){if(!z.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const s=new Error,o=ge()*1e3,i=ut(r[0])?r[0].toUpperCase():void 0,c=wS(r[1]);if(!i||!c)return t.apply(n,r);n[Vt]={method:i,url:c,request_headers:{}},i==="POST"&&c.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const a=()=>{const u=n[Vt];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const l={endTimestamp:ge()*1e3,startTimestamp:o,xhr:n,virtualError:s};Ge("xhr",l),n.removeEventListener("readystatechange",a)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,l,d){return a(),u.apply(l,d)}}):n.addEventListener("readystatechange",a),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,l,d){const[f,h]=d,m=l[Vt];return m&&ut(f)&&ut(h)&&(m.request_headers[f.toLowerCase()]=h),u.apply(l,d)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const s=n[Vt];if(!s)return t.apply(n,r);r[0]!==void 0&&(s.body=r[0]);const o={startTimestamp:ge()*1e3,xhr:n};return Ge("xhr",o),t.apply(n,r)}})}function wS(e){if(ut(e))return e;try{return e.toString()}catch{}}const TS=Symbol.for("sentry__originalRequestBody");function Td(e){return new URLSearchParams(e).toString()}function Id(e,t=b){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[Td(e)];if(!e)return[void 0]}catch(n){return Ze&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Ze&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function xd(e=[]){if(e.length>=2&&e[1]&&typeof e[1]=="object"&&"body"in e[1])return e[1].body;if(e.length>=1&&e[0]instanceof Request){const n=e[0][TS];return n!==void 0?n:void 0}}function kd(e){let t;try{t=e.getAllResponseHeaders()}catch(n){return Ze&&b.error(n,"Failed to get xhr response headers",e),{}}return t?t.split(`\r
29`).reduce((n,r)=>{const[s,o]=r.split(": ");return o&&(n[s.toLowerCase()]=o),n},{}):{}}function IS(e){if(typeof Element>"u")return!1;try{return e instanceof Element}catch{return!1}}const xS=40;function kS(e,t=Ed("fetch")){let n=0,r=0;async function s(o){const i=o.body.length;n+=i,r++;const c={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const a=await t(e.url,c);return{statusCode:a.status,headers:{"x-sentry-rate-limits":a.headers.get("X-Sentry-Rate-Limits"),"retry-after":a.headers.get("Retry-After")}}}catch(a){throw bS("fetch"),a}finally{n-=i,r--}}return Tg(e,s,Hi(e.bufferSize||xS))}const He=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,CS=30,RS=50;function ii(e,t,n,r){const s={filename:e,function:t==="<anonymous>
29"?nn:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const AS=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,NS=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,OS=/\((\S*)(?::(\d+))(?::(\d+))\)/,MS=/at (.+?) ?\(data:(.+?),/,PS=e=>{var s;const t=e.match(MS);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=AS.exec(e);if(n){const[,o,i,c]=n;return ii(o,nn,+i,+c)}const r=NS.exec(e);if(r){if(((s=r[2])==null?void 0:s.indexOf("eval"))===0){const a=OS.exec(r[2]);a&&(r[2]=a[1],r[3]=a[2],r[4]=a[3])}const[i,c]=Cd(r[1]||nn,r[2]);return ii(c,i,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},LS=[CS,PS],DS=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,jS=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,FS=e=>{const t=DS.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const o=jS.exec(t[3]);o&&(t[1]=t[1]||"eval",t[3]=o[1],t[4]=o[2],t[5]="")}let r=t[3],s=t[1]||nn;return[s,r]=Cd(s,r),ii(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},$S=[RS,FS],BS=[LS,$S],US=Fu(...BS),Cd=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:nn,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Xr=1024,HS="Breadcrumbs",WS=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:HS,setup(n){t.console&&d_(VS(n)),t.dom&&bd(GS(n,t.dom)),t.xhr&&wd(YS(n)),t.fetch&&Wi(KS(n)),t.history&&Xs(JS(n)),t.sentry&&n.on("beforeSendEvent",qS(n))}}},zS=WS;function qS(e){return function(n){Y()===e&&Tt({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:Wt(n)},{event:n})}}function GS(e,t){return function(r){if(Y()!==e)return;let s,o,i=typeof t=="object"?t.serializeAttribute:void 0,c=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;c&&c>Xr&&(He&&b.warn(`\`dom.maxStringLength\` cannot exceed ${Xr}, but a value of ${c} was configured. Sentry will use ${Xr} instead.`),c=Xr),typeof i=="string"&&(i=[i]);try{const u=r.event,l=XS(u)?u.target:u;s=_e(l,{keyAttrs:i,maxStringLength:c}),o=id(l)}catch{s="<unknown>"}if(s.length===0)return;const a={category:`ui.${r.name}`,message:s};o&&(a.data={"ui.component_name":o}),Tt(a,{event:r.event,name:r.name,global:r.global})}}function VS(e){return function(n){if(Y()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:ed(n.level),message:xa(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${xa(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Tt(r,{input:n.args,level:n.level})}}function YS(e){return function(n){if(Y()!==e)return;const{startTimestamp:r,endTimestamp:s}=n,o=n.xhr[Vt];if(!r||!s||!o)return;const{method:i,url:c,status_code:a,body:u}=o,l={method:i,url:c,status_code:a},d={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s},f={category:"xhr",data:l,type:"http",level:rd(a)};e.emit("beforeOutgoingRequestBreadcrumb",f,d),Tt(f,d)}}function KS(e){return function(n){if(Y()!==e)return;const{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s},i={category:"fetch",data:n.fetchData,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",i,o),Tt(i,o)}else{const o=n.response,i={...n.fetchData,status_code:o==null?void 0:o.status},c={input:n.args,response:o,startTimestamp:r,endTimestamp:s},a={category:"fetch",data:i,type:"http",level:rd(i.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",a,c),Tt(a,c)}}}function JS(e){return function(n){if(Y()!==e)return;let r=n.from,s=n.to;const o=Zt($.location.href);let i=r?Zt(r):void 0;const c=Zt(s);i!=null&&i.path||(i=o),o.protocol===c.protocol&&o.host===c.host&&(s=c.relative),o.protocol===i.protocol&&o.host===i.host&&(r=i.relative),Tt({category:"navigation",data:{from:r,to:s}})}}function XS(e){return!!e&&!!e.target}const QS="EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDB
29Request,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(","),ZS="BrowserApiErrors",ev=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:ZS,setupOnce(){t.setTimeout&&je($,"setTimeout",xc),t.setInterval&&je($,"setInterval",xc),t.requestAnimationFrame&&je($,"requestAnimationFrame",nv),t.XMLHttpRequest&&"XMLHttpRequest"in $&&je(XMLHttpRequest.prototype,"send",rv);const n=t.eventTarget;n&&(Array.isArray(n)?n:QS).forEach(s=>sv(s,t))}}},tv=ev;function xc(e){return function(...t){const n=t[0];return t[0]=Dn(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${ft(e)}`}}),e.apply(this,t)}}function nv(e){return function(t){return e.apply(this,[Dn(t,{mechanism:{data:{handler:ft(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function rv(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&je(n,s,function(o){const i={mechanism:{data:{handler:ft(o)},handled:!1,type:`auto.browser.browserapierrors.xhr.${s}`}},c=Ai(o);return c&&(i.mechanism.data.handler=ft(c)),Dn(o,i)})}),e.apply(this,t)}}function sv(e,t){var s,o;const r=(s=$[e])==null?void 0:s.prototype;(o=r==null?void 0:r.hasOwnProperty)!=null&&o.call(r,"addEventListener")&&(je(r,"addEventListener",function(i){return function(c,a,u){try{ov(a)&&(a.handleEvent=Dn(a.handleEvent,{mechanism:{data:{handler:ft(a),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&iv(this,c,a),i.apply(this,[c,Dn(a,{mechanism:{data:{handler:ft(a),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),u])}}),je(r,"removeEventListener",function(i){return function(c,a,u){try{if(Object.prototype.hasOwnProperty.call(a,"__sentry_wrapped__")){const l=a.__sentry_wrapped__;l&&i.call(this,c,l,u)}}catch{}return i.call(this,c,a,u)}}))}function ov(e){return typeof e.handleEvent=="function"}function iv(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const av=(e={})=>{const t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(typeof $.document>"u"){He&&b.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}tc({ignoreDuration:!0});let n=!1;Yi(()=>{n||(vo(),n=!0)});const r=Oe();let s=r.getUser();r.addScopeListener(o=>{const i=o.getUser();((s==null?void 0:s.id)!==(i==null?void 0:i.id)||(s==null?void 0:s.ip_address)!==(i==null?void 0:i.ip_address))&&(s=i,n&&vo())}),t==="route"&&Xs(({from:o,to:i})=>{o!==i&&(tc({ignoreDuration:!0}),vo(),n=!0)})}}},cv="CultureContext",uv=()=>({name:cv,preprocessEvent(e){var n;const t=kc();t&&(e.contexts={...e.contexts,culture:{...t,...(n=e.contexts)==null?void 0:n.culture}})},processSegmentSpan(e){const t=kc();t&&ys(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}}),lv=uv;function kc(){try{const e=$.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}const dv="GlobalHandlers",fv=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:dv,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(hv(n),Cc("onerror")),t.onunhandledrejection&&(mv(n),Cc("onunhandledrejection"))}}},pv=fv;function hv(e){$u(t=>{const{stackParser:n,attachStacktrace:r}=Rd();if(Y()!==e||ad())return;const{msg:s,url:o,line:i,column:c,error:a}=t,u=yv(qi(n,a||s,void 0,r,!1),o,i,c);u.level="error",Pl(u,{originalException:a,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function mv(e){Bu(t=>{const{stackParser:n,attachStacktrace:r}=Rd();if(Y()!==e||ad())return;const s=gv(t),o=rn(s)?_v(s):qi(n,s,void 0,r,!0);o.level="error",Pl(o,{originalException:s,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}
29function gv(e){if(rn(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function _v(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function yv(e,t,n,r){const s=e.exception=e.exception||{},o=s.values=s.values||[],i=o[0]=o[0]||{},c=i.stacktrace=i.stacktrace||{},a=c.frames=c.frames||[];return a.length===0&&a.push({colno:r,lineno:n,filename:Sv(t)??an(),function:nn,in_app:!0}),e}function Cc(e){He&&b.log(`Global Handler attached: ${e}`)}function Rd(){const e=Y();return(e==null?void 0:e.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}function Sv(e){if(!(!ut(e)||e.length===0))return e.startsWith("data:")?`<${Xe(e,!1)}>`:e}const vv=()=>({name:"HttpContext",preprocessEvent(e){var r;if(!$.navigator&&!$.location&&!$.document)return;const t=vs(),n={...t.headers,...(r=e.request)==null?void 0:r.headers};e.request={...t,...e.request,headers:n}},processSegmentSpan(e){var r;const t=(r=e.attributes)==null?void 0:r[Ne];if(!$.navigator&&!$.location&&!$.document)return;const n=vs();ys(e,{[Gn]:t!=="http.client"?n.url:void 0,"http.request.header.user_agent":n.headers["User-Agent"],"http.request.header.referer":n.headers.Referer})}}),bv="cause",Ev=5,wv="LinkedErrors",Tv=(e={})=>{const t=e.limit||Ev,n=e.key||bv;return{name:wv,preprocessEvent(r,s,o){const i=o.getOptions();u_(zi,i.stackParser,n,t,r,s)}}},Iv=Tv,xv=/^HTML(\w*)Element$/;function Ad(e){if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(IS(e)){const t=kv(e);if(xv.test(t))return`[HTMLElement: ${_e(e)}]`}}function kv(e){const t=Object.getPrototypeOf(e);return t!=null&&t.constructor?t.constructor.name:"null prototype"}function Cv(){return Rv()?(He&&Rt(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function Rv(){var s;if(typeof $.window>"u")return!1;const e=$;if(e.nw)return!1;const t=e.chrome||e.browser;if(!((s=t==null?void 0:t.runtime)!=null&&s.id))return!1;const n=an();return!($===$.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(n))}function Av(e){return[t_(),Xg(),b_(),tv(),zS(),pv(),Iv(),m_(),vv(),lv(),av()]}function Nv(e={}){const t=!e.skipBrowserExtensionCheck&&Cv();let n=e.defaultIntegrations==null?Av():e.defaultIntegrations;const r={...e,enabled:t?!1:e.enabled,stackParser:$p(e.stackParser||US),integrations:og({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||kS};return qu(Ad),jg(K_,r)}const ce=J,Qi="sentryReplaySession",Ov="replay_event",Zi="Unable to send Replay",Mv=3e5,Pv=9e5,Lv=5e3,Dv=5500,jv=6e4,Fv=5e3,$v=3,Rc=15e4,Qr=5e3,Bv=3e3,Uv=300,ea=2e7,Hv=4999,Wv=5e4,Ac=36e5;var zv=Object.defineProperty,qv=(e,t,n)=>t in e?zv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nc=(e,t,n)=>qv(e,typeof t!="symbol"?t+"":t,n),pe=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(pe||{});function Gv(e){return e.nodeType===e.ELEMENT_NODE}function ar(e){const t=e==null?void 0:e.host;return(t==null?void 0:t.shadowRoot)===e}function cr(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Vv(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function Yv(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function ws(e){try{const t=e.rules||e.cssRules;return t?Vv(Array.from(t,Nd).join("")):null}catch{return null}}function Kv(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,s=r[n],o=r.getPropertyPriority(s);t+=`${s}:${r.getPropertyValue(s)}${o?" !important":""};`}return`${e.selectorText} { ${t} }`}function Nd(e){let t;if(Xv(e))try{t=ws(e.styleSheet)||Yv(e)}catch{}else if(Qv(e)){let n=e.cssText;const r=e.selectorText.includes(":"),s=typeof e.style.all=="string"&&e.style.all;if(s&&(n=Kv(e)),r&&(n=Jv(n)),r||s)return n}return t||e.cssText}function Jv(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function Xv(e){return"styleSheet"in e}function Qv(e){return"selectorText"in e}class Od{constructor(){Nc(this,"idNodeMap",new Map),Nc(this,"nodeMetaMap",new WeakMap)}getId(t){var r;return t?((r=this.getMeta(t))==null?void 0:r.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);
29this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(n,s)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Zv(){return new Od}function Qs({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function vr({isMasked:e,element:t,value:n,maskInputFn:r}){let s=n||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function jn(e){return e.toLowerCase()}function ai(e){return e.toUpperCase()}const Oc="__rrweb_original__";function eb(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let s=0;s<e.height;s+=n){const o=t.getImageData,i=Oc in o?o[Oc]:o;if(new Uint32Array(i.call(t,r,s,Math.min(n,e.width-r),Math.min(n,e.height-s)).data.buffer).some(a=>a!==0))return!1}return!0}function ta(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?jn(t):null}function Ts(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function Md(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i,s=n.pathname.match(r);return(s==null?void 0:s[1])??null}const Mc={};function Pd(e){const t=Mc[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const o=s.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(s)}catch{}return Mc[e]=r.bind(window)}function ci(...e){return Pd("setTimeout")(...e)}function Ld(...e){return Pd("clearTimeout")(...e)}function Dd(e){try{return e.contentDocument}catch{}}function tb(e){try{return e.contentWindow}catch{}}let nb=1;const rb=new RegExp("[^a-z0-9-_:]"),br=-2;function na(){return nb++}function sb(e){if(e instanceof HTMLFormElement)return"form";const t=jn(e.tagName);return rb.test(t)?"div":t}function ob(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let gn,Pc;const ib=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ab=/^(?:[a-z+]+:)?\/\//i,cb=/^www\..*/i,ub=/^(data:)([^,]*),(.*)/i;function lb(e,t){if(!e||t.size===0)return e;try{const n=e.split(";"),r=[];for(let s of n){if(s=s.trim(),!s)continue;const o=s.indexOf(":");if(o===-1){r.push(s);continue}const i=s.slice(0,o).trim();t.has(i)||r.push(s)}return r.join("; ")+(r.length>0&&e.endsWith(";")?";":"")}catch(n){return console.warn("Error filtering CSS properties:",n),e}}function Is(e,t){return(e||"").replace(ib,(n,r,s,o,i,c)=>{const a=s||i||c,u=r||o||"";if(!a)return n;if(ab.test(a)||cb.test(a))return`url(${u}${a}${u})`;if(ub.test(a))return`url(${u}${a}${u})`;if(a[0]==="/")return`url(${u}${ob(t)+a}${u})`;const l=t.split("/"),d=a.split("/");l.pop();for(const f of d)f!=="."&&(f===".."?l.pop():l.push(f));return`url(${u}${l.join("/")}${u})`})}const db=/^[^ \t\n\r\u000c]+/,fb=/^[, \t\n\r\u000c]+/;function pb(e,t){if(t.trim()==="")return t;let n=0;function r(o){let i;const c=o.exec(t.substring(n));return c?(i=c[0],n+=i.length,i):""}const s=[];for(;r(fb),!(n>=t.length);){let o=r(db);if(o.slice(-1)===",")o=En(e,o.substring(0,o.length-1)),s.push(o);else{let i="";o=En(e,o);let c=!1;for(;;){const a=t.charAt(n);if(a===""){s.push((o+i).trim());break}else if(c)a===")"&&(c=!1);else if(a===","){n+=1,s.push((o+i).trim());break}else a==="("&&(c=!0);i+=a,n+=1}}}return s.join(", ")}const Lc=new WeakMap;function En(e,t){return!t||t.trim()===""?t:Zs(e,t)}function hb(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Zs(e,t){let n=Lc.get(e);if(n||(n=e.createElement("a"),Lc.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function jd(e,t,n,r,s,o,i){if(!r)return r;if(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#"))return En(e,r);if(n==="xlink:href"&&r[0]!=="#")return En(e,r);if(n==="background"&&(t==="table"||t==="td"||t==="th"))return En(e,r);if(n==="srcset")return pb(e,r);if(n==="style"){let c=Is(r,Zs(e));return i&&i.size>0&&(c=lb(c,i)),c}else if(t==="object"&&n==="data")return En(e,r);return typeof o=="function"?o(n,r,s):r}
29function Fd(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function mb(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let s=e.classList.length;s--;){const o=e.classList[s];if(t.test(o))return!0}if(n)return e.matches(n)}catch{}return!1}function gb(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Yt(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Yt(e.parentNode,t,n,r+1)}function wn(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(gb(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function Fn(e,t,n,r,s,o){try{const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(i===null)return!1;if(i.tagName==="INPUT"){const u=i.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let c=-1,a=-1;if(o){if(a=Yt(i,wn(r,s)),a<0)return!0;c=Yt(i,wn(t,n),a>=0?a:1/0)}else{if(c=Yt(i,wn(t,n)),c<0)return!1;a=Yt(i,wn(r,s),c>=0?c:1/0)}return c>=0?a>=0?c<=a:!0:a>=0?!1:!!o}catch{}return!!o}function _b(e,t,n){const r=tb(e);if(!r)return;let s=!1,o;try{o=r.document.readyState}catch{return}if(o!=="complete"){const c=ci(()=>{s||(t(),s=!0)},n);e.addEventListener("load",()=>{Ld(c),s=!0,t()});return}const i="about:blank";if(r.location.href!==i||e.src===i||e.src==="")return ci(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function yb(e,t,n){let r=!1,s;try{s=e.sheet}catch{s=null}if(s)return;const o=ci(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{Ld(o),r=!0,t()})}function Sb(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:c,maskAttributeFn:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:h,maskInputOptions:m={},maskTextFn:g,maskInputFn:_,dataURLOptions:v={},inlineImages:S,recordCanvas:O,keepIframeSrcFn:R,newlyAddedElement:M=!1,ignoreCSSAttributes:P}=t,y=vb(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:pe.Document,childNodes:[],compatMode:e.compatMode}:{type:pe.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:pe.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:y};case e.ELEMENT_NODE:return Eb(e,{doc:n,blockClass:s,blockSelector:o,unblockSelector:i,inlineStylesheet:h,maskAttributeFn:a,maskInputOptions:m,maskInputFn:_,dataURLOptions:v,inlineImages:S,recordCanvas:O,keepIframeSrcFn:R,newlyAddedElement:M,rootId:y,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f,ignoreCSSAttributes:P});case e.TEXT_NODE:return bb(e,{doc:n,maskAllText:c,maskTextClass:u,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:g,maskInputOptions:m,maskInputFn:_,rootId:y});case e.CDATA_SECTION_NODE:return{type:pe.CDATA,textContent:"",rootId:y};case e.COMMENT_NODE:return{type:pe.Comment,textContent:e.textContent||"",rootId:y};default:return!1}}function vb(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function bb(e,t){var v;const{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:o,unmaskTextSelector:i,maskTextFn:c,maskInputOptions:a,maskInputFn:u,rootId:l}=t,d=e.parentNode&&e.parentNode.tagName;let f=e.textContent;const h=d==="STYLE"?!0:void 0,m=d==="SCRIPT"?!0:void 0,g=d==="TEXTAREA"?!0:void 0;if(h&&f){try{e.nextSibling||e.previousSibling||(v=e.parentNode.sheet)!=null&&v.cssRules&&(f=ws(e.parentNode.sheet))}catch(S){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${S}`,e)}f=Is(f,Zs(t.doc))}m&&(f="SCRIPT_PLACEHOLDER");const _=Fn(e,r,o,s,i,n);if(!h&&!m&&!g&&f&&_&&(f=c?c(f,e.parentElement):f.replace(/[\S]/g,"*")),g&&f&&(a.textarea||_)&&(f=u?u(f,e.parentNode):f.replace(/[\S]/g,"*")),d==="OPTION"&&f){const S=Qs({type:null,tagName:d,maskInputOptions:a});f=vr({isMasked:Fn(e,r,o,s,i,S),element:e,value:f,maskInputFn:u})}return{type:pe.Text,textContent:f||"",isStyle:h,rootId:l}}function Eb(e,t){const{doc:n,blockClass:r,blockSelector:s,unblockSelector:o,inlineStylesheet:i,maskInputOptions:c={},maskAttributeFn:a,maskInputFn:u,dataURLOptions:l={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:h,newlyAddedElement:m=!1,rootId:g,maskTextClass:_,unmaskTextClass:v,maskTextSelector:S,unmaskTextSelector:O,ignoreCSSAttributes:R}=t,M=mb(e,r,s,o),P=sb(e);let y={};const N=e.attributes.length;for(let T=0;T<N;T++){const C=e.attributes[T];C.name&&!Fd(P,C.name,C.value)&&(y[C.name]=jd(n,P,jn(C.name),C.value,e,a,R))}if(P==="link"&&i){const T=Array.from(n.styleSheets).find(B=>B.href===e.href);let C=null;T&&(C=ws(T)),C&&(y.rel=null,y.href=null,y.crossorigin=null,y._cssText=Is(C,T.href))}if(P==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const T=ws(e.sheet);T&&(y._cssText=Is(T,Zs(n)))}if(P==="input"||P==="textarea"||P==="select"||P==="option"){const T=e,C=ta(T),B=Ts(T,ai(P),C),Z=T.checked;if(C!=="submit"&&C!=="button"&&B){const F=Fn(T,_,S,v,O,Qs({type:C,tagName:ai(P),maskInputOptions:c}));y.value=vr({isMasked:F,element:T,value:B,maskInputFn:u})}Z&&(y.checked=Z)}if(P==="option"&&(e.selected&&!c.select?y.selected=!0:delete y.selected),P==="canvas"&&f){if(e.__context==="2d")eb(e)||(y.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){const T=e.toDataURL(l.type,l.quality),C=n.createElement("canvas");C.width=e.width,C.height=e.height;const B=C.toDataURL(l.type,l.quality);T!==B&&(y.rr_dataURL=T)}}if(P==="img"&&d){gn||(gn=n.createElement("canvas"),Pc=gn.getContext("2d"));const T=e,C=T.currentSrc||T.getAttribute("src")||"<unknown-src>",B=T.crossOrigin,Z=()=>{T.removeEventListener("load",Z);
vendor: 4,115 bytes, line 29
29try{gn.width=T.naturalWidth,gn.height=T.naturalHeight,Pc.drawImage(T,0,0),y.rr_dataURL=gn.toDataURL(l.type,l.quality)}catch(F){if(T.crossOrigin!=="anonymous"){T.crossOrigin="anonymous",T.complete&&T.naturalWidth!==0?Z():T.addEventListener("load",Z);return}else console.warn(`Cannot inline img src=${C}! Error: ${F}`)}T.crossOrigin==="anonymous"&&(B?y.crossOrigin=B:T.removeAttribute("crossorigin"))};T.complete&&T.naturalWidth!==0?Z():T.addEventListener("load",Z)}if((P==="audio"||P==="video")&&(y.rr_mediaState=e.paused?"paused":"played",y.rr_mediaCurrentTime=e.currentTime),m||(e.scrollLeft&&(y.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(y.rr_scrollTop=e.scrollTop)),M){const{width:T,height:C}=e.getBoundingClientRect();y={class:y.class,rr_width:`${T}px`,rr_height:`${C}px`}}P==="iframe"&&!h(y.src)&&(!M&&!Dd(e)&&(y.rr_src=y.src),delete y.src);let j;try{customElements.get(P)&&(j=!0)}catch{}return{type:pe.Element,tagName:P,attributes:y,childNodes:[],isSVG:hb(e)||void 0,needBlock:M,rootId:g,isCustom:j}}function ae(e){return e==null?"":e.toLowerCase()}function wb(e,t){if(t.comment&&e.type===pe.Comment)return!0;if(e.type===pe.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&Md(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(ae(e.attributes.name).match(/^msapplication-tile(image|color)$/)||ae(e.attributes.name)==="application-name"||ae(e.attributes.rel)==="icon"||ae(e.attributes.rel)==="apple-touch-icon"||ae(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&ae(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ae(e.attributes.property).match(/^(og|twitter|fb):/)||ae(e.attributes.name).match(/^(og|twitter):/)||ae(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(ae(e.attributes.name)==="robots"||ae(e.attributes.name)==="googlebot"||ae(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(ae(e.attributes.name)==="author"||ae(e.attributes.name)==="generator"||ae(e.attributes.name)==="framework"||ae(e.attributes.name)==="publisher"||ae(e.attributes.name)==="progid"||ae(e.attributes.property).match(/^article:/)||ae(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(ae(e.attributes.name)==="google-site-verification"||ae(e.attributes.name)==="yandex-verification"||ae(e.attributes.name)==="csrf-token"||ae(e.attributes.name)==="p:domain_verify"||ae(e.attributes.name)==="verify-v1"||ae(e.attributes.name)==="verification"||ae(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Tn(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:c,maskTextClass:a,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:f=!1,inlineStylesheet:h=!0,maskInputOptions:m={},maskAttributeFn:g,maskTextFn:_,maskInputFn:v,slimDOMOptions:S,dataURLOptions:O={},inlineImages:R=!1,recordCanvas:M=!1,onSerialize:P,onIframeLoad:y,iframeLoadTimeout:N=5e3,onBlockedImageLoad:j,onStylesheetLoad:T,stylesheetLoadTimeout:C=5e3,keepIframeSrcFn:B=()=>!1,newlyAddedElement:Z=!1,ignoreCSSAttributes:F}=t;let{preserveWhiteSpace:ie=!0}=t;const I=Sb(e,{doc:n,mirror:r,blockClass:s,blockSelector:o,maskAllText:c,unblockSelector:i,maskTextClass:a,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:g,maskTextFn:_,maskInputFn:v,dataURLOptions:O,inlineImages:R,recordCanvas:M,keepIframeSrcFn:B,newlyAddedElement:Z,ignoreCSSAttributes:F});if(!I)return console.warn(e,"not serialized"),null;let x;r.hasNode(e)?x=r.getId(e):wb(I,S)||!ie&&I.type===pe.Text&&!I.isStyle&&!I.textContent.trim().length?x=br:x=na();const k=Object.assign(I,{id:x});if(r.add(e,k),x===br)return null;P&&P(e);let V=!f;if(k.type===pe.Element){V=V&&!k.needBlock;const A=e.shadowRoot;
29A&&cr(A)&&(k.isShadowHost=!0)}if((k.type===pe.Document||k.type===pe.Element)&&V){S.headWhitespace&&k.type===pe.Element&&k.tagName==="head"&&(ie=!1);const A={doc:n,mirror:r,blockClass:s,blockSelector:o,maskAllText:c,unblockSelector:i,maskTextClass:a,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:f,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:g,maskTextFn:_,maskInputFn:v,slimDOMOptions:S,dataURLOptions:O,inlineImages:R,recordCanvas:M,preserveWhiteSpace:ie,onSerialize:P,onIframeLoad:y,iframeLoadTimeout:N,onBlockedImageLoad:j,onStylesheetLoad:T,stylesheetLoadTimeout:C,keepIframeSrcFn:B,ignoreCSSAttributes:F},w=e.childNodes?Array.from(e.childNodes):[];for(const D of w){const U=Tn(D,A);U&&k.childNodes.push(U)}if(Gv(e)&&e.shadowRoot)for(const D of Array.from(e.shadowRoot.childNodes)){const U=Tn(D,A);U&&(cr(e.shadowRoot)&&(U.isShadow=!0),k.childNodes.push(U))}}if(e.parentNode&&ar(e.parentNode)&&cr(e.parentNode)&&(k.isShadow=!0),k.type===pe.Element&&k.tagName==="iframe"&&!k.needBlock&&_b(e,()=>{const A=Dd(e);if(A&&y){const w=Tn(A,{doc:A,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:c,maskTextClass:a,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:g,maskTextFn:_,maskInputFn:v,slimDOMOptions:S,dataURLOptions:O,inlineImages:R,recordCanvas:M,preserveWhiteSpace:ie,onSerialize:P,onIframeLoad:y,iframeLoadTimeout:N,onStylesheetLoad:T,stylesheetLoadTimeout:C,keepIframeSrcFn:B,ignoreCSSAttributes:F});w&&y(e,w)}},N),k.type===pe.Element&&k.tagName==="img"&&!e.complete&&k.needBlock){const A=e,w=()=>{if(A.isConnected&&!A.complete&&j)try{const D=A.getBoundingClientRect();D.width>0&&D.height>0&&j(A,k,D)}catch{}A.removeEventListener("load",w)};A.isConnected&&A.addEventListener("load",w)}return k.type===pe.Element&&k.tagName==="link"&&typeof k.attributes.rel=="string"&&(k.attributes.rel==="stylesheet"||k.attributes.rel==="preload"&&typeof k.attributes.href=="string"&&Md(k.attributes.href)==="css")&&yb(e,()=>{if(T){const A=Tn(e,{doc:n,mirror:r,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:c,maskTextClass:a,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:g,maskTextFn:_,maskInputFn:v,slimDOMOptions:S,dataURLOptions:O,inlineImages:R,recordCanvas:M,preserveWhiteSpace:ie,onSerialize:P,onIframeLoad:y,iframeLoadTimeout:N,onStylesheetLoad:T,stylesheetLoadTimeout:C,keepIframeSrcFn:B,ignoreCSSAttributes:F});A&&T(e,A)}},C),k.type===pe.Element&&delete k.needBlock,k}function Tb(e,t){const{mirror:n=new Od,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:o=null,maskAllText:i=!1,maskTextClass:c="rr-mask",unmaskTextClass:a=null,maskTextSelector:u=null,unmaskTextSelector:l=null,inlineStylesheet:d=!0,inlineImages:f=!1,recordCanvas:h=!1,maskAllInputs:m=!1,maskAttributeFn:g,maskTextFn:_,maskInputFn:v,slimDOM:S=!1,dataURLOptions:O,preserveWhiteSpace:R,onSerialize:M,onIframeLoad:P,iframeLoadTimeout:y,onBlockedImageLoad:N,onStylesheetLoad:j,stylesheetLoadTimeout:T,keepIframeSrcFn:C=()=>!1,ignoreCSSAttributes:B=new Set([])}=t||{};return Tn(e,{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,maskAllText:i,maskTextClass:c,unmaskTextClass:a,maskTextSelector:u,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputOptions:m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:m===!1?{}:m,maskAttributeFn:g,maskTextFn:_,maskInputFn:v,slimDOMOptions:S===!0||S==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:S==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:S===!1?{}:S,dataURLOptions:O,inlineImages:f,recordCanvas:h,preserveWhiteSpace:R,onSerialize:M,onIframeLoad:P,iframeLoadTimeout:y,onBlockedImageLoad:N,onStylesheetLoad:j,stylesheetLoadTimeout:T,keepIframeSrcFn:C,newlyAddedElement:!1,ignoreCSSAttributes:B})}function Re(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Sn=`Please stop import mirror directly. Instead of that,\r
30now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
31or you can use record.mirror to access the mirror instance during recording.`;let Dc={map:{},getId(){return console.error(Sn),-1},getNode(){return console.error(Sn),null},removeNodeFromMap(){console.error(Sn)},has(){return console.error(Sn),!1},reset(){console.error(Sn)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Dc=new Proxy(Dc,{get(e,t,n){return t==="map"&&console.error(Sn),Reflect.get(e,t,n)}}));function Er(e,t,n={}){let r=null,s=0;return function(...o){const i=Date.now();!s&&n.leading===!1&&(s=i);const c=t-(i-s),a=this;c<=0||c>t?(r&&(Nb(r),r=null),s=i,e.apply(a,o)):!r&&n.trailing!==!1&&(r=eo(()=>{s=n.leading===!1?0:Date.now(),r=null,e.apply(a,o)},c))}}function $d(e,t,n,r,s=window){const o=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(i){eo(()=>{n.set.call(this,i)},0),o&&o.set&&o.set.call(this,i)}}),()=>$d(e,t,o||{},!0)}function ra(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],s=n(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}let xs=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(xs=()=>new Date().getTime());function Bd(e){var n,r,s,o,i,c;const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:(t==null?void 0:t.documentElement.scrollLeft)||((r=(n=t==null?void 0:t.body)==null?void 0:n.parentElement)==null?void 0:r.scrollLeft)||((s=t==null?void 0:t.body)==null?void 0:s.scrollLeft)||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(t==null?void 0:t.documentElement.scrollTop)||((i=(o=t==null?void 0:t.body)==null?void 0:o.parentElement)==null?void 0:i.scrollTop)||((c=t==null?void 0:t.body)==null?void 0:c.scrollTop)||0}}function Ud(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Hd(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Wd(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Fe(e,t,n,r,s){if(!e)return!1;const o=Wd(e);if(!o)return!1;const i=wn(t,n);if(!s){const u=r&&o.matches(r);return i(o)&&!u}const c=Yt(o,i);let a=-1;return c<0?!1:(r&&(a=Yt(o,wn(null,r))),c>-1&&a<0?!0:c<a)}function Ib(e,t){return t.getId(e)!==-1}function Co(e,t){return t.getId(e)===br}function zd(e,t){if(ar(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?zd(e.parentNode,t):!0:!0}function ui(e){return!!e.changedTouches}function xb(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function qd(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Gd(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function li(e){return!!(e!=null&&e.shadowRoot)}class kb{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Vd(e){var n,r;let t=null;return((r=(n=e.getRootNode)==null?void 0:n.call(e))==null?void 0:r.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function Cb(e){let t=e,n;for(;n=Vd(t);)t=n;return t}function Rb(e){const t=e.ownerDocument;if(!t)return!1;const n=Cb(e);return t.contains(n)}function Yd(e){const t=e.ownerDocument;return t?t.contains(e)||Rb(e):!1}const jc={};function sa(e){const t=jc[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const o=s.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(s)}catch{}return jc[e]=r.bind(window)}function Ab(...e){return sa("requestAnimationFrame")(...e)}
31function eo(...e){return sa("setTimeout")(...e)}function Nb(...e){return sa("clearTimeout")(...e)}var K=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(K||{}),q=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(q||{}),Ce=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(Ce||{}),ct=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(ct||{}),vn=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(vn||{});let ur;function Ob(e){ur=e}function Mb(){ur=void 0}const te=e=>ur?(...n)=>{try{return e(...n)}catch(r){if(ur&&ur(r)===!0)return()=>{};throw r}}:e;var Fc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Pb=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Zr=0;Zr<Fc.length;Zr++)Pb[Fc.charCodeAt(Zr)]=Zr;class $c{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}function oa(e){try{return e.contentDocument}catch{}}function wr(e){try{return e.contentWindow}catch{}}class Lb{constructor(t){this.doc=t,this.unattachedDoc=null}parse(t){return this.parseWithConstructableStylesheet(t)||this.parseWithDetachedElement(t)}parseWithConstructableStylesheet(t){if(typeof CSSStyleSheet>"u"||typeof CSSStyleSheet.prototype.replaceSync!="function")return null;try{const n=new CSSStyleSheet;n.replaceSync(`x { ${t} }`);const r=n.cssRules[0];return!r||r.type!==CSSRule.STYLE_RULE?null:r.style}catch{return null}}parseWithDetachedElement(t){const n=this.getUnattachedDoc().createElement("span");return n.setAttribute("style",t),n.style}getUnattachedDoc(){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}return this.unattachedDoc}}function Bc(e){return"__ln"in e}class Db{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=(n==null?void 0:n.next)||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&Bc(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&Bc(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const Uc=(e,t)=>`${e}@${t}`;class jb{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new Db,s=a=>{let u=a,l=br;for(;l===br;)u=u&&u.nextSibling,l=u&&this.mirror.getId(u);return l},o=a=>{if(!a.parentNode||!Yd(a))return;const u=ar(a.parentNode)?this.mirror.getId(Vd(a)):this.mirror.getId(a.parentNode),l=s(a);if(u===-1||l===-1)return r.addNode(a);const d=Tn(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inl
31ineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:f=>{qd(f,this.mirror)&&!Fe(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(f),Gd(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),li(a)&&this.shadowDomManager.addShadowRoot(a.shadowRoot,this.doc)},onIframeLoad:(f,h)=>{if(Fe(f,this.blockClass,this.blockSelector,this.unblockSelector,!1))return;this.iframeManager.attachIframe(f,h);const m=wr(f);m&&this.canvasManager.addWindow(m),this.shadowDomManager.observeAttachShadow(f)},onStylesheetLoad:(f,h)=>{this.stylesheetManager.attachLinkElement(f,h)},onBlockedImageLoad:(f,h,{width:m,height:g})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:h.id,attributes:{style:{width:`${m}px`,height:`${g}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});d&&(t.push({parentId:u,nextId:l,node:d}),n.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)Hc(this.removes,a,this.mirror)&&!this.movedSet.has(a.parentNode)||o(a);for(const a of this.addedSet)!Wc(this.droppedSet,a)&&!Hc(this.removes,a,this.mirror)||Wc(this.movedSet,a)?o(a):this.droppedSet.add(a);let i=null;for(;r.length;){let a=null;if(i){const u=this.mirror.getId(i.value.parentNode),l=s(i.value);u!==-1&&l!==-1&&(a=i)}if(!a){let u=r.tail;for(;u;){const l=u;if(u=u.previous,l){const d=this.mirror.getId(l.value.parentNode);if(s(l.value)===-1)continue;if(d!==-1){a=l;break}else{const h=l.value;if(h.parentNode&&h.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const m=h.parentNode.host;if(this.mirror.getId(m)!==-1){a=l;break}}}}}}if(!a){for(;r.head;)r.removeNode(r.head.value);break}i=a.previous,r.removeNode(a.value),o(a.value)}const c={texts:this.texts.map(a=>({id:this.mirror.getId(a.node),value:a.value})).filter(a=>!n.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{const{attributes:u}=a;if(typeof u.style=="string"){const l=JSON.stringify(a.styleDiff),d=JSON.stringify(a._unchangedStyles);l.length<u.style.length&&(l+d).split("var(").length===u.style.split("var(").length&&(u.style=a.styleDiff)}return{id:this.mirror.getId(a.node),attributes:u}}).filter(a=>!n.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:t};!c.texts.length&&!c.attributes.length&&!c.removes.length&&!c.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(c))},this.processMutation=t=>{if(!Co(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Fe(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:Fn(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,Wd(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,s=t.target.getAttribute(r);if(r==="value"){const i=ta(n),c=n.tagName;s=Ts(n,c,i);const a=Qs({maskInputOptions:this.maskInputOptions,tagName:c,type:i}),u=Fn(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,a);s=vr({isMasked:u,element:n,value:s,maskInputFn:this.maskInputFn})}if(Fe(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||s===t.oldValue)return;let o=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(s))if(!oa(n))r="rr_src";else return;if(o||(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(t.target,o)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!Fd(n.tagName,r)&&(o.attributes[r]=jd(this.doc,jn(n.tagName),jn(r),s,n,this.maskAttributeFn),r==="style")){const i=t.oldValue?this.styleDeclarationParser.parse(t.oldValue):null;for(const c of Array.from(n.style)){const a=n.style.getPropertyValue(c),u=n.style.getPropertyPriority(c);a!==((i==null?void 0:i.getPropertyValue(c))||"")||u!==((i==null?void 0:i.getPropertyPriority(c))||"")?u===""?o.styleDiff[c]=a:o.styleDiff[c]=[a,u]:o._unchangedStyles[c]=[a,u]}if(i)for(const c of Array.from(i))n.style.getPropertyValue(c)===""&&(o.styleDiff[c]=!1)}break}
vendor: 9,389 bytes, line 31
31case"childList":{if(Fe(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),s=ar(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Fe(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Co(n,this.mirror)||!Ib(n,this.mirror)||(this.addedSet.has(n)?(di(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||zd(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Uc(r,s)]?di(this.movedSet,n):this.removes.push({parentId:s,id:r,isShadow:ar(t.target)&&cr(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Co(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[Uc(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Fe(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEach(r=>this.genAdds(r)),li(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager","ignoreCSSAttributes"].forEach(n=>{this[n]=t[n]}),this.styleDeclarationParser=new Lb(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 di(e,t){var n;e.delete(t),(n=t.childNodes)==null||n.forEach(r=>di(e,r))}function Hc(e,t,n){return e.length===0?!1:Fb(e,t,n)}function Fb(e,t,n){let r=t.parentNode;for(;r;){const s=n.getId(r);if(e.some(o=>o.id===s))return!0;r=r.parentNode}return!1}function Wc(e,t){return e.size===0?!1:Kd(e,t)}function Kd(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:Kd(e,n):!1}const In=[];function Br(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Jd(e,t){var i,c;const n=new jb;In.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const s=(c=(i=window==null?void 0:window.Zone)==null?void 0:i.__symbol__)==null?void 0:c.call(i,"MutationObserver");s&&window[s]&&(r=window[s]);const o=new r(te(a=>{e.onMutation&&e.onMutation(a)===!1||n.processMutations.bind(n)(a)}));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function $b({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const s=typeof t.mousemove=="number"?t.mousemove:50,o=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let i=[],c;const a=Er(te(d=>{const f=Date.now()-c;e(i.map(h=>(h.timeOffset-=f,h)),d),i=[],c=null}),o),u=te(Er(te(d=>{const f=Br(d),{clientX:h,clientY:m}=ui(d)?d.changedTouches[0]:d;c||(c=xs()),i.push({x:h,y:m,id:r.getId(f),timeOffset:xs()-c}),a(typeof DragEvent<"u"&&d instanceof DragEvent?q.Drag:d instanceof MouseEvent?q.MouseMove:q.TouchMove)}),s,{trailing:!1})),l=[Re("mousemove",u,n),Re("touchmove",u,n),Re("drag",u,n)];return te(()=>{l.forEach(d=>d())})}function Bb({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,sampling:i}){if(i.mouseInteraction===!1)return()=>{};const c=i.mouseInteraction===!0||i.mouseInteraction===void 0?{}:i.mouseInteraction,a=[];let u=null;const l=d=>f=>{const h=Br(f);if(Fe(h,r,s,o,!0))return;let m=null,g=d;if("pointerType"in f){switch(f.pointerType){case"mouse":m=ct.Mouse;break;case"touch":m=ct.Touch;break;case"pen":m=ct.Pen;break}m===ct.Touch?Ce[d]===Ce.MouseDown?g="TouchStart":Ce[d]===Ce.MouseUp&&(g="TouchEnd"):ct.Pen}else ui(f)&&(m=ct.Touch);m!==null?(u=m,(g.startsWith("Touch")&&m===ct.Touch||g.startsWith("Mouse")&&m===ct.Mouse)&&(m=null)):Ce[d]===Ce.Click&&(m=u,u=null);const _=ui(f)?f.changedTouches[0]:f;if(!_)return;const v=n.getId(h),{clientX:S,clientY:O}=_;te(e)({type:Ce[g],id:v,x:S,y:O,...m!==null&&{pointerType:m}})};return Object.keys(Ce).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&c[d]!==!1).forEach(d=>{let f=jn(d);const h=l(d);if(window.PointerEvent)switch(Ce[d]){case Ce.MouseDown:case Ce.MouseUp:f=f.replace("mouse","pointer");break;case Ce.TouchStart:case Ce.TouchEnd:return}a.push(Re(f,h,t))}),te(()=>{a.forEach(d=>d())})}function Xd({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,sampling:i}){const c=te(Er(te(a=>{const u=Br(a);if(!u||Fe(u,r,s,o,!0))return;const l=n.getId(u);if(u===t&&t.defaultView){const d=Bd(t.defaultView);e({id:l,x:d.left,y:d.top})}else e({id:l,x:u.scrollLeft,y:u.scrollTop})}),i.scroll||100));return Re("scroll",c,t)}function Ub({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const s=te(Er(te(()=>{const o=Ud(),i=Hd();(n!==o||r!==i)&&(e({width:Number(i),height:Number(o)}),n=o,r=i)}),200));return Re("resize",s,t)}const Hb=["INPUT","TEXTAREA","SELECT"],zc=new WeakMap;function Wb({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,ignoreClass:i,ignoreSelector:c,maskInputOptions:a,maskInputFn:u,sampling:l,userTriggeredOnInput:d,maskTextClass:f,unmaskTextClass:h,maskTextSelector:m,unmaskTextSelector:g}){function _(y){let N=Br(y);const j=y.isTrusted,T=N&&ai(N.tagName);if(T==="OPTION"&&(N=N.parentElement),!N||!T||Hb.indexOf(T)<0||Fe(N,r,s,o,!0))return;const C=N;if(C.classList.contains(i)||c&&C.matches(c))return;const B=ta(N);let Z=Ts(C,T,B),F=!1;const ie=Qs({maskInputOptions:a,tagName:T,type:B}),I=Fn(N,f,m,h,g,ie);(B==="radio"||B==="checkbox")&&(F=N.checked),Z=vr({isMasked:I,element:N,value:Z,maskInputFn:u}),v(N,d?{text:Z,isChecked:F,userTriggered:j}:{text:Z,isChecked:F});const x=N.name;B==="radio"&&x&&F&&t.querySelectorAll(`input[type="radio"][name="${x}"]`).forEach(k=>{if(k!==N){const V=vr({isMasked:I,element:k,value:Ts(k,T,B),maskInputFn:u});v(k,d?{text:V,isChecked:!F,userTriggered:!1}:{text:V,isChecked:!F})}})}function v(y,N){const j=zc.get(y);if(!j||j.text!==N.text||j.isChecked!==N.isChecked){zc.set(y,N);const T=n.getId(y);te(e)({...N,id:T})}}const O=(l.input==="last"?["change"]:["input","change"]).map(y=>Re(y,te(_),t)),R=t.defaultView;if(!R)return()=>{O.forEach(y=>y())};const M=R.Object.getOwnPropertyDescriptor(R.HTMLInputElement.prototype,"value"),P=[[R.HTMLInputElement.prototype,"value"],[R.HTMLInputElement.prototype,"checked"],[R.HTMLSelectElement.prototype,"value"],[R.HTMLTextAreaElement.prototype,"value"],[R.HTMLSelectElement.prototype,"selectedIndex"],[R.HTMLOptionElement.prototype,"selected"]];return M&&M.set&&O.push(...P.map(y=>$d(y[0],y[1],{set(){te(_)({target:this,isTrusted:!1})}},!1,R))),te(()=>{O.forEach(y=>y())})}function ks(e){const t=[];function n(r,s){if(es("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||es("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||es("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||es("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const i=Array.from(r.parentRule.cssRules).indexOf(r);s.unshift(i)}else if(r.parentStyleSheet){const i=Array.from(r.parentStyleSheet.cssRules).indexOf(r);s.unshift(i)}return s}return n(e,t)}function _t(e,t,n){let r,s;return e?(e.ownerNode?r=t.getId(e.ownerNode):s=n.getId(e),{styleId:s,id:r}):{}}function zb({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:te((l,d,f)=>{const[h,m]=f,{id:g,styleId:_}=_t(d,t,n.styleMirror);return(g&&g!==-1||_&&_!==-1)&&e({id:g,styleId:_,adds:[{rule:h,index:m}]}),l.apply(d,f)})});const o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:te((l,d,f)=>{const[h]=f,{id:m,styleId:g}=_t(d,t,n.styleMirror);return(m&&m!==-1||g&&g!==-1)&&e({id:m,styleId:g,removes:[{index:h}]}),l.apply(d,f)})});let i;r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:te((l,d,f)=>{const[h]=f,{id:m,styleId:g}=_t(d,t,n.styleMirror);return(m&&m!==-1||g&&g!==-1)&&e({id:m,styleId:g,replace:h}),l.apply(d,f)})}));let c;r.CSSStyleSheet.prototype.replaceSync&&(c=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(c,{apply:te((l,d,f)=>{const[h]=f,{id:m,styleId:g}=_t(d,t,n.styleMirror);return(m&&m!==-1||g&&g!==-1)&&e({id:m,styleId:g,replaceSync:h}),l.apply(d,f)})}));const a={};ts("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(ts("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),ts("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),ts("CSSSupportsRule")&&(a.CSSSupportsRule=r.CSSSupportsRule));const u={};
vendor: 13,264 bytes, line 31
31return Object.entries(a).forEach(([l,d])=>{u[l]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(u[l].insertRule,{apply:te((f,h,m)=>{const[g,_]=m,{id:v,styleId:S}=_t(h.parentStyleSheet,t,n.styleMirror);return(v&&v!==-1||S&&S!==-1)&&e({id:v,styleId:S,adds:[{rule:g,index:[...ks(h),_||0]}]}),f.apply(h,m)})}),d.prototype.deleteRule=new Proxy(u[l].deleteRule,{apply:te((f,h,m)=>{const[g]=m,{id:_,styleId:v}=_t(h.parentStyleSheet,t,n.styleMirror);return(_&&_!==-1||v&&v!==-1)&&e({id:_,styleId:v,removes:[{index:[...ks(h),g]}]}),f.apply(h,m)})})}),te(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=o,i&&(r.CSSStyleSheet.prototype.replace=i),c&&(r.CSSStyleSheet.prototype.replaceSync=c),Object.entries(a).forEach(([l,d])=>{d.prototype.insertRule=u[l].insertRule,d.prototype.deleteRule=u[l].deleteRule})})}function Qd({mirror:e,stylesheetManager:t},n){var i,c,a;let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const s=n.nodeName==="#document"?(i=n.defaultView)==null?void 0:i.Document:(a=(c=n.ownerDocument)==null?void 0:c.defaultView)==null?void 0:a.ShadowRoot,o=s!=null&&s.prototype?Object.getOwnPropertyDescriptor(s==null?void 0:s.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!s||!o?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){var u;return(u=o.get)==null?void 0:u.call(this)},set(u){var d;const l=(d=o.set)==null?void 0:d.call(this,u);if(r!==null&&r!==-1)try{t.adoptStyleSheets(u,r)}catch{}return l}}),te(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))}function qb({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const o=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:te((c,a,u)=>{var g;const[l,d,f]=u;if(n.has(l))return o.apply(a,[l,d,f]);const{id:h,styleId:m}=_t((g=a.parentRule)==null?void 0:g.parentStyleSheet,t,r.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,set:{property:l,value:d,priority:f},index:ks(a.parentRule)}),c.apply(a,u)})});const i=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:te((c,a,u)=>{var h;const[l]=u;if(n.has(l))return i.apply(a,[l]);const{id:d,styleId:f}=_t((h=a.parentRule)==null?void 0:h.parentStyleSheet,t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,remove:{property:l},index:ks(a.parentRule)}),c.apply(a,u)})}),te(()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=i})}function Gb({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:s,sampling:o,doc:i}){const c=te(u=>Er(te(l=>{const d=Br(l);if(!d||Fe(d,t,n,r,!0))return;const{currentTime:f,volume:h,muted:m,playbackRate:g}=d;e({type:u,id:s.getId(d),currentTime:f,volume:h,muted:m,playbackRate:g})}),o.media||500)),a=[Re("play",c(vn.Play),i),Re("pause",c(vn.Pause),i),Re("seeked",c(vn.Seeked),i),Re("volumechange",c(vn.VolumeChange),i),Re("ratechange",c(vn.RateChange),i)];return te(()=>{a.forEach(u=>u())})}function Vb({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,o=n.FontFace;n.FontFace=function(a,u,l){const d=new o(a,u,l);return s.set(d,{family:a,buffer:typeof u!="string",descriptors:l,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),d};const i=ra(t.fonts,"add",function(c){return function(a){return eo(te(()=>{const u=s.get(a);u&&(e(u),s.delete(a))}),0),c.apply(this,[a])}});return r.push(()=>{n.FontFace=o}),r.push(i),te(()=>{r.forEach(c=>c())})}function Yb(e){const{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:o,selectionCb:i}=e;let c=!0;const a=te(()=>{const u=t.getSelection();if(!u||c&&(u!=null&&u.isCollapsed))return;c=u.isCollapsed||!1;const l=[],d=u.rangeCount||0;for(let f=0;f<d;f++){const h=u.getRangeAt(f),{startContainer:m,startOffset:g,endContainer:_,endOffset:v}=h;Fe(m,r,s,o,!0)||Fe(_,r,s,o,!0)||l.push({start:n.getId(m),startOffset:g,end:n.getId(_),endOffset:v})}i({ranges:l})});return a(),Re("selectionchange",a)}function Kb({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:ra(n.customElements,"define",function(s){return function(o,i,c){try{t({define:{name:o}})}catch{}return s.apply(this,[o,i,c])}})}function Jb(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=Jd(e,e.doc));const s=$b(e),o=Bb(e),i=Xd(e),c=Ub(e,{win:n}),a=Wb(e),u=Gb(e);let l=()=>{},d=()=>{},f=()=>{},h=()=>{};e.recordDOM&&(l=zb(e,{win:n}),d=Qd(e,e.doc),f=qb(e,{win:n}),e.collectFonts&&(h=Vb(e)));const m=Yb(e),g=Kb(e),_=[];for(const v of e.plugins)_.push(v.observer(v.callback,n,v.options));return te(()=>{In.forEach(v=>v.reset()),r==null||r.disconnect(),s(),o(),i(),c(),a(),u(),l(),d(),f(),h(),m(),g(),_.forEach(v=>v())})}function es(e){return typeof window[e]<"u"}function ts(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class fi{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,s){const o=r||this.getIdToRemoteIdMap(t),i=s||this.getRemoteIdToIdMap(t);let c=o.get(n);return c||(c=this.generateIdFn(),o.set(n,c),i.set(c,n)),c}getIds(t,n){const r=this.getIdToRemoteIdMap(t),s=this.getRemoteIdToIdMap(t);return n.map(o=>this.getId(t,o,r,s))}getRemoteId(t,n,r){const s=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const o=s.get(n);return o||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(s=>this.getRemoteId(t,s,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}class Xb{constructor(){this.crossOriginIframeMirror=new fi(na),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class Qb{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new fi(na),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new fi(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 n=wr(t);n&&this.crossOriginIframeMap.set(n,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){var s,o;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((s=wr(t))==null||s.addEventListener("message",this.handleMessage.bind(this))),(o=this.loadListener)==null||o.call(this,t);const r=oa(t);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const s=this.crossOriginIframeMap.get(t.source);if(!s)return;const o=this.transformCrossOriginEvent(s,n.data.event);o&&this.wrappedEmit(o,n.data.isCheckout)}transformCrossOriginEvent(t,n){var r;switch(n.type){case K.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const s=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,s),this.patchRootIdOnNode(n.data.node,s),{timestamp:n.timestamp,type:K.IncrementalSnapshot,data:{source:q.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case K.Meta:case K.Load:case K.DomContentLoaded:return!1;case K.Plugin:return n;case K.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case K.IncrementalSnapshot:switch(n.data.source){case q.Mutation:return n.data.adds.forEach(s=>{this.replaceIds(s,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(s.node,t);const o=this.crossOriginIframeRootIdMap.get(t);o&&this.patchRootIdOnNode(s.node,o)}),n.data.removes.forEach(s=>{this.replaceIds(s,t,["parentId","id"])}),n.data.attributes.forEach(s=>{this.replaceIds(s,t,["id"])}),n.data.texts.forEach(s=>{this.replaceIds(s,t,["id"])}),n;case q.Drag:case q.TouchMove:case q.MouseMove:return n.data.positions.forEach(s=>{this.replaceIds(s,t,["id"])}),n;case q.ViewportResize:return!1;case q.MediaInteraction:case q.MouseInteraction:case q.Scroll:case q.CanvasMutation:case q.Input:return this.replaceIds(n.data,t,["id"]),n;case q.StyleSheetRule:case q.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case q.Font:return n;case q.Selection:return n.data.ranges.forEach(s=>{this.replaceIds(s,t,["start","end"])}),n;case q.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),(r=n.data.styles)==null||r.forEach(s=>{this.replaceStyleIds(s,t,["styleId"])}),n}}return!1}replace(t,n,r,s){for(const o of s)!Array.isArray(n[o])&&typeof n[o]!="number"||(Array.isArray(n[o])?n[o]=t.getIds(r,n[o]):n[o]=t.getId(r,n[o]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==pe.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class Zb{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class eE{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!cr(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=Jd({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Xd({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),eo(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(Qd({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=oa(t),r=wr(t);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(ra(t.prototype,"attachShadow",function(s){return function(o){const i=s.call(this,o);return this.shadowRoot&&Yd(this)&&r.addShadowRoot(this.shadowRoot,n),i}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class tE{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new kb,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},s=[];for(const o of t){let i;this.styleMirror.has(o)?i=this.styleMirror.getId(o):(i=this.styleMirror.add(o),s.push({styleId:i,rules:Array.from(o.rules||CSSRule,(c,a)=>({rule:Nd(c),index:a}))})),r.styleIds.push(i)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class nE{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(s=>s!==n)}add(t,n){this.active||(this.active=!0,Ab(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let le,Cs;var Mu;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((Mu=e.contentWindow)==null?void 0:Mu.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const Ye=Zv();function Qe(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr
31-block",blockSelector:o=null,unblockSelector:i=null,ignoreClass:c="rr-ignore",ignoreSelector:a=null,maskAllText:u=!1,maskTextClass:l="rr-mask",unmaskTextClass:d=null,maskTextSelector:f=null,unmaskTextSelector:h=null,inlineStylesheet:m=!0,maskAllInputs:g,maskInputOptions:_,slimDOMOptions:v,maskAttributeFn:S,maskInputFn:O,maskTextFn:R,maxCanvasSize:M=null,packFn:P,sampling:y={},dataURLOptions:N={},mousemoveWait:j,recordDOM:T=!0,recordCanvas:C=!1,recordCrossOriginIframes:B=!1,recordAfter:Z=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:F=!1,collectFonts:ie=!1,inlineImages:I=!1,plugins:x,keepIframeSrcFn:k=()=>!1,ignoreCSSAttributes:V=new Set([]),errorHandler:A,onMutation:w,getCanvasManager:D}=e;Ob(A);const U=B?window.parent===window:!0;let me=!1;if(!U)try{window.parent.document&&(me=!1)}catch{me=!0}if(U&&!t)throw new Error("emit function is required");if(!U&&!me)return()=>{};j!==void 0&&y.mousemove===void 0&&(y.mousemove=j),Ye.reset();const xe=g===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:_!==void 0?_:{},be=v===!0||v==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:v==="all",headMetaDescKeywords:v==="all"}:v||{};xb();let et,we=0;const Qn=re=>{for(const Ve of x||[])Ve.eventProcessor&&(re=Ve.eventProcessor(re));return P&&!me&&(re=P(re)),re};le=(re,Ve)=>{var Pe;const ee=re;if(ee.timestamp=xs(),(Pe=In[0])!=null&&Pe.isFrozen()&&ee.type!==K.FullSnapshot&&!(ee.type===K.IncrementalSnapshot&&ee.data.source===q.Mutation)&&In.forEach(ke=>ke.unfreeze()),U)t==null||t(Qn(ee),Ve);else if(me){const ke={type:"rrweb",event:Qn(ee),origin:window.location.origin,isCheckout:Ve};window.parent.postMessage(ke,"*")}if(ee.type===K.FullSnapshot)et=ee,we=0;else if(ee.type===K.IncrementalSnapshot){if(ee.data.source===q.Mutation&&ee.data.isAttachIframe)return;we++;const ke=r&&we>=r,se=n&&et&&ee.timestamp-et.timestamp>n;(ke||se)&&lo(!0)}};const Ft=re=>{le({type:K.IncrementalSnapshot,data:{source:q.Mutation,...re}})},ya=re=>le({type:K.IncrementalSnapshot,data:{source:q.Scroll,...re}}),hp=re=>le({type:K.IncrementalSnapshot,data:{source:q.CanvasMutation,...re}}),mp=re=>le({type:K.IncrementalSnapshot,data:{source:q.AdoptedStyleSheet,...re}}),$t=new tE({mutationCb:Ft,adoptedStyleSheetCb:mp}),Bt=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new Xb:new Qb({mirror:Ye,mutationCb:Ft,stylesheetManager:$t,recordCrossOriginIframes:B,wrappedEmit:le});for(const re of x||[])re.getMirror&&re.getMirror({nodeMirror:Ye,crossOriginIframeMirror:Bt.crossOriginIframeMirror,crossOriginIframeStyleMirror:Bt.crossOriginIframeStyleMirror});const co=new nE,uo=sE(D,{mirror:Ye,win:window,mutationCb:re=>le({type:K.IncrementalSnapshot,data:{source:q.CanvasMutation,...re}}),recordCanvas:C,blockClass:s,blockSelector:o,unblockSelector:i,maxCanvasSize:M,sampling:y.canvas,dataURLOptions:N,errorHandler:A}),Wr=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Zb:new eE({mutationCb:Ft,scrollCb:ya,bypassOptions:{onMutation:w,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:h,inlineStylesheet:m,maskInputOptions:xe,dataURLOptions:N,maskAttributeFn:S,maskTextFn:R,maskInputFn:O,recordCanvas:C,inlineImages:I,sampling:y,slimDOMOptions:be,iframeManager:Bt,stylesheetManager:$t,canvasManager:uo,keepIframeSrcFn:k,processedNodeManager:co,ignoreCSSAttributes:V},mirror:Ye}),lo=(re=!1)=>{if(!T)return;le({type:K.Meta,data:{href:window.location.href,width:Hd(),height:Ud()}},re),$t.reset(),Wr.init(),In.forEach(ee=>ee.lock());const Ve=Tb(document,{mirror:Ye,blockClass:s,blockSelector:o,unblockSelector:i,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:h,inlineStylesheet:m,maskAllInputs:xe,maskAttributeFn:S,maskInputFn:O,maskTextFn:R,slimDOM:be,dataURLOptions:N,recordCanvas:C,inl
31ineImages:I,onSerialize:ee=>{qd(ee,Ye)&&Bt.addIframe(ee),Gd(ee,Ye)&&$t.trackLinkElement(ee),li(ee)&&Wr.addShadowRoot(ee.shadowRoot,document)},onIframeLoad:(ee,Pe)=>{Bt.attachIframe(ee,Pe);const ke=wr(ee);ke&&uo.addWindow(ke),Wr.observeAttachShadow(ee)},onStylesheetLoad:(ee,Pe)=>{$t.attachLinkElement(ee,Pe)},onBlockedImageLoad:(ee,Pe,{width:ke,height:se})=>{Ft({adds:[],removes:[],texts:[],attributes:[{id:Pe.id,attributes:{style:{width:`${ke}px`,height:`${se}px`}}}]})},keepIframeSrcFn:k,ignoreCSSAttributes:V});if(!Ve)return console.warn("Failed to snapshot the document");le({type:K.FullSnapshot,data:{node:Ve,initialOffset:Bd(window)}}),In.forEach(ee=>ee.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&$t.adoptStyleSheets(document.adoptedStyleSheets,Ye.getId(document))};Cs=lo;try{const re=[],Ve=Pe=>{var ke;return te(Jb)({onMutation:w,mutationCb:Ft,mousemoveCb:(se,fo)=>le({type:K.IncrementalSnapshot,data:{source:fo,positions:se}}),mouseInteractionCb:se=>le({type:K.IncrementalSnapshot,data:{source:q.MouseInteraction,...se}}),scrollCb:ya,viewportResizeCb:se=>le({type:K.IncrementalSnapshot,data:{source:q.ViewportResize,...se}}),inputCb:se=>le({type:K.IncrementalSnapshot,data:{source:q.Input,...se}}),mediaInteractionCb:se=>le({type:K.IncrementalSnapshot,data:{source:q.MediaInteraction,...se}}),styleSheetRuleCb:se=>le({type:K.IncrementalSnapshot,data:{source:q.StyleSheetRule,...se}}),styleDeclarationCb:se=>le({type:K.IncrementalSnapshot,data:{source:q.StyleDeclaration,...se}}),canvasMutationCb:hp,fontCb:se=>le({type:K.IncrementalSnapshot,data:{source:q.Font,...se}}),selectionCb:se=>{le({type:K.IncrementalSnapshot,data:{source:q.Selection,...se}})},customElementCb:se=>{le({type:K.IncrementalSnapshot,data:{source:q.CustomElement,...se}})},blockClass:s,ignoreClass:c,ignoreSelector:a,maskAllText:u,maskTextClass:l,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:h,maskInputOptions:xe,inlineStylesheet:m,sampling:y,recordDOM:T,recordCanvas:C,inlineImages:I,userTriggeredOnInput:F,collectFonts:ie,doc:Pe,maskAttributeFn:S,maskInputFn:O,maskTextFn:R,keepIframeSrcFn:k,blockSelector:o,unblockSelector:i,slimDOMOptions:be,dataURLOptions:N,mirror:Ye,iframeManager:Bt,stylesheetManager:$t,shadowDomManager:Wr,processedNodeManager:co,canvasManager:uo,ignoreCSSAttributes:V,plugins:((ke=x==null?void 0:x.filter(se=>se.observer))==null?void 0:ke.map(se=>({observer:se.observer,options:se.options,callback:fo=>le({type:K.Plugin,data:{plugin:se.name,payload:fo}})})))||[]},{})};Bt.addLoadListener(Pe=>{try{re.push(Ve(Pe.contentDocument))}catch(ke){console.warn(ke)}});const ee=()=>{lo(),re.push(Ve(document))};return document.readyState==="interactive"||document.readyState==="complete"?ee():(re.push(Re("DOMContentLoaded",()=>{le({type:K.DomContentLoaded,data:{}}),Z==="DOMContentLoaded"&&ee()})),re.push(Re("load",()=>{le({type:K.Load,data:{}}),Z==="load"&&ee()},window))),()=>{re.forEach(Pe=>Pe()),co.destroy(),Cs=void 0,Mb()}}catch(re){console.warn(re)}}function rE(e){if(!Cs)throw new Error("please take full snapshot after start recording");Cs(e)}Qe.mirror=Ye;Qe.takeFullSnapshot=rE;function sE(e,t){try{return e?e(t):new $c}catch{return console.warn("Unable to initialize CanvasManager"),new $c}}var qc;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(qc||(qc={}));const oE=3,iE=5;function ia(e){return e>9999999999?e:e*1e3}function Ro(e){return e>9999999999?e/1e3:e}function Ur(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:K.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Ke(t,10,1e3)}}),t.category==="console")))}const aE="button,a";function Zd(e){return e.closest(aE)||e}function ef(e){const t=tf(e);return!t||!(t instanceof Element)?t:Zd(t)}function tf(e){return cE(e)?e.target:e}function cE(e){return ln(e)&&"target"in e}let yt;function uE(e){return yt||(yt=[],lE()),yt.push(e),()=>{const t=yt?yt.indexOf(e):-1;t>-1&&yt.splice(t,1)}}function lE(){je(ce,"open",function(e){return function(...t){if(yt)try{yt.forEach(n=>n())}catch{}return e.apply(ce,t)}})}const dE=new Set([q.Mutation,q.StyleSheetRule,q.StyleDeclaration,q.AdoptedStyleSheet,q.CanvasMutation,q.Selection,q.MediaInteraction]);function fE(e,t,n){e.handleClick(t,n)}class pE{constructor(t,n,r=Ur){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scrollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=uE(()=>{this._lastMutation=Gc()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(mE(n,this._ignoreSelector)||!gE(t))return;const r={timestamp:Ro(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(s=>s.node===r.node&&Math.abs(s.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=Ro(t)}registerScroll(t=Date.now()){this._lastScroll=Ro(t)}registerClick(t){const n=Zd(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>
31{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=Gc();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(const r of t){const s=this._clicks.indexOf(r);s>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(s,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,s=t.mutationAfter&&t.mutationAfter<=this._threshold,o=!r&&!s,{clickCount:i,clickBreadcrumb:c}=t;if(o){const a=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=a<this._timeout*1e3?"mutation":"timeout",l={type:"default",message:c.message,timestamp:c.timestamp,category:"ui.slowClickDetected",data:{...c.data,url:ce.location.href,route:n.getCurrentRoute(),timeAfterClickMs:a,endReason:u,clickCount:i||1}};this._addBreadcrumbEvent(n,l);return}if(i>1){const a={type:"default",message:c.message,timestamp:c.timestamp,category:"ui.multiClick",data:{...c.data,url:ce.location.href,route:n.getCurrentRoute(),clickCount:i,metric:!0}};this._addBreadcrumbEvent(n,a)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=$r(()=>this._checkClicks(),1e3)}}const hE=["A","BUTTON","INPUT"];function mE(e,t){return!!(!hE.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function gE(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function Gc(){return Date.now()/1e3}function _E(e,t){try{if(!yE(t))return;const{source:n}=t.data;if(dE.has(n)&&e.registerMutation(t.timestamp),n===q.Scroll&&e.registerScroll(t.timestamp),SE(t)){const{type:r,id:s}=t.data,o=Qe.mirror.getNode(s);o instanceof HTMLElement&&r===Ce.Click&&e.registerClick(o)}}catch{}}function yE(e){return e.type===oE}function SE(e){return e.data.source===q.MouseInteraction}function nt(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var to=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(to||{});const vE=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function bE(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(vE.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const EE=e=>t=>{if(!e.isEnabled())return;const n=wE(t);if(!n)return;const r=t.name==="click",s=r?t.event:void 0;r&&e.clickDetector&&(s!=null&&s.target)&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&fE(e.clickDetector,n,ef(t.event)),Ur(e,n)};function nf(e,t){const n=Qe.mirror.getId(e),r=n&&Qe.mirror.getNode(n),s=r&&Qe.mirror.getMeta(r),o=s&&IE(s)?s:null;return{message:t,data:o?{nodeId:n,node:{id:n,tagName:o.tagName,textContent:Array.from(o.childNodes).map(i=>i.type===to.Text&&i.textContent).filter(Boolean).map(i=>i.trim()).join(""),attributes:bE(o.attributes)}}:{}}}function wE(e){const{target:t,message:n}=TE(e);return nt({category:`ui.${e.name}`,...nf(t,n)})}function TE(e){const t=e.name==="click";let n,r=null;try{r=t?ef(e.event):tf(e.event),n=_e(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function IE(e){return e.type===to.Element}function xE(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=kE(t);n&&Ur(e,n)}function kE(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:o,target:i}=e;if(!i||CE(i)||!o)return null;const c=t||r||s,a=o.length===1;if(!c&&a)return null;const u=_e(i,{maxStringLength:200})||"<unknown>",l=nf(i,u);return nt({category:"ui.keyDown",message:u,data:{...l.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:o}})}function CE(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const RE={resource:PE,paint:OE,navigation:ME};function Ao(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}
31function AE(e){return e.map(NE).filter(Boolean)}function NE(e){const t=RE[e.entryType];return t?t(e):null}function $n(e){return((ve()||ce.performance.timeOrigin)+e)/1e3}function OE(e){const{duration:t,entryType:n,name:r,startTime:s}=e,o=$n(s);return{type:n,name:r,start:o,end:o+t,data:void 0}}function ME(e){const{entryType:t,name:n,decodedBodySize:r,duration:s,domComplete:o,encodedBodySize:i,domContentLoadedEventStart:c,domContentLoadedEventEnd:a,domInteractive:u,loadEventStart:l,loadEventEnd:d,redirectCount:f,startTime:h,transferSize:m,type:g}=e;return s===0?null:{type:`${t}.${g}`,start:$n(h),end:$n(o),name:n,data:{size:m,decodedBodySize:r,encodedBodySize:i,duration:s,domInteractive:u,domContentLoadedEventStart:c,domContentLoadedEventEnd:a,loadEventStart:l,loadEventEnd:d,domComplete:o,redirectCount:f}}}function PE(e){const{entryType:t,initiatorType:n,name:r,responseEnd:s,startTime:o,decodedBodySize:i,encodedBodySize:c,responseStatus:a,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:$n(o),end:$n(s),name:r,data:{size:u,statusCode:a,decodedBodySize:i,encodedBodySize:c}}}function LE(e){const t=e.entries[e.entries.length-1],n=t!=null&&t.element?[t.element]:void 0;return aa(e,"largest-contentful-paint",n)}function DE(e){return e.sources!==void 0}function jE(e){const t=[],n=[];for(const r of e.entries)if(DE(r)){const s=[];for(const o of r.sources)if(o.node){n.push(o.node);const i=Qe.mirror.getId(o.node);i&&s.push(i)}t.push({value:r.value,nodeIds:s.length?s:void 0})}return aa(e,"cumulative-layout-shift",n,t)}function FE(e){const t=e.entries[e.entries.length-1],n=t!=null&&t.target?[t.target]:void 0;return aa(e,"interaction-to-next-paint",n)}function aa(e,t,n,r){const s=e.value,o=e.rating,i=$n(s);return{type:"web-vital",name:t,start:i,end:i,data:{value:s,size:s,rating:o,nodeIds:n?n.map(c=>Qe.mirror.getId(c)):void 0,attributions:r}}}function $E(e){function t(s){e.performanceEntries.includes(s)||e.performanceEntries.push(s)}function n({entries:s}){s.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(s=>{r.push(cn(s,n))}),r.push(Vs(Ao(LE,e)),Gs(Ao(jE,e)),Ki(Ao(FE,e))),()=>{r.forEach(s=>s())}}const H=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,BE='
vendor: 10,329 bytes, line 31
31var 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});
31';function UE(){const e=new Blob([BE],{type:"text/javascript"});return URL.createObjectURL(e)}const Vc=["log","warn","error"],ds="[Replay] ";function No(e,t="info"){Tt({category:"console",data:{logger:"replay"},level:t,message:`${ds}${e}`},{level:t})}function HE(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return H?(Vc.forEach(r=>{n[r]=(...s)=>{b[r](ds,...s),t&&No(s.join(""),ed(r))}}),n.exception=(r,...s)=>{s.length&&n.error&&n.error(...s),b.error(ds,r),e?Bi(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&No(r,"error")},n.infoTick=(...r)=>{b.log(ds,...r),t&&setTimeout(()=>No(r[0]),0)}):Vc.forEach(r=>{n[r]=()=>{}}),n}const W=HE();class ca extends Error{constructor(){super(`Event buffer exceeded maximum size of ${ea}.`)}}class rf{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 n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>ea)throw new ca;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let t=null;for(const{timestamp:n}of this.events)(t===null||n<t)&&(t=n);return t===null?t:ia(t)}}class WE{constructor(t){this._onMessage=({data:n})=>{const r=n;if(typeof r.id!="number")return;const s=this._pending.get(r.id);if(!(!s||s.method!==r.method)){if(this._pending.delete(r.id),!r.success){H&&W.error("Error in compression worker: ",r.response),s.reject(new Error("Error in compression worker"));return}s.resolve(r.response)}},this._worker=t,this._id=0,this._pending=new Map,this._worker.addEventListener("message",this._onMessage)}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():(H&&W.warn("Received worker message with unsuccessful status",r),n(new Error("Received worker message with unsuccessful status")))},{once:!0}),this._worker.addEventListener("error",r=>{H&&W.warn("Failed to load Replay compression worker",r),n(new Error(`Failed to load Replay compression worker: ${r instanceof ErrorEvent&&r.message?r.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(){H&&W.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,n){const r=this._getAndIncrementId();return new Promise((s,o)=>{this._pending.set(r,{method:t,resolve:s,reject:o});try{this._worker.postMessage({id:r,method:t,arg:n})}catch(i){this._pending.delete(r),o(i)}})}_getAndIncrementId(){return this._id++}}class zE{constructor(t){this._worker=new WE(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 n=ia(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>ea?Promise.reject(new ca):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{H&&W.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 qE{constructor(t){this._fallback=new rf,this._compression=new zE(t),this._used=this._fallback,this._ensureWorkerIsLoadedProm
31ise=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){H&&W.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n,waitForCheckout:r}=this._fallback,s=[];for(const o of t)s.push(this._compression.addEvent(o));this._compression.hasCheckout=n,this._compression.waitForCheckout=r,this._used=this._compression;try{await Promise.all(s),this._fallback.clear()}catch(o){H&&W.exception(o,"Failed to add events when switching buffers.")}}}function GE({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=VE(t);if(n)return n}return H&&W.log("Using simple buffer"),new rf}function VE(e){try{const t=e||YE();if(!t)return;H&&W.log(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new qE(n)}catch(t){H&&W.exception(t,"Failed to create compression worker")}}function YE(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?UE():""}function ua(){try{return"sessionStorage"in ce&&!!ce.sessionStorage}catch{return!1}}function KE(e){JE(),e.session=void 0}function JE(){if(ua())try{ce.sessionStorage.removeItem(Qi)}catch{}}function sf(e){return e===void 0?!1:Math.random()<e}function no(e){if(ua())try{ce.sessionStorage.setItem(Qi,JSON.stringify(e))}catch{}}function of(e){const t=Date.now(),n=e.id||Be(),r=e.started||t,s=e.lastActivity||t,o=e.segmentId||0,i=e.sampled,c=e.previousSessionId,a=e.dirty||!1;return{id:n,started:r,lastActivity:s,segmentId:o,sampled:i,previousSessionId:c,dirty:a}}function XE(e,t){return sf(e)?"session":t?"buffer":!1}function Yc({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const s=XE(e,t),o=of({sampled:s,previousSessionId:r});return n&&no(o),o}function QE(){if(!ua())return null;try{const e=ce.sessionStorage.getItem(Qi);if(!e)return null;const t=JSON.parse(e);return H&&W.infoTick("Loading existing session"),of(t)}catch{return null}}function pi(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function ZE(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return pi(e.started,t,r)||pi(e.lastActivity,n,r)}function Rs(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!ZE(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Oo({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const s=r.stickySession&&QE();return s?Rs(s,{sessionIdleExpire:e,maxReplayDuration:t})?(H&&W.infoTick("Session in sessionStorage is expired, creating new one..."),Yc(r,{previousSessionId:s.id})):s:(H&&W.infoTick("Creating new session"),Yc(r,{previousSessionId:n}))}function ew(e){return e.type===K.Custom}function la(e,t,n){return cf(e,t)?(af(e,t,n),!0):!1}function tw(e,t,n){return cf(e,t)?af(e,t,n):Promise.resolve(null)}async function af(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const s=e.recordingMode==="buffer";try{n&&s&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const o=e.getOptions(),i=nw(t,o.beforeAddRecordingEvent);return i?await r.addEvent(i):void 0}catch(o){if(!e.isEnabled())return e.handleException(o),null;const i=o&&o instanceof ca,c=i?"eventBufferOverflow":"eventBufferError",a=Y();if(a){const u=i?"buffer_overflow":"internal_sdk_error";a.recordDroppedEvent(u,"replay")}if(i&&s)return r.clear(),r.waitForCheckout=!0,null;e.handleException(o),await e.stop({reason:c})}}
31function cf(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=ia(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(H&&W.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function nw(e,t){try{if(typeof t=="function"&&ew(e))return t(e)}catch(n){return H&&W.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}const Kc=100;function uf(e,t,n){const r=e.getContext();t&&r.traceIds.size<Kc&&r.traceIds.add(t),n&&r.segmentNames.size<Kc&&r.segmentNames.add(n)}function rw(e){return t=>{e.isEnabled()&&uf(e,t.trace_id,t.name||void 0)}}function da(e){return!e.type}function hi(e){return e.type==="transaction"}function sw(e){return e.type==="replay_event"}function Jc(e){return e.type==="feedback"}function ow(e){return(t,n)=>{if(!e.isEnabled()||!da(t)&&!hi(t))return;const r=n.statusCode;if(!(!r||r<200||r>=300)){if(hi(t)){iw(e,t);return}aw(e,t)}}}function iw(e,t){var n,r;uf(e,(r=(n=t.contexts)==null?void 0:n.trace)==null?void 0:r.trace_id,t.transaction)}function aw(e,t){var s;const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!((s=t.tags)!=null&&s.replayId))return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||$r(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(o){e.handleException(o)}})}function cw(e){return t=>{!e.isEnabled()||!da(t)||uw(e,t)}}function uw(e,t){var r,s,o;const n=(o=(s=(r=t.exception)==null?void 0:r.values)==null?void 0:s[0])==null?void 0:o.value;if(typeof n=="string"&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const i=nt({category:"replay.hydrate-error",data:{url:an()}});Ur(e,i)}}function lw(e){const t=Y();t&&t.on("beforeAddBreadcrumb",n=>dw(e,n))}function dw(e,t){if(!e.isEnabled()||!lf(t))return;const n=fw(t);n&&Ur(e,n)}function fw(e){return!lf(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?pw(e):nt(e)}function pw(e){var s;const t=(s=e.data)==null?void 0:s.arguments;if(!Array.isArray(t)||t.length===0)return nt(e);let n=!1;const r=t.map(o=>{if(!o)return o;if(typeof o=="string")return o.length>Qr?(n=!0,`${o.slice(0,Qr)}…`):o;if(typeof o=="object")try{const i=Ke(o,7);return JSON.stringify(i).length>Qr?(n=!0,`${JSON.stringify(i,null,2).slice(0,Qr)}…`):i}catch{}return o});return nt({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function lf(e){return!!e.category}function hw(e,t){var n,r,s;return e.type||!((r=(n=e.exception)==null?void 0:n.values)!=null&&r.length)?!1:!!((s=t.originalException)!=null&&s.__rrweb__)}function As(){const e=ne().getPropagationContext().dsc;e&&delete e.replay_id;const t=Ee();if(t){const n=Lt(t);delete n.replay_id}}function Xc(e){const t=ne().getPropagationContext().dsc;t&&(t.replay_id=e);const n=Ee();if(n){const r=Lt(n);r.replay_id=e}}function mw(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:K.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function gw(e,t){return e.recordingMode!=="buffer"||t.message===Zi||!t.exception||t.type?!1:sf(e.getOptions().errorSampleRate)}function _w(e){return Object.assign((t,n)=>{var i;if(e.session&&Rs(e.session,{maxReplayDuration:e.getOptions().maxReplayDuration,sessionIdleExpire:e.timeouts.sessionIdleExpire})&&As(),!e.isEnabled()||e.isPaused())return t;if(sw(t))return delete t.breadcrumbs,t;if(!da(t)&&!hi(t)&&!Jc(t))return t;if(!e.checkAndHandleExpiredSession())return As(),t;if(Jc(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),mw(e,t),t;if(hw(t,n)&&!e.getOptions()._experiments.captureExceptions)return H&&W.log("Ignoring error from rrweb internals",t),null;const s=gw(e,t);if((s||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),s&&e.recordingMode==="buffer"&&((i=e.session)==null?void 0:i.sampled)==="buffer"){const c=e.session;c.dirty=!0,e.getOptions().stickySession&&no(c)}return t},{id:"Replay"})}function ro(e,t){return t.map(({type:n,start:r,end:s,name:o,data:i})=>{const c=e.throttledAddEvent({type:K.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:o,startTimestamp:r,endTimestamp:s,data:i}}});return typeof c=="string"?Promise.resolve(null):c})}function yw(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function Sw(e){return t=>{if(!e.isEnabled())return;const n=yw(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(ro(e,[n]),!1)))}}function vw(e,t){return H&&e.getOptions()._experiments.traceInternals?!1:Ug(t,Y())}function df(e,t){e.isEnabled()&&t!==null&&(vw(e,t.name)||e.addUpdate(()=>(ro(e,[t]),!0)))}function so(e){if(!e)return;const t=new TextEncoder;try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=Td(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function ff(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Ns(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function pf(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:s,method:o,statusCode:i,request:c,response:a}=t;return{type:e,start:n/1e3,end:r/1e3,name:s,data:{method:o,statusCode:i,request:c,response:a}}}function Tr(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Et(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:s,warnings:o}=bw(n);return r.body=s,o!=null&&o.length&&(r._meta={warnings:o}),r}function mi(e,t){return Object.entries(e).reduce((n,[r,s])=>{const o=r.toLowerCase();return t.includes(o)&&e[r]&&(n[o]=s),n},{})}function bw(e){if(!e||typeof e!="string")return{body:e};const t=e.length>Rc,n=Ew(e);if(t){const r=e.slice(0,Rc);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function Ew(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function Os(e,t){const n=ww(e);return rt(n,t)}function ww(e,t=ce.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(ce.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}
31async function Tw(e,t,n){try{const r=await xw(e,t,n),s=pf("resource.fetch",r);df(n.replay,s)}catch(r){H&&W.exception(r,"Failed to capture fetch breadcrumb")}}function Iw(e,t){const{input:n,response:r}=t,s=n?xd(n):void 0,o=so(s),i=r?ff(r.headers.get("content-length")):void 0;o!==void 0&&(e.data.request_body_size=o),i!==void 0&&(e.data.response_body_size=i)}async function xw(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:o=r}=t,{url:i,method:c,status_code:a=0,request_body_size:u,response_body_size:l}=e.data,d=Os(i,n.networkDetailAllowUrls)&&!Os(i,n.networkDetailDenyUrls),f=d?kw(n,t.input,u):Tr(u),h=await Cw(d,n,t.response,l);return{startTimestamp:s,endTimestamp:o,url:i,method:c,statusCode:a,request:f,response:h}}function kw({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const s=n?Nw(n,t):{};if(!e)return Et(s,r,void 0);const o=xd(n),[i,c]=Id(o,W),a=Et(s,r,i);return c?Ns(a,c):a}async function Cw(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,s){if(!e&&s!==void 0)return Tr(s);const o=r?hf(r.headers,n):{};if(!r||!t&&s!==void 0)return Et(o,s,void 0);const[i,c]=await Aw(r),a=Rw(i,{networkCaptureBodies:t,responseBodySize:s,captureDetails:e,headers:o});return c?Ns(a,c):a}function Rw(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:s}){try{const o=e!=null&&e.length&&n===void 0?so(e):n;return r?t?Et(s,o,e):Et(s,o,void 0):Tr(o)}catch(o){return H&&W.exception(o,"Failed to serialize response body"),Et(s,n,void 0)}}async function Aw(e){const t=Ow(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await Mw(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(H&&W.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(H&&W.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function hf(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function Nw(e,t){return e.length===1&&typeof e[0]!="string"?Qc(e[0],t):e.length===2?Qc(e[1],t):{}}function Qc(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?hf(n,t):Array.isArray(n)?{}:mi(n,t):{}}function Ow(e){try{return e.clone()}catch(t){H&&W.exception(t,"Failed to clone response body")}}function Mw(e){return new Promise((t,n)=>{const r=$r(()=>n(new Error("Timeout while trying to read response body")),500);Pw(e).then(s=>t(s),s=>n(s)).finally(()=>clearTimeout(r))})}async function Pw(e){return await e.text()}async function Lw(e,t,n){try{const r=jw(e,t,n),s=pf("resource.xhr",r);df(n.replay,s)}catch(r){H&&W.exception(r,"Failed to capture xhr breadcrumb")}}function Dw(e,t){const{xhr:n,input:r}=t;if(!n)return;const s=so(r),o=n.getResponseHeader("content-length")?ff(n.getResponseHeader("content-length")):Bw(n.response,n.responseType);s!==void 0&&(e.data.request_body_size=s),o!==void 0&&(e.data.response_body_size=o)}function jw(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:o=r,input:i,xhr:c}=t,{url:a,method:u,status_code:l=0,request_body_size:d,response_body_size:f}=e.data;if(!a)return null;if(!c||!Os(a,n.networkDetailAllowUrls)||Os(a,n.networkDetailDenyUrls)){const P=Tr(d),y=Tr(f);return{startTimestamp:s,endTimestamp:o,url:a,method:u,statusCode:l,request:P,response:y}}const h=c[Vt],m=h?mi(h.request_headers,n.networkRequestHeaders):{},g=mi(kd(c),n.networkResponseHeaders),[_,v]=n.networkCaptureBodies?Id(i,W):[void 0],[S,O]=n.networkCaptureBodies?Fw(c):[void 0],R=Et(m,d,_),M=Et(g,f,S);return{startTimestamp:s,endTimestamp:o,url:a,method:u,statusCode:l,request:v?Ns(R,v):R,response:O?Ns(M,O):M}}function Fw(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return $w(e.response,e.responseType)}catch(n){t.push(n)}return H&&W.warn("Failed to get xhr response body",...t),[void 0]}function $w(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&ln(e))return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return H&&W.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return H&&W.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Bw(e,t){try{const n=t==="json"&&ln(e)?JSON.stringify(e):e;return so(n)}catch{return}}function Uw(e){const t=Y();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:o,networkResponseHeaders:i}=e.getOptions(),c={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:o,networkResponseHeaders:i};t&&t.on("beforeAddBreadcrumb",(a,u)=>Hw(c,a,u))}catch{}}function Hw(e,t,n){if(t.data)try{Ww(t)&&qw(n)&&(Dw(t,n),Lw(t,n,e)),zw(t)&&Gw(n)&&(Iw(t,n),Tw(t,n,e))}catch(r){H&&W.exception(r,"Error when enriching network breadcrumb")}}function Ww(e){return e.category==="xhr"}function zw(e){return e.category==="fetch"}function qw(e){return e==null?void 0:e.xhr}function Gw(e){return(e==null?void 0:e.input)!==void 0}function Vw(e){const t=Y();bd(EE(e)),Xs(Sw(e)),lw(e),Uw(e);const n=_w(e);Qm(n),t&&(t.on("beforeSendEvent",cw(e)),t.on("afterSendEvent",ow(e)),t.on("createDsc",r=>{const s=e.getSessionId();s&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(r.replay_id=s)}),t.on("processSegmentSpan",rw(e)),t.on("spanStart",r=>{e.lastActiveSpan=r}),t.on("spanEnd",r=>{e.lastActiveSpan=r}),t.on("beforeSendFeedback",async(r,s)=>{var i;const o=e.getSessionId();s!=null&&s.includeReplay&&e.isEnabled()&&o&&((i=r.contexts)!=null&&i.feedback)&&(r.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),r.contexts.feedback.replay_id=o)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}async function Yw(e){try{return Promise.all(ro(e,[Kw(ce.performance.memory)]))}catch{return[]}}function Kw(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,s=Date.now()/1e3;return{type:"memory",name:"memory",start:s,end:s,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}
31function Jw(e,t,n){return Nm(e,t,{...n,setTimeoutImpl:$r})}const ze=J.navigator;function Xw(){return/iPhone|iPad|iPod/i.test((ze==null?void 0:ze.userAgent)??"")||/Macintosh/i.test((ze==null?void 0:ze.userAgent)??"")&&(ze!=null&&ze.maxTouchPoints)&&(ze==null?void 0:ze.maxTouchPoints)>1?{sampling:{mousemove:!1}}:{}}function Qw(e){let t=!1;return(n,r)=>{try{if(!e.checkAndHandleExpiredSession()){H&&W.warn("Received replay event after session expired.");return}const s=r||!t;t=!0,Zw(n),e.clickDetector&&_E(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&s&&e.setInitialState(),!la(e,n,s))return!0;if(!s)return!1;const o=e.session;if(tT(e,s),e.recordingMode==="buffer"&&o&&e.eventBuffer&&!o.dirty){const i=e.eventBuffer.getEarliestTimestamp();i&&(H&&W.log(`Updating session start time to earliest event in buffer to ${new Date(i)}`),o.started=i,e.getOptions().stickySession&&no(o))}return o!=null&&o.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}catch(s){e.handleException(s)}}}function Zw(e){const t=e.data;if(!(e.type!==K.IncrementalSnapshot||!t||typeof t!="object"||!("source"in t)||t.source!==q.Mutation||!("attributes"in t)||!Array.isArray(t.attributes)))for(const n of t.attributes){const r=Qe.mirror.getNode(n.id),s=r&&Qe.mirror.getMeta(r);if((s==null?void 0:s.type)===to.Element)for(const[o,i]of Object.entries(n.attributes))i===null?delete s.attributes[o]:s.attributes[o]=i}}function eT(e){const t=e.getOptions();return{type:K.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function tT(e,t){var n;!t||((n=e.session)==null?void 0:n.segmentId)!==0||la(e,eT(e),!1)}function nT(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function rT(e,t,n,r){return Dt(wl(e,ji(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function sT({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
32`;if(typeof e=="string")n=`${r}${e}`;else{const o=new TextEncoder().encode(r);n=new Uint8Array(o.length+e.length),n.set(o),n.set(e,o.length)}return n}async function oT({client:e,scope:t,replayId:n,event:r}){const s=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,o={event_id:n,integrations:s};e.emit("preprocessEvent",r,o);const i=await Ml(e.getOptions(),r,o,t,e,Oe());if(!i)return null;e.emit("postprocessEvent",i,o),i.platform=i.platform||"javascript";const c=e.getSdkMetadata(),{name:a,version:u,settings:l}=(c==null?void 0:c.sdk)||{};return i.sdk={...i.sdk,name:a||"sentry.javascript.unknown",version:u||"0.0.0",settings:l},i}async function iT({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:s,session:o}){const i=sT({recordingData:e,headers:{segment_id:n}}),{urls:c,errorIds:a,traceIds:u,segmentNames:l,initialTimestamp:d}=r,f=Y(),h=ne(),m=f==null?void 0:f.getTransport(),g=f==null?void 0:f.getDsn();if(!f||!m||!g||!o.sampled)return Promise.resolve({});const _={type:Ov,replay_start_timestamp:d/1e3,timestamp:s/1e3,error_ids:a,trace_ids:u,segment_names:l,urls:c,replay_id:t,segment_id:n,replay_type:o.sampled},v=await oT({scope:h,client:f,replayId:t,event:_});if(!v)return f.recordDroppedEvent("event_processor","replay"),H&&W.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete v.sdkProcessingMetadata;const S=rT(v,i,g,f.getOptions().tunnel);let O;try{O=await m.send(S)}catch(M){const P=new Error(Zi);try{P.cause=M}catch{}throw P}const R=Wl({},O);if(Hl(R,"replay"))throw new fa(R);if(typeof O.statusCode=="number"&&(O.statusCode<200||O.statusCode>=300))throw new mf(O.statusCode);return O}
32class mf extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class fa extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}class Zc extends Error{constructor(){super("Session is too long, not sending replay")}}async function gf(e,t={count:0,interval:Fv}){const{recordingData:n,onError:r}=e;if(n.length)try{return await iT(e),!0}catch(s){if(s instanceof mf||s instanceof fa)throw s;if(Ll("Replays",{_retryCount:t.count}),r&&r(s),t.count>=$v){const o=new Error(`${Zi} - max retries exceeded`);try{o.cause=s}catch{}throw o}return t.interval*=++t.count,new Promise((o,i)=>{$r(async()=>{try{await gf(e,t),o(!0)}catch(c){i(c)}},t.interval)})}}const _f="__THROTTLED",aT="__SKIPPED";function cT(e,t,n){const r=new Map,s=c=>{const a=c-n;r.forEach((u,l)=>{l<a&&r.delete(l)})},o=()=>[...r.values()].reduce((c,a)=>c+a,0);let i=!1;return(...c)=>{const a=Math.floor(Date.now()/1e3);if(s(a),o()>=t){const l=i;return i=!0,l?aT:_f}i=!1;const u=r.get(a)||0;return r.set(a,u+1),e(...c)}}class uT{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:Mv,sessionIdleExpire:Pv},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,segmentNames:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=Jw(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=cT((i,c)=>tw(this,i,c),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:s}=this.getOptions(),o=r?{threshold:Math.min(Bv,r),timeout:r,scrollTimeout:Uv,ignoreSelector:s?s.join(","):""}:void 0;if(o&&(this.clickDetector=new pE(this,o)),H){const i=t._experiments;W.setConfig({captureExceptions:!!i.captureExceptions,traceInternals:!!i.traceInternals})}this._handleVisibilityChange=()=>{ce.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const i=nt({category:"ui.blur"});this._doChangeToBackgroundTasks(i)},this._handleWindowFocus=()=>{const i=nt({category:"ui.focus"});this._doChangeToForegroundTasks(i)},this._handleKeyboardEvent=i=>{xE(this,i)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){H&&W.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options,s=n<=0&&r<=0;if(this._requiresManualStart=s,!s){if(this._initializeSessionForSampling(t),!this.session){H&&W.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",H&&W.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){H&&W.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){H&&W.log("Buffering is in progress, call `flush()` to save the replay");return}H&&W.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=Oo({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){H&&W.log("Buffering is in progress, call `flush()` to save the replay");return}H&&W.infoTick("Starting replay in buffer mode");const t=Oo({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=Qe({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:jv}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:Qw(this),...Xw(),onMutation:this._onMutationHandler.bind(this),...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){var s,o,i;if(!this._isEnabled)return;this._isEnabled=!1,this.recordingMode="buffer";const r=n??"manual";(o=Y())==null||o.emit("replayEnd",{sessionId:(s=this.session)==null?void 0:s.id,reason:r});try{H&&W.log(`Stopping Replay triggered by ${r}`),As(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),(i=this.eventBuffer)==null||i.destroy(),this.eventBuffer=null,KE(this)}catch(c){this.handleException(c)}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),H&&W.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),H&&W.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();H&&W.log("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession(),Xc(this.session.id)),this.startRecording())}addUpdate(t){const n=t();this.recordingMode==="buffer"||!this._isEnabled||n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(t){var n,r;if(!(t&&((n=this.session)==null?void 0:n.sampled)===!1))return(r=this.session)==null?void 0:r.id}
32checkAndHandleExpiredSession(){var t;if(this._lastActivity&&pi(this._lastActivity,this.timeouts.sessionIdlePause)&&((t=this.session)==null?void 0:t.sampled)==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${ce.location.pathname}${ce.location.hash}${ce.location.search}`,n=`${ce.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const r=this._throttledAddEvent(t,n);if(r===_f){const s=nt({category:"replay.throttled"});this.addUpdate(()=>!la(this,{type:iE,timestamp:s.timestamp||0,data:{tag:"breadcrumb",payload:s,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||Ee(),n=t&&Se(t),s=(n&&G(n).data||{})[he];if(!(!n||!s||!["route","custom"].includes(s)))return G(n).description}_initializeRecording(){var t;this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=GE({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.session&&((t=Y())==null||t.emit("replayStart",{sessionId:this.session.id,recordingMode:this.recordingMode})),this.startRecording(),this.recordingMode==="session"&&this.session&&Xc(this.session.id)}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=Oo({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const t=this.session;return Rs(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"sessionExpired"}),this.initializeSampling(t.id))}_addListeners(){try{ce.document.addEventListener("visibilitychange",this._handleVisibilityChange),ce.addEventListener("blur",this._handleWindowBlur),ce.addEventListener("focus",this._handleWindowFocus),ce.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(Vw(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=$E(this)}_removeListeners(){try{ce.document.removeEventListener("visibilitychange",this._handleVisibilityChange),ce.removeEventListener("blur",this._handleWindowBlur),ce.removeEventListener("focus",this._handleWindowFocus),ce.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){if(!this.session)return;if(Rs(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})){As();return}t&&this._createCustomBreadcrumb(t),this.conditionalFlush()}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){H&&W.log("Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:K.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=AE(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const n=this._context.initialTimestamp/1e3;t=t.filter(r=>r.start>=n)}return Promise.all(ro(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.segmentNames.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;
32const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),segmentNames:Array.from(this._context.segmentNames),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){var n;const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){H&&W.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!((n=this.eventBuffer)!=null&&n.hasEvents)&&(await Yw(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const r=Date.now();if(r-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Zc;const s=this._popEventContext(),o=this.session.segmentId++;this._maybeSaveSession();const i=await this.eventBuffer.finish();await gf({replayId:t,recordingData:i,segmentId:o,eventContext:s,session:this.session,timestamp:r,onError:c=>this.handleException(c)})}catch(r){this.handleException(r),this.stop({reason:"sendError"});const s=Y();if(s){let o;r instanceof fa?o="ratelimit_backoff":r instanceof Zc?o="invalid":o="send_error",s.recordDroppedEvent(o,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){H&&W.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,s=Date.now()-n;this._debouncedFlush.cancel();const o=s<this._options.minReplayDuration,i=s>this._options.maxReplayDuration+5e3;if(o||i){H&&W.log(`Session duration (${Math.floor(s/1e3)}s) is too ${o?"short":"long"}, not sending replay.`),o&&this._debouncedFlush();return}const c=this.eventBuffer;c&&this.session.segmentId===0&&!c.hasCheckout&&H&&W.log("Flushing initial segment without checkout.");const a=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(u){this.handleException(u)}finally{this._flushLock=void 0,a&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&no(this.session)}_onMutationHandler(t){const{ignoreMutations:n}=this._options._experiments;if(n!=null&&n.length&&t.some(c=>{const a=nT(c.target),u=n.join(",");return a==null?void 0:a.matches(u)}))return!1;const r=t.length,s=this._options.mutationLimit,o=this._options.mutationBreadcrumbLimit,i=s&&r>s;if(r>o||i){const c=nt({category:"replay.mutations",data:{count:r,limit:i}});this._createCustomBreadcrumb(c)}return i?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function er(e,t){return[...e,...t].join(",")}function lT({mask:e,unmask:t,block:n,unblock:r,ignore:s}){const o=["base","iframe[srcdoc]:not([src])"],i=er(e,[".sentry-mask","[data-sentry-mask]"]),c=er(t,[]);return{maskTextSelector:i,unmaskTextSelector:c,blockSelector:er(n,[".sentry-block","[data-sentry-block]",...o]),unblockSelector:er(r,[]),ignoreSelector:er(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function dT({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:s,value:o}){if(s.unmaskTextSelector&&e.matches(s.unmaskTextSelector))return o;const i=n.includes(t),c=r&&t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"");return i||c?o.replace(/[\S]/g,"*"):o}const eu='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',fT=["content-length","content-type","accept"],pT=Symbol.for("sentry__originalRequestBody");let tu=!1,nu=!1;function hT(){if(typeof Request>"u"||nu)return;const e=Request;try{const t=function(n,r){const s=new e(n,r);return(r==null?void 0:r.body)!=null&&(s[pT]=r.body),s};t.prototype=e.prototype,J.Request=t,nu=!0}catch{}}const mT=e=>new gT(e);class gT{constructor({flushMinDelay:t=Lv,flushMaxDelay:n=Dv,minReplayDuration:r=Hv,maxReplayDuration:s=Ac,stickySession:o=!0,useCompression:i=!0,workerUrl:c,_experiments:a={},maskAllText:u=!0,maskAllInputs:l=!0,blockAllMedia:d=!0,mutationBreadcrumbLimit:f=750,mutationLimit:h=1e4,slowClickTimeout:m=7e3,slowClickIgnoreSelectors:g=[],networkDetailAllowUrls:_=[],networkDetailDenyUrls:v=[],networkCaptureBodies:S=!0,networkRequestHeaders:O=[],networkResponseHeaders:R=[],mask:M=[],maskAttributes:P=["title","placeholder","aria-label"],unmask:y=[],block:N=[],unblock:j=[],ignore:T=[],maskFn:C,beforeAddRecordingEvent:B,beforeErrorSampling:Z,onError:F,attachRawBodyFromRequest:ie=!1}={}){this.name="Replay";const I=lT({mask:M,unmask:y,block:N,unblock:j,ignore:T});if(this._recordingOptions={maskAllInputs:l,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:C,maskInputFn:C,maskAttributeFn:(x,k,V)=>dT({maskAttributes:P,maskAllText:u,privacyOptions:I,key:x,value:k,el:V}),...I,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:x=>{try{x.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!a.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,Wv),maxReplayDuration:Math.min(s,Ac),stickySession:o,useCompression:i,workerUrl:c,blockAllMedia:d,maskAllInputs:l,maskAllText:u,mutationBreadcrumbLimit:f,mutationLimit:h,slowClickTimeout:m,slowClickIgnoreSelectors:g,networkDetailAllowUrls:_,networkDetailDenyUrls:v,networkCaptureBodies:S,networkRequestHeaders:ru(O),networkResponseHeaders:ru(R),beforeAddRecordingEvent:B,beforeErrorSampling:Z,onError:F,attachRawBodyFromRequest:ie,_experiments:a},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${eu}`:eu,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&Ln())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return tu}set _isInitialized(t){tu=t}afterAllSetup(t){!Ln()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&hT(),this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}
32startBuffering(){this._replay&&this._replay.startBuffering()}stop(t){return this._replay?this._replay.stop({forceFlush:(t==null?void 0:t.flush)??this._replay.recordingMode==="session",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 n;if((n=this._replay)!=null&&n.isEnabled())return this._replay.getSessionId(t)}getRecordingMode(){var t;if((t=this._replay)!=null&&t.isEnabled())return this._replay.recordingMode}processSpan(t){const n=this.getReplayId(!0);n&&(ys(t,{"sentry.replay_id":n}),this.getRecordingMode()==="buffer"&&ys(t,{"sentry._internal.replay_is_buffering":!0}))}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=_T(this._initialOptions,t);this._replay=new uT({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function _T(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},s=sn(n.replaysSessionSampleRate),o=sn(n.replaysOnErrorSampleRate);return s==null&&o==null&&Rt(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),s!=null&&(r.sessionSampleRate=s),o!=null&&(r.errorSampleRate=o),r}function ru(e){return[...fT,...e.map(t=>t.toLowerCase())]}function yT(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function yf(e){try{return new URL(e,$.location.origin).href}catch{return}}function ST(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function Sf(e){try{return new Headers(e)}catch{return}}const vf={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function vT(e,t){const{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:s,enableHTTPTimings:o,tracePropagationTargets:i,onRequestSpanStart:c,onRequestSpanEnd:a}={...vf,...t},u=typeof s=="function"?s:h=>!0,l=h=>ET(h,i),d={},f=e.getOptions().propagateTraceparent;n&&Wi(h=>{const m=E_(h,u,l,d,{propagateTraceparent:f,onRequestSpanEnd:a});if(m){const g=yf(h.fetchData.url),_=g?Zt(g).host:void 0,v=g?Xe(g):void 0;m.setAttributes({[Rl]:v,[Gn]:v,"server.address":_}),o&&su(m,e),c==null||c(m,{headers:h.headers})}}),r&&wd(h=>{var g;const m=wT(h,u,l,d,f,a);m&&(o&&su(m,e),c==null||c(m,{headers:Sf((g=h.xhr.__sentry_xhr_v3__)==null?void 0:g.request_headers)}))})}const bT=300;function su(e,t){const{url:n}=G(e).data;if(!n||typeof n!="string")return;let r=()=>void setTimeout(s);if(ot(t)){const o=e.end.bind(e);e.end=i=>{const c=i??ge();let a=!1;const u=()=>{a||(a=!0,setTimeout(s),o(c),clearTimeout(l))};r=u;const l=setTimeout(u,bT)}}const s=cn("resource",({entries:o})=>{o.forEach(i=>{ST(i)&&i.name.endsWith(n)&&(e.setAttributes(Sd(i)),r())})})}function ET(e,t){const n=an();if(n){let r,s;try{r=new URL(e,n),s=new URL(n).origin}catch{return!1}const o=r.origin===s;return t?rt(r.toString(),t)||o&&rt(r.pathname,t):o}else{const r=!!e.match(/^\/(?!\/)/);return t?rt(e,t):r}}function wT(e,t,n,r,s,o){const i=e.xhr,c=i==null?void 0:i[Vt];if(!i||i.__sentry_own_request__||!c)return;const{url:a,method:u}=c,l=Ue()&&t(a);if(e.endTimestamp){const R=i.__sentry_xhr_span_id__;if(!R)return;const M=r[R];M&&(l&&c.status_code!==void 0&&(tl(M,c.status_code),M.end(),o==null||o(M,{headers:Sf(kd(i)),error:e.error})),delete r[R]);return}const d=yf(a),f=Zt(d||a),h=d?Xe(d):void 0,m=Xe(Bg(a)),g=Y(),_=!!Ee(),v=_||!!g&&ot(g),S=l&&v?jt({name:`${u} ${m}`,attributes:{url:Xe(a),type:"xhr","http.method":u,"http.url":h,[Gn]:h,"server.address":f==null?void 0:f.host,[de]:"auto.http.browser",[Ne]:"http.client",...(f==null?void 0:f.search)&&{"http.query":f==null?void 0:f.search},...(f==null?void 0:f.hash)&&{"http.fragment":f==null?void 0:f.hash}}}):new on,O=xl(S)&&_?void 0:S;return l&&!v&&(g==null||g.recordDroppedEvent("no_parent_span","span")),i.__sentry_xhr_span_id__=S.spanContext().spanId,r[i.__sentry_xhr_span_id__]=S,n(a)&&TT(i,Ue()&&v?O:void 0,s),g&&g.emit("beforeOutgoingRequestSpan",S,e),S}function TT(e,t,n){const{"sentry-trace":r,baggage:s,traceparent:o}=Ql({span:t,propagateTraceparent:n});r&&IT(e,r,s,o)}function IT(e,t,n,r){var o;const s=(o=e.__sentry_xhr_v3__)==null?void 0:o.request_headers;if(!(s!=null&&s["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),r&&!(s!=null&&s.traceparent)&&e.setRequestHeader("traceparent",r),n){const i=s==null?void 0:s.baggage;(!i||!yT(i))&&e.setRequestHeader("baggage",n)}}catch{}}const ou=new WeakMap,iu=new WeakMap,xT=9e4,kT=["text/event-stream","application/x-ndjson","application/stream+json"],CT=()=>({name:"FetchStreamPerformance",setup(){O_(e=>{if(e.response){const t=ou.get(e.response);if(t&&e.endTimestamp){t.end(e.endTimestamp);const n=iu.get(e.response);n&&clearTimeout(n)}}}),Wi(e=>{var t,n,r,s;if(e.endTimestamp&&e.response){const o=((t=e.response.headers)==null?void 0:t.get("content-type"))||"";if((n=e.response.headers)!=null&&n.get("content-length")||!kT.some(f=>o.startsWith(f)))return;const i=((r=e.fetchData)==null?void 0:r.url)||"",c=((s=e.fetchData)==null?void 0:s.method)||"GET",a=_r(i),u=i.startsWith("data:")?Xe(i):a?Jl(a):i,l=jt({name:`${c} ${u}`,startTime:e.endTimestamp,attributes:{url:Xe(i),"http.method":c,type:"fetch",[Ne]:"http.client.stream",[de]:"auto.http.browser.stream"}});ou.set(e.response,l);const d=setTimeout(()=>{l.isRecording()&&l.end()},xT);iu.set(e.response,d)}})}}),bf="WebVitals",RT=(e={})=>{const t=new Set(e.ignore??[]);return{name:bf,setup(n){const r=ot(n),{enableStandaloneClsSpans:s,enableStandaloneLcpSpans:o}=e._experiments??{},i=r||t.has("cls")?void 0:s||!1,c=r||t.has("lcp")?void 0:o||!1,a=Dy({recordClsStandaloneSpans:i,recordLcpStandaloneSpans:c,client:n}),u=new WeakSet;n.on("afterStartPageLoadSpan",l=>{u.add(l)}),n.on("spanEnd",l=>{u.delete(l)&&(a(),qy(l,{recordClsOnPageloadSpan:i===!1,recordLcpOnPageloadSpan:c===!1,spanStreamingEnabled:r}))}),r?(t.has("lcp")||cS(n),t.has("cls")||lS(n),t.has("inp")||fS()):t.has("inp")||rS()},afterAllSetup(){t.has("inp")||aS()}}};function AT(){$.document?$.document.addEventListener("visibilitychange",()=>{const e=Ee();if(!e)return;const t=Se(e);if($.document.hidden&&t){const n="cancelled",{op:r,status:s}=G(t);He&&b.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),s||t.setStatus({code:ye,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):He&&b.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const NT=3600,Ef="sentry_previous_trace",OT="sentry.previous_trace";function MT(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let s=r?DT():void 0;e.on("spanStart",i=>{if(Se(i)!==i)return;const c=ne().getPropagationContext();s=PT(s,i,c),r&&LT(s)});let o=!0;n&&e.on("beforeSampling",i=>{if(!s)return;const c=ne(),a=c.getPropagationContext();if(o&&a.parentSpanId){o=!1;return}c.setPropagationContext({...a,dsc:{...a.dsc,sample_rate:String(s.sampleRate),sampled:String(gi(s.spanContext))},sampleRand:s.sampleRand}),i.parentSampled=gi(s.spanContext),i.parentSampleRate=s.sampleRate,i.spanAttributes={...i.spanAttributes,[Zu]:s.sampleRate}})}function PT(e,t,n){const r=G(t);function s(){var c,a;try{const u=Number(((c=r.data)==null?void 0:c[Oi])??((a=n.dsc)==null?void 0:a.sample_rate));return Number.isNaN(u)?0:u}catch{return 0}}const o={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:s(),sampleRand:n.sampleRand};if(!e)return o;const i=e.spanContext;return i.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=NT&&(He&&b.log(`Adding previous_trace \`${JSON.stringify(i)}\` link to span \`${JSON.stringify({op:r.op,...t.spanContext()})}\``),t.addLink({context:i,attributes:{[Ih]:"previous_trace"}}),t.setAttribute(OT,`${i.traceId}-${i.spanId}-${gi(i)?1:0}`)),o)}function LT(e){try{$.sessionStorage.setItem(Ef,JSON.stringify(e))}catch(t){He&&b.warn("Could not store previous trace in sessionStorage",t)}}function DT(){var e;try{const t=(e=$.sessionStorage)==null?void 0:e.getItem(Ef);return JSON.parse(t)}catch{return}}function gi(e){return e.traceFlags===1}const jT="BrowserTracing",FT=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function $T(){const e=$.navigator;return e!=null&&e.userAgent?FT.test(e.userAgent):!1}const BT={...is,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroun
32dSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...vf},UT=(e={})=>{"enableElementTiming"in e&&Rt(()=>{console.warn("[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.")});const t={name:void 0,source:void 0},n=$.document,{enableInp:r,enableLongTask:s,enableLongAnimationFrame:o,_experiments:{enableInteractions:i,enableStandaloneClsSpans:c,enableStandaloneLcpSpans:a},beforeStartSpan:u,idleTimeout:l,finalTimeout:d,childSpanTimeout:f,markBackgroundSpan:h,traceFetch:m,traceXHR:g,trackFetchStreamPerformance:_,shouldCreateSpanForRequest:v,enableHTTPTimings:S,ignoreResourceSpans:O,ignorePerformanceApiSpans:R,instrumentPageLoad:M,instrumentNavigation:P,detectRedirects:y,linkPreviousTrace:N,consistentTraceSampling:j,enableReportPageLoaded:T,onRequestSpanStart:C,onRequestSpanEnd:B}={...BT,...e},Z=$T();let F,ie;function I(x,k,V=!0,A){const w=k.op==="pageload",D=k.name,U=u?u(k):k,me=_r(A||an()),xe={...(me==null?void 0:me.pathname)&&{[Fm]:me.pathname},...me&&!Ws(me)&&{[Gn]:me.href},...U.attributes};if(D!==U.name&&(xe[he]="custom"),U.attributes=xe,!V){const we=dn();jt({...U,startTime:we}).end(we);return}t.name=U.name,t.source=xe[he];const be=kl(U,{idleTimeout:l,finalTimeout:d,childSpanTimeout:f,disableAutoFinish:w,beforeSpanEnd:we=>{zy(we,{ignoreResourceSpans:O,ignorePerformanceApiSpans:R,spanStreamingEnabled:ot(x)}),uu(x,void 0);const Qn=ne(),Ft=Qn.getPropagationContext();Qn.setPropagationContext({...Ft,traceId:be.spanContext().traceId,sampled:Pt(be),dsc:Lt(we)}),w&&(ie=void 0)},trimIdleSpanEndTimestamp:!T});w&&T&&(ie=be),uu(x,be);function et(){n&&["interactive","complete"].includes(n.readyState)&&(x.emit("idleSpanEnableAutoFinish",be),n.removeEventListener("readystatechange",et))}w&&!T&&n&&(n.addEventListener("readystatechange",et),et())}return{name:jT,setup(x){var V;if(Z){He&&b.log("[Tracing] Skipping browserTracingIntegration setup for bot user agent.");return}if(Zh(),o&&J.PerformanceObserver&&((V=PerformanceObserver.supportedEntryTypes)!=null&&V.includes("long-animation-frame"))?Fy():s&&jy(),i&&$y(),y&&n){const A=()=>{F=ge()};addEventListener("click",A,{capture:!0}),addEventListener("keydown",A,{capture:!0,passive:!0})}function k(){const A=Ir(x);A&&!G(A).timestamp&&(He&&b.log(`[Tracing] Finishing current active span with op: ${G(A).op}`),A.setAttribute(pr,"cancelled"),A.end())}x.on("startNavigationSpan",(A,w)=>{if(Y()!==x)return;if(w!=null&&w.isRedirect){He&&b.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),I(x,{op:"navigation.redirect",...A},!1,w.url);return}F=void 0,k(),Oe().setPropagationContext({traceId:ht(),sampleRand:Math.random(),propagationSpanId:Ue()?void 0:lt()});const D=ne();D.setPropagationContext({traceId:ht(),sampleRand:Math.random(),propagationSpanId:Ue()?void 0:lt()}),D.setSDKProcessingMetadata({normalizedRequest:void 0}),I(x,{op:"navigation",...A,parentSpan:null,forceTransaction:!0},!0,w==null?void 0:w.url)}),x.on("startPageLoadSpan",(A,w={})=>{if(Y()!==x)return;k();const D=w.sentryTrace||au("sentry-trace")||cu("sentry-trace"),U=w.baggage||au("baggage")||cu("baggage"),me=qh(D,U),xe=ne();xe.setPropagationContext(me),Ue()||(xe.getPropagationContext().propagationSpanId=lt()),xe.setSDKProcessingMetadata({normalizedRequest:vs()}),I(x,{op:"pageload",...A})}),x.on("endPageloadSpan",()=>{T&&ie&&(ie.setAttribute(pr,"reportPageLoaded"),ie.end())})},afterAllSetup(x){var V;if(Z)return;x.addIntegration&&!((V=x.getIntegrationByName)!=null&&V.call(x,bf))&&x.addIntegration(RT({ignore:r?[]:["inp"],_experiments:{enableStandaloneClsSpans:c,enableStandaloneLcpSpans:a}}));let k=an();if(N!=="off"&&MT(x,{linkPreviousTrace:N,consistentTraceSampling:j}),$.location){if(M){const A=ve();wf(x,{name:$.location.pathname,startTime:A?A/1e3:void 0,attributes:{[he]:"url",[de]:"auto.pageload.browser"}})}P&&Xs(({to:A,from:w})=>{if(w===void 0&&(k==null?void 0:k.indexOf(A))!==-1){k=void 0;return}k=void 0;const D=_r(A),U=Ir(x),me=U&&y&&WT(U,F);Tf(x,{name:(D==null?void 0:D.pathname)||$.location.pathname,attributes:{[he]:"url",[de]:"auto.navigation.browser"}},{url:A,isRedirect:me})})}h&&AT(),i&&HT(x,l,d,f,t),vT(x,{traceFetch:m,traceXHR:g,tracePropagationTargets:x.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:v,enableHTTPTimings:S,onRequestSpanStart:C,onRequestSpanEnd:B}),_&&x.addIntegration(CT())}}};function wf(e,t,n){e.emit("startPageLoadSpan",t,n),ne().setTransactionName(t.name);const r=Ir(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function Tf(e,t,n){const{url:r,isRedirect:s}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:s,url:r}),e.emit("startNavigationSpan",t,{isRedirect:s,url:r});const o=ne();return o.setTransactionName(t.name),r&&!s&&o.setSDKProcessingMetadata({normalizedRequest:{...vs(),url:r}}),Ir(e)}function au(e){const t=$.document,n=t==null?void 0:t.querySelector(`meta[name=${e}]`);return(n==null?void 0:n.getAttribute("content"))||void 0}function cu(e){var r,s,o;const t=(s=(r=$.performance)==null?void 0:r.getEntriesByType)==null?void 0:s.call(r,"navigation")[0],n=(o=t==null?void 0:t.serverTiming)==null?void 0:o.find(i=>i.name===e);return n==null?void 0:n.description}
32function HT(e,t,n,r,s){const o=$.document;let i;const c=()=>{const a="ui.action.click",u=Ir(e);if(u){const l=G(u).op;if(["navigation","pageload"].includes(l)){He&&b.warn(`[Tracing] Did not create ${a} span because a pageload or navigation span is in progress.`);return}}if(i&&(i.setAttribute(pr,"interactionInterrupted"),i.end(),i=void 0),!s.name){He&&b.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`);return}i=kl({name:s.name,op:a,attributes:{[he]:s.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};o&&addEventListener("click",c,{capture:!0})}const If="_sentry_idleSpan";function Ir(e){return e[If]}function uu(e,t){fe(e,If,t)}const lu=1.5;function WT(e,t){const n=G(e),r=dn(),s=n.start_timestamp;return!(r-s>lu||t&&r-t<=lu)}function zT(e){return dr(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function qT(e){const t={...e};Xl(t,"react"),Ll("react",{version:E.version});const n=Nv(t);return qu(GT),n}function GT(e){return zT(e)?"[SyntheticEvent]":Ad(e)}const Ae=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Jn(e,t){if(!t||t==="/"||!e.toLowerCase().startsWith(t.toLowerCase()))return e;const n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?e:e.slice(n)||"/"}const du=new WeakMap;function VT(e,t,n){if(!e||!(t!=null&&t.length))return null;const r=n?Jn(e,n):e;let s=du.get(t);s||(s=ZT(t),du.set(t,s),Ae&&b.log("[React Router] Sorted route manifest by specificity:",s.length,"patterns"));for(const o of s)if(YT(r,o))return Ae&&b.log("[React Router] Matched pathname",r,"to pattern",o),o;return Ae&&b.log("[React Router] No manifest match found for pathname:",r),null}function YT(e,t){if(t==="/")return e==="/"||e==="";const n=pu(e),r=pu(t);if(r.length>0&&r[r.length-1]==="*"){const o=r.slice(0,-1);if(n.length<o.length)return!1;for(const[i,c]of o.entries())if(!fu(n[i],c))return!1;return!0}if(n.length!==r.length)return!1;for(const[o,i]of r.entries())if(!fu(n[o],i))return!1;return!0}function fu(e,t){return e===void 0||t===void 0?!1:xf.test(t)?!0:e===t}function pu(e){return e.split("/").filter(Boolean)}const xf=/^:[\w-]+$/,KT=10,JT=3,XT=1,QT=-2;function hu(e){const t=e.split("/");let n=t.length;t.includes("*")&&(n+=QT);for(const r of t)r!=="*"&&(xf.test(r)?n+=JT:r===""?n+=XT:n+=KT);return n}function ZT(e){return[...e].sort((t,n)=>{const r=hu(t);return hu(n)-r})}let oo,en=!1;const wt=[],eI=10;function tI(e,t){const n={};return wt.length>=eI&&(Ae&&b.warn("[React Router] Navigation context stack overflow - removing oldest context"),wt.shift()),wt.push({token:n,targetPath:e,span:t}),n}function nI(e){const t=wt[wt.length-1];(t==null?void 0:t.token)===e&&wt.pop()}function kf(){const e=wt.length;return e>0?wt[e-1]??null:null}function rI(e,t=!1){oo=e,en=t}function sI(e){return Rf(e.route.path||"")}function Cf(e){return e.params["*"]||""}function Rf(e){return e[e.length-1]==="*"?e.slice(0,-1):e}function tn(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function Af(e){return e.endsWith("*")}function xt(e){return e.includes("/*")||e.endsWith("*")}function mu(e,t){var n;return Af(e)&&!!((n=t.route.children)!=null&&n.length)||!1}function Nf(e){var t;return!!(!e.children&&e.element&&((t=e.path)!=null&&t.endsWith("/*")))}function oI(e,t,n){const r=e&&e.length>0?e:en?Jn(t,n):t;let s=r.slice(-2)==="/*"?r.slice(0,-2):r;return s.length>1&&s[s.length-1]==="/"&&(s=s.slice(0,-1)),[s,"route"]}function gu(e){return e.split(/\\?\//).filter(t=>t.length>0&&t!==",").length}function St(e){return e[0]==="/"?e:`/${e}`}function pa(e,t){const n=oo(e,t);if(!n||n.length===0)return"";for(const r of n)if(r.route.path&&r.route.path!=="*"){const s=sI(r),o=Jn(t.pathname,St(r.pathnameBase));return t.pathname===o?tn(o):tn(tn(s||"")+St(pa(e.filter(i=>i!==r.route),{pathname:o})))}return""}function iI(e,t,n){const r=t.filter(Nf);if(!r.length)return;const s=oo(r,e),o=s==null?void 0:s[s.length-1];if(!o||!Cf(o))return;const i=tn(Rf(o.route.path||""));if(!i)return;const c=St(i),a=i.split("/")[0],u=(a==null?void 0:a.startsWith(":"))&&(n==null?void 0:n.split("/").includes(a));if(n===c||n!=null&&n.startsWith(`${c}/`)||u)return;const l=Jn(e.pathname,St(o.pathnameBase))||"/",d=pa(t.filter(f=>f!==o.route),{pathname:l});return d?St(`${i}${St(d)}`):void 0}function aI(e,t){const n=oo(t,e);if(n){for(const r of n)if(Nf(r.route)&&Cf(r))return!0}return!1}function _u(e,t){return en?Jn(e.pathname,t):e.pathname||""}function cI(e,t,n,r=""){if(!e||e.length===0)return[en?Jn(t.pathname,r):t.pathname,"url"];if(!n)return[_u(t,r),"url"];let s="";for(const o of n){const i=o.route;if(!i)continue;if(i.index)return oI(s,o.pathname,r);const c=i.path;if(!c||mu(c,o))continue;const a=c[0]==="/"||s[s.length-1]==="/"?c:`/${c}`;if(s=tn(s)+St(a),tn(t.pathname)===tn(r+o.pathname))return gu(s)!==gu(o.pathname)&&!Af(s)?[(en?"":r)+a,"route"]:(mu(s,o)&&(s=s.slice(0,-1)),[(en?"":r)+s,"route"])}return[_u(t,r),"url"]}
32function io(e,t,n,r,s="",o,i){if(i&&o&&o.length>0){const d=VT(e.pathname,o,s);if(d)return[(en?"":s)+d,"route"]}let c,a="url";const u=aI(e,n);u&&(c=St(pa(n,e)),a="route"),(!u||!c)&&([c,a]=cI(t,e,r,s));const l=iI(e,n,c);return l?[l,"route"]:[c||e.pathname,a]}function Xn(){const e=Ee(),t=e?Se(e):void 0;if(!t)return;const n=G(t).op;return n==="navigation"||n==="pageload"?t:void 0}function uI(){const e=kf();if(e)return e.targetPath?{pathname:e.targetPath,search:"",hash:"",state:null,key:"default"}:null;if(typeof $<"u")try{const t=$.location;if(t)return{pathname:t.pathname,search:t.search||"",hash:t.hash||"",state:null,key:"default"}}catch{Ae&&b.warn("[React Router] Could not access window.location")}return null}function lI(){const e=kf();return e?e.span:Xn()}function dI(e,t,n,r){const s=new Proxy(e,{apply(o,i,c){const a=uI(),u=lI(),l=o.apply(i,c);return fI(l,t,n,r,a,u),l}});return fe(s,"__sentry_proxied__",!0),s}function fI(e,t,n,r,s,o){Wn(e)?e.then(i=>{Array.isArray(i)&&r(i,t,s??void 0,o)}).catch(i=>{Ae&&b.warn(`Error resolving async handler '${n}' for route`,t,i)}):Array.isArray(e)&&r(e,t,s??void 0,o)}function ha(e,t){if(e.handle&&typeof e.handle=="object")for(const n of Object.keys(e.handle)){const r=e.handle[n];typeof r=="function"&&!r.__sentry_proxied__&&(e.handle[n]=dI(r,e,n,t))}if(Array.isArray(e.children))for(const n of e.children)ha(n,t)}let Of,Mf,Pf,kt,fn=!1,Kt=3e3,Hr,Lf="";const Df=new WeakSet,zt=new WeakMap,$e=new Set,fs=new WeakMap,_i=new WeakMap;function pI(e){return $!=null&&$.requestAnimationFrame?$.requestAnimationFrame(e):setTimeout(e,0)}function yu(e){$!=null&&$.cancelAnimationFrame?$.cancelAnimationFrame(e):clearTimeout(e)}function jf(e){return`${e.pathname}${e.search||""}${e.hash||""}`}function Su(e){return e.includes(":")||e.includes("*")}function hI(e,t,n,r){var o;if(!e)return{skip:!1,shouldUpdate:!1};if(e.locationKey===t&&(e.isPlaceholder||!r)){const i=!!e.routeName&&xt(e.routeName),c=xt(n),a=!!e.routeName&&Su(e.routeName),u=Su(n),l=i&&!c,d=!a&&u,f=n!==e.routeName&&n.length>(((o=e.routeName)==null?void 0:o.length)||0)&&!c;return{skip:!0,shouldUpdate:!!(e.routeName&&(l||d||f))}}return{skip:!1,shouldUpdate:!1}}function Ff(e,t){const n=t.children||[],r=e.filter(s=>!n.some(o=>o===s||s.path&&o.path===s.path||s.id&&o.id===s.id));r.length>0&&(t.children=[...n,...r])}function $f(e,t){let n=fs.get(e);n||(n=new Set,fs.set(e,n)),n.add(t),t.finally(()=>{const r=fs.get(e);r&&r.delete(t)})}function mI(e){const t=new Promise(n=>{_i.set(e,n)});$f(e,t)}function gI(e){const t=_i.get(e);t&&(t(),_i.delete(e),e.__sentry_may_have_lazy_routes__&&(e.__sentry_may_have_lazy_routes__=!1))}function Bf(e,t,n=null,r){e.forEach(o=>{$e.add(o),fn&&ha(o,Bf)}),t&&Ff(e,t);const s=r??Xn();if(s){const o=G(s);if(o.timestamp){Ae&&b.warn("[React Router] Lazy handler resolved after span ended - skipping update");return}const i=o.op;let c=n;if(!c&&!r&&typeof $<"u"){const a=$.location;a!=null&&a.pathname&&(c={pathname:a.pathname})}c&&(i==="pageload"?Wf({activeRootSpan:s,location:{pathname:c.pathname},routes:Array.from($e),allRoutes:Array.from($e)}):i==="navigation"&&yi(s,c,Array.from($e),!1,kt))}}function yi(e,t,n,r=!1,s){var l;const o=G(e),i=o.description,c=e==null?void 0:e.__sentry_navigation_name_set__,a=i&&xt(i);if((!c||r||a)&&!o.timestamp){const d=s(n,t),[f,h]=io(t,n,n,d||[],Lf,Hr,fn),m=(l=o.data)==null?void 0:l[he];f&&(!i||!c&&(m!=="route"||h==="route")||m!=="route"&&h==="route"||m==="route"&&h==="route"&&a)&&(e.updateName(f),e.setAttribute(he,h),h==="route"&&e.setAttribute(mr,f),!xt(f)&&h==="route"&&fe(e,"__sentry_navigation_name_set__",!0))}}function _I(e,t,n,r,s){let o=!1,i=!!s&&G(s).op==="pageload",c=!1,a=null,u=null;e.subscribe(l=>{if(!o){const f=Xn();f&&G(f).op==="pageload"?i=!0:i&&(l.historyAction==="POP"&&!c?c=!0:o=!0)}if(l.historyAction==="PUSH"||l.historyAction==="POP"&&o){const f=jf(l.location),h=()=>{u!==f&&(u=f,a=null,bI({location:l.location,routes:t,navigationType:l.historyAction,version:n,basename:r,allRoutes:Array.from($e)}))};l.navigation.state!=="idle"?(u!==f&&(u=null),a!==null&&yu(a),a=pI(h)):(a!==null&&(yu(a),a=null),h())}})}function yI(e,t){return!Of||!Mf||!Pf||!kt?(Ae&&b.warn(`reactRouter${t?`V${t}`:""}Instrumentation was unable to wrap the \`createRouter\` function because of one or more missing parameters.`),e):function(n,r){if(Uf(n),fn)for(const u of n)ha(u,Bf);const s=Xn();r&&"patchRoutesOnNavigation"in r&&typeof r.patchRoutesOnNavigation=="function"&&s&&(fe(s,"__sentry_may_have_lazy_routes__",!0),mI(s));const i=vI(r,!1,s),c=e(n,i),a=r==null?void 0:r.basename;return c.state.historyAction==="POP"&&s&&Wf({activeRootSpan:s,location:c.state.location,routes:n,basename:a,allRoutes:Array.from($e)}),Lf=a||"",_I(c,n,t,a,s),c}}function SI(e,t){const n=UT({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{useEffect:r,useLocation:s,useNavigationType:o,createRoutesFromChildren:i,matchRoutes:c,stripBasename:a,enableAsyncRouteHandlers:u=!1,instrumentPageLoad:l=!0,instrumentNavigation:d=!0,lazyRouteTimeout:f,lazyRouteManifest:h}=e;return{...n,setup(m){n.setup(m);const g=e.finalTimeout??3e4,_=(e.idleTimeout??1e3)*3,v=f??_;v===1/0?(Kt=g,Ae&&b.log("[React Router] lazyRouteTimeout set to Infinity, capping at finalTimeout:",g,"ms to prevent indefinite hangs")):Number.isNaN(v)?(Ae&&b.warn("[React Router] lazyRouteTimeout must be a number, falling back to default:",_),Kt=_):v<0?(Ae&&b.warn("[React Router] lazyRouteTimeout must be non-negative or Infinity, got:",v,"falling back to:",_),Kt=_):Kt=v,Of=r,Mf=s,Pf=o,kt=c,fn=u,Hr=h,rI(c,a||!1)},afterAllSetup(m){var _;n.afterAllSetup(m);const g=(_=$.location)==null?void 0:_.pathname;l&&g&&wf(m,{name:g,attributes:{[he]:"url",[Ne]:"pageload",[de]:`auto.pageload.react.reactrouter${t?`_v${t}`:""}`}}),d&&Df.add(m)}}}
32function vI(e,t=!1,n){if(!e||!("patchRoutesOnNavigation"in e)||typeof e.patchRoutesOnNavigation!="function")return e||{};const r=e.patchRoutesOnNavigation;return{...e,patchRoutesOnNavigation:async s=>{const o=s==null?void 0:s.path,i=Xn()??n;if(!t){const a=s==null?void 0:s.patch,u=s==null?void 0:s.matches;a&&(s.patch=(l,d)=>{if(Uf(d),u&&u.length>0){const h=u[u.length-1],m=h==null?void 0:h.route;if(m){const g=Array.from($e).find(_=>{const v=_.id!==void 0&&_.id===l,S=_===m,O=_.path!==void 0&&m.path!==void 0&&_.path===m.path;return v||S||O});g&&Ff(d,g)}}const f=i?G(i):void 0;return o&&i&&f&&!f.timestamp&&f.op==="navigation"&&yi(i,{pathname:o,search:"",hash:"",state:null,key:"default"},Array.from($e),!0,kt),a(l,d)})}const c=(async()=>{const a=tI(o,i);let u;try{u=await r(s)}finally{nI(a),i&&gI(i)}const l=i?G(i):void 0;if(i&&l&&!l.timestamp&&l.op==="navigation"){const d=o;d&&yi(i,{pathname:d,search:"",hash:"",state:null,key:"default"},Array.from($e),!1,kt)}return u})();return i&&$f(i,c),c}}}function bI(e){const{location:t,routes:n,navigationType:r,version:s,matches:o,basename:i,allRoutes:c}=e,a=Array.isArray(o)?o:kt(c||n,t,i),u=Y();if(!u||!Df.has(u))return;const l=Xn();if(!(l&&G(l).op==="pageload"&&r==="POP")&&(r==="PUSH"||r==="POP")&&a){const[d,f]=io(t,c||n,c||n,a,i,Hr,fn),h=jf(t),m=zt.get(u),g=m&&!m.isPlaceholder?!!G(m.span).timestamp:!1,{skip:_,shouldUpdate:v}=hI(m,h,d,g);if(_){if(v&&m){const M=m.routeName;m.isPlaceholder?(m.routeName=d,Ae&&b.log(`[Tracing] Updated placeholder navigation name from "${M}" to "${d}" (will apply to real span)`)):(m.span.updateName(d),m.span.setAttribute(he,f),f==="route"&&m.span.setAttribute(mr,d),fe(m.span,"__sentry_navigation_name_set__",!0),m.routeName=d,Ae&&b.log(`[Tracing] Updated navigation span name from "${M}" to "${d}"`))}else Ae&&b.log(`[Tracing] Skipping duplicate navigation for location: ${h}`);return}const O={span:{end:()=>{}},routeName:d,pathname:t.pathname,locationKey:h,isPlaceholder:!0};zt.set(u,O);let R;try{R=Tf(u,{name:O.routeName,attributes:{[he]:f,[Ne]:"navigation",[de]:`auto.navigation.react.reactrouter${s?`_v${s}`:""}`,...f==="route"&&{[mr]:O.routeName}}})}catch(M){throw zt.delete(u),M}R?(zt.set(u,{span:R,routeName:O.routeName,pathname:t.pathname,locationKey:h}),Si(R,t,n,i,"navigation")):zt.delete(u)}}function Uf(e){const t=[];return e.forEach(n=>{Hf(n).forEach(s=>{$e.add(s),t.push(s)})}),t}function Hf(e,t=new Set){return t.has(e)||(t.add(e),e.children&&!e.index&&e.children.forEach(n=>{Hf(n,t).forEach(s=>{t.add(s)})})),t}function Wf({activeRootSpan:e,location:t,routes:n,matches:r,basename:s,allRoutes:o}){const i=Array.isArray(r)?r:kt(o||n,t,s);if(i){const[c,a]=io(t,o||n,o||n,i,s,Hr,fn);ne().setTransactionName(c||"/"),e&&(e.updateName(c),e.setAttribute(he,a),a==="route"&&e.setAttribute(mr,c),Si(e,t,n,s,"pageload"))}else e&&Si(e,t,n,s,"pageload")}function EI(e,t,n,r,s=!1){return n?!!(!e&&s||e&&xt(e)&&r==="route"&&!xt(n)||t!=="route"&&r==="route"):!1}function Mo(e,t,n,r,s,o,i,c){var a;try{const u=(a=t.data)==null?void 0:a[he];if(u==="route"&&n&&!xt(n))return;const l=Array.from(c),d=l.length>0?l:s,f=kt(d,r,o);if(!f)return;const[h,m]=io(r,d,d,f,o,Hr,fn),g=EI(n,u,h,m,!0),_=i==="pageload"||!t.timestamp;g&&_&&(e.updateName(h),e.setAttribute(he,m),m==="route"&&e.setAttribute(mr,h))}catch(u){Ae&&b.warn(`Error updating span details before ending: ${u}`)}}function Si(e,t,n,r,s){const o=`__sentry_${s}_end_patched__`;if((e==null?void 0:e[o])||!e.end)return;const c=e.end.bind(e);let a=!1;e.end=function(...l){var R;if(a)return;a=!0;const d=l.length>0?l[0]:Date.now()/1e3,f=G(e),h=f.description,m=(R=f.data)==null?void 0:R[he],g=()=>{const M=Y();if(M&&s==="navigation"){const P=zt.get(M);P&&P.span===e&&zt.delete(M)}},_=fs.get(e),v=e.__sentry_may_have_lazy_routes__;if((_&&_.size>0||v)&&h&&(xt(h)||m!=="route")){if(Kt===0){Mo(e,f,h,t,n,r,s,$e),g(),c(d);return}const M=new Promise(y=>setTimeout(y,Kt));let P;if(_&&_.size>0){const y=Promise.allSettled(_).then(()=>{});P=Kt===1/0?y:Promise.race([y,M])}else P=M;P.then(()=>{const y=G(e);Mo(e,y,y.description,t,n,r,s,$e),g(),c(d)}).catch(()=>{g(),c(d)});return}Mo(e,f,h,t,n,r,s,$e),g(),c(d)},fe(e,o,!0)}function wI(e){return SI(e,"6")}function TI(e){return yI(e,"6")}var II=typeof Element<"u",xI=typeof Map=="function",kI=typeof Set=="function",CI=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function ps(e,t){if(e===t)return!0;
32if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,s;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!ps(e[r],t[r]))return!1;return!0}var o;if(xI&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!ps(r.value[1],t.get(r.value[0])))return!1;return!0}if(kI&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(CI&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[r]))return!1;if(II&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((s[r]==="_owner"||s[r]==="__v"||s[r]==="__o")&&e.$$typeof)&&!ps(e[s[r]],t[s[r]]))return!1;return!0}return e!==e&&t!==t}var RI=function(t,n){try{return ps(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const AI=Ds(RI);var NI=function(e,t,n,r,s,o,i,c){if(!e){var a;if(t===void 0)a=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,s,o,i,c],l=0;a=new Error(t.replace(/%s/g,function(){return u[l++]})),a.name="Invariant Violation"}throw a.framesToPop=1,a}},OI=NI;const vu=Ds(OI);var MI=function(t,n,r,s){var o=r?r.call(s,t,n):void 0;if(o!==void 0)return!!o;if(t===n)return!0;if(typeof t!="object"||!t||typeof n!="object"||!n)return!1;var i=Object.keys(t),c=Object.keys(n);if(i.length!==c.length)return!1;for(var a=Object.prototype.hasOwnProperty.bind(n),u=0;u<i.length;u++){var l=i[u];if(!a(l))return!1;var d=t[l],f=n[l];if(o=r?r.call(s,d,f,l):void 0,o===!1||o===void 0&&d!==f)return!1}return!0};const PI=Ds(MI);var zf=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(zf||{}),Po={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},bu=Object.values(zf),ma={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},LI=Object.entries(ma).reduce((e,[t,n])=>(e[n]=t,e),{}),Je="data-rh",Cn={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},Rn=(e,t)=>{for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},DI=e=>{let t=Rn(e,"title");const n=Rn(e,Cn.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,()=>t);const r=Rn(e,Cn.DEFAULT_TITLE);return t||r||void 0},jI=e=>Rn(e,Cn.ON_CHANGE_CLIENT_STATE)||(()=>{}),Lo=(e,t)=>t.filter(n=>typeof n[e]<"u").map(n=>n[e]).reduce((n,r)=>({...n,...r}),{}),FI=(e,t)=>t.filter(n=>typeof n.base<"u").map(n=>n.base).reverse().reduce((n,r)=>{if(!n.length){const s=Object.keys(r);for(let o=0;o<s.length;o+=1){const c=s[o].toLowerCase();if(e.indexOf(c)!==-1&&r[c])return n.concat(r)}}return n},[]),$I=e=>console&&typeof console.warn=="function"&&console.warn(e),tr=(e,t,n)=>{const r={};return n.filter(s=>Array.isArray(s[e])?!0:(typeof s[e]<"u"&&$I(`Helmet: ${e} should be of type "Array". Instead found type "${typeof s[e]}"`),!1)).map(s=>s[e]).reverse().reduce((s,o)=>{const i={};o.filter(a=>{let u;const l=Object.keys(a);for(let f=0;f<l.length;f+=1){const h=l[f],m=h.toLowerCase();t.indexOf(m)!==-1&&!(u==="rel"&&a[u].toLowerCase()==="canonical")&&!(m==="rel"&&a[m].toLowerCase()==="stylesheet")&&(u=m),t.indexOf(h)!==-1&&(h==="innerHTML"||h==="cssText"||h==="itemprop")&&(u=h)}if(!u||!a[u])return!1;const d=a[u].toLowerCase();return r[u]||(r[u]={}),i[u]||(i[u]={}),r[u][d]?!1:(i[u][d]=!0,!0)}
32).reverse().forEach(a=>s.push(a));const c=Object.keys(i);for(let a=0;a<c.length;a+=1){const u=c[a],l={...r[u],...i[u]};r[u]=l}return s},[]).reverse()},BI=(e,t)=>{if(Array.isArray(e)&&e.length){for(let n=0;n<e.length;n+=1)if(e[n][t])return!0}return!1},UI=e=>({baseTag:FI(["href"],e),bodyAttributes:Lo("bodyAttributes",e),defer:Rn(e,Cn.DEFER),encode:Rn(e,Cn.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:Lo("htmlAttributes",e),linkTags:tr("link",["rel","href"],e),metaTags:tr("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:tr("noscript",["innerHTML"],e),onChangeClientState:jI(e),scriptTags:tr("script",["src","innerHTML"],e),styleTags:tr("style",["cssText"],e),title:DI(e),titleAttributes:Lo("titleAttributes",e),prioritizeSeoTags:BI(e,Cn.PRIORITIZE_SEO_TAGS)}),qf=e=>Array.isArray(e)?e.join(""):e,HI=(e,t)=>{const n=Object.keys(e);for(let r=0;r<n.length;r+=1)if(t[n[r]]&&t[n[r]].includes(e[n[r]]))return!0;return!1},Do=(e,t)=>Array.isArray(e)?e.reduce((n,r)=>(HI(r,t)?n.priority.push(r):n.default.push(r),n),{priority:[],default:[]}):{default:e,priority:[]},Eu=(e,t)=>({...e,[t]:void 0}),WI=["noscript","script","style"],vi=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"),Gf=e=>Object.keys(e).reduce((t,n)=>{const r=typeof e[n]<"u"?`${n}="${e[n]}"`:`${n}`;return t?`${t} ${r}`:r},""),zI=(e,t,n,r)=>{const s=Gf(n),o=qf(t);return s?`<${e} ${Je}="true" ${s}>${vi(o,r)}</${e}>`:`<${e} ${Je}="true">${vi(o,r)}</${e}>`},qI=(e,t,n=!0)=>t.reduce((r,s)=>{const o=s,i=Object.keys(o).filter(u=>!(u==="innerHTML"||u==="cssText")).reduce((u,l)=>{const d=typeof o[l]>"u"?l:`${l}="${vi(o[l],n)}"`;return u?`${u} ${d}`:d},""),c=o.innerHTML||o.cssText||"",a=WI.indexOf(e)===-1;return`${r}<${e} ${Je}="true" ${i}${a?"/>":`>${c}</${e}>`}`},""),Vf=(e,t={})=>Object.keys(e).reduce((n,r)=>{const s=ma[r];return n[s||r]=e[r],n},t),GI=(e,t,n)=>{const r={key:t,[Je]:!0},s=Vf(n,r);return[Ie.createElement("title",s,t)]},hs=(e,t)=>t.map((n,r)=>{const s={key:r,[Je]:!0};return Object.keys(n).forEach(o=>{const c=ma[o]||o;if(c==="innerHTML"||c==="cssText"){const a=n.innerHTML||n.cssText;s.dangerouslySetInnerHTML={__html:a}}else s[c]=n[o]}),Ie.createElement(e,s)}),qe=(e,t,n=!0)=>{switch(e){case"title":return{toComponent:()=>GI(e,t.title,t.titleAttributes),toString:()=>zI(e,t.title,t.titleAttributes,n)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>Vf(t),toString:()=>Gf(t)};default:return{toComponent:()=>hs(e,t),toString:()=>qI(e,t,n)}}},VI=({metaTags:e,linkTags:t,scriptTags:n,encode:r})=>{const s=Do(e,Po.meta),o=Do(t,Po.link),i=Do(n,Po.script);return{priorityMethods:{toComponent:()=>[...hs("meta",s.priority),...hs("link",o.priority),...hs("script",i.priority)],toString:()=>`${qe("meta",s.priority,r)} ${qe("link",o.priority,r)} ${qe("script",i.priority,r)}`},metaTags:s.default,linkTags:o.default,scriptTags:i.default}},YI=e=>{const{baseTag:t,bodyAttributes:n,encode:r=!0,htmlAttributes:s,noscriptTags:o,styleTags:i,title:c="",titleAttributes:a,prioritizeSeoTags:u}=e;let{linkTags:l,metaTags:d,scriptTags:f}=e,h={toComponent:()=>{},toString:()=>""};return u&&({priorityMethods:h,linkTags:l,metaTags:d,scriptTags:f}=VI(e)),{priority:h,base:qe("base",t,r),bodyAttributes:qe("bodyAttributes",n,r),htmlAttributes:qe("htmlAttributes",s,r),link:qe("link",l,r),meta:qe("meta",d,r),noscript:qe("noscript",o,r),script:qe("script",f,r),style:qe("style",i,r),title:qe("title",{title:c,titleAttributes:a},r)}},bi=YI,ns=[],Yf=!!(typeof window<"u"&&window.document&&window.document.createElement),Ei=class{constructor(e,t){it(this,"instances",[]);it(this,"canUseDOM",Yf);it(this,"context");it(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?ns:this.instances,add:e=>{(this.canUseDOM?ns:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?ns:this.instances).indexOf(e);(this.canUseDOM?ns:this.instances).splice(t,1)}}});this.context=e,this.canUseDOM=t||!1,t||(e.helmet=bi({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},KI={}
32,Kf=Ie.createContext(KI),An,Jf=(An=class extends E.Component{constructor(n){super(n);it(this,"helmetData");this.helmetData=new Ei(this.props.context||{},An.canUseDOM)}render(){return Ie.createElement(Kf.Provider,{value:this.helmetData.value},this.props.children)}},it(An,"canUseDOM",Yf),An),_n=(e,t)=>{const n=document.head||document.querySelector("head"),r=n.querySelectorAll(`${e}[${Je}]`),s=[].slice.call(r),o=[];let i;return t&&t.length&&t.forEach(c=>{const a=document.createElement(e);for(const u in c)if(Object.prototype.hasOwnProperty.call(c,u))if(u==="innerHTML")a.innerHTML=c.innerHTML;else if(u==="cssText")a.styleSheet?a.styleSheet.cssText=c.cssText:a.appendChild(document.createTextNode(c.cssText));else{const l=u,d=typeof c[l]>"u"?"":c[l];a.setAttribute(u,d)}a.setAttribute(Je,"true"),s.some((u,l)=>(i=l,a.isEqualNode(u)))?s.splice(i,1):o.push(a)}),s.forEach(c=>{var a;return(a=c.parentNode)==null?void 0:a.removeChild(c)}),o.forEach(c=>n.appendChild(c)),{oldTags:s,newTags:o}},wi=(e,t)=>{const n=document.getElementsByTagName(e)[0];if(!n)return;const r=n.getAttribute(Je),s=r?r.split(","):[],o=[...s],i=Object.keys(t);for(const c of i){const a=t[c]||"";n.getAttribute(c)!==a&&n.setAttribute(c,a),s.indexOf(c)===-1&&s.push(c);const u=o.indexOf(c);u!==-1&&o.splice(u,1)}for(let c=o.length-1;c>=0;c-=1)n.removeAttribute(o[c]);s.length===o.length?n.removeAttribute(Je):n.getAttribute(Je)!==i.join(",")&&n.setAttribute(Je,i.join(","))},JI=(e,t)=>{typeof e<"u"&&document.title!==e&&(document.title=qf(e)),wi("title",t)},wu=(e,t)=>{const{baseTag:n,bodyAttributes:r,htmlAttributes:s,linkTags:o,metaTags:i,noscriptTags:c,onChangeClientState:a,scriptTags:u,styleTags:l,title:d,titleAttributes:f}=e;wi("body",r),wi("html",s),JI(d,f);const h={baseTag:_n("base",n),linkTags:_n("link",o),metaTags:_n("meta",i),noscriptTags:_n("noscript",c),scriptTags:_n("script",u),styleTags:_n("style",l)},m={},g={};Object.keys(h).forEach(_=>{const{newTags:v,oldTags:S}=h[_];v.length&&(m[_]=v),S.length&&(g[_]=h[_].oldTags)}),t&&t(),a(e,m,g)},nr=null,XI=e=>{nr&&cancelAnimationFrame(nr),e.defer?nr=requestAnimationFrame(()=>{wu(e,()=>{nr=null})}):(wu(e),nr=null)},QI=XI,Tu=class extends E.Component{constructor(){super(...arguments);it(this,"rendered",!1)}shouldComponentUpdate(t){return!PI(t,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:t}=this.props.context;t.remove(this),this.emitChange()}emitChange(){const{helmetInstances:t,setHelmet:n}=this.props.context;let r=null;const s=UI(t.get().map(o=>{const i={...o.props};return delete i.context,i}));Jf.canUseDOM?QI(s):bi&&(r=bi(s)),n(r)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:t}=this.props.context;t.add(this),this.emitChange()}render(){return this.init(),null}},jo,ZI=(jo=class extends E.Component{shouldComponentUpdate(e){return!AI(Eu(this.props,"helmetData"),Eu(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,n,r){return{...t,[e.type]:[...t[e.type]||[],{...n,...this.mapNestedChildrenToProps(e,r)}]}}mapObjectTypeChildren(e,t,n,r){switch(e.type){case"title":return{...t,[e.type]:r,titleAttributes:{...n}};case"body":return{...t,bodyAttributes:{...n}};case"html":return{...t,htmlAttributes:{...n}};default:return{...t,[e.type]:{...n}}}}mapArrayTypeChildrenToProps(e,t){let n={...t};return Object.keys(e).forEach(r=>{n={...n,[r]:e[r]}}),n}warnOnInvalidChildren(e,t){return vu(bu.some(n=>e.type===n),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${bu.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),vu(!t||typeof t=="string"||Array.isArray(t)&&!t.some(n=>typeof n!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let n={};
32return Ie.Children.forEach(e,r=>{if(!r||!r.props)return;const{children:s,...o}=r.props,i=Object.keys(o).reduce((a,u)=>(a[LI[u]||u]=o[u],a),{});let{type:c}=r;switch(typeof c=="symbol"?c=c.toString():this.warnOnInvalidChildren(r,s),c){case"Symbol(react.fragment)":t=this.mapChildrenToProps(s,t);break;case"link":case"meta":case"noscript":case"script":case"style":n=this.flattenArrayTypeChildren(r,n,i,s);break;default:t=this.mapObjectTypeChildren(r,t,i,s);break}}),this.mapArrayTypeChildrenToProps(n,t)}render(){const{children:e,...t}=this.props;let n={...t},{helmetData:r}=t;if(e&&(n=this.mapChildrenToProps(e,n)),r&&!(r instanceof Ei)){const s=r;r=new Ei(s.context,!0),delete n.helmetData}return r?Ie.createElement(Tu,{...n,context:r.value}):Ie.createElement(Kf.Consumer,null,s=>Ie.createElement(Tu,{...n,context:s}))}},it(jo,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),jo);const Xf="https://www.4earth.tech",e0="4Earth",t0=`${Xf}/images/ginseng/OG.webp`,n0="4Earth manufactures automated, decentralized wastewater systems for industrial and commercial reuse.",r0={siteTitle:e0,baseUrl:Xf,description:n0,ogImage:t0,ogType:"website",twitterCard:"summary_large_image"};function s0(e={}){return{...r0,...Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null&&t!==""))}}const Qf=({title:e,description:t,canonical:n,ogTitle:r,ogDescription:s,ogImage:o,ogType:i,jsonLd:c,noindex:a})=>{const u=s0({description:t,ogImage:o,ogType:i}),l=e?`${e} | ${u.siteTitle}`:u.siteTitle,d=n?`${u.baseUrl}${n}`:void 0,f=r||l,h=s||u.description;return p.jsxs(ZI,{children:[p.jsx("title",{children:l}),p.jsx("meta",{name:"description",content:u.description}),a&&p.jsx("meta",{name:"robots",content:"noindex,nofollow"}),d&&p.jsx("link",{rel:"canonical",href:d}),p.jsx("meta",{property:"og:type",content:u.ogType}),p.jsx("meta",{property:"og:title",content:f}),p.jsx("meta",{property:"og:description",content:h}),p.jsx("meta",{property:"og:site_name",content:u.siteTitle}),p.jsx("meta",{property:"og:image",content:u.ogImage}),d&&p.jsx("meta",{property:"og:url",content:d}),p.jsx("meta",{name:"twitter:card",content:u.twitterCard}),p.jsx("meta",{name:"twitter:title",content:f}),p.jsx("meta",{name:"twitter:description",content:h}),p.jsx("meta",{name:"twitter:image",content:u.ogImage}),c&&(Array.isArray(c)?c.map((m,g)=>p.jsx("script",{type:"application/ld+json",children:JSON.stringify(m)},g)):p.jsx("script",{type:"application/ld+json",children:JSON.stringify(c)}))]})},Zf=()=>p.jsxs(p.Fragment,{children:[p.jsx(Qf,{title:"Page Not Found",noindex:!0}),p.jsx("main",{className:"grid min-h-screen px-6 py-24 bg-slate-100 place-items-center sm:py-32 lg:px-8",children:p.jsxs("div",{className:"text-center",children:[p.jsx("p",{className:"text-base font-semibold text-cyan-600",children:"404"}),p.jsx("h1",{className:"mt-4 text-3xl font-bold text-gray-900 font-heading sm:text-5xl",children:"Page not found"}),p.jsx("p",{className:"mt-6 text-base leading-7 text-gray-600",children:"Sorry, we couldn’t find the page you’re looking for."}),p.jsx("div",{className:"flex items-center justify-center mt-10 gap-x-6",children:p.jsx(Te,{to:"/",className:"rounded-md bg-cyan-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-cyan-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",children:"Go back home"})})]})})]}),o0=Object.freeze(Object.defineProperty({__proto__:null,default:Zf},Symbol.toStringTag,{value:"Module"})),i0="https://catjjzvmfnpqoqkvndfg.supabase.co",a0="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImNhdGpqenZtZm5wcW9xa3ZuZGZnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTE0NjgwNjMsImV4cCI6MjA2NzA0NDA2M30.OEwYsrtCVFtfV3zqAunSvr5e_1Z0K0vwmb6nEdW0MJI",oe=Ip(i0,a0);window.addEventListener("storage",async e=>{if(e.key&&e.key.startsWith("sb-")&&e.key.endsWith("-auth-token")){const{data:{session:t}}=await oe.auth.getSession();t||await oe.auth.signOut()}});function c0(){const e=t=>{const n=t==null?void 0:t.user;ec(n?{id:n.id,email:n.email}:null)};oe.auth.getSession().then(({data:t})=>e(t==null?void 0:t.session)).catch(()=>{}),oe.auth.onAuthStateChange((t,n)=>e(n))}
32class u0 extends E.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("[ErrorBoundary] Caught error:",t,n.componentStack),Bi(t,{contexts:{react:{componentStack:n.componentStack}}})}render(){var t;return this.state.hasError?this.props.fallback?this.props.fallback:p.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"100vh",backgroundColor:"#000000",fontFamily:"Jost, sans-serif",padding:"2rem"},children:[p.jsx("h1",{style:{color:"#ffffff",fontSize:"1.5rem",marginBottom:"0.75rem"},children:"Something went wrong"}),p.jsx("p",{style:{color:"#aaaaaa",fontSize:"0.9rem",marginBottom:"1.5rem",textAlign:"center",maxWidth:"400px"},children:((t=this.state.error)==null?void 0:t.message)||"An unexpected error occurred."}),p.jsx("button",{onClick:()=>window.location.reload(),style:{backgroundColor:"#00FFB7",color:"#000000",border:"none",borderRadius:"8px",padding:"0.6rem 1.5rem",fontSize:"1rem",fontWeight:600,cursor:"pointer",fontFamily:"Jost, sans-serif"},children:"Try Again"})]}):this.props.children}}var ep={exports:{}};/*!
33	Copyright (c) 2018 Jed Watson.
34	Licensed under the MIT License (MIT), see
35	http://jedwatson.github.io/classnames
36*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],s=0;s<arguments.length;s++){var o=arguments[s];if(o){var i=typeof o;if(i==="string"||i==="number")r.push(o);else if(Array.isArray(o)){if(o.length){var c=n.apply(null,o);c&&r.push(c)}}else if(i==="object"){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){r.push(o.toString());continue}for(var a in o)t.call(o,a)&&o[a]&&r.push(a)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(ep);var l0=ep.exports;const tt=Ds(l0),Iu=Symbol.for("constructDateFrom");function tp(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Iu in e?e[Iu](t):e instanceof Date?new e.constructor(t):new Date(t)}function ga(e,t){return tp(t||e,e)}function d0(e,t,n){const r=ga(e,n==null?void 0:n.in);return isNaN(t)?tp((n==null?void 0:n.in)||e,NaN):(t&&r.setDate(r.getDate()+t),r)}let f0={};function np(){return f0}function p0(e,t){var c,a,u,l;const n=np(),r=(t==null?void 0:t.weekStartsOn)??((a=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:a.weekStartsOn)??n.weekStartsOn??((l=(u=n.locale)==null?void 0:u.options)==null?void 0:l.weekStartsOn)??0,s=ga(e,t==null?void 0:t.in),o=s.getDay(),i=(o<r?7:0)+o-r;return s.setDate(s.getDate()-i),s.setHours(0,0,0,0),s}function h0(e,t,n){return d0(e,t*7,n)}function m0(e,t){var c,a,u,l;const n=np(),r=(t==null?void 0:t.weekStartsOn)??((a=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:a.weekStartsOn)??n.weekStartsOn??((l=(u=n.locale)==null?void 0:u.options)==null?void 0:l.weekStartsOn)??0,s=ga(e,t==null?void 0:t.in),o=s.getDay(),i=(o<r?-7:0)+6-(o-r);return s.setDate(s.getDate()+i),s.setHours(23,59,59,999),s}function xu(e,t,n){return h0(e,-t,n)}let qt=null,Gt=null,xr=null;const Ms=e=>{(qt||Gt)&&console.log(`Clearing user context cache: ${e}`),qt=null,Gt=null,xr=null},Me=async()=>{const{data:{session:e}}=await oe.auth.getSession();if(!e)throw Ms("no active session"),new Error("User not authenticated.");if(qt&&xr!==e.user.id&&Ms("user identity changed"),qt)return qt;if(Gt)return await Gt;const t=e.user.id;return Gt=(async()=>{var n;try{const{data:r}=await oe.from("users").select("company_id").eq("user_id",t).single();if(!(r!=null&&r.company_id))throw new Error("Could not find user profile or company link.");const{data:s}=await oe.from("companies").select("company_name, address, systems(system_id, ro_chart_tags, GAC_chart, building_page)").eq("company_id",r.company_id).single();if(!((n=s==null?void 0:s.systems)!=null&&n[0]))throw new Error("No system found for this company.");return qt={system_id:s.systems[0].system_id,company_name:s.company_name,address:s.address,ro_chart_tags:s.systems[0].ro_chart_tags||[],GAC_chart:s.systems[0].GAC_chart||[],building_page:s.systems[0].building_page||!1},xr=t,qt}finally{Gt=null}})(),await Gt};oe.auth.onAuthStateChange((e,t)=>{var n;
36e==="SIGNED_OUT"||e==="USER_DELETED"?Ms(`auth event: ${e}`):(e==="SIGNED_IN"||e==="USER_UPDATED")&&xr&&(n=t==null?void 0:t.user)!=null&&n.id&&xr!==t.user.id&&Ms(`auth event: ${e} (different user)`)});const uk=async()=>{const e=await Me(),{data:t,error:n}=await oe.rpc("get_latest_telemetry_for_system",{p_system_id:e.system_id});if(n)throw console.error("Error fetching latest telemetry via RPC:",n),n;return{telemetry:t||[],company_name:e.company_name,address:e.address}},g0=async()=>{const e=await Me(),{data:t,error:n}=await oe.rpc("get_last_alarm_states_for_system",{p_system_id:e.system_id});if(n)throw console.error("Error fetching last alarm states:",n),n;return{telemetry:t,company_name:e.company_name,address:e.address}},_0=async()=>await Me(),lk=async e=>{const t=await Me(),{data:n,error:r}=await oe.rpc("get_latest_telemetry_by_category",{category_name:e,target_system_id:t.system_id});if(r)throw console.error(`Error fetching telemetry for category ${e}:`,r),r;return{telemetry:n,company_name:t.company_name,address:t.address}},dk=async(e,t=2)=>{const n=await Me(),r=new Date(Date.now()-t*60*60*1e3).toISOString(),{data:s,error:o}=await oe.from("historical_chart_values").select("timestamp, value, telemetry_definitions!inner(tag_name, friendly_name)").eq("system_id",n.system_id).eq("telemetry_definitions.tag_name",e).gte("timestamp",r).order("timestamp",{ascending:!0});if(o)throw console.error(`Error fetching history for tag ${e}:`,o),o;return s},fk=async(e="today")=>{const t=await Me(),{data:n,error:r}=await oe.rpc("get_recovery_and_totals",{p_system_id:t.system_id,p_time_period:e});if(r)throw console.error(`Error fetching recovery analysis for period "${e}":`,r),r;return n==null?void 0:n[0]},pk=async(e=0)=>{const t=await Me(),n=new Date,r=p0(xu(n,e)),s=m0(xu(n,e)),o=a=>a.toISOString().split("T")[0];console.log(`[fetchDailyTotals] Fetching for weekOffset: ${e}`,{start:o(r),end:o(s)});const{data:i,error:c}=await oe.rpc("get_daily_totals_for_period",{p_system_id:t.system_id,p_start_date:o(r),p_end_date:o(s)});if(c)throw console.error(`Error fetching daily totals for week offset ${e}:`,c),c;return console.log("[fetchDailyTotals] Raw data received from Supabase:",i),i||[]},hk=async()=>{const e=await Me(),t="UF-Pressure_mbar_ultrafiltration_KPI",{data:n,error:r}=await oe.rpc("get_uf_last_batch_nadir",{p_system_id:e.system_id,p_uf_pressure_tag:t});if(r)throw console.error("Error fetching UF last batch nadir:",r),r;return n},mk=async()=>{const e=await Me(),{data:t,error:n}=await oe.rpc("get_gac_lifetime_data",{p_system_id:e.system_id});if(n)throw n;return t},gk=async()=>{const e=await Me(),t=new Date(Date.now()-12*60*60*1e3).toISOString(),{data:n,error:r}=await oe.from("uf_slope_alerts").select("detected_at").eq("system_id",e.system_id).gte("detected_at",t).order("detected_at",{ascending:!1}).limit(1);if(r)throw console.error("Supabase error in getLatestUfSlopeAlert:",r),r;return n==null?void 0:n[0]},_k=async()=>{const e=await Me(),{data:t,error:n}=await oe.from("daily_water_totals").select("*").eq("system_id",e.system_id).order("reading_date",{ascending:!0});if(n)throw console.error("[getDailyWaterTotals] Error:",n.message),n;return t||[]},yk=async(e=30)=>{const t=await Me(),n=new Date;n.setDate(n.getDate()-e);const r=n.toISOString().split("T")[0],{data:s,error:o}=await oe.from("daily_car_wash_counts").select("date, non_deid, de_id, total_count").eq("system_id",t.system_id).gte("date",r).order("date",{ascending:!1});if(o)throw console.error("[getCarWashHistory] Error:",o.message,{days:e}),o;return s},Sk=async(e,t,n)=>{const r=await Me(),{data:s,error:o}=await oe.rpc("upsert_daily_car_count",{p_system_id:r.system_id,p_date:e,p_non_deid:t,p_de_id:n});if(o)throw console.error("Error saving car wash count:",o),o;return s},vk=async e=>{const t=await Me(),{error:n}=await oe.rpc("log_gac_change",{p_system_id:t.system_id,p_gallons_used:e});if(n)throw n};async function bk(){const e=await Me(),{data:t,error:n}=await oe.from("systems").select("front_image_url, back_image_url").eq("system_id",e.system_id).maybeSingle();if(n)throw console.error("Error fetching system image URLs:",n),n;return{system_id:e.system_id,company_name:e.company_name,address:e.address,front_image_url:(t==null?void 0:t.front_image_url)||null,back_
36image_url:(t==null?void 0:t.back_image_url)||null}}const rp=E.createContext(),y0=({children:e})=>{const[t,n]=E.useState(!1),[r,s]=E.useState(null),[o,i]=E.useState(""),c=E.useCallback(()=>n(!0),[]),a=E.useCallback((l,d)=>{s(l),i(d||""),n(!0)},[]),u=E.useCallback(()=>{n(!1),s(null),i("")},[]);return p.jsx(rp.Provider,{value:{isContactOpen:t,openContact:c,openContactFor:a,closeContact:u,preselectedProduct:r,prefilledMessage:o},children:e})},sp=()=>E.useContext(rp);const S0=({expanded:e})=>p.jsx("svg",{className:`menu-chevron ${e?"menu-chevron--expanded":""}`,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:p.jsx("path",{d:"M6 4L10 8L6 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),v0=({isMenuOpen:e,setIsMenuOpen:t})=>{const[n,r]=E.useState(!1),[s,o]=E.useState([]),[i,c]=E.useState(!0),[a,u]=E.useState({}),l=Ii(),d=un(),{openContact:f}=sp(),h=d.pathname.startsWith("/dashboard"),m=S=>{u(O=>({...O,[S]:!O[S]}))},g=E.useRef(d.pathname);E.useEffect(()=>{const S=document.body,O=()=>{const M=window.scrollY;S.dataset.scrollY=M,S.style.top=`-${M}px`,S.classList.add("no-scroll"),g.current=d.pathname},R=()=>{const M=S.dataset.scrollY;S.classList.remove("no-scroll"),S.style.top="",delete S.dataset.scrollY,!(g.current!==window.location.pathname)&&M&&window.scrollTo(0,parseInt(M))};return e?O():R(),()=>R()},[e,d.pathname]),E.useEffect(()=>{if(!e)return;(async()=>{var M,P;c(!0);const{data:{session:O}}=await oe.auth.getSession(),R=!!O;if(r(R),R&&h){const y=[{name:"Dashboard",to:"/dashboard"},{name:"View My Ginseng",to:"/dashboard/my-ginseng"},{name:"Operational Overview",to:"/dashboard/kpi-overview"},{name:"Pretreatment",to:"/dashboard/pretreatment"},{name:"Ultrafiltration",to:"/dashboard/ultrafiltration"},{name:"Cameras",to:"/dashboard/cameras"}];try{const N=await _0();let j=[...y];((M=N.ro_chart_tags)==null?void 0:M.length)>0&&j.push({name:"Reverse Osmosis",to:"/dashboard/ro"}),((P=N.GAC_chart)==null?void 0:P.length)>0&&j.push({name:"GAC",to:"/dashboard/gac"}),N.building_page===!0&&j.push({name:"Building",to:"/dashboard/building"}),o(j)}catch(N){console.error("Failed to fetch dynamic menu config:",N),o(y)}}else o([{name:"Ginseng",isSection:!0,children:[{name:"Ginseng",to:"/products/ginseng"},{name:"Tech",to:"/tech"},{name:"Applications",to:"/applications"}]},{name:"Thinking Factory",isSection:!0,children:[{name:"Thinking Factory",to:"/thinking-factory"},{name:"Tech",to:"/thinking-factory/tech"},{name:"Applications",to:"/thinking-factory/applications"}]},{name:"Stories",isSection:!0,children:[{name:"Featured Stories",to:"/featured-stories"},{name:"Case Studies",to:"/case-studies"}]},{name:"Shop",isSection:!0,children:[{name:"Apparel",to:"/terra"}]},{isDivider:!0},{name:"Careers",to:"/careers"},{name:"About",to:"/about"},{name:"Contact Us",isAction:!0,action:()=>{t(!1),f()}}]),u({Ginseng:!0,"Thinking Factory":!0,Stories:!0,Services:!0,Shop:!0});c(!1)})()},[e,h]);const _=async()=>{t(!1),await oe.auth.signOut(),l("/login")},v=(S,O)=>{if(S.isDivider)return p.jsx("div",{className:"menu-divider"},`divider-${O}`);if(S.isSection){const R=a[S.name]??!0;return p.jsxs("div",{className:"menu-section",children:[p.jsxs("button",{className:"menu-section-header",onClick:()=>m(S.name),children:[p.jsx("span",{className:"menu-section-label",children:S.name}),p.jsx(S0,{expanded:R})]}),p.jsx("div",{className:`menu-section-children ${R?"menu-section-children--open":""}`,children:p.jsx("div",{className:"menu-section-children-inner",children:S.children.map(M=>p.jsx(Te,{to:M.to,onClick:()=>t(!1),className:"menu-child-link",children:M.name},M.name))})})]},S.name)}return S.isAction?p.jsx("button",{onClick:S.action,className:"menu-action-btn",children:S.name},S.name):S.isCta?p.jsx(Te,{to:S.to,onClick:()=>t(!1),className:"menu-cta-link",children:S.name},S.name):p.jsx(Te,{to:S.to,onClick:()=>t(!1),className:"menu-link",children:S.name},S.name)};return p.jsx(po.Root,{show:e,as:E.Fragment,children:p.jsxs(zr,{as:"div",className:"relative z-50",onClose:()=>t(!1),children:[p.jsx(po.Child,{as:E.Fragment,enter:"ease-in-out duration-500",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in-out duration-500",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:p.jsx(zr.Overlay,{className:"fixed inset-0 bg-black bg-opacity-70 transition-opacity"})}),p.jsx("div",{className:"fixed inset-0 overflow-hidden",children:p.jsx("div",{className:"absolute inset-0 overflow-hidden",children:p.jsx("div",{className:"fixed inset-y-0 right-0 flex max-w-full pl-10 pointer-events-none",children:p.jsx(po.Child,{as:E.Fragment,enter:"transform transition ease-in-out duration-500 sm:duration-700",enterFrom:"translate-x-full",enterTo:"translate-x-0",leave:"transform transition ease-in-out duration-500 sm:duration-700",leaveFrom:"translate-x-0",leaveTo:"translate-x-full",children:p.jsx(zr.Panel,{className:"w-screen max-w-md pointer-events-auto slide-over-menu",children:p.jsxs("div",{className:"flex flex-col h-full py-6 shadow-xl",children:[p.jsx("div",{className:"px-6 flex-shrink-0",children:p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx(zr.Title,{className:"menu-title",children:n&&h?"Dashboard":"Menu"}),p.jsx("button",{type:"button",className:"menu-close-btn",onClick:()=>t(!1),children:p.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:p.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})]})}),p.jsx("div",{className:"flex-1 overflow-y-auto px-6 mt-6",children:i?p.jsx("p",{className:"menu-loading",children:"Loading..."}):p.jsx("div",{className:"menu-items",children:s.map((S,O)=>v(S,O))})}),n&&p.jsxs("div",{className:"px-6 mt-4 flex-shrink-0",children:[p.jsx("div",{className:"menu-divider"}),p.jsx("button",{onClick:_,className:"menu-link menu-logout",children:"Log Out"})]})]})})})})})})]})})},ku="ABCDEFGHIJKLMNOPQRSTUVWXYZ/#_",b0=1200,E0=60,w0=()=>ku[Math.floor(Math.random()*ku.length)],T0=(e,t)=>{const n=e.split(""),r=n.filter(o=>o!==" ").length;let s=0;return n.map(o=>o===" "?" ":s++/r<t?o:w0()).join("")},I0=(e,t=b0,n=E0)=>{const[r,s]=E.useState(""),o=E.useRef(null),i=E.useCallback(()=>
36{if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){s(e);return}o.current&&cancelAnimationFrame(o.current);let a=null,u=null;const l=d=>{a||(a=d,u=d);const f=d-a,h=Math.min(f/t,1);(f>=t||d-u>=n)&&(s(T0(e,h)),u=d),f<t?o.current=requestAnimationFrame(l):s(e)};o.current=requestAnimationFrame(l)},[e,t,n]),c=E.useCallback(()=>{o.current&&cancelAnimationFrame(o.current),s("")},[]);return E.useEffect(()=>()=>{o.current&&cancelAnimationFrame(o.current)},[]),{display:r,trigger:i,reset:c}},yn=({text:e,active:t,className:n})=>{const{display:r,trigger:s}=I0(e,650,25);return E.useEffect(()=>{t&&(window.matchMedia("(prefers-reduced-motion: reduce)").matches||s())},[t,s]),p.jsx("span",{className:n,"aria-label":e,children:r||e})},Cu=e=>e?e.replace(/[_-]/g," ").replace(/\b\w/g,t=>t.toUpperCase()):"",x0=({warningsData:e,alarmsData:t})=>e.length===0&&t.length===0?p.jsxs("div",{className:"alarm-list-empty",children:[p.jsx("svg",{className:"alarm-list-check",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:p.jsx("polyline",{points:"20 6 9 17 4 12"})}),"All systems clear"]}):p.jsxs("div",{className:"alarm-list",children:[e.map((n,r)=>p.jsxs("div",{className:"alarm-list-item alarm-list-item--warn",children:[p.jsx("span",{className:"alarm-list-dot alarm-list-dot--warn"}),p.jsx("span",{children:Cu(n.friendly_name)})]},r)),t.map((n,r)=>p.jsxs("div",{className:"alarm-list-item alarm-list-item--alarm",children:[p.jsx("span",{className:"alarm-list-dot alarm-list-dot--alarm"}),p.jsx("span",{children:Cu(n.friendly_name)})]},r))]});const k0=()=>{const e=Ii(),[t,n]=E.useState(!1),[r]=E.useState(!0),s=async()=>{f(!1),l(!1),await oe.auth.signOut(),e("/login")},[o,i]=E.useState(null),[c,a]=E.useState(!1),[u,l]=E.useState(!1),[d,f]=E.useState(!1),[h,m]=E.useState(null),[g,_]=E.useState(null),[v,S]=E.useState({warnings:[],alarms:[]}),O=un(),[R,M]=E.useState(O.pathname==="/contact"),P=E.useRef(null),y=E.useRef(null),N=E.useRef(null),j=E.useRef(null),T=E.useRef(null),C=E.useRef(null),B=O.pathname.startsWith("/dashboard");E.useEffect(()=>{M(O.pathname==="/contact")},[O.pathname]),E.useEffect(()=>{i(null),a(!1),l(!1),f(!1)},[O.pathname]),E.useEffect(()=>{if(!B)return;const I=async()=>{try{const k=await g0(),A=((k==null?void 0:k.telemetry)||[]).filter(w=>w.value===1);S({warnings:A.filter(w=>w.category==="ChemicalWarnings"||w.category==="MaintenanceWarnings"),alarms:A.filter(w=>w.category==="ProcessAlarms"||w.category==="TankLevelAlarms")})}catch{}};I();const x=setInterval(I,6e4);return()=>clearInterval(x)},[B]),E.useEffect(()=>{if(!c)return;const I=x=>{var A,w;const k=(A=N.current)==null?void 0:A.contains(x.target),V=(w=j.current)==null?void 0:w.contains(x.target);!k&&!V&&a(!1)};return document.addEventListener("mousedown",I),()=>document.removeEventListener("mousedown",I)},[c]),E.useEffect(()=>{if(!c)return;const I=()=>{const x=N.current;if(!x)return;const k=x.getBoundingClientRect();_({top:k.bottom+10,right:window.innerWidth-k.right})};return I(),window.addEventListener("resize",I),()=>window.removeEventListener("resize",I)},[c]);const Z=E.useRef(null);E.useEffect(()=>{if(!d)return;const I=x=>{var w,D,U;const k=(w=T.current)==null?void 0:w.contains(x.target),V=(D=C.current)==null?void 0:D.contains(x.target),A=(U=Z.current)==null?void 0:U.contains(x.target);!k&&!V&&!A&&f(!1)};return document.addEventListener("mousedown",I),()=>document.removeEventListener("mousedown",I)},[d]),E.useEffect(()=>{if(!d)return;const I=()=>{const x=T.current,k=C.current,V=x!=null&&x.offsetParent?x:k;if(!V)return;const A=V.getBoundingClientRect();m({top:A.bottom+10,right:window.innerWidth-A.right})};return I(),window.addEventListener("resize",I),()=>window.removeEventListener("resize",I)},[d]),E.useEffect(()=>{const I=()=>{if(y.current&&P.current){const x=y.current.getBoundingClientRect(),k=P.current.getBoundingClientRect(),V=x.left-k.left;P.current.style.setProperty("--dropdown-left",`${V}px`)}};return I(),window.addEventListener("resize",I),()=>window.removeEventListener("resize",I)},[]);const F=(I,x)=>{const k=x.currentTarget.getBoundingClientRect(),V=P.current.getBoundingClientRect();P.current.style.setProperty("--dropdown-content-left",`${k.left-V.left}px`),i(I)},ie=()=>{i(null),n(!t)};return p.jsxs("header",{ref:P,className:tt("navbar",R?"navbar-blur":"navbar-no-blur",o&&"navbar-dropdown-open"),onMouseLeave:()=>i(null),children:[p.jsxs("nav",{className:"flex items-center justify-between px-4 mx-auto max-w-7xl lg:px-8 min-h-[2.2rem]",children:[B?p.jsxs("div",{className:"dash-nav-bar",children:[p.jsx("div",{className:"dash-nav-zone--left",children:p.jsx(Te,{to:"/dashboard",className:"nav-link-logo",style:{marginRight:0},children:p.jsx("span",{style:{letterSpacing:"0.35rem"},children:"4Earth"})})}),p.jsxs("div",{className:"dash-nav-zone--center",children:[p.jsx(pn,{end:!0,to:"/dashboard",className:({isActive:I})=>`dash-nav-link${I?" dash-nav-link--active":""}`,children:"Dashboard"}),p.jsx(pn,{to:"/dashboard/my-ginseng",className:({isActive:I})=>`dash-nav-link${I?" dash-nav-link--active":""}`,children:"My Ginseng"}),p.jsx(pn,{to:"/dashboard/cox-summary",className:({isActive:I})=>`dash-nav-link${I?" dash-nav-link--active":""}`,children:"Executive Summary"})]}),p.jsxs("div",{className:"dash-nav-zone--right",children:[(()=>{const I=v.warnings.length+v.alarms.length,x=v.alarms.length>0;return p.jsx("div",{ref:N,className:"dash-bell-container",children:p.jsxs("button",{type:"button",className:`dash-bell-btn${c?" bell-active":""}`,onClick:()=>a(k=>!k),"aria-label":"Notifications",children:[p.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[p.jsx("path",{d:"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"}),p.jsx("path",{d:"M13.73 21a2 2 0 0 1-3.46 0"})]}),I>0&&p.jsx("span",{className:`dash-bell-badge dash-bell-badge--${x?"red":"yellow"}`,children:I})]})})})(),p.jsx("div",{ref:T,className:"dash-signout-container",children:p.jsx("button",{type:"button",className:"dash-signout-btn",onClick:()=>f(I=>!I),children:"Sign Out"})}),p.jsx("button",{type:"button",className:"dash-hamburger",onClick:()=>l(I=>!I),"aria-label":"Menu","aria-expanded":u,children:p.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:p.jsx("path",{d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})})})]}),u&&p.jsxs("div",{className:"dash-mobile-menu",children:[p.jsx(pn,{end:!0,to:"/dashboard",onClick:()=>l(!1),className:({isActive:I})=>`dash-mobile-link${I?" dash-mobile-link--active":""}`,children:"Dashboard"}),p.jsx(pn,{to:"/dashboard/my-ginseng",onClick:()=>l(!1),className:({isActive:I})=>`dash-mobile-link${I?" dash-mobile-link--active":""}`,children:"My Ginseng"}),p.jsx(pn,{to:"/dashboard/cox-summary",onClick:()=>l(!1),className:({isActive:I})=>`dash-mobile-link${I?" dash-mobile-link--active":""}`,children:"Executive Summary"}),p.jsx("div",{ref:C,children:p.jsx("button",{type:"button",className:"dash-mobile-link dash-mobile-signout",onClick:()=>f(I=>!I),children:"Sign Out"})})]})]}):p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"flex items-center",children:p.jsx(Te,{to:"/",className:"-m-1.5 p-2 flex items-center nav
36-link-logo",children:p.jsx("span",{ref:y,className:tt("px-3",r?"text-white":"text-slate-900"),style:{letterSpacing:"0.35rem"},children:"4Earth"})})}),p.jsxs("div",{className:"items-center justify-center hidden space-x-16 lg:flex lg:flex-grow mx-16",children:[p.jsxs("div",{className:"nav-dropdown-container",children:[p.jsx("button",{className:tt("nav-link nav-dropdown-trigger",r?"text-white":"text-slate-900"),onMouseEnter:I=>F("ginseng",I),children:"ginseng"}),p.jsxs("div",{className:tt("nav-dropdown-menu dropdown-columns",o==="ginseng"&&"dropdown-open"),children:[p.jsxs("div",{className:"dropdown-column",children:[p.jsx(yn,{className:"dropdown-label",text:"ginseng",active:o==="ginseng"}),p.jsxs("div",{className:"dropdown-items",children:[p.jsx(Te,{to:"/products/ginseng",className:"dropdown-item",children:"Ginseng"})," "]})]}),p.jsxs("div",{className:"dropdown-column",children:[p.jsx(yn,{className:"dropdown-label",text:"About Ginseng",active:o==="ginseng"}),p.jsxs("div",{className:"dropdown-items",children:[p.jsx(Te,{to:"/tech",className:"dropdown-item",children:"Tech"}),p.jsx(Te,{to:"/applications",className:"dropdown-item",children:"Applications"})]})]})]})]}),p.jsxs("div",{className:"nav-dropdown-container",children:[p.jsx("button",{className:tt("nav-link nav-dropdown-trigger",r?"text-white":"text-slate-900"),onMouseEnter:I=>F("tf",I),style:{whiteSpace:"nowrap"},children:"Thinking Factory"}),p.jsxs("div",{className:tt("nav-dropdown-menu dropdown-columns",o==="tf"&&"dropdown-open"),children:[p.jsxs("div",{className:"dropdown-column",children:[p.jsx(yn,{className:"dropdown-label",text:"Thinking Factory",active:o==="tf"}),p.jsx("div",{className:"dropdown-items",children:p.jsx(Te,{to:"/thinking-factory",className:"dropdown-item",children:"Thinking Factory"})})]}),p.jsxs("div",{className:"dropdown-column",children:[p.jsx(yn,{className:"dropdown-label",text:"About Thinking Factory",active:o==="tf"}),p.jsxs("div",{className:"dropdown-items",children:[p.jsx(Te,{to:"/thinking-factory/tech",className:"dropdown-item",children:"Tech"}),p.jsx(Te,{to:"/thinking-factory/applications",className:"dropdown-item",children:"Applications"})]})]})]})]}),p.jsxs("div",{className:"nav-dropdown-container",children:[p.jsx("button",{className:tt("nav-link nav-dropdown-trigger",r?"text-white":"text-slate-900"),onMouseEnter:I=>F("stories",I),children:"Stories"}),p.jsxs("div",{className:tt("nav-dropdown-menu",o==="stories"&&"dropdown-open"),children:[p.jsx(yn,{className:"dropdown-label",text:"Stories",active:o==="stories"}),p.jsxs("div",{className:"dropdown-items",children:[p.jsx(Te,{to:"/featured-stories",className:"dropdown-item",children:"Featured Stories"}),p.jsx(Te,{to:"/case-studies",className:"dropdown-item",children:"Case Studies"})]})]})]}),p.jsxs("div",{className:"nav-dropdown-container",children:[p.jsx("button",{className:tt("nav-link nav-dropdown-trigger",r?"text-white":"text-slate-900"),onMouseEnter:I=>F("shop",I),children:"Shop"}),p.jsxs("div",{className:tt("nav-dropdown-menu",o==="shop"&&"dropdown-open"),children:[p.jsx(yn,{className:"dropdown-label",text:"Shop",active:o==="shop"}),p.jsx("div",{className:"dropdown-items",children:p.jsx(Te,{to:"/terra",className:"dropdown-item",children:"Apparel"})})]})]})]}),p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx(Te,{to:"/login",className:"nav-login-icon","aria-label":"Login",children:p.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:[p.jsx("circle",{cx:"12",cy:"7.5",r:"3.25"}),p.jsx("path",{d:"M8.8,13 L15.2,13 Q16,13 16.6,14.3 L20,21 L4,21 L7.4,14.3 Q8,13 8.8,13 Z"})]})}),p.jsx("button",{type:"button",className:"hamburger-button",onClick:ie,children:p.jsx("svg",{className:"hamburger-icon",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})})})]})]}),!B&&p.jsx(v0,{isMenuOpen:t,setIsMenuOpen:n})]}),o&&p.jsx("div",{className:"navbar-backdrop",onClick:()=>i(null)}),c&&g&&Fo.createPortal(p.jsxs("div",{ref:j,className:"dash-bell-dropdown cox-glass-card",style:{to
36p:g.top,right:g.right},children:[p.jsx("p",{className:"dash-bell-dropdown-title",children:"Active Alerts"}),p.jsx(x0,{warningsData:v.warnings,alarmsData:v.alarms})]}),document.body),d&&h&&Fo.createPortal(p.jsxs("div",{ref:Z,className:"dash-signout-confirm cox-glass-card",style:{top:h.top,right:h.right},children:[p.jsx("p",{className:"dash-signout-confirm-text",children:"Are you sure you want to sign out?"}),p.jsxs("div",{className:"dash-signout-confirm-actions",children:[p.jsx("button",{type:"button",className:"dash-signout-confirm-cancel",onClick:()=>f(!1),children:"Cancel"}),p.jsx("button",{type:"button",className:"dash-signout-confirm-confirm",onClick:s,children:"Sign Out"})]})]}),document.body)]})};var op={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Ru=Ie.createContext&&Ie.createContext(op),C0=["attr","size","title"];function R0(e,t){if(e==null)return{};var n=A0(e,t),r,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)r=o[s],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function A0(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Ps(){return Ps=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ps.apply(this,arguments)}function Au(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Ls(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Au(Object(n),!0).forEach(function(r){N0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Au(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function N0(e,t,n){return t=O0(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O0(e){var t=M0(e,"string");return typeof t=="symbol"?t:t+""}function M0(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ip(e){return e&&e.map((t,n)=>Ie.createElement(t.tag,Ls({key:n},t.attr),ip(t.child)))}function _a(e){return t=>Ie.createElement(P0,Ps({attr:Ls({},e.attr)},t),ip(e.child))}function P0(e){var t=n=>{var{attr:r,size:s,title:o}=e,i=R0(e,C0),c=s||n.size||"1em",a;return n.className&&(a=n.className),e.className&&(a=(a?a+" ":"")+e.className),Ie.createElement("svg",Ps({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,i,{className:a,style:Ls(Ls({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),o&&Ie.createElement("title",null,o),e.children)};return Ru!==void 0?Ie.createElement(Ru.Consumer,null,n=>t(n)):t(op)}function L0(e){return _a({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"},child:[]}]})(e)}function D0(e){return _a({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M100.28 448H7.4V148.9h92.88zM53.79 108.1C24.09 108.1 0 83.5 0 53.8a53.79 53.79 0 0 1 107.58 0c0 29.7-24.1 54.3-53.79 54.3zM447.9 448h-92.68V302.4c0-34.7-.7-79.2-48.29-79.2-48.29 0-55.69 37.7-55.69 76.7V448h-92.78V148.9h89.08v40.8h1.3c12.4-23.5 42.69-48.3 87.88-48.3 94 0 111.28 61.9 111.28 142.3V448z"},child:[]}]})(e)}function j0(e){return _a({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z"},child:[]}]})(e)}const F0=()=>p.jsxs("footer",{className:"footer-container",children:[p.jsxs("div",{className:"footer-content",children:[p.jsx("div",{className:"footer-column mission",children:p.jsx("p",{children:'"We are advocates for Earth, actively working in its favor. Our mission is to develop world-class technology and products that create a more sustainable future for living beings and industries on our planet. To achieve this, we must pursue innovation, question established norms, and break through barriers across all sustainability sectors."'})}),p.jsxs("div",{className:"footer-column links",children:[p.jsxs("div",{className:"link-group",children:[p.jsx("h4",{children:"General Inquiries"}),p.jsx("a",{href:"mailto:[email protected]",children:"[email protected]"})]}),p.jsxs("div",{className:"link-group",children:[p.jsx("h4",{children:"Careers"}),p.jsx("a",{href:"mailto:[email protected]",children:"[email protected]"})]})]}),p.jsxs("div",{className:"footer-column address",children:[p.jsxs("h4",{children:["Company Headquarters &",p.jsx("br",{}),"Manufacturing Facility"]}),p.jsxs("p",{children:["3025 Chastain Meadows Pkwy NW",p.jsx("br",{}),"Suite 800, Marietta, GA 30066"]})]})]}),p.jsxs("div",{className:"footer-bottom-bar",children:[p.jsx("div",{className:"copyright-text",children:p.jsxs("p",{children:["©️ ",new Date().getFullYear()," 4Earth, Inc. All rights reserved."]})}),p.jsxs("div",{className:"social-icons",children:[p.jsx("a",{href:"https://www.linkedin.com/company/4earth-inc/",target:"_blank",rel:"noopener noreferrer","aria-label":"LinkedIn",children:p.jsx(D0,{})}),p.jsx("a",{href:"https://www.instagram.com/4earthinc/",target:"_blank",rel:"noopener noreferrer","aria-label":"Instagram",children:p.jsx(L0,{})}),p.jsx("a",{href:"https://twitter.com/4earthinc?lang=en",target:"_blank",rel:"noopener noreferrer","aria-label":"X (formerly Twitter)",children:p.jsx(j0,{})})]})]})]}),$0=()=>{const{pathname:e}=un(),t=E.useRef(e);E.useEffect(()=>{t.current!==e&&(window.scrollTo(0,0),t.current=e)},[e])};var B0="@vercel/analytics",U0="1.5.0",H0=()=>{window.va||(window.va=function(...t){(window.vaq=window.vaq||[]).push(t)})};function ap(){return typeof window<"u"}function cp(){try{const e="production"}catch{}return"production"}function W0(e="auto"){if(e==="auto"){window.vam=cp();return}window.vam=e}function z0(){return(ap()?window.vam:cp())||"production"}function Ti(){return z0()==="development"}function q0(e){return e.scriptSrc?e.scriptSrc:Ti()?"https://va.vercel-scripts.com/v1/script.debug.js":e.basePath?`${e.basePath}
36/insights/script.js`:"/_vercel/insights/script.js"}function G0(e={debug:!0}){var t;if(!ap())return;W0(e.mode),H0(),e.beforeSend&&((t=window.va)==null||t.call(window,"beforeSend",e.beforeSend));const n=q0(e);if(document.head.querySelector(`script[src*="${n}"]`))return;const r=document.createElement("script");r.src=n,r.defer=!0,r.dataset.sdkn=B0+(e.framework?`/${e.framework}`:""),r.dataset.sdkv=U0,e.disableAutoTrack&&(r.dataset.disableAutoTrack="1"),e.endpoint?r.dataset.endpoint=e.endpoint:e.basePath&&(r.dataset.endpoint=`${e.basePath}/insights`),e.dsn&&(r.dataset.dsn=e.dsn),r.onerror=()=>{const s=Ti()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log(`[Vercel Web Analytics] Failed to load script from ${n}. ${s}`)},Ti()&&e.debug===!1&&(r.dataset.debug="false"),document.head.appendChild(r)}function V0({route:e,path:t}){var n;(n=window.va)==null||n.call(window,"pageview",{route:e,path:t})}function Y0(){if(!(typeof process>"u"||typeof process.env>"u"))return{}.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}function K0(e){return E.useEffect(()=>{var t;e.beforeSend&&((t=window.va)==null||t.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]),E.useEffect(()=>{G0({framework:e.framework||"react",basePath:e.basePath??Y0(),...e.route!==void 0&&{disableAutoTrack:!0},...e})},[]),E.useEffect(()=>{e.route&&e.path&&V0({route:e.route,path:e.path})},[e.route,e.path]),null}function ao(e,t={}){typeof window.gtag=="function"&&window.gtag("event",e,t)}function J0(){const e=un(),t=E.useRef(!0);E.useEffect(()=>{if(t.current){t.current=!1;return}ao("page_view",{page_path:e.pathname+e.search,page_title:document.title})},[e])}function X0(){const e=un();E.useEffect(()=>{const t=[25,50,75,100],n=new Set,r=()=>{const s=window.scrollY,o=document.documentElement.scrollHeight-window.innerHeight;if(o<=0)return;const i=Math.round(s/o*100);for(const c of t)i>=c&&!n.has(c)&&(n.add(c),ao("scroll_depth",{depth_threshold:c,page_path:e.pathname}))};return window.addEventListener("scroll",r,{passive:!0}),()=>window.removeEventListener("scroll",r)},[e.pathname])}function Q0(){E.useEffect(()=>{const e=t=>{const n=t.target.closest("a[href]");if(!n)return;const r=n.getAttribute("href");if(r)try{new URL(r,window.location.origin).origin!==window.location.origin&&ao("click",{event_category:"outbound",event_label:r,link_url:r})}catch{}};return document.addEventListener("click",e),()=>document.removeEventListener("click",e)},[])}function Z0(e,t={}){ao(e,t)}var ex=E.forwardRef(({as:e="div",...t},n)=>p.jsx(e,{...t,ref:n}));const tx="https://challenges.cloudflare.com/turnstile/v0/api.js",nx="cf-turnstile-script",up="onloadTurnstileCallback",lp=e=>!!document.getElementById(e),rx=({render:e="explicit",onLoadCallbackName:t=up,scriptOptions:{nonce:n="",defer:r=!0,async:s=!0,id:o="",appendTo:i,onError:c,crossOrigin:a=""}={}})=>{let u=o||"cf-turnstile-script";if(lp(u))return;let l=document.createElement("script");l.id=u,l.src=`${tx}?onload=${t}&render=${e}`,!document.querySelector(`script[src="${l.src}"]`)&&(l.defer=!!r,l.async=!!s,n&&(l.nonce=n),a&&(l.crossOrigin=a),c&&(l.onerror=c,delete window[t]),(i==="body"?document.body:document.getElementsByTagName("head")[0]).appendChild(l))},Ut={normal:{width:300,height:65},compact:{width:150,height:140},invisible:{width:0,height:0,overflow:"hidden"},flexible:{minWidth:300,width:"100%",height:65},interactionOnly:{width:"fit-content",height:"auto",display:"flex"}};function sx(e){if(e!=="invisible"&&e!=="interactionOnly")return e}function ox(e=nx){let[t,n]=E.useState(!1);return E.useEffect(()=>{let r=()=>{lp(e)&&n(!0)},s=new MutationObserver(r);return s.observe(document,{childList:!0,subtree:!0}),r(),()=>{s.disconnect()}},[e]),t}let lr="unloaded",dp;const ix=new Promise((e,t)=>{dp={resolve:e,reject:t},lr==="ready"&&e(void 0)}),Nu=(e=up)=>(lr==="unloaded"&&(lr="loading",window[e]=()=>{dp.resolve(),lr="ready",delete window[e]}),ix),fp=E.forwardRef((e,t)=>{let{scriptOptions:n,options:r={},siteKey:s,onWidgetLoad:o,onSuccess:i,onExpire:c,onError:a,onBeforeInteractive:u,onAfterInteractive:l,onUnsupported:d,onTimeout:f,onLoadScript:h,id:m,style:g,as:_="div",injectScript:v=!0,rerenderOnCallbackChange:S=!1,...O}=e,R=r.size,M=E.useCallback(()=>R===void 0?{}:r.execution==="execute"?Ut.invisible:r.appearance==="interaction-only"?Ut.interactionOnly:Ut[R],[r.execution,R,r.appearance]),[P,y]=E.useState(M()),N=E.useRef(null),[j,T]=E.useState(!1),C=E.useRef(void 0),B=E.useRef(!1),Z=m||"cf-turnstile",F=E.useRef({onSuccess:i,onError:a,onExpire:c,onBeforeInteractive:u,onAfterInteractive:l,onUnsupported:d,onTimeout:f});E.useEffect(()=>{S||(F.current={onSuccess:i,onError:a,onExpire:c,onBeforeInteractive:u,onAfterInteractive:l,onUnsupported:d,onTimeout:f})});let ie=(n==null?void 0:n.id)||"cf-turnstile-script",I=ox(ie),x=(n==null?void 0:n.onLoadCallbackName)||"onloadTurnstileCallback",k=r.appearance||"always",V=E.useMemo(()=>({sitekey:s,action:r.action,cData:r.cData,theme:r.theme||"auto",language:r.language||"auto",tabindex:r.tabIndex,"response-field":r.responseField,"response-field-name":r.responseFieldName,size:sx(R),retry:r.retry||"auto","retry-interval":r.retryInterval||8e3,"refresh-expired":r.refreshExpired||"auto","refresh-timeout":r.refreshTimeout||"auto",execution:r.execution||"render",appearance:r.appearance||"always","feedback-enabled":r.feedbackEnabled??!0,callback:w=>{var D,U;B.current=!0,S?i==null||i(w):(U=(D=F.current).onSuccess)==null||U.call(D,w)},"error-callback":S?a:(...w)=>{var D,U;return(U=(D=F.current).onError)==null?void 0:U.call(D,...w)},"expired-callback":S?c:(...w)=>{var D,U;return(U=(D=F.current).onExpire)==null?void 0:U.call(D,...w)},"before-interactive-callback":S?u:(...w)=>{var D,U;return(U=(D=F.current).onBeforeInteractive)==null?void 0:U.call(D,...w)},"after-interactive-callback":S?l:(...w)=>{var D,U;return(U=(D=F.current).onAfterInteractive)==null?void 0:U.call(D,...w)},"unsupported-callback":S?d:(...w)=>{var D,U;return(U=(D=F.current).onUnsupported)==null?void 0:U.call(D,...w)},"timeout-callback":S?f:(...w)=>{var D,U;return(U=(D=F.current).onTimeout)==null?void 0:U.call(D,...w)}}
36),[r.action,r.appearance,r.cData,r.execution,r.language,r.refreshExpired,r.responseField,r.responseFieldName,r.retry,r.retryInterval,r.tabIndex,r.theme,r.feedbackEnabled,r.refreshTimeout,s,R,S,S?i:null,S?a:null,S?c:null,S?u:null,S?l:null,S?d:null,S?f:null]),A=E.useCallback(()=>typeof window<"u"&&!!window.turnstile,[]);return E.useEffect(function(){v&&!j&&(Nu(x),rx({onLoadCallbackName:x,scriptOptions:{...n,id:ie}}))},[v,j,n,ie,x]),E.useEffect(function(){lr!=="ready"&&Nu(x).then(()=>T(!0)).catch(console.error)},[x]),E.useEffect(function(){if(!N.current||!j)return;let w=!1;return(async()=>w||!N.current||(C.current=window.turnstile.render(N.current,V),C.current&&(o==null||o(C.current))))(),()=>{w=!0,C.current&&(window.turnstile.remove(C.current),B.current=!1)}},[Z,j,V]),E.useImperativeHandle(t,()=>{let{turnstile:w}=window;return{getResponse(){if(!(w!=null&&w.getResponse)||!C.current||!A()){console.warn("Turnstile has not been loaded");return}return w.getResponse(C.current)},async getResponsePromise(D=3e4,U=100){return new Promise((me,xe)=>{let be,et=async()=>{if(B.current&&window.turnstile&&C.current)try{let we=window.turnstile.getResponse(C.current);return be&&clearTimeout(be),we?me(we):xe(Error("No response received"))}catch(we){return be&&clearTimeout(be),console.warn("Failed to get response",we),xe(Error("Failed to get response"))}be||(be=setTimeout(()=>{be&&clearTimeout(be),xe(Error("Timeout"))},D)),await new Promise(we=>setTimeout(we,U)),await et()};et()})},reset(){if(!(w!=null&&w.reset)||!C.current||!A()){console.warn("Turnstile has not been loaded");return}r.execution==="execute"&&y(Ut.invisible);try{B.current=!1,w.reset(C.current)}catch(D){console.warn(`Failed to reset Turnstile widget ${C.current}`,D)}},remove(){if(!(w!=null&&w.remove)||!C.current||!A()){console.warn("Turnstile has not been loaded");return}y(Ut.invisible),B.current=!1,w.remove(C.current),C.current=null},render(){if(!(w!=null&&w.render)||!N.current||!A()||C.current){console.warn("Turnstile has not been loaded or container not found");return}let D=w.render(N.current,V);return C.current=D,C.current&&(o==null||o(C.current)),r.execution!=="execute"&&y(R?Ut[R]:{}),D},execute(){if(r.execution!=="execute"){console.warn('Execution mode is not set to "execute"');return}if(!(w!=null&&w.execute)||!N.current||!C.current||!A()){console.warn("Turnstile has not been loaded or container not found");return}w.execute(N.current,V),y(R?Ut[R]:{})},isExpired(){return!(w!=null&&w.isExpired)||!C.current||!A()?(console.warn("Turnstile has not been loaded"),!1):w.isExpired(C.current)}}},[C,r.execution,R,V,N,A,j,o]),E.useEffect(()=>{if(j||!I)return;if(window.turnstile){T(!0);return}let w=setInterval(()=>{window.turnstile&&(T(!0),clearInterval(w))},50);return()=>{clearInterval(w)}},[j,I]),E.useEffect(()=>{y(M())},[r.execution,R,k]),E.useEffect(()=>{!I||typeof h!="function"||h()},[I]),p.jsx(ex,{ref:N,as:_,id:Z,style:{...P,...g},...O})});fp.displayName="Turnstile";const ax="0x4AAAAAAC1dPMxANnKTWuNZ",cx=({onVerify:e,onExpire:t,theme:n="auto"})=>p.jsx("div",{style:{display:"flex",justifyContent:"center",margin:"12px 0"},children:p.jsx(fp,{siteKey:ax,onSuccess:r=>e==null?void 0:e(r),onExpire:()=>{t==null||t(),e==null||e(null)},onError:()=>e==null?void 0:e(null),options:{theme:n,size:"normal"}})});const Ou={name:"",email:"",company:"",message:""},ux=()=>{const{isContactOpen:e,closeContact:t,preselectedProduct:n,prefilledMessage:r}=sp(),s=Ii(),[o,i]=E.useState(0),[c,a]=E.useState(null),[u,l]=E.useState(Ou),[d,f]=E.useState(!1),[h,m]=E.useState({}),[g,_]=E.useState(""),[v,S]=E.useState(!1),[O,R]=E.useState(null);E.useEffect(()=>(e?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll"),()=>document.body.classList.remove("no-scroll")),[e]),E.useEffect(()=>{e&&n&&(a(n),r&&l(j=>({...j,message:r})),i(1))},[e,n,r]),E.useEffect(()=>{e||(i(0),a(null),l(Ou),m({}),_(""),S(!1),R(null))},[e]);const M=j=>{const{name:T,value:C}=j.target;l(B=>({...B,[T]:C})),h[T]&&m(B=>({...B,[T]:""}))},P=j=>{if(j==="ginseng"){t(),s("/configure/ginseng");return}if(j==="thinking-factory"){t(),s("/thinking-factory/configurator");return}a(j),i(1)},y=()=>{m({}),_(""),a(null),i(0)},N=async()=>{const j={};
36if(u.name.trim()||(j.name="This field is required."),u.email.trim()||(j.email="This field is required."),m(j),!(Object.keys(j).length>0)){if(!O){_("Please complete the verification challenge before submitting.");return}f(!0),_("");try{const{error:T}=await oe.from("product_inquiries").insert([{product:c,name:u.name,email:u.email,company:u.company||null,message:u.message||null}]);if(T)throw T;Z0("contact_submission",{product:c}),S(!0)}catch(T){_("Submission failed. Please try again. Error: "+T.message),console.error(T)}finally{f(!1)}}};return e?p.jsx("div",{className:"contact-modal-overlay",onClick:t,children:p.jsxs("div",{className:"contact-modal-panel",onClick:j=>j.stopPropagation(),children:[p.jsx("button",{className:"contact-modal-close",onClick:t,children:"×"}),p.jsx("div",{className:"contact-modal-body",children:o===0?p.jsxs(p.Fragment,{children:[p.jsx("h2",{className:"contact-modal-title",children:"Choose a Product"}),p.jsx("p",{className:"contact-modal-subtitle",children:"Which product are you interested in?"}),p.jsxs("div",{className:"contact-product-grid",children:[p.jsxs("button",{className:"contact-product-card",onClick:()=>P("thinking-factory"),children:[p.jsxs("span",{className:"contact-tf-wordmark",children:[p.jsx("span",{className:"contact-tf-thinking",children:"Thinking"})," ",p.jsx("span",{className:"contact-tf-factory",children:"Factory"})]}),p.jsx("span",{className:"contact-product-desc",children:"Industrial Intelligence"})]}),p.jsxs("button",{className:"contact-product-card",onClick:()=>P("ginseng"),children:[p.jsx("span",{className:"contact-ginseng-wordmark",children:"ginseng"}),p.jsx("span",{className:"contact-product-desc",children:"Smart Water Reuse Technology"})]})]})]}):v?p.jsxs("div",{className:"form-step thank-you-step",children:[p.jsx("h2",{className:"thank-you-header",children:"Thank you for reaching out."}),p.jsx("p",{className:"thank-you-text",children:"We will review your inquiry and get back to you shortly."}),p.jsx("img",{src:"https://catjjzvmfnpqoqkvndfg.supabase.co/storage/v1/object/public/menu-images/logo/4earth-flat-white-transparent.png",alt:"4Earth Logo",className:"contact-form-logo thank-you-logo"})]}):p.jsxs(p.Fragment,{children:[p.jsx("h2",{className:"contact-modal-title",children:"Get in Touch"}),p.jsx("p",{className:"contact-modal-subtitle",children:c==="thinking-factory"?"Tell us about your facility.":c==="forge"?"Tell us about your manufacturing needs.":"Tell us about your water treatment needs."}),p.jsxs("div",{className:"form-step",children:[p.jsx("input",{type:"text",name:"name",placeholder:"Name *",className:`form-input${h.name?" input-error":""}`,value:u.name,onChange:M}),h.name&&p.jsx("p",{className:"form-error-text",children:h.name}),p.jsx("input",{type:"email",name:"email",placeholder:"Email *",className:`form-input${h.email?" input-error":""}`,value:u.email,onChange:M}),h.email&&p.jsx("p",{className:"form-error-text",children:h.email}),p.jsx("input",{type:"text",name:"company",placeholder:"Company",className:"form-input",value:u.company,onChange:M}),p.jsx("textarea",{name:"message",placeholder:"Message",className:"form-input form-textarea",rows:4,value:u.message,onChange:M})]}),p.jsxs("p",{className:"form-privacy-notice",children:["By submitting, you agree to our"," ",p.jsx("a",{href:"/privacy-policy",target:"_blank",rel:"noreferrer",children:"Privacy Policy"}),"."]}),p.jsx(cx,{onVerify:R}),p.jsxs("div",{className:"form-navigation",children:[p.jsx("button",{onClick:y,className:"form-nav-button",children:"Previous"}),p.jsx("button",{onClick:N,className:"form-nav-button",disabled:d||!O,children:d?"Submitting...":"Submit"})]}),g&&p.jsx("p",{className:"form-error",children:g})]})})]})}):null},Bn="https://www.4earth.tech",pp=`${Bn}/#organization`,lx=`${Bn}/#website`,dx={"@id":pp},fx={"@context":"https://schema.org","@type":"Organization","@id":pp,name:"4Earth Inc.",url:Bn,logo:`${Bn}/favicon.png`,description:"4Earth builds modular water treatment systems for industrial reuse and AI-powered operational intelligence for factories and commercial buildings.",foundingDate:"2020",founder:{"@type":"Person",name:"Jahanzeb Khan"},address:{"@type":"PostalAddress",streetAddress:"3025 Chastain Meadows Pkwy NW, Suite 800",addressLocality:"Marietta",addressRegion:"GA",postalCode:"30066",addressCountry:"US"},sameAs:["https://www.linkedin.com/company/4earth-inc","https://www.crunchbase.com/organization/4earth-inc","https://techcrunch.com/tag/4earth"]},px={"@context":"https://schema.org","@type":"WebSite","@id":lx,name:"4Earth",alternateName:["4Earth Inc","4Earth Tech"],url:Bn,publisher:dx},hx=[fx,px];function Ek(e){return{"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:e.map((t,n)=>({"@type":"ListItem",position:n+1,name:t.name,...t.path?{item:`${Bn}${t.path}`}:{}}))}}function wk(e,...t){return[...e==null?[]:Array.isArray(e)?e:[e],...t.filter(Boolean)]}const mx=()=>p.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",backgroundColor:"black",color:"white",fontFamily:"Jost, sans-serif"},children:p.jsx("h2",{children:"Loading..."})});function gx(){$0(),J0(),X0(),Q0();const e=un(),n=!["/login","/dashboard","/kpi-overview","/signup","/privacy-policy","/thinking-factory/showcase","/cox-performance"].some(o=>e.pathname.startsWith(o)),s=!["/privacy-policy","/thinking-factory/showcase","/cox-performance"].includes(e.pathname);return p.jsxs(y0,{children:[p.jsx(Qf,{jsonLd:hx}),s&&p.jsx(k0,{}),p.jsx("main",{className:"site-main",children:p.jsx(E.Suspense,{fallback:p.jsx(mx,{}),children:p.jsx(yp,{})})}),n&&p.jsx(F0,{}),p.jsx(ux,{}),p.jsx(K0,{})]})}const _x=({children:e})=>{const[t,n]=E.useState(null),[r,s]=E.useState(!0),o=E.useRef(!1),i=E.useRef(!0);return E.useEffect(()=>{i.current=!0;const{data:{subscription:c}}=oe.auth.onAuthStateChange((a,u)=>{i.current&&o.current&&n(u)});return(async()=>{try{const{data:{session:a}}=await oe.auth.getSession();if(!i.current)return;n(a)}catch(a){console.error("ProtectedRoute: getSession failed",a),i.current&&n(null)}finally{i.current&&(o.current=!0,s(!1))}})(),()=>{i.current=!1,c==null||c.unsubscribe()}},[]),r?p.jsx("div",{children:"Loading..."}):t?p.jsx("div",{"data-sentry-private":!0,style:{display:"contents"},children:e}):p.jsx(Sp,{to:"/login",replace:!0})};function Q(e){return E.lazy(()=>e().catch(()=>(window.location.reload(),new Promise(()=>{}))))}const yx=Q(()=>X(()=>import("./Home-383113b7.js"),["assets/Home-383113b7.js","assets/supabase-a2555f13.js","assets/react-vendor-91c466da.js","assets/LazyLoadSection-9a110530.js","assets/headlessui-dab4f4bd.js","assets/Home-8c6fbc6e.css"])),Sx=Q(()=>X(()=>import("./Login-7ac22cd9.js"),["assets/Login-7ac22cd9.js","assets/react-vendor-91c466da.js","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js","assets/Login-47d13eda.css"])),vx=Q(()=>X(()=>import("./SignUp-996675db.js"),["assets/SignUp-996675db.js","assets/react-vendor-91c466da.js","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js"])),bx=Q(()=>X(()=>import("./DashboardLayout-fe49f4ac.js"),["assets/DashboardLayout-fe49f4ac.js","assets/react-vendor-91c466da.js","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js"])),Ex=Q(()=>X(()=>import("./DashboardGateway-0a1644c4.js"),["assets/DashboardGateway-0a1644c4.js","assets/supabase-a2555f13.js","assets/react-vendor-91c466da.js","assets/useTenantConfig-44c0d9c2.js","assets/LoadingSpinner-ecd04e42.js","assets/headlessui-dab4f4bd.js"])),wx=Q(()=>X(()=>import("./PretreatmentDashboard-3696805d.js"),["assets/PretreatmentDashboard-3696805d.js","assets/react-vendor-91c466da.js","assets/useTenantConfig-44c0d9c2.js","assets/LazyLoadSection-9a110530.js","assets/PoweredByTF-f8629a62.js","assets/PoweredByTF-d83a9532.css","assets/chartSetup-26787014.js","assets/chartjs-708aa598.js","assets/LoadingSpinner-ecd04e42.js","assets/ErrorMessage-71f1908e.js","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js","assets/CategoryDashboard-758243bd.
36css"])),Tx=Q(()=>X(()=>import("./UltrafiltrationDashboard-389835d1.js"),["assets/UltrafiltrationDashboard-389835d1.js","assets/react-vendor-91c466da.js","assets/useTenantConfig-44c0d9c2.js","assets/LazyLoadSection-9a110530.js","assets/PoweredByTF-f8629a62.js","assets/PoweredByTF-d83a9532.css","assets/chartSetup-26787014.js","assets/chartjs-708aa598.js","assets/LoadingSpinner-ecd04e42.js","assets/ErrorMessage-71f1908e.js","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js","assets/CategoryDashboard-758243bd.css"])),Ix=Q(()=>X(()=>import("./RODashboard-a6b62c6b.js"),["assets/RODashboard-a6b62c6b.js","assets/react-vendor-91c466da.js","assets/LazyLoadSection-9a110530.js","assets/PoweredByTF-f8629a62.js","assets/PoweredByTF-d83a9532.css","assets/chartSetup-26787014.js","assets/chartjs-708aa598.js","assets/LoadingSpinner-ecd04e42.js","assets/ErrorMessage-71f1908e.js","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js","assets/CategoryDashboard-758243bd.css"])),xx=Q(()=>X(()=>import("./KpiOverview-9319bf3a.js"),["assets/KpiOverview-9319bf3a.js","assets/react-vendor-91c466da.js","assets/LazyLoadSection-9a110530.js","assets/LoadingSpinner-ecd04e42.js","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js","assets/KpiOverview-2b9384d2.css"])),kx=Q(()=>X(()=>import("./GACDashboard-6aa3ea35.js"),["assets/GACDashboard-6aa3ea35.js","assets/react-vendor-91c466da.js","assets/LazyLoadSection-9a110530.js","assets/PoweredByTF-f8629a62.js","assets/PoweredByTF-d83a9532.css","assets/chartSetup-26787014.js","assets/chartjs-708aa598.js","assets/LoadingSpinner-ecd04e42.js","assets/ErrorMessage-71f1908e.js","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js","assets/CategoryDashboard-758243bd.css"])),Cx=Q(()=>X(()=>import("./BuildingDashboard-f25dbac0.js"),["assets/BuildingDashboard-f25dbac0.js","assets/react-vendor-91c466da.js","assets/LazyLoadSection-9a110530.js","assets/chartSetup-26787014.js","assets/chartjs-708aa598.js","assets/LoadingSpinner-ecd04e42.js","assets/ErrorMessage-71f1908e.js","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js","assets/CategoryDashboard-758243bd.css"])),Rx=Q(()=>X(()=>import("./PrivacyPolicy-48006267.js"),["assets/PrivacyPolicy-48006267.js","assets/react-vendor-91c466da.js","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js"])),Ax=Q(()=>X(()=>import("./Tech-d908828f.js"),["assets/Tech-d908828f.js","assets/react-vendor-91c466da.js","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js","assets/Tech-0c7bc4b0.css"])),Nx=Q(()=>X(()=>import("./About-ed95cbd2.js"),["assets/About-ed95cbd2.js","assets/react-vendor-91c466da.js","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js","assets/About-b88868f3.css"])),Ox=Q(()=>X(()=>import("./ApplicationsPage-de3a568c.js"),["assets/ApplicationsPage-de3a568c.js","assets/react-vendor-91c466da.js","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js","assets/ApplicationsPage-12a004d8.css"])),Mx=Q(()=>X(()=>import("./ReferralPage-5878ffff.js"),["assets/ReferralPage-5878ffff.js","assets/react-vendor-91c466da.js","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js","assets/ReferralPage-49e05b88.css"])),Px=Q(()=>X(()=>import("./AnalysisPage-b3c235e8.js"),["assets/AnalysisPage-b3c235e8.js","assets/react-vendor-91c466da.js","assets/useTenantConfig-44c0d9c2.js","assets/highcharts-50262f8d.js","assets/chartSetup-26787014.js","assets/chartjs-708aa598.js","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js","assets/AnalysisPage-917b85f6.css"])),Lx=Q(()=>X(()=>import("./CamerasPage-2be31d3e.js"),["assets/CamerasPage-2be31d3e.js","assets/react-vendor-91c466da.js","assets/useTenantConfig-44c0d9c2.js","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js","assets/CamerasPage-78853580.css"])),Dx=Q(()=>X(()=>import("./ViewMyGinseng-4ea2a3d3.js"),["assets/ViewMyGinseng-4ea2a3d3.js","assets/react-vendor-91c466da.js","assets/useTenantConfig-44c0d9c2.js","assets/ScrambleTag-2b266b09.js","assets/LoadingSpinner-ecd04e42.js","assets/ErrorMessage-71f1908e.js","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js","assets/ViewMyGinseng-7f272670.css","assets/CategoryDashboard-758243bd.
36css"])),jx=Q(()=>X(()=>import("./FeaturedStories-baa0f62b.js"),["assets/FeaturedStories-baa0f62b.js","assets/react-vendor-91c466da.js","assets/ScrambleButton-4f752742.js","assets/ScrambleButton-5ed6130e.css","assets/useGridTrailingSlot-e20c6a1c.js","assets/FeaturedStories-33cecbd7.js","assets/FeaturedStories-8ffe6192.css","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js"])),Fx=Q(()=>X(()=>import("./FeaturedStoryDetail-eed4460a.js"),["assets/FeaturedStoryDetail-eed4460a.js","assets/react-vendor-91c466da.js","assets/ScrambleButton-4f752742.js","assets/ScrambleButton-5ed6130e.css","assets/YouTubeFacade-24b5ba57.js","assets/YouTubeFacade-37756395.css","assets/FeaturedStories-33cecbd7.js","assets/FeaturedStories-8ffe6192.css","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js"])),$x=Q(()=>X(()=>import("./ProductDetail-c8f9d323.js"),["assets/ProductDetail-c8f9d323.js","assets/react-vendor-91c466da.js","assets/ScrambleButton-4f752742.js","assets/ScrambleButton-5ed6130e.css","assets/YouTubeFacade-24b5ba57.js","assets/YouTubeFacade-37756395.css","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js","assets/ProductDetail-40c1b12d.css","assets/ProductDetail-72fd7d0f.css"])),Bx=Q(()=>X(()=>import("./CaseStudies-45c98e64.js"),["assets/CaseStudies-45c98e64.js","assets/react-vendor-91c466da.js","assets/ScrambleButton-4f752742.js","assets/ScrambleButton-5ed6130e.css","assets/useGridTrailingSlot-e20c6a1c.js","assets/CaseStudies-de7a9e5a.js","assets/CaseStudies-28bf949c.css","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js"])),Ux=Q(()=>X(()=>import("./CaseStudyDetail-982dd712.js"),["assets/CaseStudyDetail-982dd712.js","assets/react-vendor-91c466da.js","assets/ScrambleButton-4f752742.js","assets/ScrambleButton-5ed6130e.css","assets/CaseStudies-de7a9e5a.js","assets/CaseStudies-28bf949c.css","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js"])),Hx=Q(()=>X(()=>import("./CoxSummary-9db18978.js"),["assets/CoxSummary-9db18978.js","assets/chartSetup-26787014.js","assets/chartjs-708aa598.js","assets/react-vendor-91c466da.js","assets/highcharts-50262f8d.js","assets/cox-dbdb2093.js","assets/cox-2840ada3.css","assets/ScrambleTag-2b266b09.js","assets/LoadingSpinner-ecd04e42.js","assets/ErrorMessage-71f1908e.js","assets/PoweredByTF-f8629a62.js","assets/PoweredByTF-d83a9532.css","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js"]));Q(()=>X(()=>import("./CoxPerformance-24cc53fc.js"),["assets/CoxPerformance-24cc53fc.js","assets/chartSetup-26787014.js","assets/chartjs-708aa598.js","assets/react-vendor-91c466da.js","assets/cox-dbdb2093.js","assets/cox-2840ada3.css","assets/PoweredByTF-f8629a62.js","assets/PoweredByTF-d83a9532.css","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js"]));const Wx=Q(()=>X(()=>import("./ThinkingFactory-c4478700.js"),["assets/ThinkingFactory-c4478700.js","assets/react-vendor-91c466da.js","assets/ScrambleButton-4f752742.js","assets/ScrambleButton-5ed6130e.css","assets/ThinkingFactory-2282b8e3.js","assets/ThinkingFactory-131b2230.css","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js","assets/ProductDetail-72fd7d0f.css"])),zx=Q(()=>X(()=>import("./TFTech-6b38d9fe.js"),["assets/TFTech-6b38d9fe.js","assets/react-vendor-91c466da.js","assets/ScrambleButton-4f752742.js","assets/ScrambleButton-5ed6130e.css","assets/ThinkingFactory-2282b8e3.js","assets/ThinkingFactory-131b2230.css","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js"])),qx=Q(()=>X(()=>import("./TFApplications-3f0cf590.js"),["assets/TFApplications-3f0cf590.js","assets/react-vendor-91c466da.js","assets/ScrambleButton-4f752742.js","assets/ScrambleButton-5ed6130e.css","assets/ThinkingFactory-2282b8e3.js","assets/ThinkingFactory-131b2230.css","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js"])),Gx=Q(()=>X(()=>import("./TFShowcase-9362c190.js"),["assets/TFShowcase-9362c190.js","assets/ScrambleButton-4f752742.js","assets/react-vendor-91c466da.js","assets/ScrambleButton-5ed6130e.css","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js","assets/TFShowcase-2253b15f.css"])),Vx=Q(()=>X(()=>import("./TFConfigurator-31eb5e4f.js"),["assets/TFConfigurator-31eb5e4f.js","assets/react-vendor-91c466da.js","assets/ScrambleButton-4f752742.js","assets/ScrambleButton-5ed6130e.css","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js","assets/TFConfigurator-08c64122.css"])),Yx=Q(()=>X(()=>import("./Careers-0f624f83.js"),["assets/Careers-0f624f83.js","assets/react-vendor-91c466da.js","assets/Careers-1104d8c2.js","assets/Careers-42c3dc50.css","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js"])),Kx=Q(()=>X(()=>import("./CareerDetail-9c548af8.js"),["assets/CareerDetail-9c548af8.js","assets/react-vendor-91c466da.js","assets/Careers-1104d8c2.js","assets/Careers-42c3dc50.css","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js"])),Jx=Q(()=>X(()=>import("./GinsengConfigurator-fee2f71e.js"),["assets/GinsengConfigurator-fee2f71e.js","assets/react-vendor-91c466da.js","assets/ScrambleButton-4f752742.js","assets/ScrambleButton-5ed6130e.css","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js","assets/GinsengConfigurator-9753590f.css"])),Xx=Q(()=>X(()=>import("./TerraReserve-c711f96e.js"),["assets/TerraReserve-c711f96e.js","assets/react-vendor-91c466da.js","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js","assets/TerraReserve-6cf480f3.css"])),Qx=Q(()=>X(()=>import("./ContactPage-8bda541f.js"),["assets/ContactPage-8bda541f.js","assets/react-vendor-91c466da.js","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js"])),Zx=Q(()=>X(()=>import("./ProjectInquiry-87713dd2.js"),["assets/ProjectInquiry-87713dd2.js","assets/react-vendor-91c466da.js","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js"])),ek=Q(()=>X(()=>import("./ProjectQuestions-14c4e4c6.js"),["assets/ProjectQuestions-14c4e4c6.js","assets/react-vendor-91c466da.js","assets/supabase-a2555f13.js","assets/headlessui-dab4f4bd.js"])),tk=Q(()=>X(()=>Promise.resolve().then(()=>o0),void 0)),nk=[{path:"/",element:p.jsx(yx,{})},{path:"login",element:p.jsx(Sx,{})},{path:"signup",element:p.jsx(vx,{})},{path:"dashboard",element:p.jsx(_x,{children:p.jsx(bx,{})}),children:[{index:!0,element:p.jsx(Ex,{})},{path:"pretreatment",element:p.jsx(wx,{})},{path:"ultrafiltration",element:p.jsx(Tx,{})},{path:"ro",element:p.jsx(Ix,{})},{path:"kpi-overview",element:p.jsx(xx,{})},{path:"gac",element:p.jsx(kx,{})},{path:"building",element:p.jsx(Cx,{})},{path:"analytics",element:p.jsx(Px,{})},{path:"cameras",element:p.jsx(Lx,{})},{path:"my-ginseng",element:p.jsx(Dx,{})},{path:"cox-summary",element:p.jsx(Hx,{})}]},{path:"applications",element:p.jsx(Ox,{})},{path:"privacy-policy",element:p.jsx(Rx,{})},{path:"products/:productId",element:p.jsx($x,{})},{path:"tech",element:p.jsx(Ax,{})},{path:"featured-stories",element:p.jsx(jx,{})},{path:"featured-stories/:storyId",element:p.jsx(Fx,{})},{path:"case-studies",element:p.jsx(Bx,{})},{path:"case-studies/:studyId",element:p.jsx(Ux,{})},{path:"about",element:p.jsx(Nx,{})},{path:"referral-program",element:p.jsx(Mx,{})},{path:"thinking-factory",element:p.jsx(Wx,{})},{path:"thinking-factory/tech",element:p.jsx(zx,{})},{path:"thinking-factory/applications",element:p.jsx(qx,{})},{path:"thinking-factory/showcase",element:p.jsx(Gx,{})},{path:"thinking-factory/configurator",element:p.jsx(Vx,{})},{path:"careers",element:p.jsx(Yx,{})},{path:"careers/:jobId",element:p.jsx(Kx,{})},{path:"configure/ginseng",element:p.jsx(Jx,{})},{path:"terra",element:p.jsx(Xx,{})},{path:"contact",element:p.jsx(Qx,{})},{path:"project-inquiry",element:p.jsx(Zx,{})},{path:"ginseng-questionnaire",element:p.jsx(ek,{})},{path:"*",element:p.jsx(tk,{})}],rs=window.__hasAnalyticsConsent?window.__hasAnalyticsConsent():!1;qT({dsn:"https://2d631f075c75aa35ba005750faebe064@o4511927217618944.ingest.us.sentry.io/4511927220371456",enabled:!!"https://2d631f075c75aa35ba005750faebe064@o4511927217618944.ingest.us.sentry.io/4511927220371456",environment:"production",sendDefaultPii:rs,integrations:[wI({useEffect:E.useEffect,useLocation:un,useNavigationType:bp,createRoutesFromChildren:Ep,matchRoutes:wp}),...rs?[mT({maskAllText:!1,maskAllInputs:!0,blockAllMedia:!1,mask:["[data-sentry-private]"],block:["[data-sentry-private] img","[data-sentry-private] svg","[data-sentry-private] video","[data-sentry-private] canvas","[data-sentry-private] iframe"],minReplayDuration:25e3})]:[]],tracesSampleRate:.1,tracePropagationTargets:[/^\//,/^https:\/\/[a-z0-9-]+\.supabase\.co/],replaysSessionSampleRate:rs?1:0,replaysOnErrorSampleRate:rs?1:0});c0();typeof window<"u"&&"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual");const rk=TI(Tp),sk=rk([{path:"/",element:p.jsx(gx,{}),errorElement:p.jsx(Zf,{}),children:nk}]);$o.createRoot(document.getElementById("root")).render(p.jsx(Ie.StrictMode,{children:p.jsx(u0,{children:p.jsx(Jf,{children:p.jsx(vp,{router:sk})})})}));export{x0 as A,u0 as E,E0 as G,k0 as N,Qf as S,cx as T,oe as a,bk as b,lk as c,_0 as d,uk as e,fk as f,dk as g,pk as h,hk as i,p as j,gk as k,mk as l,vk as m,Me as n,Ek as o,sp as p,yk as q,w0 as r,T0 as s,_k as t,I0 as u,Z0 as v,wk as w,Cu as x,g0 as y,Sk as z};

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.