PageSourceSearch

https://mailstrom.co/vite/assets/sentry-BXoXPrn6.js

js mailstrom.co collected 2026-10-02 03:42:41 UTC 509,168 bytes, 13 lines download raw bytes

vendor: 6,260 bytes, lines 1-12
1var AF=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function eh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function CF(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var th={exports:{}},ie={};/*
2object-assign
3(c) Sindre Sorhus
4@license MIT
5*/var jl=Object.getOwnPropertySymbols,FS=Object.prototype.hasOwnProperty,$S=Object.prototype.propertyIsEnumerable;function BS(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function US(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(s){return t[s]});if(r.join("")!=="0123456789")return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(s){o[s]=s}),Object.keys(Object.assign({},o)).join("")==="abcdefghijklmnopqrst"}catch(s){return!1}}var nh=US()?Object.assign:function(e,t){for(var n,r=BS(e),o,s=1;s<arguments.length;s++){n=Object(arguments[s]);for(var i in n)FS.call(n,i)&&(r[i]=n[i]);if(jl){o=jl(n);for(var a=0;a<o.length;a++)$S.call(n,o[a])&&(r[o[a]]=n[o[a]])}}return r};const NF=eh(nh);/** @license React v17.0.2
6 * react.production.min.js
7 *
8 * Copyright (c) Facebook, Inc. and its affiliates.
9 *
10 * This source code is licensed under the MIT license found in the
11 * LICENSE file in the root directory of this source tree.
12 */var iu=nh,Xr=60103,rh=60106;ie.Fragment=60107;ie.StrictMode=60108;ie.Profiler=60114;var oh=60109,sh=60110,ih=60112;ie.Suspense=60113;var ah=60115,ch=60116;if(typeof Symbol=="function"&&Symbol.for){var ht=Symbol.for;Xr=ht("react.element"),rh=ht("react.portal"),ie.Fragment=ht("react.fragment"),ie.StrictMode=ht("react.strict_mode"),ie.Profiler=ht("react.profiler"),oh=ht("react.provider"),sh=ht("react.context"),ih=ht("react.forward_ref"),ie.Suspense=ht("react.suspense"),ah=ht("react.memo"),ch=ht("react.lazy")}var zl=typeof Symbol=="function"&&Symbol.iterator;function HS(e){return e===null||typeof e!="object"?null:(e=zl&&e[zl]||e["@@iterator"],typeof e=="function"?e:null)}function qo(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var uh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},lh={};function Qr(e,t,n){this.props=e,this.context=t,this.refs=lh,this.updater=n||uh}Qr.prototype.isReactComponent={};Qr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(qo(85));this.updater.enqueueSetState(this,e,t,"setState")};Qr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function fh(){}fh.prototype=Qr.prototype;function au(e,t,n){this.props=e,this.context=t,this.refs=lh,this.updater=n||uh}var cu=au.prototype=new fh;cu.constructor=au;iu(cu,Qr.prototype);cu.isPureReactComponent=!0;var uu={current:null},dh=Object.prototype.hasOwnProperty,ph={key:!0,ref:!0,__self:!0,__source:!0};function hh(e,t,n){var r,o={},s=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(s=""+t.key),t)dh.call(t,r)&&!ph.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var c=Array(a),u=0;u<a;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)o[r]===void 0&&(o[r]=a[r]);return{$$typeof:Xr,type:e,key:s,ref:i,props:o,_owner:uu.current}}function WS(e,t){return{$$typeof:Xr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function lu(e){return typeof e=="object"&&e!==null&&e.$$typeof===Xr}function jS(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var ql=/\/+/g;function Na(e,t){return typeof e=="object"&&e!==null&&e.key!=null?jS(""+e.key):t.toString(36)}function Hs(e,t,n,r,o){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(s){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Xr:case rh:i=!0}}if(i)return i=e,o=o(i),e=r===""?"."+Na(i,0):r,Array.isArray(o)?(n="",e!=null&&(n=e.replace(ql,"$&/")+"/"),Hs(o,t,n,"",function(u){return u})):o!=null&&(lu(o)&&(o=WS(o,n+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(ql,"$&/")+"/")+e)),t.push(o)),1;if(i=0,r=r===""?".":r+":",Array.isArray(e))for(var a=0;a<e.length;a++){s=e[a];var c=r+Na(s,a);i+=Hs(s,t,n,c,o)}else if(c=HS(e),typeof c=="function")for(e=c.call(e),a=0;!(s=e.next()).done;)s=s.value,c=r+Na(s,a++),i+=Hs(s,t,n,c,o);else if(s==="object")throw t=""+e,Error(qo(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t));return i}function Es(e,t,n){if(e==null)return e;var r=[],o=0;return Hs(e,r,"","",function(s){return t.call(n,s,o++)}),r}function zS(e){if(e._status===-1){var t=e._result;t=t(),e._status=0,e._result=t,t.then(function(n){e._status===0&&(n=n.default,e._status=1,e._result=n)},function(n){e._status===0&&(e._status=2,e._result=n)})}if(e._status===1)return e._result;throw e._result}var mh={current:null};function en(){var e=mh.current;if(e===null)throw Error(qo(321));return e}var qS={ReactCurrentDispatcher:mh,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:uu,IsSomeRendererActing:{current:!1},assign:iu};ie.Children={map:Es,forEach:function(e,t,n){Es(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Es(e,function(){t++}),t},toArray:function(e){return Es(e,function(t){return t})||[]},only:function(e){if(!lu(e))throw Error(qo(143));return e}};ie.Component=Qr;ie.PureComponent=au;
12ie.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=qS;ie.cloneElement=function(e,t,n){if(e==null)throw Error(qo(267,e));var r=iu({},e.props),o=e.key,s=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,i=uu.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(c in t)dh.call(t,c)&&!ph.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&a!==void 0?a[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){a=Array(c);for(var u=0;u<c;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:Xr,type:e.type,key:o,ref:s,props:r,_owner:i}};ie.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:sh,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:oh,_context:e},e.Consumer=e};ie.createElement=hh;ie.createFactory=function(e){var t=hh.bind(null,e);return t.type=e,t};ie.createRef=function(){return{current:null}};ie.forwardRef=function(e){return{$$typeof:ih,render:e}};ie.isValidElement=lu;ie.lazy=function(e){return{$$typeof:ch,_payload:{_status:-1,_result:e},_init:zS}};ie.memo=function(e,t){return{$$typeof:ah,type:e,compare:t===void 0?null:t}};ie.useCallback=function(e,t){return en().useCallback(e,t)};ie.useContext=function(e,t){return en().useContext(e,t)};ie.useDebugValue=function(){};ie.useEffect=function(e,t){return en().useEffect(e,t)};ie.useImperativeHandle=function(e,t,n){return en().useImperativeHandle(e,t,n)};ie.useLayoutEffect=function(e,t){return en().useLayoutEffect(e,t)};ie.useMemo=function(e,t){return en().useMemo(e,t)};ie.useReducer=function(e,t,n){return en().useReducer(e,t,n)};ie.useRef=function(e){return en().useRef(e)};ie.useState=function(e){return en().useState(e)};ie.version="17.0.2";th.exports=ie;var ke=th.exports;const MF=eh(ke),A=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,H=globalThis,Vt="10.69.0";function Lt(){return Zr(H),H}function Zr(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Vt,t[Vt]=t[Vt]||{}}function eo(e,t,n=H){const r=n.__SENTRY__=n.__SENTRY__||{},o=r[Vt]=r[Vt]||{};return o[e]||(o[e]=t())}const fu=["debug","info","warn","error","log","assert","trace"],GS="Sentry Logger ",ci={};function tn(e){if(!("console"in H))return e();const t=H.console,n={},r=Object.keys(ci);r.forEach(o=>{const s=ci[o];n[o]=t[o],t[o]=s});try{return e()}finally{r.forEach(o=>{t[o]=n[o]})}}function VS(){pu().enabled=!0}function YS(){pu().enabled=!1}function gh(){return pu().enabled}function JS(...e){du("log",...e)}function KS(...e){du("warn",...e)}function XS(...e){du("error",...e)}function du(e,...t){A&&gh()&&tn(()=>{H.console[e]("".concat(GS,"[").concat(e,"]:"),...t)})}function pu(){return A?eo("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const _={enable:VS,disable:YS,isEnabled:gh,log:JS,warn:KS,error:XS},_h=50,Nt="?",Gl=/\(error: (.*)\)/,Vl=/captureMessage|captureException/;function yh(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,o=0)=>{const s=[],i=n.split("\n");for(let a=r;a<i.length;a++){let c=i[a];c.length>1024&&(c=c.slice(0,1024));const u=Gl.test(c)?c.replace(Gl,"$1"):c;if(!u.includes("Error: ")){for(const f of t){const l=f(u);if(l){s.push(l);break}}if(s.length>=_h+o)break}}return ZS(s.slice(o))}}function QS(e){return Array.isArray(e)?yh(...e):e}function ZS(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(vs(t).function||"")&&t.pop(),t.reverse(),Vl.test(vs(t).function||"")&&(t.pop(),Vl.test(vs(t).function||"")&&t.pop()),t.slice(0,_h).map(n=>({...n,filename:n.filename||vs(t).filename,function:n.function||Nt}))}function vs(e){return e[e.length-1]||{}}const Ma="<anonymous>";function Xt(e){try{return!e||typeof e!="function"?Ma:e.name||Ma}catch(t){return Ma}}function dc(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(r){return}}}function eb(e){let t=e!=null&&e.startsWith("file://")?e.slice(7):e;return t!=null&&t.match(/\/[A-Z]:/)&&(t=t.slice(1)),t}const yo={},Yl={};function In(e,t){return yo[e]=yo[e]||[],yo[e].push(t),()=>{const n=yo[e];if(n){const r=n.indexOf(t);r!==-1&&n.splice(r,1)}}}function wn(e,t){if(!Yl[e]){Yl[e]=!0;try{t()}catch(n){A&&_.error("Error while instrumenting ".concat(e),n)}}}function it(e,t){const n=e&&yo[e];if(n)for(const r of n)try{r(t)}catch(o){A&&_.error("Error while triggering instrumentation handler.\nType: ".concat(e,"\nName: ").concat(Xt(r),"\nError:"),o)}}let xa=null;function Sh(e){const t="error";In(t,e),wn(t,tb)}function tb(){xa=H.onerror,H.onerror=function(e,t,n,r,o){return it("error",{column:r,error:o,line:n,msg:e,url:t}),xa?xa.apply(this,arguments):!1},H.onerror.__SENTRY_INSTRUMENTED__=!0}let Oa=null;function bh(e){const t="unhandledrejection";In(t,e),wn(t,nb)}function nb(){Oa=H.onunhandledrejection,H.onunhandledrejection=function(e){return it("unhandledrejection",e),Oa?Oa.apply(this,arguments):!0},H.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Eh=Object.prototype.toString;function kt(e){switch(Eh.call(e)){case"[object Error]":case"[object E
12xception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Kn(e,Error)}}function to(e,t){return Eh.call(e)==="[object ".concat(t,"]")}function vh(e){return to(e,"ErrorEvent")}function Jl(e){return to(e,"DOMError")}function rb(e){return to(e,"DOMException")}function _t(e){return to(e,"String")}function Bi(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Mt(e){return e===null||Bi(e)||typeof e!="object"&&typeof e!="function"}function He(e){return to(e,"Object")}function at(e){return typeof e=="object"&&e!==null}function Ui(e){return typeof Event<"u"&&Kn(e,Event)}function ob(e){return to(e,"RegExp")}function Rn(e){return!!(e!=null&&e.then&&typeof e.then=="function")}function Kn(e,t){try{return e instanceof t}catch(n){return!1}}function hu(e){return typeof Request<"u"&&Kn(e,Request)}function De(e,t,n){if(!(t in e))return;const r=e[t];if(typeof r!="function")return;const o=n(r);typeof o=="function"&&Th(o,r);try{e[t]=o}catch(s){A&&_.log('Failed to replace method "'.concat(t,'" in object'),e)}}function ve(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch(r){A&&_.log('Failed to add non-enumerable property "'.concat(String(t),'" to object'),e)}}function Th(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,ve(e,"__sentry_original__",t)}catch(n){}}function mu(e){return e.__sentry_original__}function Ih(e){if(kt(e))return{message:e.message,name:e.name,stack:e.stack,...Kl(e)};if(Ui(e)){const{type:t,target:n,currentTarget:r,detail:o}=e;return{type:t,target:n,currentTarget:r,...o?{detail:o}:{},...Kl(e)}}return e}function Kl(e){return at(e)?Object.fromEntries(Object.entries(e)):{}}function sb(e){const t=Object.keys(Ih(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}let hr;function Go(e){if(hr!==void 0)return hr?hr(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=H;return t in n&&typeof n[t]=="function"?(hr=n[t],hr(e)):(hr=null,e())}function Yt(){return Go(()=>Math.random())}function Dt(){return Go(()=>Date.now())}const wh=Symbol.for("sentry.skipNormalization"),Rh=Symbol.for("sentry.overrideNormalizationDepth");function ib(e){ve(e,wh,!0)}function ab(e,t){ve(e,Rh,t)}function cb(e){return!!e[wh]}function ub(e){const t=e[Rh];return typeof t=="number"?t:void 0}let pc;function kh(e){pc=e}function Ne(e,t=100,n=1/0){try{return hc("",e,t,n)}catch(r){return{ERROR:"**non-serializable** (".concat(r,")")}}}function Ah(e,t=3,n=100*1024){const r=Ne(e,t);return db(r)>n?Ah(e,t-1,n):r}function hc(e,t,n=1/0,r=1/0,o=pb()){const[s,i]=o;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=Ch(e,t);if(!a.startsWith("[object "))return a;if(cb(t))return t;const c=ub(t),u=c!==void 0?c:n;if(u===0)return a.replace("object ","");if(s(t))return"[Circular ~]";const f=t;if(f&&typeof f.toJSON=="function")try{const h=f.toJSON();return hc("",h,u-1,r,o)}catch(h){}const l=Array.isArray(t)?[]:{};let d=0;const p=Ih(t);for(const h in p){if(!Object.prototype.hasOwnProperty.call(p,h))continue;if(d>=r){l[h]="[MaxProperties ~]";break}const m=p[h];l[h]=hc(h,m,u-1,r,o),d++}return i(t),l}function Ch(e,t){try{if(pc){const r=pc(t);if(r)return r}if(typeof global<"u"&&t===global)return"[Global]";if(typeof t=="number"&&!Number.isFinite(t))return"[".concat(t,"]");if(typeof t=="function")return"[Function: ".concat(Xt(t),"]");if(typeof t=="symbol")return"[".concat(String(t),"]");if(typeof t=="bigint")return"[BigInt: ".concat(String(t),"]");const n=lb(t);return"[object ".concat(n,"]")}catch(n){return"**non-serializable** (".concat(n,")")}}function lb(e){const t=Object.getPrototypeOf(e);return t!=null&&t.constructor?t.constructor.name:"null prototype"}function fb(e){return~-encodeURI(e).split(/%..|./).length}function db(e){return fb(JSON.stringify(e))}function pb(){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 Ze(e,t="[unserializable]"){if(typeof e=="string")return e;try{return JSON.stringify(e)}catch(n){return typeof t=="function"?t(e):t}}function No(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:"".concat(e.slice(0,t),"...")}function Pa(e,t){let n=e;const r=n.length;if(r<=150)return n;t>r&&(t=r);let o=Math.max(t-60,0);o<5&&(o=0);let s=Math.min(o+140,r);return s>r-5&&(s=r),s===r&&(o=Math.max(s-140,0)),n=n.slice(o,s),o>0&&(n="'{snip} ".concat(n)),s<r&&(n+=" {snip}"),n}function ui(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const o=e[r];Mt(o)?n.push(String(o)):o instanceof Error?n.push(o.message?"".concat(o.name,": ").concat(o.message):o.name):n.push(Ch(void 0,o))}return n.join(t)}function vo(e,t,n=!1){return _t(e)?ob(t)?t.test(e):_t(t)?n?e===t:e.includes(t):typeof t=="function"?t(e):!1:!1}
12function ct(e,t=[],n=!1){for(const r of t)if(vo(e,r,n))return!0;return!1}function hb(){const e=H;return e.crypto||e.msCrypto}let La;function mb(){return Yt()*16}function Me(e=hb()){try{if(e!=null&&e.randomUUID)return Go(()=>e.randomUUID()).replace(/-/g,"")}catch(t){}return La||(La="10000000100040008000"+1e11),La.replace(/[018]/g,t=>(t^(mb()&15)>>t/4).toString(16))}function Nh(e){var t,n;return(n=(t=e.exception)==null?void 0:t.values)==null?void 0:n[0]}function Dn(e){const{message:t,event_id:n}=e;if(t)return t;const r=Nh(e);return r?r.type&&r.value?"".concat(r.type,": ").concat(r.value):r.type||r.value||n||"<unknown>":n||"<unknown>"}function mc(e,t,n){const r=e.exception=e.exception||{},o=r.values=r.values||[],s=o[0]=o[0]||{};s.value||(s.value=t||""),s.type||(s.type="Error")}function At(e,t){const n=Nh(e);if(!n)return;const r={type:"generic",handled:!0},o=n.mechanism;if(n.mechanism={...r,...o,...t},t&&"data"in t){const s={...o==null?void 0:o.data,...t.data};n.mechanism.data=s}}function gb(e,t,n=5){if(t.lineno===void 0)return;const r=e.length,o=Math.max(Math.min(r-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,o-n),o).map(i=>Pa(i,0));const s=Math.min(r-1,o);t.context_line=Pa(e[s],t.colno||0),t.post_context=e.slice(Math.min(o+1,r),o+1+n).map(i=>Pa(i,0))}function Xl(e){if(_b(e))return!0;try{ve(e,"__sentry_captured__",!0)}catch(t){}return!1}function _b(e){try{return e.__sentry_captured__}catch(t){}}const Mh=1e3;function ir(){return Dt()/Mh}function yb(){const{performance:e}=H;if(!(e!=null&&e.now)||!e.timeOrigin)return ir;const t=e.timeOrigin;return()=>(t+Go(()=>e.now()))/Mh}let Ts;function me(){return(Ts!=null?Ts:Ts=yb())()}let Da=null;function Sb(){var i;const{performance:e}=H;if(!(e!=null&&e.now))return;const t=3e5,n=Go(()=>e.now()),r=Dt(),o=e.timeOrigin;if(typeof o=="number"&&Math.abs(o+n-r)<t)return o;const s=(i=e.timing)==null?void 0:i.navigationStart;return typeof s=="number"&&Math.abs(s+n-r)<t?s:r-n}function Ae(){return Da===null&&(Da=Sb()),Da}function bb(e){const t=me(),n={sid:Me(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>vb(n)};return e&&Pr(n,e),n}function Pr(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||me(),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:Me()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did="".concat(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 Eb(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),Pr(e,n)}function vb(e){return{sid:"".concat(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"?"".concat(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 Vo(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 o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=Vo(r[o],t[o],n-1));return r}function xt(){return Me()}function Jt(){return Me().substring(16)}function xh(e){try{const t=H.WeakRef;if(typeof t=="function")return new t(e)}catch(t){}return e}function Oh(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch(t){return}return e}}const gc="_sentrySpan";function Ot(e,t){t?ve(e,gc,xh(t)):delete e[gc]}function Lr(e){return Oh(e[gc])}const Tb=100;class Et{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:xt(),sampleRand:Yt()}}clone(){const t=new Et;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,Ot(t,Lr(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&&Pr(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 Et?n.getScopeData():He(n)?t:void 0,{tags:o,attributes:s,extra:i,user:a,contexts:c,level:u,fingerprint:f=[],propagationContext:l,conversationId:d}=r||{};return this._tags={...this._tags,...o},this._attributes={...this._attributes,...s},this._extra={...this._extra,...i},this._contexts={...this._contexts,...c},a&&Object.keys(a).length&&(this._user=a),u&&(this._level=u),f.length&&(this._fingerprint=f),l&&(this._propagationContext=l),d&&(this._conversationId=d),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,Ot(this,void 0),this._attachments=[],this.setPropagationContext({traceId:xt(),sampleRand:Yt()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){var s;const r=typeof n=="number"?n:Tb;if(r<=0)return this;const o={timestamp:ir(),...t,message:t.message?No(t.message,2048):t.message};return this._breadcrumbs.push(o),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),(s=this._client)==null||s.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:Lr(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Vo(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)||Me();if(!this._client)return A&&_.warn("No client configured on scope - will not capture exception!"),r;const o=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:o,...n,event_id:r},this),r}captureMessage(t,n,r){var i;const o=(r==null?void 0:r.event_id)||Me();if(!this._client)return A&&_.warn("No client configured on scope - will not capture message!"),o;const s=(i=r==null?void 0:r.syntheticException)!=null?i:new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:s,...r,event_id:o},this),o}
12captureEvent(t,n){const r=t.event_id||(n==null?void 0:n.event_id)||Me();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(A&&_.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 Ib(){return eo("defaultCurrentScope",()=>new Et)}function wb(){return eo("defaultIsolationScope",()=>new Et)}const Ql=e=>e instanceof Promise&&!e[Ph],Ph=Symbol("chained PromiseLike"),Lh=(e,t,n)=>{const r=e.then(o=>(t(o),o),o=>{throw n(o),o});return Ql(r)&&Ql(e)?r:Rb(e,r)},Rb=(e,t)=>{if(!t)return e;let n=!1;for(const r in e){if(r in t)continue;n=!0;const o=e[r];typeof o=="function"?Object.defineProperty(t,r,{value:(...s)=>o.apply(e,s),enumerable:!0,configurable:!0,writable:!0}):t[r]=o}return n&&Object.assign(t,{[Ph]:!0}),t};class kb{constructor(t,n){let r;t?r=t:r=new Et;let o;n?o=n:o=new Et,this._stack=[{scope:r}],this._isolationScope=o}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(o){throw this._popScope(),o}return Rn(r)?Lh(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 Dr(){const e=Lt(),t=Zr(e);return t.stack=t.stack||new kb(Ib(),wb())}function Ab(e){return Dr().withScope(e)}function Cb(e,t){const n=Dr();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Zl(e){return Dr().withScope(()=>e(Dr().getIsolationScope()))}function Nb(){return{withIsolationScope:Zl,withScope:Ab,withSetScope:Cb,withSetIsolationScope:(e,t)=>Zl(t),getCurrentScope:()=>Dr().getScope(),getIsolationScope:()=>Dr().getIsolationScope()}}function kn(e){const t=Zr(e);return t.acs?t.acs:Nb()}function Mb(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)&&Object.keys(e).includes("value")}function xb(e,t){var a;const{value:n,unit:r}=Mb(e)?e:{value:e,unit:void 0},o=Ob(n),s=r&&typeof r=="string"?{unit:r}:{};if(o)return{...o,...s};if(!t||t==="skip-undefined"&&n===void 0)return;let i="";try{i=(a=JSON.stringify(n))!=null?a:""}catch(c){}return{value:i,type:"string",...s}}function Fr(e,t=!1){const n={};for(const[r,o]of Object.entries(e!=null?e:{})){const s=xb(o,t);s&&(n[r]=s)}return n}function ef(e){var n,r;if(!e)return 0;let t=0;for(const[o,s]of Object.entries(e)){t+=o.length*2,t+=s.type.length*2,t+=((r=(n=s.unit)==null?void 0:n.length)!=null?r:0)*2;const i=s.value;Array.isArray(i)?t+=tf(i[0])*i.length:Mt(i)?t+=tf(i):t+=100}return t}function tf(e){return typeof e=="string"?e.length*2:typeof e=="boolean"?4:typeof e=="number"?8:0}function Ob(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}}function W(){const e=Lt();return kn(e).getCurrentScope()}function _e(){const e=Lt();return kn(e).getIsolationScope()}function jn(){return eo("globalScope",()=>new Et)}function Ye(...e){const t=Lt(),n=kn(t);if(e.length===2){const[r,o]=e;return r?n.withSetScope(r,o):n.withScope(o)}return n.withScope(e[0])}function Pb(...e){const t=Lt(),n=kn(t);if(e.length===2){const[r,o]=e;return r?n.withSetIsolationScope(r,o):n.withIsolationScope(o)}return n.withIsolationScope(e[0])}function C(){return W().getClient()}function Dh(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:o}=t,s={trace_id:n,span_id:o||Jt()};return r&&(s.parent_span_id=r),s}const ue="sentry.source",Hi="sentry.sample_rate",Fh="sentry.previous_trace_sample_rate",ae="sentry.op",G="sentry.origin",Lb="sentry.status.message",Mo="sentry.idle_span_finish_reason",Yo="sentry.measurement_unit",Jo="sentry.measurement_value",Db="sentry.release",Fb="sentry.environment",$b="sentry.sdk.integrations",Bb="user.id",Ub="user.email",Hb="user.ip_address",Wb="user.n
12ame",_c="sentry.custom_span_name",gu="sentry.profile_id",An="sentry.exclusive_time",jb="http.request.method",zb="sentry.link.type",qb="gen_ai.conversation.id",$h=0,Ko=1,ee=2;function Bh(e){if(e<400&&e>=100)return{code:Ko};if(e>=400&&e<500)switch(e){case 401:return{code:ee,message:"unauthenticated"};case 403:return{code:ee,message:"permission_denied"};case 404:return{code:ee,message:"not_found"};case 409:return{code:ee,message:"already_exists"};case 413:return{code:ee,message:"failed_precondition"};case 429:return{code:ee,message:"resource_exhausted"};case 499:return{code:ee,message:"cancelled"};default:return{code:ee,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:ee,message:"unimplemented"};case 503:return{code:ee,message:"unavailable"};case 504:return{code:ee,message:"deadline_exceeded"};default:return{code:ee,message:"internal_error"}}return{code:ee,message:"internal_error"}}function xo(e,t){e.setAttribute("http.response.status_code",t);const n=Bh(t);n.message!=="unknown_error"&&e.setStatus(n)}const Uh="_sentryScope",Hh="_sentryIsolationScope",Gb=Symbol.for("sentry.otelSourceInference"),Vb=Symbol.for("sentry.otelSourceExplicitlySet"),Yb=Symbol.for("sentry.tracerProviderSpan");function $r(e,t,n){e&&(ve(e,Hh,xh(n)),ve(e,Uh,t))}function zn(e){const t=e;return{scope:t[Uh],isolationScope:Oh(t[Hh])}}function nf(e){return e[Gb]===!0}function Jb(e){ve(e,Vb,!0)}function rf(e){return e[Yb]===!0}const li="sentry-",Kb=8192;function _u(e){const t=Xb(e);if(!t)return;const n=Object.entries(t).reduce((r,[o,s])=>{if(o.startsWith(li)){const i=o.slice(li.length);r[i]=s}return r},{});if(Object.keys(n).length>0)return n}function Wh(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,o])=>(o&&(n["".concat(li).concat(r)]=o),n),{});return Qb(t)}function Xb(e){if(!(!e||!_t(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=of(n);return Object.entries(r).forEach(([o,s])=>{t[o]=s}),t},{}):of(e)}function of(e){return e.split(",").map(t=>{const n=t.indexOf("=");if(n===-1)return[];const r=t.slice(0,n),o=t.slice(n+1);return[r,o].map(s=>{try{return decodeURIComponent(s.trim())}catch(i){return}})}).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function Qb(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],o)=>{const s="".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(r)),i=o===0?s:"".concat(t,",").concat(s);return i.length>Kb?(A&&_.warn("Not adding key: ".concat(n," with val: ").concat(r," to baggage header due to exceeding baggage size limits.")),t):i},"")}const Zb=/^o(\d+)\./,eE=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function tE(e){return e==="http"||e==="https"}function Ft(e,t=!1){const{host:n,path:r,pass:o,port:s,projectId:i,protocol:a,publicKey:c}=e;return"".concat(a,"://").concat(c).concat(t&&o?":".concat(o):"","@").concat(n).concat(s?":".concat(s):"","/").concat(r&&"".concat(r,"/")).concat(i)}function jh(e){const t=eE.exec(e);if(!t){tn(()=>{console.error("Invalid Sentry Dsn: ".concat(e))});return}const[n,r,o="",s="",i="",a=""]=t.slice(1);let c="",u=a;const f=u.split("/");if(f.length>1&&(c=f.slice(0,-1).join("/"),u=f.pop()),u){const l=u.match(/^\d+/);l&&(u=l[0])}return zh({host:s,pass:o,path:c,projectId:u,port:i,protocol:n,publicKey:r})}function zh(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function nE(e){if(!A)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(_.error("Invalid Sentry Dsn: ".concat(i," missing")),!0))?!1:n.match(/^\d+$/)?tE(r)?t&&isNaN(parseInt(t,10))?(_.error("Invalid Sentry Dsn: Invalid port ".concat(t)),!1):!0:(_.error("Invalid Sentry Dsn: Invalid protocol ".concat(r)),!1):(_.error("Invalid Sentry Dsn: Invalid projectId ".concat(n)),!1)}function rE(e){const t=e.match(Zb);return t==null?void 0:t[1]}function qh(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=rE(n)),r}function Gh(e){const t=typeof e=="string"?jh(e):zh(e);if(!(!t||!nE(t)))return t}function Xn(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 Vh=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function oE(e){if(!e)return;const t=e.match(Vh);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 Yh(e,t){const n=oE(e),r=_u(t);if(!(n!=null&&n.traceId))return{traceId:xt(),sampleRand:Yt()};const o=sE(n,r);r&&(r.sample_rand=o.toString());const{traceId:s,parentSpanId:i,parentSampled:a}=n;return{traceId:s,parentSpanId:i,sampled:a,dsc:r||{},sampleRand:o}}function Jh(e=xt(),t=Jt(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),"".concat(e,"-").concat(t).concat(r)}function Kh(e=xt(),t=Jt(),n){return"00-".concat(e,"-").concat(t,"-").concat(n?"01":"00")}function sE(e,t){const n=Xn(t==null?void 0:t.sample_rand);if(n!==void 0)return n;const r=Xn(t==null?void 0:t.sample_rate);return r&&(e==null?void 0:e.parentSampled)!==void 0?e.parentSampled?Yt()*r:r+Yt()*(1-r):Yt()}function iE(e,t){const n=qh(e);return t&&n&&t!==n?(_.log("Won't continue trace because org IDs don't match (incoming baggage: ".concat(t,", SDK options: ").concat(n,")")),!1):(e.getOptions().strictTraceContinuation||!1)&&(t&&!n||!t&&n)?(_.log("Starting a new trace because strict trace continuation is enabled but one org ID is missing (incoming baggage: ".concat(t,", Sentry client: ").concat(n,")")),!1):!0}const Xh=0,Wi=1;let sf=!1;function aE(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:o,parent_span_id:s,status:i,origin:a,links:c}=U(e);return{parent_span_id:s,span_id:t,trace_id:n,data:r,op:o,status:i,origin:a,links:c}}function Qh(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),o=r?t:U(e).parent_span_id,s=zn(e).scope,i=r?(s==null?void 0:s.getPropagationContext().propagationSpanId)||Jt():t;return{parent_span_id:o,span_id:i,trace_id:n}}function Zh(e){const{traceId:t,spanId:n}=e.spanContext(),r=nn(e);return Jh(t,n,r)}function cE(e){const{traceId:t,spanId:n}=e.spanContext(),r=nn(e);return Kh(t,n,r)}function em(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:r,...o},attributes:s})=>({span_id:t,trace_id:n,sampled:r===Wi,attributes:s,...o}))}function tm(e){if(e!=null&&e.length)return e.map(({context:{spanId:t,traceId:n,traceFlags:r},attributes:o})=>({span_id:t,trace_id:n,sampled:r===Wi,attributes:o}))}function Kt(e){return typeof e=="number"?af(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?af(e.getTime()):me()}function af(e){return e>9999999999?e/1e3:e}function U(e){if(sm(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(om(e)){const{attributes:r,startTime:o,name:s,endTime:i,status:a,links:c}=e;return{span_id:t,trace_id:n,data:r,description:s,parent_span_id:nm(e),start_timestamp:Kt(o),timestamp:Kt(i)||void 0,status:im(a),op:r[ae],origin:r[G],links:em(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function fi(e){if(sm(e))return e.getStreamedSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(om(e)){const{attributes:r,startTime:o,name:s,endTime:i,status:a,links:c}=e;return{name:s,span_id:t,trace_id:n,parent_span_id:nm(e),start_timestamp:Kt(o),end_timestamp:Kt(i),is_segment:e===di(e),status:yu(a),attributes:am(r,a),links:tm(c)}}return{span_id:t,trace_id:n,start_timestamp:0,name:"",end_timestamp:0,status:"ok",is_segment:e===di(e)}}function nm(e){var t;return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?(t=e.parentSpanContext)==null?void 0:t.spanId:void 0}function rm(e){var t;return{...e,attributes:Fr(e.attributes),links:(t=e.links)==null?void 0:t.map(n=>({...n,attributes:Fr(n.attributes)}))}}function om(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function sm(e){return typeof e.getSpanJSON=="function"}function nn(e){const{traceFlags:t}=e.spanContext();return t===Wi}function im(e){if(!(!e||e.code===$h))return e.code===Ko?"ok":e.message||"internal_error"}function yu(e){return!e||e.code===Ko||e.code===$h||e.message==="cancelled"?"ok":"error"}function am(e,t){const n=yu(t)==="error"?t==null?void 0:t.message:void 0;return{...n&&{[Lb]:n},...e}}const qn="_sentryChildSpans",yc="_sentryRootSpan";function Ws(e,t){const n=e[yc]||e;ve(t,yc,n),e[qn]?e[qn].add(t):ve(e,qn,new Set([t]))}function uE(e,t){e[qn]&&e[qn].delete(t)}function To(e){const t=new Set;function n(r){if(!t.has(r)&&nn(r)){t.add(r);const o=r[qn]?Array.from(r[qn]):[];for(const s of o)n(s)}}return n(e),Array.from(t)}const Te=di;function di(e){return e[yc]||e}function Ie(){const e=Lt(),t=kn(e);return t.getActiveSpan?t.getActiveSpan():Lr(W())}function pi(){sf||(tn(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),sf=!0)}function lE(e,t){e.updateName(t),e.setAttributes({[ue]:"custom",[_c]:t})}let cf=!1;function cm(){if(cf)return;function e(){const t=Ie(),n=t&&Te(t);if(n){const r="internal_error";A&&_.log("[Tracing] Root span: ".concat(r," -> Global error occurred")),n.setStatus({code:ee,message:r})}}cf=!0,Sh(e),bh(e)}function Ge(e){var n;if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||((n=C())==null?void 0:n.getOptions());return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function uf(e){_.log("Ignoring span ".concat(e.op," - ").concat(e.description," because it matches `ignoreSpans`."))}function Oo(e,t){if(!(t!=null&&t.length))return!1;for(const n of t){if(pE(n)){if(e.description&&vo(e.description,n))return A&&uf(e),!0;continue}const r=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!r)continue;const o=n.name?e.description&&vo(e.description,n.name):!0,s=n.op?e.op&&vo(e.op,n.op):!0,i=n.attributes?Object.entries(n.attributes).every(([a,c])=>{var u;return fE((u=e.attributes)==null?void 0:u[a],c)}):!0;if(o&&s&&i)return A&&uf(e),!0}return!1}function fE(e,t){return typeof e=="string"&&(typeof t=="string"||t instanceof RegExp)?vo(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e===t}function dE(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const o of e)o.parent_span_id===r&&(o.parent_span_id=n)}function pE(e){return typeof e=="string"||e instanceof RegExp}const um=Symbol.for("sentry.nonRecordingSpan");class Qn{constructor(t={}){this._traceId=t.traceId||xt(),this._spanId=t.spanId||Jt(),this.dropReason=t.dropReason,ve(this,um,!0)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:Xh}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}
12addEvent(t,n,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}}function Br(e){return!!e&&e[um]===!0}const Xo="production",lm="_frozenDsc";function lf(e,t){ve(e,lm,t)}function fm(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o={environment:n.environment||Xo,release:n.release,public_key:r,trace_id:e,org_id:qh(t)};return t.emit("createDsc",o),o}function ji(e,t){const n=t.getPropagationContext();return n.dsc||fm(n.traceId,e)}function It(e){var g,y,b,E,v;const t=C();if(!t)return{};const n=Te(e),r=U(n),o=r.data,s=n.spanContext().traceState,i=(y=(g=s==null?void 0:s.get("sentry.sample_rate"))!=null?g:o[Hi])!=null?y:o[Fh];function a(R){return(typeof i=="number"||typeof i=="string")&&(R.sample_rate="".concat(i)),R}const c=n[lm];if(c)return a(c);const u=Br(n),f=u&&n.dropReason==="ignored";if(u&&(!Ge(t.getOptions())||f)){const R=zn(n).scope;if(R){const I={...ji(t,R)};return f&&(I.sampled="false"),a(I)}}const l=s==null?void 0:s.get("sentry.dsc"),d=l&&_u(l);if(d)return a(d);const p=fm(e.spanContext().traceId,t),h=(b=o[ue])!=null?b:o["sentry.segment.name.source"],m=r.description;return h!=="url"&&m&&(p.transaction=m),Ge()&&(p.sampled=String(nn(n)),p.sample_rand=(v=s==null?void 0:s.get("sentry.sample_rand"))!=null?v:(E=zn(n).scope)==null?void 0:E.getPropagationContext().sampleRand.toString()),a(p),t.emit("createDsc",p,n),p}function hE(e){const t=It(e);return Wh(t)}function mE(e){return ve(e,"_streamed",!0),e}function zi(e){return!!e&&typeof e=="function"&&"_streamed"in e&&!!e._streamed}function lt(e,t=[]){return[e,t]}function ff(e,t){const[n,r]=e;return[n,[...r,t]]}function Zn(e,t){const n=e[1];for(const r of n){const o=r[0].type;if(t(r,o))return!0}return!1}function Sc(e,t){return Zn(e,(n,r)=>t.includes(r))}function hi(e){const t=Zr(H);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function gE(e){const t=Zr(H);return t.decodePolyfill?t.decodePolyfill(e):new TextDecoder().decode(e)}function mi(e){const[t,n]=e;let r=JSON.stringify(t);function o(s){typeof r=="string"?r=typeof s=="string"?r+s:[hi(r),s]:r.push(typeof s=="string"?hi(s):s)}for(const s of n){const[i,a]=s;if(o("\n".concat(JSON.stringify(i),"\n")),typeof a=="string"||a instanceof Uint8Array)o(a);else{let c;try{c=JSON.stringify(a)}catch(u){c=JSON.stringify(Ne(a))}o(c)}}return typeof r=="string"?r:_E(r)}function _E(e){const t=e.reduce((o,s)=>o+s.length,0),n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}function yE(e){let t=typeof e=="string"?hi(e):e;function n(i){const a=t.subarray(0,i);return t=t.subarray(i+1),a}function r(){let i=t.indexOf(10);return i<0&&(i=t.length),JSON.parse(gE(n(i)))}const o=r(),s=[];for(;t.length;){const i=r(),a=typeof i.length=="number"?i.length:void 0;s.push([i,a?n(a):r()])}return[o,s]}function SE(e){return[{type:"span"},e]}function bE(e){const t=typeof e.data=="string"?hi(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const dm={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 EE(e){return e in dm}function df(e){return EE(e)?dm[e]:e}function Qo(e){if(!(e!=null&&e.sdk))return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function pm(e,t,n,r){var s;const o=(s=e.sdkProcessingMetadata)==null?void 0:s.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(Dt()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Ft(r)},...o&&{trace:o}}}function vE(e,t){var r,o,s,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:[...((o=e.sdk)==null?void 0:o.packages)||[],...t.packages||[]],settings:(s=e.sdk)!=null&&s.settings||t.settings?{...(i=e.sdk)==null?void 0:i.settings,...t.settings}:void 0},e}function TE(e,t,n,r){const o=Qo(n),s={sent_at:new Date(Dt()).toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:Ft(t)}},i="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return lt(s,[i])}function IE(e,t,n,r){const o=Qo(n),s=e.type&&e.type!=="replay_event"?e.type:"event";vE(e,n==null?void 0:n.sdk);const i=pm(e,o,r,t);return delete e.sdkProcessingMetadata,lt(i,[[{type:s},e]])}function wE(e,t){function n(p){return!!p.trace_id&&!!p.public_key}const r=It(e[0]),o=t==null?void 0:t.getDsn(),s=t==null?void 0:t.getOptions().tunnel,i={sent_at:new Date(Dt()).toISOString(),...n(r)&&{trace:r},...!!s&&o&&{dsn:Ft(o)}},{beforeSendSpan:a,ignoreSpans:c}=(t==null?void 0:t.getOptions())||{},u=c!=null&&c.length?e.filter(p=>{const h=U(p);return!Oo({description:h.description,op:h.op,attributes:h.data},c)}):e,f=e.length-u.length;f&&(t==null||t.recordDroppedEvent("before_send","span",f));const l=a?p=>{const h=U(p),m=zi(a)?h:a(h);return m||(pi(),h)}:U,d=[];for(const p of u){const h=l(p);h&&d.push(SE(h))}return lt(i,d)}function RE(e){if(!A)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=U(e),{spanId:o}=e.spanContext(),s=nn(e),i=Te(e),a=i===e,c="[Tracing] Starting ".concat(s?"sampled":"unsampled"," ").concat(a?"root ":"","span"),u=["op: ".concat(n),"name: ".concat(t),"ID: ".concat(o)];if(r&&u.push("parent ID: ".concat(r)),!a){const{op:f,description:l}=U(i);u.push("root ID: ".concat(i.spanContext().spanId)),f&&u.push("root op: ".concat(f)),l&&u.push("root description: ".concat(l))}_.log("".concat(c,"\n  ").concat(u.join("\n  ")))}function kE(e){if(!A)return;const{description:t="< unknown name >",op:n="< unknown op >"}=U(e),{spanId:r}=e.spanContext(),s=Te(e)===e,i='[Tracing] Finishing "'.concat(n,'" ').concat(s?"root ":"",'span "').concat(t,'" with ID ').concat(r);_.log(i)}function Su(e,t,n,r=Ie()){const o=r&&Te(r);o&&(A&&_.log("[Measurement] Setting measurement on root span: ".concat(e," = ").concat(t," ").concat(n)),o.addEvent(e,{[Jo]:t,[Yo]:n}))}function pf(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},o=r[Yo],s=r[Jo];
12typeof o=="string"&&typeof s=="number"&&(t[n.name]={value:s,unit:o})}),t}function hf(){return Zr(Lt()).segmentSpanCaptureStrategy}function ft(e){return e.getOptions().traceLifecycle==="stream"}const mf=1e3;class qi{constructor(t={}){this._traceId=t.traceId||xt(),this._spanId=t.spanId||Jt(),this._startTime=t.startTimestamp||me(),this._links=t.links,this._attributes={},this.setAttributes({[G]:"manual",[ae]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this._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?Wi:Xh}}setAttribute(t,n){return this._frozen?this:(n===void 0?delete this._attributes[t]:this._attributes[t]=n,t===ue&&n!==void 0&&nf(this)&&Jb(this),this)}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._frozen||(this._startTime=Kt(t))}setStatus(t){return this._frozen?this:(this._status=t,this)}updateName(t){return this._frozen?this:(this._name=t,nf(this)||this.setAttribute(ue,"custom"),this)}end(t){if(this._endTime){this._frozen=rf(this);return}this._endTime=Kt(t),kE(this),this._onSpanEnded(),this._frozen=rf(this)}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[ae],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:im(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[G],profile_id:this._attributes[gu],exclusive_time:this._attributes[An],measurements:pf(this._events),is_segment:this._isStandaloneSpan&&Te(this)===this||void 0,segment_id:this._isStandaloneSpan?Te(this).spanContext().spanId:void 0,links:em(this._links)}}getStreamedSpanJSON(){var t,n;return{name:(t=this._name)!=null?t:"",span_id:this._spanId,trace_id:this._traceId,parent_span_id:this._parentSpanId,start_timestamp:this._startTime,end_timestamp:(n=this._endTime)!=null?n:this._startTime,is_segment:this._isStandaloneSpan||this===Te(this),status:yu(this._status),attributes:am(this._attributes,this._status),links:tm(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){if(this._frozen)return this;A&&_.log("[Tracing] Adding an event to span:",t);const o=gf(n)?n:r||me(),s=gf(n)?{}:n||{},i={name:t,time:Kt(o),attributes:s};return this._events.push(i),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=C();t&&(t.emit("spanEnd",this),this._isStandaloneSpan||t.emit("afterSpanEnd",this));const n=Te(this),r=this._isStandaloneSpan||this===n;if(this._isStandaloneSpan){this._sampled?CE(wE([this],t)):(A&&_.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=hf();if(i){const a=zn(this).scope||W();i.onChildSpanEnded(this,n,c=>this._convertSpanToTransaction(c),a)}return}if(t&&ft(t)){t.emit("afterSegmentSpanEnd",this);return}const o=zn(this).scope||W(),s=hf();if(s)s.onSegmentSpanEnded(i=>this._convertSpanToTransaction(i),o);else{const i=this._convertSpanToTransaction();i&&o.captureEvent(i)}}_convertSpanToTransaction(t={}){var l,d,p,h;if(!_f(U(this)))return;this._name||(A&&_.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:n,isolationScope:r}=zn(this),o=(l=n==null?void 0:n.getScopeData().sdkProcessingMetadata)==null?void 0:l.normalizedRequest;if(this._sampled!==!0)return;(d=t.onSpanCaptured)==null||d.call(t,this);const s=[];for(const m of To(this)){if(m===this||AE(m)||(p=t.isSpanAlreadyCaptured)!=null&&p.call(t,m))continue;const g=U(m);_f(g)&&((h=t.onSpanCaptured)==null||h.call(t,m),s.push(g))}const i=this._attributes[ue];delete this._attributes[_c];let a=!1;
12s.forEach(m=>{var g;delete m.data[_c],(g=m.op)!=null&&g.startsWith("gen_ai.")&&(a=!0)});const c={contexts:{trace:aE(this)},spans:s.length>mf?s.sort((m,g)=>m.start_timestamp-g.start_timestamp).slice(0,mf):s,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:n,capturedSpanIsolationScope:r,dynamicSamplingContext:It(this),hasGenAiSpans:a},request:o,...i&&{transaction_info:{source:i}}},u=pf(this._events);return u&&Object.keys(u).length&&(A&&_.log("[Measurements] Adding measurements to transaction event",JSON.stringify(u,void 0,2)),c.measurements=u),c}}function gf(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function _f(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function AE(e){return e instanceof qi&&e.isStandaloneSpan()}function CE(e){const t=C();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function bu(e,t,n=()=>{},r=()=>{}){let o;try{o=e()}catch(s){throw t(s),n(),s}return NE(o,t,n,r)}function NE(e,t,n,r){return Rn(e)?Lh(e,o=>{n(),r(o)},o=>{t(o),n()}):(n(),r(e),e)}function ME(e,t,n){if(!Ge(e))return[!1];let r,o;typeof e.tracesSampler=="function"?(o=e.tracesSampler({...t,inheritOrSampleWith:a=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):a}),r=!0):t.parentSampled!==void 0?o=t.parentSampled:typeof e.tracesSampleRate<"u"&&(o=e.tracesSampleRate,r=!0);const s=Xn(o);if(s===void 0)return A&&_.warn("[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ".concat(JSON.stringify(o)," of type ").concat(JSON.stringify(typeof o),".")),[!1];if(!s)return A&&_.log("[Tracing] Discarding transaction because ".concat(typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),[!1,s,r];const i=n<s;return i||A&&_.log("[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ".concat(Number(o),")")),[i,s,r]}const bc="__SENTRY_SUPPRESS_TRACING__";function $t(e,t){const n=ar();if(n.startSpan)return n.startSpan(e,t);const r=Iu(e),{forceTransaction:o,parentSpan:s,scope:i}=e,a=i==null?void 0:i.clone();return Ye(a,()=>gm(s)(()=>{const u=W(),f=wu(u,s),l=C(),p=e.onlyIfParent&&!f?vu(u,l):Tu({parentSpan:f,spanArguments:r,forceTransaction:o,scope:u});return(!Gi(p)||!f)&&Ot(u,p),bu(()=>t(p),()=>{const{status:h}=U(p);p.isRecording()&&(!h||h==="ok")&&p.setStatus({code:ee,message:"internal_error"})},()=>{p.end()})}))}function qt(e,t){const n=ar();if(n.startSpanManual)return n.startSpanManual(e,t);const r=Iu(e),{forceTransaction:o,parentSpan:s,scope:i}=e,a=i==null?void 0:i.clone();return Ye(a,()=>gm(s)(()=>{const u=W(),f=wu(u,s),d=e.onlyIfParent&&!f?vu(u,C()):Tu({parentSpan:f,spanArguments:r,forceTransaction:o,scope:u});return(!Gi(d)||!f)&&Ot(u,d),bu(()=>t(d,()=>d.end()),()=>{const{status:p}=U(d);d.isRecording()&&(!p||p==="ok")&&d.setStatus({code:ee,message:"internal_error"})})}))}function Ve(e){const t=ar();return t.startInactiveSpan?t.startInactiveSpan(e):xE(e)}function xE(e){const t=Iu(e),{forceTransaction:n,parentSpan:r}=e;return(e.scope?s=>Ye(e.scope,s):r!==void 0?s=>er(r,s):s=>s())(()=>{const s=W(),i=wu(s,r),a=C();return e.onlyIfParent&&!i?vu(s,a):Tu({parentSpan:i,spanArguments:t,forceTransaction:n,scope:s})})}const OE=(e,t)=>{const n=Lt(),r=kn(n);if(r.continueTrace)return r.continueTrace(e,t);const{sentryTrace:o,baggage:s}=e,i=C(),a=_u(s);return i&&!iE(i,a==null?void 0:a.org_id)?mm(t):Ye(c=>{const u=Yh(o,s);return c.setPropagationContext(u),Ot(c,void 0),t()})};function er(e,t){const n=ar();return n.withActiveSpan?n.withActiveSpan(e,t):Ye(r=>(Ot(r,e||void 0),t(r)))}function hm(e){const t=ar();return t.suppressTracing?t.suppressTracing(e):Ye(n=>{n.setSDKProcessingMetadata({[bc]:!0});const r=e();return n.setSDKProcessingMetadata({[bc]:void 0}),r})}function Eu(e=W()){const t=ar();return t.isTracingSuppressed?t.isTracingSuppressed(e):e.getScopeData().sdkProcessingMetadata[bc]===!0}
12function mm(e){const t=ar();return t.startNewTrace?t.startNewTrace(e):Ye(n=>(n.setPropagationContext({traceId:xt(),sampleRand:Yt()}),A&&_.log("Starting a new trace with id ".concat(n.getPropagationContext().traceId)),er(null,e)))}function vu(e,t){t==null||t.recordDroppedEvent("no_parent_span","span");const n=new Qn({traceId:e.getPropagationContext().traceId});return $r(n,e,_e()),n}function Tu({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){var a;const o=_e();if(!Ge()){const c={...o.getPropagationContext(),...r.getPropagationContext()},u=e?e.spanContext().traceId:c.traceId,f=new Qn({traceId:u});return e&&!n&&Ws(e,f),$r(f,r,o),f}const s=C();if(LE(s,t)){Eu(r)||s==null||s.recordDroppedEvent("ignored","span");const c=new Qn({dropReason:"ignored",traceId:(a=e==null?void 0:e.spanContext().traceId)!=null?a:r.getPropagationContext().traceId});return e&&!n&&Ws(e,c),$r(c,r,o),c}let i;if(e&&!n)i=PE(e,r,t,o),Ws(e,i);else if(e){const c=It(e),{traceId:u,spanId:f}=e.spanContext(),l=nn(e);i=yf({traceId:u,parentSpanId:f,...t},r,o,l),lf(i,c)}else{const{traceId:c,dsc:u,parentSpanId:f,sampled:l}={...o.getPropagationContext(),...r.getPropagationContext()};i=yf({traceId:c,parentSpanId:f,...t},r,o,l),u&&lf(i,u)}return RE(i),i}function Iu(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=Kt(e.startTime),delete r.startTime,r}return n}function ar(){const e=Lt();return kn(e)}function yf(e,t,n,r){var g,y;const o=C(),s=(o==null?void 0:o.getOptions())||{},{name:i=""}=e,a={spanAttributes:{...e.attributes},spanName:i,parentSampled:r};o==null||o.emit("beforeSampling",a,{decision:!1});const c=(g=a.parentSampled)!=null?g:r,u=a.spanAttributes,f=t.getPropagationContext(),l=Eu(t),[d,p,h]=l?[!1]:ME(s,{name:i,parentSampled:c,attributes:u,normalizedRequest:n.getScopeData().sdkProcessingMetadata.normalizedRequest,parentSampleRate:Xn((y=f.dsc)==null?void 0:y.sample_rate)},f.sampleRand),m=new qi({...e,attributes:{[ue]:"custom",[Hi]:p!==void 0&&h?p:void 0,...u},sampled:d});return!d&&o&&!l&&(A&&_.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),o.recordDroppedEvent("sample_rate",ft(o)?"span":"transaction")),$r(m,t,n),o&&o.emit("spanStart",m),m}function PE(e,t,n,r){const{spanId:o,traceId:s}=e.spanContext(),i=Eu(t),a=i?!1:nn(e),c=a?new qi({...n,parentSpanId:o,traceId:s,sampled:a}):new Qn({traceId:s});Ws(e,c),$r(c,t,r);const u=C();return u&&(ft(u)&&Br(c)&&(Br(e)&&e.dropReason?(c.dropReason=e.dropReason,u.recordDroppedEvent(e.dropReason,"span")):i||(c.dropReason="sample_rate",u.recordDroppedEvent("sample_rate","span"))),u.emit("spanStart",c),n.endTimestamp&&(u.emit("spanEnd",c),u.emit("afterSpanEnd",c))),c}function wu(e,t){if(t)return t;if(t===null)return;const n=Lr(e);if(!n)return;const r=C();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?Te(n):n}function gm(e){return e!==void 0?t=>er(e,t):t=>t()}function LE(e,t){var r;const n=e==null?void 0:e.getOptions().ignoreSpans;return!e||!ft(e)||!(n!=null&&n.length)?!1:Oo({description:t.name||"",op:((r=t.attributes)==null?void 0:r[ae])||t.op,attributes:t.attributes},n)}function Gi(e){return Br(e)&&e.dropReason==="ignored"}const js={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},DE="heartbeatFailed",FE="idleTimeout",$E="finalTimeout",BE="externalFinish";function _m(e,t={}){const n=new Map;let r=!1,o,s=BE,i=!t.disableAutoFinish;const a=[],{idleTimeout:c=js.idleTimeout,finalTimeout:u=js.finalTimeout,childSpanTimeout:f=js.childSpanTimeout,beforeSpanEnd:l,trimIdleSpanEndTimestamp:d=!0}=t,p=C(),h=W();if(!p||!Ge()){const S=new Qn({traceId:h.getPropagationContext().traceId});return $r(S,h,_e()),S}const m=Ie(),g=UE(e);g.end=new Proxy(g.end,{apply(S,O,$){if(l&&l(g),Br(O))return;const[T,...P]=$,N=T||me(),L=Kt(N),B=To(g).filter(x=>x!==g),Q=U(g);if(!B.length||!d)return I(L),Reflect.apply(S,O,[L,...P]);const te=p.getOptions().ignoreSpans,F=B==null?void 0:B.reduce((x,V)=>{const oe=U(V);return!oe.timestamp||te&&Oo({description:oe.description,op:oe.op,attributes:oe.data},te)?x:x?Math.max(x,oe.timestamp):oe.timestamp},void 0),M=Q.start_timestamp,K=Math.min(M?M+u/1e3:1/0,Math.max(M||-1/0,Math.min(L,F||1/0)));return I(K),Reflect.apply(S,O,[K,...P])}});function y(){o&&(clearTimeout(o),o=void 0)}function b(S){y(),o=setTimeout(()=>{!r&&n.size===0&&i&&(s=FE,g.end(S))},c)}function E(S){o=setTimeout(()=>{!r&&i&&(s=DE,g.end(S))},f)}function v(S){y(),n.set(S,!0);const O=me();E(O+f/1e3)}
12function R(S){if(n.has(S)&&n.delete(S),n.size===0){const O=me();b(O+c/1e3)}}function I(S){r=!0,n.clear(),a.forEach(B=>B()),Ot(h,m);const O=U(g),{start_timestamp:$}=O;if(!$)return;O.data[Mo]||g.setAttribute(Mo,s);const P=O.status;(!P||P==="unknown")&&g.setStatus({code:Ko}),_.log('[Tracing] Idle span "'.concat(O.op,'" finished'));const N=To(g).filter(B=>B!==g);let L=0;N.forEach(B=>{B.isRecording()&&(B.setStatus({code:ee,message:"cancelled"}),B.end(S),A&&_.log("[Tracing] Cancelling span since span ended early",JSON.stringify(B,void 0,2)));const Q=U(B),{timestamp:te=0,start_timestamp:F=0}=Q,M=F<=S,K=(u+c)/1e3,x=te-F<=K;if(A){const V=JSON.stringify(B,void 0,2);M?x||_.log("[Tracing] Discarding span since it finished after idle span final timeout",V):_.log("[Tracing] Discarding span since it happened after idle span was finished",V)}(!x||!M)&&(uE(g,B),L++)}),L>0&&g.setAttribute("sentry.idle_span_discarded_spans",L)}return a.push(p.on("spanStart",S=>{if(r||S===g||U(S).timestamp||S instanceof qi&&S.isStandaloneSpan())return;To(g).includes(S)&&v(S.spanContext().spanId)})),a.push(p.on("spanEnd",S=>{r||R(S.spanContext().spanId)})),a.push(p.on("idleSpanEnableAutoFinish",S=>{S===g&&(i=!0,b(),n.size&&E())})),t.disableAutoFinish||b(),setTimeout(()=>{r||(g.setStatus({code:ee,message:"deadline_exceeded"}),s=$E,g.end())},u),g}function UE(e){const t=Ve(e);return Ot(W(),t),A&&_.log("[Tracing] Started span is an idle span"),t}function HE(e,t,n){let r,o,s;const i=n!=null&&n.maxWait?Math.max(n.maxWait,t):0,a=(n==null?void 0:n.setTimeoutImpl)||setTimeout;function c(){return u(),r=e(),r}function u(){o!==void 0&&clearTimeout(o),s!==void 0&&clearTimeout(s),o=s=void 0}function f(){return o!==void 0||s!==void 0?c():r}function l(){return o&&clearTimeout(o),o=a(c,t),i&&s===void 0&&(s=a(c,i)),r}return l.cancel=u,l.flush=f,l}const WE=["addListener","on","once","prependListener","prependOnceListener","addEventListener"],jE=["removeListener","off","removeEventListener"],ym=Symbol("SentryScopeBoundListeners");let Cr;function zE(e){return Cr!==void 0&&(e===Cr||e.listener===Cr)}function qE(e,t=W()){const n=e;if(Vi(n))return e;Ru(n);for(const r of WE)typeof n[r]=="function"&&(n[r]=VE(n,n[r],t));for(const r of jE)typeof n[r]=="function"&&(n[r]=YE(n,n[r]));return typeof n.removeAllListeners=="function"&&(n.removeAllListeners=JE(n,n.removeAllListeners)),e}function GE(e,t){return function(...n){return Ye(t,()=>e.apply(this,n))}}function Sm(e){return typeof e=="function"}function VE(e,t,n){return function(...r){const o=r[0],s=r[1],i=r.slice(2);if(!Sm(s)||zE(s))return t.apply(this,r);const a=Vi(e)||Ru(e);let c=a.get(o);c||(c=new WeakMap,a.set(o,c));let u=c.get(s);u||(u=GE(s,n),c.set(s,u));const f=Cr;Cr=u;try{return t.call(this,o,u,...i)}finally{Cr=f}}}function YE(e,t){return function(...n){var a,c;const r=n[0],o=n[1],s=n.slice(2),i=Sm(o)?(c=(a=Vi(e))==null?void 0:a.get(r))==null?void 0:c.get(o):void 0;return i?t.call(this,r,i,...s):t.apply(this,n)}}function JE(e,t){return function(...n){const r=Vi(e);if(r)if(n.length===0)Ru(e);else{const o=n[0];r.delete(o)}return t.apply(this,n)}}function Ru(e){const t=new Map;return e[ym]=t,t}function Vi(e){return e[ym]}function KE(e,t){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=t;XE(e,t),r&&ev(e,r),tv(e,n),QE(e,o),ZE(e,s)}function Sf(e,t){const{extra:n,tags:r,attributes:o,user:s,contexts:i,level:a,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:f,eventProcessors:l,attachments:d,propagationContext:p,transactionName:h,span:m}=t;ho(e,"extra",n),ho(e,"tags",r),ho(e,"attributes",o),ho(e,"user",s),ho(e,"contexts",i),e.sdkProcessingMetadata=Vo(e.sdkProcessingMetadata,c,2),a&&(e.level=a),h&&(e.transactionName=h),m&&(e.span=m),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),f.length&&(e.fingerprint=[...e.fingerprint,...f]),l.length&&(e.eventProcessors=[...e.eventProcessors,...l]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...p}}function ho(e,t,n){e[t]=Vo(e[t],n,1)}function Zo(e,t){const n=jn().getScopeData();return e&&Sf(n,e.getScopeData()),t&&Sf(n,t.getScopeData()),n}function XE(e,t){const{extra:n,tags:r,user:o,contexts:s,level:i,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(o).length&&(e.user={...o,...e.user}),Object.keys(s).length&&(e.contexts={...s,...e.contexts}),i&&(e.level=i),a&&e.type!=="transaction"&&(e.transaction=a)}function QE(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function ZE(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function ev(e,t){e.contexts={trace:Qh(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:It(t),...e.sdkProcessingMetadata};const n=Te(t),r=U(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function tv(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}function nv(e){const t={},{response:n,profile:r,cloud_resource:o,culture:s,state:i}=e;if(n&&(n.status_code!=null&&(t["http.response.status_code"]=n.status_code),n.body_size!=null&&(t["http.response.body.size"]=n.body_size)),r&&(r.profile_id&&(t["sentry.profile_id"]=r.profile_id),r.profiler_id&&(t["sentry.profiler_id"]=r.profiler_id)),o)for(const[u,f]of Object.entries(o))f!=null&&(t[u]=f);s&&(s.locale&&(t["culture.locale"]=s.locale),s.timezone&&(t["culture.timezone"]=s.timezone)),i!=null&&i.state&&typeof i.state.type=="string"&&(t["state.type"]=i.state.type);const a=e.angular;if(a){const u=a.version;(typeof u=="string"||typeof u=="number")&&(t["angular.version"]=u)}const c=e.react;if(c){const u=c.version;(typeof u=="string"||typeof u=="number")&&(t["react.version"]=u)}return t}const bm="graphql.document",Em="http.url",rv="params",ov="sentry.sdk.name",sv="sentry.sdk.version",iv="sentry.segment.id",ku="sentry.segment.name",av="sentry.trace_lifecycle",vm="sentry.transaction",Cn="url.full",Tm="url.path",cv="url.path.parameter",et="url.template";function uv(e,t){var d;const n=fi(e),r=di(e),o=fi(r),{isolationScope:s,scope:i}=zn(e),a=Zo(s,i);dv(n,o,t,a);const c=e.kind;t.emit("preprocessSpan",n,{spanKind:c}),n.is_segment&&(lv(n,a),fv(n,t),t.emit("processSegmentSpan",n)),t.emit("processSpan",n);const{beforeSendSpan:u}=t.getOptions(),f=u&&zi(u)?pv(n,u):n,l=(d=f.attributes)==null?void 0:d[ue];return n.is_segment&&l&&_n(f,{"sentry.segment.name.source":l}),{...rm(f),_segmentSpan:r}}function lv(e,t){const n=nv(t.contexts);_n(e,n)}function _n(e,t){var r;const n=(r=e.attributes)!=null?r:e.attributes={};Object.entries(t).forEach(([o,s])=>{s!=null&&!(o in n)&&(n[o]=s)})}function fv(e,t){const n=t.getIntegrationNames();n.length&&_n(e,{[$b]:n})}function dv(e,t,n,r){var a,c,u,f,l,d;
12const o=n.getSdkMetadata(),{release:s,environment:i}=n.getOptions();_n(e,{[av]:"stream",[ku]:t.name,[iv]:t.span_id,[ov]:(a=o==null?void 0:o.sdk)==null?void 0:a.name,[sv]:(c=o==null?void 0:o.sdk)==null?void 0:c.version,[Db]:s,[Fb]:i||Xo,[Bb]:(u=r.user)==null?void 0:u.id,[Ub]:(f=r.user)==null?void 0:f.email,[Hb]:(l=r.user)==null?void 0:l.ip_address,[Wb]:(d=r.user)==null?void 0:d.username,...r.attributes})}function pv(e,t){const n=t(e);return n||(pi(),e)}const Fa=0,bf=1,Ef=2;function es(e){return new Po(t=>{t(e)})}function Au(e){return new Po((t,n)=>{n(e)})}class Po{constructor(t){this._state=Fa,this._handlers=[],this._runExecutor(t)}then(t,n){return new Po((r,o)=>{this._handlers.push([!1,s=>{if(!t)r(s);else try{r(t(s))}catch(i){o(i)}},s=>{if(!n)o(s);else try{r(n(s))}catch(i){o(i)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new Po((n,r)=>{let o,s;return this.then(i=>{s=!1,o=i,t&&t()},i=>{s=!0,o=i,t&&t()}).then(()=>{if(s){r(o);return}n(o)})})}_executeHandlers(){if(this._state===Fa)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===bf&&n[1](this._value),this._state===Ef&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(s,i)=>{if(this._state===Fa){if(Rn(i)){i.then(r,o);return}this._state=s,this._value=i,this._executeHandlers()}},r=s=>{n(bf,s)},o=s=>{n(Ef,s)};try{t(r,o)}catch(s){o(s)}}}function hv(e,t,n,r=0){try{const o=Ec(t,n,e,r);return Rn(o)?o:es(o)}catch(o){return Au(o)}}function Ec(e,t,n,r){const o=n[r];if(!e||!o)return e;const s=o({...e},t);return A&&s===null&&_.log('Event processor "'.concat(o.id||"?",'" dropped event')),Rn(s)?s.then(i=>Ec(i,t,n,r+1)):Ec(s,t,n,r+1)}let Wt,vf,Tf,rn;function Im(e){const t=H._sentryDebugIds,n=H._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],o=n?Object.keys(n):[];if(rn&&r.length===vf&&o.length===Tf)return rn;vf=r.length,Tf=o.length,rn={},Wt||(Wt={});const s=(i,a)=>{for(const c of i){const u=a[c],f=Wt==null?void 0:Wt[c];if(f&&rn&&u)rn[f[0]]=u,Wt&&(Wt[c]=[f[0],u]);else if(u){const l=e(c);for(let d=l.length-1;d>=0;d--){const p=l[d],h=p==null?void 0:p.filename;if(h&&rn&&Wt){rn[h]=u,Wt[c]=[h,u];break}}}}};return t&&s(r,t),n&&s(o,n),rn}function mv(e,t){const n=Im(e);if(!n)return[];const r=[];for(const o of t){const s=eb(o);s&&n[s]&&r.push({type:"sourcemap",code_file:o,debug_id:n[s]})}return r}function wm(e,t,n,r,o,s){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||Me(),timestamp:t.timestamp||ir()},u=n.integrations||e.integrations.map(y=>y.name);gv(c,e),Sv(c,u),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&_v(c,e.stackParser);const f=Ev(r,n.captureContext);n.mechanism&&At(c,n.mechanism);const l=o?o.getEventProcessors():[],d=Zo(s,f),p=[...n.attachments||[],...d.attachments];p.length&&(n.attachments=p),KE(c,d);const h=[...l,...d.eventProcessors];return(n.data&&n.data.__sentry__===!0?es(c):hv(h,c,n)).then(y=>(y&&yv(y),typeof i=="number"&&i>0?bv(y,i,a):y))}function gv(e,t){var a,c;const{environment:n,release:r,dist:o,maxValueLength:s}=t;e.environment=e.environment||n||Xo,!e.release&&r&&(e.release=r),!e.dist&&o&&(e.dist=o);const i=e.request;i!=null&&i.url&&s&&(i.url=No(i.url,s)),s&&((c=(a=e.exception)==null?void 0:a.values)==null||c.forEach(u=>{u.value&&(u.value=No(u.value,s))}))}function _v(e,t){var r,o;const n=Im(t);(o=(r=e.exception)==null?void 0:r.values)==null||o.forEach(s=>{var i,a;(a=(i=s.stacktrace)==null?void 0:i.frames)==null||a.forEach(c=>{c.filename&&(c.debug_id=n[c.filename])})})}function yv(e){var r,o;const t={};if((o=(r=e.exception)==null?void 0:r.values)==null||o.forEach(s=>{var i,a;(a=(i=s.stacktrace)==null?void 0:i.frames)==null||a.forEach(c=>{c.debug_id&&(c.abs_path?t[c.abs_path]=c.debug_id:c.filename&&(t[c.filename]=c.debug_id),delete c.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(([s,i])=>{n.push({type:"sourcemap",code_file:s,debug_id:i})})}function Sv(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function bv(e,t,n){var o,s;if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:Ne(i.data,t,n)}}))},...e.user&&{user:Ne(e.user,t,n)},...e.contexts&&{contexts:Ne(e.contexts,t,n)},...e.extra&&{extra:Ne(e.extra,t,n)}};return(o=e.contexts)!=null&&o.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Ne(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(i=>({...i,...i.data&&{data:Ne(i.data,t,n)}}))),(s=e.contexts)!=null&&s.flags&&r.contexts&&(r.contexts.flags=Ne(e.contexts.flags,3,n)),r}function Ev(e,t){if(!t)return e;const n=e?e.clone():new Et;return n.update(t),n}function vv(e){if(e)return Tv(e)?{captureContext:e}:wv(e)?{captureContext:e}:e}function Tv(e){return e instanceof Et||typeof e=="function"}const Iv=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function wv(e){return Object.keys(e).some(t=>Iv.includes(t))}function ge(e,t){return W().captureException(e,vv(t))}function Rm(e,t){const n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return W().captureMessage(e,n,r)}function no(e,t){return W().captureEvent(e,t)}function Cu(e,t){_e().setContext(e,t)}
12function Rv(e){_e().setExtras(e)}function kv(e,t){_e().setExtra(e,t)}function Av(e){_e().setTags(e)}function Cv(e,t){_e().setTag(e,t)}function Nv(e){_e().setAttributes(e)}function Mv(e,t){_e().setAttribute(e,t)}function km(e){_e().setUser(e)}function xv(e){_e().setConversationId(e)}function Am(){return _e().lastEventId()}async function Ov(e){const t=C();return t?t.flush(e):(A&&_.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function Pv(e){const t=C();return t?t.close(e):(A&&_.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}function Lv(){return!!C()}function Cm(){const e=C();return(e==null?void 0:e.getOptions().enabled)!==!1&&!!(e!=null&&e.getTransport())}function Nm(e){_e().addEventProcessor(e)}function vc(e){const t=_e(),{user:n}=Zo(t,W()),{userAgent:r}=H.navigator||{},o=bb({user:n,...r&&{userAgent:r},...e}),s=t.getSession();return(s==null?void 0:s.status)==="ok"&&Pr(s,{status:"exited"}),Nu(),t.setSession(o),o}function Nu(){const e=_e(),n=W().getSession()||e.getSession();n&&Eb(n),Mm(),e.setSession()}function Mm(){const e=_e(),t=C(),n=e.getSession();n&&t&&t.captureSession(n)}function zs(e=!1){if(e){Nu();return}Mm()}function Yi(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}const Dv="7";function xm(e){const t=e.protocol?"".concat(e.protocol,":"):"",n=e.port?":".concat(e.port):"";return"".concat(t,"//").concat(e.host).concat(n).concat(e.path?"/".concat(e.path):"","/api/")}function Fv(e){return"".concat(xm(e)).concat(e.projectId,"/envelope/")}function $v(e,t){const n={sentry_version:Dv};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client="".concat(t.name,"/").concat(t.version)),new URLSearchParams(n).toString()}function Om(e,t,n){return t||"".concat(Fv(e),"?").concat($v(e,n))}function Bv(e,t){const n=Gh(e);if(!n)return"";const r="".concat(xm(n),"embed/error-page/");let o="dsn=".concat(Ft(n));for(const s in t)if(s!=="dsn"&&s!=="onClose")if(s==="user"){const i=t.user;if(!i)continue;i.name&&(o+="&name=".concat(encodeURIComponent(i.name))),i.email&&(o+="&email=".concat(encodeURIComponent(i.email)))}else o+="&".concat(encodeURIComponent(s),"=").concat(encodeURIComponent(t[s]));return"".concat(r,"?").concat(o)}const If=[];function Uv(e){const t={};return e.forEach(n=>{const{name:r}=n,o=t[r];o&&!o.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function Hv(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const o=n(t);r=Array.isArray(o)?o:[o]}else r=t;return Uv(r)}function Wv(e,t){const n={};return t.forEach(r=>{r!=null&&r.beforeSetup&&r.beforeSetup(e)}),t.forEach(r=>{r&&Pm(e,r,n)}),n}function wf(e,t){for(const n of t)n!=null&&n.afterAllSetup&&n.afterAllSetup(e)}function Pm(e,t,n){if(n[t.name]){A&&_.log("Integration skipped because it was already installed: ".concat(t.name));return}if(n[t.name]=t,!If.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),If.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",(o,s)=>r(o,s,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),o=Object.assign((s,i)=>r(s,i,e),{id:t.name});e.addEventProcessor(o)}["processSpan","processSegmentSpan"].forEach(r=>{const o=t[r];typeof o=="function"&&e.on(r,s=>o.call(t,s,e))}),A&&_.log("Integration installed: ".concat(t.name))}function Tc(e){const t=C();if(!t){A&&_.warn('Cannot add integration "'.concat(e.name,'" because no SDK Client is available.'));return}t.addIntegration(e)}const jv="sentry.timestamp.sequence";let $a=0,Ba;function Lm(e){const t=Math.floor(e*1e3);Ba!==void 0&&t!==Ba&&($a=0);const n=$a;return $a++,Ba=t,{key:jv,value:{value:n,type:"integer"}}}function Dm(e,t){return t?Ye(t,()=>{const n=Ie(),r=n?Qh(n):Dh(t);return[n?It(n):ji(e,t),r]}):[void 0,void 0]}const zv={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function qv(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function Gv(){/*! __SENTRY_SDK_SOURCE__ */return"npm"}function Vv(){return!qv()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function yn(){return typeof window<"u"&&(!Vv()||Yv())}function Yv(){const e=H.process;return(e==null?void 0:e.type)==="renderer"}function Jv(e,t){const n=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...yn()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function Kv(e,t,n,r,o){const s={};return t!=null&&t.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=Ft(r)),lt(s,[Jv(e,o)])}const Xv=100;function wt(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function Qv(e,t){const n=Mu(),r=$m(e);r===void 0?n.set(e,[t]):r.length>=Xv?(Fm(e,r),n.set(e,[t])):n.set(e,[...r,t])}function gi(e,t=W(),n=Qv){var L,B,Q;const r=(L=t==null?void 0:t.getClient())!=null?L:C();if(!r){A&&_.warn("No client available to capture log.");return}const{release:o,environment:s,enableLogs:i=!1,beforeSendLog:a}=r.getOptions();if(!i){A&&_.warn("logging option not enabled, log will not be captured.");return}const[,c]=Dm(r,t),u={...e.attributes},{user:{id:f,email:l,username:d},attributes:p={}}=Zo(_e(),t);wt(u,"user.id",f,!1),wt(u,"user.email",l,!1),wt(u,"user.name",d,!1),wt(u,"sentry.release",o),wt(u,"sentry.environment",s);const{name:h,version:m}=(Q=(B=r.getSdkMetadata())==null?void 0:B.sdk)!=null?Q:{};wt(u,"sentry.sdk.name",h),wt(u,"sentry.sdk.version",m);const g=r.getIntegrationByName("Replay"),y=g==null?void 0:g.getReplayId(!0);wt(u,"sentry.replay_id",y),y&&(g==null?void 0:g.getRecordingMode())==="buffer"&&wt(u,"sentry._internal.replay_is_buffering",!0);const b=e.message;
12if(Bi(b)){const{__sentry_template_string__:te,__sentry_template_values__:F=[]}=b;F!=null&&F.length&&(u["sentry.message.template"]=te),F.forEach((M,K)=>{u["sentry.message.parameter.".concat(K)]=M})}const E=Lr(t);wt(u,"sentry.trace.parent_span_id",E==null?void 0:E.spanContext().spanId);const v={...e,attributes:u};r.emit("beforeCaptureLog",v);const R=a?tn(()=>a(v)):v;if(!R){r.recordDroppedEvent("before_send","log_item",1),A&&_.warn("beforeSendLog returned null, log will not be captured.");return}const{level:I,message:S,attributes:O={},severityNumber:$}=R,T=me(),P=Lm(T),N={timestamp:T,level:I,body:Ic(String(S)),trace_id:c==null?void 0:c.trace_id,severity_number:$!=null?$:zv[I],attributes:Zv({...Fr(p),...Fr(O,!0),[P.key]:P.value})};n(r,N),r.emit("afterCaptureLog",R)}function Fm(e,t){var s;const n=(s=t!=null?t:$m(e))!=null?s:[];if(n.length===0)return;const r=e.getOptions(),o=Kv(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);Mu().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function $m(e){return Mu().get(e)}function Mu(){return eo("clientToLogBufferMap",()=>new WeakMap)}function Zv(e){const t={};for(const[n,r]of Object.entries(e)){const o=Ic(n);r.type==="string"?t[o]={...r,value:Ic(r.value)}:t[o]=r}return t}function Ic(e){const t=Object(e),n=t.isWellFormed,r=t.toWellFormed;return typeof n=="function"&&typeof r=="function"?n.call(e)?e:r.call(e):e}function eT(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,...yn()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function tT(e,t,n,r,o){const s={};return t!=null&&t.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=Ft(r)),lt(s,[eT(e,o)])}const nT=1e3;function jt(e,t,n,r=!0){n&&(r||!(t in e))&&(e[t]=n)}function rT(e,t){const n=xu(),r=Um(e);r===void 0?n.set(e,[t]):r.length>=nT?(Bm(e,r),n.set(e,[t])):n.set(e,[...r,t])}function oT(e,t,n){var f,l;const{release:r,environment:o}=t.getOptions(),s={...e.attributes};jt(s,"user.id",n.id,!1),jt(s,"user.email",n.email,!1),jt(s,"user.name",n.username,!1),jt(s,"sentry.release",r),jt(s,"sentry.environment",o);const{name:i,version:a}=(l=(f=t.getSdkMetadata())==null?void 0:f.sdk)!=null?l:{};jt(s,"sentry.sdk.name",i),jt(s,"sentry.sdk.version",a);const c=t.getIntegrationByName("Replay"),u=c==null?void 0:c.getReplayId(!0);return jt(s,"sentry.replay_id",u),u&&(c==null?void 0:c.getRecordingMode())==="buffer"&&jt(s,"sentry._internal.replay_is_buffering",!0),{...e,attributes:s}}function sT(e,t,n,r){const[,o]=Dm(t,n),s=Lr(n),i=s?s.spanContext().traceId:o==null?void 0:o.trace_id,a=s?s.spanContext().spanId:void 0,c=me(),u=Lm(c);return{timestamp:c,trace_id:i!=null?i:"",span_id:a,name:e.name,type:e.type,unit:e.unit,value:e.value,attributes:{...Fr(r),...Fr(e.attributes,"skip-undefined"),[u.key]:u.value}}}function iT(e,t){var m,g,y,b;const n=(m=t==null?void 0:t.scope)!=null?m:W(),r=(g=t==null?void 0:t.captureSerializedMetric)!=null?g:rT,o=(y=n==null?void 0:n.getClient())!=null?y:C();if(!o){A&&_.warn("No client available to capture metric.");return}const{_experiments:s,enableMetrics:i,beforeSendMetric:a}=o.getOptions();if(!((b=i!=null?i:s==null?void 0:s.enableMetrics)!=null?b:!0)){A&&_.warn("metrics option not enabled, metric will not be captured.");return}const{user:u,attributes:f}=Zo(_e(),n),l=oT(e,o,u);
12o.emit("processMetric",l);const d=a||(s==null?void 0:s.beforeSendMetric),p=d?d(l):l;if(!p){A&&_.log("`beforeSendMetric` returned `null`, will not send metric.");return}const h=sT(p,o,n,f);A&&_.log("[Metric]",h),r(o,h),o.emit("afterCaptureMetric",p)}function Bm(e,t){var s;const n=(s=t!=null?t:Um(e))!=null?s:[];if(n.length===0)return;const r=e.getOptions(),o=tT(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);xu().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function Um(e){return xu().get(e)}function xu(){return eo("clientToMetricBufferMap",()=>new WeakMap)}function aT(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 rm(t)}function cT(e,t){var s,i,a;if(e.type!=="transaction"||!((s=e.spans)!=null&&s.length)||!((i=e.sdkProcessingMetadata)!=null&&i.hasGenAiSpans)||t.getOptions().streamGenAiSpans===!1||ft(t))return;const n=[],r=[];for(const c of e.spans)(a=c.op)!=null&&a.startsWith("gen_ai.")?n.push(aT(c)):r.push(c);if(n.length===0)return;e.spans=r;const o=t.getDataCollectionOptions().userInfo?"auto":"never";return[{type:"span",item_count:n.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...yn()&&{ingest_settings:{infer_ip:o,infer_user_agent:o}},items:n}]}const Ou=Symbol.for("SentryBufferFullError");function Pu(e=100){const t=new Set;function n(){return t.size<e}function r(i){t.delete(i)}function o(i){if(!n())return Au(Ou);const a=i();return t.add(a),a.then(()=>r(a),()=>r(a)),a}function s(i){if(!t.size)return es(!0);const a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!i)return a;const c=[a,new Promise(u=>Yi(setTimeout(()=>u(!1),i)))];return Promise.race(c)}return{get $(){return Array.from(t)},add:o,drain:s}}const uT=60*1e3;function Hm(e,t=Dt()){const n=parseInt("".concat(e),10);if(!isNaN(n))return n*1e3;const r=Date.parse("".concat(e));return isNaN(r)?uT:r-t}function lT(e,t){return e[t]||e.all||0}function Wm(e,t,n=Dt()){return lT(e,t)>n}function jm(e,{statusCode:t,headers:n},r=Dt()){const o={...e},s=n==null?void 0:n["x-sentry-rate-limits"],i=n==null?void 0:n["retry-after"];if(s)for(const a of s.trim().split(",")){const[c,u,,,f]=a.split(":",5),l=parseInt(c,10),d=(isNaN(l)?60:l)*1e3;if(!u)o.all=r+d;else for(const p of u.split(";"))p==="metric_bucket"?(!f||f.split(";").includes("custom"))&&(o[p]=r+d):o[p]=r+d}else i?o.all=r+Hm(i,r):t===429&&(o.all=r+60*1e3);return o}const zm=64;function qm(e,t,n=Pu(e.bufferSize||zm)){let r={};const o=i=>n.drain(i);function s(i){const a=[];if(Zn(i,(l,d)=>{const p=df(d);Wm(r,p)?e.recordDroppedEvent("ratelimit_backoff",p):a.push(l)}),a.length===0)return Promise.resolve({});const c=lt(i[0],a),u=l=>{if(Sc(c,["client_report"])){A&&_.warn("Dropping client report. Will not send outcomes (reason: ".concat(l,")."));return}Zn(c,(d,p)=>{e.recordDroppedEvent(l,df(p))})},f=()=>t({body:mi(c)}).then(l=>l.statusCode===413?(A&&_.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),u("send_error"),l):(A&&l.statusCode!==void 0&&(l.statusCode<200||l.statusCode>=300)&&_.warn("Sentry responded with status code ".concat(l.statusCode," to sent event.")),r=jm(r,l),l),l=>{throw u("network_error"),A&&_.error("Encountered error running transport request:",l),l});return n.add(f).then(l=>l,l=>{if(l===Ou)return A&&_.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw l})}return{send:s,flush:o}}function fT(e,t,n){const r=[{type:"client_report"},{timestamp:ir(),discarded_events:e}];return lt(t?{dsn:t}:{},[r])}function Gm(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("".concat(n.type,": ").concat(n.value)))}catch(n){}return t}function dT(e){var c,u,f;const{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:s,data:i,op:a}=(u=(c=e.contexts)==null?void 0:c.trace)!=null?u:{};return{data:i!=null?i:{},description:e.transaction,op:a,parent_span_id:n,span_id:r!=null?r:"",start_timestamp:(f=e.start_timestamp)!=null?f:0,status:o,timestamp:e.timestamp,trace_id:t!=null?t:"",origin:s,profile_id:i==null?void 0:i[gu],exclusive_time:i==null?void 0:i[An],measurements:e.measurements,is_segment:!0}}function pT(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&&{[gu]:e.profile_id},...e.exclusive_time&&{[An]:e.exclusive_time}}}},measurements:e.measurements}}const So="[Filtered]",Is=["forwarded","-ip","remote-","via","-user"],Rf=["auth","token","secret","session","password","passwd","pwd","key","jwt","bearer","sso","saml","csrf","xsrf","credentials","sid","identity","set-cookie","cookie"],hT=[".sid","sessid","remember","oidc","pkce","nonce","__secure-","__host-","awsalb","awselb","akamai","__stripe","cognito","firebase","supabase","sb-","mfa","2fa"];function mT(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}
12,databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:7}:{userInfo:!1,cookies:{deny:Is},httpHeaders:{request:{deny:Is},response:{deny:Is}},httpBodies:[],urlQueryParams:{deny:Is},graphQL:{document:!0,variables:!0},genAI:{inputs:!1,outputs:!1},databaseQueryData:!1,stackFrameVariables:!0,frameContextLines:7}}const gT={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 _T(e){var r,o,s,i,a,c,u,f,l,d,p,h,m,g,y,b,E,v,R,I,S;const t=e.dataCollection!=null?gT:mT(e.sendDefaultPii),n=(r=e.dataCollection)!=null?r:{};return{userInfo:(o=n.userInfo)!=null?o:t.userInfo,cookies:(s=n.cookies)!=null?s:t.cookies,httpHeaders:{request:(a=(i=n.httpHeaders)==null?void 0:i.request)!=null?a:t.httpHeaders.request,response:(u=(c=n.httpHeaders)==null?void 0:c.response)!=null?u:t.httpHeaders.response},httpBodies:(f=n.httpBodies)!=null?f:t.httpBodies,urlQueryParams:(d=(l=n.urlQueryParams)!=null?l:n.queryParams)!=null?d:t.urlQueryParams,graphQL:{document:(h=(p=n.graphQL)==null?void 0:p.document)!=null?h:t.graphQL.document,variables:(g=(m=n.graphQL)==null?void 0:m.variables)!=null?g:t.graphQL.variables},genAI:{inputs:(b=(y=n.genAI)==null?void 0:y.inputs)!=null?b:t.genAI.inputs,outputs:(v=(E=n.genAI)==null?void 0:E.outputs)!=null?v:t.genAI.outputs},databaseQueryData:(R=n.databaseQueryData)!=null?R:t.databaseQueryData,stackFrameVariables:(I=n.stackFrameVariables)!=null?I:t.stackFrame
12Variables,frameContextLines:(S=n.frameContextLines)!=null?S:t.frameContextLines}}const kf="Not capturing exception because it's already been captured.",Af="Discarded session because of missing or non-string release",Vm=Symbol.for("SentryInternalError"),Ym=Symbol.for("SentryDoNotSendEventError"),yT=5e3;function qs(e){return{message:e,[Vm]:!0}}function Ua(e){return{message:e,[Ym]:!0}}function Cf(e){return at(e)&&Vm in e}function Nf(e){return at(e)&&Ym in e}function Mf(e,t,n,r,o){let s=0,i,a=!1;e.on(n,()=>{s=0,clearTimeout(i),a=!1}),e.on(t,c=>{var u;if(s+=r(c),s>=8e5)o(e);else if(!a){const f=(u=e.getOptions()._flushInterval)!=null?u:yT;f>0&&(a=!0,i=Yi(setTimeout(()=>{o(e)},f)))}}),e.on("flush",()=>{o(e)})}class ST{constructor(t){var r,o,s,i,a,c,u;if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Pu((o=(r=t.transportOptions)==null?void 0:r.bufferSize)!=null?o:zm),this._dataCollection=_T(t),t.dsn?this._dsn=Gh(t.dsn):A&&_.warn("No DSN provided, client will not send events."),this._dsn){const f=Om(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:f})}this._options.enableLogs=(i=this._options.enableLogs)!=null?i:(s=this._options._experiments)==null?void 0:s.enableLogs,this._options.enableLogs&&Mf(this,"afterCaptureLog","flushLogs",TT,Fm),((u=(c=this._options.enableMetrics)!=null?c:(a=this._options._experiments)==null?void 0:a.enableMetrics)!=null?u:!0)&&Mf(this,"afterCaptureMetric","flushMetrics",vT,Bm)}captureException(t,n,r){const o=Me();if(Xl(t))return A&&_.log(kf),o;const s={event_id:o,...n};return this._process(()=>this.eventFromException(t,s).then(i=>this._captureEvent(i,s,r)).then(i=>i),"error"),s.event_id}captureMessage(t,n,r,o){const s={event_id:Me(),...r},i=Bi(t)?t:String(t),a=Mt(t),c=a?this.eventFromMessage(i,n,s):this.eventFromException(t,s);return this._process(()=>c.then(u=>this._captureEvent(u,s,o)),a?"unknown":"error"),s.event_id}captureEvent(t,n,r){const o=Me();if(n!=null&&n.originalException&&Xl(n.originalException))return A&&_.log(kf),o;const s={event_id:o,...n},i=t.sdkProcessingMetadata||{},a=i.capturedSpanScope,c=i.capturedSpanIsolationScope,u=xf(t.type);return this._process(()=>this._captureEvent(t,s,a||r,c),u),s.event_id}captureSession(t){this.sendSession(t),Pr(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;if(this.emit("flush"),!n)return!0;const r=await this._isClientDoneProcessing(t),o=await n.flush(t);return r&&o}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),Pm(this,t,this._integrations),n||wf(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);const r=cT(t,this);let o=IE(t,this._dsn,this._options._metadata,this._options.tunnel);for(const s of n.attachments||[])o=ff(o,bE(s));r&&(o=ff(o,r)),this.sendEnvelope(o).then(s=>this.emit("afterSendEvent",t,s))}sendSession(t){const{release:n,environment:r=Xo}=this._options;if("aggregates"in t){const s=t.attrs||{};if(!s.release&&!n){A&&_.warn(Af);return}s.release=s.release||n,s.environment=s.environment||r,t.attrs=s}else{if(!t.release&&!n){A&&_.warn(Af);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const o=TE(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(o)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const o="".concat(t,":").concat(n);A&&_.log('Recording outcome: "'.concat(o,'"').concat(r>1?" (".concat(r," times)"):"")),this._outcomes[o]=(this._outcomes[o]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||new Set,o=(...s)=>n(...s);return r.add(o),()=>{r.delete(o)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(o=>o(...n))}
12async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(n){return A&&_.error("Error while sending envelope:",n),{}}return A&&_.error("Transport disabled"),{}}registerCleanup(t){}dispose(){}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=Wv(this,t),wf(this,t)}_updateSessionFromEvent(t,n){var c,u;let r=n.level==="fatal",o=!1;const s=(c=n.exception)==null?void 0:c.values;if(s){o=!0,r=!1;for(const f of s)if(((u=f.mechanism)==null?void 0:u.handled)===!1){r=!0;break}}const i=t.status==="ok";(i&&t.errors===0||i&&r)&&(Pr(t,{...r&&{status:"crashed"},errors:t.errors||Number(o||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,o){const s=this.getOptions(),i=this.getIntegrationNames();return!n.integrations&&i.length&&(n.integrations=i),this.emit("preprocessEvent",t,n),t.type||o.setLastEventId(t.event_id||n.event_id),wm(s,t,n,r,this,o).then(a=>{var u;if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:{...(u=a.contexts)==null?void 0:u.trace,...Dh(r)},...a.contexts};const c=ji(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=W(),o=_e()){return A&&wc(t)&&_.log("Captured error event `".concat(Gm(t)[0]||"<unknown>","`")),this._processEvent(t,n,r,o).then(s=>s.event_id,s=>{A&&(Nf(s)?_.log(s.message):Cf(s)?_.warn(s.message):_.warn(s))})}_processEvent(t,n,r,o){const s=this.getOptions(),{sampleRate:i}=s,a=Jm(t),c=wc(t),u=t.type||"error",f="before send for type `".concat(u,"`"),l=typeof i>"u"?void 0:Xn(i);if(c&&typeof l=="number"&&Yt()>l)return this.recordDroppedEvent("sample_rate","error"),Au(Ua("Discarding event because it's not included in the random sample (sampling rate = ".concat(i,")")));const d=xf(t.type);return this._prepareEvent(t,n,r,o).then(p=>{var g;if(p===null)throw this.recordDroppedEvent("event_processor",d),Ua("An event processor returned `null`, will not send event.");if(((g=n.data)==null?void 0:g.__sentry__)===!0)return p;const m=ET(this,s,p,n);return bT(m,f)}).then(p=>{var g;if(p===null){if(this.recordDroppedEvent("before_send",d),a){const b=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",b)}throw Ua("".concat(f," returned `null`, will not send event."))}const h=r.getSession()||o.getSession();if(c&&h&&this._updateSessionFromEvent(h,p),a){const y=((g=p.sdkProcessingMetadata)==null?void 0:g.spanCountBeforeProcessing)||0,b=p.spans?p.spans.length:0,E=y-b;E>0&&this.recordDroppedEvent("before_send","span",E)}const m=p.transaction_info;if(a&&m&&p.transaction!==t.transaction){const y="custom";p.transaction_info={...m,source:y}}return this.sendEvent(p,n),p}).then(null,p=>{throw Nf(p)||Cf(p)?p:(this.captureException(p,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:p}),qs("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ".concat(p)))})}_process(t,n){this._numProcessing++,this._promiseBuffer.add(t).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===Ou&&this.recordDroppedEvent("queue_overflow",n),r))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[o,s]=n.split(":");return{reason:o,category:s,quantity:r}})}_flushOutcomes(){A&&_.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){A&&_.log("No outcomes to send");return}if(!this._dsn){A&&_.log("No dsn provided, will not send outcomes");return}A&&_.log("Sending outcomes:",t);const n=fT(t,this._options.tunnel&&Ft(this._dsn));this.sendEnvelope(n)}}function xf(e){return e==="replay_event"?"replay":e||"error"}function bT(e,t){const n="".concat(t," must return `null` or a valid event.");if(Rn(e))return e.then(r=>{if(!He(r)&&r!==null)throw qs(n);return r},r=>{throw qs("".concat(t," rejected with ").concat(r))});if(!He(e)&&e!==null)throw qs(n);return e}function ET(e,t,n,r){const{beforeSend:o,beforeSendTransaction:s,ignoreSpans:i}=t,a=!zi(t.beforeSendSpan)&&t.beforeSendSpan;let c=n;if(wc(c)&&o)return o(c,r);if(Jm(c)){if(a||i){const u=dT(c);if(i!=null&&i.length&&Oo({description:u.description,op:u.op,attributes:u.data},i))return null;if(a){const f=a(u);f?c=Vo(n,pT(f)):pi()}if(c.spans){const f=[],l=c.spans;for(const p of l){if(i!=null&&i.length&&Oo({description:p.description,op:p.op,attributes:p.data},i)){dE(l,p);continue}if(a){const h=a(p);h?f.push(h):(pi(),f.push(p))}else f.push(p)}const d=c.spans.length-f.length;d&&e.recordDroppedEvent("before_send","span",d),c.spans=f}}if(s){if(c.spans){const u=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:u}}return s(c,r)}}return c}function wc(e){return e.type===void 0}function Jm(e){return e.type==="transaction"}function vT(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+Km(e.attributes)}function TT(e){let t=0;return e.message&&(t+=e.message.length*2),t+Km(e.attributes)}function Km(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*Of(n[0]):Mt(n)?t+=Of(n):t+=100}),t}function Of(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function IT(e,t){t.debug===!0&&(A?_.enable():tn(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),W().update(t.initialScope);const r=new e(t);return Xm(r),r.init(),r}function Xm(e){W().setClient(e)}const Ha=100,Wa=5e3,wT=36e5;function RT(e){function t(...n){A&&_.log("[Offline]:",...n)}return n=>{const r=e(n);if(!n.createStore)throw new Error("No `createStore` function was provided");const o=n.createStore(n);let s=Wa,i;function a(l,d,p){return Sc(l,["client_report"])?!1:n.shouldStore?n.shouldStore(l,d,p):!0}function c(l){i&&clearTimeout(i),i=Yi(setTimeout(async()=>{i=void 0;const d=await o.shift();d&&(t("Attempting to send previously queued event"),d[0].sent_at=new Date(Dt()).toISOString(),f(d,!0).catch(p=>{t("Failed to retry sending",p)}))},l))}function u(){i||(c(s),s=Math.min(s*2,wT))}async function f(l,d=!1){var p,h;if(!d&&Sc(l,["replay_event","replay_recording"]))return await o.push(l),c(Ha),{};
12try{if(n.shouldSend&&await n.shouldSend(l)===!1)throw new Error("Envelope not sent because `shouldSend` callback returned false");const m=await r.send(l);let g=Ha;if(m){if((p=m.headers)!=null&&p["retry-after"])g=Hm(m.headers["retry-after"]);else if((h=m.headers)!=null&&h["x-sentry-rate-limits"])g=6e4;else if((m.statusCode||0)>=400)return m}return c(g),s=Wa,m}catch(m){if(await a(l,m,s))return d?await o.unshift(l):await o.push(l),u(),t("Error sending. Event queued.",m),{};throw m}}return n.flushAtStartup&&u(),{send:f,flush:l=>(l===void 0&&(s=Wa,c(Ha)),r.flush(l))}}}const Gs="MULTIPLEXED_TRANSPORT_EXTRA_KEY";function Qm(e,t){let n;return Zn(e,(r,o)=>(t.includes(o)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function kT(e,t){return n=>{const r=e(n);return{...r,send:async o=>{const s=Qm(o,["event","transaction","profile","replay_event"]);return s&&(s.release=t),r.send(o)}}}}function AT(e,t){return lt(t?{...e[0],dsn:t}:e[0],e[1])}function CT(e,t){return n=>{const r=e(n),o=new Map,s=t||(u=>{var l;const f=u.getEvent();return(l=f==null?void 0:f.extra)!=null&&l[Gs]&&Array.isArray(f.extra[Gs])?f.extra[Gs]:[]});function i(u,f){const l=f?"".concat(u,":").concat(f):u;let d=o.get(l);if(!d){const p=jh(u);if(!p)return;const h=Om(p,n.tunnel);d=f?kT(e,f)({...n,url:h}):e({...n,url:h}),o.set(l,d)}return[u,d]}async function a(u){function f(h){const m=h!=null&&h.length?h:["event"];return Qm(u,m)}const l=s({envelope:u,getEvent:f}).map(h=>typeof h=="string"?i(h,void 0):i(h.dsn,h.release)).filter(h=>!!h),d=l.length?l:[["",r]];return(await Promise.all(d.map(([h,m])=>m.send(AT(u,h)))))[0]}async function c(u){const f=[...o.values(),r];return(await Promise.all(f.map(d=>d.flush(u)))).every(d=>d)}return{send:a,flush:c}}}function ja(e,t){return t.some(n=>e.includes(n))}function Lo(e,t,n){if(t===!1)return{};const r=n!=null?[...Rf,...n]:Rf,o={};if(t===!0){for(const i of Object.keys(e))o[i]=ja(i.toLowerCase(),r)?So:e[i];return o}if("deny"in t){const i=t.deny.map(a=>a.toLowerCase());for(const a of Object.keys(e)){const c=a.toLowerCase(),u=ja(c,r)||i.some(f=>c.includes(f));o[a]=u?So:e[a]}return o}const s=t.allow.map(i=>i.toLowerCase());for(const i of Object.keys(e)){const a=i.toLowerCase();if(ja(a,r))o[i]=So;else{const c=s.some(u=>a.includes(u));o[i]=c?e[i]:So}}return o}function NT(e){const t={};let n=0;for(;n<e.length;){const r=e.indexOf("=",n);if(r===-1)break;let o=e.indexOf(";",n);if(o===-1)o=e.length;else if(o<r){n=e.lastIndexOf(";",r-1)+1;continue}const s=e.slice(n,r).trim();if(t[s]===void 0){let i=e.slice(r+1,o).trim();i.charCodeAt(0)===34&&(i=i.slice(1,-1));try{t[s]=i.indexOf("%")!==-1?decodeURIComponent(i):i}catch(a){t[s]=i}}n=o+1}return t}function Rc(e,t){if(t===!1)return{};try{const n=NT(e);return Object.keys(n).length===0?{}:Lo(n,t,hT)}catch(n){return So}}const MT="thismessage:/";function Ji(e){return"isRelative"in e}function Do(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=n?MT:void 0;try{if("canParse"in URL&&!URL.canParse(e,r))return;const o=new URL(e,r);return n?{isRelative:n,pathname:o.pathname,search:o.search,hash:o.hash}:o}catch(o){}}function Zm(e){if(Ji(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 Gn(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 eg(e){return e.split(/[?#]/,1)[0]}function yt(e,t=!0){if(e.startsWith("data:")){const n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",o=e.includes(";base64,"),s=e.indexOf(",");let i="";if(t&&s!==-1){const a=e.slice(s+1);i=a.length>10?"".concat(a.slice(0,10),"... [truncated]"):a}return"data:".concat(r).concat(o?",base64":"").concat(i?",".concat(i):"")}return e}function tg(e,t){const n=t==null?void 0:t.getDsn(),r=t==null?void 0:t.getOptions().tunnel;return OT(e,n)||xT(e,r)}function xT(e,t){return t?Pf(e)===Pf(t):!1}function OT(e,t){const n=Do(e);return!n||Ji(n)||!t?!1:PT(n.hostname,t.host)&&/(^|&|\?)sentry_key=/.test(n.search)}function PT(e,t){return e===t||t.length>0&&e.endsWith(".".concat(t))}function Pf(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function ng(e,...t){const n=new String(String.raw(e,...t));
12return n.__sentry_template_string__=e.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),n.__sentry_template_values__=t,n}const LT=ng;function DT(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 rg(e,t,n=[t],r="npm"){const o=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};o.name||(o.name="sentry.javascript.".concat(t),o.packages=n.map(s=>({name:"".concat(r,":@sentry/").concat(s),version:Vt})),o.version=Vt)}function Lu(e={}){const t=e.client||C();if(!Cm()||!t)return{};const n=Lt(),r=kn(n);if(r.getTraceData)return r.getTraceData(e);const o=e.scope||W(),s=e.span||Ie(),i=Br(s)&&!Ge(t.getOptions()),a=s&&!i?Zh(s):FT(o),c=s?It(s):ji(t,o),u=Wh(c);if(!Vh.test(a))return _.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const l={"sentry-trace":a,baggage:u};return e.propagateTraceparent&&(l.traceparent=s&&!i?cE(s):$T(o)),l}function FT(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Jh(t,r,n)}function $T(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Kh(t,r,n)}const BT=100;function vt(e,t){const n=C(),r=_e();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:s=BT}=n.getOptions();if(s<=0)return;const a={timestamp:ir(),...e},c=o?tn(()=>o(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,s))}const UT="FunctionToString",Lf=new WeakMap,HT=()=>({name:UT,setupOnce(){const e=Function.prototype.toString;try{Function.prototype.toString=function(...t){const n=mu(this);let r;try{Lf.has(C())&&n!==void 0&&(r=n)}catch(o){}return e.apply(r!=null?r:this,t)}}catch(t){}},setup(e){Lf.set(e,!0)}}),og=HT,WT=[/^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$/],jT="EventFilters",sg=(e={})=>{let t;return{name:jT,setup(n){const r=n.getOptions();t=Df(e,r)},processEvent(n,r,o){if(!t){const s=o.getOptions();t=Df(e,s)}return zT(n,t)?null:n}}},ig=(e={})=>({...sg(e),name:"InboundFilters"});function Df(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:WT],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function zT(e,t){if(e.type){if(e.type==="transaction"&&GT(e,t.ignoreTransactions))return A&&_.warn("Event dropped due to being matched by `ignoreTransactions` option.\nEvent: ".concat(Dn(e))),!0}else{if(qT(e,t.ignoreErrors))return A&&_.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: ".concat(Dn(e))),!0;if(KT(e))return A&&_.warn("Event dropped due to not having an error message, error type or stacktrace.\nEvent: ".concat(Dn(e))),!0;if(VT(e,t.denyUrls))return A&&_.warn("Event dropped due to being matched by `denyUrls` option.\nEvent: ".concat(Dn(e),".\nUrl: ").concat(_i(e))),!0;if(!YT(e,t.allowUrls))return A&&_.warn("Event dropped due to not being matched by `allowUrls` option.\nEvent: ".concat(Dn(e),".\nUrl: ").concat(_i(e))),!0}return!1}function qT(e,t){return t!=null&&t.length?Gm(e).some(n=>ct(n,t)):!1}function GT(e,t){if(!(t!=null&&t.length))return!1;const n=e.transaction;return n?ct(n,t):!1}function VT(e,t){if(!(t!=null&&t.length))return!1;const n=_i(e);return n?ct(n,t):!1}function YT(e,t){if(!(t!=null&&t.length))return!0;const n=_i(e);return n?ct(n,t):!0}function JT(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 _i(e){var t,n,r;try{const o=[...(n=(t=e.exception)==null?void 0:t.values)!=null?n:[]].reverse().find(i=>{var a,c,u;return((a=i.mechanism)==null?void 0:a.parent_id)===void 0&&((u=(c=i.stacktrace)==null?void 0:c.frames)==null?void 0:u.length)}),s=(r=o==null?void 0:o.stacktrace)==null?void 0:r.frames;return s?JT(s):null}catch(o){return A&&_.error("Cannot extract url for event ".concat(Dn(e))),null}}function KT(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 XT(e,t,n,r,o,s){var a;if(!((a=o.exception)!=null&&a.values)||!s||!Kn(s.originalException,Error))return;const i=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;i&&(o.exception.values=kc(e,t,r,s.originalException,n,o.exception.values,i,0
12))}function kc(e,t,n,r,o,s,i,a){if(s.length>=n+1)return s;let c=[...s];if(Kn(r[o],Error)){Ff(i,a,r);const u=e(t,r[o]),f=c.length;$f(u,o,f,a),c=kc(e,t,n,r[o],o,[u,...c],u,f)}return ag(r)&&r.errors.forEach((u,f)=>{if(Kn(u,Error)){Ff(i,a,r);const l=e(t,u),d=c.length;$f(l,"errors[".concat(f,"]"),d,a),c=kc(e,t,n,u,o,[l,...c],l,d)}}),c}function ag(e){return Array.isArray(e.errors)}function Ff(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...ag(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function $f(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function QT(e){return kt(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function Bf(e){return QT(e)?"".concat(e.message," (").concat(e.__sentry_fetch_url_host__,")"):e.message}const cg=new Map,Uf=new Set;function ZT(e){if(H._sentryModuleMetadata)for(const t of Object.keys(H._sentryModuleMetadata)){const n=H._sentryModuleMetadata[t];if(Uf.has(t))continue;Uf.add(t);const r=e(t);for(const o of r.reverse())if(o.filename){cg.set(o.filename,n);break}}}function e0(e,t){return ZT(e),cg.get(t)}function ug(e,t){var n,r;(r=(n=t.exception)==null?void 0:n.values)==null||r.forEach(o=>{var s,i;(i=(s=o.stacktrace)==null?void 0:s.frames)==null||i.forEach(a=>{if(!a.filename||a.module_metadata)return;const c=e0(e,a.filename);c&&(a.module_metadata=c)})})}function lg(e){var t,n;(n=(t=e.exception)==null?void 0:t.values)==null||n.forEach(r=>{var o,s;(s=(o=r.stacktrace)==null?void 0:o.frames)==null||s.forEach(i=>{delete i.module_metadata})})}const t0=()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",t=>{Zn(t,(n,r)=>{if(r==="event"){const o=Array.isArray(n)?n[1]:void 0;o&&(lg(o),n[1]=o)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;const n=e.getOptions().stackParser;ug(n,t)})}}),Hf=new Set([]);function Du(e){const t="console",n=In(t,e);return wn(t,n0),n}const Wf=new Set;function n0(){"console"in H&&fu.forEach(function(e){Wf.has(e)||!(e in H.console)||(Wf.add(e),De(H.console,e,function(t){return ci[e]=t,function(...n){const r=n[0],o=ci[e],s=Hf.size&&typeof r=="string"&&ct(r,Hf);s||it("console",{args:n,level:e}),(!s||A&&_.isEnabled())&&(o==null||o.apply(H.console,n))}}))})}function yi(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const r0="CaptureConsole",o0=(e={})=>{var r;const t=e.levels||fu,n=(r=e.handled)!=null?r:!0;return{name:r0,setup(o){"console"in H&&Du(({args:s,level:i})=>{C()!==o||!t.includes(i)||i0(s,i,n)})}}},s0=o0;function i0(e,t,n){const r=yi(t),o=new Error,s={level:yi(t),extra:{arguments:e}};Ye(i=>{if(i.addEventProcessor(u=>(u.logger="console",At(u,{handled:n,type:"auto.core.capture_console"}),u)),t==="assert"){if(!e[0]){const u="Assertion failed: ".concat(ui(e.slice(1)," ")||"console.assert");i.setExtra("arguments",e.slice(1)),i.captureMessage(u,r,{captureContext:s,syntheticException:o})}return}const a=e.find(u=>u instanceof Error);if(a){ge(a,s);return}const c=ui(e," ");i.captureMessage(c,r,{captureContext:s,syntheticException:o})})}const a0="Dedupe",c0=()=>{let e;return{name:a0,processEvent(t){if(t.type)return t;try{if(u0(t,e))return A&&_.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(n){}return e=t}}},fg=c0;function u0(e,t){return t?!!(l0(e,t)||f0(e,t)):!1}function l0(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!pg(e,t)||!dg(e,t))}function f0(e,t){const n=jf(t),r=jf(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!pg(e,t)||!dg(e,t))}function dg(e,t){let n=dc(e),r=dc(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let o=0;o<r.length;o++){const s=r[o],i=n[o];if(s.filename!==i.filename||s.lineno!==i.lineno||s.colno!==i.colno||s.function!==i.function)return!1}return!0}function pg(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(o){return!1}}function jf(e){var t,n;return(n=(t=e.exception)==null?void 0:t.values)==null?void 0:n[0]}const d0="ExtraErrorData",p0=(e={})=>{const{depth:t=3,captureErrorCause:n=!0}=e;return{name:d0,processEvent(r,o,s){const{maxValueLength:i}=s.getOptions();return m0(r,o,t,n,i)}}},h0=p0;function m0(e,t={},n,r,o){if(!t.originalException||!kt(t.originalException))return e;const s=t.originalException.name||t.originalException.constructor.name,i=hg(t.originalException,r,o);if(i){const a={...e.contexts},c=Ne(i,n);return He(c)&&(ib(c),a[s]=c),{...e,contexts:a}}return e}
12function hg(e,t,n){try{const r=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],o={};for(const s of Object.keys(e)){if(r.indexOf(s)!==-1)continue;const i=e[s];o[s]=kt(i)||typeof i=="string"?n?No("".concat(i),n):"".concat(i):i}if(t&&e.cause!==void 0)if(kt(e.cause)){const s=e.cause.name||e.cause.constructor.name;o.cause={[s]:hg(e.cause,!1,n)}}else o.cause=e.cause;if(typeof e.toJSON=="function"){const s=e.toJSON();for(const i of Object.keys(s)){const a=s[i];o[i]=kt(a)?a.toString():a}}return o}catch(r){A&&_.error("Unable to extract extra data from the Error object:",r)}return null}function g0(e,t){let n=0;for(let r=e.length-1;r>=0;r--){const o=e[r];o==="."?e.splice(r,1):o===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}const _0=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function y0(e){const t=e.length>1024?"<truncated>".concat(e.slice(-1024)):e,n=_0.exec(t);return n?n.slice(1):[]}function zf(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const o=r>=0?e[r]:"/";o&&(t="".concat(o,"/").concat(t),n=o.charAt(0)==="/")}return t=g0(t.split("/").filter(r=>!!r),!n).join("/"),(n?"/":"")+t||"."}function qf(e){let t=0;for(;t<e.length&&e[t]==="";t++);let n=e.length-1;for(;n>=0&&e[n]==="";n--);return t>n?[]:e.slice(t,n-t+1)}function S0(e,t){e=zf(e).slice(1),t=zf(t).slice(1);const n=qf(e.split("/")),r=qf(t.split("/")),o=Math.min(n.length,r.length);let s=o;for(let a=0;a<o;a++)if(n[a]!==r[a]){s=a;break}let i=[];for(let a=s;a<n.length;a++)i.push("..");return i=i.concat(r.slice(s)),i.join("/")}function b0(e,t){return y0(e)[2]||""}const E0="RewriteFrames",v0=(e={})=>{const t=e.root,n=e.prefix||"app:///",r="window"in H&&!!H.window,o=e.iteratee||T0({isBrowser:r,root:t,prefix:n});function s(a){try{return{...a,exception:{...a.exception,values:a.exception.values.map(c=>({...c,...c.stacktrace&&{stacktrace:i(c.stacktrace)}}))}}}catch(c){return a}}function i(a){var c;return{...a,frames:(c=a==null?void 0:a.frames)==null?void 0:c.map(u=>o(u))}}return{name:E0,processEvent(a){let c=a;return a.exception&&Array.isArray(a.exception.values)&&(c=s(c)),c}}};function T0({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;const o=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes("\\")&&!r.filename.includes("/"),s=/^\//.test(r.filename);if(e){if(t){const i=r.filename;i.indexOf(t)===0&&(r.filename=i.replace(t,n))}}else if(o||s){const i=o?r.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):r.filename,a=t?S0(t,i):b0(i);r.filename="".concat(n).concat(a)}return r}}const I0=["reauthenticate","signInAnonymously","signInWithOAuth","signInWithIdToken","signInWithOtp","signInWithPassword","signInWithSSO","signOut","signUp","verifyOtp"],w0=["createUser","deleteUser","listUsers","getUserById","updateUserById","inviteUserByEmail"],R0={eq:"eq",neq:"neq",gt:"gt",gte:"gte",lt:"lt",lte:"lte",like:"like","like(all)":"likeAllOf","like(any)":"likeAnyOf",ilike:"ilike","ilike(all)":"ilikeAllOf","ilike(any)":"ilikeAnyOf",is:"is",in:"in",cs:"contains",cd:"containedBy",sr:"rangeGt",nxl:"rangeGte",sl:"rangeLt",nxr:"rangeLte",adj:"rangeAdjacent",ov:"overlaps",fts:"",plfts:"plain",phfts:"phrase",wfts:"websearch",not:"not"},mg=["select","insert","upsert","update","delete"];function Ki(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch(t){}}function Xi(e){try{return e.__SENTRY_INSTRUMENTED__}catch(t){return!1}}function gg(e,t){if(Object.keys(t).length>0)return t;if(Array.isArray(e)&&e.length>0)return e}function k0(e,t){return gg(e,t)!==void 0}function A0(e,t={}){var n;switch(e){case"GET":return"select";case"POST":return(n=t.Prefer)!=null&&n.includes("resolution=")?"upsert":"insert";case"PATCH":return"update";case"DELETE":return"delete";default:return"<unknown-op>"}}function C0(e,t){if(t===""||t==="*")return"select(*)";if(e==="select")return"select(".concat(t,")");if(e==="or"||e.endsWith(".or"))return"".concat(e).concat(t);const[n,...r]=t.split(".");let o;return n!=null&&n.startsWith("fts")?o="textSearch":n!=null&&n.startsWith("plfts")?o="textSearch[plain]":n!=null&&n.startsWith("phfts")?o="textSearch[phrase]":n!=null&&n.startsWith("wfts")?o="textSearch[websearch]":o=n&&R0[n]||"filter","".concat(o,"(").concat(e,", ").concat(r.join("."),")")}function Gf(e,t=!1){return new Proxy(e,{apply(n,r,o){return $t({name:"auth ".concat(t?"(admin) ":"").concat(e.name),attributes:{[G]:"auto.db.supabase",[ae]:"db","db.system":"postgresql","db.operation":"auth.".concat(t?"admin.":"").concat(e.name)}
12},s=>Reflect.apply(n,r,o).then(i=>(at(i)&&"error"in i&&i.error?(s.setStatus({code:ee}),ge(i.error,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}})):s.setStatus({code:Ko}),s.end(),i)).catch(i=>{throw s.setStatus({code:ee}),s.end(),ge(i,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}}),i}).then(...o))}})}function N0(e){const t=e.auth;if(!(!t||Xi(e.auth))){for(const n of I0){const r=t[n];r&&typeof e.auth[n]=="function"&&(e.auth[n]=Gf(r))}for(const n of w0){const r=t.admin[n];r&&typeof e.auth.admin[n]=="function"&&(e.auth.admin[n]=Gf(r,!0))}Ki(e.auth)}}function M0(e,t){Xi(e.prototype.from)||(e.prototype.from=new Proxy(e.prototype.from,{apply(n,r,o){const s=Reflect.apply(n,r,o),i=s.constructor;return O0(i,t),s}}),Ki(e.prototype.from))}function x0(e,t){Xi(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(n,r,o){var v,R;const s=mg,i=r,a=A0(i.method,i.headers);if(!s.includes(a)||!((v=i==null?void 0:i.url)!=null&&v.pathname)||typeof i.url.pathname!="string")return Reflect.apply(n,r,o);const c=i.url.pathname.split("/"),u=c.length>0?c[c.length-1]:"",f=[];for(const[I,S]of i.url.searchParams.entries())f.push(C0(I,S));const l=Object.create(null);if(He(i.body))for(const[I,S]of Object.entries(i.body))l[I]=S;const d=C(),p=(R=t.sendOperationData)!=null?R:(d==null?void 0:d.getDataCollectionOptions().databaseQueryData)===!0,h=gg(i.body,l),m=a==="select"?"":"".concat(a).concat(k0(i.body,l)?"(...) ":""),g=p?f.join(" "):f.length>0?"[redacted]":"",y=[m.trimEnd(),g].filter(Boolean).join(" "),b=y?"".concat(y," from(").concat(u,")"):"from(".concat(u,")"),E={"db.table":u,"db.schema":i.schema,"db.url":i.url.origin,"db.sdk":i.headers["X-Client-Info"],"db.system":"postgresql","db.operation":a,[G]:"auto.db.supabase",[ae]:"db"};return f.length&&p&&(E["db.query"]=f),h!==void 0&&p&&(E["db.body"]=h),$t({name:b,attributes:E},I=>Reflect.apply(n,r,[]).then(S=>{if(I&&(S&&typeof S=="object"&&"status"in S&&xo(I,S.status||500),I.end()),S!=null&&S.error){const T=new Error(S.error.message);S.error.code&&(T.code=S.error.code),S.error.details&&(T.details=S.error.details);const P={};f.length&&p&&(P.query=f),h!==void 0&&p&&(P.body=h),ge(T,N=>(N.addEventProcessor(L=>(At(L,{handled:!1,type:"auto.db.supabase.postgres"}),L)),N.setContext("supabase",P),N))}const O={type:"supabase",category:"db.".concat(a),message:b},$={};return f.length&&p&&($.query=f),h!==void 0&&p&&($.body=h),Object.keys($).length&&(O.data=$),vt(O),S},S=>{throw I&&(xo(I,500),I.end()),S}).then(...o))}}),Ki(e.prototype.then))}function O0(e,t){for(const n of mg)Xi(e.prototype[n])||(e.prototype[n]=new Proxy(e.prototype[n],{apply(r,o,s){const i=Reflect.apply(r,o,s),a=i.constructor;return A&&_.log("Instrumenting ".concat(n," operation's PostgRESTFilterBuilder")),x0(a,t),i}}),Ki(e.prototype[n]))}const _g=(e,t={})=>{if(!e){A&&_.warn("Supabase integration was not installed because no Supabase client was provided.");return}const n=e.constructor===Function?e:e.constructor;M0(n,t),N0(e)},P0="Supabase",L0=(e,t)=>({setupOnce(){_g(e,t)},name:P0}),D0=e=>L0(e.supabaseClient,{sendOperationData:e.sendOperationData}),F0=10,$0="ZodErrors";function B0(e){return kt(e)&&e.name==="ZodError"&&Array.isArray(e.issues)}function U0(e){return{...e,path:"path"in e&&Array.isArray(e.path)?e.path.join("."):void 0,keys:"keys"in e?JSON.stringify(e.keys):void 0,unionErrors:"unionErrors"in e?JSON.stringify(e.unionErrors):void 0}}function H0(e){return e.map(t=>typeof t=="number"?"<array>":t).join(".")}function W0(e){const t=new Set;for(const r of e.issues){const o=H0(r.path);o.length>0&&t.add(o)}const n=Array.from(t);if(n.length===0){let r="variable";if(e.issues.length>0){const o=e.issues[0];o!==void 0&&"expected"in o&&typeof o.expected=="string"&&(r=o.expected)}return"Failed to validate ".concat(r)}return"Failed to validate keys: ".concat(No(n.join(", "),100))}function j0(e,t=!1,n,r){var o;if(!((o=n.exception)!=null&&o.values)||!r.originalException||!B0(r.originalException)||r.originalException.issues.length===0)return n;try{const i=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(U0);return t&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({f
12ilename:"zod_issues.json",data:JSON.stringify({issues:i})})),{...n,exception:{...n.exception,values:[{...n.exception.values[0],value:W0(r.originalException)},...n.exception.values.slice(1)]},extra:{...n.extra,"zoderror.issues":i.slice(0,e)}}}catch(s){return{...n,extra:{...n.extra,"zoderrors sentry integration parse error":{message:"an exception was thrown while processing ZodError within applyZodErrorsToEvent()",error:s instanceof Error?"".concat(s.name,": ").concat(s.message,"\n").concat(s.stack):"unknown"}}}}}const z0=(e={})=>{var n;const t=(n=e.limit)!=null?n:F0;return{name:$0,processEvent(r,o){return j0(t,e.saveZodIssuesAsAttachment,r,o)}}},q0=z0,G0=e=>({name:"ThirdPartyErrorsFilter",setup(t){t.on("beforeEnvelope",n=>{Zn(n,(r,o)=>{if(o==="event"){const s=Array.isArray(r)?r[1]:void 0;s&&(lg(s),r[1]=s)}})}),t.on("applyFrameMetadata",n=>{if(n.type)return;const r=t.getOptions().stackParser;ug(r,n)})},preprocessEvent(t){var n;e.ignoreSentryInternalFrames&&((n=H._sentryWrappedDepth)!=null?n:0)>0&&(t.sdkProcessingMetadata={...t.sdkProcessingMetadata,insideSentryWrapped:!0})},processEvent(t){var o,s,i;const n=e.ignoreSentryInternalFrames?((o=t.sdkProcessingMetadata)==null?void 0:o.insideSentryWrapped)===!0&&((i=(s=t.exception)==null?void 0:s.values)==null?void 0:i.length)===1:!1,r=Y0(t,e.ignoreSentryInternalFrames,n);if(r){const a=e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="apply-tag-if-contains-third-party-frames"?"some":"every";if(r[a](u=>!u.some(f=>e.filterKeys.includes(f)))){if(e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="drop-error-if-exclusively-contains-third-party-frames")return null;t.tags={...t.tags,third_party_code:!0}}}return t}});function V0(e,t,n){var r;if(t!==0)return!1;if(n&&J0(e)||e.function==="sentryWrapped")return!0;if(!e.context_line||!e.filename||!e.filename.includes("sentry")||!e.filename.includes("helpers")||!e.context_line.includes(X0))return!1;if(e.pre_context){const o=e.pre_context.length;for(let s=0;s<o;s++)if((r=e.pre_context[s])!=null&&r.includes(K0))return!0}return!1}function Y0(e,t,n){const r=dc(e);if(r)return r.filter((o,s)=>!o.filename||o.lineno==null&&o.colno==null&&o.instruction_addr==null?!1:!t||!V0(o,s,!!n)).map(o=>o.module_metadata?Object.keys(o.module_metadata).filter(s=>s.startsWith(Vf)).map(s=>s.slice(Vf.length)):[])}function J0(e){return!e.context_line&&!e.pre_context&&!!e.function&&e.function.length<=2}const Vf="_sentryBundlerPluginAppKey:",K0="Attempt to invoke user-land function",X0="fn.apply(this, wrappedArguments)",Q0=100,Z0=10,ws="flag.evaluation.";function ro(e){if(e.type)return e;const n=W().getScopeData().contexts.flags,r=n?n.values:[];return r.length&&(e.contexts===void 0&&(e.contexts={}),e.contexts.flags={values:[...r]}),e}function tr(e,t,n=Q0){const r=W().getScopeData().contexts;r.flags||(r.flags={values:[]});const o=r.flags.values;eI(o,e,t,n)}function eI(e,t,n,r){if(typeof n!="boolean")return;if(e.length>r){A&&_.error("[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=".concat(r));return}const o=e.findIndex(s=>s.flag===t);o!==-1&&e.splice(o,1),e.length===r&&e.shift(),e.push({flag:t,result:n})}function nr(e,t,n=Z0){if(typeof t!="boolean")return;const r=Ie();if(!r)return;const o=U(r).data;if("".concat(ws).concat(e)in o){r.setAttribute("".concat(ws).concat(e),t);return}Object.keys(o).filter(i=>i.startsWith(ws)).length<n&&r.setAttribute("".concat(ws).concat(e),t)}const tI=()=>({name:"FeatureFlags",processEvent(e,t,n){return ro(e)},addFeatureFlag(e,t){tr(e,t),nr(e,t)}}),nI=({growthbookClass:e})=>({name:"GrowthBook",setupOnce(){const t=e.prototype;typeof t.isOn=="function"&&De(t,"isOn",Yf),typeof t.getFeatureValue=="function"&&De(t,"getFeatureValue",Yf)},processEvent(t,n,r){return ro(t)}});function Yf(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"&&(tr(n,r),nr(n,r)),r}}const rI="ConversationId",oI=()=>({name:rI,setup(e){e.on("spanStart",t=>{const n=W().getScopeData(),r=_e().getScopeData(),o=n.conversationId||r.conversationId;if(o){const{op:s,data:i,description:a}=U(t);if(!(s!=null&&s.startsWith("gen_ai."))&&!i["ai.operationId"]&&!(a!=null&&a.startsWith("ai.")))return;t.setAttribute(qb,o)}})}}),sI=oI;function iI(e,t,n,r,o){if(!e.fetchData)return;const{method:s,url:i}=e.fetchData,a=Ge()&&t(i);if(e.endTimestamp){const m=e.fetchData.__span;if(!m)return;const g=r[m];g&&(a&&(uI(g,e),aI(g,e,o)),delete r[m]);return}const{spanOrigin:c="auto.http.browser",propagateTraceparent:u=!1}=typeof o=="object"?o:{spanOrigin:o},f=C(),l=!!Ie(),d=l||!!f&&ft(f),p=a&&d?Ve(dI(i,s,c)):new Qn,h=Gi(p)&&l?void 0:p;if(a&&!d&&(f==null||f.recordDroppedEvent("no_parent_span","span")),e.fetchData.__span=p.spanContext().spanId,r[p.spanContext().spanId]=p,n(e.fetchData.url)){const m=e.args[0],g={...e.args[1]||{}},y=cI(m,g,Ge()&&d?h:void 0,u);y&&(e.args[1]=g,g.headers=y)}if(f){const m={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};f.emit("beforeOutgoingRequestSpan",p,m)}return p}
12function aI(e,t,n){var o;const r=typeof n=="object"&&n!==null?n.onRequestSpanEnd:void 0;r==null||r(e,{headers:(o=t.response)==null?void 0:o.headers,error:t.error})}function cI(e,t,n,r){const o=Lu({span:n,propagateTraceparent:r}),s=o["sentry-trace"],i=o.baggage,a=o.traceparent;if(!s)return;const c=t.headers||(hu(e)?e.headers:void 0);if(c)if(lI(c)){const u=new Headers(c);if(u.get("sentry-trace")||u.set("sentry-trace",s),r&&a&&!u.get("traceparent")&&u.set("traceparent",a),i){const f=u.get("baggage");f?Rs(f)||u.set("baggage","".concat(f,",").concat(i)):u.set("baggage",i)}return u}else if(fI(c)){const u=[...c];u.find(l=>l[0]==="sentry-trace")||u.push(["sentry-trace",s]),r&&a&&!u.find(l=>l[0]==="traceparent")&&u.push(["traceparent",a]);const f=c.find(l=>l[0]==="baggage"&&typeof l[1]=="string"&&Rs(l[1]));return i&&!f&&u.push(["baggage",i]),u}else{const u="sentry-trace"in c?c["sentry-trace"]:void 0,f="traceparent"in c?c.traceparent:void 0,l="baggage"in c?c.baggage:void 0,d=l?Array.isArray(l)?[...l]:[l]:[],p=l&&(Array.isArray(l)?l.find(m=>Rs(m)):Rs(l));i&&!p&&d.push(i);const h=Object.assign({},c,{"sentry-trace":u!=null?u:s,...d.length>0&&{baggage:d.join(",")}});return r&&a&&!f&&(h.traceparent=a),h}else return{"sentry-trace":s,...i&&{baggage:i},...a&&{traceparent:a}}}function uI(e,t){var n,r;if(t.response){xo(e,t.response.status);const o=(r=(n=t.response)==null?void 0:n.headers)==null?void 0:r.get("content-length");if(o){const s=parseInt(o);s>0&&e.setAttribute("http.response_content_length",s)}}else t.error&&e.setStatus({code:ee,message:"internal_error"});e.end()}function Rs(e){return typeof e!="string"?!1:e.split(",").some(t=>t.trim().startsWith(li))}function lI(e){return typeof Headers<"u"&&Kn(e,Headers)}function fI(e){return Array.isArray(e)?e.every(t=>Array.isArray(t)&&t.length===2&&typeof t[0]=="string"):!1}function dI(e,t,n){if(e.startsWith("data:")){const s=yt(e);return{name:"".concat(t," ").concat(s),attributes:Jf(e,void 0,t,n)}}const r=Do(e),o=r?Zm(r):e;return{name:"".concat(t," ").concat(o),attributes:Jf(e,r,t,n)}}function Jf(e,t,n,r){const o={url:yt(e),type:"fetch","http.method":n,[G]:r,[ae]:"http.client"};return t&&(Ji(t)||(o[Em]=yt(t.href),o[Cn]=yt(t.href),o["server.address"]=t.host),t.search&&(o["http.query"]=t.search),t.hash&&(o["http.fragment"]=t.hash)),o}function yg(e,t={},n=W()){const{message:r,name:o,email:s,url:i,source:a,associatedEventId:c,tags:u}=e,f={contexts:{feedback:{contact_email:s,name:o,message:r,url:i,source:a,associated_event_id:c}},type:"feedback",level:"info",tags:u},l=(n==null?void 0:n.getClient())||C();return l&&l.emit("beforeSendFeedback",f,t),n.captureEvent(f,t)}function oo(e,t,n,r,o){gi({level:e,message:t,attributes:n,severityNumber:o},r)}function pI(e,t,{scope:n}={}){oo("trace",e,t,n)}function hI(e,t,{scope:n}={}){oo("debug",e,t,n)}function mI(e,t,{scope:n}={}){oo("info",e,t,n)}function gI(e,t,{scope:n}={}){oo("warn",e,t,n)}function _I(e,t,{scope:n}={}){oo("error",e,t,n)}function yI(e,t,{scope:n}={}){oo("fatal",e,t,n)}const SI=Object.freeze(Object.defineProperty({__proto__:null,debug:hI,error:_I,fatal:yI,fmt:LT,info:mI,trace:pI,warn:gI},Symbol.toStringTag,{value:"Module"}));function Si(e,t,n){return"util"in H&&typeof H.util.format=="function"?H.util.format(...e):bI(e,t,n)}function bI(e,t,n){return e.map(r=>Mt(r)?String(r):JSON.stringify(Ne(r,t,n))).join(" ")}function Sg(e){return/%[sdifocO]/.test(e)}function bg(e,t){const n={},r=new Array(t.length).fill("{}").join(" ");return n["sentry.message.template"]="".concat(e," ").concat(r),t.forEach((o,s)=>{n["sentry.message.parameter.".concat(s)]=o}),n}const EI="ConsoleLogs",Kf={[G]:"auto.log.console"},vI=(e={})=>{const t=e.levels||fu;return{name:EI,setup(n){const{enableLogs:r,normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=n.getOptions();if(!r){A&&_.warn("`enableLogs` is not enabled, ConsoleLogs integration disabled");return}const i=Du(({args:a,level:c})=>{if(C()!==n||!t.includes(c))return;const u=a[0],f=a.slice(1);if(c==="assert"){if(!u){const p=f.length>0?"Assertion failed: ".concat(Si(f,o,s)):"Assertion failed";gi({level:"error",message:p,attributes:Kf})}return}const l=c==="log",d={...Kf};if(He(u)){Object.assign(d,Ne(u,o,s));const p=typeof a[1]=="string"?2:1;
12a.slice(p).forEach((m,g)=>{d["sentry.message.parameter.".concat(g)]=Ne(m,o,s)})}else if(f.length>0&&typeof u=="string"&&!Sg(u)){const h=bg(u,f);for(const[m,g]of Object.entries(h))d[m]=m.startsWith("sentry.message.parameter.")?Ne(g,o,s):g}gi({level:l?"info":c,message:Si(a,o,s),severityNumber:l?10:void 0,attributes:d})});n.registerCleanup(i)}}},TI=vI;function Fu(e,t,n,r){iT({type:e,name:t,value:n,unit:r==null?void 0:r.unit,attributes:r==null?void 0:r.attributes},{scope:r==null?void 0:r.scope})}function II(e,t=1,n){Fu("counter",e,t,n)}function wI(e,t,n){Fu("gauge",e,t,n)}function Ac(e,t,n){Fu("distribution",e,t,n)}const RI=Object.freeze(Object.defineProperty({__proto__:null,count:II,distribution:Ac,gauge:wI},Symbol.toStringTag,{value:"Module"})),kI=["trace","debug","info","warn","error","fatal"];function AI(e={}){var r;const t=new Set((r=e.levels)!=null?r:kI),n=e.client;return{log(o){const{type:s,level:i,message:a,args:c,tag:u,date:f,...l}=o,d=n||C();if(!d)return;const p=MI(s,i);if(!t.has(p))return;const{normalizeDepth:h=3,normalizeMaxBreadth:m=1e3}=d.getOptions(),g={};for(const[b,E]of Object.entries(l))g[b]=Ne(E,h,m);g["sentry.origin"]="auto.log.consola",u&&(g["consola.tag"]=u),s&&(g["consola.type"]=s),i!=null&&typeof i=="number"&&(g["consola.level"]=i);const y=OI(xI(c,h,m),h,m);y!=null&&y.attributes&&Object.assign(g,y.attributes),gi({level:p,message:(y==null?void 0:y.message)||a||c&&Si(c,h,m)||"",attributes:g})}}}const CI={silent:"trace",fatal:"fatal",error:"error",warn:"warn",log:"info",info:"info",success:"info",fail:"error",ready:"info",start:"info",box:"info",debug:"debug",trace:"trace",verbose:"debug",critical:"fatal",notice:"info"},NI={0:"fatal",1:"warn",2:"info",3:"info",4:"debug",5:"trace"};function MI(e,t){if(e==="verbose")return"debug";if(e==="silent")return"trace";if(e){const n=CI[e];if(n)return n}if(typeof t=="number"){const n=NI[t];if(n)return n}return"info"}function xI(e,t,n){if(!(e!=null&&e.length))return{message:""};const r=Si(e,t,n),o=e[0];if(He(o)){const s=typeof e[1]=="string"?2:1,i=e.slice(s);return{message:r,attributes:o,messageParameters:i}}else{const s=e.slice(1),i=s.length>0&&typeof o=="string"&&!Sg(o);return{message:r,messageTemplate:i?o:void 0,messageParameters:i?s:void 0}}}function OI(e,t,n){const{message:r,attributes:o,messageTemplate:s,messageParameters:i}=e,a={};if(s&&i){const c=bg(s,i);for(const[u,f]of Object.entries(c))a[u]=u.startsWith("sentry.message.parameter.")?Ne(f,t,n):f}else i&&i.length>0&&i.forEach((c,u)=>{a["sentry.message.parameter.".concat(u)]=Ne(c,t,n)});return{message:r,attributes:{...Ne(o,t,n),...a}}}const PI="gen_ai.prompt",ts="gen_ai.system",Fe="gen_ai.request.model",$u="gen_ai.request.stream",Qi="gen_ai.request.temperature",Bu="gen_ai.request.max_tokens",Zi="gen_ai.request.frequency_penalty",Uu="gen_ai.request.presence_penalty",ea="gen_ai.request.top_p",Eg="gen_ai.request.top_k",vg="gen_ai.request.encoding_format",Tg="gen_ai.request.dimensions",Nr="gen_ai.response.finish_reasons",so="gen_ai.response.model",ta="gen_ai.response.id",LI="gen_ai.response.stop_reason",rr="gen_ai.usage.input_tokens",or="gen_ai.usage.output_tokens",Sn="gen_ai.usage.total_tokens",St="gen_ai.operation.name",sr="sentry.sdk_meta.gen_ai.input.messages.original_length",io="gen_ai.input.messages",ns="gen_ai.system_instructions",Ct="gen_ai.response.text",rs="gen_ai.request.available_tools",DI="gen_ai.response.streaming",fn="gen_ai.response.tool_calls",na="gen_ai.agent.name",FI="gen_ai.pipeline.name",Hu="gen_ai.conversation.id",$I="gen_ai.usage.cache_creation_input_tokens",BI="gen_ai.usage.cache_read_input_tokens",UI="gen_ai.invoke_agent",Wu="gen_ai.embeddings.input",Ig="gen_ai.embeddings",Xf="gen_ai.execute_tool",wg="gen_ai.tool.name",HI="gen_ai.tool.call.id",WI="gen_ai.tool.type",Rg="gen_ai.tool.input",kg="gen_ai.tool.output",jI="gen_ai.tool.description";function Mr(e){return!e||typeof e!="object"?!1:qI(e)||Cg(e)||zI(e)||Ng(e)||Mg(e)||GI(e)||VI(e)||YI(e)||JI(e)||KI(e)||XI(e)||QI(e)}function zI(e){return"image_url"in e?typeof e.image_url=="string"?e.image_url.startsWith("data:"):Ag(e):!1}function Ag(e){return"image_url"in e&&!!e.image_url&&typeof e.image_url=="object"&&"url"in e.image_url&&typeof e.image_url.url=="string"&&e.image_url.url.startsWith("data:")}function qI(e){return"type"in e&&typeof e.type=="string"&&"source"in e&&Mr(e.source)}function Cg(e){return"inlineData"in e&&!!e.inlineData&&typeof e.inlineData=="object"&&"data"in e.inlineData&&typeof e.inlineData.data=="str
12ing"}function Ng(e){return"type"in e&&e.type==="input_audio"&&"input_audio"in e&&!!e.input_audio&&typeof e.input_audio=="object"&&"data"in e.input_audio&&typeof e.input_audio.data=="string"}function Mg(e){return"type"in e&&e.type==="file"&&"file"in e&&!!e.file&&typeof e.file=="object"&&"file_data"in e.file&&typeof e.file.file_data=="string"}function GI(e){return"media_type"in e&&typeof e.media_type=="string"&&"data"in e}function VI(e){return"type"in e&&e.type==="file"&&"mediaType"in e&&typeof e.mediaType=="string"&&"data"in e&&typeof e.data=="string"&&!e.data.startsWith("http://")&&!e.data.startsWith("https://")}function YI(e){return"type"in e&&e.type==="image"&&"image"in e&&typeof e.image=="string"&&!e.image.startsWith("http://")&&!e.image.startsWith("https://")}function JI(e){return"type"in e&&(e.type==="blob"||e.type==="base64")}function KI(e){return"b64_json"in e}function XI(e){return"type"in e&&"result"in e&&e.type==="image_generation"}function QI(e){return"uri"in e&&typeof e.uri=="string"&&e.uri.startsWith("data:")}const mo="[Blob substitute]",ZI=["image_url","data","content","b64_json","result","uri","image"];function Io(e){const t={...e};Mr(t.source)&&(t.source=Io(t.source)),Cg(e)&&(t.inlineData={...e.inlineData,data:mo}),Ag(e)&&(t.image_url={...e.image_url,url:mo}),Ng(e)&&(t.input_audio={...e.input_audio,data:mo}),Mg(e)&&(t.file={...e.file,file_data:mo});for(const n of ZI)typeof t[n]=="string"&&(t[n]=mo);return t}const xg=2e4,bi=e=>new TextEncoder().encode(e).length,ju=e=>bi(JSON.stringify(e));function ra(e,t){if(bi(e)<=t)return e;let n=0,r=e.length,o="";for(;n<=r;){const s=Math.floor((n+r)/2),i=e.slice(0,s);bi(i)<=t?(o=i,n=s+1):r=s-1}return o}function ew(e){return typeof e=="string"?e:"text"in e&&typeof e.text=="string"?e.text:""}function Qf(e,t){return typeof e=="string"?t:{...e,text:t}}function tw(e){return e!==null&&typeof e=="object"&&"content"in e&&typeof e.content=="string"}function Og(e){return e!==null&&typeof e=="object"&&"content"in e&&Array.isArray(e.content)}function Pg(e){return e!==null&&typeof e=="object"&&"parts"in e&&Array.isArray(e.parts)&&e.parts.length>0}function nw(e,t){const n={...e,content:""},r=ju(n),o=t-r;if(o<=0)return[];const s=ra(e.content,o);return[{...e,content:s}]}function rw(e){return"parts"in e&&Array.isArray(e.parts)?{key:"parts",items:e.parts}:"content"in e&&Array.isArray(e.content)?{key:"content",items:e.content}:{key:null,items:[]}}function ow(e,t){const{key:n,items:r}=rw(e);if(n===null||r.length===0)return[];const o=r.map(c=>Qf(c,"")),s=ju({...e,[n]:o});let i=t-s;if(i<=0)return[];const a=[];for(const c of r){const u=ew(c),f=bi(u);if(f<=i)a.push(c),i-=f;else if(a.length===0){const l=ra(u,i);l&&a.push(Qf(c,l));break}else break}return a.length<=0?[]:[{...e,[n]:a}]}function sw(e,t){if(!e)return[];if(typeof e=="string"){const n=ra(e,t);return n?[n]:[]}return typeof e!="object"?[]:tw(e)?nw(e,t):Og(e)||Pg(e)?ow(e,t):[]}function Cc(e){return e.map(n=>{let r;return n&&typeof n=="object"&&(Og(n)?r={...n,content:Cc(n.content)}:"content"in n&&Mr(n.content)&&(r={...n,content:Io(n.content)}),Pg(n)&&(r={...r!=null?r:n,parts:Cc(n.parts)}),Mr(r)?r=Io(r):Mr(n)&&(r=Io(n))),r!=null?r:n})}function iw(e,t){if(!Array.isArray(e)||e.length===0)return e;const n=t-2,r=e[e.length-1],o=Cc([r]),s=o[0];return ju(s)<=n?o:sw(s,n)}function aw(e){return iw(e,xg)}function cw(e){return ra(e,xg)}function cr(e){var n,r,o,s,i;const t=(n=C())==null?void 0:n.getDataCollectionOptions().genAI;return{...e,recordInputs:(o=(r=e==null?void 0:e.recordInputs)!=null?r:t==null?void 0:t.inputs)!=null?o:!1,recordOutputs:(i=(s=e==null?void 0:e.recordOutputs)!=null?s:t==null?void 0:t.outputs)!=null?i:!1}}function Qt(e){if(e!==void 0)return e;const t=C();return t?!ft(t)&&t.getOptions().streamGenAiSpans===!1:!0}function Lg(e,t){return e?"".concat(e,".").concat(t):t}function uw(e,t,n,r,o){if(t!==void 0&&e.setAttributes({[rr]:t}),n!==void 0&&e.setAttributes({[or]:n}),t!==void 0||n!==void 0||r!==void 0||o!==void 0){const s=(t!=null?t:0)+(n!=null?n:0)+(r!=null?r:0)+(o!=null?o:0);e.setAttributes({[Sn]:s})}}function oa(e,t,n){var o,s,i,a;
12if(!e.isRecording())return;const r={[DI]:!0};t.responseId&&(r[ta]=t.responseId),t.responseModel&&(r[so]=t.responseModel),t.promptTokens!==void 0&&(r[rr]=t.promptTokens),t.completionTokens!==void 0&&(r[or]=t.completionTokens),t.totalTokens!==void 0?r[Sn]=t.totalTokens:(t.promptTokens!==void 0||t.completionTokens!==void 0||t.cacheCreationInputTokens!==void 0||t.cacheReadInputTokens!==void 0)&&(r[Sn]=((o=t.promptTokens)!=null?o:0)+((s=t.completionTokens)!=null?s:0)+((i=t.cacheCreationInputTokens)!=null?i:0)+((a=t.cacheReadInputTokens)!=null?a:0)),t.finishReasons.length&&(r[Nr]=JSON.stringify(t.finishReasons)),n&&t.responseTexts.length&&(r[Ct]=t.responseTexts.join("")),n&&t.toolCalls.length&&(r[fn]=JSON.stringify(t.toolCalls)),e.setAttributes(r),e.end()}function ao(e){if(typeof e=="string")return cw(e);try{return JSON.stringify(Array.isArray(e)?aw(e):e)}catch(t){return"[unserializable]"}}function os(e){if(!Array.isArray(e))return{systemInstructions:void 0,filteredMessages:e};const t=e.findIndex(i=>i&&typeof i=="object"&&"role"in i&&i.role==="system");if(t===-1)return{systemInstructions:void 0,filteredMessages:e};const n=e[t],r=typeof n.content=="string"?n.content:n.content!==void 0?JSON.stringify(n.content):void 0;if(!r)return{systemInstructions:void 0,filteredMessages:e};const o=JSON.stringify([{type:"text",content:r}]),s=[...e.slice(0,t),...e.slice(t+1)];return{systemInstructions:o,filteredMessages:s}}async function lw(e,t,n){const r=e.catch(i=>{throw ge(i,{mechanism:{handled:!1,type:n}}),i}),o=await t,s=await r;return s&&typeof s=="object"&&"data"in s?{...s,data:o}:o}function Ei(e,t,n){return Rn(e)?new Proxy(e,{get(r,o){const i=o in Promise.prototype||o===Symbol.toStringTag?t:r,a=Reflect.get(i,o);return o==="withResponse"&&typeof a=="function"?function(){const u=a.call(r);return lw(u,t,n)}:typeof a=="function"?a.bind(i):a}}):t}const fw={"responses.create":{operation:"chat"},"chat.completions.create":{operation:"chat"},"embeddings.create":{operation:"embeddings"},"conversations.create":{operation:"chat"}},dw=["response.output_item.added","response.function_call_arguments.delta","response.function_call_arguments.done","response.output_item.done"],pw=["response.created","response.in_progress","response.failed","response.completed","response.incomplete","response.queued","response.output_text.delta",...dw];function hw(e){return e!==null&&typeof e=="object"&&"type"in e&&typeof e.type=="string"&&e.type.startsWith("response.")}function mw(e){return e!==null&&typeof e=="object"&&"object"in e&&e.object==="chat.completion.chunk"}function gw(e,t,n){var s,i;if(!t||typeof t!="object")return;const r=t,o={};if(typeof r.id=="string"&&(o[ta]=r.id),typeof r.model=="string"&&(o[so]=r.model),r.object==="conversation"&&typeof r.id=="string"&&(o[Hu]=r.id),r.usage&&typeof r.usage=="object"){const a=r.usage,c=(s=a.prompt_tokens)!=null?s:a.input_tokens;typeof c=="number"&&(o[rr]=c);const u=(i=a.completion_tokens)!=null?i:a.output_tokens;typeof u=="number"&&(o[or]=u),typeof a.total_tokens=="number"&&(o[Sn]=a.total_tokens)}if(Array.isArray(r.choices)){const a=r.choices,c=a.map(u=>u.finish_reason).filter(u=>typeof u=="string");if(c.length>0&&(o[Nr]=JSON.stringify(c)),n){const u=a.map(l=>{const d=l.message;return(d==null?void 0:d.content)||""});o[Ct]=JSON.stringify(u);const f=a.map(l=>{const d=l.message;return d==null?void 0:d.tool_calls}).filter(l=>Array.isArray(l)&&l.length>0).flat();f.length>0&&(o[fn]=JSON.stringify(f))}}if(typeof r.status=="string"&&(o[Nr]||(o[Nr]=JSON.stringify([r.status]))),n&&(typeof r.output_text=="string"&&!o[Ct]&&(o[Ct]=r.output_text),Array.isArray(r.output)&&r.output.length>0&&!o[fn])){const a=r.output.filter(c=>(c==null?void 0:c.type)==="function_call");a.length>0&&(o[fn]=JSON.stringify(a))}e.setAttributes(o)}function _w(e){if("conversation"in e&&typeof e.conversation=="string")return e.conversation;if("previous_response_id"in e&&typeof e.previous_response_id=="string")return e.previous_response_id}function yw(e){var r;const t={[Fe]:(r=e.model)!=null?r:"unknown"};"temperature"in e&&(t[Qi]=e.temperature),"top_p"in e&&(t[ea]=e.top_p),"frequency_penalty"in e&&(t[Zi]=e.frequency_penalty),"presence_penalty"in e&&(t[Uu]=e.presence_penalty),"stream"in e&&(t[$u]=e.stream),"encoding_format"in e&&(t[vg]=e.encoding_format),"dimensions"in e&&(t[Tg]=e.dimensions);const n=_w(e);return n&&(t[Hu]=n),t}function Sw(e,t){for(const n of e){const r=n.index;if(!(r===void 0||!n.function))if(!(r in t.chatCompletionToolCalls))t.chatCompletionToolCalls[r]={...n,function:{name:n.function.name,arguments:n.function.arguments||""}};else{const o=t.chatCompletionToolCalls[r];n.function.arguments&&(o!=null&&o.function)&&(o.function.arguments+=n.function.arguments)}}}function bw(e,t,n){var r,o,s,i,a;t.responseId=(r=e.id)!=null?r:t.responseId,t.responseModel=(o=e.model)!=null?o:t.responseModel,e.usage&&(t.promptTokens=e.usage.prompt_tokens,t.completionTokens=e.usage.completion_tokens,t.totalTokens=e.usage.total_tokens);for(const c of(s=e.choices)!=null?s:[])n&&((i=c.delta)!=null&&i.content&&t.responseTexts.push(c.delta.content),(a=c.delta)!=null&&a.tool_calls&&Sw(c.delta.tool_calls,t)),c.finish_reason&&t.finishReasons.push(c.finish_reason)}function Ew(e,t,n,r){var s,i;if(!(e&&typeof e=="object")){t.eventTypes.push("unknown:non-object");return}if(e instanceof Error){r.setStatus({code:ee,message:"internal_error"}),ge(e,{mechanism:{handled:!1,type:"auto.ai.openai.stream-response"}});return}if(!("type"in e))return;const o=e;if(!pw.includes(o.type)){t.eventTypes.push(o.type);return}if(n&&(o.type==="response.output_item.done"&&"item"in o&&t.responsesApiToolCalls.push(o.item),o.type==="response.output_text.delta"&&"delta"in o&&o.delta)){t.responseTexts.push(o.delta);return}if("response"in o){const{response:a}=o;t.responseId=(s=a.id)!=null?s:t.responseId,t.responseModel=(i=a.model)!=null?i:t.responseModel,a.usage&&(t.promptTokens=a.usage.input_tokens,t.completionTokens=a.usage.output_tokens,t.totalTokens=a.usage.total_tokens),a.status&&t.finishReasons.push(a.status),n&&a.output_text&&t.responseTexts.push(a.output_text)}}async function*vw(e,t,n){const r={eventTypes:[],responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,totalTokens:void 0,chatCompletionToolCalls:{},responsesApiToolCalls:[]};try{for await(const o of e)mw(o)?bw(o,r,n):hw(o)&&Ew(o,r,n,t),yield o}finally{const o=[...Object.values(r.chatCompletionToolCalls),...r.responsesApiToolCalls];oa(t,{...r,toolCalls:o},n)}}function Tw(e){const t=Array.isArray(e.tools)?e.tools:[],r=e.web_search_options&&typeof e.web_search_options=="object"?[{type:"web_search_options",...e.web_search_options}]:[],o=[...t,...r];if(o.length!==0)try{return JSON.stringify(o)}catch(s){A&&_.error("Failed to serialize OpenAI tools:",s);return}}
12function Iw(e,t){const n={[ts]:"openai",[St]:t,[G]:"auto.ai.openai"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const r=e[0],o=Tw(r);o&&(n[rs]=o),Object.assign(n,yw(r))}else n[Fe]="unknown";return n}function Zf(e,t,n,r){if(n==="embeddings"&&"input"in t){const a=t.input;if(a==null||typeof a=="string"&&a.length===0||Array.isArray(a)&&a.length===0)return;e.setAttribute(Wu,typeof a=="string"?a:JSON.stringify(a));return}const o="input"in t?t.input:"messages"in t?t.messages:void 0;if(!o||Array.isArray(o)&&o.length===0)return;const{systemInstructions:s,filteredMessages:i}=os(o);s&&e.setAttribute(ns,s),e.setAttribute(io,r?ao(i):Ze(i)),Array.isArray(i)?e.setAttribute(sr,i.length):e.setAttribute(sr,1)}function ww(e,t,n,r,o){return function(...i){const a=n.operation||"unknown",c=Iw(i,a),u=c[Fe]||"unknown",f=i[0],l=f&&typeof f=="object"&&f.stream===!0,d={name:"".concat(a," ").concat(u),op:"gen_ai.".concat(a),attributes:c};if(l){let m;const g=qt(d,y=>(m=e.apply(r,i),o.recordInputs&&f&&Zf(y,f,a,Qt(o.enableTruncation)),(async()=>{var b;try{const E=await m;return vw(E,y,(b=o.recordOutputs)!=null?b:!1)}catch(E){throw y.setStatus({code:ee,message:"internal_error"}),ge(E,{mechanism:{handled:!1,type:"auto.ai.openai.stream",data:{function:t}}}),y.end(),E}})()));return Ei(m,g,"auto.ai.openai")}let p;const h=$t(d,m=>(p=e.apply(r,i),o.recordInputs&&f&&Zf(m,f,a,Qt(o.enableTruncation)),p.then(g=>(gw(m,g,o.recordOutputs),g),g=>{throw ge(g,{mechanism:{handled:!1,type:"auto.ai.openai",data:{function:t}}}),g})));return Ei(p,h,"auto.ai.openai")}}function Dg(e,t="",n){return new Proxy(e,{get(r,o){const s=r[o],i=Lg(t,String(o)),a=fw[i];return typeof s=="function"&&a?ww(s,i,a,r,n):typeof s=="function"?s.bind(r):s&&typeof s=="object"?Dg(s,i,n):s}})}function Rw(e,t){return Dg(e,"",cr(t))}const ed={"messages.create":{operation:"chat"},"messages.stream":{operation:"chat",streaming:!0},"messages.countTokens":{operation:"chat"},"models.get":{operation:"models"},"completions.create":{operation:"chat"},"models.retrieve":{operation:"models"},"beta.messages.create":{operation:"chat"}};function kw(e,t,n){if(Array.isArray(t)&&t.length===0)return;const{systemInstructions:r,filteredMessages:o}=os(t);r&&e.setAttributes({[ns]:r});const s=Array.isArray(o)?o.length:1;e.setAttributes({[io]:n?ao(o):Ze(o),[sr]:s})}const Aw={invalid_request_error:"invalid_argument",authentication_error:"unauthenticated",permission_error:"permission_denied",not_found_error:"not_found",request_too_large:"failed_precondition",rate_limit_error:"resource_exhausted",api_error:"internal_error",overloaded_error:"unavailable"};function Fg(e){return e&&Aw[e]||"internal_error"}function Cw(e,t){t.error&&(e.setStatus({code:ee,message:Fg(t.error.type)}),ge(t.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}))}function Nw(e){const{system:t,messages:n,input:r}=e,o=typeof t=="string"?[{role:"system",content:e.system}]:[],s=Array.isArray(r)?r:r!=null?[r]:void 0,i=Array.isArray(n)?n:n!=null?[n]:[],a=s!=null?s:i;return[...o,...a]}function Mw(e,t){var n;return"type"in e&&typeof e.type=="string"&&e.type==="error"?(t.setStatus({code:ee,message:Fg((n=e.error)==null?void 0:n.type)}),ge(e.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}),!0):!1}function xw(e,t){var n;if(e.type==="message_delta"&&(e.usage&&typeof e.usage.output_tokens=="number"&&(t.completionTokens=e.usage.output_tokens),(n=e.delta)!=null&&n.stop_reason&&t.finishReasons.push(e.delta.stop_reason)),e.message){const r=e.message;r.id&&(t.responseId=r.id),r.model&&(t.responseModel=r.model),r.usage&&(typeof r.usage.input_tokens=="number"&&(t.promptTokens=r.usage.input_tokens),typeof r.usage.cache_creation_input_tokens=="number"&&(t.cacheCreationInputTokens=r.usage.cache_creation_input_tokens),typeof r.usage.cache_read_input_tokens=="number"&&(t.cacheReadInputTokens=r.usage.cache_read_input_tokens))}}function Ow(e,t){e.type!=="content_block_start"||typeof e.index!="number"||!e.content_block||(e.content_block.type==="tool_use"||e.content_block.type==="server_tool_use")&&(t.activeToolBlocks[e.index]={id:e.content_block.id,name:e.content_block.name,inputJsonParts:[]})}function Pw(e,t,n){if(!(e.type!=="content_block_delta"||!e.delta)){if(typeof e.index=="number"&&"partial_json"in e.delta&&t
12ypeof e.delta.partial_json=="string"){const r=t.activeToolBlocks[e.index];r&&r.inputJsonParts.push(e.delta.partial_json)}n&&typeof e.delta.text=="string"&&t.responseTexts.push(e.delta.text)}}function Lw(e,t){if(e.type!=="content_block_stop"||typeof e.index!="number")return;const n=t.activeToolBlocks[e.index];if(!n)return;const r=n.inputJsonParts.join("");let o;try{o=r?JSON.parse(r):{}}catch(s){o={__unparsed:r}}t.toolCalls.push({type:"tool_use",id:n.id,name:n.name,input:o}),delete t.activeToolBlocks[e.index]}function $g(e,t,n,r){!(e&&typeof e=="object")||Mw(e,r)||(xw(e,t),Ow(e,t),Pw(e,t,n),Lw(e,t))}async function*Dw(e,t,n){const r={responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};try{for await(const o of e)$g(o,r,n,t),yield o}finally{oa(t,r,n)}}function Fw(e,t,n){const r={responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};return e.on("streamEvent",o=>{$g(o,r,n,t)}),e.on("message",()=>{oa(t,r,n)}),e.on("error",o=>{ge(o,{mechanism:{handled:!1,type:"auto.ai.anthropic.stream_error"}}),t.isRecording()&&(t.setStatus({code:ee,message:"internal_error"}),t.end())}),e}let Vs=!1;const td=new WeakSet;function $w(e,t,n){var o;const r={[ts]:"anthropic",[St]:n,[G]:"auto.ai.anthropic"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const s=e[0];s.tools&&Array.isArray(s.tools)&&(r[rs]=JSON.stringify(s.tools)),r[Fe]=(o=s.model)!=null?o:"unknown","temperature"in s&&(r[Qi]=s.temperature),"top_p"in s&&(r[ea]=s.top_p),"stream"in s&&(r[$u]=s.stream),"top_k"in s&&(r[Eg]=s.top_k),"frequency_penalty"in s&&(r[Zi]=s.frequency_penalty),"max_tokens"in s&&(r[Bu]=s.max_tokens)}else t==="models.retrieve"||t==="models.get"?r[Fe]=e[0]:r[Fe]="unknown";return r}function Nc(e,t,n){const r=Nw(t);kw(e,r,n),"prompt"in t&&e.setAttributes({[PI]:JSON.stringify(t.prompt)})}function Bw(e,t){if("content"in t&&Array.isArray(t.content)){e.setAttributes({[Ct]:t.content.map(r=>r.text).filter(r=>!!r).join("")});const n=[];for(const r of t.content)(r.type==="tool_use"||r.type==="server_tool_use")&&n.push(r);n.length>0&&e.setAttributes({[fn]:JSON.stringify(n)})}"completion"in t&&e.setAttributes({[Ct]:t.completion}),"input_tokens"in t&&e.setAttributes({[Ct]:JSON.stringify(t.input_tokens)})}function Uw(e,t){"id"in t&&"model"in t&&(e.setAttributes({[ta]:t.id,[so]:t.model}),"usage"in t&&t.usage&&uw(e,t.usage.input_tokens,t.usage.output_tokens,t.usage.cache_creation_input_tokens,t.usage.cache_read_input_tokens))}function Hw(e,t,n){if(!(!t||typeof t!="object")){if("type"in t&&t.type==="error"){Cw(e,t);return}n&&Bw(e,t),Uw(e,t)}}function nd(e,t,n){throw ge(e,{mechanism:{handled:!1,type:"auto.ai.anthropic",data:{function:n}}}),t.isRecording()&&(t.setStatus({code:ee,message:"internal_error"}),t.end()),e}function Ww(e,t,n,r,o,s,i,a,c,u){var d;const f=(d=r[Fe])!=null?d:"unknown",l={name:"".concat(o," ").concat(f),op:"gen_ai.".concat(o),attributes:r};if(c&&!u){let p;const h=qt(l,m=>(p=e.apply(t,n),a.recordInputs&&i&&Nc(m,i,Qt(a.enableTruncation)),(async()=>{var g;try{const y=await p;return Dw(y,m,(g=a.recordOutputs)!=null?g:!1)}catch(y){return nd(y,m,s)}})()));return Ei(p,h,"auto.ai.anthropic")}else return qt(l,p=>{var h;try{a.recordInputs&&i&&Nc(p,i,Qt(a.enableTruncation)),Vs=!0;const m=e.apply(t,n);return Vs=!1,Fw(m,p,(h=a.recordOutputs)!=null?h:!1)}catch(m){return Vs=!1,nd(m,p,s)}})}function jw(e,t,n,r,o){return new Proxy(e,{apply(s,i,a){var y;const c=i!==void 0?i:r,u=n.streaming===!0;if(!u&&Vs)return s.apply(c,a);const f=n.operation||"unknown",l=$w(a,t,f),d=(y=l[Fe])!=null?y:"unknown",p=typeof a[0]=="object"?a[0]:void 0,h=!!(p!=null&&p.stream);if(h||u)return Ww(s,c,a,l,f,t,p,o,h,u);let m;const g=$t({name:"".concat(f," ").concat(d),op:"gen_ai.".concat(f),attributes:l},b=>(m=s.apply(c,a),o.recordInputs&&p&&Nc(b,p,Qt(o.enableTruncation)),m.then(E=>(Hw(b,E,o.recordOutputs),E),E=>{throw ge(E,{mechanism:{handled:!1,type:"auto.ai.anthropic",data:{function:t}}}),E})));return Ei(m,g,"auto.ai.anthropic")}})}function zw(e,t){for(const n of Object.keys(ed)){const r=n.split("."),o=r.pop();let s=e;for(const c of r)s=s==null?void 0:s[c];if(!s||typeof s[o]!="function")continue;const i=s[o];if(td.has(i))continue;const a=jw(i,n,ed[n],s,t);td.add(a),s[o]=a}return e}function qw(e,t){return zw(e,cr(t))}const Gw={"models.generateContent":{operation:"generate_content"},"models.generateContentStream":{operation:"generate_content",streaming:!0},"models.embedContent":{operation:"embeddings"},"chats.create":{proxyResultPath:"chat"},"chat.sendMessage":{operation:"chat"},"chat.sendMessageStream":{operation:"chat",streaming:!0}},Vw="google_genai";function Yw(e,t){var r;const n=e==null?void 0:e.promptFeedback;if(n!=null&&n.blockReason){const o=(r=n.blockReasonMessage)!=null?r:n.blockReason;return t.setStatus({code:ee,message:"internal_error"}),ge("Content blocked: ".concat(o),{mechanism:{handled:!1,type:"auto.ai.google_genai"}}),!0}return!1}function Jw(e,t){typeof e.responseId=="string"&&(t.responseId=e.responseId),typeof e.modelVersion=="str
12ing"&&(t.responseModel=e.modelVersion);const n=e.usageMetadata;n&&(typeof n.promptTokenCount=="number"&&(t.promptTokens=n.promptTokenCount),typeof n.candidatesTokenCount=="number"&&(t.completionTokens=n.candidatesTokenCount),typeof n.totalTokenCount=="number"&&(t.totalTokens=n.totalTokenCount))}function Kw(e,t,n){var r,o,s;Array.isArray(e.functionCalls)&&t.toolCalls.push(...e.functionCalls);for(const i of(r=e.candidates)!=null?r:[]){i!=null&&i.finishReason&&!t.finishReasons.includes(i.finishReason)&&t.finishReasons.push(i.finishReason);for(const a of(s=(o=i==null?void 0:i.content)==null?void 0:o.parts)!=null?s:[])n&&a.text&&t.responseTexts.push(a.text),a.functionCall&&t.toolCalls.push({type:"function",id:a.functionCall.id,name:a.functionCall.name,arguments:a.functionCall.args})}}function Xw(e,t,n,r){!e||Yw(e,r)||(Jw(e,t),Kw(e,t,n))}async function*Qw(e,t,n){const r={responseTexts:[],finishReasons:[],toolCalls:[]};try{for await(const o of e)Xw(o,r,n,t),yield o}finally{oa(t,r,n)}}function bo(e,t="user"){return typeof e=="string"?[{role:t,content:e}]:Array.isArray(e)?e.flatMap(n=>bo(n,t)):typeof e!="object"||!e?[]:"role"in e&&typeof e.role=="string"?[e]:"parts"in e?[{...e,role:t}]:[{role:t,content:e}]}function rd(e,t){if("model"in e&&typeof e.model=="string")return e.model;if(t&&typeof t=="object"){const n=t;if("model"in n&&typeof n.model=="string")return n.model;if("modelVersion"in n&&typeof n.modelVersion=="string")return n.modelVersion}return"unknown"}function Zw(e){const t={};return"temperature"in e&&typeof e.temperature=="number"&&(t[Qi]=e.temperature),"topP"in e&&typeof e.topP=="number"&&(t[ea]=e.topP),"topK"in e&&typeof e.topK=="number"&&(t[Eg]=e.topK),"maxOutputTokens"in e&&typeof e.maxOutputTokens=="number"&&(t[Bu]=e.maxOutputTokens),"frequencyPenalty"in e&&typeof e.frequencyPenalty=="number"&&(t[Zi]=e.frequencyPenalty),"presencePenalty"in e&&typeof e.presencePenalty=="number"&&(t[Uu]=e.presencePenalty),t}function eR(e,t,n){const r={[ts]:Vw,[St]:e,[G]:"auto.ai.google_genai"};if(t){if(r[Fe]=rd(t,n),"config"in t&&typeof t.config=="object"&&t.config){const o=t.config;if(Object.assign(r,Zw(o)),"tools"in o&&Array.isArray(o.tools)){const s=o.tools.flatMap(i=>i.functionDeclarations);r[rs]=JSON.stringify(s)}}}else r[Fe]=rd({},n);return r}function od(e,t,n,r){if(n==="embeddings"){const s=t.contents;s!=null&&e.setAttribute(Wu,typeof s=="string"?s:JSON.stringify(s));return}const o=[];if("config"in t&&t.config&&typeof t.config=="object"&&"systemInstruction"in t.config&&t.config.systemInstruction&&o.push(...bo(t.config.systemInstruction,"system")),"history"in t&&o.push(...bo(t.history,"user")),"contents"in t&&o.push(...bo(t.contents,"user")),"message"in t&&o.push(...bo(t.message,"user")),Array.isArray(o)&&o.length){const{systemInstructions:s,filteredMessages:i}=os(o);s&&e.setAttribute(ns,s);const a=Array.isArray(i)?i.length:0;e.setAttributes({[sr]:a,[io]:r?ao(i):Ze(i)})}}function tR(e,t,n){if(!(!t||typeof t!="object")){if(t.modelVersion&&e.setAttribute(so,t.modelVersion),t.usageMetadata&&typeof t.usageMetadata=="object"){const r=t.usageMetadata;typeof r.promptTokenCount=="number"&&e.setAttributes({[rr]:r.promptTokenCount}),typeof r.candidatesTokenCount=="number"&&e.setAttributes({[or]:r.candidatesTokenCount}),typeof r.totalTokenCount=="number"&&e.setAttributes({[Sn]:r.totalTokenCount})}if(n&&Array.isArray(t.candidates)&&t.candidates.length>0){const r=t.candidates.map(o=>{var s;return(s=o.content)!=null&&s.parts&&Array.isArray(o.content.parts)?o.content.parts.map(i=>typeof i.text=="string"?i.text:"").filter(i=>i.length>0).join(""):""}).filter(o=>o.length>0);r.length>0&&e.setAttributes({[Ct]:r.join("")})}if(n&&t.functionCalls){const r=t.functionCalls;Array.isArray(r)&&r.length>0&&e.setAttributes({[fn]:JSON.stringify(r)})}}}function nR(e,t,n,r,o){const s=n.operation==="embeddings";return new Proxy(e,{apply(i,a,c){var p;const u=n.operation||"unknown",f=c[0],l=eR(u,f,r),d=(p=l[Fe])!=null?p:"unknown";return n.streaming?qt({name:"".concat(u," ").concat(d),op:"gen_ai.".concat(u),attributes:l},async h=>{try{o.recordInputs&&f&&od(h,f,u,Qt(o.enableTruncation));const m=await i.apply(r,c);return Qw(m,h,!!o.recordOutputs)}catch(m){throw h.setStatus({code:ee,message:"internal_error"}),ge(m,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:t}}}),h.end(),m}}):$t({name:"".concat(u," ").concat(d),op:"gen_ai.".concat(u),attributes:l},h=>(o.recordInputs&&f&&od(h,f,u,Qt(o.enableTruncation)),bu(()=>i.apply(r,c),m=>{ge(m,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:t}}})},()=>{},m=>{s||tR(h,m,o.recordOutputs)})))}})}function Mc(e,t="",n){return new Proxy(e,{get:(r,o,s)=>{const i=Reflect.get(r,o,s),a=Lg(t,String(o)),c=Gw[a];if(typeof i=="function"&&c){const u=c.operation?nR(i,a,c,r,n):i.bind(r);return c.proxyResultPath?function(...f){const l=u(...f);return l&&typeof l=="object"?Mc(l,c.proxyResultPath,n):l}:u}return typeof i=="function"?i.bind(r):i&&typeof i=="object"?Mc(i,a,n):i}})}function rR(e,t){return Mc(e,"",cr(t))}const vr="auto.ai.langchain",oR={human:"user",ai:"assistant",assistant:"assistant",system:"system",function:"function",tool:"tool"}
12,st=(e,t,n)=>{n!=null&&(e[t]=n)},Ke=(e,t,n)=>{const r=Number(n);Number.isNaN(r)||(e[t]=r)};function mr(e){if(Array.isArray(e))try{const t=e.map(n=>n&&typeof n=="object"&&Mr(n)?Io(n):n);return JSON.stringify(t)}catch(t){return String(e)}return Ze(e,String)}function go(e){var n;const t=e.toLowerCase();return(n=oR[t])!=null?n:t}function sd(e){return e.includes("System")?"system":e.includes("Human")?"user":e.includes("AI")||e.includes("Assistant")?"assistant":e.includes("Function")?"function":e.includes("Tool")?"tool":"user"}function id(e){if(!(!e||Array.isArray(e)))return e.invocation_params}function zu(e){return e.map(t=>{var o,s;const n=t._getType;if(typeof n=="function"){const i=n.call(t);return{role:go(i),content:mr(t.content)}}if(t.lc===1&&t.kwargs){const i=t.id,a=Array.isArray(i)&&i.length>0?i[i.length-1]:"",c=typeof a=="string"?sd(a):"user";return{role:go(c),content:mr((o=t.kwargs)==null?void 0:o.content)}}if(t.type){const i=String(t.type).toLowerCase();return{role:go(i),content:mr(t.content)}}if(t.role)return{role:go(String(t.role)),content:mr(t.content)};const r=(s=t.constructor)==null?void 0:s.name;return r&&r!=="Object"?{role:go(sd(r)),content:mr(t.content)}:{role:"user",content:mr(t.content)}})}function sR(e,t,n){var f,l,d,p,h;const r={},o="kwargs"in e?e.kwargs:void 0,s=(l=(f=t==null?void 0:t.temperature)!=null?f:n==null?void 0:n.ls_temperature)!=null?l:o==null?void 0:o.temperature;Ke(r,Qi,s);const i=(p=(d=t==null?void 0:t.max_tokens)!=null?d:n==null?void 0:n.ls_max_tokens)!=null?p:o==null?void 0:o.max_tokens;Ke(r,Bu,i);const a=(h=t==null?void 0:t.top_p)!=null?h:o==null?void 0:o.top_p;Ke(r,ea,a);const c=t==null?void 0:t.frequency_penalty;Ke(r,Zi,c);const u=t==null?void 0:t.presence_penalty;return Ke(r,Uu,u),t&&"stream"in t&&st(r,$u,!!t.stream),r}function Bg(e,t,n,r,o){return{[ts]:Ze(e!=null?e:"langchain",String),[St]:"chat",[Fe]:Ze(t,String),[G]:vr,...sR(n,r,o)}}function iR(e,t,n,r,o,s){var u,f;const i=s==null?void 0:s.ls_provider,a=(f=(u=o==null?void 0:o.model)!=null?u:s==null?void 0:s.ls_model_name)!=null?f:"unknown",c=Bg(i,a,e,o,s);if(n&&Array.isArray(t)&&t.length>0){st(c,sr,t.length);const l=t.map(d=>({role:"user",content:d}));st(c,io,r?ao(l):Ze(l))}return c}function aR(e,t,n,r,o,s){var u,f,l,d;const i=(f=s==null?void 0:s.ls_provider)!=null?f:(u=e.id)==null?void 0:u[2],a=(d=(l=o==null?void 0:o.model)!=null?l:s==null?void 0:s.ls_model_name)!=null?d:"unknown",c=Bg(i,a,e,o,s);if(n&&Array.isArray(t)&&t.length>0){const p=zu(t.flat()),{systemInstructions:h,filteredMessages:m}=os(p);h&&st(c,ns,h);const g=Array.isArray(m)?m.length:0;st(c,sr,g),st(c,io,r?ao(m):Ze(m))}return c}function cR(e,t){var o;const n=[],r=e.flat();for(const s of r){const i=s.message,a=i==null?void 0:i.tool_calls;if(Array.isArray(a)&&a.length>0)n.push(...a);else{const c=(o=s.message)==null?void 0:o.content;if(Array.isArray(c))for(const u of c){const f=u;f.type==="tool_use"&&n.push(f)}}}n.length>0&&st(t,fn,Ze(n,String))}function uR(e,t){if(!e)return;const n=e.tokenUsage,r=e.usage;if(n)Ke(t,rr,n.promptTokens),Ke(t,or,n.completionTokens),Ke(t,Sn,n.totalTokens);else if(r){Ke(t,rr,r.input_tokens),Ke(t,or,r.output_tokens);const o=Number(r.input_tokens),s=Number(r.output_tokens),i=(Number.isNaN(o)?0:o)+(Number.isNaN(s)?0:s);i>0&&Ke(t,Sn,i),r.cache_creation_input_tokens!==void 0&&Ke(t,$I,r.cache_creation_input_tokens),r.cache_read_input_tokens!==void 0&&Ke(t,BI,r.cache_read_input_tokens)}}function lR(e,t){var u,f,l,d,p,h,m,g;if(!e)return;const n={};if(Array.isArray(e.generations)){const y=e.generations.flat().map(b=>{var E,v;return(E=b.generationInfo)!=null&&E.finish_reason?b.generationInfo.finish_reason:(v=b.generation_info)!=null&&v.finish_reason?b.generation_info.finish_reason:null}).filter(b=>typeof b=="string");if(y.length>0&&st(n,Nr,Ze(y,String)),cR(e.generations,n),t){const b=e.generations.flat().map(E=>{var v,R;return(R=E.text)!=null?R:(v=E.message)==null?void 0:v.content}).filter(E=>typeof E=="string");b.length>0&&st(n,Ct,Ze(b,String))}}uR(e.llmOutput,n);const r=e.llmOutput,o=(f=(u=e.generations)==null?void 0:u[0])==null?void 0:f[0],s=o==null?void 0:o.message,i=(p=(l=r==null?void 0:r.model_name)!=null?l:r==null?void 0:r.model)!=null?p:(d=s==null?void 0:s.response_metadata)==null?void 0:d.model_name;i&&st(n,so,i);const a=(h=r==null?void 0:r.id)!=null?h:s==null?void 0:s.id;a&&st(n,ta,a);const c=(g=r==null?void 0:r.stop_reason)!=null?g:(m=s==null?void 0:s.response_metadata)==null?void 0:m.finish_reason;return c&&st(n,LI,Ze(c,String)),n}function za(e){const t={},n=e==null?void 0:e.lc_agent_name;return typeof n=="string"&&(t[na]=n),t}function fR(e){var r,o,s;const t=(s=(r=e==null?void 0:e.invocation_params)==null?void 0:r.tools)!=null?s:(o=e==null?void 0:e.options)==null?void 0:o.tools;if(!Array.isArray(t)||t.length===0)return;const n=t.map(i=>{var c,u,f;const a=i.function;return{type:"function",name:(u=(c=i.name)!=null?c:a==null?void 0:a.name)!=null?u:"",description:(f=i.description)!=null?f:a==null?void 0:a.description}});return JSON.stringify(n)}function dR(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.addHandler=="function"&&typeof t.copy=="function"}function pR(e){return typeof e=="object"&&(e==null?void 0:e.name)==="SentryCallbackHandler"}function ad(e){return e.some(pR)}function hR(e,t){var r;if(!e)return[t];if(dR(e)){if(ad((r=e.handlers)!=null?r:[]))return e;const o=e.copy();return o.addHandler(t,!0),o}const n=Array.isArray(e)?e:[e];return ad(n)?e:[...n,t]}function qu(e={}){const{recordInputs:t,recordOutputs:n}=cr(e),r=Qt(e.enableTruncation),o=new Map,s=a=>{const c=o.get(a);c!=null&&c.isRecording()&&(c.end(),o.delete(a))}
12,i={lc_serializable:!1,lc_namespace:["langchain_core","callbacks","sentry"],lc_secrets:void 0,lc_attributes:void 0,lc_aliases:void 0,lc_serializable_keys:void 0,lc_id:["langchain_core","callbacks","sentry"],lc_kwargs:{},name:"SentryCallbackHandler",ignoreLLM:!1,ignoreChain:!1,ignoreAgent:!1,ignoreRetriever:!1,ignoreCustomEvent:!1,raiseError:!1,awaitHandlers:!0,handleLLMStart(a,c,u,f,l,d,p,h){const m=id(d),g=iR(a,c,t,r,m,p),y=g[Fe],b=g[St];qt({name:"".concat(b," ").concat(y),op:"gen_ai.chat",attributes:{...za(p),...g,[ae]:"gen_ai.chat"}},E=>(o.set(u,E),E))},handleChatModelStart(a,c,u,f,l,d,p,h){const m=id(d),g=aR(a,c,t,r,m,p),y=fR(l);y&&(g[rs]=y);const b=g[Fe],E=g[St];qt({name:"".concat(E," ").concat(b),op:"gen_ai.chat",attributes:{...za(p),...g,[ae]:"gen_ai.chat"}},v=>(o.set(u,v),v))},handleLLMEnd(a,c,u,f,l){const d=o.get(c);if(d!=null&&d.isRecording()){const p=lR(a,n);p&&d.setAttributes(p),s(c)}},handleLLMError(a,c){const u=o.get(c);u!=null&&u.isRecording()&&(u.setStatus({code:ee,message:"internal_error"}),s(c)),ge(a,{mechanism:{handled:!1,type:"".concat(vr,".llm_error_handler")}})},handleChainStart(a,c,u,f,l,d,p,h){if(d!=null&&d.__sentry_langgraph__)return;const m=h||a.name||"unknown_chain",g={[G]:"auto.ai.langchain","langchain.chain.name":m};t&&(g["langchain.chain.inputs"]=JSON.stringify(c)),qt({name:"chain ".concat(m),op:"gen_ai.invoke_agent",attributes:{...g,[ae]:"gen_ai.invoke_agent"}},y=>(o.set(u,y),y))},handleChainEnd(a,c){const u=o.get(c);u!=null&&u.isRecording()&&(n&&u.setAttributes({"langchain.chain.outputs":JSON.stringify(a)}),s(c))},handleChainError(a,c){const u=o.get(c);u!=null&&u.isRecording()&&(u.setStatus({code:ee,message:"internal_error"}),s(c)),ge(a,{mechanism:{handled:!1,type:"".concat(vr,".chain_error_handler")}})},handleToolStart(a,c,u,f,l,d,p){if(d!=null&&d.__sentry_langgraph__)return;const h=p||a.name||"unknown_tool",m={...za(d),[G]:vr,[St]:"execute_tool",[wg]:h};t&&(m[Rg]=c),qt({name:"execute_tool ".concat(h),op:"gen_ai.execute_tool",attributes:{...m,[ae]:"gen_ai.execute_tool"}},g=>(o.set(u,g),g))},handleToolEnd(a,c){const u=o.get(c);if(u!=null&&u.isRecording()){if(n){const f=a,l=f&&typeof f=="object"&&"content"in f?f.content:a;u.setAttributes({[kg]:typeof l=="string"?l:JSON.stringify(l)})}s(c)}},handleToolError(a,c){const u=o.get(c);u!=null&&u.isRecording()&&(u.setStatus({code:ee,message:"internal_error"}),s(c)),ge(a,{mechanism:{handled:!1,type:"".concat(vr,".tool_error_handler")}})},copy(){return i},toJSON(){return{lc:1,type:"not_implemented",id:i.lc_id}},toJSONNotImplemented(){return{lc:1,type:"not_implemented",id:i.lc_id}}};return i}function mR(e){var n,r;const t=(r=(n=e.constructor)==null?void 0:n.name)!=null?r:"";return t.includes("OpenAI")?"openai":t.includes("Google")?"google_genai":t.includes("Mistral")?"mistralai":t.includes("Vertex")?"google_vertexai":t.includes("Bedrock")?"aws_bedrock":t.includes("Ollama")?"ollama":t.includes("Cloudflare")?"cloudflare":t.includes("Cohere")?"cohere":"langchain"}function gR(e){var r;const t=e!=null?e:{},n={[G]:vr,[ae]:Ig,[St]:"embeddings",[Fe]:(r=t.model)!=null?r:"unknown"};return n[ts]=mR(t),"dimensions"in t&&(n[Tg]=t.dimensions),"encodingFormat"in t&&(n[vg]=t.encodingFormat),n}function _R(e,t,n={}){const{recordInputs:r}=cr(n),o=gR(e),s=o[Fe]||"unknown";return r&&t!=null&&(o[Wu]=typeof t=="string"?t:JSON.stringify(t)),{name:"embeddings ".concat(s),op:Ig,attributes:o}}function cd(e,t={}){return new Proxy(e,{apply(n,r,o){return $t(_R(r,o[0],t),()=>Reflect.apply(n,r,o).then(void 0,s=>{throw ge(s,{mechanism:{handled:!1,type:"auto.ai.langchain"}}),s}))}})}function yR(e,t){const n=e;return typeof n.embedQuery=="function"&&(n.embedQuery=cd(n.embedQuery,t)),typeof n.embedDocuments=="function"&&(n.embedDocuments=cd(n.embedDocuments,t)),e}const Gu="auto.ai.langgraph";function SR(e){const t=e[0];if(typeof t!="object"||!t||!("llm"in t)||!t.llm||typeof t.llm!="object")return null;const n=t.llm;return typeof n.modelName!="string"&&typeof n.model!="string"?null:n}function bR(e){const t=e[0];return typeof t=="object"&&t&&"name"in t&&typeof t.name=="string"?t.name:null}function ER(e,t,n){const r="__sentry_tool_wrapped__";for(const o of e){if(!o||typeof o!="object")continue;const s=o,i=s.invoke;if(typeof i!="function"||Object.prototype.hasOwnProperty.call(s,r))continue;const a=typeof s.name=="string"?s.name:"unknown_tool",c=typeof s.description=="str
12ing"?s.description:void 0,u=new Proxy(i,{apply(f,l,d){var y,b;const p={[G]:Gu,[ae]:Xf,[St]:"execute_tool",[wg]:a,[WI]:"function"},h=d[1],m=(b=(y=h==null?void 0:h.metadata)==null?void 0:y.lc_agent_name)!=null?b:n;typeof m=="string"&&(p[na]=m),c&&(p[jI]=c);const g=d[0];if(typeof g=="object"&&g&&("id"in g&&typeof g.id=="string"&&(p[HI]=g.id),t.recordInputs)){const E="args"in g&&typeof g.args=="object"?g.args:g;try{p[Rg]=JSON.stringify(E)}catch(v){}}return $t({op:Xf,name:"execute_tool ".concat(a),attributes:p},async E=>{try{const v=await Reflect.apply(f,l,d);if(t.recordOutputs)try{const R=v,I=R&&typeof R=="object"&&"content"in R?R.content:v;E.setAttribute(kg,typeof I=="string"?I:JSON.stringify(I))}catch(R){}return v}catch(v){throw E.setStatus({code:ee,message:"internal_error"}),ge(v,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),v}})}});s.invoke=u,Object.defineProperty(s,r,{value:!0,enumerable:!1})}return e}function vR(e){if(!e||e.length===0)return null;const t=[];for(const n of e)if(n&&typeof n=="object"){const r=n.tool_calls;r&&Array.isArray(r)&&t.push(...r)}return t.length>0?t:null}function TR(e){const t=e;let n=0,r=0,o=0;if(t.usage_metadata&&typeof t.usage_metadata=="object"){const s=t.usage_metadata;return typeof s.input_tokens=="number"&&(n=s.input_tokens),typeof s.output_tokens=="number"&&(r=s.output_tokens),typeof s.total_tokens=="number"&&(o=s.total_tokens),{inputTokens:n,outputTokens:r,totalTokens:o}}if(t.response_metadata&&typeof t.response_metadata=="object"){const s=t.response_metadata;if(s.tokenUsage&&typeof s.tokenUsage=="object"){const i=s.tokenUsage;typeof i.promptTokens=="number"&&(n=i.promptTokens),typeof i.completionTokens=="number"&&(r=i.completionTokens),typeof i.totalTokens=="number"&&(o=i.totalTokens)}}return{inputTokens:n,outputTokens:r,totalTokens:o}}function IR(e,t){const n=t;if(n.response_metadata&&typeof n.response_metadata=="object"){const r=n.response_metadata;r.model_name&&typeof r.model_name=="string"&&e.setAttribute(so,r.model_name),r.finish_reason&&typeof r.finish_reason=="string"&&e.setAttribute(Nr,[r.finish_reason])}}function wR(e){var n,r,o,s,i,a,c,u;if(!((s=(o=(r=(n=e.builder)==null?void 0:n.nodes)==null?void 0:r.tools)==null?void 0:o.runnable)!=null&&s.tools))return null;const t=(u=(c=(a=(i=e.builder)==null?void 0:i.nodes)==null?void 0:a.tools)==null?void 0:c.runnable)==null?void 0:u.tools;return!t||!Array.isArray(t)||t.length===0?null:t.map(f=>{var l,d,p;return{name:(l=f.lc_kwargs)==null?void 0:l.name,description:(d=f.lc_kwargs)==null?void 0:d.description,schema:(p=f.lc_kwargs)==null?void 0:p.schema}})}function RR(e,t,n){var d;const r=n,o=r==null?void 0:r.messages;if(!o||!Array.isArray(o))return;const s=(d=t==null?void 0:t.length)!=null?d:0,i=o.length>s?o.slice(s):[];if(i.length===0)return;const a=vR(i);a&&e.setAttribute(fn,JSON.stringify(a));const c=zu(i);e.setAttribute(Ct,JSON.stringify(c));let u=0,f=0,l=0;for(const p of i){const h=TR(p);u+=h.inputTokens,f+=h.outputTokens,l+=h.totalTokens,IR(e,p)}u>0&&e.setAttribute(rr,u),f>0&&e.setAttribute(or,f),l>0&&e.setAttribute(Sn,l)}let xc=!1;const vi="__sentry_patched__";function kR(e){const t={[G]:Gu,[ae]:"gen_ai.create_agent",[St]:"create_agent"};return{op:"gen_ai.create_agent",name:e?"create_agent ".concat(e):"create_agent",attributes:t}}function AR(e,t){if(Object.prototype.hasOwnProperty.call(e,vi))return e;const n=qu(t),r=new Proxy(e,{apply(o,s,i){return xc?Reflect.apply(o,s,i):$t(kR(),a=>{try{const c=Reflect.apply(o,s,i),u=i.length>0?i[0]:{};u!=null&&u.name&&typeof u.name=="string"&&(a.setAttribute(na,u.name),a.updateName("create_agent ".concat(u.name)));const f=c.invoke;return f&&typeof f=="function"&&(c.invoke=Ug(f.bind(c),c,u,t,void 0,n)),c}catch(c){throw a.setStatus({code:ee,message:"internal_error"}),ge(c,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),c}})}});return Object.defineProperty(r,vi,{value:!0,enumerable:!1}),r}function Ug(e,t,n,r,o,s){return new Proxy(e,{apply(i,a,c){var f;const u=(f=o==null?void 0:o.modelName)!=null?f:o==null?void 0:o.model;return $t({op:"gen_ai.invoke_agent",name:"invoke_agent",attributes:{[G]:Gu,[ae]:UI,[St]:"invoke_agent"}},async l=>{var d,p,h,m;try{const g=n==null?void 0:n.name;g&&typeof g=="string"&&(l.setAttribute(FI,g),l.setAttribute(na,g),l.updateName("invoke_agent ".concat(g))),u&&l.setAttribute(Fe,u);const y=c.length>1?c[1]:void 0,b=y==null?void 0:y.configurable,E=b==null?void 0:b.thread_id;if(E&&typeof E=="string"&&l.setAttribute(Hu,E),s){const $=(d=c[1])!=null?d:{};c[1]=$;const T=(p=$.metadata)!=null?p:{};$.metadata={...T,__sentry_langgraph__:!0,...typeof g=="string"?{lc_agent_name:g}:{}},$.callbacks=hR($.callbacks,s)}const v=wR(t);v&&l.setAttribute(rs,JSON.stringify(v));const R=r.recordInputs,I=r.recordOutputs,S=c.length>0?(m=(h=c[0])==null?void 0:h.messages)!=null?m:[]:[];if(S&&R){const $=zu(S),{systemInstructions:T,filteredMessages:P}=os($);T&&l.setAttribute(ns,T);const N=Qt(r.enableTruncation),L=Array.isArray(P)?P.length:0;l.setAttributes({[io]:N?ao(P):Ze(P),[sr]:L})}const O=await Reflect.apply(i,a,c);return I&&RR(l,S!=null?S:null,O),O}catch(g){throw l.setStatus({code:ee,message:"internal_error"}),ge(g,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),g}})}})}function CR(e,t){if(Object.prototype.hasOwnProperty.call(e,vi))return e;const n=cr(t),r=qu(n),o=new Proxy(e,{apply(s,i,a){const c=SR(a),u=bR(a),f=a[0];f&&Array.isArray(f.tools)&&f.tools.length>0&&ER(f.tools,n,u!=null?u:void 0),xc=!0;let l;try{l=Reflect.apply(s,i,a)}finally{xc=!1}const d=l.invoke;if(d&&typeof d=="function"){const p={};u&&(p.name=u),l.invoke=Ug(d.bind(l),l,p,n,c,r)}return l}});return Object.defineProperty(o,vi,{value:!0,enumerable:!1}),o}function Hg(e,t){return e.compile=AR(e.compile,cr(t)),e}const NR=Hg;
12function MR(e,t,n){const r=n.getOptions(),o=n.getDsn(),s=r.tunnel,i=Qo(r._metadata),a={sent_at:new Date(Dt()).toISOString(),...xR(t)&&{trace:t},...i&&{sdk:i},...!!s&&o&&{dsn:Ft(o)}},c=n.getDataCollectionOptions().userInfo?"auto":"never",u=[{type:"span",item_count:e.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...yn()&&{ingest_settings:{infer_ip:c,infer_user_agent:c}},items:e}];return lt(a,[u])}function xR(e){return!!e.trace_id&&!!e.public_key}function OR(e){let t=156;if(t+=e.name.length*2,t+=ef(e.attributes),e.links&&e.links.length>0){const n=e.links[0],r=n==null?void 0:n.attributes,o=100+(r?ef(r):0);t+=o*e.links.length}return t}const ud=1e3,PR=5e6;class LR{constructor(t,n){this._traceBuckets=new Map,this._client=t;const{maxSpanLimit:r,flushInterval:o,maxTraceWeightInBytes:s}=n!=null?n:{};this._maxSpanLimit=r&&r>0&&r<=ud?r:ud,this._flushInterval=o&&o>0?o:5e3,this._maxTraceWeight=s&&s>0?s:PR,this._client.on("flush",()=>{this.drain()}),this._client.on("close",()=>{this._traceBuckets.forEach(i=>{clearTimeout(i.timeout)}),this._traceBuckets.clear()})}add(t){const n=t.trace_id;let r=this._traceBuckets.get(n);r||(r={spans:new Set,size:0,timeout:Yi(setTimeout(()=>{this.flush(n)},this._flushInterval))},this._traceBuckets.set(n,r)),r.spans.add(t),r.size+=OR(t),(r.spans.size>=this._maxSpanLimit||r.size>=this._maxTraceWeight)&&this.flush(n)}drain(){this._traceBuckets.size&&(A&&_.log("Flushing span tree map with ".concat(this._traceBuckets.size," traces")),this._traceBuckets.forEach((t,n)=>{this.flush(n)}))}flush(t){var c;const n=this._traceBuckets.get(t);if(!n)return;if(!n.spans.size){this._removeTrace(t);return}const r=Array.from(n.spans),o=(c=r[0])==null?void 0:c._segmentSpan;if(!o){A&&_.warn("No segment span reference found on span JSON, cannot compute DSC"),this._removeTrace(t);return}const s=It(o),i=r.map(u=>{const{_segmentSpan:f,...l}=u;return l}),a=MR(i,s,this._client);A&&_.log("Sending span envelope for trace ".concat(t," with ").concat(i.length," spans")),this._client.sendEnvelope(a).then(null,u=>{A&&_.error("Error while sending streamed span envelope:",u)}),this._removeTrace(t)}_removeTrace(t){const n=this._traceBuckets.get(t);n&&clearTimeout(n.timeout),this._traceBuckets.delete(t)}}function Wg(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const Ur=H;function DR(){return"history"in Ur&&!!Ur.history}function FR(){if(!("fetch"in Ur))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch(e){return!1}}function Oc(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function jg(){var n;if(typeof EdgeRuntime=="string")return!0;if(!FR())return!1;if(Oc(Ur.fetch))return!0;let e=!1;const t=Ur.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=Oc(r.contentWindow.fetch)),t.head.removeChild(r)}catch(r){A&&_.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}function $R(){return"ReportingObserver"in Ur}function sa(e,t){const n="fetch",r=In(n,e);return wn(n,()=>zg(void 0,t)),r}function BR(e){const t="fetch-body-resolved",n=In(t,e);return wn(t,()=>zg(HR)),n}function zg(e,t=!1){t&&!jg()||De(H,"fetch",function(n){return function(...r){const o=new Error,{method:s,url:i}=WR(r),a={args:r,fetchData:{method:s,url:i},startTimestamp:me()*1e3,virtualError:o,headers:jR(r)};return e||it("fetch",{...a}),n.apply(H,r).then(async c=>(e?e(c):it("fetch",{...a,endTimestamp:me()*1e3,response:c}),c),c=>{var d;it("fetch",{...a,endTimestamp:me()*1e3,error:c}),kt(c)&&c.stack===void 0&&(c.stack=o.stack,ve(c,"framesToPop",1));const u=C(),f=(d=u==null?void 0:u.getOptions().enhanceFetchErrorMessages)!=null?d:"always";if(f!==!1&&c instanceof TypeError&&(c.message==="Failed to fetch"||c.message==="Load failed"||c.message==="NetworkError when attempting to fetch resource."))try{const h=new URL(a.fetchData.url).host;f==="always"?c.message="".concat(c.message," (").concat(h,")"):ve(c,"__sentry_fetch_url_host__",h)}catch(p){}throw c})}})}async function UR(e,t){if(e!=null&&e.body){const n=e.body,r=n.getReader(),o=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let s=!0;for(;s;){let i;try{i=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:a}=await r.read();clearTimeout(i),a&&(t(),s=!1)}catch(a){s=!1}finally{clearTimeout(i)}}clearTimeout(o),r.releaseLock(),n.cancel().then(null,()=>{})}}function HR(e){let t;try{t=e.clone()}catch(n){return}UR(t,()=>{it("fetch-body-resolved",{endTimestamp:me()*1e3,response:e})})}function Ys(e,t){return at(e)&&!!e[t]}function ld(e){return typeof e=="string"?e:e?Ys(e,"url")?e.url:e.toString?e.toString():"":""}function WR(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:ld(n),method:Ys(r,"method")?String(r.method).toUpperCase():hu(n)&&Ys(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:ld(t),method:Ys(t,"method")?String(t.method).toUpperCase():"GET"}}function jR(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(hu(t))return new Headers(t.headers)}catch(r){}}const qg=H;function bn(){try{return qg.document.location.href}catch(e){return""}}function Vu(e,t=5){if(!qg.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 gt=H,de=gt.document,Eo=gt.navigator,Gg="Report a Bug",zR="Cancel",qR="Send Bug Report",GR="Confirm",VR="Report a Bug",YR="[email protected]",JR="Email",
12KR="What's the bug? What did you expect?",XR="Description",QR="Your Name",ZR="Name",ek="Thank you for your report!",tk="(required)",nk="Add a screenshot",rk="Remove screenshot",ok="Highlight",sk="Hide",ik="Remove",Vg="Unable to submit feedback with empty message",Yg="No client setup, cannot send feedback.",Jg="Unable to determine if Feedback was correctly sent.",Kg="Unable to send feedback. This could be because this domain is not in your list of allowed domains.",Xg="Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.",ak="widget",ck="api",uk=5e3,lk={ERROR_EMPTY_MESSAGE:Vg,ERROR_NO_CLIENT:Yg,ERROR_TIMEOUT:Jg,ERROR_FORBIDDEN:Kg,ERROR_GENERIC:Xg};function Js(e,t){var n;return(n=t==null?void 0:t[e])!=null?n:lk[e]}function fd(e,t){return new Error(Js(e,t))}const Qg=(e,t={includeReplay:!0})=>{const n=t.errorMessages;if(!e.message)throw fd("ERROR_EMPTY_MESSAGE",n);const r=C();if(!r)throw fd("ERROR_NO_CLIENT",n);e.tags&&Object.keys(e.tags).length&&W().setTags(e.tags);const o=yg({source:ck,url:bn(),...e},t);return new Promise((s,i)=>{const a=setTimeout(()=>{c(),i(Js("ERROR_TIMEOUT",n))},3e4),c=r.on("afterSendEvent",(u,f)=>{if(u.event_id===o)return clearTimeout(a),c(),f!=null&&f.statusCode&&f.statusCode>=200&&f.statusCode<300?s(o):(f==null?void 0:f.statusCode)===403?i(Js("ERROR_FORBIDDEN",n)):i(Js("ERROR_GENERIC",n))})})},Ks=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function fk(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(Eo.userAgent)||/Macintosh/i.test(Eo.userAgent)&&Eo.maxTouchPoints&&Eo.maxTouchPoints>1||!isSecureContext)}function ks(e,t){return{...e,...t,tags:{...e.tags,...t.tags},onFormOpen:()=>{var n,r;(n=t.onFormOpen)==null||n.call(t),(r=e.onFormOpen)==null||r.call(e)},onFormClose:()=>{var n,r;(n=t.onFormClose)==null||n.call(t),(r=e.onFormClose)==null||r.call(e)},onSubmitSuccess:(n,r)=>{var o,s;(o=t.onSubmitSuccess)==null||o.call(t,n,r),(s=e.onSubmitSuccess)==null||s.call(e,n,r)},onSubmitError:n=>{var r,o;(r=t.onSubmitError)==null||r.call(t,n),(o=e.onSubmitError)==null||o.call(e,n)},onFormSubmitted:()=>{var n,r;(n=t.onFormSubmitted)==null||n.call(t),(r=e.onFormSubmitted)==null||r.call(e)},themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function dk(e){const t=de.createElement("style");return t.textContent='\n.widget__actor {\n  position: fixed;\n  z-index: var(--z-index);\n  margin: var(--page-margin);\n  inset: var(--actor-inset);\n\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  padding: 16px;\n\n  font-family: inherit;\n  font-size: var(--font-size);\n  font-weight: 600;\n  line-height: 1.14em;\n  text-decoration: none;\n\n  background: var(--actor-background, var(--background));\n  border-radius: var(--actor-border-radius, 1.7em/50%);\n  border: var(--actor-border, var(--border));
12\n  box-shadow: var(--actor-box-shadow, var(--box-shadow));\n  color: var(--actor-color, var(--foreground));\n  fill: var(--actor-color, var(--foreground));\n  cursor: pointer;\n  opacity: 1;\n  transition: transform 0.2s ease-in-out;\n  transform: translate(0, 0) scale(1);\n}\n.widget__actor[aria-hidden="true"] {\n  opacity: 0;\n  pointer-events: none;\n  visibility: hidden;\n  transform: translate(0, 16px) scale(0.98);\n}\n\n.widget__actor:hover {\n  background: var(--actor-hover-background, var(--background));\n  filter: var(--interactive-filter);\n}\n\n.widget__actor svg {\n  width: 1.14em;\n  height: 1.14em;\n}\n\n@media (max-width: 600px) {\n  .widget__actor span {\n    display: none;\n  }\n}\n',e&&t.setAttribute("nonce",e),t}function Qe(e,t){return Object.entries(t).forEach(([n,r])=>{e.setAttributeNS(null,n,r)}),e}const gr=20,pk="http://www.w3.org/2000/svg";function hk(){const e=a=>gt.document.createElementNS(pk,a),t=Qe(e("svg"),{width:"".concat(gr),height:"".concat(gr),viewBox:"0 0 ".concat(gr," ").concat(gr),fill:"var(--actor-color, var(--foreground))"}),n=Qe(e("g"),{clipPath:"url(#clip0_57_80)"}),r=Qe(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z"});t.appendChild(n).appendChild(r);const o=e("defs"),s=Qe(e("clipPath"),{id:"clip0_57_80"}),i=Qe(e("rect"),{width:"".concat(gr),height:"".concat(gr),fill:"white"});return s.appendChild(i),o.appendChild(s),t.appendChild(o).appendChild(s).appendChild(i),t}function mk({triggerLabel:e,triggerAriaLabel:t,shadow:n,styleNonce:r}){const o=de.createElement("button");if(o.type="button",o.className="widget__actor",o.ariaHidden="false",o.ariaLabel=t||e||Gg,o.appendChild(hk()),e){const i=de.createElement("span");i.appendChild(de.createTextNode(e)),o.appendChild(i)}const s=dk(r);return{el:o,appendToDom(){n.appendChild(s),n.appendChild(o)},removeFromDom(){o.remove(),s.remove()},show(){o.ariaHidden="false"},hide(){o.ariaHidden="true"}}}const Zg="rgba(88, 74, 192, 1)",gk={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:Zg,successColor:"#268d75",errorColor:"#df3338",border:"1.5px solid rgba(41, 35, 47, 0.13)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(95%)"},dd={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackgroun
12d:Zg,successColor:"#2da98c",errorColor:"#f55459",border:"1.5px solid rgba(235, 230, 239, 0.15)",boxShadow:"0px 4px 24px 0px rgba(43, 34, 51, 0.12)",outline:"1px auto var(--accent-background)",interactiveFilter:"brightness(150%)"};function pd(e){return"\n  --foreground: ".concat(e.foreground,";\n  --background: ").concat(e.background,";\n  --accent-foreground: ").concat(e.accentForeground,";\n  --accent-background: ").concat(e.accentBackground,";\n  --success-color: ").concat(e.successColor,";\n  --error-color: ").concat(e.errorColor,";\n  --border: ").concat(e.border,";\n  --box-shadow: ").concat(e.boxShadow,";\n  --outline: ").concat(e.outline,";\n  --interactive-filter: ").concat(e.interactiveFilter,";\n  ")}function hd({colorScheme:e,themeDark:t,themeLight:n,styleNonce:r}){const o=de.createElement("style");return o.textContent="\n:host {\n  --font-family: system-ui, 'Helvetica Neue', Arial, sans-serif;\n  --font-size: 14px;\n  --z-index: 100000;\n\n  --page-margin: 16px;\n  --inset: auto 0 0 auto;\n  --actor-inset: var(--inset);\n\n  font-family: var(--font-family);\n  font-size: var(--font-size);\n\n  ".concat(e!=="system"?"color-scheme: only ".concat(e,";"):"","\n\n  ").concat(pd(e==="dark"?{...dd,...t}:{...gk,...n}),"\n}\n\n").concat(e==="system"?"\n@media (prefers-color-scheme: dark) {\n  :host {\n    color-scheme: only dark;\n\n    ".concat(pd({...dd,...t}),"\n  }\n}"):"","\n"),r&&o.setAttribute("nonce",r),o}const e_=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>({id:o="sentry-feedback",autoInject:s=!0,showBranding:i=!0,isEmailRequired:a=!1,isNameRequired:c=!1,showEmail:u=!0,showName:f=!0,enableScreenshot:l=!0,useSentryUser:d={email:"email",name:"username"},tags:p,styleNonce:h,scriptNonce:m,colorScheme:g="system",themeLight:y={},themeDark:b={},addScreenshotButtonLabel:E=nk,cancelButtonLabel:v=zR,confirmButtonLabel:R=GR,emailLabel:I=JR,emailPlaceholder:S=YR,formTitle:O=VR,isRequiredLabel:$=tk,messageLabel:T=XR,messagePlaceholder:P=KR,nameLabel:N=ZR,namePlaceholder:L=QR,removeScreenshotButtonLabel:B=rk,submitButtonLabel:Q=qR,successMessageText:te=ek,triggerLabel:F=Gg,triggerAriaLabel:M="",highlightToolText:K=ok,hideToolText:x=sk,removeHighlightText:V=ik,errorEmptyMessageText:oe=Vg,errorNoClientText:ce=Yg,errorTimeoutText:ye=Jg,errorForbiddenText:$e=Kg,errorGenericText:dt=Xg,onFormOpen:Bt,onFormClose:pt,onSubmitSuccess:Mn,onSubmitError:Ut,onFormSubmitted:bs}={})=>{const Ht={id:o,autoInject:s,showBranding:i,isEmailRequired:a,isNameRequired:c,showEmail:u,showName:f,enableScreenshot:l,useSentryUser:d,tags:p,styleNonce:h,scriptNonce:m,colorScheme:g,themeDark:b,themeLight:y,triggerLabel:F,triggerAriaLabel:M,cancelButtonLabel:v,submitButtonLabel:Q,confirmButtonLabel:R,formTitle:O,emailLabel:I,emailPlaceholder:S,messageLabel:T,messagePlaceholder:P,nameLabel:N,namePlaceholder:L,successMessageText:te,isRequiredLabel:$,addScreenshotButtonLabel:E,removeScreenshotButtonLabel:B,highlightToolText:K,hideToolText:x,removeHighlightText:V,errorEmptyMessageText:oe,errorNoClientText:ce,errorTimeoutText:ye,errorForbiddenText:$e,errorGenericText:dt,onFormClose:pt,onFormOpen:Bt,onSubmitError:Ut,onSubmitSuccess:Mn,onFormSubmitted:bs};let tt=null,je=null,Je=[];const dr=D=>{if(!tt){const se=de.createElement("div");se.id=String(D.id),de.body.appendChild(se),tt=se.attachShadow({mode:"open"}),je=hd(D),tt.appendChild(je)}return tt},pr=async D=>{const se=D.enableScreenshot&&fk();let J,fe;try{J=(t?t():await e("feedbackModalIntegration",m))(),Tc(J)}catch(Pe){throw Ks&&_.error("[Feedback] Error when trying to load feedback integrations. Try using `feedbackSyncIntegration` in your `Sentry.init`."),new Error("[Feedback] Missing feedback modal integration!")}try{const Pe=se?n?n():await e("feedbackScreenshotIntegration",m):void 0;Pe&&(fe=Pe(),Tc(fe))}catch(Pe){Ks&&_.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.")}const le={ERROR_EMPTY_MESSAGE:D.errorEmptyMessageText,ERROR_NO_CLIENT:D.errorNoClientText,ERROR_TIMEOUT:D.errorTimeoutText,ERROR_FORBIDDEN:D.errorForbiddenText,ERROR_GENERIC:D.errorGenericText},ne=(Pe,DS)=>Qg(Pe,{includeReplay:!0,...DS,errorMessages:le}),Be=J.createDialog({options:{...D,onFormClose:()=>{var Pe;Be==null||Be.close(),(Pe=D.onFormClose)==null||Pe.call(D)},onFormSubmitted:()=>{var Pe;Be==null||Be.close(),(Pe=D.onFormSubmitted)==null||Pe.call(D)}},screenshotIntegration:fe,sendFeedback:ne,shadow:dr(D)});return Be},xn=(D,se={})=>
12{const J=ks(Ht,se),fe=typeof D=="string"?de.querySelector(D):typeof D.addEventListener=="function"?D:null;if(!fe)throw Ks&&_.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let le=null;const ne=async()=>{le||(le=await pr({...J,onFormSubmitted:()=>{var Pe;le==null||le.removeFromDom(),(Pe=J.onFormSubmitted)==null||Pe.call(J)}})),le.appendToDom(),le.open()};fe.addEventListener("click",ne);const Be=()=>{Je=Je.filter(Pe=>Pe!==Be),le==null||le.removeFromDom(),le=null,fe.removeEventListener("click",ne)};return Je.push(Be),Be},On=(D={})=>{const se=ks(Ht,D),J=dr(se),fe=mk({triggerLabel:se.triggerLabel,triggerAriaLabel:se.triggerAriaLabel,shadow:J,styleNonce:h});return xn(fe.el,{...se,onFormOpen(){fe.hide()},onFormClose(){fe.show()},onFormSubmitted(){fe.show()}}),fe};return{name:"Feedback",setupOnce(){!yn()||!Ht.autoInject||(de.readyState==="loading"?de.addEventListener("DOMContentLoaded",()=>On().appendToDom()):On().appendToDom())},attachTo:xn,createWidget(D={}){const se=On(ks(Ht,D));return se.appendToDom(),se},async createForm(D={}){return pr(ks(Ht,D))},setTheme(D){if(Ht.colorScheme=D,tt){const se=hd(Ht);je?tt.replaceChild(se,je):tt.prepend(se),je=se}},remove(){var D;tt&&((D=tt.parentElement)==null||D.remove(),tt=null,je=null),Je.forEach(se=>se()),Je=[]}}};function _k(){const e=C();return e==null?void 0:e.getIntegrationByName("Feedback")}var ia,he,t_,Fn,md,n_,Pc,Fo={},Yu=[],yk=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ju=Array.isArray;function un(e,t){for(var n in t)e[n]=t[n];return e}function r_(e){var t=e.parentNode;t&&t.removeChild(e)}function Z(e,t,n){var r,o,s,i={};for(s in t)s=="key"?r=t[s]:s=="ref"?o=t[s]:i[s]=t[s];if(arguments.length>2&&(i.children=arguments.length>3?ia.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)i[s]===void 0&&(i[s]=e.defaultProps[s]);return Xs(e,i,r,o,null)}function Xs(e,t,n,r,o){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o==null?++t_:o,__i:-1,__u:0};return o==null&&he.vnode!=null&&he.vnode(s),s}function ss(e){return e.children}function Qs(e,t){this.props=e,this.context=t}function Hr(e,t){if(t==null)return e.__?Hr(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Hr(e):null}function Sk(e,t,n){var r,o=e.__v,s=o.__e,i=e.__P;if(i)return(r=un({},o)).__v=o.__v+1,he.vnode&&he.vnode(r),Ku(i,r,o,e.__n,i.ownerSVGElement!==void 0,32&o.__u?[s]:null,t,s==null?Hr(o):s,!!(32&o.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=s&&o_(r),r}function o_(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return o_(e)}}function gd(e){(!e.__d&&(e.__d=!0)&&Fn.push(e)&&!Ti.__r++||md!==he.debounceRendering)&&((md=he.debounceRendering)||n_)(Ti)}function Ti(){var e,t,n,r=[],o=[];for(Fn.sort(Pc);e=Fn.shift();)e.__d&&(n=Fn.length,t=Sk(e,r,o)||t,n===0||Fn.length>n?(Lc(r,t,o),o.length=r.length=0,t=void 0,Fn.sort(Pc)):t&&he.__c&&he.__c(t,Yu));t&&Lc(r,t,o),Ti.__r=0}function s_(e,t,n,r,o,s,i,a,c,u,f){var l,d,p,h,m,g=r&&r.__k||Yu,y=t.length;for(n.__d=c,bk(n,t,g),c=n.__d,l=0;l<y;l++)(p=n.__k[l])!=null&&typeof p!="boolean"&&typeof p!="function"&&(d=p.__i===-1?Fo:g[p.__i]||Fo,p.__i=l,Ku(e,p,d,o,s,i,a,c,u,f),h=p.__e,p.ref&&d.ref!=p.ref&&(d.ref&&Xu(d.ref,null,p),f.push(p.ref,p.__c||h,p)),m==null&&h!=null&&(m=h),65536&p.__u||d.__k===p.__k?c=i_(p,c,e):typeof p.type=="function"&&p.__d!==void 0?c=p.__d:h&&(c=h.nextSibling),p.__d=void 0,p.__u&=-196609);n.__d=c,n.__e=m}function bk(e,t,n){var r,o,s,i,a,c=t.length,u=n.length,f=u,l=0;for(e.__k=[],r=0;r<c;r++)(o=e.__k[r]=(o=t[r])==null||typeof o=="boolean"||typeof o=="function"?null:typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?Xs(null,o,null,null,o):Ju(o)?Xs(ss,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?Xs(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)!=null?(o.__=e,o.__b=e.__b+1,a=Ek(o,n,i=r+l,f),o.__i=a,s=null,a!==-1&&(f--,(s=n[a])&&(s.__u|=131072)),s==null||s.__v===null?(a==-1&&l--,typeof o.type!="function"&&(o.__u|=65536)):a!==i&&(a===i+1?l++:a>i?f>c-i?l+=a-i:l--:l=a<i&&a==i-1?a-i:0,a!==r+l&&(o.__u|=65536))):(s=n[r])&&s.key==null&&s.__e&&(s.__e==e.__d&&(e.__d=Hr(s)),Dc(s,s,!1),n[r]=null,f--);if(f)for(r=0;r<u;r++)(s=n[r])!=null&&!(131072&s.__u)&&(s.__e==e.__d&&(e.__d=Hr(s)),Dc(s,s))}function i_(e,t,n){var r,o;
vendor: 4,253 bytes, line 12
12if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=i_(r[o],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function Ek(e,t,n,r){var o=e.key,s=e.type,i=n-1,a=n+1,c=t[n];if(c===null||c&&o==c.key&&s===c.type)return n;if(r>(c!=null&&!(131072&c.__u)?1:0))for(;i>=0||a<t.length;){if(i>=0){if((c=t[i])&&!(131072&c.__u)&&o==c.key&&s===c.type)return i;i--}if(a<t.length){if((c=t[a])&&!(131072&c.__u)&&o==c.key&&s===c.type)return a;a++}}return-1}function _d(e,t,n){t[0]==="-"?e.setProperty(t,n==null?"":n):e[t]=n==null?"":typeof n!="number"||yk.test(t)?n:n+"px"}function As(e,t,n,r,o){var s;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||_d(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||_d(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")s=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,s?Sd:yd,s)):e.removeEventListener(t,s?Sd:yd,s);else{if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t!=="role"&&t in e)try{e[t]=n==null?"":n;break e}catch(i){}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function yd(e){if(this.l){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(he.event?he.event(e):e)}}function Sd(e){if(this.l)return this.l[e.type+!0](he.event?he.event(e):e)}function Ku(e,t,n,r,o,s,i,a,c,u){var f,l,d,p,h,m,g,y,b,E,v,R,I,S,O,$=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),s=[a=t.__e=n.__e]),(f=he.__b)&&f(t);e:if(typeof $=="function")try{if(y=t.props,b=(f=$.contextType)&&r[f.__c],E=f?b?b.props.value:f.__:r,n.__c?g=(l=t.__c=n.__c).__=l.__E:("prototype"in $&&$.prototype.render?t.__c=l=new $(y,E):(t.__c=l=new Qs(y,E),l.constructor=$,l.render=Tk),b&&b.sub(l),l.props=y,l.state||(l.state={}),l.context=E,l.__n=r,d=l.__d=!0,l.__h=[],l._sb=[]),l.__s==null&&(l.__s=l.state),$.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=un({},l.__s)),un(l.__s,$.getDerivedStateFromProps(y,l.__s))),p=l.props,h=l.state,l.__v=t,d)$.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if($.getDerivedStateFromProps==null&&y!==p&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(y,E),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(y,l.__s,E)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(l.props=y,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(T){T&&(T.__=t)}),v=0;v<l._sb.length;v++)l.__h.push(l._sb[v]);l._sb=[],l.__h.length&&i.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(y,l.__s,E),l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(p,h,m)})}if(l.context=E,l.props=y,l.__P=e,l.__e=!1,R=he.__r,I=0,"prototype"in $&&$.prototype.render){for(l.state=l.__s,l.__d=!1,R&&R(t),f=l.render(l.props,l.state,l.context),S=0;S<l._sb.length;S++)l.__h.push(l._sb[S]);l._sb=[]}else do l.__d=!1,R&&R(t),f=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++I<25);l.state=l.__s,l.getChildContext!=null&&(r=un(un({},r),l.getChildContext())),d||l.getSnapshotBeforeUpdate==null||(m=l.getSnapshotBeforeUpdate(p,h)),s_(e,Ju(O=f!=null&&f.type===ss&&f.key==null?f.props.children:f)?O:[O],t,n,r,o,s,i,a,c,u),l.base=t.__e,t.__u&=-161,l.__h.length&&i.push(l),g&&(l.__E=l.__=null)}catch(T){t.__v=null,c||s!=null?(t.__e=a,t.__u|=c?160:32,s[s.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),he.__e(T,t,n)}else s==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=vk(n.__e,t,n,r,o,s,i,c,u);(f=he.diffed)&&f(t)}function Lc(e,t,n){for(var r=0;r<n.length;r++)Xu(n[r],n[++r],n[++r]);he.__c&&he.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(s){s.call(o)})}catch(s){he.__e(s,o.__v)}})}function vk(e,t,n,r,o,s,i,a,c){var u,f,l,d,p,h,m,g=n.props,y=t.props,b=t.type;if(b==="svg"&&(o=!0),s!=null){for(u=0;
vendor: 2,582 bytes, line 12
12u<s.length;u++)if((p=s[u])&&"setAttribute"in p==!!b&&(b?p.localName===b:p.nodeType===3)){e=p,s[u]=null;break}}if(e==null){if(b===null)return document.createTextNode(y);e=o?document.createElementNS("http://www.w3.org/2000/svg",b):document.createElement(b,y.is&&y),s=null,a=!1}if(b===null)g===y||a&&e.data===y||(e.data=y);else{if(s=s&&ia.call(e.childNodes),g=n.props||Fo,!a&&s!=null)for(g={},u=0;u<e.attributes.length;u++)g[(p=e.attributes[u]).name]=p.value;for(u in g)p=g[u],u=="children"||(u=="dangerouslySetInnerHTML"?l=p:u==="key"||u in y||As(e,u,null,p,o));for(u in y)p=y[u],u=="children"?d=p:u=="dangerouslySetInnerHTML"?f=p:u=="value"?h=p:u=="checked"?m=p:u==="key"||a&&typeof p!="function"||g[u]===p||As(e,u,p,g[u],o);if(f)a||l&&(f.__html===l.__html||f.__html===e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(l&&(e.innerHTML=""),s_(e,Ju(d)?d:[d],t,n,r,o&&b!=="foreignObject",s,i,s?s[0]:n.__k&&Hr(n,0),a,c),s!=null)for(u=s.length;u--;)s[u]!=null&&r_(s[u]);a||(u="value",h!==void 0&&(h!==e[u]||b==="progress"&&!h||b==="option"&&h!==g[u])&&As(e,u,h,g[u],!1),u="checked",m!==void 0&&m!==e[u]&&As(e,u,m,g[u],!1))}return e}function Xu(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){he.__e(r,n)}}function Dc(e,t,n){var r,o;if(he.unmount&&he.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Xu(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){he.__e(s,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&Dc(r[o],t,n||typeof e.type!="function");n||e.__e==null||r_(e.__e),e.__=e.__e=e.__d=void 0}function Tk(e,t,n){return this.constructor(e,n)}function Ik(e,t,n){var r,o,s,i;he.__&&he.__(e,t),o=(r=!1)?null:t.__k,s=[],i=[],Ku(t,e=t.__k=Z(ss,null,[e]),o||Fo,Fo,t.ownerSVGElement!==void 0,o?null:t.firstChild?ia.call(t.childNodes):null,s,o?o.__e:t.firstChild,r,i),e.__d=void 0,Lc(s,e,i)}ia=Yu.slice,he={__e:function(e,t,n,r){for(var o,s,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((s=o.constructor)&&s.getDerivedStateFromError!=null&&(o.setState(s.getDerivedStateFromError(e)),i=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(a){e=a}throw e}},t_=0,Qs.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=un({},this.state),typeof e=="function"&&(e=e(un({},n),this.props)),e&&un(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),gd(this))},Qs.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),gd(this))},Qs.prototype.render=ss,Fn=[],n_=typeof Promise=="function"?Promise.prototype.then.bind(Prom
12ise.resolve()):setTimeout,Pc=function(e,t){return e.__v.__b-t.__v.__b},Ti.__r=0;var Zt,pe,qa,bd,Wr=0,a_=[],Zs=[],we=he,Ed=we.__b,vd=we.__r,Td=we.diffed,Id=we.__c,wd=we.unmount,Rd=we.__;function ur(e,t){we.__h&&we.__h(pe,e,Wr||t),Wr=0;var n=pe.__H||(pe.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Zs}),n.__[e]}function Bn(e){return Wr=1,c_(l_,e)}function c_(e,t,n){var r=ur(Zt++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):l_(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=pe,!pe.u)){var o=function(a,c,u){if(!r.__c.__H)return!0;var f=r.__c.__H.__.filter(function(d){return!!d.__c});if(f.every(function(d){return!d.__N}))return!s||s.call(this,a,c,u);var l=!1;return f.forEach(function(d){if(d.__N){var p=d.__[0];d.__=d.__N,d.__N=void 0,p!==d.__[0]&&(l=!0)}}),!(!l&&r.__c.props===a)&&(!s||s.call(this,a,c,u))};pe.u=!0;var s=pe.shouldComponentUpdate,i=pe.componentWillUpdate;pe.componentWillUpdate=function(a,c,u){if(this.__e){var f=s;s=void 0,o(a,c,u),s=f}i&&i.call(this,a,c,u)},pe.shouldComponentUpdate=o}return r.__N||r.__}function wk(e,t){var n=ur(Zt++,3);!we.__s&&Qu(n.__H,t)&&(n.__=e,n.i=t,pe.__H.__h.push(n))}function u_(e,t){var n=ur(Zt++,4);!we.__s&&Qu(n.__H,t)&&(n.__=e,n.i=t,pe.__h.push(n))}function Rk(e){return Wr=5,is(function(){return{current:e}},[])}function kk(e,t,n){Wr=6,u_(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function is(e,t){var n=ur(Zt++,7);return Qu(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function xr(e,t){return Wr=8,is(function(){return e},t)}function Ak(e){var t=pe.context[e.__c],n=ur(Zt++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(pe)),t.props.value):e.__}function Ck(e,t){we.useDebugValue&&we.useDebugValue(t?t(e):e)}function Nk(e){var t=ur(Zt++,10),n=Bn();return t.__=e,pe.componentDidCatch||(pe.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function Mk(){var e=ur(Zt++,11);if(!e.__){for(var t=pe.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function xk(){for(var e;e=a_.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ei),e.__H.__h.forEach(Fc),e.__H.__h=[]}catch(t){e.__H.__h=[],we.__e(t,e.__v)}}we.__b=function(e){pe=null,Ed&&Ed(e)},we.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Rd&&Rd(e,t)},we.__r=function(e){vd&&vd(e),Zt=0;var t=(pe=e.__c).__H;t&&(qa===pe?(t.__h=[],pe.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Zs,n.__N=n.i=void 0})):(t.__h.forEach(ei),t.__h.forEach(Fc),t.__h=[],Zt=0)),qa=pe},we.diffed=function(e){Td&&Td(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(a_.push(t)!==1&&bd===we.requestAnimationFrame||((bd=we.requestAnimationFrame)||Ok)(xk)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Zs&&(n.__=n.__V),n.i=void 0,n.__V=Zs})),qa=pe=null},we.__c=function(e,t){t.some(function(n){try{n.__h.forEach(ei),n.__h=n.__h.filter(function(r){return!r.__||Fc(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],we.__e(r,n.__v)}}),Id&&Id(e,t)},we.unmount=function(e){wd&&wd(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{ei(r)}catch(o){t=o}}),n.__H=void 0,t&&we.__e(t,n.__v))};var kd=typeof requestAnimationFrame=="function";function Ok(e){var t,n=function(){clearTimeout(r),kd&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);kd&&(t=requestAnimationFrame(n))}function ei(e){var t=pe,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),pe=t}function Fc(e){var t=pe;e.__c=e.__(),pe=t}function Qu(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function l_(e,t){return typeof t=="function"?t(e):t}const Pk=Object.defineProperty({__proto__:null,useCallback:xr,useContext:Ak,useDebugValue:Ck,useEffect:wk,useErrorBoundary:Nk,useId:Mk,useImperativeHandle:kk,useLayoutEffect:u_,useMemo:is,useReducer:c_,useRef:Rk,useState:Bn},Symbol.toStringTag,{value:"Module"}),Lk="http://www.w3.org/2000/svg";function Dk(){const e=r=>de.createElementNS(Lk,r),t=Qe(e("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),n=Qe(e("path"),{transform:"translate(11, 11)",d:"M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z"});return t.appendChild(n),t}function Fk({options:e}){const t=is(()=>({__html:Dk().outerHTML}),[]);return Z("h2",{class:"dialog__header"},Z("span",{class:"dialog__title"},e.formTitle),e.showBranding?Z("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:t}):null)}function $k(e,t){const n=[];return t.isNameRequired&&!e.name&&n.push(t.nameLabel),t.isEmailRequired&&!e.email&&n.push(t.emailLabel),e.message||n.push(t.messageLabel),n}function Ga(e,t){const n=e.get(t);return typeof n=="string"?n.trim():""}function Bk({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:o,onSubmitSuccess:s,onSubmitError:i,showEmail
12:a,showName:c,screenshotInput:u}){const{tags:f,addScreenshotButtonLabel:l,removeScreenshotButtonLabel:d,cancelButtonLabel:p,emailLabel:h,emailPlaceholder:m,isEmailRequired:g,isNameRequired:y,messageLabel:b,messagePlaceholder:E,nameLabel:v,namePlaceholder:R,submitButtonLabel:I,isRequiredLabel:S}=e,[O,$]=Bn(!1),[T,P]=Bn(null),[N,L]=Bn(!1),B=u==null?void 0:u.input,[Q,te]=Bn(null),F=xr(x=>{te(x),L(!1)},[]),M=xr(x=>{const V=$k(x,{emailLabel:h,isEmailRequired:g,isNameRequired:y,messageLabel:b,nameLabel:v});return V.length>0?P("Please enter in the following required fields: ".concat(V.join(", "))):P(null),V.length===0},[h,g,y,b,v]),K=xr(async x=>{$(!0);try{if(x.preventDefault(),!(x.target instanceof HTMLFormElement))return;const V=new FormData(x.target),oe=await(u&&N?u.value():void 0),ce={name:Ga(V,"name"),email:Ga(V,"email"),message:Ga(V,"message"),attachments:oe?[oe]:void 0};if(!M(ce))return;try{const ye=await o({name:ce.name,email:ce.email,message:ce.message,source:ak,tags:f},{attachments:ce.attachments});s(ce,ye)}catch(ye){Ks&&_.error(ye);const $e=ye instanceof Error?ye:new Error(String(ye));P($e.message),i($e)}}finally{$(!1)}},[u&&N,s,i]);return Z("form",{class:"form",onSubmit:K},B&&N?Z(B,{onError:F}):null,Z("fieldset",{class:"form__right","data-sentry-feedback":!0,disabled:O},Z("div",{class:"form__top"},T?Z("div",{class:"form__error-container"},T):null,c?Z("label",{for:"name",class:"form__label"},Z(Va,{label:v,isRequiredLabel:S,isRequired:y}),Z("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:R,required:y,type:"text"})):Z("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden"}),a?Z("label",{for:"email",class:"form__label"},Z(Va,{label:h,isRequiredLabel:S,isRequired:g}),Z("input",{class:"form__input",defaultValue:t,id:"email",name:"email",placeholder:m,required:g,type:"email"})):Z("input",{"aria-hidden":!0,value:t,name:"email",type:"hidden"}),Z("label",{for:"message",class:"form__label"},Z(Va,{label:b,isRequiredLabel:S,isRequired:!0}),Z("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:E,required:!0,rows:5})),B?Z("label",{for:"screenshot",class:"form__label"},Z("button",{class:"btn btn--default",disabled:O,type:"button",onClick:()=>{te(null),L(x=>!x)}},N?d:l),Q?Z("div",{class:"form__error-container"},Q.message):null):null),Z("div",{class:"btn-group"},Z("button",{class:"btn btn--primary",disabled:O,type:"submit"},I),Z("button",{class:"btn btn--default",disabled:O,type:"button",onClick:r},p))))}function Va({label:e,isRequired:t,isRequiredLabel:n}){return Z("span",{class:"form__label__text"},e,t&&Z("span",{class:"form__label__text--required"},n))}const Cs=16,Ad=17,Uk="http://www.w3.org/2000/svg";function Hk(){const e=c=>gt.document.createElementNS(Uk,c),t=Qe(e("svg"),{width:"".concat(Cs),height:"".concat(Ad),viewBox:"0 0 ".concat(Cs," ").concat(Ad),fill:"inherit"}),n=Qe(e("g"),{clipPath:"url(#clip0_57_156)"}),r=Qe(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),o=Qe(e("path"),{d:"M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 
1210.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});t.appendChild(n).append(o,r);const s=e("defs"),i=Qe(e("clipPath"),{id:"clip0_57_156"}),a=Qe(e("rect"),{width:"".concat(Cs),height:"".concat(Cs),fill:"white",transform:"translate(0 0.5)"});return i.appendChild(a),s.appendChild(i),t.appendChild(s).appendChild(i).appendChild(a),t}function Wk({open:e,onFormSubmitted:t,...n}){const r=n.options,o=is(()=>({__html:Hk().outerHTML}),[]),[s,i]=Bn(null),a=xr(()=>{s&&(clearTimeout(s),i(null)),t()},[s]),c=xr((u,f)=>{n.onSubmitSuccess(u,f),i(setTimeout(()=>{t(),i(null)},uk))},[t]);return Z(ss,null,s?Z("div",{class:"success__position",onClick:a},Z("div",{class:"success__content"},r.successMessageText,Z("span",{class:"success__icon",dangerouslySetInnerHTML:o}))):Z("dialog",{class:"dialog",onClick:r.onFormClose,open:e},Z("div",{class:"dialog__position"},Z("div",{class:"dialog__content",onClick:u=>{u.stopPropagation()}},Z(Fk,{options:r}),Z(Bk,{...n,onSubmitSuccess:c})))))}const jk="\n.dialog {\n  position: fixed;\n  z-index: var(--z-index);\n  margin: 0;\n  inset: 0;\n\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  padding: 0;\n  height: 100vh;\n  width: 100vw;\n\n  color: var(--dialog-color, var(--foreground));\n  fill: var(--dialog-color, var(--foreground));\n  line-height: 1.75em;\n\n  background-color: rgba(0, 0, 0, 0.05);\n  border: none;\n  inset: 0;\n  opacity: 1;\n  transition: opacity 0.2s ease-in-out;\n}\n\n.dialog__position {\n  position: fixed;\n  z-index: var(--z-index);\n  inset: var(--dialog-inset);\n  padding: var(--page-margin);\n  display: flex;\n  max-height: calc(100vh - (2 * var(--page-margin)));\n}\n@media (max-width: 600px) {\n  .dialog__position {\n    inset: var(--page-margin);\n    padding: 0;\n  }\n}\n\n.dialog__position:has(.editor) {\n  inset: var(--page-margin);\n  padding: 0;\n}\n\n.dialog:not([open]) {\n  opacity: 0;\n  pointer-events: none;\n  visibility: hidden;\n}\n.dialog:not([open]) .dialog__content {\n  transform: translate(0, -16px) scale(0.98);\n}\n\n.dialog__content {\n  display: flex;\n  flex-direction: column;\n  gap: 16px;\n  padding: var(--dialog-padding, 24px);\n  max-width: 100%;\n  width: 100%;\n  max-height: 100%;\n  overflow: auto;\n\n  background: var(--dialog-background, var(--background));\n  border-radius: var(--dialog-border-radius, 20px);\n  border: var(--dialog-border, var(--border));
12\n  box-shadow: var(--dialog-box-shadow, var(--box-shadow));\n  transform: translate(0, 0) scale(1);\n  transition: transform 0.2s ease-in-out;\n}\n\n",zk="\n.dialog__header {\n  display: flex;\n  gap: 4px;\n  justify-content: space-between;\n  font-weight: var(--dialog-header-weight, 600);\n  margin: 0;\n}\n.dialog__title {\n  align-self: center;\n  width: var(--form-width, 272px);\n}\n\n@media (max-width: 600px) {\n  .dialog__title {\n    width: auto;\n  }\n}\n\n.dialog__position:has(.editor) .dialog__title {\n  width: auto;\n}\n\n\n.brand-link {\n  display: inline-flex;\n}\n.brand-link:focus-visible {\n  outline: var(--outline);\n}\n",qk="\n.form {\n  display: flex;\n  overflow: auto;\n  flex-direction: row;\n  gap: 16px;\n  flex: 1 0;\n}\n\n.form fieldset {\n  border: none;\n  margin: 0;\n  padding: 0;\n}\n\n.form__right {\n  flex: 0 0 auto;\n  display: flex;\n  overflow: auto;\n  flex-direction: column;\n  justify-content: space-between;\n  gap: 20px;\n  width: var(--form-width, 100%);\n}\n\n.dialog__position:has(.editor) .form__right {\n  width: var(--form-width, 272px);\n}\n\n.form__top {\n  display: flex;\n  flex-direction: column;\n  gap: 8px;\n}\n\n.form__error-container {\n  color: var(--error-color);\n  fill: var(--error-color);\n}\n\n.form__label {\n  display: flex;\n  flex-direction: column;\n  gap: 4px;\n  margin: 0px;\n}\n\n.form__label__text {\n  display: flex;\n  gap: 4px;\n  align-items: center;\n}\n\n.form__label__text--required {\n  font-size: 0.85em;\n}\n\n.form__input {\n  font-family: inherit;\n  line-height: inherit;\n  background: transparent;\n  box-sizing: border-box;\n  border: var(--input-border, var(--border));\n  border-radius: var(--input-border-radius, 6px);\n  color: var(--input-color, inherit);\n  fill: var(--input-color, inherit);\n  font-size: var(--input-font-size, inherit);\n  font-weight: var(--input-font-weight, 500);\n  padding: 6px 12px;\n}\n\n.form__input::placeholder {\n  opacity: 0.65;\n  color: var(--input-placeholder-color, inherit);\n  filter: var(--interactive-filter);\n}\n\n.form__input:focus-visible {\n  outline: var(--input-focus-outline, var(--outline));\n}\n\n.form__input--textarea {\n  font-family: inherit;\n  resize: vertical;\n}\n\n.error {\n  color: var(--error-color);\n  fill: var(--error-color);\n}\n",Gk="\n.btn-group {\n  display: grid;\n  gap: 8px;\n}\n\n.btn {\n  line-height: inherit;\n  border: var(--button-border, var(--border));\n  border-radius: var(--button-border-radius, 6px);\n  cursor: pointer;\n  font-family: inherit;\n  font-size: var(--button-font-size, inherit);\n  font-weight: var(--button-font-weight, 600);\n  padding: var(--button-padding, 6px 16px);\n}\n.btn[disabled] {\n  opacity: 0.6;\n  pointer-events: none;\n}\n\n.btn--primary {\n  color: var(--button-primary-color, var(--accent-foreground));\n  fill: var(--button-primary-color, var(--accent-foreground));\n  background: var(--button-primary-background, var(--accent-background));\n  border: var(--button-primary-border, var(--border));\n  border-radius: var(--button-primary-border-radius, 6px);\n  font-weight: var(--button-primary-font-weight, 500);\n}\n.btn--primary:hover {\n  color: var(--button-primary-hover-color, var(--accent-foreground));\n  fill: var(--button-primary-hover-color, var(--accent-foreground));\n  background: var(--button-primary-hover-background, var(--accent-background));\n  filter: var(--interactive-filter);\n}\n.btn--primary:focus-visible {\n  background: var(--button-primary-hover-background, var(--accent-background));\n  filter: var(--interactive-filter);\n  outline: var(--button-primary-focus-outline, var(--outline));\n}\n\n.btn--default {\n  color: var(--button-color, var(--foreground));\n  fill: var(--button-color, var(--foreground));\n  background: var(--button-background, var(--background));\n  border: var(--button-border, var(--border));\n  border-radius: var(--button-border-radius, 6px);\n  font-weight: var(--button-font-weight, 500);\n}\n.btn--default:hover {\n  color: var(--button-color, var(--foreground));\n  fill: var(--button-color, var(--foreground));\n  background: var(--button-hover-background, var(--background));\n  filter: var(--interactive-filter);\n}\n.btn--default:focus-visible {\n  background: var(--button-hover-background, var(--background));\n  filter: var(--interactive-filter);\n  outline: var(--button-focus-outline, var(--outline));\n}\n",Vk="\n.success__position {\n  position: fixed;\n  inset: var(--dialog-inset);\n  padding: var(--page-margin);\n  z-index: var(--z-index);\n}\n.success__content {\n  background: var(--success-background, var(--background));\n  border: var(--success-border, var(--border));\n  border-radius: var(--success-border-radius, 1.7em/50%);
12\n  box-shadow: var(--success-box-shadow, var(--box-shadow));\n  font-weight: var(--success-font-weight, 600);\n  color: var(--success-color);\n  fill: var(--success-color);\n  padding: 12px 24px;\n  line-height: 1.75em;\n\n  display: grid;\n  align-items: center;\n  grid-auto-flow: column;\n  gap: 6px;\n  cursor: default;\n}\n\n.success__icon {\n  display: flex;\n}\n";function Yk(e){const t=de.createElement("style");return t.textContent="\n:host {\n  --dialog-inset: var(--inset);\n}\n\n".concat(jk,"\n").concat(zk,"\n").concat(qk,"\n").concat(Gk,"\n").concat(Vk,"\n"),e&&t.setAttribute("nonce",e),t}function Jk(){const e=W().getUser(),t=_e().getUser(),n=jn().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}const Kk=()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{const o=r,s=e.useSentryUser,i=Jk(),a=de.createElement("div"),c=Yk(e.styleNonce);let u="";const f={get el(){return a},appendToDom(){!o.contains(c)&&!o.contains(a)&&(o.appendChild(c),o.appendChild(a))},removeFromDom(){a.remove(),c.remove(),de.body.style.overflow=u},open(){var p,h;d(!0),(p=e.onFormOpen)==null||p.call(e),(h=C())==null||h.emit("openFeedbackWidget"),u=de.body.style.overflow,de.body.style.overflow="hidden"},close(){d(!1),de.body.style.overflow=u}},l=t==null?void 0:t.createInput({h:Z,hooks:Pk,dialog:f,options:e}),d=p=>{Ik(Z(Wk,{options:e,screenshotInput:l,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:String(s&&(i==null?void 0:i[s.name])||""),defaultEmail:String(s&&(i==null?void 0:i[s.email])||""),onFormClose:()=>{var h;d(!1),(h=e.onFormClose)==null||h.call(e)},onSubmit:n,onSubmitSuccess:(h,m)=>{var g;d(!1),(g=e.onSubmitSuccess)==null||g.call(e,h,m)},onSubmitError:h=>{var m;(m=e.onSubmitError)==null||m.call(e,h)},onFormSubmitted:()=>{var h;(h=e.onFormSubmitted)==null||h.call(e)},open:p}),a)};return f}});function Xk({h:e}){return function(){return e("svg",{"data-test-id":"icon-close",viewBox:"0 0 16 16",fill:"#2B2233",height:"25px",width:"25px"},e("circle",{r:"7",cx:"8",cy:"8",fill:"white"}),e("path",{strokeWidth:"1.5",d:"M8,16a8,8,0,1,1,8-8A8,8,0,0,1,8,16ZM8,1.53A6.47,6.47,0,1,0,14.47,8,6.47,6.47,0,0,0,8,1.53Z"}),e("path",{strokeWidth:"1.5",d:"M5.34,11.41a.71.71,0,0,1-.53-.22.74.74,0,0,1,0-1.06l5.32-5.32a.75.75,0,0,1,1.06,1.06L5.87,11.19A.74.74,0,0,1,5.34,11.41Z"}),e("path",{strokeWidth:"1.5",d:"M10.66,11.41a.74.74,0,0,1-.53-.22L4.81,5.87A.75.75,0,0,1,5.87,4.81l5.32,5.32a.74.74,0,0,1,0,1.06A.71.71,0,0,1,10.66,11.41Z"}))}}function Qk(e){const t=de.createElement("style"),n="#1A141F",r="#302735";return t.textContent="\n.editor {\n  display: flex;\n  flex-grow: 1;\n  flex-direction: column;\n}\n\n.editor__image-container {\n  justify-items: center;\n  padding: 15px;\n  position: relative;\n  height: 100%;\n  border-radius: var(--menu-border-radius, 6px);\n\n  background-color: ".concat(n,";\n  background-image: repeating-linear-gradient(\n      -145deg,\n      transparent,\n      transparent 8px,\n      ").concat(n," 8px,\n      ").concat(n," 11px\n    ),\n    repeating-linear-gradient(\n      -45deg,\n      transparent,\n      transparent 15px,\n      ").concat(r," 15px,\n      ").concat(r," 16px\n    );\n}\n\n.editor__canvas-container {\n  width: 100%;\n  height: 100%;\n  position: relative;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n}\n\n.editor__canvas-container > * {\n  object-fit: contain;\n  position: absolute;\n}\n\n.editor__tool-container {\n  padding-top: 8px;\n  display: flex;\n  justify-content: center;\n}\n\n.editor__tool-bar {\n  display: flex;\n  gap: 8px;\n}\n\n.editor__tool {\n  display: flex;\n  padding: 8px 12px;\n  justify-content: center;\n  align-items: center;\n  border: var(--button-border, var(--border));\n  border-radius: var(--button-border-radius, 6px);\n  background: var(--button-background, var(--background));\n  color: var(--button-color, var(--foreground));\n}\n\n.editor__tool--active {\n  background: var(--button-primary-background, var(--accent-background));\n  color: var(--button-primary-color, var(--accent-foreground));\n}\n\n.editor__rect {\n  position: absolute;\n  z-index: 2;\n}\n\n.editor__rect button {\n  opacity: 0;\n  position: absolute;\n  top: -12px;\n  right: -12px;\n  cursor: pointer;\n  padding: 0;\n  z-index: 3;\n  border: none;\n  background: none;\n}\n\n.editor__rect:hover button {\n  opacity: 1;\n}\n"),e&&t.setAttribute("nonce",e),t}function Zk({h:e}){return function({action:n,setAction:r,options:o}){return e("div",{class:"editor__tool-container"},e("div",{class:"editor__tool-bar"},e("button",{type:"button",class:"editor__tool ".concat(n==="highlight"?"editor__tool--active":""),onClick:()=>{r(n==="highlight"?"":"highlight")}},o.highlightToolText),e("button",{type:"button",class:"editor__tool ".concat(n==="hide"?"editor__tool--active":""),onClick:()=>{r(n==="hide"?"":"hide")}},o.hideToolText)))}}function eA({hooks:e}){function t(){var o;const[n,r]=e.useState((o=gt.devicePixelRatio)!=null?o:1);return e.useEffect(()=>{const s=()=>{r(gt.devicePixelRatio)},i=matchMedia("(resolution: ".concat(gt.devicePixelRatio,"dppx)"));
12return i.addEventListener("change",s),()=>{i.removeEventListener("change",s)}},[]),n}return function({onBeforeScreenshot:r,onScreenshot:o,onAfterScreenshot:s,onError:i}){const a=t();e.useEffect(()=>{(async()=>{r();const u=await Eo.mediaDevices.getDisplayMedia({video:{width:gt.innerWidth*a,height:gt.innerHeight*a},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),f=de.createElement("video");await new Promise((l,d)=>{f.srcObject=u,f.onloadedmetadata=()=>{o(f,a),u.getTracks().forEach(p=>p.stop()),l()},f.play().catch(d)}),s()})().catch(i)},[])}}function tA(e,t,n){switch(e.type){case"highlight":{t.shadowColor="rgba(0, 0, 0, 0.7)",t.shadowBlur=50,t.fillStyle=n,t.fillRect(e.x-1,e.y-1,e.w+2,e.h+2),t.clearRect(e.x,e.y,e.w,e.h);break}case"hide":t.fillStyle="rgb(0, 0, 0)",t.fillRect(e.x,e.y,e.w,e.h);break}}function sn(e,t,n){if(!e)return;const r=e.getContext("2d",t);r&&n(e,r)}function Ya(e,t){sn(e,{alpha:!0},(n,r)=>{r.drawImage(t,0,0,t.width,t.height,0,0,n.width,n.height)})}function Ja(e,t,n){sn(e,{alpha:!0},(r,o)=>{n.length&&(o.fillStyle="rgba(0, 0, 0, 0.25)",o.fillRect(0,0,r.width,r.height)),n.forEach(s=>{tA(s,o,t)})})}function nA({h:e,hooks:t,outputBuffer:n,dialog:r,options:o}){const s=eA({hooks:t}),i=Zk({h:e}),a=Xk({h:e}),c={__html:Qk(o.styleNonce).innerText},u=r.el.style,f=({screenshot:l})=>{const[d,p]=t.useState("highlight"),[h,m]=t.useState([]),g=t.useRef(null),y=t.useRef(null),b=t.useRef(null),E=t.useRef(null),[v,R]=t.useState(1),I=t.useMemo(()=>{const N=de.getElementById(o.id);if(!N)return"white";const L=getComputedStyle(N);return L.getPropertyValue("--button-primary-background")||L.getPropertyValue("--accent-background")},[o.id]);t.useLayoutEffect(()=>{const N=()=>{const L=g.current;L&&(sn(l.canvas,{alpha:!1},B=>{const Q=Math.min(L.clientWidth/B.width,L.clientHeight/B.height);R(Q)}),(L.clientHeight===0||L.clientWidth===0)&&setTimeout(N,0))};return N(),gt.addEventListener("resize",N),()=>{gt.removeEventListener("resize",N)}},[l]);const S=t.useCallback((N,L)=>{sn(N,{alpha:!0},(B,Q)=>{Q.scale(L,L),B.width=l.canvas.width,B.height=l.canvas.height})},[l]);t.useEffect(()=>{S(y.current,l.dpi),Ya(y.current,l.canvas)},[l]),t.useEffect(()=>{S(b.current,l.dpi),sn(b.current,{alpha:!0},(N,L)=>{L.clearRect(0,0,N.width,N.height)}),Ja(b.current,I,h)},[h,I]),t.useEffect(()=>{S(n,l.dpi),Ya(n,l.canvas),sn(de.createElement("canvas"),{alpha:!0},(N,L)=>{L.scale(l.dpi,l.dpi),N.width=l.canvas.width,N.height=l.canvas.height,Ja(N,I,h),Ya(n,N)})},[h,l,I]);const O=N=>{if(!d||!E.current)return;const L=E.current.getBoundingClientRect(),B={type:d,x:N.offsetX/v,y:N.offsetY/v},Q=(M,K)=>{const x=(K.clientX-L.x)/v,V=(K.clientY-L.y)/v;return{type:M.type,x:Math.min(M.x,x),y:Math.min(M.y,V),w:Math.abs(x-M.x),h:Math.abs(V-M.y)}},te=M=>{sn(b.current,{alpha:!0},(K,x)=>{x.clearRect(0,0,K.width,K.height)}),Ja(b.current,I,[...h,Q(B,M)])},F=M=>{const K=Q(B,M);K.w*v>=1&&K.h*v>=1&&m(x=>[...x,K]),de.removeEventListener("mousemove",te),de.removeEventListener("mouseup",F)};de.addEventListener("mousemove",te),de.addEventListener("mouseup",F)},$=t.useCallback(N=>L=>{L.preventDefault(),L.stopPropagation(),m(B=>{const Q=[...B];return Q.splice(N,1),Q})},[]),T={width:"".concat(l.canvas.width*v,"px"),height:"".concat(l.canvas.height*v,"px")},P=N=>{N.stopPropagation()};return e("div",{class:"editor"},e("style",{nonce:o.styleNonce,dangerouslySetInnerHTML:c}),e("div",{class:"editor__image-container"},e("div",{class:"editor__canvas-container",ref:g},e("canvas",{ref:y,id:"background",style:T}),e("canvas",{ref:b,id:"foreground",style:T}),e("div",{ref:E,onMouseDown:O,style:T},h.map((N,L)=>e("div",{key:L,class:"editor__rect",style:{top:"".concat(N.y*v,"px"),left:"".concat(N.x*v,"px"),width:"".concat(N.w*v,"px"),height:"".concat(N.h*v,"px")}},e("button",{"aria-label":o.removeHighlightText,onClick:$(L),onMouseDown:P,onMouseUp:P,type:"button"},e(a,null))))))),e(i,{options:o,action:d,setAction:p}))};return function({onError:d}){const[p,h]=t.useState();return s({onBeforeScreenshot:t.useCallback(()=>{u.display="none"},[]),onScreenshot:t.useCallback((m,g)=>{sn(de.createElement("canvas"),{alpha:!1},(y,b)=>{b.scale(g,g),y.width=m.videoWidth,y.height=m.videoHeight,b.drawImage(m,0,0,y.width,y.height),h({canvas:y,dpi:g})}),n.width=m.videoWidth,n.height=m.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{u.display="block"},[]),onError:t.useCallback(m=>{u.display="block",d(m)},[])}),p?e(f,{screenshot:p}):e("div",null)}}const rA=()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{const o=de.createElement("canvas");return{input:nA({h:e,hooks:t,outputBuffer:o,dialog:n,options:r}),value:async()=>{const s=await new Promise(i=>{o.toBlob(i,"image/png")});if(s)return{data:new Uint8Array(await s.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}}),w=H;let $c=0;function f_(){return $c>0}function oA(){$c++,setTimeout(()=>{$c--})}function jr(e,t={}){function n(o){return typeof o=="function"}if(!n(e))return e;try{if(Object.prototype.hasOwnProperty.call(e,"__sentry_wrapped__")){const s=e.__sentry_wrapped__;return typeof s=="function"?s:e}if(mu(e))return e}catch(o){return e}const r=function(...o){H._sentryWrappedDepth=(H._sentryWrappedDepth||0)+1;try{const s=o.map(i=>jr(i,t));return e.apply(this,s)}catch(s){throw oA(),Ye(i=>{i.addEventProcessor(a=>(t.mechanism&&(mc(a,void 0),At(a,t.mechanism)),a.extra={...a.extra,arguments:o},a)),ge(s)}),s}finally{H._sentryWrappedDepth=(H._sentryWrappedDepth||0)-1}};try{for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}catch(o){}Th(r,e),ve(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch(o){}return r}function Ii(){const e=bn(),{referrer:t}=w.document||{},{userAgent:n}=w.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}const sA=["replayIntegration","replayCanvasIntegration","feedbackIntegration","feedbackModalIntegration","feedbackScreenshotIntegration","captureConsoleIntegration","contextLinesIntegration","linkedErrorsIntegration","dedupeIntegration","extraErrorDataIntegration","graphqlClientIntegration","httpClientIntegration","reportingObserverIntegration","rewriteFramesIntegration","browserProfilingIntegration","moduleMetadataIntegration","instrumentAnthropicAiClient","
12instrumentOpenAiClient","instrumentGoogleGenAIClient","instrumentStateGraph","instrumentLangGraph","createLangChainCallbackHandler","instrumentLangChainEmbeddings"],iA={replayCanvasIntegration:"replay-canvas",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot"};function aA(e){return iA[e]||e.replace("Integration","").toLowerCase()}const Cd=w;async function d_(e,t){const n=sA.includes(e)?aA(e):void 0,r=Cd.Sentry=Cd.Sentry||{};if(!n)throw new Error("Cannot lazy load integration: ".concat(e));const o=r[e];if(typeof o=="function"&&!("_isShim"in o))return o;const s=cA(n),i=w.document.createElement("script");i.src=s,i.crossOrigin="anonymous",i.referrerPolicy="strict-origin",t&&i.setAttribute("nonce",t);const a=new Promise((l,d)=>{i.addEventListener("load",()=>l()),i.addEventListener("error",d)}),c=w.document.currentScript,u=w.document.body||w.document.head||(c==null?void 0:c.parentElement);if(u)u.appendChild(i);else throw new Error("Could not find parent element to insert lazy-loaded ".concat(e," script"));try{await a}catch(l){throw new Error("Error when loading integration: ".concat(e))}const f=r[e];if(typeof f!="function")throw new Error("Could not load integration: ".concat(e));return f}function cA(e){var r;const t=C(),n=((r=t==null?void 0:t.getOptions())==null?void 0:r.cdnBaseUrl)||"https://browser.sentry-cdn.com";return new URL("/".concat(Vt,"/").concat(e,".min.js"),n).toString()}const uA=e_({lazyLoadIntegration:d_}),Nd=e_({getModalIntegration:()=>Kk,getScreenshotIntegration:()=>rA});function aa(e,t){const n=ca(e,t),r={type:hA(t),value:mA(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function lA(e,t,n,r){const o=C(),s=o==null?void 0:o.getOptions().normalizeDepth,i=yA(t),a={__serialized__:Ah(t,s)};if(i)return{exception:{values:[aa(e,i)]},extra:a};const c={exception:{values:[{type:Ui(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:gA(t,{isUnhandledRejection:r})}]},extra:a};if(n){const u=ca(e,n);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function Ka(e,t){return{exception:{values:[aa(e,t)]}}}function ca(e,t){const n=t.stacktrace||t.stack||"",r=dA(t),o=pA(t);try{return e(n,r,o)}catch(s){}return[]}const fA=/Minified React error #\d+;/i;function dA(e){return e&&fA.test(e.message)?1:0}function pA(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function p_(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function hA(e){const t=e==null?void 0:e.name;return!t&&p_(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function mA(e){const t=e==null?void 0:e.message;return p_(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?Bf(t.error):Bf(e):"No error message"}function h_(e,t,n,r){const o=(n==null?void 0:n.syntheticException)||void 0,s=ua(e,t,o,r);return At(s),s.level="error",n!=null&&n.event_id&&(s.event_id=n.event_id),es(s)}function m_(e,t,n="info",r,o){const s=(r==null?void 0:r.syntheticException)||void 0,i=Bc(e,t,s,o);return i.level=n,r!=null&&r.event_id&&(i.event_id=r.event_id),es(i)}function ua(e,t,n,r,o){var i,a;let s;if(vh(t)&&t.error)return Ka(e,t.error);if(Jl(t)||rb(t)){const c=t;if("stack"in t){s=Ka(e,t);const u=(a=(i=s.exception)==null?void 0:i.values)==null?void 0:a[0];if(r&&n&&u&&!u.stacktrace){const f=ca(e,n);f.length&&(u.stacktrace={frames:f},At(s,{synthetic:!0}))}}else{const u=c.name||(Jl(c)?"DOMError":"DOMException"),f=c.message?"".concat(u,": ").concat(c.message):u;s=Bc(e,f,n,r),mc(s,f)}return"code"in c&&(s.tags={...s.tags,"DOMException.code":"".concat(c.code)}),s}return kt(t)?Ka(e,t):He(t)||Ui(t)?(s=lA(e,t,n,o),At(s,{synthetic:!0}),s):(s=Bc(e,t,n,r),mc(s,"".concat(t)),At(s,{synthetic:!0}),s)}function Bc(e,t,n,r){const o={};if(r&&n){const s=ca(e,n);s.length&&(o.exception={values:[{value:t,stacktrace:{frames:s}}]}),At(o,{synthetic:!0})}if(Bi(t)){const{__sentry_template_string__:s,__sentry_template_values__:i}=t;return o.logentry={message:s,params:i},o}return o.message=t,o}function gA(e,{isUnhandledRejection:t}){const n=sb(e),r=t?"promise rejection":"exception";if(vh(e))return"Event `ErrorEvent` captured as ".concat(r," with message `").concat(e.message,"`");
12if(Ui(e)){const o=_A(e);return"Event `".concat(o,"` (type=").concat(e.type,") captured as ").concat(r)}return"Object captured as ".concat(r," with keys: ").concat(n)}function _A(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(t){}}function yA(e){return Object.values(e).find(t=>t instanceof Error)}class g_ extends ST{constructor(t){var i;const n=SA(t),r=w.SENTRY_SDK_SOURCE||Gv();rg(n,"browser",["browser"],r),super(n);const{userInfo:o}=this.getDataCollectionOptions();(i=n._metadata)!=null&&i.sdk&&(n._metadata.sdk.settings={infer_ip:o?"auto":"never",...n._metadata.sdk.settings});const{sendClientReports:s}=this._options;w.document&&w.document.addEventListener("visibilitychange",()=>{w.document.visibilityState==="hidden"&&(s&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}),o&&this.on("beforeSendSession",DT)}eventFromException(t,n){return h_(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return m_(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,o){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,o)}}function SA(e){var t;return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:(t=w.SENTRY_RELEASE)==null?void 0:t.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const Tt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,q=H,bA=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",as=(e,t,n,r)=>{let o,s;return i=>{t.value>=0&&(i||r)&&(s=t.value-(o!=null?o:0),(s||o===void 0)&&(o=t.value,t.delta=s,t.rating=bA(t.value,n),e(t)))}},cs=(e=!0)=>{var n,r;const t=(r=(n=q.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},co=()=>{var t;const e=cs();return(t=e==null?void 0:e.activationStart)!=null?t:0};function dn(e,t,n){q.document&&q.addEventListener(e,t,n)}function wi(e,t,n){q.document&&q.removeEventListener(e,t,n)}let Or=-1;const __=new Set,EA=()=>{var e,t;return((e=q.document)==null?void 0:e.visibilityState)==="hidden"&&!((t=q.document)!=null&&t.prerendering)?0:1/0},ti=e=>{if(vA(e)&&Or>-1){if(e.type==="visibilitychange"||e.type==="pagehide")for(const t of __)t();isFinite(Or)||(Or=e.type==="visibilitychange"?e.timeStamp:0,wi("prerenderingchange",ti,!0))}},us=()=>{var e;if(q.document&&Or<0){const t=co(),n=q.document.prerendering||(e=globalThis.performance.getEntriesByType("visibility-state").filter(r=>r.name==="hidden"&&r.startTime>t)[0])==null?void 0:e.startTime;Or=n!=null?n:EA(),dn("visibilitychange",ti,!0),dn("pagehide",ti,!0),dn("prerenderingchange",ti,!0)}return{get firstHiddenTime(){return Or},onHidden(t){__.add(t)}}};function vA(e){var t;return e.type==="pagehide"||((t=q.document)==null?void 0:t.visibilityState)==="hidden"}const TA=()=>"v5-".concat(Date.now(),"-").concat(Math.floor(Math.random()*(9e12-1))+1e12),ls=(e,t=-1)=>{var s,i;const n=cs();let r="navigate";return n&&((s=q.document)!=null&&s.prerendering||co()>0?r="prerender":(i=q.document)!=null&&i.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:TA(),navigationType:r}},Xa=new WeakMap;function Zu(e,t){try{return Xa.get(e)||Xa.set(e,new t),Xa.get(e)}catch(n){return new t}}class IA{constructor(){this._sessionValue=0,this._sessionEntries=[]}_processEntry(t){var o;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]),(o=this._onAfterProcessingUnexpectedShift)==null||o.call(this,t)}}const uo=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(o=>{Promise.resolve().then(()=>{t(o.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch(r){}},el=e=>{let t=!1;return()=>{t||(e(),t=!0)}},la=e=>{var t;(t=q.document)!=null&&t.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},wA=[1800,3e3],RA=(e,t={})=>{la(()=>{const n=us(),r=ls("FCP");let o;const i=uo("paint",a=>{for(const c of a)c.name==="first-contentful-paint"&&(i.disconnect(),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-co(),0),r.entries.push(c),o(!0)))});i&&(o=as(e,r,wA,t.reportAllChanges))})},kA=[.1,.25],AA=(e,t={})=>{RA(el(()=>{var c;const n=ls("CLS",0);let r;const o=us(),s=Zu(t,IA),i=u=>{for(const f of u)s._processEntry(f);s._sessionValue>
12n.value&&(n.value=s._sessionValue,n.entries=s._sessionEntries,r())},a=uo("layout-shift",i);a&&(r=as(e,n,kA,t.reportAllChanges),o.onHidden(()=>{i(a.takeRecords()),r(!0)}),(c=q==null?void 0:q.setTimeout)==null||c.call(q,r))}))};let y_=0,Qa=1/0,Ns=0;const CA=e=>{e.forEach(t=>{t.interactionId&&(Qa=Math.min(Qa,t.interactionId),Ns=Math.max(Ns,t.interactionId),y_=Ns?(Ns-Qa)/7+1:0)})};let Uc;const S_=()=>Uc?y_:performance.interactionCount||0,NA=()=>{"interactionCount"in performance||Uc||(Uc=uo("event",CA,{type:"event",buffered:!0,durationThreshold:0}))},Za=10;let b_=0;const MA=()=>S_()-b_;class xA{constructor(){this._longestInteractionList=[],this._longestInteractionMap=new Map}_resetInteractions(){b_=S_(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor(MA()/50));return this._longestInteractionList[t]}_processEntry(t){var o,s;if((o=this._onBeforeProcessingEntry)==null||o.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<Za||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,a)=>a._latency-i._latency),this._longestInteractionList.length>Za){const i=this._longestInteractionList.splice(Za);for(const a of i)this._longestInteractionMap.delete(a.id)}(s=this._onAfterProcessingINPCandidate)==null||s.call(this,r)}}}const tl=e=>{var n;const t=q.requestIdleCallback||q.setTimeout;((n=q.document)==null?void 0:n.visibilityState)==="hidden"?e():(e=el(e),dn("visibilitychange",e,{once:!0,capture:!0}),dn("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),wi("visibilitychange",e,{capture:!0}),wi("pagehide",e,{capture:!0})}))},OA=[200,500],PA=40,LA=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return;const n=us();la(()=>{var c;NA();const r=ls("INP");let o;const s=Zu(t,xA),i=u=>{tl(()=>{for(const l of u)s._processEntry(l);const f=s._estimateP98LongestInteraction();f&&f._latency!==r.value&&(r.value=f._latency,r.entries=f.entries,o())})},a=uo("event",i,{durationThreshold:(c=t.durationThreshold)!=null?c:PA});o=as(e,r,OA,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{i(a.takeRecords()),o(!0)}))})};class DA{_processEntry(t){var n;(n=this._onBeforeProcessingEntry)==null||n.call(this,t)}}const FA=[2500,4e3],$A=(e,t={})=>{la(()=>{const n=us(),r=ls("LCP");let o;const s=Zu(t,DA),i=c=>{t.reportAllChanges||(c=c.slice(-1));for(const u of c)s._processEntry(u),u.startTime<n.firstHiddenTime&&(r.value=Math.max(u.startTime-co(),0),r.entries=[u],o())},a=uo("largest-contentful-paint",i);if(a){o=as(e,r,FA,t.reportAllChanges);const c=el(()=>{i(a.takeRecords()),a.disconnect(),o(!0)}),u=f=>{f.isTrusted&&(tl(c),wi(f.type,u,{capture:!0}))};for(const f of["keydown","click","visibilitychange"])dn(f,u,{capture:!0})}})},BA=[800,1800],Hc=e=>{var t,n;(t=q.document)!=null&&t.prerendering?la(()=>Hc(e)):((n=q.document)==null?void 0:n.readyState)!=="complete"?addEventListener("load",()=>Hc(e),!0):setTimeout(e)},UA=(e,t={})=>{const n=ls("TTFB"),r=as(e,n,BA,t.reportAllChanges);Hc(()=>{const o=cs();o&&(n.value=Math.max(o.responseStart-co(),0),n.entries=[o],r(!0))})},wo={},Ri={};let E_,v_,T_,I_;
12function fa(e,t=!1){return pa("cls",e,WA,E_,t)}function da(e,t=!1){return pa("lcp",e,jA,v_,t)}function HA(e){return pa("ttfb",e,zA,T_)}function nl(e){return pa("inp",e,qA,I_)}function En(e,t){return w_(e,t),Ri[e]||(GA(e),Ri[e]=!0),R_(e,t)}function fs(e,t){const n=wo[e];if(n!=null&&n.length)for(const r of n)try{r(t)}catch(o){Tt&&_.error("Error while triggering instrumentation handler.\nType: ".concat(e,"\nName: ").concat(Xt(r),"\nError:"),o)}}function WA(){return AA(e=>{fs("cls",{metric:e}),E_=e},{reportAllChanges:!0})}function jA(){return $A(e=>{fs("lcp",{metric:e}),v_=e},{reportAllChanges:!0})}function zA(){return UA(e=>{fs("ttfb",{metric:e}),T_=e})}function qA(){return LA(e=>{fs("inp",{metric:e}),I_=e})}function pa(e,t,n,r,o=!1){w_(e,t);let s;return Ri[e]||(s=n(),Ri[e]=!0),r&&t({metric:r}),R_(e,t,o?s:void 0)}function GA(e){const t={};e==="event"&&(t.durationThreshold=0),uo(e,n=>{fs(e,{entries:n})},t)}function w_(e,t){wo[e]=wo[e]||[],wo[e].push(t)}function R_(e,t,n){return()=>{n&&n();const r=wo[e];if(!r)return;const o=r.indexOf(t);o!==-1&&r.splice(o,1)}}function VA(e){return"duration"in e}const YA=80,Ln={};try{typeof Node<"u"&&(Ln.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode").get),typeof Element<"u"&&(Ln.tagName=Object.getOwnPropertyDescriptor(Element.prototype,"tagName").get,Ln.id=Object.getOwnPropertyDescriptor(Element.prototype,"id").get,Ln.className=Object.getOwnPropertyDescriptor(Element.prototype,"className").get,Ln.getAttribute=Element.prototype.getAttribute),typeof HTMLElement<"u"&&(Ln.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"dataset").get)}catch(e){}function on(e,t,n){const r=Ln[t];if(r)try{return r.call(e,n)}catch(s){}const o=e[t];return typeof o=="function"?o.call(e,n):o}function Oe(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,o=[];let s=0,i=0;const a=" > ",c=a.length;let u;const f=Array.isArray(t)?t:t.keyAttrs,l=!Array.isArray(t)&&t.maxStringLength||YA;for(;n&&s++<r&&(u=JA(n,f),!(u==="html"||s>1&&i+o.length*c+u.length>=l));)o.push(u),i+=u.length,n=on(n,"parentNode");return o.reverse().join(a)}catch(n){return"<unknown>"}}function JA(e,t){const n=[],r=on(e,"tagName");if(!r)return"";if(typeof HTMLElement<"u"&&e instanceof HTMLElement){const s=on(e,"dataset");if(s){if(s.sentryComponent)return s.sentryComponent;if(s.sentryElement)return s.sentryElement}}n.push(r.toLowerCase());const o=t!=null&&t.length?t.filter(s=>on(e,"getAttribute",s)).map(s=>[s,on(e,"getAttribute",s)]):null;if(o!=null&&o.length)o.forEach(s=>{n.push("[".concat(s[0],'="').concat(s[1],'"]'))});else{const s=on(e,"id");s&&n.push("#".concat(s));const i=on(e,"className");if(i&&_t(i)){const a=i.split(/\s+/);for(const c of a)n.push(".".concat(c))}}for(const s of["aria-label","type","name","title","alt"]){const i=on(e,"getAttribute",s);i&&n.push("[".concat(s,'="').concat(i,'"]'))}return n.join("")}const KA=e=>{const t=n=>{var r;(n.type==="pagehide"||((r=q.document)==null?void 0:r.visibilityState)==="hidden")&&e(n)};dn("visibilitychange",t,{capture:!0,once:!0}),dn("pagehide",t,{capture:!0,once:!0})};function ec(e){return typeof e=="number"&&isFinite(e)}function vn(e,t,n,{...r}){const o=U(e).start_timestamp;return o&&o>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),er(e,()=>{const s=Ve({startTime:t,...r});return s&&s.end(n),s})}function rl(e){var g;const t=C();if(!t)return;const{name:n,transaction:r,attributes:o,startTime:s}=e,{release:i,environment:a}=t.getOptions(),{userInfo:c}=t.getDataCollectionOptions(),u=t.getIntegrationByName("Replay"),f=u==null?void 0:u.getReplayId(),l=W(),d=l.getUser(),p=d!==void 0?d.email||d.id||d.ip_address:void 0;let h;try{h=l.getScopeData().contexts.profile.profile_id}catch(y){}const m={release:i,environment:a,user:p||void 0,profile_id:h||void 0,replay_id:f||void 0,transaction:r,"user_agent.original":(g=q.navigator)==null?void 0:g.userAgent,"client.address":c?"{{auto}}":void 0,...o};return Ve({name:n,attributes:m,startTime:s,experimental:{standalone:!0}})}function lr(){return q.addEventListener&&q.performance}function Ee(e){return e/1e3}function XA(e){let t="unknown",n="unknown",r="";for(const o of e){if(o==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(o))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=o}
12return r===e&&(t=r),{name:t,version:n}}function ha(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch(t){return!1}}function ma(e,t){let n,r=!1;function o(a){!r&&n&&t(a,n.spanContext().spanId,n),r=!0}KA(()=>{o("pagehide")});const s=e.on("beforeStartNavigationSpan",(a,c)=>{c!=null&&c.isRedirect||(o("navigation"),s(),i())}),i=e.on("afterStartPageLoadSpan",a=>{n=a,i()})}function QA(e){let t=0,n;if(!ha("layout-shift"))return;const r=fa(({metric:o})=>{const s=o.entries[o.entries.length-1];s&&(t=o.value,n=s)},!0);ma(e,(o,s)=>{ZA(t,n,s,o),r()})}function ZA(e,t,n,r){var u;Tt&&_.log("Sending CLS span (".concat(e,")"));const o=t?Ee((Ae()||0)+t.startTime):me(),s=W().getScopeData().transactionName,i=t?Oe((u=t.sources[0])==null?void 0:u.node):"Layout shift",a={[G]:"auto.http.browser.cls",[ae]:"ui.webvital.cls",[An]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t!=null&&t.sources&&t.sources.forEach((f,l)=>{a["cls.source.".concat(l+1)]=Oe(f.node)});const c=rl({name:i,transaction:s,attributes:a,startTime:o});c&&(c.addEvent("cls",{[Yo]:"",[Jo]:e}),c.end(o))}const eC=6e4;function ds(e){return e!=null&&e>0&&e<=eC}function tC(e){let t=0,n;if(!ha("largest-contentful-paint"))return;const r=da(({metric:o})=>{const s=o.entries[o.entries.length-1];!s||!ds(o.value)||(t=o.value,n=s)},!0);ma(e,(o,s)=>{nC(t,n,s,o),r()})}function nC(e,t,n,r){if(!ds(e))return;Tt&&_.log("Sending LCP span (".concat(e,")"));const o=Ee((Ae()||0)+((t==null?void 0:t.startTime)||0)),s=W().getScopeData().transactionName,i=t?Oe(t.element):"Largest contentful paint",a={[G]:"auto.http.browser.lcp",[ae]:"ui.webvital.lcp",[An]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(a["lcp.element"]=Oe(t.element)),t.id&&(a["lcp.id"]=t.id),t.url&&(a["lcp.url"]=t.url),t.loadTime!=null&&(a["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(a["lcp.renderTime"]=t.renderTime),t.size!=null&&(a["lcp.size"]=t.size));const c=rl({name:i,transaction:s,attributes:a,startTime:o});c&&(c.addEvent("lcp",{[Yo]:"millisecond",[Jo]:e}),c.end(o))}function nt(e){return e&&((Ae()||performance.timeOrigin)+e)/1e3}function k_(e){var n;const t={};if(e.nextHopProtocol!=null){const{name:r,version:o}=XA(e.nextHopProtocol);t["network.protocol.version"]=o,t["network.protocol.name"]=r}return Ae()||(n=lr())!=null&&n.timeOrigin?rC({...t,"http.request.redirect_start":nt(e.redirectStart),"http.request.redirect_end":nt(e.redirectEnd),"http.request.worker_start":nt(e.workerStart),"http.request.fetch_start":nt(e.fetchStart),"http.request.domain_lookup_start":nt(e.domainLookupStart),"http.request.domain_lookup_end":nt(e.domainLookupEnd),"http.request.connect_start":nt(e.connectStart),"http.request.secure_connection_start":nt(e.secureConnectionStart),"http.request.connection_end":nt(e.connectEnd),"http.request.request_start":nt(e.requestStart),"http.request.response_start":nt(e.responseStart),"http.request.response_end":nt(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?e.responseStart/1e3:void 0}):t}function rC(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}const oC=2147483647;let Md=0,qe={},ze,Tr;function sC({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=lr();if(r&&Ae()){r.mark&&q.performance.mark("sentry-tracing-init");const o=t?tC(n):t===!1?lC():void 0,s=e?QA(n):e===!1?uC():void 0,i=fC(),a=dC();return()=>{i(),a(),o==null||o(),s==null||s()}}return()=>{}}function iC(){En("longtask",({entries:e})=>{const t=Ie();if(!t)return;const{op:n,start_timestamp:r}=U(t);for(const o of e){const s=Ee(Ae()+o.startTime),i=Ee(o.duration);n==="navigation"&&r&&s<r||vn(t,s,s+i,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[G]:"auto.ui.browser.metrics"}})}})}function aC(){new PerformanceObserver(t=>{const n=Ie();if(n)for(const r of t.getEntries()){if(!r.scripts[0])continue;const o=Ee(Ae()+r.startTime),{start_timestamp:s,op:i}=U(n);if(i==="navigation"&&s&&o<s)continue;const a=Ee(r.duration),c={[G]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:f,invokerType:l,sourceURL:d,sourceFunctionName:p,sourceCharPosition:h}=u;c["browser.script.invoker"]=f,c["browser.script.invoker_type"]=l,d&&(c["code.filepath"]=d),p&&(c["code.function"]=p),h!==-1&&(c["browser.script.source_char_position"]=h),vn(n,o,o+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:c})}}).observe({type:"long-animation-frame",buffered:!0})}function cC(){En("event",({entries:e})=>{const t=Ie();if(t){for(const n of e)if(n.name==="click"){const r=Ee(Ae()+n.startTime),o=Ee(n.duration),s={name:Oe(n.target),op:"ui.interaction.".concat(n.name),startTime:r,attributes:{[G]:"auto.ui.browser.metrics"}},i=Vu(n.target);i&&(s.attributes["ui.component_name"]=i),vn(t,r,r+o,s)}}})}function uC(){return fa(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(qe.cls={value:e.value,unit:""},Tr=t)},!0)}function lC(){return da(({metric:e})=>{const t=e.entries[e.entries.length-1];!t||!ds(e.value)||(qe.lcp={value:e.value,unit:"millisecond"},ze=t)},!0)}function fC(){return HA(({metric:e})=>{e.entries[e.entries.length-1]&&(qe.ttfb={value:e.value,unit:"millisecond"})})}function dC(){return En("paint",({entries:e})=>{const t=us();for(const n of e){const r=n.startTime<t.firstHiddenTime;n.name==="first-paint"&&r&&(qe.fp={value:n.startTime,unit:"millisecond"}),n.name==="first-contentful-paint"&&r&&(qe.fcp={value:n.startTime,unit:"millisecond"})}})}function pC(e,t){const n=lr(),r=Ae();if(!(n!=null&&n.getEntries)||!r)return;const{spanStreamingEnabled:o,ignorePerformanceApiSpans:s,ignoreResourceSpans:i}=t,a=Ee(r),c=n.getEntries(),{op:u,start_timestamp:f}=U(e);
12c.slice(Md).forEach(l=>{const d=Ee(l.startTime),p=Ee(Math.max(0,l.duration));if(!(u==="navigation"&&f&&a+d<f))switch(l.entryType){case"navigation":{yC(e,l,a);break}case"mark":case"paint":case"measure":{gC(e,l,d,p,a,s);break}case"resource":{EC(e,l,l.name,d,p,a,i);break}}}),Md=Math.max(c.length-1,0),vC(e,o)}function hC(e,t){var a;const n=Ae();if(!((a=lr())!=null&&a.getEntries)||!n){xd();return}const{spanStreamingEnabled:r,recordClsOnPageloadSpan:o,recordLcpOnPageloadSpan:s}=t,i=Ee(n);if(U(e).op==="pageload"){if(wC(qe),r){const c=(u,f,l)=>{const d=l!=null?l:"browser.web_vital.".concat(u,".value");e.setAttribute(d,f),Tt&&_.log("Setting web vital attribute",{[d]:f},"on pageload span")};["ttfb","fp","fcp"].forEach(u=>{qe[u]&&c(u,qe[u].value)}),qe["ttfb.requestTime"]&&c("ttfb.requestTime",qe["ttfb.requestTime"].value,"browser.web_vital.ttfb.request_time")}else o||delete qe.cls,s||delete qe.lcp,Object.entries(qe).forEach(([c,u])=>{Su(c,u.value,u.unit,e)}),TC(e,t);e.setAttribute(r?"browser.performance.time_origin":"performance.timeOrigin",i),e.setAttribute(r?"browser.performance.navigation.activation_start":"performance.activationStart",co())}xd()}function xd(){ze=void 0,Tr=void 0,qe={}}function mC(e){if((e==null?void 0:e.entryType)==="measure")try{return e.detail.devtools.track==="Components ⚛"}catch(t){return}}function gC(e,t,n,r,o,s){if(mC(t)||["mark","measure"].includes(t.entryType)&&ct(t.name,s))return;const i=cs(!1),a=Ee(i?i.requestStart:0),c=o+Math.max(n,a),u=o+n,f=u+r,l={[G]:"auto.resource.browser.metrics"};c!==u&&(l["sentry.browser.measure_happened_before_request"]=!0,l["sentry.browser.measure_start_time"]=c),_C(l,t),c<=f&&vn(e,c,f,{name:t.name,op:t.entryType,attributes:l})}function _C(e,t){try{const n=t.detail;if(!n)return;if(typeof n=="object"){for(const[r,o]of Object.entries(n))if(o&&Mt(o))e["sentry.browser.measure.detail.".concat(r)]=o;else if(o!==void 0)try{e["sentry.browser.measure.detail.".concat(r)]=JSON.stringify(o)}catch(s){}return}if(Mt(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch(r){}}catch(n){}}function yC(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Ms(e,t,r,n)}),Ms(e,t,"secureConnection",n,"TLS/SSL"),Ms(e,t,"fetch",n,"cache"),Ms(e,t,"domainLookup",n,"DNS"),bC(e,t,n)}function Ms(e,t,n,r,o=n){const s=SC(n),i=t[s],a=t["".concat(n,"Start")];!a||!i||vn(e,r+Ee(a),r+Ee(i),{op:"browser.".concat(o),name:t.name,attributes:{[G]:"auto.ui.browser.metrics",...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function SC(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":"".concat(e,"End")}function bC(e,t,n){const r=n+Ee(t.requestStart),o=n+Ee(t.responseEnd),s=n+Ee(t.responseStart);t.responseEnd&&(vn(e,r,o,{op:"browser.request",name:t.name,attributes:{[G]:"auto.ui.browser.metrics"}}),vn(e,s,o,{op:"browser.response",name:t.name,attributes:{[G]:"auto.ui.browser.metrics"}}))}function EC(e,t,n,r,o,s,i){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const a=t.initiatorType?"resource.".concat(t.initiatorType):"resource.other";if(i!=null&&i.includes(a))return;const c={[G]:"auto.resource.browser.metrics"},u=Gn(n);u.protocol&&(c["url.scheme"]=u.protocol.split(":").pop()),u.host&&(c["server.address"]=u.host),c["url.same_origin"]=n.includes(q.location.origin),c[Cn]=n,IC(t,c,[["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 f={...c,...k_(t)},l=s+r,d=l+o;vn(e,l,d,{name:n.replace(q.location.origin,""),op:a,attributes:f})}function vC(e,t){const n=q.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),ec(r.rtt)&&(t?e.setAttribute("network.connection.rtt",r.rtt):U(e).op==="pageload"&&Su("connection.rtt",r.rtt,"millisecond"))),ec(n.deviceMemory)&&(t?e.setAttribute("device.memory.estimated_capacity",n.deviceMemory):e.setAttribute("deviceMemory","".concat(n.deviceMemory," GB"))),ec(n.hardwareConcurrency)&&(t?e.setAttribute("device.processor_count",n.hardwareConcurrency):e.setAttribute("hardwareConcurrency",String(n.hardwareConcurrency)))}function TC(e,t){ze&&t.recordLcpOnPageloadSpan&&(ze.element&&e.setAttribute("lcp.element",Oe(ze.element)),ze.id&&e.setAttribute("lcp.id",ze.id),ze.url&&e.setAttribute("lcp.url",ze.url.trim().slice(0,200)),ze.loadTime!=null&&e.setAttribute("lcp.loadTime",ze.loadTime),ze.renderTime!=null&&e.setAttribute("lcp.renderTime",ze.renderTime),e.setAttribute("lcp.size",ze.size)),Tr!=null&&Tr.sources&&t.recordClsOnPageloadSpan&&Tr.sources.forEac
12h((n,r)=>e.setAttribute("cls.source.".concat(r+1),Oe(n.node)))}function IC(e,t,n){n.forEach(([r,o])=>{const s=e[r];s!=null&&(typeof s=="number"&&s<oC||typeof s=="string")&&(t[o]=s)})}function wC(e){const t=cs(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}const RC="ElementTiming",kC=()=>({name:RC,setup(){!lr()||!Ae()||En("element",({entries:t})=>{for(const n of t){const r=n;if(!r.identifier)continue;const o=r.identifier,s=r.name,i=r.renderTime,a=r.loadTime,c={"sentry.origin":"auto.ui.browser.element_timing","ui.element.identifier":o};s&&(c["ui.element.paint_type"]=s),r.id&&(c["ui.element.id"]=r.id),r.element&&(c["ui.element.type"]=r.element.tagName.toLowerCase()),r.url&&(c["ui.element.url"]=r.url),r.naturalWidth&&(c["ui.element.width"]=r.naturalWidth),r.naturalHeight&&(c["ui.element.height"]=r.naturalHeight),i>0&&Ac("ui.element.render_time",i,{unit:"millisecond",attributes:c}),a>0&&Ac("ui.element.load_time",a,{unit:"millisecond",attributes:c})}})}}),AC=kC,tc=[],Ro=new Map,_r=new Map,A_=60;function CC(){if(lr()&&Ae()){const t=NC();return()=>{t()}}return()=>{}}const $o={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 NC(){return nl(MC)}const MC=({metric:e})=>{if(e.value==null)return;const t=Ee(e.value);if(t>A_)return;const n=e.entries.find(h=>h.duration===e.value&&$o[h.name]);if(!n)return;const{interactionId:r}=n,o=$o[n.name],s=Ee(Ae()+n.startTime),i=Ie(),a=i?Te(i):void 0,c=r!=null?Ro.get(r):void 0,u=(c==null?void 0:c.span)||a,f=u?U(u).description:W().getScopeData().transactionName,l=(c==null?void 0:c.elementName)||Oe(n.target),d={[G]:"auto.http.browser.inp",[ae]:"ui.interaction.".concat(o),[An]:n.duration},p=rl({name:l,transaction:f,attributes:d,startTime:s});p&&(p.addEvent("inp",{[Yo]:"millisecond",[Jo]:e.value}),p.end(s+t))};function xC(e){return e!=null?Ro.get(e):void 0}function OC(){const e=Object.keys($o);yn()&&e.forEach(o=>{q.addEventListener(o,t,{capture:!0,passive:!0})});function t(o){const s=o.target;if(!s)return;const i=Oe(s),a=Math.round(o.timeStamp);if(_r.set(a,i),_r.size>50){const c=_r.keys().next().value;c!==void 0&&_r.delete(c)}}function n(o){const s=Math.round(o.startTime);let i=_r.get(s);if(!i)for(let a=-5;a<=5;a++){const c=_r.get(s+a);if(c){i=c;break}}return i||"<unknown>"}const r=({entries:o})=>{const s=Ie(),i=s&&Te(s);o.forEach(a=>{if(!VA(a))return;const c=a.interactionId;if(c==null||Ro.has(c))return;const u=a.target?Oe(a.target):n(a);if(tc.length>10){const f=tc.shift();Ro.delete(f)}tc.push(c),Ro.set(c,{span:i,elementName:u})})};En("event",r),En("first-input",r)}function ol(e){var h,m;const{name:t,op:n,origin:r,metricName:o,value:s,attributes:i,parentSpan:a,reportEvent:c,startTime:u,endTime:f}=e,l=W().getScopeData().transactionName,d={[G]:r,[ae]:n,[An]:0,["browser.web_vital.".concat(o,".value")]:s,[vm]:l,[ku]:l,"user_agent.original":(h=q.navigator)==null?void 0:h.userAgent,...i};a&&((m=fi(a).attributes)==null?void 0:m[ae])==="pageload"&&(d["sentry.pageload.span_id"]=a.spanContext().spanId),c&&(d["browser.web_vital.".concat(o,".report_event")]=c);const p=Ve({name:t,attributes:d,startTime:u,parentSpan:a});p&&p.end(f!=null?f:u)}function PC(e){let t=0,n;if(!ha("largest-contentful-paint"))return;const r=da(({metric:o})=>{const s=o.entries[o.entries.length-1];!s||!ds(o.value)||(t=o.value,n=s)},!0);ma(e,(o,s,i)=>{LC(t,n,i,o),r()})}function LC(e,t,n,r){if(!ds(e))return;Tt&&_.log("Sending LCP span (".concat(e,")"));const o=Ae()||0,s=Ee(o),i=Ee(o+((t==null?void 0:t.startTime)||0)),a=t?Oe(t.element):"Largest contentful paint",c={};t!=null&&t.element&&(c["browser.web_vital.lcp.element"]=Oe(t.element)),t!=null&&t.id&&(c["browser.web_vital.lcp.id"]=t.id),t!=null&&t.url&&(c["browser.web_vital.lcp.url"]=t.url),(t==null?void 0:t.loadTime)!=null&&(c["browser.web_vital.lcp.load_time"]=t.loadTime),(t==null?void 0:t.renderTime)!=null&&(c["browser.web_vital.lcp.render_time"]=t.renderTime),(t==null?void 0:t.size)!=null&&(c["browser.web_vital.lcp.size"]=t.size),ol({name:a,op:"ui.webvital.lcp",origin:"auto.http.browser.lcp",metricName:"lcp",value:e,attributes:c,parentSpan:n,reportEvent:r,startTime:s,endTime:i})}function DC(e){let t=0,n;if(!ha("layout-shift"))return;const r=fa(({metric:o})=>{const s=o.entries[o.entries.length-1];s&&(t=o.value,n=s)},!0);ma(e,(o,s,i)=>{FC(t,n,i,o),r()})}function FC(e,t,n,r){var a;Tt&&_.log("Sending CLS span (".concat(e,")"));const o=t?Ee((Ae()||0)+t.startTime):me(),s=t?Oe((a=t.sources[0])==null?void 0:a.node):"Layout shift",i={};
12t!=null&&t.sources&&t.sources.forEach((c,u)=>{i["browser.web_vital.cls.source.".concat(u+1)]=Oe(c.node)}),ol({name:s,op:"ui.webvital.cls",origin:"auto.http.browser.cls",metricName:"cls",value:e,attributes:i,parentSpan:n,reportEvent:r,startTime:o})}function $C(){if(!lr()||!Ae())return;nl(({metric:n})=>{if(n.value==null||Ee(n.value)>A_)return;const o=n.entries.find(s=>s.duration===n.value&&$o[s.name]);o&&BC(n.value,o)})}function BC(e,t){Tt&&_.log("Sending INP span (".concat(e,")"));const n=Ee(Ae()+t.startTime),r=Ee(e),o=$o[t.name],s=xC(t.interactionId),i=Ie(),a=i?Te(i):void 0,c=(s==null?void 0:s.span)||a,u=c?fi(c).name:W().getScopeData().transactionName,f=(s==null?void 0:s.elementName)||Oe(t.target);ol({name:f,op:"ui.interaction.".concat(o),origin:"auto.http.browser.inp",metricName:"inp",value:e,attributes:{[An]:t.duration,[vm]:u,[ku]:u},startTime:n,endTime:n+r,parentSpan:c})}const UC=1e3;let Od,Wc,jc;function C_(e){const t="dom";In(t,e),wn(t,HC)}function HC(){if(!q.document)return;const e=it.bind(null,"dom"),t=Pd(e,!0);q.document.addEventListener("click",t,!1),q.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{var s,i;const o=(s=q[n])==null?void 0:s.prototype;(i=o==null?void 0:o.hasOwnProperty)!=null&&i.call(o,"addEventListener")&&(De(o,"addEventListener",function(a){return function(c,u,f){if(c==="click"||c=="keypress")try{const l=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},d=l[c]=l[c]||{refCount:0};if(!d.handler){const p=Pd(e);d.handler=p,a.call(this,c,p,f)}d.refCount++}catch(l){}return a.call(this,c,u,f)}}),De(o,"removeEventListener",function(a){return function(c,u,f){if(c==="click"||c=="keypress")try{const l=this.__sentry_instrumentation_handlers__||{},d=l[c];d&&(d.refCount--,d.refCount<=0&&(a.call(this,c,d.handler,f),d.handler=void 0,delete l[c]),Object.keys(l).length===0&&delete this.__sentry_instrumentation_handlers__)}catch(l){}return a.call(this,c,u,f)}}))})}function WC(e){if(e.type!==Wc)return!1;try{if(!e.target||e.target._sentryId!==jc)return!1}catch(t){}return!0}function jC(e,t){return e!=="keypress"?!1:t!=null&&t.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function Pd(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=zC(n);if(jC(n.type,r))return;ve(n,"_sentryCaptured",!0),r&&!r._sentryId&&ve(r,"_sentryId",Me());const o=n.type==="keypress"?"input":n.type;WC(n)||(e({event:n,name:o,global:t}),Wc=n.type,jc=r?r._sentryId:void 0),clearTimeout(Od),Od=q.setTimeout(()=>{jc=void 0,Wc=void 0},UC)}}function zC(e){try{return e.target}catch(t){return null}}let xs;function ga(e){const t="history";In(t,e),wn(t,qC)}function qC(){if(q.addEventListener("popstate",()=>{const t=q.location.href,n=xs;if(xs=t,n===t)return;it("history",{from:n,to:t})}),!DR())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const o=xs,s=GC(String(r));if(xs=s,o===s)return t.apply(this,n);it("history",{from:o,to:s})}return t.apply(this,n)}}De(q.history,"pushState",e),De(q.history,"replaceState",e)}function GC(e){try{return new URL(e,q.location.origin).toString()}catch(t){return e}}const ni={};function sl(e){const t=ni[e];if(t)return t;let n=q[e];if(Oc(n))return ni[e]=n.bind(q);const r=q.document;if(r&&typeof r.createElement=="function")try{const o=r.createElement("iframe");o.hidden=!0,r.head.appendChild(o);const s=o.contentWindow;s!=null&&s[e]&&(n=s[e]),r.head.removeChild(o)}catch(o){Tt&&_.warn("Could not create sandbox iframe for ".concat(e," check, bailing to window.").concat(e,": "),o)}return n&&(ni[e]=n.bind(q))}function VC(e){ni[e]=void 0}function ps(...e){return sl("setTimeout")(...e)}const Gt="__sentry_xhr_v3__";function il(e){const t="xhr";In(t,e),wn(t,YC)}function YC(){if(!q.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const o=new Error,s=me()*1e3,i=_t(r[0])?r[0].toUpperCase():void 0,a=JC(r[1]);if(!i||!a)return t.apply(n,r);n[Gt]={method:i,url:a,request_headers:{}},i==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const c=()=>{const u=n[Gt];if(u&&n.readyState===4){try{u.status_code=n.status}catch(l){}const f={endTimestamp:me()*1e3,startTimestamp:s,xhr:n,virtualError:o};it("xhr",f),n.removeEventListener("readystatechange",c)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,f,l){return c(),u.apply(f,l)}}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,f,l){const[d,p]=l,h=f[Gt];return h&&_t(d)&&_t(p)&&(h.request_headers[d.toLowerCase()]=p),u.apply(f,l)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const o=n[Gt];if(!o)return t.apply(n,r);r[0]!==void 0&&(o.body=r[0]);const s={startTimestamp:me()*1e3,xhr:n};return it("xhr",s),t.apply(n,r)}})}function JC(e){if(_t(e))return e;try{return e.toString()}catch(t){}}const KC=Symbol.for("sentry__originalRequestBody");function N_(e){return new URLSearchParams(e).toString()}function ki(e,t=_){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[N_(e)];if(!e)return[void 0]}catch(n){return Tt&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Tt&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function al(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][KC];return n!==void 0?n:void 0}}function M_(e){let t;try{t=e.getAllResponseHeaders()}catch(n){return Tt&&_.error(n,"Failed to get xhr response headers",e),{}}return t?t.split("\r\n").reduce((n,r)=>{const[o,s]=r.split(": ");return s&&(n[o.toLowerCase()]=s),n},{}):{}}function XC(e){if(typeof Element>"u")return!1;try{return e instanceof Element}catch(t){return!1}}function x_(e){try{return new URL(e,q.location.origin).toString()}catch(t){return e}}const QC=40;function cl(e,t=sl("fetch")){let n=0,r=0;async function o(s){const i=s.body.length;n+=i,r++;
12const a={body:s.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const c=await t(e.url,a);return{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}}catch(c){throw VC("fetch"),c}finally{n-=i,r--}}return qm(e,o,Pu(e.bufferSize||QC))}const k=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function ZC(){const e=C();if(!e){k&&_.warn("No Sentry client available, profiling is not started");return}if(!e.getIntegrationByName("BrowserProfiling")){k&&_.warn("BrowserProfiling integration is not available");return}e.emit("startUIProfiler")}function e1(){const e=C();if(!e){k&&_.warn("No Sentry client available, profiling is not started");return}if(!e.getIntegrationByName("BrowserProfiling")){k&&_.warn("ProfilingIntegration is not available");return}e.emit("stopUIProfiler")}const t1={startProfiler:ZC,stopProfiler:e1},n1=10,r1=20,o1=30,s1=40,i1=50;function zr(e,t,n,r){const o={filename:e,function:t==="<anonymous>"?Nt:t,in_app:!0};return n!==void 0&&(o.lineno=n),r!==void 0&&(o.colno=r),o}const a1=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,c1=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,u1=/\((\S*)(?::(\d+))(?::(\d+))\)/,l1=/at (.+?) ?\(data:(.+?),/,f1=e=>{var o;const t=e.match(l1);if(t)return{filename:"<data:".concat(t[2],">"),function:t[1]};const n=a1.exec(e);if(n){const[,s,i,a]=n;return zr(s,Nt,+i,+a)}const r=c1.exec(e);if(r){if(((o=r[2])==null?void 0:o.indexOf("eval"))===0){const c=u1.exec(r[2]);c&&(r[2]=c[1],r[3]=c[2],r[4]=c[3])}const[i,a]=F_(r[1]||Nt,r[2]);return zr(a,i,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},O_=[o1,f1],d1=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,p1=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,h1=e=>{const t=d1.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const s=p1.exec(t[3]);s&&(t[1]=t[1]||"eval",t[3]=s[1],t[4]=s[2],t[5]="")}let r=t[3],o=t[1]||Nt;return[o,r]=F_(o,r),zr(r,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},P_=[i1,h1],m1=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,g1=e=>{const t=m1.exec(e);return t?zr(t[2],t[1]||Nt,+t[3],t[4]?+t[4]:void 0):void 0},_1=[s1,g1],y1=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,S1=e=>{const t=y1.exec(e);return t?zr(t[2],t[3]||Nt,+t[1]):void 0},b1=[n1,S1],E1=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,v1=e=>{const t=E1.exec(e);return t?zr(t[5],t[3]||t[4]||Nt,+t[1],+t[2]):void 0},T1=[r1,v1],L_=[O_,P_],D_=yh(...L_),F_=(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]:Nt,n?"safari-extension:".concat(t):"safari-web-extension:".concat(t)]:[e,t]};function I1(e,{metadata:t,tunnel:n,dsn:r}){const o={event_id:e.event_id,sent_at:new Date().toISOString(),...(t==null?void 0:t.sdk)&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Ft(r)}},s=w1(e);return lt(o,[s])}function w1(e){return[{type:"user_report"},e]}const Os=1024,R1="Breadcrumbs",k1=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:R1,setup(n){t.console&&Du(N1(n)),t.dom&&C_(C1(n,t.dom)),t.xhr&&il(M1(n)),t.fetch&&sa(x1(n)),t.history&&ga(O1(n)),t.sentry&&n.on("beforeSendEvent",A1(n))}}},$_=k1;function A1(e){return function(n){C()===e&&vt({category:"sentry.".concat(n.type==="transaction"?"transaction":"event"),event_id:n.event_id,level:n.level,message:Dn(n)},{event:n})}}function C1(e,t){return function(r){if(C()!==e)return;let o,s,i=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>Os&&(k&&_.warn("`dom.maxStringLength` cannot exceed ".concat(Os,", but a value of ").concat(a," was configured. Sentry will use ").concat(Os," instead.")),a=Os),typeof i=="string"&&(i=[i]);try{const u=r.event,f=P1(u)?u.target:u;o=Oe(f,{keyAttrs:i,maxStringLength:a}),s=Vu(f)}catch(u){o="<unknown>"}if(o.length===0)return;const c={category:"ui.".concat(r.name),message:o};s&&(c.data={"ui.component_name":s}),vt(c,{event:r.event,name:r.name,global:r.global})}}function N1(e){return function(n){if(C()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:yi(n.level),message:ui(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message="Assertion failed: ".concat(ui(n.args.slice(1)," ")||"console.assert"),r.data.arguments=n.args.slice(1);else return;vt(r,{input:n.args,level:n.level})}}function M1(e){return function(n){if(C()!==e)return;const{startTimestamp:r,endTimestamp:o}=n,s=n.xhr[Gt];if(!r||!o||!s)return;const{method:i,url:a,status_code:c,body:u}=s,f={method:i,url:a,status_code:c},l={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:o},d={category:"xhr",data:f,type:"http",level:Wg(c)};e.emit("beforeOutgoingRequestBreadcrumb",d,l),vt(d,l)}}function x1(e){return function(n){if(C()!==e)return;const{startTimestamp:r,endTimestamp:o}=n;
12if(o&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const s={data:n.error,input:n.args,startTimestamp:r,endTimestamp:o},i={category:"fetch",data:n.fetchData,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",i,s),vt(i,s)}else{const s=n.response,i={...n.fetchData,status_code:s==null?void 0:s.status},a={input:n.args,response:s,startTimestamp:r,endTimestamp:o},c={category:"fetch",data:i,type:"http",level:Wg(i.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",c,a),vt(c,a)}}}function O1(e){return function(n){if(C()!==e)return;let r=n.from,o=n.to;const s=Gn(w.location.href);let i=r?Gn(r):void 0;const a=Gn(o);i!=null&&i.path||(i=s),s.protocol===a.protocol&&s.host===a.host&&(o=a.relative),s.protocol===i.protocol&&s.host===i.host&&(r=i.relative),vt({category:"navigation",data:{from:r,to:o}})}}function P1(e){return!!e&&!!e.target}const L1="EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(","),D1="BrowserApiErrors",F1=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:D1,setupOnce(){t.setTimeout&&De(w,"setTimeout",Ld),t.setInterval&&De(w,"setInterval",Ld),t.requestAnimationFrame&&De(w,"requestAnimationFrame",$1),t.XMLHttpRequest&&"XMLHttpRequest"in w&&De(XMLHttpRequest.prototype,"send",B1);const n=t.eventTarget;n&&(Array.isArray(n)?n:L1).forEach(o=>U1(o,t))}}},B_=F1;function Ld(e){return function(...t){const n=t[0];return t[0]=jr(n,{mechanism:{handled:!1,type:"auto.browser.browserapierrors.".concat(Xt(e))}}),e.apply(this,t)}}function $1(e){return function(t){return e.apply(this,[jr(t,{mechanism:{data:{handler:Xt(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function B1(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in n&&typeof n[o]=="function"&&De(n,o,function(s){const i={mechanism:{data:{handler:Xt(s)},handled:!1,type:"auto.browser.browserapierrors.xhr.".concat(o)}},a=mu(s);return a&&(i.mechanism.data.handler=Xt(a)),jr(s,i)})}),e.apply(this,t)}}function U1(e,t){var o,s;const r=(o=w[e])==null?void 0:o.prototype;(s=r==null?void 0:r.hasOwnProperty)!=null&&s.call(r,"addEventListener")&&(De(r,"addEventListener",function(i){return function(a,c,u){try{H1(c)&&(c.handleEvent=jr(c.handleEvent,{mechanism:{data:{handler:Xt(c),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch(f){}return t.unregisterOriginalCallbacks&&W1(this,a,c),i.apply(this,[a,jr(c,{mechanism:{data:{handler:Xt(c),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),u])}}),De(r,"removeEventListener",function(i){return function(a,c,u){try{if(Object.prototype.hasOwnProperty.call(c,"__sentry_wrapped__")){const f=c.__sentry_wrapped__;f&&i.call(this,a,f,u)}}catch(f){}return i.call(this,a,c,u)}}))}function H1(e){return typeof e.handleEvent=="function"}function W1(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const U_=(e={})=>{var n;const t=(n=e.lifecycle)!=null?n:"route";return{name:"BrowserSession",setupOnce(){if(typeof w.document>"u"){k&&_.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}vc({ignoreDuration:!0});let r=!1;tl(()=>{r||(zs(),r=!0)});const o=_e();let s=o.getUser();o.addScopeListener(i=>{const a=i.getUser();((s==null?void 0:s.id)!==(a==null?void 0:a.id)||(s==null?void 0:s.ip_address)!==(a==null?void 0:a.ip_address))&&(s=a,r&&zs())}),t==="route"&&ga(({from:i,to:a})=>{i!==a&&(vc({ignoreDuration:!0}),zs(),r=!0)})}}},j1="CultureContext",z1=()=>({name:j1,preprocessEvent(e){var n;const t=Dd();t&&(e.contexts={...e.contexts,culture:{...t,...(n=e.contexts)==null?void 0:n.culture}})},processSegmentSpan(e){const t=Dd();t&&_n(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}}),H_=z1;function Dd(){try{const e=w.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch(e){return}}const q1="GlobalHandlers",G1=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:q1,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(V1(n),Fd("onerror")),t.onunhandledrejection&&(Y1(n),Fd("onunhandledrejection"))}}},W_=G1;function V1(e){Sh(t=>{const{stackParser:n,attachStacktrace:r}=q_();if(C()!==e||f_())return;const{msg:o,url:s,line:i,column:a,error:c}=t,u=J1(ua(n,c||o,void 0,r,!1),s,i,a);u.level="error",no(u,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function Y1(e){bh(t=>{const{stackParser:n,attachStacktrace:r}=q_();if(C()!==e||f_())return;const o=j_(t),s=Mt(o)?z_(o):ua(n,o,void 0,r,!0);s.level="error",no(s,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function j_(e){if(Mt(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch(t){}return e}function z_(e){return{exception:{values:[{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: ".concat(String(e))}]}}}function J1(e,t,n,r){var u;const o=e.exception=e.exception||{},s=o.values=o.values||[],i=s[0]=s[0]||{},a=i.stacktrace=i.stacktrace||{},c=a.frames=a.frames||[];
12return c.length===0&&c.push({colno:r,lineno:n,filename:(u=K1(t))!=null?u:bn(),function:Nt,in_app:!0}),e}function Fd(e){k&&_.log("Global Handler attached: ".concat(e))}function q_(){const e=C();return(e==null?void 0:e.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}function K1(e){if(!(!_t(e)||e.length===0))return e.startsWith("data:")?"<".concat(yt(e,!1),">"):e}const G_=()=>({name:"HttpContext",preprocessEvent(e){var r;if(!w.navigator&&!w.location&&!w.document)return;const t=Ii(),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[ae];if(!w.navigator&&!w.location&&!w.document)return;const n=Ii();_n(e,{[Cn]:t!=="http.client"?n.url:void 0,"http.request.header.user_agent":n.headers["User-Agent"],"http.request.header.referer":n.headers.Referer})}}),X1="cause",Q1=5,Z1="LinkedErrors",eN=(e={})=>{const t=e.limit||Q1,n=e.key||X1;return{name:Z1,preprocessEvent(r,o,s){const i=s.getOptions();XT(aa,i.stackParser,n,t,r,o)}}},V_=eN,tN=/^HTML(\w*)Element$/;function ul(e){if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(XC(e)){const t=nN(e);if(tN.test(t))return"[HTMLElement: ".concat(Oe(e),"]")}}function nN(e){const t=Object.getPrototypeOf(e);return t!=null&&t.constructor?t.constructor.name:"null prototype"}function rN(){return oN()?(k&&tn(()=>{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 oN(){var o;if(typeof w.window>"u")return!1;const e=w;if(e.nw)return!1;const t=e.chrome||e.browser;if(!((o=t==null?void 0:t.runtime)!=null&&o.id))return!1;const n=bn();return!(w===w.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(n))}
12function Y_(e){return[ig(),og(),sI(),B_(),$_(),W_(),V_(),fg(),G_(),H_(),U_()]}function sN(e={}){const t=!e.skipBrowserExtensionCheck&&rN();let n=e.defaultIntegrations==null?Y_():e.defaultIntegrations;const r={...e,enabled:t?!1:e.enabled,stackParser:QS(e.stackParser||D_),integrations:Hv({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||cl};return kh(ul),IT(g_,r)}function iN(){}function aN(e){e()}function zc(e={}){const t=w.document,n=(t==null?void 0:t.head)||(t==null?void 0:t.body);if(!n){k&&_.error("[showReportDialog] Global document not defined");return}const r=W(),o=C(),s=o==null?void 0:o.getDsn();if(!s){k&&_.error("[showReportDialog] DSN not configured");return}const i={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||Am()},a=w.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=Bv(s,i);const{onLoad:c,onClose:u}=i;if(c&&(a.onload=c),u){const f=l=>{if(l.data==="__sentry_reportdialog_closed__")try{u()}finally{w.removeEventListener("message",f)}};w.addEventListener("message",f)}n.appendChild(a)}const cN=H,uN="ReportingObserver",$d=new WeakMap,lN=(e={})=>{const t=e.types||["crash","deprecation","intervention"];function n(r){if($d.has(C()))for(const o of r)Ye(s=>{s.setExtra("url",o.url);const i="ReportingObserver [".concat(o.type,"]");let a="No details available";if(o.body){const c={};for(const u in o.body)c[u]=o.body[u];if(s.setExtra("body",c),o.type==="crash"){const u=o.body;a=[u.crashId||"",u.reason||""].join(" ").trim()||a}else a=o.body.message||a}Rm("".concat(i,": ").concat(a))})}return{name:uN,setupOnce(){if(!$R())return;new cN.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){$d.set(r,!0)}}},fN=lN,dN="HttpClient",pN=(e={})=>{const t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:dN,setup(n){EN(n,t),vN(n,t)}}},hN=pN;function mN(e,t,n,r,o){if(J_(e,n.status,n.url)){const s=TN(t,r);let i,a,c,u;const f=X_();if(f.requestHeaders!==!1&&(i=Lo(Bd(s.headers),f.requestHeaders)),f.responseHeaders!==!1&&(a=Lo(Bd(n.headers),f.responseHeaders)),f.cookies!==!1){const d=s.headers.get("Cookie")||void 0;if(d){const h=Rc(d,f.cookies);typeof h=="object"&&(c=h)}const p=n.headers.get("Set-Cookie")||void 0;if(p){const h=Rc(p,f.cookies);typeof h=="object"&&(u=h)}}const l=K_({url:s.url,method:s.method,status:n.status,requestHeaders:i,responseHeaders:a,requestCookies:c,responseCookies:u,error:o,type:"fetch"});no(l)}}function gN(e,t,n,r,o){if(J_(e,t.status,t.responseURL)){let s,i,a;const c=X_();if(c.cookies!==!1)try{const f=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;if(f){const l=Rc(f,c.cookies);typeof l=="object"&&(i=l)}}catch(f){}if(c.responseHeaders!==!1)try{a=Lo(yN(t),c.responseHeaders)}catch(f){}c.requestHeaders!==!1&&(s=Lo(r,c.requestHeaders));const u=K_({url:t.responseURL,method:n,status:t.status,requestHeaders:s,responseHeaders:a,responseCookies:i,error:o,type:"xhr"});no(u)}}function _N(e){if(e){const t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function Bd(e){const t={};return e.forEach((n,r)=>{t[r]=n}),t}function yN(e){const t=e.getAllResponseHeaders();return t?t.split("\r\n").reduce((n,r)=>{const[o,s]=r.split(": ");return o&&s&&(n[o]=s),n},{}):{}}function SN(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}function bN(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}function EN(e,t){jg()&&sa(n=>{if(C()!==e)return;const{response:r,args:o,error:s,virtualError:i}=n,[a,c]=o;r&&mN(t,a,r,c,s||i)},!1)}function vN(e,t){"XMLHttpRequest"in H&&il(n=>{if(C()!==e)return;const{error:r,virtualError:o}=n,s=n.xhr,i=s[Gt];if(!i)return;const{method:a,request_headers:c}=i;try{gN(t,s,a,c,r||o)}catch(u){k&&_.warn("Error while extracting response event form XHR response",u)}})}function J_(e,t,n){return bN(e.failedRequestStatusCodes,t)&&SN(e.failedRequestTargets,n)&&!tg(n,C())}function K_(e){const t=C(),n=t&&e.error&&e.error instanceof Error?e.error.stack:void 0,r=n&&t?t.getOptions().stackParser(n,0,1):void 0,o="HTTP Client Error with status code: ".concat(e.status),s={message:o,exception:{values:[{type:"Error",value:o,stacktrace:r?{frames:r}:void 0}]},request:{url:e.url,method:e.method,headers:e.requestHeaders,cookies:e.requestCookies},contexts:{response:{status_code:e.status,headers:e.responseHeaders,cookies:e.responseCookies,body_size:_N(e.responseHeaders)}}};return At(s,{type:"auto.http.client.".concat(e.type),handled:!1}),s}function TN(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request
12(e,t)}function X_(){const e=C();if(!e)return{cookies:!1,requestHeaders:!1,responseHeaders:!1};const t=e.getOptions();if(t.dataCollection==null){const o=!!t.sendDefaultPii;return{cookies:o,requestHeaders:o,responseHeaders:o}}const{cookies:n,httpHeaders:r}=e.getDataCollectionOptions();return{cookies:n,requestHeaders:r.request,responseHeaders:r.response}}const nc=H,IN=7,wN="ContextLines",RN=(e={})=>({name:wN,processEvent(t,n,r){var s,i;const o=(i=(s=e.frameContextLines)!=null?s:r==null?void 0:r.getDataCollectionOptions().frameContextLines)!=null?i:IN;return AN(t,o)}}),kN=RN;function AN(e,t){var a;const n=nc.document,r=nc.location&&eg(nc.location.href);if(!n||!r)return e;const o=(a=e.exception)==null?void 0:a.values;if(!(o!=null&&o.length))return e;const s=n.documentElement.innerHTML;if(!s)return e;const i=["<!DOCTYPE html>","<html>",...s.split("\n"),"</html>"];return o.forEach(c=>{const u=c.stacktrace;u!=null&&u.frames&&(u.frames=u.frames.map(f=>CN(f,i,r,t)))}),e}function CN(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||gb(t,e,r),e}const NN="GraphQLClient",MN=e=>({name:NN,setup(t){xN(t,e),ON(t,e)}});function xN(e,t){e.on("beforeOutgoingRequestSpan",(n,r)=>{const s=U(n).data||{};if(!(s[ae]==="http.client"))return;const c=s[Cn]||s["http.url"]||s.url,u=s[jb]||s["http.method"];if(!_t(c)||!_t(u))return;const{endpoints:f}=t,l=ct(c,f),d=Z_(r);if(l&&d){const p=ey(d);if(p){const h=Q_(p);n.updateName("".concat(u," ").concat(c," (").concat(h,")")),_a(p)&&e.getDataCollectionOptions().graphQL.document===!0&&n.setAttribute(bm,p.query),ya(p)&&(n.setAttribute("graphql.persisted_query.hash.sha256",p.extensions.persistedQuery.sha256Hash),n.setAttribute("graphql.persisted_query.version",p.extensions.persistedQuery.version))}}})}function ON(e,t){e.on("beforeOutgoingRequestBreadcrumb",(n,r)=>{const{category:o,type:s,data:i}=n;if(s==="http"&&(o==="fetch"||o==="xhr")){const f=i==null?void 0:i.url,{endpoints:l}=t,d=ct(f,l),p=Z_(r);if(d&&i&&p){const h=ey(p);if(!i.graphql&&h){const m=Q_(h);i["graphql.operation"]=m,_a(h)&&e.getDataCollectionOptions().graphQL.document===!0&&(i[bm]=h.query),ya(h)&&(i["graphql.persisted_query.hash.sha256"]=h.extensions.persistedQuery.sha256Hash,i["graphql.persisted_query.version"]=h.extensions.persistedQuery.version)}}}})}function Q_(e){if(ya(e))return"persisted ".concat(e.operationName);if(_a(e)){const{query:t,operationName:n}=e,{operationName:r=n,operationType:o}=PN(t);return r?"".concat(o," ").concat(r):"".concat(o)}return"unknown"}function Z_(e){const t="xhr"in e;let n;if(t){const r=e.xhr[Gt];n=r&&ki(r.body)[0]}else{const r=al(e.input);n=ki(r)[0]}return n}function PN(e){const t=/^(?:\s*)(query|mutation|subscription)(?:\s*)(\w+)(?:\s*)[{(]/,n=/^(?:\s*)(query|mutation|subscription)(?:\s*)[{(]/,r=e.match(t);if(r)return{operationType:r[1],operationName:r[2]};const o=e.match(n);return o?{operationType:o[1],operationName:void 0}:{operationType:void 0,operationName:void 0}}function _a(e){return at(e)&&typeof e.query=="string"}function ya(e){return at(e)&&typeof e.operationName=="string"&&at(e.extensions)&&at(e.extensions.persistedQuery)&&typeof e.extensions.persistedQuery.sha256Hash=="string"&&typeof e.extensions.persistedQuery.version=="number"}function ey(e){try{const t=JSON.parse(e);return _a(t)||ya(t)?t:void 0}catch(t){return}}const LN=MN,DN=(e={})=>{const t=["script"];function n(r,o,s=0){var a;if(!r)return;const i="shadowRoot"in r&&r.shadowRoot?r.shadowRoot.children:r.children;for(const c of i){if(!(c instanceof HTMLElement))continue;const u=Vu(c,1)||void 0,f=c.tagName.toLowerCase();if(t.includes(f))continue;const l=((a=e.onElement)==null?void 0:a.call(e,{element:c,componentName:u,tagName:f,depth:s}))||{};if(l==="skip")continue;if(l==="children"){n(c,o,s+1);continue}const{x:d,y:p,width:h,height:m}=c.getBoundingClientRect(),g={identifier:c.id||void 0,type:u||f,visible:!0,alpha:1,height:m,width:h,x:d,y:p,...l},y=[];g.children=y,n(c,g.children,s+1),o.push(g)}}return{name:"ViewHierarchy",processEvent:(r,o)=>{var a,c;if(r.type!==void 0||((a=e.shouldAttach)==null?void 0:a.call(e,r,o))===!1)return r;const s={rendering_system:"DOM",positioning:"absolute",windows:[]};n(((c=e.rootElement)==null?void 0:c.call(e))||w.document.body,s.windows);const i={filename:"view-hierarchy.json",attachmentType:"event.view_hierarchy",contentType:"application/json",data:JSON.stringify(s)};return o.attachments=o.attachments||[],o.attachments.push(i),r}}},be=H,ll="sentryReplaySession",FN="replay_event",fl="Unable to send Replay",$N=3e5,BN=9e5,UN=5e3,HN=5500,WN=6e4,jN=5e3,zN=3,Ud=15e4,Ps=5e3,qN=3e3,GN=300,dl=2e7,VN=4999,YN=5e4,Hd=36e5;var JN=Object.defineProperty,KN=(e,t,n)=>t in e?JN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Wd=(e,t,n)=>KN(e,typeof t!="symbol"?t+"":t,n),Ce=(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))(Ce||{});
12function XN(e){return e.nodeType===e.ELEMENT_NODE}function ko(e){const t=e==null?void 0:e.host;return(t==null?void 0:t.shadowRoot)===e}function Ao(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function QN(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 ZN(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import","url(".concat(JSON.stringify(e.href),")")];return e.layerName===""?n.push("layer"):e.layerName&&n.push("layer(".concat(e.layerName,")")),e.supportsText&&n.push("supports(".concat(e.supportsText,")")),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function Ai(e){try{const t=e.rules||e.cssRules;return t?QN(Array.from(t,ty).join("")):null}catch(t){return null}}function eM(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,o=r[n],s=r.getPropertyPriority(o);t+="".concat(o,":").concat(r.getPropertyValue(o)).concat(s?" !important":"",";")}return"".concat(e.selectorText," { ").concat(t," }")}function ty(e){let t;if(nM(e))try{t=Ai(e.styleSheet)||ZN(e)}catch(n){}else if(rM(e)){let n=e.cssText;const r=e.selectorText.includes(":"),o=typeof e.style.all=="string"&&e.style.all;if(o&&(n=eM(e)),r&&(n=tM(n)),r||o)return n}return t||e.cssText}function tM(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function nM(e){return"styleSheet"in e}function rM(e){return"selectorText"in e}let ny=class{constructor(){Wd(this,"idNodeMap",new Map),Wd(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const n=(r=this.getMeta(t))==null?void 0:r.id;return n!=null?n:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function oM(){return new ny}function Sa({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 Bo({isMasked:e,element:t,value:n,maskInputFn:r}){let o=n||"";return e?(r&&(o=r(o,t)),"*".repeat(o.length)):o}function qr(e){return e.toLowerCase()}function qc(e){return e.toUpperCase()}const jd="__rrweb_original__";function sM(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let o=0;o<e.height;o+=n){const s=t.getImageData,i=jd in s?s[jd]:s;if(new Uint32Array(i.call(t,r,o,Math.min(n,e.width-r),Math.min(n,e.height-o)).data.buffer).some(c=>c!==0))return!1}return!0}function pl(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?qr(t):null}function Ci(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function ry(e,t){var s;let n;try{n=new URL(e,t!=null?t:window.location.href)}catch(i){return null}const r=/\.([0-9a-z]+)(?:$)/i,o=n.pathname.match(r);return(s=o==null?void 0:o[1])!=null?s:null}const zd={};function oy(e){const t=zd[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);const s=o.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(o)}catch(o){}return zd[e]=r.bind(window)}function Gc(...e){return oy("setTimeout")(...e)}function sy(...e){return oy("clearTimeout")(...e)}function iy(e){try{return e.contentDocument}catch(t){}}function iM(e){try{return e.contentWindow}catch(t){}}let aM=1;const cM=new RegExp("[^a-z0-9-_:]"),Uo=-2;function hl(){return aM++}function uM(e){if(e instanceof HTMLFormElement)return"form";const t=qr(e.tagName);return cM.test(t)?"div":t}function lM(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let yr,qd;const fM=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,dM=/^(?:[a-z+]+:)?\/\//i,pM=/^www\..*/i,hM=/^(data:)([^,]*),(.*)/i;function mM(e,t){if(!e||t.size===0)return e;try{const n=e.split(";"),r=[];for(let o of n){if(o=o.trim(),!o)continue;const s=o.indexOf(":");if(s===-1){r.push(o);continue}const i=o.slice(0,s).trim();t.has(i)||r.push(o)}return r.join("; ")+(r.length>0&&e.endsWith(";")?";":"")}catch(n){return console.warn("Error filtering CSS properties:",n),e}}function Ni(e,t){return(e||"").replace(fM,(n,r,o,s,i,a)=>{const c=o||i||a,u=r||s||"";if(!c)return n;
12if(dM.test(c)||pM.test(c)||hM.test(c))return"url(".concat(u).concat(c).concat(u,")");if(c[0]==="/")return"url(".concat(u).concat(lM(t)+c).concat(u,")");const f=t.split("/"),l=c.split("/");f.pop();for(const d of l)d!=="."&&(d===".."?f.pop():f.push(d));return"url(".concat(u).concat(f.join("/")).concat(u,")")})}const gM=/^[^ \t\n\r\u000c]+/,_M=/^[, \t\n\r\u000c]+/;function yM(e,t){if(t.trim()==="")return t;let n=0;function r(s){let i;const a=s.exec(t.substring(n));return a?(i=a[0],n+=i.length,i):""}const o=[];for(;r(_M),!(n>=t.length);){let s=r(gM);if(s.slice(-1)===",")s=Ir(e,s.substring(0,s.length-1)),o.push(s);else{let i="";s=Ir(e,s);let a=!1;for(;;){const c=t.charAt(n);if(c===""){o.push((s+i).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,o.push((s+i).trim());break}else c==="("&&(a=!0);i+=c,n+=1}}}return o.join(", ")}const Gd=new WeakMap;function Ir(e,t){return!t||t.trim()===""?t:ba(e,t)}function SM(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function ba(e,t){let n=Gd.get(e);if(n||(n=e.createElement("a"),Gd.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function ay(e,t,n,r,o,s,i){if(!r)return r;if(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#"))return Ir(e,r);if(n==="xlink:href"&&r[0]!=="#")return Ir(e,r);if(n==="background"&&(t==="table"||t==="td"||t==="th"))return Ir(e,r);if(n==="srcset")return yM(e,r);if(n==="style"){let a=Ni(r,ba(e));return i&&i.size>0&&(a=mM(a,i)),a}else if(t==="object"&&n==="data")return Ir(e,r);return typeof s=="function"?s(n,r,o):r}function cy(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function bM(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let o=e.classList.length;o--;){const s=e.classList[o];if(t.test(s))return!0}if(n)return e.matches(n)}catch(o){}return!1}function EM(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Un(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Un(e.parentNode,t,n,r+1)}function wr(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(".".concat(e)))return!0}else if(EM(r,e))return!0}return!!(t&&r.matches(t))}catch(o){return!1}}}function Gr(e,t,n,r,o,s){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 a=-1,c=-1;if(s){if(c=Un(i,wr(r,o)),c<0)return!0;a=Un(i,wr(t,n),c>=0?c:1/0)}else{if(a=Un(i,wr(t,n)),a<0)return!1;c=Un(i,wr(r,o),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!s}catch(i){}return!!s}function vM(e,t,n){const r=iM(e);if(!r)return;let o=!1,s;try{s=r.document.readyState}catch(a){return}if(s!=="complete"){const a=Gc(()=>{o||(t(),o=!0)},n);e.addEventListener("load",()=>{sy(a),o=!0,t()});return}const i="about:blank";if(r.location.href!==i||e.src===i||e.src==="")return Gc(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function TM(e,t,n){let r=!1,o;try{o=e.sheet}catch(i){o=null}if(o)return;const s=Gc(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{sy(s),r=!0,t()})}function IM(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:f,maskTextSelector:l,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:h={},maskTextFn:m,maskInputFn:g,dataURLOptions:y={},inlineImages:b,recordCanvas:E,keepIframeSrcFn:v,newlyAddedElement:R=!1,ignoreCSSAttributes:I}=t,S=wM(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Ce.Document,childNodes:[],compatMode:e.compatMode}:{type:Ce.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Ce.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:S};case e.ELEMENT_NODE:return kM(e,{doc:n,blockClass:o,blockSelector:s,unblockSelector:i,inlineStylesheet:p,maskAttributeFn:c,maskInputOptions:h,maskInputFn:g,dataURLOptions:y,inlineImages:b,recordCanvas:E,keepIframeSrcFn:v,newlyAddedElement:R,rootId:S,maskTextClass:u,unmaskTextClass:f,maskTextSelector:l,unmaskTextSelector:d,ignoreCSSAttributes:I});case e.TEXT_NODE:return RM(e,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:f,maskTextSelector:l,unmaskTextSelector:d,maskTextFn:m,maskInputOptions:h,maskInputFn:g,rootId:S});case e.CDATA_SECTION_NODE:return{type:Ce.CDATA,textContent:"",rootId:S};case e.COMMENT_NODE:return{type:Ce.Comment,textContent:e.textContent||"",rootId:S};default:return!1}}function wM(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function RM(e,t){var y;const{maskAllText:n,maskTextClass:r,unmaskTextClass:o,maskTextSelector:s,unmaskTextSelector:i,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:f}=t,l=e.parentNode&&e.parentNode.tagName;let d=e.textContent;const p=l==="STYLE"?!0:void 0,h=l==="SCRIPT"?!0:void 0,m=l==="TEXTAREA"?!0:void 0;if(p&&d){try{e.nextSibling||e.previousSibling||(y=e.parentNode.sheet)!=null&&y.cssRules&&(d=Ai(e.parentNode.sheet))}catch(b){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(b),e)}d=Ni(d,ba(t.doc))}h&&(d="SCRIPT_PLACEHOLDER");const g=Gr(e,r,s,o,i,n);if(!p&&!h&&!m&&d&&g&&(d=a?a(d,e.parentElement):d.replace(/[\S]/g,"*")),m&&d&&(c.textarea||g)&&(d=u?u(d,e.parentNode):d.replace(/[\S]/g,"*")),l==="OPTION"&&d){const b=Sa({type:null,tagName:l,maskInputOptions:c});d=Bo({isMasked:Gr(e,r,s,o,i,b),element:e,value:d,maskInputFn:u})}return{type:Ce.Text,textContent:d||"",isStyle:p,rootId:f}}function kM(e,t){const{doc:n,blockClass:r,blockSelector:o,unblockSelector:s,inlineStylesheet:i,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:f={},inlineImages:l,recordCanvas:d,keepIframeSrcFn:p,newlyAddedElement:h=!1,rootId:m,maskTextClass:g,unmaskTextClass:y,maskTextSelector:b,unmaskTextSelector:E,ignoreCSSAttributes:v}=t,R=bM(e,r,o,s),I=uM(e);let S={};const O=e.attributes.length;for(let T=0;T<O;T++){const P=e.attributes[T];P.name&&!cy(I,P.name,P.value)&&(S[P.name]=ay(n,I,qr(P.name),P.value,e,c,v))}if(I==="link"&&i){const T=Array.from(n.styleSheets).find(N=>N.href===e.href);let P=null;T&&(P=Ai(T)),P&&(S.rel=null,S.href=null,S.crossorigin=null,S._cssText=Ni(P,T.href))}if(I==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const T=Ai(e.sheet);T&&(S._cssText=Ni(T,ba(n)))}if(I==="input"||I==="textarea"||I==="select"||I==="option"){const T=e,P=pl(T),N=Ci(T,qc(I),P),L=T.checked;if(P!=="submit"&&P!=="button"&&N){const B=Gr(T,g,b,y,E,Sa({type:P,tagName:qc(I),maskInputOptions:a}));
12S.value=Bo({isMasked:B,element:T,value:N,maskInputFn:u})}L&&(S.checked=L)}if(I==="option"&&(e.selected&&!a.select?S.selected=!0:delete S.selected),I==="canvas"&&d){if(e.__context==="2d")sM(e)||(S.rr_dataURL=e.toDataURL(f.type,f.quality));else if(!("__context"in e)){const T=e.toDataURL(f.type,f.quality),P=n.createElement("canvas");P.width=e.width,P.height=e.height;const N=P.toDataURL(f.type,f.quality);T!==N&&(S.rr_dataURL=T)}}if(I==="img"&&l){yr||(yr=n.createElement("canvas"),qd=yr.getContext("2d"));const T=e,P=T.currentSrc||T.getAttribute("src")||"<unknown-src>",N=T.crossOrigin,L=()=>{T.removeEventListener("load",L);try{yr.width=T.naturalWidth,yr.height=T.naturalHeight,qd.drawImage(T,0,0),S.rr_dataURL=yr.toDataURL(f.type,f.quality)}catch(B){if(T.crossOrigin!=="anonymous"){T.crossOrigin="anonymous",T.complete&&T.naturalWidth!==0?L():T.addEventListener("load",L);return}else console.warn("Cannot inline img src=".concat(P,"! Error: ").concat(B))}T.crossOrigin==="anonymous"&&(N?S.crossOrigin=N:T.removeAttribute("crossorigin"))};T.complete&&T.naturalWidth!==0?L():T.addEventListener("load",L)}if((I==="audio"||I==="video")&&(S.rr_mediaState=e.paused?"paused":"played",S.rr_mediaCurrentTime=e.currentTime),h||(e.scrollLeft&&(S.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(S.rr_scrollTop=e.scrollTop)),R){const{width:T,height:P}=e.getBoundingClientRect();S={class:S.class,rr_width:"".concat(T,"px"),rr_height:"".concat(P,"px")}}I==="iframe"&&!p(S.src)&&(!R&&!iy(e)&&(S.rr_src=S.src),delete S.src);let $;try{customElements.get(I)&&($=!0)}catch(T){}return{type:Ce.Element,tagName:I,attributes:S,childNodes:[],isSVG:SM(e)||void 0,needBlock:R,rootId:m,isCustom:$}}function Se(e){return e==null?"":e.toLowerCase()}function AM(e,t){if(t.comment&&e.type===Ce.Comment)return!0;if(e.type===Ce.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"&&ry(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(Se(e.attributes.name).match(/^msapplication-tile(image|color)$/)||Se(e.attributes.name)==="application-name"||Se(e.attributes.rel)==="icon"||Se(e.attributes.rel)==="apple-touch-icon"||Se(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&Se(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Se(e.attributes.property).match(/^(og|twitter|fb):/)||Se(e.attributes.name).match(/^(og|twitter):/)||Se(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(Se(e.attributes.name)==="robots"||Se(e.attributes.name)==="googlebot"||Se(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(Se(e.attributes.name)==="author"||Se(e.attributes.name)==="generator"||Se(e.attributes.name)==="framework"||Se(e.attributes.name)==="publisher"||Se(e.attributes.name)==="progid"||Se(e.attributes.property).match(/^article:/)||Se(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(Se(e.attributes.name)==="google-site-verification"||Se(e.attributes.name)==="yandex-verification"||Se(e.attributes.name)==="csrf-token"||Se(e.attributes.name)==="p:domain_verify"||Se(e.attributes.name)==="verify-v1"||Se(e.attributes.name)==="verification"||Se(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Rr(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:l,skipChild:d=!1,inlineStylesheet:p=!0,maskInputOptions:h={},maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:b,dataURLOptions:E={},inlineImages:v=!1,recordCanvas:R=!1,onSerialize:I,onIframeLoad:S,iframeLoadTimeout:O=5e3,onBlockedImageLoad:$,onStylesheetLoad:T,stylesheetLoadTimeout:P=5e3,keepIframeSrcFn:N=()=>!1,newlyAddedElement:L=!1,ignoreCSSAttributes:B}=t;let{preserveWhiteSpace:Q=!0}=t;const te=IM(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:l,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,dataURLOptions:E,inlineImages:v,recordCanvas:R,keepIframeSrcFn:N,newlyAddedElement:L,ignoreCSSAttributes:B});if(!te)return console.warn(e,"not serialized"),null;let F;r.hasNode(e)?F=r.getId(e):AM(te,b)||!Q&&te.type===Ce.Text&&!te.isStyle&&!te.textContent.trim().length?F=Uo:F=hl();const M=Object.assign(te,{id:F});if(r.add(e,M),F===Uo)return null;I&&I(e);let K=!d;if(M.type===Ce.Element){K=K&&!M.needBlock;const x=e.shadowRoot;x&&Ao(x)&&(M.isShadowHost=!0)}if((M.type===Ce.Document||M.type===Ce.Element)&&K){b.headWhitespace&&M.type===Ce.Element&&M.tagName==="head"&&(Q=!1);const x={doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:l,skipChild:d,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:b,dataURLOptions:E,inlineImages:v,recordCanvas:R,preserveWhiteSpace:Q,onSerialize:I,onIframeLoad:S,iframeLoadTimeout:O,onBlockedImageLoad:$,onStylesheetLoad:T,stylesheetLoadTimeout:P,keepIframeSrcFn:N,ignoreCSSAttributes:B},V=e.childNodes?Array.from(e.childNodes):[];for(const oe of V){const ce=Rr(oe,x);ce&&M.childNodes.push(ce)}if(XN(e)&&e.shadowRoot)for(const oe of Array.from(e.shadowRoot.childNodes)){const ce=Rr(oe,x);ce&&(Ao(e.shadowRoot)&&(ce.isShadow=!0),M.childNodes.push(ce))}}if(e.parentNode&&ko(e.parentNode)&&Ao(e.parentNode)&&(M.isShadow=!0),M.type===Ce.Element&&M.tagName==="iframe"&&!M.needBlock&&vM(e,()=>{const x=iy(e);if(x&&S){const V=Rr(x,{doc:x,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:b,dataURLOptions:E,inlineImages:v,recordCanvas:R,preserveWhiteSpace:Q,onSerialize:I,onIframeLoad:S,iframeLoadTimeout:O,onStylesheetLoad:T,stylesheetLoadTimeout:P,keepIframeSrcFn:N,ignoreCSSAttributes:B});V&&S(e,V)}},O),M.type===Ce.Element&&M.tagName==="img"&&!e.complete&&M.needBlock){const x=e,V=()=>
vendor: 4,876 bytes, line 12
12{if(x.isConnected&&!x.complete&&$)try{const oe=x.getBoundingClientRect();oe.width>0&&oe.height>0&&$(x,M,oe)}catch(oe){}x.removeEventListener("load",V)};x.isConnected&&x.addEventListener("load",V)}return M.type===Ce.Element&&M.tagName==="link"&&typeof M.attributes.rel=="string"&&(M.attributes.rel==="stylesheet"||M.attributes.rel==="preload"&&typeof M.attributes.href=="string"&&ry(M.attributes.href)==="css")&&TM(e,()=>{if(T){const x=Rr(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:b,dataURLOptions:E,inlineImages:v,recordCanvas:R,preserveWhiteSpace:Q,onSerialize:I,onIframeLoad:S,iframeLoadTimeout:O,onStylesheetLoad:T,stylesheetLoadTimeout:P,keepIframeSrcFn:N,ignoreCSSAttributes:B});x&&T(e,x)}},P),M.type===Ce.Element&&delete M.needBlock,M}function CM(e,t){const{mirror:n=new ny,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:s=null,maskAllText:i=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:f=null,inlineStylesheet:l=!0,inlineImages:d=!1,recordCanvas:p=!1,maskAllInputs:h=!1,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOM:b=!1,dataURLOptions:E,preserveWhiteSpace:v,onSerialize:R,onIframeLoad:I,iframeLoadTimeout:S,onBlockedImageLoad:O,onStylesheetLoad:$,stylesheetLoadTimeout:T,keepIframeSrcFn:P=()=>!1,ignoreCSSAttributes:N=new Set([])}=t||{};return Rr(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,maskAllText:i,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:f,skipChild:!1,inlineStylesheet:l,maskInputOptions:h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:h===!1?{}:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:b===!0||b==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:b==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:b===!1?{}:b,dataURLOptions:E,inlineImages:d,recordCanvas:p,preserveWhiteSpace:v,onSerialize:R,onIframeLoad:I,iframeLoadTimeout:S,onBlockedImageLoad:O,onStylesheetLoad:$,stylesheetLoadTimeout:T,keepIframeSrcFn:P,newlyAddedElement:!1,ignoreCSSAttributes:N})}function We(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Sr="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let Vd={map:{},getId(){return console.error(Sr),-1},getNode(){return console.error(Sr),null},removeNodeFromMap(){console.error(Sr)},has(){return console.error(Sr),!1},reset(){console.error(Sr)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Vd=new Proxy(Vd,{get(e,t,n){return t==="map"&&console.error(Sr),Reflect.get(e,t,n)}}));function Ho(e,t,n={}){let r=null,o=0;return function(...s){const i=Date.now();!o&&n.leading===!1&&(o=i);const a=t-(i-o),c=this;a<=0||a>t?(r&&(DM(r),r=null),o=i,e.apply(c,s)):!r&&n.trailing!==!1&&(r=Ea(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(c,s)},a))}}function uy(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(i){Ea(()=>{n.set.call(this,i)},0),s&&s.set&&s.set.call(this,i)}}),()=>uy(e,t,s||{},!0)}function ml(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch(r){return()=>{}}}let Mi=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Mi=()=>new Date().getTime());function ly(e){var n,r,o,s,i,a;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)||((o=t==null?void 0:t.body)==null?void 0:o.scrollLeft)||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(t==null?void 0:t.documentElement.scrollTop)||((i=(s=t==null?void 0:t.body)==null?void 0:s.parentElement)==null?void 0:i.scrollTop)||((a=t==null?void 0:t.body)==null?void 0:a.scrollTop)||0}}function fy(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function dy(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function py(e){if(!e)return null;
12try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch(t){return null}}function Xe(e,t,n,r,o){if(!e)return!1;const s=py(e);if(!s)return!1;const i=wr(t,n);if(!o){const u=r&&s.matches(r);return i(s)&&!u}const a=Un(s,i);let c=-1;return a<0?!1:(r&&(c=Un(s,wr(null,r))),a>-1&&c<0?!0:a<c)}function NM(e,t){return t.getId(e)!==-1}function rc(e,t){return t.getId(e)===Uo}function hy(e,t){if(ko(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?hy(e.parentNode,t):!0:!0}function Vc(e){return!!e.changedTouches}function MM(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 my(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function gy(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Yc(e){return!!(e!=null&&e.shadowRoot)}class xM{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){var n;return(n=this.styleIDMap.get(t))!=null?n:-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 _y(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 OM(e){let t=e,n;for(;n=_y(t);)t=n;return t}function PM(e){const t=e.ownerDocument;if(!t)return!1;const n=OM(e);return t.contains(n)}function yy(e){const t=e.ownerDocument;return t?t.contains(e)||PM(e):!1}const Yd={};function gl(e){const t=Yd[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);const s=o.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(o)}catch(o){}return Yd[e]=r.bind(window)}function LM(...e){return gl("requestAnimationFrame")(...e)}function Ea(...e){return gl("setTimeout")(...e)}function DM(...e){return gl("clearTimeout")(...e)}var X=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(X||{}),Y=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(Y||{}),Ue=(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))(Ue||{}),zt=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(zt||{}),br=(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))(br||{});let Co;function FM(e){Co=e}function $M(){Co=void 0}const re=e=>Co?(...n)=>{try{return e(...n)}catch(r){if(Co&&Co(r)===!0)return()=>{};throw r}}:e;var Jd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
12+/",BM=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Ls=0;Ls<Jd.length;Ls++)BM[Jd.charCodeAt(Ls)]=Ls;class Kd{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}function _l(e){try{return e.contentDocument}catch(t){}}function Wo(e){try{return e.contentWindow}catch(t){}}class UM{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 { ".concat(t," }"));const r=n.cssRules[0];return!r||r.type!==CSSRule.STYLE_RULE?null:r.style}catch(n){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(t){this.unattachedDoc=this.doc}return this.unattachedDoc}}function Xd(e){return"__ln"in e}class HM{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&&Xd(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&&Xd(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 Qd=(e,t)=>"".concat(e,"@").concat(t);class WM{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 HM,o=c=>{let u=c,f=Uo;for(;f===Uo;)u=u&&u.nextSibling,f=u&&this.mirror.getId(u);return f},s=c=>{if(!c.parentNode||!yy(c))return;const u=ko(c.parentNode)?this.mirror.getId(_y(c)):this.mirror.getId(c.parentNode),f=o(c);if(u===-1||f===-1)return r.addNode(c);const l=Rr(c,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:d=>{my(d,this.mirror)&&!Xe(d,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(d),gy(d,this.mirror)&&this.stylesheetManager.trackLinkElement(d),Yc(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(d,p)=>{if(Xe(d,this.blockClass,this.blockSelector,this.unblockSelector,!1))return;this.iframeManager.attachIframe(d,p);const h=Wo(d);h&&this.canvasManager.addWindow(h),this.shadowDomManager.observeAttachShadow(d)},onStylesheetLoad:(d,p)=>{this.stylesheetManager.attachLinkElement(d,p)},onBlockedImageLoad:(d,p,{width:h,height:m})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:p.id,attributes:{style:{width:"".concat(h,"px"),height:"".concat(m,"px")}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});l&&(t.push({parentId:u,nextId:f,node:l}),n.add(l.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const c of this.movedSet)Zd(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||s(c);for(const c of this.addedSet)!ep(this.droppedSet,c)&&!Zd(this.removes,c,this.mirror)||ep(this.movedSet,c)?s(c):this.droppedSet.add(c);let i=null;for(;r.length;){let c=null;if(i){const u=this.mirror.getId(i.value.parentNode),f=o(i.value);u!==-1&&f!==-1&&(c=i)}if(!c){let u=r.tail;for(;u;){const f=u;if(u=u.previous,f){const l=this.mirror.getId(f.value.parentNode);
12if(o(f.value)===-1)continue;if(l!==-1){c=f;break}else{const p=f.value;if(p.parentNode&&p.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const h=p.parentNode.host;if(this.mirror.getId(h)!==-1){c=f;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}i=c.previous,r.removeNode(c.value),s(c.value)}const a={texts:this.texts.map(c=>({id:this.mirror.getId(c.node),value:c.value})).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{const{attributes:u}=c;if(typeof u.style=="string"){const f=JSON.stringify(c.styleDiff),l=JSON.stringify(c._unchangedStyles);f.length<u.style.length&&(f+l).split("var(").length===u.style.split("var(").length&&(u.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:u}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!rc(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Xe(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:Gr(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,py(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,o=t.target.getAttribute(r);if(r==="value"){const i=pl(n),a=n.tagName;o=Ci(n,a,i);const c=Sa({maskInputOptions:this.maskInputOptions,tagName:a,type:i}),u=Gr(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c);o=Bo({isMasked:u,element:n,value:o,maskInputFn:this.maskInputFn})}if(Xe(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||o===t.oldValue)return;let s=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(o))if(!_l(n))r="rr_src";else return;if(s||(s={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(t.target,s)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!cy(n.tagName,r)&&(s.attributes[r]=ay(this.doc,qr(n.tagName),qr(r),o,n,this.maskAttributeFn),r==="style")){const i=t.oldValue?this.styleDeclarationParser.parse(t.oldValue):null;for(const a of Array.from(n.style)){const c=n.style.getPropertyValue(a),u=n.style.getPropertyPriority(a);c!==((i==null?void 0:i.getPropertyValue(a))||"")||u!==((i==null?void 0:i.getPropertyPriority(a))||"")?u===""?s.styleDiff[a]=c:s.styleDiff[a]=[c,u]:s._unchangedStyles[a]=[c,u]}if(i)for(const a of Array.from(i))n.style.getPropertyValue(a)===""&&(s.styleDiff[a]=!1)}break}case"childList":{if(Xe(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),o=ko(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Xe(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||rc(n,this.mirror)||!NM(n,this.mirror)||(this.addedSet.has(n)?(Jc(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||hy(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Qd(r,o)]?Jc(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:ko(t.target)&&Ao(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(rc(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[Qd(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Xe(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEac
12h(r=>this.genAdds(r)),Yc(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 UM(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 Jc(e,t){var n;e.delete(t),(n=t.childNodes)==null||n.forEach(r=>Jc(e,r))}
12function Zd(e,t,n){return e.length===0?!1:jM(e,t,n)}function jM(e,t,n){let r=t.parentNode;for(;r;){const o=n.getId(r);if(e.some(s=>s.id===o))return!0;r=r.parentNode}return!1}function ep(e,t){return e.size===0?!1:Sy(e,t)}function Sy(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:Sy(e,n):!1}const kr=[];function hs(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(t){}return e&&e.target}function by(e,t){var i,a;const n=new WM;kr.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const o=(a=(i=window==null?void 0:window.Zone)==null?void 0:i.__symbol__)==null?void 0:a.call(i,"MutationObserver");o&&window[o]&&(r=window[o]);const s=new r(re(c=>{e.onMutation&&e.onMutation(c)===!1||n.processMutations.bind(n)(c)}));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function zM({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const o=typeof t.mousemove=="number"?t.mousemove:50,s=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let i=[],a;const c=Ho(re(l=>{const d=Date.now()-a;e(i.map(p=>(p.timeOffset-=d,p)),l),i=[],a=null}),s),u=re(Ho(re(l=>{const d=hs(l),{clientX:p,clientY:h}=Vc(l)?l.changedTouches[0]:l;a||(a=Mi()),i.push({x:p,y:h,id:r.getId(d),timeOffset:Mi()-a}),c(typeof DragEvent<"u"&&l instanceof DragEvent?Y.Drag:l instanceof MouseEvent?Y.MouseMove:Y.TouchMove)}),o,{trailing:!1})),f=[We("mousemove",u,n),We("touchmove",u,n),We("drag",u,n)];return re(()=>{f.forEach(l=>l())})}function qM({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){if(i.mouseInteraction===!1)return()=>{};const a=i.mouseInteraction===!0||i.mouseInteraction===void 0?{}:i.mouseInteraction,c=[];let u=null;const f=l=>d=>{const p=hs(d);if(Xe(p,r,o,s,!0))return;let h=null,m=l;if("pointerType"in d){switch(d.pointerType){case"mouse":h=zt.Mouse;break;case"touch":h=zt.Touch;break;case"pen":h=zt.Pen;break}h===zt.Touch?Ue[l]===Ue.MouseDown?m="TouchStart":Ue[l]===Ue.MouseUp&&(m="TouchEnd"):zt.Pen}else Vc(d)&&(h=zt.Touch);h!==null?(u=h,(m.startsWith("Touch")&&h===zt.Touch||m.startsWith("Mouse")&&h===zt.Mouse)&&(h=null)):Ue[l]===Ue.Click&&(h=u,u=null);const g=Vc(d)?d.changedTouches[0]:d;if(!g)return;const y=n.getId(p),{clientX:b,clientY:E}=g;re(e)({type:Ue[m],id:y,x:b,y:E,...h!==null&&{pointerType:h}})};return Object.keys(Ue).filter(l=>Number.isNaN(Number(l))&&!l.endsWith("_Departed")&&a[l]!==!1).forEach(l=>{let d=qr(l);const p=f(l);if(window.PointerEvent)switch(Ue[l]){case Ue.MouseDown:case Ue.MouseUp:d=d.replace("mouse","pointer");break;case Ue.TouchStart:case Ue.TouchEnd:return}c.push(We(d,p,t))}),re(()=>{c.forEach(l=>l())})}function Ey({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){const a=re(Ho(re(c=>{const u=hs(c);if(!u||Xe(u,r,o,s,!0))return;const f=n.getId(u);if(u===t&&t.defaultView){const l=ly(t.defaultView);e({id:f,x:l.left,y:l.top})}else e({id:f,x:u.scrollLeft,y:u.scrollTop})}),i.scroll||100));return We("scroll",a,t)}function GM({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const o=re(Ho(re(()=>{const s=fy(),i=dy();(n!==s||r!==i)&&(e({width:Number(i),height:Number(s)}),n=s,r=i)}),200));return We("resize",o,t)}const VM=["INPUT","TEXTAREA","SELECT"],tp=new WeakMap;function YM({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,ignoreClass:i,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:f,userTriggeredOnInput:l,maskTextClass:d,unmaskTextClass:p,maskTextSelector:h,unmaskTextSelector:m}){function g(S){let O=hs(S);const $=S.isTrusted,T=O&&qc(O.tagName);if(T==="OPTION"&&(O=O.parentElement),!O||!T||VM.indexOf(T)<0||Xe(O,r,o,s,!0))return;const P=O;if(P.classList.contains(i)||a&&P.matches(a))return;const N=pl(O);let L=Ci(P,T,N),B=!1;const Q=Sa({maskInputOptions:c,tagName:T,type:N}),te=Gr(O,d,h,p,m,Q);(N==="radio"||N==="checkbox")&&(B=O.checked),L=Bo({isMasked:te,element:O,value:L,maskInputFn:u}),y(O,l?{text:L,isChecked:B,userTriggered:$}:{text:L,isChecked:B});
vendor: 4,519 bytes, line 12
12const F=O.name;N==="radio"&&F&&B&&t.querySelectorAll('input[type="radio"][name="'.concat(F,'"]')).forEach(M=>{if(M!==O){const K=Bo({isMasked:te,element:M,value:Ci(M,T,N),maskInputFn:u});y(M,l?{text:K,isChecked:!B,userTriggered:!1}:{text:K,isChecked:!B})}})}function y(S,O){const $=tp.get(S);if(!$||$.text!==O.text||$.isChecked!==O.isChecked){tp.set(S,O);const T=n.getId(S);re(e)({...O,id:T})}}const E=(f.input==="last"?["change"]:["input","change"]).map(S=>We(S,re(g),t)),v=t.defaultView;if(!v)return()=>{E.forEach(S=>S())};const R=v.Object.getOwnPropertyDescriptor(v.HTMLInputElement.prototype,"value"),I=[[v.HTMLInputElement.prototype,"value"],[v.HTMLInputElement.prototype,"checked"],[v.HTMLSelectElement.prototype,"value"],[v.HTMLTextAreaElement.prototype,"value"],[v.HTMLSelectElement.prototype,"selectedIndex"],[v.HTMLOptionElement.prototype,"selected"]];return R&&R.set&&E.push(...I.map(S=>uy(S[0],S[1],{set(){re(g)({target:this,isTrusted:!1})}},!1,v))),re(()=>{E.forEach(S=>S())})}function xi(e){const t=[];function n(r,o){if(Ds("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Ds("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Ds("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Ds("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const i=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(i)}else if(r.parentStyleSheet){const i=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(i)}return o}return n(e,t)}function an(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function JM({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:re((f,l,d)=>{const[p,h]=d,{id:m,styleId:g}=an(l,t,n.styleMirror);return(m&&m!==-1||g&&g!==-1)&&e({id:m,styleId:g,adds:[{rule:p,index:h}]}),f.apply(l,d)})});const s=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:re((f,l,d)=>{const[p]=d,{id:h,styleId:m}=an(l,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,removes:[{index:p}]}),f.apply(l,d)})});let i;r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:re((f,l,d)=>{const[p]=d,{id:h,styleId:m}=an(l,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,replace:p}),f.apply(l,d)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:re((f,l,d)=>{const[p]=d,{id:h,styleId:m}=an(l,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,replaceSync:p}),f.apply(l,d)})}));const c={};Fs("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Fs("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Fs("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Fs("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(c).forEach(([f,l])=>{u[f]={insertRule:l.prototype.insertRule,deleteRule:l.prototype.deleteRule},l.prototype.insertRule=new Proxy(u[f].insertRule,{apply:re((d,p,h)=>{const[m,g]=h,{id:y,styleId:b}=an(p.parentStyleSheet,t,n.styleMirror);return(y&&y!==-1||b&&b!==-1)&&e({id:y,styleId:b,adds:[{rule:m,index:[...xi(p),g||0]}]}),d.apply(p,h)})}),l.prototype.deleteRule=new Proxy(u[f].deleteRule,{apply:re((d,p,h)=>{const[m]=h,{id:g,styleId:y}=an(p.parentStyleSheet,t,n.styleMirror);return(g&&g!==-1||y&&y!==-1)&&e({id:g,styleId:y,removes:[{index:[...xi(p),m]}]}),d.apply(p,h)})})}),re(()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=s,i&&(r.CSSStyleSheet.prototype.replace=i),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([f,l])=>{l.prototype.insertRule=u[f].insertRule,l.prototype.deleteRule=u[f].deleteRule})})}function vy({mirror:e,stylesheetManager:t},n){var i,a,c;let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const o=n.nodeName==="#document"?(i=n.defaultView)==null?void 0:i.Document:(c=(a=n.ownerDocument)==null?void 0:a.defaultView)==null?void 0:c.ShadowRoot,s=o!=null&&o.prototype?Object.getOwnPropertyDescriptor(o==null?void 0:o.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!o||!s?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){var u;return(u=s.get)==null?void 0:u.call(this)},set(u){var l;
vendor: 4,722 bytes, line 12
12const f=(l=s.set)==null?void 0:l.call(this,u);if(r!==null&&r!==-1)try{t.adoptStyleSheets(u,r)}catch(d){}return f}}),re(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})}))}function KM({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const s=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:re((a,c,u)=>{var m;const[f,l,d]=u;if(n.has(f))return s.apply(c,[f,l,d]);const{id:p,styleId:h}=an((m=c.parentRule)==null?void 0:m.parentStyleSheet,t,r.styleMirror);return(p&&p!==-1||h&&h!==-1)&&e({id:p,styleId:h,set:{property:f,value:l,priority:d},index:xi(c.parentRule)}),a.apply(c,u)})});const i=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:re((a,c,u)=>{var p;const[f]=u;if(n.has(f))return i.apply(c,[f]);const{id:l,styleId:d}=an((p=c.parentRule)==null?void 0:p.parentStyleSheet,t,r.styleMirror);return(l&&l!==-1||d&&d!==-1)&&e({id:l,styleId:d,remove:{property:f},index:xi(c.parentRule)}),a.apply(c,u)})}),re(()=>{o.CSSStyleDeclaration.prototype.setProperty=s,o.CSSStyleDeclaration.prototype.removeProperty=i})}function XM({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:o,sampling:s,doc:i}){const a=re(u=>Ho(re(f=>{const l=hs(f);if(!l||Xe(l,t,n,r,!0))return;const{currentTime:d,volume:p,muted:h,playbackRate:m}=l;e({type:u,id:o.getId(l),currentTime:d,volume:p,muted:h,playbackRate:m})}),s.media||500)),c=[We("play",a(br.Play),i),We("pause",a(br.Pause),i),We("seeked",a(br.Seeked),i),We("volumechange",a(br.VolumeChange),i),We("ratechange",a(br.RateChange),i)];return re(()=>{c.forEach(u=>u())})}function QM({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,s=n.FontFace;n.FontFace=function(c,u,f){const l=new s(c,u,f);return o.set(l,{family:c,buffer:typeof u!="string",descriptors:f,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),l};const i=ml(t.fonts,"add",function(a){return function(c){return Ea(re(()=>{const u=o.get(c);u&&(e(u),o.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=s}),r.push(i),re(()=>{r.forEach(a=>a())})}function ZM(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,selectionCb:i}=e;let a=!0;const c=re(()=>{const u=t.getSelection();if(!u||a&&(u!=null&&u.isCollapsed))return;a=u.isCollapsed||!1;const f=[],l=u.rangeCount||0;for(let d=0;d<l;d++){const p=u.getRangeAt(d),{startContainer:h,startOffset:m,endContainer:g,endOffset:y}=p;Xe(h,r,o,s,!0)||Xe(g,r,o,s,!0)||f.push({start:n.getId(h),startOffset:m,end:n.getId(g),endOffset:y})}i({ranges:f})});return c(),We("selectionchange",c)}function ex({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:ml(n.customElements,"define",function(o){return function(s,i,a){try{t({define:{name:s}})}catch(c){}return o.apply(this,[s,i,a])}})}function tx(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=by(e,e.doc));const o=zM(e),s=qM(e),i=Ey(e),a=GM(e,{win:n}),c=YM(e),u=XM(e);let f=()=>{},l=()=>{},d=()=>{},p=()=>{};e.recordDOM&&(f=JM(e,{win:n}),l=vy(e,e.doc),d=KM(e,{win:n}),e.collectFonts&&(p=QM(e)));const h=ZM(e),m=ex(e),g=[];for(const y of e.plugins)g.push(y.observer(y.callback,n,y.options));return re(()=>{kr.forEach(y=>y.reset()),r==null||r.disconnect(),o(),s(),i(),a(),c(),u(),f(),l(),d(),p(),h(),m(),g.forEach(y=>y())})}function Ds(e){return typeof window[e]<"u"}function Fs(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Kc{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,o){const s=r||this.getIdToRemoteIdMap(t),i=o||this.getRemoteIdToIdMap(t);let a=s.get(n);return a||(a=this.generateIdFn(),s.set(n,a),i.set(a,n)),a}getIds(t,n){const r=this.getIdToRemoteIdMap(t),o=this.getRemoteIdToIdMap(t);return n.map(s=>this.getId(t,s,r,o))}getRemoteId(t,n,r){const o=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const s=o.get(n);return s||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(o=>this.getRemoteId(t,o,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}
vendor: 5,316 bytes, line 12
12class nx{constructor(){this.crossOriginIframeMirror=new Kc(hl),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class rx{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Kc(hl),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Kc(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=Wo(t);n&&this.crossOriginIframeMap.set(n,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){var o,s;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((o=Wo(t))==null||o.addEventListener("message",this.handleMessage.bind(this))),(s=this.loadListener)==null||s.call(this,t);const r=_l(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 o=this.crossOriginIframeMap.get(t.source);if(!o)return;const s=this.transformCrossOriginEvent(o,n.data.event);s&&this.wrappedEmit(s,n.data.isCheckout)}transformCrossOriginEvent(t,n){var r;switch(n.type){case X.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const o=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,o),this.patchRootIdOnNode(n.data.node,o),{timestamp:n.timestamp,type:X.IncrementalSnapshot,data:{source:Y.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case X.Meta:case X.Load:case X.DomContentLoaded:return!1;case X.Plugin:return n;case X.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case X.IncrementalSnapshot:switch(n.data.source){case Y.Mutation:return n.data.adds.forEach(o=>{this.replaceIds(o,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(o.node,t);const s=this.crossOriginIframeRootIdMap.get(t);s&&this.patchRootIdOnNode(o.node,s)}),n.data.removes.forEach(o=>{this.replaceIds(o,t,["parentId","id"])}),n.data.attributes.forEach(o=>{this.replaceIds(o,t,["id"])}),n.data.texts.forEach(o=>{this.replaceIds(o,t,["id"])}),n;case Y.Drag:case Y.TouchMove:case Y.MouseMove:return n.data.positions.forEach(o=>{this.replaceIds(o,t,["id"])}),n;case Y.ViewportResize:return!1;case Y.MediaInteraction:case Y.MouseInteraction:case Y.Scroll:case Y.CanvasMutation:case Y.Input:return this.replaceIds(n.data,t,["id"]),n;case Y.StyleSheetRule:case Y.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case Y.Font:return n;case Y.Selection:return n.data.ranges.forEach(o=>{this.replaceIds(o,t,["start","end"])}),n;case Y.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),(r=n.data.styles)==null||r.forEach(o=>{this.replaceStyleIds(o,t,["styleId"])}),n}}return!1}replace(t,n,r,o){for(const s of o)!Array.isArray(n[s])&&typeof n[s]!="number"||(Array.isArray(n[s])?n[s]=t.getIds(r,n[s]):n[s]=t.getId(r,n[s]));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!==Ce.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class ox{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class sx{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(!Ao(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=by({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Ey({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),Ea(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(vy({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=_l(t),r=Wo(t);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(ml(t.prototype,"attachShadow",function(o){return function(s){const i=o.call(this,s);return this.shadowRoot&&yy(this)&&r.addShadowRoot(this.shadowRoot,n),i}}))}
12reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(n){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class ix{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new xM,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:[]},o=[];for(const s of t){let i;this.styleMirror.has(s)?i=this.styleMirror.getId(s):(i=this.styleMirror.add(s),o.push({styleId:i,rules:Array.from(s.rules||CSSRule,(a,c)=>({rule:ty(a),index:c}))})),r.styleIds.push(i)}o.length>0&&(r.styles=o),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class ax{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(o=>o!==n)}add(t,n){this.active||(this.active=!0,LM(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let Re,Oi;var Kp;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((Kp=e.contentWindow)==null?void 0:Kp.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const mt=oM();function bt(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:s=null,unblockSelector:i=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:f="rr-mask",unmaskTextClass:l=null,maskTextSelector:d=null,unmaskTextSelector:p=null,inlineStylesheet:h=!0,maskAllInputs:m,maskInputOptions:g,slimDOMOptions:y,maskAttributeFn:b,maskInputFn:E,maskTextFn:v,maxCanvasSize:R=null,packFn:I,sampling:S={},dataURLOptions:O={},mousemoveWait:$,recordDOM:T=!0,recordCanvas:P=!1,recordCrossOriginIframes:N=!1,recordAfter:L=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:B=!1,collectFonts:Q=!1,inlineImages:te=!1,plugins:F,keepIframeSrcFn:M=()=>!1,ignoreCSSAttributes:K=new Set([]),errorHandler:x,onMutation:V,getCanvasManager:oe}=e;FM(x);const ce=N?window.parent===window:!0;let ye=!1;if(!ce)try{window.parent.document&&(ye=!1)}catch(D){ye=!0}if(ce&&!t)throw new Error("emit function is required");if(!ce&&!ye)return()=>{};$!==void 0&&S.mousemove===void 0&&(S.mousemove=$),mt.reset();const $e=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,radio:!0,checkbox:!0}:g!==void 0?g:{},dt=y===!0||y==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:y==="all",headMetaDescKeywords:y==="all"}:y||{};MM();let Bt,pt=0;const Mn=D=>{for(const se of F||[])se.eventProcessor&&(D=se.eventProcessor(D));return I&&!ye&&(D=I(D)),D};Re=(D,se)=>{var fe;const J=D;if(J.timestamp=Mi(),(fe=kr[0])!=null&&fe.isFrozen()&&J.type!==X.FullSnapshot&&!(J.type===X.IncrementalSnapshot&&J.data.source===Y.Mutation)&&kr.forEach(le=>le.unfreeze()),ce)t==null||t(Mn(J),se);else if(ye){const le={type:"rrweb",event:Mn(J),origin:window.location.origin,isCheckout:se};window.parent.postMessage(le,"*")}if(J.type===X.FullSnapshot)Bt=J,pt=0;else if(J.type===X.IncrementalSnapshot){if(J.data.source===Y.Mutation&&J.data.isAttachIframe)return;pt++;const le=r&&pt>=r,ne=n&&Bt&&J.timestamp-Bt.timestamp>n;(le||ne)&&On(!0)}};const Ut=D=>{Re({type:X.IncrementalSnapshot,data:{source:Y.Mutation,...D}})},bs=D=>Re({type:X.IncrementalSnapshot,data:{source:Y.Scroll,...D}}),Ht=D=>Re({type:X.IncrementalSnapshot,data:{source:Y.CanvasMutation,...D}}),tt=D=>Re({type:X.IncrementalSnapshot,data:{source:Y.AdoptedStyleSheet,...D}}),je=new ix({mutationCb:Ut,adoptedStyleSheetCb:tt}),Je=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new nx:new rx({mirror:mt,mutationCb:Ut,stylesheetManager:je,recordCrossOriginIframes:N,wrappedEmit:Re});for(const D of F||[])D.getMirror&&D.getMirror({nodeMirror:mt,crossOriginIframeMirror:Je.crossOriginIframeMirror,crossOriginIframeStyleMirror:Je.crossOriginIframeStyleMirror});const dr=new ax,pr=ux(oe,{mirror:mt,win:window,mutationCb:D=>Re({type:X.IncrementalSnapshot,data:{source:Y.CanvasMutation,...D}}),recordCanvas:P,blockClass:o,blockSelector:s,unblockSelector:i,maxCanvasSize:R,sampling:S.canvas,dataURLOptions:O,errorHandler:x}),xn=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new ox:new sx({mutationCb:Ut,scrollCb:bs,bypassOptions:{onMutation:V,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:u,maskTextClass:f,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:$e,dataURLOptions:O,maskAttributeFn:b,maskTextFn:v,maskInputFn:E,recordCanvas:P,inlineImages:te,sampling:S,slimDOMOptions:dt,iframeManager:Je,stylesheetManager:je,canvasManager:pr,keepIframeSrcFn:M,processedNodeManager:dr,ignoreCSSAttributes:K},mirror:mt}),On=(D=!1)=>
12{if(!T)return;Re({type:X.Meta,data:{href:window.location.href,width:dy(),height:fy()}},D),je.reset(),xn.init(),kr.forEach(J=>J.lock());const se=CM(document,{mirror:mt,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:u,maskTextClass:f,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:h,maskAllInputs:$e,maskAttributeFn:b,maskInputFn:E,maskTextFn:v,slimDOM:dt,dataURLOptions:O,recordCanvas:P,inlineImages:te,onSerialize:J=>{my(J,mt)&&Je.addIframe(J),gy(J,mt)&&je.trackLinkElement(J),Yc(J)&&xn.addShadowRoot(J.shadowRoot,document)},onIframeLoad:(J,fe)=>{Je.attachIframe(J,fe);const le=Wo(J);le&&pr.addWindow(le),xn.observeAttachShadow(J)},onStylesheetLoad:(J,fe)=>{je.attachLinkElement(J,fe)},onBlockedImageLoad:(J,fe,{width:le,height:ne})=>{Ut({adds:[],removes:[],texts:[],attributes:[{id:fe.id,attributes:{style:{width:"".concat(le,"px"),height:"".concat(ne,"px")}}}]})},keepIframeSrcFn:M,ignoreCSSAttributes:K});if(!se)return console.warn("Failed to snapshot the document");Re({type:X.FullSnapshot,data:{node:se,initialOffset:ly(window)}}),kr.forEach(J=>J.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&je.adoptStyleSheets(document.adoptedStyleSheets,mt.getId(document))};Oi=On;try{const D=[],se=fe=>{var le;return re(tx)({onMutation:V,mutationCb:Ut,mousemoveCb:(ne,Be)=>Re({type:X.IncrementalSnapshot,data:{source:Be,positions:ne}}),mouseInteractionCb:ne=>Re({type:X.IncrementalSnapshot,data:{source:Y.MouseInteraction,...ne}}),scrollCb:bs,viewportResizeCb:ne=>Re({type:X.IncrementalSnapshot,data:{source:Y.ViewportResize,...ne}}),inputCb:ne=>Re({type:X.IncrementalSnapshot,data:{source:Y.Input,...ne}}),mediaInteractionCb:ne=>Re({type:X.IncrementalSnapshot,data:{source:Y.MediaInteraction,...ne}}),styleSheetRuleCb:ne=>Re({type:X.IncrementalSnapshot,data:{source:Y.StyleSheetRule,...ne}}),styleDeclarationCb:ne=>Re({type:X.IncrementalSnapshot,data:{source:Y.StyleDeclaration,...ne}}),canvasMutationCb:Ht,fontCb:ne=>Re({type:X.IncrementalSnapshot,data:{source:Y.Font,...ne}}),selectionCb:ne=>{Re({type:X.IncrementalSnapshot,data:{source:Y.Selection,...ne}})},customElementCb:ne=>{Re({type:X.IncrementalSnapshot,data:{source:Y.CustomElement,...ne}})},blockClass:o,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:f,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p,maskInputOptions:$e,inlineStylesheet:h,sampling:S,recordDOM:T,recordCanvas:P,inlineImages:te,userTriggeredOnInput:B,collectFonts:Q,doc:fe,maskAttributeFn:b,maskInputFn:E,maskTextFn:v,keepIframeSrcFn:M,blockSelector:s,unblockSelector:i,slimDOMOptions:dt,dataURLOptions:O,mirror:mt,iframeManager:Je,stylesheetManager:je,shadowDomManager:xn,processedNodeManager:dr,canvasManager:pr,ignoreCSSAttributes:K,plugins:((le=F==null?void 0:F.filter(ne=>ne.observer))==null?void 0:le.map(ne=>({observer:ne.observer,options:ne.options,callback:Be=>Re({type:X.Plugin,data:{plugin:ne.name,payload:Be}})})))||[]},{})};Je.addLoadListener(fe=>{try{D.push(se(fe.contentDocument))}catch(le){console.warn(le)}});const J=()=>{On(),D.push(se(document))};return document.readyState==="interactive"||document.readyState==="complete"?J():(D.push(We("DOMContentLoaded",()=>{Re({type:X.DomContentLoaded,data:{}}),L==="DOMContentLoaded"&&J()})),D.push(We("load",()=>{Re({type:X.Load,data:{}}),L==="load"&&J()},window))),()=>{D.forEach(fe=>fe()),dr.destroy(),Oi=void 0,$M()}}catch(D){console.warn(D)}}function cx(e){if(!Oi)throw new Error("please take full snapshot after start recording");Oi(e)}bt.mirror=mt;bt.takeFullSnapshot=cx;function ux(e,t){try{return e?e(t):new Kd}catch(n){return console.warn("Unable to initialize CanvasManager"),new Kd}}var np;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(np||(np={}));const lx=3,fx=5;function yl(e){return e>9999999999?e:e*1e3}function oc(e){return e>9999999999?e/1e3:e}function ms(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>
12(e.throttledAddEvent({type:X.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Ne(t,10,1e3)}}),t.category==="console")))}const dx="button,a";function Ty(e){return e.closest(dx)||e}function Iy(e){const t=wy(e);return!t||!(t instanceof Element)?t:Ty(t)}function wy(e){return px(e)?e.target:e}function px(e){return at(e)&&"target"in e}let cn;function hx(e){return cn||(cn=[],mx()),cn.push(e),()=>{const t=cn?cn.indexOf(e):-1;t>-1&&cn.splice(t,1)}}function mx(){De(be,"open",function(e){return function(...t){if(cn)try{cn.forEach(n=>n())}catch(n){}return e.apply(be,t)}})}const gx=new Set([Y.Mutation,Y.StyleSheetRule,Y.StyleDeclaration,Y.AdoptedStyleSheet,Y.CanvasMutation,Y.Selection,Y.MediaInteraction]);function _x(e,t,n){e.handleClick(t,n)}class yx{constructor(t,n,r=ms){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=hx(()=>{this._lastMutation=rp()});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(bx(n,this._ignoreSelector)||!Ex(t))return;const r={timestamp:oc(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(o=>o.node===r.node&&Math.abs(o.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=oc(t)}registerScroll(t=Date.now()){this._lastScroll=oc(t)}registerClick(t){const n=Ty(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=rp();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 o=this._clicks.indexOf(r);o>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(o,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,o=t.mutationAfter&&t.mutationAfter<=this._threshold,s=!r&&!o,{clickCount:i,clickBreadcrumb:a}=t;if(s){const c=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=c<this._timeout*1e3?"mutation":"timeout",f={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:be.location.href,route:n.getCurrentRoute(),timeAfterClickMs:c,endReason:u,clickCount:i||1}};this._addBreadcrumbEvent(n,f);return}if(i>1){const c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:be.location.href,route:n.getCurrentRoute(),clickCount:i,metric:!0}};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=ps(()=>this._checkClicks(),1e3)}}const Sx=["A","BUTTON","INPUT"];function bx(e,t){return!!(!Sx.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 Ex(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function rp(){return Date.now()/1e3}function vx(e,t){try{if(!Tx(t))return;const{source:n}=t.data;if(gx.has(n)&&e.registerMutation(t.timestamp),n===Y.Scroll&&e.registerScroll(t.timestamp),Ix(t)){const{type:r,id:o}=t.data,s=bt.mirror.getNode(o);s instanceof HTMLElement&&r===Ue.Click&&e.registerClick(s)}}catch(n){}}function Tx(e){return e.type===lx}function Ix(e){return e.data.source===Y.MouseInteraction}function Rt(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var va=(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))(va||{});const wx=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function Rx(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(wx.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const kx=e=>t=>{if(!e.isEnabled())return;const n=Ax(t);if(!n)return;const r=t.name==="click",o=r?t.event:void 0;r&&e.clickDetector&&(o!=null&&o.target)&&!o.altKey&&!o.metaKey&&!o.ctrlKey&&!o.shift
12Key&&_x(e.clickDetector,n,Iy(t.event)),ms(e,n)};function Ry(e,t){const n=bt.mirror.getId(e),r=n&&bt.mirror.getNode(n),o=r&&bt.mirror.getMeta(r),s=o&&Nx(o)?o:null;return{message:t,data:s?{nodeId:n,node:{id:n,tagName:s.tagName,textContent:Array.from(s.childNodes).map(i=>i.type===va.Text&&i.textContent).filter(Boolean).map(i=>i.trim()).join(""),attributes:Rx(s.attributes)}}:{}}}function Ax(e){const{target:t,message:n}=Cx(e);return Rt({category:"ui.".concat(e.name),...Ry(t,n)})}function Cx(e){const t=e.name==="click";let n,r=null;try{r=t?Iy(e.event):wy(e.event),n=Oe(r,{maxStringLength:200})||"<unknown>"}catch(o){n="<unknown>"}return{target:r,message:n}}function Nx(e){return e.type===va.Element}function Mx(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=xx(t);n&&ms(e,n)}function xx(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s,target:i}=e;if(!i||Ox(i)||!s)return null;const a=t||r||o,c=s.length===1;if(!a&&c)return null;const u=Oe(i,{maxStringLength:200})||"<unknown>",f=Ry(i,u);return Rt({category:"ui.keyDown",message:u,data:{...f.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s}})}function Ox(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const Px={resource:Bx,paint:Fx,navigation:$x};function sc(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function Lx(e){return e.map(Dx).filter(Boolean)}function Dx(e){const t=Px[e.entryType];return t?t(e):null}function Vr(e){return((Ae()||be.performance.timeOrigin)+e)/1e3}function Fx(e){const{duration:t,entryType:n,name:r,startTime:o}=e,s=Vr(o);return{type:n,name:r,start:s,end:s+t,data:void 0}}function $x(e){const{entryType:t,name:n,decodedBodySize:r,duration:o,domComplete:s,encodedBodySize:i,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:f,loadEventEnd:l,redirectCount:d,startTime:p,transferSize:h,type:m}=e;return o===0?null:{type:"".concat(t,".").concat(m),start:Vr(p),end:Vr(s),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:i,duration:o,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:f,loadEventEnd:l,domComplete:s,redirectCount:d}}}function Bx(e){const{entryType:t,initiatorType:n,name:r,responseEnd:o,startTime:s,decodedBodySize:i,encodedBodySize:a,responseStatus:c,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:"".concat(t,".").concat(n),start:Vr(s),end:Vr(o),name:r,data:{size:u,statusCode:c,decodedBodySize:i,encodedBodySize:a}}}function Ux(e){const t=e.entries[e.entries.length-1],n=t!=null&&t.element?[t.element]:void 0;return Sl(e,"largest-contentful-paint",n)}function Hx(e){return e.sources!==void 0}function Wx(e){const t=[],n=[];for(const r of e.entries)if(Hx(r)){const o=[];for(const s of r.sources)if(s.node){n.push(s.node);const i=bt.mirror.getId(s.node);i&&o.push(i)}t.push({value:r.value,nodeIds:o.length?o:void 0})}return Sl(e,"cumulative-layout-shift",n,t)}function jx(e){const t=e.entries[e.entries.length-1],n=t!=null&&t.target?[t.target]:void 0;return Sl(e,"interaction-to-next-paint",n)}function Sl(e,t,n,r){const o=e.value,s=e.rating,i=Vr(o);return{type:"web-vital",name:t,start:i,end:i,data:{value:o,size:o,rating:s,nodeIds:n?n.map(a=>bt.mirror.getId(a)):void 0,attributions:r}}}function zx(e){function t(o){e.performanceEntries.includes(o)||e.performanceEntries.push(o)}function n({entries:o}){o.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(o=>{r.push(En(o,n))}),r.push(da(sc(Ux,e)),fa(sc(Wx,e)),nl(sc(jx,e))),()=>{r.forEach(o=>o())}}const j=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,qx='
vendor: 10,329 bytes, line 12
12var 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});
12';function Gx(){const e=new Blob([qx],{type:"text/javascript"});return URL.createObjectURL(e)}const op=["log","warn","error"],ri="[Replay] ";function ic(e,t="info"){vt({category:"console",data:{logger:"replay"},level:t,message:"".concat(ri).concat(e)},{level:t})}function Vx(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return j?(op.forEach(r=>{n[r]=(...o)=>{_[r](ri,...o),t&&ic(o.join(""),yi(r))}}),n.exception=(r,...o)=>{o.length&&n.error&&n.error(...o),_.error(ri,r),e?ge(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&ic(r,"error")},n.infoTick=(...r)=>{_.log(ri,...r),t&&setTimeout(()=>ic(r[0]),0)}):op.forEach(r=>{n[r]=()=>{}}),n}const z=Vx();class bl extends Error{constructor(){super("Event buffer exceeded maximum size of ".concat(dl,"."))}}class ky{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>dl)throw new bl;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:yl(t)}}class Yx{constructor(t){this._onMessage=({data:n})=>{const r=n;if(typeof r.id!="number")return;const o=this._pending.get(r.id);if(!(!o||o.method!==r.method)){if(this._pending.delete(r.id),!r.success){j&&z.error("Error in compression worker: ",r.response),o.reject(new Error("Error in compression worker"));return}o.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():(j&&z.warn("Received worker message with unsuccessful status",r),n(new Error("Received worker message with unsuccessful status")))},{once:!0}),this._worker.addEventListener("error",r=>{j&&z.warn("Failed to load Replay compression worker",r),n(new Error("Failed to load Replay compression worker: ".concat(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(){j&&z.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((o,s)=>{this._pending.set(r,{method:t,resolve:o,reject:s});try{this._worker.postMessage({id:r,method:t,arg:n})}catch(i){this._pending.delete(r),s(i)}})}_getAndIncrementId(){return this._id++}}class Jx{constructor(t){this._worker=new Yx(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=yl(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>dl?Promise.reject(new bl):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{j&&z.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 Kx{constructor(t){this._fallback=new ky,this._compression=new Jx(t),this._used=this._fallback,this._ensureWorkerIsLoadedProm
12ise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}set waitForCheckout(t){this._used.waitForCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){j&&z.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,o=[];for(const s of t)o.push(this._compression.addEvent(s));this._compression.hasCheckout=n,this._compression.waitForCheckout=r,this._used=this._compression;try{await Promise.all(o),this._fallback.clear()}catch(s){j&&z.exception(s,"Failed to add events when switching buffers.")}}}function Xx({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=Qx(t);if(n)return n}return j&&z.log("Using simple buffer"),new ky}function Qx(e){try{const t=e||Zx();if(!t)return;j&&z.log("Using compression worker".concat(e?" from ".concat(e):""));const n=new Worker(t);return new Kx(n)}catch(t){j&&z.exception(t,"Failed to create compression worker")}}function Zx(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?Gx():""}function El(){try{return"sessionStorage"in be&&!!be.sessionStorage}catch(e){return!1}}function eO(e){tO(),e.session=void 0}function tO(){if(El())try{be.sessionStorage.removeItem(ll)}catch(e){}}function Ay(e){return e===void 0?!1:Math.random()<e}function Ta(e){if(El())try{be.sessionStorage.setItem(ll,JSON.stringify(e))}catch(t){}}function Cy(e){const t=Date.now(),n=e.id||Me(),r=e.started||t,o=e.lastActivity||t,s=e.segmentId||0,i=e.sampled,a=e.previousSessionId,c=e.dirty||!1;return{id:n,started:r,lastActivity:o,segmentId:s,sampled:i,previousSessionId:a,dirty:c}}function nO(e,t){return Ay(e)?"session":t?"buffer":!1}function sp({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const o=nO(e,t),s=Cy({sampled:o,previousSessionId:r});return n&&Ta(s),s}function rO(){if(!El())return null;try{const e=be.sessionStorage.getItem(ll);if(!e)return null;const t=JSON.parse(e);return j&&z.infoTick("Loading existing session"),Cy(t)}catch(e){return null}}function Xc(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function oO(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Xc(e.started,t,r)||Xc(e.lastActivity,n,r)}function Pi(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!oO(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function ac({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const o=r.stickySession&&rO();return o?Pi(o,{sessionIdleExpire:e,maxReplayDuration:t})?(j&&z.infoTick("Session in sessionStorage is expired, creating new one..."),sp(r,{previousSessionId:o.id})):o:(j&&z.infoTick("Creating new session"),sp(r,{previousSessionId:n}))}function sO(e){return e.type===X.Custom}function vl(e,t,n){return My(e,t)?(Ny(e,t,n),!0):!1}function iO(e,t,n){return My(e,t)?Ny(e,t,n):Promise.resolve(null)}async function Ny(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const o=e.recordingMode==="buffer";try{n&&o&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const s=e.getOptions(),i=aO(t,s.beforeAddRecordingEvent);return i?await r.addEvent(i):void 0}catch(s){if(!e.isEnabled())return e.handleException(s),null;const i=s&&s instanceof bl,a=i?"eventBufferOverflow":"eventBufferError",c=C();if(c){const u=i?"buffer_overflow":"internal_sdk_error";c.recordDroppedEvent(u,"replay")}if(i&&o)return r.clear(),r.waitForCheckout=!0,null;e.handleException(s),await e.stop({reason:a})}}
12function My(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=yl(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(j&&z.infoTick("Skipping event with timestamp ".concat(n," because it is after maxReplayDuration")),!1):!0}function aO(e,t){try{if(typeof t=="function"&&sO(e))return t(e)}catch(n){return j&&z.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}const ip=100;function xy(e,t,n){const r=e.getContext();t&&r.traceIds.size<ip&&r.traceIds.add(t),n&&r.segmentNames.size<ip&&r.segmentNames.add(n)}function cO(e){return t=>{e.isEnabled()&&xy(e,t.trace_id,t.name||void 0)}}function Tl(e){return!e.type}function Qc(e){return e.type==="transaction"}function uO(e){return e.type==="replay_event"}function ap(e){return e.type==="feedback"}function lO(e){return(t,n)=>{if(!e.isEnabled()||!Tl(t)&&!Qc(t))return;const r=n.statusCode;if(!(!r||r<200||r>=300)){if(Qc(t)){fO(e,t);return}dO(e,t)}}}function fO(e,t){var n,r;xy(e,(r=(n=t.contexts)==null?void 0:n.trace)==null?void 0:r.trace_id,t.transaction)}function dO(e,t){var o;const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!((o=t.tags)!=null&&o.replayId))return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||ps(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(s){e.handleException(s)}})}function pO(e){return t=>{!e.isEnabled()||!Tl(t)||hO(e,t)}}function hO(e,t){var r,o,s;const n=(s=(o=(r=t.exception)==null?void 0:r.values)==null?void 0:o[0])==null?void 0:s.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=Rt({category:"replay.hydrate-error",data:{url:bn()}});ms(e,i)}}function mO(e){const t=C();t&&t.on("beforeAddBreadcrumb",n=>gO(e,n))}function gO(e,t){if(!e.isEnabled()||!Oy(t))return;const n=_O(t);n&&ms(e,n)}function _O(e){return!Oy(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?yO(e):Rt(e)}function yO(e){var o;const t=(o=e.data)==null?void 0:o.arguments;if(!Array.isArray(t)||t.length===0)return Rt(e);let n=!1;const r=t.map(s=>{if(!s)return s;if(typeof s=="string")return s.length>Ps?(n=!0,"".concat(s.slice(0,Ps),"…")):s;if(typeof s=="object")try{const i=Ne(s,7);return JSON.stringify(i).length>Ps?(n=!0,"".concat(JSON.stringify(i,null,2).slice(0,Ps),"…")):i}catch(i){}return s});return Rt({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function Oy(e){return!!e.category}function SO(e,t){var n,r,o;return e.type||!((r=(n=e.exception)==null?void 0:n.values)!=null&&r.length)?!1:!!((o=t.originalException)!=null&&o.__rrweb__)}function Li(){const e=W().getPropagationContext().dsc;e&&delete e.replay_id;const t=Ie();if(t){const n=It(t);delete n.replay_id}}function cp(e){const t=W().getPropagationContext().dsc;t&&(t.replay_id=e);const n=Ie();if(n){const r=It(n);r.replay_id=e}}function bO(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:X.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function EO(e,t){return e.recordingMode!=="buffer"||t.message===fl||!t.exception||t.type?!1:Ay(e.getOptions().errorSampleRate)}function vO(e){return Object.assign((t,n)=>{var i;if(e.session&&Pi(e.session,{maxReplayDuration:e.getOptions().maxReplayDuration,sessionIdleExpire:e.timeouts.sessionIdleExpire})&&Li(),!e.isEnabled()||e.isPaused())return t;if(uO(t))return delete t.breadcrumbs,t;if(!Tl(t)&&!Qc(t)&&!ap(t))return t;if(!e.checkAndHandleExpiredSession())return Li(),t;if(ap(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),bO(e,t),t;if(SO(t,n)&&!e.getOptions()._experiments.captureExceptions)return j&&z.log("Ignoring error from rrweb internals",t),null;const o=EO(e,t);if((o||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),o&&e.recordingMode==="buffer"&&((i=e.session)==null?void 0:i.sampled)==="buffer"){const a=e.session;a.dirty=!0,e.getOptions().stickySession&&Ta(a)}return t},{id:"Replay"})}function Ia(e,t){return t.map(({type:n,start:r,end:o,name:s,data:i})=>{const a=e.throttledAddEvent({type:X.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:s,startTimestamp:r,endTimestamp:o,data:i}}});
12return typeof a=="string"?Promise.resolve(null):a})}function TO(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 IO(e){return t=>{if(!e.isEnabled())return;const n=TO(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(Ia(e,[n]),!1)))}}function wO(e,t){return j&&e.getOptions()._experiments.traceInternals?!1:tg(t,C())}function Py(e,t){e.isEnabled()&&t!==null&&(wO(e,t.name)||e.addUpdate(()=>(Ia(e,[t]),!0)))}function wa(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=N_(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch(n){}}function Ly(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Di(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 Dy(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:o,method:s,statusCode:i,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:o,data:{method:s,statusCode:i,request:a,response:c}}}function jo(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function pn(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:o,warnings:s}=RO(n);return r.body=o,s!=null&&s.length&&(r._meta={warnings:s}),r}function Zc(e,t){return Object.entries(e).reduce((n,[r,o])=>{const s=r.toLowerCase();return t.includes(s)&&e[r]&&(n[s]=o),n},{})}function RO(e){if(!e||typeof e!="string")return{body:e};const t=e.length>Ud,n=kO(e);if(t){const r=e.slice(0,Ud);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:"".concat(r,"…"),warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch(r){}return{body:e}}function kO(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function Fi(e,t){const n=AO(e);return ct(n,t)}function AO(e,t=be.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(be.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function CO(e,t,n){try{const r=await MO(e,t,n),o=Dy("resource.fetch",r);Py(n.replay,o)}catch(r){j&&z.exception(r,"Failed to capture fetch breadcrumb")}}function NO(e,t){const{input:n,response:r}=t,o=n?al(n):void 0,s=wa(o),i=r?Ly(r.headers.get("content-length")):void 0;s!==void 0&&(e.data.request_body_size=s),i!==void 0&&(e.data.response_body_size=i)}async function MO(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:s=r}=t,{url:i,method:a,status_code:c=0,request_body_size:u,response_body_size:f}=e.data,l=Fi(i,n.networkDetailAllowUrls)&&!Fi(i,n.networkDetailDenyUrls),d=l?xO(n,t.input,u):jo(u),p=await OO(l,n,t.response,f);return{startTimestamp:o,endTimestamp:s,url:i,method:a,statusCode:c,request:d,response:p}}function xO({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const o=n?DO(n,t):{};if(!e)return pn(o,r,void 0);const s=al(n),[i,a]=ki(s,z),c=pn(o,r,i);return a?Di(c,a):c}async function OO(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,o){if(!e&&o!==void 0)return jo(o);const s=r?Fy(r.headers,n):{};if(!r||!t&&o!==void 0)return pn(s,o,void 0);const[i,a]=await LO(r),c=PO(i,{networkCaptureBodies:t,responseBodySize:o,captureDetails:e,headers:s});return a?Di(c,a):c}function PO(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:o}){try{const s=e!=null&&e.length&&n===void 0?wa(e):n;return r?t?pn(o,s,e):pn(o,s,void 0):jo(s)}catch(s){return j&&z.exception(s,"Failed to serialize response body"),pn(o,n,void 0)}}async function LO(e){const t=FO(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await $O(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(j&&z.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(j&&z.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function Fy(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}
12function DO(e,t){return e.length===1&&typeof e[0]!="string"?up(e[0],t):e.length===2?up(e[1],t):{}}function up(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?Fy(n,t):Array.isArray(n)?{}:Zc(n,t):{}}function FO(e){try{return e.clone()}catch(t){j&&z.exception(t,"Failed to clone response body")}}function $O(e){return new Promise((t,n)=>{const r=ps(()=>n(new Error("Timeout while trying to read response body")),500);BO(e).then(o=>t(o),o=>n(o)).finally(()=>clearTimeout(r))})}async function BO(e){return await e.text()}async function UO(e,t,n){try{const r=WO(e,t,n),o=Dy("resource.xhr",r);Py(n.replay,o)}catch(r){j&&z.exception(r,"Failed to capture xhr breadcrumb")}}function HO(e,t){const{xhr:n,input:r}=t;if(!n)return;const o=wa(r),s=n.getResponseHeader("content-length")?Ly(n.getResponseHeader("content-length")):qO(n.response,n.responseType);o!==void 0&&(e.data.request_body_size=o),s!==void 0&&(e.data.response_body_size=s)}function WO(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:s=r,input:i,xhr:a}=t,{url:c,method:u,status_code:f=0,request_body_size:l,response_body_size:d}=e.data;if(!c)return null;if(!a||!Fi(c,n.networkDetailAllowUrls)||Fi(c,n.networkDetailDenyUrls)){const I=jo(l),S=jo(d);return{startTimestamp:o,endTimestamp:s,url:c,method:u,statusCode:f,request:I,response:S}}const p=a[Gt],h=p?Zc(p.request_headers,n.networkRequestHeaders):{},m=Zc(M_(a),n.networkResponseHeaders),[g,y]=n.networkCaptureBodies?ki(i,z):[void 0],[b,E]=n.networkCaptureBodies?jO(a):[void 0],v=pn(h,l,g),R=pn(m,d,b);return{startTimestamp:o,endTimestamp:s,url:c,method:u,statusCode:f,request:y?Di(v,y):v,response:E?Di(R,E):R}}function jO(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return zO(e.response,e.responseType)}catch(n){t.push(n)}return j&&z.warn("Failed to get xhr response body",...t),[void 0]}function zO(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&at(e))return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return j&&z.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return j&&z.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function qO(e,t){try{const n=t==="json"&&at(e)?JSON.stringify(e):e;return wa(n)}catch(n){return}}function GO(e){const t=C();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:s,networkResponseHeaders:i}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:s,networkResponseHeaders:i};t&&t.on("beforeAddBreadcrumb",(c,u)=>VO(a,c,u))}catch(n){}}function VO(e,t,n){if(t.data)try{YO(t)&&KO(n)&&(HO(t,n),UO(t,n,e)),JO(t)&&XO(n)&&(NO(t,n),CO(t,n,e))}catch(r){j&&z.exception(r,"Error when enriching network breadcrumb")}}function YO(e){return e.category==="xhr"}function JO(e){return e.category==="fetch"}function KO(e){return e==null?void 0:e.xhr}function XO(e){return(e==null?void 0:e.input)!==void 0}function QO(e){const t=C();C_(kx(e)),ga(IO(e)),mO(e),GO(e);const n=vO(e);Nm(n),t&&(t.on("beforeSendEvent",pO(e)),t.on("afterSendEvent",lO(e)),t.on("createDsc",r=>{const o=e.getSessionId();o&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(r.replay_id=o)}),t.on("processSegmentSpan",cO(e)),t.on("spanStart",r=>{e.lastActiveSpan=r}),t.on("spanEnd",r=>{e.lastActiveSpan=r}),t.on("beforeSendFeedback",async(r,o)=>{var i;const s=e.getSessionId();o!=null&&o.includeReplay&&e.isEnabled()&&s&&((i=r.contexts)!=null&&i.feedback)&&(r.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),r.contexts.feedback.replay_id=s)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}async function ZO(e){try{return Promise.all(Ia(e,[eP(be.performance.memory)]))}catch(t){return[]}}function eP(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,o=Date.now()/1e3;return{type:"memory",name:"memory",start:o,end:o,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function tP(e,t,n){return HE(e,t,{...n,setTimeoutImpl:ps})}const rt=H.navigator;function nP(){var e,t;return/iPhone|iPad|iPod/i.test((e=rt==null?void 0:rt.userAgent)!=null?e:"")||/Macintosh/i.test((t=rt==null?void 0:rt.userAgent)!=null?t:"")&&(rt!=null&&rt.maxTouchPoints)&&(rt==null?void 0:rt.maxTouchPoints)>1?{sampling:{mousemove:!1}}:{}}function rP(e){let t=!1;return(n,r)=>{try{if(!e.checkAndHandleExpiredSession()){j&&z.warn("Received replay event after session expired.");return}const o=r||!t;t=!0,oP(n),e.clickDetector&&vx(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&o&&e.setInitialState(),!vl(e,n,o))return!0;
12if(!o)return!1;const s=e.session;if(iP(e,o),e.recordingMode==="buffer"&&s&&e.eventBuffer&&!s.dirty){const i=e.eventBuffer.getEarliestTimestamp();i&&(j&&z.log("Updating session start time to earliest event in buffer to ".concat(new Date(i))),s.started=i,e.getOptions().stickySession&&Ta(s))}return s!=null&&s.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}catch(o){e.handleException(o)}}}function oP(e){const t=e.data;if(!(e.type!==X.IncrementalSnapshot||!t||typeof t!="object"||!("source"in t)||t.source!==Y.Mutation||!("attributes"in t)||!Array.isArray(t.attributes)))for(const n of t.attributes){const r=bt.mirror.getNode(n.id),o=r&&bt.mirror.getMeta(r);if((o==null?void 0:o.type)===va.Element)for(const[s,i]of Object.entries(n.attributes))i===null?delete o.attributes[s]:o.attributes[s]=i}}function sP(e){const t=e.getOptions();return{type:X.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function iP(e,t){var n;!t||((n=e.session)==null?void 0:n.segmentId)!==0||vl(e,sP(e),!1)}function aP(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch(t){return null}}function cP(e,t,n,r){return lt(pm(e,Qo(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function uP({recordingData:e,headers:t}){let n;const r="".concat(JSON.stringify(t),"\n");if(typeof e=="string")n="".concat(r).concat(e);else{const s=new TextEncoder().encode(r);n=new Uint8Array(s.length+e.length),n.set(s),n.set(e,s.length)}return n}async function lP({client:e,scope:t,replayId:n,event:r}){const o=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,s={event_id:n,integrations:o};e.emit("preprocessEvent",r,s);const i=await wm(e.getOptions(),r,s,t,e,_e());if(!i)return null;e.emit("postprocessEvent",i,s),i.platform=i.platform||"javascript";const a=e.getSdkMetadata(),{name:c,version:u,settings:f}=(a==null?void 0:a.sdk)||{};return i.sdk={...i.sdk,name:c||"sentry.javascript.unknown",version:u||"0.0.0",settings:f},i}async function fP({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:o,session:s}){const i=uP({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,segmentNames:f,initialTimestamp:l}=r,d=C(),p=W(),h=d==null?void 0:d.getTransport(),m=d==null?void 0:d.getDsn();if(!d||!h||!m||!s.sampled)return Promise.resolve({});const g={type:FN,replay_start_timestamp:l/1e3,timestamp:o/1e3,error_ids:c,trace_ids:u,segment_names:f,urls:a,replay_id:t,segment_id:n,replay_type:s.sampled},y=await lP({scope:p,client:d,replayId:t,event:g});if(!y)return d.recordDroppedEvent("event_processor","replay"),j&&z.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete y.sdkProcessingMetadata;const b=cP(y,i,m,d.getOptions().tunnel);let E;try{E=await h.send(b)}catch(R){const I=new Error(fl);try{I.cause=R}catch(S){}throw I}const v=jm({},E);if(Wm(v,"replay"))throw new Il(v);if(typeof E.statusCode=="number"&&(E.statusCode<200||E.statusCode>=300))throw new $y(E.statusCode);return E}class $y extends Error{constructor(t){super("Transport returned status code ".concat(t))}}class Il extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}class lp extends Error{constructor(){super("Session is too long, not sending replay")}}async function By(e,t={count:0,interval:jN}){const{recordingData:n,onError:r}=e;if(n.length)try{return await fP(e),!0}catch(o){if(o instanceof $y||o instanceof Il)throw o;if(Cu("Replays",{_retryCount:t.count}),r&&r(o),t.count>=zN){const s=new Error("".concat(fl," - max retries exceeded"));try{s.cause=o}catch(i){}throw s}return t.interval*=++t.count,new Promise((s,i)=>{ps(async()=>{try{await By(e,t),s(!0)}catch(a){i(a)}},t.interval)})}}const Uy="__THROTTLED",dP="__SKIPPED";function pP(e,t,n){const r=new Map,o=a=>{const c=a-n;r.forEach((u,f)=>{f<c&&r.delete(f)})},s=()=>[...r.values()].reduce((a,c)=>a+c,0);let i=!1;return(...a)=>{const c=Math.floor(Date.now()/1e3);if(o(c),s()>=t){const f=i;return i=!0,f?dP:Uy}i=!1;const u=r.get(c)||0;return r.set(c,u+1),e(...a)}}class hP{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:$N,sessionIdleExpire:BN},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=tP(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=pP((i,a)=>iO(this,i,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:o}=this.getOptions(),s=r?{threshold:Math.min(qN,r),timeout:r,scrollTimeout:GN,ignoreSelector:o?o.join(","):""}:void 0;if(s&&(this.clickDetector=new yx(this,s)),j){const i=t._experiments;z.setConfig({captureExceptions:!!i.captureExceptions,traceInternals:!!i.traceInternals})}this._handleVisibilityChange=()=>{be.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroun
12dTasks()},this._handleWindowBlur=()=>{const i=Rt({category:"ui.blur"});this._doChangeToBackgroundTasks(i)},this._handleWindowFocus=()=>{const i=Rt({category:"ui.focus"});this._doChangeToForegroundTasks(i)},this._handleKeyboardEvent=i=>{Mx(this,i)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){j&&z.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options,o=n<=0&&r<=0;if(this._requiresManualStart=o,!o){if(this._initializeSessionForSampling(t),!this.session){j&&z.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",j&&z.infoTick("Starting replay in ".concat(this.recordingMode," mode")),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){j&&z.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){j&&z.log("Buffering is in progress, call `flush()` to save the replay");return}j&&z.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=ac({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){j&&z.log("Buffering is in progress, call `flush()` to save the replay");return}j&&z.infoTick("Starting replay in buffer mode");const t=ac({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=bt({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:WN}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:rP(this),...nP(),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 o,s,i;if(!this._isEnabled)return;this._isEnabled=!1,this.recordingMode="buffer";const r=n!=null?n:"manual";(s=C())==null||s.emit("replayEnd",{sessionId:(o=this.session)==null?void 0:o.id,reason:r});try{j&&z.log("Stopping Replay triggered by ".concat(r)),Li(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),(i=this.eventBuffer)==null||i.destroy(),this.eventBuffer=null,eO(this)}catch(a){this.handleException(a)}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),j&&z.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),j&&z.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();j&&z.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(),cp(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}
12checkAndHandleExpiredSession(){var t;if(this._lastActivity&&Xc(this._lastActivity,this.timeouts.sessionIdlePause)&&((t=this.session)==null?void 0:t.sampled)==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t="".concat(be.location.pathname).concat(be.location.hash).concat(be.location.search),n="".concat(be.location.origin).concat(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===Uy){const o=Rt({category:"replay.throttled"});this.addUpdate(()=>!vl(this,{type:fx,timestamp:o.timestamp||0,data:{tag:"breadcrumb",payload:o,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||Ie(),n=t&&Te(t),o=(n&&U(n).data||{})[ue];if(!(!n||!o||!["route","custom"].includes(o)))return U(n).description}_initializeRecording(){var t;this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Xx({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.session&&((t=C())==null||t.emit("replayStart",{sessionId:this.session.id,recordingMode:this.recordingMode})),this.startRecording(),this.recordingMode==="session"&&this.session&&cp(this.session.id)}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=ac({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 Pi(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{be.document.addEventListener("visibilitychange",this._handleVisibilityChange),be.addEventListener("blur",this._handleWindowBlur),be.addEventListener("focus",this._handleWindowFocus),be.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(QO(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=zx(this)}_removeListeners(){try{be.document.removeEventListener("visibilitychange",this._handleVisibilityChange),be.removeEventListener("blur",this._handleWindowBlur),be.removeEventListener("focus",this._handleWindowFocus),be.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(Pi(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})){Li();return}t&&this._createCustomBreadcrumb(t),this.conditionalFlush()}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){j&&z.log("Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:X.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=Lx(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(Ia(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;
12const 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){j&&z.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!((n=this.eventBuffer)!=null&&n.hasEvents)&&(await ZO(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const r=Date.now();if(r-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new lp;const o=this._popEventContext(),s=this.session.segmentId++;this._maybeSaveSession();const i=await this.eventBuffer.finish();await By({replayId:t,recordingData:i,segmentId:s,eventContext:o,session:this.session,timestamp:r,onError:a=>this.handleException(a)})}catch(r){this.handleException(r),this.stop({reason:"sendError"});const o=C();if(o){let s;r instanceof Il?s="ratelimit_backoff":r instanceof lp?s="invalid":s="send_error",o.recordDroppedEvent(s,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){j&&z.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,o=Date.now()-n;this._debouncedFlush.cancel();const s=o<this._options.minReplayDuration,i=o>this._options.maxReplayDuration+5e3;if(s||i){j&&z.log("Session duration (".concat(Math.floor(o/1e3),"s) is too ").concat(s?"short":"long",", not sending replay.")),s&&this._debouncedFlush();return}const a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&j&&z.log("Flushing initial segment without checkout.");const c=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(u){this.handleException(u)}finally{this._flushLock=void 0,c&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&Ta(this.session)}_onMutationHandler(t){const{ignoreMutations:n}=this._options._experiments;if(n!=null&&n.length&&t.some(a=>{const c=aP(a.target),u=n.join(",");return c==null?void 0:c.matches(u)}))return!1;const r=t.length,o=this._options.mutationLimit,s=this._options.mutationBreadcrumbLimit,i=o&&r>o;if(r>s||i){const a=Rt({category:"replay.mutations",data:{count:r,limit:i}});this._createCustomBreadcrumb(a)}return i?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function _o(e,t){return[...e,...t].join(",")}function mP({mask:e,unmask:t,block:n,unblock:r,ignore:o}){const s=["base","iframe[srcdoc]:not([src])"],i=_o(e,[".sentry-mask","[data-sentry-mask]"]),a=_o(t,[]);return{maskTextSelector:i,unmaskTextSelector:a,blockSelector:_o(n,[".sentry-block","[data-sentry-block]",...s]),unblockSelector:_o(r,[]),ignoreSelector:_o(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function gP({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:o,value:s}){if(o.unmaskTextSelector&&e.matches(o.unmaskTextSelector))return s;const i=n.includes(t),a=r&&t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"");return i||a?s.replace(/[\S]/g,"*"):s}const fp='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',_P=["content-length","content-type","accept"],yP=Symbol.for("sentry__originalRequestBody");let dp=!1,pp=!1;function SP(){if(typeof Request>"u"||pp)return;const e=Request;try{const t=function(n,r){const o=new e(n,r);return(r==null?void 0:r.body)!=null&&(o[yP]=r.body),o};t.prototype=e.prototype,H.Request=t,pp=!0}catch(t){}}const Hy=e=>new bP(e);class bP{constructor({flushMinDelay:t=UN,flushMaxDelay:n=HN,minReplayDuration:r=VN,maxReplayDuration:o=Hd,stickySession:s=!0,useCompression:i=!0,workerUrl:a,_experiments:c={},maskAllText:u=!0,maskAllInputs:f=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:d=750,mutationLimit:p=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:g=[],networkDetailDenyUrls:y=[],networkCaptureBodies:b=!0,networkRequestHeaders:E=[],networkResponseHeaders:v=[],mask:R=[],maskAttributes:I=["title","placeholder","aria-label"],unmask:S=[],block:O=[],unblock:$=[],ignore:T=[],maskFn:P,beforeAddRecordingEvent:N,beforeErrorSampling:L,onError:B,attachRawBodyFromRequest:Q=!1}={}){this.name="Replay";const te=mP({mask:R,unmask:S,block:O,unblock:$,ignore:T});if(this._recordingOptions={maskAllInputs:f,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:P,maskInputFn:P,maskAttributeFn:(F,M,K)=>gP({maskAttributes:I,maskAllText:u,privacyOptions:te,key:F,value:M,el:K}),...te,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:F=>{try{F.__rrweb__=!0}catch(M){}},recordCrossOriginIframes:!!c.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,YN),maxReplayDuration:Math.min(o,Hd),stickySession:s,useCompression:i,workerUrl:a,blockAllMedia:l,maskAllInputs:f,maskAllText:u,mutationBreadcrumbLimit:d,mutationLimit:p,slowClickTimeout:h,slowClickIgnoreSelectors:m,networkDetailAllowUrls:g,networkDetailDenyUrls:y,networkCaptureBodies:b,networkRequestHeaders:hp(E),networkResponseHeaders:hp(v),beforeAddRecordingEvent:N,beforeErrorSampling:L,onError:B,attachRawBodyFromRequest:Q,_experiments:c},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?"".concat(this._recordingOptions.blockSelector,",").concat(fp):fp,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&yn())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return dp}set _isInitialized(t){dp=t}afterAllSetup(t){!yn()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&SP(),this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}
12startBuffering(){this._replay&&this._replay.startBuffering()}stop(t){var n;return this._replay?this._replay.stop({forceFlush:(n=t==null?void 0:t.flush)!=null?n: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&&(_n(t,{"sentry.replay_id":n}),this.getRecordingMode()==="buffer"&&_n(t,{"sentry._internal.replay_is_buffering":!0}))}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=EP(this._initialOptions,t);this._replay=new hP({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch(n){}}}function EP(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},o=Xn(n.replaysSessionSampleRate),s=Xn(n.replaysOnErrorSampleRate);return o==null&&s==null&&tn(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),o!=null&&(r.sessionSampleRate=o),s!=null&&(r.errorSampleRate=s),r}function hp(e){return[..._P,...e.map(t=>t.toLowerCase())]}function vP(){const e=C();return e==null?void 0:e.getIntegrationByName("Replay")}var TP=Object.defineProperty,IP=(e,t,n)=>t in e?TP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mp=(e,t,n)=>IP(e,typeof t!="symbol"?t+"":t,n);class wP{constructor(){mp(this,"idNodeMap",new Map),mp(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const n=(r=this.getMeta(t))==null?void 0:r.id;return n!=null?n:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function RP(){return new wP}function kP(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function eu(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:eu(e.parentNode,t,n,r+1)}function gp(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(".".concat(e)))return!0}else if(kP(r,e))return!0}return!!(t&&r.matches(t))}catch(o){return!1}}}const Er="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let _p={map:{},getId(){return console.error(Er),-1},getNode(){return console.error(Er),null},removeNodeFromMap(){console.error(Er)},has(){return console.error(Er),!1},reset(){console.error(Er)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(_p=new Proxy(_p,{get(e,t,n){return t==="map"&&console.error(Er),Reflect.get(e,t,n)}}));function wl(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(i){jy(()=>{n.set.call(this,i)},0),s&&s.set&&s.set.call(this,i)}}),()=>wl(e,t,s||{},!0)}function Rl(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch(r){return()=>{}}}Date.now().toString();function AP(e){if(!e)return null;
12try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch(t){return null}}function Ra(e,t,n,r,o){if(!e)return!1;const s=AP(e);if(!s)return!1;const i=gp(t,n),a=eu(s,i);let c=-1;return a<0?!1:(r&&(c=eu(s,gp(null,r))),a>-1&&c<0?!0:a<c)}const yp={};function Wy(e){const t=yp[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);const s=o.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(o)}catch(o){}return yp[e]=r.bind(window)}function Pn(...e){return Wy("requestAnimationFrame")(...e)}function jy(...e){return Wy("setTimeout")(...e)}var Yr=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Yr||{});let oi;function CP(e){oi=e}const cc=e=>oi?(...n)=>{try{return e(...n)}catch(r){if(oi&&oi(r)===!0)return()=>{};throw r}}:e;var Ar="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",NP=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var $s=0;$s<Ar.length;$s++)NP[Ar.charCodeAt($s)]=$s;var MP=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=Ar[t[n]>>2],o+=Ar[(t[n]&3)<<4|t[n+1]>>4],o+=Ar[(t[n+1]&15)<<2|t[n+2]>>6],o+=Ar[t[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o};const Sp=new Map;function xP(e,t){let n=Sp.get(e);return n||(n=new Map,Sp.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const zy=(e,t,n)=>{if(!e||!(Gy(e,t)||typeof e=="object"))return;const r=e.constructor.name,o=xP(n,r);let s=o.indexOf(e);return s===-1&&(s=o.length,o.push(e)),s};function si(e,t,n){if(e instanceof Array)return e.map(r=>si(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const r=e.constructor.name,o=MP(e);return{rr_type:r,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[si(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:o}=e;return{rr_type:r,src:o}}else if(e instanceof HTMLCanvasElement){const r="HTMLImageElement",o=e.toDataURL();return{rr_type:r,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[si(e.data,t,n),e.width,e.height]};if(Gy(e,t)||typeof e=="object"){const r=e.constructor.name,o=zy(e,t,n);return{rr_type:r,index:o}}}}return e}const qy=(e,t,n)=>e.map(r=>si(r,t,n)),Gy=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(o=>typeof t[o]=="function").find(o=>e instanceof t[o]);function OP(e,t,n,r,o){const s=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of i)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;const c=Rl(t.CanvasRenderingContext2D.prototype,a,function(u){return function(...f){return Ra(this.canvas,n,r,o,!0)||jy(()=>{const l=qy(f,t,this);e(this.canvas,{type:Yr["2D"],property:a,args:l})},0),u.apply(this,f)}});s.push(c)}catch(c){const u=wl(t.CanvasRenderingContext2D.prototype,a,{set(f){e(this.canvas,{type:Yr["2D"],property:a,args:[f],setter:!0})}});s.push(u)}return()=>{s.forEach(a=>a())}}function PP(e){return e==="experimental-webgl"?"webgl":e}function bp(e,t,n,r,o){const s=[];try{const i=Rl(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(c,...u){if(!Ra(this,t,n,r,!0)){const f=PP(c);if("__context"in this||(this.__context=f),o&&["webgl","webgl2"].includes(f))if(u[0]&&typeof u[0]=="object"){const l=u[0];l.preserveDrawingBuffer||(l.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[c,...u])}});s.push(i)}catch(i){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>
12{s.forEach(i=>i())}}function Ep(e,t,n,r,o,s,i,a){const c=[],u=Object.getOwnPropertyNames(e);for(const f of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(f))try{if(typeof e[f]!="function")continue;const l=Rl(e,f,function(d){return function(...p){const h=d.apply(this,p);if(zy(h,a,this),"tagName"in this.canvas&&!Ra(this.canvas,r,o,s,!0)){const m=qy(p,a,this),g={type:t,property:f,args:m};n(this.canvas,g)}return h}});c.push(l)}catch(l){const d=wl(e,f,{set(p){n(this.canvas,{type:t,property:f,args:[p],setter:!0})}});c.push(d)}return c}function LP(e,t,n,r,o,s){const i=[];return i.push(...Ep(t.WebGLRenderingContext.prototype,Yr.WebGL,e,n,r,o,s,t)),typeof t.WebGL2RenderingContext<"u"&&i.push(...Ep(t.WebGL2RenderingContext.prototype,Yr.WebGL2,e,n,r,o,s,t)),()=>{i.forEach(a=>a())}}const DP='for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s="";for(a=0;a<r;a+=3)s+=e[n[a]>>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+"-"+t;if("OffscreenCanvas"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext("2d");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return""}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext("bitmaprenderer"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:"low"});w?.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};';function FP(){const e=new Blob([DP]);return URL.createObjectURL(e)}class $P{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.shadowDoms=new Set,this.windowsSet=new WeakSet,this.windows=[],this.restoreHandlers=[],this.frozen=!1,this.locked=!1,this.snapshotInProgressMap=new Map,this.worker=null,this.lastSnapshotTime=0,this.processMutation=(a,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(c)};const{enableManualSnapshot:n,sampling:r="all",win:o,recordCanvas:s,errorHandler:i}=t;t.sampling=r,this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.options=t,i&&CP(i),(s&&typeof r=="number"||n)&&(this.worker=this.initFPSWorker()),this.addWindow(o),!n&&cc(()=>{s&&r==="all"&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),s&&typeof r=="number"&&this.initCanvasFPSObserver()})()}reset(){var t;this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(n=>{try{n()}catch(r){}}),this.restoreHandlers=[],this.windowsSet=new WeakSet,this.windows=[],this.shadowDoms=new Set,(t=this.worker)==null||t.terminate(),this.worker=null,this.snapshotInProgressMap=new Map}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}addWindow(t){const{sampling:n="all",blockClass:r,blockSelector:o,unblockSelector:s,recordCanvas:i,enableManualSnapshot:a}=this.options;if(!this.windowsSet.has(t)){if(a){this.windowsSet.add(t),this.windows.push(new WeakRef(t));return}cc(()=>{if(i&&n==="all"&&this.initCanvasMutationObserver(t,r,o,s),i&&typeof n=="number"){const c=bp(t,r,o,s,!0);this.restoreHandlers.push(()=>{c()})}})(),this.windowsSet.add(t),this.windows.push(new WeakRef(t))}}addShadowRoot(t){this.shadowDoms.add(new WeakRef(t))}resetShadowRoots(){this.shadowDoms=new Set}snapshot(t,n){if(n!=null&&n.skipRequestAnimationFrame){this.takeSnapshot(performance.now(),!0,t);return}Pn(r=>this.takeSnapshot(r,!0,t))}initFPSWorker(){const t=new Worker(FP());return t.onmessage=n=>{const r=n.data,{id:o}=r;if(this.snapshotInProgressMap.set(o,!1),!("base64"in r))return;const{base64:s,type:i,width:a,height:c}=r;this.mutationCb({id:o,type:Yr["2D"],commands:[{property:"clearRect",args:[0,0,a,c]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:s}],type:i}]},0,0,a,c]}]})},t}initCanvasFPSObserver(){let t;if(!this.windows.length&&!this.shadowDoms.size)return;const n=r=>{this.takeSnapshot(r,!1),t=Pn(n)};t=Pn(n),this.restoreHandlers.push(()=>{t&&cancelAnimationFrame(t)})}initCanvasMutationObserver(t,n,r,o){const s=bp(t,n,r,o,!1),i=OP(this.processMutation.bind(this),t,n,r,o),a=LP(this.processMutation.bind(this),t,n,r,o,this.mirror);this.restoreHandlers.push(()=>{s(),i(),a()})}getCanvasElements(t,n,r){const o=[],s=i=>{i.querySelectorAll("canvas").forEach(a=>{Ra(a,t,n,r)||o.push(a)})};for(const i of this.windows){const a=i.deref();let c;try{c=a&&a.document}catch(u){}c&&s(c)}for(const i of this.shadowDoms){const a=i.deref();a&&s(a)}return o}takeSnapshot(t,n,r){const{sampling:o,blockClass:s,blockSelector:i,unblockSelector:a,dataURLOptions:c,maxCanvasSize:u}=this.options,l=1e3/(o==="all"?2:o||2);return this.lastSnapshotTime&&t-this.lastSnapshotTime<l?!1:(this.lastSnapshotTime=t,(r?[r]:this.getCanvasElements(s,i,a)).forEac
12h(h=>{var g;const m=this.mirror.getId(h);if(!(!this.mirror.hasNode(h)||!h.width||!h.height||this.snapshotInProgressMap.get(m))){if(this.snapshotInProgressMap.set(m,!0),!n&&["webgl","webgl2"].includes(h.__context)){const y=h.getContext(h.__context);((g=y==null?void 0:y.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}createImageBitmap(h).then(y=>{var b;(b=this.worker)==null||b.postMessage({id:m,bitmap:y,width:h.width,height:h.height,dataURLOptions:c,maxCanvasSize:u},[y])}).catch(y=>{cc(()=>{throw this.snapshotInProgressMap.delete(m),y})()})}}),!0)}startPendingCanvasMutationFlusher(){Pn(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,Pn(t)};Pn(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),Pn(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const o=r.map(i=>{const{type:a,...c}=i;return c}),{type:s}=r[0];this.mutationCb({id:n,type:s,commands:o}),this.pendingCanvasMutations.delete(t)}}var Xp;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((Xp=e.contentWindow)==null?void 0:Xp.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}RP();var vp;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(vp||(vp={}));const Tp={low:{sampling:{canvas:1},dataURLOptions:{type:"image/webp",quality:.25}},medium:{sampling:{canvas:2},dataURLOptions:{type:"image/webp",quality:.4}},high:{sampling:{canvas:4},dataURLOptions:{type:"image/webp",quality:.5}}},BP="ReplayCanvas",Bs=1280,UP=(e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,Bs):Bs,n?Math.min(n,Bs):Bs]};let o,s;const i=new Promise(a=>s=a);return{name:BP,getOptions(){const{quality:a,enableManualSnapshot:c,maxCanvasSize:u}=r;return{enableManualSnapshot:c,recordCanvas:!0,getCanvasManager:f=>{const l=new $P({...f,enableManualSnapshot:c,maxCanvasSize:u,errorHandler:d=>{try{typeof d=="object"&&(d.__rrweb__=!0)}catch(p){}}});return o=l,s(l),l},...Tp[a]||Tp.medium}},async snapshot(a,c){(o||await i).snapshot(a,c)}}},HP=UP;function WP(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function Vy(e){try{return new URL(e,w.location.origin).href}catch(t){return}}function jP(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function Yy(e){try{return new Headers(e)}catch(t){return}}const kl={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function Jy(e,t){const{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:o,enableHTTPTimings:s,tracePropagationTargets:i,onRequestSpanStart:a,onRequestSpanEnd:c}
12={...kl,...t},u=typeof o=="function"?o:p=>!0,f=p=>qP(p,i),l={},d=e.getOptions().propagateTraceparent;n&&sa(p=>{const h=iI(p,u,f,l,{propagateTraceparent:d,onRequestSpanEnd:c});if(h){const m=Vy(p.fetchData.url),g=m?Gn(m).host:void 0,y=m?yt(m):void 0;h.setAttributes({[Em]:y,[Cn]:y,"server.address":g}),s&&Ip(h,e),a==null||a(h,{headers:p.headers})}}),r&&il(p=>{var m;const h=GP(p,u,f,l,d,c);h&&(s&&Ip(h,e),a==null||a(h,{headers:Yy((m=p.xhr.__sentry_xhr_v3__)==null?void 0:m.request_headers)}))})}const zP=300;function Ip(e,t){const{url:n}=U(e).data;if(!n||typeof n!="string")return;let r=()=>void setTimeout(o);if(ft(t)){const s=e.end.bind(e);e.end=i=>{const a=i!=null?i:me();let c=!1;const u=()=>{c||(c=!0,setTimeout(o),s(a),clearTimeout(f))};r=u;const f=setTimeout(u,zP)}}const o=En("resource",({entries:s})=>{s.forEach(i=>{jP(i)&&i.name.endsWith(n)&&(e.setAttributes(k_(i)),r())})})}function qP(e,t){const n=bn();if(n){let r,o;try{r=new URL(e,n),o=new URL(n).origin}catch(i){return!1}const s=r.origin===o;return t?ct(r.toString(),t)||s&&ct(r.pathname,t):s}else{const r=!!e.match(/^\/(?!\/)/);return t?ct(e,t):r}}function GP(e,t,n,r,o,s){const i=e.xhr,a=i==null?void 0:i[Gt];if(!i||i.__sentry_own_request__||!a)return;const{url:c,method:u}=a,f=Ge()&&t(c);if(e.endTimestamp){const v=i.__sentry_xhr_span_id__;if(!v)return;const R=r[v];R&&(f&&a.status_code!==void 0&&(xo(R,a.status_code),R.end(),s==null||s(R,{headers:Yy(M_(i)),error:e.error})),delete r[v]);return}const l=Vy(c),d=Gn(l||c),p=l?yt(l):void 0,h=yt(eg(c)),m=C(),g=!!Ie(),y=g||!!m&&ft(m),b=f&&y?Ve({name:"".concat(u," ").concat(h),attributes:{url:yt(c),type:"xhr","http.method":u,"http.url":p,[Cn]:p,"server.address":d==null?void 0:d.host,[G]:"auto.http.browser",[ae]:"http.client",...(d==null?void 0:d.search)&&{"http.query":d==null?void 0:d.search},...(d==null?void 0:d.hash)&&{"http.fragment":d==null?void 0:d.hash}}}):new Qn,E=Gi(b)&&g?void 0:b;return f&&!y&&(m==null||m.recordDroppedEvent("no_parent_span","span")),i.__sentry_xhr_span_id__=b.spanContext().spanId,r[i.__sentry_xhr_span_id__]=b,n(c)&&VP(i,Ge()&&y?E:void 0,o),m&&m.emit("beforeOutgoingRequestSpan",b,e),b}function VP(e,t,n){const{"sentry-trace":r,baggage:o,traceparent:s}=Lu({span:t,propagateTraceparent:n});r&&YP(e,r,o,s)}function YP(e,t,n,r){var s;const o=(s=e.__sentry_xhr_v3__)==null?void 0:s.request_headers;if(!(o!=null&&o["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),r&&!(o!=null&&o.traceparent)&&e.setRequestHeader("traceparent",r),n){const i=o==null?void 0:o.baggage;(!i||!WP(i))&&e.setRequestHeader("baggage",n)}}catch(i){}}const wp=new WeakMap,Rp=new WeakMap,JP=9e4,KP=["text/event-stream","application/x-ndjson","application/stream+json"],Ky=()=>({name:"FetchStreamPerformance",setup(){BR(e=>{if(e.response){const t=wp.get(e.response);if(t&&e.endTimestamp){t.end(e.endTimestamp);const n=Rp.get(e.response);n&&clearTimeout(n)}}}),sa(e=>{var t,n,r,o;if(e.endTimestamp&&e.response){const s=((t=e.response.headers)==null?void 0:t.get("content-type"))||"";if((n=e.response.headers)!=null&&n.get("content-length")||!KP.some(d=>s.startsWith(d)))return;const i=((r=e.fetchData)==null?void 0:r.url)||"",a=((o=e.fetchData)==null?void 0:o.method)||"GET",c=Do(i),u=i.startsWith("data:")?yt(i):c?Zm(c):i,f=Ve({name:"".concat(a," ").concat(u),startTime:e.endTimestamp,attributes:{url:yt(i),"http.method":a,type:"fetch",[ae]:"http.client.stream",[G]:"auto.http.browser.stream"}});wp.set(e.response,f);const l=setTimeout(()=>{f.isRecording()&&f.end()},JP);Rp.set(e.response,l)}})}}),Xy="WebVitals",Qy=(e={})=>{var n;const t=new Set((n=e.ignore)!=null?n:[]);return{name:Xy,setup(r){var l;const o=ft(r),{enableStandaloneClsSpans:s,enableStandaloneLcpSpans:i}=(l=e._experiments)!=null?l:{},a=o||t.has("cls")?void 0:s||!1,c=o||t.has("lcp")?void 0:i||!1,u=sC({recordClsStandaloneSpans:a,recordLcpStandaloneSpans:c,client:r}),f=new WeakSet;r.on("afterStartPageLoadSpan",d=>{f.add(d)}),r.on("spanEnd",d=>{f.delete(d)&&(u(),hC(d,{recordClsOnPageloadSpan:a===!1,recordLcpOnPageloadSpan:c===!1,spanStreamingEnabled:o}))}),o?(t.has("lcp")||PC(r),t.has("cls")||DC(r),t.has("inp")||$C()):t.has("inp")||CC()},afterAllSetup(){t.has("inp")||OC()}}};function XP(){w.document?w.document.addEventListener("visibilitychange",()=>{const e=Ie();if(!e)return;const t=Te(e);
12if(w.document.hidden&&t){const n="cancelled",{op:r,status:o}=U(t);k&&_.log("[Tracing] Transaction: ".concat(n," -> since tab moved to the background, op: ").concat(r)),o||t.setStatus({code:ee,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):k&&_.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const QP=3600,Zy="sentry_previous_trace",ZP="sentry.previous_trace";function eL(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let o=r?rL():void 0;e.on("spanStart",i=>{if(Te(i)!==i)return;const a=W().getPropagationContext();o=tL(o,i,a),r&&nL(o)});let s=!0;n&&e.on("beforeSampling",i=>{if(!o)return;const a=W(),c=a.getPropagationContext();if(s&&c.parentSpanId){s=!1;return}a.setPropagationContext({...c,dsc:{...c.dsc,sample_rate:String(o.sampleRate),sampled:String(tu(o.spanContext))},sampleRand:o.sampleRand}),i.parentSampled=tu(o.spanContext),i.parentSampleRate=o.sampleRate,i.spanAttributes={...i.spanAttributes,[Fh]:o.sampleRate}})}function tL(e,t,n){const r=U(t);function o(){var a,c,u;try{const f=Number((u=(a=r.data)==null?void 0:a[Hi])!=null?u:(c=n.dsc)==null?void 0:c.sample_rate);return Number.isNaN(f)?0:f}catch(f){return 0}}const s={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:o(),sampleRand:n.sampleRand};if(!e)return s;const i=e.spanContext;return i.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=QP&&(k&&_.log("Adding previous_trace `".concat(JSON.stringify(i),"` link to span `").concat(JSON.stringify({op:r.op,...t.spanContext()}),"`")),t.addLink({context:i,attributes:{[zb]:"previous_trace"}}),t.setAttribute(ZP,"".concat(i.traceId,"-").concat(i.spanId,"-").concat(tu(i)?1:0))),s)}function nL(e){try{w.sessionStorage.setItem(Zy,JSON.stringify(e))}catch(t){k&&_.warn("Could not store previous trace in sessionStorage",t)}}function rL(){var e;try{const t=(e=w.sessionStorage)==null?void 0:e.getItem(Zy);return JSON.parse(t)}catch(t){return}}function tu(e){return e.traceFlags===1}const oL="BrowserTracing",sL=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function eS(){const e=w.navigator;return e!=null&&e.userAgent?sL.test(e.userAgent):!1}const iL={...js,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...kl},fr=(e={})=>{"enableElementTiming"in e&&tn(()=>{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=w.document,{enableInp:r,enableLongTask:o,enableLongAnimationFrame:s,_experiments:{enableInteractions:i,enableStandaloneClsSpans:a,enableStandaloneLcpSpans:c},beforeStartSpan:u,idleTimeout:f,finalTimeout:l,childSpanTimeout:d,markBackgroundSpan:p,traceFetch:h,traceXHR:m,trackFetchStreamPerformance:g,shouldCreateSpanForRequest:y,enableHTTPTimings:b,ignoreResourceSpans:E,ignorePerformanceApiSpans:v,instrumentPageLoad:R,instrumentNavigation:I,detectRedirects:S,linkPreviousTrace:O,consistentTraceSampling:$,enableReportPageLoaded:T,onRequestSpanStart:P,onRequestSpanEnd:N}={...iL,...e},L=eS();let B,Q;function te(F,M,K=!0,x){const V=M.op==="pageload",oe=M.name,ce=u?u(M):M,ye=Do(x||bn()),$e={...(ye==null?void 0:ye.pathname)&&{[Tm]:ye.pathname},...ye&&!Ji(ye)&&{[Cn]:ye.href},...ce.attributes};if(oe!==ce.name&&($e[ue]="custom"),ce.attributes=$e,!K){const pt=ir();Ve({...ce,startTime:pt}).end(pt);return}t.name=ce.name,t.source=$e[ue];const dt=_m(ce,{idleTimeout:f,finalTimeout:l,childSpanTimeout:d,disableAutoFinish:V,beforeSpanEnd:pt=>{pC(pt,{ignoreResourceSpans:E,ignorePerformanceApiSpans:v,spanStreamingEnabled:ft(F)}),Cp(F,void 0);const Mn=W(),Ut=Mn.getPropagationContext();Mn.setPropagationContext({...Ut,traceId:dt.spanContext().traceId,sampled:nn(dt),dsc:It(pt)}),V&&(Q=void 0)},trimIdleSpanEndTimestamp:!T});V&&T&&(Q=dt),Cp(F,dt);function Bt(){n&&["interactive","complete"].includes(n.readyState)&&(F.emit("idleSpanEnableAutoFinish",dt),n.removeEventListener("readystatechange",Bt))}V&&!T&&n&&(n.addEventListener("readystatechange",Bt),Bt())}return{name:oL,setup(F){var K;if(L){k&&_.log("[Tracing] Skipping browserTracingIntegration setup for bot user agent.");return}if(cm(),s&&H.PerformanceObserver&&((K=PerformanceObserver.supportedEntryTypes)!=null&&K.includes("long-animation-frame"))?aC():o&&iC(),i&&cC(),S&&n){const x=()=>{B=me()};addEventListener("click",x,{capture:!0}),addEventListener("keydown",x,{capture:!0,passive:!0})}function M(){const x=zo(F);x&&!U(x).timestamp&&(k&&_.log("[Tracing] Finishing current active span with op: ".concat(U(x).op)),x.setAttribute(Mo,"cancelled"),x.end())}F.on("startNavigationSpan",(x,V)=>{if(C()!==F)return;if(V!=null&&V.isRedirect){k&&_.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),te(F,{op:"navigation.redirect",...x},!1,V.url);return}B=void 0,M(),_e().setPropagationContext({traceId:xt(),sampleRand:Math.random(),propagationSpanId:Ge()?void 0:Jt()});const oe=W();oe.setPropagationContext({traceId:xt(),sampleRand:Math.random(),propagationSpanId:Ge()?void 0:Jt()}),oe.setSDKProcessingMetadata({normalizedRequest:void 0}),te(F,{op:"navigation",...x,parentSpan:null,forceTransaction:!0},!0,V==null?void 0:V.url)}
12),F.on("startPageLoadSpan",(x,V={})=>{if(C()!==F)return;M();const oe=V.sentryTrace||kp("sentry-trace")||Ap("sentry-trace"),ce=V.baggage||kp("baggage")||Ap("baggage"),ye=Yh(oe,ce),$e=W();$e.setPropagationContext(ye),Ge()||($e.getPropagationContext().propagationSpanId=Jt()),$e.setSDKProcessingMetadata({normalizedRequest:Ii()}),te(F,{op:"pageload",...x})}),F.on("endPageloadSpan",()=>{T&&Q&&(Q.setAttribute(Mo,"reportPageLoaded"),Q.end())})},afterAllSetup(F){var K;if(L)return;F.addIntegration&&!((K=F.getIntegrationByName)!=null&&K.call(F,Xy))&&F.addIntegration(Qy({ignore:r?[]:["inp"],_experiments:{enableStandaloneClsSpans:a,enableStandaloneLcpSpans:c}}));let M=bn();if(O!=="off"&&eL(F,{linkPreviousTrace:O,consistentTraceSampling:$}),w.location){if(R){const x=Ae();lo(F,{name:w.location.pathname,startTime:x?x/1e3:void 0,attributes:{[ue]:"url",[G]:"auto.pageload.browser"}})}I&&ga(({to:x,from:V})=>{if(V===void 0&&(M==null?void 0:M.indexOf(x))!==-1){M=void 0;return}M=void 0;const oe=Do(x),ce=zo(F),ye=ce&&S&&cL(ce,B);fo(F,{name:(oe==null?void 0:oe.pathname)||w.location.pathname,attributes:{[ue]:"url",[G]:"auto.navigation.browser"}},{url:x,isRedirect:ye})})}p&&XP(),i&&aL(F,f,l,d,t),Jy(F,{traceFetch:h,traceXHR:m,tracePropagationTargets:F.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:y,enableHTTPTimings:b,onRequestSpanStart:P,onRequestSpanEnd:N}),g&&F.addIntegration(Ky())}}};function lo(e,t,n){e.emit("startPageLoadSpan",t,n),W().setTransactionName(t.name);const r=zo(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function fo(e,t,n){const{url:r,isRedirect:o}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:o,url:r}),e.emit("startNavigationSpan",t,{isRedirect:o,url:r});const s=W();return s.setTransactionName(t.name),r&&!o&&s.setSDKProcessingMetadata({normalizedRequest:{...Ii(),url:r}}),zo(e)}function kp(e){const t=w.document,n=t==null?void 0:t.querySelector("meta[name=".concat(e,"]"));return(n==null?void 0:n.getAttribute("content"))||void 0}function Ap(e){var r,o,s;const t=(o=(r=w.performance)==null?void 0:r.getEntriesByType)==null?void 0:o.call(r,"navigation")[0],n=(s=t==null?void 0:t.serverTiming)==null?void 0:s.find(i=>i.name===e);return n==null?void 0:n.description}function aL(e,t,n,r,o){const s=w.document;let i;const a=()=>{const c="ui.action.click",u=zo(e);if(u){const f=U(u).op;if(["navigation","pageload"].includes(f)){k&&_.warn("[Tracing] Did not create ".concat(c," span because a pageload or navigation span is in progress."));return}}if(i&&(i.setAttribute(Mo,"interactionInterrupted"),i.end(),i=void 0),!o.name){k&&_.warn("[Tracing] Did not create ".concat(c," transaction because _latestRouteName is missing."));return}i=_m({name:o.name,op:c,attributes:{[ue]:o.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};s&&addEventListener("click",a,{capture:!0})}const tS="_sentry_idleSpan";function zo(e){return e[tS]}function Cp(e,t){ve(e,tS,t)}const Np=1.5;function cL(e,t){const n=U(e),r=ir(),o=n.start_timestamp;return!(r-o>Np||t&&r-t<=Np)}function uL(e=C()){e==null||e.emit("endPageloadSpan")}function lL(e){const t=Ie();if(t===e)return;const n=W();e.end=new Proxy(e.end,{apply(r,o,s){return Ot(n,t),Reflect.apply(r,o,s)}}),Ot(n,e)}const fL=()=>({name:"SpanStreaming",beforeSetup(e){const t=e.getOptions();t.traceLifecycle||(k&&_.log('[SpanStreaming] setting `traceLifecycle` to "stream"'),t.traceLifecycle="stream")},setup(e){const t="SpanStreaming integration requires",n="Falling back to static trace lifecycle.",r=e.getOptions();if(!ft(e)){r.traceLifecycle="static",k&&_.warn("".concat(t,' `traceLifecycle` to be set to "stream"! ').concat(n));return}const o=r.beforeSendSpan;if(o&&!zi(o)){r.traceLifecycle="static",k&&_.warn("".concat(t," a beforeSendSpan callback using `withStreamedSpan`! ").concat(n));return}const s=new LR(e);e.on("afterSpanEnd",i=>{nn(i)&&s.add(uv(i,e))}),e.on("afterSegmentSpanEnd",i=>{const a=i.spanContext().traceId;setTimeout(()=>{s.flush(a)},500)})}});function Jr(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function dL(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=Jr(n);return o=>r.then(s=>o(s.transaction(t,"readwrite").objectStore(t)))}function Al(e){return Jr(e.getAllKeys())}function pL(e,t,n){return e(r=>Al(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.max(...o,0)+1),Jr(r.transaction)}))}function hL(e,t,n){return e(r=>Al(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.min(...o,0)-1),Jr(r.transaction)}))}function mL(e){return e(t=>Al(t).then(n=>{const r=n[0];if(r!=null)return Jr(t.get(r)).then(o=>(t.delete(r),Jr(t.transaction).then(()=>o)))}))}function gL(e){let t;function n(){return t==null&&(t=dL(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{push:async r=>{try{const o=mi(r);await pL(n(),o,e.maxQueueSize||30)}catch(o){}},unshift:async r=>{try{const o=mi(r);await hL(n(),o,e.maxQueueSize||30)}catch(o){}},shift:async()=>{try{const r=await mL(n());if(r)return yE(r)}catch(r){}}}}function _L(e){return t=>{const n=e({...t,createStore:gL});return w.addEventListener("online",async r=>{await n.flush()}),n}}function yL(e=cl){return _L(RT(e))}const Mp=1e6,SL="window"in H&&H.window===H&&typeof importScripts>"u",Vn=String(0),Cl=SL?"main":"worker",ot=w.navigator;let nS="",rS="",oS="",nu=(ot==null?void 0:ot.userAgent)||"",sS="";var Qp;const bL=(ot==null?void 0:ot.language)||((Qp=ot==null?void 0:ot.languages)==null?void 0:Qp[0])||"";function EL(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}const xp=ot==null?void 0:ot.userAgentData;EL(xp)&&xp.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{var t;if(nS=e.platform||"",oS=e.architecture||"",sS=e.model||"",rS=e.platformVersion||"",(t=e.fullVersionList)!=null&&t.length){const n=e.fullVersionList[e.fullVersionList.length-1];nu="".concat(n.brand," ").concat(n.version)}}).catch(e=>{});function vL(e){return!("thread_metadata"in e)}function TL(e){return vL(e)?CL(e):e}function IL(e){var n,r;const t=(r=(n=e.contexts)==null?void 0:n.trace)==null?void 0:r.trace_id;return typeof t=="string"&&t.length!==32&&k&&_.log("[Profiling] Invalid traceId: ".concat(t," on profiled event")),typeof t!="string"?"":t}function wL(e,t,n,r){if(r.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(n==null)throw new TypeError("Cannot construct profiling event envelope without a valid profile. Got ".concat(n," instead."));const o=IL(r),s=TL(n),i=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:me()*1e3),a=typeof r.timestamp=="number"?r.timestamp*1e3:me()*1e3;return{event_id:e,timestamp:new Date(i).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||Xo,runtime:{name:"javascript",version:w.navigator.userAgent},os:{name:nS,version:rS,build_number:nu},device:{locale:bL,model:sS,manufacturer:nu,architecture:oS,is_emulator:!1},debug_meta:{images:aS(n.resources)},profile:s,transactions:[{name:r.transaction||"",id:r.event_id||Me(),trace_id:o,active_thread_id:Vn,relative_start_ns:"0",relative_end_ns:((a-i)*1e6).toFixed(0)}]}}function RL(e,t,n){var i,a,c,u,f,l;if(e==null)throw new TypeError("Cannot construct profiling event envelope without a valid profile. Got ".concat(e," instead."));const r=AL(e),o=t.getOptions(),s=(a=(i=t.getSdkMetadata)==null?void 0:i.call(t))==null?void 0:a.sdk;return{chunk_id:Me(),client_sdk:{name:(c=s==null?void 0:s.name)!=null?c:"sentry.javascript.browser",version:(u=s==null?void 0:s.version)!=null?u:"0.0.0"},profiler_id:n||Me(),platform:"javascript",version:"2",release:(f=o.release)!=null?f:"",environment:(l=o.environment)!=null?l:"production",debug_meta:{images:aS(e.resources)},profile:r}}function kL(e){try{if(!e||typeof e!="object")return{reason:"chunk is not an object"};const t=r=>typeof r=="string"&&/^[a-f0-9]{32}$/.test(r);if(!t(e.profiler_id))return{reason:"missing or invalid profiler_id"};if(!t(e.chunk_id))return{reason:"missing or invalid chunk_id"};if(!e.client_sdk)return{reason:"missing client_sdk metadata"};const n=e.profile;return n?!Array.isArray(n.frames)||!n.frames.length?{reason:"profile has no frames"}
12:!Array.isArray(n.stacks)||!n.stacks.length?{reason:"profile has no stacks"}:!Array.isArray(n.samples)||!n.samples.length?{reason:"profile has no samples"}:{valid:!0}:{reason:"missing profile data"}}catch(t){return{reason:"unknown validation error: ".concat(t)}}}function AL(e){var a;const t=[];for(let c=0;c<e.frames.length;c++){const u=e.frames[c];u&&(t[c]={function:u.name,abs_path:typeof u.resourceId=="number"?e.resources[u.resourceId]:void 0,lineno:u.line,colno:u.column})}const n=[];for(let c=0;c<e.stacks.length;c++){const u=e.stacks[c];if(!u)continue;const f=[];let l=u;for(;l;)f.push(l.frameId),l=l.parentId===void 0?void 0:e.stacks[l.parentId];n[c]=f}const r=Ae(),o=typeof performance.timeOrigin=="number"?performance.timeOrigin:r||0,s=o-(r||o),i=[];for(let c=0;c<e.samples.length;c++){const u=e.samples[c];if(!u)continue;const f=(o+(u.timestamp-s))/1e3;i[c]={stack_id:(a=u.stackId)!=null?a:0,thread_id:Vn,timestamp:f}}return{frames:t,stacks:n,samples:i,thread_metadata:{[Vn]:{name:Cl}}}}function iS(e){return U(e).op==="pageload"}function CL(e){let t,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[Vn]:{name:Cl}}},o=e.samples[0];if(!o)return r;const s=o.timestamp,i=Ae(),a=typeof performance.timeOrigin=="number"?performance.timeOrigin:i||0,c=a-(i||a);return e.samples.forEach((u,f)=>{if(u.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[f]={elapsed_since_start_ns:((u.timestamp+c-s)*Mp).toFixed(0),stack_id:t,thread_id:Vn};return}let l=e.stacks[u.stackId];const d=[];for(;l;){d.push(l.frameId);const h=e.frames[l.frameId];h&&r.frames[l.frameId]===void 0&&(r.frames[l.frameId]={function:h.name,abs_path:typeof h.resourceId=="number"?e.resources[h.resourceId]:void 0,lineno:h.line,colno:h.column}),l=l.parentId===void 0?void 0:e.stacks[l.parentId]}const p={elapsed_since_start_ns:((u.timestamp+c-s)*Mp).toFixed(0),stack_id:n,thread_id:Vn};r.stacks[n]=d,r.samples[f]=p,n++}),r}function NL(e,t){if(!t.length)return e;for(const n of t)e[1].push([{type:"profile"},n]);return e}function ML(e){const t=[];return Zn(e,(n,r)=>{var o,s;if(r==="transaction")for(let i=1;i<n.length;i++){const a=n[i];(s=(o=a==null?void 0:a.contexts)==null?void 0:o.profile)!=null&&s.profile_id&&t.push(n[i])}}),t}function aS(e){const t=C(),n=t==null?void 0:t.getOptions(),r=n==null?void 0:n.stackParser;return r?mv(r,e):[]}function cS(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?(k&&_.warn("[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ".concat(JSON.stringify(e)," of type ").concat(JSON.stringify(typeof e),".")),!1):e===!0||e===!1?!0:e<0||e>1?(k&&_.warn("[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ".concat(e,".")),!1):!0}function xL(e){return e.samples.length<2?(k&&_.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):e.frames.length?!0:(k&&_.log("[Profiling] Discarding profile because it contains no frames"),!1)}let Nl=!1;const uS=3e4;function OL(e){return typeof e=="function"}function lS(){const e=w.Profiler;if(!OL(e)){k&&_.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}const t=10,n=Math.floor(uS/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch(r){k&&(_.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),_.log("[Profiling] Disabling profiling for current user session.")),Nl=!0}}function Op(e){if(Nl)return k&&_.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return k&&_.log("[Profiling] Discarding profile because root span was not sampled."),!1;const t=C(),n=t==null?void 0:t.getOptions();if(!n)return k&&_.log("[Profiling] Profiling disabled, no options found."),!1;const r=n.profilesSampleRate;return cS(r)?r?(r===!0?!0:Math.random()<r)?!0:(k&&_.log("[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ".concat(Number(r),")")),!1):(k&&_.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):(k&&_.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function PL(e){if(Nl)return k&&_.log("[Profiling] Profiling has been disabled for the duration of the current user session as the JS Profiler could not be started."),!1;if(e.profileLifecycle!=="trace"&&e.profileLifecycle!=="manual")return k&&_.warn("[Profiling] Session not sampled. Invalid `profileLifecycle` option."),!1;const t=e.profileSessionSampleRate;return cS(t)?t?Math.random()<=t:(k&&_.log("[Profiling] Discarding profile because profileSessionSampleRate is not defined or set to 0"),!1):(k&&_.warn("[Profiling] Discarding profile because of invalid profileSessionSampleRate."),!1)}function Us(e){return typeof e.profilesSampleRate<"u"}function LL(e,t,n,r){return xL(n)?wL(e,t,n,r):null}const Hn=new Map;function DL(){return Hn.size}function FL(e){const t=Hn.get(e);return t&&Hn.delete(e),t}function $L(e,t){if(Hn.set(e,t),Hn.size>30){const n=Hn.keys().next().value;n!==void 0&&Hn.delete(n)}}const fS=new WeakSet;function $i(e){e.setAttribute("thread.id",Vn),e.setAttribute("thread.name",Cl)}function Pp(e){let t;iS(e)&&(t=me()*1e3);const n=lS();if(!n)return;k&&_.log("[Profiling] started profiling span: ".concat(U(e).description));const r=Me();let o=null;W().setContext("profile",{profile_id:r,start_timestamp:t}),fS.add(e),$i(e);async function s(){if(e&&n){if(o){k&&_.log("[Profiling] profile for:",U(e).description,"already exists, returning early");return}return n.stop().then(u=>{if(i&&(w.clearTimeout(i),i=void 0),k&&_.log("[Profiling] stopped profiling of span: ".concat(U(e).description)),!u){k&&_.log("[Profiling] profiler returned null profile for: ".concat(U(e).description),"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started");return}o=u,$L(r,u)}).catch(u=>{k&&_.log("[Profiling] error while stopping profiler:",u)})}}let i=w.setTimeout(()=>{k&&_.log("[Profiling] max profile duration elapsed, stopping profiling for:",U(e).description),s()},uS);const a=e.end.bind(e);function c(){return e?(s().then(()=>{a()},()=>{a()}),e):a()}e.end=c}const BL=6e4,UL=3e5;class HL{constructor(){this._client=void 0,this._profiler=void 0,this._chunkTimer=void 0,this._profilerId=void 0,this._isRunning=!1,this._sessionSampled=!1,this._lifecycleMode=void 0,this._activeRootSpanIds=new Set,this._rootSpanTimeouts=new Map}initialize(t){const n=t.getOptions().profileLifecycle,r=PL(t.getOptions());k&&_.log("[Profiling] Initializing profiler (lifecycle='".concat(n,"').")),r||k&&_.log("[Profiling] Session not sampled. Skipping lifecycle profiler initialization."),this._profilerId=Me(),this._client=t,this._sessionSampled=r,this._lifecycleMode=n,n==="trace"&&this._setupTraceLifecycleListeners(t),t.on("spanStart",o=>{this._isRunning&&$i(o)})}
12start(){if(this._lifecycleMode==="trace"){k&&_.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.start()` are ignored in trace mode.');return}if(this._isRunning){k&&_.warn("[Profiling] Profile session is already running, `uiProfiler.start()` is a no-op.");return}if(!this._sessionSampled){k&&_.warn("[Profiling] Session is not sampled, `uiProfiler.start()` is a no-op.");return}this._beginProfiling()}stop(){if(this._lifecycleMode==="trace"){k&&_.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.stop()` are ignored in trace mode.');return}if(!this._isRunning){k&&_.warn("[Profiling] Profiler is not running, `uiProfiler.stop()` is a no-op.");return}this._endProfiling()}notifyRootSpanActive(t){if(this._lifecycleMode!=="trace"||!this._sessionSampled)return;const n=t.spanContext().spanId;if(!n||this._activeRootSpanIds.has(n))return;this._registerTraceRootSpan(n);const r=this._activeRootSpanIds.size;r===1&&(k&&_.log("[Profiling] Detected already active root span during setup. Active root spans now:",r),this._beginProfiling()),this._isRunning&&$i(t)}_beginProfiling(){if(!this._isRunning){if(this._isRunning=!0,k&&_.log("[Profiling] Started profiling with profiler ID:",this._profilerId),jn().setContext("profile",{profiler_id:this._profilerId}),this._startProfilerInstance(),!this._profiler){k&&_.log("[Profiling] Failed to start JS Profiler; stopping."),this._resetProfilerInfo();return}this._startPeriodicChunking()}}_endProfiling(){this._isRunning&&(this._isRunning=!1,this._chunkTimer&&(clearTimeout(this._chunkTimer),this._chunkTimer=void 0),this._clearAllRootSpanTimeouts(),this._collectCurrentChunk().catch(t=>{k&&_.error("[Profiling] Failed to collect current profile chunk on `stop()`:",t)}),this._lifecycleMode==="manual"&&jn().setContext("profile",{}))}_setupTraceLifecycleListeners(t){t.on("spanStart",n=>{if(!this._sessionSampled){k&&_.log("[Profiling] Span not profiled because of negative sampling decision for user session.");return}if(n!==Te(n))return;if(!n.isRecording()){k&&_.log("[Profiling] Discarding profile because root span was not sampled.");return}const r=n.spanContext().spanId;if(!r||this._activeRootSpanIds.has(r))return;this._registerTraceRootSpan(r);const o=this._activeRootSpanIds.size;o===1&&(k&&_.log("[Profiling] Root span ".concat(r," started. Profiling active while there are active root spans (count=").concat(o,").")),this._beginProfiling())}),t.on("spanEnd",n=>{if(!this._sessionSampled)return;const r=n.spanContext().spanId;if(!r||!this._activeRootSpanIds.has(r))return;this._activeRootSpanIds.delete(r);const o=this._activeRootSpanIds.size;k&&_.log("[Profiling] Root span with ID ".concat(r," ended. Will continue profiling for as long as there are active root spans (currently: ").concat(o,").")),o===0&&(this._collectCurrentChunk().catch(s=>{k&&_.error("[Profiling] Failed to collect current profile chunk on last `spanEnd`:",s)}),this._endProfiling())})}_resetProfilerInfo(){this._isRunning=!1,jn().setContext("profile",{})}_clearAllRootSpanTimeouts(){this._rootSpanTimeouts.forEach(t=>clearTimeout(t)),this._rootSpanTimeouts.clear()}_registerTraceRootSpan(t){this._activeRootSpanIds.add(t);const n=setTimeout(()=>this._onRootSpanTimeout(t),UL);this._rootSpanTimeouts.set(t,n)}_startProfilerInstance(){var n;if(((n=this._profiler)==null?void 0:n.stopped)===!1)return;const t=lS();if(!t){k&&_.log("[Profiling] Failed to start JS Profiler.");return}this._profiler=t}_startPeriodicChunking(){this._isRunning&&(this._chunkTimer=setTimeout(()=>{if(this._collectCurrentChunk().catch(t=>{k&&_.error("[Profiling] Failed to collect current profile chunk during periodic chunking:",t)}),this._isRunning){if(this._startProfilerInstance(),!this._profiler){this._resetProfilerInfo();return}this._startPeriodicChunking()}},BL))}_onRootSpanTimeout(t){this._rootSpanTimeouts.has(t)&&(this._rootSpanTimeouts.delete(t),this._activeRootSpanIds.has(t)&&(k&&_.log("[Profiling] Reached 5-minute timeout for root span ".concat(t,". You likely started a manual root span that never called `.end()`.")),this._activeRootSpanIds.delete(t),this._activeRootSpanIds.size===0&&this._endProfiling()))}async _collectCurrentChunk(){const t=this._profiler;if(this._profiler=void 0,!!t)try{const n=await t.stop(),r=RL(n,this._client,this._profilerId),o=kL(r);if("reason"in o){k&&_.log("[Profiling] Discarding invalid profile chunk (this is probably a bug in the SDK):",o.reason);return}this._sendProfileChunk(r),k&&_.log("[Profiling] Collected browser profile chunk.")}catch(n){k&&_.log("[Profiling] Error while stopping JS Profiler for chunk:",n)}}_sendProfileChunk(t){var a;const n=this._client,r=Qo((a=n.getSdkMetadata)==null?void 0:a.call(n)),o=n.getDsn(),s=n.getOptions().tunnel,i=lt({event_id:Me(),sent_at:new Date().toISOString(),...r&&{sdk:r},...!!s&&o&&{dsn:Ft(o)}},[[{type:"profile_chunk",platform:"javascript"},t]]);n.sendEnvelope(i).then(null,c=>{k&&_.error("Error while sending profile chunk envelope:",c)})}}const WL="BrowserProfiling",jL=()=>({name:WL,setup(e){const t=e.getOptions(),n=new HL;
12if(!Us(t)&&!t.profileLifecycle&&(t.profileLifecycle="manual"),Us(t)&&!t.profilesSampleRate){k&&_.log("[Profiling] Profiling disabled, no profiling options found.");return}const r=Ie(),o=r&&Te(r);if(Us(t)&&t.profileSessionSampleRate!==void 0&&k&&_.warn("[Profiling] Both legacy profiling (`profilesSampleRate`) and UI profiling settings are defined. `profileSessionSampleRate` has no effect when legacy profiling is enabled."),Us(t))o&&iS(o)&&Op(o)&&Pp(o),e.on("spanStart",s=>{const i=Te(s);s===i?Op(s)&&Pp(s):fS.has(i)&&$i(s)}),e.on("beforeEnvelope",s=>{var c,u;if(!DL())return;const i=ML(s);if(!i.length)return;const a=[];for(const f of i){const l=f==null?void 0:f.contexts,d=(c=l==null?void 0:l.profile)==null?void 0:c.profile_id,p=(u=l==null?void 0:l.profile)==null?void 0:u.start_timestamp;if(typeof d!="string"){k&&_.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!d){k&&_.log("[Profiling] cannot find profile for a span without a profile context");continue}l!=null&&l.profile&&delete l.profile;const h=FL(d);if(!h){k&&_.log("[Profiling] Could not retrieve profile for span: ".concat(d));continue}const m=LL(d,p,h,f);m&&a.push(m)}NL(s,a)});else{const s=t.profileLifecycle;if(e.on("startUIProfiler",()=>n.start()),e.on("stopUIProfiler",()=>n.stop()),s==="manual")n.initialize(e);else if(s==="trace"){if(!Ge(t)){k&&_.warn("[Profiling] `profileLifecycle` is 'trace' but tracing is disabled. Set a `tracesSampleRate` or `tracesSampler` to enable span tracing.");return}n.initialize(e),o&&n.notifyRootSpanActive(o),w.setTimeout(()=>{const i=Ie(),a=i&&Te(i);a&&n.notifyRootSpanActive(a)},0)}}}}),zL=jL,qL="SpotlightBrowser",GL=[{op:"ui.interaction.click",name:"#sentry-spotlight"}],VL=(e={})=>{const t=e.sidecarUrl||"http://localhost:8969/stream";return{name:qL,setup:()=>{k&&_.log("Using Sidecar URL",t)},beforeSetup(n){const r=n.getOptions();r.ignoreSpans=[...r.ignoreSpans||[],...GL]},afterAllSetup:n=>{YL(n,t)}}};function YL(e,t){const n=sl("fetch");let r=0;e.on("beforeEnvelope",o=>{if(r>3){_.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",r);return}n(t,{method:"POST",body:mi(o),headers:{"Content-Type":"application/x-sentry-envelope"},mode:"cors"}).then(s=>{s.status>=200&&s.status<400&&(r=0)},s=>{r++,_.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/",s)})})}const JL=VL,KL=()=>({name:"LaunchDarkly",processEvent(e,t,n){return ro(e)}});function XL(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(e,t,n)=>{tr(e,t.value),nr(e,t.value)}}}const QL=()=>({name:"OpenFeature",processEvent(e,t,n){return ro(e)}});class ZL{after(t,n){tr(n.flagKey,n.value),nr(n.flagKey,n.value)}error(t,n,r){tr(t.flagKey,t.defaultValue),nr(t.flagKey,t.defaultValue)}}const eD=({featureFlagClientClass:e})=>({name:"Unleash",setupOnce(){const t=e.prototype;De(t,"isEnabled",tD)},processEvent(t,n,r){return ro(t)}});function tD(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"?(tr(n,r),nr(n,r)):k&&_.error("[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ".concat(n," (").concat(typeof n,"), result: ").concat(r," (").concat(typeof r,")")),r}}const nD=({growthbookClass:e})=>nI({growthbookClass:e}),rD=({featureFlagClient:e})=>({name:"Statsig",setup(t){e.on("gate_evaluation",n=>{tr(n.gate.name,n.gate.value),nr(n.gate.name,n.gate.value)})},processEvent(t,n,r){return ro(t)}});async function oD(){const e=C();if(!e)return"no-client-active";if(!e.getDsn())return"no-dsn-configured";const r=e.getOptions().tunnel||"https://o447951.ingest.sentry.io/api/4509632503087104/envelope/?sentry_version=7&sentry_key=c1dfb07d783ad5325c245c1fd3725390&sentry_client=sentry.javascript.browser%2F1.33.7";try{await hm(()=>fetch(r,{body:"{}",method:"POST",mode:"cors",credentials:"omit"}))}catch(o){return"sentry-unreachable"}}const sD="WebWorker",iD=({worker:e})=>({name:sD,setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(t=>Lp(t))},addWorker:t=>Lp(t)});function Lp(e){e.addEventListener("message",t=>
12{if(uD(t.data)){if(t.stopImmediatePropagation(),t.data._sentryDebugIds&&(k&&_.log("Sentry debugId web worker message received",t.data),w._sentryDebugIds={...t.data._sentryDebugIds,...w._sentryDebugIds}),t.data._sentryModuleMetadata&&(k&&_.log("Sentry module metadata web worker message received",t.data),w._sentryModuleMetadata={...t.data._sentryModuleMetadata,...w._sentryModuleMetadata}),t.data._sentryWasmImages){k&&_.log("Sentry WASM images web worker message received",t.data);const n=w._sentryWasmImages||[],r=t.data._sentryWasmImages.filter(o=>He(o)&&typeof o.code_file=="string"&&!n.some(s=>s.code_file===o.code_file));w._sentryWasmImages=[...n,...r]}t.data._sentryWorkerError&&(k&&_.log("Sentry worker rejection message received",t.data._sentryWorkerError),aD(t.data._sentryWorkerError))}})}function aD(e){const t=C();if(!t)return;const n=t.getOptions().stackParser,r=t.getOptions().attachStacktrace,o=e.reason,s=Mt(o)?z_(o):ua(n,o,void 0,r,!0);s.level="error",e.filename&&(s.contexts={...s.contexts,worker:{filename:e.filename}}),no(s,{originalException:o,mechanism:{handled:!1,type:"auto.browser.web_worker.onunhandledrejection"}}),k&&_.log("Captured worker unhandled rejection",o)}function cD({self:e}){var t,n;e.postMessage({_sentryMessage:!0,_sentryDebugIds:(t=e._sentryDebugIds)!=null?t:void 0,_sentryModuleMetadata:(n=e._sentryModuleMetadata)!=null?n:void 0}),e.addEventListener("unhandledrejection",r=>{var i;const s={reason:j_(r),filename:(i=e.location)==null?void 0:i.href};e.postMessage({_sentryMessage:!0,_sentryWorkerError:s}),k&&_.log("[Sentry Worker] Forwarding unhandled rejection to parent",s)}),k&&_.log("[Sentry Worker] Registered worker with unhandled rejection handling")}function uD(e){if(!He(e)||e._sentryMessage!==!0)return!1;const t="_sentryDebugIds"in e,n="_sentryModuleMetadata"in e,r="_sentryWorkerError"in e,o="_sentryWasmImages"in e;return!(!t&&!n&&!r&&!o||t&&!(He(e._sentryDebugIds)||e._sentryDebugIds===void 0)||n&&!(He(e._sentryModuleMetadata)||e._sentryModuleMetadata===void 0)||r&&!He(e._sentryWorkerError)||o&&(!Array.isArray(e._sentryWasmImages)||!e._sentryWasmImages.every(s=>He(s)&&typeof s.code_file=="string")))}function lD(e){return He(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function dS(e){const t={...e};rg(t,"react"),Cu("react",{version:ke.version});const n=sN(t);return kh(fD),n}function fD(e){return lD(e)?"[SyntheticEvent]":ul(e)}function dD(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}function pD(e,t){const n=new WeakSet;function r(o,s){if(!n.has(o)){if(o.cause)return n.add(o),r(o.cause,s);o.cause=s}}r(e,t)}function Ml(e,{componentStack:t},n){if(dD(ke.version)&&kt(e)&&t){const r=new Error(e.message);r.name="React ErrorBoundary ".concat(e.name),r.stack=t,pD(e,r)}return ge(e,n)}function hD(e){return(t,n)=>{const r=!!e,o=Ml(t,n,{mechanism:{handled:r,type:"auto.function.react.error_handler"}});r&&e(t,n,o)}}const pS="ui.react.render",mD="ui.react.update",hS="ui.react.mount",gD={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},_D={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},yD={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},mS={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},SD=Symbol.for("react.forward_ref"),gS=Symbol.for("react.memo");function bD(e){return typeof e=="object"&&e!==null&&e.$$typeof===gS}const xl={};xl[SD]=yD;xl[gS]=mS;function Dp(e){if(bD(e))return mS;const t=e.$$typeof;return t&&xl[t]||gD}const ED=Object.defineProperty.bind(Object),vD=Object.getOwnPropertyNames.bind(Object);var Zp;const Fp=(Zp=Object.getOwnPropertySymbols)==null?void 0:Zp.bind(Object),$p=Object.getOwnPropertyDescriptor.bind(Object),TD=Object.getPrototypeOf.bind(Object),Bp=Object.prototype;function gs(e,t,n){if(typeof t!="string"){if(Bp){const i=TD(t);i&&i!==Bp&&gs(e,i)}let r=vD(t);Fp&&(r=r.concat(Fp(t)));const o=Dp(e),s=Dp(t);for(const i of r)if(!_D[i]&&!(s!=null&&s[i])&&!(o!=null&&o[i])&&!$p(e,i)){const a=$p(t,i);if(a)try{ED(e,i,a)}catch(c){}}}return e}const ID="unknown";class Ol extends ke.Component{constructor(t){super(t);const{name:n,disabled:r=!1}=this.props;r||(this._mountSpan=Ve({name:"<".concat(n,">"),onlyIfParent:!0,op:hS,attributes:{[G]:"auto.ui.react.profiler","ui.component_name":n}}))}componentDidMount(){this._mountSpan&&this._mountSpan.end()}shouldComponentUpdate({updateProps:t,includeUpdates:n=!0}){if(n&&this._mountSpan&&t!==this.props.updateProps){const r=Object.keys(t).filter(o=>t[o]!==this.props.updateProps[o]);if(r.length>0){const o=me();this._updateSpan=er(this._mountSpan,()=>Ve({name:"<".concat(this.props.name,">"),onlyIfParent:!0,op:mD,startTime:o,attributes:{[G]:"auto.ui.react.profiler","ui.component_name":this.props.name,"ui.react.changed_props":r}}))}}return!0}componentDidUpdate(){this._updateSpan&&(this._updateSpan.end(),this._updateSpan=void 0)}componentWillUnmount(){const t=me(),{name:n,includeRender:r=!0}=this.props;if(this._mountSpan&&r){const o=U(this._mountSpan).timestamp;er(this._mountSpan,()=>{const s=Ve({onlyIfParent:!0,name:"<".concat(n,">"),op:pS,startTime:o,attributes:{[G]:"auto.ui.react.profiler","ui.component_name":n}});s&&s.end(t)})}}render(){return this.props.children}}Object.assign(Ol,{defaultProps:{disabled:!1,includeRender:!0,includeUpdates:!0}});function wD(e,t){const n=(t==null?void 0:t.name)||e.displayName||e.name||ID,r=o=>ke.createElement(Ol,{...t,name:n,updateProps:o},ke.createElement(e,{...o}));return r.displayName="profiler(".concat(n,")"),gs(r,e),r}function RD(e,t={disabled:!1,hasRenderSpan:!0}
12){const[n]=ke.useState(()=>{if(!(t!=null&&t.disabled))return Ve({name:"<".concat(e,">"),onlyIfParent:!0,op:hS,attributes:{[G]:"auto.ui.react.profiler","ui.component_name":e}})});ke.useEffect(()=>(n&&n.end(),()=>{if(n&&t.hasRenderSpan){const r=U(n).timestamp,o=me(),s=Ve({name:"<".concat(e,">"),onlyIfParent:!0,op:pS,startTime:r,attributes:{[G]:"auto.ui.react.profiler","ui.component_name":e}});s&&s.end(o)}}),[])}const xe=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,kD="unknown",uc={componentStack:null,error:null,eventId:null};class _S extends ke.Component{constructor(t){super(t),this.state=uc,this._openFallbackReportDialog=!0;const n=C();n&&t.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=n.on("afterSendEvent",r=>{!r.type&&this._lastEventId&&r.event_id===this._lastEventId&&zc({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,n){const{componentStack:r}=n,{beforeCapture:o,onError:s,showDialog:i,dialogOptions:a}=this.props;Ye(c=>{o&&o(c,t,r);const u=this.props.handled!=null?this.props.handled:!!this.props.fallback,f=Ml(t,n,{mechanism:{handled:u,type:"auto.function.react.error_boundary"}});s&&s(t,r,f),i&&(this._lastEventId=f,this._openFallbackReportDialog&&zc({...a,eventId:f})),this.setState({error:t,componentStack:r,eventId:f})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:n,eventId:r}=this.state,{onUnmount:o}=this.props;o&&(this.state===uc?o(null,null,null):o(t,n,r)),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}resetErrorBoundary(){const{onReset:t}=this.props,{error:n,componentStack:r,eventId:o}=this.state;t&&t(n,r,o),this.setState(uc)}render(){const{fallback:t,children:n}=this.props,r=this.state;if(r.componentStack===null)return typeof n=="function"?n():n;const o=typeof t=="function"?ke.createElement(t,{error:r.error,componentStack:r.componentStack,resetError:()=>this.resetErrorBoundary(),eventId:r.eventId}):t;return ke.isValidElement(o)?o:(t&&xe&&_.warn("fallback did not produce a valid ReactElement"),null)}}function AD(e,t){const n=e.displayName||e.name||kD,r=ke.memo(o=>ke.createElement(_S,{...t},ke.createElement(e,{...o})));return r.displayName="errorBoundary(".concat(n,")"),gs(r,e),r}const CD="redux.action",ND="info",MD={attachReduxState:!0,actionTransformer:e=>e,stateTransformer:e=>e||null};function xD(e){const t={...MD,...e};return n=>(r,o)=>{t.attachReduxState&&jn().addEventProcessor((a,c)=>{try{a.type===void 0&&a.contexts.state.state.type==="redux"&&(c.attachments=[...c.attachments||[],{filename:"redux_state.json",data:JSON.stringify(a.contexts.state.state.value)}])}catch(u){}return a});function s(a){return(c,u)=>{const f=a(c,u),l=W(),d=t.actionTransformer(u);typeof d<"u"&&d!==null&&vt({category:CD,data:d,type:ND});const p=t.stateTransformer(f);if(typeof p<"u"&&p!==null){const m=C(),g=m==null?void 0:m.getOptions(),y=(g==null?void 0:g.normalizeDepth)||3,b={state:{type:"redux",value:p}};ab(b,3+y),l.setContext("state",b)}else l.setContext("state",null);const{configureScopeWithState:h}=t;return typeof h=="function"&&h(l,f),f}}const i=n(s(r),o);return i.replaceReducer=new Proxy(i.replaceReducer,{apply:function(a,c,u){a.apply(c,[s(u[0])])}}),i}}function OD(e){const t=fr({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,match:o,instrumentPageLoad:s=!0,instrumentNavigation:i=!0}=e;return{...t,afterAllSetup(a){t.afterAllSetup(a),s&&w.location&&Up(r,w.location,o,(c,u="url")=>{lo(a,{name:c,attributes:{[ae]:"pageload",[G]:"auto.pageload.react.reactrouter_v3",[ue]:u,...u==="route"&&{[et]:c}}})}),i&&n.listen&&n.listen(c=>{(c.action==="PUSH"||c.action==="POP")&&Up(r,c,o,(u,f="url")=>{fo(a,{name:u,attributes:{[ae]:"navigation",[G]:"auto.navigation.react.reactrouter_v3",[ue]:f,...f==="route"&&{[et]:u}}})})})}}}function Up(e,t,n,r){let o=t.pathname;n({location:t,routes:e},(s,i,a)=>{if(s||!a)return r(o);const c=PD(a.routes||[]);return c.length===0||c==="/*"?r(o):(o=c,r(o,"route"))})}function PD(e){var r;if(!Array.isArray(e)||e.length===0)return"";const t=e.filter(o=>!!o.path);let n=-1;for(let o=t.length-1;o>=0;o--)if((r=t[o].path)!=null&&r.startsWith("/")){n=o;break}return t.slice(n).reduce((o,{path:s})=>{const i=o==="/"||o===""?s:"/".concat(s);return"".concat(o).concat(i)},"")}function LD(e,t={}){const n=e,r=fr({...t,instrumentNavigation:!1,instrumentPageLoad:!1}),{instrumentPageLoad:o=!0,instrumentNavigation:s=!0}=t;return{...r,afterAllSetup(i){r.afterAllSetup(i);const a=(f,l)=>{const d=n.matchRoutes(f,l,{preload:!1,throwOnError:!1}),p=d[d.length-1];return(p==null?void 0:p.routeId)!=="__root__"?p:void 0},c=(f,l,d,p)=>{f.updateName(l?l.routeId:p),f.setAttribute(ue,l?"route":"url"),f.setAttributes({...l&&{[et]:l.routeId},...DD(n,d),...lc(l)})},u=w.location;if(o&&u){const f=a(u.pathname,n.options.parseSearch(u.search)),l=lo(i,{name:f?f.routeId:u.pathname,attributes:{[ae]:"pageload",[G]:"auto.pageload.react.tanstack_router",[ue]:f?"route":"url",...f&&{[et]:f.routeId},...lc(f)}}),d=n.subscribe("onResolved",p=>{if(d(),!l)return;const{toLocation:h}=p,m=a(h.pathname,h.search);c(l,m,h,h.pathname)})}if(s){let f;n.subscribe("onBeforeLoad",l=>{var g;const{toLocation:d,fromLocation:p}=l;if(!p||d.state===p.state)return;const h=a(d.pathname,d.search),m=((g=w.location)==null?void 0:g.pathname)||d.pathname;if(f){c(f,h,d,m);return}f=fo(i,{name:h?h.routeId:m,attributes:{[ae]:"navigation",[G]:"auto.navigation.react.tanstack_router",[ue]:h?"route":"url",...h&&{[et]:h.routeId},...lc(h)}},{url:yS(n,d)})}),n.subscribe("onResolved",l=>{var m;const d=f;if(f=void 0,!d)return;const{toLocation:p}=l,h=a(p.pathname,p.search);
12h&&c(d,h,p,((m=w.location)==null?void 0:m.pathname)||p.pathname)})}}}}function yS(e,t){var o,s,i;const n=(i=(s=(o=e.options).stringifySearch)==null?void 0:s.call(o,t.search))!=null?i:"",r="".concat(t.pathname).concat(n&&n!=="?"?n:"");return x_(r)}function DD(e,t){const n=yS(e,t);return{[Tm]:t.pathname,[Cn]:n}}function lc(e){if(!e)return{};const t={};return Object.entries(e.params).forEach(([n,r])=>{t["url.path.params.".concat(n)]=r,t["".concat(cv,".").concat(n)]=r,t["".concat(rv,".").concat(n)]=r}),t}function FD(e){const t=fr({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,matchPath:o,instrumentPageLoad:s=!0,instrumentNavigation:i=!0}=e;return{...t,afterAllSetup(a){t.afterAllSetup(a),SS(a,s,i,n,"reactrouter_v4",r,o)}}}function $D(e){const t=fr({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,matchPath:o,instrumentPageLoad:s=!0,instrumentNavigation:i=!0}=e;return{...t,afterAllSetup(a){t.afterAllSetup(a),SS(a,s,i,n,"reactrouter_v5",r,o)}}}function SS(e,t,n,r,o,s=[],i){function a(){if(r.location)return r.location.pathname;if(w.location)return w.location.pathname}function c(u){if(s.length===0||!i)return[u,"url"];const f=bS(s,u,i);for(const l of f)if(l.match.isExact)return[l.match.path,"route"];return[u,"url"]}if(t){const u=a();if(u){const[f,l]=c(u);lo(e,{name:f,attributes:{[ae]:"pageload",[G]:"auto.pageload.react.".concat(o),[ue]:l,...l==="route"&&{[et]:f}}})}}n&&r.listen&&r.listen((u,f)=>{if(f&&(f==="PUSH"||f==="POP")){const[l,d]=c(u.pathname);fo(e,{name:l,attributes:{[ae]:"navigation",[G]:"auto.navigation.react.".concat(o),[ue]:d,...d==="route"&&{[et]:l}}})}})}function bS(e,t,n,r=[]){return e.some(o=>{const s=o.path?n(t,o):r.length?r[r.length-1].match:BD(t);return s&&(r.push({route:o,match:s}),o.routes&&bS(o.routes,t,n,r)),!!s}),r}function BD(e){return{path:"/",url:"/",params:{},isExact:e==="/"}}function UD(e){const t=e.displayName||e.name,n=r=>{var o;if((o=r==null?void 0:r.computedMatch)!=null&&o.isExact){const s=r.computedMatch.path,i=HD();W().setTransactionName(s),i&&(i.updateName(s),i.setAttributes({[ue]:"route",[et]:s}))}return ke.createElement(e,{...r})};return n.displayName="sentryRoute(".concat(t,")"),gs(n,e),n}function HD(){const e=Ie(),t=e&&Te(e);if(!t)return;const n=U(t).op;return n==="navigation"||n==="pageload"?t:void 0}function po(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 Hp=new WeakMap;function WD(e,t,n){if(!e||!(t!=null&&t.length))return null;const r=n?po(e,n):e;let o=Hp.get(t);o||(o=YD(t),Hp.set(t,o),xe&&_.log("[React Router] Sorted route manifest by specificity:",o.length,"patterns"));for(const s of o)if(jD(r,s))return xe&&_.log("[React Router] Matched pathname",r,"to pattern",s),s;return xe&&_.log("[React Router] No manifest match found for pathname:",r),null}function jD(e,t){if(t==="/")return e==="/"||e==="";const n=jp(e),r=jp(t);if(r.length>0&&r[r.length-1]==="*"){const s=r.slice(0,-1);if(n.length<s.length)return!1;for(const[i,a]of s.entries())if(!Wp(n[i],a))return!1;return!0}if(n.length!==r.length)return!1;for(const[s,i]of r.entries())if(!Wp(n[s],i))return!1;return!0}function Wp(e,t){return e===void 0||t===void 0?!1:ES.test(t)?!0:e===t}function jp(e){return e.split("/").filter(Boolean)}const ES=/^:[\w-]+$/,zD=10,qD=3,GD=1,VD=-2;function zp(e){const t=e.split("/");let n=t.length;t.includes("*")&&(n+=VD);for(const r of t)r!=="*"&&(ES.test(r)?n+=qD:r===""?n+=GD:n+=zD);return n}function YD(e){return[...e].sort((t,n)=>{const r=zp(t);return zp(n)-r})}let ka,Yn=!1;const hn=[],JD=10;function KD(e,t){const n={};return hn.length>=JD&&(xe&&_.warn("[React Router] Navigation context stack overflow - removing oldest context"),hn.shift()),hn.push({token:n,targetPath:e,span:t}),n}function XD(e){const t=hn[hn.length-1];(t==null?void 0:t.token)===e&&hn.pop()}function vS(){var t;const e=hn.length;return e>0&&(t=hn[e-1])!=null?t:null}function QD(e,t=!1){ka=e,Yn=t}function ZD(e){return IS(e.route.path||"")}function TS(e){return e.params["*"]||""}function IS(e){return e[e.length-1]==="*"?e.slice(0,-1):e}function Jn(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function wS(e){return e.endsWith("*")}function Tn(e){return e.includes("/*")||e.endsWith("*")}function qp(e,t){var n;return wS(e)&&!!((n=t.route.children)!=null&&n.length)||!1}function RS(e){var t;return!!(!e.children&&e.element&&((t=e.path)!=null&&t.endsWith("/*")))}function eF(e,t,n){const r=e&&e.length>0?e:Yn?po(t,n):t;let o=r.slice(-2)==="/*"?r.slice(0,-2):r;return o.length>1&&o[o.length-1]==="/"&&(o=o.slice(0,-1)),[o,"route"]}function Gp(e){return e.split(/\\?\//).filter(t=>t.length>0&&t!==",").length}function ln(e){return e[0]==="/"?e:"/".concat(e)}function Pl(e,t){const n=ka(e,t);if(!n||n.length===0)return"";for(const r of n)if(r.route.path&&r.route.path!=="*"){const o=ZD(r),s=po(t.pathname,ln(r.pathnameBase));return t.pathname===s?Jn(s):Jn(Jn(o||"")+ln(Pl(e.filter(i=>i!==r.route),{pathname:s})))}return""}function tF(e,t,n){const r=t.filter(RS);if(!r.length)return;const o=ka(r,e),s=o==null?void 0:o[o.length-1];if(!s||!TS(s))return;const i=Jn(IS(s.route.path||""));if(!i)return;const a=ln(i),c=i.split("/")[0],u=(c==null?void 0:c.startsWith(":"))&&(n==null?void 0:n.split("/").includes(c));if(n===a||n!=null&&n.startsWith("".concat(a,"/"))||u)return;const f=po(e.pathname,ln(s.pathnameBase))||"/",l=Pl(t.filter(d=>d!==s.route),{pathname:f});
12return l?ln("".concat(i).concat(ln(l))):void 0}function nF(e,t){const n=ka(t,e);if(n){for(const r of n)if(RS(r.route)&&TS(r))return!0}return!1}function Vp(e,t){return Yn?po(e.pathname,t):e.pathname||""}function rF(e,t,n,r=""){if(!e||e.length===0)return[Yn?po(t.pathname,r):t.pathname,"url"];if(!n)return[Vp(t,r),"url"];let o="";for(const s of n){const i=s.route;if(!i)continue;if(i.index)return eF(o,s.pathname,r);const a=i.path;if(!a||qp(a,s))continue;const c=a[0]==="/"||o[o.length-1]==="/"?a:"/".concat(a);if(o=Jn(o)+ln(c),Jn(t.pathname)===Jn(r+s.pathname))return Gp(o)!==Gp(s.pathname)&&!wS(o)?[(Yn?"":r)+c,"route"]:(qp(o,s)&&(o=o.slice(0,-1)),[(Yn?"":r)+o,"route"])}return[Vp(t,r),"url"]}function Aa(e,t,n,r,o="",s,i){if(i&&s&&s.length>0){const l=WD(e.pathname,s,o);if(l)return[(Yn?"":o)+l,"route"]}let a,c="url";const u=nF(e,n);u&&(a=ln(Pl(n,e)),c="route"),(!u||!a)&&([a,c]=rF(t,e,r,o));const f=tF(e,n,a);return f?[f,"route"]:[a||e.pathname,c]}function Pt(){const e=Ie(),t=e?Te(e):void 0;if(!t)return;const n=U(t).op;return n==="navigation"||n==="pageload"?t:void 0}function oF(){const e=vS();if(e)return e.targetPath?{pathname:e.targetPath,search:"",hash:"",state:null,key:"default"}:null;if(typeof w<"u")try{const t=w.location;if(t)return{pathname:t.pathname,search:t.search||"",hash:t.hash||"",state:null,key:"default"}}catch(t){xe&&_.warn("[React Router] Could not access window.location")}return null}function sF(){const e=vS();return e?e.span:Pt()}function iF(e,t,n,r){const o=new Proxy(e,{apply(s,i,a){const c=oF(),u=sF(),f=s.apply(i,a);return aF(f,t,n,r,c,u),f}});return ve(o,"__sentry_proxied__",!0),o}function aF(e,t,n,r,o,s){Rn(e)?e.then(i=>{Array.isArray(i)&&r(i,t,o!=null?o:void 0,s)}).catch(i=>{xe&&_.warn("Error resolving async handler '".concat(n,"' for route"),t,i)}):Array.isArray(e)&&r(e,t,o!=null?o:void 0,s)}function Ca(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]=iF(r,e,n,t))}if(Array.isArray(e.children))for(const n of e.children)Ca(n,t)}let Kr,mn,gn,ii,ut,Nn=!1,Wn=3e3,_s,Ll="";const kS=new WeakSet,AS=w!=null&&w.document?ke.useLayoutEffect:ke.useEffect,$n=new WeakMap,Le=new Set,ai=new WeakMap,ru=new WeakMap;function cF(e){return w!=null&&w.requestAnimationFrame?w.requestAnimationFrame(e):setTimeout(e,0)}function Yp(e){w!=null&&w.cancelAnimationFrame?w.cancelAnimationFrame(e):clearTimeout(e)}function CS(e){return"".concat(e.pathname).concat(e.search||"").concat(e.hash||"")}function Jp(e){return e.includes(":")||e.includes("*")}function uF(e,t,n,r){var s;if(!e)return{skip:!1,shouldUpdate:!1};if(e.locationKey===t&&(e.isPlaceholder||!r)){const i=!!e.routeName&&Tn(e.routeName),a=Tn(n),c=!!e.routeName&&Jp(e.routeName),u=Jp(n),f=i&&!a,l=!c&&u,d=n!==e.routeName&&n.length>(((s=e.routeName)==null?void 0:s.length)||0)&&!a;return{skip:!0,shouldUpdate:!!(e.routeName&&(f||l||d))}}return{skip:!1,shouldUpdate:!1}}function NS(e,t){const n=t.children||[],r=e.filter(o=>!n.some(s=>s===o||o.path&&s.path===o.path||o.id&&s.id===o.id));r.length>0&&(t.children=[...n,...r])}function MS(e,t){let n=ai.get(e);n||(n=new Set,ai.set(e,n)),n.add(t),t.finally(()=>{const r=ai.get(e);r&&r.delete(t)})}function xS(e){const t=new Promise(n=>{ru.set(e,n)});MS(e,t)}function lF(e){const t=ru.get(e);t&&(t(),ru.delete(e),e.__sentry_may_have_lazy_routes__&&(e.__sentry_may_have_lazy_routes__=!1))}function Dl(e,t,n=null,r){e.forEach(s=>{Le.add(s),Nn&&Ca(s,Dl)}),t&&NS(e,t);const o=r!=null?r:Pt();if(o){const s=U(o);if(s.timestamp){xe&&_.warn("[React Router] Lazy handler resolved after span ended - skipping update");return}const i=s.op;let a=n;if(!a&&!r&&typeof w<"u"){const c=w.location;c!=null&&c.pathname&&(a={pathname:c.pathname})}a&&(i==="pageload"?Ss({activeRootSpan:o,location:{pathname:a.pathname},routes:Array.from(Le),allRoutes:Array.from(Le)}):i==="navigation"&&ou(o,a,Array.from(Le),!1,ut))}}function ou(e,t,n,r=!1,o){var f;const s=U(e),i=s.description,a=e==null?void 0:e.__sentry_navigation_name_set__,c=i&&Tn(i);if((!a||r||c)&&!s.timestamp){const l=o(n,t),[d,p]=Aa(t,n,n,l||[],Ll,_s,Nn),h=(f=s.data)==null?void 0:f[ue];d&&(!i||!a&&(h!=="route"||p==="route")||h!=="route"&&p==="route"||h==="route"&&p==="route"&&c)&&(e.updateName(d),e.setAttribute(ue,p),p==="route"&&e.setAttribute(et,d),!Tn(d)&&p==="route"&&ve(e,"__sentry_navigation_name_set__",!0))}}function OS(e,t,n,r,o){let s=!1,i=!!o&&U(o).op==="pageload",a=!1,c=null,u=null;e.subscribe(f=>{if(!s){const d=Pt();d&&U(d).op==="pageload"?i=!0:i&&(f.historyAction==="POP"&&!a?a=!0:s=!0)}if(f.historyAction==="PUSH"||f.historyAction==="POP"&&s){const d=CS(f.location),p=()=>{u!==d&&(u=d,c=null,Hl({location:f.location,routes:t,navigationType:f.historyAction,version:n,base
12name:r,allRoutes:Array.from(Le)}))};f.navigation.state!=="idle"?(u!==d&&(u=null),c!==null&&Yp(c),c=cF(p)):(c!==null&&(Yp(c),c=null),p())}})}function Fl(e,t){return!Kr||!mn||!gn||!ut?(xe&&_.warn("reactRouter".concat(t?"V".concat(t):"","Instrumentation was unable to wrap the `createRouter` function because of one or more missing parameters.")),e):function(n,r){if(ys(n),Nn)for(const u of n)Ca(u,Dl);const o=Pt();r&&"patchRoutesOnNavigation"in r&&typeof r.patchRoutesOnNavigation=="function"&&o&&(ve(o,"__sentry_may_have_lazy_routes__",!0),xS(o));const i=PS(r,!1,o),a=e(n,i),c=r==null?void 0:r.basename;return a.state.historyAction==="POP"&&o&&Ss({activeRootSpan:o,location:a.state.location,routes:n,basename:c,allRoutes:Array.from(Le)}),Ll=c||"",OS(a,n,t,c,o),a}}function $l(e,t){return!Kr||!mn||!gn||!ut?(xe&&_.warn("reactRouter".concat(t?"V".concat(t):"","Instrumentation was unable to wrap the `createMemoryRouter` function because of one or more missing parameters.")),e):function(n,r){if(ys(n),Nn)for(const g of n)Ca(g,Dl);const o=Pt();r&&"patchRoutesOnNavigation"in r&&typeof r.patchRoutesOnNavigation=="function"&&o&&(ve(o,"__sentry_may_have_lazy_routes__",!0),xS(o));const i=PS(r,!0,o),a=e(n,i),c=r==null?void 0:r.basename;let u;const f=r==null?void 0:r.initialEntries,l=r==null?void 0:r.initialIndex,d=(f==null?void 0:f.length)===1,p=l!==void 0&&(f==null?void 0:f[l]);u=d?f[0]:p?f[l]:void 0;const h=u?typeof u=="string"?{pathname:u}:u:a.state.location,m=Pt();return a.state.historyAction==="POP"&&m&&Ss({activeRootSpan:m,location:h,routes:n,basename:c,allRoutes:Array.from(Le)}),Ll=c||"",OS(a,n,t,c,m),a}}function Bl(e,t){const n=fr({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{useEffect:r,useLocation:o,useNavigationType:s,createRoutesFromChildren:i,matchRoutes:a,stripBasename:c,enableAsyncRouteHandlers:u=!1,instrumentPageLoad:f=!0,instrumentNavigation:l=!0,lazyRouteTimeout:d,lazyRouteManifest:p}=e;return{...n,setup(h){var b,E;n.setup(h);const m=(b=e.finalTimeout)!=null?b:3e4,g=((E=e.idleTimeout)!=null?E:1e3)*3,y=d!=null?d:g;y===1/0?(Wn=m,xe&&_.log("[React Router] lazyRouteTimeout set to Infinity, capping at finalTimeout:",m,"ms to prevent indefinite hangs")):Number.isNaN(y)?(xe&&_.warn("[React Router] lazyRouteTimeout must be a number, falling back to default:",g),Wn=g):y<0?(xe&&_.warn("[React Router] lazyRouteTimeout must be non-negative or Infinity, got:",y,"falling back to:",g),Wn=g):Wn=y,Kr=r,mn=o,gn=s,ut=a,ii=i,Nn=u,_s=p,QD(a,c||!1)},afterAllSetup(h){var g;n.afterAllSetup(h);const m=(g=w.location)==null?void 0:g.pathname;f&&m&&lo(h,{name:m,attributes:{[ue]:"url",[ae]:"pageload",[G]:"auto.pageload.react.reactrouter".concat(t?"_v".concat(t):"")}}),l&&kS.add(h)}}}function Ul(e,t){if(!Kr||!mn||!gn||!ut)return xe&&_.warn("reactRouterV6Instrumentation was unable to wrap `useRoutes` because of one or more missing parameters."),e;const n=r=>{const o=ke.useRef(!0),{routes:s,locationArg:i}=r,a=e(s,i),c=mn(),u=gn(),f=typeof i=="string"||i!=null&&i.pathname?i:c;return AS(()=>{const l=typeof f=="string"?{pathname:f}:f;o.current?(ys(s),Ss({activeRootSpan:Pt(),location:l,routes:s,allRoutes:Array.from(Le)}),o.current=!1):Hl({location:l,routes:s,navigationType:u,version:t,allRoutes:Array.from(Le)})},[u,f]),a};return(r,o)=>ke.createElement(n,{routes:r,locationArg:o})}function PS(e,t=!1,n){if(!e||!("patchRoutesOnNavigation"in e)||typeof e.patchRoutesOnNavigation!="function")return e||{};const r=e.patchRoutesOnNavigation;return{...e,patchRoutesOnNavigation:async o=>{var c;const s=o==null?void 0:o.path,i=(c=Pt())!=null?c:n;if(!t){const u=o==null?void 0:o.patch,f=o==null?void 0:o.matches;u&&(o.patch=(l,d)=>{if(ys(d),f&&f.length>0){const h=f[f.length-1],m=h==null?void 0:h.route;if(m){const g=Array.from(Le).find(y=>{const b=y.id!==void 0&&y.id===l,E=y===m,v=y.path!==void 0&&m.path!==void 0&&y.path===m.path;return b||E||v});g&&NS(d,g)}}const p=i?U(i):void 0;return s&&i&&p&&!p.timestamp&&p.op==="navigation"&&ou(i,{pathname:s,search:"",hash:"",state:null,key:"default"},Array.from(Le),!0,ut),u(l,d)})}const a=(async()=>{const u=KD(s,i);let f;try{f=await r(o)}finally{XD(u),i&&lF(i)}const l=i?U(i):void 0;if(i&&l&&!l.timestamp&&l.op==="navigation"){const d=s;d&&ou(i,{pathname:d,search:"",hash:"",state:null,key:"default"},Array.from(Le),!1,ut)}return f})();return i&&MS(i,a),a}}}function Hl(e){const{location:t,routes:n,navigationType:r,version:o,matches:s,basename:i,allRoutes:a}=e,c=Array.isArray(s)?s:ut(a||n,t,i),u=C();if(!u||!kS.has(u))return;const f=Pt();
12if(!(f&&U(f).op==="pageload"&&r==="POP")&&(r==="PUSH"||r==="POP")&&c){const[l,d]=Aa(t,a||n,a||n,c,i,_s,Nn),p=CS(t),h=$n.get(u),m=h&&!h.isPlaceholder?!!U(h.span).timestamp:!1,{skip:g,shouldUpdate:y}=uF(h,p,l,m);if(g){if(y&&h){const R=h.routeName;h.isPlaceholder?(h.routeName=l,xe&&_.log('[Tracing] Updated placeholder navigation name from "'.concat(R,'" to "').concat(l,'" (will apply to real span)'))):(h.span.updateName(l),h.span.setAttribute(ue,d),d==="route"&&h.span.setAttribute(et,l),ve(h.span,"__sentry_navigation_name_set__",!0),h.routeName=l,xe&&_.log('[Tracing] Updated navigation span name from "'.concat(R,'" to "').concat(l,'"')))}else xe&&_.log("[Tracing] Skipping duplicate navigation for location: ".concat(p));return}const E={span:{end:()=>{}},routeName:l,pathname:t.pathname,locationKey:p,isPlaceholder:!0};$n.set(u,E);let v;try{v=fo(u,{name:E.routeName,attributes:{[ue]:d,[ae]:"navigation",[G]:"auto.navigation.react.reactrouter".concat(o?"_v".concat(o):""),...d==="route"&&{[et]:E.routeName}}})}catch(R){throw $n.delete(u),R}v?($n.set(u,{span:v,routeName:E.routeName,pathname:t.pathname,locationKey:p}),su(v,t,n,i,"navigation")):$n.delete(u)}}function ys(e){e.forEach(t=>{LS(t).forEach(r=>{Le.add(r)})})}function LS(e,t=new Set){return t.has(e)||(t.add(e),e.children&&!e.index&&e.children.forEach(n=>{LS(n,t).forEach(o=>{t.add(o)})})),t}function Ss({activeRootSpan:e,location:t,routes:n,matches:r,basename:o,allRoutes:s}){const i=Array.isArray(r)?r:ut(s||n,t,o);if(i){const[a,c]=Aa(t,s||n,s||n,i,o,_s,Nn);W().setTransactionName(a||"/"),e&&(e.updateName(a),e.setAttribute(ue,c),c==="route"&&e.setAttribute(et,a),su(e,t,n,o,"pageload"))}else e&&su(e,t,n,o,"pageload")}function fF(e,t,n,r,o=!1){return n?!!(!e&&o||e&&Tn(e)&&r==="route"&&!Tn(n)||t!=="route"&&r==="route"):!1}function fc(e,t,n,r,o,s,i,a){var c;try{const u=(c=t.data)==null?void 0:c[ue];if(u==="route"&&n&&!Tn(n))return;const f=Array.from(a),l=f.length>0?f:o,d=ut(l,r,s);if(!d)return;const[p,h]=Aa(r,l,l,d,s,_s,Nn),m=fF(n,u,p,h,!0),g=i==="pageload"||!t.timestamp;m&&g&&(e.updateName(p),e.setAttribute(ue,h),h==="route"&&e.setAttribute(et,p))}catch(u){xe&&_.warn("Error updating span details before ending: ".concat(u))}}function su(e,t,n,r,o){const s="__sentry_".concat(o,"_end_patched__");
12if((e==null?void 0:e[s])||!e.end)return;const a=e.end.bind(e);let c=!1;e.end=function(...f){var v;if(c)return;c=!0;const l=f.length>0?f[0]:Date.now()/1e3,d=U(e),p=d.description,h=(v=d.data)==null?void 0:v[ue],m=()=>{const R=C();if(R&&o==="navigation"){const I=$n.get(R);I&&I.span===e&&$n.delete(R)}},g=ai.get(e),y=e.__sentry_may_have_lazy_routes__;if((g&&g.size>0||y)&&p&&(Tn(p)||h!=="route")){if(Wn===0){fc(e,d,p,t,n,r,o,Le),m(),a(l);return}const R=new Promise(S=>setTimeout(S,Wn));let I;if(g&&g.size>0){const S=Promise.allSettled(g).then(()=>{});I=Wn===1/0?S:Promise.race([S,R])}else I=R;I.then(()=>{const S=U(e);fc(e,S,S.description,t,n,r,o,Le),m(),a(l)}).catch(()=>{m(),a(l)});return}fc(e,d,p,t,n,r,o,Le),m(),a(l)},ve(e,s,!0)}function Wl(e,t){if(!Kr||!mn||!gn||!ii||!ut)return xe&&_.warn("reactRouterV6Instrumentation was unable to wrap Routes because of one or more missing parameters.\n      useEffect: ".concat(Kr,". useLocation: ").concat(mn,". useNavigationType: ").concat(gn,".\n      createRoutesFromChildren: ").concat(ii,". matchRoutes: ").concat(ut,".")),e;const n=r=>{const o=ke.useRef(!0),s=mn(),i=gn();return AS(()=>{const a=ii(r.children);o.current?(ys(a),Ss({activeRootSpan:Pt(),location:s,routes:a,allRoutes:Array.from(Le)}),o.current=!1):Hl({location:s,routes:a,navigationType:i,version:t,allRoutes:Array.from(Le)})},[s,i]),ke.createElement(e,{...r})};return gs(n,e),n}function dF(e){return Bl(e,"6")}function pF(e){return Ul(e,"6")}function hF(e){return Fl(e,"6")}function mF(e){return $l(e,"6")}function gF(e){return Wl(e,"6")}function _F(e){return Bl(e,"7")}function yF(e){return Wl(e,"7")}function SF(e){return Fl(e,"7")}function bF(e){return $l(e,"7")}function EF(e){return Ul(e,"7")}function vF(e){return Bl(e,"")}function TF(e){return Wl(e,"")}function IF(e){return Fl(e,"")}function wF(e){return $l(e,"")}function RF(e){return Ul(e,"")}const OF=Object.freeze(Object.defineProperty({__proto__:null,BrowserClient:g_,ErrorBoundary:_S,MULTIPLEXED_TRANSPORT_EXTRA_KEY:Gs,OpenFeatureIntegrationHook:ZL,Profiler:Ol,SDK_VERSION:Vt,SEMANTIC_ATTRIBUTE_SENTRY_OP:ae,SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN:G,SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE:Hi,SEMANTIC_ATTRIBUTE_SENTRY_SOURCE:ue,Scope:Et,WINDOW:w,addBreadcrumb:vt,addEventProcessor:Nm,addIntegration:Tc,bindScopeToEmitter:qE,breadcrumbsIntegration:$_,browserApiErrorsIntegration:B_,browserProfilingIntegration:zL,browserSessionIntegration:U_,browserTracingIntegration:fr,buildLaunchDarklyFlagUsedHandler:XL,captureConsoleIntegration:s0,captureEvent:no,captureException:ge,captureFeedback:yg,captureMessage:Rm,captureReactException:Ml,captureSession:zs,chromeStackLineParser:O_,close:Pv,consoleLoggingIntegration:TI,contextLinesIntegration:kN,continueTrace:OE,createConsolaReporter:AI,createLangChainCallbackHandler:qu,createReduxEnhancer:xD,createTransport:qm,createUserFeedbackEnvelope:I1,cultureContextIntegration:H_,dedupeIntegration:fg,defaultRequestInstrumentationOptions:kl,defaultStackLineParsers:L_,defaultStackParser:D_,diagnoseSdkConnectivity:oD,elementTimingIntegration:AC,endSession:Nu,eventFiltersIntegration:sg,eventFromException:h_,eventFromMessage:m_,exceptionFromError:aa,extraErrorDataIntegration:h0,featureFlagsIntegration:tI,feedbackAsyncIntegration:uA,feedbackIntegration:Nd,feedbackSyncIntegration:Nd,fetchStreamPerformanceIntegration:Ky,flush:Ov,forceLoad:iN,functionToStringIntegration:og,geckoStackLineParser:P_,getAbsoluteUrl:x_,getActiveSpan:Ie,getClient:C,getCurrentScope:W,getDefaultIntegrations:Y_,getFeedback:_k,getGlobalScope:jn,getIsolationScope:_e,getReplay:vP,getRootSpan:Te,getSpanDescendants:To,getSpanStatusFromHttpCode:Bh,getTraceData:Lu,globalHandlersIntegration:W_,graphqlClientIntegration:LN,growthbookIntegration:nD,httpClientIntegration:hN,httpContextIntegration:G_,inboundFiltersIntegration:ig,init:dS,instrumentAnthropicAiClient:qw,instrumentCreateReactAgent:CR,instrumentGoogleGenAIClient:rR,instrumentLangChainEmbeddings:yR,instrumentLangGraph:NR,instrumentOpenAiClient:Rw,instrumentOutgoingRequests:Jy,instrumentStateGraph:Hg,instrumentSupabaseClient:_g,isBotUserAgent:eS,isEnabled:Cm,isInitialized:Lv,lastEventId:Am,launchDarklyIntegration:KL,lazyLoadIntegration:d_,linkedErrorsIntegration:V_,logger:SI,makeBrowserOfflineTransport:yL,makeFetchTransport:cl,makeMultiplexedTransport:CT,metrics:RI,moduleMetadataIntegration:t0,normalizeStringifyValue:ul,onLoad:aN,openFeatureIntegration:QL,opera10StackLineParser:b1,opera11StackLineParser:T1,parameterize:ng,reactErrorHandler:hD,reactRouterBrowserTracingIntegration:vF,reactRouterV3BrowserTracingIntegration:OD,reactRouterV4BrowserTracingIntegration:FD,reactRouterV5BrowserTracingIntegration:$D,reactRouterV6BrowserTracingIntegration:dF,reactRouterV7BrowserTracingIntegration:_F,registerSpanErrorInstrumentation:cm,registerWebWorker:cD,replayCanvasIntegration:HP,replayIntegration:Hy,reportPageLoaded:uL,reportingObserverIntegration:fN,rewriteFramesIntegration:v0,sendFeedback:Qg,setActiveSpanInBrowser:lL,setAttribute:Mv,setAttributes:Nv,setContext:Cu,setConversationId:xv,setCurrentClient:Xm,setExtra:kv,setExtras:Rv,setHttpStatus:xo,setMeasurement:Su,setTag:Cv,setTags:Av,setUser:km,showReportDialog:zc,spanStreamingIntegration:fL,spanToBaggageHeader:hE,spanToJSON:U,spanToTraceHeader:Zh,spotlightBrowserIntegration:JL,startBrowserTracingNavigationSpan:fo,startBrowserTracingPageLoadSpan:lo,startInactiveSpan:Ve,startNewTrace:mm,startSession:vc,startSpan:$t,startSpanManual:qt,statsigIntegration:rD,supabaseIntegration:D0,suppressTracing:hm,tanstackRouterBrowserTracingIntegration:LD,thirdPartyErrorFilterIntegration:G0,uiProfiler:t1,unleashIntegration:eD,updateSpanName:lE,useProfiler:RD,viewHierarchyIntegration:DN,webVitalsIntegration:Qy,webWorkerIntegration:iD,winjsStackLineParser:_1,withActiveSpan:er,withErrorBoundary:AD,withIsolationScope:Pb,withProfiler:wD,withScope:Ye,
12withSentryReactRouterV6Routing:gF,withSentryReactRouterV7Routing:yF,withSentryRouting:UD,withStreamedSpan:mE,wrapCreateBrowserRouter:IF,wrapCreateBrowserRouterV6:hF,wrapCreateBrowserRouterV7:SF,wrapCreateMemoryRouter:wF,wrapCreateMemoryRouterV6:mF,wrapCreateMemoryRouterV7:bF,wrapReactRouterRouting:TF,wrapUseRoutes:RF,wrapUseRoutesV6:pF,wrapUseRoutesV7:EF,zodErrorsIntegration:q0},Symbol.toStringTag,{value:"Module"}));gon&&gon.global.sentry.enabled&&(dS({dsn:gon.global.sentry.config.dsn,integrations:[fr(),Hy()],environment:gon.global.sentry.config.env,release:gon.global.mailstrom.version,tracesSampleRate:.01,tracePropagationTargets:["localhost",/^https:\/\/mailstrom\.co/,/^https:\/\/mailstrom\.staging\.410labs\.com/]}),kF());function kF(){var n,r,o,s,i;let e;(n=gon.user)!=null&&n.name?e=gon.user.name:(r=gon.user)!=null&&r.first_name&&((o=gon.user)!=null&&o.last_name)&&(e="".concat((s=gon.user)==null?void 0:s.first_name," ").concat((i=gon.user)==null?void 0:i.last_name));const t=gon.user?{id:gon.user.id,email:gon.user.email,username:e}:null;km(t)}export{MF as R,OF as S,nh as a,ge as b,AF as c,CF as d,eh as g,NF as o,ke as r};
13//# sourceMappingURL=sentry-BXoXPrn6.js.map

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