andoncloud-sdk 1.7.4 → 1.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/andoncloud-sdk.js +4 -4
- package/dist/andoncloud-sdk.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +10 -10
package/dist/andoncloud-sdk.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var e=require("react"),t=require("react-i18next"),n=require("@mui/icons-material/HourglassEmpty"),r=require("@mui/icons-material/Lock"),o=require("@mui/icons-material/ShoppingCart"),s=require("@mui/material"),i=require("mobx"),a=require("react-router-dom"),c=require("@mui/material/CssBaseline"),l=require("@mui/material/GlobalStyles"),u=require("@mui/material/styles"),d=require("mobx-react-lite"),p=require("prop-types"),h=require("i18next"),m=require("@mui/icons-material/HelpOutline"),f=require("@emotion/styled"),g=require("@emotion/react"),y=require("react-is"),b=require("react/jsx-runtime"),v=require("./assets/loader.svg"),_=require("@mui/material/Dialog"),S=require("@mui/material/DialogContent"),w=require("@mui/lab"),k=require("./assets/info-icon.svg"),E=require("@mui/material/Box"),C=require("@mui/material/Card"),x=require("@mui/material/CardContent"),T=require("@mui/material/Container"),I=require("@mui/icons-material"),M=require("@mui/icons-material/AccessTime"),O=require("@mui/icons-material/Menu"),P=require("@mui/material/AppBar"),R=require("@mui/material/Button"),A=require("@mui/material/IconButton"),D=require("@mui/material/Menu"),L=require("@mui/material/MenuItem"),N=require("@mui/material/Toolbar"),j=require("@mui/material/Typography")
|
|
1
|
+
var e=require("react"),t=require("react-i18next"),n=require("@mui/icons-material/HourglassEmpty"),r=require("@mui/icons-material/Lock"),o=require("@mui/icons-material/ShoppingCart"),s=require("@mui/material"),i=require("mobx"),a=require("react-router-dom"),c=require("@mui/material/CssBaseline"),l=require("@mui/material/GlobalStyles"),u=require("@mui/material/styles"),d=require("mobx-react-lite"),p=require("prop-types"),h=require("i18next"),m=require("@mui/icons-material/HelpOutline"),f=require("@emotion/styled"),g=require("@emotion/react"),y=require("react-is"),b=require("react/jsx-runtime"),v=require("./assets/loader.svg"),_=require("@mui/material/Dialog"),S=require("@mui/material/DialogContent"),w=require("@mui/lab"),k=require("./assets/info-icon.svg"),E=require("@mui/material/Box"),C=require("@mui/material/Card"),x=require("@mui/material/CardContent"),T=require("@mui/material/Container"),I=require("@mui/icons-material"),M=require("@mui/icons-material/AccessTime"),O=require("@mui/icons-material/Menu"),P=require("@mui/material/AppBar"),R=require("@mui/material/Button"),A=require("@mui/material/IconButton"),D=require("@mui/material/Menu"),L=require("@mui/material/MenuItem"),N=require("@mui/material/Toolbar"),j=require("@mui/material/Typography"),$=require("@mui/material/useMediaQuery"),z=require("./assets/logo.svg"),H=require("@mui/icons-material/Close"),F=require("./assets/check.svg");function B(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function U(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,t}var V=/*#__PURE__*/U(e),q=/*#__PURE__*/B(e),W=/*#__PURE__*/B(n),K=/*#__PURE__*/B(r),Z=/*#__PURE__*/B(o),G=/*#__PURE__*/B(c),Y=/*#__PURE__*/B(l),J=/*#__PURE__*/B(p),X=/*#__PURE__*/B(h),Q=/*#__PURE__*/B(m),ee=/*#__PURE__*/B(f),te=/*#__PURE__*/B(v),ne=/*#__PURE__*/B(_),re=/*#__PURE__*/B(S),oe=/*#__PURE__*/B(k),se=/*#__PURE__*/B(E),ie=/*#__PURE__*/B(C),ae=/*#__PURE__*/B(x),ce=/*#__PURE__*/B(T),le=/*#__PURE__*/B(M),ue=/*#__PURE__*/B(O),de=/*#__PURE__*/B(P),pe=/*#__PURE__*/B(R),he=/*#__PURE__*/B(A),me=/*#__PURE__*/B(D),fe=/*#__PURE__*/B(L),ge=/*#__PURE__*/B(N),ye=/*#__PURE__*/B(j),be=/*#__PURE__*/B($),ve=/*#__PURE__*/B(z),_e=/*#__PURE__*/B(H),Se=/*#__PURE__*/B(F);let we,ke,Ee,Ce={data:""},xe=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Te=/\/\*[^]*?\*\/| +/g,Ie=/\n+/g,Me=(e,t)=>{let n="",r="",o="";for(let s in e){let i=e[s];"@"==s[0]?"i"==s[1]?n=s+" "+i+";":r+="f"==s[1]?Me(i,s):s+"{"+Me(i,"k"==s[1]?"":t)+"}":"object"==typeof i?r+=Me(i,t?t.replace(/([^,])+/g,e=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):s):null!=i&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=Me.p?Me.p(s,i):s+":"+i+";")}return n+(t&&o?t+"{"+o+"}":o)+r},Oe={},Pe=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+Pe(e[n]);return t}return e},Re=(e,t,n,r,o)=>{let s=Pe(e),i=Oe[s]||(Oe[s]=(e=>{let t=0,n=11;for(;t<e.length;)n=101*n+e.charCodeAt(t++)>>>0;return"go"+n})(s));if(!Oe[i]){let t=s!==e?e:(e=>{let t,n,r=[{}];for(;t=xe.exec(e.replace(Te,""));)t[4]?r.shift():t[3]?(n=t[3].replace(Ie," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][t[1]]=t[2].replace(Ie," ").trim();return r[0]})(e);Oe[i]=Me(o?{["@keyframes "+i]:t}:t,n?"":"."+i)}let a=n&&Oe.g?Oe.g:null;return n&&(Oe.g=Oe[i]),((e,t,n,r)=>{r?t.data=t.data.replace(r,e):-1===t.data.indexOf(e)&&(t.data=n?e+t.data:t.data+e)})(Oe[i],t,r,a),i};function Ae(e){let t=this||{},n=e.call?e(t.p):e;return Re(n.unshift?n.raw?((e,t,n)=>e.reduce((e,r,o)=>{let s=t[o];if(s&&s.call){let e=s(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;s=t?"."+t:e&&"object"==typeof e?e.props?"":Me(e,""):!1===e?"":e}return e+r+(null==s?"":s)},""))(n,[].slice.call(arguments,1),t.p):n.reduce((e,n)=>Object.assign(e,n&&n.call?n(t.p):n),{}):n,(e=>{if("object"==typeof window){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||Ce})(t.target),t.g,t.o,t.k)}Ae.bind({g:1});let De=Ae.bind({k:1});function Le(e,t){let n=this||{};return function(){let r=arguments;function o(s,i){let a=Object.assign({},s),c=a.className||o.className;n.p=Object.assign({theme:ke&&ke()},a),n.o=/ *go\d+/.test(c),a.className=Ae.apply(n,r)+(c?" "+c:""),t&&(a.ref=i);let l=e;return e[0]&&(l=a.as||e,delete a.as),Ee&&l[0]&&Ee(a),we(l,a)}return t?t(o):o}}var Ne=(e,t)=>(e=>"function"==typeof e)(e)?e(t):e,je=(()=>{let e=0;return()=>(++e).toString()})(),$e=(()=>{let e;return()=>{if(void 0===e&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),ze="default",He=(e,t)=>{let{toastLimit:n}=e.settings;switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,n)};case 1:return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case 2:let{toast:r}=t;return He(e,{type:e.toasts.find(e=>e.id===r.id)?1:0,toast:r});case 3:let{toastId:o}=t;return{...e,toasts:e.toasts.map(e=>e.id===o||void 0===o?{...e,dismissed:!0,visible:!1}:e)};case 4:return void 0===t.toastId?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let s=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(e=>({...e,pauseDuration:e.pauseDuration+s}))}}},Fe=[],Be={toasts:[],pausedAt:void 0,settings:{toastLimit:20}},Ue={},Ve=(e,t=ze)=>{Ue[t]=He(Ue[t]||Be,e),Fe.forEach(([e,n])=>{e===t&&n(Ue[t])})},qe=e=>Object.keys(Ue).forEach(t=>Ve(e,t)),We=(e=ze)=>t=>{Ve(t,e)},Ke={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Ze=e=>(t,n)=>{let r=((e,t="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(null==n?void 0:n.id)||je()}))(t,e,n);return We(r.toasterId||(e=>Object.keys(Ue).find(t=>Ue[t].toasts.some(t=>t.id===e)))(r.id))({type:2,toast:r}),r.id},Ge=(e,t)=>Ze("blank")(e,t);Ge.error=Ze("error"),Ge.success=Ze("success"),Ge.loading=Ze("loading"),Ge.custom=Ze("custom"),Ge.dismiss=(e,t)=>{let n={type:3,toastId:e};t?We(t)(n):qe(n)},Ge.dismissAll=e=>Ge.dismiss(void 0,e),Ge.remove=(e,t)=>{let n={type:4,toastId:e};t?We(t)(n):qe(n)},Ge.removeAll=e=>Ge.remove(void 0,e),Ge.promise=(e,t,n)=>{let r=Ge.loading(t.loading,{...n,...null==n?void 0:n.loading});return"function"==typeof e&&(e=e()),e.then(e=>{let o=t.success?Ne(t.success,e):void 0;return o?Ge.success(o,{id:r,...n,...null==n?void 0:n.success}):Ge.dismiss(r),e}).catch(e=>{let o=t.error?Ne(t.error,e):void 0;o?Ge.error(o,{id:r,...n,...null==n?void 0:n.error}):Ge.dismiss(r)}),e};var Ye,Je=De`
|
|
2
2
|
from {
|
|
3
3
|
transform: scale(0) rotate(45deg);
|
|
4
4
|
opacity: 0;
|
|
@@ -163,11 +163,11 @@ to {
|
|
|
163
163
|
color: inherit;
|
|
164
164
|
flex: 1 1 auto;
|
|
165
165
|
white-space: pre-line;
|
|
166
|
-
`,ft=V.memo(({toast:e,position:t,style:n,children:r})=>{let o=e.height?((e,t)=>{let n=e.includes("top")?1:-1,[r,o]
|
|
166
|
+
`,ft=V.memo(({toast:e,position:t,style:n,children:r})=>{let o=e.height?((e,t)=>{let n=e.includes("top")?1:-1,[r,o]=$e()?["0%{opacity:0;} 100%{opacity:1;}","0%{opacity:1;} 100%{opacity:0;}"]:[dt(n),pt(n)];return{animation:t?`${De(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${De(o)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}})(e.position||t||"top-center",e.visible):{opacity:0},s=V.createElement(ut,{toast:e}),i=V.createElement(mt,{...e.ariaProps},Ne(e.message,e));return V.createElement(ht,{className:e.className,style:{...o,...n,...e.style}},"function"==typeof r?r({icon:s,message:i}):V.createElement(V.Fragment,null,s,i))});Ye=V.createElement,Me.p=void 0,we=Ye,ke=void 0,Ee=void 0;var gt=({id:e,className:t,style:n,onHeightUpdate:r,children:o})=>{let s=V.useCallback(t=>{if(t){let n=()=>{let n=t.getBoundingClientRect().height;r(e,n)};n(),new MutationObserver(n).observe(t,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return V.createElement("div",{ref:s,className:t,style:n},o)},yt=Ae`
|
|
167
167
|
z-index: 9999;
|
|
168
168
|
> * {
|
|
169
169
|
pointer-events: auto;
|
|
170
170
|
}
|
|
171
|
-
`,bt=({reverseOrder:t,position:n="top-center",toastOptions:r,gutter:o,children:s,toasterId:i,containerStyle:a,containerClassName:c})=>{let{toasts:l,handlers:u}=((t,n="default")=>{let{toasts:r,pausedAt:o}=((t={},n=$e)=>{let[r,o]=e.useState(Ue[n]||Be),s=e.useRef(Ue[n]);e.useEffect(()=>(s.current!==Ue[n]&&o(Ue[n]),Fe.push([n,o]),()=>{let e=Fe.findIndex(([e])=>e===n);e>-1&&Fe.splice(e,1)}),[n]);let i=r.toasts.map(e=>{var n,r,o;return{...t,...t[e.type],...e,removeDelay:e.removeDelay||(null==(n=t[e.type])?void 0:n.removeDelay)||(null==t?void 0:t.removeDelay),duration:e.duration||(null==(r=t[e.type])?void 0:r.duration)||(null==t?void 0:t.duration)||Ke[e.type],style:{...t.style,...null==(o=t[e.type])?void 0:o.style,...e.style}}});return{...r,toasts:i}})(t,n),s=e.useRef(new Map).current,i=e.useCallback((e,t=1e3)=>{if(s.has(e))return;let n=setTimeout(()=>{s.delete(e),a({type:4,toastId:e})},t);s.set(e,n)},[]);e.useEffect(()=>{if(o)return;let e=Date.now(),t=r.map(t=>{if(t.duration===1/0)return;let r=(t.duration||0)+t.pauseDuration-(e-t.createdAt);if(!(r<0))return setTimeout(()=>Ge.dismiss(t.id,n),r);t.visible&&Ge.dismiss(t.id)});return()=>{t.forEach(e=>e&&clearTimeout(e))}},[r,o,n]);let a=e.useCallback(We(n),[n]),c=e.useCallback(()=>{a({type:5,time:Date.now()})},[a]),l=e.useCallback((e,t)=>{a({type:1,toast:{id:e,height:t}})},[a]),u=e.useCallback(()=>{o&&a({type:6,time:Date.now()})},[o,a]),d=e.useCallback((e,t)=>{let{reverseOrder:n=!1,gutter:o=8,defaultPosition:s}=t||{},i=r.filter(t=>(t.position||s)===(e.position||s)&&t.height),a=i.findIndex(t=>t.id===e.id),c=i.filter((e,t)=>t<a&&e.visible).length;return i.filter(e=>e.visible).slice(...n?[c+1]:[0,c]).reduce((e,t)=>e+(t.height||0)+o,0)},[r]);return e.useEffect(()=>{r.forEach(e=>{if(e.dismissed)i(e.id,e.removeDelay);else{let t=s.get(e.id);t&&(clearTimeout(t),s.delete(e.id))}})},[r,i]),{toasts:r,handlers:{updateHeight:l,startPause:c,endPause:u,calculateOffset:d}}})(r,i);return V.createElement("div",{"data-rht-toaster":i||"",style:{position:"fixed",zIndex:9999,top:16,left:16,right:16,bottom:16,pointerEvents:"none",...a},className:c,onMouseEnter:u.startPause,onMouseLeave:u.endPause},l.map(e=>{let r=e.position||n,i=((e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},o=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:ze()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...o}})(r,u.calculateOffset(e,{reverseOrder:t,gutter:o,defaultPosition:n}));return V.createElement(gt,{id:e.id,key:e.id,onHeightUpdate:u.updateHeight,className:e.visible?yt:"",style:i},"custom"===e.type?Ne(e.message,e):s?s(e):V.createElement(ft,{toast:e,position:r}))}))},vt=Ge;const _t="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,St=globalThis,wt="10.33.0";function kt(){return Et(St),St}function Et(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||wt,t[wt]=t[wt]||{}}function Ct(e,t,n=St){const r=n.__SENTRY__=n.__SENTRY__||{},o=r[wt]=r[wt]||{};return o[e]||(o[e]=t())}const xt=["debug","info","warn","error","log","assert","trace"],Tt={};function It(e){if(!("console"in St))return e();const t=St.console,n={},r=Object.keys(Tt);r.forEach(e=>{const r=Tt[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}function Mt(){return Pt().enabled}function Ot(e,...t){_t&&Mt()&&It(()=>{St.console[e](`Sentry Logger [${e}]:`,...t)})}function Pt(){return _t?Ct("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const Rt={enable:function(){Pt().enabled=!0},disable:function(){Pt().enabled=!1},isEnabled:Mt,log:function(...e){Ot("log",...e)},warn:function(...e){Ot("warn",...e)},error:function(...e){Ot("error",...e)}},At="?",Dt=/\(error: (.*)\)/,Lt=/captureMessage|captureException/;function Nt(...e){const t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{const o=[],s=e.split("\n");for(let e=n;e<s.length;e++){let n=s[e];n.length>1024&&(n=n.slice(0,1024));const i=Dt.test(n)?n.replace(Dt,"$1"):n;if(!i.match(/\S*Error: /)){for(const e of t){const t=e(i);if(t){o.push(t);break}}if(o.length>=50+r)break}}return function(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(jt(t).function||"")&&t.pop(),t.reverse(),Lt.test(jt(t).function||"")&&(t.pop(),Lt.test(jt(t).function||"")&&t.pop()),t.slice(0,50).map(e=>({...e,filename:e.filename||jt(t).filename,function:e.function||At}))}(o.slice(r))}}function jt(e){return e[e.length-1]||{}}const zt="<anonymous>";function $t(e){try{return e&&"function"==typeof e&&e.name||zt}catch{return zt}}function Ht(e){const t=e.exception;if(t){const e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}function Ft(e){return"__v_isVNode"in e&&e.__v_isVNode?"[VueVNode]":"[VueViewModel]"}const Bt={},Ut={};function Vt(e,t){Bt[e]=Bt[e]||[],Bt[e].push(t)}function qt(e,t){if(!Ut[e]){Ut[e]=!0;try{t()}catch(t){_t&&Rt.error(`Error while instrumenting ${e}`,t)}}}function Wt(e,t){const n=e&&Bt[e];if(n)for(const r of n)try{r(t)}catch(t){_t&&Rt.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${$t(r)}\nError:`,t)}}let Kt=null;function Zt(e){const t="error";Vt(t,e),qt(t,Gt)}function Gt(){Kt=St.onerror,St.onerror=function(e,t,n,r,o){return Wt("error",{column:r,error:o,line:n,msg:e,url:t}),!!Kt&&Kt.apply(this,arguments)},St.onerror.__SENTRY_INSTRUMENTED__=!0}let Yt=null;function Jt(e){const t="unhandledrejection";Vt(t,e),qt(t,Xt)}function Xt(){Yt=St.onunhandledrejection,St.onunhandledrejection=function(e){return Wt("unhandledrejection",e),!Yt||Yt.apply(this,arguments)},St.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Qt=Object.prototype.toString;function en(e){switch(Qt.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return dn(e,Error)}}function tn(e,t){return Qt.call(e)===`[object ${t}]`}function nn(e){return tn(e,"ErrorEvent")}function rn(e){return tn(e,"DOMError")}function on(e){return tn(e,"String")}function sn(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function an(e){return null===e||sn(e)||"object"!=typeof e&&"function"!=typeof e}function cn(e){return tn(e,"Object")}function ln(e){return"undefined"!=typeof Event&&dn(e,Event)}function un(e){return Boolean(e?.then&&"function"==typeof e.then)}function dn(e,t){try{return e instanceof t}catch{return!1}}function pn(e){return!("object"!=typeof e||null===e||!(e.__isVue||e._isVue||e.__v_isVNode))}function hn(e){return"undefined"!=typeof Request&&dn(e,Request)}const mn=St;function fn(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 l;const u=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&s++<r&&(l=gn(n,u),!("html"===l||s>1&&i+o.length*c+l.length>=d));)o.push(l),i+=l.length,n=n.parentNode;return o.reverse().join(a)}catch{return"<unknown>"}}function gn(e,t){const n=e,r=[];if(!n?.tagName)return"";if(mn.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const o=t?.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(o?.length)o.forEach(e=>{r.push(`[${e[0]}="${e[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const e=n.className;if(e&&on(e)){const t=e.split(/\s+/);for(const e of t)r.push(`.${e}`)}}const s=["aria-label","type","name","title","alt"];for(const e of s){const t=n.getAttribute(e);t&&r.push(`[${e}="${t}"]`)}return r.join("")}function yn(){try{return mn.document.location.href}catch{return""}}function bn(e){if(!mn.HTMLElement)return null;let t=e;for(let e=0;e<5;e++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function vn(e,t,n){if(!(t in e))return;const r=e[t];if("function"!=typeof r)return;const o=n(r);"function"==typeof o&&Sn(o,r);try{e[t]=o}catch{_t&&Rt.log(`Failed to replace method "${t}" in object`,e)}}function _n(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{_t&&Rt.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Sn(e,t){try{e.prototype=t.prototype=t.prototype||{},_n(e,"__sentry_original__",t)}catch{}}function wn(e){return e.__sentry_original__}function kn(e){if(en(e))return{message:e.message,name:e.name,stack:e.stack,...Cn(e)};if(ln(e)){const t={type:e.type,target:En(e.target),currentTarget:En(e.currentTarget),...Cn(e)};return"undefined"!=typeof CustomEvent&&dn(e,CustomEvent)&&(t.detail=e.detail),t}return e}function En(e){try{return"undefined"!=typeof Element&&dn(e,Element)?fn(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function Cn(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}let xn,Tn,In;function Mn(e){if(void 0!==xn)return xn?xn(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__");return t in St&&"function"==typeof St[t]?(xn=St[t],xn(e)):(xn=null,e())}function On(){return Mn(()=>Math.random())}function Pn(){return Mn(()=>Date.now())}function Rn(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function An(e,t){if(!Array.isArray(e))return"";const n=[];for(let t=0;t<e.length;t++){const r=e[t];try{pn(r)?n.push(Ft(r)):n.push(String(r))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function Dn(e,t,n=!1){return!!on(e)&&(tn(t,"RegExp")?t.test(e):!!on(t)&&(n?e===t:e.includes(t)))}function Ln(e,t=[],n=!1){return t.some(t=>Dn(e,t,n))}function Nn(e=function(){return St.crypto||St.msCrypto}()){try{if(e?.randomUUID)return Mn(()=>e.randomUUID()).replace(/-/g,"")}catch{}return Tn||(Tn=[1e7]+1e3+4e3+8e3+1e11),Tn.replace(/[018]/g,e=>(e^(16*On()&15)>>e/4).toString(16))}function jn(e){return e.exception?.values?.[0]}function zn(e){const{message:t,event_id:n}=e;if(t)return t;const r=jn(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function $n(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=n||"Error")}function Hn(e,t){const n=jn(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r?.data,...t.data};n.mechanism.data=e}}function Fn(e){if(function(e){try{return e.__sentry_captured__}catch{}}(e))return!0;try{_n(e,"__sentry_captured__",!0)}catch{}return!1}function Bn(){return Pn()/1e3}function Un(){return(In??(In=function(){const{performance:e}=St;if(!e?.now||!e.timeOrigin)return Bn;const t=e.timeOrigin;return()=>(t+Mn(()=>e.now()))/1e3}()))()}let Vn=null;function qn(){return null===Vn&&(Vn=function(){const{performance:e}=St;if(!e?.now)return;const t=3e5,n=Mn(()=>e.now()),r=Pn(),o=e.timeOrigin;if("number"==typeof o&&Math.abs(o+n-r)<t)return o;const s=e.timing?.navigationStart;return"number"==typeof s&&Math.abs(s+n-r)<t?s:r-n}()),Vn}function Wn(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||Un(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:Nn()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Kn(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&0===Object.keys(t).length)return e;const r={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=Kn(r[e],t[e],n-1));return r}function Zn(){return Nn()}function Gn(){return Nn().substring(16)}const Yn="_sentrySpan";function Jn(e,t){t?_n(e,Yn,t):delete e[Yn]}function Xn(e){return e[Yn]}class Qn{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:Zn(),sampleRand:On()}}clone(){const e=new Qn;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._attributes={...this._attributes},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,Jn(e,Xn(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Wn(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],this._notifyScopeListeners()),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e,n=t instanceof Qn?t.getScopeData():cn(t)?e:void 0,{tags:r,attributes:o,extra:s,user:i,contexts:a,level:c,fingerprint:l=[],propagationContext:u}=n||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...o},this._extra={...this._extra,...s},this._contexts={...this._contexts,...a},i&&Object.keys(i).length&&(this._user=i),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),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,Jn(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Zn(),sampleRand:On()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:Bn(),...e,message:e.message?Rn(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Xn(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Kn(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t?.event_id||Nn();if(!this._client)return _t&&Rt.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n?.event_id||Nn();if(!this._client)return _t&&Rt.warn("No client configured on scope - will not capture message!"),r;const o=n?.syntheticException??new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:o,...n,event_id:r},this),r}captureEvent(e,t){const n=t?.event_id||Nn();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(_t&&Rt.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}}class er{constructor(e,t){let n,r;n=e||new Qn,r=t||new Qn,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(e){throw this._popScope(),e}return un(n)?n.then(e=>(this._popScope(),e),e=>{throw this._popScope(),e}):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1||!this._stack.pop())}}function tr(){const e=Et(kt());return e.stack=e.stack||new er(Ct("defaultCurrentScope",()=>new Qn),Ct("defaultIsolationScope",()=>new Qn))}function nr(e){return tr().withScope(e)}function rr(e,t){const n=tr();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function or(e){return tr().withScope(()=>e(tr().getIsolationScope()))}function sr(e){const t=Et(e);return t.acs?t.acs:{withIsolationScope:or,withScope:nr,withSetScope:rr,withSetIsolationScope:(e,t)=>or(t),getCurrentScope:()=>tr().getScope(),getIsolationScope:()=>tr().getIsolationScope()}}function ir(){return sr(kt()).getCurrentScope()}function ar(){return sr(kt()).getIsolationScope()}function cr(...e){const t=sr(kt());if(2===e.length){const[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function lr(){return ir().getClient()}function ur(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:o}=t,s={trace_id:n,span_id:o||Gn()};return r&&(s.parent_span_id=r),s}const dr="sentry.source",pr="sentry.sample_rate",hr="sentry.previous_trace_sample_rate",mr="sentry.op",fr="sentry.origin",gr="sentry.idle_span_finish_reason",yr="sentry.measurement_unit",br="sentry.measurement_value",vr="sentry.custom_span_name",_r="sentry.profile_id",Sr="sentry.exclusive_time",wr="sentry.link.type";function kr(e,t){e.setAttribute("http.response.status_code",t);const n=function(e){if(e<400&&e>=100)return{code:1};if(e>=400&&e<500)switch(e){case 401:return{code:2,message:"unauthenticated"};case 403:return{code:2,message:"permission_denied"};case 404:return{code:2,message:"not_found"};case 409:return{code:2,message:"already_exists"};case 413:return{code:2,message:"failed_precondition"};case 429:return{code:2,message:"resource_exhausted"};case 499:return{code:2,message:"cancelled"};default:return{code:2,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:2,message:"unimplemented"};case 503:return{code:2,message:"unavailable"};case 504:return{code:2,message:"deadline_exceeded"};default:return{code:2,message:"internal_error"}}return{code:2,message:"internal_error"}}(t);"unknown_error"!==n.message&&e.setStatus(n)}const Er="_sentryScope",Cr="_sentryIsolationScope";function xr(e){if(e){if("object"==typeof e&&"deref"in e&&"function"==typeof e.deref)try{return e.deref()}catch{return}return e}}function Tr(e){return{scope:e[Er],isolationScope:xr(e[Cr])}}const Ir="sentry-",Mr=/^sentry-/;function Or(e){const t=function(e){if(e&&(on(e)||Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>{const n=Pr(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):Pr(e)}(e);if(!t)return;const n=Object.entries(t).reduce((e,[t,n])=>(t.match(Mr)&&(e[t.slice(7)]=n),e),{});return Object.keys(n).length>0?n:void 0}function Pr(e){return e.split(",").map(e=>{const t=e.indexOf("=");return-1===t?[]:[e.slice(0,t),e.slice(t+1)].map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})}).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}const Rr=/^o(\d+)\./,Ar=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function Dr(e,t=!1){const{host:n,path:r,pass:o,port:s,projectId:i,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&o?`:${o}`:""}@${n}${s?`:${s}`:""}/${r?`${r}/`:r}${i}`}function Lr(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Nr(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=function(e){const t=e.match(Rr);return t?.[1]}(n)),r}function jr(e){const t="string"==typeof e?function(e){const t=Ar.exec(e);if(!t)return void It(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});const[n,r,o="",s="",i="",a=""]=t.slice(1);let c="",l=a;const u=l.split("/");if(u.length>1&&(c=u.slice(0,-1).join("/"),l=u.pop()),l){const e=l.match(/^\d+/);e&&(l=e[0])}return Lr({host:s,pass:o,path:c,projectId:l,port:i,protocol:n,publicKey:r})}(e):Lr(e);if(t&&function(e){if(!_t)return!0;const{port:t,projectId:n,protocol:r}=e;return!(["protocol","publicKey","host","projectId"].find(t=>!e[t]&&(Rt.error(`Invalid Sentry Dsn: ${t} missing`),!0))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?t&&isNaN(parseInt(t,10))&&(Rt.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(Rt.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(Rt.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}function zr(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;return"number"!=typeof t||isNaN(t)||t<0||t>1?void 0:t}const $r=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Hr(e=Zn(),t=Gn(),n){let r="";return void 0!==n&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function Fr(e=Zn(),t=Gn(),n){return`00-${e}-${t}-${n?"01":"00"}`}let Br=!1;function Ur(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:o,parent_span_id:s,status:i,origin:a,links:c}=Zr(e);return{parent_span_id:s,span_id:t,trace_id:n,data:r,op:o,status:i,origin:a,links:c}}function Vr(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),o=r?t:Zr(e).parent_span_id,s=Tr(e).scope;return{parent_span_id:o,span_id:r?s?.getPropagationContext().propagationSpanId||Gn():t,trace_id:n}}function qr(e){return e&&e.length>0?e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:o})=>({span_id:e,trace_id:t,sampled:1===n,attributes:o,...r})):void 0}function Wr(e){return"number"==typeof e?Kr(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Kr(e.getTime()):Un()}function Kr(e){return e>9999999999?e/1e3:e}function Zr(e){if(function(e){return"function"==typeof e.getSpanJSON}(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(function(e){return!!(e.attributes&&e.startTime&&e.name&&e.endTime&&e.status)}(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:"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0,start_timestamp:Wr(o),timestamp:Wr(i)||void 0,status:Yr(a),op:r[mr],origin:r[fr],links:qr(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function Gr(e){const{traceFlags:t}=e.spanContext();return 1===t}function Yr(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"internal_error"}const Jr="_sentryChildSpans",Xr="_sentryRootSpan";function Qr(e,t){_n(t,Xr,e[Xr]||e),e[Jr]?e[Jr].add(t):_n(e,Jr,new Set([t]))}function eo(e){const t=new Set;return function e(n){if(!t.has(n)&&Gr(n)){t.add(n);const r=n[Jr]?Array.from(n[Jr]):[];for(const t of r)e(t)}}(e),Array.from(t)}function to(e){return e[Xr]||e}function no(){const e=sr(kt());return e.getActiveSpan?e.getActiveSpan():Xn(ir())}function ro(){Br||(It(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),Br=!0)}let oo=!1;function so(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=e||lr()?.getOptions();return!(!t||null==t.tracesSampleRate&&!t.tracesSampler)}function io(e){Rt.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function ao(e,t){if(!t?.length||!e.description)return!1;for(const n of t){if(lo(n)){if(Dn(e.description,n))return _t&&io(e),!0;continue}if(!n.name&&!n.op)continue;const t=!n.name||Dn(e.description,n.name),r=!n.op||e.op&&Dn(e.op,n.op);if(t&&r)return _t&&io(e),!0}return!1}function co(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const t of e)t.parent_span_id===r&&(t.parent_span_id=n)}function lo(e){return"string"==typeof e||e instanceof RegExp}const uo="production",po="_frozenDsc";function ho(e,t){_n(e,po,t)}function mo(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o={environment:n.environment||uo,release:n.release,public_key:r,trace_id:e,org_id:Nr(t)};return t.emit("createDsc",o),o}function fo(e,t){const n=t.getPropagationContext();return n.dsc||mo(n.traceId,e)}function go(e){const t=lr();if(!t)return{};const n=to(e),r=Zr(n),o=r.data,s=n.spanContext().traceState,i=s?.get("sentry.sample_rate")??o[pr]??o[hr];function a(e){return"number"!=typeof i&&"string"!=typeof i||(e.sample_rate=`${i}`),e}const c=n[po];if(c)return a(c);const l=s?.get("sentry.dsc"),u=l&&Or(l);if(u)return a(u);const d=mo(e.spanContext().traceId,t),p=r.description;return"url"!==o[dr]&&p&&(d.transaction=p),so()&&(d.sampled=String(Gr(n)),d.sample_rand=s?.get("sentry.sample_rand")??Tr(n).scope?.getPropagationContext().sampleRand.toString()),a(d),t.emit("createDsc",d,n),d}class yo{constructor(e={}){this._traceId=e.traceId||Zn(),this._spanId=e.spanId||Gn()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,t,n){return this}addLink(e){return this}addLinks(e){return this}recordException(e,t){}}function bo(e,t=100,n=Infinity){try{return _o("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function vo(e,t=3,n=102400){const r=bo(e,t);return o=JSON.stringify(r),~-encodeURI(o).split(/%..|./).length>n?vo(e,t-1,n):r;var o}function _o(e,t,n=Infinity,r=Infinity,o=function(){const e=new WeakSet;return[function(t){return!!e.has(t)||(e.add(t),!1)},function(t){e.delete(t)}]}()){const[s,i]=o;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const a=function(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if("undefined"!=typeof global&&t===global)return"[Global]";if("undefined"!=typeof window&&t===window)return"[Window]";if("undefined"!=typeof document&&t===document)return"[Document]";if(pn(t))return Ft(t);if(cn(n=t)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n)return"[SyntheticEvent]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${$t(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const r=function(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(e){return`**non-serializable** (${e})`}var n}(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const c="number"==typeof t.__sentry_override_normalization_depth__?t.__sentry_override_normalization_depth__:n;if(0===c)return a.replace("object ","");if(s(t))return"[Circular ~]";const l=t;if(l&&"function"==typeof l.toJSON)try{return _o("",l.toJSON(),c-1,r,o)}catch{}const u=Array.isArray(t)?[]:{};let d=0;const p=kn(t);for(const e in p)if(Object.prototype.hasOwnProperty.call(p,e)){if(d>=r){u[e]="[MaxProperties ~]";break}u[e]=_o(e,p[e],c-1,r,o),d++}return i(t),u}function So(e,t=[]){return[e,t]}function wo(e,t){const[n,r]=e;return[n,[...r,t]]}function ko(e,t){const n=e[1];for(const e of n)if(t(e,e[0].type))return!0;return!1}function Eo(e){const t=Et(St);return t.encodePolyfill?t.encodePolyfill(e):(new TextEncoder).encode(e)}function Co(e){const[t,n]=e;let r=JSON.stringify(t);function o(e){"string"==typeof r?r="string"==typeof e?r+e:[Eo(r),e]:r.push("string"==typeof e?Eo(e):e)}for(const e of n){const[t,n]=e;if(o(`\n${JSON.stringify(t)}\n`),"string"==typeof n||n instanceof Uint8Array)o(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(bo(n))}o(e)}}return"string"==typeof r?r:function(e){const t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}(r)}function xo(e){return[{type:"span"},e]}function To(e){const t="string"==typeof e.data?Eo(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const Io={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item",metric:"metric",trace_metric:"metric"};function Mo(e){return Io[e]}function Oo(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Po(e,t,n,r){const o=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Dr(r)},...o&&{trace:o}}}function Ro(e){if(!e||0===e.length)return;const t={};return e.forEach(e=>{const n=e.attributes||{},r=n[yr],o=n[br];"string"==typeof r&&"number"==typeof o&&(t[e.name]={value:o,unit:r})}),t}class Ao{constructor(e={}){this._traceId=e.traceId||Zn(),this._spanId=e.spanId||Gn(),this._startTime=e.startTimestamp||Un(),this._links=e.links,this._attributes={},this.setAttributes({[fr]:"manual",[mr]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this._links?this._links.push(e):this._links=[e],this}addLinks(e){return this._links?this._links.push(...e):this._links=e,this}recordException(e,t){}spanContext(){const{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:n?1:0}}setAttribute(e,t){return void 0===t?delete this._attributes[e]:this._attributes[e]=t,this}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._startTime=Wr(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this.setAttribute(dr,"custom"),this}end(e){this._endTime||(this._endTime=Wr(e),function(e){if(!_t)return;const{description:t="< unknown name >",op:n="< unknown op >"}=Zr(e),{spanId:r}=e.spanContext(),o=to(e);Rt.log(`[Tracing] Finishing "${n}" ${o===e?"root ":""}span "${t}" with ID ${r}`)}(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[mr],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Yr(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[fr],profile_id:this._attributes[_r],exclusive_time:this._attributes[Sr],measurements:Ro(this._events),is_segment:this._isStandaloneSpan&&to(this)===this||void 0,segment_id:this._isStandaloneSpan?to(this).spanContext().spanId:void 0,links:qr(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,t,n){_t&&Rt.log("[Tracing] Adding an event to span:",e);const r=Do(t)?t:n||Un(),o=Do(t)?{}:t||{},s={name:e,time:Wr(r),attributes:o};return this._events.push(s),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const e=lr();if(e&&e.emit("spanEnd",this),!this._isStandaloneSpan&&this!==to(this))return;if(this._isStandaloneSpan)return void(this._sampled?function(e){const t=lr();if(!t)return;const n=e[1];n&&0!==n.length?t.sendEnvelope(e):t.recordDroppedEvent("before_send","span")}(function(e,t){const n=go(e[0]),r=t?.getDsn(),o=t?.getOptions().tunnel,s={sent_at:(new Date).toISOString(),...function(e){return!!e.trace_id&&!!e.public_key}(n)&&{trace:n},...!!o&&r&&{dsn:Dr(r)}},{beforeSendSpan:i,ignoreSpans:a}=t?.getOptions()||{},c=a?.length?e.filter(e=>!ao(Zr(e),a)):e,l=e.length-c.length;l&&t?.recordDroppedEvent("before_send","span",l);const u=i?e=>{const t=Zr(e);return i(t)||(ro(),t)}:Zr,d=[];for(const e of c){const t=u(e);t&&d.push(xo(t))}return So(s,d)}([this],e)):(_t&&Rt.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),e&&e.recordDroppedEvent("sample_rate","span")));const t=this._convertSpanToTransaction();t&&(Tr(this).scope||ir()).captureEvent(t)}_convertSpanToTransaction(){if(!Lo(Zr(this)))return;this._name||(_t&&Rt.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:e,isolationScope:t}=Tr(this),n=e?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(!0!==this._sampled)return;const r=eo(this).filter(e=>e!==this&&!function(e){return e instanceof Ao&&e.isStandaloneSpan()}(e)).map(e=>Zr(e)).filter(Lo),o=this._attributes[dr];delete this._attributes[vr],r.forEach(e=>{delete e.data[vr]});const s={contexts:{trace:Ur(this)},spans:r.length>1e3?r.sort((e,t)=>e.start_timestamp-t.start_timestamp).slice(0,1e3):r,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:t,dynamicSamplingContext:go(this)},request:n,...o&&{transaction_info:{source:o}}},i=Ro(this._events);return i&&Object.keys(i).length&&(_t&&Rt.log("[Measurements] Adding measurements to transaction event",JSON.stringify(i,void 0,2)),s.measurements=i),s}}function Do(e){return e&&"number"==typeof e||e instanceof Date||Array.isArray(e)}function Lo(e){return!!(e.start_timestamp&&e.timestamp&&e.span_id&&e.trace_id)}const No="__SENTRY_SUPPRESS_TRACING__";function jo(e){const t=Fo();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=Ho(e),{forceTransaction:r,parentSpan:o}=e;return(e.scope?t=>cr(e.scope,t):void 0!==o?e=>zo(o,e):e=>e())(()=>{const t=ir(),s=Uo(t,o);return e.onlyIfParent&&!s?new yo:$o({parentSpan:s,spanArguments:n,forceTransaction:r,scope:t})})}function zo(e,t){const n=Fo();return n.withActiveSpan?n.withActiveSpan(e,t):cr(n=>(Jn(n,e||void 0),t(n)))}function $o({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!so()){const r=new yo;return!n&&e||ho(r,{sampled:"false",sample_rate:"0",transaction:t.name,...go(r)}),r}const o=ar();let s;if(e&&!n)s=function(e,t,n){const{spanId:r,traceId:o}=e.spanContext(),s=!t.getScopeData().sdkProcessingMetadata[No]&&Gr(e),i=s?new Ao({...n,parentSpanId:r,traceId:o,sampled:s}):new yo({traceId:o});Qr(e,i);const a=lr();return a&&(a.emit("spanStart",i),n.endTimestamp&&a.emit("spanEnd",i)),i}(e,r,t),Qr(e,s);else if(e){const n=go(e),{traceId:o,spanId:i}=e.spanContext(),a=Gr(e);s=Bo({traceId:o,parentSpanId:i,...t},r,a),ho(s,n)}else{const{traceId:e,dsc:n,parentSpanId:i,sampled:a}={...o.getPropagationContext(),...r.getPropagationContext()};s=Bo({traceId:e,parentSpanId:i,...t},r,a),n&&ho(s,n)}return function(e){if(!_t)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=Zr(e),{spanId:o}=e.spanContext(),s=Gr(e),i=to(e),a=i===e,c=`[Tracing] Starting ${s?"sampled":"unsampled"} ${a?"root ":""}span`,l=[`op: ${n}`,`name: ${t}`,`ID: ${o}`];if(r&&l.push(`parent ID: ${r}`),!a){const{op:e,description:t}=Zr(i);l.push(`root ID: ${i.spanContext().spanId}`),e&&l.push(`root op: ${e}`),t&&l.push(`root description: ${t}`)}Rt.log(`${c}\n ${l.join("\n ")}`)}(s),function(e,t,n){e&&(_n(e,Cr,function(e){try{const t=St.WeakRef;if("function"==typeof t)return new t(e)}catch{}return e}(n)),_n(e,Er,t))}(s,r,o),s}function Ho(e){const t={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const n={...t};return n.startTimestamp=Wr(e.startTime),delete n.startTime,n}return t}function Fo(){return sr(kt())}function Bo(e,t,n){const r=lr(),o=r?.getOptions()||{},{name:s=""}=e,i={spanAttributes:{...e.attributes},spanName:s,parentSampled:n};r?.emit("beforeSampling",i,{decision:!1});const a=i.parentSampled??n,c=i.spanAttributes,l=t.getPropagationContext(),[u,d,p]=t.getScopeData().sdkProcessingMetadata[No]?[!1]:function(e,t,n){if(!so(e))return[!1];let r,o;"function"==typeof e.tracesSampler?(o=e.tracesSampler({...t,inheritOrSampleWith:e=>"number"==typeof t.parentSampleRate?t.parentSampleRate:"boolean"==typeof t.parentSampled?Number(t.parentSampled):e}),r=!0):void 0!==t.parentSampled?o=t.parentSampled:void 0!==e.tracesSampleRate&&(o=e.tracesSampleRate,r=!0);const s=zr(o);if(void 0===s)return _t&&Rt.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(o)} of type ${JSON.stringify(typeof o)}.`),[!1];if(!s)return _t&&Rt.log("[Tracing] Discarding transaction because "+("function"==typeof e.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),[!1,s,r];const i=n<s;return i||_t&&Rt.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(o)})`),[i,s,r]}(o,{name:s,parentSampled:a,attributes:c,parentSampleRate:zr(l.dsc?.sample_rate)},l.sampleRand),h=new Ao({...e,attributes:{[dr]:"custom",[pr]:void 0!==d&&p?d:void 0,...c},sampled:u});return!u&&r&&(_t&&Rt.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate","transaction")),r&&r.emit("spanStart",h),h}function Uo(e,t){if(t)return t;if(null===t)return;const n=Xn(e);if(!n)return;const r=lr();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?to(n):n}const Vo={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3};function qo(e,t={}){const n=new Map;let r,o=!1,s="externalFinish",i=!t.disableAutoFinish;const a=[],{idleTimeout:c=Vo.idleTimeout,finalTimeout:l=Vo.finalTimeout,childSpanTimeout:u=Vo.childSpanTimeout,beforeSpanEnd:d,trimIdleSpanEndTimestamp:p=!0}=t,h=lr();if(!h||!so()){const e=new yo;return ho(e,{sample_rate:"0",sampled:"false",...go(e)}),e}const m=ir(),f=no(),g=function(e){const t=jo(e);return Jn(ir(),t),_t&&Rt.log("[Tracing] Started span is an idle span"),t}(e);function y(){r&&(clearTimeout(r),r=void 0)}function b(e){y(),r=setTimeout(()=>{!o&&0===n.size&&i&&(s="idleTimeout",g.end(e))},c)}function v(e){r=setTimeout(()=>{!o&&i&&(s="heartbeatFailed",g.end(e))},u)}function _(e){o=!0,n.clear(),a.forEach(e=>e()),Jn(m,f);const t=Zr(g),{start_timestamp:r}=t;if(!r)return;t.data[gr]||g.setAttribute(gr,s);const i=t.status;i&&"unknown"!==i||g.setStatus({code:1}),Rt.log(`[Tracing] Idle span "${t.op}" finished`);const u=eo(g).filter(e=>e!==g);let d=0;u.forEach(t=>{t.isRecording()&&(t.setStatus({code:2,message:"cancelled"}),t.end(e),_t&&Rt.log("[Tracing] Cancelling span since span ended early",JSON.stringify(t,void 0,2)));const n=Zr(t),{timestamp:r=0,start_timestamp:o=0}=n,s=o<=e,i=r-o<=(l+c)/1e3;if(_t){const e=JSON.stringify(t,void 0,2);s?i||Rt.log("[Tracing] Discarding span since it finished after idle span final timeout",e):Rt.log("[Tracing] Discarding span since it happened after idle span was finished",e)}i&&s||(function(e,t){e[Jr]&&e[Jr].delete(t)}(g,t),d++)}),d>0&&g.setAttribute("sentry.idle_span_discarded_spans",d)}return g.end=new Proxy(g.end,{apply(e,t,n){if(d&&d(g),t instanceof yo)return;const[r,...o]=n,s=Wr(r||Un()),i=eo(g).filter(e=>e!==g),a=Zr(g);if(!i.length||!p)return _(s),Reflect.apply(e,t,[s,...o]);const c=h.getOptions().ignoreSpans,u=i?.reduce((e,t)=>{const n=Zr(t);return n.timestamp?c&&ao(n,c)?e:e?Math.max(e,n.timestamp):n.timestamp:e},void 0),m=a.start_timestamp,f=Math.min(m?m+l/1e3:Infinity,Math.max(m||-Infinity,Math.min(s,u||Infinity)));return _(f),Reflect.apply(e,t,[f,...o])}}),a.push(h.on("spanStart",e=>{var t;o||e===g||Zr(e).timestamp||e instanceof Ao&&e.isStandaloneSpan()||eo(g).includes(e)&&(t=e.spanContext().spanId,y(),n.set(t,!0),v(Un()+u/1e3))})),a.push(h.on("spanEnd",e=>{var t;o||(t=e.spanContext().spanId,n.has(t)&&n.delete(t),0===n.size&&b(Un()+c/1e3))})),a.push(h.on("idleSpanEnableAutoFinish",e=>{e===g&&(i=!0,b(),n.size&&v())})),t.disableAutoFinish||b(),setTimeout(()=>{o||(g.setStatus({code:2,message:"deadline_exceeded"}),s="finalTimeout",g.end())},l),g}function Wo(e){return new Zo(t=>{t(e)})}function Ko(e){return new Zo((t,n)=>{n(e)})}class Zo{constructor(e){this._state=0,this._handlers=[],this._runExecutor(e)}then(e,t){return new Zo((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(e){return new Zo((t,n)=>{let r,o;return this.then(t=>{o=!1,r=t,e&&e()},t=>{o=!0,r=t,e&&e()}).then(()=>{o?n(r):t(r)})})}_executeHandlers(){if(0===this._state)return;const e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(1===this._state&&e[1](this._value),2===this._state&&e[2](this._value),e[0]=!0)})}_runExecutor(e){const t=(e,t)=>{0===this._state&&(un(t)?t.then(n,r):(this._state=e,this._value=t,this._executeHandlers()))},n=e=>{t(1,e)},r=e=>{t(2,e)};try{e(n,r)}catch(e){r(e)}}}function Go(e,t,n,r=0){try{const o=Yo(t,n,e,r);return un(o)?o:Wo(o)}catch(e){return Ko(e)}}function Yo(e,t,n,r){const o=n[r];if(!e||!o)return e;const s=o({...e},t);return _t&&null===s&&Rt.log(`Event processor "${o.id||"?"}" dropped event`),un(s)?s.then(e=>Yo(e,t,n,r+1)):Yo(s,t,n,r+1)}let Jo,Xo,Qo,es;function ts(e,t){const{extra:n,tags:r,attributes:o,user:s,contexts:i,level:a,sdkProcessingMetadata:c,breadcrumbs:l,fingerprint:u,eventProcessors:d,attachments:p,propagationContext:h,transactionName:m,span:f}=t;ns(e,"extra",n),ns(e,"tags",r),ns(e,"attributes",o),ns(e,"user",s),ns(e,"contexts",i),e.sdkProcessingMetadata=Kn(e.sdkProcessingMetadata,c,2),a&&(e.level=a),m&&(e.transactionName=m),f&&(e.span=f),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),p.length&&(e.attachments=[...e.attachments,...p]),e.propagationContext={...e.propagationContext,...h}}function ns(e,t,n){e[t]=Kn(e[t],n,1)}function rs(e,t,n,r,o,s){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||Nn(),timestamp:t.timestamp||Bn()},l=n.integrations||e.integrations.map(e=>e.name);!function(e,t){const{environment:n,release:r,dist:o,maxValueLength:s}=t;e.environment=e.environment||n||uo,!e.release&&r&&(e.release=r),!e.dist&&o&&(e.dist=o);const i=e.request;i?.url&&s&&(i.url=Rn(i.url,s)),s&&e.exception?.values?.forEach(e=>{e.value&&(e.value=Rn(e.value,s))})}(c,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(c,l),o&&o.emit("applyFrameMetadata",t),void 0===t.type&&function(e,t){const n=function(e){const t=St._sentryDebugIds,n=St._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],o=n?Object.keys(n):[];if(es&&r.length===Xo&&o.length===Qo)return es;Xo=r.length,Qo=o.length,es={},Jo||(Jo={});const s=(t,n)=>{for(const r of t){const t=n[r],o=Jo?.[r];if(o&&es&&t)es[o[0]]=t,Jo&&(Jo[r]=[o[0],t]);else if(t){const n=e(r);for(let e=n.length-1;e>=0;e--){const o=n[e],s=o?.filename;if(s&&es&&Jo){es[s]=t,Jo[r]=[s,t];break}}}}};return t&&s(r,t),n&&s(o,n),es}(t);e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.filename&&(e.debug_id=n[e.filename])})})}(c,e.stackParser);const u=function(e,t){if(!t)return e;const n=e?e.clone():new Qn;return n.update(t),n}(r,n.captureContext);n.mechanism&&Hn(c,n.mechanism);const d=o?o.getEventProcessors():[],p=function(e,t){const n=Ct("globalScope",()=>new Qn).getScopeData();return e&&ts(n,e.getScopeData()),t&&ts(n,t.getScopeData()),n}(s,u),h=[...n.attachments||[],...p.attachments];return h.length&&(n.attachments=h),function(e,t){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=t;!function(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&&"transaction"!==e.type&&(e.transaction=a)}(e,t),r&&function(e,t){e.contexts={trace:Vr(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:go(t),...e.sdkProcessingMetadata};const n=Zr(to(t)).description;n&&!e.transaction&&"transaction"===e.type&&(e.transaction=n)}(e,r),function(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}(e,n),function(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,o),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,s)}(c,p),Go([...d,...p.eventProcessors],c,n).then(e=>(e&&function(e){const t={};if(e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})}),0===Object.keys(t).length)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(([e,t])=>{n.push({type:"sourcemap",code_file:e,debug_id:t})})}(e),"number"==typeof i&&i>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:bo(e.data,t,n)}}))},...e.user&&{user:bo(e.user,t,n)},...e.contexts&&{contexts:bo(e.contexts,t,n)},...e.extra&&{extra:bo(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=bo(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:bo(e.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=bo(e.contexts.flags,3,n)),r}(e,i,a):e))}const os=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function ss(e,t){return ir().captureException(e,function(e){if(e)return function(e){return e instanceof Qn||"function"==typeof e}(e)||function(e){return Object.keys(e).some(e=>os.includes(e))}(e)?{captureContext:e}:e}(t))}function is(e,t){return ir().captureEvent(e,t)}function as(e,t){ar().setContext(e,t)}function cs(e){const t=ar(),n=ir(),{userAgent:r}=St.navigator||{},o=function(e){const t=Un(),n={sid:Nn(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return{sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${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}}}(n)};return e&&Wn(n,e),n}({user:n.getUser()||t.getUser(),...r&&{userAgent:r},...e}),s=t.getSession();return"ok"===s?.status&&Wn(s,{status:"exited"}),ls(),t.setSession(o),o}function ls(){const e=ar(),t=ir().getSession()||e.getSession();t&&function(e){let t={};"ok"===e.status&&(t={status:"exited"}),Wn(e,t)}(t),us(),e.setSession()}function us(){const e=ar(),t=lr(),n=e.getSession();n&&t&&t.captureSession(n)}function ds(e=!1){e?ls():us()}function ps(e){return`${e.protocol?`${e.protocol}:`:""}//${e.host}${e.port?`:${e.port}`:""}${e.path?`/${e.path}`:""}/api/`}const hs=[];function ms(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;if(t.forEach(e=>{e.isDefaultInstance=!0}),Array.isArray(n))r=[...t,...n];else if("function"==typeof n){const e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return function(e){const t={};return e.forEach(e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}(r)}function fs(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function gs(e,t,n){if(n[t.name])_t&&Rt.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,hs.includes(t.name)||"function"!=typeof t.setupOnce||(t.setupOnce(),hs.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),"function"==typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(t,r)=>n(t,r,e))}if("function"==typeof t.processEvent){const n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}_t&&Rt.log(`Integration installed: ${t.name}`)}}function ys(e,t){const n=t??function(e){return bs().get(e)}(e)??[];if(0===n.length)return;const r=e.getOptions(),o=function(e,t,n,r){const o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=Dr(r)),So(o,[(s=e,[{type:"log",item_count:s.length,content_type:"application/vnd.sentry.items.log+json"},{items:s}])]);var s}(n,r._metadata,r.tunnel,e.getDsn());bs().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function bs(){return Ct("clientToLogBufferMap",()=>new WeakMap)}function vs(e,t){const n=t??function(e){return _s().get(e)}(e)??[];if(0===n.length)return;const r=e.getOptions(),o=function(e,t,n,r){const o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=Dr(r)),So(o,[(s=e,[{type:"trace_metric",item_count:s.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:s}])]);var s}(n,r._metadata,r.tunnel,e.getDsn());_s().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function _s(){return Ct("clientToMetricBufferMap",()=>new WeakMap)}const Ss=Symbol.for("SentryBufferFullError");function ws(e=100){const t=new Set;function n(e){t.delete(e)}return{get $(){return Array.from(t)},add:function(r){if(!(t.size<e))return Ko(Ss);const o=r();return t.add(o),o.then(()=>n(o),()=>n(o)),o},drain:function(e){if(!t.size)return Wo(!0);const n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;const r=[n,new Promise(t=>setTimeout(()=>t(!1),e))];return Promise.race(r)}}}function ks(e,t,n=Pn()){return function(e,t){return e[t]||e.all||0}(e,t)>n}function Es(e,{statusCode:t,headers:n},r=Pn()){const o={...e},s=n?.["x-sentry-rate-limits"],i=n?.["retry-after"];if(s)for(const e of s.trim().split(",")){const[t,n,,,s]=e.split(":",5),i=parseInt(t,10),a=1e3*(isNaN(i)?60:i);if(n)for(const e of n.split(";"))"metric_bucket"===e&&s&&!s.split(";").includes("custom")||(o[e]=r+a);else o.all=r+a}else i?o.all=r+function(e,t=Pn()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(i,r):429===t&&(o.all=r+6e4);return o}function Cs(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}const xs="Not capturing exception because it's already been captured.",Ts="Discarded session because of missing or non-string release",Is=Symbol.for("SentryInternalError"),Ms=Symbol.for("SentryDoNotSendEventError");function Os(e){return{message:e,[Is]:!0}}function Ps(e){return{message:e,[Ms]:!0}}function Rs(e){return!!e&&"object"==typeof e&&Is in e}function As(e){return!!e&&"object"==typeof e&&Ms in e}function Ds(e,t,n,r,o){let s,i=0,a=!1;e.on(n,()=>{i=0,clearTimeout(s),a=!1}),e.on(t,t=>{i+=r(t),i>=8e5?o(e):a||(a=!0,s=setTimeout(()=>{o(e)},5e3))}),e.on("flush",()=>{o(e)})}class Ls{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=ws(e.transportOptions?.bufferSize??64),e.dsn?this._dsn=jr(e.dsn):_t&&Rt.warn("No DSN provided, client will not send events."),this._dsn){const r=(t=this._dsn,n=e._metadata?e._metadata.sdk:void 0,e.tunnel||`${function(e){return`${ps(e)}${e.projectId}/envelope/`}(t)}?${function(e,t){const n={sentry_version:"7"};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}(t,n)}`);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:r})}var t,n;this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&Ds(this,"afterCaptureLog","flushLogs",Hs,ys),(this._options.enableMetrics??this._options._experiments?.enableMetrics??1)&&Ds(this,"afterCaptureMetric","flushMetrics",$s,vs)}captureException(e,t,n){const r=Nn();if(Fn(e))return _t&&Rt.log(xs),r;const o={event_id:r,...t};return this._process(()=>this.eventFromException(e,o).then(e=>this._captureEvent(e,o,n)).then(e=>e),"error"),o.event_id}captureMessage(e,t,n,r){const o={event_id:Nn(),...n},s=sn(e)?e:String(e),i=an(e),a=i?this.eventFromMessage(s,t,o):this.eventFromException(e,o);return this._process(()=>a.then(e=>this._captureEvent(e,o,r)),i?"unknown":"error"),o.event_id}captureEvent(e,t,n){const r=Nn();if(t?.originalException&&Fn(t.originalException))return _t&&Rt.log(xs),r;const o={event_id:r,...t},s=e.sdkProcessingMetadata||{},i=s.capturedSpanScope,a=s.capturedSpanIsolationScope,c=Ns(e.type);return this._process(()=>this._captureEvent(e,o,i||n,a),c),o.event_id}captureSession(e){this.sendSession(e),Wn(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(e){const t=this._transport;if(!t)return!0;this.emit("flush");const n=await this._isClientDoneProcessing(e),r=await t.flush(e);return n&&r}async close(e){const t=await this.flush(e);return this.getOptions().enabled=!1,this.emit("close"),t}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const t=this._integrations[e.name];gs(this,e,this._integrations),t||fs(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=function(e,t,n,r){const o=Oo(n),s=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){if(!t)return e;const n=e.sdk||{};e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0}}(e,n?.sdk);const i=Po(e,o,r,t);return delete e.sdkProcessingMetadata,So(i,[[{type:s},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=wo(n,To(e));this.sendEnvelope(n).then(t=>this.emit("afterSendEvent",e,t))}sendSession(e){const{release:t,environment:n=uo}=this._options;if("aggregates"in e){const r=e.attrs||{};if(!r.release&&!t)return void(_t&&Rt.warn(Ts));r.release=r.release||t,r.environment=r.environment||n,e.attrs=r}else{if(!e.release&&!t)return void(_t&&Rt.warn(Ts));e.release=e.release||t,e.environment=e.environment||n}this.emit("beforeSendSession",e);const r=function(e,t,n,r){const o=Oo(n);return So({sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:Dr(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(e,t,n=1){if(this._options.sendClientReports){const r=`${e}:${t}`;_t&&Rt.log(`Recording outcome: "${r}"${n>1?` (${n} times)`:""}`),this._outcomes[r]=(this._outcomes[r]||0)+n}}on(e,t){const n=this._hooks[e]=this._hooks[e]||new Set,r=(...e)=>t(...e);return n.add(r),()=>{n.delete(r)}}emit(e,...t){const n=this._hooks[e];n&&n.forEach(e=>e(...t))}async sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)try{return await this._transport.send(e)}catch(e){return _t&&Rt.error("Error while sending envelope:",e),{}}return _t&&Rt.error("Transport disabled"),{}}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach(t=>{t&&gs(e,t,n)}),n}(this,e),fs(this,e)}_updateSessionFromEvent(e,t){let n="fatal"===t.level,r=!1;const o=t.exception?.values;if(o){r=!0,n=!1;for(const e of o)if(!1===e.mechanism?.handled){n=!0;break}}const s="ok"===e.status;(s&&0===e.errors||s&&n)&&(Wn(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(e=>setTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n,r){const o=this.getOptions(),s=Object.keys(this._integrations);return!t.integrations&&s?.length&&(t.integrations=s),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),rs(o,e,t,n,this,r).then(e=>{if(null===e)return e;this.emit("postprocessEvent",e,t),e.contexts={trace:ur(n),...e.contexts};const r=fo(this,n);return e.sdkProcessingMetadata={dynamicSamplingContext:r,...e.sdkProcessingMetadata},e})}_captureEvent(e,t={},n=ir(),r=ar()){return _t&&js(e)&&Rt.log(`Captured error event \`${Cs(e)[0]||"<unknown>"}\``),this._processEvent(e,t,n,r).then(e=>e.event_id,e=>{_t&&(As(e)?Rt.log(e.message):Rs(e)?Rt.warn(e.message):Rt.warn(e))})}_processEvent(e,t,n,r){const o=this.getOptions(),{sampleRate:s}=o,i=zs(e),a=js(e),c=`before send for type \`${e.type||"error"}\``,l=void 0===s?void 0:zr(s);if(a&&"number"==typeof l&&On()>l)return this.recordDroppedEvent("sample_rate","error"),Ko(Ps(`Discarding event because it's not included in the random sample (sampling rate = ${s})`));const u=Ns(e.type);return this._prepareEvent(e,t,n,r).then(e=>{if(null===e)throw this.recordDroppedEvent("event_processor",u),Ps("An event processor returned `null`, will not send event.");if(t.data&&!0===t.data.__sentry__)return e;const n=function(e,t,n,r){const{beforeSend:o,beforeSendTransaction:s,beforeSendSpan:i,ignoreSpans:a}=t;let c=n;if(js(c)&&o)return o(c,r);if(zs(c)){if(i||a){const t=function(e){const{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:s,data:i,op:a}=e.contexts?.trace??{};return{data:i??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:t??"",origin:s,profile_id:i?.[_r],exclusive_time:i?.[Sr],measurements:e.measurements,is_segment:!0}}(c);if(a?.length&&ao(t,a))return null;if(i){const e=i(t);e?c=Kn(n,{type:"transaction",timestamp:(l=e).timestamp,start_timestamp:l.start_timestamp,transaction:l.description,contexts:{trace:{trace_id:l.trace_id,span_id:l.span_id,parent_span_id:l.parent_span_id,op:l.op,status:l.status,origin:l.origin,data:{...l.data,...l.profile_id&&{[_r]:l.profile_id},...l.exclusive_time&&{[Sr]:l.exclusive_time}}}},measurements:l.measurements}):ro()}if(c.spans){const t=[],n=c.spans;for(const e of n)if(a?.length&&ao(e,a))co(n,e);else if(i){const n=i(e);n?t.push(n):(ro(),t.push(e))}else t.push(e);const r=c.spans.length-t.length;r&&e.recordDroppedEvent("before_send","span",r),c.spans=t}}if(s)return c.spans&&(c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:c.spans.length}),s(c,r)}var l;return c}(this,o,e,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(un(e))return e.then(e=>{if(!cn(e)&&null!==e)throw Os(n);return e},e=>{throw Os(`${t} rejected with ${e}`)});if(!cn(e)&&null!==e)throw Os(n);return e}(n,c)}).then(o=>{if(null===o)throw this.recordDroppedEvent("before_send",u),i&&this.recordDroppedEvent("before_send","span",1+(e.spans||[]).length),Ps(`${c} returned \`null\`, will not send event.`);const s=n.getSession()||r.getSession();if(a&&s&&this._updateSessionFromEvent(s,o),i){const e=(o.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(o.spans?o.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const l=o.transaction_info;if(i&&l&&o.transaction!==e.transaction){const e="custom";o.transaction_info={...l,source:e}}return this.sendEvent(o,t),o}).then(null,e=>{if(As(e)||Rs(e))throw e;throw this.captureException(e,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:e}),Os(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===Ss&&this.recordDroppedEvent("queue_overflow",t),e))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t}})}_flushOutcomes(){_t&&Rt.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(_t&&Rt.log("No outcomes to send"));if(!this._dsn)return void(_t&&Rt.log("No dsn provided, will not send outcomes"));_t&&Rt.log("Sending outcomes:",e);const t=(n=e,So((r=this._options.tunnel&&Dr(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:Bn(),discarded_events:n}]]));var n,r;this.sendEnvelope(t)}}function Ns(e){return"replay_event"===e?"replay":e||"error"}function js(e){return void 0===e.type}function zs(e){return"transaction"===e.type}function $s(e){let t=0;return e.name&&(t+=2*e.name.length),t+=8,t+Fs(e.attributes)}function Hs(e){let t=0;return e.message&&(t+=2*e.message.length),t+Fs(e.attributes)}function Fs(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*Bs(e[0]):an(e)?t+=Bs(e):t+=100}),t}function Bs(e){return"string"==typeof e?2*e.length:"number"==typeof e?8:"boolean"==typeof e?4:0}function Us(e){return"isRelative"in e}function Vs(e,t){const n=e.indexOf("://")<=0&&0!==e.indexOf("//"),r=t??(n?"thismessage:/":void 0);try{if("canParse"in URL&&!URL.canParse(e,r))return;const t=new URL(e,r);return n?{isRelative:n,pathname:t.pathname,search:t.search,hash:t.hash}:t}catch{}}function qs(e){if(Us(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 Ws(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 Ks(e){return"/"===e[e.length-1]?e.slice(0,-1):e}function Zs(e){"aggregates"in e?void 0===e.attrs?.ip_address&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):void 0===e.ipAddress&&(e.ipAddress="{{auto}}")}function Gs(e,t,n=[t],r="npm"){const o=e._metadata||{};o.sdk||(o.sdk={name:`sentry.javascript.${t}`,packages:n.map(e=>({name:`${r}:@sentry/${e}`,version:wt})),version:wt}),e._metadata=o}function Ys(e={}){const t=e.client||lr();if(!function(){const e=lr();return!1!==e?.getOptions().enabled&&!!e?.getTransport()}()||!t)return{};const n=sr(kt());if(n.getTraceData)return n.getTraceData(e);const r=e.scope||ir(),o=e.span||no(),s=o?function(e){const{traceId:t,spanId:n}=e.spanContext();return Hr(t,n,Gr(e))}(o):function(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Hr(t,r,n)}(r),i=function(e){if(e)return function(e){if(0!==Object.keys(e).length)return Object.entries(e).reduce((e,[t,n],r)=>{const o=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`,s=0===r?o:`${e},${o}`;return s.length>8192?(_t&&Rt.warn(`Not adding key: ${t} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):s},"")}(Object.entries(e).reduce((e,[t,n])=>(n&&(e[`${Ir}${t}`]=n),e),{}))}(o?go(o):fo(t,r));if(!$r.test(s))return Rt.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const a={"sentry-trace":s,baggage:i};return e.propagateTraceparent&&(a.traceparent=o?function(e){const{traceId:t,spanId:n}=e.spanContext();return Fr(t,n,Gr(e))}(o):function(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Fr(t,r,n)}(r)),a}const Js=100;function Xs(e,t){const n=lr(),r=ar();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:s=Js}=n.getOptions();if(s<=0)return;const i={timestamp:Bn(),...e},a=o?It(()=>o(i,t)):i;null!==a&&(n.emit&&n.emit("beforeAddBreadcrumb",a,t),r.addBreadcrumb(a,s))}let Qs;const ei=new WeakMap,ti=()=>({name:"FunctionToString",setupOnce(){Qs=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=wn(this),n=ei.has(lr())&&void 0!==t?t:this;return Qs.apply(n,e)}}catch{}},setup(e){ei.set(e,!0)}}),ni=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,'can\'t redefine non-configurable property "solana"',"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],ri=(e={})=>{let t;return{name:"EventFilters",setup(n){const r=n.getOptions();t=si(e,r)},processEvent(n,r,o){if(!t){const n=o.getOptions();t=si(e,n)}return function(e,t){if(e.type){if("transaction"===e.type&&function(e,t){if(!t?.length)return!1;const n=e.transaction;return!!n&&Ln(n,t)}(e,t.ignoreTransactions))return _t&&Rt.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${zn(e)}`),!0}else{if(function(e,t){return!!t?.length&&Cs(e).some(e=>Ln(e,t))}(e,t.ignoreErrors))return _t&&Rt.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${zn(e)}`),!0;if(function(e){return!!e.exception?.values?.length&&!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&"Error"!==e.type||e.value)}(e))return _t&&Rt.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${zn(e)}`),!0;if(function(e,t){if(!t?.length)return!1;const n=ii(e);return!!n&&Ln(n,t)}(e,t.denyUrls))return _t&&Rt.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${zn(e)}.\nUrl: ${ii(e)}`),!0;if(!function(e,t){if(!t?.length)return!0;const n=ii(e);return!n||Ln(n,t)}(e,t.allowUrls))return _t&&Rt.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${zn(e)}.\nUrl: ${ii(e)}`),!0}return!1}(n,t)?null:n}}},oi=(e={})=>({...ri(e),name:"InboundFilters"});function si(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:ni],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function ii(e){try{const t=[...e.exception?.values??[]].reverse().find(e=>void 0===e.mechanism?.parent_id&&e.stacktrace?.frames?.length),n=t?.stacktrace?.frames;return n?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(n):null}catch{return _t&&Rt.error(`Cannot extract url for event ${zn(e)}`),null}}function ai(e,t,n,r,o,s){if(!o.exception?.values||!s||!dn(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=ci(e,t,r,s.originalException,n,o.exception.values,i,0))}function ci(e,t,n,r,o,s,i,a){if(s.length>=n+1)return s;let c=[...s];if(dn(r[o],Error)){li(i,a);const s=e(t,r[o]),l=c.length;ui(s,o,l,a),c=ci(e,t,n,r[o],o,[s,...c],s,l)}return Array.isArray(r.errors)&&r.errors.forEach((r,s)=>{if(dn(r,Error)){li(i,a);const l=e(t,r),u=c.length;ui(l,`errors[${s}]`,u,a),c=ci(e,t,n,r,o,[l,...c],l,u)}}),c}function li(e,t){e.mechanism={handled:!0,type:"auto.core.linked_errors",...e.mechanism,..."AggregateError"===e.type&&{is_exception_group:!0},exception_id:t}}function ui(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function di(){"console"in St&&xt.forEach(function(e){e in St.console&&vn(St.console,e,function(t){return Tt[e]=t,function(...t){Wt("console",{args:t,level:e});const n=Tt[e];n?.apply(St.console,t)}})})}function pi(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const hi=()=>{let e;return{name:"Dedupe",processEvent(t){if(t.type)return t;try{if(function(e,t){return!(!t||!function(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!fi(e,t)||!mi(e,t))}(e,t)&&!function(e,t){const n=gi(t),r=gi(e);return!!(n&&r&&n.type===r.type&&n.value===r.value&&fi(e,t)&&mi(e,t))}(e,t))}(t,e))return _t&&Rt.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}};function mi(e,t){let n=Ht(e),r=Ht(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let e=0;e<r.length;e++){const t=r[e],o=n[e];if(t.filename!==o.filename||t.lineno!==o.lineno||t.colno!==o.colno||t.function!==o.function)return!1}return!0}function fi(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch{return!1}}function gi(e){return e.exception?.values?.[0]}function yi(e){return e.split(",").some(e=>e.trim().startsWith(Ir))}function bi(e,t,n,r){const o={url:e,type:"fetch","http.method":n,[fr]:r,[mr]:"http.client"};return t&&(Us(t)||(o["http.url"]=t.href,o["server.address"]=t.host),t.search&&(o["http.query"]=t.search),t.hash&&(o["http.fragment"]=t.hash)),o}function vi(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}const _i=St;function Si(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function wi(e,t){const n="fetch";Vt(n,e),qt(n,()=>ki(void 0,t))}function ki(e,t=!1){t&&!function(){if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in _i))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}())return!1;if(Si(_i.fetch))return!0;let e=!1;const t=_i.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=Si(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){_t&&Rt.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e}()||vn(St,"fetch",function(t){return function(...n){const r=new Error,{method:o,url:s}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:xi(t),method:Ci(n,"method")?String(n.method).toUpperCase():hn(t)&&Ci(t,"method")?String(t.method).toUpperCase():"GET"}}const t=e[0];return{url:xi(t),method:Ci(t,"method")?String(t.method).toUpperCase():"GET"}}(n),i={args:n,fetchData:{method:o,url:s},startTimestamp:1e3*Un(),virtualError:r,headers:Ti(n)};return e||Wt("fetch",{...i}),t.apply(St,n).then(async t=>(e?e(t):Wt("fetch",{...i,endTimestamp:1e3*Un(),response:t}),t),e=>{if(Wt("fetch",{...i,endTimestamp:1e3*Un(),error:e}),en(e)&&void 0===e.stack&&(e.stack=r.stack,_n(e,"framesToPop",1)),e instanceof TypeError&&("Failed to fetch"===e.message||"Load failed"===e.message||"NetworkError when attempting to fetch resource."===e.message))try{const t=new URL(i.fetchData.url);e.message=`${e.message} (${t.host})`}catch{}throw e})}})}function Ei(e){let t;try{t=e.clone()}catch{return}!async function(e,t){if(e?.body){const n=e.body,r=n.getReader(),o=setTimeout(()=>{n.cancel().then(null,()=>{})},9e4);let s=!0;for(;s;){let e;try{e=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:o}=await r.read();clearTimeout(e),o&&(t(),s=!1)}catch{s=!1}finally{clearTimeout(e)}}clearTimeout(o),r.releaseLock(),n.cancel().then(null,()=>{})}}(t,()=>{Wt("fetch-body-resolved",{endTimestamp:1e3*Un(),response:e})})}function Ci(e,t){return!!e&&"object"==typeof e&&!!e[t]}function xi(e){return"string"==typeof e?e:e?Ci(e,"url")?e.url:e.toString?e.toString():"":""}function Ti(e){const[t,n]=e;try{if("object"==typeof n&&null!==n&&"headers"in n&&n.headers)return new Headers(n.headers);if(hn(t))return new Headers(t.headers)}catch{}}function Ii(){return"undefined"!=typeof window&&(!(("undefined"==typeof __SENTRY_BROWSER_BUNDLE__||!__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0))||function(){const e=St.process;return"renderer"===e?.type}())}const Mi=St;let Oi=0;function Pi(){return Oi>0}function Ri(e,t={}){if(!function(e){return"function"==typeof e}(e))return e;try{const t=e.__sentry_wrapped__;if(t)return"function"==typeof t?t:e;if(wn(e))return e}catch{return e}const n=function(...n){try{const r=n.map(e=>Ri(e,t));return e.apply(this,r)}catch(e){throw Oi++,setTimeout(()=>{Oi--}),cr(r=>{r.addEventProcessor(e=>(t.mechanism&&($n(e,void 0,void 0),Hn(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),ss(e)}),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}Sn(n,e),_n(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}function Ai(){const e=yn(),{referrer:t}=Mi.document||{},{userAgent:n}=Mi.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}function Di(e,t){const n=Ni(e,t),r={type:$i(t),value:Hi(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function Li(e,t){return{exception:{values:[Di(e,t)]}}}function Ni(e,t){const n=t.stacktrace||t.stack||"",r=function(e){return e&&ji.test(e.message)?1:0}(t),o=function(e){return"number"==typeof e.framesToPop?e.framesToPop:0}(t);try{return e(n,r,o)}catch{}return[]}const ji=/Minified React error #\d+;/i;function zi(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function $i(e){const t=e?.name;return!t&&zi(e)?e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception":t}function Hi(e){const t=e?.message;return zi(e)?Array.isArray(e.message)&&2==e.message.length?e.message[1]:"wasm exception":t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function Fi(e,t,n,r,o){let s;if(nn(t)&&t.error)return Li(e,t.error);if(rn(t)||tn(t,"DOMException")){const o=t;if("stack"in t)s=Li(e,t);else{const t=o.name||(rn(o)?"DOMError":"DOMException"),i=o.message?`${t}: ${o.message}`:t;s=Bi(e,i,n,r),$n(s,i)}return"code"in o&&(s.tags={...s.tags,"DOMException.code":`${o.code}`}),s}return en(t)?Li(e,t):cn(t)||ln(t)?(s=function(e,t,n,r){const o=lr(),s=o?.getOptions().normalizeDepth,i=function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}(t),a={__serialized__:vo(t,s)};if(i)return{exception:{values:[Di(e,i)]},extra:a};const c={exception:{values:[{type:ln(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Ui(t,{isUnhandledRejection:r})}]},extra:a};if(n){const t=Ni(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}(e,t,n,o),Hn(s,{synthetic:!0}),s):(s=Bi(e,t,n,r),$n(s,`${t}`,void 0),Hn(s,{synthetic:!0}),s)}function Bi(e,t,n,r){const o={};if(r&&n){const r=Ni(e,n);r.length&&(o.exception={values:[{value:t,stacktrace:{frames:r}}]}),Hn(o,{synthetic:!0})}if(sn(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return o.logentry={message:e,params:n},o}return o.message=t,o}function Ui(e,{isUnhandledRejection:t}){const n=function(e){const t=Object.keys(kn(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}(e),r=t?"promise rejection":"exception";return nn(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:ln(e)?`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}class Vi extends Ls{constructor(e){const t=(n=e,{release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:Mi.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...n});var n;Gs(t,"browser",["browser"],Mi.SENTRY_SDK_SOURCE||"npm"),t._metadata?.sdk&&(t._metadata.sdk.settings={infer_ip:t.sendDefaultPii?"auto":"never",...t._metadata.sdk.settings}),super(t);const{sendDefaultPii:r,sendClientReports:o,enableLogs:s,_experiments:i,enableMetrics:a}=this._options,c=a??i?.enableMetrics??!0;Mi.document&&(o||s||c)&&Mi.document.addEventListener("visibilitychange",()=>{"hidden"===Mi.document.visibilityState&&(o&&this._flushOutcomes(),s&&ys(this),c&&vs(this))}),r&&this.on("beforeSendSession",Zs)}eventFromException(e,t){return function(e,t,n,r){const o=Fi(e,t,n?.syntheticException||void 0,r);return Hn(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),Wo(o)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,o){const s=Bi(e,t,r?.syntheticException||void 0,o);return s.level=n,r?.event_id&&(s.event_id=r.event_id),Wo(s)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n,r)}}const qi="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Wi=St,Ki=(e,t,n,r)=>{let o,s;return i=>{t.value>=0&&(i||r)&&(s=t.value-(o??0),(s||void 0===o)&&(o=t.value,t.delta=s,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,n),e(t)))}},Zi=(e=!0)=>{const t=Wi.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Gi=()=>{const e=Zi();return e?.activationStart??0};function Yi(e,t,n){Wi.document&&Wi.addEventListener(e,t,n)}function Ji(e,t,n){Wi.document&&Wi.removeEventListener(e,t,n)}let Xi=-1;const Qi=new Set,ea=e=>{if(function(e){return"pagehide"===e.type||"hidden"===Wi.document?.visibilityState}(e)&&Xi>-1){if("visibilitychange"===e.type||"pagehide"===e.type)for(const e of Qi)e();isFinite(Xi)||(Xi="visibilitychange"===e.type?e.timeStamp:0,Ji("prerenderingchange",ea,!0))}},ta=()=>{if(Wi.document&&Xi<0){const e=Gi(),t=Wi.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(t=>"hidden"===t.name&&t.startTime>e)[0]?.startTime;Xi=t??("hidden"!==Wi.document?.visibilityState||Wi.document?.prerendering?Infinity:0),Yi("visibilitychange",ea,!0),Yi("pagehide",ea,!0),Yi("prerenderingchange",ea,!0)}return{get firstHiddenTime(){return Xi},onHidden(e){Qi.add(e)}}},na=(e,t=-1)=>{const n=Zi();let r="navigate";return n&&(Wi.document?.prerendering||Gi()>0?r="prerender":Wi.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},ra=new WeakMap;function oa(e,t){return ra.get(e)||ra.set(e,new t),ra.get(e)}class sa{constructor(){sa.prototype.__init.call(this),sa.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(e){if(e.hadRecentInput)return;const t=this._sessionEntries[0],n=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this._sessionValue+=e.value,this._sessionEntries.push(e)):(this._sessionValue=e.value,this._sessionEntries=[e]),this._onAfterProcessingUnexpectedShift?.(e)}}const ia=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},aa=e=>{let t=!1;return()=>{t||(e(),t=!0)}},ca=e=>{Wi.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},la=[1800,3e3],ua=[.1,.25];let da=0,pa=Infinity,ha=0;const ma=e=>{e.forEach(e=>{e.interactionId&&(pa=Math.min(pa,e.interactionId),ha=Math.max(ha,e.interactionId),da=ha?(ha-pa)/7+1:0)})};let fa;const ga=()=>fa?da:performance.interactionCount||0,ya=()=>{"interactionCount"in performance||fa||(fa=ia("event",ma,{type:"event",buffered:!0,durationThreshold:0}))};let ba=0;class va{constructor(){va.prototype.__init.call(this),va.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){ba=ga(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const e=Math.min(this._longestInteractionList.length-1,Math.floor((ga()-ba)/50));return this._longestInteractionList[e]}_processEntry(e){if(this._onBeforeProcessingEntry?.(e),!e.interactionId&&"first-input"!==e.entryType)return;const t=this._longestInteractionList.at(-1);let n=this._longestInteractionMap.get(e.interactionId);if(n||this._longestInteractionList.length<10||e.duration>t._latency){if(n?e.duration>n._latency?(n.entries=[e],n._latency=e.duration):e.duration===n._latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],_latency:e.duration},this._longestInteractionMap.set(n.id,n),this._longestInteractionList.push(n)),this._longestInteractionList.sort((e,t)=>t._latency-e._latency),this._longestInteractionList.length>10){const e=this._longestInteractionList.splice(10);for(const t of e)this._longestInteractionMap.delete(t.id)}this._onAfterProcessingINPCandidate?.(n)}}}const _a=e=>{const t=Wi.requestIdleCallback||Wi.setTimeout;"hidden"===Wi.document?.visibilityState?e():(Yi("visibilitychange",e=aa(e),{once:!0,capture:!0}),Yi("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),Ji("visibilitychange",e,{capture:!0}),Ji("pagehide",e,{capture:!0})}))},Sa=[200,500];class wa{_processEntry(e){this._onBeforeProcessingEntry?.(e)}}const ka=[2500,4e3],Ea=[800,1800],Ca=e=>{Wi.document?.prerendering?ca(()=>Ca(e)):"complete"!==Wi.document?.readyState?addEventListener("load",()=>Ca(e),!0):setTimeout(e)},xa={},Ta={};let Ia,Ma,Oa,Pa;function Ra(e,t=!1){return Fa("cls",e,ja,Ia,t)}function Aa(e,t=!1){return Fa("lcp",e,za,Ma,t)}function Da(e){return Fa("inp",e,Ha,Pa)}function La(e,t){return Ba(e,t),Ta[e]||(function(e){const t={};"event"===e&&(t.durationThreshold=0),ia(e,t=>{Na(e,{entries:t})},t)}(e),Ta[e]=!0),Ua(e,t)}function Na(e,t){const n=xa[e];if(n?.length)for(const r of n)try{r(t)}catch(t){qi&&Rt.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${$t(r)}\nError:`,t)}}function ja(){return((e,t={})=>{((e,t={})=>{ca(()=>{const n=ta(),r=na("FCP");let o;const s=ia("paint",e=>{for(const t of e)"first-contentful-paint"===t.name&&(s.disconnect(),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-Gi(),0),r.entries.push(t),o(!0)))});s&&(o=Ki(e,r,la,t.reportAllChanges))})})(aa(()=>{const n=na("CLS",0);let r;const o=ta(),s=oa(t,sa),i=e=>{for(const t of e)s._processEntry(t);s._sessionValue>n.value&&(n.value=s._sessionValue,n.entries=s._sessionEntries,r())},a=ia("layout-shift",i);a&&(r=Ki(e,n,ua,t.reportAllChanges),o.onHidden(()=>{i(a.takeRecords()),r(!0)}),Wi?.setTimeout?.(r))}))})(e=>{Na("cls",{metric:e}),Ia=e},{reportAllChanges:!0})}function za(){return((e,t={})=>{ca(()=>{const n=ta(),r=na("LCP");let o;const s=oa(t,wa),i=e=>{t.reportAllChanges||(e=e.slice(-1));for(const t of e)s._processEntry(t),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-Gi(),0),r.entries=[t],o())},a=ia("largest-contentful-paint",i);if(a){o=Ki(e,r,ka,t.reportAllChanges);const n=aa(()=>{i(a.takeRecords()),a.disconnect(),o(!0)}),s=e=>{e.isTrusted&&(_a(n),Ji(e.type,s,{capture:!0}))};for(const e of["keydown","click","visibilitychange"])Yi(e,s,{capture:!0})}})})(e=>{Na("lcp",{metric:e}),Ma=e},{reportAllChanges:!0})}function $a(){return((e,t={})=>{const n=na("TTFB"),r=Ki(e,n,Ea,t.reportAllChanges);Ca(()=>{const e=Zi();e&&(n.value=Math.max(e.responseStart-Gi(),0),n.entries=[e],r(!0))})})(e=>{Na("ttfb",{metric:e}),Oa=e})}function Ha(){return((e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=ta();ca(()=>{ya();const r=na("INP");let o;const s=oa(t,va),i=e=>{_a(()=>{for(const t of e)s._processEntry(t);const t=s._estimateP98LongestInteraction();t&&t._latency!==r.value&&(r.value=t._latency,r.entries=t.entries,o())})},a=ia("event",i,{durationThreshold:t.durationThreshold??40});o=Ki(e,r,Sa,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{i(a.takeRecords()),o(!0)}))})})(e=>{Na("inp",{metric:e}),Pa=e})}function Fa(e,t,n,r,o=!1){let s;return Ba(e,t),Ta[e]||(s=n(),Ta[e]=!0),r&&t({metric:r}),Ua(e,t,o?s:void 0)}function Ba(e,t){xa[e]=xa[e]||[],xa[e].push(t)}function Ua(e,t,n){return()=>{n&&n();const r=xa[e];if(!r)return;const o=r.indexOf(t);-1!==o&&r.splice(o,1)}}function Va(e){return"number"==typeof e&&isFinite(e)}function qa(e,t,n,{...r}){const o=Zr(e).start_timestamp;return o&&o>t&&"function"==typeof e.updateStartTime&&e.updateStartTime(t),zo(e,()=>{const e=jo({startTime:t,...r});return e&&e.end(n),e})}function Wa(e){const t=lr();if(!t)return;const{name:n,transaction:r,attributes:o,startTime:s}=e,{release:i,environment:a,sendDefaultPii:c}=t.getOptions(),l=t.getIntegrationByName("Replay"),u=l?.getReplayId(),d=ir(),p=d.getUser(),h=void 0!==p?p.email||p.id||p.ip_address:void 0;let m;try{m=d.getScopeData().contexts.profile.profile_id}catch{}return jo({name:n,attributes:{release:i,environment:a,user:h||void 0,profile_id:m||void 0,replay_id:u||void 0,transaction:r,"user_agent.original":Wi.navigator?.userAgent,"client.address":c?"{{auto}}":void 0,...o},startTime:s,experimental:{standalone:!0}})}function Ka(){return Wi.addEventListener&&Wi.performance}function Za(e){return e/1e3}function Ga(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function Ya(e,t){let n,r=!1;function o(e){!r&&n&&t(e,n),r=!0}(()=>{const e=e=>{"pagehide"!==e.type&&"hidden"!==Wi.document?.visibilityState||o("pagehide")};Yi("visibilitychange",e,{capture:!0,once:!0}),Yi("pagehide",e,{capture:!0,once:!0})})();const s=e.on("beforeStartNavigationSpan",(e,t)=>{t?.isRedirect||(o("navigation"),s(),i())}),i=e.on("afterStartPageLoadSpan",e=>{n=e.spanContext().spanId,i()})}function Ja(e){return e?((qn()||performance.timeOrigin)+e)/1e3:e}function Xa(e){const t={};if(null!=e.nextHopProtocol){const{name:n,version:r}=function(e){let t="unknown",n="unknown",r="";for(const o of e){if("/"===o){[t,n]=e.split("/");break}if(!isNaN(Number(o))){t="h"===r?"http":r,n=e.split(r)[1];break}r+=o}return r===e&&(t=r),{name:t,version:n}}(e.nextHopProtocol);t["network.protocol.version"]=r,t["network.protocol.name"]=n}return qn()||Ka()?.timeOrigin?(n={...t,"http.request.redirect_start":Ja(e.redirectStart),"http.request.redirect_end":Ja(e.redirectEnd),"http.request.worker_start":Ja(e.workerStart),"http.request.fetch_start":Ja(e.fetchStart),"http.request.domain_lookup_start":Ja(e.domainLookupStart),"http.request.domain_lookup_end":Ja(e.domainLookupEnd),"http.request.connect_start":Ja(e.connectStart),"http.request.secure_connection_start":Ja(e.secureConnectionStart),"http.request.connection_end":Ja(e.connectEnd),"http.request.request_start":Ja(e.requestStart),"http.request.response_start":Ja(e.responseStart),"http.request.response_end":Ja(e.responseEnd),"http.request.time_to_first_byte":null!=e.responseStart?e.responseStart/1e3:void 0},Object.fromEntries(Object.entries(n).filter(([,e])=>null!=e))):t;var n}let Qa,ec,tc=0,nc={};function rc(e,t,n,r,o=n){const s=function(e){return"secureConnection"===e?"connectEnd":"fetch"===e?"domainLookupStart":`${e}End`}(n),i=t[s],a=t[`${n}Start`];a&&i&&qa(e,r+Za(a),r+Za(i),{op:`browser.${o}`,name:t.name,attributes:{[fr]:"auto.ui.browser.metrics",..."redirect"===n&&null!=t.redirectCount?{"http.redirect_count":t.redirectCount}:{}}})}const oc=({entries:e})=>{const t=no(),n=t?to(t):void 0,r=n?Zr(n).description:ir().getScopeData().transactionName;e.forEach(e=>{const t=e;if(!t.identifier)return;const n=t.name,o=t.renderTime,s=t.loadTime,[i,a]=s?[Za(s),"load-time"]:o?[Za(o),"render-time"]:[Un(),"entry-emission"],c="image-paint"===n?Za(Math.max(0,(o??0)-(s??0))):0,l={[fr]:"auto.ui.browser.elementtiming",[mr]:"ui.elementtiming",[dr]:"component","sentry.span_start_time_source":a,"sentry.transaction_name":r,"element.id":t.id,"element.type":t.element?.tagName?.toLowerCase()||"unknown","element.size":t.naturalWidth&&t.naturalHeight?`${t.naturalWidth}x${t.naturalHeight}`:void 0,"element.render_time":o,"element.load_time":s,"element.url":t.url||void 0,"element.identifier":t.identifier,"element.paint_type":n};!function(e,t){const n=Fo();if(n.startSpan)return n.startSpan(e,t);const r=Ho(e),{forceTransaction:o,parentSpan:s,scope:i}=e,a=i?.clone();cr(a,()=>{const n=void 0!==(i=s)?e=>zo(i,e):e=>e();var i;return n(()=>{const n=ir(),i=Uo(n,s),a=e.onlyIfParent&&!i?new yo:$o({parentSpan:i,spanArguments:r,forceTransaction:o,scope:n});return Jn(n,a),function(e,t,n=()=>{},r=()=>{}){let o;try{o=e()}catch(e){throw t(e),n(),e}return function(e,t,n,r){return un(e)?e.then(e=>(n(),r(e),e),e=>{throw t(e),n(),e}):(n(),r(e),e)}(o,t,n,r)}(()=>t(a),()=>{const{status:e}=Zr(a);!a.isRecording()||e&&"ok"!==e||a.setStatus({code:2,message:"internal_error"})},()=>{a.end()})})})}({name:`element[${t.identifier}]`,attributes:l,startTime:i,onlyIfParent:!0},e=>{e.end(i+c)})})};let sc,ic,ac,cc;function lc(e){Vt("dom",e),qt("dom",uc)}function uc(){if(!Wi.document)return;const e=Wt.bind(null,"dom"),t=dc(e,!0);Wi.document.addEventListener("click",t,!1),Wi.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{const n=Wi,r=n[t]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(vn(r,"addEventListener",function(t){return function(n,r,o){if("click"===n||"keypress"==n)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},s=r[n]=r[n]||{refCount:0};if(!s.handler){const r=dc(e);s.handler=r,t.call(this,n,r,o)}s.refCount++}catch{}return t.call(this,n,r,o)}}),vn(r,"removeEventListener",function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this.__sentry_instrumentation_handlers__||{},o=n[t];o&&(o.refCount--,o.refCount<=0&&(e.call(this,t,o.handler,r),o.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function dc(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(e){try{return e.target}catch{return null}}(n);if(function(e,t){return"keypress"===e&&(!t?.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}(n.type,r))return;_n(n,"_sentryCaptured",!0),r&&!r._sentryId&&_n(r,"_sentryId",Nn());const o="keypress"===n.type?"input":n.type;(function(e){if(e.type!==ic)return!1;try{if(!e.target||e.target._sentryId!==ac)return!1}catch{}return!0})(n)||(e({event:n,name:o,global:t}),ic=n.type,ac=r?r._sentryId:void 0),clearTimeout(sc),sc=Wi.setTimeout(()=>{ac=void 0,ic=void 0},1e3)}}function pc(e){const t="history";Vt(t,e),qt(t,hc)}function hc(){function e(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const r=cc,o=function(e){try{return new URL(e,Wi.location.origin).toString()}catch{return e}}(String(n));if(cc=o,r===o)return e.apply(this,t);Wt("history",{from:r,to:o})}return e.apply(this,t)}}Wi.addEventListener("popstate",()=>{const e=Wi.location.href,t=cc;cc=e,t!==e&&Wt("history",{from:t,to:e})}),"history"in _i&&_i.history&&(vn(Wi.history,"pushState",e),vn(Wi.history,"replaceState",e))}const mc={};function fc(e){const t=mc[e];if(t)return t;let n=Wi[e];if(Si(n))return mc[e]=n.bind(Wi);const r=Wi.document;if(r&&"function"==typeof r.createElement)try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);const o=t.contentWindow;o?.[e]&&(n=o[e]),r.head.removeChild(t)}catch(t){qi&&Rt.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n?mc[e]=n.bind(Wi):n}function gc(...e){return fc("setTimeout")(...e)}const yc="__sentry_xhr_v3__";function bc(e){Vt("xhr",e),qt("xhr",vc)}function vc(){if(!Wi.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){const r=new Error,o=1e3*Un(),s=on(n[0])?n[0].toUpperCase():void 0,i=function(e){if(on(e))return e;try{return e.toString()}catch{}}(n[1]);if(!s||!i)return e.apply(t,n);t[yc]={method:s,url:i,request_headers:{}},"POST"===s&&i.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const a=()=>{const e=t[yc];if(e&&4===t.readyState){try{e.status_code=t.status}catch{}Wt("xhr",{endTimestamp:1e3*Un(),startTimestamp:o,xhr:t,virtualError:r})}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(a(),e.apply(t,n))}):t.addEventListener("readystatechange",a),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){const[r,o]=n,s=t[yc];return s&&on(r)&&on(o)&&(s.request_headers[r.toLowerCase()]=o),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){const r=t[yc];return r?(void 0!==n[0]&&(r.body=n[0]),Wt("xhr",{startTimestamp:1e3*Un(),xhr:t}),e.apply(t,n)):e.apply(t,n)}})}const _c=Symbol.for("sentry__originalRequestBody");function Sc(e){return new URLSearchParams(e).toString()}function wc(e,t=Rt){try{if("string"==typeof e)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[Sc(e)];if(!e)return[void 0]}catch(n){return qi&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return qi&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function kc(e=[]){if(e.length>=2&&e[1]&&"object"==typeof e[1]&&"body"in e[1])return e[1].body;if(e.length>=1&&e[0]instanceof Request){const t=e[0][_c];return void 0!==t?t:void 0}}function Ec(e){let t;try{t=e.getAllResponseHeaders()}catch(t){return qi&&Rt.error(t,"Failed to get xhr response headers",e),{}}return t?t.split("\r\n").reduce((e,t)=>{const[n,r]=t.split(": ");return r&&(e[n.toLowerCase()]=r),e},{}):{}}const Cc=[],xc=new Map,Tc=new Map,Ic={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"},Mc=({metric:e})=>{if(null==e.value)return;const t=Za(e.value);if(t>60)return;const n=e.entries.find(t=>t.duration===e.value&&Ic[t.name]);if(!n)return;const{interactionId:r}=n,o=Ic[n.name],s=Za(qn()+n.startTime),i=no(),a=i?to(i):void 0,c=null!=r?xc.get(r):void 0,l=c?.span||a,u=l?Zr(l).description:ir().getScopeData().transactionName,d=Wa({name:c?.elementName||fn(n.target),transaction:u,attributes:{[fr]:"auto.http.browser.inp",[mr]:`ui.interaction.${o}`,[Sr]:n.duration},startTime:s});d&&(d.addEvent("inp",{[yr]:"millisecond",[br]:e.value}),d.end(s+t))};function Oc(e,t=fc("fetch")){let n=0,r=0;return function(e,t,n=ws(e.bufferSize||64)){let r={};return{send:function(o){const s=[];if(ko(o,(t,n)=>{const o=Mo(n);ks(r,o)?e.recordDroppedEvent("ratelimit_backoff",o):s.push(t)}),0===s.length)return Promise.resolve({});const i=So(o[0],s),a=t=>{ko(i,(n,r)=>{e.recordDroppedEvent(t,Mo(r))})};return n.add(()=>t({body:Co(i)}).then(e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&_t&&Rt.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=Es(r,e),e),e=>{throw a("network_error"),_t&&Rt.error("Encountered error running transport request:",e),e})).then(e=>e,e=>{if(e===Ss)return _t&&Rt.error("Skipped sending event because buffer is full."),a("queue_overflow"),Promise.resolve({});throw e})},flush:e=>n.drain(e)}}(e,async function(o){const s=o.body.length;n+=s,r++;const i={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const n=await t(e.url,i);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get("X-Sentry-Rate-Limits"),"retry-after":n.headers.get("Retry-After")}}}catch(e){throw mc.fetch=void 0,e}finally{n-=s,r--}},ws(e.bufferSize||40))}const Pc="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function Rc(e,t,n,r){const o={filename:e,function:"<anonymous>"===t?At:t,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==r&&(o.colno=r),o}const Ac=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Dc=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Lc=/\((\S*)(?::(\d+))(?::(\d+))\)/,Nc=/at (.+?) ?\(data:(.+?),/,jc=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,zc=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,$c=Nt([30,e=>{const t=e.match(Nc);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=Ac.exec(e);if(n){const[,e,t,r]=n;return Rc(e,At,+t,+r)}const r=Dc.exec(e);if(r){if(r[2]&&0===r[2].indexOf("eval")){const e=Lc.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}const[e,t]=Hc(r[1]||At,r[2]);return Rc(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],[50,e=>{const t=jc.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=zc.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||At;return[n,e]=Hc(n,e),Rc(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),Hc=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:At,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Fc=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(e){t.console&&function(e){const t="console";Vt(t,e),qt(t,di)}(function(e){return function(t){if(lr()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:pi(t.level),message:An(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${An(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}Xs(n,{input:t.args,level:t.level})}}(e)),t.dom&&lc(function(e,t){return function(n){if(lr()!==e)return;let r,o,s="object"==typeof t?t.serializeAttribute:void 0,i="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;i&&i>1024&&(Pc&&Rt.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${i} was configured. Sentry will use 1024 instead.`),i=1024),"string"==typeof s&&(s=[s]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=fn(t,{keyAttrs:s,maxStringLength:i}),o=bn(t)}catch{r="<unknown>"}if(0===r.length)return;const a={category:`ui.${n.name}`,message:r};o&&(a.data={"ui.component_name":o}),Xs(a,{event:n.event,name:n.name,global:n.global})}}(e,t.dom)),t.xhr&&bc(function(e){return function(t){if(lr()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,o=t.xhr[yc];if(!n||!r||!o)return;const{method:s,url:i,status_code:a,body:c}=o,l={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},u={category:"xhr",data:{method:s,url:i,status_code:a},type:"http",level:vi(a)};e.emit("beforeOutgoingRequestBreadcrumb",u,l),Xs(u,l)}}(e)),t.fetch&&wi(function(e){return function(t){if(lr()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){const o={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},s={category:"fetch",data:t.fetchData,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",s,o),Xs(s,o)}else{const o=t.response,s={...t.fetchData,status_code:o?.status},i={input:t.args,response:o,startTimestamp:n,endTimestamp:r},a={category:"fetch",data:s,type:"http",level:vi(s.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",a,i),Xs(a,i)}}}(e)),t.history&&pc(function(e){return function(t){if(lr()!==e)return;let n=t.from,r=t.to;const o=Ws(Mi.location.href);let s=n?Ws(n):void 0;const i=Ws(r);s?.path||(s=o),o.protocol===i.protocol&&o.host===i.host&&(r=i.relative),o.protocol===s.protocol&&o.host===s.host&&(n=s.relative),Xs({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on("beforeSendEvent",function(e){return function(t){lr()===e&&Xs({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:zn(t)},{event:t})}}(e))}}},Bc=["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"],Uc=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&vn(Mi,"setTimeout",Vc),t.setInterval&&vn(Mi,"setInterval",Vc),t.requestAnimationFrame&&vn(Mi,"requestAnimationFrame",qc),t.XMLHttpRequest&&"XMLHttpRequest"in Mi&&vn(XMLHttpRequest.prototype,"send",Wc);const e=t.eventTarget;e&&(Array.isArray(e)?e:Bc).forEach(e=>function(e,t){const n=Mi,r=n[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(vn(r,"addEventListener",function(n){return function(r,o,s){try{"function"==typeof o.handleEvent&&(o.handleEvent=Ri(o.handleEvent,{mechanism:{data:{handler:$t(o),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&function(e,t,n){e&&"object"==typeof e&&"removeEventListener"in e&&"function"==typeof e.removeEventListener&&e.removeEventListener(t,n)}(this,r,o),n.apply(this,[r,Ri(o,{mechanism:{data:{handler:$t(o),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),s])}}),vn(r,"removeEventListener",function(e){return function(t,n,r){try{const o=n.__sentry_wrapped__;o&&e.call(this,t,o,r)}catch{}return e.call(this,t,n,r)}}))}(e,t))}}};function Vc(e){return function(...t){return t[0]=Ri(t[0],{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${$t(e)}`}}),e.apply(this,t)}}function qc(e){return function(t){return e.apply(this,[Ri(t,{mechanism:{data:{handler:$t(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function Wc(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&vn(n,e,function(t){const n={mechanism:{data:{handler:$t(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=wn(t);return r&&(n.mechanism.data.handler=$t(r)),Ri(t,n)})}),e.apply(this,t)}}const Kc=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(function(e){Zt(t=>{const{stackParser:n,attachStacktrace:r}=Gc();if(lr()!==e||Pi())return;const{msg:o,url:s,line:i,column:a,error:c}=t,l=function(e,t,n,r){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||[],l=r,u=n,d=function(e){if(on(e)&&0!==e.length){if(e.startsWith("data:")){const t=e.match(/^data:([^;]+)/);return`<data:${t?t[1]:"text/javascript"}${e.includes("base64,")?",base64":""}>`}return e}}(t)??yn();return 0===c.length&&c.push({colno:l,filename:d,function:At,in_app:!0,lineno:u}),e}(Fi(n,c||o,void 0,r,!1),s,i,a);l.level="error",is(l,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}(e),Zc("onerror")),t.onunhandledrejection&&(function(e){Jt(t=>{const{stackParser:n,attachStacktrace:r}=Gc();if(lr()!==e||Pi())return;const o=function(e){if(an(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}(t),s=an(o)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(o)}`}]}}:Fi(n,o,void 0,r,!0);s.level="error",is(s,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}(e),Zc("onunhandledrejection"))}}};function Zc(e){Pc&&Rt.log(`Global Handler attached: ${e}`)}function Gc(){const e=lr();return e?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Yc=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,o){ai(Di,o.getOptions().stackParser,n,t,e,r)}}};function Jc(e={}){const t=Mi.document,n=t?.head||t?.body;if(!n)return void(Pc&&Rt.error("[showReportDialog] Global document not defined"));const r=ir(),o=lr(),s=o?.getDsn();if(!s)return void(Pc&&Rt.error("[showReportDialog] DSN not configured"));const i={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||ar().lastEventId()},a=Mi.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=function(e,t){const n=jr(e);if(!n)return"";const r=`${ps(n)}embed/error-page/`;let o=`dsn=${Dr(n)}`;for(const e in t)if("dsn"!==e&&"onClose"!==e)if("user"===e){const e=t.user;if(!e)continue;e.name&&(o+=`&name=${encodeURIComponent(e.name)}`),e.email&&(o+=`&email=${encodeURIComponent(e.email)}`)}else o+=`&${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`;return`${r}?${o}`}(s,i);const{onLoad:c,onClose:l}=i;if(c&&(a.onload=c),l){const e=t=>{if("__sentry_reportdialog_closed__"===t.data)try{l()}finally{Mi.removeEventListener("message",e)}};Mi.addEventListener("message",e)}n.appendChild(a)}const Xc=St,Qc="sentryReplaySession",el="Unable to send Replay",tl=15e4,nl=5e3,rl=2e7;var ol=Object.defineProperty,sl=(e,t,n)=>((e,t,n)=>t in e?ol(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),il=/* @__PURE__ */(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))(il||{});function al(e){const t=e?.host;return Boolean(t?.shadowRoot===e)}function cl(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function ll(e){try{const n=e.rules||e.cssRules;return n?((t=Array.from(n,ul).join("")).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t):null}catch(e){return null}var t}function ul(e){let t;if(function(e){return"styleSheet"in e}(e))try{t=ll(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(e){}else if(function(e){return"selectorText"in e}(e)){let t=e.cssText;const n=e.selectorText.includes(":"),r="string"==typeof e.style.all&&e.style.all;if(r&&(t=function(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,o=r[n],s=r.getPropertyPriority(o);t+=`${o}:${r.getPropertyValue(o)}${s?" !important":""};`}return`${e.selectorText} { ${t} }`}(e)),n&&(t=t.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),n||r)return t}return t||e.cssText}class dl{constructor(){sl(this,"idNodeMap",/* @__PURE__ */new Map),sl(this,"nodeMetaMap",/* @__PURE__ */new WeakMap)}getId(e){if(!e)return-1;const t=this.getMeta(e)?.id;return t??-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){this.idNodeMap.set(t.id,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=/* @__PURE__ */new Map,this.nodeMetaMap=/* @__PURE__ */new WeakMap}}function pl({maskInputOptions:e,tagName:t,type:n}){return"OPTION"===t&&(t="SELECT"),Boolean(e[t.toLowerCase()]||n&&e[n]||"password"===n||"INPUT"===t&&!n&&e.text)}function hl({isMasked:e,element:t,value:n,maskInputFn:r}){let o=n||"";return e?(r&&(o=r(o,t)),"*".repeat(o.length)):o}function ml(e){return e.toLowerCase()}function fl(e){return e.toUpperCase()}const gl="__rrweb_original__";function yl(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?ml(t):null}function bl(e,t,n){return"INPUT"!==t||"radio"!==n&&"checkbox"!==n?e.value:e.getAttribute("value")||""}function vl(e,t){let n;try{n=new URL(e,t??window.location.href)}catch(e){return null}const r=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return r?.[1]??null}const _l={};function Sl(e){const t=_l[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const o=t.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(t)}catch(e){}return _l[e]=r.bind(window)}function wl(...e){return Sl("setTimeout")(...e)}function kl(...e){return Sl("clearTimeout")(...e)}function El(e){try{return e.contentDocument}catch(e){}}let Cl=1;const xl=new RegExp("[^a-z0-9-_:]");function Tl(){return Cl++}let Il,Ml;const Ol=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Pl=/^(?:[a-z+]+:)?\/\//i,Rl=/^www\..*/i,Al=/^(data:)([^,]*),(.*)/i;function Dl(e,t){return(e||"").replace(Ol,(e,n,r,o,s,i)=>{const a=r||s||i,c=n||o||"";if(!a)return e;if(Pl.test(a)||Rl.test(a))return`url(${c}${a}${c})`;if(Al.test(a))return`url(${c}${a}${c})`;if("/"===a[0])return`url(${c}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+a}${c})`;const l=t.split("/"),u=a.split("/");l.pop();for(const e of u)"."!==e&&(".."===e?l.pop():l.push(e));return`url(${c}${l.join("/")}${c})`})}const Ll=/^[^ \t\n\r\u000c]+/,Nl=/^[, \t\n\r\u000c]+/,jl=/* @__PURE__ */new WeakMap;function zl(e,t){return t&&""!==t.trim()?$l(e,t):t}function $l(e,t){let n=jl.get(e);if(n||(n=e.createElement("a"),jl.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function Hl(e,t,n,r,o,s,i){if(!r)return r;if("src"===n||"href"===n&&("use"!==t||"#"!==r[0]))return zl(e,r);if("xlink:href"===n&&"#"!==r[0])return zl(e,r);if("background"===n&&("table"===t||"td"===t||"th"===t))return zl(e,r);if("srcset"===n)return function(e,t){if(""===t.trim())return t;let n=0;function r(e){let r;const o=e.exec(t.substring(n));return o?(r=o[0],n+=r.length,r):""}const o=[];for(;r(Nl),!(n>=t.length);){let s=r(Ll);if(","===s.slice(-1))s=zl(e,s.substring(0,s.length-1)),o.push(s);else{let r="";s=zl(e,s);let i=!1;for(;;){const e=t.charAt(n);if(""===e){o.push((s+r).trim());break}if(i)")"===e&&(i=!1);else{if(","===e){n+=1,o.push((s+r).trim());break}"("===e&&(i=!0)}r+=e,n+=1}}}return o.join(", ")}(e,r);if("style"===n){let t=Dl(r,$l(e));return i&&i.size>0&&(t=function(e,t){if(!e||0===t.size)return e;try{const n=e.split(";"),r=[];for(let e of n){if(e=e.trim(),!e)continue;const n=e.indexOf(":");if(-1===n){r.push(e);continue}const o=e.slice(0,n).trim();t.has(o)||r.push(e)}return r.join("; ")+(r.length>0&&e.endsWith(";")?";":"")}catch(t){return console.warn("Error filtering CSS properties:",t),e}}(t,i)),t}return"object"===t&&"data"===n?zl(e,r):"function"==typeof s?s(n,r,o):r}function Fl(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function Bl(e,t,n=Infinity,r=0){return e?e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Bl(e.parentNode,t,n,r+1):-1}function Ul(e,t){return n=>{const r=n;if(null===r)return!1;try{if(e)if("string"==typeof e){if(r.matches(`.${e}`))return!0}else if(function(e,t){for(let n=e.classList.length;n--;)if(t.test(e.classList[n]))return!0;return!1}(r,e))return!0;return!(!t||!r.matches(t))}catch{return!1}}}function Vl(e,t,n,r,o,s){try{const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===i)return!1;if("INPUT"===i.tagName){const e=i.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(e))return!0}let a=-1,c=-1;if(s){if(c=Bl(i,Ul(r,o)),c<0)return!0;a=Bl(i,Ul(t,n),c>=0?c:Infinity)}else{if(a=Bl(i,Ul(t,n)),a<0)return!1;c=Bl(i,Ul(r,o),a>=0?a:Infinity)}return a>=0?!(c>=0)||a<=c:!(c>=0||!s)}catch(e){}return!!s}function ql(e){return null==e?"":e.toLowerCase()}function Wl(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:p=!1,inlineStylesheet:h=!0,maskInputOptions:m={},maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:b,dataURLOptions:v={},inlineImages:_=!1,recordCanvas:S=!1,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:E=5e3,onBlockedImageLoad:C,onStylesheetLoad:x,stylesheetLoadTimeout:T=5e3,keepIframeSrcFn:I=()=>!1,newlyAddedElement:M=!1,ignoreCSSAttributes:O}=t;let{preserveWhiteSpace:P=!0}=t;const R=function(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskAttributeFn:c,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:m={},maskTextFn:f,maskInputFn:g,dataURLOptions:y={},inlineImages:b,recordCanvas:v,keepIframeSrcFn:_,newlyAddedElement:S=!1,ignoreCSSAttributes:w}=t,k=function(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return 1===n?void 0:n}(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:il.Document,childNodes:[],compatMode:e.compatMode}:{type:il.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:il.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:k};case e.ELEMENT_NODE:return function(e,t){const{doc:n,blockClass:r,blockSelector:o,unblockSelector:s,inlineStylesheet:i,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:l,dataURLOptions:u={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:h,newlyAddedElement:m=!1,rootId:f,maskTextClass:g,unmaskTextClass:y,maskTextSelector:b,unmaskTextSelector:v,ignoreCSSAttributes:_}=t,S=function(e,t,n,r){try{if(r&&e.matches(r))return!1;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;)if(t.test(e.classList[n]))return!0;if(n)return e.matches(n)}catch(e){}return!1}(e,r,o,s),w=function(e){if(e instanceof HTMLFormElement)return"form";const t=ml(e.tagName);return xl.test(t)?"div":t}(e);let k={};const E=e.attributes.length;for(let t=0;t<E;t++){const r=e.attributes[t];r.name&&!Fl(w,r.name)&&(k[r.name]=Hl(n,w,ml(r.name),r.value,e,c,_))}if("link"===w&&i){const t=Array.from(n.styleSheets).find(t=>t.href===e.href);let r=null;t&&(r=ll(t)),r&&(k.rel=null,k.href=null,k.crossorigin=null,k._cssText=Dl(r,t.href))}if("style"===w&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const t=ll(e.sheet);t&&(k._cssText=Dl(t,$l(n)))}if("input"===w||"textarea"===w||"select"===w||"option"===w){const t=e,n=yl(t),r=bl(t,fl(w),n),o=t.checked;if("submit"!==n&&"button"!==n&&r){const e=Vl(t,g,b,y,v,pl({type:n,tagName:fl(w),maskInputOptions:a}));k.value=hl({isMasked:e,element:t,value:r,maskInputFn:l})}o&&(k.checked=o)}if("option"===w&&(e.selected&&!a.select?k.selected=!0:delete k.selected),"canvas"===w&&p)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){const o=t.getImageData;if(new Uint32Array((gl in o?o[gl]:o).call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some(e=>0!==e))return!1}return!0})(e)||(k.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){const t=e.toDataURL(u.type,u.quality),r=n.createElement("canvas");r.width=e.width,r.height=e.height,t!==r.toDataURL(u.type,u.quality)&&(k.rr_dataURL=t)}if("img"===w&&d){Il||(Il=n.createElement("canvas"),Ml=Il.getContext("2d"));const t=e,r=t.currentSrc||t.getAttribute("src")||"<unknown-src>",o=t.crossOrigin,s=()=>{t.removeEventListener("load",s);try{Il.width=t.naturalWidth,Il.height=t.naturalHeight,Ml.drawImage(t,0,0),k.rr_dataURL=Il.toDataURL(u.type,u.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?s():t.addEventListener("load",s));console.warn(`Cannot inline img src=${r}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(o?k.crossOrigin=o:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?s():t.addEventListener("load",s)}if("audio"!==w&&"video"!==w||(k.rr_mediaState=e.paused?"paused":"played",k.rr_mediaCurrentTime=e.currentTime),m||(e.scrollLeft&&(k.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(k.rr_scrollTop=e.scrollTop)),S){const{width:t,height:n}=e.getBoundingClientRect();k={class:k.class,rr_width:`${t}px`,rr_height:`${n}px`}}let C;"iframe"!==w||h(k.src)||(S||El(e)||(k.rr_src=k.src),delete k.src);try{customElements.get(w)&&(C=!0)}catch(e){}return{type:il.Element,tagName:w,attributes:k,childNodes:[],isSVG:(x=e,Boolean("svg"===x.tagName||x.ownerSVGElement)||void 0),needBlock:S,rootId:f,isCustom:C};var x}(e,{doc:n,blockClass:o,blockSelector:s,unblockSelector:i,inlineStylesheet:h,maskAttributeFn:c,maskInputOptions:m,maskInputFn:g,dataURLOptions:y,inlineImages:b,recordCanvas:v,keepIframeSrcFn:_,newlyAddedElement:S,rootId:k,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,ignoreCSSAttributes:w});case e.TEXT_NODE:return function(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:o,maskTextSelector:s,unmaskTextSelector:i,maskTextFn:a,maskInputOptions:c,maskInputFn:l,rootId:u}=t,d=e.parentNode&&e.parentNode.tagName;let p=e.textContent;const h="STYLE"===d||void 0,m="SCRIPT"===d||void 0,f="TEXTAREA"===d||void 0;if(h&&p){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(p=ll(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}p=Dl(p,$l(t.doc))}m&&(p="SCRIPT_PLACEHOLDER");const g=Vl(e,r,s,o,i,n);return h||m||f||!p||!g||(p=a?a(p,e.parentElement):p.replace(/[\S]/g,"*")),f&&p&&(c.textarea||g)&&(p=l?l(p,e.parentNode):p.replace(/[\S]/g,"*")),"OPTION"===d&&p&&(p=hl({isMasked:Vl(e,r,s,o,i,pl({type:null,tagName:d,maskInputOptions:c})),element:e,value:p,maskInputFn:l})),{type:il.Text,textContent:p||"",isStyle:h,rootId:u}}(e,{doc:n,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,maskTextFn:f,maskInputOptions:m,maskInputFn:g,rootId:k});case e.CDATA_SECTION_NODE:return{type:il.CDATA,textContent:"",rootId:k};case e.COMMENT_NODE:return{type:il.Comment,textContent:e.textContent||"",rootId:k};default:return!1}}(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,dataURLOptions:v,inlineImages:_,recordCanvas:S,keepIframeSrcFn:I,newlyAddedElement:M,ignoreCSSAttributes:O});if(!R)return console.warn(e,"not serialized"),null;let A;A=r.hasNode(e)?r.getId(e):!function(e,t){if(t.comment&&e.type===il.Comment)return!0;if(e.type===il.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===vl(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(ql(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===ql(e.attributes.name)||"icon"===ql(e.attributes.rel)||"apple-touch-icon"===ql(e.attributes.rel)||"shortcut icon"===ql(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&ql(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ql(e.attributes.property).match(/^(og|twitter|fb):/)||ql(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===ql(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===ql(e.attributes.name)||"googlebot"===ql(e.attributes.name)||"bingbot"===ql(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===ql(e.attributes.name)||"generator"===ql(e.attributes.name)||"framework"===ql(e.attributes.name)||"publisher"===ql(e.attributes.name)||"progid"===ql(e.attributes.name)||ql(e.attributes.property).match(/^article:/)||ql(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===ql(e.attributes.name)||"yandex-verification"===ql(e.attributes.name)||"csrf-token"===ql(e.attributes.name)||"p:domain_verify"===ql(e.attributes.name)||"verify-v1"===ql(e.attributes.name)||"verification"===ql(e.attributes.name)||"shopify-checkout-api-token"===ql(e.attributes.name)))return!0}}return!1}(R,b)&&(P||R.type!==il.Text||R.isStyle||R.textContent.replace(/^\s+|\s+$/gm,"").length)?Tl():-2;const D=Object.assign(R,{id:A});if(r.add(e,D),-2===A)return null;w&&w(e);let L=!p;if(D.type===il.Element){L=L&&!D.needBlock;const t=e.shadowRoot;t&&cl(t)&&(D.isShadowHost=!0)}if((D.type===il.Document||D.type===il.Element)&&L){b.headWhitespace&&D.type===il.Element&&"head"===D.tagName&&(P=!1);const t={doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:p,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:b,dataURLOptions:v,inlineImages:_,recordCanvas:S,preserveWhiteSpace:P,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:E,onBlockedImageLoad:C,onStylesheetLoad:x,stylesheetLoadTimeout:T,keepIframeSrcFn:I,ignoreCSSAttributes:O},M=e.childNodes?Array.from(e.childNodes):[];for(const e of M){const n=Wl(e,t);n&&D.childNodes.push(n)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(e)&&e.shadowRoot)for(const n of Array.from(e.shadowRoot.childNodes)){const r=Wl(n,t);r&&(cl(e.shadowRoot)&&(r.isShadow=!0),D.childNodes.push(r))}}if(e.parentNode&&al(e.parentNode)&&cl(e.parentNode)&&(D.isShadow=!0),D.type!==il.Element||"iframe"!==D.tagName||D.needBlock||function(e,t,n){const r=e.contentWindow;if(!r)return;let o,s=!1;try{o=r.document.readyState}catch(e){return}if("complete"!==o){const r=wl(()=>{s||(t(),s=!0)},n);return void e.addEventListener("load",()=>{kl(r),s=!0,t()})}const i="about:blank";if(r.location.href!==i||e.src===i||""===e.src)return wl(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{const t=El(e);if(t&&k){const n=Wl(t,{doc:t,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:b,dataURLOptions:v,inlineImages:_,recordCanvas:S,preserveWhiteSpace:P,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:E,onStylesheetLoad:x,stylesheetLoadTimeout:T,keepIframeSrcFn:I,ignoreCSSAttributes:O});n&&k(e,n)}},E),D.type===il.Element&&"img"===D.tagName&&!e.complete&&D.needBlock){const t=e,n=()=>{if(t.isConnected&&!t.complete&&C)try{const e=t.getBoundingClientRect();e.width>0&&e.height>0&&C(t,D,e)}catch(e){}t.removeEventListener("load",n)};t.isConnected&&t.addEventListener("load",n)}return D.type===il.Element&&"link"===D.tagName&&"string"==typeof D.attributes.rel&&("stylesheet"===D.attributes.rel||"preload"===D.attributes.rel&&"string"==typeof D.attributes.href&&"css"===vl(D.attributes.href))&&function(e,t,n){let r,o=!1;try{r=e.sheet}catch(e){return}if(r)return;const s=wl(()=>{o||(t(),o=!0)},n);e.addEventListener("load",()=>{kl(s),o=!0,t()})}(e,()=>{if(x){const t=Wl(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:b,dataURLOptions:v,inlineImages:_,recordCanvas:S,preserveWhiteSpace:P,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:E,onStylesheetLoad:x,stylesheetLoadTimeout:T,keepIframeSrcFn:I,ignoreCSSAttributes:O});t&&x(e,t)}},T),D.type===il.Element&&delete D.needBlock,D}function Kl(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Zl="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 Gl={map:{},getId:()=>(console.error(Zl),-1),getNode:()=>(console.error(Zl),null),removeNodeFromMap(){console.error(Zl)},has:()=>(console.error(Zl),!1),reset(){console.error(Zl)}};function Yl(e,t,n={}){let r=null,o=0;return function(...s){const i=Date.now();o||!1!==n.leading||(o=i);const a=t-(i-o),c=this;a<=0||a>t?(r&&(function(...e){fu("clearTimeout")(...e)}(r),r=null),o=i,e.apply(c,s)):r||!1===n.trailing||(r=gu(()=>{o=!1===n.leading?0:Date.now(),r=null,e.apply(c,s)},a))}}function Jl(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(e){gu(()=>{n.set.call(this,e)},0),s&&s.set&&s.set.call(this,e)}}),()=>Jl(e,t,s||{},!0)}function Xl(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Gl=new Proxy(Gl,{get:(e,t,n)=>("map"===t&&console.error(Zl),Reflect.get(e,t,n))}));let Ql=Date.now;function eu(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function tu(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function nu(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ru(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch(e){return null}}function ou(e,t,n,r,o){if(!e)return!1;const s=ru(e);if(!s)return!1;const i=Ul(t,n);if(!o){const e=r&&s.matches(r);return i(s)&&!e}const a=Bl(s,i);let c=-1;return!(a<0)&&(r&&(c=Bl(s,Ul(null,r))),a>-1&&c<0||a<c)}function su(e,t){return-2===t.getId(e)}function iu(e,t){if(al(e))return!1;const n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||iu(e.parentNode,t))}function au(e){return Boolean(e.changedTouches)}function cu(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function lu(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function uu(e){return Boolean(e?.shadowRoot)}/* @__PURE__ */ /[1-9][0-9]{12}/.test(Date.now().toString())||(Ql=()=>/* @__PURE__ */(new Date).getTime());class du{constructor(){this.id=1,this.styleIDMap=/* @__PURE__ */new WeakMap,this.idStyleMap=/* @__PURE__ */new Map}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=/* @__PURE__ */new WeakMap,this.idStyleMap=/* @__PURE__ */new Map,this.id=1}generateId(){return this.id++}}function pu(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function hu(e){const t=e.ownerDocument;return!!t&&(t.contains(e)||function(e){const t=e.ownerDocument;if(!t)return!1;const n=function(e){let t,n=e;for(;t=pu(n);)n=t;return n}(e);return t.contains(n)}(e))}const mu={};function fu(e){const t=mu[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const o=t.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(t)}catch(e){}return mu[e]=r.bind(window)}function gu(...e){return fu("setTimeout")(...e)}var yu=/* @__PURE__ */(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))(yu||{}),bu=/* @__PURE__ */(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))(bu||{}),vu=/* @__PURE__ */(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))(vu||{}),_u=/* @__PURE__ */(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(_u||{}),Su=/* @__PURE__ */(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))(Su||{});function wu(e){try{return e.contentDocument}catch(e){}}function ku(e){return"__ln"in e}class Eu{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=t?.next||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&ku(e.previousSibling)){const n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&ku(e.nextSibling)&&e.nextSibling.__ln.previous){const n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const Cu=(e,t)=>`${e}@${t}`;class xu{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=/* @__PURE__ */new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=/* @__PURE__ */new Set,this.movedSet=/* @__PURE__ */new Set,this.droppedSet=/* @__PURE__ */new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],t=/* @__PURE__ */new Set,n=new Eu,r=e=>{let t=e,n=-2;for(;-2===n;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},o=o=>{if(!o.parentNode||!hu(o))return;const s=al(o.parentNode)?this.mirror.getId(pu(o)):this.mirror.getId(o.parentNode),i=r(o);if(-1===s||-1===i)return n.addNode(o);const a=Wl(o,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{cu(e,this.mirror)&&!ou(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(e),lu(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),uu(o)&&this.shadowDomManager.addShadowRoot(o.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{ou(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(e,t),e.contentWindow&&this.canvasManager.addWindow(e.contentWindow),this.shadowDomManager.observeAttachShadow(e))},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:n,height:r})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${n}px`,height:`${r}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});a&&(e.push({parentId:s,nextId:i,node:a}),t.add(a.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)Iu(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||o(e);for(const e of this.addedSet)Mu(this.droppedSet,e)||Iu(this.removes,e,this.mirror)?Mu(this.movedSet,e)?o(e):this.droppedSet.add(e):o(e);let s=null;for(;n.length;){let e=null;if(s){const t=this.mirror.getId(s.value.parentNode),n=r(s.value);-1!==t&&-1!==n&&(e=s)}if(!e){let t=n.tail;for(;t;){const n=t;if(t=t.previous,n){const t=this.mirror.getId(n.value.parentNode);if(-1===r(n.value))continue;if(-1!==t){e=n;break}{const t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&-1!==this.mirror.getId(t.parentNode.host)){e=n;break}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}s=e.previous,n.removeNode(e.value),o(e.value)}const i={texts:this.texts.map(e=>({id:this.mirror.getId(e.node),value:e.value})).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{const{attributes:t}=e;if("string"==typeof t.style){const n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(i.texts.length||i.attributes.length||i.removes.length||i.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=/* @__PURE__ */new WeakMap,this.removes=[],this.addedSet=/* @__PURE__ */new Set,this.movedSet=/* @__PURE__ */new Set,this.droppedSet=/* @__PURE__ */new Set,this.movedMap={},this.mutationCb(i))},this.processMutation=e=>{if(!su(e.target,this.mirror))switch(e.type){case"characterData":{const t=e.target.textContent;ou(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||t===e.oldValue||this.texts.push({value:Vl(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,ru(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=e.attributeName,r=e.target.getAttribute(n);if("value"===n){const n=yl(t),o=t.tagName;r=bl(t,o,n);const s=pl({maskInputOptions:this.maskInputOptions,tagName:o,type:n});r=hl({isMasked:Vl(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,s),element:t,value:r,maskInputFn:this.maskInputFn})}if(ou(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===e.oldValue)return;let o=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===n&&!this.keepIframeSrcFn(r)){if(wu(t))return;n="rr_src"}if(o||(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),"type"===n&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!Fl(t.tagName,n)&&(o.attributes[n]=Hl(this.doc,ml(t.tagName),ml(n),r,t,this.maskAttributeFn),"style"===n)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}const n=this.unattachedDoc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const r=t.style.getPropertyValue(e),s=t.style.getPropertyPriority(e);r!==n.style.getPropertyValue(e)||s!==n.style.getPropertyPriority(e)?o.styleDiff[e]=""===s?r:[r,s]:o._unchangedStyles[e]=[r,s]}for(const e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(o.styleDiff[e]=!1)}break}case"childList":if(ou(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const n=this.mirror.getId(t),r=al(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);ou(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||su(t,this.mirror)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(Tu(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||iu(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Cu(n,r)]?Tu(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!(!al(e.target)||!cl(e.target))||void 0})),this.mapRemoves.push(t))})}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(su(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[Cu(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);ou(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes&&e.childNodes.forEach(e=>this.genAdds(e)),uu(e)&&e.shadowRoot.childNodes.forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}}}init(e){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager","ignoreCSSAttributes"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Tu(e,t){e.delete(t),t.childNodes?.forEach(t=>Tu(e,t))}function Iu(e,t,n){return 0!==e.length&&function(e,t,n){let r=t.parentNode;for(;r;){const t=n.getId(r);if(e.some(e=>e.id===t))return!0;r=r.parentNode}return!1}(e,t,n)}function Mu(e,t){return 0!==e.size&&Ou(e,t)}function Ou(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||Ou(e,n))}let Pu;const Ru=e=>Pu?(...t)=>{try{return e(...t)}catch(e){if(Pu&&!0===Pu(e))return()=>{};throw e}}:e,Au=[];function Du(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Lu(e,t){const n=new xu;Au.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const o=window?.Zone?.__symbol__?.("MutationObserver");o&&window[o]&&(r=window[o]);const s=new r(Ru(t=>{e.onMutation&&!1===e.onMutation(t)||n.processMutations.bind(n)(t)}));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function Nu({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){return Kl("scroll",Ru(Yl(Ru(i=>{const a=Du(i);if(!a||ou(a,r,o,s,!0))return;const c=n.getId(a);if(a===t&&t.defaultView){const n=eu(t.defaultView);e({id:c,x:n.left,y:n.top})}else e({id:c,x:a.scrollLeft,y:a.scrollTop})}),i.scroll||100)),t)}const ju=["INPUT","TEXTAREA","SELECT"],zu=/* @__PURE__ */new WeakMap;function $u({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,ignoreClass:i,ignoreSelector:a,maskInputOptions:c,maskInputFn:l,sampling:u,userTriggeredOnInput:d,maskTextClass:p,unmaskTextClass:h,maskTextSelector:m,unmaskTextSelector:f}){function g(e){let n=Du(e);const u=e.isTrusted,g=n&&fl(n.tagName);if("OPTION"===g&&(n=n.parentElement),!n||!g||ju.indexOf(g)<0||ou(n,r,o,s,!0))return;const b=n;if(b.classList.contains(i)||a&&b.matches(a))return;const v=yl(n);let _=bl(b,g,v),S=!1;const w=pl({maskInputOptions:c,tagName:g,type:v}),k=Vl(n,p,m,h,f,w);"radio"!==v&&"checkbox"!==v||(S=n.checked),_=hl({isMasked:k,element:n,value:_,maskInputFn:l}),y(n,d?{text:_,isChecked:S,userTriggered:u}:{text:_,isChecked:S});const E=n.name;"radio"===v&&E&&S&&t.querySelectorAll(`input[type="radio"][name="${E}"]`).forEach(e=>{if(e!==n){const t=hl({isMasked:k,element:e,value:bl(e,g,v),maskInputFn:l});y(e,d?{text:t,isChecked:!S,userTriggered:!1}:{text:t,isChecked:!S})}})}function y(t,r){const o=zu.get(t);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){zu.set(t,r);const o=n.getId(t);Ru(e)({...r,id:o})}}const b=("last"===u.input?["change"]:["input","change"]).map(e=>Kl(e,Ru(g),t)),v=t.defaultView;if(!v)return()=>{b.forEach(e=>e())};const _=v.Object.getOwnPropertyDescriptor(v.HTMLInputElement.prototype,"value");return _&&_.set&&b.push(...[[v.HTMLInputElement.prototype,"value"],[v.HTMLInputElement.prototype,"checked"],[v.HTMLSelectElement.prototype,"value"],[v.HTMLTextAreaElement.prototype,"value"],[v.HTMLSelectElement.prototype,"selectedIndex"],[v.HTMLOptionElement.prototype,"selected"]].map(e=>Jl(e[0],e[1],{set(){Ru(g)({target:this,isTrusted:!1})}},!1,v))),Ru(()=>{b.forEach(e=>e())})}function Hu(e){return function(e,t){if(Vu("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||Vu("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||Vu("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||Vu("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function Fu(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function Bu({mirror:e,stylesheetManager:t},n){let r=null;r=e.getId("#document"===n.nodeName?n:n.host);const o="#document"===n.nodeName?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,s=o?.prototype?Object.getOwnPropertyDescriptor(o?.prototype,"adoptedStyleSheets"):void 0;return null!==r&&-1!==r&&o&&s?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){return s.get?.call(this)},set(e){const n=s.set?.call(this,e);if(null!==r&&-1!==r)try{t.adoptStyleSheets(e,r)}catch(e){}return n}}),Ru(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})})):()=>{}}function Uu(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=Lu(e,e.doc));const o=function({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(!1===t.mousemove)return()=>{};const o="number"==typeof t.mousemove?t.mousemove:50,s="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let i,a=[];const c=Yl(Ru(t=>{const n=Date.now()-i;e(a.map(e=>(e.timeOffset-=n,e)),t),a=[],i=null}),s),l=Ru(Yl(Ru(e=>{const t=Du(e),{clientX:n,clientY:o}=au(e)?e.changedTouches[0]:e;i||(i=Ql()),a.push({x:n,y:o,id:r.getId(t),timeOffset:Ql()-i}),c("undefined"!=typeof DragEvent&&e instanceof DragEvent?bu.Drag:e instanceof MouseEvent?bu.MouseMove:bu.TouchMove)}),o,{trailing:!1})),u=[Kl("mousemove",l,n),Kl("touchmove",l,n),Kl("drag",l,n)];return Ru(()=>{u.forEach(e=>e())})}(e),s=function({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){if(!1===i.mouseInteraction)return()=>{};const a=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,c=[];let l=null;return Object.keys(vu).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e]).forEach(i=>{let a=ml(i);const u=(t=>i=>{const a=Du(i);if(ou(a,r,o,s,!0))return;let c=null,u=t;if("pointerType"in i){switch(i.pointerType){case"mouse":c=_u.Mouse;break;case"touch":c=_u.Touch;break;case"pen":c=_u.Pen}c===_u.Touch&&(vu[t]===vu.MouseDown?u="TouchStart":vu[t]===vu.MouseUp&&(u="TouchEnd"))}else au(i)&&(c=_u.Touch);null!==c?(l=c,(u.startsWith("Touch")&&c===_u.Touch||u.startsWith("Mouse")&&c===_u.Mouse)&&(c=null)):vu[t]===vu.Click&&(c=l,l=null);const d=au(i)?i.changedTouches[0]:i;if(!d)return;const p=n.getId(a),{clientX:h,clientY:m}=d;Ru(e)({type:vu[u],id:p,x:h,y:m,...null!==c&&{pointerType:c}})})(i);if(window.PointerEvent)switch(vu[i]){case vu.MouseDown:case vu.MouseUp:a=a.replace("mouse","pointer");break;case vu.TouchStart:case vu.TouchEnd:return}c.push(Kl(a,u,t))}),Ru(()=>{c.forEach(e=>e())})}(e),i=Nu(e),a=function({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const o=Ru(Yl(Ru(()=>{const t=tu(),o=nu();n===t&&r===o||(e({width:Number(o),height:Number(t)}),n=t,r=o)}),200));return Kl("resize",o,t)}(e,{win:n}),c=$u(e),l=function({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:o,sampling:s,doc:i}){const a=Ru(i=>Yl(Ru(s=>{const a=Du(s);if(!a||ou(a,t,n,r,!0))return;const{currentTime:c,volume:l,muted:u,playbackRate:d}=a;e({type:i,id:o.getId(a),currentTime:c,volume:l,muted:u,playbackRate:d})}),s.media||500)),c=[Kl("play",a(Su.Play),i),Kl("pause",a(Su.Pause),i),Kl("seeked",a(Su.Seeked),i),Kl("volumechange",a(Su.VolumeChange),i),Kl("ratechange",a(Su.RateChange),i)];return Ru(()=>{c.forEach(e=>e())})}(e);let u=()=>{},d=()=>{},p=()=>{},h=()=>{};e.recordDOM&&(u=function({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:Ru((r,o,s)=>{const[i,a]=s,{id:c,styleId:l}=Fu(o,t,n.styleMirror);return(c&&-1!==c||l&&-1!==l)&&e({id:c,styleId:l,adds:[{rule:i,index:a}]}),r.apply(o,s)})});const s=r.CSSStyleSheet.prototype.deleteRule;let i,a;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:Ru((r,o,s)=>{const[i]=s,{id:a,styleId:c}=Fu(o,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,removes:[{index:i}]}),r.apply(o,s)})}),r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:Ru((r,o,s)=>{const[i]=s,{id:a,styleId:c}=Fu(o,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,replace:i}),r.apply(o,s)})})),r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:Ru((r,o,s)=>{const[i]=s,{id:a,styleId:c}=Fu(o,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,replaceSync:i}),r.apply(o,s)})}));const c={};qu("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(qu("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),qu("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),qu("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const l={};return Object.entries(c).forEach(([r,o])=>{l[r]={insertRule:o.prototype.insertRule,deleteRule:o.prototype.deleteRule},o.prototype.insertRule=new Proxy(l[r].insertRule,{apply:Ru((r,o,s)=>{const[i,a]=s,{id:c,styleId:l}=Fu(o.parentStyleSheet,t,n.styleMirror);return(c&&-1!==c||l&&-1!==l)&&e({id:c,styleId:l,adds:[{rule:i,index:[...Hu(o),a||0]}]}),r.apply(o,s)})}),o.prototype.deleteRule=new Proxy(l[r].deleteRule,{apply:Ru((r,o,s)=>{const[i]=s,{id:a,styleId:c}=Fu(o.parentStyleSheet,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,removes:[{index:[...Hu(o),i]}]}),r.apply(o,s)})})}),Ru(()=>{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(([e,t])=>{t.prototype.insertRule=l[e].insertRule,t.prototype.deleteRule=l[e].deleteRule})})}(e,{win:n}),d=Bu(e,e.doc),p=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const s=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:Ru((o,i,a)=>{const[c,l,u]=a;if(n.has(c))return s.apply(i,[c,l,u]);const{id:d,styleId:p}=Fu(i.parentRule?.parentStyleSheet,t,r.styleMirror);return(d&&-1!==d||p&&-1!==p)&&e({id:d,styleId:p,set:{property:c,value:l,priority:u},index:Hu(i.parentRule)}),o.apply(i,a)})});const i=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:Ru((o,s,a)=>{const[c]=a;if(n.has(c))return i.apply(s,[c]);const{id:l,styleId:u}=Fu(s.parentRule?.parentStyleSheet,t,r.styleMirror);return(l&&-1!==l||u&&-1!==u)&&e({id:l,styleId:u,remove:{property:c},index:Hu(s.parentRule)}),o.apply(s,a)})}),Ru(()=>{o.CSSStyleDeclaration.prototype.setProperty=s,o.CSSStyleDeclaration.prototype.removeProperty=i})}(e,{win:n}),e.collectFonts&&(h=function({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=/* @__PURE__ */new WeakMap,s=n.FontFace;n.FontFace=function(e,t,n){const r=new s(e,t,n);return o.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const i=Xl(t.fonts,"add",function(t){return function(n){return gu(Ru(()=>{const t=o.get(n);t&&(e(t),o.delete(n))}),0),t.apply(this,[n])}});return r.push(()=>{n.FontFace=s}),r.push(i),Ru(()=>{r.forEach(e=>e())})}(e)));const m=function(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,selectionCb:i}=e;let a=!0;const c=Ru(()=>{const e=t.getSelection();if(!e||a&&e?.isCollapsed)return;a=e.isCollapsed||!1;const c=[],l=e.rangeCount||0;for(let t=0;t<l;t++){const i=e.getRangeAt(t),{startContainer:a,startOffset:l,endContainer:u,endOffset:d}=i;ou(a,r,o,s,!0)||ou(u,r,o,s,!0)||c.push({start:n.getId(a),startOffset:l,end:n.getId(u),endOffset:d})}i({ranges:c})});return c(),Kl("selectionchange",c)}(e),f=function({doc:e,customElementCb:t}){const n=e.defaultView;return n&&n.customElements?Xl(n.customElements,"define",function(e){return function(n,r,o){try{t({define:{name:n}})}catch(e){}return e.apply(this,[n,r,o])}}):()=>{}}(e),g=[];for(const t of e.plugins)g.push(t.observer(t.callback,n,t.options));return Ru(()=>{Au.forEach(e=>e.reset()),r?.disconnect(),o(),s(),i(),a(),c(),l(),u(),d(),p(),h(),m(),f(),g.forEach(e=>e())})}function Vu(e){return void 0!==window[e]}function qu(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Wu{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=/* @__PURE__ */new WeakMap,this.iframeRemoteIdToIdMap=/* @__PURE__ */new WeakMap}getId(e,t,n,r){const o=n||this.getIdToRemoteIdMap(e),s=r||this.getRemoteIdToIdMap(e);let i=o.get(t);return i||(i=this.generateIdFn(),o.set(t,i),s.set(i,t)),i}getIds(e,t){const n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,n,r))}getRemoteId(e,t,n){const r=n||this.getRemoteIdToIdMap(e);return"number"!=typeof t?t:r.get(t)||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,n))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=/* @__PURE__ */new WeakMap,void(this.iframeRemoteIdToIdMap=/* @__PURE__ */new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=/* @__PURE__ */new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=/* @__PURE__ */new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class Ku{constructor(){this.crossOriginIframeMirror=new Wu(Tl),this.crossOriginIframeRootIdMap=/* @__PURE__ */new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class Zu{constructor(e){this.iframes=/* @__PURE__ */new WeakMap,this.crossOriginIframeMap=/* @__PURE__ */new WeakMap,this.crossOriginIframeMirror=new Wu(Tl),this.crossOriginIframeRootIdMap=/* @__PURE__ */new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Wu(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&e.contentWindow?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(e);const n=wu(e);n&&n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,this.mirror.getId(n))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case yu.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:yu.IncrementalSnapshot,data:{source:bu.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case yu.Meta:case yu.Load:case yu.DomContentLoaded:return!1;case yu.Plugin:return t;case yu.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case yu.IncrementalSnapshot:switch(t.data.source){case bu.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,["id"])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case bu.Drag:case bu.TouchMove:case bu.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case bu.ViewportResize:return!1;case bu.MediaInteraction:case bu.MouseInteraction:case bu.Scroll:case bu.CanvasMutation:case bu.Input:return this.replaceIds(t.data,e,["id"]),t;case bu.StyleSheetRule:case bu.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case bu.Font:return t;case bu.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case bu.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),t.data.styles?.forEach(t=>{this.replaceStyleIds(t,e,["styleId"])}),t}}return!1}replace(e,t,n,r){for(const o of r)(Array.isArray(t[o])||"number"==typeof t[o])&&(t[o]=Array.isArray(t[o])?e.getIds(n,t[o]):e.getId(n,t[o]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type===il.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class Gu{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class Yu{constructor(e){this.shadowDoms=/* @__PURE__ */new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!cl(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);const n=Lu({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(Nu({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),gu(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(Bu({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){const t=wu(e),n=function(e){try{return e.contentWindow}catch(e){}}(e);t&&n&&this.patchAttachShadow(n.Element,t)}patchAttachShadow(e,t){const n=this;this.restoreHandlers.push(Xl(e.prototype,"attachShadow",function(e){return function(r){const o=e.call(this,r);return this.shadowRoot&&hu(this)&&n.addShadowRoot(this.shadowRoot,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=/* @__PURE__ */new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}for(var Ju="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Xu=0;Xu<64;Xu++)Ju["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(Xu)]=Xu;class Qu{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class ed{constructor(e){this.trackedLinkElements=/* @__PURE__ */new WeakSet,this.styleMirror=new du,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const n={id:t,styleIds:[]},r=[];for(const t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,t)=>({rule:ul(e),index:t}))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=/* @__PURE__ */new WeakSet}trackStylesheetInLinkElement(e){}}class td{constructor(){this.nodeMap=/* @__PURE__ */new WeakMap,this.active=!1}inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,function(...e){fu("requestAnimationFrame")(...e)}(()=>{this.nodeMap=/* @__PURE__ */new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||/* @__PURE__ */new Set).add(t))}destroy(){}}let nd,rd;try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const od=new dl;function sd(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:l=!1,maskTextClass:u="rr-mask",unmaskTextClass:d=null,maskTextSelector:p=null,unmaskTextSelector:h=null,inlineStylesheet:m=!0,maskAllInputs:f,maskInputOptions:g,slimDOMOptions:y,maskAttributeFn:b,maskInputFn:v,maskTextFn:_,maxCanvasSize:S=null,packFn:w,sampling:k={},dataURLOptions:E={},mousemoveWait:C,recordDOM:x=!0,recordCanvas:T=!1,recordCrossOriginIframes:I=!1,recordAfter:M=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:O=!1,collectFonts:P=!1,inlineImages:R=!1,plugins:A,keepIframeSrcFn:D=()=>!1,ignoreCSSAttributes:L=/* @__PURE__ */new Set([]),errorHandler:N,onMutation:j,getCanvasManager:z}=e;Pu=N;const $=!I||window.parent===window;let H=!1;if(!$)try{window.parent.document&&(H=!1)}catch(e){H=!0}if($&&!t)throw new Error("emit function is required");if(!$&&!H)return()=>{};void 0!==C&&void 0===k.mousemove&&(k.mousemove=C),od.reset();const F=!0===f?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:void 0!==g?g:{},B=!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===y,headMetaDescKeywords:"all"===y}:y||{};let U;!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}();let V=0;const q=e=>{for(const t of A||[])t.eventProcessor&&(e=t.eventProcessor(e));return w&&!H&&(e=w(e)),e};nd=(e,o)=>{const s=e;if(s.timestamp=Ql(),!Au[0]?.isFrozen()||s.type===yu.FullSnapshot||s.type===yu.IncrementalSnapshot&&s.data.source===bu.Mutation||Au.forEach(e=>e.unfreeze()),$)t?.(q(s),o);else if(H){const e={type:"rrweb",event:q(s),origin:window.location.origin,isCheckout:o};window.parent.postMessage(e,"*")}if(s.type===yu.FullSnapshot)U=s,V=0;else if(s.type===yu.IncrementalSnapshot){if(s.data.source===bu.Mutation&&s.data.isAttachIframe)return;V++,(r&&V>=r||n&&U&&s.timestamp-U.timestamp>n)&&ee(!0)}};const W=e=>{nd({type:yu.IncrementalSnapshot,data:{source:bu.Mutation,...e}})},K=e=>nd({type:yu.IncrementalSnapshot,data:{source:bu.Scroll,...e}}),Z=e=>nd({type:yu.IncrementalSnapshot,data:{source:bu.CanvasMutation,...e}}),G=new ed({mutationCb:W,adoptedStyleSheetCb:e=>nd({type:yu.IncrementalSnapshot,data:{source:bu.AdoptedStyleSheet,...e}})}),Y="boolean"==typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new Ku:new Zu({mirror:od,mutationCb:W,stylesheetManager:G,recordCrossOriginIframes:I,wrappedEmit:nd});for(const e of A||[])e.getMirror&&e.getMirror({nodeMirror:od,crossOriginIframeMirror:Y.crossOriginIframeMirror,crossOriginIframeStyleMirror:Y.crossOriginIframeStyleMirror});const J=new td,X=function(e,t){try{return e?e(t):new Qu}catch{return console.warn("Unable to initialize CanvasManager"),new Qu}}(z,{mirror:od,win:window,mutationCb:e=>nd({type:yu.IncrementalSnapshot,data:{source:bu.CanvasMutation,...e}}),recordCanvas:T,blockClass:o,blockSelector:s,unblockSelector:i,maxCanvasSize:S,sampling:k.canvas,dataURLOptions:E,errorHandler:N}),Q="boolean"==typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Gu:new Yu({mutationCb:W,scrollCb:K,bypassOptions:{onMutation:j,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,inlineStylesheet:m,maskInputOptions:F,dataURLOptions:E,maskAttributeFn:b,maskTextFn:_,maskInputFn:v,recordCanvas:T,inlineImages:R,sampling:k,slimDOMOptions:B,iframeManager:Y,stylesheetManager:G,canvasManager:X,keepIframeSrcFn:D,processedNodeManager:J,ignoreCSSAttributes:L},mirror:od}),ee=(e=!1)=>{if(!x)return;nd({type:yu.Meta,data:{href:window.location.href,width:nu(),height:tu()}},e),G.reset(),Q.init(),Au.forEach(e=>e.lock());const t=function(e,t){const{mirror:n=new dl,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:s=null,maskAllText:i=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:l=null,unmaskTextSelector:u=null,inlineStylesheet:d=!0,inlineImages:p=!1,recordCanvas:h=!1,maskAllInputs:m=!1,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOM:b=!1,dataURLOptions:v,preserveWhiteSpace:_,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:k,onBlockedImageLoad:E,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:T=()=>!1,ignoreCSSAttributes:I=/* @__PURE__ */new Set([])}=t||{};return Wl(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,maskAllText:i,maskTextClass:a,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:!0===m?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:!1===m?{}:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:!0===b||"all"===b?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===b,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===b?{}:b,dataURLOptions:v,inlineImages:p,recordCanvas:h,preserveWhiteSpace:_,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:k,onBlockedImageLoad:E,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:T,newlyAddedElement:!1,ignoreCSSAttributes:I})}(document,{mirror:od,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,inlineStylesheet:m,maskAllInputs:F,maskAttributeFn:b,maskInputFn:v,maskTextFn:_,slimDOM:B,dataURLOptions:E,recordCanvas:T,inlineImages:R,onSerialize:e=>{cu(e,od)&&Y.addIframe(e),lu(e,od)&&G.trackLinkElement(e),uu(e)&&Q.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{Y.attachIframe(e,t),e.contentWindow&&X.addWindow(e.contentWindow),Q.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{G.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:n,height:r})=>{W({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${n}px`,height:`${r}px`}}}]})},keepIframeSrcFn:D,ignoreCSSAttributes:L});if(!t)return console.warn("Failed to snapshot the document");nd({type:yu.FullSnapshot,data:{node:t,initialOffset:eu(window)}}),Au.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&G.adoptStyleSheets(document.adoptedStyleSheets,od.getId(document))};rd=ee;try{const e=[],t=e=>Ru(Uu)({onMutation:j,mutationCb:W,mousemoveCb:(e,t)=>nd({type:yu.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>nd({type:yu.IncrementalSnapshot,data:{source:bu.MouseInteraction,...e}}),scrollCb:K,viewportResizeCb:e=>nd({type:yu.IncrementalSnapshot,data:{source:bu.ViewportResize,...e}}),inputCb:e=>nd({type:yu.IncrementalSnapshot,data:{source:bu.Input,...e}}),mediaInteractionCb:e=>nd({type:yu.IncrementalSnapshot,data:{source:bu.MediaInteraction,...e}}),styleSheetRuleCb:e=>nd({type:yu.IncrementalSnapshot,data:{source:bu.StyleSheetRule,...e}}),styleDeclarationCb:e=>nd({type:yu.IncrementalSnapshot,data:{source:bu.StyleDeclaration,...e}}),canvasMutationCb:Z,fontCb:e=>nd({type:yu.IncrementalSnapshot,data:{source:bu.Font,...e}}),selectionCb:e=>{nd({type:yu.IncrementalSnapshot,data:{source:bu.Selection,...e}})},customElementCb:e=>{nd({type:yu.IncrementalSnapshot,data:{source:bu.CustomElement,...e}})},blockClass:o,ignoreClass:a,ignoreSelector:c,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,maskInputOptions:F,inlineStylesheet:m,sampling:k,recordDOM:x,recordCanvas:T,inlineImages:R,userTriggeredOnInput:O,collectFonts:P,doc:e,maskAttributeFn:b,maskInputFn:v,maskTextFn:_,keepIframeSrcFn:D,blockSelector:s,unblockSelector:i,slimDOMOptions:B,dataURLOptions:E,mirror:od,iframeManager:Y,stylesheetManager:G,shadowDomManager:Q,processedNodeManager:J,canvasManager:X,ignoreCSSAttributes:L,plugins:A?.filter(e=>e.observer)?.map(e=>({observer:e.observer,options:e.options,callback:t=>nd({type:yu.Plugin,data:{plugin:e.name,payload:t}})}))||[]},{});Y.addLoadListener(n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}});const n=()=>{ee(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(e.push(Kl("DOMContentLoaded",()=>{nd({type:yu.DomContentLoaded,data:{}}),"DOMContentLoaded"===M&&n()})),e.push(Kl("load",()=>{nd({type:yu.Load,data:{}}),"load"===M&&n()},window))),()=>{e.forEach(e=>e()),J.destroy(),rd=void 0,Pu=void 0}}catch(e){console.warn(e)}}var id,ad;function cd(e){return e>9999999999?e:1e3*e}function ld(e){return e>9999999999?e/1e3:e}function ud(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:yu.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:bo(t,10,1e3)}}),"console"===t.category)))}function dd(e){return e.closest("button,a")||e}function pd(e){const t=hd(e);return t&&t instanceof Element?dd(t):t}function hd(e){return function(e){return"object"==typeof e&&!!e&&"target"in e}(e)?e.target:e}let md;sd.mirror=od,sd.takeFullSnapshot=function(e){if(!rd)throw new Error("please take full snapshot after start recording");rd(e)},(ad=id||(id={}))[ad.NotStarted=0]="NotStarted",ad[ad.Running=1]="Running",ad[ad.Stopped=2]="Stopped";const fd=new Set([bu.Mutation,bu.StyleSheetRule,bu.StyleDeclaration,bu.AdoptedStyleSheet,bu.CanvasMutation,bu.Selection,bu.MediaInteraction]);class gd{constructor(e,t,n=ud){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scrollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){const e=(t=()=>{this._lastMutation=bd()},md||(md=[],vn(Xc,"open",function(e){return function(...t){if(md)try{md.forEach(e=>e())}catch{}return e.apply(Xc,t)}})),md.push(t),()=>{const e=md?md.indexOf(t):-1;e>-1&&md.splice(e,1)});var t;this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(function(e,t){return!yd.includes(e.tagName)||"INPUT"===e.tagName&&!["submit","button"].includes(e.getAttribute("type")||"")||!("A"!==e.tagName||!(e.hasAttribute("download")||e.hasAttribute("target")&&"_self"!==e.getAttribute("target")))||!(!t||!e.matches(t))}(t,this._ignoreSelector)||!function(e){return!(!e.data||"number"!=typeof e.data.nodeId||!e.timestamp)}(e))return;const n={timestamp:ld(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some(e=>e.node===n.node&&Math.abs(e.timestamp-n.timestamp)<1)||(this._clicks.push(n),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=ld(e)}registerScroll(e=Date.now()){this._lastScroll=ld(e)}registerClick(e){const t=dd(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach(e=>{e.clickCount++})}_getClicks(e){return this._clicks.filter(t=>t.node===e)}_checkClicks(){const e=[],t=bd();this._clicks.forEach(n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)});for(const t of e){const e=this._clicks.indexOf(t);e>-1&&(this._generateBreadcrumbs(t),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){const t=this._replay,n=!(e.scrollAfter&&e.scrollAfter<=this._scrollTimeout||e.mutationAfter&&e.mutationAfter<=this._threshold),{clickCount:r,clickBreadcrumb:o}=e;if(n){const n=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),s=n<1e3*this._timeout?"mutation":"timeout",i={type:"default",message:o.message,timestamp:o.timestamp,category:"ui.slowClickDetected",data:{...o.data,url:Xc.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:s,clickCount:r||1}};return void this._addBreadcrumbEvent(t,i)}if(r>1){const e={type:"default",message:o.message,timestamp:o.timestamp,category:"ui.multiClick",data:{...o.data,url:Xc.location.href,route:t.getCurrentRoute(),clickCount:r,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=gc(()=>this._checkClicks(),1e3)}}const yd=["A","BUTTON","INPUT"];function bd(){return Date.now()/1e3}function vd(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var _d=/* @__PURE__ */(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))(_d||{});const Sd=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function wd(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(Sd.has(n)){let r=n;"data-testid"!==n&&"data-test-id"!==n||(r="testId"),t[r]=e[n]}return t}function kd(e,t){const n=sd.mirror.getId(e),r=n&&sd.mirror.getNode(n),o=r&&sd.mirror.getMeta(r),s=o&&function(e){return e.type===_d.Element}(o)?o:null;return{message:t,data:s?{nodeId:n,node:{id:n,tagName:s.tagName,textContent:Array.from(s.childNodes).map(e=>e.type===_d.Text&&e.textContent).filter(Boolean).map(e=>e.trim()).join(""),attributes:wd(s.attributes)}}:{}}}const Ed={resource:function(e){const{entryType:t,initiatorType:n,name:r,responseEnd:o,startTime:s,decodedBodySize:i,encodedBodySize:a,responseStatus:c,transferSize:l}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:Td(s),end:Td(o),name:r,data:{size:l,statusCode:c,decodedBodySize:i,encodedBodySize:a}}},paint:function(e){const{duration:t,entryType:n,name:r,startTime:o}=e,s=Td(o);return{type:n,name:r,start:s,end:s+t,data:void 0}},navigation:function(e){const{entryType:t,name:n,decodedBodySize:r,duration:o,domComplete:s,encodedBodySize:i,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:d,redirectCount:p,startTime:h,transferSize:m,type:f}=e;return 0===o?null:{type:`${t}.${f}`,start:Td(h),end:Td(s),name:n,data:{size:m,decodedBodySize:r,encodedBodySize:i,duration:o,domInteractive:l,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:d,domComplete:s,redirectCount:p}}}};function Cd(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}function xd(e){const t=Ed[e.entryType];return t?t(e):null}function Td(e){return((qn()||Xc.performance.timeOrigin)+e)/1e3}function Id(e){const t=e.entries[e.entries.length-1];return Rd(e,"largest-contentful-paint",t?.element?[t.element]:void 0)}function Md(e){return void 0!==e.sources}function Od(e){const t=[],n=[];for(const r of e.entries)if(Md(r)){const e=[];for(const t of r.sources)if(t.node){n.push(t.node);const r=sd.mirror.getId(t.node);r&&e.push(r)}t.push({value:r.value,nodeIds:e.length?e:void 0})}return Rd(e,"cumulative-layout-shift",n,t)}function Pd(e){const t=e.entries[e.entries.length-1];return Rd(e,"interaction-to-next-paint",t?.target?[t.target]:void 0)}function Rd(e,t,n,r){const o=e.value,s=e.rating,i=Td(o);return{type:"web-vital",name:t,start:i,end:i,data:{value:o,size:o,rating:s,nodeIds:n?n.map(e=>sd.mirror.getId(e)):void 0,attributions:r}}}const Ad="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Dd=["log","warn","error"],Ld="[Replay] ";function Nd(e,t="info"){Xs({category:"console",data:{logger:"replay"},level:t,message:`${Ld}${e}`},{level:t})}const jd=function(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:n=>{e=!!n.captureExceptions,t=!!n.traceInternals}};return Ad?(Dd.forEach(e=>{n[e]=(...n)=>{Rt[e](Ld,...n),t&&Nd(n.join(""),pi(e))}}),n.exception=(r,...o)=>{o.length&&n.error&&n.error(...o),Rt.error(Ld,r),e?ss(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&Nd(r,"error")},n.infoTick=(...e)=>{Rt.log(Ld,...e),t&&setTimeout(()=>Nd(e[0]),0)}):Dd.forEach(e=>{n[e]=()=>{}}),n}();class zd extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class $d{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(e){const t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>rl)throw new zd;this.events.push(e)}finish(){return new Promise(e=>{const t=this.events;this.clear(),e(JSON.stringify(t))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const e=this.events.map(e=>e.timestamp).sort()[0];return e?cd(e):null}}class Hd{constructor(e){this._worker=e,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise((e,t)=>{this._worker.addEventListener("message",({data:n})=>{n.success?e():t()},{once:!0}),this._worker.addEventListener("error",e=>{t(e)},{once:!0})})),this._ensureReadyPromise}destroy(){Ad&&jd.log("Destroying compression worker"),this._worker.terminate()}postMessage(e,t){const n=this._getAndIncrementId();return new Promise((r,o)=>{const s=({data:t})=>{const i=t;if(i.method===e&&i.id===n){if(this._worker.removeEventListener("message",s),!i.success)return Ad&&jd.error("Error in compression worker: ",i.response),void o(new Error("Error in compression worker"));r(i.response)}};this._worker.addEventListener("message",s),this._worker.postMessage({id:n,method:e,arg:t})})}_getAndIncrementId(){return this._id++}}class Fd{constructor(e){this._worker=new Hd(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){const t=cd(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);const n=JSON.stringify(e);return this._totalSize+=n.length,this._totalSize>rl?Promise.reject(new zd):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,e=>{Ad&&jd.exception(e,'Sending "clear" message to worker failed',e)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){const e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class Bd{constructor(e){this._fallback=new $d,this._compression=new Fd(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}set waitForCheckout(e){this._used.waitForCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){return void(Ad&&jd.exception(e,"Failed to load the compression worker, falling back to simple buffer"))}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:e,hasCheckout:t,waitForCheckout:n}=this._fallback,r=[];for(const t of e)r.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._compression.waitForCheckout=n,this._used=this._compression;try{await Promise.all(r),this._fallback.clear()}catch(e){Ad&&jd.exception(e,"Failed to add events when switching buffers.")}}}function Ud(){try{return"sessionStorage"in Xc&&!!Xc.sessionStorage}catch{return!1}}function Vd(e){return void 0!==e&&Math.random()<e}function qd(e){if(Ud())try{Xc.sessionStorage.setItem(Qc,JSON.stringify(e))}catch{}}function Wd(e){const t=Date.now();return{id:e.id||Nn(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId,dirty:e.dirty||!1}}function Kd({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const o=function(e,t){return Vd(e)?"session":!!t&&"buffer"}(e,t),s=Wd({sampled:o,previousSessionId:r});return n&&qd(s),s}function Zd(e,t,n=+new Date){return null===e||void 0===t||t<0||0!==t&&e+t<=n}function Gd(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Zd(e.started,t,r)||Zd(e.lastActivity,n,r)}function Yd(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!!Gd(e,{sessionIdleExpire:t,maxReplayDuration:n})&&("buffer"!==e.sampled||0!==e.segmentId)}function Jd({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const o=r.stickySession&&function(){if(!Ud())return null;try{const e=Xc.sessionStorage.getItem(Qc);if(!e)return null;const t=JSON.parse(e);return Ad&&jd.infoTick("Loading existing session"),Wd(t)}catch{return null}}();return o?Yd(o,{sessionIdleExpire:e,maxReplayDuration:t})?(Ad&&jd.infoTick("Session in sessionStorage is expired, creating new one..."),Kd(r,{previousSessionId:o.id})):o:(Ad&&jd.infoTick("Creating new session"),Kd(r,{previousSessionId:n}))}function Xd(e,t,n){return!!ep(e,t)&&(Qd(e,t,n),!0)}async function Qd(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const o="buffer"===e.recordingMode;try{n&&o&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const s=function(e,t){try{if("function"==typeof t&&function(e){return e.type===yu.Custom}(e))return t(e)}catch(e){return Ad&&jd.exception(e,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}(t,e.getOptions().beforeAddRecordingEvent);if(!s)return;return await r.addEvent(s)}catch(t){const n=t&&t instanceof zd,s=n?"addEventSizeExceeded":"addEvent",i=lr();if(i&&i.recordDroppedEvent(n?"buffer_overflow":"internal_sdk_error","replay"),n&&o)return r.clear(),r.waitForCheckout=!0,null;e.handleException(t),await e.stop({reason:s})}}function ep(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=cd(t.timestamp);return!(n+e.timeouts.sessionIdlePause<Date.now()||n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration&&(Ad&&jd.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),1))}function tp(e){return!e.type}function np(e){return"transaction"===e.type}function rp(e){return"feedback"===e.type}function op(e){return!!e.category}function sp(){const e=ir().getPropagationContext().dsc;e&&delete e.replay_id;const t=no();t&&delete go(t).replay_id}function ip(e,t){return t.map(({type:t,start:n,end:r,name:o,data:s})=>{const i=e.throttledAddEvent({type:yu.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:t,description:o,startTimestamp:n,endTimestamp:r,data:s}}});return"string"==typeof i?Promise.resolve(null):i})}function ap(e,t){e.isEnabled()&&null!==t&&(function(e,t){return(!Ad||!e.getOptions()._experiments.traceInternals)&&function(e,t){const n=t?.getDsn(),r=t?.getOptions().tunnel;return function(e,t){const n=Vs(e);return!(!n||Us(n))&&!!t&&n.host.includes(t.host)&&/(^|&|\?)sentry_key=/.test(n.search)}(e,n)||function(e,t){return!!t&&Ks(e)===Ks(t)}(e,r)}(t,lr())}(e,t.name)||e.addUpdate(()=>(ip(e,[t]),!0)))}function cp(e){if(!e)return;const t=new TextEncoder;try{if("string"==typeof e)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=Sc(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function lp(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function up(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta};return n.warnings=[...n.warnings||[],t],e._meta=n,e}function dp(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 pp(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function hp(e,t,n){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:o,warnings:s}=function(e){if(!e||"string"!=typeof e)return{body:e};const t=e.length>tl,n=function(e){const t=e[0],n=e[e.length-1];return"["===t&&"]"===n||"{"===t&&"}"===n}(e);if(t){const t=e.slice(0,tl);return n?{body:t,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${t}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}(n);return r.body=o,s?.length&&(r._meta={warnings:s}),r}function mp(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 fp(e,t){const n=function(e,t=Xc.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(Xc.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}(e);return Ln(n,t)}function gp(e,t){const n={};return t.forEach(t=>{e.get(t)&&(n[t]=e.get(t))}),n}function yp(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?gp(n,t):Array.isArray(n)?{}:mp(n,t):{}}function bp(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}}}}const vp=St.navigator;function _p(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession())return void(Ad&&jd.warn("Received replay event after session expired."));const o=r||!t;t=!0,e.clickDetector&&function(e,t){try{if(!function(e){return 3===e.type}(t))return;const{source:n}=t.data;if(fd.has(n)&&e.registerMutation(t.timestamp),n===bu.Scroll&&e.registerScroll(t.timestamp),function(e){return e.data.source===bu.MouseInteraction}(t)){const{type:n,id:r}=t.data,o=sd.mirror.getNode(r);o instanceof HTMLElement&&n===vu.Click&&e.registerClick(o)}}catch{}}(e.clickDetector,n),e.addUpdate(()=>{if("buffer"===e.recordingMode&&o&&e.setInitialState(),!Xd(e,n,o))return!0;if(!o)return!1;const t=e.session;if(function(e,t){t&&e.session&&0===e.session.segmentId&&Xd(e,function(e){const t=e.getOptions();return{type:yu.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:!!e.eventBuffer&&"worker"===e.eventBuffer.type,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}(e),!1)}(e,o),"buffer"===e.recordingMode&&t&&e.eventBuffer&&!t.dirty){const n=e.eventBuffer.getEarliestTimestamp();n&&(Ad&&jd.log(`Updating session start time to earliest event in buffer to ${new Date(n)}`),t.started=n,e.getOptions().stickySession&&qd(t))}return t?.previousSessionId||"session"===e.recordingMode&&e.flush(),!0})}}class Sp extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class wp extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}async function kp(e,t={count:0,interval:5e3}){const{recordingData:n,onError:r}=e;if(n.length)try{return await async function({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:o,session:s}){const i=function({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}\n`;if("string"==typeof e)n=`${r}${e}`;else{const t=(new TextEncoder).encode(r);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:l,initialTimestamp:u}=r,d=lr(),p=ir(),h=d?.getTransport(),m=d?.getDsn();if(!(d&&h&&m&&s.sampled))return Promise.resolve({});const f={type:"replay_event",replay_start_timestamp:u/1e3,timestamp:o/1e3,error_ids:c,trace_ids:l,urls:a,replay_id:t,segment_id:n,replay_type:s.sampled},g=await async function({client:e,scope:t,replayId:n,event:r}){const o={event_id:n,integrations:"object"!=typeof e._integrations||null===e._integrations||Array.isArray(e._integrations)?void 0:Object.keys(e._integrations)};e.emit("preprocessEvent",r,o);const s=await rs(e.getOptions(),r,o,t,e,ar());if(!s)return null;e.emit("postprocessEvent",s,o),s.platform=s.platform||"javascript";const i=e.getSdkMetadata(),{name:a,version:c,settings:l}=i?.sdk||{};return s.sdk={...s.sdk,name:a||"sentry.javascript.unknown",version:c||"0.0.0",settings:l},s}({scope:p,client:d,replayId:t,event:f});if(!g)return d.recordDroppedEvent("event_processor","replay"),Ad&&jd.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete g.sdkProcessingMetadata;const y=function(e,t,n,r){return So(Po(e,Oo(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:"string"==typeof t?(new TextEncoder).encode(t).length:t.length},t]])}(g,i,m,d.getOptions().tunnel);let b;try{b=await h.send(y)}catch(e){const t=new Error(el);try{t.cause=e}catch{}throw t}if("number"==typeof b.statusCode&&(b.statusCode<200||b.statusCode>=300))throw new Sp(b.statusCode);const v=Es({},b);if(ks(v,"replay"))throw new wp(v);return b}(e),!0}catch(n){if(n instanceof Sp||n instanceof wp)throw n;if(as("Replays",{_retryCount:t.count}),r&&r(n),t.count>=3){const e=new Error(`${el} - max retries exceeded`);try{e.cause=n}catch{}throw e}return t.interval*=++t.count,new Promise((n,r)=>{gc(async()=>{try{await kp(e,t),n(!0)}catch(e){r(e)}},t.interval)})}}const Ep="__THROTTLED";class Cp{constructor({options:e,recordingOptions:t}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=t,this._options=e,this._debouncedFlush=function(e,t,n){return function(e,t,n){let r,o,s;const i=n?.maxWait?Math.max(n.maxWait,t):0,a=n?.setTimeoutImpl||setTimeout;function c(){return l(),r=e(),r}function l(){void 0!==o&&clearTimeout(o),void 0!==s&&clearTimeout(s),o=s=void 0}function u(){return o&&clearTimeout(o),o=a(c,t),i&&void 0===s&&(s=a(c,i)),r}return u.cancel=l,u.flush=function(){return void 0!==o||void 0!==s?c():r},u}(e,t,{...n,setTimeoutImpl:gc})}(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=function(e){const t=new Map;let n=!1;return(...r)=>{const o=Math.floor(Date.now()/1e3);if((e=>{const n=e-5;t.forEach((e,r)=>{r<n&&t.delete(r)})})(o),[...t.values()].reduce((e,t)=>e+t,0)>=300){const e=n;return n=!0,e?"__SKIPPED":Ep}n=!1;const s=t.get(o)||0;return t.set(o,s+1),e(...r)}}((e,t)=>function(e,t,n){return ep(e,t)?Qd(e,t,n):Promise.resolve(null)}(this,e,t));const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),o=n?{threshold:Math.min(3e3,n),timeout:n,scrollTimeout:300,ignoreSelector:r?r.join(","):""}:void 0;if(o&&(this.clickDetector=new gd(this,o)),Ad){const t=e._experiments;jd.setConfig({captureExceptions:!!t.captureExceptions,traceInternals:!!t.traceInternals})}this._handleVisibilityChange=()=>{"visible"===Xc.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const e=vd({category:"ui.blur"});this._doChangeToBackgroundTasks(e)},this._handleWindowFocus=()=>{const e=vd({category:"ui.focus"});this._doChangeToForegroundTasks(e)},this._handleKeyboardEvent=e=>{!function(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=function(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s,target:i}=e;if(!i||function(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable}(i)||!s)return null;if(!(t||r||o)&&1===s.length)return null;const a=fn(i,{maxStringLength:200})||"<unknown>";return vd({category:"ui.keyDown",message:a,data:{...kd(i,a).data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s}})}(t);n&&ud(e,n)}(this,e)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return Boolean(this._canvas)}getOptions(){return this._options}handleException(e){Ad&&jd.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){const{errorSampleRate:t,sessionSampleRate:n}=this._options,r=t<=0&&n<=0;this._requiresManualStart=r,r||(this._initializeSessionForSampling(e),this.session?!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",Ad&&jd.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording()):Ad&&jd.exception(new Error("Unable to initialize and create session")))}start(){if(this._isEnabled&&"session"===this.recordingMode)return void(Ad&&jd.log("Recording is already in progress"));if(this._isEnabled&&"buffer"===this.recordingMode)return void(Ad&&jd.log("Buffering is in progress, call `flush()` to save the replay"));Ad&&jd.infoTick("Starting replay in session mode"),this._updateUserActivity();const e=Jd({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled)return void(Ad&&jd.log("Buffering is in progress, call `flush()` to save the replay"));Ad&&jd.infoTick("Starting replay in buffer mode");const e=Jd({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const e=this._canvas;this._stopRecording=sd({...this._recordingOptions,..."buffer"===this.recordingMode?{checkoutEveryNms:6e4}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:_p(this),.../iPhone|iPad|iPod/i.test(vp?.userAgent??"")||/Macintosh/i.test(vp?.userAgent??"")&&vp?.maxTouchPoints&&vp?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{},onMutation:this._onMutationHandler.bind(this),...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}})}catch(e){this.handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this.handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){if(this._isEnabled){this._isEnabled=!1,this.recordingMode="buffer";try{Ad&&jd.log("Stopping Replay"+(t?` triggered by ${t}`:"")),sp(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,function(){if(Ud())try{Xc.sessionStorage.removeItem(Qc)}catch{}}(),this.session=void 0}catch(e){this.handleException(e)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),Ad&&jd.log("Pausing replay"))}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),Ad&&jd.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const t=Date.now();Ad&&jd.log("Converting buffer to session"),await this.flushImmediate();const n=this.stopRecording();e&&n&&"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession()),this.startRecording())}addUpdate(e){const t=e();"buffer"!==this.recordingMode&&this._isEnabled&&!0!==t&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._checkSession())return;this.resume()}}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(e){if(!e||!1!==this.session?.sampled)return this.session?.id}checkAndHandleExpiredSession(){if(!(this._lastActivity&&Zd(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled))return!!this._checkSession();this.pause()}setInitialState(){const e=`${Xc.location.origin}${Xc.location.pathname}${Xc.location.hash}${Xc.location.search}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=e,this._context.initialTimestamp=Date.now(),this._context.urls.push(e)}throttledAddEvent(e,t){const n=this._throttledAddEvent(e,t);if(n===Ep){const e=vd({category:"replay.throttled"});this.addUpdate(()=>!Xd(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}}))}return n}getCurrentRoute(){const e=this.lastActiveSpan||no(),t=e&&to(e),n=(t&&Zr(t).data||{})[dr];if(t&&n&&["route","custom"].includes(n))return Zr(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=function({useCompression:e,workerUrl:t}){if(e&&window.Worker){const e=function(e){try{const t=e||("undefined"!=typeof __SENTRY_EXCLUDE_REPLAY_WORKER__&&__SENTRY_EXCLUDE_REPLAY_WORKER__?"":function(){const e=new Blob(['var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,n){return p[n.s]-p[t.s]||t.f-n.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});']);return URL.createObjectURL(e)}());if(!t)return;Ad&&jd.log("Using compression worker"+(e?` from ${e}`:""));const n=new Worker(t);return new Bd(n)}catch(e){Ad&&jd.exception(e,"Failed to create compression worker")}}(t);if(e)return e}return Ad&&jd.log("Using simple buffer"),new $d}({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(e){const t=Jd({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:this._options.errorSampleRate>0});this.session=t}_checkSession(){if(!this.session)return!1;const e=this.session;return!Yd(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(e.id))}_addListeners(){try{Xc.document.addEventListener("visibilitychange",this._handleVisibilityChange),Xc.addEventListener("blur",this._handleWindowBlur),Xc.addEventListener("focus",this._handleWindowFocus),Xc.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(function(e){const t=lr();lc((e=>t=>{if(!e.isEnabled())return;const n=function(e){const{target:t,message:n}=function(e){const t="click"===e.name;let n,r=null;try{r=t?pd(e.event):hd(e.event),n=fn(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}(e);return vd({category:`ui.${e.name}`,...kd(t,n)})}(t);if(!n)return;const r="click"===t.name,o=r?t.event:void 0;var s,i,a;!(r&&e.clickDetector&&o?.target)||o.altKey||o.metaKey||o.ctrlKey||o.shiftKey||(s=e.clickDetector,i=n,a=pd(t.event),s.handleClick(i,a)),ud(e,n)})(e)),pc(function(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}(t);null!==n&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(ip(e,[n]),!1)))}}(e)),function(e){const t=lr();t&&t.on("beforeAddBreadcrumb",t=>function(e,t){if(!e.isEnabled()||!op(t))return;const n=function(e){return!op(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:"console"===e.category?function(e){const t=e.data?.arguments;if(!Array.isArray(t)||0===t.length)return vd(e);let n=!1;const r=t.map(e=>{if(!e)return e;if("string"==typeof e)return e.length>nl?(n=!0,`${e.slice(0,nl)}…`):e;if("object"==typeof e)try{const t=bo(e,7);return JSON.stringify(t).length>nl?(n=!0,`${JSON.stringify(t,null,2).slice(0,nl)}…`):t}catch{}return e});return vd({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(e):vd(e)}(t);n&&ud(e,n)}(e,t))}(e),function(e){const t=lr();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",(e,t)=>function(e,t,n){if(t.data)try{(function(e){return"xhr"===e.category})(t)&&function(e){return e?.xhr}(n)&&(function(e,t){const{xhr:n,input:r}=t;if(!n)return;const o=cp(r),s=n.getResponseHeader("content-length")?lp(n.getResponseHeader("content-length")):function(e,t){try{return cp("json"===t&&e&&"object"==typeof e?JSON.stringify(e):e)}catch{return}}(n.response,n.responseType);void 0!==o&&(e.data.request_body_size=o),void 0!==s&&(e.data.response_body_size=s)}(t,n),async function(e,t,n){try{const r=function(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:s=r,input:i,xhr:a}=t,{url:c,method:l,status_code:u=0,request_body_size:d,response_body_size:p}=e.data;if(!c)return null;if(!a||!fp(c,n.networkDetailAllowUrls)||fp(c,n.networkDetailDenyUrls))return{startTimestamp:o,endTimestamp:s,url:c,method:l,statusCode:u,request:pp(d),response:pp(p)};const h=a[yc],m=h?mp(h.request_headers,n.networkRequestHeaders):{},f=mp(Ec(a),n.networkResponseHeaders),[g,y]=n.networkCaptureBodies?wc(i,jd):[void 0],[b,v]=n.networkCaptureBodies?function(e){const t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return function(e,t){try{if("string"==typeof e)return[e];if(e instanceof Document)return[e.body.outerHTML];if("json"===t&&e&&"object"==typeof e)return[JSON.stringify(e)];if(!e)return[void 0]}catch(t){return Ad&&jd.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Ad&&jd.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}(e.response,e.responseType)}catch(e){t.push(e)}return Ad&&jd.warn("Failed to get xhr response body",...t),[void 0]}(a):[void 0],_=hp(m,d,g),S=hp(f,p,b);return{startTimestamp:o,endTimestamp:s,url:c,method:l,statusCode:u,request:y?up(_,y):_,response:v?up(S,v):S}}(e,t,n),o=dp("resource.xhr",r);ap(n.replay,o)}catch(e){Ad&&jd.exception(e,"Failed to capture xhr breadcrumb")}}(t,n,e)),function(e){return"fetch"===e.category}(t)&&function(e){return e?.response}(n)&&(function(e,t){const{input:n,response:r}=t,o=cp(n?kc(n):void 0),s=r?lp(r.headers.get("content-length")):void 0;void 0!==o&&(e.data.request_body_size=o),void 0!==s&&(e.data.response_body_size=s)}(t,n),async function(e,t,n){try{const r=await async function(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:l,response_body_size:u}=e.data,d=fp(i,n.networkDetailAllowUrls)&&!fp(i,n.networkDetailDenyUrls),p=d?function({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const o=n?(i=t,1===(s=n).length&&"string"!=typeof s[0]?yp(s[0],i):2===s.length?yp(s[1],i):{}):{};var s,i;if(!e)return hp(o,r,void 0);const a=kc(n),[c,l]=wc(a,jd),u=hp(o,r,c);return l?up(u,l):u}(n,t.input,l):pp(l),h=await async function(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,o){if(!e&&void 0!==o)return pp(o);const s=r?gp(r.headers,n):{};if(!r||!t&&void 0!==o)return hp(s,o,void 0);const[i,a]=await async function(e){const t=function(e){try{return e.clone()}catch(e){Ad&&jd.exception(e,"Failed to clone response body")}}(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{const e=await function(e){return new Promise((t,n)=>{const r=gc(()=>n(new Error("Timeout while trying to read response body")),500);(async function(e){return await e.text()})(e).then(e=>t(e),e=>n(e)).finally(()=>clearTimeout(r))})}(t);return[e]}catch(e){return e instanceof Error&&e.message.indexOf("Timeout")>-1?(Ad&&jd.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(Ad&&jd.exception(e,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}(r),c=function(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:o}){try{const s=e?.length&&void 0===n?cp(e):n;return r?hp(o,s,t?e:void 0):pp(s)}catch(e){return Ad&&jd.exception(e,"Failed to serialize response body"),hp(o,n,void 0)}}(i,{networkCaptureBodies:t,responseBodySize:o,captureDetails:e,headers:s});return a?up(c,a):c}(d,n,t.response,u);return{startTimestamp:o,endTimestamp:s,url:i,method:a,statusCode:c,request:p,response:h}}(e,t,n),o=dp("resource.fetch",r);ap(n.replay,o)}catch(e){Ad&&jd.exception(e,"Failed to capture fetch breadcrumb")}}(t,n,e))}catch(e){Ad&&jd.exception(e,"Error when enriching network breadcrumb")}}(a,e,t))}catch{}}(e);const n=function(e){return Object.assign((t,n)=>{if(!e.isEnabled()||e.isPaused())return t;if(function(e){return"replay_event"===e.type}(t))return delete t.breadcrumbs,t;if(!tp(t)&&!np(t)&&!rp(t))return t;if(!e.checkAndHandleExpiredSession())return sp(),t;if(rp(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),function(e,t){e.triggerUserActivity(),e.addUpdate(()=>!t.timestamp||(e.throttledAddEvent({type:yu.Custom,timestamp:1e3*t.timestamp,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1))}(e,t),t;if(function(e,t){return!(e.type||!e.exception?.values?.length||!t.originalException?.__rrweb__)}(t,n)&&!e.getOptions()._experiments.captureExceptions)return Ad&&jd.log("Ignoring error from rrweb internals",t),null;const r=function(e,t){return"buffer"===e.recordingMode&&t.message!==el&&!(!t.exception||t.type)&&Vd(e.getOptions().errorSampleRate)}(e,t);if((r||"session"===e.recordingMode)&&(t.tags={...t.tags,replayId:e.getSessionId()}),r&&"buffer"===e.recordingMode&&"buffer"===e.session?.sampled){const t=e.session;t.dirty=!0,e.getOptions().stickySession&&qd(t)}return t},{id:"Replay"})}(e);var r;r=n,ar().addEventProcessor(r),t&&(t.on("beforeSendEvent",function(e){return t=>{e.isEnabled()&&tp(t)&&function(e,t){const n=t.exception?.values?.[0]?.value;"string"==typeof n&&(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))&&ud(e,vd({category:"replay.hydrate-error",data:{url:yn()}}))}(e,t)}}(e)),t.on("afterSendEvent",function(e){return(t,n)=>{if(!e.isEnabled()||!tp(t)&&!np(t))return;const r=n.statusCode;!r||r<200||r>=300||(np(t)?function(e,t){const n=e.getContext();t.contexts?.trace?.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}(e,t):function(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),"buffer"!==e.recordingMode||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();("function"!=typeof r||r(t))&&gc(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(t){e.handleException(t)}})}(e,t))}}(e)),t.on("createDsc",t=>{const n=e.getSessionId();n&&e.isEnabled()&&"session"===e.recordingMode&&e.checkAndHandleExpiredSession()&&(t.replay_id=n)}),t.on("spanStart",t=>{e.lastActiveSpan=t}),t.on("spanEnd",t=>{e.lastActiveSpan=t}),t.on("beforeSendFeedback",async(t,n)=>{const r=e.getSessionId();n?.includeReplay&&e.isEnabled()&&r&&t.contexts?.feedback&&("api"===t.contexts.feedback.source&&await e.sendBufferedReplayOrFlush(),t.contexts.feedback.replay_id=r)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}(this),this._hasInitializedCoreListeners=!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=function(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(e=>{r.push(La(e,n))}),r.push(Aa(Cd(Id,e)),Ra(Cd(Od,e)),Da(Cd(Pd,e))),()=>{r.forEach(e=>e())}}(this)}_removeListeners(){try{Xc.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Xc.removeEventListener("blur",this._handleWindowBlur),Xc.removeEventListener("focus",this._handleWindowFocus),Xc.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}_doChangeToBackgroundTasks(e){this.session&&(Gd(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush()))}_doChangeToForegroundTasks(e){this.session&&(this.checkAndHandleExpiredSession()?e&&this._createCustomBreadcrumb(e):Ad&&jd.log("Document has become active, but session has expired"))}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate(()=>{this.throttledAddEvent({type:yu.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})})}_addPerformanceEntries(){let e=(t=this.performanceEntries,t.map(xd).filter(Boolean)).concat(this.replayPerformanceEntries);var t;if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const t=this._context.initialTimestamp/1e3;e=e.filter(e=>e.start>=t)}return Promise.all(ip(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:t}=this;if(!e||!t||this._requiresManualStart)return;if(e.segmentId)return;const n=t.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){const e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){const e=this.getSessionId();if(this.session&&this.eventBuffer&&e){if(await this._addPerformanceEntries(),this.eventBuffer?.hasEvents&&(await async function(e){try{return Promise.all(ip(e,[bp(Xc.performance.memory)]))}catch{return[]}}(this),this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession();const o=await this.eventBuffer.finish();await kp({replayId:e,recordingData:o,segmentId:r,eventContext:n,session:this.session,timestamp:t,onError:e=>this.handleException(e)})}catch(e){this.handleException(e),this.stop({reason:"sendReplay"});const t=lr();t&&t.recordDroppedEvent(e instanceof wp?"ratelimit_backoff":"send_error","replay")}}else Ad&&jd.error("No session or eventBuffer found to flush.")}async _flush({force:e=!1}={}){if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession())return void(Ad&&jd.error("Attempting to finish replay event after session expired."));if(!this.session)return;const t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();const r=n<this._options.minReplayDuration;if(r||n>this._options.maxReplayDuration+5e3)return Ad&&jd.log(`Session duration (${Math.floor(n/1e3)}s) is too ${r?"short":"long"}, not sending replay.`),void(r&&this._debouncedFlush());const o=this.eventBuffer;o&&0===this.session.segmentId&&!o.hasCheckout&&Ad&&jd.log("Flushing initial segment without checkout.");const s=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(e){this.handleException(e)}finally{this._flushLock=void 0,s&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&qd(this.session)}_onMutationHandler(e){const{ignoreMutations:t}=this._options._experiments;if(t?.length&&e.some(e=>{const n=function(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}(e.target),r=t.join(",");return n?.matches(r)}))return!1;const n=e.length,r=this._options.mutationLimit,o=r&&n>r;if(n>this._options.mutationBreadcrumbLimit||o){const e=vd({category:"replay.mutations",data:{count:n,limit:o}});this._createCustomBreadcrumb(e)}return!o||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}function xp(e,t){return[...e,...t].join(",")}const Tp='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',Ip=["content-length","content-type","accept"],Mp=Symbol.for("sentry__originalRequestBody");let Op=!1,Pp=!1;const Rp=e=>new Ap(e);class Ap{constructor({flushMinDelay:e=5e3,flushMaxDelay:t=5500,minReplayDuration:n=4999,maxReplayDuration:r=36e5,stickySession:o=!0,useCompression:s=!0,workerUrl:i,_experiments:a={},maskAllText:c=!0,maskAllInputs:l=!0,blockAllMedia:u=!0,mutationBreadcrumbLimit:d=750,mutationLimit:p=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:f=[],networkDetailDenyUrls:g=[],networkCaptureBodies:y=!0,networkRequestHeaders:b=[],networkResponseHeaders:v=[],mask:_=[],maskAttributes:S=["title","placeholder","aria-label"],unmask:w=[],block:k=[],unblock:E=[],ignore:C=[],maskFn:x,beforeAddRecordingEvent:T,beforeErrorSampling:I,onError:M,attachRawBodyFromRequest:O=!1}={}){this.name="Replay";const P=function({mask:e,unmask:t,block:n,unblock:r,ignore:o}){return{maskTextSelector:xp(e,[".sentry-mask","[data-sentry-mask]"]),unmaskTextSelector:xp(t,[]),blockSelector:xp(n,[".sentry-block","[data-sentry-block]","base","iframe[srcdoc]:not([src])"]),unblockSelector:xp(r,[]),ignoreSelector:xp(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}({mask:_,unmask:w,block:k,unblock:E,ignore:C});if(this._recordingOptions={maskAllInputs:l,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:x,maskInputFn:x,maskAttributeFn:(e,t,n)=>function({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:o,value:s}){return r?o.unmaskTextSelector&&e.matches(o.unmaskTextSelector)?s:n.includes(t)||"value"===t&&"INPUT"===e.tagName&&["submit","button"].includes(e.getAttribute("type")||"")?s.replace(/[\S]/g,"*"):s:s}({maskAttributes:S,maskAllText:c,privacyOptions:P,key:e,value:t,el:n}),...P,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch{}},recordCrossOriginIframes:Boolean(a.recordCrossOriginIframes)},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,5e4),maxReplayDuration:Math.min(r,36e5),stickySession:o,useCompression:s,workerUrl:i,blockAllMedia:u,maskAllInputs:l,maskAllText:c,mutationBreadcrumbLimit:d,mutationLimit:p,slowClickTimeout:h,slowClickIgnoreSelectors:m,networkDetailAllowUrls:f,networkDetailDenyUrls:g,networkCaptureBodies:y,networkRequestHeaders:Dp(b),networkResponseHeaders:Dp(v),beforeAddRecordingEvent:T,beforeErrorSampling:I,onError:M,attachRawBodyFromRequest:O,_experiments:a},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Tp}`:Tp,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&Ii())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Op}set _isInitialized(e){Op=e}afterAllSetup(e){Ii()&&!this._replay&&(this._initialOptions.attachRawBodyFromRequest&&function(){if("undefined"==typeof Request||Pp)return;const e=Request;try{const t=function(t,n){const r=new e(t,n);return null!=n?.body&&(r[Mp]=n.body),r};t.prototype=e.prototype,St.Request=t,Pp=!0}catch{}}(),this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:"session"===this._replay.recordingMode}):Promise.resolve()}flush(e){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(e){if(this._replay?.isEnabled())return this._replay.getSessionId(e)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){const t=function(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},o=zr(n.replaysSessionSampleRate),s=zr(n.replaysOnErrorSampleRate);return null==o&&null==s&&It(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),null!=o&&(r.sessionSampleRate=o),null!=s&&(r.errorSampleRate=s),r}(this._initialOptions,e);this._replay=new Cp({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{const t=e.getIntegrationByName("ReplayCanvas");if(!t)return;this._replay._canvas=t.getOptions()}catch{}}}function Dp(e){return[...Ip,...e.map(e=>e.toLowerCase())]}function Lp(e){try{return new URL(e,Mi.location.origin).href}catch{return}}function Np(e){try{return new Headers(e)}catch{return}}const jp=new WeakMap,zp=new Map,$p={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function Hp(e){const{url:t}=Zr(e).data;if(!t||"string"!=typeof t)return;const n=La("resource",({entries:r})=>{r.forEach(r=>{(function(e){return"resource"===e.entryType&&"initiatorType"in e&&"string"==typeof e.nextHopProtocol&&("fetch"===e.initiatorType||"xmlhttprequest"===e.initiatorType)})(r)&&r.name.endsWith(t)&&(e.setAttributes(Xa(r)),setTimeout(n))})})}const Fp="sentry_previous_trace";function Bp(e){return 1===e.traceFlags}const Up={...Vo,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...$p};function Vp(e,t,n){e.emit("startPageLoadSpan",t,n),ir().setTransactionName(t.name);const r=Zp(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function qp(e,t,n){const{url:r,isRedirect:o}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:o}),e.emit("startNavigationSpan",t,{isRedirect:o});const s=ir();return s.setTransactionName(t.name),r&&!o&&s.setSDKProcessingMetadata({normalizedRequest:{...Ai(),url:r}}),Zp(e)}function Wp(e){const t=Mi.document,n=t?.querySelector(`meta[name=${e}]`);return n?.getAttribute("content")||void 0}const Kp="_sentry_idleSpan";function Zp(e){return e[Kp]}function Gp(e,t){_n(e,Kp,t)}const Yp={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Jp={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Xp={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Qp=Symbol.for("react.forward_ref"),eh=Symbol.for("react.memo"),th={};function nh(e){if(function(e){return"object"==typeof e&&null!==e&&e.$$typeof===eh}(e))return Xp;const t=e.$$typeof;return t&&th[t]||Yp}th[Qp]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},th[eh]=Xp;const rh=Object.defineProperty.bind(Object),oh=Object.getOwnPropertyNames.bind(Object),sh=Object.getOwnPropertySymbols?.bind(Object),ih=Object.getOwnPropertyDescriptor.bind(Object),ah=Object.getPrototypeOf.bind(Object),ch=Object.prototype;function lh(e,t,n){if("string"!=typeof t){if(ch){const n=ah(t);n&&n!==ch&&lh(e,n)}let n=oh(t);sh&&(n=n.concat(sh(t)));const r=nh(e),o=nh(t);for(const s of n){const n=String(s);if(!(Jp[n]||o?.[n]||r?.[n]||ih(e,s))){const n=ih(t,s);if(n)try{rh(e,s,n)}catch(e){}}}}return e}class uh extends V.Component{constructor(e){super(e);const{name:t,disabled:n=!1}=this.props;n||(this._mountSpan=jo({name:`<${t}>`,onlyIfParent:!0,op:"ui.react.mount",attributes:{[fr]:"auto.ui.react.profiler","ui.component_name":t}}))}componentDidMount(){this._mountSpan&&this._mountSpan.end()}shouldComponentUpdate({updateProps:e,includeUpdates:t=!0}){if(t&&this._mountSpan&&e!==this.props.updateProps){const t=Object.keys(e).filter(t=>e[t]!==this.props.updateProps[t]);if(t.length>0){const e=Un();this._updateSpan=zo(this._mountSpan,()=>jo({name:`<${this.props.name}>`,onlyIfParent:!0,op:"ui.react.update",startTime:e,attributes:{[fr]:"auto.ui.react.profiler","ui.component_name":this.props.name,"ui.react.changed_props":t}}))}}return!0}componentDidUpdate(){this._updateSpan&&(this._updateSpan.end(),this._updateSpan=void 0)}componentWillUnmount(){const e=Un(),{name:t,includeRender:n=!0}=this.props;if(this._mountSpan&&n){const n=Zr(this._mountSpan).timestamp;zo(this._mountSpan,()=>{const r=jo({onlyIfParent:!0,name:`<${t}>`,op:"ui.react.render",startTime:n,attributes:{[fr]:"auto.ui.react.profiler","ui.component_name":t}});r&&r.end(e)})}}render(){return this.props.children}}Object.assign(uh,{defaultProps:{disabled:!1,includeRender:!0,includeUpdates:!0}});const dh="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,ph={componentStack:null,error:null,eventId:null};class hh extends V.Component{constructor(e){super(e),this.state=ph,this._openFallbackReportDialog=!0;const t=lr();t&&e.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=t.on("afterSendEvent",t=>{!t.type&&this._lastEventId&&t.event_id===this._lastEventId&&Jc({...e.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,n){const{componentStack:r}=n,{beforeCapture:o,onError:s,showDialog:i,dialogOptions:a}=this.props;cr(c=>{o&&o(c,t,r);const l=function(t,{componentStack:n},r){if(function(){const t=e.version.match(/^([^.]+)/);return null!==t&&parseInt(t[0])>=17}()&&en(t)&&n){const e=new Error(t.message);e.name=`React ErrorBoundary ${t.name}`,e.stack=n,function(e,t){const n=new WeakSet;!function e(t,r){if(!n.has(t))return t.cause?(n.add(t),e(t.cause,r)):void(t.cause=r)}(e,t)}(t,e)}return cr(e=>(e.setContext("react",{componentStack:n}),ss(t,r)))}(t,n,{mechanism:{handled:null!=this.props.handled?this.props.handled:!!this.props.fallback,type:"auto.function.react.error_boundary"}});s&&s(t,r,l),i&&(this._lastEventId=l,this._openFallbackReportDialog&&Jc({...a,eventId:l})),this.setState({error:t,componentStack:r,eventId:l})})}componentDidMount(){const{onMount:e}=this.props;e&&e()}componentWillUnmount(){const{error:e,componentStack:t,eventId:n}=this.state,{onUnmount:r}=this.props;r&&(this.state===ph?r(null,null,null):r(e,t,n)),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}resetErrorBoundary(){const{onReset:e}=this.props,{error:t,componentStack:n,eventId:r}=this.state;e&&e(t,n,r),this.setState(ph)}render(){const{fallback:e,children:t}=this.props,n=this.state;if(null===n.componentStack)return"function"==typeof t?t():t;const r="function"==typeof e?V.createElement(e,{error:n.error,componentStack:n.componentStack,resetError:()=>this.resetErrorBoundary(),eventId:n.eventId}):e;return V.isValidElement(r)?r:(e&&dh&&Rt.warn("fallback did not produce a valid ReactElement"),null)}}let mh,fh,gh,yh,bh,vh,_h=!1;function Sh(e){return function(e){return"*"===e[e.length-1]?e.slice(0,-1):e}(e.route.path||"")}function wh(e){return e.params["*"]||""}function kh(e){return"/"===e[e.length-1]?e.slice(0,-1):e}function Eh(e){return e.endsWith("*")}function Ch(e){return e.includes("/*")||e.endsWith("*")}function xh(e,t){return Eh(e)&&!!t.route.children?.length||!1}function Th(e){return!(e.children||!e.element||!e.path?.endsWith("/*"))}function Ih(e,t,n){const r=e&&e.length>0?e:_h?Oh(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 Mh(e){return e.split(/\\?\//).filter(e=>e.length>0&&","!==e).length}function Oh(e,t){if(!t||"/"===t)return e;if(!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)||"/"}function Ph(e){return"/"===e[0]?e:`/${e}`}function Rh(e,t){const n=mh(e,t);if(!n||0===n.length)return"";for(const r of n)if(r.route.path&&"*"!==r.route.path){const n=Sh(r),o=Oh(t.pathname,Ph(r.pathnameBase));return kh(t.pathname===o?o:kh(n||"")+Ph(Rh(e.filter(e=>e!==r.route),{pathname:o})))}return""}function Ah(e,t){return _h?Oh(e.pathname,t):e.pathname||""}function Dh(e,t,n,r,o=""){let s,i="url";const a=function(e,t){const n=mh(t,e);if(n)for(const e of n)if(Th(e.route)&&wh(e))return!0;return!1}(e,n);return a&&(s=Ph(Rh(n,e)),i="route"),a&&s||([s,i]=function(e,t,n,r=""){if(!e||0===e.length)return[_h?Oh(t.pathname,r):t.pathname,"url"];if(!n)return[Ah(t,r),"url"];let o="";for(const e of n){const n=e.route;if(!n)continue;if(n.index)return Ih(o,e.pathname,r);const s=n.path;if(!s||xh(s,e))continue;const i="/"===s[0]||"/"===o[o.length-1]?s:`/${s}`;if(o=kh(o)+Ph(i),kh(t.pathname)===kh(r+e.pathname))return Mh(o)===Mh(e.pathname)||Eh(o)?(xh(o,e)&&(o=o.slice(0,-1)),[(_h?"":r)+o,"route"]):[(_h?"":r)+i,"route"]}return[Ah(t,r),"url"]}(t,e,r,o)),[s||e.pathname,i]}function Lh(){const e=no(),t=e?to(e):void 0;if(!t)return;const n=Zr(t).op;return"navigation"===n||"pageload"===n?t:void 0}let Nh=3e3;const jh=new WeakSet,zh=new WeakMap,$h=new Set,Hh=new WeakMap;function Fh(e){return e.includes(":")||e.includes("*")}function Bh(e,t){const n=((e={})=>{const t={name:void 0,source:void 0},n=Mi.document,{enableInp:r,enableElementTiming:o,enableLongTask:s,enableLongAnimationFrame:i,_experiments:{enableInteractions:a,enableStandaloneClsSpans:c,enableStandaloneLcpSpans:l},beforeStartSpan:u,idleTimeout:d,finalTimeout:p,childSpanTimeout:h,markBackgroundSpan:m,traceFetch:f,traceXHR:g,trackFetchStreamPerformance:y,shouldCreateSpanForRequest:b,enableHTTPTimings:v,ignoreResourceSpans:_,ignorePerformanceApiSpans:S,instrumentPageLoad:w,instrumentNavigation:k,detectRedirects:E,linkPreviousTrace:C,consistentTraceSampling:x,enableReportPageLoaded:T,onRequestSpanStart:I,onRequestSpanEnd:M}={...Up,...e};let O,P,R;function A(e,r,o=!0){const s="pageload"===r.op,i=r.name,a=u?u(r):r,m=a.attributes||{};if(i!==a.name&&(m[dr]="custom",a.attributes=m),!o){const e=Bn();return void jo({...a,startTime:e}).end(e)}t.name=a.name,t.source=m[dr];const f=qo(a,{idleTimeout:d,finalTimeout:p,childSpanTimeout:h,disableAutoFinish:s,beforeSpanEnd:t=>{O?.(),function(e,t){const n=Ka(),r=qn();if(!n?.getEntries||!r)return;const o=Za(r),s=n.getEntries(),{op:i,start_timestamp:a}=Zr(e);s.slice(tc).forEach(n=>{const r=Za(n.startTime),s=Za(Math.max(0,n.duration));if(!("navigation"===i&&a&&o+r<a))switch(n.entryType){case"navigation":!function(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{rc(e,t,r,n)}),rc(e,t,"secureConnection",n,"TLS/SSL"),rc(e,t,"fetch",n,"cache"),rc(e,t,"domainLookup",n,"DNS"),function(e,t,n){const r=n+Za(t.requestStart),o=n+Za(t.responseEnd),s=n+Za(t.responseStart);t.responseEnd&&(qa(e,r,o,{op:"browser.request",name:t.name,attributes:{[fr]:"auto.ui.browser.metrics"}}),qa(e,s,o,{op:"browser.response",name:t.name,attributes:{[fr]:"auto.ui.browser.metrics"}}))}(e,t,n)}(e,n,o);break;case"mark":case"paint":case"measure":{!function(e,t,n,r,o,s){if(function(e){if("measure"===e?.entryType)try{return"Components ⚛"===e.detail.devtools.track}catch{return}}(t))return;if(["mark","measure"].includes(t.entryType)&&Ln(t.name,s))return;const i=Zi(!1),a=Za(i?i.requestStart:0),c=o+Math.max(n,a),l=o+n,u=l+r,d={[fr]:"auto.resource.browser.metrics"};c!==l&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=c),function(e,t){try{const n=t.detail;if(!n)return;if("object"==typeof n){for(const[t,r]of Object.entries(n))if(r&&an(r))e[`sentry.browser.measure.detail.${t}`]=r;else if(void 0!==r)try{e[`sentry.browser.measure.detail.${t}`]=JSON.stringify(r)}catch{}return}if(an(n))return void(e["sentry.browser.measure.detail"]=n);try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}(d,t),c<=u&&qa(e,c,u,{name:t.name,op:t.entryType,attributes:d})}(e,n,r,s,o,t.ignorePerformanceApiSpans);const i=ta(),a=n.startTime<i.firstHiddenTime;"first-paint"===n.name&&a&&(nc.fp={value:n.startTime,unit:"millisecond"}),"first-contentful-paint"===n.name&&a&&(nc.fcp={value:n.startTime,unit:"millisecond"});break}case"resource":!function(e,t,n,r,o,s,i){if("xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType)return;const a=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(i?.includes(a))return;const c={[fr]:"auto.resource.browser.metrics"},l=Ws(n);l.protocol&&(c["url.scheme"]=l.protocol.split(":").pop()),l.host&&(c["server.address"]=l.host),c["url.same_origin"]=n.includes(Wi.location.origin),function(e,t){[["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"]].forEach(([n,r])=>{const o=e[n];null!=o&&("number"==typeof o&&o<2147483647||"string"==typeof o)&&(t[r]=o)})}(t,c);const u={...c,...Xa(t)},d=s+r;qa(e,d,d+o,{name:n.replace(Wi.location.origin,""),op:a,attributes:u})}(e,n,n.name,r,s,o,t.ignoreResourceSpans)}}),tc=Math.max(s.length-1,0),function(e){const t=Wi.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),Va(n.rtt)&&(nc["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Va(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),Va(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}(e),"pageload"===i&&(function(e){const t=Zi(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}(nc),t.recordClsOnPageloadSpan||delete nc.cls,t.recordLcpOnPageloadSpan||delete nc.lcp,Object.entries(nc).forEach(([e,t])=>{!function(e,t,n,r=no()){const o=r&&to(r);o&&(_t&&Rt.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),o.addEvent(e,{[br]:t,[yr]:n}))}(e,t.value,t.unit)}),e.setAttribute("performance.timeOrigin",o),e.setAttribute("performance.activationStart",Gi()),function(e,t){Qa&&t.recordLcpOnPageloadSpan&&(Qa.element&&e.setAttribute("lcp.element",fn(Qa.element)),Qa.id&&e.setAttribute("lcp.id",Qa.id),Qa.url&&e.setAttribute("lcp.url",Qa.url.trim().slice(0,200)),null!=Qa.loadTime&&e.setAttribute("lcp.loadTime",Qa.loadTime),null!=Qa.renderTime&&e.setAttribute("lcp.renderTime",Qa.renderTime),e.setAttribute("lcp.size",Qa.size)),ec?.sources&&t.recordClsOnPageloadSpan&&ec.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,fn(t.node)))}(e,t)),Qa=void 0,ec=void 0,nc={}}(t,{recordClsOnPageloadSpan:!c,recordLcpOnPageloadSpan:!l,ignoreResourceSpans:_,ignorePerformanceApiSpans:S}),Gp(e,void 0);const n=ir(),r=n.getPropagationContext();n.setPropagationContext({...r,traceId:f.spanContext().traceId,sampled:Gr(f),dsc:go(t)}),s&&(R=void 0)},trimIdleSpanEndTimestamp:!T});function g(){n&&["interactive","complete"].includes(n.readyState)&&e.emit("idleSpanEnableAutoFinish",f)}s&&T&&(R=f),Gp(e,f),s&&!T&&n&&(n.addEventListener("readystatechange",()=>{g()}),g())}return{name:"BrowserTracing",setup(e){if(function(){function e(){const e=no(),t=e&&to(e);if(t){const e="internal_error";_t&&Rt.log(`[Tracing] Root span: ${e} -> Global error occurred`),t.setStatus({code:2,message:e})}}oo||(e.tag="sentry_tracingErrorCallback",oo=!0,Zt(e),Jt(e))}(),O=function({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=Ka();if(r&&qn()){r.mark&&Wi.performance.mark("sentry-tracing-init");const o=t?function(e){let t,n=0;if(!Ga("largest-contentful-paint"))return;const r=Aa(({metric:e})=>{const r=e.entries[e.entries.length-1];r&&(n=e.value,t=r)},!0);Ya(e,(e,o)=>{!function(e,t,n,r){qi&&Rt.log(`Sending LCP span (${e})`);const o=Za((qn()||0)+(t?.startTime||0)),s=ir().getScopeData().transactionName,i=t?fn(t.element):"Largest contentful paint",a={[fr]:"auto.http.browser.lcp",[mr]:"ui.webvital.lcp",[Sr]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(a["lcp.element"]=fn(t.element)),t.id&&(a["lcp.id"]=t.id),t.url&&(a["lcp.url"]=t.url),null!=t.loadTime&&(a["lcp.loadTime"]=t.loadTime),null!=t.renderTime&&(a["lcp.renderTime"]=t.renderTime),null!=t.size&&(a["lcp.size"]=t.size));const c=Wa({name:i,transaction:s,attributes:a,startTime:o});c&&(c.addEvent("lcp",{[yr]:"millisecond",[br]:e}),c.end(o))}(n,t,o,e),r()})}(n):Aa(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(nc.lcp={value:e.value,unit:"millisecond"},Qa=t)},!0),s=Fa("ttfb",({metric:e})=>{e.entries[e.entries.length-1]&&(nc.ttfb={value:e.value,unit:"millisecond"})},$a,Oa),i=e?function(e){let t,n=0;if(!Ga("layout-shift"))return;const r=Ra(({metric:e})=>{const r=e.entries[e.entries.length-1];r&&(n=e.value,t=r)},!0);Ya(e,(e,o)=>{!function(e,t,n,r){qi&&Rt.log(`Sending CLS span (${e})`);const o=t?Za((qn()||0)+t.startTime):Un(),s=ir().getScopeData().transactionName,i=t?fn(t.sources[0]?.node):"Layout shift",a={[fr]:"auto.http.browser.cls",[mr]:"ui.webvital.cls",[Sr]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((e,t)=>{a[`cls.source.${t+1}`]=fn(e.node)});const c=Wa({name:i,transaction:s,attributes:a,startTime:o});c&&(c.addEvent("cls",{[yr]:"",[br]:e}),c.end(o))}(n,t,o,e),r()})}(n):Ra(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(nc.cls={value:e.value,unit:""},ec=t)},!0);return()=>{o?.(),s(),i?.()}}return()=>{}}({recordClsStandaloneSpans:c||!1,recordLcpStandaloneSpans:l||!1,client:e}),r&&Ka()&&qn()&&Da(Mc),o&&Ka()&&qn()&&La("element",oc),i&&St.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?new PerformanceObserver(e=>{const t=no();if(t)for(const n of e.getEntries()){if(!n.scripts[0])continue;const e=Za(qn()+n.startTime),{start_timestamp:r,op:o}=Zr(t);if("navigation"===o&&r&&e<r)continue;const s=Za(n.duration),i={[fr]:"auto.ui.browser.metrics"},a=n.scripts[0],{invoker:c,invokerType:l,sourceURL:u,sourceFunctionName:d,sourceCharPosition:p}=a;i["browser.script.invoker"]=c,i["browser.script.invoker_type"]=l,u&&(i["code.filepath"]=u),d&&(i["code.function"]=d),-1!==p&&(i["browser.script.source_char_position"]=p),qa(t,e,e+s,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:i})}}).observe({type:"long-animation-frame",buffered:!0}):s&&La("longtask",({entries:e})=>{const t=no();if(!t)return;const{op:n,start_timestamp:r}=Zr(t);for(const o of e){const e=Za(qn()+o.startTime),s=Za(o.duration);"navigation"===n&&r&&e<r||qa(t,e,e+s,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[fr]:"auto.ui.browser.metrics"}})}}),a&&La("event",({entries:e})=>{const t=no();if(t)for(const n of e)if("click"===n.name){const e=Za(qn()+n.startTime),r=Za(n.duration),o={name:fn(n.target),op:`ui.interaction.${n.name}`,startTime:e,attributes:{[fr]:"auto.ui.browser.metrics"}},s=bn(n.target);s&&(o.attributes["ui.component_name"]=s),qa(t,e,e+r,o)}}),E&&n){const e=()=>{P=Un()};addEventListener("click",e,{capture:!0}),addEventListener("keydown",e,{capture:!0,passive:!0})}function t(){const t=Zp(e);t&&!Zr(t).timestamp&&(Pc&&Rt.log(`[Tracing] Finishing current active span with op: ${Zr(t).op}`),t.setAttribute(gr,"cancelled"),t.end())}e.on("startNavigationSpan",(n,r)=>{if(lr()!==e)return;if(r?.isRedirect)return Pc&&Rt.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),void A(e,{op:"navigation.redirect",...n},!1);P=void 0,t(),ar().setPropagationContext({traceId:Zn(),sampleRand:Math.random(),propagationSpanId:so()?void 0:Gn()});const o=ir();o.setPropagationContext({traceId:Zn(),sampleRand:Math.random(),propagationSpanId:so()?void 0:Gn()}),o.setSDKProcessingMetadata({normalizedRequest:void 0}),A(e,{op:"navigation",...n,parentSpan:null,forceTransaction:!0})}),e.on("startPageLoadSpan",(n,r={})=>{if(lr()!==e)return;t();const o=function(e,t){const n=function(e){if(!e)return;const t=e.match($r);if(!t)return;let n;return"1"===t[3]?n=!0:"0"===t[3]&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}(e),r=Or(t);if(!n?.traceId)return{traceId:Zn(),sampleRand:On()};const o=function(e,t){const n=zr(t?.sample_rand);if(void 0!==n)return n;const r=zr(t?.sample_rate);return r&&void 0!==e?.parentSampled?e.parentSampled?On()*r:r+On()*(1-r):On()}(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}}(r.sentryTrace||Wp("sentry-trace"),r.baggage||Wp("baggage")),s=ir();s.setPropagationContext(o),so()||(s.getPropagationContext().propagationSpanId=Gn()),s.setSDKProcessingMetadata({normalizedRequest:Ai()}),A(e,{op:"pageload",...n})}),e.on("endPageloadSpan",()=>{T&&R&&(R.setAttribute(gr,"reportPageLoaded"),R.end())})},afterAllSetup(e){let n=yn();if("off"!==C&&function(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r="session-storage"===t;let o=r?function(){try{const e=Mi.sessionStorage?.getItem(Fp);return JSON.parse(e)}catch{return}}():void 0;e.on("spanStart",e=>{if(to(e)!==e)return;const t=ir().getPropagationContext();o=function(e,t,n){const r=Zr(t),o={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:function(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[pr])}catch{return 0}}(),sampleRand:n.sampleRand};if(!e)return o;const s=e.spanContext;return s.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=3600&&(Pc&&Rt.log(`Adding previous_trace \`${JSON.stringify(s)}\` link to span \`${JSON.stringify({op:r.op,...t.spanContext()})}\``),t.addLink({context:s,attributes:{[wr]:"previous_trace"}}),t.setAttribute("sentry.previous_trace",`${s.traceId}-${s.spanId}-${Bp(s)?1:0}`)),o)}(o,e,t),r&&function(e){try{Mi.sessionStorage.setItem(Fp,JSON.stringify(e))}catch(e){Pc&&Rt.warn("Could not store previous trace in sessionStorage",e)}}(o)});let s=!0;n&&e.on("beforeSampling",e=>{if(!o)return;const t=ir(),n=t.getPropagationContext();s&&n.parentSpanId?s=!1:(t.setPropagationContext({...n,dsc:{...n.dsc,sample_rate:String(o.sampleRate),sampled:String(Bp(o.spanContext))},sampleRand:o.sampleRand}),e.parentSampled=Bp(o.spanContext),e.parentSampleRate=o.sampleRate,e.spanAttributes={...e.spanAttributes,[hr]:o.sampleRate})})}(e,{linkPreviousTrace:C,consistentTraceSampling:x}),Mi.location){if(w){const t=qn();Vp(e,{name:Mi.location.pathname,startTime:t?t/1e3:void 0,attributes:{[dr]:"url",[fr]:"auto.pageload.browser"}})}k&&pc(({to:t,from:r})=>{if(void 0===r&&-1!==n?.indexOf(t))return void(n=void 0);n=void 0;const o=Vs(t),s=Zp(e),i=s&&E&&function(e,t){const n=Zr(e),r=Bn();return!(r-n.start_timestamp>1.5||t&&r-t<=1.5)}(s,P);qp(e,{name:o?.pathname||Mi.location.pathname,attributes:{[dr]:"url",[fr]:"auto.navigation.browser"}},{url:t,isRedirect:i})})}m&&(Mi.document?Mi.document.addEventListener("visibilitychange",()=>{const e=no();if(!e)return;const t=to(e);if(Mi.document.hidden&&t){const e="cancelled",{op:n,status:r}=Zr(t);Pc&&Rt.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${n}`),r||t.setStatus({code:2,message:e}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):Pc&&Rt.warn("[Tracing] Could not set up background tab detection due to lack of global document")),a&&function(e,t,n,r,o){let s;Mi.document&&addEventListener("click",()=>{const i="ui.action.click",a=Zp(e);if(a){const e=Zr(a).op;if(["navigation","pageload"].includes(e))return void(Pc&&Rt.warn(`[Tracing] Did not create ${i} span because a pageload or navigation span is in progress.`))}s&&(s.setAttribute(gr,"interactionInterrupted"),s.end(),s=void 0),o.name?s=qo({name:o.name,op:i,attributes:{[dr]:o.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r}):Pc&&Rt.warn(`[Tracing] Did not create ${i} transaction because _latestRouteName is missing.`)},{capture:!0})}(e,d,p,h,t),r&&function(){const e=Object.keys(Ic);function t(e){const t=e.target;if(!t)return;const n=fn(t),r=Math.round(e.timeStamp);if(Tc.set(r,n),Tc.size>50){const e=Tc.keys().next().value;void 0!==e&&Tc.delete(e)}}Ii()&&e.forEach(e=>{Wi.addEventListener(e,t,{capture:!0,passive:!0})});const n=({entries:e})=>{const t=no(),n=t&&to(t);e.forEach(e=>{if(!function(e){return"duration"in e}(e))return;const t=e.interactionId;if(null==t)return;if(xc.has(t))return;const r=e.target?fn(e.target):function(e){const t=Math.round(e.startTime);let n=Tc.get(t);if(!n)for(let e=-5;e<=5;e++){const r=Tc.get(t+e);if(r){n=r;break}}return n||"<unknown>"}(e);if(Cc.length>10){const e=Cc.shift();xc.delete(e)}Cc.push(t),xc.set(t,{span:n,elementName:r})})};La("event",n),La("first-input",n)}(),function(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:o,shouldCreateSpanForRequest:s,enableHTTPTimings:i,tracePropagationTargets:a,onRequestSpanStart:c,onRequestSpanEnd:l}={...$p,...t},u="function"==typeof s?s:e=>!0,d=e=>function(e,t){const n=yn();if(n){let r,o;try{r=new URL(e,n),o=new URL(n).origin}catch{return!1}const s=r.origin===o;return t?Ln(r.toString(),t)||s&&Ln(r.pathname,t):s}{const n=!!e.match(/^\/(?!\/)/);return t?Ln(e,t):n}}(e,a),p={},h=e.getOptions().propagateTraceparent;n&&(e.addEventProcessor(e=>("transaction"===e.type&&e.spans&&e.spans.forEach(e=>{if("http.client"===e.op){const t=zp.get(e.span_id);t&&(e.timestamp=t/1e3,zp.delete(e.span_id))}}),e)),o&&function(){const e="fetch-body-resolved";Vt(e,e=>{if(e.response){const t=jp.get(e.response);t&&e.endTimestamp&&zp.set(t,e.endTimestamp)}}),qt(e,()=>ki(Ei))}(),wi(e=>{const t=function(e,t,n,r,o){if(!e.fetchData)return;const{method:s,url:i}=e.fetchData,a=so()&&t(i);if(e.endTimestamp&&a){const t=e.fetchData.__span;if(!t)return;const n=r[t];return void(n&&(function(e,t){if(t.response){kr(e,t.response.status);const n=t.response?.headers?.get("content-length");if(n){const t=parseInt(n);t>0&&e.setAttribute("http.response_content_length",t)}}else t.error&&e.setStatus({code:2,message:"internal_error"});e.end()}(n,e),function(e,t,n){const r="object"==typeof n&&null!==n?n.onRequestSpanEnd:void 0;r?.(e,{headers:t.response?.headers,error:t.error})}(n,e,o),delete r[t]))}const{spanOrigin:c="auto.http.browser",propagateTraceparent:l=!1}=o,u=!!no(),d=a&&u?jo(function(e,t,n){const r=Vs(e);return{name:r?`${t} ${qs(r)}`:t,attributes:bi(e,r,t,n)}}(i,s,c)):new yo;if(e.fetchData.__span=d.spanContext().spanId,r[d.spanContext().spanId]=d,n(e.fetchData.url)){const t=e.args[1]||{},n=function(e,t,n,r){const o=Ys({span:n,propagateTraceparent:r}),s=o["sentry-trace"],i=o.baggage,a=o.traceparent;if(!s)return;const c=t.headers||(hn(e)?e.headers:void 0);if(c){if(function(e){return"undefined"!=typeof Headers&&dn(e,Headers)}(c)){const e=new Headers(c);if(e.get("sentry-trace")||e.set("sentry-trace",s),r&&a&&!e.get("traceparent")&&e.set("traceparent",a),i){const t=e.get("baggage");t?yi(t)||e.set("baggage",`${t},${i}`):e.set("baggage",i)}return e}if(Array.isArray(c)){const e=[...c];c.find(e=>"sentry-trace"===e[0])||e.push(["sentry-trace",s]),r&&a&&!c.find(e=>"traceparent"===e[0])&&e.push(["traceparent",a]);const t=c.find(e=>"baggage"===e[0]&&yi(e[1]));return i&&!t&&e.push(["baggage",i]),e}{const e="sentry-trace"in c?c["sentry-trace"]:void 0,t="traceparent"in c?c.traceparent:void 0,n="baggage"in c?c.baggage:void 0,o=n?Array.isArray(n)?[...n]:[n]:[],l=n&&(Array.isArray(n)?n.find(e=>yi(e)):yi(n));i&&!l&&o.push(i);const u={...c,"sentry-trace":e??s,baggage:o.length>0?o.join(","):void 0};return r&&a&&!t&&(u.traceparent=a),u}}return{...o}}(e.args[0],t,so()&&u?d:void 0,l);n&&(e.args[1]=t,t.headers=n)}const p=lr();return p&&p.emit("beforeOutgoingRequestSpan",d,{input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp}),d}(e,u,d,p,{propagateTraceparent:h,onRequestSpanEnd:l});if(e.response&&e.fetchData.__span&&jp.set(e.response,e.fetchData.__span),t){const n=Lp(e.fetchData.url),r=n?Ws(n).host:void 0;t.setAttributes({"http.url":n,"server.address":r}),i&&Hp(t),c?.(t,{headers:e.headers})}})),r&&bc(e=>{const t=function(e,t,n,r,o,s){const i=e.xhr,a=i?.[yc];if(!i||i.__sentry_own_request__||!a)return;const{url:c,method:l}=a,u=so()&&t(c);if(e.endTimestamp&&u){const t=i.__sentry_xhr_span_id__;if(!t)return;const n=r[t];return void(n&&void 0!==a.status_code&&(kr(n,a.status_code),n.end(),s?.(n,{headers:Np(Ec(i)),error:e.error}),delete r[t]))}const d=Lp(c),p=Ws(d||c),h=c.split(/[?#]/,1)[0],m=!!no(),f=u&&m?jo({name:`${l} ${h}`,attributes:{url:c,type:"xhr","http.method":l,"http.url":d,"server.address":p?.host,[fr]:"auto.http.browser",[mr]:"http.client",...p?.search&&{"http.query":p?.search},...p?.hash&&{"http.fragment":p?.hash}}}):new yo;i.__sentry_xhr_span_id__=f.spanContext().spanId,r[i.__sentry_xhr_span_id__]=f,n(c)&&function(e,t,n){const{"sentry-trace":r,baggage:o,traceparent:s}=Ys({span:t,propagateTraceparent:n});r&&function(e,t,n,r){const o=e.__sentry_xhr_v3__?.request_headers;if(!o?.["sentry-trace"]&&e.setRequestHeader)try{if(e.setRequestHeader("sentry-trace",t),r&&!o?.traceparent&&e.setRequestHeader("traceparent",r),n){const t=o?.baggage;t&&t.split(",").some(e=>e.trim().startsWith("sentry-"))||e.setRequestHeader("baggage",n)}}catch{}}(e,r,o,s)}(i,so()&&m?f:void 0,o);const g=lr();return g&&g.emit("beforeOutgoingRequestSpan",f,e),f}(e,u,d,p,h,l);t&&(i&&Hp(t),c?.(t,{headers:Np(e.xhr.__sentry_xhr_v3__?.request_headers)}))})}(e,{traceFetch:f,traceXHR:g,trackFetchStreamPerformance:y,tracePropagationTargets:e.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:b,enableHTTPTimings:v,onRequestSpanStart:I,onRequestSpanEnd:M})}}})({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{useEffect:r,useLocation:o,useNavigationType:s,createRoutesFromChildren:i,matchRoutes:a,stripBasename:c,enableAsyncRouteHandlers:l=!1,instrumentPageLoad:u=!0,instrumentNavigation:d=!0,lazyRouteTimeout:p}=e;return{...n,setup(t){n.setup(t);const l=e.finalTimeout??3e4,u=3*(e.idleTimeout??1e3),d=p??u;Infinity===d?(Nh=l,dh&&Rt.log("[React Router] lazyRouteTimeout set to Infinity, capping at finalTimeout:",l,"ms to prevent indefinite hangs")):Number.isNaN(d)?(dh&&Rt.warn("[React Router] lazyRouteTimeout must be a number, falling back to default:",u),Nh=u):d<0?(dh&&Rt.warn("[React Router] lazyRouteTimeout must be non-negative or Infinity, got:",d,"falling back to:",u),Nh=u):Nh=d,fh=r,gh=o,yh=s,vh=a,bh=i,function(e,t=!1){mh=e,_h=t}(a,c||!1)},afterAllSetup(e){n.afterAllSetup(e);const r=Mi.location?.pathname;u&&r&&Vp(e,{name:r,attributes:{[dr]:"url",[mr]:"pageload",[fr]:`auto.pageload.react.reactrouter_v${t}`}}),d&&jh.add(e)}}}function Uh(e){e.forEach(e=>{Vh(e).forEach(e=>{$h.add(e)})})}function Vh(e,t=new Set){return t.has(e)||(t.add(e),e.children&&!e.index&&e.children.forEach(e=>{Vh(e,t).forEach(e=>{t.add(e)})})),t}function qh(e,t,n,r,o,s,i,a){try{const c=t.data?.[dr];if("route"===c&&n&&!Ch(n))return;const l=Array.from(a),u=l.length>0?l:o,d=vh(u,r,s);if(!d)return;const[p,h]=Dh(r,u,u,d,s),m=function(e,t,n,r,o=!1){return!!n&&(!(e||!o)||!(!e||!Ch(e)||"route"!==r||Ch(n))||"route"!==t&&"route"===r)}(n,c,p,h,!0);m&&("pageload"===i||!t.timestamp)&&(e.updateName(p),e.setAttribute(dr,h))}catch(e){dh&&Rt.warn(`Error updating span details before ending: ${e}`)}}function Wh(e,t,n,r,o,s){const i=`__sentry_${s}_end_patched__`,a=e?.[i];if(a||!e.end)return;const c=o?new Set(o):$h,l=e.end.bind(e);let u=!1;e.end=function(...o){if(u)return;u=!0;const i=o.length>0?o[0]:Date.now()/1e3,a=Zr(e),d=a.description,p=a.data?.[dr],h=()=>{const t=lr();if(t&&"navigation"===s){const n=zh.get(t);n&&n.span===e&&zh.delete(t)}},m=Hh.get(e);if(m&&m.size>0&&d&&(Ch(d)||"route"!==p)){if(0===Nh)return qh(e,a,d,t,n,r,s,c),h(),void l(i);const o=Promise.allSettled(m).then(()=>{}),u=Infinity===Nh?o:Promise.race([o,new Promise(e=>setTimeout(e,Nh))]);return void u.then(()=>{const o=Zr(e);qh(e,o,o.description,t,n,r,s,c),h(),l(i)}).catch(()=>{h(),l(i)})}qh(e,a,d,t,n,r,s,c),h(),l(i)},_n(e,i,!0)}const Kh={no_permission:"primary.main",expired:"error.main",not_purchased:"primary.main"},Zh={dialog:{".MuiPaper-root":{borderRadius:"6px"}},dialogContent:{padding:0},container:{display:"flex",flexDirection:"column",alignItems:"center",gap:3,padding:4,background:e=>e.palette.gradient.dark.main},stepper:{width:"100%"},disclaimer:{marginTop:2,color:"warning.main"},actions:{marginTop:2}},Gh={feature_access:{translationKey:"featureAccess",steps:["step1","step2","step3"],showDisclaimer:!0},trial_expired:{translationKey:"trialExpired",steps:["step1","step2","step3","step4"],showDisclaimer:!0},purchase:{translationKey:"purchase",steps:["step1","step2","step3","step4"],showDisclaimer:!0},wishlist:{translationKey:"wishlist",steps:["step1","step2","step3","step4"],showDisclaimer:!0},start_trial:{translationKey:"startTrial",steps:[],showDisclaimer:!1}},Yh=e=>{let{open:n,requestType:r,onSubmitRequest:o,onClose:i}=e;const{t:a}=t.useTranslation(),c=Gh[r]||Gh.feature_access,{translationKey:l,steps:u,showDisclaimer:d}=c;/*#__PURE__*/return q.default.createElement(s.Dialog,{open:n,onClose:i,sx:Zh.dialog},/*#__PURE__*/q.default.createElement(s.DialogTitle,null,a("access.modal."+l+".header")),/*#__PURE__*/q.default.createElement(s.DialogContent,{sx:Zh.dialogContent},/*#__PURE__*/q.default.createElement(s.Box,{sx:Zh.container},"start_trial"===r?/*#__PURE__*/q.default.createElement(s.Typography,{variant:"body1",sx:Zh.content},a("access.modal.startTrial.content")):0===u.length?null:/*#__PURE__*/q.default.createElement(s.Stepper,{orientation:"vertical",sx:Zh.stepper},u.map(e=>/*#__PURE__*/q.default.createElement(s.Step,{key:e,active:!0},/*#__PURE__*/q.default.createElement(s.StepLabel,null,a("access.modal."+l+"."+e))))),d&&/*#__PURE__*/q.default.createElement(s.Alert,{severity:"warning",variant:"outlined",sx:Zh.disclaimer},a("access.modal.disclaimer")),/*#__PURE__*/q.default.createElement(s.Stack,{direction:"row",spacing:2,sx:Zh.actions},/*#__PURE__*/q.default.createElement(s.Button,{variant:"contained",onClick:o},a("access.modal."+l+".button")),/*#__PURE__*/q.default.createElement(s.Button,{variant:"outlined",onClick:i},a("access.modal.cancel"))))))},Jh={dialog:{".MuiPaper-root":{borderRadius:"6px"}},dialogContent:{padding:0},container:{display:"flex",flexDirection:"column",alignItems:"center",gap:3,padding:4,background:e=>e.palette.gradient.dark.main},content:{marginTop:1,marginBottom:3,textAlign:"center"},actions:{display:"flex",justifyContent:"center"}},Xh=e=>{let{open:n,daysRemaining:r,onClose:o}=e;const{t:i}=t.useTranslation();/*#__PURE__*/return q.default.createElement(s.Dialog,{open:n,onClose:o,sx:Jh.dialog},/*#__PURE__*/q.default.createElement(s.DialogTitle,null,i("access.cooldown.header")),/*#__PURE__*/q.default.createElement(s.DialogContent,{sx:Jh.dialogContent},/*#__PURE__*/q.default.createElement(s.Box,{sx:Jh.container},/*#__PURE__*/q.default.createElement(s.Typography,{variant:"body1",sx:Jh.content},i("access.cooldown.message",{days:r})),/*#__PURE__*/q.default.createElement(s.Box,{sx:Jh.actions},/*#__PURE__*/q.default.createElement(s.Button,{variant:"contained",onClick:o},i("access.cooldown.button"))))))},Qh={no_permission:K.default,expired:W.default,not_purchased:Z.default},em=n=>{let{accessState:r,buttons:o=[],daysSinceExpiry:i,featureKey:a,workplaceId:c,cooldownInfo:l={},onTrialRequest:u,onFeatureRequest:d}=n;const{t:p}=t.useTranslation(),[h,m]=e.useState(!1),[f,g]=e.useState(!1),[y,b]=e.useState(0),[v,_]=e.useState(null),S=(e=>{const t=Kh[e]||"primary.main";return{container:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:3,width:"100%",height:"100%",padding:4,textAlign:"center",background:e=>e.palette.gradient.dark.main},icon:{fontSize:48,color:t},buttonsContainer:{display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"center",gap:2},primaryButton:{backgroundColor:t},secondaryButton:{},linkButton:{cursor:"pointer",color:"primary.light"}}})(r),w=Qh[r]||K.default,k=e=>{var t;if(e.requestType&&null!=(t=l[e.requestType])&&t.isInCooldown)return b(l[e.requestType].daysRemaining),void g(!0);_(e),m(!0)},E=e=>{const t="access.toast."+e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase());vt.success(p(t))};/*#__PURE__*/return q.default.createElement(q.default.Fragment,null,/*#__PURE__*/q.default.createElement(s.Box,{sx:S.container},/*#__PURE__*/q.default.createElement(s.Tooltip,{title:(()=>{switch(r){case"no_permission":return p("access.noPermission.tooltip");case"expired":return p("access.expired.tooltip");case"not_purchased":return p("access.notPurchased.tooltip");default:return""}})()},/*#__PURE__*/q.default.createElement(w,{sx:S.icon})),/*#__PURE__*/q.default.createElement(s.Typography,{variant:"body1"},(()=>{switch(r){case"no_permission":return p("access.noPermission.message");case"expired":return null!=i&&i<90?p("access.expired.message",{days:i}):p(null!=i&&i>=180?"access.expired.messageVeryOld":"access.expired.messageOld");case"not_purchased":return p("access.notPurchased.message");default:return""}})()),0===o.length?null:/*#__PURE__*/q.default.createElement(s.Box,{sx:S.buttonsContainer},o.map(e=>{const t=(e=>{switch(e){case"start_trial":return p("access.notPurchased.button.try");case"request_access":return p("access.noPermission.button.requestAccess");case"renew":return p("access.expired.button.renewSubscription");case"buy":return p("access.notPurchased.button.buy");case"wishlist":return p("access.notPurchased.button.wishlist");default:return""}})(e.action);if("link"===e.variant)/*#__PURE__*/return q.default.createElement(s.Link,{key:e.action,component:"button",variant:"body2",sx:S.linkButton,onClick:()=>k(e)},t);const n="primary"===e.variant;/*#__PURE__*/return q.default.createElement(s.Button,{key:e.action,variant:n?"contained":"outlined",sx:n?S.primaryButton:S.secondaryButton,onClick:()=>k(e)},t)}))),/*#__PURE__*/q.default.createElement(Yh,{open:h,requestType:"start_trial"===(null==v?void 0:v.action)?"start_trial":null==v?void 0:v.requestType,onSubmitRequest:function(){try{function e(){_(null)}m(!1);let t=!1;const n=function(){if("start_trial"===(null==v?void 0:v.action))return Promise.resolve(u(a)).then(function(e){t=e,t&&E("start_trial")});{const e=function(){if(null!=v&&v.requestType)return Promise.resolve(d({featureKey:a,requestType:v.requestType,workplaceId:c})).then(function(e){t=e,t&&E(v.requestType)})}();if(e&&e.then)return e.then(function(){})}}();return Promise.resolve(n&&n.then?n.then(e):e())}catch(r){return Promise.reject(r)}},onClose:()=>{m(!1),_(null)}}),/*#__PURE__*/q.default.createElement(Xh,{open:f,daysRemaining:y,onClose:()=>{g(!1)}}))};var tm=new class{constructor(){this.currentUser=null,this.permissionsMap=null,this.featuresMap=null,this.featuresRequestsMap=null,i.makeObservable(this,{currentUser:i.observable.deep,permissionsMap:i.observable.deep,featuresMap:i.observable.deep,featuresRequestsMap:i.observable.deep,setCurrentUser:i.action,removeCurrentUser:i.action,setPermissionsMap:i.action,setFeaturesMap:i.action,setFeaturesRequestsMap:i.action,getCurrentUserJS:i.computed})}setCurrentUser(e){this.currentUser=e,e&&(this.setPermissionsMap(e.permissionsMap),this.setFeaturesMap(e.featuresMap),this.setFeaturesRequestsMap(e.featuresRequestsMap))}removeCurrentUser(){this.currentUser=null,this.permissionsMap=null,this.featuresMap=null,this.featuresRequestsMap=null}setPermissionsMap(e){this.permissionsMap=e}setFeaturesMap(e){this.featuresMap=e}setFeaturesRequestsMap(e){this.featuresRequestsMap=e}get getCurrentUserJS(){return i.toJS(this.currentUser)}};const nm=e=>e?{lastRequestedAt:e.last_requested_at,daysRemaining:e.days_remaining}:null,rm=e=>{if(!e)return null;const t={};for(const[n,r]of Object.entries(e)){t[n]={};for(const[e,o]of Object.entries(r)){t[n][e]={};for(const[r,s]of Object.entries(o))t[n][e][r]=nm(s)}}return t},om=(e,t,n,r)=>{var o;if(!e||!t||!n)return{isInCooldown:!1,daysRemaining:0};const s=null==(o=e[r||"company"])||null==(o=o[t])?void 0:o[n];return s?{isInCooldown:s.daysRemaining>0,daysRemaining:s.daysRemaining}:{isInCooldown:!1,daysRemaining:0}},sm=()=>{const[t,n]=e.useState(i.toJS(tm.featuresMap));e.useEffect(()=>i.reaction(()=>i.toJS(tm.featuresMap),e=>{n(e)}),[]);const r=e.useCallback(e=>t&&t[e]||null,[t]),o=e.useCallback(e=>e.reduce((e,t)=>(e[t]=r(t),e),{}),[r]);return e.useMemo(()=>({getFeature:r,getFeatures:o,featuresMap:t}),[r,o,t])},im=()=>{const[t,n]=e.useState(i.toJS(tm.permissionsMap));e.useEffect(()=>i.reaction(()=>i.toJS(tm.permissionsMap),e=>{n(e)}),[]);const r=e.useCallback(e=>{return t?(n=t[e])&&"ALLOW"!==n?{isAllowed:!1,denyReason:n.startsWith("DENY:")?n.slice(5):n}:{isAllowed:!0,denyReason:null}:{isAllowed:!1,denyReason:null};var n},[t]),o=e.useCallback(e=>{const t=e.reduce((e,t)=>(e[t]=r(t),e),{}),n=e.filter(e=>!t[e].isAllowed);return{allAllowed:0===n.length,results:t,deniedKeys:n}},[r]);return e.useMemo(()=>({checkPermission:r,checkPermissions:o,permissionsMap:t}),[r,o,t])},am={no_permission:1,expired:2,not_purchased:3,accessible:4},cm=(e,t)=>{switch(e){case"accessible":return[];case"no_permission":return[{action:"request_access",requestType:"feature_access",variant:"primary"}];case"trial_expired_recent":return[{action:"renew",requestType:"trial_expired",variant:"primary"},{action:"wishlist",requestType:"wishlist",variant:"link"}];case"trial_expired_old":return t>=180?[{action:"start_trial",requestType:null,variant:"primary"},{action:"buy",requestType:"purchase",variant:"secondary"},{action:"wishlist",requestType:"wishlist",variant:"link"}]:[{action:"renew",requestType:"trial_expired",variant:"primary"},{action:"wishlist",requestType:"wishlist",variant:"link"}];default:return[{action:"start_trial",requestType:null,variant:"primary"},{action:"buy",requestType:"purchase",variant:"secondary"},{action:"wishlist",requestType:"wishlist",variant:"link"}]}},lm=function(t,n){void 0===t&&(t=[]),void 0===n&&(n={});const{extraPermissions:r=[],workplaceId:o}=n,{getFeature:s}=sm(),{checkPermissions:a}=im(),[c,l]=e.useState(i.toJS(tm.featuresRequestsMap));return e.useEffect(()=>i.reaction(()=>i.toJS(tm.featuresRequestsMap),e=>{l(e)}),[]),e.useMemo(()=>{const e=t.map(e=>{const t=s(e);if(!t)return{featureKey:e,hasAccess:!1,accessState:"not_purchased",daysSinceExpiry:null,buttons:cm("not_purchased",null)};const n=(e=>{switch(e){case"accessible":return"accessible";case"no_permission":return"no_permission";case"trial_expired_recent":case"trial_expired_old":return"expired";default:return"not_purchased"}})(t.status);return{featureKey:e,hasAccess:"accessible"===n,accessState:n,daysSinceExpiry:t.daysSinceExpiry,buttons:cm(t.status,t.daysSinceExpiry)}}),n=e.reduce((e,t)=>am[t.accessState]<am[e]?t.accessState:e,"accessible"),i=a(r),l=t.flatMap(e=>{const t=s(e);return(null==t?void 0:t.permissions)||[]}),u=a([...l,...r]),d="accessible"===n&&i.allAllowed,p=e.reduce((e,t)=>am[t.accessState]<am[(null==e?void 0:e.accessState)||"accessible"]?t:e,e[0]),h=(null==p?void 0:p.buttons)||[],m=((e,t,n,r)=>{const o={};for(const s of n)s.requestType&&(o[s.requestType]=om(e,t,s.requestType,r));return o})(c,null==p?void 0:p.featureKey,h,o);return{hasAccess:d,accessState:d?"accessible":n,features:e,buttons:h,cooldownInfo:m,missingPermissions:u.deniedKeys}},[t,r,o,s,a,c])};function um(){return um=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},um.apply(null,arguments)}const dm=["onTrialRequest","onFeatureRequest"];var pm,hm=(pm=/*#__PURE__*/Object.defineProperty({default:function(e){console.warn("[react-gtm]",e)}},"__esModule",{value:!0}))&&pm.__esModule?pm:{default:pm},mm=function(e){return e&&e.__esModule?e:{default:e}}({tags:function(e){var t=e.id,n=e.events,r=e.dataLayer,o=e.dataLayerName,s=">m_auth="+e.auth,i=">m_preview="+e.preview;return t||(0,hm.default)("GTM Id is required"),{iframe:'\n <iframe src="https://www.googletagmanager.com/ns.html?id='+t+s+i+'>m_cookies_win=x"\n height="0" width="0" style="display:none;visibility:hidden" id="tag-manager"></iframe>',script:"\n (function(w,d,s,l,i){w[l]=w[l]||[];\n w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js', "+JSON.stringify(n).slice(1,-1)+"});\n var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';\n j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl+'"+s+i+">m_cookies_win=x';\n f.parentNode.insertBefore(j,f);\n })(window,document,'script','"+o+"','"+t+"');",dataLayerVar:this.dataLayer(r,o)}},dataLayer:function(e,t){return"\n window."+t+" = window."+t+" || [];\n window."+t+".push("+JSON.stringify(e)+")"}}),fm=function(e){return e&&e.__esModule?e:{default:e}}({dataScript:function(e){var t=document.createElement("script");return t.innerHTML=e,t},gtm:function(e){var t=mm.default.tags(e);return{noScript:function(){var e=document.createElement("noscript");return e.innerHTML=t.iframe,e},script:function(){var e=document.createElement("script");return e.innerHTML=t.script,e},dataScript:this.dataScript(t.dataLayerVar)}},initialize:function(e){var t=e.events,n=e.dataLayer,r=e.dataLayerName,o=e.auth,s=e.preview,i=this.gtm({id:e.gtmId,events:void 0===t?{}:t,dataLayer:n||void 0,dataLayerName:void 0===r?"dataLayer":r,auth:void 0===o?"":o,preview:void 0===s?"":s});n&&document.head.appendChild(i.dataScript),document.head.insertBefore(i.script(),document.head.childNodes[0]),document.body.insertBefore(i.noScript(),document.body.childNodes[0])},dataLayer:function(e){var t=e.dataLayer,n=e.dataLayerName,r=void 0===n?"dataLayer":n;if(window[r])return window[r].push(t);var o=mm.default.dataLayer(t,r),s=this.dataScript(o);document.head.insertBefore(s,document.head.childNodes[0])}}),gm=fm.default;const{slice:ym,forEach:bm}=[],vm=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,_m={create(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+60*n*1e3)),r&&(o.domain=r),document.cookie=function(e,t){const n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"};let r=`${e}=${encodeURIComponent(t)}`;if(n.maxAge>0){const e=n.maxAge-0;if(Number.isNaN(e))throw new Error("maxAge should be a Number");r+=`; Max-Age=${Math.floor(e)}`}if(n.domain){if(!vm.test(n.domain))throw new TypeError("option domain is invalid");r+=`; Domain=${n.domain}`}if(n.path){if(!vm.test(n.path))throw new TypeError("option path is invalid");r+=`; Path=${n.path}`}if(n.expires){if("function"!=typeof n.expires.toUTCString)throw new TypeError("option expires is invalid");r+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(r+="; HttpOnly"),n.secure&&(r+="; Secure"),n.sameSite)switch("string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:r+="; SameSite=Strict";break;case"lax":r+="; SameSite=Lax";break;case"strict":r+="; SameSite=Strict";break;case"none":r+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(r+="; Partitioned"),r}(e,t,o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let e=0;e<n.length;e++){let r=n[e];for(;" "===r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf(t))return r.substring(t.length,r.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var Sm={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&"undefined"!=typeof document)return _m.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:s}=t;n&&"undefined"!=typeof document&&_m.create(n,e,r,o,s)}},wm={name:"querystring",lookup(e){let t,{lookupQuerystring:n}=e;if("undefined"!=typeof window){let{search:e}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(e=window.location.hash.substring(window.location.hash.indexOf("?")));const r=e.substring(1).split("&");for(let e=0;e<r.length;e++){const o=r[e].indexOf("=");o>0&&r[e].substring(0,o)===n&&(t=r[e].substring(o+1))}}return t}},km={name:"hash",lookup(e){let t,{lookupHash:n,lookupFromHashIndex:r}=e;if("undefined"!=typeof window){const{hash:e}=window.location;if(e&&e.length>2){const o=e.substring(1);if(n){const e=o.split("&");for(let r=0;r<e.length;r++){const o=e[r].indexOf("=");o>0&&e[r].substring(0,o)===n&&(t=e[r].substring(o+1))}}if(t)return t;if(!t&&r>-1){const t=e.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(t))return;const n="number"==typeof r?r:0;return t[n]?.replace("/","")}}}return t}};let Em=null;const Cm=()=>{if(null!==Em)return Em;try{if(Em="undefined"!=typeof window&&null!==window.localStorage,!Em)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){Em=!1}return Em};var xm={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&Cm())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&Cm()&&window.localStorage.setItem(n,e)}};let Tm=null;const Im=()=>{if(null!==Tm)return Tm;try{if(Tm="undefined"!=typeof window&&null!==window.sessionStorage,!Tm)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){Tm=!1}return Tm};var Mm={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Im())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Im()&&window.sessionStorage.setItem(n,e)}},Om={name:"navigator",lookup(e){const t=[];if("undefined"!=typeof navigator){const{languages:e,userLanguage:n,language:r}=navigator;if(e)for(let n=0;n<e.length;n++)t.push(e[n]);n&&t.push(n),r&&t.push(r)}return t.length>0?t:void 0}},Pm={name:"htmlTag",lookup(e){let t,{htmlTag:n}=e;const r=n||("undefined"!=typeof document?document.documentElement:null);return r&&"function"==typeof r.getAttribute&&(t=r.getAttribute("lang")),t}},Rm={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if("undefined"==typeof window)return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(n))return;const r="number"==typeof t?t:0;return n[r]?.replace("/","")}},Am={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n="number"==typeof t?t+1:1,r="undefined"!=typeof window&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let Dm=!1;try{document,Dm=!0}catch(Ye){}const Lm=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Dm||Lm.splice(1,1);class Nm{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},this.options=function(e){return bm.call(ym.call(arguments,1),t=>{if(t)for(const n in t)void 0===e[n]&&(e[n]=t[n])}),e}(e,this.options||{},{order:Lm,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=e=>e.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=t,this.addDetector(Sm),this.addDetector(wm),this.addDetector(xm),this.addDetector(Mm),this.addDetector(Om),this.addDetector(Pm),this.addDetector(Rm),this.addDetector(Am),this.addDetector(km)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=[];return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order).forEach(t=>{if(this.detectors[t]){let n=this.detectors[t].lookup(this.options);n&&"string"==typeof n&&(n=[n]),n&&(e=e.concat(n))}}),e=e.filter(e=>{return null!=e&&!("string"==typeof(t=e)&&[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(e=>e.test(t)));var t}).map(e=>this.options.convertDetectedLanguage(e)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?e:e.length>0?e[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)}))}}function jm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}Nm.type="languageDetector",X.default.use(Nm).use(t.initReactI18next).init({detection:{convertDetectedLanguage:e=>e.split("-")[0]},resources:{en:{translation:{release:"Release",forbiddenErrorMessage:"You are not authorized to perform this operation",somethingWentWrongMessage:"Oops... something went wrong",changeLanguageText:"Change language to Polish",headerLoginButton:"Sign in",headerLogoutButton:"Sign out",loginCardTitle:"Sign in",loginFormText:"Fill both fields in order to log in to the system",loginCardCancelButton:"Cancel",loginCardSubmitButton:"Sign in",loginCardUsernameHint:"Username",loginCardPasswordHint:"Password",networkErrorHeader:"Connection issue detected",networkErrorButtonText:"Reload the page",newVersionAvailable:"New version available, the application will refresh in few seconds...",access:{noPermission:{message:"This feature is available for your company, but you don't have permissions to use it",tooltip:"No permissions",button:{requestAccess:"Request access"}},expired:{message:"Access to this feature expired {{days}} days ago, you can request renewal",messageOld:"Access to this feature has expired, you can request renewal",messageVeryOld:"Access to this feature has expired, if you need it, you can request a purchase or start a trial",tooltip:"Subscription expired",button:{renewSubscription:"Renew subscription",buy:"Buy",wishlist:"Add to wishlist"}},notPurchased:{message:"This feature has not been purchased by your company, you can request a purchase or start a trial",tooltip:"Feature not purchased",button:{try:"Try",buy:"Buy",wishlist:"Add to wishlist"}},modal:{featureAccess:{header:"Request access",step1:"Report access need - click the button below to submit your request",step2:"Manager will review - your request will be sent to your supervisor for evaluation",step3:"Permissions granted - your supervisor or administrator will assign you appropriate permissions",button:"Submit request"},trialExpired:{header:"Renew subscription",step1:"Report renewal need - click the button below to submit your request",step2:"Manager will review - your request will be sent to your supervisor for business evaluation",step3:"Request goes to AndonCloud - after manager approval, AndonCloud team will check renewal options",step4:"Feature activation - AndonCloud will renew the subscription for your organization",button:"Submit request"},purchase:{header:"Purchase feature",step1:"Report purchase need - click the button below to submit your request",step2:"Manager will review - your request will be sent to your supervisor for business evaluation",step3:"Request goes to AndonCloud - after manager approval, AndonCloud team will check activation options",step4:"Feature activation - AndonCloud will enable the feature for your organization",button:"Submit request"},startTrial:{header:"Start trial period",content:"By clicking the button below, we will start a 30-day trial period for your entire organization. During this time, all users will have full access to this feature.",button:"Start trial"},wishlist:{header:"Add to wishlist",step1:"Report need - click the button below to submit your request",step2:"Manager will review - your request will be sent to your supervisor for business evaluation",step3:"Request goes to AndonCloud - after manager approval, AndonCloud team will check activation options",step4:"Feature activation - AndonCloud will enable the feature for your organization",button:"Submit request"},disclaimer:"This is a request, not an immediate purchase. Your supervisor will assess the business justification and make a decision.",cancel:"Cancel"},cooldown:{header:"Request already sent",message:"Your request has already been sent and is awaiting review. You can send another request in {{days}} days.",button:"I understand"},toast:{featureAccess:"Your access request has been sent to your supervisor.",trialExpired:"Thank you for your request. Your subscription renewal request has been sent to your supervisor.",purchase:"Thank you for your request. Your purchase request has been sent to your supervisor.",wishlist:"Thank you for your request. Your request has been sent to your supervisor.",startTrial:"Thank you for starting the trial period. For the next 30 days, you can use all features for free. We will inform you about available options when it ends."}}}},pl:{translation:{release:"Wydanie",forbiddenErrorMessage:"Nie masz uprawnień do wykonania tej operacji",somethingWentWrongMessage:"Ups... coś poszło nie tak",changeLanguageText:"Zmiana języka na Angielski",headerLoginButton:"Zaloguj się",headerLogoutButton:"Wyloguj",loginCardTitle:"Logowanie",loginFormText:"Wypełnij oba pola w celu zalogowania do systemu",loginCardCancelButton:"Anuluj",loginCardSubmitButton:"Zaloguj",loginCardUsernameHint:"Użytkownik",loginCardPasswordHint:"Hasło",networkErrorHeader:"Błąd połączenia",networkErrorButtonText:"Odśwież stronę",newVersionAvailable:"Dostępna jest nowa wersja, za kilka sekund nastąpi odświeżenie aplikacji...",access:{noPermission:{message:"Ta funkcja jest dostępna dla Twojej firmy, niestety nie masz uprawnień aby z niej korzystać",tooltip:"Brak uprawnień",button:{requestAccess:"Poproś o przyznanie uprawnień"}},expired:{message:"Dostęp do tej funkcji wygasł {{days}} dni temu, możesz poprosić o odnowienie",messageOld:"Dostęp do tej funkcji wygasł, możesz poprosić o odnowienie",messageVeryOld:"Dostęp do tej funkcji wygasł, jeśli jej potrzebujesz, możesz poprosić o zakup lub uruchomić okres próbny",tooltip:"Subskrypcja wygasła",button:{renewSubscription:"Subskrybuj ponownie",buy:"Kup",wishlist:"Dodaj do listy życzeń"}},notPurchased:{message:"Ta funkcja nie została wykupiona w Twojej firmie, możesz poprosić o zakup lub uruchomić okres próbny",tooltip:"Funkcja nie została wykupiona",button:{try:"Wypróbuj",buy:"Kup",wishlist:"Dodaj do listy życzeń"}},modal:{featureAccess:{header:"Poproś o dostęp",step1:"Zgłoś potrzebę dostępu - kliknij przycisk poniżej, aby zgłosić potrzebę",step2:"Manager to sprawdzi - zgłoszenie trafi do przełożonego, który oceni zasadność",step3:"Przyznanie uprawnień - przełożony lub administrator przydzieli Ci odpowiednie uprawnienia",button:"Zgłoś potrzebę"},trialExpired:{header:"Odnów subskrypcję",step1:"Zgłoś potrzebę odnowienia - kliknij przycisk poniżej, aby zgłosić potrzebę",step2:"Manager to sprawdzi - zgłoszenie trafi do przełożonego, który oceni zasadność biznesową",step3:"Zgłoszenie trafia do AndonCloud - po potwierdzeniu przez managera, zespół AndonCloud sprawdzi możliwość odnowienia",step4:"Uruchomienie funkcji - AndonCloud odnowi subskrypcję dla Twojej organizacji",button:"Zgłoś potrzebę"},purchase:{header:"Zakup funkcji",step1:"Zgłoś potrzebę zakupu - kliknij przycisk poniżej, aby zgłosić potrzebę",step2:"Manager to sprawdzi - zgłoszenie trafi do przełożonego, który oceni zasadność biznesową",step3:"Zgłoszenie trafia do AndonCloud - po potwierdzeniu przez managera, zespół AndonCloud sprawdzi możliwość uruchomienia",step4:"Uruchomienie funkcji - AndonCloud włączy funkcję dla Twojej organizacji",button:"Zgłoś potrzebę"},startTrial:{header:"Rozpocznij okres próbny",content:"Po kliknięciu przycisku poniżej uruchomimy 30-dniowy okres próbny dla całej Twojej organizacji. Przez ten czas wszyscy użytkownicy będą mieli pełny dostęp do tej funkcji.",button:"Rozpocznij okres próbny"},wishlist:{header:"Dodaj do listy życzeń",step1:"Zgłoś potrzebę - kliknij przycisk poniżej, aby zgłosić potrzebę",step2:"Manager to sprawdzi - zgłoszenie trafi do przełożonego, który oceni zasadność biznesową",step3:"Zgłoszenie trafia do AndonCloud - po potwierdzeniu przez managera, zespół AndonCloud sprawdzi możliwość uruchomienia",step4:"Uruchomienie funkcji - AndonCloud włączy funkcję dla Twojej organizacji",button:"Zgłoś potrzebę"},disclaimer:"To jest zgłoszenie potrzeby, nie natychmiastowy zakup. Twój przełożony oceni zasadność biznesową i podejmie decyzję.",cancel:"Anuluj"},cooldown:{header:"Prośba została już wysłana",message:"Twoja prośba została już wysłana i czeka na rozpatrzenie. Kolejną prośbę będziesz mógł wysłać za {{days}} dni.",button:"Rozumiem"},toast:{featureAccess:"Prośba o dostęp została przekazana do przełożonego.",trialExpired:"Dziękujemy za zgłoszenie. Twoja prośba o odnowienie subskrypcji została przekazana do przełożonego.",purchase:"Dziękujemy za zgłoszenie. Twoja prośba o zakup została przekazana do przełożonego.",wishlist:"Dziękujemy za zgłoszenie. Twoja prośba została przekazana do przełożonego.",startTrial:"Dziękujemy za uruchomienie okresu próbnego. Przez kolejne 30 dni możesz korzystać ze wszystkich funkcji bezpłatnie. Po jego zakończeniu poinformujemy Cię o dostępnych opcjach."}}}}},interpolation:{escapeValue:!1},react:{bindI18nStore:"added"},returnNull:!1});var zm=function e(t,n){function r(e,r,o){if("undefined"!=typeof document){"number"==typeof(o=jm({},n,o)).expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var i in o)o[i]&&(s+="; "+i,!0!==o[i]&&(s+="="+o[i].split(";")[0]));return document.cookie=e+"="+t.write(r,e)+s}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},o=0;o<n.length;o++){var s=n[o].split("="),i=s.slice(1).join("=");try{var a=decodeURIComponent(s[0]);if(r[a]=t.read(i,a),e===a)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){r(e,"",jm({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,jm({},this.attributes,t))},withConverter:function(t){return e(jm({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});class $m{static recognizeRootDomain(){if(!this.rootDomain){const e=window.location.hostname;if(0===window.location.port.length){let t,n;[t,...n]=e.split("."),this.subdomain=t,this.rootDomain=n.join(".")}else this.rootDomain=e}return this.rootDomain}static get(e){const t=this.recognizeRootDomain();return zm.get(e,{domain:t})}static set(e,t){const n=this.recognizeRootDomain();return zm.set(e,t,{domain:n})}static remove(e){const t=this.recognizeRootDomain();return zm.remove(e,{domain:t})}}const Hm=function(e,t){void 0===t&&(t={});try{function n(){const n=Um.requestHeaders();return null!==n&&(t.headers=Object.assign({},n,t.headers)),Promise.resolve(fetch(e,t).catch(e=>{ss(e),Um.setNetworkError({title:X.default.t("somethingWentWrongMessage"),details:e.message})})).then(function(e){const t=function(){if(e){const t=function(){if(401!==e.status)return Promise.resolve(e.clone().text()).then(function(t){switch(e.status){case 403:vt.error(X.default.t("forbiddenErrorMessage"));break;case 500:vt.error(/*#__PURE__*/q.default.createElement(q.default.Fragment,null,/*#__PURE__*/q.default.createElement(s.Typography,{mr:t?2:0},X.default.t("somethingWentWrongMessage}")),t&&/*#__PURE__*/q.default.createElement(s.Tooltip,{title:t,arrow:!0},/*#__PURE__*/q.default.createElement(Q.default,null))))}});Um.removeSession(),Um.removeCurrentUser(),Um.setNotAuthorizedLoginStatus()}();if(t&&t.then)return t.then(function(){})}}();return t&&t.then?t.then(function(){return e}):e})}const r=function(){if(Um.isLoggedIn()&&!t.refresh){const{createdAt:e,expiresIn:t}=Um.session,n=function(){if(e+t-5<Math.round(+new Date/1e3)){const e=Um.refreshTokenPromise?Promise.resolve(Um.refreshTokenPromise).then(function(){}):Promise.resolve(Um.refresh()).then(function(){});if(e&&e.then)return e.then(function(){})}}();if(n&&n.then)return n.then(function(){})}}();return Promise.resolve(r&&r.then?r.then(n):n())}catch(o){return Promise.reject(o)}};class Fm{constructor(){this.user={},this.accessToken=null,this.refreshToken=null,this.tokenType=null,this.createdAt=null,this.expiresIn=null}}class Bm{setAuthConfig(e){let{baseUrl:t,clientId:n,redirectUri:r}=e;this.baseUrl=t,this.clientId=n,this.redirectUri=r}authorize(e){try{const t=this,n=new FormData,{scope:r,refresh:o,code:s,username:i,password:a}=e;let c;return n.append("client_id",t.clientId),r&&n.append("scope",r),o?(n.append("grant_type","refresh_token"),n.append("refresh_token",o),n.append("redirect_uri",t.redirectUri)):s?(n.append("grant_type","authorization_code"),n.append("code",s),n.append("redirect_uri",t.redirectUri)):(n.append("grant_type","password"),n.append("username",i),n.append("password",a)),Promise.resolve(Hm(t.baseUrl+"/v2/oauth2/token",{method:"POST",body:n,refresh:!!o}).then(function(e){try{let n,r;return Promise.resolve(function(){if(e){function s(e){if(n)return e;function s(){c.accessToken=r.access_token,c.refreshToken=r.refresh_token,c.tokenType=r.token_type,c.createdAt=r.created_at,c.expiresIn=r.expires_in}c=new Fm;const i=function(){if(!o)return Promise.resolve(t.getUserData(r)).then(function(e){c.user=e})}();return i&&i.then?i.then(s):s()}const i=function(t,o){try{var s=Promise.resolve(e.json()).then(function(t){r=t,e.ok&&200===e.status||(vt.error(r.error_description),n=1)})}catch(e){return o()}return s&&s.then?s.then(void 0,o):s}(0,function(){vt.error(X.default.t("somethingWentWrongMessage")),n=1});return i&&i.then?i.then(s):s(i)}}())}catch(e){return Promise.reject(e)}}).catch(e=>{vt.error(e.message)})).then(function(){return c})}catch(e){return Promise.reject(e)}}getUserData(e){try{const t=this,n={method:"GET"};if(e){const{token_type:t,access_token:r}=e;n.headers={Authorization:t+" "+r}}return Promise.resolve(Hm(t.baseUrl+"/v2/me",n)).then(function(e){let t;const n=function(){if(null!=e&&e.ok)return Promise.resolve(e.json()).then(function(e){let{user:n}=e;const r={id:n.id,companyId:n.company_id,roleId:n.role_id,username:n.username,email:n.email,name:n.name,permissionsMap:n.permissions_map||null,featuresMap:(o=n.features_map,o?Object.fromEntries(Object.entries(o).map(e=>{let[t,n]=e;return[t,(r=n,r?{status:r.status,entitlementType:r.entitlement_type,expiresAt:r.expires_at,daysSinceExpiry:r.days_since_expiry,permissions:r.permissions||[]}:null)];var r})):null),featuresRequestsMap:rm(n.features_requests_map)};var o;return t=1,r})}();return n&&n.then?n.then(function(e){return t?e:null}):t?n:null})}catch(e){return Promise.reject(e)}}signOut(e){try{const t=this,n=new FormData;return n.append("client_id",t.clientId),n.append("token",e),Promise.resolve(Hm(t.baseUrl+"/v2/oauth2/revoke",{method:"POST",body:n})).then(function(){})}catch(e){return Promise.reject(e)}}}const Um=new class{constructor(){this.loading=!1,this.loginStatus={status:"unknown"},this.refreshTokenPromise=null,this.api=new Bm,this.networkError=null,i.makeObservable(this,{loading:i.observable,setLoading:i.action,loginStatus:i.observable.deep,setConnectedLoginStatus:i.action,setNotAuthorizedLoginStatus:i.action})}setLoading(e){this.loading=e}setConnectedLoginStatus(){this.loginStatus={status:"connected",authResponse:{user:this.session.user,accessToken:this.session.accessToken,refreshToken:this.session.refreshToken,tokenType:this.session.tokenType,createdAt:this.session.createdAt,expiresIn:this.session.expiresIn}}}setNotAuthorizedLoginStatus(){this.loginStatus={status:"not_authorized"}}setAuthConfig(e){this.api.setAuthConfig(e)}setNetworkError(e){this.networkError=e}isLoggedIn(){return Boolean(this.session)}requestHeaders(){const e={"Accept-Language":X.default.language};if(this.isLoggedIn()){const{accessToken:t,tokenType:n}=this.session;return um({},e,{Authorization:n+" "+t})}return e}authorize(e,t){void 0===t&&(t=!0);try{const n=this;return n.setLoading(!0),Promise.resolve(n.api.authorize(e)).then(function(e){return n.setLoading(!1),e?(t&&(n.session=e,n.storeSession(),n.setCurrentUser(e.user),n.setConnectedLoginStatus()),e):null})}catch(e){return Promise.reject(e)}}refresh(){try{const e=this;return e.session&&(e.refreshTokenPromise=e.api.authorize({refresh:e.session.refreshToken}),e.refreshTokenPromise.then(t=>{t?(e.session=um({},e.session,t,{user:e.session.user}),e.storeSession(),e.setConnectedLoginStatus(),e.refreshTokenPromise=null):(e.removeSession(),e.removeCurrentUser(),e.setNotAuthorizedLoginStatus(),e.refreshTokenPromise=null)})),Promise.resolve(e.refreshTokenPromise)}catch(e){return Promise.reject(e)}}recover(){try{const e=this;return e.session?Promise.resolve():Promise.resolve(e.restoreSession()).then(function(){const t=function(){if(e.session)return Promise.resolve(e.api.getUserData()).then(function(t){e.setCurrentUser(t),e.setConnectedLoginStatus()});e.setNotAuthorizedLoginStatus()}();if(t&&t.then)return t.then(function(){})})}catch(e){return Promise.reject(e)}}logout(){try{const e=this,t=function(){if(e.session)return Promise.resolve(e.api.signOut(e.session.accessToken)).then(function(){e.removeSession(),e.removeCurrentUser(),e.setNotAuthorizedLoginStatus()})}();return Promise.resolve(t&&t.then?t.then(function(){}):void 0)}catch(e){return Promise.reject(e)}}refreshUserData(){try{const e=this;return e.session?Promise.resolve(e.api.getUserData()).then(function(t){return t&&(e.session.user=t,e.setCurrentUser(t)),t}):Promise.resolve(null)}catch(e){return Promise.reject(e)}}storeSession(){try{const e=this;let t={};t["access-token"]=e.session.accessToken,t["refresh-token"]=e.session.refreshToken,t["token-type"]=e.session.tokenType,t["created-at"]=e.session.createdAt,t["expires-in"]=e.session.expiresIn;const n=JSON.stringify(t);return $m.set("authHeaders",n),Promise.resolve()}catch(e){return Promise.reject(e)}}restoreSession(){try{const e=this,t=$m.get("authHeaders");if(!t||"null"===t)return Promise.resolve();const n=JSON.parse(t),r=new Fm;return r.accessToken=n["access-token"],r.refreshToken=n["refresh-token"],r.tokenType=n["token-type"],r.createdAt=n["created-at"],r.expiresIn=n["expires-in"],e.session=r,Promise.resolve(e.api.getUserData()).then(function(t){t&&(e.session.user=t)})}catch(e){return Promise.reject(e)}}removeSession(){$m.remove("authHeaders"),this.session=null}setCurrentUser(e){tm.setCurrentUser(e)}removeCurrentUser(){tm.removeCurrentUser()}},Vm=()=>{const[t,n]=e.useState(Um.loginStatus);return e.useEffect(()=>i.reaction(()=>i.toJS(Um.loginStatus),()=>{n(Um.loginStatus)}),[]),t},qm=q.default.createContext({showModal:null,hideModal:null,isOpenedModal:!1}),Wm=t=>{let{children:n}=t;const[r,o]=e.useState({}),s=e.useCallback((e,t)=>{o(t=>um({},t,{[e]:um({},t[e],{isOpen:!1})})),t&&t()},[o]),i=e.useCallback((e,t,n)=>{o(r=>um({},r,{[e]:{isOpen:!0,component:t,data:n}}))},[o]),a=e.useMemo(()=>({showModal:i,hideModal:s,isOpenedModal:Object.values(r).some(e=>{let{isOpen:t}=e;return t})}),[s,i,r]);/*#__PURE__*/return q.default.createElement(qm.Provider,{value:a},n,Object.keys(r).map(e=>{const{component:t,isOpen:n,data:o}=r[e];return n&&/*#__PURE__*/q.default.createElement(t,um({onClose:()=>s(e),key:e,isOpen:n},o))}))},Km=(()=>{let e=0;return()=>""+ ++e})();function Zm(t,n,r){const o=e.useMemo(Km,[]),s=e.useContext(qm);return[e.useCallback(e=>s.showModal(o,t,e instanceof Event?n:um({},n,e)),[n,s.showModal]),e.useCallback(()=>s.hideModal(o,r),[s.hideModal,r,o])]}Zm.ModalContext=qm,Zm.ModalProvider=Wm;const Gm=e=>{let{isEmbeddedMode:t}=e;return{root:{height:t?"100vh":"calc(100vh - 22px)",paddingTop:t?0:"70px",mixBlendMode:t?"normal":"color",background:t?"transparent":"#1B2027"},overlay:{position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:-1,background:"repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1) 12px, transparent 12px, transparent 24px);"}}};function Ym(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>n.searchParams.append("args[]",e)),`Minified MUI error #${e}; visit ${n} for the full message.`}var Jm={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Xm(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var Qm=/[A-Z]|^ms/g,ef=/_EMO_([^_]+?)_([^]*?)_EMO_/g,tf=function(e){return 45===e.charCodeAt(1)},nf=function(e){return null!=e&&"boolean"!=typeof e},rf=/* #__PURE__ */Xm(function(e){return tf(e)?e:e.replace(Qm,"-$&").toLowerCase()}),of=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(ef,function(e,t,n){return af={name:t,styles:n,next:af},t})}return 1===Jm[e]||tf(e)||"number"!=typeof t||0===t?t:t+"px"};function sf(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return af={name:n.name,styles:n.styles,next:af},n.name;var r=n;if(void 0!==r.styles){var o=r.next;if(void 0!==o)for(;void 0!==o;)af={name:o.name,styles:o.styles,next:af},o=o.next;return r.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=sf(e,t,n[o])+";";else for(var s in n){var i=n[s];if("object"!=typeof i){var a=i;null!=t&&void 0!==t[a]?r+=s+"{"+t[a]+"}":nf(a)&&(r+=rf(s)+":"+of(s,a)+";")}else if(!Array.isArray(i)||"string"!=typeof i[0]||null!=t&&void 0!==t[i[0]]){var c=sf(e,t,i);switch(s){case"animation":case"animationName":r+=rf(s)+":"+c+";";break;default:r+=s+"{"+c+"}"}}else for(var l=0;l<i.length;l++)nf(i[l])&&(r+=rf(s)+":"+of(s,i[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var s=af,i=n(e);return af=s,sf(e,t,i)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}var af,cf=/label:\s*([^\s;{]+)\s*(;|$)/g;function lf(e,t){const n=ee.default(e,t);return"production"!=='{NODE_ENV:"production"}'.NODE_ENV?(...t)=>{const r="string"==typeof e?`"${e}"`:"component";return 0===t.length?console.error([`MUI: Seems like you called \`styled(${r})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join("\n")):t.some(e=>void 0===e)&&console.error(`MUI: the styled(${r})(...args) API requires all its args to be defined.`),n(...t)}:n}const uf=[];function df(e){return uf[0]=e,function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";af=void 0;var s=e[0];null==s||void 0===s.raw?(r=!1,o+=sf(n,t,s)):o+=s[0];for(var i=1;i<e.length;i++)o+=sf(n,t,e[i]),r&&(o+=s[i]);cf.lastIndex=0;for(var a,c="";null!==(a=cf.exec(o));)c+="-"+a[1];var l=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+c;return{name:l,styles:o,next:af}}(uf)}function pf(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function hf(e){if(/*#__PURE__*/V.isValidElement(e)||y.isValidElementType(e)||!pf(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=hf(e[n])}),t}function mf(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return pf(e)&&pf(t)&&Object.keys(t).forEach(o=>{r[o]=/*#__PURE__*/V.isValidElement(t[o])||y.isValidElementType(t[o])?t[o]:pf(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&pf(e[o])?mf(e[o],t[o],n):n.clone&&pf(t[o])?hf(t[o]):t[o]}),r}function ff(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(e=>e.startsWith("@container")).sort((e,t)=>{const n=/min-width:\s*([0-9.]+)/;return+(e.match(n)?.[1]||0)-+(t.match(n)?.[1]||0)});return n.length?n.reduce((e,n)=>{const r=t[n];return delete e[n],e[n]=r,e},{...t}):t}var gf={borderRadius:4},yf="production"!=='{NODE_ENV:"production"}'.NODE_ENV?J.default.oneOfType([J.default.number,J.default.string,J.default.object,J.default.array]):{};function bf(e,t){return t?mf(e,t,{clone:!1}):e}const vf={xs:0,sm:600,md:900,lg:1200,xl:1536},_f={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${vf[e]}px)`},Sf={containerQueries:e=>({up:t=>{let n="number"==typeof t?t:vf[t]||t;return"number"==typeof n&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function wf(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||_f;return t.reduce((r,o,s)=>(r[e.up(e.keys[s])]=n(t[s]),r),{})}if("object"==typeof t){const e=r.breakpoints||_f;return Object.keys(t).reduce((o,s)=>{if(i=e.keys,"@"===(a=s)||a.startsWith("@")&&(i.some(e=>a.startsWith(`@${e}`))||a.match(/^@\d/))){const e=function(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if("production"!=='{NODE_ENV:"production"}'.NODE_ENV)throw new Error("production"!=='{NODE_ENV:"production"}'.NODE_ENV?`MUI: The provided shorthand (${t}) is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.\nFor example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:Ym(18,`(${t})`));return null}const[,r,o]=n,s=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(s)}(r.containerQueries?r:Sf,s);e&&(o[e]=n(t[s],s))}else Object.keys(e.values||vf).includes(s)?o[e.up(s)]=n(t[s],s):o[s]=t[s];var i,a;return o},{})}return n(t)}function kf(e,t){return e.reduce((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e},t)}function Ef(e){if("string"!=typeof e)throw new Error("production"!=='{NODE_ENV:"production"}'.NODE_ENV?"MUI: `capitalize(string)` expects a string argument.":Ym(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Cf(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=n)return n}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function xf(e,t,n,r=n){let o;return o="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:Cf(e,n)||r,t&&(o=t(o,r,e)),o}function Tf(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,s=e=>{if(null==e[t])return null;const s=e[t],i=Cf(e.theme,r)||{};return wf(e,s,e=>{let r=xf(i,o,e);return e===r&&"string"==typeof e&&(r=xf(i,o,`${t}${"default"===e?"":Ef(e)}`,e)),!1===n?r:{[n]:r}})};return s.propTypes="production"!=='{NODE_ENV:"production"}'.NODE_ENV?{[t]:yf}:{},s.filterProps=[t],s}const If={m:"margin",p:"padding"},Mf={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Of={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Pf=function(){const e={};return t=>(void 0===e[t]&&(e[t]=(e=>{if(e.length>2){if(!Of[e])return[e];e=Of[e]}const[t,n]=e.split(""),r=If[t],o=Mf[n]||"";return Array.isArray(o)?o.map(e=>r+e):[r+o]})(t)),e[t])}(),Rf=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Af=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Df=[...Rf,...Af];function Lf(e,t,n,r){const o=Cf(e,t,!0)??n;return"number"==typeof o||"string"==typeof o?e=>"string"==typeof e?e:("production"!=='{NODE_ENV:"production"}'.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${e}.`),"string"==typeof o?o.startsWith("var(")&&0===e?0:o.startsWith("var(")&&1===e?o:`calc(${e} * ${o})`:o*e):Array.isArray(o)?e=>{if("string"==typeof e)return e;const n=Math.abs(e);"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&(Number.isInteger(n)?n>o.length-1&&console.error([`MUI: The value provided (${n}) overflows.`,`The supported values are: ${JSON.stringify(o)}.`,`${n} > ${o.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n")));const r=o[n];return e>=0?r:"number"==typeof r?-r:"string"==typeof r&&r.startsWith("var(")?`calc(-1 * ${r})`:`-${r}`}:"function"==typeof o?o:("production"!=='{NODE_ENV:"production"}'.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${o}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}function Nf(e){return Lf(e,"spacing",8,"spacing")}function jf(e,t){return"string"==typeof t||null==t?t:e(t)}function zf(e,t){const n=Nf(e.theme);return Object.keys(e).map(r=>function(e,t,n,r){if(!t.includes(n))return null;const o=function(e,t){return n=>e.reduce((e,r)=>(e[r]=jf(t,n),e),{})}(Pf(n),r);return wf(e,e[n],o)}(e,t,r,n)).reduce(bf,{})}function $f(e){return zf(e,Rf)}function Hf(e){return zf(e,Af)}function Ff(...e){const t=e.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),n=e=>Object.keys(e).reduce((n,r)=>t[r]?bf(n,t[r](e)):n,{});return n.propTypes="production"!=='{NODE_ENV:"production"}'.NODE_ENV?e.reduce((e,t)=>Object.assign(e,t.propTypes),{}):{},n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n}function Bf(e){return"number"!=typeof e?e:`${e}px solid`}function Uf(e,t){return Tf({prop:e,themeKey:"borders",transform:t})}$f.propTypes="production"!=='{NODE_ENV:"production"}'.NODE_ENV?Rf.reduce((e,t)=>(e[t]=yf,e),{}):{},$f.filterProps=Rf,Hf.propTypes="production"!=='{NODE_ENV:"production"}'.NODE_ENV?Af.reduce((e,t)=>(e[t]=yf,e),{}):{},Hf.filterProps=Af,"production"==='{NODE_ENV:"production"}'.NODE_ENV||Df.reduce((e,t)=>(e[t]=yf,e),{});const Vf=Uf("border",Bf),qf=Uf("borderTop",Bf),Wf=Uf("borderRight",Bf),Kf=Uf("borderBottom",Bf),Zf=Uf("borderLeft",Bf),Gf=Uf("borderColor"),Yf=Uf("borderTopColor"),Jf=Uf("borderRightColor"),Xf=Uf("borderBottomColor"),Qf=Uf("borderLeftColor"),eg=Uf("outline",Bf),tg=Uf("outlineColor"),ng=e=>{if(null!=e.borderRadius){const t=Lf(e.theme,"shape.borderRadius",4,"borderRadius");return wf(e,e.borderRadius,e=>({borderRadius:jf(t,e)}))}return null};ng.propTypes="production"!=='{NODE_ENV:"production"}'.NODE_ENV?{borderRadius:yf}:{},ng.filterProps=["borderRadius"],Ff(Vf,qf,Wf,Kf,Zf,Gf,Yf,Jf,Xf,Qf,ng,eg,tg);const rg=e=>{if(null!=e.gap){const t=Lf(e.theme,"spacing",8,"gap");return wf(e,e.gap,e=>({gap:jf(t,e)}))}return null};rg.propTypes="production"!=='{NODE_ENV:"production"}'.NODE_ENV?{gap:yf}:{},rg.filterProps=["gap"];const og=e=>{if(null!=e.columnGap){const t=Lf(e.theme,"spacing",8,"columnGap");return wf(e,e.columnGap,e=>({columnGap:jf(t,e)}))}return null};og.propTypes="production"!=='{NODE_ENV:"production"}'.NODE_ENV?{columnGap:yf}:{},og.filterProps=["columnGap"];const sg=e=>{if(null!=e.rowGap){const t=Lf(e.theme,"spacing",8,"rowGap");return wf(e,e.rowGap,e=>({rowGap:jf(t,e)}))}return null};function ig(e,t){return"grey"===t?t:e}function ag(e){return e<=1&&0!==e?100*e+"%":e}sg.propTypes="production"!=='{NODE_ENV:"production"}'.NODE_ENV?{rowGap:yf}:{},sg.filterProps=["rowGap"],Ff(rg,og,sg,Tf({prop:"gridColumn"}),Tf({prop:"gridRow"}),Tf({prop:"gridAutoFlow"}),Tf({prop:"gridAutoColumns"}),Tf({prop:"gridAutoRows"}),Tf({prop:"gridTemplateColumns"}),Tf({prop:"gridTemplateRows"}),Tf({prop:"gridTemplateAreas"}),Tf({prop:"gridArea"})),Ff(Tf({prop:"color",themeKey:"palette",transform:ig}),Tf({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:ig}),Tf({prop:"backgroundColor",themeKey:"palette",transform:ig}));const cg=Tf({prop:"width",transform:ag}),lg=e=>null!=e.maxWidth?wf(e,e.maxWidth,t=>{const n=e.theme?.breakpoints?.values?.[t]||vf[t];return n?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:ag(t)}}):null;lg.filterProps=["maxWidth"];const ug=Tf({prop:"minWidth",transform:ag}),dg=Tf({prop:"height",transform:ag}),pg=Tf({prop:"maxHeight",transform:ag}),hg=Tf({prop:"minHeight",transform:ag});Tf({prop:"size",cssProperty:"width",transform:ag}),Tf({prop:"size",cssProperty:"height",transform:ag}),Ff(cg,lg,ug,dg,pg,hg,Tf({prop:"boxSizing"}));var mg={border:{themeKey:"borders",transform:Bf},borderTop:{themeKey:"borders",transform:Bf},borderRight:{themeKey:"borders",transform:Bf},borderBottom:{themeKey:"borders",transform:Bf},borderLeft:{themeKey:"borders",transform:Bf},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Bf},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:ng},color:{themeKey:"palette",transform:ig},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:ig},backgroundColor:{themeKey:"palette",transform:ig},p:{style:Hf},pt:{style:Hf},pr:{style:Hf},pb:{style:Hf},pl:{style:Hf},px:{style:Hf},py:{style:Hf},padding:{style:Hf},paddingTop:{style:Hf},paddingRight:{style:Hf},paddingBottom:{style:Hf},paddingLeft:{style:Hf},paddingX:{style:Hf},paddingY:{style:Hf},paddingInline:{style:Hf},paddingInlineStart:{style:Hf},paddingInlineEnd:{style:Hf},paddingBlock:{style:Hf},paddingBlockStart:{style:Hf},paddingBlockEnd:{style:Hf},m:{style:$f},mt:{style:$f},mr:{style:$f},mb:{style:$f},ml:{style:$f},mx:{style:$f},my:{style:$f},margin:{style:$f},marginTop:{style:$f},marginRight:{style:$f},marginBottom:{style:$f},marginLeft:{style:$f},marginX:{style:$f},marginY:{style:$f},marginInline:{style:$f},marginInlineStart:{style:$f},marginInlineEnd:{style:$f},marginBlock:{style:$f},marginBlockStart:{style:$f},marginBlockEnd:{style:$f},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:rg},rowGap:{style:sg},columnGap:{style:og},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:ag},maxWidth:{style:lg},minWidth:{transform:ag},height:{transform:ag},maxHeight:{transform:ag},minHeight:{transform:ag},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};const fg=function(){function e(e,t,n,r){const o={[e]:t,theme:n},s=r[e];if(!s)return{[e]:t};const{cssProperty:i=e,themeKey:a,transform:c,style:l}=s;if(null==t)return null;if("typography"===a&&"inherit"===t)return{[e]:t};const u=Cf(n,a)||{};return l?l(o):wf(o,t,t=>{let n=xf(u,c,t);return t===n&&"string"==typeof t&&(n=xf(u,c,`${e}${"default"===t?"":Ef(t)}`,t)),!1===i?n:{[i]:n}})}return function t(n){const{sx:r,theme:o={},nested:s}=n||{};if(!r)return null;const i=o.unstable_sxConfig??mg;function a(n){let r=n;if("function"==typeof n)r=n(o);else if("object"!=typeof n)return n;if(!r)return null;const a=function(e={}){const t=e.keys?.reduce((t,n)=>(t[e.up(n)]={},t),{});return t||{}}(o.breakpoints),c=Object.keys(a);let l=a;return Object.keys(r).forEach(n=>{const s="function"==typeof(a=r[n])?a(o):a;var a;if(null!=s)if("object"==typeof s)if(i[n])l=bf(l,e(n,s,o,i));else{const e=wf({theme:o},s,e=>({[n]:e}));!function(...e){const t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),n=new Set(t);return e.every(e=>n.size===Object.keys(e).length)}(e,s)?l=bf(l,e):l[n]=t({sx:s,theme:o,nested:!0})}else l=bf(l,e(n,s,o,i))}),!s&&o.modularCssLayers?{"@layer sx":ff(o,kf(c,l))}:ff(o,kf(c,l))}return Array.isArray(r)?r.map(a):a(r)}}();fg.filterProps=["sx"];var gg=fg;function yg(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||"function"!=typeof n.getColorSchemeSelector)return{};let r=n.getColorSchemeSelector(e);return"&"===r?t:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function bg(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:s={},...i}=e,a=function(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,s=(e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>({...e,[t.key]:t.val}),{})})(t),i=Object.keys(s);function a(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function c(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-r/100}${n})`}function l(e,o){const s=i.indexOf(o);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==s&&"number"==typeof t[i[s]]?t[i[s]]:o)-r/100}${n})`}return{keys:i,values:s,up:a,down:c,between:l,only:function(e){return i.indexOf(e)+1<i.length?l(e,i[i.indexOf(e)+1]):a(e)},not:function(e){const t=i.indexOf(e);return 0===t?a(i[1]):t===i.length-1?c(i[t]):l(e,i[i.indexOf(e)+1]).replace("@media","@media not all and")},unit:n,...o}}(n),c=function(e=8,t=Nf({spacing:e})){if(e.mui)return e;const n=(...e)=>("production"!=='{NODE_ENV:"production"}'.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map(e=>{const n=t(e);return"number"==typeof n?`${n}px`:n}).join(" "));return n.mui=!0,n}(o);let l=mf({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:c,shape:{...gf,...s}},i);return l=function(e){const t=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function n(n,r){n.up=(...n)=>t(e.breakpoints.up(...n),r),n.down=(...n)=>t(e.breakpoints.down(...n),r),n.between=(...n)=>t(e.breakpoints.between(...n),r),n.only=(...n)=>t(e.breakpoints.only(...n),r),n.not=(...n)=>{const o=t(e.breakpoints.not(...n),r);return o.includes("not all and")?o.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):o}}const r={},o=e=>(n(r,e),r);return n(o),{...e,containerQueries:o}}(l),l.applyStyles=yg,l=t.reduce((e,t)=>mf(e,t),l),l.unstable_sxConfig={...mg,...i?.unstable_sxConfig},l.unstable_sx=function(e){return gg({sx:e,theme:this})},l}const vg=bg(),_g=e=>e;var Sg=(()=>{let e=_g;return{configure(t){e=t},generate:t=>e(t),reset(){e=_g}}})();function wg(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=wg(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function kg(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=wg(e))&&(r&&(r+=" "),r+=t);return r}const Eg={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"},Cg=function(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=e,s=lf("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(gg),i=/*#__PURE__*/V.forwardRef(function(e,i){const a=function(e=vg){return function(e=null){const t=V.useContext(g.ThemeContext);return!t||function(e){return 0===Object.keys(e).length}(t)?e:t}(e)}(n),{className:c,component:l="div",...u}=function(e){const{sx:t,...n}=e,{systemProps:r,otherProps:o}=(e=>{const t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??mg;return Object.keys(e).forEach(r=>{n[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]}),t})(n);let s;return s=Array.isArray(t)?[r,...t]:"function"==typeof t?(...e)=>{const n=t(...e);return pf(n)?{...r,...n}:r}:{...r,...t},{...o,sx:s}}(e);/*#__PURE__*/
|
|
172
|
-
return b.jsx(s,{as:l,ref:i,className:kg(c,o?o(r):r),theme:t&&a[t]||a,...u})});return i}({defaultClassName:function(e,t,n="Mui"){const r={};return["root"].forEach(t=>{r[t]=function(e,t,n="Mui"){const r=Eg[t];return r?`${n}-${r}`:`${Sg.generate(e)}-${t}`}(e,t,n)}),r}("MuiBox").root,generateClassName:Sg.generate});"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&(Cg.propTypes={children:J.default.node,component:J.default.elementType,sx:J.default.oneOfType([J.default.arrayOf(J.default.oneOfType([J.default.func,J.default.object,J.default.bool])),J.default.func,J.default.object])});var xg=Cg;function Tg(e,t=""){return e.displayName||e.name||t}function Ig(e,t,n){const r=Tg(t);return e.displayName||(""!==r?`${n}(${r})`:n)}const Mg=bg();function Og(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function Pg(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function Rg(e){return e?(t,n)=>n[e]:null}function Ag(e,t,n){const r="function"==typeof t?t(e):t;if(Array.isArray(r))return r.flatMap(t=>Ag(e,t,n));if(Array.isArray(r?.variants)){let t;if(r.isProcessed)t=n?Pg(r.style,n):r.style;else{const{variants:e,...o}=r;t=n?Pg(df(o),n):o}return Dg(e,r.variants,[t],n)}return r?.isProcessed?n?Pg(df(r.style),n):r.style:n?Pg(df(r),n):r}function Dg(e,t,n=[],r=void 0){let o;e:for(let s=0;s<t.length;s+=1){const i=t[s];if("function"==typeof i.props){if(o??={...e,...e.ownerState,ownerState:e.ownerState},!i.props(o))continue}else for(const t in i.props)if(e[t]!==i.props[t]&&e.ownerState?.[t]!==i.props[t])continue e;"function"==typeof i.style?(o??={...e,...e.ownerState,ownerState:e.ownerState},n.push(r?Pg(df(i.style(o)),r):i.style(o))):n.push(r?Pg(df(i.style),r):i.style)}return n}function Lg(e,t){let n;return"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&e&&(n=`${e}-${Ng(t||"Root")}`),n}function Ng(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}const jg=function(e={}){const{themeId:t,defaultTheme:n=Mg,rootShouldForwardProp:r=Og,slotShouldForwardProp:o=Og}=e;function s(e){!function(e,t,n){e.theme=function(e){for(const t in e)return!1;return!0}(e.theme)?n:e.theme[t]||e.theme}(e,t,n)}return(e,t={})=>{!function(e){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=(e=>e.filter(e=>e!==gg))(e.__emotion_styles))}(e);const{name:n,slot:i,skipVariantsResolver:a,skipSx:c,overridesResolver:l=Rg(Ng(i)),...u}=t,d=n&&n.startsWith("Mui")||i?"components":"custom",p=void 0!==a?a:i&&"Root"!==i&&"root"!==i||!1,h=c||!1;let m=Og;"Root"===i||"root"===i?m=r:i?m=o:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(m=void 0);const f=lf(e,{shouldForwardProp:m,label:Lg(n,i),...u}),g=e=>{if(e.__emotion_real===e)return e;if("function"==typeof e)return function(t){return Ag(t,e,t.theme.modularCssLayers?d:void 0)};if(pf(e)){const t=function(e){const{variants:t,...n}=e,r={variants:t,style:df(n),isProcessed:!0};return r.style===n||t&&t.forEach(e=>{"function"!=typeof e.style&&(e.style=df(e.style))}),r}(e);return function(e){return t.variants?Ag(e,t,e.theme.modularCssLayers?d:void 0):e.theme.modularCssLayers?Pg(t.style,d):t.style}}return e},b=(...t)=>{const r=[],o=t.map(g),a=[];if(r.push(s),n&&l&&a.push(function(e){const t=e.theme,r=t.components?.[n]?.styleOverrides;if(!r)return null;const o={};for(const t in r)o[t]=Ag(e,r[t],e.theme.modularCssLayers?"theme":void 0);return l(e,o)}),n&&!p&&a.push(function(e){const t=e.theme,r=t?.components?.[n]?.variants;return r?Dg(e,r,[],e.theme.modularCssLayers?"theme":void 0):null}),h||a.push(gg),Array.isArray(o[0])){const e=o.shift(),t=new Array(r.length).fill(""),n=new Array(a.length).fill("");let s;s=[...t,...e,...n],s.raw=[...t,...e.raw,...n],r.unshift(s)}const c=[...r,...o,...a],u=f(...c);return e.muiName&&(u.muiName=e.muiName),"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&(u.displayName=function(e,t,n){return e?`${e}${Ef(t||"")}`:`Styled(${function(e){if(null!=e){if("string"==typeof e)return e;if("function"==typeof e)return Tg(e,"Component");if("object"==typeof e)switch(e.$$typeof){case y.ForwardRef:return Ig(e,e.render,"ForwardRef");case y.Memo:return Ig(e,e.type,"memo");default:return}}}(n)})`}(n,i,e)),u};return f.withConfig&&(b.withConfig=f.withConfig),b}}();var zg=jg;const $g=new Set(["http://localhost:3000","http://localhost:3090"]),Hg=e=>{if("string"!=typeof e)return!1;if($g.has(e))return!0;try{const t=new URL(e);if("https:"!==t.protocol)return!1;const n=t.hostname;return"andoncloud.net"===n||n.endsWith(".andoncloud.net")||"andoncloud.com"===n||n.endsWith(".andoncloud.com")}catch(e){return!1}},Fg=()=>{try{return window.self!==window.top?"iframe":"standalone"}catch(e){return"iframe"}},Bg=zg(xg)({position:"absolute",left:0,bottom:0,width:"100%",height:"22px",padding:"0.15em 0.5em",fontSize:"70%",fontWeight:600,color:"rgba(255, 255, 255, 0.75)",borderTop:"1px solid rgba(255, 255, 255, 0.2)","& > span":{marginLeft:"0.5em",color:"rgba(255, 255, 255, 0.4)"},background:"#11151B"}),Ug=e=>{let{appVersion:n,apiVersion:r}=e;const{t:o}=t.useTranslation();return"iframe"===Fg()?null:/*#__PURE__*/q.default.createElement(Bg,null,(()=>{if(n){const e=n.startsWith("v")?n:"v"+n;/*#__PURE__*/return q.default.createElement(q.default.Fragment,null,/*#__PURE__*/q.default.createElement("span",null,o("Version"))," ",e)}})(),(()=>{if(r){const e=r.startsWith("v")?r:"v"+r;/*#__PURE__*/return q.default.createElement(q.default.Fragment,null,/*#__PURE__*/q.default.createElement("span",null,"API")," ",e)}})())},Vg=e=>{let{error:n,appVersion:r,apiVersion:o}=e;const{t:i}=t.useTranslation(),a=Fg(),c=Gm({isEmbeddedMode:"iframe"===a});/*#__PURE__*/return q.default.createElement(s.Container,{maxWidth:!1,disableGutters:!0,sx:c.root},/*#__PURE__*/q.default.createElement(s.Card,{style:{background:"linear-gradient(180deg, #393939 0%, #4A4A4A 100%)",maxWidth:"650px",margin:"200px auto",borderRadius:"20px"}},/*#__PURE__*/q.default.createElement(s.CardContent,{style:{minHeight:"unset"}},/*#__PURE__*/q.default.createElement(s.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",m:"125px 80px"},/*#__PURE__*/q.default.createElement(s.Typography,{variant:"h4",sx:{display:"flex",alignItems:"center",marginBottom:"40px",color:"rgba(255, 255, 255, 0.6)"}},i("somethingWentWrongMessage"),/*#__PURE__*/q.default.createElement(s.Tooltip,{title:n.toString(),arrow:!0},/*#__PURE__*/q.default.createElement(Q.default,{sx:{marginLeft:"1em",fontSize:"inherit"}}))),/*#__PURE__*/q.default.createElement(s.Button,{onClick:()=>window.location.reload()},i("networkErrorButtonText"))))),/*#__PURE__*/q.default.createElement(s.Box,{sx:c.overlay}),/*#__PURE__*/q.default.createElement(Ug,{appVersion:r,apiVersion:o}))};Vg.propTypes={error:p.PropTypes.any,componentStack:p.PropTypes.any},Vg.defaultProps={};const qg=e=>{let{width:t,"data-testid":n}=e;/*#__PURE__*/return q.default.createElement(s.Box,{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},/*#__PURE__*/q.default.createElement("img",{"data-testid":n,alt:"loader",width:t,src:te.default}))},Wg=e.createContext(),Kg=t=>{let{children:n}=t;const[r,o]=e.useState(!1),[s,i]=e.useState([]),a=Fg();/*#__PURE__*/return q.default.createElement(Wg.Provider,{value:{mode:a,isEmbeddedMode:"iframe"===a,iframeMounted:r,setIframeMounted:o,iframeNavigationItems:s,setIframeNavigationItems:i}},n)},Zg=()=>e.useContext(Wg),Gg=()=>{const{isEmbeddedMode:e}=Zg(),t=Gm({isEmbeddedMode:e});/*#__PURE__*/return q.default.createElement(s.Container,{maxWidth:!1,disableGutters:!0,sx:t.root},/*#__PURE__*/q.default.createElement(qg,{"data-testid":"ac-sdk-app-loading",width:"500px"}),/*#__PURE__*/q.default.createElement(s.Box,{sx:t.overlay}))};Gg.propTypes={},Gg.defaultProps={};const Yg=e.createContext(),Jg=e=>{let{children:t,config:n}=e;/*#__PURE__*/return q.default.createElement(Yg.Provider,{value:n},t)},Xg=()=>e.useContext(Yg),Qg=e.createContext(),ey=e=>{let{children:t,info:n}=e;/*#__PURE__*/return q.default.createElement(Qg.Provider,{value:n},t)},ty={sessionStore:Um},ny=e.createContext(ty),ry=d.observer(e=>{let{children:t}=e;/*#__PURE__*/return q.default.createElement(ny.Provider,{value:ty},t)});var oy=new class{constructor(){this.appReady=!1,this.gtmReady=!1,this.sentryReady=!1,i.makeAutoObservable(this)}setAppReady(){this.appReady=!0}setGtmReady(){this.gtmReady=!0}setSentryReady(){this.sentryReady=!0}};const{palette:sy,typography:iy}=u.createTheme(),ay=u.responsiveFontSizes(u.createTheme({components:{MuiCssBaseline:{styleOverrides:'\n body {\n font-family: "Inter", "system-ui";\n }\n @supports (font-variation-settings: normal) {\n body { font-family: "Inter var", "system-ui"; }\n }\n '}},palette:{background:"#090B0E",primary:{main:"#0366EB",light:"#71A9F4"},secondary:{main:"#E0E0E0"},success:{main:"#11BD4C"},error:{main:"#FD2121"},text:{primary:"#A7ADB6"},gray:sy.augmentColor({color:{main:"#090B0E",light:"#47484A"}}),stroke:sy.augmentColor({color:{main:"#D8DDE3",dark:"rgba(255, 255, 255, 0.15)"}}),gradient:{blue:{main:"linear-gradient(0deg, #0353BD 3.06%, #0366EB 93%)"},dark:{main:"linear-gradient(180deg, #292C34 0%, #1C1F25 100%)"}}},typography:{fontFamily:"'Inter', system-ui",button:{textTransform:"none"}}}),{breakpoints:["xs","sm","md","lg","xl"],disableAlign:!0,factor:2.5});var cy=u.createTheme(ay,{components:{MuiBackdrop:{styleOverrides:{root:{marginTop:70}}},MuiButton:{styleOverrides:{root:{fontSize:"1rem",fontWeight:400,color:ay.palette.common.white,padding:ay.spacing(1.5,3),border:"1px solid "+ay.palette.stroke.dark,borderRadius:"6px","&:disabled":{color:ay.palette.gray.light,background:"transparent"}}},variants:[{props:{variant:"contained"},style:{background:ay.palette.gradient.blue.main,"&:focus":{boxShadow:"0px 0px 0px 4px rgba(3, 102, 235, 0.25)"},"&:hover":{opacity:.8}}},{props:{variant:"outlined"},style:{background:ay.palette.gradient.dark.main,"&:focus":{boxShadow:"0 0 0 4px rgba(255, 255, 255, 0.10)"},"&:hover":{opacity:.8}}}]},MuiCard:{styleOverrides:{root:{borderRadius:"4px",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.25)"}}},MuiCardHeader:{styleOverrides:{root:{color:"rgba(255,255,255,0.85)",background:"linear-gradient(180deg,#252A32,#30353D)"},subheader:{marginTop:"0.5em",color:"rgba(255,255,255,0.5)"}}},MuiCardContent:{styleOverrides:{root:{background:"#252A32","&:last-child":{paddingBottom:16}}}},MuiDayCalendar:{styleOverrides:{weekDayLabel:{color:"#E0E0E0"}}},MuiDialogTitle:{styleOverrides:{root:{textAlign:"center",color:"white",background:"linear-gradient(180deg,#252A32,#30353D)"}}},MuiDialogContent:{styleOverrides:{root:{minWidth:550,padding:"16px 24px",background:"#252A32"}}},MuiDialogContentText:{styleOverrides:{root:{textAlign:"center",color:"white"}}},MuiCheckbox:{styleOverrides:{root:{color:ay.palette.primary.main,"&:hover":{opacity:.8}}}},MuiFormLabel:{styleOverrides:{root:{lineHeight:"1.4375em !important",fontSize:iy.pxToRem(16)+" !important","&:not(.Mui-error)":{color:ay.palette.text.primary+" !important"}}}},MuiFormControl:{styleOverrides:{root:{".MuiInputLabel-root":{color:"#E0E0E0",transform:"translate(16px, 14px) scale(1)","&.MuiInputLabel-shrink":{color:"#A7ADB6",transform:"translate(16px, 5px) scale(0.75)"}}}}},MuiFormControlLabel:{styleOverrides:{root:{alignItems:"center",color:ay.palette.text.primary,".MuiFormControlLabel-label.Mui-disabled":{color:"#A7ADB6"}}}},MuiInputBase:{styleOverrides:{root:{display:"flex",padding:ay.spacing(1.5,3),fontSize:"1rem",fontWeight:400,color:"#E0E0E0",borderRadius:"6px",background:"#1C1F25","> input":{padding:0,"&[type=number]":{MozAppearance:"textfield"},"&[type=number]::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:0},"&[type=number]::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0},"&:-webkit-autofill":{transition:"all 5000s ease-in-out 0s"},"&:-webkit-autofill:focus":{transition:"all 5000s ease-in-out 0s"},"&:-webkit-autofill:hover":{transition:"all 5000s ease-in-out 0s"},"&:-webkit-autofill:active":{transition:"all 5000s ease-in-out 0s"}}}}},MuiInputAdornment:{styleOverrides:{root:{".MuiTypography-root":{color:"#4E5A67"}}}},MuiMenu:{styleOverrides:{root:{transform:"translateY("+ay.spacing(1)+")",".MuiPaper-root":{background:"none"}},list:{border:"1px solid #4E5A67",borderRadius:"6px",background:"#1C1F25",boxShadow:"0px 4px 10.4px 0px rgba(255, 255, 255, 0.05)"}}},MuiMenuItem:{styleOverrides:{root:{gap:ay.spacing(.5),fontSize:iy.pxToRem(16),color:"#E0E0E0","&.Mui-selected":{background:ay.palette.gray.main},"&.Mui-selected:hover":{background:ay.palette.gray.main},"&:hover":{background:ay.palette.gray.main}}}},MuiOutlinedInput:{styleOverrides:{root:{padding:ay.spacing(2.5,2,.5,2),"&:hover .MuiOutlinedInput-notchedOutline":{borderWidth:"1px",borderColor:"#4E5A67"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderWidth:"1px",borderColor:"#4E5A67"}},notchedOutline:{border:"1px solid "+ay.palette.stroke.dark,"> legend":{width:0}}}},MuiPickersArrowSwitcher:{styleOverrides:{root:{".MuiPickersArrowSwitcher-previousIconButton":{color:"#E0E0E0"},".MuiPickersArrowSwitcher-nextIconButton":{color:"#E0E0E0"}}}},MuiPickersCalendarHeader:{styleOverrides:{switchViewButton:{color:"#E0E0E0"}}},MuiPickersInputBase:{styleOverrides:{root:{display:"flex",fontSize:"1rem",fontWeight:400,color:"#E0E0E0",borderRadius:"6px",background:"#1C1F25",".MuiPickersSectionList-root":{padding:ay.spacing(1,0,.625,0)},".MuiInputAdornment-root":{marginTop:ay.spacing(-1.5)},".MuiIconButton-root":{color:"#E0E0E0"},"> input":{padding:0}}}},MuiPickersOutlinedInput:{styleOverrides:{root:{padding:ay.spacing(1.75,2,0,2),"&:hover .MuiPickersOutlinedInput-notchedOutline":{borderWidth:"1px",borderColor:"#4E5A67"},"&.Mui-focused:not(.Mui-error) .MuiPickersOutlinedInput-notchedOutline":{borderWidth:"1px",borderColor:"#4E5A67"}},notchedOutline:{border:"1px solid "+ay.palette.stroke.dark,"> legend":{width:0}}}},MuiPickersTextField:{variants:[{props:{error:!0},style:{".MuiInputLabel-root":{color:ay.palette.error.main,"&.MuiInputLabel-shrink":{color:ay.palette.error.main}},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:ay.palette.error.main},".Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:ay.palette.error.main}}}]},MuiPickersLayout:{styleOverrides:{root:{background:"#1C1F25"}}},MuiRadio:{styleOverrides:{root:{color:ay.palette.primary.main,"&:hover":{opacity:.8}}}},MuiRadioGroup:{styleOverrides:{root:{color:ay.palette.primary.main}}},MuiSelect:{styleOverrides:{root:{".MuiSelect-select":{display:"flex",alignItems:"center",gap:ay.spacing(.5),padding:0,lineHeight:1.625,color:"E0E0E0"},".MuiSelect-icon":{top:"calc(50% - 10px)",right:ay.spacing(2),color:"#E0E0E0"},"&:hover":{borderColor:"#4E5A67"}}}},MuiTabs:{styleOverrides:{root:{borderBottom:"1px solid "+ay.palette.stroke.dark}}},MuiTab:{styleOverrides:{root:{color:ay.palette.text.primary,"&.Mui-selected":{color:"#E0E0E0"}}}},MuiTextField:{variants:[{props:{error:!0},style:{".MuiInputLabel-root":{color:ay.palette.error.main,"&.MuiInputLabel-shrink":{color:ay.palette.error.main}},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:ay.palette.error.main},".Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:ay.palette.error.main}}}]},MuiTypography:{styleOverrides:{root:{"& > span.important":{fontWeight:600,color:ay.palette.secondary.main}}}}}});const ly=e=>{let{error:n}=e;const{isEmbeddedMode:r}=Zg(),{t:o}=t.useTranslation(),i=Gm({isEmbeddedMode:r});/*#__PURE__*/return q.default.createElement(s.Container,{maxWidth:!1,disableGutters:!0,sx:i.root},/*#__PURE__*/q.default.createElement(s.Card,{style:{background:"linear-gradient(180deg, #393939 0%, #4A4A4A 100%)",maxWidth:"600px",margin:"200px auto",borderRadius:"20px"}},/*#__PURE__*/q.default.createElement(s.CardContent,{style:{minHeight:"unset"}},/*#__PURE__*/q.default.createElement(s.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",m:"125px 80px"},/*#__PURE__*/q.default.createElement("h1",{style:{textAlign:"center",color:"rgba(255, 255, 255, 0.6)"}},o("networkErrorHeader")),/*#__PURE__*/q.default.createElement("p",{style:{display:"inline-flex",textAlign:"center",color:"rgba(255, 255, 255, 0.6)"}},/*#__PURE__*/q.default.createElement(s.Typography,{mr:2},n.title),/*#__PURE__*/q.default.createElement(s.Tooltip,{title:n.details,arrow:!0},/*#__PURE__*/q.default.createElement(Q.default,null))),/*#__PURE__*/q.default.createElement(s.Button,{onClick:()=>window.location.reload()},o("networkErrorButtonText"))))),/*#__PURE__*/q.default.createElement(s.Box,{sx:i.overlay}))},uy=()=>{const t=new URLSearchParams(a.useLocation().search),n=t.get("next");return e.useEffect(()=>{const e=t.get("code");e&&Um.authorize({code:e})},[t]),Um.isLoggedIn()?/*#__PURE__*/q.default.createElement(a.Navigate,{to:n}):null},dy=()=>{const{isEmbeddedMode:t,iframeNavigationItems:n}=Zg(),r=a.useNavigate(),o=a.useLocation();return e.useEffect(()=>{var e;t&&(null==(e=window.parent)||e.postMessage({type:"IFRAME_NAVIGATION_CURRENT",path:o.pathname},"*"))},[t,o.pathname]),e.useEffect(()=>{var e;t&&(null==(e=window.parent)||e.postMessage({type:"IFRAME_NAVIGATION_ITEMS",items:n},"*"))},[t,n]),e.useEffect(()=>{var e;if(!t)return;const n=e=>{if(!Hg(e.origin))return;const t=e.data;t&&"object"==typeof t&&"NAVIGATE"===t.type&&"string"==typeof t.path&&r(t.path,{replace:!!t.replace,state:t.state})};return window.addEventListener("message",n),null==(e=window.parent)||e.postMessage({type:"IFRAME_NAVIGATION_READY"},"*"),()=>{var e;window.removeEventListener("message",n),null==(e=window.parent)||e.postMessage({type:"IFRAME_NAVIGATION_DISPOSED"},"*")}},[t,r]),null};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var py,hy,my=(py=function(e,t){var n;e.exports=(n={attachTo:function(e,t){if(void 0!==e.scannerDetectionData)throw new Error("onScan.js is already initialized for DOM element "+e);return t=this._mergeOptions({onScan:function(e,t){},onScanError:function(e){},onKeyProcess:function(e,t){},onKeyDetect:function(e,t){},onPaste:function(e,t){},keyCodeMapper:function(e){return n.decodeKeyEvent(e)},onScanButtonLongPress:function(){},scanButtonKeyCode:!1,scanButtonLongPressTime:500,timeBeforeScanTest:100,avgTimeByChar:30,minLength:6,suffixKeyCodes:[9,13],prefixKeyCodes:[],ignoreIfFocusOn:!1,stopPropagation:!1,preventDefault:!1,captureEvents:!1,reactToKeydown:!0,reactToPaste:!1,singleScanQty:1},t),e.scannerDetectionData={options:t,vars:{firstCharTime:0,lastCharTime:0,accumulatedString:"",testTimer:!1,longPressTimeStart:0,longPressed:!1}},!0===t.reactToPaste&&e.addEventListener("paste",this._handlePaste,t.captureEvents),!1!==t.scanButtonKeyCode&&e.addEventListener("keyup",this._handleKeyUp,t.captureEvents),!0!==t.reactToKeydown&&!1===t.scanButtonKeyCode||e.addEventListener("keydown",this._handleKeyDown,t.captureEvents),this},detachFrom:function(e){e.scannerDetectionData.options.reactToPaste&&e.removeEventListener("paste",this._handlePaste),!1!==e.scannerDetectionData.options.scanButtonKeyCode&&e.removeEventListener("keyup",this._handleKeyUp),e.removeEventListener("keydown",this._handleKeyDown),e.scannerDetectionData=void 0},getOptions:function(e){return e.scannerDetectionData.options},setOptions:function(e,t){switch(e.scannerDetectionData.options.reactToPaste){case!0:!1===t.reactToPaste&&e.removeEventListener("paste",this._handlePaste);break;case!1:!0===t.reactToPaste&&e.addEventListener("paste",this._handlePaste)}return!1===e.scannerDetectionData.options.scanButtonKeyCode?!1!==t.scanButtonKeyCode&&e.addEventListener("keyup",this._handleKeyUp):!1===t.scanButtonKeyCode&&e.removeEventListener("keyup",this._handleKeyUp),e.scannerDetectionData.options=this._mergeOptions(e.scannerDetectionData.options,t),this._reinitialize(e),this},decodeKeyEvent:function(e){var t=this._getNormalizedKeyNum(e);switch(!0){case t>=48&&t<=90:case t>=106&&t<=111:if(void 0!==e.key&&""!==e.key)return e.key;var n=String.fromCharCode(t);switch(e.shiftKey){case!1:n=n.toLowerCase();break;case!0:n=n.toUpperCase()}return n;case t>=96&&t<=105:return t-96+0}return""},simulate:function(e,t){return this._reinitialize(e),Array.isArray(t)?t.forEach(function(e){var t={};"object"!=typeof e&&"function"!=typeof e||null===e?t.keyCode=parseInt(e):t=e;var n=new KeyboardEvent("keydown",t);document.dispatchEvent(n)}):this._validateScanCode(e,t),this},_reinitialize:function(e){var t=e.scannerDetectionData.vars;t.firstCharTime=0,t.lastCharTime=0,t.accumulatedString=""},_isFocusOnIgnoredElement:function(e){var t=e.scannerDetectionData.options.ignoreIfFocusOn;if(!t)return!1;var n=document.activeElement;if(Array.isArray(t)){for(var r=0;r<t.length;r++)if(!0===n.matches(t[r]))return!0}else if(n.matches(t))return!0;return!1},_validateScanCode:function(e,t){var r,o=e.scannerDetectionData,s=o.options,i=o.options.singleScanQty,a=o.vars.firstCharTime,c=o.vars.lastCharTime,l={};switch(!0){case t.length<s.minLength:l={message:"Receieved code is shorter then minimal length"};break;case c-a>t.length*s.avgTimeByChar:l={message:"Receieved code was not entered in time"};break;default:return s.onScan.call(e,t,i),r=new CustomEvent("scan",{detail:{scanCode:t,qty:i}}),e.dispatchEvent(r),n._reinitialize(e),!0}return l.scanCode=t,l.scanDuration=c-a,l.avgTimeByChar=s.avgTimeByChar,l.minLength=s.minLength,s.onScanError.call(e,l),r=new CustomEvent("scanError",{detail:l}),e.dispatchEvent(r),n._reinitialize(e),!1},_mergeOptions:function(e,t){var n,r={};for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r},_getNormalizedKeyNum:function(e){return e.which||e.keyCode},_handleKeyDown:function(e){var t=n._getNormalizedKeyNum(e),r=this.scannerDetectionData.options,o=this.scannerDetectionData.vars,s=!1;if(!1!==r.onKeyDetect.call(this,t,e)&&!n._isFocusOnIgnoredElement(this))if(!1===r.scanButtonKeyCode||t!=r.scanButtonKeyCode){switch(!0){case o.firstCharTime&&-1!==r.suffixKeyCodes.indexOf(t):e.preventDefault(),e.stopImmediatePropagation(),s=!0;break;case!o.firstCharTime&&-1!==r.prefixKeyCodes.indexOf(t):e.preventDefault(),e.stopImmediatePropagation(),s=!1;break;default:var i=r.keyCodeMapper.call(this,e);if(null===i)return;o.accumulatedString+=i,r.preventDefault&&e.preventDefault(),r.stopPropagation&&e.stopImmediatePropagation(),s=!1}o.firstCharTime||(o.firstCharTime=Date.now()),o.lastCharTime=Date.now(),o.testTimer&&clearTimeout(o.testTimer),s?(n._validateScanCode(this,o.accumulatedString),o.testTimer=!1):o.testTimer=setTimeout(n._validateScanCode,r.timeBeforeScanTest,this,o.accumulatedString),r.onKeyProcess.call(this,i,e)}else o.longPressed||(o.longPressTimer=setTimeout(r.onScanButtonLongPress,r.scanButtonLongPressTime,this),o.longPressed=!0)},_handlePaste:function(e){var t=this.scannerDetectionData.options,r=this.scannerDetectionData.vars,o=(event.clipboardData||window.clipboardData).getData("text");n._isFocusOnIgnoredElement(this)||(e.preventDefault(),t.stopPropagation&&e.stopImmediatePropagation(),t.onPaste.call(this,o,event),r.firstCharTime=0,r.lastCharTime=0,n._validateScanCode(this,o))},_handleKeyUp:function(e){n._isFocusOnIgnoredElement(this)||n._getNormalizedKeyNum(e)==this.scannerDetectionData.options.scanButtonKeyCode&&(clearTimeout(this.scannerDetectionData.vars.longPressTimer),this.scannerDetectionData.vars.longPressed=!1)},isScanInProgressFor:function(e){return e.scannerDetectionData.vars.firstCharTime>0},isAttachedTo:function(e){return void 0!==e.scannerDetectionData}},n)},py(hy={exports:{}}),hy.exports);const fy=n=>{let{scope:r,redirectPath:o,onSuccess:i,onFailure:c,onCancel:l,storeSession:u,title:d,"data-testid":p}=n;const[h,m]=e.useState(""),[f,g]=e.useState(""),{releaseVersion:y,releasePageLink:b}=e.useContext(Qg),v=a.useNavigate(),{t:_}=t.useTranslation(),S=function(e){try{return Promise.resolve(Um.authorize(um({scope:r},e),u)).then(function(e){e?(i&&"function"==typeof i&&i(e),g(""),v(o)):c&&"function"==typeof c&&c()})}catch(e){return Promise.reject(e)}};e.useEffect(()=>(my.attachTo(document,{suffixKeyCodes:[13],onScan:function(e){m(""),g(""),S({username:"code",password:e})}}),()=>{my.detachFrom(document)}),[]);const k=function(e){try{return e.preventDefault(),S({username:h,password:f}),Promise.resolve()}catch(e){return Promise.reject(e)}};/*#__PURE__*/return q.default.createElement("form",{onSubmit:k,"data-testid":p||"ac-sdk-login-form"},/*#__PURE__*/q.default.createElement(s.Box,{m:"0 80px"},/*#__PURE__*/q.default.createElement(s.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,m:"100px 0"},/*#__PURE__*/q.default.createElement(_y,null),y&&/*#__PURE__*/q.default.createElement(s.Link,{href:b,target:"_blank",fontSize:"14px",sx:{display:"flex",alignItems:"center",gap:.5,textDecoration:"none","&:hover":{cursor:"pointer",opacity:.8}}},/*#__PURE__*/q.default.createElement("img",{src:oe.default,alt:"info",width:"14px",height:"14px"}),_("release")," ",y)),/*#__PURE__*/q.default.createElement(s.Box,{m:"0 0 30px 0",color:"rgba(255, 255, 255, 0.6)"},/*#__PURE__*/q.default.createElement(s.Typography,{align:"center",color:"inherit"},d)),/*#__PURE__*/q.default.createElement(s.Box,{m:"0",display:"grid",sx:{gridGap:"18px"},gridTemplateColumns:"1fr"},/*#__PURE__*/q.default.createElement(s.FormControl,{fullWidth:!0},/*#__PURE__*/q.default.createElement(s.TextField,{autoFocus:!0,fullWidth:!0,variant:"outlined",label:_("loginCardUsernameHint"),onChange:e=>{m(e.target.value)},value:h,id:"login-input",inputProps:{"data-testid":"ac-sdk-login-form-username-input"}})),/*#__PURE__*/q.default.createElement(s.FormControl,{fullWidth:!0},/*#__PURE__*/q.default.createElement(s.TextField,{fullWidth:!0,variant:"outlined",label:_("loginCardPasswordHint"),onChange:e=>{g(e.target.value)},value:f,type:"password",id:"password-input",inputProps:{"data-testid":"ac-sdk-login-form-password-input"}})),/*#__PURE__*/q.default.createElement(w.LoadingButton,{id:"login-button",type:"submit",variant:"contained",size:"large",color:"primary",onClick:k,loading:Um.loading,"data-testid":"ac-sdk-login-form-submit-button"},_("loginCardSubmitButton")),/*#__PURE__*/q.default.createElement(s.Button,{id:"cancel-button",type:"button",variant:"outlined",size:"large",color:"secondary",onClick:e=>{l&&"function"==typeof l?l():v("/")},"data-testid":"ac-sdk-login-form-cancel-button"},_("loginCardCancelButton"))),/*#__PURE__*/q.default.createElement(s.Box,{m:"30px 0 40px 0",color:"rgba(255, 255, 255, 0.6)"},/*#__PURE__*/q.default.createElement(s.Typography,{align:"center",color:"inherit"},"or scan")),/*#__PURE__*/q.default.createElement(s.Box,{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",alignItems:"center",justifyItems:"center",marginBottom:"30px"},/*#__PURE__*/q.default.createElement(s.Box,{style:{filter:"brightness(0.5)"}},/*#__PURE__*/q.default.createElement(yy,null)),/*#__PURE__*/q.default.createElement(by,null),/*#__PURE__*/q.default.createElement(s.Box,{style:{filter:"brightness(0.5)"}},/*#__PURE__*/q.default.createElement(vy,null)))))};fy.propTypes={scope:p.PropTypes.string,redirectPath:p.PropTypes.string,onSuccess:p.PropTypes.func,onFailure:p.PropTypes.func,onCancel:p.PropTypes.func,storeSession:p.PropTypes.bool},fy.defaultProps={redirectPath:"/",storeSession:!0};var gy=d.observer(fy);const yy=()=>/*#__PURE__*/q.default.createElement("svg",{width:"51",height:"53",viewBox:"0 0 51 53",fill:"none",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/q.default.createElement("path",{d:"M8.66868 45.6365C8.66868 42.8453 6.99822 41.1535 4.7397 41.1535C2.47266 41.1535 0.806463 42.8453 0.806463 45.6365C0.806463 48.4234 2.47266 50.1194 4.7397 50.1194C5.3022 50.1194 5.82635 50.0172 6.2951 49.8169L7.04084 50.7842H8.38743L7.21129 49.2501C8.1147 48.4873 8.66868 47.243 8.66868 45.6365ZM4.29652 47.1706L5.53658 48.7984C5.28942 48.8794 5.02095 48.9177 4.7397 48.9177C3.23544 48.9177 2.1147 47.7629 2.1147 45.6365C2.1147 43.5101 3.23544 42.3552 4.7397 42.3552C6.2397 42.3552 7.3647 43.5101 7.3647 45.6365C7.3647 46.8297 7.01101 47.7203 6.43146 48.2657L5.59197 47.1706H4.29652ZM10.3104 50.0001H11.6271V46.6976H13.4169C13.4467 46.6976 13.4723 46.6976 13.5021 46.6976L15.2749 50.0001H16.7749L14.8402 46.4675C15.9098 46.0711 16.4425 45.1805 16.4425 44.0086C16.4425 42.4021 15.4453 41.2728 13.4212 41.2728H10.3104V50.0001ZM11.6271 45.564V42.4021H13.2805C14.5803 42.4021 15.1172 43.02 15.1172 44.0086C15.1172 44.993 14.5803 45.564 13.2976 45.564H11.6271ZM28.4691 44.1109C28.1708 42.2444 26.7092 41.1535 24.864 41.1535C22.6055 41.1535 20.9393 42.8453 20.9393 45.6365C20.9393 48.4277 22.5969 50.1194 24.864 50.1194C26.7816 50.1194 28.1836 48.9177 28.4691 47.1919L27.1396 47.1876C26.9137 48.3041 25.9762 48.9177 24.8725 48.9177C23.3768 48.9177 22.2475 47.7714 22.2475 45.6365C22.2475 43.5186 23.3725 42.3552 24.8768 42.3552C25.989 42.3552 26.9222 42.9817 27.1396 44.1109H28.4691ZM32.6996 50.1322C34.5447 50.1322 35.7507 48.7814 35.7507 46.7572C35.7507 44.7203 34.5447 43.3694 32.6996 43.3694C30.8544 43.3694 29.6484 44.7203 29.6484 46.7572C29.6484 48.7814 30.8544 50.1322 32.6996 50.1322ZM32.7038 49.0626C31.4979 49.0626 30.9354 48.0101 30.9354 46.753C30.9354 45.5001 31.4979 44.4348 32.7038 44.4348C33.9013 44.4348 34.4638 45.5001 34.4638 46.753C34.4638 48.0101 33.9013 49.0626 32.7038 49.0626ZM39.6232 50.128C40.8164 50.128 41.2852 49.3993 41.5153 48.9817H41.6218V50.0001H42.8661V41.2728H41.592V44.5157H41.5153C41.2852 44.1109 40.8505 43.3694 39.6317 43.3694C38.0508 43.3694 36.8874 44.618 36.8874 46.7402C36.8874 48.8581 38.0337 50.128 39.6232 50.128ZM39.9045 49.0413C38.7667 49.0413 38.1744 48.0399 38.1744 46.7274C38.1744 45.4277 38.7539 44.4518 39.9045 44.4518C41.0167 44.4518 41.6133 45.3595 41.6133 46.7274C41.6133 48.1038 41.0039 49.0413 39.9045 49.0413ZM47.5057 50.1322C48.9332 50.1322 49.9432 49.4291 50.233 48.3638L49.027 48.1464C48.7969 48.7643 48.2429 49.0797 47.5185 49.0797C46.4276 49.0797 45.6946 48.3723 45.6605 47.1109H50.3139V46.6592C50.3139 44.2942 48.8991 43.3694 47.4162 43.3694C45.5923 43.3694 44.3906 44.7586 44.3906 46.77C44.3906 48.8027 45.5753 50.1322 47.5057 50.1322ZM45.6648 46.1564C45.7159 45.2274 46.3892 44.422 47.4247 44.422C48.4134 44.422 49.0611 45.155 49.0653 46.1564H45.6648Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("g",{clipPath:"url(#clip0_2183_35009)"},/*#__PURE__*/q.default.createElement("path",{d:"M22.3002 3.27948H14.25V11.3318H22.3002V3.27948ZM20.6609 9.66275H15.9186V4.91923H20.6609V9.66275Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M19.1081 6.47128H17.4688V8.11102H19.1081V6.47128Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M14.2773 24.7206H22.3275V16.7122H14.2773V24.7206ZM15.9166 18.3373H20.6589V23.0809H15.9166V18.3373Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M35.7147 17.5176H34.0754V23.081H32.4653V21.8366H30.826V23.0591H28.8281V24.6988H35.7147V17.5176Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M19.1081 19.8893H17.4688V21.529H19.1081V19.8893Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M35.7142 3.27948H27.6641V11.3318H35.7142V3.27948ZM34.0749 9.66275H29.318V4.91923H34.0603L34.0749 9.66275Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M32.5221 6.47128H30.8828V8.11102H32.5221V6.47128Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M22.3014 13.184H17.5664V14.8237H22.3014V13.184Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M15.9167 13.184H14.2773V14.8237H15.9167V13.184Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M30.041 13.184H23.9375V14.8237H30.041V13.184Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M35.7121 15.8778V13.1766H31.6797V14.8237H34.0728V15.8778H35.7121Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M25.819 6.56622H24.1797V11.3024H25.819V6.56622Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M25.819 3.27948H24.1797V4.91922H25.819V3.27948Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M25.82 21.4338H27.0348V19.7941H25.82V16.7122H24.1953V24.7645H27.1958V23.0809H25.8346L25.82 21.4338Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M29.1874 19.5598H30.8267V18.3373H32.1587V16.7122H27.8555V18.352H29.1874V19.5598Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M33.2539 6.42268e-05V1.6398H37.3668V5.73182H39.0061V-0.00726318L33.2539 6.42268e-05Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M12.6408 1.63985H16.7391V0.00012207H11.0234V5.73188H12.6627L12.6408 1.63985Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M37.3678 26.3603H33.2695V28.0001H39.0071V22.261H37.3678V26.3603Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M12.6408 22.261H11.0234V28.0001H16.761V26.3603H12.6627L12.6408 22.261Z",fill:"white",fillOpacity:"0.35"})),/*#__PURE__*/q.default.createElement("defs",null,/*#__PURE__*/q.default.createElement("clipPath",{id:"clip0_2183_35009"},/*#__PURE__*/q.default.createElement("rect",{width:"28",height:"28",fill:"white",transform:"translate(11 0.00012207)"})))),by=()=>/*#__PURE__*/q.default.createElement("svg",{width:"52",height:"49",viewBox:"0 0 52 49",fill:"none",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/q.default.createElement("path",{d:"M1.42951 46.0001H4.77468C6.80309 46.0001 7.71928 44.9902 7.71928 43.6521C7.71928 42.3013 6.77326 41.5385 5.9082 41.4916V41.4064C6.70934 41.2018 7.37837 40.6564 7.37837 39.5655C7.37837 38.2743 6.48349 37.2728 4.62553 37.2728H1.42951V46.0001ZM2.74627 44.8709V42.0754H4.69371C5.75053 42.0754 6.41104 42.7572 6.41104 43.5882C6.41104 44.3211 5.91246 44.8709 4.64684 44.8709H2.74627ZM2.74627 41.0484V38.3936H4.54457C5.5886 38.3936 6.08718 38.9433 6.08718 39.6677C6.08718 40.5115 5.39684 41.0484 4.51048 41.0484H2.74627ZM11.0836 46.145C12.166 46.145 12.7754 45.5953 13.0183 45.1052H13.0694V46.0001H14.3137V41.6535C14.3137 39.7487 12.8137 39.3694 11.774 39.3694C10.5893 39.3694 9.4984 39.8467 9.07227 41.0399L10.2697 41.3126C10.4572 40.8481 10.9345 40.4007 11.791 40.4007C12.6135 40.4007 13.0353 40.8311 13.0353 41.5726V41.6024C13.0353 42.0669 12.5581 42.0584 11.3819 42.1947C10.1419 42.3396 8.87198 42.6635 8.87198 44.1507C8.87198 45.4376 9.83931 46.145 11.0836 46.145ZM11.3606 45.1223C10.6404 45.1223 10.1206 44.7984 10.1206 44.1677C10.1206 43.4859 10.7257 43.243 11.4629 43.145C11.8762 43.0896 12.8564 42.9788 13.0396 42.7956V43.6393C13.0396 44.4149 12.4217 45.1223 11.3606 45.1223ZM16.0108 46.0001H17.285V42.003C17.285 41.1464 17.9455 40.5285 18.8489 40.5285C19.1131 40.5285 19.4114 40.5754 19.5137 40.6052V39.3865C19.3858 39.3694 19.1344 39.3567 18.9725 39.3567C18.2054 39.3567 17.5492 39.7913 17.3105 40.4944H17.2424V39.4547H16.0108V46.0001ZM26.5492 46.1322C28.0961 46.1322 29.0975 45.2032 29.2381 43.9291H27.998C27.8361 44.6365 27.2864 45.0541 26.5577 45.0541C25.4796 45.0541 24.785 44.155 24.785 42.7274C24.785 41.3254 25.4924 40.4433 26.5577 40.4433C27.3674 40.4433 27.8617 40.9547 27.998 41.5683H29.2381C29.1017 40.2473 28.0236 39.3694 26.5364 39.3694C24.6912 39.3694 23.498 40.7586 23.498 42.7572C23.498 44.7302 24.6486 46.1322 26.5492 46.1322ZM33.3578 46.1322C35.2029 46.1322 36.4089 44.7814 36.4089 42.7572C36.4089 40.7203 35.2029 39.3694 33.3578 39.3694C31.5126 39.3694 30.3066 40.7203 30.3066 42.7572C30.3066 44.7814 31.5126 46.1322 33.3578 46.1322ZM33.362 45.0626C32.1561 45.0626 31.5936 44.0101 31.5936 42.753C31.5936 41.5001 32.1561 40.4348 33.362 40.4348C34.5595 40.4348 35.122 41.5001 35.122 42.753C35.122 44.0101 34.5595 45.0626 33.362 45.0626ZM40.2814 46.128C41.4746 46.128 41.9434 45.3993 42.1735 44.9817H42.28V46.0001H43.5243V37.2728H42.2502V40.5157H42.1735C41.9434 40.1109 41.5087 39.3694 40.29 39.3694C38.709 39.3694 37.5456 40.618 37.5456 42.7402C37.5456 44.8581 38.6919 46.128 40.2814 46.128ZM40.5627 45.0413C39.4249 45.0413 38.8326 44.0399 38.8326 42.7274C38.8326 41.4277 39.4121 40.4518 40.5627 40.4518C41.6749 40.4518 42.2715 41.3595 42.2715 42.7274C42.2715 44.1038 41.6621 45.0413 40.5627 45.0413ZM48.1639 46.1322C49.5914 46.1322 50.6014 45.4291 50.8912 44.3638L49.6852 44.1464C49.4551 44.7643 48.9011 45.0797 48.1767 45.0797C47.0858 45.0797 46.3528 44.3723 46.3187 43.1109H50.9721V42.6592C50.9721 40.2942 49.5574 39.3694 48.0744 39.3694C46.2505 39.3694 45.0488 40.7586 45.0488 42.77C45.0488 44.8027 46.2335 46.1322 48.1639 46.1322ZM46.323 42.1564C46.3741 41.2274 47.0474 40.422 48.0829 40.422C49.0716 40.422 49.7193 41.155 49.7235 42.1564H46.323Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("g",{clipPath:"url(#clip0_2183_35008)"},/*#__PURE__*/q.default.createElement("path",{d:"M47 9.00012H7V10.0001H47V9.00012Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M43 0.00012207H42V7.00012H43V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M43 12.0001H42V19.0001H43V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M41 12.0001H39V19.0001H41V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M41 0.00012207H39V7.00012H41V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M38 0.00012207H35V7.00012H38V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M38 12.0001H35V19.0001H38V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M33 12.0001H31V19.0001H33V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M33 0.00012207H31V7.00012H33V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M30 0.00012207H28V7.00012H30V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M30 12.0001H28V19.0001H30V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M27 0.00012207H26V7.00012H27V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M27 12.0001H26V19.0001H27V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M25 0.00012207H24V7.00012H25V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M25 12.0001H24V19.0001H25V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M23 0.00012207H20V7.00012H23V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M23 12.0001H20V19.0001H23V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M18 0.00012207H16V7.00012H18V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M18 12.0001H16V19.0001H18V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M15 12.0001H14V19.0001H15V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M15 0.00012207H14V7.00012H15V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M13 0.00012207H10V7.00012H13V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M13 12.0001H10V19.0001H13V12.0001Z",fill:"white",fillOpacity:"0.35"})),/*#__PURE__*/q.default.createElement("defs",null,/*#__PURE__*/q.default.createElement("clipPath",{id:"clip0_2183_35008"},/*#__PURE__*/q.default.createElement("rect",{width:"40",height:"20",fill:"white",transform:"translate(7 0.00012207)"})))),vy=()=>/*#__PURE__*/q.default.createElement("svg",{width:"58",height:"49",viewBox:"0 0 58 49",fill:"none",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/q.default.createElement("path",{d:"M1.27131 46.0001H2.58807V42.6976H4.37784C4.40767 42.6976 4.43324 42.6976 4.46307 42.6976L6.2358 46.0001H7.7358L5.80114 42.4675C6.87074 42.0711 7.40341 41.1805 7.40341 40.0086C7.40341 38.4021 6.40625 37.2728 4.3821 37.2728H1.27131V46.0001ZM2.58807 41.564V38.4021H4.24148C5.54119 38.4021 6.07812 39.02 6.07812 40.0086C6.07812 40.993 5.54119 41.564 4.25852 41.564H2.58807ZM10.3224 37.2728H9.00568V46.0001H10.3224V37.2728ZM12.2401 46.0001H13.5568V42.1947H17.2642V41.0655H13.5568V38.4064H17.652V37.2728H12.2401V46.0001ZM22.0966 46.0001C24.7557 46.0001 26.294 44.351 26.294 41.6237C26.294 38.9092 24.7557 37.2728 22.1861 37.2728H19.2713V46.0001H22.0966ZM20.5881 44.8496V38.4234H22.1051C24.0142 38.4234 24.9986 39.5655 24.9986 41.6237C24.9986 43.6905 24.0142 44.8496 22.0241 44.8496H20.5881ZM38.3558 40.1109C38.0575 38.2444 36.5959 37.1535 34.7507 37.1535C32.4922 37.1535 30.826 38.8453 30.826 41.6365C30.826 44.4277 32.4837 46.1194 34.7507 46.1194C36.6683 46.1194 38.0703 44.9177 38.3558 43.1919L37.0263 43.1876C36.8004 44.3041 35.8629 44.9177 34.7592 44.9177C33.2635 44.9177 32.1342 43.7714 32.1342 41.6365C32.1342 39.5186 33.2592 38.3552 34.7635 38.3552C35.8757 38.3552 36.8089 38.9817 37.0263 40.1109H38.3558ZM41.734 46.145C42.8164 46.145 43.4258 45.5953 43.6687 45.1052H43.7198V46.0001H44.9641V41.6535C44.9641 39.7487 43.4641 39.3694 42.4244 39.3694C41.2397 39.3694 40.1488 39.8467 39.7227 41.0399L40.9201 41.3126C41.1076 40.8481 41.5849 40.4007 42.4414 40.4007C43.2638 40.4007 43.6857 40.8311 43.6857 41.5726V41.6024C43.6857 42.0669 43.2085 42.0584 42.0323 42.1947C40.7923 42.3396 39.5224 42.6635 39.5224 44.1507C39.5224 45.4376 40.4897 46.145 41.734 46.145ZM42.011 45.1223C41.2908 45.1223 40.771 44.7984 40.771 44.1677C40.771 43.4859 41.3761 43.243 42.1133 43.145C42.5266 43.0896 43.5067 42.9788 43.69 42.7956V43.6393C43.69 44.4149 43.0721 45.1223 42.011 45.1223ZM46.6612 46.0001H47.9354V42.003C47.9354 41.1464 48.5959 40.5285 49.4993 40.5285C49.7635 40.5285 50.0618 40.5754 50.1641 40.6052V39.3865C50.0362 39.3694 49.7848 39.3567 49.6229 39.3567C48.8558 39.3567 48.1996 39.7913 47.9609 40.4944H47.8928V39.4547H46.6612V46.0001ZM53.4826 46.128C54.6758 46.128 55.1445 45.3993 55.3746 44.9817H55.4812V46.0001H56.7255V37.2728H55.4513V40.5157H55.3746C55.1445 40.1109 54.7099 39.3694 53.4911 39.3694C51.9102 39.3694 50.7468 40.618 50.7468 42.7402C50.7468 44.8581 51.8931 46.128 53.4826 46.128ZM53.7638 45.0413C52.6261 45.0413 52.0337 44.0399 52.0337 42.7274C52.0337 41.4277 52.6133 40.4518 53.7638 40.4518C54.8761 40.4518 55.4727 41.3595 55.4727 42.7274C55.4727 44.1038 54.8633 45.0413 53.7638 45.0413Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("g",{clipPath:"url(#clip0_2183_35036)"},/*#__PURE__*/q.default.createElement("path",{d:"M19.5998 19.9927H38.3927C40.7673 19.9927 41.9924 18.8037 41.9924 16.5215V3.47133C41.9924 1.1892 40.7673 0.00012207 38.3927 0.00012207H19.5998C17.2251 0.00012207 16 1.17443 16 3.47133V16.5215C16 18.8037 17.2251 19.9927 19.5998 19.9927ZM19.7283 17.8953C19.5129 17.9222 19.294 17.9003 19.0886 17.8313C18.8832 17.7623 18.6969 17.648 18.544 17.4973C18.3911 17.3466 18.2759 17.1635 18.2072 16.9623C18.1385 16.761 18.1181 16.547 18.1478 16.3369V3.64857C18.1197 3.43872 18.1411 3.22539 18.2104 3.02486C18.2796 2.82432 18.3949 2.6419 18.5474 2.49154C18.6999 2.34118 18.8856 2.22684 19.0903 2.15729C19.295 2.08774 19.5132 2.06481 19.7283 2.09024H38.2641C38.4792 2.06481 38.6975 2.08774 38.9022 2.15729C39.1068 2.22684 39.2925 2.34118 39.445 2.49154C39.5975 2.6419 39.7128 2.82432 39.7821 3.02486C39.8513 3.22539 39.8728 3.43872 39.8447 3.64857V16.3369C39.8728 16.5468 39.8513 16.7601 39.7821 16.9606C39.7128 17.1612 39.5975 17.3436 39.445 17.494C39.2925 17.6443 39.1068 17.7586 38.9022 17.8282C38.6975 17.8977 38.4792 17.9207 38.2641 17.8953H19.7283ZM24.5759 9.93366C24.9027 9.92527 25.2245 9.85291 25.5221 9.72085C25.8197 9.58879 26.0872 9.39974 26.3086 9.16488C26.5301 8.93003 26.701 8.65415 26.8112 8.3536C26.9215 8.05305 26.9689 7.73395 26.9505 7.41519C26.9123 6.96482 26.7407 6.53505 26.4565 6.1784C26.1723 5.82175 25.7879 5.55367 25.3502 5.40689C24.9125 5.26012 24.4405 5.24101 23.9919 5.3519C23.5433 5.46279 23.1375 5.69889 22.8241 6.03133C22.5106 6.36378 22.3031 6.77819 22.2269 7.22393C22.1506 7.66967 22.2089 8.12746 22.3947 8.54135C22.5805 8.95524 22.8858 9.3073 23.2731 9.55456C23.6605 9.80182 24.1132 9.93355 24.5759 9.93366ZM31.6091 6.54371H37.3112C37.4038 6.54577 37.4958 6.52936 37.5817 6.49548C37.6676 6.46159 37.7455 6.41095 37.8106 6.34665C37.8757 6.28235 37.9268 6.20575 37.9605 6.12153C37.9943 6.03731 38.0101 5.94725 38.007 5.85686C38.008 5.76802 37.9907 5.67989 37.9559 5.5978C37.9211 5.51571 37.8697 5.44134 37.8047 5.37922C37.7396 5.31709 37.6624 5.2685 37.5776 5.23634C37.4927 5.20419 37.4021 5.18914 37.3112 5.19214H31.6469C31.556 5.18914 31.4654 5.20419 31.3806 5.23634C31.2958 5.2685 31.2185 5.31709 31.1535 5.37922C31.0885 5.44134 31.037 5.51571 31.0022 5.5978C30.9674 5.67989 30.9501 5.76802 30.9511 5.85686C30.948 5.94725 30.9638 6.03731 30.9976 6.12153C31.0313 6.20575 31.0824 6.28235 31.1475 6.34665C31.2126 6.41095 31.2905 6.46159 31.3764 6.49548C31.4623 6.52936 31.5543 6.54577 31.6469 6.54371H31.6091ZM31.6091 10.6796H37.3112C37.4957 10.6796 37.6727 10.608 37.8032 10.4806C37.9337 10.3532 38.007 10.1803 38.007 10.0001C38.007 9.81992 37.9337 9.64709 37.8032 9.51967C37.6727 9.39224 37.4957 9.32065 37.3112 9.32065H31.6469C31.4624 9.32065 31.2854 9.39224 31.1549 9.51967C31.0245 9.64709 30.9511 9.81992 30.9511 10.0001C30.9511 10.1803 31.0245 10.3532 31.1549 10.4806C31.2854 10.608 31.4624 10.6796 31.6469 10.6796H31.6091ZM20.4392 14.8081H28.7126C28.796 14.8129 28.8794 14.7998 28.9571 14.7699C29.0347 14.74 29.1048 14.6939 29.1624 14.6349C29.22 14.5758 29.2637 14.5052 29.2905 14.428C29.3173 14.3508 29.3265 14.2688 29.3176 14.1877C29.3176 13.1907 27.8051 10.6501 24.5759 10.6501C21.3467 10.6501 19.8494 13.1907 19.8494 14.1877C19.8394 14.2678 19.8473 14.3489 19.8728 14.4256C19.8983 14.5023 19.9406 14.5726 19.9967 14.6317C20.0529 14.6908 20.1216 14.7372 20.198 14.7677C20.2745 14.7981 20.3567 14.8119 20.4392 14.8081ZM31.6091 14.8081H37.3112C37.4021 14.8111 37.4927 14.7961 37.5776 14.7639C37.6624 14.7318 37.7396 14.6832 37.8047 14.621C37.8697 14.5589 37.9211 14.4846 37.9559 14.4025C37.9907 14.3204 38.008 14.2322 38.007 14.1434C38.009 14.0529 37.9925 13.963 37.9584 13.8789C37.9243 13.7947 37.8734 13.718 37.8086 13.6534C37.7438 13.5887 37.6664 13.5373 37.581 13.5023C37.4956 13.4672 37.4039 13.4492 37.3112 13.4492H31.6469C31.5542 13.4492 31.4625 13.4672 31.3771 13.5023C31.2917 13.5373 31.2143 13.5887 31.1495 13.6534C31.0847 13.718 31.0338 13.7947 30.9997 13.8789C30.9656 13.963 30.9491 14.0529 30.9511 14.1434C30.9501 14.2322 30.9674 14.3204 31.0022 14.4025C31.037 14.4846 31.0885 14.5589 31.1535 14.621C31.2185 14.6832 31.2958 14.7318 31.3806 14.7639C31.4654 14.7961 31.556 14.8111 31.6469 14.8081H31.6091Z",fill:"white",fillOpacity:"0.35"})),/*#__PURE__*/q.default.createElement("defs",null,/*#__PURE__*/q.default.createElement("clipPath",{id:"clip0_2183_35036"},/*#__PURE__*/q.default.createElement("rect",{width:"26",height:"20",fill:"white",transform:"translate(16 0.00012207)"})))),_y=()=>/*#__PURE__*/q.default.createElement("svg",{width:"98",height:"50",viewBox:"0 0 98 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/q.default.createElement("g",{opacity:"0.25"},/*#__PURE__*/q.default.createElement("path",{d:"M66.8428 0.85791C66.2106 2.00303 65.7681 3.21177 65.3888 4.48413C64.883 4.54775 64.4405 4.61136 63.998 4.67498C63.5555 4.80222 63.0497 4.92945 62.6072 5.05669C61.8486 4.0388 61.0267 3.08453 60.0784 2.19388C59.4463 2.51197 58.8141 2.83006 58.1819 3.27539C58.3716 4.54774 58.6876 5.8201 59.1302 7.09246C58.7509 7.41055 58.4348 7.72864 58.1187 8.11034C57.8026 8.49205 57.4865 8.81014 57.2336 9.25547C56.0325 8.87376 54.7681 8.55567 53.5038 8.42843C53.1245 9.06461 52.8716 9.76441 52.6187 10.4006C53.5038 11.3549 54.5153 12.1819 55.59 12.8817C55.3371 13.8359 55.2107 14.7902 55.2739 15.7445C54.0727 16.1262 52.8716 16.6351 51.7969 17.2713C51.8601 17.9711 51.9865 18.7345 52.2394 19.4343C53.5038 19.6888 54.8313 19.7524 56.0957 19.6888C56.2854 20.1341 56.475 20.5794 56.7279 20.9611C56.9808 21.4065 57.2336 21.7882 57.4865 22.1699C56.7279 23.1878 56.0957 24.3329 55.5267 25.478C56.0325 25.987 56.5382 26.4959 57.1072 26.9412C58.2451 26.3687 59.383 25.6689 60.3945 24.8418C60.7738 25.0963 61.2164 25.3508 61.6589 25.5416C62.1014 25.7325 62.544 25.9233 62.9865 26.0506C62.9865 27.3229 63.1129 28.5953 63.3658 29.8676C64.0612 29.9949 64.8198 30.1221 65.5152 30.1221C66.1474 28.977 66.5899 27.7683 66.9692 26.4959C67.475 26.4323 67.9175 26.3687 68.36 26.305C68.8026 26.1778 69.3083 26.0506 69.7508 25.9233C70.5094 26.9412 71.3313 27.8955 72.2796 28.7861C72.9117 28.4681 73.5439 28.15 74.1761 27.7046C73.9864 26.4323 73.6704 25.1599 73.2278 23.8876C73.6071 23.5695 73.9232 23.2514 74.2393 22.8697C74.5554 22.488 74.8715 22.1699 75.1244 21.7246C76.3255 22.1063 77.5899 22.4244 78.8543 22.5516C79.2336 21.9154 79.4864 21.2156 79.7393 20.5794C78.8542 19.6252 77.8428 18.7981 76.7681 18.0983C77.0209 17.1441 77.1474 16.1898 77.0841 15.2355C78.2853 14.8538 79.4864 14.3449 80.5611 13.7087C80.4979 13.0089 80.3715 12.2455 80.1186 11.5457C78.8543 11.2912 77.5267 11.2276 76.2623 11.2912C76.0727 10.8459 75.883 10.4006 75.6301 10.0189C75.3773 9.57355 75.1244 9.19185 74.8715 8.81014C75.6301 7.79225 76.2623 6.64713 76.8313 5.50201C76.3255 4.99307 75.8198 4.48413 75.2508 4.0388C74.1129 4.61136 72.975 5.31116 71.9635 6.13819C71.5842 5.88372 71.1416 5.62925 70.6991 5.4384C70.2566 5.24754 69.8141 5.05669 69.3715 4.92945C69.3715 3.6571 69.2451 2.38474 68.9922 1.11238C68.2336 0.985147 67.5382 0.85791 66.8428 0.85791ZM68.929 9.25547C72.3428 10.8459 73.7968 14.8538 72.2796 18.2256C71.3945 20.1977 69.6244 21.5973 67.5382 22.0427C66.1474 22.2971 64.6934 22.1699 63.429 21.5973C60.0152 20.0069 58.5612 15.999 60.0784 12.6272C60.9635 10.6551 62.7336 9.25546 64.8198 8.81014C66.2106 8.49205 67.6646 8.6829 68.929 9.25547Z",fill:"white"}),/*#__PURE__*/q.default.createElement("path",{d:"M6.03298 22.8689L5.02149 29.2307H0.722656L5.4008 1.55695H11.0904L15.7054 29.2307H11.3433L10.395 22.8689H6.03298ZM8.1824 7.85511L6.66517 18.7974H9.76286L8.1824 7.85511Z",fill:"white"}),/*#__PURE__*/q.default.createElement("path",{d:"M23.861 1.49487L29.361 20.0713V1.49487H33.5334V29.1686H29.1081L23.4185 11.4193V29.1686H19.2461V1.49487H23.861Z",fill:"white"}),/*#__PURE__*/q.default.createElement("path",{d:"M50.2261 22.5524C50.2261 24.3337 49.5307 25.9878 48.3295 27.1965C47.1284 28.4688 45.4847 29.1686 43.7146 29.1686H37.2031V1.49487H43.7146C45.4847 1.49487 47.1284 2.19467 48.3295 3.46703C49.5939 4.67577 50.2261 6.39345 50.2261 8.11113V22.5524ZM41.3123 25.0971H43.7778C44.41 25.0971 45.0422 24.8426 45.4215 24.3973C45.864 23.952 46.1169 23.3158 46.1169 22.6796V8.17475C46.1169 7.53857 45.864 6.90239 45.4215 6.45707C44.979 6.01174 44.41 5.75727 43.7778 5.75727H41.3123V25.0971Z",fill:"white"}),/*#__PURE__*/q.default.createElement("path",{d:"M4.83183 49.0815C2.55598 49.0815 0.722656 47.2366 0.722656 45.01C0.722656 45.01 0.722656 45.01 0.722656 44.9464V35.5309C0.722656 33.2407 2.49276 31.3958 4.76862 31.3322C7.04447 31.2685 8.8778 33.1135 8.94101 35.4037C8.94101 35.4673 8.94101 35.4673 8.94101 35.5309V37.5031H6.28585V35.4673C6.28585 34.6403 5.59045 33.9405 4.76862 33.9405C4.38931 33.9405 4.01 34.0677 3.69391 34.3858C3.44104 34.6403 3.25138 35.022 3.25138 35.4673V44.9464C3.25138 45.7734 3.88356 46.4096 4.7054 46.4096C5.08471 46.4096 5.46402 46.2824 5.78011 45.9643C6.0962 45.7098 6.22263 45.3281 6.22263 44.8828V42.5289H8.94101V44.9464C8.94101 47.2366 7.10769 49.0815 4.83183 49.0815Z",fill:"white"}),/*#__PURE__*/q.default.createElement("path",{d:"M30.1227 48.8867H23.1055V31.6463H25.6974V46.342H30.1859L30.1227 48.8867Z",fill:"white"}),/*#__PURE__*/q.default.createElement("path",{d:"M48.0115 31.4559C50.2874 31.4559 52.1207 33.3009 52.1207 35.5911V45.0065C52.1207 47.2968 50.2874 49.1417 48.0115 49.1417C46.9368 49.1417 45.8621 48.6964 45.1035 47.933C44.3449 47.1696 43.9023 46.088 43.9023 45.0065V35.5911C43.9023 33.3009 45.7357 31.4559 48.0115 31.4559ZM49.4023 35.5275C49.4023 34.7004 48.7701 34.0643 47.9483 34.0643C47.569 34.0643 47.1897 34.1915 46.8736 34.5096C46.5575 34.7641 46.4311 35.1458 46.4311 35.5911V45.0065C46.4311 45.3883 46.5575 45.77 46.8736 46.0244C47.1265 46.2789 47.5058 46.4698 47.9483 46.4698C48.7701 46.4698 49.4023 45.8336 49.4023 45.0065V35.5275Z",fill:"white"}),/*#__PURE__*/q.default.createElement("path",{d:"M70.4451 49.0776C68.2325 49.0776 66.3992 47.2963 66.3359 45.0061V31.6463H68.8647V45.0061C68.8647 45.3878 68.9911 45.7695 69.3072 46.0876C69.5601 46.342 69.9394 46.5329 70.3819 46.5329C71.2037 46.5329 71.8359 45.8967 71.8359 45.0697V31.7099H74.5543V45.0697C74.5543 46.1512 74.1118 47.2327 73.3531 47.9961C72.5945 48.6959 71.583 49.1412 70.4451 49.0776Z",fill:"white"}),/*#__PURE__*/q.default.createElement("path",{d:"M97.0021 44.7516C97.0021 45.8331 96.5595 46.9146 95.8009 47.678C95.0423 48.4414 94.0308 48.8867 92.9561 48.8867H88.9102V31.6463H92.9561C94.0308 31.6463 95.1055 32.0916 95.8009 32.855C96.5595 33.6185 97.0021 34.7 97.0021 35.7815V44.7516ZM91.5021 46.342H93.0826C93.4619 46.342 93.8412 46.2148 94.094 45.8967C94.3469 45.6422 94.5366 45.2605 94.5366 44.8152V35.7815C94.5366 35.3998 94.4101 35.018 94.094 34.7C93.8412 34.4455 93.4619 34.2546 93.0826 34.2546H91.5021V46.342Z",fill:"white"}),/*#__PURE__*/q.default.createElement("path",{d:"M87.2555 1.49487L92.7555 20.0713V1.49487H96.9279V29.1686H92.5027L86.813 11.4193V29.1686H82.6406V1.49487H87.2555Z",fill:"white"}))),Sy=e=>{let{open:n,subtitle:r,scope:o,redirectPath:s,onSuccess:i,onFailure:a,onCancel:c,storeSession:l,"data-testid":u}=e;const{t:d}=t.useTranslation();/*#__PURE__*/return q.default.createElement(ne.default,{open:n,onClose:c,disableEscapeKeyDown:!0,sx:{".MuiPaper-root":{borderRadius:"20px"}},"data-testid":u||"ac-sdk-login-modal"},/*#__PURE__*/q.default.createElement(re.default,null,/*#__PURE__*/q.default.createElement(gy,{title:void 0!==r?r:d("loginFormText"),scope:o,redirectPath:s,onSuccess:i,onFailure:a,onCancel:c,storeSession:l})))};Sy.propTypes={title:p.PropTypes.string,subtitle:p.PropTypes.string,scope:p.PropTypes.string,redirectPath:p.PropTypes.string,onSuccess:p.PropTypes.func,onFailure:p.PropTypes.func,onCancel:p.PropTypes.func,storeSession:p.PropTypes.bool},Sy.defaultProps={redirectPath:"/",storeSession:!1};var wy=d.observer(Sy);const ky=t=>{let{isOpen:n,title:r,subtitle:o,scope:s,redirectPath:i,onSuccess:a,onFailure:c,onCancel:l,storeSession:u=!0}=t;const[d,p]=e.useState(n);return e.useEffect(()=>{p(n)},[n]),/*#__PURE__*/q.default.createElement(wy,{open:d,title:r,subtitle:o,scope:s,redirectPath:i,onSuccess:e=>{a&&"function"==typeof a&&a(e),p(!1)},onFailure:c,onCancel:()=>{l&&"function"==typeof l&&l(),p(!1)},storeSession:u})},Ey=function(e,t){void 0===t&&(t={});const{loginUrl:n,clientId:r,grantType:o,redirectUri:s,redirectPath:i}=Xg(),[a]=Zm(ky,um({scope:e},t)),{redirectPath:c}=t,l=encodeURIComponent(s+"?next="+(c||i));return"password"===o?()=>{a({key:(new Date).getTime()})}:()=>{window.location.assign(n+"?response_type=code&client_id="+r+"&redirect_uri="+l+"&scope="+e)}};var Cy=Object.getOwnPropertySymbols,xy=Object.prototype.hasOwnProperty,Ty=Object.prototype.propertyIsEnumerable,Iy=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,o=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s<arguments.length;s++){for(var i in n=Object(arguments[s]))xy.call(n,i)&&(o[i]=n[i]);if(Cy){r=Cy(n);for(var a=0;a<r.length;a++)Ty.call(n,r[a])&&(o[r[a]]=n[r[a]])}}return o};const My=({url:e,allowFullScreen:t,position:n,display:r,height:o,width:s,overflow:i,styles:a,onLoad:c,onMouseOver:l,onMouseOut:u,scrolling:d,id:p,frameBorder:h,ariaHidden:m,sandbox:f,allow:g,className:y,title:b,ariaLabel:v,ariaLabelledby:_,name:S,target:w,loading:k,importance:E,referrerpolicy:C,allowpaymentrequest:x,src:T,key:I})=>{const M=Iy({src:T||e,target:w||null,style:{position:n||null,display:r||"initial",overflow:i||null},scrolling:d||null,allowpaymentrequest:x||null,importance:E||null,sandbox:f&&[...f].join(" ")||null,loading:k||null,styles:a||null,name:S||null,className:y||null,allowFullScreen:"allowFullScreen",referrerpolicy:C||null,title:b||null,allow:g||null,id:p||null,"aria-labelledby":_||null,"aria-hidden":m||null,"aria-label":v||null,width:s||null,height:o||null,onLoad:c||null,onMouseOver:l||null,onMouseOut:u||null,key:I||"iframe"});let O=Object.create(null);for(let e of Object.keys(M))null!=M[e]&&(O[e]=M[e]);for(let e of Object.keys(O.style))null==O.style[e]&&delete O.style[e];if(O.styles)for(let e of Object.keys(O.styles))O.styles.hasOwnProperty(e)&&(O.style[e]=O.styles[e]),Object.keys(O.styles).pop()==e&&delete O.styles;if(t)if("allow"in O){const e=O.allow.replace("fullscreen","");O.allow=`fullscreen ${e.trim()}`.trim()}else O.allow="fullscreen";return h>=0&&(O.style.hasOwnProperty("border")||(O.style.border=h)),q.default.createElement("iframe",Object.assign({},O))},Oy=t=>{let{src:n}=t;const{setIframeMounted:r}=Zg();return e.useEffect(()=>(r(!0),()=>r(!1)),[r]),/*#__PURE__*/q.default.createElement(My,{id:"external-content-iframe",src:n,width:"100%",frameBorder:"0",styles:{display:"block",height:"calc(100vh - 92px)"}})},Py=n=>{var r;let{position:o,scrolled:s,showAcLogo:i,leadingText:c,title:l,titleStyles:d,content:p,contentStyles:h,navProps:m,userProps:f,menuProps:g,sidebarEnabled:y,sidebarOpen:b,onSidebarToggle:v,styles:_,"data-testid":S}=n;const{baseUrl:w}=Xg(),k=u.useTheme(),E=be.default(k.breakpoints.up("md")),[C,x]=e.useState(c),[T,M]=e.useState(l),{t:O}=t.useTranslation(),{items:P}=um({items:[]},m),{show:R,showCompanyLogo:A}=um({show:!0,showCompanyLogo:!1},f),{items:D,buttonColor:L,dropdownStyles:N,styles:j}=um({items:[],buttonColor:"white",dropdownStyles:{},styles:{}},g),[z,$]=e.useState(new Date),[H,F]=e.useState(null),B=(e=>{let{styles:t,titleStyles:n,contentStyles:r,menuStyles:o,menuDropdownStyles:s}=e;return{root:um({padding:"10px 0",color:"rgba(255,255,255,0.85)",background:"transparent",zIndex:1201},t),leadingText:{display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":"2",maxHeight:"2em",marginRight:"8px",lineHeight:"1em",overflow:"hidden",textOverflow:"ellipsis"},title:um({display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":"2",maxHeight:"2em",marginRight:"8px",lineHeight:"1em",overflow:"hidden",textOverflow:"ellipsis",flexGrow:1},n),content:um({display:"flex",flexGrow:1,alignItems:"center",marginRight:"8px"},r),nav:{marginRight:"10px"},user:{},userInfo:{marginLeft:"0.5em",color:"rgba(255,255,255,0.5)"},button:{height:"50px",marginRight:"10px",fontSize:"16px",fontWeight:600,backgroundColor:"#1B2027",boxShadow:"0px 2px 5px rgba(0, 0, 0, 0.28)",borderRadius:"4px","&:hover":{backgroundColor:"#252A32",filter:"brightness(1.1)"}},loginButton:{padding:"6px 18px"},logoutButton:{paddingRight:"18px"},menu:um({marginTop:"62px",backgroundColor:"rgba(0,0,0,0.5)"},o,{"& .MuiPaper-root":um({minWidth:"20%",backgroundColor:"#2d2d2d",color:"#E0E0E0"},s)})}})({styles:_,titleStyles:d,contentStyles:h,menuStyles:j,menuDropdownStyles:N}),[U,V]=e.useState({}),W=e.useMemo(()=>Object.keys(B).reduce((e,t)=>(e[t]=mf(B[t]||{},U[t]||{}),e),{}),[B,U]),K=a.useNavigate();e.useEffect(()=>{const e=setInterval(()=>{$(new Date)},1e3);return()=>clearInterval(e)}),e.useEffect(()=>{x(c)},[c]),e.useEffect(()=>{M(l)},[l]),e.useEffect(()=>{const e=e=>{if(!Hg(e.origin))return;const t=e.data;if(t&&"object"==typeof t)switch(t.type){case"SET_HEADER_LEADING_TEXT":"string"==typeof t.text&&x(t.text);break;case"RESET_HEADER_LEADING_TEXT":x(c);break;case"SET_HEADER_TITLE":"string"==typeof t.title&&M(t.title);break;case"RESET_HEADER_TITLE":M(l);break;case"SET_HEADER_STYLES":const e=t.target||"root";"object"==typeof t.styles&&V(n=>um({},n,{[e]:mf(n[e]||{},t.styles)}));break;case"RESET_HEADER_STYLES":const n=t.target;V(e=>{if(n){const t=um({},e);return delete t[n],t}return{}})}};return window.addEventListener("message",e),()=>window.removeEventListener("message",e)},[c,l]);const Z=()=>{F(null)},G=e=>{e.url?K(e.url):e.action&&"function"==typeof e.action&&e.action(),Z()},Y=function(){try{return Promise.resolve(Um.logout()).then(function(){K("/")})}catch(e){return Promise.reject(e)}};/*#__PURE__*/return q.default.createElement(de.default,{position:o,elevation:0,sx:um({},W.root,"static"===o?{marginTop:"-70px"}:{},s||b?{background:(null==_?void 0:_.background)||(null==(r=U.root)?void 0:r.background)||"#1B2027"}:{}),"data-testid":S||"ac-sdk-header"},/*#__PURE__*/q.default.createElement(ge.default,{variant:"dense"},y&&/*#__PURE__*/q.default.createElement(he.default,{size:"large",sx:um({color:"rgba(255,255,255,0.85)",borderRight:"1px solid rgba(255,255,255,0.5)"},b&&{color:"rgba(255,255,255,0.5)",borderTop:"1px solid rgba(255,255,255,0.5)",borderRightColor:"transparent"},{"> svg":{transform:"rotate(180deg)"}}),onClick:v},/*#__PURE__*/q.default.createElement(I.ViewSidebarRounded,null)),i&&/*#__PURE__*/q.default.createElement(a.Link,{to:"/"},/*#__PURE__*/q.default.createElement("img",{src:ve.default,alt:"AndonCloud",style:{display:"block",height:"50px",margin:"0 8px"}})),C&&/*#__PURE__*/q.default.createElement(ye.default,{variant:"subtitle1",sx:W.leadingText},C),p?/*#__PURE__*/q.default.createElement(se.default,{sx:W.content},p):/*#__PURE__*/q.default.createElement(ye.default,{variant:"subtitle1",align:"center",sx:W.title},T),P&&/*#__PURE__*/q.default.createElement(se.default,{display:"flex",sx:W.nav},P.map(e=>/*#__PURE__*/q.default.createElement(pe.default,{key:e.label,onClick:()=>G(e),endIcon:e.icon,sx:W.button},e.label))),R&&E&&/*#__PURE__*/q.default.createElement(se.default,{display:"flex",sx:W.user},tm.getCurrentUserJS?/*#__PURE__*/q.default.createElement(pe.default,{id:"logout-button",onClick:Y,sx:um({},W.button,W.logoutButton),"data-testid":"ac-sdk-header-logout-button"},O("headerLogoutButton"),A&&(()=>{const e=(()=>{let e="";const t=tm.getCurrentUserJS;if(null===t)return e;const{company:n}=t;return e=n.logo_url,w+"/"+e})();/*#__PURE__*/return q.default.createElement("img",{src:e,alt:""})})(),(()=>{let{currentUser:e}=tm;/*#__PURE__*/return q.default.createElement(se.default,{display:"inline-block",sx:W.userInfo},e&&"("+e.name+")")})()):/*#__PURE__*/q.default.createElement(pe.default,{id:"login-button",onClick:()=>K("/login"),sx:um({},W.button,W.loginButton),"data-testid":"ac-sdk-header-login-button"},O("headerLoginButton"))),/*#__PURE__*/q.default.createElement(le.default,null),/*#__PURE__*/q.default.createElement(ye.default,{variant:"body1",align:"center",style:{width:"5rem",padding:"0 5px"}},z.toLocaleTimeString()),D&&/*#__PURE__*/q.default.createElement(se.default,null,/*#__PURE__*/q.default.createElement(he.default,{onClick:e=>{F(e.currentTarget)}},/*#__PURE__*/q.default.createElement(ue.default,{style:L?{color:L}:{}})),/*#__PURE__*/q.default.createElement(me.default,{id:"menu-appbar",marginThreshold:0,anchorEl:H,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(H),onClose:Z,sx:W.menu},D.map(e=>/*#__PURE__*/q.default.createElement(fe.default,{key:e.label,onClick:()=>G(e)},e.label)),(()=>{if(!E)return tm.getCurrentUserJS?/*#__PURE__*/q.default.createElement(fe.default,{onClick:Y},O("headerLogoutButton")):/*#__PURE__*/q.default.createElement(fe.default,{onClick:()=>K("/login")},O("headerLoginButton"))})()))))};Py.propTypes={position:p.PropTypes.string,scrolled:p.PropTypes.bool,showAcLogo:p.PropTypes.bool,leadingText:p.PropTypes.string,title:p.PropTypes.string,titleStyles:p.PropTypes.any,content:p.PropTypes.node,contentStyles:p.PropTypes.any,navProps:p.PropTypes.shape({items:p.PropTypes.any}),userProps:p.PropTypes.shape({show:p.PropTypes.bool,showCompanyLogo:p.PropTypes.bool}),menuProps:p.PropTypes.shape({items:p.PropTypes.any,buttonColor:p.PropTypes.string,dropdownStyles:p.PropTypes.any,styles:p.PropTypes.any}),styles:p.PropTypes.any},Py.defaultProps={navProps:{},userProps:{},menuProps:{},styles:{}};var Ry=d.observer(Py);const Ay=t=>{let{open:n,items:r,width:o,styles:i,listStyles:c,itemStyles:l,subitemStyles:u}=t;const[d,p]=e.useState([]),h=(e=>{let{styles:t,listStyles:n,itemStyles:r,subitemStyles:o}=e;return{root:um({flexShrink:0,"& .MuiDrawer-paper":{width:t.width+"px",boxSizing:"border-box",marginTop:"70px",color:"rgba(255,255,255,0.85)",background:"rgba(255,255,255,0.025)"}},t),list:um({height:"90%",overflowY:"scroll"},n),subList:{maxHeight:"50vh",overflowY:"auto"},item:um({},r),itemIcon:{color:"rgba(255,255,255,0.85)"},itemText:{"& > .MuiTypography-root":{fontWeight:600}},subitem:um({},o),subitemText:{"& > span":{fontSize:"95%"}},subitemButton:{paddingLeft:4}}})({styles:um({},i,{width:o}),listStyles:c,itemStyles:l,subitemStyles:u}),m=a.useNavigate();e.useEffect(()=>{p(r.map(e=>!!e.defaultOpened))},[r]);const f=(e,t,n)=>{e?e():t&&(t.startsWith("/")?m(t):n?window.location.href=t:m("?external="+t))};/*#__PURE__*/return q.default.createElement(s.Drawer,{sx:h.root,variant:"persistent",anchor:"left",open:n},/*#__PURE__*/q.default.createElement(s.List,{sx:h.list},r.map((e,t)=>{let{action:n,url:r,redirect:o,icon:i,label:a,items:c}=e;/*#__PURE__*/return q.default.createElement(q.default.Fragment,{key:a},/*#__PURE__*/q.default.createElement(s.ListItem,{sx:h.item,disablePadding:!0},/*#__PURE__*/q.default.createElement(s.ListItemButton,{onClick:()=>{null!=c&&c.length?p(e=>(e[t]=!e[t],um({},e))):f(n,r,o)}},i&&/*#__PURE__*/q.default.createElement(s.ListItemIcon,{sx:h.itemIcon},i),/*#__PURE__*/q.default.createElement(s.ListItemText,{primary:a,sx:h.itemText}),!(null==c||!c.length)&&/*#__PURE__*/q.default.createElement(d[t]?I.ExpandLess:I.ExpandMore,null))),!(null==c||!c.length)&&/*#__PURE__*/q.default.createElement(s.Collapse,{in:d[t],timeout:"auto",unmountOnExit:!0},(e=>/*#__PURE__*/q.default.createElement(s.List,{component:"div",disablePadding:!0,sx:h.subList},e.map(e=>{let{action:t,url:n,redirect:r,icon:o,label:i}=e;/*#__PURE__*/return q.default.createElement(s.ListItem,{key:i,sx:h.subitem,disablePadding:!0},/*#__PURE__*/q.default.createElement(s.ListItemButton,{sx:h.subitemButton,onClick:()=>f(t,n,r)},o&&/*#__PURE__*/q.default.createElement(s.ListItemIcon,{sx:h.itemIcon},o),/*#__PURE__*/q.default.createElement(s.ListItemText,{primary:i,sx:h.subitemText})))})))(c)))})))};Ay.propTypes={open:p.PropTypes.bool,items:p.PropTypes.any,width:p.PropTypes.number,styles:p.PropTypes.any,listStyles:p.PropTypes.any,itemStyles:p.PropTypes.any,subitemStyles:p.PropTypes.any},Ay.defaultProps={styles:{},listStyles:{},itemStyles:{},subitemStyles:{}};const Dy=e=>{let{open:t,onClose:n,title:r,mainContent:o,asideContent:i,width:a,mainContentWidth:c,asideContentWidth:l,styles:u,headerStyles:d,contentWrapperStyles:p,mainContentStyles:h,asideContentStyles:m}=e;const f=(e=>{let{hasAsideContent:t,styles:n,headerStyles:r,contentWrapperStyles:o,mainContentStyles:s,asideContentStyles:i}=e;return{root:um({flexShrink:0,"& .MuiDrawer-paper":{width:n.width,boxSizing:"border-box",marginTop:"70px",color:"rgba(255,255,255,0.85)",borderTop:"1px solid rgba(255,255,255,0.1)",borderLeft:"1px solid rgba(255,255,255,0.1)",background:"#252A32",boxShadow:"-6px 0 10px rgba(0, 0, 0, 0.15), inset -6px 0 8px rgba(0, 0, 0, 0.1), inset 0 -6px 8px rgba(0, 0, 0, 0.1)"}},n),header:um({display:"flex",alignItems:"center",height:"60px",padding:"8px 16px",borderBottom:"1px solid rgba(255,255,255,0.1)"},r),contentWrapper:um({display:"flex",flexDirection:"row",height:"calc(100% - 152px)",borderRight:"16px solid rgba(0,0,0,0.1)"},o),mainContent:um({flexBasis:t?n.mainContentWidth:"100%",padding:"16px",overflowY:"auto"},s),asideContent:um({flexBasis:n.asideContentWidth,padding:" 16px 0",overflowY:"auto",background:"rgba(0,0,0,0.1)"},i)}})({hasAsideContent:Boolean(i),styles:um({},u,{width:a,mainContentWidth:c,asideContentWidth:l}),headerStyles:d,contentWrapperStyles:p,mainContentStyles:h,asideContentStyles:m});/*#__PURE__*/return q.default.createElement(s.Drawer,{sx:f.root,variant:"persistent",anchor:"right",open:t},/*#__PURE__*/q.default.createElement(s.Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:f.header},/*#__PURE__*/q.default.createElement(s.Typography,{variant:"h6",fontSize:18},r),/*#__PURE__*/q.default.createElement(s.IconButton,{color:"secondary",onClick:n},/*#__PURE__*/q.default.createElement(_e.default,null))),/*#__PURE__*/q.default.createElement(s.Box,{sx:f.contentWrapper},/*#__PURE__*/q.default.createElement(s.Box,{sx:f.mainContent},o),i&&/*#__PURE__*/q.default.createElement(s.Box,{sx:f.asideContent},i)))};Dy.propTypes={enabled:p.PropTypes.bool,open:p.PropTypes.bool,onClose:p.PropTypes.func,title:p.PropTypes.string,mainContent:p.PropTypes.node,asideContent:p.PropTypes.node,width:p.PropTypes.string,mainContentWidth:p.PropTypes.string,asideContentWidth:p.PropTypes.string,styles:p.PropTypes.any,headerStyles:p.PropTypes.any,contentWrapperStyles:p.PropTypes.any,mainContentStyles:p.PropTypes.any,asideContentStyles:p.PropTypes.any};const Ly={enabled:!0,open:!1,onClose:()=>{},title:"",mainContent:null,asideContent:null,width:null,mainContentWidth:null,asideContentWidth:null,styles:{},headerStyles:{},contentWrapperStyles:{},mainContentStyles:{},asideContentStyles:{}};Dy.defaultProps=Ly;const Ny=s.styled("main",{shouldForwardProp:e=>!["open","sidebarWidth"].includes(e)})(e=>{let{theme:t,open:n,sidebarWidth:r}=e;return um({flexGrow:1,transition:t.transitions.create("margin",{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen}),marginLeft:0},n&&{transition:t.transitions.create("margin",{easing:t.transitions.easing.easeOut,duration:t.transitions.duration.enteringScreen}),marginLeft:r+"px"})}),jy=t=>{let{children:n,headerProps:r,sidebarMenuProps:o,sidePanelProps:i,styles:c,"data-testid":l}=t;const{isEmbeddedMode:u}=Zg(),[d]=a.useSearchParams(),[p,h]=e.useState(),[m,f]=e.useState(null==o?void 0:o.open),g=s.useScrollTrigger({disableHysteresis:!0,target:p,threshold:0}),y=d.get("external"),b=(null==o?void 0:o.width)||240,v=(null==i?void 0:i.width)||"45%",_=(null==i?void 0:i.mainContentWidth)||"70%",S=(null==i?void 0:i.asideContentWidth)||"30%",w=Gm({isEmbeddedMode:u});return e.useEffect(()=>{if(u)return f(!1);const e=$m.get("sidebarMenuOpen");void 0!==e&&f((null==o?void 0:o.enabled)&&"true"===e)},[u,null==o?void 0:o.enabled,f]),e.useEffect(()=>{!u&&null!=o&&o.enabled&&$m.set("sidebarMenuOpen",m)},[u,null==o?void 0:o.enabled,m]),/*#__PURE__*/q.default.createElement(ce.default,{ref:e=>{e&&h(e)},maxWidth:!1,disableGutters:!0,sx:um({},w.root,c),"data-testid":l||"ac-sdk-container"},!u&&/*#__PURE__*/q.default.createElement(q.default.Fragment,null,/*#__PURE__*/q.default.createElement(Ry,um({scrolled:g,showAcLogo:!0,sidebarEnabled:null==o?void 0:o.enabled,sidebarOpen:m,onSidebarToggle:()=>f(e=>!e)},r)),(null==o?void 0:o.enabled)&&/*#__PURE__*/q.default.createElement(Ay,{open:m,items:o.items,width:b})),/*#__PURE__*/q.default.createElement(Ny,{open:m,sidebarWidth:b},y?/*#__PURE__*/q.default.createElement(Oy,{src:y}):n),(null==i?void 0:i.enabled)&&/*#__PURE__*/q.default.createElement(Dy,um({},i,{width:v,mainContentWidth:_,asideContentWidth:S})),!u&&/*#__PURE__*/q.default.createElement(s.Box,{sx:w.overlay}))};jy.propTypes={children:p.PropTypes.any,headerProps:p.PropTypes.shape({position:p.PropTypes.string,showAcLogo:p.PropTypes.bool,leadingText:p.PropTypes.string.isRequired,title:p.PropTypes.string,content:p.PropTypes.node,contentStyles:p.PropTypes.any,navProps:p.PropTypes.shape({items:p.PropTypes.any}),userProps:p.PropTypes.shape({show:p.PropTypes.bool,showCompanyLogo:p.PropTypes.bool}),menuProps:p.PropTypes.shape({items:p.PropTypes.any,buttonColor:p.PropTypes.string,dropdownStyles:p.PropTypes.any,styles:p.PropTypes.any}),styles:p.PropTypes.any}),sidebarMenuProps:p.PropTypes.shape({enabled:p.PropTypes.bool,open:p.PropTypes.bool,items:p.PropTypes.any,width:p.PropTypes.number}),sidePanelProps:p.PropTypes.shape({enabled:p.PropTypes.bool,open:p.PropTypes.bool,onClose:p.PropTypes.func,title:p.PropTypes.string,mainContent:p.PropTypes.node,asideContent:p.PropTypes.node,width:p.PropTypes.string}),styles:p.PropTypes.any},jy.defaultProps={headerProps:{},sidebarMenuProps:{enabled:!1,open:!1,items:[],width:240},sidePanelProps:{enabled:!1,open:!1,onClose:()=>{},title:"",mainContent:null,asideContent:null,width:"45%"}};const zy=e=>{let{redirectPath:n}=e;const{i18n:r,t:o}=t.useTranslation();/*#__PURE__*/return q.default.createElement(jy,{headerProps:{position:"fixed",leadingText:"AndonCloud Software",userProps:{show:!1},menuProps:{items:[{label:o("changeLanguageText"),action:()=>{r.changeLanguage("pl"===r.language?"en":"pl")}}],buttonColor:"white"}},styles:{overflowY:"auto"}},/*#__PURE__*/q.default.createElement(se.default,{display:"flex",height:"100%",alignItems:"center",justifyContent:"center"},/*#__PURE__*/q.default.createElement(ie.default,{sx:{borderRadius:"20px"}},/*#__PURE__*/q.default.createElement(ae.default,null,/*#__PURE__*/q.default.createElement(gy,{title:o("loginFormText"),redirectPath:n})))))};zy.propTypes={redirectPath:p.PropTypes.string},zy.defaultProps={redirectPath:"/"};var $y=d.observer(zy);const Hy=()=>{const{grantType:e,redirectPath:t}=Xg(),n=Ey("read write"),r=a.useNavigate();return"password"===e?/*#__PURE__*/q.default.createElement($y,{redirectPath:t}):(r("/"),n(),null)},Fy=function(e){if(!(fh&&gh&&yh&&bh&&vh))return dh&&Rt.warn(`reactRouterV6Instrumentation was unable to wrap Routes because of one or more missing parameters.\n useEffect: ${fh}. useLocation: ${gh}. useNavigationType: ${yh}.\n createRoutesFromChildren: ${bh}. matchRoutes: ${vh}.`),e;const t=t=>{const n=V.useRef(!0),r=gh(),o=yh();return fh(()=>{const e=bh(t.children);n.current?(Uh(e),function({activeRootSpan:e,location:t,routes:n,matches:r,basename:o,allRoutes:s}){const i=Array.isArray(r)?r:vh(s||n,t,o);if(i){const[r,a]=Dh(t,s||n,s||n,i,o);ir().setTransactionName(r||"/"),e&&(e.updateName(r),e.setAttribute(dr,a),Wh(e,t,n,o,s,"pageload"))}}({activeRootSpan:Lh(),location:r,routes:e,allRoutes:Array.from($h)}),n.current=!1):function(e){const{location:t,routes:n,navigationType:r,version:o,matches:s,basename:i,allRoutes:a}=e,c=Array.isArray(s)?s:vh(a||n,t,i),l=lr();if(!l||!jh.has(l))return;const u=Lh();if((!u||"pageload"!==Zr(u).op||"POP"!==r)&&("PUSH"===r||"POP"===r)&&c){const[e,r]=Dh(t,a||n,a||n,c,i),s=function(e){return`${e.pathname}${e.search||""}${e.hash||""}`}(t),u=zh.get(l),d=!(!u||u.isPlaceholder||!Zr(u.span).timestamp),{skip:p,shouldUpdate:h}=function(e,t,n,r){if(!e)return{skip:!1,shouldUpdate:!1};if(e.locationKey===t&&(e.isPlaceholder||!r)){const t=!!e.routeName&&Ch(e.routeName),r=Ch(n),o=!!e.routeName&&Fh(e.routeName),s=Fh(n);return{skip:!0,shouldUpdate:!(!e.routeName||!(t&&!r||!o&&s||n!==e.routeName&&n.length>(e.routeName?.length||0)&&!r))}}return{skip:!1,shouldUpdate:!1}}(u,s,e,d);if(p){if(h&&u){const t=u.routeName;u.isPlaceholder?(u.routeName=e,dh&&Rt.log(`[Tracing] Updated placeholder navigation name from "${t}" to "${e}" (will apply to real span)`)):(u.span.updateName(e),u.span.setAttribute(dr,r),_n(u.span,"__sentry_navigation_name_set__",!0),u.routeName=e,dh&&Rt.log(`[Tracing] Updated navigation span name from "${t}" to "${e}"`))}else dh&&Rt.log(`[Tracing] Skipping duplicate navigation for location: ${s}`);return}const m={span:{end:()=>{}},routeName:e,pathname:t.pathname,locationKey:s,isPlaceholder:!0};let f;zh.set(l,m);try{f=qp(l,{name:m.routeName,attributes:{[dr]:r,[mr]:"navigation",[fr]:`auto.navigation.react.reactrouter_v${o}`}})}catch(e){throw zh.delete(l),e}f?(zh.set(l,{span:f,routeName:m.routeName,pathname:t.pathname,locationKey:s}),Wh(f,t,n,i,a,"navigation")):zh.delete(l)}}({location:r,routes:e,navigationType:o,version:"6",allRoutes:Array.from($h)})},[r,o]),V.createElement(e,{...t})};return lh(t,e),t}(a.Routes),By=e=>{let{children:t}=e;/*#__PURE__*/return q.default.createElement(a.BrowserRouter,null,/*#__PURE__*/q.default.createElement(dy,null),/*#__PURE__*/q.default.createElement(Fy,null,t,/*#__PURE__*/q.default.createElement(a.Route,{exact:!0,path:"/login",element:/*#__PURE__*/q.default.createElement(Hy,null)}),/*#__PURE__*/q.default.createElement(a.Route,{path:"/oauth2/redirect",element:/*#__PURE__*/q.default.createElement(uy,null)})))},Uy=d.observer(n=>{let{children:r,baseUrl:o,authProps:s,gtmProps:i,i18nProps:c,sentryProps:l,metaProps:d,muiTheme:p}=n;const{status:h}=Vm(),{enabled:m,clientId:f,redirectUri:g}=um({enabled:!0,redirectPath:"/"},s);return Um.setAuthConfig({baseUrl:o,clientId:f,redirectUri:g}),e.useEffect(()=>{!oy.gtmReady&&null!=i&&i.gtmId&&(gm.initialize(i),oy.setGtmReady())},[i]),e.useEffect(()=>{var t;!oy.sentryReady&&l&&(function(t){const n={...t};Gs(n,"react"),as("react",{version:e.version}),function(e={}){const t=!e.skipBrowserExtensionCheck&&!!function(){if(void 0===Mi.window)return!1;if(Mi.nw)return!1;const e=Mi.chrome||Mi.browser;if(!e?.runtime?.id)return!1;const t=yn();return!(Mi===Mi.top&&["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"].some(e=>t.startsWith(`${e}://`)))}()&&(Pc&&It(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0);let n=null==e.defaultIntegrations?[oi(),ti(),Uc(),Fc(),Kc(),Yc(),hi(),{name:"HttpContext",preprocessEvent(e){if(!Mi.navigator&&!Mi.location&&!Mi.document)return;const t=Ai(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}}},{name:"BrowserSession",setupOnce(){void 0!==Mi.document?(cs({ignoreDuration:!0}),ds(),pc(({from:e,to:t})=>{void 0!==e&&e!==t&&(cs({ignoreDuration:!0}),ds())})):Pc&&Rt.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.")}}]:e.defaultIntegrations;const r={...e,enabled:!t&&e.enabled,stackParser:(o=e.stackParser||$c,Array.isArray(o)?Nt(...o):o),integrations:ms({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||Oc};var o;!function(e,t){!0===t.debug&&(_t?Rt.enable():It(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),ir().update(t.initialScope);const n=new e(t);(function(e){ir().setClient(e)})(n),n.init()}(Vi,r)}(n)}(um({tracesSampleRate:1,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1,integrations:[(t={useEffect:e.useEffect,useLocation:a.useLocation,useNavigationType:a.useNavigationType,createRoutesFromChildren:a.createRoutesFromChildren,matchRoutes:a.matchRoutes},Bh(t,"6")),Rp()]},l)),oy.setSentryReady())},[l]),e.useEffect(()=>{m?function(){try{const e=function(){if(m)return Promise.resolve(Um.recover()).then(function(){})}();return Promise.resolve(e&&e.then?e.then(function(){}):void 0)}catch(e){return Promise.reject(e)}}():oy.setAppReady()},[m]),e.useEffect(()=>{const e=null==c?void 0:c.locales;if(e){const t="translation";for(const[n,r]of Object.entries(e))X.default.addResources(n,t,r[t])}},[null==c?void 0:c.locales]),e.useEffect(()=>{m&&"unknown"!==h&&oy.setAppReady()},[m,h]),/*#__PURE__*/q.default.createElement(u.ThemeProvider,{theme:p},/*#__PURE__*/q.default.createElement(G.default,null),/*#__PURE__*/q.default.createElement(Y.default,{styles:{"::-webkit-scrollbar":{width:"6px"},"::-webkit-scrollbar-track":{backgroundColor:"transparent"},"::-webkit-scrollbar-thumb":{borderRadius:"3px",backgroundColor:"rgba(255, 255, 255, 0.25)"}}}),/*#__PURE__*/q.default.createElement(hh,{fallback:e=>/*#__PURE__*/q.default.createElement(Vg,um({appVersion:d.appVersion,apiVersion:d.apiVersion},e))},/*#__PURE__*/q.default.createElement(bt,null),/*#__PURE__*/q.default.createElement(Jg,{config:um({baseUrl:o},s)},/*#__PURE__*/q.default.createElement(ry,null,/*#__PURE__*/q.default.createElement(t.I18nextProvider,{i18n:X.default},/*#__PURE__*/q.default.createElement(ey,{info:d},/*#__PURE__*/q.default.createElement(Kg,null,Um.networkError?/*#__PURE__*/q.default.createElement(ly,{error:Um.networkError}):oy.appReady?/*#__PURE__*/q.default.createElement(q.default.Fragment,null,/*#__PURE__*/q.default.createElement(By,null,/*#__PURE__*/q.default.createElement(a.Route,{path:"*",element:/*#__PURE__*/q.default.createElement(Wm,null,r)}))):/*#__PURE__*/q.default.createElement(Gg,null),/*#__PURE__*/q.default.createElement(Ug,{appVersion:d.appVersion,apiVersion:d.apiVersion}))))))))});Uy.propTypes={children:p.PropTypes.any.isRequired,baseUrl:p.PropTypes.string.isRequired,authProps:p.PropTypes.shape({enabled:p.PropTypes.bool,loginUrl:p.PropTypes.string,redirectUri:p.PropTypes.string,redirectPath:p.PropTypes.string,clientId:p.PropTypes.string.isRequired,grantType:p.PropTypes.string}),gtmProps:p.PropTypes.any,i18nProps:p.PropTypes.shape({locales:p.PropTypes.any}),sentryProps:p.PropTypes.any,routerProps:p.PropTypes.shape({iframeNavigationItems:p.PropTypes.any}),metaProps:p.PropTypes.shape({appVersion:p.PropTypes.string,apiVersion:p.PropTypes.string,releaseVersion:p.PropTypes.string,releasePageLink:p.PropTypes.string}),muiTheme:p.PropTypes.any},Uy.defaultProps={authProps:{},gtmProps:{},i18nProps:{},sentryProps:{},metaProps:{},muiTheme:cy};var Vy=function(e){const t=e.displayName||e.name||"unknown",n=n=>V.createElement(uh,{name:t,updateProps:n},V.createElement(e,{...n}));return n.displayName=`profiler(${t})`,lh(n,e),n}(Uy);const qy=u.styled("span")(e=>{let{theme:t}=e;return{width:"16px",height:"16px",border:"1px solid "+t.palette.stroke.dark,borderRadius:"2px","input:disabled ~ &":{backgroundColor:"#A7ADB6"},".Mui-error &":{border:"1px solid "+t.palette.error.main}}}),Wy=u.styled(qy)(e=>{let{theme:t}=e;return{position:"relative",border:"none",background:t.palette.primary.main,"&::after":{content:'""',display:"block",position:"absolute",width:"16px",height:"16px",top:0,left:0,background:"url("+Se.default+") no-repeat center",backgroundSize:"80%"}}}),Ky=u.styled(s.Checkbox)(e=>{let{theme:t}=e;return{alignSelf:"flex-start",padding:t.spacing(.5,1,.5,1.5),color:t.palette.primary.main,"&:hover":{opacity:.8}}}),Zy=u.styled("span")(e=>{let{theme:t}=e;return{width:"16px",height:"16px",border:"1px solid "+t.palette.stroke.dark,borderRadius:"50%","input:disabled ~ &":{backgroundColor:"#A7ADB6"}}}),Gy=u.styled(Zy)(e=>{let{theme:t}=e;return{position:"relative",border:"none",background:t.palette.primary.main,"&::after":{content:'""',display:"block",position:"absolute",width:"8px",height:"8px",top:"calc(50% - 4px)",left:"calc(50% - 4px)",borderRadius:"50%",background:t.palette.common.white}}}),Yy=u.styled(s.Radio)(e=>{let{theme:t}=e;return{padding:0,color:t.palette.primary.main}}),Jy=u.styled(s.RadioGroup)(e=>{let{theme:t}=e;return{color:t.palette.primary.main,".MuiFormControlLabel-root":{gap:t.spacing(1),marginLeft:t.spacing(1),"&:hover":{opacity:.8}},".Mui-checked + .MuiFormControlLabel-label":{color:t.palette.common.white}}}),Xy=Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function Qy(e,t,n,r){navigator.serviceWorker.register(e).then(e=>{let o=null;r&&setInterval(function(){fetch("/manifest.json").then(function(t){try{return Promise.resolve(t.json()).then(function(t){let{version:r}=t;n!==r&&(o=r,e.update())})}catch(e){return Promise.reject(e)}}).catch(()=>{})},3e4),e.onupdatefound=()=>{const n=e.installing;null!=n&&(n.onstatechange=()=>{"installed"===n.state&&(navigator.serviceWorker.controller?(console.log("New content is available and will be used when all tabs for this page are closed. See https://cra.link/PWA."),t&&t.onUpdate&&(r?t.onUpdate(e,o):t.onUpdate(e))):(console.log("Content is cached for offline use."),t&&t.onSuccess&&t.onSuccess(e)))})}}).catch(e=>{console.error("Error during service worker registration:",e)})}exports.AccessBlocker=em,exports.AccessGuard=e=>{let{features:t=[],extraPermissions:n=[],workplaceId:r,onTrialRequest:o,onFeatureRequest:s,children:i}=e;const{hasAccess:a,accessState:c,buttons:l,cooldownInfo:u,features:d}=lm(t,{extraPermissions:n,workplaceId:r});if(a)return i;const p=d.find(e=>e.accessState===c);/*#__PURE__*/return q.default.createElement(em,{accessState:c,buttons:l,daysSinceExpiry:(null==p?void 0:p.daysSinceExpiry)||null,featureKey:(null==p?void 0:p.featureKey)||t[0],workplaceId:r,cooldownInfo:u,onTrialRequest:o,onFeatureRequest:s})},exports.App=Vy,exports.Checkbox=e=>q.default.createElement(Ky,um({icon:q.default.createElement(qy,null),checkedIcon:q.default.createElement(Wy,null)},e)),exports.Container=jy,exports.Radio=e=>q.default.createElement(Yy,um({icon:q.default.createElement(Zy,null),checkedIcon:q.default.createElement(Gy,null)},e)),exports.RadioGroup=e=>q.default.createElement(Jy,um({},e)),exports.captureException=ss,exports.fetch=Hm,exports.getDisplayMode=Fg,exports.getLocale=()=>X.default.language,exports.logout=()=>Um.logout(),exports.notify=vt,exports.refreshUserData=()=>Um.refreshUserData(),exports.registerServiceWorker=e=>{const{version:t}=e,n=e=>{const t=e.waiting;t&&(t.addEventListener("statechange",e=>{"activated"===e.target.state&&window.location.reload()}),t.postMessage({type:"SKIP_WAITING"}))},r=()=>vt(X.default.t("newVersionAvailable"),{duration:5e3,position:"bottom-left",style:{color:"rgba(255,255,255,0.85)",background:"#3F3F3F",border:"1px solid #FFE72F"}});!function(e){const{publicUrl:t,mode:n,autoUpdate:r,version:o,registrationConfig:s}=e;if(globalThis.version=o,"production"===n&&"serviceWorker"in navigator){if(new URL(t,window.location.href).origin!==window.location.origin)return;window.addEventListener("load",()=>{const e=t+"/service-worker.js";Xy?(function(e,t){fetch(e,{headers:{"Service-Worker":"script"}}).then(n=>{const r=n.headers.get("content-type");404===n.status||null!=r&&-1===r.indexOf("javascript")?navigator.serviceWorker.ready.then(e=>{e.unregister().then(()=>{window.location.reload()})}):Qy(e,t)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})}(e,s),navigator.serviceWorker.ready.then(()=>{console.log("This web app is being served cache-first by a service worker. To learn more, visit https://cra.link/PWA")})):Qy(e,s,o,r)})}}(um({},e,{registrationConfig:um({},(null==e?void 0:e.registrationConfig)||{},{onUpdate:(o,s)=>{var i,a;null!=(i=e.registrationConfig)&&i.onUpdate&&(null==(a=e.registrationConfig)||a.onUpdate(o)),s&&t!==s?(r(),setTimeout(()=>{n(o)},5e3)):(r(),n(o))}})}))},exports.resetParentHeaderLeadingText=()=>{var e;"iframe"===Fg()&&(null==(e=window.parent)||e.postMessage({type:"RESET_HEADER_LEADING_TEXT"},"*"))},exports.resetParentHeaderStyles=e=>{var t;"iframe"===Fg()&&(null==(t=window.parent)||t.postMessage({type:"RESET_HEADER_STYLES",target:e},"*"))},exports.resetParentHeaderTitle=()=>{var e;"iframe"===Fg()&&(null==(e=window.parent)||e.postMessage({type:"RESET_HEADER_TITLE"},"*"))},exports.setLocale=e=>X.default.changeLanguage(e),exports.sidePanelDefaultProps=Ly,exports.updateParentHeaderLeadingText=e=>{var t;"iframe"===Fg()&&(null==(t=window.parent)||t.postMessage({type:"SET_HEADER_LEADING_TEXT",text:e},"*"))},exports.updateParentHeaderStyles=e=>{var t;let{target:n,styles:r}=e;"iframe"===Fg()&&(null==(t=window.parent)||t.postMessage({type:"SET_HEADER_STYLES",target:n,styles:r},"*"))},exports.updateParentHeaderTitle=e=>{var t;"iframe"===Fg()&&(null==(t=window.parent)||t.postMessage({type:"SET_HEADER_TITLE",title:e},"*"))},exports.useAccess=lm,exports.useDisplay=Zg,exports.useFeatures=sm,exports.useLogin=Ey,exports.useLoginStatus=Vm,exports.usePermissions=im,exports.useStore=()=>e.useContext(ny),exports.withAccessGuard=function(e,t){void 0===e&&(e=[]),void 0===t&&(t={});const{extraPermissions:n=[],workplaceId:r}=t;return t=>{const o=o=>{const{onTrialRequest:s,onFeatureRequest:i}=o,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(o,dm),{hasAccess:c,accessState:l,buttons:u,cooldownInfo:d,features:p,missingPermissions:h}=lm(e,{extraPermissions:n,workplaceId:r}),m=p.find(e=>e.accessState===l),f=(null==m?void 0:m.daysSinceExpiry)||null,g=(null==m?void 0:m.featureKey)||e[0];return c?/*#__PURE__*/q.default.createElement(t,um({},a,{accessState:l,hasAccess:c,missingPermissions:h})):/*#__PURE__*/q.default.createElement(em,{accessState:l,buttons:u,daysSinceExpiry:f,featureKey:g,workplaceId:r,cooldownInfo:d,onTrialRequest:s,onFeatureRequest:i})};return o.displayName="withAccessGuard("+(t.displayName||t.name||"Component")+")",o}};
|
|
171
|
+
`,bt=({reverseOrder:t,position:n="top-center",toastOptions:r,gutter:o,children:s,toasterId:i,containerStyle:a,containerClassName:c})=>{let{toasts:l,handlers:u}=((t,n="default")=>{let{toasts:r,pausedAt:o}=((t={},n=ze)=>{let[r,o]=e.useState(Ue[n]||Be),s=e.useRef(Ue[n]);e.useEffect(()=>(s.current!==Ue[n]&&o(Ue[n]),Fe.push([n,o]),()=>{let e=Fe.findIndex(([e])=>e===n);e>-1&&Fe.splice(e,1)}),[n]);let i=r.toasts.map(e=>{var n,r,o;return{...t,...t[e.type],...e,removeDelay:e.removeDelay||(null==(n=t[e.type])?void 0:n.removeDelay)||(null==t?void 0:t.removeDelay),duration:e.duration||(null==(r=t[e.type])?void 0:r.duration)||(null==t?void 0:t.duration)||Ke[e.type],style:{...t.style,...null==(o=t[e.type])?void 0:o.style,...e.style}}});return{...r,toasts:i}})(t,n),s=e.useRef(new Map).current,i=e.useCallback((e,t=1e3)=>{if(s.has(e))return;let n=setTimeout(()=>{s.delete(e),a({type:4,toastId:e})},t);s.set(e,n)},[]);e.useEffect(()=>{if(o)return;let e=Date.now(),t=r.map(t=>{if(t.duration===1/0)return;let r=(t.duration||0)+t.pauseDuration-(e-t.createdAt);if(!(r<0))return setTimeout(()=>Ge.dismiss(t.id,n),r);t.visible&&Ge.dismiss(t.id)});return()=>{t.forEach(e=>e&&clearTimeout(e))}},[r,o,n]);let a=e.useCallback(We(n),[n]),c=e.useCallback(()=>{a({type:5,time:Date.now()})},[a]),l=e.useCallback((e,t)=>{a({type:1,toast:{id:e,height:t}})},[a]),u=e.useCallback(()=>{o&&a({type:6,time:Date.now()})},[o,a]),d=e.useCallback((e,t)=>{let{reverseOrder:n=!1,gutter:o=8,defaultPosition:s}=t||{},i=r.filter(t=>(t.position||s)===(e.position||s)&&t.height),a=i.findIndex(t=>t.id===e.id),c=i.filter((e,t)=>t<a&&e.visible).length;return i.filter(e=>e.visible).slice(...n?[c+1]:[0,c]).reduce((e,t)=>e+(t.height||0)+o,0)},[r]);return e.useEffect(()=>{r.forEach(e=>{if(e.dismissed)i(e.id,e.removeDelay);else{let t=s.get(e.id);t&&(clearTimeout(t),s.delete(e.id))}})},[r,i]),{toasts:r,handlers:{updateHeight:l,startPause:c,endPause:u,calculateOffset:d}}})(r,i);return V.createElement("div",{"data-rht-toaster":i||"",style:{position:"fixed",zIndex:9999,top:16,left:16,right:16,bottom:16,pointerEvents:"none",...a},className:c,onMouseEnter:u.startPause,onMouseLeave:u.endPause},l.map(e=>{let r=e.position||n,i=((e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},o=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:$e()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...o}})(r,u.calculateOffset(e,{reverseOrder:t,gutter:o,defaultPosition:n}));return V.createElement(gt,{id:e.id,key:e.id,onHeightUpdate:u.updateHeight,className:e.visible?yt:"",style:i},"custom"===e.type?Ne(e.message,e):s?s(e):V.createElement(ft,{toast:e,position:r}))}))},vt=Ge;const _t="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,St=globalThis,wt="10.38.0";function kt(){return Et(St),St}function Et(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||wt,t[wt]=t[wt]||{}}function Ct(e,t,n=St){const r=n.__SENTRY__=n.__SENTRY__||{},o=r[wt]=r[wt]||{};return o[e]||(o[e]=t())}const xt=["debug","info","warn","error","log","assert","trace"],Tt={};function It(e){if(!("console"in St))return e();const t=St.console,n={},r=Object.keys(Tt);r.forEach(e=>{const r=Tt[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}function Mt(){return Pt().enabled}function Ot(e,...t){_t&&Mt()&&It(()=>{St.console[e](`Sentry Logger [${e}]:`,...t)})}function Pt(){return _t?Ct("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const Rt={enable:function(){Pt().enabled=!0},disable:function(){Pt().enabled=!1},isEnabled:Mt,log:function(...e){Ot("log",...e)},warn:function(...e){Ot("warn",...e)},error:function(...e){Ot("error",...e)}},At="?",Dt=/\(error: (.*)\)/,Lt=/captureMessage|captureException/;function Nt(...e){const t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{const o=[],s=e.split("\n");for(let e=n;e<s.length;e++){let n=s[e];n.length>1024&&(n=n.slice(0,1024));const i=Dt.test(n)?n.replace(Dt,"$1"):n;if(!i.match(/\S*Error: /)){for(const e of t){const t=e(i);if(t){o.push(t);break}}if(o.length>=50+r)break}}return function(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(jt(t).function||"")&&t.pop(),t.reverse(),Lt.test(jt(t).function||"")&&(t.pop(),Lt.test(jt(t).function||"")&&t.pop()),t.slice(0,50).map(e=>({...e,filename:e.filename||jt(t).filename,function:e.function||At}))}(o.slice(r))}}function jt(e){return e[e.length-1]||{}}const $t="<anonymous>";function zt(e){try{return e&&"function"==typeof e&&e.name||$t}catch{return $t}}function Ht(e){const t=e.exception;if(t){const e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}function Ft(e){return"__v_isVNode"in e&&e.__v_isVNode?"[VueVNode]":"[VueViewModel]"}const Bt={},Ut={};function Vt(e,t){Bt[e]=Bt[e]||[],Bt[e].push(t)}function qt(e,t){if(!Ut[e]){Ut[e]=!0;try{t()}catch(t){_t&&Rt.error(`Error while instrumenting ${e}`,t)}}}function Wt(e,t){const n=e&&Bt[e];if(n)for(const r of n)try{r(t)}catch(t){_t&&Rt.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${zt(r)}\nError:`,t)}}let Kt=null;function Zt(e){const t="error";Vt(t,e),qt(t,Gt)}function Gt(){Kt=St.onerror,St.onerror=function(e,t,n,r,o){return Wt("error",{column:r,error:o,line:n,msg:e,url:t}),!!Kt&&Kt.apply(this,arguments)},St.onerror.__SENTRY_INSTRUMENTED__=!0}let Yt=null;function Jt(e){const t="unhandledrejection";Vt(t,e),qt(t,Xt)}function Xt(){Yt=St.onunhandledrejection,St.onunhandledrejection=function(e){return Wt("unhandledrejection",e),!Yt||Yt.apply(this,arguments)},St.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Qt=Object.prototype.toString;function en(e){switch(Qt.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return dn(e,Error)}}function tn(e,t){return Qt.call(e)===`[object ${t}]`}function nn(e){return tn(e,"ErrorEvent")}function rn(e){return tn(e,"DOMError")}function on(e){return tn(e,"String")}function sn(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function an(e){return null===e||sn(e)||"object"!=typeof e&&"function"!=typeof e}function cn(e){return tn(e,"Object")}function ln(e){return"undefined"!=typeof Event&&dn(e,Event)}function un(e){return Boolean(e?.then&&"function"==typeof e.then)}function dn(e,t){try{return e instanceof t}catch{return!1}}function pn(e){return!("object"!=typeof e||null===e||!(e.__isVue||e._isVue||e.__v_isVNode))}function hn(e){return"undefined"!=typeof Request&&dn(e,Request)}const mn=St;function fn(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 l;const u=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&s++<r&&(l=gn(n,u),!("html"===l||s>1&&i+o.length*c+l.length>=d));)o.push(l),i+=l.length,n=n.parentNode;return o.reverse().join(a)}catch{return"<unknown>"}}function gn(e,t){const n=e,r=[];if(!n?.tagName)return"";if(mn.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const o=t?.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(o?.length)o.forEach(e=>{r.push(`[${e[0]}="${e[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const e=n.className;if(e&&on(e)){const t=e.split(/\s+/);for(const e of t)r.push(`.${e}`)}}const s=["aria-label","type","name","title","alt"];for(const e of s){const t=n.getAttribute(e);t&&r.push(`[${e}="${t}"]`)}return r.join("")}function yn(){try{return mn.document.location.href}catch{return""}}function bn(e){if(!mn.HTMLElement)return null;let t=e;for(let e=0;e<5;e++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function vn(e,t,n){if(!(t in e))return;const r=e[t];if("function"!=typeof r)return;const o=n(r);"function"==typeof o&&Sn(o,r);try{e[t]=o}catch{_t&&Rt.log(`Failed to replace method "${t}" in object`,e)}}function _n(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{_t&&Rt.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Sn(e,t){try{e.prototype=t.prototype=t.prototype||{},_n(e,"__sentry_original__",t)}catch{}}function wn(e){return e.__sentry_original__}function kn(e){if(en(e))return{message:e.message,name:e.name,stack:e.stack,...Cn(e)};if(ln(e)){const t={type:e.type,target:En(e.target),currentTarget:En(e.currentTarget),...Cn(e)};return"undefined"!=typeof CustomEvent&&dn(e,CustomEvent)&&(t.detail=e.detail),t}return e}function En(e){try{return"undefined"!=typeof Element&&dn(e,Element)?fn(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function Cn(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}let xn,Tn,In;function Mn(e){if(void 0!==xn)return xn?xn(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__");return t in St&&"function"==typeof St[t]?(xn=St[t],xn(e)):(xn=null,e())}function On(){return Mn(()=>Math.random())}function Pn(){return Mn(()=>Date.now())}function Rn(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function An(e,t){if(!Array.isArray(e))return"";const n=[];for(let t=0;t<e.length;t++){const r=e[t];try{pn(r)?n.push(Ft(r)):n.push(String(r))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function Dn(e,t,n=!1){return!!on(e)&&(tn(t,"RegExp")?t.test(e):!!on(t)&&(n?e===t:e.includes(t)))}function Ln(e,t=[],n=!1){return t.some(t=>Dn(e,t,n))}function Nn(e=function(){return St.crypto||St.msCrypto}()){try{if(e?.randomUUID)return Mn(()=>e.randomUUID()).replace(/-/g,"")}catch{}return Tn||(Tn=[1e7]+1e3+4e3+8e3+1e11),Tn.replace(/[018]/g,e=>(e^(16*On()&15)>>e/4).toString(16))}function jn(e){return e.exception?.values?.[0]}function $n(e){const{message:t,event_id:n}=e;if(t)return t;const r=jn(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function zn(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=n||"Error")}function Hn(e,t){const n=jn(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r?.data,...t.data};n.mechanism.data=e}}function Fn(e){if(function(e){try{return e.__sentry_captured__}catch{}}(e))return!0;try{_n(e,"__sentry_captured__",!0)}catch{}return!1}function Bn(){return Pn()/1e3}function Un(){return(In??(In=function(){const{performance:e}=St;if(!e?.now||!e.timeOrigin)return Bn;const t=e.timeOrigin;return()=>(t+Mn(()=>e.now()))/1e3}()))()}let Vn=null;function qn(){return null===Vn&&(Vn=function(){const{performance:e}=St;if(!e?.now)return;const t=3e5,n=Mn(()=>e.now()),r=Pn(),o=e.timeOrigin;if("number"==typeof o&&Math.abs(o+n-r)<t)return o;const s=e.timing?.navigationStart;return"number"==typeof s&&Math.abs(s+n-r)<t?s:r-n}()),Vn}function Wn(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||Un(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:Nn()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Kn(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&0===Object.keys(t).length)return e;const r={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=Kn(r[e],t[e],n-1));return r}function Zn(){return Nn()}function Gn(){return Nn().substring(16)}const Yn="_sentrySpan";function Jn(e,t){t?_n(e,Yn,t):delete e[Yn]}function Xn(e){return e[Yn]}class Qn{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:Zn(),sampleRand:On()}}clone(){const e=new Qn;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._attributes={...this._attributes},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,e._conversationId=this._conversationId,Jn(e,Xn(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Wn(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(e){return this._conversationId=e||void 0,this._notifyScopeListeners(),this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],this._notifyScopeListeners()),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e,n=t instanceof Qn?t.getScopeData():cn(t)?e:void 0,{tags:r,attributes:o,extra:s,user:i,contexts:a,level:c,fingerprint:l=[],propagationContext:u,conversationId:d}=n||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...o},this._extra={...this._extra,...s},this._contexts={...this._contexts,...a},i&&Object.keys(i).length&&(this._user=i),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),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,Jn(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Zn(),sampleRand:On()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:Bn(),...e,message:e.message?Rn(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Xn(this),conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Kn(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t?.event_id||Nn();if(!this._client)return _t&&Rt.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n?.event_id||Nn();if(!this._client)return _t&&Rt.warn("No client configured on scope - will not capture message!"),r;const o=n?.syntheticException??new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:o,...n,event_id:r},this),r}captureEvent(e,t){const n=t?.event_id||Nn();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(_t&&Rt.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}}class er{constructor(e,t){let n,r;n=e||new Qn,r=t||new Qn,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(e){throw this._popScope(),e}return un(n)?n.then(e=>(this._popScope(),e),e=>{throw this._popScope(),e}):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1||!this._stack.pop())}}function tr(){const e=Et(kt());return e.stack=e.stack||new er(Ct("defaultCurrentScope",()=>new Qn),Ct("defaultIsolationScope",()=>new Qn))}function nr(e){return tr().withScope(e)}function rr(e,t){const n=tr();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function or(e){return tr().withScope(()=>e(tr().getIsolationScope()))}function sr(e){const t=Et(e);return t.acs?t.acs:{withIsolationScope:or,withScope:nr,withSetScope:rr,withSetIsolationScope:(e,t)=>or(t),getCurrentScope:()=>tr().getScope(),getIsolationScope:()=>tr().getIsolationScope()}}function ir(){return sr(kt()).getCurrentScope()}function ar(){return sr(kt()).getIsolationScope()}function cr(...e){const t=sr(kt());if(2===e.length){const[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function lr(){return ir().getClient()}function ur(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:o}=t,s={trace_id:n,span_id:o||Gn()};return r&&(s.parent_span_id=r),s}const dr="sentry.source",pr="sentry.sample_rate",hr="sentry.previous_trace_sample_rate",mr="sentry.op",fr="sentry.origin",gr="sentry.idle_span_finish_reason",yr="sentry.measurement_unit",br="sentry.measurement_value",vr="sentry.custom_span_name",_r="sentry.profile_id",Sr="sentry.exclusive_time",wr="sentry.link.type";function kr(e,t){e.setAttribute("http.response.status_code",t);const n=function(e){if(e<400&&e>=100)return{code:1};if(e>=400&&e<500)switch(e){case 401:return{code:2,message:"unauthenticated"};case 403:return{code:2,message:"permission_denied"};case 404:return{code:2,message:"not_found"};case 409:return{code:2,message:"already_exists"};case 413:return{code:2,message:"failed_precondition"};case 429:return{code:2,message:"resource_exhausted"};case 499:return{code:2,message:"cancelled"};default:return{code:2,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:2,message:"unimplemented"};case 503:return{code:2,message:"unavailable"};case 504:return{code:2,message:"deadline_exceeded"};default:return{code:2,message:"internal_error"}}return{code:2,message:"internal_error"}}(t);"unknown_error"!==n.message&&e.setStatus(n)}const Er="_sentryScope",Cr="_sentryIsolationScope";function xr(e){if(e){if("object"==typeof e&&"deref"in e&&"function"==typeof e.deref)try{return e.deref()}catch{return}return e}}function Tr(e){return{scope:e[Er],isolationScope:xr(e[Cr])}}const Ir="sentry-",Mr=/^sentry-/;function Or(e){const t=function(e){if(e&&(on(e)||Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>{const n=Pr(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):Pr(e)}(e);if(!t)return;const n=Object.entries(t).reduce((e,[t,n])=>(t.match(Mr)&&(e[t.slice(7)]=n),e),{});return Object.keys(n).length>0?n:void 0}function Pr(e){return e.split(",").map(e=>{const t=e.indexOf("=");return-1===t?[]:[e.slice(0,t),e.slice(t+1)].map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})}).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}const Rr=/^o(\d+)\./,Ar=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function Dr(e,t=!1){const{host:n,path:r,pass:o,port:s,projectId:i,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&o?`:${o}`:""}@${n}${s?`:${s}`:""}/${r?`${r}/`:r}${i}`}function Lr(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Nr(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=function(e){const t=e.match(Rr);return t?.[1]}(n)),r}function jr(e){const t="string"==typeof e?function(e){const t=Ar.exec(e);if(!t)return void It(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});const[n,r,o="",s="",i="",a=""]=t.slice(1);let c="",l=a;const u=l.split("/");if(u.length>1&&(c=u.slice(0,-1).join("/"),l=u.pop()),l){const e=l.match(/^\d+/);e&&(l=e[0])}return Lr({host:s,pass:o,path:c,projectId:l,port:i,protocol:n,publicKey:r})}(e):Lr(e);if(t&&function(e){if(!_t)return!0;const{port:t,projectId:n,protocol:r}=e;return!(["protocol","publicKey","host","projectId"].find(t=>!e[t]&&(Rt.error(`Invalid Sentry Dsn: ${t} missing`),!0))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?t&&isNaN(parseInt(t,10))&&(Rt.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(Rt.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(Rt.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}function $r(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;return"number"!=typeof t||isNaN(t)||t<0||t>1?void 0:t}const zr=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Hr(e=Zn(),t=Gn(),n){let r="";return void 0!==n&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function Fr(e=Zn(),t=Gn(),n){return`00-${e}-${t}-${n?"01":"00"}`}let Br=!1;function Ur(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:o,parent_span_id:s,status:i,origin:a,links:c}=Zr(e);return{parent_span_id:s,span_id:t,trace_id:n,data:r,op:o,status:i,origin:a,links:c}}function Vr(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),o=r?t:Zr(e).parent_span_id,s=Tr(e).scope;return{parent_span_id:o,span_id:r?s?.getPropagationContext().propagationSpanId||Gn():t,trace_id:n}}function qr(e){return e&&e.length>0?e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:o})=>({span_id:e,trace_id:t,sampled:1===n,attributes:o,...r})):void 0}function Wr(e){return"number"==typeof e?Kr(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Kr(e.getTime()):Un()}function Kr(e){return e>9999999999?e/1e3:e}function Zr(e){if(function(e){return"function"==typeof e.getSpanJSON}(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(function(e){return!!(e.attributes&&e.startTime&&e.name&&e.endTime&&e.status)}(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:"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0,start_timestamp:Wr(o),timestamp:Wr(i)||void 0,status:Yr(a),op:r[mr],origin:r[fr],links:qr(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function Gr(e){const{traceFlags:t}=e.spanContext();return 1===t}function Yr(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"internal_error"}const Jr="_sentryChildSpans",Xr="_sentryRootSpan";function Qr(e,t){_n(t,Xr,e[Xr]||e),e[Jr]?e[Jr].add(t):_n(e,Jr,new Set([t]))}function eo(e){const t=new Set;return function e(n){if(!t.has(n)&&Gr(n)){t.add(n);const r=n[Jr]?Array.from(n[Jr]):[];for(const t of r)e(t)}}(e),Array.from(t)}function to(e){return e[Xr]||e}function no(){const e=sr(kt());return e.getActiveSpan?e.getActiveSpan():Xn(ir())}function ro(){Br||(It(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),Br=!0)}let oo=!1;function so(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=e||lr()?.getOptions();return!(!t||null==t.tracesSampleRate&&!t.tracesSampler)}function io(e){Rt.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function ao(e,t){if(!t?.length||!e.description)return!1;for(const n of t){if(lo(n)){if(Dn(e.description,n))return _t&&io(e),!0;continue}if(!n.name&&!n.op)continue;const t=!n.name||Dn(e.description,n.name),r=!n.op||e.op&&Dn(e.op,n.op);if(t&&r)return _t&&io(e),!0}return!1}function co(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const t of e)t.parent_span_id===r&&(t.parent_span_id=n)}function lo(e){return"string"==typeof e||e instanceof RegExp}const uo="production",po="_frozenDsc";function ho(e,t){_n(e,po,t)}function mo(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o={environment:n.environment||uo,release:n.release,public_key:r,trace_id:e,org_id:Nr(t)};return t.emit("createDsc",o),o}function fo(e,t){const n=t.getPropagationContext();return n.dsc||mo(n.traceId,e)}function go(e){const t=lr();if(!t)return{};const n=to(e),r=Zr(n),o=r.data,s=n.spanContext().traceState,i=s?.get("sentry.sample_rate")??o[pr]??o[hr];function a(e){return"number"!=typeof i&&"string"!=typeof i||(e.sample_rate=`${i}`),e}const c=n[po];if(c)return a(c);const l=s?.get("sentry.dsc"),u=l&&Or(l);if(u)return a(u);const d=mo(e.spanContext().traceId,t),p=r.description;return"url"!==o[dr]&&p&&(d.transaction=p),so()&&(d.sampled=String(Gr(n)),d.sample_rand=s?.get("sentry.sample_rand")??Tr(n).scope?.getPropagationContext().sampleRand.toString()),a(d),t.emit("createDsc",d,n),d}class yo{constructor(e={}){this._traceId=e.traceId||Zn(),this._spanId=e.spanId||Gn()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,t,n){return this}addLink(e){return this}addLinks(e){return this}recordException(e,t){}}function bo(e,t=100,n=Infinity){try{return _o("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function vo(e,t=3,n=102400){const r=bo(e,t);return o=JSON.stringify(r),~-encodeURI(o).split(/%..|./).length>n?vo(e,t-1,n):r;var o}function _o(e,t,n=Infinity,r=Infinity,o=function(){const e=new WeakSet;return[function(t){return!!e.has(t)||(e.add(t),!1)},function(t){e.delete(t)}]}()){const[s,i]=o;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const a=function(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if("undefined"!=typeof global&&t===global)return"[Global]";if("undefined"!=typeof window&&t===window)return"[Window]";if("undefined"!=typeof document&&t===document)return"[Document]";if(pn(t))return Ft(t);if(cn(n=t)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n)return"[SyntheticEvent]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${zt(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const r=function(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(e){return`**non-serializable** (${e})`}var n}(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const c="number"==typeof t.__sentry_override_normalization_depth__?t.__sentry_override_normalization_depth__:n;if(0===c)return a.replace("object ","");if(s(t))return"[Circular ~]";const l=t;if(l&&"function"==typeof l.toJSON)try{return _o("",l.toJSON(),c-1,r,o)}catch{}const u=Array.isArray(t)?[]:{};let d=0;const p=kn(t);for(const e in p)if(Object.prototype.hasOwnProperty.call(p,e)){if(d>=r){u[e]="[MaxProperties ~]";break}u[e]=_o(e,p[e],c-1,r,o),d++}return i(t),u}function So(e,t=[]){return[e,t]}function wo(e,t){const[n,r]=e;return[n,[...r,t]]}function ko(e,t){const n=e[1];for(const e of n)if(t(e,e[0].type))return!0;return!1}function Eo(e){const t=Et(St);return t.encodePolyfill?t.encodePolyfill(e):(new TextEncoder).encode(e)}function Co(e){const[t,n]=e;let r=JSON.stringify(t);function o(e){"string"==typeof r?r="string"==typeof e?r+e:[Eo(r),e]:r.push("string"==typeof e?Eo(e):e)}for(const e of n){const[t,n]=e;if(o(`\n${JSON.stringify(t)}\n`),"string"==typeof n||n instanceof Uint8Array)o(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(bo(n))}o(e)}}return"string"==typeof r?r:function(e){const t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}(r)}function xo(e){return[{type:"span"},e]}function To(e){const t="string"==typeof e.data?Eo(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const Io={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item",metric:"metric",trace_metric:"metric"};function Mo(e){return Io[e]}function Oo(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Po(e,t,n,r){const o=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Dr(r)},...o&&{trace:o}}}function Ro(e){if(!e||0===e.length)return;const t={};return e.forEach(e=>{const n=e.attributes||{},r=n[yr],o=n[br];"string"==typeof r&&"number"==typeof o&&(t[e.name]={value:o,unit:r})}),t}class Ao{constructor(e={}){this._traceId=e.traceId||Zn(),this._spanId=e.spanId||Gn(),this._startTime=e.startTimestamp||Un(),this._links=e.links,this._attributes={},this.setAttributes({[fr]:"manual",[mr]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this._links?this._links.push(e):this._links=[e],this}addLinks(e){return this._links?this._links.push(...e):this._links=e,this}recordException(e,t){}spanContext(){const{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:n?1:0}}setAttribute(e,t){return void 0===t?delete this._attributes[e]:this._attributes[e]=t,this}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._startTime=Wr(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this.setAttribute(dr,"custom"),this}end(e){this._endTime||(this._endTime=Wr(e),function(e){if(!_t)return;const{description:t="< unknown name >",op:n="< unknown op >"}=Zr(e),{spanId:r}=e.spanContext(),o=to(e);Rt.log(`[Tracing] Finishing "${n}" ${o===e?"root ":""}span "${t}" with ID ${r}`)}(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[mr],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Yr(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[fr],profile_id:this._attributes[_r],exclusive_time:this._attributes[Sr],measurements:Ro(this._events),is_segment:this._isStandaloneSpan&&to(this)===this||void 0,segment_id:this._isStandaloneSpan?to(this).spanContext().spanId:void 0,links:qr(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,t,n){_t&&Rt.log("[Tracing] Adding an event to span:",e);const r=Do(t)?t:n||Un(),o=Do(t)?{}:t||{},s={name:e,time:Wr(r),attributes:o};return this._events.push(s),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const e=lr();if(e&&e.emit("spanEnd",this),!this._isStandaloneSpan&&this!==to(this))return;if(this._isStandaloneSpan)return void(this._sampled?function(e){const t=lr();if(!t)return;const n=e[1];n&&0!==n.length?t.sendEnvelope(e):t.recordDroppedEvent("before_send","span")}(function(e,t){const n=go(e[0]),r=t?.getDsn(),o=t?.getOptions().tunnel,s={sent_at:(new Date).toISOString(),...function(e){return!!e.trace_id&&!!e.public_key}(n)&&{trace:n},...!!o&&r&&{dsn:Dr(r)}},{beforeSendSpan:i,ignoreSpans:a}=t?.getOptions()||{},c=a?.length?e.filter(e=>!ao(Zr(e),a)):e,l=e.length-c.length;l&&t?.recordDroppedEvent("before_send","span",l);const u=i?e=>{const t=Zr(e);return i(t)||(ro(),t)}:Zr,d=[];for(const e of c){const t=u(e);t&&d.push(xo(t))}return So(s,d)}([this],e)):(_t&&Rt.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),e&&e.recordDroppedEvent("sample_rate","span")));const t=this._convertSpanToTransaction();t&&(Tr(this).scope||ir()).captureEvent(t)}_convertSpanToTransaction(){if(!Lo(Zr(this)))return;this._name||(_t&&Rt.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:e,isolationScope:t}=Tr(this),n=e?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(!0!==this._sampled)return;const r=eo(this).filter(e=>e!==this&&!function(e){return e instanceof Ao&&e.isStandaloneSpan()}(e)).map(e=>Zr(e)).filter(Lo),o=this._attributes[dr];delete this._attributes[vr],r.forEach(e=>{delete e.data[vr]});const s={contexts:{trace:Ur(this)},spans:r.length>1e3?r.sort((e,t)=>e.start_timestamp-t.start_timestamp).slice(0,1e3):r,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:t,dynamicSamplingContext:go(this)},request:n,...o&&{transaction_info:{source:o}}},i=Ro(this._events);return i&&Object.keys(i).length&&(_t&&Rt.log("[Measurements] Adding measurements to transaction event",JSON.stringify(i,void 0,2)),s.measurements=i),s}}function Do(e){return e&&"number"==typeof e||e instanceof Date||Array.isArray(e)}function Lo(e){return!!(e.start_timestamp&&e.timestamp&&e.span_id&&e.trace_id)}const No="__SENTRY_SUPPRESS_TRACING__";function jo(e){const t=Fo();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=Ho(e),{forceTransaction:r,parentSpan:o}=e;return(e.scope?t=>cr(e.scope,t):void 0!==o?e=>$o(o,e):e=>e())(()=>{const t=ir(),s=Uo(t,o);return e.onlyIfParent&&!s?new yo:zo({parentSpan:s,spanArguments:n,forceTransaction:r,scope:t})})}function $o(e,t){const n=Fo();return n.withActiveSpan?n.withActiveSpan(e,t):cr(n=>(Jn(n,e||void 0),t(n)))}function zo({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!so()){const r=new yo;return!n&&e||ho(r,{sampled:"false",sample_rate:"0",transaction:t.name,...go(r)}),r}const o=ar();let s;if(e&&!n)s=function(e,t,n){const{spanId:r,traceId:o}=e.spanContext(),s=!t.getScopeData().sdkProcessingMetadata[No]&&Gr(e),i=s?new Ao({...n,parentSpanId:r,traceId:o,sampled:s}):new yo({traceId:o});Qr(e,i);const a=lr();return a&&(a.emit("spanStart",i),n.endTimestamp&&a.emit("spanEnd",i)),i}(e,r,t),Qr(e,s);else if(e){const n=go(e),{traceId:o,spanId:i}=e.spanContext(),a=Gr(e);s=Bo({traceId:o,parentSpanId:i,...t},r,a),ho(s,n)}else{const{traceId:e,dsc:n,parentSpanId:i,sampled:a}={...o.getPropagationContext(),...r.getPropagationContext()};s=Bo({traceId:e,parentSpanId:i,...t},r,a),n&&ho(s,n)}return function(e){if(!_t)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=Zr(e),{spanId:o}=e.spanContext(),s=Gr(e),i=to(e),a=i===e,c=`[Tracing] Starting ${s?"sampled":"unsampled"} ${a?"root ":""}span`,l=[`op: ${n}`,`name: ${t}`,`ID: ${o}`];if(r&&l.push(`parent ID: ${r}`),!a){const{op:e,description:t}=Zr(i);l.push(`root ID: ${i.spanContext().spanId}`),e&&l.push(`root op: ${e}`),t&&l.push(`root description: ${t}`)}Rt.log(`${c}\n ${l.join("\n ")}`)}(s),function(e,t,n){e&&(_n(e,Cr,function(e){try{const t=St.WeakRef;if("function"==typeof t)return new t(e)}catch{}return e}(n)),_n(e,Er,t))}(s,r,o),s}function Ho(e){const t={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const n={...t};return n.startTimestamp=Wr(e.startTime),delete n.startTime,n}return t}function Fo(){return sr(kt())}function Bo(e,t,n){const r=lr(),o=r?.getOptions()||{},{name:s=""}=e,i={spanAttributes:{...e.attributes},spanName:s,parentSampled:n};r?.emit("beforeSampling",i,{decision:!1});const a=i.parentSampled??n,c=i.spanAttributes,l=t.getPropagationContext(),[u,d,p]=t.getScopeData().sdkProcessingMetadata[No]?[!1]:function(e,t,n){if(!so(e))return[!1];let r,o;"function"==typeof e.tracesSampler?(o=e.tracesSampler({...t,inheritOrSampleWith:e=>"number"==typeof t.parentSampleRate?t.parentSampleRate:"boolean"==typeof t.parentSampled?Number(t.parentSampled):e}),r=!0):void 0!==t.parentSampled?o=t.parentSampled:void 0!==e.tracesSampleRate&&(o=e.tracesSampleRate,r=!0);const s=$r(o);if(void 0===s)return _t&&Rt.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(o)} of type ${JSON.stringify(typeof o)}.`),[!1];if(!s)return _t&&Rt.log("[Tracing] Discarding transaction because "+("function"==typeof e.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),[!1,s,r];const i=n<s;return i||_t&&Rt.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(o)})`),[i,s,r]}(o,{name:s,parentSampled:a,attributes:c,parentSampleRate:$r(l.dsc?.sample_rate)},l.sampleRand),h=new Ao({...e,attributes:{[dr]:"custom",[pr]:void 0!==d&&p?d:void 0,...c},sampled:u});return!u&&r&&(_t&&Rt.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate","transaction")),r&&r.emit("spanStart",h),h}function Uo(e,t){if(t)return t;if(null===t)return;const n=Xn(e);if(!n)return;const r=lr();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?to(n):n}const Vo={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3};function qo(e,t={}){const n=new Map;let r,o=!1,s="externalFinish",i=!t.disableAutoFinish;const a=[],{idleTimeout:c=Vo.idleTimeout,finalTimeout:l=Vo.finalTimeout,childSpanTimeout:u=Vo.childSpanTimeout,beforeSpanEnd:d,trimIdleSpanEndTimestamp:p=!0}=t,h=lr();if(!h||!so()){const e=new yo;return ho(e,{sample_rate:"0",sampled:"false",...go(e)}),e}const m=ir(),f=no(),g=function(e){const t=jo(e);return Jn(ir(),t),_t&&Rt.log("[Tracing] Started span is an idle span"),t}(e);function y(){r&&(clearTimeout(r),r=void 0)}function b(e){y(),r=setTimeout(()=>{!o&&0===n.size&&i&&(s="idleTimeout",g.end(e))},c)}function v(e){r=setTimeout(()=>{!o&&i&&(s="heartbeatFailed",g.end(e))},u)}function _(e){o=!0,n.clear(),a.forEach(e=>e()),Jn(m,f);const t=Zr(g),{start_timestamp:r}=t;if(!r)return;t.data[gr]||g.setAttribute(gr,s);const i=t.status;i&&"unknown"!==i||g.setStatus({code:1}),Rt.log(`[Tracing] Idle span "${t.op}" finished`);const u=eo(g).filter(e=>e!==g);let d=0;u.forEach(t=>{t.isRecording()&&(t.setStatus({code:2,message:"cancelled"}),t.end(e),_t&&Rt.log("[Tracing] Cancelling span since span ended early",JSON.stringify(t,void 0,2)));const n=Zr(t),{timestamp:r=0,start_timestamp:o=0}=n,s=o<=e,i=r-o<=(l+c)/1e3;if(_t){const e=JSON.stringify(t,void 0,2);s?i||Rt.log("[Tracing] Discarding span since it finished after idle span final timeout",e):Rt.log("[Tracing] Discarding span since it happened after idle span was finished",e)}i&&s||(function(e,t){e[Jr]&&e[Jr].delete(t)}(g,t),d++)}),d>0&&g.setAttribute("sentry.idle_span_discarded_spans",d)}return g.end=new Proxy(g.end,{apply(e,t,n){if(d&&d(g),t instanceof yo)return;const[r,...o]=n,s=Wr(r||Un()),i=eo(g).filter(e=>e!==g),a=Zr(g);if(!i.length||!p)return _(s),Reflect.apply(e,t,[s,...o]);const c=h.getOptions().ignoreSpans,u=i?.reduce((e,t)=>{const n=Zr(t);return n.timestamp?c&&ao(n,c)?e:e?Math.max(e,n.timestamp):n.timestamp:e},void 0),m=a.start_timestamp,f=Math.min(m?m+l/1e3:Infinity,Math.max(m||-Infinity,Math.min(s,u||Infinity)));return _(f),Reflect.apply(e,t,[f,...o])}}),a.push(h.on("spanStart",e=>{var t;o||e===g||Zr(e).timestamp||e instanceof Ao&&e.isStandaloneSpan()||eo(g).includes(e)&&(t=e.spanContext().spanId,y(),n.set(t,!0),v(Un()+u/1e3))})),a.push(h.on("spanEnd",e=>{var t;o||(t=e.spanContext().spanId,n.has(t)&&n.delete(t),0===n.size&&b(Un()+c/1e3))})),a.push(h.on("idleSpanEnableAutoFinish",e=>{e===g&&(i=!0,b(),n.size&&v())})),t.disableAutoFinish||b(),setTimeout(()=>{o||(g.setStatus({code:2,message:"deadline_exceeded"}),s="finalTimeout",g.end())},l),g}function Wo(e){return new Zo(t=>{t(e)})}function Ko(e){return new Zo((t,n)=>{n(e)})}class Zo{constructor(e){this._state=0,this._handlers=[],this._runExecutor(e)}then(e,t){return new Zo((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(e){return new Zo((t,n)=>{let r,o;return this.then(t=>{o=!1,r=t,e&&e()},t=>{o=!0,r=t,e&&e()}).then(()=>{o?n(r):t(r)})})}_executeHandlers(){if(0===this._state)return;const e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(1===this._state&&e[1](this._value),2===this._state&&e[2](this._value),e[0]=!0)})}_runExecutor(e){const t=(e,t)=>{0===this._state&&(un(t)?t.then(n,r):(this._state=e,this._value=t,this._executeHandlers()))},n=e=>{t(1,e)},r=e=>{t(2,e)};try{e(n,r)}catch(e){r(e)}}}function Go(e,t,n,r=0){try{const o=Yo(t,n,e,r);return un(o)?o:Wo(o)}catch(e){return Ko(e)}}function Yo(e,t,n,r){const o=n[r];if(!e||!o)return e;const s=o({...e},t);return _t&&null===s&&Rt.log(`Event processor "${o.id||"?"}" dropped event`),un(s)?s.then(e=>Yo(e,t,n,r+1)):Yo(s,t,n,r+1)}let Jo,Xo,Qo,es;function ts(e,t){const{extra:n,tags:r,attributes:o,user:s,contexts:i,level:a,sdkProcessingMetadata:c,breadcrumbs:l,fingerprint:u,eventProcessors:d,attachments:p,propagationContext:h,transactionName:m,span:f}=t;ns(e,"extra",n),ns(e,"tags",r),ns(e,"attributes",o),ns(e,"user",s),ns(e,"contexts",i),e.sdkProcessingMetadata=Kn(e.sdkProcessingMetadata,c,2),a&&(e.level=a),m&&(e.transactionName=m),f&&(e.span=f),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),p.length&&(e.attachments=[...e.attachments,...p]),e.propagationContext={...e.propagationContext,...h}}function ns(e,t,n){e[t]=Kn(e[t],n,1)}function rs(e,t,n,r,o,s){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||Nn(),timestamp:t.timestamp||Bn()},l=n.integrations||e.integrations.map(e=>e.name);!function(e,t){const{environment:n,release:r,dist:o,maxValueLength:s}=t;e.environment=e.environment||n||uo,!e.release&&r&&(e.release=r),!e.dist&&o&&(e.dist=o);const i=e.request;i?.url&&s&&(i.url=Rn(i.url,s)),s&&e.exception?.values?.forEach(e=>{e.value&&(e.value=Rn(e.value,s))})}(c,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(c,l),o&&o.emit("applyFrameMetadata",t),void 0===t.type&&function(e,t){const n=function(e){const t=St._sentryDebugIds,n=St._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],o=n?Object.keys(n):[];if(es&&r.length===Xo&&o.length===Qo)return es;Xo=r.length,Qo=o.length,es={},Jo||(Jo={});const s=(t,n)=>{for(const r of t){const t=n[r],o=Jo?.[r];if(o&&es&&t)es[o[0]]=t,Jo&&(Jo[r]=[o[0],t]);else if(t){const n=e(r);for(let e=n.length-1;e>=0;e--){const o=n[e],s=o?.filename;if(s&&es&&Jo){es[s]=t,Jo[r]=[s,t];break}}}}};return t&&s(r,t),n&&s(o,n),es}(t);e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.filename&&(e.debug_id=n[e.filename])})})}(c,e.stackParser);const u=function(e,t){if(!t)return e;const n=e?e.clone():new Qn;return n.update(t),n}(r,n.captureContext);n.mechanism&&Hn(c,n.mechanism);const d=o?o.getEventProcessors():[],p=function(e,t){const n=Ct("globalScope",()=>new Qn).getScopeData();return e&&ts(n,e.getScopeData()),t&&ts(n,t.getScopeData()),n}(s,u),h=[...n.attachments||[],...p.attachments];return h.length&&(n.attachments=h),function(e,t){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=t;!function(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&&"transaction"!==e.type&&(e.transaction=a)}(e,t),r&&function(e,t){e.contexts={trace:Vr(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:go(t),...e.sdkProcessingMetadata};const n=Zr(to(t)).description;n&&!e.transaction&&"transaction"===e.type&&(e.transaction=n)}(e,r),function(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}(e,n),function(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,o),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,s)}(c,p),Go([...d,...p.eventProcessors],c,n).then(e=>(e&&function(e){const t={};if(e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})}),0===Object.keys(t).length)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(([e,t])=>{n.push({type:"sourcemap",code_file:e,debug_id:t})})}(e),"number"==typeof i&&i>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:bo(e.data,t,n)}}))},...e.user&&{user:bo(e.user,t,n)},...e.contexts&&{contexts:bo(e.contexts,t,n)},...e.extra&&{extra:bo(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=bo(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:bo(e.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=bo(e.contexts.flags,3,n)),r}(e,i,a):e))}const os=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function ss(e,t){return ir().captureException(e,function(e){if(e)return function(e){return e instanceof Qn||"function"==typeof e}(e)||function(e){return Object.keys(e).some(e=>os.includes(e))}(e)?{captureContext:e}:e}(t))}function is(e,t){return ir().captureEvent(e,t)}function as(e,t){ar().setContext(e,t)}function cs(e){const t=ar(),n=ir(),{userAgent:r}=St.navigator||{},o=function(e){const t=Un(),n={sid:Nn(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return{sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${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}}}(n)};return e&&Wn(n,e),n}({user:n.getUser()||t.getUser(),...r&&{userAgent:r},...e}),s=t.getSession();return"ok"===s?.status&&Wn(s,{status:"exited"}),ls(),t.setSession(o),o}function ls(){const e=ar(),t=ir().getSession()||e.getSession();t&&function(e){let t={};"ok"===e.status&&(t={status:"exited"}),Wn(e,t)}(t),us(),e.setSession()}function us(){const e=ar(),t=lr(),n=e.getSession();n&&t&&t.captureSession(n)}function ds(e=!1){e?ls():us()}function ps(e){return`${e.protocol?`${e.protocol}:`:""}//${e.host}${e.port?`:${e.port}`:""}${e.path?`/${e.path}`:""}/api/`}const hs=[];function ms(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;if(t.forEach(e=>{e.isDefaultInstance=!0}),Array.isArray(n))r=[...t,...n];else if("function"==typeof n){const e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return function(e){const t={};return e.forEach(e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}(r)}function fs(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function gs(e,t,n){if(n[t.name])_t&&Rt.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,hs.includes(t.name)||"function"!=typeof t.setupOnce||(t.setupOnce(),hs.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),"function"==typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(t,r)=>n(t,r,e))}if("function"==typeof t.processEvent){const n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}_t&&Rt.log(`Integration installed: ${t.name}`)}}function ys(e,t){const n=t??function(e){return bs().get(e)}(e)??[];if(0===n.length)return;const r=e.getOptions(),o=function(e,t,n,r){const o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=Dr(r)),So(o,[(s=e,[{type:"log",item_count:s.length,content_type:"application/vnd.sentry.items.log+json"},{items:s}])]);var s}(n,r._metadata,r.tunnel,e.getDsn());bs().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function bs(){return Ct("clientToLogBufferMap",()=>new WeakMap)}function vs(e,t){const n=t??function(e){return _s().get(e)}(e)??[];if(0===n.length)return;const r=e.getOptions(),o=function(e,t,n,r){const o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=Dr(r)),So(o,[(s=e,[{type:"trace_metric",item_count:s.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:s}])]);var s}(n,r._metadata,r.tunnel,e.getDsn());_s().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function _s(){return Ct("clientToMetricBufferMap",()=>new WeakMap)}const Ss=Symbol.for("SentryBufferFullError");function ws(e=100){const t=new Set;function n(e){t.delete(e)}return{get $(){return Array.from(t)},add:function(r){if(!(t.size<e))return Ko(Ss);const o=r();return t.add(o),o.then(()=>n(o),()=>n(o)),o},drain:function(e){if(!t.size)return Wo(!0);const n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;const r=[n,new Promise(t=>setTimeout(()=>t(!1),e))];return Promise.race(r)}}}function ks(e,t,n=Pn()){return function(e,t){return e[t]||e.all||0}(e,t)>n}function Es(e,{statusCode:t,headers:n},r=Pn()){const o={...e},s=n?.["x-sentry-rate-limits"],i=n?.["retry-after"];if(s)for(const e of s.trim().split(",")){const[t,n,,,s]=e.split(":",5),i=parseInt(t,10),a=1e3*(isNaN(i)?60:i);if(n)for(const e of n.split(";"))"metric_bucket"===e&&s&&!s.split(";").includes("custom")||(o[e]=r+a);else o.all=r+a}else i?o.all=r+function(e,t=Pn()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(i,r):429===t&&(o.all=r+6e4);return o}function Cs(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}const xs="Not capturing exception because it's already been captured.",Ts="Discarded session because of missing or non-string release",Is=Symbol.for("SentryInternalError"),Ms=Symbol.for("SentryDoNotSendEventError");function Os(e){return{message:e,[Is]:!0}}function Ps(e){return{message:e,[Ms]:!0}}function Rs(e){return!!e&&"object"==typeof e&&Is in e}function As(e){return!!e&&"object"==typeof e&&Ms in e}function Ds(e,t,n,r,o){let s,i=0,a=!1;e.on(n,()=>{i=0,clearTimeout(s),a=!1}),e.on(t,t=>{i+=r(t),i>=8e5?o(e):a||(a=!0,s=setTimeout(()=>{o(e)},5e3))}),e.on("flush",()=>{o(e)})}class Ls{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=ws(e.transportOptions?.bufferSize??64),e.dsn?this._dsn=jr(e.dsn):_t&&Rt.warn("No DSN provided, client will not send events."),this._dsn){const r=(t=this._dsn,n=e._metadata?e._metadata.sdk:void 0,e.tunnel||`${function(e){return`${ps(e)}${e.projectId}/envelope/`}(t)}?${function(e,t){const n={sentry_version:"7"};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}(t,n)}`);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:r})}var t,n;this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&Ds(this,"afterCaptureLog","flushLogs",Hs,ys),(this._options.enableMetrics??this._options._experiments?.enableMetrics??1)&&Ds(this,"afterCaptureMetric","flushMetrics",zs,vs)}captureException(e,t,n){const r=Nn();if(Fn(e))return _t&&Rt.log(xs),r;const o={event_id:r,...t};return this._process(()=>this.eventFromException(e,o).then(e=>this._captureEvent(e,o,n)).then(e=>e),"error"),o.event_id}captureMessage(e,t,n,r){const o={event_id:Nn(),...n},s=sn(e)?e:String(e),i=an(e),a=i?this.eventFromMessage(s,t,o):this.eventFromException(e,o);return this._process(()=>a.then(e=>this._captureEvent(e,o,r)),i?"unknown":"error"),o.event_id}captureEvent(e,t,n){const r=Nn();if(t?.originalException&&Fn(t.originalException))return _t&&Rt.log(xs),r;const o={event_id:r,...t},s=e.sdkProcessingMetadata||{},i=s.capturedSpanScope,a=s.capturedSpanIsolationScope,c=Ns(e.type);return this._process(()=>this._captureEvent(e,o,i||n,a),c),o.event_id}captureSession(e){this.sendSession(e),Wn(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(e){const t=this._transport;if(!t)return!0;this.emit("flush");const n=await this._isClientDoneProcessing(e),r=await t.flush(e);return n&&r}async close(e){const t=await this.flush(e);return this.getOptions().enabled=!1,this.emit("close"),t}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const t=this._integrations[e.name];gs(this,e,this._integrations),t||fs(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=function(e,t,n,r){const o=Oo(n),s=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){if(!t)return e;const n=e.sdk||{};e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0}}(e,n?.sdk);const i=Po(e,o,r,t);return delete e.sdkProcessingMetadata,So(i,[[{type:s},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=wo(n,To(e));this.sendEnvelope(n).then(t=>this.emit("afterSendEvent",e,t))}sendSession(e){const{release:t,environment:n=uo}=this._options;if("aggregates"in e){const r=e.attrs||{};if(!r.release&&!t)return void(_t&&Rt.warn(Ts));r.release=r.release||t,r.environment=r.environment||n,e.attrs=r}else{if(!e.release&&!t)return void(_t&&Rt.warn(Ts));e.release=e.release||t,e.environment=e.environment||n}this.emit("beforeSendSession",e);const r=function(e,t,n,r){const o=Oo(n);return So({sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:Dr(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(e,t,n=1){if(this._options.sendClientReports){const r=`${e}:${t}`;_t&&Rt.log(`Recording outcome: "${r}"${n>1?` (${n} times)`:""}`),this._outcomes[r]=(this._outcomes[r]||0)+n}}on(e,t){const n=this._hooks[e]=this._hooks[e]||new Set,r=(...e)=>t(...e);return n.add(r),()=>{n.delete(r)}}emit(e,...t){const n=this._hooks[e];n&&n.forEach(e=>e(...t))}async sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)try{return await this._transport.send(e)}catch(e){return _t&&Rt.error("Error while sending envelope:",e),{}}return _t&&Rt.error("Transport disabled"),{}}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach(t=>{t&&gs(e,t,n)}),n}(this,e),fs(this,e)}_updateSessionFromEvent(e,t){let n="fatal"===t.level,r=!1;const o=t.exception?.values;if(o){r=!0,n=!1;for(const e of o)if(!1===e.mechanism?.handled){n=!0;break}}const s="ok"===e.status;(s&&0===e.errors||s&&n)&&(Wn(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(e=>setTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n,r){const o=this.getOptions(),s=Object.keys(this._integrations);return!t.integrations&&s?.length&&(t.integrations=s),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),rs(o,e,t,n,this,r).then(e=>{if(null===e)return e;this.emit("postprocessEvent",e,t),e.contexts={trace:ur(n),...e.contexts};const r=fo(this,n);return e.sdkProcessingMetadata={dynamicSamplingContext:r,...e.sdkProcessingMetadata},e})}_captureEvent(e,t={},n=ir(),r=ar()){return _t&&js(e)&&Rt.log(`Captured error event \`${Cs(e)[0]||"<unknown>"}\``),this._processEvent(e,t,n,r).then(e=>e.event_id,e=>{_t&&(As(e)?Rt.log(e.message):Rs(e)?Rt.warn(e.message):Rt.warn(e))})}_processEvent(e,t,n,r){const o=this.getOptions(),{sampleRate:s}=o,i=$s(e),a=js(e),c=`before send for type \`${e.type||"error"}\``,l=void 0===s?void 0:$r(s);if(a&&"number"==typeof l&&On()>l)return this.recordDroppedEvent("sample_rate","error"),Ko(Ps(`Discarding event because it's not included in the random sample (sampling rate = ${s})`));const u=Ns(e.type);return this._prepareEvent(e,t,n,r).then(e=>{if(null===e)throw this.recordDroppedEvent("event_processor",u),Ps("An event processor returned `null`, will not send event.");if(t.data&&!0===t.data.__sentry__)return e;const n=function(e,t,n,r){const{beforeSend:o,beforeSendTransaction:s,beforeSendSpan:i,ignoreSpans:a}=t;let c=n;if(js(c)&&o)return o(c,r);if($s(c)){if(i||a){const t=function(e){const{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:s,data:i,op:a}=e.contexts?.trace??{};return{data:i??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:t??"",origin:s,profile_id:i?.[_r],exclusive_time:i?.[Sr],measurements:e.measurements,is_segment:!0}}(c);if(a?.length&&ao(t,a))return null;if(i){const e=i(t);e?c=Kn(n,{type:"transaction",timestamp:(l=e).timestamp,start_timestamp:l.start_timestamp,transaction:l.description,contexts:{trace:{trace_id:l.trace_id,span_id:l.span_id,parent_span_id:l.parent_span_id,op:l.op,status:l.status,origin:l.origin,data:{...l.data,...l.profile_id&&{[_r]:l.profile_id},...l.exclusive_time&&{[Sr]:l.exclusive_time}}}},measurements:l.measurements}):ro()}if(c.spans){const t=[],n=c.spans;for(const e of n)if(a?.length&&ao(e,a))co(n,e);else if(i){const n=i(e);n?t.push(n):(ro(),t.push(e))}else t.push(e);const r=c.spans.length-t.length;r&&e.recordDroppedEvent("before_send","span",r),c.spans=t}}if(s)return c.spans&&(c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:c.spans.length}),s(c,r)}var l;return c}(this,o,e,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(un(e))return e.then(e=>{if(!cn(e)&&null!==e)throw Os(n);return e},e=>{throw Os(`${t} rejected with ${e}`)});if(!cn(e)&&null!==e)throw Os(n);return e}(n,c)}).then(o=>{if(null===o)throw this.recordDroppedEvent("before_send",u),i&&this.recordDroppedEvent("before_send","span",1+(e.spans||[]).length),Ps(`${c} returned \`null\`, will not send event.`);const s=n.getSession()||r.getSession();if(a&&s&&this._updateSessionFromEvent(s,o),i){const e=(o.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(o.spans?o.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const l=o.transaction_info;if(i&&l&&o.transaction!==e.transaction){const e="custom";o.transaction_info={...l,source:e}}return this.sendEvent(o,t),o}).then(null,e=>{if(As(e)||Rs(e))throw e;throw this.captureException(e,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:e}),Os(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===Ss&&this.recordDroppedEvent("queue_overflow",t),e))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t}})}_flushOutcomes(){_t&&Rt.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(_t&&Rt.log("No outcomes to send"));if(!this._dsn)return void(_t&&Rt.log("No dsn provided, will not send outcomes"));_t&&Rt.log("Sending outcomes:",e);const t=(n=e,So((r=this._options.tunnel&&Dr(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:Bn(),discarded_events:n}]]));var n,r;this.sendEnvelope(t)}}function Ns(e){return"replay_event"===e?"replay":e||"error"}function js(e){return void 0===e.type}function $s(e){return"transaction"===e.type}function zs(e){let t=0;return e.name&&(t+=2*e.name.length),t+=8,t+Fs(e.attributes)}function Hs(e){let t=0;return e.message&&(t+=2*e.message.length),t+Fs(e.attributes)}function Fs(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*Bs(e[0]):an(e)?t+=Bs(e):t+=100}),t}function Bs(e){return"string"==typeof e?2*e.length:"number"==typeof e?8:"boolean"==typeof e?4:0}function Us(e){return"isRelative"in e}function Vs(e,t){const n=e.indexOf("://")<=0&&0!==e.indexOf("//"),r=t??(n?"thismessage:/":void 0);try{if("canParse"in URL&&!URL.canParse(e,r))return;const t=new URL(e,r);return n?{isRelative:n,pathname:t.pathname,search:t.search,hash:t.hash}:t}catch{}}function qs(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 Ws(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&&-1!==s){const t=e.slice(s+1);i=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${o?",base64":""}${i?`,${i}`:""}`}return e}function Ks(e){return"/"===e[e.length-1]?e.slice(0,-1):e}function Zs(e){"aggregates"in e?void 0===e.attrs?.ip_address&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):void 0===e.ipAddress&&(e.ipAddress="{{auto}}")}function Gs(e,t,n=[t],r="npm"){const o=e._metadata||{};o.sdk||(o.sdk={name:`sentry.javascript.${t}`,packages:n.map(e=>({name:`${r}:@sentry/${e}`,version:wt})),version:wt}),e._metadata=o}function Ys(e={}){const t=e.client||lr();if(!function(){const e=lr();return!1!==e?.getOptions().enabled&&!!e?.getTransport()}()||!t)return{};const n=sr(kt());if(n.getTraceData)return n.getTraceData(e);const r=e.scope||ir(),o=e.span||no(),s=o?function(e){const{traceId:t,spanId:n}=e.spanContext();return Hr(t,n,Gr(e))}(o):function(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Hr(t,r,n)}(r),i=function(e){if(e)return function(e){if(0!==Object.keys(e).length)return Object.entries(e).reduce((e,[t,n],r)=>{const o=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`,s=0===r?o:`${e},${o}`;return s.length>8192?(_t&&Rt.warn(`Not adding key: ${t} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):s},"")}(Object.entries(e).reduce((e,[t,n])=>(n&&(e[`${Ir}${t}`]=n),e),{}))}(o?go(o):fo(t,r));if(!zr.test(s))return Rt.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const a={"sentry-trace":s,baggage:i};return e.propagateTraceparent&&(a.traceparent=o?function(e){const{traceId:t,spanId:n}=e.spanContext();return Fr(t,n,Gr(e))}(o):function(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Fr(t,r,n)}(r)),a}const Js=100;function Xs(e,t){const n=lr(),r=ar();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:s=Js}=n.getOptions();if(s<=0)return;const i={timestamp:Bn(),...e},a=o?It(()=>o(i,t)):i;null!==a&&(n.emit&&n.emit("beforeAddBreadcrumb",a,t),r.addBreadcrumb(a,s))}let Qs;const ei=new WeakMap,ti=()=>({name:"FunctionToString",setupOnce(){Qs=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=wn(this),n=ei.has(lr())&&void 0!==t?t:this;return Qs.apply(n,e)}}catch{}},setup(e){ei.set(e,!0)}}),ni=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,'can\'t redefine non-configurable property "solana"',"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],ri=(e={})=>{let t;return{name:"EventFilters",setup(n){const r=n.getOptions();t=si(e,r)},processEvent(n,r,o){if(!t){const n=o.getOptions();t=si(e,n)}return function(e,t){if(e.type){if("transaction"===e.type&&function(e,t){if(!t?.length)return!1;const n=e.transaction;return!!n&&Ln(n,t)}(e,t.ignoreTransactions))return _t&&Rt.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${$n(e)}`),!0}else{if(function(e,t){return!!t?.length&&Cs(e).some(e=>Ln(e,t))}(e,t.ignoreErrors))return _t&&Rt.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${$n(e)}`),!0;if(function(e){return!!e.exception?.values?.length&&!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&"Error"!==e.type||e.value)}(e))return _t&&Rt.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${$n(e)}`),!0;if(function(e,t){if(!t?.length)return!1;const n=ii(e);return!!n&&Ln(n,t)}(e,t.denyUrls))return _t&&Rt.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${$n(e)}.\nUrl: ${ii(e)}`),!0;if(!function(e,t){if(!t?.length)return!0;const n=ii(e);return!n||Ln(n,t)}(e,t.allowUrls))return _t&&Rt.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${$n(e)}.\nUrl: ${ii(e)}`),!0}return!1}(n,t)?null:n}}},oi=(e={})=>({...ri(e),name:"InboundFilters"});function si(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:ni],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function ii(e){try{const t=[...e.exception?.values??[]].reverse().find(e=>void 0===e.mechanism?.parent_id&&e.stacktrace?.frames?.length),n=t?.stacktrace?.frames;return n?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(n):null}catch{return _t&&Rt.error(`Cannot extract url for event ${$n(e)}`),null}}function ai(e,t,n,r,o,s){if(!o.exception?.values||!s||!dn(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=ci(e,t,r,s.originalException,n,o.exception.values,i,0))}function ci(e,t,n,r,o,s,i,a){if(s.length>=n+1)return s;let c=[...s];if(dn(r[o],Error)){ui(i,a,r);const s=e(t,r[o]),l=c.length;di(s,o,l,a),c=ci(e,t,n,r[o],o,[s,...c],s,l)}return li(r)&&r.errors.forEach((s,l)=>{if(dn(s,Error)){ui(i,a,r);const u=e(t,s),d=c.length;di(u,`errors[${l}]`,d,a),c=ci(e,t,n,s,o,[u,...c],u,d)}}),c}function li(e){return Array.isArray(e.errors)}function ui(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...li(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function di(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function pi(){"console"in St&&xt.forEach(function(e){e in St.console&&vn(St.console,e,function(t){return Tt[e]=t,function(...t){Wt("console",{args:t,level:e});const n=Tt[e];n?.apply(St.console,t)}})})}function hi(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const mi=()=>{let e;return{name:"Dedupe",processEvent(t){if(t.type)return t;try{if(function(e,t){return!(!t||!function(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!gi(e,t)||!fi(e,t))}(e,t)&&!function(e,t){const n=yi(t),r=yi(e);return!!(n&&r&&n.type===r.type&&n.value===r.value&&gi(e,t)&&fi(e,t))}(e,t))}(t,e))return _t&&Rt.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}};function fi(e,t){let n=Ht(e),r=Ht(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let e=0;e<r.length;e++){const t=r[e],o=n[e];if(t.filename!==o.filename||t.lineno!==o.lineno||t.colno!==o.colno||t.function!==o.function)return!1}return!0}function gi(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch{return!1}}function yi(e){return e.exception?.values?.[0]}function bi(e){return e.split(",").some(e=>e.trim().startsWith(Ir))}function vi(e,t,n,r){const o={url:Ws(e),type:"fetch","http.method":n,[fr]:r,[mr]:"http.client"};return t&&(Us(t)||(o["http.url"]=Ws(t.href),o["server.address"]=t.host),t.search&&(o["http.query"]=t.search),t.hash&&(o["http.fragment"]=t.hash)),o}function _i(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}const Si=St;function wi(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function ki(e,t){const n="fetch";Vt(n,e),qt(n,()=>Ei(void 0,t))}function Ei(e,t=!1){t&&!function(){if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in Si))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}())return!1;if(wi(Si.fetch))return!0;let e=!1;const t=Si.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=wi(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){_t&&Rt.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e}()||vn(St,"fetch",function(t){return function(...n){const r=new Error,{method:o,url:s}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:Ti(t),method:xi(n,"method")?String(n.method).toUpperCase():hn(t)&&xi(t,"method")?String(t.method).toUpperCase():"GET"}}const t=e[0];return{url:Ti(t),method:xi(t,"method")?String(t.method).toUpperCase():"GET"}}(n),i={args:n,fetchData:{method:o,url:s},startTimestamp:1e3*Un(),virtualError:r,headers:Ii(n)};return e||Wt("fetch",{...i}),t.apply(St,n).then(async t=>(e?e(t):Wt("fetch",{...i,endTimestamp:1e3*Un(),response:t}),t),e=>{Wt("fetch",{...i,endTimestamp:1e3*Un(),error:e}),en(e)&&void 0===e.stack&&(e.stack=r.stack,_n(e,"framesToPop",1));const t=lr(),n=t?.getOptions().enhanceFetchErrorMessages??"always";if(!1!==n&&e instanceof TypeError&&("Failed to fetch"===e.message||"Load failed"===e.message||"NetworkError when attempting to fetch resource."===e.message))try{const t=new URL(i.fetchData.url).host;"always"===n?e.message=`${e.message} (${t})`:_n(e,"__sentry_fetch_url_host__",t)}catch{}throw e})}})}function Ci(e){let t;try{t=e.clone()}catch{return}!async function(e,t){if(e?.body){const n=e.body,r=n.getReader(),o=setTimeout(()=>{n.cancel().then(null,()=>{})},9e4);let s=!0;for(;s;){let e;try{e=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:o}=await r.read();clearTimeout(e),o&&(t(),s=!1)}catch{s=!1}finally{clearTimeout(e)}}clearTimeout(o),r.releaseLock(),n.cancel().then(null,()=>{})}}(t,()=>{Wt("fetch-body-resolved",{endTimestamp:1e3*Un(),response:e})})}function xi(e,t){return!!e&&"object"==typeof e&&!!e[t]}function Ti(e){return"string"==typeof e?e:e?xi(e,"url")?e.url:e.toString?e.toString():"":""}function Ii(e){const[t,n]=e;try{if("object"==typeof n&&null!==n&&"headers"in n&&n.headers)return new Headers(n.headers);if(hn(t))return new Headers(t.headers)}catch{}}function Mi(){return"undefined"!=typeof window&&(!(("undefined"==typeof __SENTRY_BROWSER_BUNDLE__||!__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0))||function(){const e=St.process;return"renderer"===e?.type}())}const Oi=St;let Pi=0;function Ri(){return Pi>0}function Ai(e,t={}){if(!function(e){return"function"==typeof e}(e))return e;try{const t=e.__sentry_wrapped__;if(t)return"function"==typeof t?t:e;if(wn(e))return e}catch{return e}const n=function(...n){try{const r=n.map(e=>Ai(e,t));return e.apply(this,r)}catch(e){throw Pi++,setTimeout(()=>{Pi--}),cr(r=>{r.addEventProcessor(e=>(t.mechanism&&(zn(e,void 0,void 0),Hn(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),ss(e)}),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}Sn(n,e),_n(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}function Di(){const e=yn(),{referrer:t}=Oi.document||{},{userAgent:n}=Oi.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}function Li(e,t){const n=ji(e,t),r={type:Hi(t),value:Fi(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function Ni(e,t){return{exception:{values:[Li(e,t)]}}}function ji(e,t){const n=t.stacktrace||t.stack||"",r=function(e){return e&&$i.test(e.message)?1:0}(t),o=function(e){return"number"==typeof e.framesToPop?e.framesToPop:0}(t);try{return e(n,r,o)}catch{}return[]}const $i=/Minified React error #\d+;/i;function zi(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function Hi(e){const t=e?.name;return!t&&zi(e)?e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception":t}function Fi(e){const t=e?.message;return zi(e)?Array.isArray(e.message)&&2==e.message.length?e.message[1]:"wasm exception":t?function(e){return en(e)&&"__sentry_fetch_url_host__"in e&&"string"==typeof e.__sentry_fetch_url_host__}(n=t.error&&"string"==typeof t.error.message?t.error:e)?`${n.message} (${n.__sentry_fetch_url_host__})`:n.message:"No error message";var n}function Bi(e,t,n,r,o){let s;if(nn(t)&&t.error)return Ni(e,t.error);if(rn(t)||tn(t,"DOMException")){const o=t;if("stack"in t)s=Ni(e,t);else{const t=o.name||(rn(o)?"DOMError":"DOMException"),i=o.message?`${t}: ${o.message}`:t;s=Ui(e,i,n,r),zn(s,i)}return"code"in o&&(s.tags={...s.tags,"DOMException.code":`${o.code}`}),s}return en(t)?Ni(e,t):cn(t)||ln(t)?(s=function(e,t,n,r){const o=lr(),s=o?.getOptions().normalizeDepth,i=function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}(t),a={__serialized__:vo(t,s)};if(i)return{exception:{values:[Li(e,i)]},extra:a};const c={exception:{values:[{type:ln(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Vi(t,{isUnhandledRejection:r})}]},extra:a};if(n){const t=ji(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}(e,t,n,o),Hn(s,{synthetic:!0}),s):(s=Ui(e,t,n,r),zn(s,`${t}`,void 0),Hn(s,{synthetic:!0}),s)}function Ui(e,t,n,r){const o={};if(r&&n){const r=ji(e,n);r.length&&(o.exception={values:[{value:t,stacktrace:{frames:r}}]}),Hn(o,{synthetic:!0})}if(sn(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return o.logentry={message:e,params:n},o}return o.message=t,o}function Vi(e,{isUnhandledRejection:t}){const n=function(e){const t=Object.keys(kn(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}(e),r=t?"promise rejection":"exception";return nn(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:ln(e)?`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}class qi extends Ls{constructor(e){const t=(n=e,{release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:Oi.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...n});var n;Gs(t,"browser",["browser"],Oi.SENTRY_SDK_SOURCE||"npm"),t._metadata?.sdk&&(t._metadata.sdk.settings={infer_ip:t.sendDefaultPii?"auto":"never",...t._metadata.sdk.settings}),super(t);const{sendDefaultPii:r,sendClientReports:o,enableLogs:s,_experiments:i,enableMetrics:a}=this._options,c=a??i?.enableMetrics??!0;Oi.document&&(o||s||c)&&Oi.document.addEventListener("visibilitychange",()=>{"hidden"===Oi.document.visibilityState&&(o&&this._flushOutcomes(),s&&ys(this),c&&vs(this))}),r&&this.on("beforeSendSession",Zs)}eventFromException(e,t){return function(e,t,n,r){const o=Bi(e,t,n?.syntheticException||void 0,r);return Hn(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),Wo(o)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,o){const s=Ui(e,t,r?.syntheticException||void 0,o);return s.level=n,r?.event_id&&(s.event_id=r.event_id),Wo(s)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n,r)}}const Wi="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Ki=St,Zi=(e,t,n,r)=>{let o,s;return i=>{t.value>=0&&(i||r)&&(s=t.value-(o??0),(s||void 0===o)&&(o=t.value,t.delta=s,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,n),e(t)))}},Gi=(e=!0)=>{const t=Ki.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Yi=()=>{const e=Gi();return e?.activationStart??0};function Ji(e,t,n){Ki.document&&Ki.addEventListener(e,t,n)}function Xi(e,t,n){Ki.document&&Ki.removeEventListener(e,t,n)}let Qi=-1;const ea=new Set,ta=e=>{if(function(e){return"pagehide"===e.type||"hidden"===Ki.document?.visibilityState}(e)&&Qi>-1){if("visibilitychange"===e.type||"pagehide"===e.type)for(const e of ea)e();isFinite(Qi)||(Qi="visibilitychange"===e.type?e.timeStamp:0,Xi("prerenderingchange",ta,!0))}},na=()=>{if(Ki.document&&Qi<0){const e=Yi(),t=Ki.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(t=>"hidden"===t.name&&t.startTime>e)[0]?.startTime;Qi=t??("hidden"!==Ki.document?.visibilityState||Ki.document?.prerendering?Infinity:0),Ji("visibilitychange",ta,!0),Ji("pagehide",ta,!0),Ji("prerenderingchange",ta,!0)}return{get firstHiddenTime(){return Qi},onHidden(e){ea.add(e)}}},ra=(e,t=-1)=>{const n=Gi();let r="navigate";return n&&(Ki.document?.prerendering||Yi()>0?r="prerender":Ki.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},oa=new WeakMap;function sa(e,t){try{return oa.get(e)||oa.set(e,new t),oa.get(e)}catch(e){return new t}}class ia{constructor(){ia.prototype.__init.call(this),ia.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(e){if(e.hadRecentInput)return;const t=this._sessionEntries[0],n=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this._sessionValue+=e.value,this._sessionEntries.push(e)):(this._sessionValue=e.value,this._sessionEntries=[e]),this._onAfterProcessingUnexpectedShift?.(e)}}const aa=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},ca=e=>{let t=!1;return()=>{t||(e(),t=!0)}},la=e=>{Ki.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},ua=[1800,3e3],da=[.1,.25];let pa=0,ha=Infinity,ma=0;const fa=e=>{e.forEach(e=>{e.interactionId&&(ha=Math.min(ha,e.interactionId),ma=Math.max(ma,e.interactionId),pa=ma?(ma-ha)/7+1:0)})};let ga;const ya=()=>ga?pa:performance.interactionCount||0,ba=()=>{"interactionCount"in performance||ga||(ga=aa("event",fa,{type:"event",buffered:!0,durationThreshold:0}))};let va=0;class _a{constructor(){_a.prototype.__init.call(this),_a.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){va=ya(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const e=Math.min(this._longestInteractionList.length-1,Math.floor((ya()-va)/50));return this._longestInteractionList[e]}_processEntry(e){if(this._onBeforeProcessingEntry?.(e),!e.interactionId&&"first-input"!==e.entryType)return;const t=this._longestInteractionList.at(-1);let n=this._longestInteractionMap.get(e.interactionId);if(n||this._longestInteractionList.length<10||e.duration>t._latency){if(n?e.duration>n._latency?(n.entries=[e],n._latency=e.duration):e.duration===n._latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],_latency:e.duration},this._longestInteractionMap.set(n.id,n),this._longestInteractionList.push(n)),this._longestInteractionList.sort((e,t)=>t._latency-e._latency),this._longestInteractionList.length>10){const e=this._longestInteractionList.splice(10);for(const t of e)this._longestInteractionMap.delete(t.id)}this._onAfterProcessingINPCandidate?.(n)}}}const Sa=e=>{const t=Ki.requestIdleCallback||Ki.setTimeout;"hidden"===Ki.document?.visibilityState?e():(Ji("visibilitychange",e=ca(e),{once:!0,capture:!0}),Ji("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),Xi("visibilitychange",e,{capture:!0}),Xi("pagehide",e,{capture:!0})}))},wa=[200,500];class ka{_processEntry(e){this._onBeforeProcessingEntry?.(e)}}const Ea=[2500,4e3],Ca=[800,1800],xa=e=>{Ki.document?.prerendering?la(()=>xa(e)):"complete"!==Ki.document?.readyState?addEventListener("load",()=>xa(e),!0):setTimeout(e)},Ta={},Ia={};let Ma,Oa,Pa,Ra;function Aa(e,t=!1){return Ba("cls",e,$a,Ma,t)}function Da(e,t=!1){return Ba("lcp",e,za,Oa,t)}function La(e){return Ba("inp",e,Fa,Ra)}function Na(e,t){return Ua(e,t),Ia[e]||(function(e){const t={};"event"===e&&(t.durationThreshold=0),aa(e,t=>{ja(e,{entries:t})},t)}(e),Ia[e]=!0),Va(e,t)}function ja(e,t){const n=Ta[e];if(n?.length)for(const r of n)try{r(t)}catch(t){Wi&&Rt.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${zt(r)}\nError:`,t)}}function $a(){return((e,t={})=>{((e,t={})=>{la(()=>{const n=na(),r=ra("FCP");let o;const s=aa("paint",e=>{for(const t of e)"first-contentful-paint"===t.name&&(s.disconnect(),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-Yi(),0),r.entries.push(t),o(!0)))});s&&(o=Zi(e,r,ua,t.reportAllChanges))})})(ca(()=>{const n=ra("CLS",0);let r;const o=na(),s=sa(t,ia),i=e=>{for(const t of e)s._processEntry(t);s._sessionValue>n.value&&(n.value=s._sessionValue,n.entries=s._sessionEntries,r())},a=aa("layout-shift",i);a&&(r=Zi(e,n,da,t.reportAllChanges),o.onHidden(()=>{i(a.takeRecords()),r(!0)}),Ki?.setTimeout?.(r))}))})(e=>{ja("cls",{metric:e}),Ma=e},{reportAllChanges:!0})}function za(){return((e,t={})=>{la(()=>{const n=na(),r=ra("LCP");let o;const s=sa(t,ka),i=e=>{t.reportAllChanges||(e=e.slice(-1));for(const t of e)s._processEntry(t),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-Yi(),0),r.entries=[t],o())},a=aa("largest-contentful-paint",i);if(a){o=Zi(e,r,Ea,t.reportAllChanges);const n=ca(()=>{i(a.takeRecords()),a.disconnect(),o(!0)}),s=e=>{e.isTrusted&&(Sa(n),Xi(e.type,s,{capture:!0}))};for(const e of["keydown","click","visibilitychange"])Ji(e,s,{capture:!0})}})})(e=>{ja("lcp",{metric:e}),Oa=e},{reportAllChanges:!0})}function Ha(){return((e,t={})=>{const n=ra("TTFB"),r=Zi(e,n,Ca,t.reportAllChanges);xa(()=>{const e=Gi();e&&(n.value=Math.max(e.responseStart-Yi(),0),n.entries=[e],r(!0))})})(e=>{ja("ttfb",{metric:e}),Pa=e})}function Fa(){return((e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=na();la(()=>{ba();const r=ra("INP");let o;const s=sa(t,_a),i=e=>{Sa(()=>{for(const t of e)s._processEntry(t);const t=s._estimateP98LongestInteraction();t&&t._latency!==r.value&&(r.value=t._latency,r.entries=t.entries,o())})},a=aa("event",i,{durationThreshold:t.durationThreshold??40});o=Zi(e,r,wa,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{i(a.takeRecords()),o(!0)}))})})(e=>{ja("inp",{metric:e}),Ra=e})}function Ba(e,t,n,r,o=!1){let s;return Ua(e,t),Ia[e]||(s=n(),Ia[e]=!0),r&&t({metric:r}),Va(e,t,o?s:void 0)}function Ua(e,t){Ta[e]=Ta[e]||[],Ta[e].push(t)}function Va(e,t,n){return()=>{n&&n();const r=Ta[e];if(!r)return;const o=r.indexOf(t);-1!==o&&r.splice(o,1)}}function qa(e){return"number"==typeof e&&isFinite(e)}function Wa(e,t,n,{...r}){const o=Zr(e).start_timestamp;return o&&o>t&&"function"==typeof e.updateStartTime&&e.updateStartTime(t),$o(e,()=>{const e=jo({startTime:t,...r});return e&&e.end(n),e})}function Ka(e){const t=lr();if(!t)return;const{name:n,transaction:r,attributes:o,startTime:s}=e,{release:i,environment:a,sendDefaultPii:c}=t.getOptions(),l=t.getIntegrationByName("Replay"),u=l?.getReplayId(),d=ir(),p=d.getUser(),h=void 0!==p?p.email||p.id||p.ip_address:void 0;let m;try{m=d.getScopeData().contexts.profile.profile_id}catch{}return jo({name:n,attributes:{release:i,environment:a,user:h||void 0,profile_id:m||void 0,replay_id:u||void 0,transaction:r,"user_agent.original":Ki.navigator?.userAgent,"client.address":c?"{{auto}}":void 0,...o},startTime:s,experimental:{standalone:!0}})}function Za(){return Ki.addEventListener&&Ki.performance}function Ga(e){return e/1e3}function Ya(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function Ja(e,t){let n,r=!1;function o(e){!r&&n&&t(e,n),r=!0}(()=>{const e=e=>{"pagehide"!==e.type&&"hidden"!==Ki.document?.visibilityState||o("pagehide")};Ji("visibilitychange",e,{capture:!0,once:!0}),Ji("pagehide",e,{capture:!0,once:!0})})();const s=e.on("beforeStartNavigationSpan",(e,t)=>{t?.isRedirect||(o("navigation"),s(),i())}),i=e.on("afterStartPageLoadSpan",e=>{n=e.spanContext().spanId,i()})}function Xa(e){return e?((qn()||performance.timeOrigin)+e)/1e3:e}function Qa(e){const t={};if(null!=e.nextHopProtocol){const{name:n,version:r}=function(e){let t="unknown",n="unknown",r="";for(const o of e){if("/"===o){[t,n]=e.split("/");break}if(!isNaN(Number(o))){t="h"===r?"http":r,n=e.split(r)[1];break}r+=o}return r===e&&(t=r),{name:t,version:n}}(e.nextHopProtocol);t["network.protocol.version"]=r,t["network.protocol.name"]=n}return qn()||Za()?.timeOrigin?(n={...t,"http.request.redirect_start":Xa(e.redirectStart),"http.request.redirect_end":Xa(e.redirectEnd),"http.request.worker_start":Xa(e.workerStart),"http.request.fetch_start":Xa(e.fetchStart),"http.request.domain_lookup_start":Xa(e.domainLookupStart),"http.request.domain_lookup_end":Xa(e.domainLookupEnd),"http.request.connect_start":Xa(e.connectStart),"http.request.secure_connection_start":Xa(e.secureConnectionStart),"http.request.connection_end":Xa(e.connectEnd),"http.request.request_start":Xa(e.requestStart),"http.request.response_start":Xa(e.responseStart),"http.request.response_end":Xa(e.responseEnd),"http.request.time_to_first_byte":null!=e.responseStart?e.responseStart/1e3:void 0},Object.fromEntries(Object.entries(n).filter(([,e])=>null!=e))):t;var n}let ec,tc,nc=0,rc={};function oc(e,t,n,r,o=n){const s=function(e){return"secureConnection"===e?"connectEnd":"fetch"===e?"domainLookupStart":`${e}End`}(n),i=t[s],a=t[`${n}Start`];a&&i&&Wa(e,r+Ga(a),r+Ga(i),{op:`browser.${o}`,name:t.name,attributes:{[fr]:"auto.ui.browser.metrics",..."redirect"===n&&null!=t.redirectCount?{"http.redirect_count":t.redirectCount}:{}}})}const sc=({entries:e})=>{const t=no(),n=t?to(t):void 0,r=n?Zr(n).description:ir().getScopeData().transactionName;e.forEach(e=>{const t=e;if(!t.identifier)return;const n=t.name,o=t.renderTime,s=t.loadTime,[i,a]=s?[Ga(s),"load-time"]:o?[Ga(o),"render-time"]:[Un(),"entry-emission"],c="image-paint"===n?Ga(Math.max(0,(o??0)-(s??0))):0,l={[fr]:"auto.ui.browser.elementtiming",[mr]:"ui.elementtiming",[dr]:"component","sentry.span_start_time_source":a,"sentry.transaction_name":r,"element.id":t.id,"element.type":t.element?.tagName?.toLowerCase()||"unknown","element.size":t.naturalWidth&&t.naturalHeight?`${t.naturalWidth}x${t.naturalHeight}`:void 0,"element.render_time":o,"element.load_time":s,"element.url":t.url||void 0,"element.identifier":t.identifier,"element.paint_type":n};!function(e,t){const n=Fo();if(n.startSpan)return n.startSpan(e,t);const r=Ho(e),{forceTransaction:o,parentSpan:s,scope:i}=e,a=i?.clone();cr(a,()=>{const n=void 0!==(i=s)?e=>$o(i,e):e=>e();var i;return n(()=>{const n=ir(),i=Uo(n,s),a=e.onlyIfParent&&!i?new yo:zo({parentSpan:i,spanArguments:r,forceTransaction:o,scope:n});return Jn(n,a),function(e,t,n=()=>{},r=()=>{}){let o;try{o=e()}catch(e){throw t(e),n(),e}return function(e,t,n,r){return un(e)?e.then(e=>(n(),r(e),e),e=>{throw t(e),n(),e}):(n(),r(e),e)}(o,t,n,r)}(()=>t(a),()=>{const{status:e}=Zr(a);!a.isRecording()||e&&"ok"!==e||a.setStatus({code:2,message:"internal_error"})},()=>{a.end()})})})}({name:`element[${t.identifier}]`,attributes:l,startTime:i,onlyIfParent:!0},e=>{e.end(i+c)})})};let ic,ac,cc,lc;function uc(e){Vt("dom",e),qt("dom",dc)}function dc(){if(!Ki.document)return;const e=Wt.bind(null,"dom"),t=pc(e,!0);Ki.document.addEventListener("click",t,!1),Ki.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{const n=Ki,r=n[t]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(vn(r,"addEventListener",function(t){return function(n,r,o){if("click"===n||"keypress"==n)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},s=r[n]=r[n]||{refCount:0};if(!s.handler){const r=pc(e);s.handler=r,t.call(this,n,r,o)}s.refCount++}catch{}return t.call(this,n,r,o)}}),vn(r,"removeEventListener",function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this.__sentry_instrumentation_handlers__||{},o=n[t];o&&(o.refCount--,o.refCount<=0&&(e.call(this,t,o.handler,r),o.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function pc(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(e){try{return e.target}catch{return null}}(n);if(function(e,t){return"keypress"===e&&(!t?.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}(n.type,r))return;_n(n,"_sentryCaptured",!0),r&&!r._sentryId&&_n(r,"_sentryId",Nn());const o="keypress"===n.type?"input":n.type;(function(e){if(e.type!==ac)return!1;try{if(!e.target||e.target._sentryId!==cc)return!1}catch{}return!0})(n)||(e({event:n,name:o,global:t}),ac=n.type,cc=r?r._sentryId:void 0),clearTimeout(ic),ic=Ki.setTimeout(()=>{cc=void 0,ac=void 0},1e3)}}function hc(e){const t="history";Vt(t,e),qt(t,mc)}function mc(){function e(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const r=lc,o=function(e){try{return new URL(e,Ki.location.origin).toString()}catch{return e}}(String(n));if(lc=o,r===o)return e.apply(this,t);Wt("history",{from:r,to:o})}return e.apply(this,t)}}Ki.addEventListener("popstate",()=>{const e=Ki.location.href,t=lc;lc=e,t!==e&&Wt("history",{from:t,to:e})}),"history"in Si&&Si.history&&(vn(Ki.history,"pushState",e),vn(Ki.history,"replaceState",e))}const fc={};function gc(e){const t=fc[e];if(t)return t;let n=Ki[e];if(wi(n))return fc[e]=n.bind(Ki);const r=Ki.document;if(r&&"function"==typeof r.createElement)try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);const o=t.contentWindow;o?.[e]&&(n=o[e]),r.head.removeChild(t)}catch(t){Wi&&Rt.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n?fc[e]=n.bind(Ki):n}function yc(...e){return gc("setTimeout")(...e)}const bc="__sentry_xhr_v3__";function vc(e){Vt("xhr",e),qt("xhr",_c)}function _c(){if(!Ki.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){const r=new Error,o=1e3*Un(),s=on(n[0])?n[0].toUpperCase():void 0,i=function(e){if(on(e))return e;try{return e.toString()}catch{}}(n[1]);if(!s||!i)return e.apply(t,n);t[bc]={method:s,url:i,request_headers:{}},"POST"===s&&i.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const a=()=>{const e=t[bc];if(e&&4===t.readyState){try{e.status_code=t.status}catch{}Wt("xhr",{endTimestamp:1e3*Un(),startTimestamp:o,xhr:t,virtualError:r})}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(a(),e.apply(t,n))}):t.addEventListener("readystatechange",a),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){const[r,o]=n,s=t[bc];return s&&on(r)&&on(o)&&(s.request_headers[r.toLowerCase()]=o),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){const r=t[bc];return r?(void 0!==n[0]&&(r.body=n[0]),Wt("xhr",{startTimestamp:1e3*Un(),xhr:t}),e.apply(t,n)):e.apply(t,n)}})}const Sc=Symbol.for("sentry__originalRequestBody");function wc(e){return new URLSearchParams(e).toString()}function kc(e,t=Rt){try{if("string"==typeof e)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[wc(e)];if(!e)return[void 0]}catch(n){return Wi&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Wi&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Ec(e=[]){if(e.length>=2&&e[1]&&"object"==typeof e[1]&&"body"in e[1])return e[1].body;if(e.length>=1&&e[0]instanceof Request){const t=e[0][Sc];return void 0!==t?t:void 0}}function Cc(e){let t;try{t=e.getAllResponseHeaders()}catch(t){return Wi&&Rt.error(t,"Failed to get xhr response headers",e),{}}return t?t.split("\r\n").reduce((e,t)=>{const[n,r]=t.split(": ");return r&&(e[n.toLowerCase()]=r),e},{}):{}}const xc=[],Tc=new Map,Ic=new Map,Mc={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"},Oc=({metric:e})=>{if(null==e.value)return;const t=Ga(e.value);if(t>60)return;const n=e.entries.find(t=>t.duration===e.value&&Mc[t.name]);if(!n)return;const{interactionId:r}=n,o=Mc[n.name],s=Ga(qn()+n.startTime),i=no(),a=i?to(i):void 0,c=null!=r?Tc.get(r):void 0,l=c?.span||a,u=l?Zr(l).description:ir().getScopeData().transactionName,d=Ka({name:c?.elementName||fn(n.target),transaction:u,attributes:{[fr]:"auto.http.browser.inp",[mr]:`ui.interaction.${o}`,[Sr]:n.duration},startTime:s});d&&(d.addEvent("inp",{[yr]:"millisecond",[br]:e.value}),d.end(s+t))};function Pc(e,t=gc("fetch")){let n=0,r=0;return function(e,t,n=ws(e.bufferSize||64)){let r={};return{send:function(o){const s=[];if(ko(o,(t,n)=>{const o=Mo(n);ks(r,o)?e.recordDroppedEvent("ratelimit_backoff",o):s.push(t)}),0===s.length)return Promise.resolve({});const i=So(o[0],s),a=t=>{!function(e,t){return ko(e,(e,n)=>t.includes(n))}(i,["client_report"])?ko(i,(n,r)=>{e.recordDroppedEvent(t,Mo(r))}):_t&&Rt.warn(`Dropping client report. Will not send outcomes (reason: ${t}).`)};return n.add(()=>t({body:Co(i)}).then(e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&_t&&Rt.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=Es(r,e),e),e=>{throw a("network_error"),_t&&Rt.error("Encountered error running transport request:",e),e})).then(e=>e,e=>{if(e===Ss)return _t&&Rt.error("Skipped sending event because buffer is full."),a("queue_overflow"),Promise.resolve({});throw e})},flush:e=>n.drain(e)}}(e,async function(o){const s=o.body.length;n+=s,r++;const i={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const n=await t(e.url,i);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get("X-Sentry-Rate-Limits"),"retry-after":n.headers.get("Retry-After")}}}catch(e){throw fc.fetch=void 0,e}finally{n-=s,r--}},ws(e.bufferSize||40))}const Rc="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function Ac(e,t,n,r){const o={filename:e,function:"<anonymous>"===t?At:t,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==r&&(o.colno=r),o}const Dc=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Lc=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Nc=/\((\S*)(?::(\d+))(?::(\d+))\)/,jc=/at (.+?) ?\(data:(.+?),/,$c=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,zc=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Hc=Nt([30,e=>{const t=e.match(jc);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=Dc.exec(e);if(n){const[,e,t,r]=n;return Ac(e,At,+t,+r)}const r=Lc.exec(e);if(r){if(r[2]&&0===r[2].indexOf("eval")){const e=Nc.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}const[e,t]=Fc(r[1]||At,r[2]);return Ac(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],[50,e=>{const t=$c.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=zc.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||At;return[n,e]=Fc(n,e),Ac(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),Fc=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:At,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Bc=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(e){t.console&&function(e){const t="console";Vt(t,e),qt(t,pi)}(function(e){return function(t){if(lr()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:hi(t.level),message:An(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${An(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}Xs(n,{input:t.args,level:t.level})}}(e)),t.dom&&uc(function(e,t){return function(n){if(lr()!==e)return;let r,o,s="object"==typeof t?t.serializeAttribute:void 0,i="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;i&&i>1024&&(Rc&&Rt.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${i} was configured. Sentry will use 1024 instead.`),i=1024),"string"==typeof s&&(s=[s]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=fn(t,{keyAttrs:s,maxStringLength:i}),o=bn(t)}catch{r="<unknown>"}if(0===r.length)return;const a={category:`ui.${n.name}`,message:r};o&&(a.data={"ui.component_name":o}),Xs(a,{event:n.event,name:n.name,global:n.global})}}(e,t.dom)),t.xhr&&vc(function(e){return function(t){if(lr()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,o=t.xhr[bc];if(!n||!r||!o)return;const{method:s,url:i,status_code:a,body:c}=o,l={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},u={category:"xhr",data:{method:s,url:i,status_code:a},type:"http",level:_i(a)};e.emit("beforeOutgoingRequestBreadcrumb",u,l),Xs(u,l)}}(e)),t.fetch&&ki(function(e){return function(t){if(lr()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){const o={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},s={category:"fetch",data:t.fetchData,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",s,o),Xs(s,o)}else{const o=t.response,s={...t.fetchData,status_code:o?.status},i={input:t.args,response:o,startTimestamp:n,endTimestamp:r},a={category:"fetch",data:s,type:"http",level:_i(s.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",a,i),Xs(a,i)}}}(e)),t.history&&hc(function(e){return function(t){if(lr()!==e)return;let n=t.from,r=t.to;const o=qs(Oi.location.href);let s=n?qs(n):void 0;const i=qs(r);s?.path||(s=o),o.protocol===i.protocol&&o.host===i.host&&(r=i.relative),o.protocol===s.protocol&&o.host===s.host&&(n=s.relative),Xs({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on("beforeSendEvent",function(e){return function(t){lr()===e&&Xs({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:$n(t)},{event:t})}}(e))}}},Uc=["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"],Vc=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&vn(Oi,"setTimeout",qc),t.setInterval&&vn(Oi,"setInterval",qc),t.requestAnimationFrame&&vn(Oi,"requestAnimationFrame",Wc),t.XMLHttpRequest&&"XMLHttpRequest"in Oi&&vn(XMLHttpRequest.prototype,"send",Kc);const e=t.eventTarget;e&&(Array.isArray(e)?e:Uc).forEach(e=>function(e,t){const n=Oi,r=n[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(vn(r,"addEventListener",function(n){return function(r,o,s){try{"function"==typeof o.handleEvent&&(o.handleEvent=Ai(o.handleEvent,{mechanism:{data:{handler:zt(o),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&function(e,t,n){e&&"object"==typeof e&&"removeEventListener"in e&&"function"==typeof e.removeEventListener&&e.removeEventListener(t,n)}(this,r,o),n.apply(this,[r,Ai(o,{mechanism:{data:{handler:zt(o),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),s])}}),vn(r,"removeEventListener",function(e){return function(t,n,r){try{const o=n.__sentry_wrapped__;o&&e.call(this,t,o,r)}catch{}return e.call(this,t,n,r)}}))}(e,t))}}};function qc(e){return function(...t){return t[0]=Ai(t[0],{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${zt(e)}`}}),e.apply(this,t)}}function Wc(e){return function(t){return e.apply(this,[Ai(t,{mechanism:{data:{handler:zt(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function Kc(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&vn(n,e,function(t){const n={mechanism:{data:{handler:zt(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=wn(t);return r&&(n.mechanism.data.handler=zt(r)),Ai(t,n)})}),e.apply(this,t)}}const Zc=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(function(e){Zt(t=>{const{stackParser:n,attachStacktrace:r}=Yc();if(lr()!==e||Ri())return;const{msg:o,url:s,line:i,column:a,error:c}=t,l=function(e,t,n,r){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||[],l=r,u=n,d=function(e){if(on(e)&&0!==e.length)return e.startsWith("data:")?`<${Ws(e,!1)}>`:e}(t)??yn();return 0===c.length&&c.push({colno:l,filename:d,function:At,in_app:!0,lineno:u}),e}(Bi(n,c||o,void 0,r,!1),s,i,a);l.level="error",is(l,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}(e),Gc("onerror")),t.onunhandledrejection&&(function(e){Jt(t=>{const{stackParser:n,attachStacktrace:r}=Yc();if(lr()!==e||Ri())return;const o=function(e){if(an(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}(t),s=an(o)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(o)}`}]}}:Bi(n,o,void 0,r,!0);s.level="error",is(s,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}(e),Gc("onunhandledrejection"))}}};function Gc(e){Rc&&Rt.log(`Global Handler attached: ${e}`)}function Yc(){const e=lr();return e?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Jc=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,o){ai(Li,o.getOptions().stackParser,n,t,e,r)}}};function Xc(e={}){const t=Oi.document,n=t?.head||t?.body;if(!n)return void(Rc&&Rt.error("[showReportDialog] Global document not defined"));const r=ir(),o=lr(),s=o?.getDsn();if(!s)return void(Rc&&Rt.error("[showReportDialog] DSN not configured"));const i={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||ar().lastEventId()},a=Oi.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=function(e,t){const n=jr(e);if(!n)return"";const r=`${ps(n)}embed/error-page/`;let o=`dsn=${Dr(n)}`;for(const e in t)if("dsn"!==e&&"onClose"!==e)if("user"===e){const e=t.user;if(!e)continue;e.name&&(o+=`&name=${encodeURIComponent(e.name)}`),e.email&&(o+=`&email=${encodeURIComponent(e.email)}`)}else o+=`&${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`;return`${r}?${o}`}(s,i);const{onLoad:c,onClose:l}=i;if(c&&(a.onload=c),l){const e=t=>{if("__sentry_reportdialog_closed__"===t.data)try{l()}finally{Oi.removeEventListener("message",e)}};Oi.addEventListener("message",e)}n.appendChild(a)}const Qc=St,el="sentryReplaySession",tl="Unable to send Replay",nl=15e4,rl=5e3,ol=2e7;var sl=Object.defineProperty,il=(e,t,n)=>((e,t,n)=>t in e?sl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),al=/* @__PURE__ */(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))(al||{});function cl(e){const t=e?.host;return Boolean(t?.shadowRoot===e)}function ll(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function ul(e){try{const n=e.rules||e.cssRules;return n?((t=Array.from(n,dl).join("")).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t):null}catch(e){return null}var t}function dl(e){let t;if(function(e){return"styleSheet"in e}(e))try{t=ul(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(e){}else if(function(e){return"selectorText"in e}(e)){let t=e.cssText;const n=e.selectorText.includes(":"),r="string"==typeof e.style.all&&e.style.all;if(r&&(t=function(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,o=r[n],s=r.getPropertyPriority(o);t+=`${o}:${r.getPropertyValue(o)}${s?" !important":""};`}return`${e.selectorText} { ${t} }`}(e)),n&&(t=t.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),n||r)return t}return t||e.cssText}class pl{constructor(){il(this,"idNodeMap",/* @__PURE__ */new Map),il(this,"nodeMetaMap",/* @__PURE__ */new WeakMap)}getId(e){if(!e)return-1;const t=this.getMeta(e)?.id;return t??-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){this.idNodeMap.set(t.id,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=/* @__PURE__ */new Map,this.nodeMetaMap=/* @__PURE__ */new WeakMap}}function hl({maskInputOptions:e,tagName:t,type:n}){return"OPTION"===t&&(t="SELECT"),Boolean(e[t.toLowerCase()]||n&&e[n]||"password"===n||"INPUT"===t&&!n&&e.text)}function ml({isMasked:e,element:t,value:n,maskInputFn:r}){let o=n||"";return e?(r&&(o=r(o,t)),"*".repeat(o.length)):o}function fl(e){return e.toLowerCase()}function gl(e){return e.toUpperCase()}const yl="__rrweb_original__";function bl(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?fl(t):null}function vl(e,t,n){return"INPUT"!==t||"radio"!==n&&"checkbox"!==n?e.value:e.getAttribute("value")||""}function _l(e,t){let n;try{n=new URL(e,t??window.location.href)}catch(e){return null}const r=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return r?.[1]??null}const Sl={};function wl(e){const t=Sl[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const o=t.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(t)}catch(e){}return Sl[e]=r.bind(window)}function kl(...e){return wl("setTimeout")(...e)}function El(...e){return wl("clearTimeout")(...e)}function Cl(e){try{return e.contentDocument}catch(e){}}let xl=1;const Tl=new RegExp("[^a-z0-9-_:]");function Il(){return xl++}let Ml,Ol;const Pl=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Rl=/^(?:[a-z+]+:)?\/\//i,Al=/^www\..*/i,Dl=/^(data:)([^,]*),(.*)/i;function Ll(e,t){return(e||"").replace(Pl,(e,n,r,o,s,i)=>{const a=r||s||i,c=n||o||"";if(!a)return e;if(Rl.test(a)||Al.test(a))return`url(${c}${a}${c})`;if(Dl.test(a))return`url(${c}${a}${c})`;if("/"===a[0])return`url(${c}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+a}${c})`;const l=t.split("/"),u=a.split("/");l.pop();for(const e of u)"."!==e&&(".."===e?l.pop():l.push(e));return`url(${c}${l.join("/")}${c})`})}const Nl=/^[^ \t\n\r\u000c]+/,jl=/^[, \t\n\r\u000c]+/,$l=/* @__PURE__ */new WeakMap;function zl(e,t){return t&&""!==t.trim()?Hl(e,t):t}function Hl(e,t){let n=$l.get(e);if(n||(n=e.createElement("a"),$l.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function Fl(e,t,n,r,o,s,i){if(!r)return r;if("src"===n||"href"===n&&("use"!==t||"#"!==r[0]))return zl(e,r);if("xlink:href"===n&&"#"!==r[0])return zl(e,r);if("background"===n&&("table"===t||"td"===t||"th"===t))return zl(e,r);if("srcset"===n)return function(e,t){if(""===t.trim())return t;let n=0;function r(e){let r;const o=e.exec(t.substring(n));return o?(r=o[0],n+=r.length,r):""}const o=[];for(;r(jl),!(n>=t.length);){let s=r(Nl);if(","===s.slice(-1))s=zl(e,s.substring(0,s.length-1)),o.push(s);else{let r="";s=zl(e,s);let i=!1;for(;;){const e=t.charAt(n);if(""===e){o.push((s+r).trim());break}if(i)")"===e&&(i=!1);else{if(","===e){n+=1,o.push((s+r).trim());break}"("===e&&(i=!0)}r+=e,n+=1}}}return o.join(", ")}(e,r);if("style"===n){let t=Ll(r,Hl(e));return i&&i.size>0&&(t=function(e,t){if(!e||0===t.size)return e;try{const n=e.split(";"),r=[];for(let e of n){if(e=e.trim(),!e)continue;const n=e.indexOf(":");if(-1===n){r.push(e);continue}const o=e.slice(0,n).trim();t.has(o)||r.push(e)}return r.join("; ")+(r.length>0&&e.endsWith(";")?";":"")}catch(t){return console.warn("Error filtering CSS properties:",t),e}}(t,i)),t}return"object"===t&&"data"===n?zl(e,r):"function"==typeof s?s(n,r,o):r}function Bl(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function Ul(e,t,n=Infinity,r=0){return e?e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Ul(e.parentNode,t,n,r+1):-1}function Vl(e,t){return n=>{const r=n;if(null===r)return!1;try{if(e)if("string"==typeof e){if(r.matches(`.${e}`))return!0}else if(function(e,t){for(let n=e.classList.length;n--;)if(t.test(e.classList[n]))return!0;return!1}(r,e))return!0;return!(!t||!r.matches(t))}catch{return!1}}}function ql(e,t,n,r,o,s){try{const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===i)return!1;if("INPUT"===i.tagName){const e=i.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(e))return!0}let a=-1,c=-1;if(s){if(c=Ul(i,Vl(r,o)),c<0)return!0;a=Ul(i,Vl(t,n),c>=0?c:Infinity)}else{if(a=Ul(i,Vl(t,n)),a<0)return!1;c=Ul(i,Vl(r,o),a>=0?a:Infinity)}return a>=0?!(c>=0)||a<=c:!(c>=0||!s)}catch(e){}return!!s}function Wl(e){return null==e?"":e.toLowerCase()}function Kl(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:p=!1,inlineStylesheet:h=!0,maskInputOptions:m={},maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:b,dataURLOptions:v={},inlineImages:_=!1,recordCanvas:S=!1,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:E=5e3,onBlockedImageLoad:C,onStylesheetLoad:x,stylesheetLoadTimeout:T=5e3,keepIframeSrcFn:I=()=>!1,newlyAddedElement:M=!1,ignoreCSSAttributes:O}=t;let{preserveWhiteSpace:P=!0}=t;const R=function(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskAttributeFn:c,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:m={},maskTextFn:f,maskInputFn:g,dataURLOptions:y={},inlineImages:b,recordCanvas:v,keepIframeSrcFn:_,newlyAddedElement:S=!1,ignoreCSSAttributes:w}=t,k=function(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return 1===n?void 0:n}(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:al.Document,childNodes:[],compatMode:e.compatMode}:{type:al.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:al.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:k};case e.ELEMENT_NODE:return function(e,t){const{doc:n,blockClass:r,blockSelector:o,unblockSelector:s,inlineStylesheet:i,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:l,dataURLOptions:u={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:h,newlyAddedElement:m=!1,rootId:f,maskTextClass:g,unmaskTextClass:y,maskTextSelector:b,unmaskTextSelector:v,ignoreCSSAttributes:_}=t,S=function(e,t,n,r){try{if(r&&e.matches(r))return!1;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;)if(t.test(e.classList[n]))return!0;if(n)return e.matches(n)}catch(e){}return!1}(e,r,o,s),w=function(e){if(e instanceof HTMLFormElement)return"form";const t=fl(e.tagName);return Tl.test(t)?"div":t}(e);let k={};const E=e.attributes.length;for(let t=0;t<E;t++){const r=e.attributes[t];r.name&&!Bl(w,r.name)&&(k[r.name]=Fl(n,w,fl(r.name),r.value,e,c,_))}if("link"===w&&i){const t=Array.from(n.styleSheets).find(t=>t.href===e.href);let r=null;t&&(r=ul(t)),r&&(k.rel=null,k.href=null,k.crossorigin=null,k._cssText=Ll(r,t.href))}if("style"===w&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const t=ul(e.sheet);t&&(k._cssText=Ll(t,Hl(n)))}if("input"===w||"textarea"===w||"select"===w||"option"===w){const t=e,n=bl(t),r=vl(t,gl(w),n),o=t.checked;if("submit"!==n&&"button"!==n&&r){const e=ql(t,g,b,y,v,hl({type:n,tagName:gl(w),maskInputOptions:a}));k.value=ml({isMasked:e,element:t,value:r,maskInputFn:l})}o&&(k.checked=o)}if("option"===w&&(e.selected&&!a.select?k.selected=!0:delete k.selected),"canvas"===w&&p)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){const o=t.getImageData;if(new Uint32Array((yl in o?o[yl]:o).call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some(e=>0!==e))return!1}return!0})(e)||(k.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){const t=e.toDataURL(u.type,u.quality),r=n.createElement("canvas");r.width=e.width,r.height=e.height,t!==r.toDataURL(u.type,u.quality)&&(k.rr_dataURL=t)}if("img"===w&&d){Ml||(Ml=n.createElement("canvas"),Ol=Ml.getContext("2d"));const t=e,r=t.currentSrc||t.getAttribute("src")||"<unknown-src>",o=t.crossOrigin,s=()=>{t.removeEventListener("load",s);try{Ml.width=t.naturalWidth,Ml.height=t.naturalHeight,Ol.drawImage(t,0,0),k.rr_dataURL=Ml.toDataURL(u.type,u.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?s():t.addEventListener("load",s));console.warn(`Cannot inline img src=${r}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(o?k.crossOrigin=o:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?s():t.addEventListener("load",s)}if("audio"!==w&&"video"!==w||(k.rr_mediaState=e.paused?"paused":"played",k.rr_mediaCurrentTime=e.currentTime),m||(e.scrollLeft&&(k.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(k.rr_scrollTop=e.scrollTop)),S){const{width:t,height:n}=e.getBoundingClientRect();k={class:k.class,rr_width:`${t}px`,rr_height:`${n}px`}}let C;"iframe"!==w||h(k.src)||(S||Cl(e)||(k.rr_src=k.src),delete k.src);try{customElements.get(w)&&(C=!0)}catch(e){}return{type:al.Element,tagName:w,attributes:k,childNodes:[],isSVG:(x=e,Boolean("svg"===x.tagName||x.ownerSVGElement)||void 0),needBlock:S,rootId:f,isCustom:C};var x}(e,{doc:n,blockClass:o,blockSelector:s,unblockSelector:i,inlineStylesheet:h,maskAttributeFn:c,maskInputOptions:m,maskInputFn:g,dataURLOptions:y,inlineImages:b,recordCanvas:v,keepIframeSrcFn:_,newlyAddedElement:S,rootId:k,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,ignoreCSSAttributes:w});case e.TEXT_NODE:return function(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:o,maskTextSelector:s,unmaskTextSelector:i,maskTextFn:a,maskInputOptions:c,maskInputFn:l,rootId:u}=t,d=e.parentNode&&e.parentNode.tagName;let p=e.textContent;const h="STYLE"===d||void 0,m="SCRIPT"===d||void 0,f="TEXTAREA"===d||void 0;if(h&&p){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(p=ul(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}p=Ll(p,Hl(t.doc))}m&&(p="SCRIPT_PLACEHOLDER");const g=ql(e,r,s,o,i,n);return h||m||f||!p||!g||(p=a?a(p,e.parentElement):p.replace(/[\S]/g,"*")),f&&p&&(c.textarea||g)&&(p=l?l(p,e.parentNode):p.replace(/[\S]/g,"*")),"OPTION"===d&&p&&(p=ml({isMasked:ql(e,r,s,o,i,hl({type:null,tagName:d,maskInputOptions:c})),element:e,value:p,maskInputFn:l})),{type:al.Text,textContent:p||"",isStyle:h,rootId:u}}(e,{doc:n,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:p,maskTextFn:f,maskInputOptions:m,maskInputFn:g,rootId:k});case e.CDATA_SECTION_NODE:return{type:al.CDATA,textContent:"",rootId:k};case e.COMMENT_NODE:return{type:al.Comment,textContent:e.textContent||"",rootId:k};default:return!1}}(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,dataURLOptions:v,inlineImages:_,recordCanvas:S,keepIframeSrcFn:I,newlyAddedElement:M,ignoreCSSAttributes:O});if(!R)return console.warn(e,"not serialized"),null;let A;A=r.hasNode(e)?r.getId(e):!function(e,t){if(t.comment&&e.type===al.Comment)return!0;if(e.type===al.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===_l(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(Wl(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Wl(e.attributes.name)||"icon"===Wl(e.attributes.rel)||"apple-touch-icon"===Wl(e.attributes.rel)||"shortcut icon"===Wl(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&Wl(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Wl(e.attributes.property).match(/^(og|twitter|fb):/)||Wl(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===Wl(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===Wl(e.attributes.name)||"googlebot"===Wl(e.attributes.name)||"bingbot"===Wl(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===Wl(e.attributes.name)||"generator"===Wl(e.attributes.name)||"framework"===Wl(e.attributes.name)||"publisher"===Wl(e.attributes.name)||"progid"===Wl(e.attributes.name)||Wl(e.attributes.property).match(/^article:/)||Wl(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===Wl(e.attributes.name)||"yandex-verification"===Wl(e.attributes.name)||"csrf-token"===Wl(e.attributes.name)||"p:domain_verify"===Wl(e.attributes.name)||"verify-v1"===Wl(e.attributes.name)||"verification"===Wl(e.attributes.name)||"shopify-checkout-api-token"===Wl(e.attributes.name)))return!0}}return!1}(R,b)&&(P||R.type!==al.Text||R.isStyle||R.textContent.replace(/^\s+|\s+$/gm,"").length)?Il():-2;const D=Object.assign(R,{id:A});if(r.add(e,D),-2===A)return null;w&&w(e);let L=!p;if(D.type===al.Element){L=L&&!D.needBlock;const t=e.shadowRoot;t&&ll(t)&&(D.isShadowHost=!0)}if((D.type===al.Document||D.type===al.Element)&&L){b.headWhitespace&&D.type===al.Element&&"head"===D.tagName&&(P=!1);const t={doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:p,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:b,dataURLOptions:v,inlineImages:_,recordCanvas:S,preserveWhiteSpace:P,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:E,onBlockedImageLoad:C,onStylesheetLoad:x,stylesheetLoadTimeout:T,keepIframeSrcFn:I,ignoreCSSAttributes:O},M=e.childNodes?Array.from(e.childNodes):[];for(const e of M){const n=Kl(e,t);n&&D.childNodes.push(n)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(e)&&e.shadowRoot)for(const n of Array.from(e.shadowRoot.childNodes)){const r=Kl(n,t);r&&(ll(e.shadowRoot)&&(r.isShadow=!0),D.childNodes.push(r))}}if(e.parentNode&&cl(e.parentNode)&&ll(e.parentNode)&&(D.isShadow=!0),D.type!==al.Element||"iframe"!==D.tagName||D.needBlock||function(e,t,n){const r=e.contentWindow;if(!r)return;let o,s=!1;try{o=r.document.readyState}catch(e){return}if("complete"!==o){const r=kl(()=>{s||(t(),s=!0)},n);return void e.addEventListener("load",()=>{El(r),s=!0,t()})}const i="about:blank";if(r.location.href!==i||e.src===i||""===e.src)return kl(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{const t=Cl(e);if(t&&k){const n=Kl(t,{doc:t,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:b,dataURLOptions:v,inlineImages:_,recordCanvas:S,preserveWhiteSpace:P,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:E,onStylesheetLoad:x,stylesheetLoadTimeout:T,keepIframeSrcFn:I,ignoreCSSAttributes:O});n&&k(e,n)}},E),D.type===al.Element&&"img"===D.tagName&&!e.complete&&D.needBlock){const t=e,n=()=>{if(t.isConnected&&!t.complete&&C)try{const e=t.getBoundingClientRect();e.width>0&&e.height>0&&C(t,D,e)}catch(e){}t.removeEventListener("load",n)};t.isConnected&&t.addEventListener("load",n)}return D.type===al.Element&&"link"===D.tagName&&"string"==typeof D.attributes.rel&&("stylesheet"===D.attributes.rel||"preload"===D.attributes.rel&&"string"==typeof D.attributes.href&&"css"===_l(D.attributes.href))&&function(e,t,n){let r,o=!1;try{r=e.sheet}catch(e){return}if(r)return;const s=kl(()=>{o||(t(),o=!0)},n);e.addEventListener("load",()=>{El(s),o=!0,t()})}(e,()=>{if(x){const t=Kl(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:b,dataURLOptions:v,inlineImages:_,recordCanvas:S,preserveWhiteSpace:P,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:E,onStylesheetLoad:x,stylesheetLoadTimeout:T,keepIframeSrcFn:I,ignoreCSSAttributes:O});t&&x(e,t)}},T),D.type===al.Element&&delete D.needBlock,D}function Zl(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Gl="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 Yl={map:{},getId:()=>(console.error(Gl),-1),getNode:()=>(console.error(Gl),null),removeNodeFromMap(){console.error(Gl)},has:()=>(console.error(Gl),!1),reset(){console.error(Gl)}};function Jl(e,t,n={}){let r=null,o=0;return function(...s){const i=Date.now();o||!1!==n.leading||(o=i);const a=t-(i-o),c=this;a<=0||a>t?(r&&(function(...e){gu("clearTimeout")(...e)}(r),r=null),o=i,e.apply(c,s)):r||!1===n.trailing||(r=yu(()=>{o=!1===n.leading?0:Date.now(),r=null,e.apply(c,s)},a))}}function Xl(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(e){yu(()=>{n.set.call(this,e)},0),s&&s.set&&s.set.call(this,e)}}),()=>Xl(e,t,s||{},!0)}function Ql(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Yl=new Proxy(Yl,{get:(e,t,n)=>("map"===t&&console.error(Gl),Reflect.get(e,t,n))}));let eu=Date.now;function tu(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function nu(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ru(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ou(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch(e){return null}}function su(e,t,n,r,o){if(!e)return!1;const s=ou(e);if(!s)return!1;const i=Vl(t,n);if(!o){const e=r&&s.matches(r);return i(s)&&!e}const a=Ul(s,i);let c=-1;return!(a<0)&&(r&&(c=Ul(s,Vl(null,r))),a>-1&&c<0||a<c)}function iu(e,t){return-2===t.getId(e)}function au(e,t){if(cl(e))return!1;const n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||au(e.parentNode,t))}function cu(e){return Boolean(e.changedTouches)}function lu(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function uu(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function du(e){return Boolean(e?.shadowRoot)}/* @__PURE__ */ /[1-9][0-9]{12}/.test(Date.now().toString())||(eu=()=>/* @__PURE__ */(new Date).getTime());class pu{constructor(){this.id=1,this.styleIDMap=/* @__PURE__ */new WeakMap,this.idStyleMap=/* @__PURE__ */new Map}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=/* @__PURE__ */new WeakMap,this.idStyleMap=/* @__PURE__ */new Map,this.id=1}generateId(){return this.id++}}function hu(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function mu(e){const t=e.ownerDocument;return!!t&&(t.contains(e)||function(e){const t=e.ownerDocument;if(!t)return!1;const n=function(e){let t,n=e;for(;t=hu(n);)n=t;return n}(e);return t.contains(n)}(e))}const fu={};function gu(e){const t=fu[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const o=t.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(t)}catch(e){}return fu[e]=r.bind(window)}function yu(...e){return gu("setTimeout")(...e)}var bu=/* @__PURE__ */(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))(bu||{}),vu=/* @__PURE__ */(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))(vu||{}),_u=/* @__PURE__ */(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))(_u||{}),Su=/* @__PURE__ */(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Su||{}),wu=/* @__PURE__ */(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))(wu||{});function ku(e){try{return e.contentDocument}catch(e){}}function Eu(e){return"__ln"in e}class Cu{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=t?.next||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Eu(e.previousSibling)){const n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&Eu(e.nextSibling)&&e.nextSibling.__ln.previous){const n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const xu=(e,t)=>`${e}@${t}`;class Tu{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=/* @__PURE__ */new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=/* @__PURE__ */new Set,this.movedSet=/* @__PURE__ */new Set,this.droppedSet=/* @__PURE__ */new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],t=/* @__PURE__ */new Set,n=new Cu,r=e=>{let t=e,n=-2;for(;-2===n;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},o=o=>{if(!o.parentNode||!mu(o))return;const s=cl(o.parentNode)?this.mirror.getId(hu(o)):this.mirror.getId(o.parentNode),i=r(o);if(-1===s||-1===i)return n.addNode(o);const a=Kl(o,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{lu(e,this.mirror)&&!su(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(e),uu(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),du(o)&&this.shadowDomManager.addShadowRoot(o.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{su(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(e,t),e.contentWindow&&this.canvasManager.addWindow(e.contentWindow),this.shadowDomManager.observeAttachShadow(e))},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:n,height:r})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${n}px`,height:`${r}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});a&&(e.push({parentId:s,nextId:i,node:a}),t.add(a.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)Mu(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||o(e);for(const e of this.addedSet)Ou(this.droppedSet,e)||Mu(this.removes,e,this.mirror)?Ou(this.movedSet,e)?o(e):this.droppedSet.add(e):o(e);let s=null;for(;n.length;){let e=null;if(s){const t=this.mirror.getId(s.value.parentNode),n=r(s.value);-1!==t&&-1!==n&&(e=s)}if(!e){let t=n.tail;for(;t;){const n=t;if(t=t.previous,n){const t=this.mirror.getId(n.value.parentNode);if(-1===r(n.value))continue;if(-1!==t){e=n;break}{const t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&-1!==this.mirror.getId(t.parentNode.host)){e=n;break}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}s=e.previous,n.removeNode(e.value),o(e.value)}const i={texts:this.texts.map(e=>({id:this.mirror.getId(e.node),value:e.value})).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{const{attributes:t}=e;if("string"==typeof t.style){const n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(i.texts.length||i.attributes.length||i.removes.length||i.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=/* @__PURE__ */new WeakMap,this.removes=[],this.addedSet=/* @__PURE__ */new Set,this.movedSet=/* @__PURE__ */new Set,this.droppedSet=/* @__PURE__ */new Set,this.movedMap={},this.mutationCb(i))},this.processMutation=e=>{if(!iu(e.target,this.mirror))switch(e.type){case"characterData":{const t=e.target.textContent;su(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||t===e.oldValue||this.texts.push({value:ql(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,ou(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=e.attributeName,r=e.target.getAttribute(n);if("value"===n){const n=bl(t),o=t.tagName;r=vl(t,o,n);const s=hl({maskInputOptions:this.maskInputOptions,tagName:o,type:n});r=ml({isMasked:ql(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,s),element:t,value:r,maskInputFn:this.maskInputFn})}if(su(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===e.oldValue)return;let o=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===n&&!this.keepIframeSrcFn(r)){if(ku(t))return;n="rr_src"}if(o||(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),"type"===n&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!Bl(t.tagName,n)&&(o.attributes[n]=Fl(this.doc,fl(t.tagName),fl(n),r,t,this.maskAttributeFn),"style"===n)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}const n=this.unattachedDoc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const r=t.style.getPropertyValue(e),s=t.style.getPropertyPriority(e);r!==n.style.getPropertyValue(e)||s!==n.style.getPropertyPriority(e)?o.styleDiff[e]=""===s?r:[r,s]:o._unchangedStyles[e]=[r,s]}for(const e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(o.styleDiff[e]=!1)}break}case"childList":if(su(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const n=this.mirror.getId(t),r=cl(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);su(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||iu(t,this.mirror)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(Iu(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||au(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[xu(n,r)]?Iu(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!(!cl(e.target)||!ll(e.target))||void 0})),this.mapRemoves.push(t))})}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(iu(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[xu(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);su(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes&&e.childNodes.forEach(e=>this.genAdds(e)),du(e)&&e.shadowRoot.childNodes.forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}}}init(e){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager","ignoreCSSAttributes"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Iu(e,t){e.delete(t),t.childNodes?.forEach(t=>Iu(e,t))}function Mu(e,t,n){return 0!==e.length&&function(e,t,n){let r=t.parentNode;for(;r;){const t=n.getId(r);if(e.some(e=>e.id===t))return!0;r=r.parentNode}return!1}(e,t,n)}function Ou(e,t){return 0!==e.size&&Pu(e,t)}function Pu(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||Pu(e,n))}let Ru;const Au=e=>Ru?(...t)=>{try{return e(...t)}catch(e){if(Ru&&!0===Ru(e))return()=>{};throw e}}:e,Du=[];function Lu(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Nu(e,t){const n=new Tu;Du.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const o=window?.Zone?.__symbol__?.("MutationObserver");o&&window[o]&&(r=window[o]);const s=new r(Au(t=>{e.onMutation&&!1===e.onMutation(t)||n.processMutations.bind(n)(t)}));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function ju({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){return Zl("scroll",Au(Jl(Au(i=>{const a=Lu(i);if(!a||su(a,r,o,s,!0))return;const c=n.getId(a);if(a===t&&t.defaultView){const n=tu(t.defaultView);e({id:c,x:n.left,y:n.top})}else e({id:c,x:a.scrollLeft,y:a.scrollTop})}),i.scroll||100)),t)}const $u=["INPUT","TEXTAREA","SELECT"],zu=/* @__PURE__ */new WeakMap;function Hu({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,ignoreClass:i,ignoreSelector:a,maskInputOptions:c,maskInputFn:l,sampling:u,userTriggeredOnInput:d,maskTextClass:p,unmaskTextClass:h,maskTextSelector:m,unmaskTextSelector:f}){function g(e){let n=Lu(e);const u=e.isTrusted,g=n&&gl(n.tagName);if("OPTION"===g&&(n=n.parentElement),!n||!g||$u.indexOf(g)<0||su(n,r,o,s,!0))return;const b=n;if(b.classList.contains(i)||a&&b.matches(a))return;const v=bl(n);let _=vl(b,g,v),S=!1;const w=hl({maskInputOptions:c,tagName:g,type:v}),k=ql(n,p,m,h,f,w);"radio"!==v&&"checkbox"!==v||(S=n.checked),_=ml({isMasked:k,element:n,value:_,maskInputFn:l}),y(n,d?{text:_,isChecked:S,userTriggered:u}:{text:_,isChecked:S});const E=n.name;"radio"===v&&E&&S&&t.querySelectorAll(`input[type="radio"][name="${E}"]`).forEach(e=>{if(e!==n){const t=ml({isMasked:k,element:e,value:vl(e,g,v),maskInputFn:l});y(e,d?{text:t,isChecked:!S,userTriggered:!1}:{text:t,isChecked:!S})}})}function y(t,r){const o=zu.get(t);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){zu.set(t,r);const o=n.getId(t);Au(e)({...r,id:o})}}const b=("last"===u.input?["change"]:["input","change"]).map(e=>Zl(e,Au(g),t)),v=t.defaultView;if(!v)return()=>{b.forEach(e=>e())};const _=v.Object.getOwnPropertyDescriptor(v.HTMLInputElement.prototype,"value");return _&&_.set&&b.push(...[[v.HTMLInputElement.prototype,"value"],[v.HTMLInputElement.prototype,"checked"],[v.HTMLSelectElement.prototype,"value"],[v.HTMLTextAreaElement.prototype,"value"],[v.HTMLSelectElement.prototype,"selectedIndex"],[v.HTMLOptionElement.prototype,"selected"]].map(e=>Xl(e[0],e[1],{set(){Au(g)({target:this,isTrusted:!1})}},!1,v))),Au(()=>{b.forEach(e=>e())})}function Fu(e){return function(e,t){if(qu("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||qu("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||qu("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||qu("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function Bu(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function Uu({mirror:e,stylesheetManager:t},n){let r=null;r=e.getId("#document"===n.nodeName?n:n.host);const o="#document"===n.nodeName?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,s=o?.prototype?Object.getOwnPropertyDescriptor(o?.prototype,"adoptedStyleSheets"):void 0;return null!==r&&-1!==r&&o&&s?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){return s.get?.call(this)},set(e){const n=s.set?.call(this,e);if(null!==r&&-1!==r)try{t.adoptStyleSheets(e,r)}catch(e){}return n}}),Au(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})})):()=>{}}function Vu(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=Nu(e,e.doc));const o=function({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(!1===t.mousemove)return()=>{};const o="number"==typeof t.mousemove?t.mousemove:50,s="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let i,a=[];const c=Jl(Au(t=>{const n=Date.now()-i;e(a.map(e=>(e.timeOffset-=n,e)),t),a=[],i=null}),s),l=Au(Jl(Au(e=>{const t=Lu(e),{clientX:n,clientY:o}=cu(e)?e.changedTouches[0]:e;i||(i=eu()),a.push({x:n,y:o,id:r.getId(t),timeOffset:eu()-i}),c("undefined"!=typeof DragEvent&&e instanceof DragEvent?vu.Drag:e instanceof MouseEvent?vu.MouseMove:vu.TouchMove)}),o,{trailing:!1})),u=[Zl("mousemove",l,n),Zl("touchmove",l,n),Zl("drag",l,n)];return Au(()=>{u.forEach(e=>e())})}(e),s=function({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){if(!1===i.mouseInteraction)return()=>{};const a=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,c=[];let l=null;return Object.keys(_u).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e]).forEach(i=>{let a=fl(i);const u=(t=>i=>{const a=Lu(i);if(su(a,r,o,s,!0))return;let c=null,u=t;if("pointerType"in i){switch(i.pointerType){case"mouse":c=Su.Mouse;break;case"touch":c=Su.Touch;break;case"pen":c=Su.Pen}c===Su.Touch&&(_u[t]===_u.MouseDown?u="TouchStart":_u[t]===_u.MouseUp&&(u="TouchEnd"))}else cu(i)&&(c=Su.Touch);null!==c?(l=c,(u.startsWith("Touch")&&c===Su.Touch||u.startsWith("Mouse")&&c===Su.Mouse)&&(c=null)):_u[t]===_u.Click&&(c=l,l=null);const d=cu(i)?i.changedTouches[0]:i;if(!d)return;const p=n.getId(a),{clientX:h,clientY:m}=d;Au(e)({type:_u[u],id:p,x:h,y:m,...null!==c&&{pointerType:c}})})(i);if(window.PointerEvent)switch(_u[i]){case _u.MouseDown:case _u.MouseUp:a=a.replace("mouse","pointer");break;case _u.TouchStart:case _u.TouchEnd:return}c.push(Zl(a,u,t))}),Au(()=>{c.forEach(e=>e())})}(e),i=ju(e),a=function({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const o=Au(Jl(Au(()=>{const t=nu(),o=ru();n===t&&r===o||(e({width:Number(o),height:Number(t)}),n=t,r=o)}),200));return Zl("resize",o,t)}(e,{win:n}),c=Hu(e),l=function({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:o,sampling:s,doc:i}){const a=Au(i=>Jl(Au(s=>{const a=Lu(s);if(!a||su(a,t,n,r,!0))return;const{currentTime:c,volume:l,muted:u,playbackRate:d}=a;e({type:i,id:o.getId(a),currentTime:c,volume:l,muted:u,playbackRate:d})}),s.media||500)),c=[Zl("play",a(wu.Play),i),Zl("pause",a(wu.Pause),i),Zl("seeked",a(wu.Seeked),i),Zl("volumechange",a(wu.VolumeChange),i),Zl("ratechange",a(wu.RateChange),i)];return Au(()=>{c.forEach(e=>e())})}(e);let u=()=>{},d=()=>{},p=()=>{},h=()=>{};e.recordDOM&&(u=function({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:Au((r,o,s)=>{const[i,a]=s,{id:c,styleId:l}=Bu(o,t,n.styleMirror);return(c&&-1!==c||l&&-1!==l)&&e({id:c,styleId:l,adds:[{rule:i,index:a}]}),r.apply(o,s)})});const s=r.CSSStyleSheet.prototype.deleteRule;let i,a;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:Au((r,o,s)=>{const[i]=s,{id:a,styleId:c}=Bu(o,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,removes:[{index:i}]}),r.apply(o,s)})}),r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:Au((r,o,s)=>{const[i]=s,{id:a,styleId:c}=Bu(o,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,replace:i}),r.apply(o,s)})})),r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:Au((r,o,s)=>{const[i]=s,{id:a,styleId:c}=Bu(o,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,replaceSync:i}),r.apply(o,s)})}));const c={};Wu("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Wu("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Wu("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Wu("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const l={};return Object.entries(c).forEach(([r,o])=>{l[r]={insertRule:o.prototype.insertRule,deleteRule:o.prototype.deleteRule},o.prototype.insertRule=new Proxy(l[r].insertRule,{apply:Au((r,o,s)=>{const[i,a]=s,{id:c,styleId:l}=Bu(o.parentStyleSheet,t,n.styleMirror);return(c&&-1!==c||l&&-1!==l)&&e({id:c,styleId:l,adds:[{rule:i,index:[...Fu(o),a||0]}]}),r.apply(o,s)})}),o.prototype.deleteRule=new Proxy(l[r].deleteRule,{apply:Au((r,o,s)=>{const[i]=s,{id:a,styleId:c}=Bu(o.parentStyleSheet,t,n.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,removes:[{index:[...Fu(o),i]}]}),r.apply(o,s)})})}),Au(()=>{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(([e,t])=>{t.prototype.insertRule=l[e].insertRule,t.prototype.deleteRule=l[e].deleteRule})})}(e,{win:n}),d=Uu(e,e.doc),p=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const s=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:Au((o,i,a)=>{const[c,l,u]=a;if(n.has(c))return s.apply(i,[c,l,u]);const{id:d,styleId:p}=Bu(i.parentRule?.parentStyleSheet,t,r.styleMirror);return(d&&-1!==d||p&&-1!==p)&&e({id:d,styleId:p,set:{property:c,value:l,priority:u},index:Fu(i.parentRule)}),o.apply(i,a)})});const i=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:Au((o,s,a)=>{const[c]=a;if(n.has(c))return i.apply(s,[c]);const{id:l,styleId:u}=Bu(s.parentRule?.parentStyleSheet,t,r.styleMirror);return(l&&-1!==l||u&&-1!==u)&&e({id:l,styleId:u,remove:{property:c},index:Fu(s.parentRule)}),o.apply(s,a)})}),Au(()=>{o.CSSStyleDeclaration.prototype.setProperty=s,o.CSSStyleDeclaration.prototype.removeProperty=i})}(e,{win:n}),e.collectFonts&&(h=function({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=/* @__PURE__ */new WeakMap,s=n.FontFace;n.FontFace=function(e,t,n){const r=new s(e,t,n);return o.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const i=Ql(t.fonts,"add",function(t){return function(n){return yu(Au(()=>{const t=o.get(n);t&&(e(t),o.delete(n))}),0),t.apply(this,[n])}});return r.push(()=>{n.FontFace=s}),r.push(i),Au(()=>{r.forEach(e=>e())})}(e)));const m=function(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,selectionCb:i}=e;let a=!0;const c=Au(()=>{const e=t.getSelection();if(!e||a&&e?.isCollapsed)return;a=e.isCollapsed||!1;const c=[],l=e.rangeCount||0;for(let t=0;t<l;t++){const i=e.getRangeAt(t),{startContainer:a,startOffset:l,endContainer:u,endOffset:d}=i;su(a,r,o,s,!0)||su(u,r,o,s,!0)||c.push({start:n.getId(a),startOffset:l,end:n.getId(u),endOffset:d})}i({ranges:c})});return c(),Zl("selectionchange",c)}(e),f=function({doc:e,customElementCb:t}){const n=e.defaultView;return n&&n.customElements?Ql(n.customElements,"define",function(e){return function(n,r,o){try{t({define:{name:n}})}catch(e){}return e.apply(this,[n,r,o])}}):()=>{}}(e),g=[];for(const t of e.plugins)g.push(t.observer(t.callback,n,t.options));return Au(()=>{Du.forEach(e=>e.reset()),r?.disconnect(),o(),s(),i(),a(),c(),l(),u(),d(),p(),h(),m(),f(),g.forEach(e=>e())})}function qu(e){return void 0!==window[e]}function Wu(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Ku{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=/* @__PURE__ */new WeakMap,this.iframeRemoteIdToIdMap=/* @__PURE__ */new WeakMap}getId(e,t,n,r){const o=n||this.getIdToRemoteIdMap(e),s=r||this.getRemoteIdToIdMap(e);let i=o.get(t);return i||(i=this.generateIdFn(),o.set(t,i),s.set(i,t)),i}getIds(e,t){const n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,n,r))}getRemoteId(e,t,n){const r=n||this.getRemoteIdToIdMap(e);return"number"!=typeof t?t:r.get(t)||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,n))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=/* @__PURE__ */new WeakMap,void(this.iframeRemoteIdToIdMap=/* @__PURE__ */new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=/* @__PURE__ */new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=/* @__PURE__ */new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class Zu{constructor(){this.crossOriginIframeMirror=new Ku(Il),this.crossOriginIframeRootIdMap=/* @__PURE__ */new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class Gu{constructor(e){this.iframes=/* @__PURE__ */new WeakMap,this.crossOriginIframeMap=/* @__PURE__ */new WeakMap,this.crossOriginIframeMirror=new Ku(Il),this.crossOriginIframeRootIdMap=/* @__PURE__ */new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Ku(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&e.contentWindow?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(e);const n=ku(e);n&&n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,this.mirror.getId(n))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case bu.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:bu.IncrementalSnapshot,data:{source:vu.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case bu.Meta:case bu.Load:case bu.DomContentLoaded:return!1;case bu.Plugin:return t;case bu.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case bu.IncrementalSnapshot:switch(t.data.source){case vu.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,["id"])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case vu.Drag:case vu.TouchMove:case vu.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case vu.ViewportResize:return!1;case vu.MediaInteraction:case vu.MouseInteraction:case vu.Scroll:case vu.CanvasMutation:case vu.Input:return this.replaceIds(t.data,e,["id"]),t;case vu.StyleSheetRule:case vu.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case vu.Font:return t;case vu.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case vu.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),t.data.styles?.forEach(t=>{this.replaceStyleIds(t,e,["styleId"])}),t}}return!1}replace(e,t,n,r){for(const o of r)(Array.isArray(t[o])||"number"==typeof t[o])&&(t[o]=Array.isArray(t[o])?e.getIds(n,t[o]):e.getId(n,t[o]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type===al.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class Yu{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class Ju{constructor(e){this.shadowDoms=/* @__PURE__ */new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!ll(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);const n=Nu({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(ju({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),yu(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(Uu({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){const t=ku(e),n=function(e){try{return e.contentWindow}catch(e){}}(e);t&&n&&this.patchAttachShadow(n.Element,t)}patchAttachShadow(e,t){const n=this;this.restoreHandlers.push(Ql(e.prototype,"attachShadow",function(e){return function(r){const o=e.call(this,r);return this.shadowRoot&&mu(this)&&n.addShadowRoot(this.shadowRoot,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=/* @__PURE__ */new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}for(var Xu="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Qu=0;Qu<64;Qu++)Xu["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(Qu)]=Qu;class ed{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class td{constructor(e){this.trackedLinkElements=/* @__PURE__ */new WeakSet,this.styleMirror=new pu,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const n={id:t,styleIds:[]},r=[];for(const t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,t)=>({rule:dl(e),index:t}))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=/* @__PURE__ */new WeakSet}trackStylesheetInLinkElement(e){}}class nd{constructor(){this.nodeMap=/* @__PURE__ */new WeakMap,this.active=!1}inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,function(...e){gu("requestAnimationFrame")(...e)}(()=>{this.nodeMap=/* @__PURE__ */new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||/* @__PURE__ */new Set).add(t))}destroy(){}}let rd,od;try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const sd=new pl;function id(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:l=!1,maskTextClass:u="rr-mask",unmaskTextClass:d=null,maskTextSelector:p=null,unmaskTextSelector:h=null,inlineStylesheet:m=!0,maskAllInputs:f,maskInputOptions:g,slimDOMOptions:y,maskAttributeFn:b,maskInputFn:v,maskTextFn:_,maxCanvasSize:S=null,packFn:w,sampling:k={},dataURLOptions:E={},mousemoveWait:C,recordDOM:x=!0,recordCanvas:T=!1,recordCrossOriginIframes:I=!1,recordAfter:M=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:O=!1,collectFonts:P=!1,inlineImages:R=!1,plugins:A,keepIframeSrcFn:D=()=>!1,ignoreCSSAttributes:L=/* @__PURE__ */new Set([]),errorHandler:N,onMutation:j,getCanvasManager:$}=e;Ru=N;const z=!I||window.parent===window;let H=!1;if(!z)try{window.parent.document&&(H=!1)}catch(e){H=!0}if(z&&!t)throw new Error("emit function is required");if(!z&&!H)return()=>{};void 0!==C&&void 0===k.mousemove&&(k.mousemove=C),sd.reset();const F=!0===f?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:void 0!==g?g:{},B=!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===y,headMetaDescKeywords:"all"===y}:y||{};let U;!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}();let V=0;const q=e=>{for(const t of A||[])t.eventProcessor&&(e=t.eventProcessor(e));return w&&!H&&(e=w(e)),e};rd=(e,o)=>{const s=e;if(s.timestamp=eu(),!Du[0]?.isFrozen()||s.type===bu.FullSnapshot||s.type===bu.IncrementalSnapshot&&s.data.source===vu.Mutation||Du.forEach(e=>e.unfreeze()),z)t?.(q(s),o);else if(H){const e={type:"rrweb",event:q(s),origin:window.location.origin,isCheckout:o};window.parent.postMessage(e,"*")}if(s.type===bu.FullSnapshot)U=s,V=0;else if(s.type===bu.IncrementalSnapshot){if(s.data.source===vu.Mutation&&s.data.isAttachIframe)return;V++,(r&&V>=r||n&&U&&s.timestamp-U.timestamp>n)&&ee(!0)}};const W=e=>{rd({type:bu.IncrementalSnapshot,data:{source:vu.Mutation,...e}})},K=e=>rd({type:bu.IncrementalSnapshot,data:{source:vu.Scroll,...e}}),Z=e=>rd({type:bu.IncrementalSnapshot,data:{source:vu.CanvasMutation,...e}}),G=new td({mutationCb:W,adoptedStyleSheetCb:e=>rd({type:bu.IncrementalSnapshot,data:{source:vu.AdoptedStyleSheet,...e}})}),Y="boolean"==typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new Zu:new Gu({mirror:sd,mutationCb:W,stylesheetManager:G,recordCrossOriginIframes:I,wrappedEmit:rd});for(const e of A||[])e.getMirror&&e.getMirror({nodeMirror:sd,crossOriginIframeMirror:Y.crossOriginIframeMirror,crossOriginIframeStyleMirror:Y.crossOriginIframeStyleMirror});const J=new nd,X=function(e,t){try{return e?e(t):new ed}catch{return console.warn("Unable to initialize CanvasManager"),new ed}}($,{mirror:sd,win:window,mutationCb:e=>rd({type:bu.IncrementalSnapshot,data:{source:vu.CanvasMutation,...e}}),recordCanvas:T,blockClass:o,blockSelector:s,unblockSelector:i,maxCanvasSize:S,sampling:k.canvas,dataURLOptions:E,errorHandler:N}),Q="boolean"==typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Yu:new Ju({mutationCb:W,scrollCb:K,bypassOptions:{onMutation:j,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,inlineStylesheet:m,maskInputOptions:F,dataURLOptions:E,maskAttributeFn:b,maskTextFn:_,maskInputFn:v,recordCanvas:T,inlineImages:R,sampling:k,slimDOMOptions:B,iframeManager:Y,stylesheetManager:G,canvasManager:X,keepIframeSrcFn:D,processedNodeManager:J,ignoreCSSAttributes:L},mirror:sd}),ee=(e=!1)=>{if(!x)return;rd({type:bu.Meta,data:{href:window.location.href,width:ru(),height:nu()}},e),G.reset(),Q.init(),Du.forEach(e=>e.lock());const t=function(e,t){const{mirror:n=new pl,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:s=null,maskAllText:i=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:l=null,unmaskTextSelector:u=null,inlineStylesheet:d=!0,inlineImages:p=!1,recordCanvas:h=!1,maskAllInputs:m=!1,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOM:b=!1,dataURLOptions:v,preserveWhiteSpace:_,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:k,onBlockedImageLoad:E,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:T=()=>!1,ignoreCSSAttributes:I=/* @__PURE__ */new Set([])}=t||{};return Kl(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,maskAllText:i,maskTextClass:a,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:!0===m?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:!1===m?{}:m,maskAttributeFn:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:!0===b||"all"===b?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===b,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===b?{}:b,dataURLOptions:v,inlineImages:p,recordCanvas:h,preserveWhiteSpace:_,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:k,onBlockedImageLoad:E,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:T,newlyAddedElement:!1,ignoreCSSAttributes:I})}(document,{mirror:sd,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,inlineStylesheet:m,maskAllInputs:F,maskAttributeFn:b,maskInputFn:v,maskTextFn:_,slimDOM:B,dataURLOptions:E,recordCanvas:T,inlineImages:R,onSerialize:e=>{lu(e,sd)&&Y.addIframe(e),uu(e,sd)&&G.trackLinkElement(e),du(e)&&Q.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{Y.attachIframe(e,t),e.contentWindow&&X.addWindow(e.contentWindow),Q.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{G.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:n,height:r})=>{W({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${n}px`,height:`${r}px`}}}]})},keepIframeSrcFn:D,ignoreCSSAttributes:L});if(!t)return console.warn("Failed to snapshot the document");rd({type:bu.FullSnapshot,data:{node:t,initialOffset:tu(window)}}),Du.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&G.adoptStyleSheets(document.adoptedStyleSheets,sd.getId(document))};od=ee;try{const e=[],t=e=>Au(Vu)({onMutation:j,mutationCb:W,mousemoveCb:(e,t)=>rd({type:bu.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>rd({type:bu.IncrementalSnapshot,data:{source:vu.MouseInteraction,...e}}),scrollCb:K,viewportResizeCb:e=>rd({type:bu.IncrementalSnapshot,data:{source:vu.ViewportResize,...e}}),inputCb:e=>rd({type:bu.IncrementalSnapshot,data:{source:vu.Input,...e}}),mediaInteractionCb:e=>rd({type:bu.IncrementalSnapshot,data:{source:vu.MediaInteraction,...e}}),styleSheetRuleCb:e=>rd({type:bu.IncrementalSnapshot,data:{source:vu.StyleSheetRule,...e}}),styleDeclarationCb:e=>rd({type:bu.IncrementalSnapshot,data:{source:vu.StyleDeclaration,...e}}),canvasMutationCb:Z,fontCb:e=>rd({type:bu.IncrementalSnapshot,data:{source:vu.Font,...e}}),selectionCb:e=>{rd({type:bu.IncrementalSnapshot,data:{source:vu.Selection,...e}})},customElementCb:e=>{rd({type:bu.IncrementalSnapshot,data:{source:vu.CustomElement,...e}})},blockClass:o,ignoreClass:a,ignoreSelector:c,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,maskInputOptions:F,inlineStylesheet:m,sampling:k,recordDOM:x,recordCanvas:T,inlineImages:R,userTriggeredOnInput:O,collectFonts:P,doc:e,maskAttributeFn:b,maskInputFn:v,maskTextFn:_,keepIframeSrcFn:D,blockSelector:s,unblockSelector:i,slimDOMOptions:B,dataURLOptions:E,mirror:sd,iframeManager:Y,stylesheetManager:G,shadowDomManager:Q,processedNodeManager:J,canvasManager:X,ignoreCSSAttributes:L,plugins:A?.filter(e=>e.observer)?.map(e=>({observer:e.observer,options:e.options,callback:t=>rd({type:bu.Plugin,data:{plugin:e.name,payload:t}})}))||[]},{});Y.addLoadListener(n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}});const n=()=>{ee(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(e.push(Zl("DOMContentLoaded",()=>{rd({type:bu.DomContentLoaded,data:{}}),"DOMContentLoaded"===M&&n()})),e.push(Zl("load",()=>{rd({type:bu.Load,data:{}}),"load"===M&&n()},window))),()=>{e.forEach(e=>e()),J.destroy(),od=void 0,Ru=void 0}}catch(e){console.warn(e)}}var ad,cd;function ld(e){return e>9999999999?e:1e3*e}function ud(e){return e>9999999999?e/1e3:e}function dd(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:bu.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:bo(t,10,1e3)}}),"console"===t.category)))}function pd(e){return e.closest("button,a")||e}function hd(e){const t=md(e);return t&&t instanceof Element?pd(t):t}function md(e){return function(e){return"object"==typeof e&&!!e&&"target"in e}(e)?e.target:e}let fd;id.mirror=sd,id.takeFullSnapshot=function(e){if(!od)throw new Error("please take full snapshot after start recording");od(e)},(cd=ad||(ad={}))[cd.NotStarted=0]="NotStarted",cd[cd.Running=1]="Running",cd[cd.Stopped=2]="Stopped";const gd=new Set([vu.Mutation,vu.StyleSheetRule,vu.StyleDeclaration,vu.AdoptedStyleSheet,vu.CanvasMutation,vu.Selection,vu.MediaInteraction]);class yd{constructor(e,t,n=dd){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scrollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){const e=(t=()=>{this._lastMutation=vd()},fd||(fd=[],vn(Qc,"open",function(e){return function(...t){if(fd)try{fd.forEach(e=>e())}catch{}return e.apply(Qc,t)}})),fd.push(t),()=>{const e=fd?fd.indexOf(t):-1;e>-1&&fd.splice(e,1)});var t;this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(function(e,t){return!bd.includes(e.tagName)||"INPUT"===e.tagName&&!["submit","button"].includes(e.getAttribute("type")||"")||!("A"!==e.tagName||!(e.hasAttribute("download")||e.hasAttribute("target")&&"_self"!==e.getAttribute("target")))||!(!t||!e.matches(t))}(t,this._ignoreSelector)||!function(e){return!(!e.data||"number"!=typeof e.data.nodeId||!e.timestamp)}(e))return;const n={timestamp:ud(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some(e=>e.node===n.node&&Math.abs(e.timestamp-n.timestamp)<1)||(this._clicks.push(n),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=ud(e)}registerScroll(e=Date.now()){this._lastScroll=ud(e)}registerClick(e){const t=pd(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach(e=>{e.clickCount++})}_getClicks(e){return this._clicks.filter(t=>t.node===e)}_checkClicks(){const e=[],t=vd();this._clicks.forEach(n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)});for(const t of e){const e=this._clicks.indexOf(t);e>-1&&(this._generateBreadcrumbs(t),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){const t=this._replay,n=!(e.scrollAfter&&e.scrollAfter<=this._scrollTimeout||e.mutationAfter&&e.mutationAfter<=this._threshold),{clickCount:r,clickBreadcrumb:o}=e;if(n){const n=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),s=n<1e3*this._timeout?"mutation":"timeout",i={type:"default",message:o.message,timestamp:o.timestamp,category:"ui.slowClickDetected",data:{...o.data,url:Qc.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:s,clickCount:r||1}};return void this._addBreadcrumbEvent(t,i)}if(r>1){const e={type:"default",message:o.message,timestamp:o.timestamp,category:"ui.multiClick",data:{...o.data,url:Qc.location.href,route:t.getCurrentRoute(),clickCount:r,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=yc(()=>this._checkClicks(),1e3)}}const bd=["A","BUTTON","INPUT"];function vd(){return Date.now()/1e3}function _d(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var Sd=/* @__PURE__ */(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))(Sd||{});const wd=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function kd(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(wd.has(n)){let r=n;"data-testid"!==n&&"data-test-id"!==n||(r="testId"),t[r]=e[n]}return t}function Ed(e,t){const n=id.mirror.getId(e),r=n&&id.mirror.getNode(n),o=r&&id.mirror.getMeta(r),s=o&&function(e){return e.type===Sd.Element}(o)?o:null;return{message:t,data:s?{nodeId:n,node:{id:n,tagName:s.tagName,textContent:Array.from(s.childNodes).map(e=>e.type===Sd.Text&&e.textContent).filter(Boolean).map(e=>e.trim()).join(""),attributes:kd(s.attributes)}}:{}}}const Cd={resource:function(e){const{entryType:t,initiatorType:n,name:r,responseEnd:o,startTime:s,decodedBodySize:i,encodedBodySize:a,responseStatus:c,transferSize:l}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:Id(s),end:Id(o),name:r,data:{size:l,statusCode:c,decodedBodySize:i,encodedBodySize:a}}},paint:function(e){const{duration:t,entryType:n,name:r,startTime:o}=e,s=Id(o);return{type:n,name:r,start:s,end:s+t,data:void 0}},navigation:function(e){const{entryType:t,name:n,decodedBodySize:r,duration:o,domComplete:s,encodedBodySize:i,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:d,redirectCount:p,startTime:h,transferSize:m,type:f}=e;return 0===o?null:{type:`${t}.${f}`,start:Id(h),end:Id(s),name:n,data:{size:m,decodedBodySize:r,encodedBodySize:i,duration:o,domInteractive:l,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:d,domComplete:s,redirectCount:p}}}};function xd(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}function Td(e){const t=Cd[e.entryType];return t?t(e):null}function Id(e){return((qn()||Qc.performance.timeOrigin)+e)/1e3}function Md(e){const t=e.entries[e.entries.length-1];return Ad(e,"largest-contentful-paint",t?.element?[t.element]:void 0)}function Od(e){return void 0!==e.sources}function Pd(e){const t=[],n=[];for(const r of e.entries)if(Od(r)){const e=[];for(const t of r.sources)if(t.node){n.push(t.node);const r=id.mirror.getId(t.node);r&&e.push(r)}t.push({value:r.value,nodeIds:e.length?e:void 0})}return Ad(e,"cumulative-layout-shift",n,t)}function Rd(e){const t=e.entries[e.entries.length-1];return Ad(e,"interaction-to-next-paint",t?.target?[t.target]:void 0)}function Ad(e,t,n,r){const o=e.value,s=e.rating,i=Id(o);return{type:"web-vital",name:t,start:i,end:i,data:{value:o,size:o,rating:s,nodeIds:n?n.map(e=>id.mirror.getId(e)):void 0,attributions:r}}}const Dd="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Ld=["log","warn","error"],Nd="[Replay] ";function jd(e,t="info"){Xs({category:"console",data:{logger:"replay"},level:t,message:`${Nd}${e}`},{level:t})}const $d=function(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:n=>{e=!!n.captureExceptions,t=!!n.traceInternals}};return Dd?(Ld.forEach(e=>{n[e]=(...n)=>{Rt[e](Nd,...n),t&&jd(n.join(""),hi(e))}}),n.exception=(r,...o)=>{o.length&&n.error&&n.error(...o),Rt.error(Nd,r),e?ss(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&jd(r,"error")},n.infoTick=(...e)=>{Rt.log(Nd,...e),t&&setTimeout(()=>jd(e[0]),0)}):Ld.forEach(e=>{n[e]=()=>{}}),n}();class zd extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class Hd{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(e){const t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>ol)throw new zd;this.events.push(e)}finish(){return new Promise(e=>{const t=this.events;this.clear(),e(JSON.stringify(t))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const e=this.events.map(e=>e.timestamp).sort()[0];return e?ld(e):null}}class Fd{constructor(e){this._worker=e,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise((e,t)=>{this._worker.addEventListener("message",({data:n})=>{n.success?e():t()},{once:!0}),this._worker.addEventListener("error",e=>{t(e)},{once:!0})})),this._ensureReadyPromise}destroy(){Dd&&$d.log("Destroying compression worker"),this._worker.terminate()}postMessage(e,t){const n=this._getAndIncrementId();return new Promise((r,o)=>{const s=({data:t})=>{const i=t;if(i.method===e&&i.id===n){if(this._worker.removeEventListener("message",s),!i.success)return Dd&&$d.error("Error in compression worker: ",i.response),void o(new Error("Error in compression worker"));r(i.response)}};this._worker.addEventListener("message",s),this._worker.postMessage({id:n,method:e,arg:t})})}_getAndIncrementId(){return this._id++}}class Bd{constructor(e){this._worker=new Fd(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){const t=ld(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);const n=JSON.stringify(e);return this._totalSize+=n.length,this._totalSize>ol?Promise.reject(new zd):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,e=>{Dd&&$d.exception(e,'Sending "clear" message to worker failed',e)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){const e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class Ud{constructor(e){this._fallback=new Hd,this._compression=new Bd(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}set waitForCheckout(e){this._used.waitForCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){return void(Dd&&$d.exception(e,"Failed to load the compression worker, falling back to simple buffer"))}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:e,hasCheckout:t,waitForCheckout:n}=this._fallback,r=[];for(const t of e)r.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._compression.waitForCheckout=n,this._used=this._compression;try{await Promise.all(r),this._fallback.clear()}catch(e){Dd&&$d.exception(e,"Failed to add events when switching buffers.")}}}function Vd(){try{return"sessionStorage"in Qc&&!!Qc.sessionStorage}catch{return!1}}function qd(e){return void 0!==e&&Math.random()<e}function Wd(e){if(Vd())try{Qc.sessionStorage.setItem(el,JSON.stringify(e))}catch{}}function Kd(e){const t=Date.now();return{id:e.id||Nn(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId,dirty:e.dirty||!1}}function Zd({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const o=function(e,t){return qd(e)?"session":!!t&&"buffer"}(e,t),s=Kd({sampled:o,previousSessionId:r});return n&&Wd(s),s}function Gd(e,t,n=+new Date){return null===e||void 0===t||t<0||0!==t&&e+t<=n}function Yd(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Gd(e.started,t,r)||Gd(e.lastActivity,n,r)}function Jd(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!!Yd(e,{sessionIdleExpire:t,maxReplayDuration:n})&&("buffer"!==e.sampled||0!==e.segmentId)}function Xd({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const o=r.stickySession&&function(){if(!Vd())return null;try{const e=Qc.sessionStorage.getItem(el);if(!e)return null;const t=JSON.parse(e);return Dd&&$d.infoTick("Loading existing session"),Kd(t)}catch{return null}}();return o?Jd(o,{sessionIdleExpire:e,maxReplayDuration:t})?(Dd&&$d.infoTick("Session in sessionStorage is expired, creating new one..."),Zd(r,{previousSessionId:o.id})):o:(Dd&&$d.infoTick("Creating new session"),Zd(r,{previousSessionId:n}))}function Qd(e,t,n){return!!tp(e,t)&&(ep(e,t,n),!0)}async function ep(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const o="buffer"===e.recordingMode;try{n&&o&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const s=function(e,t){try{if("function"==typeof t&&function(e){return e.type===bu.Custom}(e))return t(e)}catch(e){return Dd&&$d.exception(e,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}(t,e.getOptions().beforeAddRecordingEvent);if(!s)return;return await r.addEvent(s)}catch(t){const n=t&&t instanceof zd,s=n?"addEventSizeExceeded":"addEvent",i=lr();if(i&&i.recordDroppedEvent(n?"buffer_overflow":"internal_sdk_error","replay"),n&&o)return r.clear(),r.waitForCheckout=!0,null;e.handleException(t),await e.stop({reason:s})}}function tp(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=ld(t.timestamp);return!(n+e.timeouts.sessionIdlePause<Date.now()||n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration&&(Dd&&$d.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),1))}function np(e){return!e.type}function rp(e){return"transaction"===e.type}function op(e){return"feedback"===e.type}function sp(e){return!!e.category}function ip(){const e=ir().getPropagationContext().dsc;e&&delete e.replay_id;const t=no();t&&delete go(t).replay_id}function ap(e,t){return t.map(({type:t,start:n,end:r,name:o,data:s})=>{const i=e.throttledAddEvent({type:bu.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:t,description:o,startTimestamp:n,endTimestamp:r,data:s}}});return"string"==typeof i?Promise.resolve(null):i})}function cp(e,t){e.isEnabled()&&null!==t&&(function(e,t){return(!Dd||!e.getOptions()._experiments.traceInternals)&&function(e,t){const n=t?.getDsn(),r=t?.getOptions().tunnel;return function(e,t){const n=Vs(e);return!(!n||Us(n))&&!!t&&n.host.includes(t.host)&&/(^|&|\?)sentry_key=/.test(n.search)}(e,n)||function(e,t){return!!t&&Ks(e)===Ks(t)}(e,r)}(t,lr())}(e,t.name)||e.addUpdate(()=>(ap(e,[t]),!0)))}function lp(e){if(!e)return;const t=new TextEncoder;try{if("string"==typeof e)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=wc(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function up(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function dp(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta};return n.warnings=[...n.warnings||[],t],e._meta=n,e}function pp(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 hp(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function mp(e,t,n){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:o,warnings:s}=function(e){if(!e||"string"!=typeof e)return{body:e};const t=e.length>nl,n=function(e){const t=e[0],n=e[e.length-1];return"["===t&&"]"===n||"{"===t&&"}"===n}(e);if(t){const t=e.slice(0,nl);return n?{body:t,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${t}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}(n);return r.body=o,s?.length&&(r._meta={warnings:s}),r}function fp(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 gp(e,t){const n=function(e,t=Qc.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(Qc.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}(e);return Ln(n,t)}function yp(e,t){const n={};return t.forEach(t=>{e.get(t)&&(n[t]=e.get(t))}),n}function bp(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?yp(n,t):Array.isArray(n)?{}:fp(n,t):{}}function vp(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}}}}const _p=St.navigator;function Sp(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession())return void(Dd&&$d.warn("Received replay event after session expired."));const o=r||!t;t=!0,e.clickDetector&&function(e,t){try{if(!function(e){return 3===e.type}(t))return;const{source:n}=t.data;if(gd.has(n)&&e.registerMutation(t.timestamp),n===vu.Scroll&&e.registerScroll(t.timestamp),function(e){return e.data.source===vu.MouseInteraction}(t)){const{type:n,id:r}=t.data,o=id.mirror.getNode(r);o instanceof HTMLElement&&n===_u.Click&&e.registerClick(o)}}catch{}}(e.clickDetector,n),e.addUpdate(()=>{if("buffer"===e.recordingMode&&o&&e.setInitialState(),!Qd(e,n,o))return!0;if(!o)return!1;const t=e.session;if(function(e,t){t&&e.session&&0===e.session.segmentId&&Qd(e,function(e){const t=e.getOptions();return{type:bu.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:!!e.eventBuffer&&"worker"===e.eventBuffer.type,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}(e),!1)}(e,o),"buffer"===e.recordingMode&&t&&e.eventBuffer&&!t.dirty){const n=e.eventBuffer.getEarliestTimestamp();n&&(Dd&&$d.log(`Updating session start time to earliest event in buffer to ${new Date(n)}`),t.started=n,e.getOptions().stickySession&&Wd(t))}return t?.previousSessionId||"session"===e.recordingMode&&e.flush(),!0})}}class wp extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class kp extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}class Ep extends Error{constructor(){super("Session is too long, not sending replay")}}async function Cp(e,t={count:0,interval:5e3}){const{recordingData:n,onError:r}=e;if(n.length)try{return await async function({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:o,session:s}){const i=function({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}\n`;if("string"==typeof e)n=`${r}${e}`;else{const t=(new TextEncoder).encode(r);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:l,initialTimestamp:u}=r,d=lr(),p=ir(),h=d?.getTransport(),m=d?.getDsn();if(!(d&&h&&m&&s.sampled))return Promise.resolve({});const f={type:"replay_event",replay_start_timestamp:u/1e3,timestamp:o/1e3,error_ids:c,trace_ids:l,urls:a,replay_id:t,segment_id:n,replay_type:s.sampled},g=await async function({client:e,scope:t,replayId:n,event:r}){const o={event_id:n,integrations:"object"!=typeof e._integrations||null===e._integrations||Array.isArray(e._integrations)?void 0:Object.keys(e._integrations)};e.emit("preprocessEvent",r,o);const s=await rs(e.getOptions(),r,o,t,e,ar());if(!s)return null;e.emit("postprocessEvent",s,o),s.platform=s.platform||"javascript";const i=e.getSdkMetadata(),{name:a,version:c,settings:l}=i?.sdk||{};return s.sdk={...s.sdk,name:a||"sentry.javascript.unknown",version:c||"0.0.0",settings:l},s}({scope:p,client:d,replayId:t,event:f});if(!g)return d.recordDroppedEvent("event_processor","replay"),Dd&&$d.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete g.sdkProcessingMetadata;const y=function(e,t,n,r){return So(Po(e,Oo(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:"string"==typeof t?(new TextEncoder).encode(t).length:t.length},t]])}(g,i,m,d.getOptions().tunnel);let b;try{b=await h.send(y)}catch(e){const t=new Error(tl);try{t.cause=e}catch{}throw t}const v=Es({},b);if(ks(v,"replay"))throw new kp(v);if("number"==typeof b.statusCode&&(b.statusCode<200||b.statusCode>=300))throw new wp(b.statusCode);return b}(e),!0}catch(n){if(n instanceof wp||n instanceof kp)throw n;if(as("Replays",{_retryCount:t.count}),r&&r(n),t.count>=3){const e=new Error(`${tl} - max retries exceeded`);try{e.cause=n}catch{}throw e}return t.interval*=++t.count,new Promise((n,r)=>{yc(async()=>{try{await Cp(e,t),n(!0)}catch(e){r(e)}},t.interval)})}}const xp="__THROTTLED";class Tp{constructor({options:e,recordingOptions:t}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=t,this._options=e,this._debouncedFlush=function(e,t,n){return function(e,t,n){let r,o,s;const i=n?.maxWait?Math.max(n.maxWait,t):0,a=n?.setTimeoutImpl||setTimeout;function c(){return l(),r=e(),r}function l(){void 0!==o&&clearTimeout(o),void 0!==s&&clearTimeout(s),o=s=void 0}function u(){return o&&clearTimeout(o),o=a(c,t),i&&void 0===s&&(s=a(c,i)),r}return u.cancel=l,u.flush=function(){return void 0!==o||void 0!==s?c():r},u}(e,t,{...n,setTimeoutImpl:yc})}(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=function(e){const t=new Map;let n=!1;return(...r)=>{const o=Math.floor(Date.now()/1e3);if((e=>{const n=e-5;t.forEach((e,r)=>{r<n&&t.delete(r)})})(o),[...t.values()].reduce((e,t)=>e+t,0)>=300){const e=n;return n=!0,e?"__SKIPPED":xp}n=!1;const s=t.get(o)||0;return t.set(o,s+1),e(...r)}}((e,t)=>function(e,t,n){return tp(e,t)?ep(e,t,n):Promise.resolve(null)}(this,e,t));const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),o=n?{threshold:Math.min(3e3,n),timeout:n,scrollTimeout:300,ignoreSelector:r?r.join(","):""}:void 0;if(o&&(this.clickDetector=new yd(this,o)),Dd){const t=e._experiments;$d.setConfig({captureExceptions:!!t.captureExceptions,traceInternals:!!t.traceInternals})}this._handleVisibilityChange=()=>{"visible"===Qc.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const e=_d({category:"ui.blur"});this._doChangeToBackgroundTasks(e)},this._handleWindowFocus=()=>{const e=_d({category:"ui.focus"});this._doChangeToForegroundTasks(e)},this._handleKeyboardEvent=e=>{!function(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=function(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s,target:i}=e;if(!i||function(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable}(i)||!s)return null;if(!(t||r||o)&&1===s.length)return null;const a=fn(i,{maxStringLength:200})||"<unknown>";return _d({category:"ui.keyDown",message:a,data:{...Ed(i,a).data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s}})}(t);n&&dd(e,n)}(this,e)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return Boolean(this._canvas)}getOptions(){return this._options}handleException(e){Dd&&$d.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){const{errorSampleRate:t,sessionSampleRate:n}=this._options,r=t<=0&&n<=0;this._requiresManualStart=r,r||(this._initializeSessionForSampling(e),this.session?!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",Dd&&$d.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording()):Dd&&$d.exception(new Error("Unable to initialize and create session")))}start(){if(this._isEnabled&&"session"===this.recordingMode)return void(Dd&&$d.log("Recording is already in progress"));if(this._isEnabled&&"buffer"===this.recordingMode)return void(Dd&&$d.log("Buffering is in progress, call `flush()` to save the replay"));Dd&&$d.infoTick("Starting replay in session mode"),this._updateUserActivity();const e=Xd({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled)return void(Dd&&$d.log("Buffering is in progress, call `flush()` to save the replay"));Dd&&$d.infoTick("Starting replay in buffer mode");const e=Xd({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const e=this._canvas;this._stopRecording=id({...this._recordingOptions,..."buffer"===this.recordingMode?{checkoutEveryNms:6e4}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:Sp(this),.../iPhone|iPad|iPod/i.test(_p?.userAgent??"")||/Macintosh/i.test(_p?.userAgent??"")&&_p?.maxTouchPoints&&_p?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{},onMutation:this._onMutationHandler.bind(this),...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}})}catch(e){this.handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this.handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){if(this._isEnabled){this._isEnabled=!1,this.recordingMode="buffer";try{Dd&&$d.log("Stopping Replay"+(t?` triggered by ${t}`:"")),ip(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,function(){if(Vd())try{Qc.sessionStorage.removeItem(el)}catch{}}(),this.session=void 0}catch(e){this.handleException(e)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),Dd&&$d.log("Pausing replay"))}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),Dd&&$d.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const t=Date.now();Dd&&$d.log("Converting buffer to session"),await this.flushImmediate();const n=this.stopRecording();e&&n&&"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession()),this.startRecording())}addUpdate(e){const t=e();"buffer"!==this.recordingMode&&this._isEnabled&&!0!==t&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._checkSession())return;this.resume()}}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(e){if(!e||!1!==this.session?.sampled)return this.session?.id}checkAndHandleExpiredSession(){if(!(this._lastActivity&&Gd(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled))return!!this._checkSession();this.pause()}setInitialState(){const e=`${Qc.location.origin}${Qc.location.pathname}${Qc.location.hash}${Qc.location.search}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=e,this._context.initialTimestamp=Date.now(),this._context.urls.push(e)}throttledAddEvent(e,t){const n=this._throttledAddEvent(e,t);if(n===xp){const e=_d({category:"replay.throttled"});this.addUpdate(()=>!Qd(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}}))}return n}getCurrentRoute(){const e=this.lastActiveSpan||no(),t=e&&to(e),n=(t&&Zr(t).data||{})[dr];if(t&&n&&["route","custom"].includes(n))return Zr(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=function({useCompression:e,workerUrl:t}){if(e&&window.Worker){const e=function(e){try{const t=e||("undefined"!=typeof __SENTRY_EXCLUDE_REPLAY_WORKER__&&__SENTRY_EXCLUDE_REPLAY_WORKER__?"":function(){const e=new Blob(['var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,n){return p[n.s]-p[t.s]||t.f-n.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});']);return URL.createObjectURL(e)}());if(!t)return;Dd&&$d.log("Using compression worker"+(e?` from ${e}`:""));const n=new Worker(t);return new Ud(n)}catch(e){Dd&&$d.exception(e,"Failed to create compression worker")}}(t);if(e)return e}return Dd&&$d.log("Using simple buffer"),new Hd}({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(e){const t=Xd({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:this._options.errorSampleRate>0});this.session=t}_checkSession(){if(!this.session)return!1;const e=this.session;return!Jd(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(e.id))}_addListeners(){try{Qc.document.addEventListener("visibilitychange",this._handleVisibilityChange),Qc.addEventListener("blur",this._handleWindowBlur),Qc.addEventListener("focus",this._handleWindowFocus),Qc.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(function(e){const t=lr();uc((e=>t=>{if(!e.isEnabled())return;const n=function(e){const{target:t,message:n}=function(e){const t="click"===e.name;let n,r=null;try{r=t?hd(e.event):md(e.event),n=fn(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}(e);return _d({category:`ui.${e.name}`,...Ed(t,n)})}(t);if(!n)return;const r="click"===t.name,o=r?t.event:void 0;var s,i,a;!(r&&e.clickDetector&&o?.target)||o.altKey||o.metaKey||o.ctrlKey||o.shiftKey||(s=e.clickDetector,i=n,a=hd(t.event),s.handleClick(i,a)),dd(e,n)})(e)),hc(function(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}(t);null!==n&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(ap(e,[n]),!1)))}}(e)),function(e){const t=lr();t&&t.on("beforeAddBreadcrumb",t=>function(e,t){if(!e.isEnabled()||!sp(t))return;const n=function(e){return!sp(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:"console"===e.category?function(e){const t=e.data?.arguments;if(!Array.isArray(t)||0===t.length)return _d(e);let n=!1;const r=t.map(e=>{if(!e)return e;if("string"==typeof e)return e.length>rl?(n=!0,`${e.slice(0,rl)}…`):e;if("object"==typeof e)try{const t=bo(e,7);return JSON.stringify(t).length>rl?(n=!0,`${JSON.stringify(t,null,2).slice(0,rl)}…`):t}catch{}return e});return _d({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(e):_d(e)}(t);n&&dd(e,n)}(e,t))}(e),function(e){const t=lr();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",(e,t)=>function(e,t,n){if(t.data)try{(function(e){return"xhr"===e.category})(t)&&function(e){return e?.xhr}(n)&&(function(e,t){const{xhr:n,input:r}=t;if(!n)return;const o=lp(r),s=n.getResponseHeader("content-length")?up(n.getResponseHeader("content-length")):function(e,t){try{return lp("json"===t&&e&&"object"==typeof e?JSON.stringify(e):e)}catch{return}}(n.response,n.responseType);void 0!==o&&(e.data.request_body_size=o),void 0!==s&&(e.data.response_body_size=s)}(t,n),async function(e,t,n){try{const r=function(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:s=r,input:i,xhr:a}=t,{url:c,method:l,status_code:u=0,request_body_size:d,response_body_size:p}=e.data;if(!c)return null;if(!a||!gp(c,n.networkDetailAllowUrls)||gp(c,n.networkDetailDenyUrls))return{startTimestamp:o,endTimestamp:s,url:c,method:l,statusCode:u,request:hp(d),response:hp(p)};const h=a[bc],m=h?fp(h.request_headers,n.networkRequestHeaders):{},f=fp(Cc(a),n.networkResponseHeaders),[g,y]=n.networkCaptureBodies?kc(i,$d):[void 0],[b,v]=n.networkCaptureBodies?function(e){const t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return function(e,t){try{if("string"==typeof e)return[e];if(e instanceof Document)return[e.body.outerHTML];if("json"===t&&e&&"object"==typeof e)return[JSON.stringify(e)];if(!e)return[void 0]}catch(t){return Dd&&$d.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Dd&&$d.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}(e.response,e.responseType)}catch(e){t.push(e)}return Dd&&$d.warn("Failed to get xhr response body",...t),[void 0]}(a):[void 0],_=mp(m,d,g),S=mp(f,p,b);return{startTimestamp:o,endTimestamp:s,url:c,method:l,statusCode:u,request:y?dp(_,y):_,response:v?dp(S,v):S}}(e,t,n),o=pp("resource.xhr",r);cp(n.replay,o)}catch(e){Dd&&$d.exception(e,"Failed to capture xhr breadcrumb")}}(t,n,e)),function(e){return"fetch"===e.category}(t)&&function(e){return e?.response}(n)&&(function(e,t){const{input:n,response:r}=t,o=lp(n?Ec(n):void 0),s=r?up(r.headers.get("content-length")):void 0;void 0!==o&&(e.data.request_body_size=o),void 0!==s&&(e.data.response_body_size=s)}(t,n),async function(e,t,n){try{const r=await async function(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:l,response_body_size:u}=e.data,d=gp(i,n.networkDetailAllowUrls)&&!gp(i,n.networkDetailDenyUrls),p=d?function({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const o=n?(i=t,1===(s=n).length&&"string"!=typeof s[0]?bp(s[0],i):2===s.length?bp(s[1],i):{}):{};var s,i;if(!e)return mp(o,r,void 0);const a=Ec(n),[c,l]=kc(a,$d),u=mp(o,r,c);return l?dp(u,l):u}(n,t.input,l):hp(l),h=await async function(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,o){if(!e&&void 0!==o)return hp(o);const s=r?yp(r.headers,n):{};if(!r||!t&&void 0!==o)return mp(s,o,void 0);const[i,a]=await async function(e){const t=function(e){try{return e.clone()}catch(e){Dd&&$d.exception(e,"Failed to clone response body")}}(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{const e=await function(e){return new Promise((t,n)=>{const r=yc(()=>n(new Error("Timeout while trying to read response body")),500);(async function(e){return await e.text()})(e).then(e=>t(e),e=>n(e)).finally(()=>clearTimeout(r))})}(t);return[e]}catch(e){return e instanceof Error&&e.message.indexOf("Timeout")>-1?(Dd&&$d.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(Dd&&$d.exception(e,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}(r),c=function(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:o}){try{const s=e?.length&&void 0===n?lp(e):n;return r?mp(o,s,t?e:void 0):hp(s)}catch(e){return Dd&&$d.exception(e,"Failed to serialize response body"),mp(o,n,void 0)}}(i,{networkCaptureBodies:t,responseBodySize:o,captureDetails:e,headers:s});return a?dp(c,a):c}(d,n,t.response,u);return{startTimestamp:o,endTimestamp:s,url:i,method:a,statusCode:c,request:p,response:h}}(e,t,n),o=pp("resource.fetch",r);cp(n.replay,o)}catch(e){Dd&&$d.exception(e,"Failed to capture fetch breadcrumb")}}(t,n,e))}catch(e){Dd&&$d.exception(e,"Error when enriching network breadcrumb")}}(a,e,t))}catch{}}(e);const n=function(e){return Object.assign((t,n)=>{if(!e.isEnabled()||e.isPaused())return t;if(function(e){return"replay_event"===e.type}(t))return delete t.breadcrumbs,t;if(!np(t)&&!rp(t)&&!op(t))return t;if(!e.checkAndHandleExpiredSession())return ip(),t;if(op(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),function(e,t){e.triggerUserActivity(),e.addUpdate(()=>!t.timestamp||(e.throttledAddEvent({type:bu.Custom,timestamp:1e3*t.timestamp,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1))}(e,t),t;if(function(e,t){return!(e.type||!e.exception?.values?.length||!t.originalException?.__rrweb__)}(t,n)&&!e.getOptions()._experiments.captureExceptions)return Dd&&$d.log("Ignoring error from rrweb internals",t),null;const r=function(e,t){return"buffer"===e.recordingMode&&t.message!==tl&&!(!t.exception||t.type)&&qd(e.getOptions().errorSampleRate)}(e,t);if((r||"session"===e.recordingMode)&&(t.tags={...t.tags,replayId:e.getSessionId()}),r&&"buffer"===e.recordingMode&&"buffer"===e.session?.sampled){const t=e.session;t.dirty=!0,e.getOptions().stickySession&&Wd(t)}return t},{id:"Replay"})}(e);var r;r=n,ar().addEventProcessor(r),t&&(t.on("beforeSendEvent",function(e){return t=>{e.isEnabled()&&np(t)&&function(e,t){const n=t.exception?.values?.[0]?.value;"string"==typeof n&&(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))&&dd(e,_d({category:"replay.hydrate-error",data:{url:yn()}}))}(e,t)}}(e)),t.on("afterSendEvent",function(e){return(t,n)=>{if(!e.isEnabled()||!np(t)&&!rp(t))return;const r=n.statusCode;!r||r<200||r>=300||(rp(t)?function(e,t){const n=e.getContext();t.contexts?.trace?.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}(e,t):function(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),"buffer"!==e.recordingMode||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();("function"!=typeof r||r(t))&&yc(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(t){e.handleException(t)}})}(e,t))}}(e)),t.on("createDsc",t=>{const n=e.getSessionId();n&&e.isEnabled()&&"session"===e.recordingMode&&e.checkAndHandleExpiredSession()&&(t.replay_id=n)}),t.on("spanStart",t=>{e.lastActiveSpan=t}),t.on("spanEnd",t=>{e.lastActiveSpan=t}),t.on("beforeSendFeedback",async(t,n)=>{const r=e.getSessionId();n?.includeReplay&&e.isEnabled()&&r&&t.contexts?.feedback&&("api"===t.contexts.feedback.source&&await e.sendBufferedReplayOrFlush(),t.contexts.feedback.replay_id=r)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}(this),this._hasInitializedCoreListeners=!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=function(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(e=>{r.push(Na(e,n))}),r.push(Da(xd(Md,e)),Aa(xd(Pd,e)),La(xd(Rd,e))),()=>{r.forEach(e=>e())}}(this)}_removeListeners(){try{Qc.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Qc.removeEventListener("blur",this._handleWindowBlur),Qc.removeEventListener("focus",this._handleWindowFocus),Qc.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}_doChangeToBackgroundTasks(e){this.session&&(Yd(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush()))}_doChangeToForegroundTasks(e){this.session&&(this.checkAndHandleExpiredSession()?e&&this._createCustomBreadcrumb(e):Dd&&$d.log("Document has become active, but session has expired"))}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate(()=>{this.throttledAddEvent({type:bu.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})})}_addPerformanceEntries(){let e=(t=this.performanceEntries,t.map(Td).filter(Boolean)).concat(this.replayPerformanceEntries);var t;if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const t=this._context.initialTimestamp/1e3;e=e.filter(e=>e.start>=t)}return Promise.all(ap(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:t}=this;if(!e||!t||this._requiresManualStart)return;if(e.segmentId)return;const n=t.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){const e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){const e=this.getSessionId();if(this.session&&this.eventBuffer&&e){if(await this._addPerformanceEntries(),this.eventBuffer?.hasEvents&&(await async function(e){try{return Promise.all(ap(e,[vp(Qc.performance.memory)]))}catch{return[]}}(this),this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Ep;const n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession();const o=await this.eventBuffer.finish();await Cp({replayId:e,recordingData:o,segmentId:r,eventContext:n,session:this.session,timestamp:t,onError:e=>this.handleException(e)})}catch(e){this.handleException(e),this.stop({reason:"sendReplay"});const t=lr();if(t){let n;n=e instanceof kp?"ratelimit_backoff":e instanceof Ep?"invalid":"send_error",t.recordDroppedEvent(n,"replay")}}}else Dd&&$d.error("No session or eventBuffer found to flush.")}async _flush({force:e=!1}={}){if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession())return void(Dd&&$d.error("Attempting to finish replay event after session expired."));if(!this.session)return;const t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();const r=n<this._options.minReplayDuration;if(r||n>this._options.maxReplayDuration+5e3)return Dd&&$d.log(`Session duration (${Math.floor(n/1e3)}s) is too ${r?"short":"long"}, not sending replay.`),void(r&&this._debouncedFlush());const o=this.eventBuffer;o&&0===this.session.segmentId&&!o.hasCheckout&&Dd&&$d.log("Flushing initial segment without checkout.");const s=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(e){this.handleException(e)}finally{this._flushLock=void 0,s&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&Wd(this.session)}_onMutationHandler(e){const{ignoreMutations:t}=this._options._experiments;if(t?.length&&e.some(e=>{const n=function(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}(e.target),r=t.join(",");return n?.matches(r)}))return!1;const n=e.length,r=this._options.mutationLimit,o=r&&n>r;if(n>this._options.mutationBreadcrumbLimit||o){const e=_d({category:"replay.mutations",data:{count:n,limit:o}});this._createCustomBreadcrumb(e)}return!o||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}function Ip(e,t){return[...e,...t].join(",")}const Mp='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',Op=["content-length","content-type","accept"],Pp=Symbol.for("sentry__originalRequestBody");let Rp=!1,Ap=!1;const Dp=e=>new Lp(e);class Lp{constructor({flushMinDelay:e=5e3,flushMaxDelay:t=5500,minReplayDuration:n=4999,maxReplayDuration:r=36e5,stickySession:o=!0,useCompression:s=!0,workerUrl:i,_experiments:a={},maskAllText:c=!0,maskAllInputs:l=!0,blockAllMedia:u=!0,mutationBreadcrumbLimit:d=750,mutationLimit:p=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:f=[],networkDetailDenyUrls:g=[],networkCaptureBodies:y=!0,networkRequestHeaders:b=[],networkResponseHeaders:v=[],mask:_=[],maskAttributes:S=["title","placeholder","aria-label"],unmask:w=[],block:k=[],unblock:E=[],ignore:C=[],maskFn:x,beforeAddRecordingEvent:T,beforeErrorSampling:I,onError:M,attachRawBodyFromRequest:O=!1}={}){this.name="Replay";const P=function({mask:e,unmask:t,block:n,unblock:r,ignore:o}){return{maskTextSelector:Ip(e,[".sentry-mask","[data-sentry-mask]"]),unmaskTextSelector:Ip(t,[]),blockSelector:Ip(n,[".sentry-block","[data-sentry-block]","base","iframe[srcdoc]:not([src])"]),unblockSelector:Ip(r,[]),ignoreSelector:Ip(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}({mask:_,unmask:w,block:k,unblock:E,ignore:C});if(this._recordingOptions={maskAllInputs:l,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:x,maskInputFn:x,maskAttributeFn:(e,t,n)=>function({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:o,value:s}){return r?o.unmaskTextSelector&&e.matches(o.unmaskTextSelector)?s:n.includes(t)||"value"===t&&"INPUT"===e.tagName&&["submit","button"].includes(e.getAttribute("type")||"")?s.replace(/[\S]/g,"*"):s:s}({maskAttributes:S,maskAllText:c,privacyOptions:P,key:e,value:t,el:n}),...P,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch{}},recordCrossOriginIframes:Boolean(a.recordCrossOriginIframes)},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,5e4),maxReplayDuration:Math.min(r,36e5),stickySession:o,useCompression:s,workerUrl:i,blockAllMedia:u,maskAllInputs:l,maskAllText:c,mutationBreadcrumbLimit:d,mutationLimit:p,slowClickTimeout:h,slowClickIgnoreSelectors:m,networkDetailAllowUrls:f,networkDetailDenyUrls:g,networkCaptureBodies:y,networkRequestHeaders:Np(b),networkResponseHeaders:Np(v),beforeAddRecordingEvent:T,beforeErrorSampling:I,onError:M,attachRawBodyFromRequest:O,_experiments:a},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Mp}`:Mp,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&Mi())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Rp}set _isInitialized(e){Rp=e}afterAllSetup(e){Mi()&&!this._replay&&(this._initialOptions.attachRawBodyFromRequest&&function(){if("undefined"==typeof Request||Ap)return;const e=Request;try{const t=function(t,n){const r=new e(t,n);return null!=n?.body&&(r[Pp]=n.body),r};t.prototype=e.prototype,St.Request=t,Ap=!0}catch{}}(),this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:"session"===this._replay.recordingMode}):Promise.resolve()}flush(e){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(e){if(this._replay?.isEnabled())return this._replay.getSessionId(e)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){const t=function(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},o=$r(n.replaysSessionSampleRate),s=$r(n.replaysOnErrorSampleRate);return null==o&&null==s&&It(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),null!=o&&(r.sessionSampleRate=o),null!=s&&(r.errorSampleRate=s),r}(this._initialOptions,e);this._replay=new Tp({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{const t=e.getIntegrationByName("ReplayCanvas");if(!t)return;this._replay._canvas=t.getOptions()}catch{}}}function Np(e){return[...Op,...e.map(e=>e.toLowerCase())]}function jp(e){try{return new URL(e,Oi.location.origin).href}catch{return}}function $p(e){try{return new Headers(e)}catch{return}}const zp=new WeakMap,Hp=new Map,Fp={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function Bp(e){const{url:t}=Zr(e).data;if(!t||"string"!=typeof t)return;const n=Na("resource",({entries:r})=>{r.forEach(r=>{(function(e){return"resource"===e.entryType&&"initiatorType"in e&&"string"==typeof e.nextHopProtocol&&("fetch"===e.initiatorType||"xmlhttprequest"===e.initiatorType)})(r)&&r.name.endsWith(t)&&(e.setAttributes(Qa(r)),setTimeout(n))})})}const Up="sentry_previous_trace";function Vp(e){return 1===e.traceFlags}const qp={...Vo,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...Fp};function Wp(e,t,n){e.emit("startPageLoadSpan",t,n),ir().setTransactionName(t.name);const r=Yp(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function Kp(e,t,n){const{url:r,isRedirect:o}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:o}),e.emit("startNavigationSpan",t,{isRedirect:o});const s=ir();return s.setTransactionName(t.name),r&&!o&&s.setSDKProcessingMetadata({normalizedRequest:{...Di(),url:r}}),Yp(e)}function Zp(e){const t=Oi.document,n=t?.querySelector(`meta[name=${e}]`);return n?.getAttribute("content")||void 0}const Gp="_sentry_idleSpan";function Yp(e){return e[Gp]}function Jp(e,t){_n(e,Gp,t)}const Xp={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Qp={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},eh={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},th=Symbol.for("react.forward_ref"),nh=Symbol.for("react.memo"),rh={};function oh(e){if(function(e){return"object"==typeof e&&null!==e&&e.$$typeof===nh}(e))return eh;const t=e.$$typeof;return t&&rh[t]||Xp}rh[th]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},rh[nh]=eh;const sh=Object.defineProperty.bind(Object),ih=Object.getOwnPropertyNames.bind(Object),ah=Object.getOwnPropertySymbols?.bind(Object),ch=Object.getOwnPropertyDescriptor.bind(Object),lh=Object.getPrototypeOf.bind(Object),uh=Object.prototype;function dh(e,t,n){if("string"!=typeof t){if(uh){const n=lh(t);n&&n!==uh&&dh(e,n)}let n=ih(t);ah&&(n=n.concat(ah(t)));const r=oh(e),o=oh(t);for(const s of n)if(!(Qp[s]||o?.[s]||r?.[s]||ch(e,s))){const n=ch(t,s);if(n)try{sh(e,s,n)}catch(e){}}}return e}class ph extends V.Component{constructor(e){super(e);const{name:t,disabled:n=!1}=this.props;n||(this._mountSpan=jo({name:`<${t}>`,onlyIfParent:!0,op:"ui.react.mount",attributes:{[fr]:"auto.ui.react.profiler","ui.component_name":t}}))}componentDidMount(){this._mountSpan&&this._mountSpan.end()}shouldComponentUpdate({updateProps:e,includeUpdates:t=!0}){if(t&&this._mountSpan&&e!==this.props.updateProps){const t=Object.keys(e).filter(t=>e[t]!==this.props.updateProps[t]);if(t.length>0){const e=Un();this._updateSpan=$o(this._mountSpan,()=>jo({name:`<${this.props.name}>`,onlyIfParent:!0,op:"ui.react.update",startTime:e,attributes:{[fr]:"auto.ui.react.profiler","ui.component_name":this.props.name,"ui.react.changed_props":t}}))}}return!0}componentDidUpdate(){this._updateSpan&&(this._updateSpan.end(),this._updateSpan=void 0)}componentWillUnmount(){const e=Un(),{name:t,includeRender:n=!0}=this.props;if(this._mountSpan&&n){const n=Zr(this._mountSpan).timestamp;$o(this._mountSpan,()=>{const r=jo({onlyIfParent:!0,name:`<${t}>`,op:"ui.react.render",startTime:n,attributes:{[fr]:"auto.ui.react.profiler","ui.component_name":t}});r&&r.end(e)})}}render(){return this.props.children}}Object.assign(ph,{defaultProps:{disabled:!1,includeRender:!0,includeUpdates:!0}});const hh="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,mh={componentStack:null,error:null,eventId:null};class fh extends V.Component{constructor(e){super(e),this.state=mh,this._openFallbackReportDialog=!0;const t=lr();t&&e.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=t.on("afterSendEvent",t=>{!t.type&&this._lastEventId&&t.event_id===this._lastEventId&&Xc({...e.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,n){const{componentStack:r}=n,{beforeCapture:o,onError:s,showDialog:i,dialogOptions:a}=this.props;cr(c=>{o&&o(c,t,r);const l=function(t,{componentStack:n},r){if(function(){const t=e.version.match(/^([^.]+)/);return null!==t&&parseInt(t[0])>=17}()&&en(t)&&n){const e=new Error(t.message);e.name=`React ErrorBoundary ${t.name}`,e.stack=n,function(e,t){const n=new WeakSet;!function e(t,r){if(!n.has(t))return t.cause?(n.add(t),e(t.cause,r)):void(t.cause=r)}(e,t)}(t,e)}return cr(e=>(e.setContext("react",{componentStack:n}),ss(t,r)))}(t,n,{mechanism:{handled:null!=this.props.handled?this.props.handled:!!this.props.fallback,type:"auto.function.react.error_boundary"}});s&&s(t,r,l),i&&(this._lastEventId=l,this._openFallbackReportDialog&&Xc({...a,eventId:l})),this.setState({error:t,componentStack:r,eventId:l})})}componentDidMount(){const{onMount:e}=this.props;e&&e()}componentWillUnmount(){const{error:e,componentStack:t,eventId:n}=this.state,{onUnmount:r}=this.props;r&&(this.state===mh?r(null,null,null):r(e,t,n)),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}resetErrorBoundary(){const{onReset:e}=this.props,{error:t,componentStack:n,eventId:r}=this.state;e&&e(t,n,r),this.setState(mh)}render(){const{fallback:e,children:t}=this.props,n=this.state;if(null===n.componentStack)return"function"==typeof t?t():t;const r="function"==typeof e?V.createElement(e,{error:n.error,componentStack:n.componentStack,resetError:()=>this.resetErrorBoundary(),eventId:n.eventId}):e;return V.isValidElement(r)?r:(e&&hh&&Rt.warn("fallback did not produce a valid ReactElement"),null)}}let gh,yh,bh,vh,_h,Sh,wh=!1;function kh(e){return function(e){return"*"===e[e.length-1]?e.slice(0,-1):e}(e.route.path||"")}function Eh(e){return e.params["*"]||""}function Ch(e){return"/"===e[e.length-1]?e.slice(0,-1):e}function xh(e){return e.endsWith("*")}function Th(e){return e.includes("/*")||e.endsWith("*")}function Ih(e,t){return xh(e)&&!!t.route.children?.length||!1}function Mh(e){return!(e.children||!e.element||!e.path?.endsWith("/*"))}function Oh(e,t,n){const r=e&&e.length>0?e:wh?Rh(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 Ph(e){return e.split(/\\?\//).filter(e=>e.length>0&&","!==e).length}function Rh(e,t){if(!t||"/"===t)return e;if(!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)||"/"}function Ah(e){return"/"===e[0]?e:`/${e}`}function Dh(e,t){const n=gh(e,t);if(!n||0===n.length)return"";for(const r of n)if(r.route.path&&"*"!==r.route.path){const n=kh(r),o=Rh(t.pathname,Ah(r.pathnameBase));return Ch(t.pathname===o?o:Ch(n||"")+Ah(Dh(e.filter(e=>e!==r.route),{pathname:o})))}return""}function Lh(e,t){return wh?Rh(e.pathname,t):e.pathname||""}function Nh(e,t,n,r,o=""){let s,i="url";const a=function(e,t){const n=gh(t,e);if(n)for(const e of n)if(Mh(e.route)&&Eh(e))return!0;return!1}(e,n);return a&&(s=Ah(Dh(n,e)),i="route"),a&&s||([s,i]=function(e,t,n,r=""){if(!e||0===e.length)return[wh?Rh(t.pathname,r):t.pathname,"url"];if(!n)return[Lh(t,r),"url"];let o="";for(const e of n){const n=e.route;if(!n)continue;if(n.index)return Oh(o,e.pathname,r);const s=n.path;if(!s||Ih(s,e))continue;const i="/"===s[0]||"/"===o[o.length-1]?s:`/${s}`;if(o=Ch(o)+Ah(i),Ch(t.pathname)===Ch(r+e.pathname))return Ph(o)===Ph(e.pathname)||xh(o)?(Ih(o,e)&&(o=o.slice(0,-1)),[(wh?"":r)+o,"route"]):[(wh?"":r)+i,"route"]}return[Lh(t,r),"url"]}(t,e,r,o)),[s||e.pathname,i]}function jh(){const e=no(),t=e?to(e):void 0;if(!t)return;const n=Zr(t).op;return"navigation"===n||"pageload"===n?t:void 0}let $h=3e3;const zh=new WeakSet,Hh=new WeakMap,Fh=new Set,Bh=new WeakMap;function Uh(e){return e.includes(":")||e.includes("*")}function Vh(e,t){const n=((e={})=>{const t={name:void 0,source:void 0},n=Oi.document,{enableInp:r,enableElementTiming:o,enableLongTask:s,enableLongAnimationFrame:i,_experiments:{enableInteractions:a,enableStandaloneClsSpans:c,enableStandaloneLcpSpans:l},beforeStartSpan:u,idleTimeout:d,finalTimeout:p,childSpanTimeout:h,markBackgroundSpan:m,traceFetch:f,traceXHR:g,trackFetchStreamPerformance:y,shouldCreateSpanForRequest:b,enableHTTPTimings:v,ignoreResourceSpans:_,ignorePerformanceApiSpans:S,instrumentPageLoad:w,instrumentNavigation:k,detectRedirects:E,linkPreviousTrace:C,consistentTraceSampling:x,enableReportPageLoaded:T,onRequestSpanStart:I,onRequestSpanEnd:M}={...qp,...e};let O,P,R;function A(e,r,o=!0){const s="pageload"===r.op,i=r.name,a=u?u(r):r,m=a.attributes||{};if(i!==a.name&&(m[dr]="custom",a.attributes=m),!o){const e=Bn();return void jo({...a,startTime:e}).end(e)}t.name=a.name,t.source=m[dr];const f=qo(a,{idleTimeout:d,finalTimeout:p,childSpanTimeout:h,disableAutoFinish:s,beforeSpanEnd:t=>{O?.(),function(e,t){const n=Za(),r=qn();if(!n?.getEntries||!r)return;const o=Ga(r),s=n.getEntries(),{op:i,start_timestamp:a}=Zr(e);s.slice(nc).forEach(n=>{const r=Ga(n.startTime),s=Ga(Math.max(0,n.duration));if(!("navigation"===i&&a&&o+r<a))switch(n.entryType){case"navigation":!function(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{oc(e,t,r,n)}),oc(e,t,"secureConnection",n,"TLS/SSL"),oc(e,t,"fetch",n,"cache"),oc(e,t,"domainLookup",n,"DNS"),function(e,t,n){const r=n+Ga(t.requestStart),o=n+Ga(t.responseEnd),s=n+Ga(t.responseStart);t.responseEnd&&(Wa(e,r,o,{op:"browser.request",name:t.name,attributes:{[fr]:"auto.ui.browser.metrics"}}),Wa(e,s,o,{op:"browser.response",name:t.name,attributes:{[fr]:"auto.ui.browser.metrics"}}))}(e,t,n)}(e,n,o);break;case"mark":case"paint":case"measure":{!function(e,t,n,r,o,s){if(function(e){if("measure"===e?.entryType)try{return"Components ⚛"===e.detail.devtools.track}catch{return}}(t))return;if(["mark","measure"].includes(t.entryType)&&Ln(t.name,s))return;const i=Gi(!1),a=Ga(i?i.requestStart:0),c=o+Math.max(n,a),l=o+n,u=l+r,d={[fr]:"auto.resource.browser.metrics"};c!==l&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=c),function(e,t){try{const n=t.detail;if(!n)return;if("object"==typeof n){for(const[t,r]of Object.entries(n))if(r&&an(r))e[`sentry.browser.measure.detail.${t}`]=r;else if(void 0!==r)try{e[`sentry.browser.measure.detail.${t}`]=JSON.stringify(r)}catch{}return}if(an(n))return void(e["sentry.browser.measure.detail"]=n);try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}(d,t),c<=u&&Wa(e,c,u,{name:t.name,op:t.entryType,attributes:d})}(e,n,r,s,o,t.ignorePerformanceApiSpans);const i=na(),a=n.startTime<i.firstHiddenTime;"first-paint"===n.name&&a&&(rc.fp={value:n.startTime,unit:"millisecond"}),"first-contentful-paint"===n.name&&a&&(rc.fcp={value:n.startTime,unit:"millisecond"});break}case"resource":!function(e,t,n,r,o,s,i){if("xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType)return;const a=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(i?.includes(a))return;const c={[fr]:"auto.resource.browser.metrics"},l=qs(n);l.protocol&&(c["url.scheme"]=l.protocol.split(":").pop()),l.host&&(c["server.address"]=l.host),c["url.same_origin"]=n.includes(Ki.location.origin),function(e,t){[["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"]].forEach(([n,r])=>{const o=e[n];null!=o&&("number"==typeof o&&o<2147483647||"string"==typeof o)&&(t[r]=o)})}(t,c);const u={...c,...Qa(t)},d=s+r;Wa(e,d,d+o,{name:n.replace(Ki.location.origin,""),op:a,attributes:u})}(e,n,n.name,r,s,o,t.ignoreResourceSpans)}}),nc=Math.max(s.length-1,0),function(e){const t=Ki.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),qa(n.rtt)&&(rc["connection.rtt"]={value:n.rtt,unit:"millisecond"})),qa(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),qa(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}(e),"pageload"===i&&(function(e){const t=Gi(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}(rc),t.recordClsOnPageloadSpan||delete rc.cls,t.recordLcpOnPageloadSpan||delete rc.lcp,Object.entries(rc).forEach(([e,t])=>{!function(e,t,n,r=no()){const o=r&&to(r);o&&(_t&&Rt.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),o.addEvent(e,{[br]:t,[yr]:n}))}(e,t.value,t.unit)}),e.setAttribute("performance.timeOrigin",o),e.setAttribute("performance.activationStart",Yi()),function(e,t){ec&&t.recordLcpOnPageloadSpan&&(ec.element&&e.setAttribute("lcp.element",fn(ec.element)),ec.id&&e.setAttribute("lcp.id",ec.id),ec.url&&e.setAttribute("lcp.url",ec.url.trim().slice(0,200)),null!=ec.loadTime&&e.setAttribute("lcp.loadTime",ec.loadTime),null!=ec.renderTime&&e.setAttribute("lcp.renderTime",ec.renderTime),e.setAttribute("lcp.size",ec.size)),tc?.sources&&t.recordClsOnPageloadSpan&&tc.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,fn(t.node)))}(e,t)),ec=void 0,tc=void 0,rc={}}(t,{recordClsOnPageloadSpan:!c,recordLcpOnPageloadSpan:!l,ignoreResourceSpans:_,ignorePerformanceApiSpans:S}),Jp(e,void 0);const n=ir(),r=n.getPropagationContext();n.setPropagationContext({...r,traceId:f.spanContext().traceId,sampled:Gr(f),dsc:go(t)}),s&&(R=void 0)},trimIdleSpanEndTimestamp:!T});function g(){n&&["interactive","complete"].includes(n.readyState)&&e.emit("idleSpanEnableAutoFinish",f)}s&&T&&(R=f),Jp(e,f),s&&!T&&n&&(n.addEventListener("readystatechange",()=>{g()}),g())}return{name:"BrowserTracing",setup(e){if(function(){function e(){const e=no(),t=e&&to(e);if(t){const e="internal_error";_t&&Rt.log(`[Tracing] Root span: ${e} -> Global error occurred`),t.setStatus({code:2,message:e})}}oo||(e.tag="sentry_tracingErrorCallback",oo=!0,Zt(e),Jt(e))}(),O=function({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=Za();if(r&&qn()){r.mark&&Ki.performance.mark("sentry-tracing-init");const o=t?function(e){let t,n=0;if(!Ya("largest-contentful-paint"))return;const r=Da(({metric:e})=>{const r=e.entries[e.entries.length-1];r&&(n=e.value,t=r)},!0);Ja(e,(e,o)=>{!function(e,t,n,r){Wi&&Rt.log(`Sending LCP span (${e})`);const o=Ga((qn()||0)+(t?.startTime||0)),s=ir().getScopeData().transactionName,i=t?fn(t.element):"Largest contentful paint",a={[fr]:"auto.http.browser.lcp",[mr]:"ui.webvital.lcp",[Sr]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(a["lcp.element"]=fn(t.element)),t.id&&(a["lcp.id"]=t.id),t.url&&(a["lcp.url"]=t.url),null!=t.loadTime&&(a["lcp.loadTime"]=t.loadTime),null!=t.renderTime&&(a["lcp.renderTime"]=t.renderTime),null!=t.size&&(a["lcp.size"]=t.size));const c=Ka({name:i,transaction:s,attributes:a,startTime:o});c&&(c.addEvent("lcp",{[yr]:"millisecond",[br]:e}),c.end(o))}(n,t,o,e),r()})}(n):Da(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(rc.lcp={value:e.value,unit:"millisecond"},ec=t)},!0),s=Ba("ttfb",({metric:e})=>{e.entries[e.entries.length-1]&&(rc.ttfb={value:e.value,unit:"millisecond"})},Ha,Pa),i=e?function(e){let t,n=0;if(!Ya("layout-shift"))return;const r=Aa(({metric:e})=>{const r=e.entries[e.entries.length-1];r&&(n=e.value,t=r)},!0);Ja(e,(e,o)=>{!function(e,t,n,r){Wi&&Rt.log(`Sending CLS span (${e})`);const o=t?Ga((qn()||0)+t.startTime):Un(),s=ir().getScopeData().transactionName,i=t?fn(t.sources[0]?.node):"Layout shift",a={[fr]:"auto.http.browser.cls",[mr]:"ui.webvital.cls",[Sr]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((e,t)=>{a[`cls.source.${t+1}`]=fn(e.node)});const c=Ka({name:i,transaction:s,attributes:a,startTime:o});c&&(c.addEvent("cls",{[yr]:"",[br]:e}),c.end(o))}(n,t,o,e),r()})}(n):Aa(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(rc.cls={value:e.value,unit:""},tc=t)},!0);return()=>{o?.(),s(),i?.()}}return()=>{}}({recordClsStandaloneSpans:c||!1,recordLcpStandaloneSpans:l||!1,client:e}),r&&Za()&&qn()&&La(Oc),o&&Za()&&qn()&&Na("element",sc),i&&St.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?new PerformanceObserver(e=>{const t=no();if(t)for(const n of e.getEntries()){if(!n.scripts[0])continue;const e=Ga(qn()+n.startTime),{start_timestamp:r,op:o}=Zr(t);if("navigation"===o&&r&&e<r)continue;const s=Ga(n.duration),i={[fr]:"auto.ui.browser.metrics"},a=n.scripts[0],{invoker:c,invokerType:l,sourceURL:u,sourceFunctionName:d,sourceCharPosition:p}=a;i["browser.script.invoker"]=c,i["browser.script.invoker_type"]=l,u&&(i["code.filepath"]=u),d&&(i["code.function"]=d),-1!==p&&(i["browser.script.source_char_position"]=p),Wa(t,e,e+s,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:i})}}).observe({type:"long-animation-frame",buffered:!0}):s&&Na("longtask",({entries:e})=>{const t=no();if(!t)return;const{op:n,start_timestamp:r}=Zr(t);for(const o of e){const e=Ga(qn()+o.startTime),s=Ga(o.duration);"navigation"===n&&r&&e<r||Wa(t,e,e+s,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[fr]:"auto.ui.browser.metrics"}})}}),a&&Na("event",({entries:e})=>{const t=no();if(t)for(const n of e)if("click"===n.name){const e=Ga(qn()+n.startTime),r=Ga(n.duration),o={name:fn(n.target),op:`ui.interaction.${n.name}`,startTime:e,attributes:{[fr]:"auto.ui.browser.metrics"}},s=bn(n.target);s&&(o.attributes["ui.component_name"]=s),Wa(t,e,e+r,o)}}),E&&n){const e=()=>{P=Un()};addEventListener("click",e,{capture:!0}),addEventListener("keydown",e,{capture:!0,passive:!0})}function t(){const t=Yp(e);t&&!Zr(t).timestamp&&(Rc&&Rt.log(`[Tracing] Finishing current active span with op: ${Zr(t).op}`),t.setAttribute(gr,"cancelled"),t.end())}e.on("startNavigationSpan",(n,r)=>{if(lr()!==e)return;if(r?.isRedirect)return Rc&&Rt.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),void A(e,{op:"navigation.redirect",...n},!1);P=void 0,t(),ar().setPropagationContext({traceId:Zn(),sampleRand:Math.random(),propagationSpanId:so()?void 0:Gn()});const o=ir();o.setPropagationContext({traceId:Zn(),sampleRand:Math.random(),propagationSpanId:so()?void 0:Gn()}),o.setSDKProcessingMetadata({normalizedRequest:void 0}),A(e,{op:"navigation",...n,parentSpan:null,forceTransaction:!0})}),e.on("startPageLoadSpan",(n,r={})=>{if(lr()!==e)return;t();const o=function(e,t){const n=function(e){if(!e)return;const t=e.match(zr);if(!t)return;let n;return"1"===t[3]?n=!0:"0"===t[3]&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}(e),r=Or(t);if(!n?.traceId)return{traceId:Zn(),sampleRand:On()};const o=function(e,t){const n=$r(t?.sample_rand);if(void 0!==n)return n;const r=$r(t?.sample_rate);return r&&void 0!==e?.parentSampled?e.parentSampled?On()*r:r+On()*(1-r):On()}(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}}(r.sentryTrace||Zp("sentry-trace"),r.baggage||Zp("baggage")),s=ir();s.setPropagationContext(o),so()||(s.getPropagationContext().propagationSpanId=Gn()),s.setSDKProcessingMetadata({normalizedRequest:Di()}),A(e,{op:"pageload",...n})}),e.on("endPageloadSpan",()=>{T&&R&&(R.setAttribute(gr,"reportPageLoaded"),R.end())})},afterAllSetup(e){let n=yn();if("off"!==C&&function(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r="session-storage"===t;let o=r?function(){try{const e=Oi.sessionStorage?.getItem(Up);return JSON.parse(e)}catch{return}}():void 0;e.on("spanStart",e=>{if(to(e)!==e)return;const t=ir().getPropagationContext();o=function(e,t,n){const r=Zr(t),o={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:function(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[pr])}catch{return 0}}(),sampleRand:n.sampleRand};if(!e)return o;const s=e.spanContext;return s.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=3600&&(Rc&&Rt.log(`Adding previous_trace \`${JSON.stringify(s)}\` link to span \`${JSON.stringify({op:r.op,...t.spanContext()})}\``),t.addLink({context:s,attributes:{[wr]:"previous_trace"}}),t.setAttribute("sentry.previous_trace",`${s.traceId}-${s.spanId}-${Vp(s)?1:0}`)),o)}(o,e,t),r&&function(e){try{Oi.sessionStorage.setItem(Up,JSON.stringify(e))}catch(e){Rc&&Rt.warn("Could not store previous trace in sessionStorage",e)}}(o)});let s=!0;n&&e.on("beforeSampling",e=>{if(!o)return;const t=ir(),n=t.getPropagationContext();s&&n.parentSpanId?s=!1:(t.setPropagationContext({...n,dsc:{...n.dsc,sample_rate:String(o.sampleRate),sampled:String(Vp(o.spanContext))},sampleRand:o.sampleRand}),e.parentSampled=Vp(o.spanContext),e.parentSampleRate=o.sampleRate,e.spanAttributes={...e.spanAttributes,[hr]:o.sampleRate})})}(e,{linkPreviousTrace:C,consistentTraceSampling:x}),Oi.location){if(w){const t=qn();Wp(e,{name:Oi.location.pathname,startTime:t?t/1e3:void 0,attributes:{[dr]:"url",[fr]:"auto.pageload.browser"}})}k&&hc(({to:t,from:r})=>{if(void 0===r&&-1!==n?.indexOf(t))return void(n=void 0);n=void 0;const o=Vs(t),s=Yp(e),i=s&&E&&function(e,t){const n=Zr(e),r=Bn();return!(r-n.start_timestamp>1.5||t&&r-t<=1.5)}(s,P);Kp(e,{name:o?.pathname||Oi.location.pathname,attributes:{[dr]:"url",[fr]:"auto.navigation.browser"}},{url:t,isRedirect:i})})}m&&(Oi.document?Oi.document.addEventListener("visibilitychange",()=>{const e=no();if(!e)return;const t=to(e);if(Oi.document.hidden&&t){const e="cancelled",{op:n,status:r}=Zr(t);Rc&&Rt.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${n}`),r||t.setStatus({code:2,message:e}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):Rc&&Rt.warn("[Tracing] Could not set up background tab detection due to lack of global document")),a&&function(e,t,n,r,o){let s;Oi.document&&addEventListener("click",()=>{const i="ui.action.click",a=Yp(e);if(a){const e=Zr(a).op;if(["navigation","pageload"].includes(e))return void(Rc&&Rt.warn(`[Tracing] Did not create ${i} span because a pageload or navigation span is in progress.`))}s&&(s.setAttribute(gr,"interactionInterrupted"),s.end(),s=void 0),o.name?s=qo({name:o.name,op:i,attributes:{[dr]:o.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r}):Rc&&Rt.warn(`[Tracing] Did not create ${i} transaction because _latestRouteName is missing.`)},{capture:!0})}(e,d,p,h,t),r&&function(){const e=Object.keys(Mc);function t(e){const t=e.target;if(!t)return;const n=fn(t),r=Math.round(e.timeStamp);if(Ic.set(r,n),Ic.size>50){const e=Ic.keys().next().value;void 0!==e&&Ic.delete(e)}}Mi()&&e.forEach(e=>{Ki.addEventListener(e,t,{capture:!0,passive:!0})});const n=({entries:e})=>{const t=no(),n=t&&to(t);e.forEach(e=>{if(!function(e){return"duration"in e}(e))return;const t=e.interactionId;if(null==t)return;if(Tc.has(t))return;const r=e.target?fn(e.target):function(e){const t=Math.round(e.startTime);let n=Ic.get(t);if(!n)for(let e=-5;e<=5;e++){const r=Ic.get(t+e);if(r){n=r;break}}return n||"<unknown>"}(e);if(xc.length>10){const e=xc.shift();Tc.delete(e)}xc.push(t),Tc.set(t,{span:n,elementName:r})})};Na("event",n),Na("first-input",n)}(),function(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:o,shouldCreateSpanForRequest:s,enableHTTPTimings:i,tracePropagationTargets:a,onRequestSpanStart:c,onRequestSpanEnd:l}={...Fp,...t},u="function"==typeof s?s:e=>!0,d=e=>function(e,t){const n=yn();if(n){let r,o;try{r=new URL(e,n),o=new URL(n).origin}catch{return!1}const s=r.origin===o;return t?Ln(r.toString(),t)||s&&Ln(r.pathname,t):s}{const n=!!e.match(/^\/(?!\/)/);return t?Ln(e,t):n}}(e,a),p={},h=e.getOptions().propagateTraceparent;n&&(e.addEventProcessor(e=>("transaction"===e.type&&e.spans&&e.spans.forEach(e=>{if("http.client"===e.op){const t=Hp.get(e.span_id);t&&(e.timestamp=t/1e3,Hp.delete(e.span_id))}}),e)),o&&function(){const e="fetch-body-resolved";Vt(e,e=>{if(e.response){const t=zp.get(e.response);t&&e.endTimestamp&&Hp.set(t,e.endTimestamp)}}),qt(e,()=>Ei(Ci))}(),ki(e=>{const t=function(e,t,n,r,o){if(!e.fetchData)return;const{method:s,url:i}=e.fetchData,a=so()&&t(i);if(e.endTimestamp&&a){const t=e.fetchData.__span;if(!t)return;const n=r[t];return void(n&&(function(e,t){if(t.response){kr(e,t.response.status);const n=t.response?.headers?.get("content-length");if(n){const t=parseInt(n);t>0&&e.setAttribute("http.response_content_length",t)}}else t.error&&e.setStatus({code:2,message:"internal_error"});e.end()}(n,e),function(e,t,n){const r="object"==typeof n&&null!==n?n.onRequestSpanEnd:void 0;r?.(e,{headers:t.response?.headers,error:t.error})}(n,e,o),delete r[t]))}const{spanOrigin:c="auto.http.browser",propagateTraceparent:l=!1}=o,u=!!no(),d=a&&u?jo(function(e,t,n){if(e.startsWith("data:"))return{name:`${t} ${Ws(e)}`,attributes:vi(e,void 0,t,n)};const r=Vs(e);return{name:`${t} ${r?function(e){if(Us(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()}(r):e}`,attributes:vi(e,r,t,n)}}(i,s,c)):new yo;if(e.fetchData.__span=d.spanContext().spanId,r[d.spanContext().spanId]=d,n(e.fetchData.url)){const t={...e.args[1]||{}},n=function(e,t,n,r){const o=Ys({span:n,propagateTraceparent:r}),s=o["sentry-trace"],i=o.baggage,a=o.traceparent;if(!s)return;const c=t.headers||(hn(e)?e.headers:void 0);if(c){if(function(e){return"undefined"!=typeof Headers&&dn(e,Headers)}(c)){const e=new Headers(c);if(e.get("sentry-trace")||e.set("sentry-trace",s),r&&a&&!e.get("traceparent")&&e.set("traceparent",a),i){const t=e.get("baggage");t?bi(t)||e.set("baggage",`${t},${i}`):e.set("baggage",i)}return e}if(Array.isArray(c)){const e=[...c];c.find(e=>"sentry-trace"===e[0])||e.push(["sentry-trace",s]),r&&a&&!c.find(e=>"traceparent"===e[0])&&e.push(["traceparent",a]);const t=c.find(e=>"baggage"===e[0]&&bi(e[1]));return i&&!t&&e.push(["baggage",i]),e}{const e="sentry-trace"in c?c["sentry-trace"]:void 0,t="traceparent"in c?c.traceparent:void 0,n="baggage"in c?c.baggage:void 0,o=n?Array.isArray(n)?[...n]:[n]:[],l=n&&(Array.isArray(n)?n.find(e=>bi(e)):bi(n));i&&!l&&o.push(i);const u={...c,"sentry-trace":e??s,baggage:o.length>0?o.join(","):void 0};return r&&a&&!t&&(u.traceparent=a),u}}return{...o}}(e.args[0],t,so()&&u?d:void 0,l);n&&(e.args[1]=t,t.headers=n)}const p=lr();return p&&p.emit("beforeOutgoingRequestSpan",d,{input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp}),d}(e,u,d,p,{propagateTraceparent:h,onRequestSpanEnd:l});if(e.response&&e.fetchData.__span&&zp.set(e.response,e.fetchData.__span),t){const n=jp(e.fetchData.url),r=n?qs(n).host:void 0;t.setAttributes({"http.url":n?Ws(n):void 0,"server.address":r}),i&&Bp(t),c?.(t,{headers:e.headers})}})),r&&vc(e=>{const t=function(e,t,n,r,o,s){const i=e.xhr,a=i?.[bc];if(!i||i.__sentry_own_request__||!a)return;const{url:c,method:l}=a,u=so()&&t(c);if(e.endTimestamp&&u){const t=i.__sentry_xhr_span_id__;if(!t)return;const n=r[t];return void(n&&void 0!==a.status_code&&(kr(n,a.status_code),n.end(),s?.(n,{headers:$p(Cc(i)),error:e.error}),delete r[t]))}const d=jp(c),p=qs(d||c),h=Ws(c.split(/[?#]/,1)[0]),m=!!no(),f=u&&m?jo({name:`${l} ${h}`,attributes:{url:Ws(c),type:"xhr","http.method":l,"http.url":d?Ws(d):void 0,"server.address":p?.host,[fr]:"auto.http.browser",[mr]:"http.client",...p?.search&&{"http.query":p?.search},...p?.hash&&{"http.fragment":p?.hash}}}):new yo;i.__sentry_xhr_span_id__=f.spanContext().spanId,r[i.__sentry_xhr_span_id__]=f,n(c)&&function(e,t,n){const{"sentry-trace":r,baggage:o,traceparent:s}=Ys({span:t,propagateTraceparent:n});r&&function(e,t,n,r){const o=e.__sentry_xhr_v3__?.request_headers;if(!o?.["sentry-trace"]&&e.setRequestHeader)try{if(e.setRequestHeader("sentry-trace",t),r&&!o?.traceparent&&e.setRequestHeader("traceparent",r),n){const t=o?.baggage;t&&t.split(",").some(e=>e.trim().startsWith("sentry-"))||e.setRequestHeader("baggage",n)}}catch{}}(e,r,o,s)}(i,so()&&m?f:void 0,o);const g=lr();return g&&g.emit("beforeOutgoingRequestSpan",f,e),f}(e,u,d,p,h,l);t&&(i&&Bp(t),c?.(t,{headers:$p(e.xhr.__sentry_xhr_v3__?.request_headers)}))})}(e,{traceFetch:f,traceXHR:g,trackFetchStreamPerformance:y,tracePropagationTargets:e.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:b,enableHTTPTimings:v,onRequestSpanStart:I,onRequestSpanEnd:M})}}})({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{useEffect:r,useLocation:o,useNavigationType:s,createRoutesFromChildren:i,matchRoutes:a,stripBasename:c,enableAsyncRouteHandlers:l=!1,instrumentPageLoad:u=!0,instrumentNavigation:d=!0,lazyRouteTimeout:p}=e;return{...n,setup(t){n.setup(t);const l=e.finalTimeout??3e4,u=3*(e.idleTimeout??1e3),d=p??u;Infinity===d?($h=l,hh&&Rt.log("[React Router] lazyRouteTimeout set to Infinity, capping at finalTimeout:",l,"ms to prevent indefinite hangs")):Number.isNaN(d)?(hh&&Rt.warn("[React Router] lazyRouteTimeout must be a number, falling back to default:",u),$h=u):d<0?(hh&&Rt.warn("[React Router] lazyRouteTimeout must be non-negative or Infinity, got:",d,"falling back to:",u),$h=u):$h=d,yh=r,bh=o,vh=s,Sh=a,_h=i,function(e,t=!1){gh=e,wh=t}(a,c||!1)},afterAllSetup(e){n.afterAllSetup(e);const r=Oi.location?.pathname;u&&r&&Wp(e,{name:r,attributes:{[dr]:"url",[mr]:"pageload",[fr]:`auto.pageload.react.reactrouter_v${t}`}}),d&&zh.add(e)}}}function qh(e){e.forEach(e=>{Wh(e).forEach(e=>{Fh.add(e)})})}function Wh(e,t=new Set){return t.has(e)||(t.add(e),e.children&&!e.index&&e.children.forEach(e=>{Wh(e,t).forEach(e=>{t.add(e)})})),t}function Kh(e,t,n,r,o,s,i,a){try{const c=t.data?.[dr];if("route"===c&&n&&!Th(n))return;const l=Array.from(a),u=l.length>0?l:o,d=Sh(u,r,s);if(!d)return;const[p,h]=Nh(r,u,u,d,s),m=function(e,t,n,r,o=!1){return!!n&&(!(e||!o)||!(!e||!Th(e)||"route"!==r||Th(n))||"route"!==t&&"route"===r)}(n,c,p,h,!0);m&&("pageload"===i||!t.timestamp)&&(e.updateName(p),e.setAttribute(dr,h))}catch(e){hh&&Rt.warn(`Error updating span details before ending: ${e}`)}}function Zh(e,t,n,r,o){const s=`__sentry_${o}_end_patched__`,i=e?.[s];if(i||!e.end)return;const a=e.end.bind(e);let c=!1;e.end=function(...s){if(c)return;c=!0;const i=s.length>0?s[0]:Date.now()/1e3,l=Zr(e),u=l.description,d=l.data?.[dr],p=()=>{const t=lr();if(t&&"navigation"===o){const n=Hh.get(t);n&&n.span===e&&Hh.delete(t)}},h=Bh.get(e);if((h&&h.size>0||e.__sentry_may_have_lazy_routes__)&&u&&(Th(u)||"route"!==d)){if(0===$h)return Kh(e,l,u,t,n,r,o,Fh),p(),void a(i);const s=new Promise(e=>setTimeout(e,$h));let c;if(h&&h.size>0){const e=Promise.allSettled(h).then(()=>{});c=Infinity===$h?e:Promise.race([e,s])}else c=s;return void c.then(()=>{const s=Zr(e);Kh(e,s,s.description,t,n,r,o,Fh),p(),a(i)}).catch(()=>{p(),a(i)})}Kh(e,l,u,t,n,r,o,Fh),p(),a(i)},_n(e,s,!0)}const Gh={no_permission:"primary.main",expired:"error.main",not_purchased:"primary.main"},Yh={dialog:{".MuiPaper-root":{borderRadius:"6px"}},dialogContent:{padding:0},container:{display:"flex",flexDirection:"column",alignItems:"center",gap:3,padding:4,background:e=>e.palette.gradient.dark.main},stepper:{width:"100%"},disclaimer:{marginTop:2,color:"warning.main"},actions:{marginTop:2}},Jh={feature_access:{translationKey:"featureAccess",steps:["step1","step2","step3"],showDisclaimer:!0},trial_expired:{translationKey:"trialExpired",steps:["step1","step2","step3","step4"],showDisclaimer:!0},purchase:{translationKey:"purchase",steps:["step1","step2","step3","step4"],showDisclaimer:!0},wishlist:{translationKey:"wishlist",steps:["step1","step2","step3","step4"],showDisclaimer:!0},start_trial:{translationKey:"startTrial",steps:[],showDisclaimer:!1}},Xh=e=>{let{open:n,requestType:r,onSubmitRequest:o,onClose:i}=e;const{t:a}=t.useTranslation(),c=Jh[r]||Jh.feature_access,{translationKey:l,steps:u,showDisclaimer:d}=c;/*#__PURE__*/return q.default.createElement(s.Dialog,{open:n,onClose:i,sx:Yh.dialog},/*#__PURE__*/q.default.createElement(s.DialogTitle,null,a("access.modal."+l+".header")),/*#__PURE__*/q.default.createElement(s.DialogContent,{sx:Yh.dialogContent},/*#__PURE__*/q.default.createElement(s.Box,{sx:Yh.container},"start_trial"===r?/*#__PURE__*/q.default.createElement(s.Typography,{variant:"body1",sx:Yh.content},a("access.modal.startTrial.content")):0===u.length?null:/*#__PURE__*/q.default.createElement(s.Stepper,{orientation:"vertical",sx:Yh.stepper},u.map(e=>/*#__PURE__*/q.default.createElement(s.Step,{key:e,active:!0},/*#__PURE__*/q.default.createElement(s.StepLabel,null,a("access.modal."+l+"."+e))))),d&&/*#__PURE__*/q.default.createElement(s.Alert,{severity:"warning",variant:"outlined",sx:Yh.disclaimer},a("access.modal.disclaimer")),/*#__PURE__*/q.default.createElement(s.Stack,{direction:"row",spacing:2,sx:Yh.actions},/*#__PURE__*/q.default.createElement(s.Button,{variant:"contained",onClick:o},a("access.modal."+l+".button")),/*#__PURE__*/q.default.createElement(s.Button,{variant:"outlined",onClick:i},a("access.modal.cancel"))))))},Qh={dialog:{".MuiPaper-root":{borderRadius:"6px"}},dialogContent:{padding:0},container:{display:"flex",flexDirection:"column",alignItems:"center",gap:3,padding:4,background:e=>e.palette.gradient.dark.main},content:{marginTop:1,marginBottom:3,textAlign:"center"},actions:{display:"flex",justifyContent:"center"}},em=e=>{let{open:n,daysRemaining:r,onClose:o}=e;const{t:i}=t.useTranslation();/*#__PURE__*/return q.default.createElement(s.Dialog,{open:n,onClose:o,sx:Qh.dialog},/*#__PURE__*/q.default.createElement(s.DialogTitle,null,i("access.cooldown.header")),/*#__PURE__*/q.default.createElement(s.DialogContent,{sx:Qh.dialogContent},/*#__PURE__*/q.default.createElement(s.Box,{sx:Qh.container},/*#__PURE__*/q.default.createElement(s.Typography,{variant:"body1",sx:Qh.content},i("access.cooldown.message",{days:r})),/*#__PURE__*/q.default.createElement(s.Box,{sx:Qh.actions},/*#__PURE__*/q.default.createElement(s.Button,{variant:"contained",onClick:o},i("access.cooldown.button"))))))},tm={no_permission:K.default,expired:W.default,not_purchased:Z.default},nm=n=>{let{accessState:r,buttons:o=[],daysSinceExpiry:i,featureKey:a,workplaceId:c,cooldownInfo:l={},onTrialRequest:u,onFeatureRequest:d}=n;const{t:p}=t.useTranslation(),[h,m]=e.useState(!1),[f,g]=e.useState(!1),[y,b]=e.useState(0),[v,_]=e.useState(null),S=(e=>{const t=Gh[e]||"primary.main";return{container:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:3,width:"100%",height:"100%",padding:4,textAlign:"center",background:e=>e.palette.gradient.dark.main},icon:{fontSize:48,color:t},buttonsContainer:{display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"center",gap:2},primaryButton:{backgroundColor:t},secondaryButton:{},linkButton:{cursor:"pointer",color:"primary.light"}}})(r),w=tm[r]||K.default,k=e=>{var t;if(e.requestType&&null!=(t=l[e.requestType])&&t.isInCooldown)return b(l[e.requestType].daysRemaining),void g(!0);_(e),m(!0)},E=e=>{const t="access.toast."+e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase());vt.success(p(t))};/*#__PURE__*/return q.default.createElement(q.default.Fragment,null,/*#__PURE__*/q.default.createElement(s.Box,{sx:S.container},/*#__PURE__*/q.default.createElement(s.Tooltip,{title:(()=>{switch(r){case"no_permission":return p("access.noPermission.tooltip");case"expired":return p("access.expired.tooltip");case"not_purchased":return p("access.notPurchased.tooltip");default:return""}})()},/*#__PURE__*/q.default.createElement(w,{sx:S.icon})),/*#__PURE__*/q.default.createElement(s.Typography,{variant:"body1"},(()=>{switch(r){case"no_permission":return p("access.noPermission.message");case"expired":return null!=i&&i<90?p("access.expired.message",{days:i}):p(null!=i&&i>=180?"access.expired.messageVeryOld":"access.expired.messageOld");case"not_purchased":return p("access.notPurchased.message");default:return""}})()),0===o.length?null:/*#__PURE__*/q.default.createElement(s.Box,{sx:S.buttonsContainer},o.map(e=>{const t=(e=>{switch(e){case"start_trial":return p("access.notPurchased.button.try");case"request_access":return p("access.noPermission.button.requestAccess");case"renew":return p("access.expired.button.renewSubscription");case"buy":return p("access.notPurchased.button.buy");case"wishlist":return p("access.notPurchased.button.wishlist");default:return""}})(e.action);if("link"===e.variant)/*#__PURE__*/return q.default.createElement(s.Link,{key:e.action,component:"button",variant:"body2",sx:S.linkButton,onClick:()=>k(e)},t);const n="primary"===e.variant;/*#__PURE__*/return q.default.createElement(s.Button,{key:e.action,variant:n?"contained":"outlined",sx:n?S.primaryButton:S.secondaryButton,onClick:()=>k(e)},t)}))),/*#__PURE__*/q.default.createElement(Xh,{open:h,requestType:"start_trial"===(null==v?void 0:v.action)?"start_trial":null==v?void 0:v.requestType,onSubmitRequest:function(){try{function e(){_(null)}m(!1);let t=!1;const n=function(){if("start_trial"===(null==v?void 0:v.action))return Promise.resolve(u(a)).then(function(e){t=e,t&&E("start_trial")});{const e=function(){if(null!=v&&v.requestType)return Promise.resolve(d({featureKey:a,requestType:v.requestType,workplaceId:c})).then(function(e){t=e,t&&E(v.requestType)})}();if(e&&e.then)return e.then(function(){})}}();return Promise.resolve(n&&n.then?n.then(e):e())}catch(r){return Promise.reject(r)}},onClose:()=>{m(!1),_(null)}}),/*#__PURE__*/q.default.createElement(em,{open:f,daysRemaining:y,onClose:()=>{g(!1)}}))};var rm=new class{constructor(){this.currentUser=null,this.permissionsMap=null,this.featuresMap=null,this.featuresRequestsMap=null,i.makeObservable(this,{currentUser:i.observable.deep,permissionsMap:i.observable.deep,featuresMap:i.observable.deep,featuresRequestsMap:i.observable.deep,setCurrentUser:i.action,removeCurrentUser:i.action,setPermissionsMap:i.action,setFeaturesMap:i.action,setFeaturesRequestsMap:i.action,getCurrentUserJS:i.computed})}setCurrentUser(e){this.currentUser=e,e&&(this.setPermissionsMap(e.permissionsMap),this.setFeaturesMap(e.featuresMap),this.setFeaturesRequestsMap(e.featuresRequestsMap))}removeCurrentUser(){this.currentUser=null,this.permissionsMap=null,this.featuresMap=null,this.featuresRequestsMap=null}setPermissionsMap(e){this.permissionsMap=e}setFeaturesMap(e){this.featuresMap=e}setFeaturesRequestsMap(e){this.featuresRequestsMap=e}get getCurrentUserJS(){return i.toJS(this.currentUser)}};const om=e=>e?{lastRequestedAt:e.last_requested_at,daysRemaining:e.days_remaining}:null,sm=e=>{if(!e)return null;const t={};for(const[n,r]of Object.entries(e)){t[n]={};for(const[e,o]of Object.entries(r)){t[n][e]={};for(const[r,s]of Object.entries(o))t[n][e][r]=om(s)}}return t},im=(e,t,n,r)=>{var o;if(!e||!t||!n)return{isInCooldown:!1,daysRemaining:0};const s=null==(o=e[r||"company"])||null==(o=o[t])?void 0:o[n];return s?{isInCooldown:s.daysRemaining>0,daysRemaining:s.daysRemaining}:{isInCooldown:!1,daysRemaining:0}},am=()=>{const[t,n]=e.useState(i.toJS(rm.featuresMap));e.useEffect(()=>i.reaction(()=>i.toJS(rm.featuresMap),e=>{n(e)}),[]);const r=e.useCallback(e=>t&&t[e]||null,[t]),o=e.useCallback(e=>e.reduce((e,t)=>(e[t]=r(t),e),{}),[r]);return e.useMemo(()=>({getFeature:r,getFeatures:o,featuresMap:t}),[r,o,t])},cm=()=>{const[t,n]=e.useState(i.toJS(rm.permissionsMap));e.useEffect(()=>i.reaction(()=>i.toJS(rm.permissionsMap),e=>{n(e)}),[]);const r=e.useCallback(e=>{return t?(n=t[e])&&"ALLOW"!==n?{isAllowed:!1,denyReason:n.startsWith("DENY:")?n.slice(5):n}:{isAllowed:!0,denyReason:null}:{isAllowed:!1,denyReason:null};var n},[t]),o=e.useCallback(e=>{const t=e.reduce((e,t)=>(e[t]=r(t),e),{}),n=e.filter(e=>!t[e].isAllowed);return{allAllowed:0===n.length,results:t,deniedKeys:n}},[r]);return e.useMemo(()=>({checkPermission:r,checkPermissions:o,permissionsMap:t}),[r,o,t])},lm={no_permission:1,expired:2,not_purchased:3,accessible:4},um=(e,t)=>{switch(e){case"accessible":return[];case"no_permission":return[{action:"request_access",requestType:"feature_access",variant:"primary"}];case"trial_expired_recent":return[{action:"renew",requestType:"trial_expired",variant:"primary"},{action:"wishlist",requestType:"wishlist",variant:"link"}];case"trial_expired_old":return t>=180?[{action:"start_trial",requestType:null,variant:"primary"},{action:"buy",requestType:"purchase",variant:"secondary"},{action:"wishlist",requestType:"wishlist",variant:"link"}]:[{action:"renew",requestType:"trial_expired",variant:"primary"},{action:"wishlist",requestType:"wishlist",variant:"link"}];default:return[{action:"start_trial",requestType:null,variant:"primary"},{action:"buy",requestType:"purchase",variant:"secondary"},{action:"wishlist",requestType:"wishlist",variant:"link"}]}},dm=function(t,n){void 0===t&&(t=[]),void 0===n&&(n={});const{extraPermissions:r=[],workplaceId:o}=n,{getFeature:s}=am(),{checkPermissions:a}=cm(),[c,l]=e.useState(i.toJS(rm.featuresRequestsMap));return e.useEffect(()=>i.reaction(()=>i.toJS(rm.featuresRequestsMap),e=>{l(e)}),[]),e.useMemo(()=>{const e=t.map(e=>{const t=s(e);if(!t)return{featureKey:e,hasAccess:!1,accessState:"not_purchased",daysSinceExpiry:null,buttons:um("not_purchased",null)};const n=(e=>{switch(e){case"accessible":return"accessible";case"no_permission":return"no_permission";case"trial_expired_recent":case"trial_expired_old":return"expired";default:return"not_purchased"}})(t.status);return{featureKey:e,hasAccess:"accessible"===n,accessState:n,daysSinceExpiry:t.daysSinceExpiry,buttons:um(t.status,t.daysSinceExpiry)}}),n=e.reduce((e,t)=>lm[t.accessState]<lm[e]?t.accessState:e,"accessible"),i=a(r),l=t.flatMap(e=>{const t=s(e);return(null==t?void 0:t.permissions)||[]}),u=a([...l,...r]),d="accessible"===n&&i.allAllowed,p=e.reduce((e,t)=>lm[t.accessState]<lm[(null==e?void 0:e.accessState)||"accessible"]?t:e,e[0]),h=(null==p?void 0:p.buttons)||[],m=((e,t,n,r)=>{const o={};for(const s of n)s.requestType&&(o[s.requestType]=im(e,t,s.requestType,r));return o})(c,null==p?void 0:p.featureKey,h,o);return{hasAccess:d,accessState:d?"accessible":n,features:e,buttons:h,cooldownInfo:m,missingPermissions:u.deniedKeys}},[t,r,o,s,a,c])};function pm(){return pm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pm.apply(null,arguments)}const hm=["onTrialRequest","onFeatureRequest"];var mm,fm=(mm=/*#__PURE__*/Object.defineProperty({default:function(e){console.warn("[react-gtm]",e)}},"__esModule",{value:!0}))&&mm.__esModule?mm:{default:mm},gm=function(e){return e&&e.__esModule?e:{default:e}}({tags:function(e){var t=e.id,n=e.events,r=e.dataLayer,o=e.dataLayerName,s=">m_auth="+e.auth,i=">m_preview="+e.preview;return t||(0,fm.default)("GTM Id is required"),{iframe:'\n <iframe src="https://www.googletagmanager.com/ns.html?id='+t+s+i+'>m_cookies_win=x"\n height="0" width="0" style="display:none;visibility:hidden" id="tag-manager"></iframe>',script:"\n (function(w,d,s,l,i){w[l]=w[l]||[];\n w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js', "+JSON.stringify(n).slice(1,-1)+"});\n var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';\n j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl+'"+s+i+">m_cookies_win=x';\n f.parentNode.insertBefore(j,f);\n })(window,document,'script','"+o+"','"+t+"');",dataLayerVar:this.dataLayer(r,o)}},dataLayer:function(e,t){return"\n window."+t+" = window."+t+" || [];\n window."+t+".push("+JSON.stringify(e)+")"}}),ym=function(e){return e&&e.__esModule?e:{default:e}}({dataScript:function(e){var t=document.createElement("script");return t.innerHTML=e,t},gtm:function(e){var t=gm.default.tags(e);return{noScript:function(){var e=document.createElement("noscript");return e.innerHTML=t.iframe,e},script:function(){var e=document.createElement("script");return e.innerHTML=t.script,e},dataScript:this.dataScript(t.dataLayerVar)}},initialize:function(e){var t=e.events,n=e.dataLayer,r=e.dataLayerName,o=e.auth,s=e.preview,i=this.gtm({id:e.gtmId,events:void 0===t?{}:t,dataLayer:n||void 0,dataLayerName:void 0===r?"dataLayer":r,auth:void 0===o?"":o,preview:void 0===s?"":s});n&&document.head.appendChild(i.dataScript),document.head.insertBefore(i.script(),document.head.childNodes[0]),document.body.insertBefore(i.noScript(),document.body.childNodes[0])},dataLayer:function(e){var t=e.dataLayer,n=e.dataLayerName,r=void 0===n?"dataLayer":n;if(window[r])return window[r].push(t);var o=gm.default.dataLayer(t,r),s=this.dataScript(o);document.head.insertBefore(s,document.head.childNodes[0])}}),bm=ym.default;const{slice:vm,forEach:_m}=[],Sm=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,wm={create(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+60*n*1e3)),r&&(o.domain=r),document.cookie=function(e,t){const n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"};let r=`${e}=${encodeURIComponent(t)}`;if(n.maxAge>0){const e=n.maxAge-0;if(Number.isNaN(e))throw new Error("maxAge should be a Number");r+=`; Max-Age=${Math.floor(e)}`}if(n.domain){if(!Sm.test(n.domain))throw new TypeError("option domain is invalid");r+=`; Domain=${n.domain}`}if(n.path){if(!Sm.test(n.path))throw new TypeError("option path is invalid");r+=`; Path=${n.path}`}if(n.expires){if("function"!=typeof n.expires.toUTCString)throw new TypeError("option expires is invalid");r+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(r+="; HttpOnly"),n.secure&&(r+="; Secure"),n.sameSite)switch("string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:r+="; SameSite=Strict";break;case"lax":r+="; SameSite=Lax";break;case"strict":r+="; SameSite=Strict";break;case"none":r+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(r+="; Partitioned"),r}(e,t,o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let e=0;e<n.length;e++){let r=n[e];for(;" "===r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf(t))return r.substring(t.length,r.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var km={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&"undefined"!=typeof document)return wm.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:s}=t;n&&"undefined"!=typeof document&&wm.create(n,e,r,o,s)}},Em={name:"querystring",lookup(e){let t,{lookupQuerystring:n}=e;if("undefined"!=typeof window){let{search:e}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(e=window.location.hash.substring(window.location.hash.indexOf("?")));const r=e.substring(1).split("&");for(let e=0;e<r.length;e++){const o=r[e].indexOf("=");o>0&&r[e].substring(0,o)===n&&(t=r[e].substring(o+1))}}return t}},Cm={name:"hash",lookup(e){let t,{lookupHash:n,lookupFromHashIndex:r}=e;if("undefined"!=typeof window){const{hash:e}=window.location;if(e&&e.length>2){const o=e.substring(1);if(n){const e=o.split("&");for(let r=0;r<e.length;r++){const o=e[r].indexOf("=");o>0&&e[r].substring(0,o)===n&&(t=e[r].substring(o+1))}}if(t)return t;if(!t&&r>-1){const t=e.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(t))return;const n="number"==typeof r?r:0;return t[n]?.replace("/","")}}}return t}};let xm=null;const Tm=()=>{if(null!==xm)return xm;try{if(xm="undefined"!=typeof window&&null!==window.localStorage,!xm)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){xm=!1}return xm};var Im={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&Tm())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&Tm()&&window.localStorage.setItem(n,e)}};let Mm=null;const Om=()=>{if(null!==Mm)return Mm;try{if(Mm="undefined"!=typeof window&&null!==window.sessionStorage,!Mm)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){Mm=!1}return Mm};var Pm={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Om())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Om()&&window.sessionStorage.setItem(n,e)}},Rm={name:"navigator",lookup(e){const t=[];if("undefined"!=typeof navigator){const{languages:e,userLanguage:n,language:r}=navigator;if(e)for(let n=0;n<e.length;n++)t.push(e[n]);n&&t.push(n),r&&t.push(r)}return t.length>0?t:void 0}},Am={name:"htmlTag",lookup(e){let t,{htmlTag:n}=e;const r=n||("undefined"!=typeof document?document.documentElement:null);return r&&"function"==typeof r.getAttribute&&(t=r.getAttribute("lang")),t}},Dm={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if("undefined"==typeof window)return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(n))return;const r="number"==typeof t?t:0;return n[r]?.replace("/","")}},Lm={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n="number"==typeof t?t+1:1,r="undefined"!=typeof window&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let Nm=!1;try{document,Nm=!0}catch(Ye){}const jm=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Nm||jm.splice(1,1);class $m{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},this.options=function(e){return _m.call(vm.call(arguments,1),t=>{if(t)for(const n in t)void 0===e[n]&&(e[n]=t[n])}),e}(e,this.options||{},{order:jm,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=e=>e.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=t,this.addDetector(km),this.addDetector(Em),this.addDetector(Im),this.addDetector(Pm),this.addDetector(Rm),this.addDetector(Am),this.addDetector(Dm),this.addDetector(Lm),this.addDetector(Cm)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=[];return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order).forEach(t=>{if(this.detectors[t]){let n=this.detectors[t].lookup(this.options);n&&"string"==typeof n&&(n=[n]),n&&(e=e.concat(n))}}),e=e.filter(e=>{return null!=e&&!("string"==typeof(t=e)&&[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(e=>e.test(t)));var t}).map(e=>this.options.convertDetectedLanguage(e)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?e:e.length>0?e[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)}))}}function zm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}$m.type="languageDetector",X.default.use($m).use(t.initReactI18next).init({detection:{convertDetectedLanguage:e=>e.split("-")[0]},resources:{en:{translation:{release:"Release",forbiddenErrorMessage:"You are not authorized to perform this operation",somethingWentWrongMessage:"Oops... something went wrong",changeLanguageText:"Change language to Polish",headerLoginButton:"Sign in",headerLogoutButton:"Sign out",loginCardTitle:"Sign in",loginFormText:"Fill both fields in order to log in to the system",loginCardCancelButton:"Cancel",loginCardSubmitButton:"Sign in",loginCardUsernameHint:"Username",loginCardPasswordHint:"Password",networkErrorHeader:"Connection issue detected",networkErrorButtonText:"Reload the page",newVersionAvailable:"New version available, the application will refresh in few seconds...",access:{noPermission:{message:"This feature is available for your company, but you don't have permissions to use it",tooltip:"No permissions",button:{requestAccess:"Request access"}},expired:{message:"Access to this feature expired {{days}} days ago, you can request renewal",messageOld:"Access to this feature has expired, you can request renewal",messageVeryOld:"Access to this feature has expired, if you need it, you can request a purchase or start a trial",tooltip:"Subscription expired",button:{renewSubscription:"Renew subscription",buy:"Buy",wishlist:"Add to wishlist"}},notPurchased:{message:"This feature has not been purchased by your company, you can request a purchase or start a trial",tooltip:"Feature not purchased",button:{try:"Try",buy:"Buy",wishlist:"Add to wishlist"}},modal:{featureAccess:{header:"Request access",step1:"Report access need - click the button below to submit your request",step2:"Manager will review - your request will be sent to your supervisor for evaluation",step3:"Permissions granted - your supervisor or administrator will assign you appropriate permissions",button:"Submit request"},trialExpired:{header:"Renew subscription",step1:"Report renewal need - click the button below to submit your request",step2:"Manager will review - your request will be sent to your supervisor for business evaluation",step3:"Request goes to AndonCloud - after manager approval, AndonCloud team will check renewal options",step4:"Feature activation - AndonCloud will renew the subscription for your organization",button:"Submit request"},purchase:{header:"Purchase feature",step1:"Report purchase need - click the button below to submit your request",step2:"Manager will review - your request will be sent to your supervisor for business evaluation",step3:"Request goes to AndonCloud - after manager approval, AndonCloud team will check activation options",step4:"Feature activation - AndonCloud will enable the feature for your organization",button:"Submit request"},startTrial:{header:"Start trial period",content:"By clicking the button below, we will start a 30-day trial period for your entire organization. During this time, all users will have full access to this feature.",button:"Start trial"},wishlist:{header:"Add to wishlist",step1:"Report need - click the button below to submit your request",step2:"Manager will review - your request will be sent to your supervisor for business evaluation",step3:"Request goes to AndonCloud - after manager approval, AndonCloud team will check activation options",step4:"Feature activation - AndonCloud will enable the feature for your organization",button:"Submit request"},disclaimer:"This is a request, not an immediate purchase. Your supervisor will assess the business justification and make a decision.",cancel:"Cancel"},cooldown:{header:"Request already sent",message:"Your request has already been sent and is awaiting review. You can send another request in {{days}} days.",button:"I understand"},toast:{featureAccess:"Your access request has been sent to your supervisor.",trialExpired:"Thank you for your request. Your subscription renewal request has been sent to your supervisor.",purchase:"Thank you for your request. Your purchase request has been sent to your supervisor.",wishlist:"Thank you for your request. Your request has been sent to your supervisor.",startTrial:"Thank you for starting the trial period. For the next 30 days, you can use all features for free. We will inform you about available options when it ends."}}}},pl:{translation:{release:"Wydanie",forbiddenErrorMessage:"Nie masz uprawnień do wykonania tej operacji",somethingWentWrongMessage:"Ups... coś poszło nie tak",changeLanguageText:"Zmiana języka na Angielski",headerLoginButton:"Zaloguj się",headerLogoutButton:"Wyloguj",loginCardTitle:"Logowanie",loginFormText:"Wypełnij oba pola w celu zalogowania do systemu",loginCardCancelButton:"Anuluj",loginCardSubmitButton:"Zaloguj",loginCardUsernameHint:"Użytkownik",loginCardPasswordHint:"Hasło",networkErrorHeader:"Błąd połączenia",networkErrorButtonText:"Odśwież stronę",newVersionAvailable:"Dostępna jest nowa wersja, za kilka sekund nastąpi odświeżenie aplikacji...",access:{noPermission:{message:"Ta funkcja jest dostępna dla Twojej firmy, niestety nie masz uprawnień aby z niej korzystać",tooltip:"Brak uprawnień",button:{requestAccess:"Poproś o przyznanie uprawnień"}},expired:{message:"Dostęp do tej funkcji wygasł {{days}} dni temu, możesz poprosić o odnowienie",messageOld:"Dostęp do tej funkcji wygasł, możesz poprosić o odnowienie",messageVeryOld:"Dostęp do tej funkcji wygasł, jeśli jej potrzebujesz, możesz poprosić o zakup lub uruchomić okres próbny",tooltip:"Subskrypcja wygasła",button:{renewSubscription:"Subskrybuj ponownie",buy:"Kup",wishlist:"Dodaj do listy życzeń"}},notPurchased:{message:"Ta funkcja nie została wykupiona w Twojej firmie, możesz poprosić o zakup lub uruchomić okres próbny",tooltip:"Funkcja nie została wykupiona",button:{try:"Wypróbuj",buy:"Kup",wishlist:"Dodaj do listy życzeń"}},modal:{featureAccess:{header:"Poproś o dostęp",step1:"Zgłoś potrzebę dostępu - kliknij przycisk poniżej, aby zgłosić potrzebę",step2:"Manager to sprawdzi - zgłoszenie trafi do przełożonego, który oceni zasadność",step3:"Przyznanie uprawnień - przełożony lub administrator przydzieli Ci odpowiednie uprawnienia",button:"Zgłoś potrzebę"},trialExpired:{header:"Odnów subskrypcję",step1:"Zgłoś potrzebę odnowienia - kliknij przycisk poniżej, aby zgłosić potrzebę",step2:"Manager to sprawdzi - zgłoszenie trafi do przełożonego, który oceni zasadność biznesową",step3:"Zgłoszenie trafia do AndonCloud - po potwierdzeniu przez managera, zespół AndonCloud sprawdzi możliwość odnowienia",step4:"Uruchomienie funkcji - AndonCloud odnowi subskrypcję dla Twojej organizacji",button:"Zgłoś potrzebę"},purchase:{header:"Zakup funkcji",step1:"Zgłoś potrzebę zakupu - kliknij przycisk poniżej, aby zgłosić potrzebę",step2:"Manager to sprawdzi - zgłoszenie trafi do przełożonego, który oceni zasadność biznesową",step3:"Zgłoszenie trafia do AndonCloud - po potwierdzeniu przez managera, zespół AndonCloud sprawdzi możliwość uruchomienia",step4:"Uruchomienie funkcji - AndonCloud włączy funkcję dla Twojej organizacji",button:"Zgłoś potrzebę"},startTrial:{header:"Rozpocznij okres próbny",content:"Po kliknięciu przycisku poniżej uruchomimy 30-dniowy okres próbny dla całej Twojej organizacji. Przez ten czas wszyscy użytkownicy będą mieli pełny dostęp do tej funkcji.",button:"Rozpocznij okres próbny"},wishlist:{header:"Dodaj do listy życzeń",step1:"Zgłoś potrzebę - kliknij przycisk poniżej, aby zgłosić potrzebę",step2:"Manager to sprawdzi - zgłoszenie trafi do przełożonego, który oceni zasadność biznesową",step3:"Zgłoszenie trafia do AndonCloud - po potwierdzeniu przez managera, zespół AndonCloud sprawdzi możliwość uruchomienia",step4:"Uruchomienie funkcji - AndonCloud włączy funkcję dla Twojej organizacji",button:"Zgłoś potrzebę"},disclaimer:"To jest zgłoszenie potrzeby, nie natychmiastowy zakup. Twój przełożony oceni zasadność biznesową i podejmie decyzję.",cancel:"Anuluj"},cooldown:{header:"Prośba została już wysłana",message:"Twoja prośba została już wysłana i czeka na rozpatrzenie. Kolejną prośbę będziesz mógł wysłać za {{days}} dni.",button:"Rozumiem"},toast:{featureAccess:"Prośba o dostęp została przekazana do przełożonego.",trialExpired:"Dziękujemy za zgłoszenie. Twoja prośba o odnowienie subskrypcji została przekazana do przełożonego.",purchase:"Dziękujemy za zgłoszenie. Twoja prośba o zakup została przekazana do przełożonego.",wishlist:"Dziękujemy za zgłoszenie. Twoja prośba została przekazana do przełożonego.",startTrial:"Dziękujemy za uruchomienie okresu próbnego. Przez kolejne 30 dni możesz korzystać ze wszystkich funkcji bezpłatnie. Po jego zakończeniu poinformujemy Cię o dostępnych opcjach."}}}}},interpolation:{escapeValue:!1},react:{bindI18nStore:"added"},returnNull:!1});var Hm=function e(t,n){function r(e,r,o){if("undefined"!=typeof document){"number"==typeof(o=zm({},n,o)).expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var i in o)o[i]&&(s+="; "+i,!0!==o[i]&&(s+="="+o[i].split(";")[0]));return document.cookie=e+"="+t.write(r,e)+s}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},o=0;o<n.length;o++){var s=n[o].split("="),i=s.slice(1).join("=");try{var a=decodeURIComponent(s[0]);if(r[a]=t.read(i,a),e===a)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){r(e,"",zm({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,zm({},this.attributes,t))},withConverter:function(t){return e(zm({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});class Fm{static recognizeRootDomain(){if(!this.rootDomain){const e=window.location.hostname;if(0===window.location.port.length){let t,n;[t,...n]=e.split("."),this.subdomain=t,this.rootDomain=n.join(".")}else this.rootDomain=e}return this.rootDomain}static get(e){const t=this.recognizeRootDomain();return Hm.get(e,{domain:t})}static set(e,t){const n=this.recognizeRootDomain();return Hm.set(e,t,{domain:n})}static remove(e){const t=this.recognizeRootDomain();return Hm.remove(e,{domain:t})}}const Bm=function(e,t){void 0===t&&(t={});try{function n(){const n=qm.requestHeaders();return null!==n&&(t.headers=Object.assign({},n,t.headers)),Promise.resolve(fetch(e,t).catch(e=>{ss(e),qm.setNetworkError({title:X.default.t("somethingWentWrongMessage"),details:e.message})})).then(function(e){const t=function(){if(e){const t=function(){if(401!==e.status)return Promise.resolve(e.clone().text()).then(function(t){switch(e.status){case 403:vt.error(X.default.t("forbiddenErrorMessage"));break;case 500:vt.error(/*#__PURE__*/q.default.createElement(q.default.Fragment,null,/*#__PURE__*/q.default.createElement(s.Typography,{mr:t?2:0},X.default.t("somethingWentWrongMessage}")),t&&/*#__PURE__*/q.default.createElement(s.Tooltip,{title:t,arrow:!0},/*#__PURE__*/q.default.createElement(Q.default,null))))}});qm.removeSession(),qm.removeCurrentUser(),qm.setNotAuthorizedLoginStatus()}();if(t&&t.then)return t.then(function(){})}}();return t&&t.then?t.then(function(){return e}):e})}const r=function(){if(qm.isLoggedIn()&&!t.refresh){const{createdAt:e,expiresIn:t}=qm.session,n=function(){if(e+t-5<Math.round(+new Date/1e3)){const e=qm.refreshTokenPromise?Promise.resolve(qm.refreshTokenPromise).then(function(){}):Promise.resolve(qm.refresh()).then(function(){});if(e&&e.then)return e.then(function(){})}}();if(n&&n.then)return n.then(function(){})}}();return Promise.resolve(r&&r.then?r.then(n):n())}catch(o){return Promise.reject(o)}};class Um{constructor(){this.user={},this.accessToken=null,this.refreshToken=null,this.tokenType=null,this.createdAt=null,this.expiresIn=null}}class Vm{setAuthConfig(e){let{baseUrl:t,clientId:n,redirectUri:r}=e;this.baseUrl=t,this.clientId=n,this.redirectUri=r}authorize(e){try{const t=this,n=new FormData,{scope:r,refresh:o,code:s,username:i,password:a}=e;let c;return n.append("client_id",t.clientId),r&&n.append("scope",r),o?(n.append("grant_type","refresh_token"),n.append("refresh_token",o),n.append("redirect_uri",t.redirectUri)):s?(n.append("grant_type","authorization_code"),n.append("code",s),n.append("redirect_uri",t.redirectUri)):(n.append("grant_type","password"),n.append("username",i),n.append("password",a)),Promise.resolve(Bm(t.baseUrl+"/v2/oauth2/token",{method:"POST",body:n,refresh:!!o}).then(function(e){try{let n,r;return Promise.resolve(function(){if(e){function s(e){if(n)return e;function s(){c.accessToken=r.access_token,c.refreshToken=r.refresh_token,c.tokenType=r.token_type,c.createdAt=r.created_at,c.expiresIn=r.expires_in}c=new Um;const i=function(){if(!o)return Promise.resolve(t.getUserData(r)).then(function(e){c.user=e})}();return i&&i.then?i.then(s):s()}const i=function(t,o){try{var s=Promise.resolve(e.json()).then(function(t){r=t,e.ok&&200===e.status||(vt.error(r.error_description),n=1)})}catch(e){return o()}return s&&s.then?s.then(void 0,o):s}(0,function(){vt.error(X.default.t("somethingWentWrongMessage")),n=1});return i&&i.then?i.then(s):s(i)}}())}catch(e){return Promise.reject(e)}}).catch(e=>{vt.error(e.message)})).then(function(){return c})}catch(e){return Promise.reject(e)}}getUserData(e){try{const t=this,n={method:"GET"};if(e){const{token_type:t,access_token:r}=e;n.headers={Authorization:t+" "+r}}return Promise.resolve(Bm(t.baseUrl+"/v2/me",n)).then(function(e){let t;const n=function(){if(null!=e&&e.ok)return Promise.resolve(e.json()).then(function(e){let{user:n}=e;const r={id:n.id,companyId:n.company_id,roleId:n.role_id,username:n.username,email:n.email,name:n.name,permissionsMap:n.permissions_map||null,featuresMap:(o=n.features_map,o?Object.fromEntries(Object.entries(o).map(e=>{let[t,n]=e;return[t,(r=n,r?{status:r.status,entitlementType:r.entitlement_type,expiresAt:r.expires_at,daysSinceExpiry:r.days_since_expiry,permissions:r.permissions||[]}:null)];var r})):null),featuresRequestsMap:sm(n.features_requests_map)};var o;return t=1,r})}();return n&&n.then?n.then(function(e){return t?e:null}):t?n:null})}catch(e){return Promise.reject(e)}}signOut(e){try{const t=this,n=new FormData;return n.append("client_id",t.clientId),n.append("token",e),Promise.resolve(Bm(t.baseUrl+"/v2/oauth2/revoke",{method:"POST",body:n})).then(function(){})}catch(e){return Promise.reject(e)}}}const qm=new class{constructor(){this.loading=!1,this.loginStatus={status:"unknown"},this.refreshTokenPromise=null,this.api=new Vm,this.networkError=null,i.makeObservable(this,{loading:i.observable,setLoading:i.action,loginStatus:i.observable.deep,setConnectedLoginStatus:i.action,setNotAuthorizedLoginStatus:i.action})}setLoading(e){this.loading=e}setConnectedLoginStatus(){this.loginStatus={status:"connected",authResponse:{user:this.session.user,accessToken:this.session.accessToken,refreshToken:this.session.refreshToken,tokenType:this.session.tokenType,createdAt:this.session.createdAt,expiresIn:this.session.expiresIn}}}setNotAuthorizedLoginStatus(){this.loginStatus={status:"not_authorized"}}setAuthConfig(e){this.api.setAuthConfig(e)}setNetworkError(e){this.networkError=e}isLoggedIn(){return Boolean(this.session)}requestHeaders(){const e={"Accept-Language":X.default.language};if(this.isLoggedIn()){const{accessToken:t,tokenType:n}=this.session;return pm({},e,{Authorization:n+" "+t})}return e}authorize(e,t){void 0===t&&(t=!0);try{const n=this;return n.setLoading(!0),Promise.resolve(n.api.authorize(e)).then(function(e){return n.setLoading(!1),e?(t&&(n.session=e,n.storeSession(),n.setCurrentUser(e.user),n.setConnectedLoginStatus()),e):null})}catch(e){return Promise.reject(e)}}refresh(){try{const e=this;return e.session&&(e.refreshTokenPromise=e.api.authorize({refresh:e.session.refreshToken}),e.refreshTokenPromise.then(t=>{t?(e.session=pm({},e.session,t,{user:e.session.user}),e.storeSession(),e.setConnectedLoginStatus(),e.refreshTokenPromise=null):(e.removeSession(),e.removeCurrentUser(),e.setNotAuthorizedLoginStatus(),e.refreshTokenPromise=null)})),Promise.resolve(e.refreshTokenPromise)}catch(e){return Promise.reject(e)}}recover(){try{const e=this;return e.session?Promise.resolve():Promise.resolve(e.restoreSession()).then(function(){const t=function(){if(e.session)return Promise.resolve(e.api.getUserData()).then(function(t){e.setCurrentUser(t),e.setConnectedLoginStatus()});e.setNotAuthorizedLoginStatus()}();if(t&&t.then)return t.then(function(){})})}catch(e){return Promise.reject(e)}}logout(){try{const e=this,t=function(){if(e.session)return Promise.resolve(e.api.signOut(e.session.accessToken)).then(function(){e.removeSession(),e.removeCurrentUser(),e.setNotAuthorizedLoginStatus()})}();return Promise.resolve(t&&t.then?t.then(function(){}):void 0)}catch(e){return Promise.reject(e)}}refreshUserData(){try{const e=this;return e.session?Promise.resolve(e.api.getUserData()).then(function(t){return t&&(e.session.user=t,e.setCurrentUser(t)),t}):Promise.resolve(null)}catch(e){return Promise.reject(e)}}storeSession(){try{const e=this;let t={};t["access-token"]=e.session.accessToken,t["refresh-token"]=e.session.refreshToken,t["token-type"]=e.session.tokenType,t["created-at"]=e.session.createdAt,t["expires-in"]=e.session.expiresIn;const n=JSON.stringify(t);return Fm.set("authHeaders",n),Promise.resolve()}catch(e){return Promise.reject(e)}}restoreSession(){try{const e=this,t=Fm.get("authHeaders");if(!t||"null"===t)return Promise.resolve();const n=JSON.parse(t),r=new Um;return r.accessToken=n["access-token"],r.refreshToken=n["refresh-token"],r.tokenType=n["token-type"],r.createdAt=n["created-at"],r.expiresIn=n["expires-in"],e.session=r,Promise.resolve(e.api.getUserData()).then(function(t){t&&(e.session.user=t)})}catch(e){return Promise.reject(e)}}removeSession(){Fm.remove("authHeaders"),this.session=null}setCurrentUser(e){rm.setCurrentUser(e)}removeCurrentUser(){rm.removeCurrentUser()}},Wm=()=>{const[t,n]=e.useState(qm.loginStatus);return e.useEffect(()=>i.reaction(()=>i.toJS(qm.loginStatus),()=>{n(qm.loginStatus)}),[]),t},Km=q.default.createContext({showModal:null,hideModal:null,isOpenedModal:!1}),Zm=t=>{let{children:n}=t;const[r,o]=e.useState({}),s=e.useCallback((e,t)=>{o(t=>pm({},t,{[e]:pm({},t[e],{isOpen:!1})})),t&&t()},[o]),i=e.useCallback((e,t,n)=>{o(r=>pm({},r,{[e]:{isOpen:!0,component:t,data:n}}))},[o]),a=e.useMemo(()=>({showModal:i,hideModal:s,isOpenedModal:Object.values(r).some(e=>{let{isOpen:t}=e;return t})}),[s,i,r]);/*#__PURE__*/return q.default.createElement(Km.Provider,{value:a},n,Object.keys(r).map(e=>{const{component:t,isOpen:n,data:o}=r[e];return n&&/*#__PURE__*/q.default.createElement(t,pm({onClose:()=>s(e),key:e,isOpen:n},o))}))},Gm=(()=>{let e=0;return()=>""+ ++e})();function Ym(t,n,r){const o=e.useMemo(Gm,[]),s=e.useContext(Km);return[e.useCallback(e=>s.showModal(o,t,e instanceof Event?n:pm({},n,e)),[n,s.showModal]),e.useCallback(()=>s.hideModal(o,r),[s.hideModal,r,o])]}Ym.ModalContext=Km,Ym.ModalProvider=Zm;const Jm=e=>{let{isEmbeddedMode:t}=e;return{root:{height:t?"100vh":"calc(100vh - 22px)",paddingTop:t?0:"70px",mixBlendMode:t?"normal":"color",background:t?"transparent":"#1B2027"},overlay:{position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:-1,background:"repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1) 12px, transparent 12px, transparent 24px);"}}};function Xm(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>n.searchParams.append("args[]",e)),`Minified MUI error #${e}; visit ${n} for the full message.`}var Qm={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function ef(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var tf=/[A-Z]|^ms/g,nf=/_EMO_([^_]+?)_([^]*?)_EMO_/g,rf=function(e){return 45===e.charCodeAt(1)},of=function(e){return null!=e&&"boolean"!=typeof e},sf=/* #__PURE__ */ef(function(e){return rf(e)?e:e.replace(tf,"-$&").toLowerCase()}),af=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(nf,function(e,t,n){return lf={name:t,styles:n,next:lf},t})}return 1===Qm[e]||rf(e)||"number"!=typeof t||0===t?t:t+"px"};function cf(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return lf={name:n.name,styles:n.styles,next:lf},n.name;var r=n;if(void 0!==r.styles){var o=r.next;if(void 0!==o)for(;void 0!==o;)lf={name:o.name,styles:o.styles,next:lf},o=o.next;return r.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=cf(e,t,n[o])+";";else for(var s in n){var i=n[s];if("object"!=typeof i){var a=i;null!=t&&void 0!==t[a]?r+=s+"{"+t[a]+"}":of(a)&&(r+=sf(s)+":"+af(s,a)+";")}else if(!Array.isArray(i)||"string"!=typeof i[0]||null!=t&&void 0!==t[i[0]]){var c=cf(e,t,i);switch(s){case"animation":case"animationName":r+=sf(s)+":"+c+";";break;default:r+=s+"{"+c+"}"}}else for(var l=0;l<i.length;l++)of(i[l])&&(r+=sf(s)+":"+af(s,i[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var s=lf,i=n(e);return lf=s,cf(e,t,i)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}var lf,uf=/label:\s*([^\s;{]+)\s*(;|$)/g;function df(e,t){const n=ee.default(e,t);return"production"!=='{NODE_ENV:"production"}'.NODE_ENV?(...t)=>{const r="string"==typeof e?`"${e}"`:"component";return 0===t.length?console.error([`MUI: Seems like you called \`styled(${r})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join("\n")):t.some(e=>void 0===e)&&console.error(`MUI: the styled(${r})(...args) API requires all its args to be defined.`),n(...t)}:n}const pf=[];function hf(e){return pf[0]=e,function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";lf=void 0;var s=e[0];null==s||void 0===s.raw?(r=!1,o+=cf(n,t,s)):o+=s[0];for(var i=1;i<e.length;i++)o+=cf(n,t,e[i]),r&&(o+=s[i]);uf.lastIndex=0;for(var a,c="";null!==(a=uf.exec(o));)c+="-"+a[1];var l=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+c;return{name:l,styles:o,next:lf}}(pf)}function mf(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function ff(e){if(/*#__PURE__*/V.isValidElement(e)||y.isValidElementType(e)||!mf(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=ff(e[n])}),t}function gf(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return mf(e)&&mf(t)&&Object.keys(t).forEach(o=>{r[o]=/*#__PURE__*/V.isValidElement(t[o])||y.isValidElementType(t[o])?t[o]:mf(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&mf(e[o])?gf(e[o],t[o],n):n.clone&&mf(t[o])?ff(t[o]):t[o]}),r}function yf(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(e=>e.startsWith("@container")).sort((e,t)=>{const n=/min-width:\s*([0-9.]+)/;return+(e.match(n)?.[1]||0)-+(t.match(n)?.[1]||0)});return n.length?n.reduce((e,n)=>{const r=t[n];return delete e[n],e[n]=r,e},{...t}):t}var bf={borderRadius:4},vf="production"!=='{NODE_ENV:"production"}'.NODE_ENV?J.default.oneOfType([J.default.number,J.default.string,J.default.object,J.default.array]):{};function _f(e,t){return t?gf(e,t,{clone:!1}):e}const Sf={xs:0,sm:600,md:900,lg:1200,xl:1536},wf={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Sf[e]}px)`},kf={containerQueries:e=>({up:t=>{let n="number"==typeof t?t:Sf[t]||t;return"number"==typeof n&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Ef(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||wf;return t.reduce((r,o,s)=>(r[e.up(e.keys[s])]=n(t[s]),r),{})}if("object"==typeof t){const e=r.breakpoints||wf;return Object.keys(t).reduce((o,s)=>{if(i=e.keys,"@"===(a=s)||a.startsWith("@")&&(i.some(e=>a.startsWith(`@${e}`))||a.match(/^@\d/))){const e=function(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if("production"!=='{NODE_ENV:"production"}'.NODE_ENV)throw new Error("production"!=='{NODE_ENV:"production"}'.NODE_ENV?`MUI: The provided shorthand (${t}) is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.\nFor example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:Xm(18,`(${t})`));return null}const[,r,o]=n,s=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(s)}(r.containerQueries?r:kf,s);e&&(o[e]=n(t[s],s))}else Object.keys(e.values||Sf).includes(s)?o[e.up(s)]=n(t[s],s):o[s]=t[s];var i,a;return o},{})}return n(t)}function Cf(e,t){return e.reduce((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e},t)}function xf(e){if("string"!=typeof e)throw new Error("production"!=='{NODE_ENV:"production"}'.NODE_ENV?"MUI: `capitalize(string)` expects a string argument.":Xm(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Tf(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=n)return n}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function If(e,t,n,r=n){let o;return o="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:Tf(e,n)||r,t&&(o=t(o,r,e)),o}function Mf(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,s=e=>{if(null==e[t])return null;const s=e[t],i=Tf(e.theme,r)||{};return Ef(e,s,e=>{let r=If(i,o,e);return e===r&&"string"==typeof e&&(r=If(i,o,`${t}${"default"===e?"":xf(e)}`,e)),!1===n?r:{[n]:r}})};return s.propTypes="production"!=='{NODE_ENV:"production"}'.NODE_ENV?{[t]:vf}:{},s.filterProps=[t],s}const Of={m:"margin",p:"padding"},Pf={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Rf={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Af=function(){const e={};return t=>(void 0===e[t]&&(e[t]=(e=>{if(e.length>2){if(!Rf[e])return[e];e=Rf[e]}const[t,n]=e.split(""),r=Of[t],o=Pf[n]||"";return Array.isArray(o)?o.map(e=>r+e):[r+o]})(t)),e[t])}(),Df=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Lf=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Nf=[...Df,...Lf];function jf(e,t,n,r){const o=Tf(e,t,!0)??n;return"number"==typeof o||"string"==typeof o?e=>"string"==typeof e?e:("production"!=='{NODE_ENV:"production"}'.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${e}.`),"string"==typeof o?o.startsWith("var(")&&0===e?0:o.startsWith("var(")&&1===e?o:`calc(${e} * ${o})`:o*e):Array.isArray(o)?e=>{if("string"==typeof e)return e;const n=Math.abs(e);"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&(Number.isInteger(n)?n>o.length-1&&console.error([`MUI: The value provided (${n}) overflows.`,`The supported values are: ${JSON.stringify(o)}.`,`${n} > ${o.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n")));const r=o[n];return e>=0?r:"number"==typeof r?-r:"string"==typeof r&&r.startsWith("var(")?`calc(-1 * ${r})`:`-${r}`}:"function"==typeof o?o:("production"!=='{NODE_ENV:"production"}'.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${o}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}function $f(e){return jf(e,"spacing",8,"spacing")}function zf(e,t){return"string"==typeof t||null==t?t:e(t)}function Hf(e,t){const n=$f(e.theme);return Object.keys(e).map(r=>function(e,t,n,r){if(!t.includes(n))return null;const o=function(e,t){return n=>e.reduce((e,r)=>(e[r]=zf(t,n),e),{})}(Af(n),r);return Ef(e,e[n],o)}(e,t,r,n)).reduce(_f,{})}function Ff(e){return Hf(e,Df)}function Bf(e){return Hf(e,Lf)}function Uf(...e){const t=e.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),n=e=>Object.keys(e).reduce((n,r)=>t[r]?_f(n,t[r](e)):n,{});return n.propTypes="production"!=='{NODE_ENV:"production"}'.NODE_ENV?e.reduce((e,t)=>Object.assign(e,t.propTypes),{}):{},n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n}function Vf(e){return"number"!=typeof e?e:`${e}px solid`}function qf(e,t){return Mf({prop:e,themeKey:"borders",transform:t})}Ff.propTypes="production"!=='{NODE_ENV:"production"}'.NODE_ENV?Df.reduce((e,t)=>(e[t]=vf,e),{}):{},Ff.filterProps=Df,Bf.propTypes="production"!=='{NODE_ENV:"production"}'.NODE_ENV?Lf.reduce((e,t)=>(e[t]=vf,e),{}):{},Bf.filterProps=Lf,"production"==='{NODE_ENV:"production"}'.NODE_ENV||Nf.reduce((e,t)=>(e[t]=vf,e),{});const Wf=qf("border",Vf),Kf=qf("borderTop",Vf),Zf=qf("borderRight",Vf),Gf=qf("borderBottom",Vf),Yf=qf("borderLeft",Vf),Jf=qf("borderColor"),Xf=qf("borderTopColor"),Qf=qf("borderRightColor"),eg=qf("borderBottomColor"),tg=qf("borderLeftColor"),ng=qf("outline",Vf),rg=qf("outlineColor"),og=e=>{if(null!=e.borderRadius){const t=jf(e.theme,"shape.borderRadius",4,"borderRadius");return Ef(e,e.borderRadius,e=>({borderRadius:zf(t,e)}))}return null};og.propTypes="production"!=='{NODE_ENV:"production"}'.NODE_ENV?{borderRadius:vf}:{},og.filterProps=["borderRadius"],Uf(Wf,Kf,Zf,Gf,Yf,Jf,Xf,Qf,eg,tg,og,ng,rg);const sg=e=>{if(null!=e.gap){const t=jf(e.theme,"spacing",8,"gap");return Ef(e,e.gap,e=>({gap:zf(t,e)}))}return null};sg.propTypes="production"!=='{NODE_ENV:"production"}'.NODE_ENV?{gap:vf}:{},sg.filterProps=["gap"];const ig=e=>{if(null!=e.columnGap){const t=jf(e.theme,"spacing",8,"columnGap");return Ef(e,e.columnGap,e=>({columnGap:zf(t,e)}))}return null};ig.propTypes="production"!=='{NODE_ENV:"production"}'.NODE_ENV?{columnGap:vf}:{},ig.filterProps=["columnGap"];const ag=e=>{if(null!=e.rowGap){const t=jf(e.theme,"spacing",8,"rowGap");return Ef(e,e.rowGap,e=>({rowGap:zf(t,e)}))}return null};function cg(e,t){return"grey"===t?t:e}function lg(e){return e<=1&&0!==e?100*e+"%":e}ag.propTypes="production"!=='{NODE_ENV:"production"}'.NODE_ENV?{rowGap:vf}:{},ag.filterProps=["rowGap"],Uf(sg,ig,ag,Mf({prop:"gridColumn"}),Mf({prop:"gridRow"}),Mf({prop:"gridAutoFlow"}),Mf({prop:"gridAutoColumns"}),Mf({prop:"gridAutoRows"}),Mf({prop:"gridTemplateColumns"}),Mf({prop:"gridTemplateRows"}),Mf({prop:"gridTemplateAreas"}),Mf({prop:"gridArea"})),Uf(Mf({prop:"color",themeKey:"palette",transform:cg}),Mf({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:cg}),Mf({prop:"backgroundColor",themeKey:"palette",transform:cg}));const ug=Mf({prop:"width",transform:lg}),dg=e=>null!=e.maxWidth?Ef(e,e.maxWidth,t=>{const n=e.theme?.breakpoints?.values?.[t]||Sf[t];return n?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:lg(t)}}):null;dg.filterProps=["maxWidth"];const pg=Mf({prop:"minWidth",transform:lg}),hg=Mf({prop:"height",transform:lg}),mg=Mf({prop:"maxHeight",transform:lg}),fg=Mf({prop:"minHeight",transform:lg});Mf({prop:"size",cssProperty:"width",transform:lg}),Mf({prop:"size",cssProperty:"height",transform:lg}),Uf(ug,dg,pg,hg,mg,fg,Mf({prop:"boxSizing"}));var gg={border:{themeKey:"borders",transform:Vf},borderTop:{themeKey:"borders",transform:Vf},borderRight:{themeKey:"borders",transform:Vf},borderBottom:{themeKey:"borders",transform:Vf},borderLeft:{themeKey:"borders",transform:Vf},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Vf},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:og},color:{themeKey:"palette",transform:cg},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:cg},backgroundColor:{themeKey:"palette",transform:cg},p:{style:Bf},pt:{style:Bf},pr:{style:Bf},pb:{style:Bf},pl:{style:Bf},px:{style:Bf},py:{style:Bf},padding:{style:Bf},paddingTop:{style:Bf},paddingRight:{style:Bf},paddingBottom:{style:Bf},paddingLeft:{style:Bf},paddingX:{style:Bf},paddingY:{style:Bf},paddingInline:{style:Bf},paddingInlineStart:{style:Bf},paddingInlineEnd:{style:Bf},paddingBlock:{style:Bf},paddingBlockStart:{style:Bf},paddingBlockEnd:{style:Bf},m:{style:Ff},mt:{style:Ff},mr:{style:Ff},mb:{style:Ff},ml:{style:Ff},mx:{style:Ff},my:{style:Ff},margin:{style:Ff},marginTop:{style:Ff},marginRight:{style:Ff},marginBottom:{style:Ff},marginLeft:{style:Ff},marginX:{style:Ff},marginY:{style:Ff},marginInline:{style:Ff},marginInlineStart:{style:Ff},marginInlineEnd:{style:Ff},marginBlock:{style:Ff},marginBlockStart:{style:Ff},marginBlockEnd:{style:Ff},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:sg},rowGap:{style:ag},columnGap:{style:ig},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:lg},maxWidth:{style:dg},minWidth:{transform:lg},height:{transform:lg},maxHeight:{transform:lg},minHeight:{transform:lg},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};const yg=function(){function e(e,t,n,r){const o={[e]:t,theme:n},s=r[e];if(!s)return{[e]:t};const{cssProperty:i=e,themeKey:a,transform:c,style:l}=s;if(null==t)return null;if("typography"===a&&"inherit"===t)return{[e]:t};const u=Tf(n,a)||{};return l?l(o):Ef(o,t,t=>{let n=If(u,c,t);return t===n&&"string"==typeof t&&(n=If(u,c,`${e}${"default"===t?"":xf(t)}`,t)),!1===i?n:{[i]:n}})}return function t(n){const{sx:r,theme:o={},nested:s}=n||{};if(!r)return null;const i=o.unstable_sxConfig??gg;function a(n){let r=n;if("function"==typeof n)r=n(o);else if("object"!=typeof n)return n;if(!r)return null;const a=function(e={}){const t=e.keys?.reduce((t,n)=>(t[e.up(n)]={},t),{});return t||{}}(o.breakpoints),c=Object.keys(a);let l=a;return Object.keys(r).forEach(n=>{const s="function"==typeof(a=r[n])?a(o):a;var a;if(null!=s)if("object"==typeof s)if(i[n])l=_f(l,e(n,s,o,i));else{const e=Ef({theme:o},s,e=>({[n]:e}));!function(...e){const t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),n=new Set(t);return e.every(e=>n.size===Object.keys(e).length)}(e,s)?l=_f(l,e):l[n]=t({sx:s,theme:o,nested:!0})}else l=_f(l,e(n,s,o,i))}),!s&&o.modularCssLayers?{"@layer sx":yf(o,Cf(c,l))}:yf(o,Cf(c,l))}return Array.isArray(r)?r.map(a):a(r)}}();yg.filterProps=["sx"];var bg=yg;function vg(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||"function"!=typeof n.getColorSchemeSelector)return{};let r=n.getColorSchemeSelector(e);return"&"===r?t:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function _g(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:s={},...i}=e,a=function(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,s=(e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>({...e,[t.key]:t.val}),{})})(t),i=Object.keys(s);function a(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function c(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-r/100}${n})`}function l(e,o){const s=i.indexOf(o);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==s&&"number"==typeof t[i[s]]?t[i[s]]:o)-r/100}${n})`}return{keys:i,values:s,up:a,down:c,between:l,only:function(e){return i.indexOf(e)+1<i.length?l(e,i[i.indexOf(e)+1]):a(e)},not:function(e){const t=i.indexOf(e);return 0===t?a(i[1]):t===i.length-1?c(i[t]):l(e,i[i.indexOf(e)+1]).replace("@media","@media not all and")},unit:n,...o}}(n),c=function(e=8,t=$f({spacing:e})){if(e.mui)return e;const n=(...e)=>("production"!=='{NODE_ENV:"production"}'.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map(e=>{const n=t(e);return"number"==typeof n?`${n}px`:n}).join(" "));return n.mui=!0,n}(o);let l=gf({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:c,shape:{...bf,...s}},i);return l=function(e){const t=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function n(n,r){n.up=(...n)=>t(e.breakpoints.up(...n),r),n.down=(...n)=>t(e.breakpoints.down(...n),r),n.between=(...n)=>t(e.breakpoints.between(...n),r),n.only=(...n)=>t(e.breakpoints.only(...n),r),n.not=(...n)=>{const o=t(e.breakpoints.not(...n),r);return o.includes("not all and")?o.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):o}}const r={},o=e=>(n(r,e),r);return n(o),{...e,containerQueries:o}}(l),l.applyStyles=vg,l=t.reduce((e,t)=>gf(e,t),l),l.unstable_sxConfig={...gg,...i?.unstable_sxConfig},l.unstable_sx=function(e){return bg({sx:e,theme:this})},l}const Sg=_g(),wg=e=>e;var kg=(()=>{let e=wg;return{configure(t){e=t},generate:t=>e(t),reset(){e=wg}}})();function Eg(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Eg(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Cg(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Eg(e))&&(r&&(r+=" "),r+=t);return r}const xg={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"},Tg=function(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=e,s=df("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(bg),i=/*#__PURE__*/V.forwardRef(function(e,i){const a=function(e=Sg){return function(e=null){const t=V.useContext(g.ThemeContext);return!t||function(e){return 0===Object.keys(e).length}(t)?e:t}(e)}(n),{className:c,component:l="div",...u}=function(e){const{sx:t,...n}=e,{systemProps:r,otherProps:o}=(e=>{const t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??gg;return Object.keys(e).forEach(r=>{n[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]}),t})(n);let s;return s=Array.isArray(t)?[r,...t]:"function"==typeof t?(...e)=>{const n=t(...e);return mf(n)?{...r,...n}:r}:{...r,...t},{...o,sx:s}}(e);/*#__PURE__*/
|
|
172
|
+
return b.jsx(s,{as:l,ref:i,className:Cg(c,o?o(r):r),theme:t&&a[t]||a,...u})});return i}({defaultClassName:function(e,t,n="Mui"){const r={};return["root"].forEach(t=>{r[t]=function(e,t,n="Mui"){const r=xg[t];return r?`${n}-${r}`:`${kg.generate(e)}-${t}`}(e,t,n)}),r}("MuiBox").root,generateClassName:kg.generate});"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&(Tg.propTypes={children:J.default.node,component:J.default.elementType,sx:J.default.oneOfType([J.default.arrayOf(J.default.oneOfType([J.default.func,J.default.object,J.default.bool])),J.default.func,J.default.object])});var Ig=Tg;function Mg(e,t=""){return e.displayName||e.name||t}function Og(e,t,n){const r=Mg(t);return e.displayName||(""!==r?`${n}(${r})`:n)}const Pg=_g();function Rg(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function Ag(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function Dg(e){return e?(t,n)=>n[e]:null}function Lg(e,t,n){const r="function"==typeof t?t(e):t;if(Array.isArray(r))return r.flatMap(t=>Lg(e,t,n));if(Array.isArray(r?.variants)){let t;if(r.isProcessed)t=n?Ag(r.style,n):r.style;else{const{variants:e,...o}=r;t=n?Ag(hf(o),n):o}return Ng(e,r.variants,[t],n)}return r?.isProcessed?n?Ag(hf(r.style),n):r.style:n?Ag(hf(r),n):r}function Ng(e,t,n=[],r=void 0){let o;e:for(let s=0;s<t.length;s+=1){const i=t[s];if("function"==typeof i.props){if(o??={...e,...e.ownerState,ownerState:e.ownerState},!i.props(o))continue}else for(const t in i.props)if(e[t]!==i.props[t]&&e.ownerState?.[t]!==i.props[t])continue e;"function"==typeof i.style?(o??={...e,...e.ownerState,ownerState:e.ownerState},n.push(r?Ag(hf(i.style(o)),r):i.style(o))):n.push(r?Ag(hf(i.style),r):i.style)}return n}function jg(e,t){let n;return"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&e&&(n=`${e}-${$g(t||"Root")}`),n}function $g(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}const zg=function(e={}){const{themeId:t,defaultTheme:n=Pg,rootShouldForwardProp:r=Rg,slotShouldForwardProp:o=Rg}=e;function s(e){!function(e,t,n){e.theme=function(e){for(const t in e)return!1;return!0}(e.theme)?n:e.theme[t]||e.theme}(e,t,n)}return(e,t={})=>{!function(e){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=(e=>e.filter(e=>e!==bg))(e.__emotion_styles))}(e);const{name:n,slot:i,skipVariantsResolver:a,skipSx:c,overridesResolver:l=Dg($g(i)),...u}=t,d=n&&n.startsWith("Mui")||i?"components":"custom",p=void 0!==a?a:i&&"Root"!==i&&"root"!==i||!1,h=c||!1;let m=Rg;"Root"===i||"root"===i?m=r:i?m=o:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(m=void 0);const f=df(e,{shouldForwardProp:m,label:jg(n,i),...u}),g=e=>{if(e.__emotion_real===e)return e;if("function"==typeof e)return function(t){return Lg(t,e,t.theme.modularCssLayers?d:void 0)};if(mf(e)){const t=function(e){const{variants:t,...n}=e,r={variants:t,style:hf(n),isProcessed:!0};return r.style===n||t&&t.forEach(e=>{"function"!=typeof e.style&&(e.style=hf(e.style))}),r}(e);return function(e){return t.variants?Lg(e,t,e.theme.modularCssLayers?d:void 0):e.theme.modularCssLayers?Ag(t.style,d):t.style}}return e},b=(...t)=>{const r=[],o=t.map(g),a=[];if(r.push(s),n&&l&&a.push(function(e){const t=e.theme,r=t.components?.[n]?.styleOverrides;if(!r)return null;const o={};for(const t in r)o[t]=Lg(e,r[t],e.theme.modularCssLayers?"theme":void 0);return l(e,o)}),n&&!p&&a.push(function(e){const t=e.theme,r=t?.components?.[n]?.variants;return r?Ng(e,r,[],e.theme.modularCssLayers?"theme":void 0):null}),h||a.push(bg),Array.isArray(o[0])){const e=o.shift(),t=new Array(r.length).fill(""),n=new Array(a.length).fill("");let s;s=[...t,...e,...n],s.raw=[...t,...e.raw,...n],r.unshift(s)}const c=[...r,...o,...a],u=f(...c);return e.muiName&&(u.muiName=e.muiName),"production"!=='{NODE_ENV:"production"}'.NODE_ENV&&(u.displayName=function(e,t,n){return e?`${e}${xf(t||"")}`:`Styled(${function(e){if(null!=e){if("string"==typeof e)return e;if("function"==typeof e)return Mg(e,"Component");if("object"==typeof e)switch(e.$$typeof){case y.ForwardRef:return Og(e,e.render,"ForwardRef");case y.Memo:return Og(e,e.type,"memo");default:return}}}(n)})`}(n,i,e)),u};return f.withConfig&&(b.withConfig=f.withConfig),b}}();var Hg=zg;const Fg=new Set(["http://localhost:3000","http://localhost:3090"]),Bg=e=>{if("string"!=typeof e)return!1;if(Fg.has(e))return!0;try{const t=new URL(e);if("https:"!==t.protocol)return!1;const n=t.hostname;return"andoncloud.net"===n||n.endsWith(".andoncloud.net")||"andoncloud.com"===n||n.endsWith(".andoncloud.com")}catch(e){return!1}},Ug=()=>{try{return window.self!==window.top?"iframe":"standalone"}catch(e){return"iframe"}},Vg=Hg(Ig)({position:"absolute",left:0,bottom:0,width:"100%",height:"22px",padding:"0.15em 0.5em",fontSize:"70%",fontWeight:600,color:"rgba(255, 255, 255, 0.75)",borderTop:"1px solid rgba(255, 255, 255, 0.2)","& > span":{marginLeft:"0.5em",color:"rgba(255, 255, 255, 0.4)"},background:"#11151B"}),qg=e=>{let{appVersion:n,apiVersion:r}=e;const{t:o}=t.useTranslation();return"iframe"===Ug()?null:/*#__PURE__*/q.default.createElement(Vg,null,(()=>{if(n){const e=n.startsWith("v")?n:"v"+n;/*#__PURE__*/return q.default.createElement(q.default.Fragment,null,/*#__PURE__*/q.default.createElement("span",null,o("Version"))," ",e)}})(),(()=>{if(r){const e=r.startsWith("v")?r:"v"+r;/*#__PURE__*/return q.default.createElement(q.default.Fragment,null,/*#__PURE__*/q.default.createElement("span",null,"API")," ",e)}})())},Wg=e=>{let{error:n,appVersion:r,apiVersion:o}=e;const{t:i}=t.useTranslation(),a=Ug(),c=Jm({isEmbeddedMode:"iframe"===a});/*#__PURE__*/return q.default.createElement(s.Container,{maxWidth:!1,disableGutters:!0,sx:c.root},/*#__PURE__*/q.default.createElement(s.Card,{style:{background:"linear-gradient(180deg, #393939 0%, #4A4A4A 100%)",maxWidth:"650px",margin:"200px auto",borderRadius:"20px"}},/*#__PURE__*/q.default.createElement(s.CardContent,{style:{minHeight:"unset"}},/*#__PURE__*/q.default.createElement(s.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",m:"125px 80px"},/*#__PURE__*/q.default.createElement(s.Typography,{variant:"h4",sx:{display:"flex",alignItems:"center",marginBottom:"40px",color:"rgba(255, 255, 255, 0.6)"}},i("somethingWentWrongMessage"),/*#__PURE__*/q.default.createElement(s.Tooltip,{title:n.toString(),arrow:!0},/*#__PURE__*/q.default.createElement(Q.default,{sx:{marginLeft:"1em",fontSize:"inherit"}}))),/*#__PURE__*/q.default.createElement(s.Button,{onClick:()=>window.location.reload()},i("networkErrorButtonText"))))),/*#__PURE__*/q.default.createElement(s.Box,{sx:c.overlay}),/*#__PURE__*/q.default.createElement(qg,{appVersion:r,apiVersion:o}))};Wg.propTypes={error:p.PropTypes.any,componentStack:p.PropTypes.any},Wg.defaultProps={};const Kg=e=>{let{width:t,"data-testid":n}=e;/*#__PURE__*/return q.default.createElement(s.Box,{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},/*#__PURE__*/q.default.createElement("img",{"data-testid":n,alt:"loader",width:t,src:te.default}))},Zg=e.createContext(),Gg=t=>{let{children:n}=t;const[r,o]=e.useState(!1),[s,i]=e.useState([]),a=Ug();/*#__PURE__*/return q.default.createElement(Zg.Provider,{value:{mode:a,isEmbeddedMode:"iframe"===a,iframeMounted:r,setIframeMounted:o,iframeNavigationItems:s,setIframeNavigationItems:i}},n)},Yg=()=>e.useContext(Zg),Jg=()=>{const{isEmbeddedMode:e}=Yg(),t=Jm({isEmbeddedMode:e});/*#__PURE__*/return q.default.createElement(s.Container,{maxWidth:!1,disableGutters:!0,sx:t.root},/*#__PURE__*/q.default.createElement(Kg,{"data-testid":"ac-sdk-app-loading",width:"500px"}),/*#__PURE__*/q.default.createElement(s.Box,{sx:t.overlay}))};Jg.propTypes={},Jg.defaultProps={};const Xg=e.createContext(),Qg=e=>{let{children:t,config:n}=e;/*#__PURE__*/return q.default.createElement(Xg.Provider,{value:n},t)},ey=()=>e.useContext(Xg),ty=e.createContext(),ny=e=>{let{children:t,info:n}=e;/*#__PURE__*/return q.default.createElement(ty.Provider,{value:n},t)},ry={sessionStore:qm},oy=e.createContext(ry),sy=d.observer(e=>{let{children:t}=e;/*#__PURE__*/return q.default.createElement(oy.Provider,{value:ry},t)});var iy=new class{constructor(){this.appReady=!1,this.gtmReady=!1,this.sentryReady=!1,i.makeAutoObservable(this)}setAppReady(){this.appReady=!0}setGtmReady(){this.gtmReady=!0}setSentryReady(){this.sentryReady=!0}};const{palette:ay,typography:cy}=u.createTheme(),ly=u.responsiveFontSizes(u.createTheme({components:{MuiCssBaseline:{styleOverrides:'\n body {\n font-family: "Inter", "system-ui";\n }\n @supports (font-variation-settings: normal) {\n body { font-family: "Inter var", "system-ui"; }\n }\n '}},palette:{background:"#090B0E",primary:{main:"#0366EB",light:"#71A9F4"},secondary:{main:"#E0E0E0"},success:{main:"#11BD4C"},error:{main:"#FD2121"},text:{primary:"#A7ADB6"},gray:ay.augmentColor({color:{main:"#090B0E",light:"#47484A"}}),stroke:ay.augmentColor({color:{main:"#D8DDE3",dark:"rgba(255, 255, 255, 0.15)"}}),gradient:{blue:{main:"linear-gradient(0deg, #0353BD 3.06%, #0366EB 93%)"},dark:{main:"linear-gradient(180deg, #292C34 0%, #1C1F25 100%)"}}},typography:{fontFamily:"'Inter', system-ui",button:{textTransform:"none"}}}),{breakpoints:["xs","sm","md","lg","xl"],disableAlign:!0,factor:2.5});var uy=u.createTheme(ly,{components:{MuiBackdrop:{styleOverrides:{root:{marginTop:70}}},MuiButton:{styleOverrides:{root:{fontSize:"1rem",fontWeight:400,color:ly.palette.common.white,padding:ly.spacing(1.5,3),border:"1px solid "+ly.palette.stroke.dark,borderRadius:"6px","&:disabled":{color:ly.palette.gray.light,background:"transparent"}}},variants:[{props:{variant:"contained"},style:{background:ly.palette.gradient.blue.main,"&:focus":{boxShadow:"0px 0px 0px 4px rgba(3, 102, 235, 0.25)"},"&:hover":{opacity:.8}}},{props:{variant:"outlined"},style:{background:ly.palette.gradient.dark.main,"&:focus":{boxShadow:"0 0 0 4px rgba(255, 255, 255, 0.10)"},"&:hover":{opacity:.8}}}]},MuiCard:{styleOverrides:{root:{borderRadius:"4px",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.25)"}}},MuiCardHeader:{styleOverrides:{root:{color:"rgba(255,255,255,0.85)",background:"linear-gradient(180deg,#252A32,#30353D)"},subheader:{marginTop:"0.5em",color:"rgba(255,255,255,0.5)"}}},MuiCardContent:{styleOverrides:{root:{background:"#252A32","&:last-child":{paddingBottom:16}}}},MuiDayCalendar:{styleOverrides:{weekDayLabel:{color:"#E0E0E0"}}},MuiDialogTitle:{styleOverrides:{root:{textAlign:"center",color:"white",background:"linear-gradient(180deg,#252A32,#30353D)"}}},MuiDialogContent:{styleOverrides:{root:{minWidth:550,padding:"16px 24px",background:"#252A32"}}},MuiDialogContentText:{styleOverrides:{root:{textAlign:"center",color:"white"}}},MuiCheckbox:{styleOverrides:{root:{color:ly.palette.primary.main,"&:hover":{opacity:.8}}}},MuiFormLabel:{styleOverrides:{root:{lineHeight:"1.4375em !important",fontSize:cy.pxToRem(16)+" !important","&:not(.Mui-error)":{color:ly.palette.text.primary+" !important"}}}},MuiFormControl:{styleOverrides:{root:{".MuiInputLabel-root":{color:"#E0E0E0",transform:"translate(16px, 14px) scale(1)","&.MuiInputLabel-shrink":{color:"#A7ADB6",transform:"translate(16px, 5px) scale(0.75)"}}}}},MuiFormControlLabel:{styleOverrides:{root:{alignItems:"center",color:ly.palette.text.primary,".MuiFormControlLabel-label.Mui-disabled":{color:"#A7ADB6"}}}},MuiInputBase:{styleOverrides:{root:{display:"flex",padding:ly.spacing(1.5,3),fontSize:"1rem",fontWeight:400,color:"#E0E0E0",borderRadius:"6px",background:"#1C1F25","> input":{padding:0,"&[type=number]":{MozAppearance:"textfield"},"&[type=number]::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:0},"&[type=number]::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0},"&:-webkit-autofill":{transition:"all 5000s ease-in-out 0s"},"&:-webkit-autofill:focus":{transition:"all 5000s ease-in-out 0s"},"&:-webkit-autofill:hover":{transition:"all 5000s ease-in-out 0s"},"&:-webkit-autofill:active":{transition:"all 5000s ease-in-out 0s"}}}}},MuiInputAdornment:{styleOverrides:{root:{".MuiTypography-root":{color:"#4E5A67"}}}},MuiMenu:{styleOverrides:{root:{transform:"translateY("+ly.spacing(1)+")",".MuiPaper-root":{background:"none"}},list:{border:"1px solid #4E5A67",borderRadius:"6px",background:"#1C1F25",boxShadow:"0px 4px 10.4px 0px rgba(255, 255, 255, 0.05)"}}},MuiMenuItem:{styleOverrides:{root:{gap:ly.spacing(.5),fontSize:cy.pxToRem(16),color:"#E0E0E0","&.Mui-selected":{background:ly.palette.gray.main},"&.Mui-selected:hover":{background:ly.palette.gray.main},"&:hover":{background:ly.palette.gray.main}}}},MuiOutlinedInput:{styleOverrides:{root:{padding:ly.spacing(2.5,2,.5,2),"&:hover .MuiOutlinedInput-notchedOutline":{borderWidth:"1px",borderColor:"#4E5A67"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderWidth:"1px",borderColor:"#4E5A67"}},notchedOutline:{border:"1px solid "+ly.palette.stroke.dark,"> legend":{width:0}}}},MuiPickersArrowSwitcher:{styleOverrides:{root:{".MuiPickersArrowSwitcher-previousIconButton":{color:"#E0E0E0"},".MuiPickersArrowSwitcher-nextIconButton":{color:"#E0E0E0"}}}},MuiPickersCalendarHeader:{styleOverrides:{switchViewButton:{color:"#E0E0E0"}}},MuiPickersInputBase:{styleOverrides:{root:{display:"flex",fontSize:"1rem",fontWeight:400,color:"#E0E0E0",borderRadius:"6px",background:"#1C1F25",".MuiPickersSectionList-root":{padding:ly.spacing(1,0,.625,0)},".MuiInputAdornment-root":{marginTop:ly.spacing(-1.5)},".MuiIconButton-root":{color:"#E0E0E0"},"> input":{padding:0}}}},MuiPickersOutlinedInput:{styleOverrides:{root:{padding:ly.spacing(1.75,2,0,2),"&:hover .MuiPickersOutlinedInput-notchedOutline":{borderWidth:"1px",borderColor:"#4E5A67"},"&.Mui-focused:not(.Mui-error) .MuiPickersOutlinedInput-notchedOutline":{borderWidth:"1px",borderColor:"#4E5A67"}},notchedOutline:{border:"1px solid "+ly.palette.stroke.dark,"> legend":{width:0}}}},MuiPickersTextField:{variants:[{props:{error:!0},style:{".MuiInputLabel-root":{color:ly.palette.error.main,"&.MuiInputLabel-shrink":{color:ly.palette.error.main}},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:ly.palette.error.main},".Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:ly.palette.error.main}}}]},MuiPickersLayout:{styleOverrides:{root:{background:"#1C1F25"}}},MuiRadio:{styleOverrides:{root:{color:ly.palette.primary.main,"&:hover":{opacity:.8}}}},MuiRadioGroup:{styleOverrides:{root:{color:ly.palette.primary.main}}},MuiSelect:{styleOverrides:{root:{".MuiSelect-select":{display:"flex",alignItems:"center",gap:ly.spacing(.5),padding:0,lineHeight:1.625,color:"E0E0E0"},".MuiSelect-icon":{top:"calc(50% - 10px)",right:ly.spacing(2),color:"#E0E0E0"},"&:hover":{borderColor:"#4E5A67"}}}},MuiTabs:{styleOverrides:{root:{borderBottom:"1px solid "+ly.palette.stroke.dark}}},MuiTab:{styleOverrides:{root:{color:ly.palette.text.primary,"&.Mui-selected":{color:"#E0E0E0"}}}},MuiTextField:{variants:[{props:{error:!0},style:{".MuiInputLabel-root":{color:ly.palette.error.main,"&.MuiInputLabel-shrink":{color:ly.palette.error.main}},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:ly.palette.error.main},".Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:ly.palette.error.main}}}]},MuiTypography:{styleOverrides:{root:{"& > span.important":{fontWeight:600,color:ly.palette.secondary.main}}}}}});const dy=e=>{let{error:n}=e;const{isEmbeddedMode:r}=Yg(),{t:o}=t.useTranslation(),i=Jm({isEmbeddedMode:r});/*#__PURE__*/return q.default.createElement(s.Container,{maxWidth:!1,disableGutters:!0,sx:i.root},/*#__PURE__*/q.default.createElement(s.Card,{style:{background:"linear-gradient(180deg, #393939 0%, #4A4A4A 100%)",maxWidth:"600px",margin:"200px auto",borderRadius:"20px"}},/*#__PURE__*/q.default.createElement(s.CardContent,{style:{minHeight:"unset"}},/*#__PURE__*/q.default.createElement(s.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",m:"125px 80px"},/*#__PURE__*/q.default.createElement("h1",{style:{textAlign:"center",color:"rgba(255, 255, 255, 0.6)"}},o("networkErrorHeader")),/*#__PURE__*/q.default.createElement("p",{style:{display:"inline-flex",textAlign:"center",color:"rgba(255, 255, 255, 0.6)"}},/*#__PURE__*/q.default.createElement(s.Typography,{mr:2},n.title),/*#__PURE__*/q.default.createElement(s.Tooltip,{title:n.details,arrow:!0},/*#__PURE__*/q.default.createElement(Q.default,null))),/*#__PURE__*/q.default.createElement(s.Button,{onClick:()=>window.location.reload()},o("networkErrorButtonText"))))),/*#__PURE__*/q.default.createElement(s.Box,{sx:i.overlay}))},py=()=>{const t=new URLSearchParams(a.useLocation().search),n=t.get("next");return e.useEffect(()=>{const e=t.get("code");e&&qm.authorize({code:e})},[t]),qm.isLoggedIn()?/*#__PURE__*/q.default.createElement(a.Navigate,{to:n}):null},hy=()=>{const{isEmbeddedMode:t,iframeNavigationItems:n}=Yg(),r=a.useNavigate(),o=a.useLocation();return e.useEffect(()=>{var e;t&&(null==(e=window.parent)||e.postMessage({type:"IFRAME_NAVIGATION_CURRENT",path:o.pathname},"*"))},[t,o.pathname]),e.useEffect(()=>{var e;t&&(null==(e=window.parent)||e.postMessage({type:"IFRAME_NAVIGATION_ITEMS",items:n},"*"))},[t,n]),e.useEffect(()=>{var e;if(!t)return;const n=e=>{if(!Bg(e.origin))return;const t=e.data;t&&"object"==typeof t&&"NAVIGATE"===t.type&&"string"==typeof t.path&&r(t.path,{replace:!!t.replace,state:t.state})};return window.addEventListener("message",n),null==(e=window.parent)||e.postMessage({type:"IFRAME_NAVIGATION_READY"},"*"),()=>{var e;window.removeEventListener("message",n),null==(e=window.parent)||e.postMessage({type:"IFRAME_NAVIGATION_DISPOSED"},"*")}},[t,r]),null};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var my,fy,gy=(my=function(e,t){var n;e.exports=(n={attachTo:function(e,t){if(void 0!==e.scannerDetectionData)throw new Error("onScan.js is already initialized for DOM element "+e);return t=this._mergeOptions({onScan:function(e,t){},onScanError:function(e){},onKeyProcess:function(e,t){},onKeyDetect:function(e,t){},onPaste:function(e,t){},keyCodeMapper:function(e){return n.decodeKeyEvent(e)},onScanButtonLongPress:function(){},scanButtonKeyCode:!1,scanButtonLongPressTime:500,timeBeforeScanTest:100,avgTimeByChar:30,minLength:6,suffixKeyCodes:[9,13],prefixKeyCodes:[],ignoreIfFocusOn:!1,stopPropagation:!1,preventDefault:!1,captureEvents:!1,reactToKeydown:!0,reactToPaste:!1,singleScanQty:1},t),e.scannerDetectionData={options:t,vars:{firstCharTime:0,lastCharTime:0,accumulatedString:"",testTimer:!1,longPressTimeStart:0,longPressed:!1}},!0===t.reactToPaste&&e.addEventListener("paste",this._handlePaste,t.captureEvents),!1!==t.scanButtonKeyCode&&e.addEventListener("keyup",this._handleKeyUp,t.captureEvents),!0!==t.reactToKeydown&&!1===t.scanButtonKeyCode||e.addEventListener("keydown",this._handleKeyDown,t.captureEvents),this},detachFrom:function(e){e.scannerDetectionData.options.reactToPaste&&e.removeEventListener("paste",this._handlePaste),!1!==e.scannerDetectionData.options.scanButtonKeyCode&&e.removeEventListener("keyup",this._handleKeyUp),e.removeEventListener("keydown",this._handleKeyDown),e.scannerDetectionData=void 0},getOptions:function(e){return e.scannerDetectionData.options},setOptions:function(e,t){switch(e.scannerDetectionData.options.reactToPaste){case!0:!1===t.reactToPaste&&e.removeEventListener("paste",this._handlePaste);break;case!1:!0===t.reactToPaste&&e.addEventListener("paste",this._handlePaste)}return!1===e.scannerDetectionData.options.scanButtonKeyCode?!1!==t.scanButtonKeyCode&&e.addEventListener("keyup",this._handleKeyUp):!1===t.scanButtonKeyCode&&e.removeEventListener("keyup",this._handleKeyUp),e.scannerDetectionData.options=this._mergeOptions(e.scannerDetectionData.options,t),this._reinitialize(e),this},decodeKeyEvent:function(e){var t=this._getNormalizedKeyNum(e);switch(!0){case t>=48&&t<=90:case t>=106&&t<=111:if(void 0!==e.key&&""!==e.key)return e.key;var n=String.fromCharCode(t);switch(e.shiftKey){case!1:n=n.toLowerCase();break;case!0:n=n.toUpperCase()}return n;case t>=96&&t<=105:return t-96+0}return""},simulate:function(e,t){return this._reinitialize(e),Array.isArray(t)?t.forEach(function(e){var t={};"object"!=typeof e&&"function"!=typeof e||null===e?t.keyCode=parseInt(e):t=e;var n=new KeyboardEvent("keydown",t);document.dispatchEvent(n)}):this._validateScanCode(e,t),this},_reinitialize:function(e){var t=e.scannerDetectionData.vars;t.firstCharTime=0,t.lastCharTime=0,t.accumulatedString=""},_isFocusOnIgnoredElement:function(e){var t=e.scannerDetectionData.options.ignoreIfFocusOn;if(!t)return!1;var n=document.activeElement;if(Array.isArray(t)){for(var r=0;r<t.length;r++)if(!0===n.matches(t[r]))return!0}else if(n.matches(t))return!0;return!1},_validateScanCode:function(e,t){var r,o=e.scannerDetectionData,s=o.options,i=o.options.singleScanQty,a=o.vars.firstCharTime,c=o.vars.lastCharTime,l={};switch(!0){case t.length<s.minLength:l={message:"Receieved code is shorter then minimal length"};break;case c-a>t.length*s.avgTimeByChar:l={message:"Receieved code was not entered in time"};break;default:return s.onScan.call(e,t,i),r=new CustomEvent("scan",{detail:{scanCode:t,qty:i}}),e.dispatchEvent(r),n._reinitialize(e),!0}return l.scanCode=t,l.scanDuration=c-a,l.avgTimeByChar=s.avgTimeByChar,l.minLength=s.minLength,s.onScanError.call(e,l),r=new CustomEvent("scanError",{detail:l}),e.dispatchEvent(r),n._reinitialize(e),!1},_mergeOptions:function(e,t){var n,r={};for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r},_getNormalizedKeyNum:function(e){return e.which||e.keyCode},_handleKeyDown:function(e){var t=n._getNormalizedKeyNum(e),r=this.scannerDetectionData.options,o=this.scannerDetectionData.vars,s=!1;if(!1!==r.onKeyDetect.call(this,t,e)&&!n._isFocusOnIgnoredElement(this))if(!1===r.scanButtonKeyCode||t!=r.scanButtonKeyCode){switch(!0){case o.firstCharTime&&-1!==r.suffixKeyCodes.indexOf(t):e.preventDefault(),e.stopImmediatePropagation(),s=!0;break;case!o.firstCharTime&&-1!==r.prefixKeyCodes.indexOf(t):e.preventDefault(),e.stopImmediatePropagation(),s=!1;break;default:var i=r.keyCodeMapper.call(this,e);if(null===i)return;o.accumulatedString+=i,r.preventDefault&&e.preventDefault(),r.stopPropagation&&e.stopImmediatePropagation(),s=!1}o.firstCharTime||(o.firstCharTime=Date.now()),o.lastCharTime=Date.now(),o.testTimer&&clearTimeout(o.testTimer),s?(n._validateScanCode(this,o.accumulatedString),o.testTimer=!1):o.testTimer=setTimeout(n._validateScanCode,r.timeBeforeScanTest,this,o.accumulatedString),r.onKeyProcess.call(this,i,e)}else o.longPressed||(o.longPressTimer=setTimeout(r.onScanButtonLongPress,r.scanButtonLongPressTime,this),o.longPressed=!0)},_handlePaste:function(e){var t=this.scannerDetectionData.options,r=this.scannerDetectionData.vars,o=(event.clipboardData||window.clipboardData).getData("text");n._isFocusOnIgnoredElement(this)||(e.preventDefault(),t.stopPropagation&&e.stopImmediatePropagation(),t.onPaste.call(this,o,event),r.firstCharTime=0,r.lastCharTime=0,n._validateScanCode(this,o))},_handleKeyUp:function(e){n._isFocusOnIgnoredElement(this)||n._getNormalizedKeyNum(e)==this.scannerDetectionData.options.scanButtonKeyCode&&(clearTimeout(this.scannerDetectionData.vars.longPressTimer),this.scannerDetectionData.vars.longPressed=!1)},isScanInProgressFor:function(e){return e.scannerDetectionData.vars.firstCharTime>0},isAttachedTo:function(e){return void 0!==e.scannerDetectionData}},n)},my(fy={exports:{}}),fy.exports);const yy=n=>{let{scope:r,redirectPath:o,onSuccess:i,onFailure:c,onCancel:l,storeSession:u,title:d,"data-testid":p}=n;const[h,m]=e.useState(""),[f,g]=e.useState(""),{releaseVersion:y,releasePageLink:b}=e.useContext(ty),v=a.useNavigate(),{t:_}=t.useTranslation(),S=function(e){try{return Promise.resolve(qm.authorize(pm({scope:r},e),u)).then(function(e){e?(i&&"function"==typeof i&&i(e),g(""),v(o)):c&&"function"==typeof c&&c()})}catch(e){return Promise.reject(e)}};e.useEffect(()=>(gy.attachTo(document,{suffixKeyCodes:[13],onScan:function(e){m(""),g(""),S({username:"code",password:e})}}),()=>{gy.detachFrom(document)}),[]);const k=function(e){try{return e.preventDefault(),S({username:h,password:f}),Promise.resolve()}catch(e){return Promise.reject(e)}};/*#__PURE__*/return q.default.createElement("form",{onSubmit:k,"data-testid":p||"ac-sdk-login-form"},/*#__PURE__*/q.default.createElement(s.Box,{m:"0 80px"},/*#__PURE__*/q.default.createElement(s.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,m:"100px 0"},/*#__PURE__*/q.default.createElement(wy,null),y&&/*#__PURE__*/q.default.createElement(s.Link,{href:b,target:"_blank",fontSize:"14px",sx:{display:"flex",alignItems:"center",gap:.5,textDecoration:"none","&:hover":{cursor:"pointer",opacity:.8}}},/*#__PURE__*/q.default.createElement("img",{src:oe.default,alt:"info",width:"14px",height:"14px"}),_("release")," ",y)),/*#__PURE__*/q.default.createElement(s.Box,{m:"0 0 30px 0",color:"rgba(255, 255, 255, 0.6)"},/*#__PURE__*/q.default.createElement(s.Typography,{align:"center",color:"inherit"},d)),/*#__PURE__*/q.default.createElement(s.Box,{m:"0",display:"grid",sx:{gridGap:"18px"},gridTemplateColumns:"1fr"},/*#__PURE__*/q.default.createElement(s.FormControl,{fullWidth:!0},/*#__PURE__*/q.default.createElement(s.TextField,{autoFocus:!0,fullWidth:!0,variant:"outlined",label:_("loginCardUsernameHint"),onChange:e=>{m(e.target.value)},value:h,id:"login-input",inputProps:{"data-testid":"ac-sdk-login-form-username-input"}})),/*#__PURE__*/q.default.createElement(s.FormControl,{fullWidth:!0},/*#__PURE__*/q.default.createElement(s.TextField,{fullWidth:!0,variant:"outlined",label:_("loginCardPasswordHint"),onChange:e=>{g(e.target.value)},value:f,type:"password",id:"password-input",inputProps:{"data-testid":"ac-sdk-login-form-password-input"}})),/*#__PURE__*/q.default.createElement(w.LoadingButton,{id:"login-button",type:"submit",variant:"contained",size:"large",color:"primary",onClick:k,loading:qm.loading,"data-testid":"ac-sdk-login-form-submit-button"},_("loginCardSubmitButton")),/*#__PURE__*/q.default.createElement(s.Button,{id:"cancel-button",type:"button",variant:"outlined",size:"large",color:"secondary",onClick:e=>{l&&"function"==typeof l?l():v("/")},"data-testid":"ac-sdk-login-form-cancel-button"},_("loginCardCancelButton"))),/*#__PURE__*/q.default.createElement(s.Box,{m:"30px 0 40px 0",color:"rgba(255, 255, 255, 0.6)"},/*#__PURE__*/q.default.createElement(s.Typography,{align:"center",color:"inherit"},"or scan")),/*#__PURE__*/q.default.createElement(s.Box,{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",alignItems:"center",justifyItems:"center",marginBottom:"30px"},/*#__PURE__*/q.default.createElement(s.Box,{style:{filter:"brightness(0.5)"}},/*#__PURE__*/q.default.createElement(vy,null)),/*#__PURE__*/q.default.createElement(_y,null),/*#__PURE__*/q.default.createElement(s.Box,{style:{filter:"brightness(0.5)"}},/*#__PURE__*/q.default.createElement(Sy,null)))))};yy.propTypes={scope:p.PropTypes.string,redirectPath:p.PropTypes.string,onSuccess:p.PropTypes.func,onFailure:p.PropTypes.func,onCancel:p.PropTypes.func,storeSession:p.PropTypes.bool},yy.defaultProps={redirectPath:"/",storeSession:!0};var by=d.observer(yy);const vy=()=>/*#__PURE__*/q.default.createElement("svg",{width:"51",height:"53",viewBox:"0 0 51 53",fill:"none",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/q.default.createElement("path",{d:"M8.66868 45.6365C8.66868 42.8453 6.99822 41.1535 4.7397 41.1535C2.47266 41.1535 0.806463 42.8453 0.806463 45.6365C0.806463 48.4234 2.47266 50.1194 4.7397 50.1194C5.3022 50.1194 5.82635 50.0172 6.2951 49.8169L7.04084 50.7842H8.38743L7.21129 49.2501C8.1147 48.4873 8.66868 47.243 8.66868 45.6365ZM4.29652 47.1706L5.53658 48.7984C5.28942 48.8794 5.02095 48.9177 4.7397 48.9177C3.23544 48.9177 2.1147 47.7629 2.1147 45.6365C2.1147 43.5101 3.23544 42.3552 4.7397 42.3552C6.2397 42.3552 7.3647 43.5101 7.3647 45.6365C7.3647 46.8297 7.01101 47.7203 6.43146 48.2657L5.59197 47.1706H4.29652ZM10.3104 50.0001H11.6271V46.6976H13.4169C13.4467 46.6976 13.4723 46.6976 13.5021 46.6976L15.2749 50.0001H16.7749L14.8402 46.4675C15.9098 46.0711 16.4425 45.1805 16.4425 44.0086C16.4425 42.4021 15.4453 41.2728 13.4212 41.2728H10.3104V50.0001ZM11.6271 45.564V42.4021H13.2805C14.5803 42.4021 15.1172 43.02 15.1172 44.0086C15.1172 44.993 14.5803 45.564 13.2976 45.564H11.6271ZM28.4691 44.1109C28.1708 42.2444 26.7092 41.1535 24.864 41.1535C22.6055 41.1535 20.9393 42.8453 20.9393 45.6365C20.9393 48.4277 22.5969 50.1194 24.864 50.1194C26.7816 50.1194 28.1836 48.9177 28.4691 47.1919L27.1396 47.1876C26.9137 48.3041 25.9762 48.9177 24.8725 48.9177C23.3768 48.9177 22.2475 47.7714 22.2475 45.6365C22.2475 43.5186 23.3725 42.3552 24.8768 42.3552C25.989 42.3552 26.9222 42.9817 27.1396 44.1109H28.4691ZM32.6996 50.1322C34.5447 50.1322 35.7507 48.7814 35.7507 46.7572C35.7507 44.7203 34.5447 43.3694 32.6996 43.3694C30.8544 43.3694 29.6484 44.7203 29.6484 46.7572C29.6484 48.7814 30.8544 50.1322 32.6996 50.1322ZM32.7038 49.0626C31.4979 49.0626 30.9354 48.0101 30.9354 46.753C30.9354 45.5001 31.4979 44.4348 32.7038 44.4348C33.9013 44.4348 34.4638 45.5001 34.4638 46.753C34.4638 48.0101 33.9013 49.0626 32.7038 49.0626ZM39.6232 50.128C40.8164 50.128 41.2852 49.3993 41.5153 48.9817H41.6218V50.0001H42.8661V41.2728H41.592V44.5157H41.5153C41.2852 44.1109 40.8505 43.3694 39.6317 43.3694C38.0508 43.3694 36.8874 44.618 36.8874 46.7402C36.8874 48.8581 38.0337 50.128 39.6232 50.128ZM39.9045 49.0413C38.7667 49.0413 38.1744 48.0399 38.1744 46.7274C38.1744 45.4277 38.7539 44.4518 39.9045 44.4518C41.0167 44.4518 41.6133 45.3595 41.6133 46.7274C41.6133 48.1038 41.0039 49.0413 39.9045 49.0413ZM47.5057 50.1322C48.9332 50.1322 49.9432 49.4291 50.233 48.3638L49.027 48.1464C48.7969 48.7643 48.2429 49.0797 47.5185 49.0797C46.4276 49.0797 45.6946 48.3723 45.6605 47.1109H50.3139V46.6592C50.3139 44.2942 48.8991 43.3694 47.4162 43.3694C45.5923 43.3694 44.3906 44.7586 44.3906 46.77C44.3906 48.8027 45.5753 50.1322 47.5057 50.1322ZM45.6648 46.1564C45.7159 45.2274 46.3892 44.422 47.4247 44.422C48.4134 44.422 49.0611 45.155 49.0653 46.1564H45.6648Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("g",{clipPath:"url(#clip0_2183_35009)"},/*#__PURE__*/q.default.createElement("path",{d:"M22.3002 3.27948H14.25V11.3318H22.3002V3.27948ZM20.6609 9.66275H15.9186V4.91923H20.6609V9.66275Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M19.1081 6.47128H17.4688V8.11102H19.1081V6.47128Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M14.2773 24.7206H22.3275V16.7122H14.2773V24.7206ZM15.9166 18.3373H20.6589V23.0809H15.9166V18.3373Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M35.7147 17.5176H34.0754V23.081H32.4653V21.8366H30.826V23.0591H28.8281V24.6988H35.7147V17.5176Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M19.1081 19.8893H17.4688V21.529H19.1081V19.8893Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M35.7142 3.27948H27.6641V11.3318H35.7142V3.27948ZM34.0749 9.66275H29.318V4.91923H34.0603L34.0749 9.66275Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M32.5221 6.47128H30.8828V8.11102H32.5221V6.47128Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M22.3014 13.184H17.5664V14.8237H22.3014V13.184Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M15.9167 13.184H14.2773V14.8237H15.9167V13.184Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M30.041 13.184H23.9375V14.8237H30.041V13.184Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M35.7121 15.8778V13.1766H31.6797V14.8237H34.0728V15.8778H35.7121Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M25.819 6.56622H24.1797V11.3024H25.819V6.56622Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M25.819 3.27948H24.1797V4.91922H25.819V3.27948Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M25.82 21.4338H27.0348V19.7941H25.82V16.7122H24.1953V24.7645H27.1958V23.0809H25.8346L25.82 21.4338Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M29.1874 19.5598H30.8267V18.3373H32.1587V16.7122H27.8555V18.352H29.1874V19.5598Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M33.2539 6.42268e-05V1.6398H37.3668V5.73182H39.0061V-0.00726318L33.2539 6.42268e-05Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M12.6408 1.63985H16.7391V0.00012207H11.0234V5.73188H12.6627L12.6408 1.63985Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M37.3678 26.3603H33.2695V28.0001H39.0071V22.261H37.3678V26.3603Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M12.6408 22.261H11.0234V28.0001H16.761V26.3603H12.6627L12.6408 22.261Z",fill:"white",fillOpacity:"0.35"})),/*#__PURE__*/q.default.createElement("defs",null,/*#__PURE__*/q.default.createElement("clipPath",{id:"clip0_2183_35009"},/*#__PURE__*/q.default.createElement("rect",{width:"28",height:"28",fill:"white",transform:"translate(11 0.00012207)"})))),_y=()=>/*#__PURE__*/q.default.createElement("svg",{width:"52",height:"49",viewBox:"0 0 52 49",fill:"none",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/q.default.createElement("path",{d:"M1.42951 46.0001H4.77468C6.80309 46.0001 7.71928 44.9902 7.71928 43.6521C7.71928 42.3013 6.77326 41.5385 5.9082 41.4916V41.4064C6.70934 41.2018 7.37837 40.6564 7.37837 39.5655C7.37837 38.2743 6.48349 37.2728 4.62553 37.2728H1.42951V46.0001ZM2.74627 44.8709V42.0754H4.69371C5.75053 42.0754 6.41104 42.7572 6.41104 43.5882C6.41104 44.3211 5.91246 44.8709 4.64684 44.8709H2.74627ZM2.74627 41.0484V38.3936H4.54457C5.5886 38.3936 6.08718 38.9433 6.08718 39.6677C6.08718 40.5115 5.39684 41.0484 4.51048 41.0484H2.74627ZM11.0836 46.145C12.166 46.145 12.7754 45.5953 13.0183 45.1052H13.0694V46.0001H14.3137V41.6535C14.3137 39.7487 12.8137 39.3694 11.774 39.3694C10.5893 39.3694 9.4984 39.8467 9.07227 41.0399L10.2697 41.3126C10.4572 40.8481 10.9345 40.4007 11.791 40.4007C12.6135 40.4007 13.0353 40.8311 13.0353 41.5726V41.6024C13.0353 42.0669 12.5581 42.0584 11.3819 42.1947C10.1419 42.3396 8.87198 42.6635 8.87198 44.1507C8.87198 45.4376 9.83931 46.145 11.0836 46.145ZM11.3606 45.1223C10.6404 45.1223 10.1206 44.7984 10.1206 44.1677C10.1206 43.4859 10.7257 43.243 11.4629 43.145C11.8762 43.0896 12.8564 42.9788 13.0396 42.7956V43.6393C13.0396 44.4149 12.4217 45.1223 11.3606 45.1223ZM16.0108 46.0001H17.285V42.003C17.285 41.1464 17.9455 40.5285 18.8489 40.5285C19.1131 40.5285 19.4114 40.5754 19.5137 40.6052V39.3865C19.3858 39.3694 19.1344 39.3567 18.9725 39.3567C18.2054 39.3567 17.5492 39.7913 17.3105 40.4944H17.2424V39.4547H16.0108V46.0001ZM26.5492 46.1322C28.0961 46.1322 29.0975 45.2032 29.2381 43.9291H27.998C27.8361 44.6365 27.2864 45.0541 26.5577 45.0541C25.4796 45.0541 24.785 44.155 24.785 42.7274C24.785 41.3254 25.4924 40.4433 26.5577 40.4433C27.3674 40.4433 27.8617 40.9547 27.998 41.5683H29.2381C29.1017 40.2473 28.0236 39.3694 26.5364 39.3694C24.6912 39.3694 23.498 40.7586 23.498 42.7572C23.498 44.7302 24.6486 46.1322 26.5492 46.1322ZM33.3578 46.1322C35.2029 46.1322 36.4089 44.7814 36.4089 42.7572C36.4089 40.7203 35.2029 39.3694 33.3578 39.3694C31.5126 39.3694 30.3066 40.7203 30.3066 42.7572C30.3066 44.7814 31.5126 46.1322 33.3578 46.1322ZM33.362 45.0626C32.1561 45.0626 31.5936 44.0101 31.5936 42.753C31.5936 41.5001 32.1561 40.4348 33.362 40.4348C34.5595 40.4348 35.122 41.5001 35.122 42.753C35.122 44.0101 34.5595 45.0626 33.362 45.0626ZM40.2814 46.128C41.4746 46.128 41.9434 45.3993 42.1735 44.9817H42.28V46.0001H43.5243V37.2728H42.2502V40.5157H42.1735C41.9434 40.1109 41.5087 39.3694 40.29 39.3694C38.709 39.3694 37.5456 40.618 37.5456 42.7402C37.5456 44.8581 38.6919 46.128 40.2814 46.128ZM40.5627 45.0413C39.4249 45.0413 38.8326 44.0399 38.8326 42.7274C38.8326 41.4277 39.4121 40.4518 40.5627 40.4518C41.6749 40.4518 42.2715 41.3595 42.2715 42.7274C42.2715 44.1038 41.6621 45.0413 40.5627 45.0413ZM48.1639 46.1322C49.5914 46.1322 50.6014 45.4291 50.8912 44.3638L49.6852 44.1464C49.4551 44.7643 48.9011 45.0797 48.1767 45.0797C47.0858 45.0797 46.3528 44.3723 46.3187 43.1109H50.9721V42.6592C50.9721 40.2942 49.5574 39.3694 48.0744 39.3694C46.2505 39.3694 45.0488 40.7586 45.0488 42.77C45.0488 44.8027 46.2335 46.1322 48.1639 46.1322ZM46.323 42.1564C46.3741 41.2274 47.0474 40.422 48.0829 40.422C49.0716 40.422 49.7193 41.155 49.7235 42.1564H46.323Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("g",{clipPath:"url(#clip0_2183_35008)"},/*#__PURE__*/q.default.createElement("path",{d:"M47 9.00012H7V10.0001H47V9.00012Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M43 0.00012207H42V7.00012H43V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M43 12.0001H42V19.0001H43V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M41 12.0001H39V19.0001H41V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M41 0.00012207H39V7.00012H41V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M38 0.00012207H35V7.00012H38V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M38 12.0001H35V19.0001H38V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M33 12.0001H31V19.0001H33V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M33 0.00012207H31V7.00012H33V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M30 0.00012207H28V7.00012H30V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M30 12.0001H28V19.0001H30V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M27 0.00012207H26V7.00012H27V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M27 12.0001H26V19.0001H27V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M25 0.00012207H24V7.00012H25V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M25 12.0001H24V19.0001H25V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M23 0.00012207H20V7.00012H23V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M23 12.0001H20V19.0001H23V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M18 0.00012207H16V7.00012H18V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M18 12.0001H16V19.0001H18V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M15 12.0001H14V19.0001H15V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M15 0.00012207H14V7.00012H15V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M13 0.00012207H10V7.00012H13V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("path",{d:"M13 12.0001H10V19.0001H13V12.0001Z",fill:"white",fillOpacity:"0.35"})),/*#__PURE__*/q.default.createElement("defs",null,/*#__PURE__*/q.default.createElement("clipPath",{id:"clip0_2183_35008"},/*#__PURE__*/q.default.createElement("rect",{width:"40",height:"20",fill:"white",transform:"translate(7 0.00012207)"})))),Sy=()=>/*#__PURE__*/q.default.createElement("svg",{width:"58",height:"49",viewBox:"0 0 58 49",fill:"none",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/q.default.createElement("path",{d:"M1.27131 46.0001H2.58807V42.6976H4.37784C4.40767 42.6976 4.43324 42.6976 4.46307 42.6976L6.2358 46.0001H7.7358L5.80114 42.4675C6.87074 42.0711 7.40341 41.1805 7.40341 40.0086C7.40341 38.4021 6.40625 37.2728 4.3821 37.2728H1.27131V46.0001ZM2.58807 41.564V38.4021H4.24148C5.54119 38.4021 6.07812 39.02 6.07812 40.0086C6.07812 40.993 5.54119 41.564 4.25852 41.564H2.58807ZM10.3224 37.2728H9.00568V46.0001H10.3224V37.2728ZM12.2401 46.0001H13.5568V42.1947H17.2642V41.0655H13.5568V38.4064H17.652V37.2728H12.2401V46.0001ZM22.0966 46.0001C24.7557 46.0001 26.294 44.351 26.294 41.6237C26.294 38.9092 24.7557 37.2728 22.1861 37.2728H19.2713V46.0001H22.0966ZM20.5881 44.8496V38.4234H22.1051C24.0142 38.4234 24.9986 39.5655 24.9986 41.6237C24.9986 43.6905 24.0142 44.8496 22.0241 44.8496H20.5881ZM38.3558 40.1109C38.0575 38.2444 36.5959 37.1535 34.7507 37.1535C32.4922 37.1535 30.826 38.8453 30.826 41.6365C30.826 44.4277 32.4837 46.1194 34.7507 46.1194C36.6683 46.1194 38.0703 44.9177 38.3558 43.1919L37.0263 43.1876C36.8004 44.3041 35.8629 44.9177 34.7592 44.9177C33.2635 44.9177 32.1342 43.7714 32.1342 41.6365C32.1342 39.5186 33.2592 38.3552 34.7635 38.3552C35.8757 38.3552 36.8089 38.9817 37.0263 40.1109H38.3558ZM41.734 46.145C42.8164 46.145 43.4258 45.5953 43.6687 45.1052H43.7198V46.0001H44.9641V41.6535C44.9641 39.7487 43.4641 39.3694 42.4244 39.3694C41.2397 39.3694 40.1488 39.8467 39.7227 41.0399L40.9201 41.3126C41.1076 40.8481 41.5849 40.4007 42.4414 40.4007C43.2638 40.4007 43.6857 40.8311 43.6857 41.5726V41.6024C43.6857 42.0669 43.2085 42.0584 42.0323 42.1947C40.7923 42.3396 39.5224 42.6635 39.5224 44.1507C39.5224 45.4376 40.4897 46.145 41.734 46.145ZM42.011 45.1223C41.2908 45.1223 40.771 44.7984 40.771 44.1677C40.771 43.4859 41.3761 43.243 42.1133 43.145C42.5266 43.0896 43.5067 42.9788 43.69 42.7956V43.6393C43.69 44.4149 43.0721 45.1223 42.011 45.1223ZM46.6612 46.0001H47.9354V42.003C47.9354 41.1464 48.5959 40.5285 49.4993 40.5285C49.7635 40.5285 50.0618 40.5754 50.1641 40.6052V39.3865C50.0362 39.3694 49.7848 39.3567 49.6229 39.3567C48.8558 39.3567 48.1996 39.7913 47.9609 40.4944H47.8928V39.4547H46.6612V46.0001ZM53.4826 46.128C54.6758 46.128 55.1445 45.3993 55.3746 44.9817H55.4812V46.0001H56.7255V37.2728H55.4513V40.5157H55.3746C55.1445 40.1109 54.7099 39.3694 53.4911 39.3694C51.9102 39.3694 50.7468 40.618 50.7468 42.7402C50.7468 44.8581 51.8931 46.128 53.4826 46.128ZM53.7638 45.0413C52.6261 45.0413 52.0337 44.0399 52.0337 42.7274C52.0337 41.4277 52.6133 40.4518 53.7638 40.4518C54.8761 40.4518 55.4727 41.3595 55.4727 42.7274C55.4727 44.1038 54.8633 45.0413 53.7638 45.0413Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/q.default.createElement("g",{clipPath:"url(#clip0_2183_35036)"},/*#__PURE__*/q.default.createElement("path",{d:"M19.5998 19.9927H38.3927C40.7673 19.9927 41.9924 18.8037 41.9924 16.5215V3.47133C41.9924 1.1892 40.7673 0.00012207 38.3927 0.00012207H19.5998C17.2251 0.00012207 16 1.17443 16 3.47133V16.5215C16 18.8037 17.2251 19.9927 19.5998 19.9927ZM19.7283 17.8953C19.5129 17.9222 19.294 17.9003 19.0886 17.8313C18.8832 17.7623 18.6969 17.648 18.544 17.4973C18.3911 17.3466 18.2759 17.1635 18.2072 16.9623C18.1385 16.761 18.1181 16.547 18.1478 16.3369V3.64857C18.1197 3.43872 18.1411 3.22539 18.2104 3.02486C18.2796 2.82432 18.3949 2.6419 18.5474 2.49154C18.6999 2.34118 18.8856 2.22684 19.0903 2.15729C19.295 2.08774 19.5132 2.06481 19.7283 2.09024H38.2641C38.4792 2.06481 38.6975 2.08774 38.9022 2.15729C39.1068 2.22684 39.2925 2.34118 39.445 2.49154C39.5975 2.6419 39.7128 2.82432 39.7821 3.02486C39.8513 3.22539 39.8728 3.43872 39.8447 3.64857V16.3369C39.8728 16.5468 39.8513 16.7601 39.7821 16.9606C39.7128 17.1612 39.5975 17.3436 39.445 17.494C39.2925 17.6443 39.1068 17.7586 38.9022 17.8282C38.6975 17.8977 38.4792 17.9207 38.2641 17.8953H19.7283ZM24.5759 9.93366C24.9027 9.92527 25.2245 9.85291 25.5221 9.72085C25.8197 9.58879 26.0872 9.39974 26.3086 9.16488C26.5301 8.93003 26.701 8.65415 26.8112 8.3536C26.9215 8.05305 26.9689 7.73395 26.9505 7.41519C26.9123 6.96482 26.7407 6.53505 26.4565 6.1784C26.1723 5.82175 25.7879 5.55367 25.3502 5.40689C24.9125 5.26012 24.4405 5.24101 23.9919 5.3519C23.5433 5.46279 23.1375 5.69889 22.8241 6.03133C22.5106 6.36378 22.3031 6.77819 22.2269 7.22393C22.1506 7.66967 22.2089 8.12746 22.3947 8.54135C22.5805 8.95524 22.8858 9.3073 23.2731 9.55456C23.6605 9.80182 24.1132 9.93355 24.5759 9.93366ZM31.6091 6.54371H37.3112C37.4038 6.54577 37.4958 6.52936 37.5817 6.49548C37.6676 6.46159 37.7455 6.41095 37.8106 6.34665C37.8757 6.28235 37.9268 6.20575 37.9605 6.12153C37.9943 6.03731 38.0101 5.94725 38.007 5.85686C38.008 5.76802 37.9907 5.67989 37.9559 5.5978C37.9211 5.51571 37.8697 5.44134 37.8047 5.37922C37.7396 5.31709 37.6624 5.2685 37.5776 5.23634C37.4927 5.20419 37.4021 5.18914 37.3112 5.19214H31.6469C31.556 5.18914 31.4654 5.20419 31.3806 5.23634C31.2958 5.2685 31.2185 5.31709 31.1535 5.37922C31.0885 5.44134 31.037 5.51571 31.0022 5.5978C30.9674 5.67989 30.9501 5.76802 30.9511 5.85686C30.948 5.94725 30.9638 6.03731 30.9976 6.12153C31.0313 6.20575 31.0824 6.28235 31.1475 6.34665C31.2126 6.41095 31.2905 6.46159 31.3764 6.49548C31.4623 6.52936 31.5543 6.54577 31.6469 6.54371H31.6091ZM31.6091 10.6796H37.3112C37.4957 10.6796 37.6727 10.608 37.8032 10.4806C37.9337 10.3532 38.007 10.1803 38.007 10.0001C38.007 9.81992 37.9337 9.64709 37.8032 9.51967C37.6727 9.39224 37.4957 9.32065 37.3112 9.32065H31.6469C31.4624 9.32065 31.2854 9.39224 31.1549 9.51967C31.0245 9.64709 30.9511 9.81992 30.9511 10.0001C30.9511 10.1803 31.0245 10.3532 31.1549 10.4806C31.2854 10.608 31.4624 10.6796 31.6469 10.6796H31.6091ZM20.4392 14.8081H28.7126C28.796 14.8129 28.8794 14.7998 28.9571 14.7699C29.0347 14.74 29.1048 14.6939 29.1624 14.6349C29.22 14.5758 29.2637 14.5052 29.2905 14.428C29.3173 14.3508 29.3265 14.2688 29.3176 14.1877C29.3176 13.1907 27.8051 10.6501 24.5759 10.6501C21.3467 10.6501 19.8494 13.1907 19.8494 14.1877C19.8394 14.2678 19.8473 14.3489 19.8728 14.4256C19.8983 14.5023 19.9406 14.5726 19.9967 14.6317C20.0529 14.6908 20.1216 14.7372 20.198 14.7677C20.2745 14.7981 20.3567 14.8119 20.4392 14.8081ZM31.6091 14.8081H37.3112C37.4021 14.8111 37.4927 14.7961 37.5776 14.7639C37.6624 14.7318 37.7396 14.6832 37.8047 14.621C37.8697 14.5589 37.9211 14.4846 37.9559 14.4025C37.9907 14.3204 38.008 14.2322 38.007 14.1434C38.009 14.0529 37.9925 13.963 37.9584 13.8789C37.9243 13.7947 37.8734 13.718 37.8086 13.6534C37.7438 13.5887 37.6664 13.5373 37.581 13.5023C37.4956 13.4672 37.4039 13.4492 37.3112 13.4492H31.6469C31.5542 13.4492 31.4625 13.4672 31.3771 13.5023C31.2917 13.5373 31.2143 13.5887 31.1495 13.6534C31.0847 13.718 31.0338 13.7947 30.9997 13.8789C30.9656 13.963 30.9491 14.0529 30.9511 14.1434C30.9501 14.2322 30.9674 14.3204 31.0022 14.4025C31.037 14.4846 31.0885 14.5589 31.1535 14.621C31.2185 14.6832 31.2958 14.7318 31.3806 14.7639C31.4654 14.7961 31.556 14.8111 31.6469 14.8081H31.6091Z",fill:"white",fillOpacity:"0.35"})),/*#__PURE__*/q.default.createElement("defs",null,/*#__PURE__*/q.default.createElement("clipPath",{id:"clip0_2183_35036"},/*#__PURE__*/q.default.createElement("rect",{width:"26",height:"20",fill:"white",transform:"translate(16 0.00012207)"})))),wy=()=>/*#__PURE__*/q.default.createElement("svg",{width:"98",height:"50",viewBox:"0 0 98 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/q.default.createElement("g",{opacity:"0.25"},/*#__PURE__*/q.default.createElement("path",{d:"M66.8428 0.85791C66.2106 2.00303 65.7681 3.21177 65.3888 4.48413C64.883 4.54775 64.4405 4.61136 63.998 4.67498C63.5555 4.80222 63.0497 4.92945 62.6072 5.05669C61.8486 4.0388 61.0267 3.08453 60.0784 2.19388C59.4463 2.51197 58.8141 2.83006 58.1819 3.27539C58.3716 4.54774 58.6876 5.8201 59.1302 7.09246C58.7509 7.41055 58.4348 7.72864 58.1187 8.11034C57.8026 8.49205 57.4865 8.81014 57.2336 9.25547C56.0325 8.87376 54.7681 8.55567 53.5038 8.42843C53.1245 9.06461 52.8716 9.76441 52.6187 10.4006C53.5038 11.3549 54.5153 12.1819 55.59 12.8817C55.3371 13.8359 55.2107 14.7902 55.2739 15.7445C54.0727 16.1262 52.8716 16.6351 51.7969 17.2713C51.8601 17.9711 51.9865 18.7345 52.2394 19.4343C53.5038 19.6888 54.8313 19.7524 56.0957 19.6888C56.2854 20.1341 56.475 20.5794 56.7279 20.9611C56.9808 21.4065 57.2336 21.7882 57.4865 22.1699C56.7279 23.1878 56.0957 24.3329 55.5267 25.478C56.0325 25.987 56.5382 26.4959 57.1072 26.9412C58.2451 26.3687 59.383 25.6689 60.3945 24.8418C60.7738 25.0963 61.2164 25.3508 61.6589 25.5416C62.1014 25.7325 62.544 25.9233 62.9865 26.0506C62.9865 27.3229 63.1129 28.5953 63.3658 29.8676C64.0612 29.9949 64.8198 30.1221 65.5152 30.1221C66.1474 28.977 66.5899 27.7683 66.9692 26.4959C67.475 26.4323 67.9175 26.3687 68.36 26.305C68.8026 26.1778 69.3083 26.0506 69.7508 25.9233C70.5094 26.9412 71.3313 27.8955 72.2796 28.7861C72.9117 28.4681 73.5439 28.15 74.1761 27.7046C73.9864 26.4323 73.6704 25.1599 73.2278 23.8876C73.6071 23.5695 73.9232 23.2514 74.2393 22.8697C74.5554 22.488 74.8715 22.1699 75.1244 21.7246C76.3255 22.1063 77.5899 22.4244 78.8543 22.5516C79.2336 21.9154 79.4864 21.2156 79.7393 20.5794C78.8542 19.6252 77.8428 18.7981 76.7681 18.0983C77.0209 17.1441 77.1474 16.1898 77.0841 15.2355C78.2853 14.8538 79.4864 14.3449 80.5611 13.7087C80.4979 13.0089 80.3715 12.2455 80.1186 11.5457C78.8543 11.2912 77.5267 11.2276 76.2623 11.2912C76.0727 10.8459 75.883 10.4006 75.6301 10.0189C75.3773 9.57355 75.1244 9.19185 74.8715 8.81014C75.6301 7.79225 76.2623 6.64713 76.8313 5.50201C76.3255 4.99307 75.8198 4.48413 75.2508 4.0388C74.1129 4.61136 72.975 5.31116 71.9635 6.13819C71.5842 5.88372 71.1416 5.62925 70.6991 5.4384C70.2566 5.24754 69.8141 5.05669 69.3715 4.92945C69.3715 3.6571 69.2451 2.38474 68.9922 1.11238C68.2336 0.985147 67.5382 0.85791 66.8428 0.85791ZM68.929 9.25547C72.3428 10.8459 73.7968 14.8538 72.2796 18.2256C71.3945 20.1977 69.6244 21.5973 67.5382 22.0427C66.1474 22.2971 64.6934 22.1699 63.429 21.5973C60.0152 20.0069 58.5612 15.999 60.0784 12.6272C60.9635 10.6551 62.7336 9.25546 64.8198 8.81014C66.2106 8.49205 67.6646 8.6829 68.929 9.25547Z",fill:"white"}),/*#__PURE__*/q.default.createElement("path",{d:"M6.03298 22.8689L5.02149 29.2307H0.722656L5.4008 1.55695H11.0904L15.7054 29.2307H11.3433L10.395 22.8689H6.03298ZM8.1824 7.85511L6.66517 18.7974H9.76286L8.1824 7.85511Z",fill:"white"}),/*#__PURE__*/q.default.createElement("path",{d:"M23.861 1.49487L29.361 20.0713V1.49487H33.5334V29.1686H29.1081L23.4185 11.4193V29.1686H19.2461V1.49487H23.861Z",fill:"white"}),/*#__PURE__*/q.default.createElement("path",{d:"M50.2261 22.5524C50.2261 24.3337 49.5307 25.9878 48.3295 27.1965C47.1284 28.4688 45.4847 29.1686 43.7146 29.1686H37.2031V1.49487H43.7146C45.4847 1.49487 47.1284 2.19467 48.3295 3.46703C49.5939 4.67577 50.2261 6.39345 50.2261 8.11113V22.5524ZM41.3123 25.0971H43.7778C44.41 25.0971 45.0422 24.8426 45.4215 24.3973C45.864 23.952 46.1169 23.3158 46.1169 22.6796V8.17475C46.1169 7.53857 45.864 6.90239 45.4215 6.45707C44.979 6.01174 44.41 5.75727 43.7778 5.75727H41.3123V25.0971Z",fill:"white"}),/*#__PURE__*/q.default.createElement("path",{d:"M4.83183 49.0815C2.55598 49.0815 0.722656 47.2366 0.722656 45.01C0.722656 45.01 0.722656 45.01 0.722656 44.9464V35.5309C0.722656 33.2407 2.49276 31.3958 4.76862 31.3322C7.04447 31.2685 8.8778 33.1135 8.94101 35.4037C8.94101 35.4673 8.94101 35.4673 8.94101 35.5309V37.5031H6.28585V35.4673C6.28585 34.6403 5.59045 33.9405 4.76862 33.9405C4.38931 33.9405 4.01 34.0677 3.69391 34.3858C3.44104 34.6403 3.25138 35.022 3.25138 35.4673V44.9464C3.25138 45.7734 3.88356 46.4096 4.7054 46.4096C5.08471 46.4096 5.46402 46.2824 5.78011 45.9643C6.0962 45.7098 6.22263 45.3281 6.22263 44.8828V42.5289H8.94101V44.9464C8.94101 47.2366 7.10769 49.0815 4.83183 49.0815Z",fill:"white"}),/*#__PURE__*/q.default.createElement("path",{d:"M30.1227 48.8867H23.1055V31.6463H25.6974V46.342H30.1859L30.1227 48.8867Z",fill:"white"}),/*#__PURE__*/q.default.createElement("path",{d:"M48.0115 31.4559C50.2874 31.4559 52.1207 33.3009 52.1207 35.5911V45.0065C52.1207 47.2968 50.2874 49.1417 48.0115 49.1417C46.9368 49.1417 45.8621 48.6964 45.1035 47.933C44.3449 47.1696 43.9023 46.088 43.9023 45.0065V35.5911C43.9023 33.3009 45.7357 31.4559 48.0115 31.4559ZM49.4023 35.5275C49.4023 34.7004 48.7701 34.0643 47.9483 34.0643C47.569 34.0643 47.1897 34.1915 46.8736 34.5096C46.5575 34.7641 46.4311 35.1458 46.4311 35.5911V45.0065C46.4311 45.3883 46.5575 45.77 46.8736 46.0244C47.1265 46.2789 47.5058 46.4698 47.9483 46.4698C48.7701 46.4698 49.4023 45.8336 49.4023 45.0065V35.5275Z",fill:"white"}),/*#__PURE__*/q.default.createElement("path",{d:"M70.4451 49.0776C68.2325 49.0776 66.3992 47.2963 66.3359 45.0061V31.6463H68.8647V45.0061C68.8647 45.3878 68.9911 45.7695 69.3072 46.0876C69.5601 46.342 69.9394 46.5329 70.3819 46.5329C71.2037 46.5329 71.8359 45.8967 71.8359 45.0697V31.7099H74.5543V45.0697C74.5543 46.1512 74.1118 47.2327 73.3531 47.9961C72.5945 48.6959 71.583 49.1412 70.4451 49.0776Z",fill:"white"}),/*#__PURE__*/q.default.createElement("path",{d:"M97.0021 44.7516C97.0021 45.8331 96.5595 46.9146 95.8009 47.678C95.0423 48.4414 94.0308 48.8867 92.9561 48.8867H88.9102V31.6463H92.9561C94.0308 31.6463 95.1055 32.0916 95.8009 32.855C96.5595 33.6185 97.0021 34.7 97.0021 35.7815V44.7516ZM91.5021 46.342H93.0826C93.4619 46.342 93.8412 46.2148 94.094 45.8967C94.3469 45.6422 94.5366 45.2605 94.5366 44.8152V35.7815C94.5366 35.3998 94.4101 35.018 94.094 34.7C93.8412 34.4455 93.4619 34.2546 93.0826 34.2546H91.5021V46.342Z",fill:"white"}),/*#__PURE__*/q.default.createElement("path",{d:"M87.2555 1.49487L92.7555 20.0713V1.49487H96.9279V29.1686H92.5027L86.813 11.4193V29.1686H82.6406V1.49487H87.2555Z",fill:"white"}))),ky=e=>{let{open:n,subtitle:r,scope:o,redirectPath:s,onSuccess:i,onFailure:a,onCancel:c,storeSession:l,"data-testid":u}=e;const{t:d}=t.useTranslation();/*#__PURE__*/return q.default.createElement(ne.default,{open:n,onClose:c,disableEscapeKeyDown:!0,sx:{".MuiPaper-root":{borderRadius:"20px"}},"data-testid":u||"ac-sdk-login-modal"},/*#__PURE__*/q.default.createElement(re.default,null,/*#__PURE__*/q.default.createElement(by,{title:void 0!==r?r:d("loginFormText"),scope:o,redirectPath:s,onSuccess:i,onFailure:a,onCancel:c,storeSession:l})))};ky.propTypes={title:p.PropTypes.string,subtitle:p.PropTypes.string,scope:p.PropTypes.string,redirectPath:p.PropTypes.string,onSuccess:p.PropTypes.func,onFailure:p.PropTypes.func,onCancel:p.PropTypes.func,storeSession:p.PropTypes.bool},ky.defaultProps={redirectPath:"/",storeSession:!1};var Ey=d.observer(ky);const Cy=t=>{let{isOpen:n,title:r,subtitle:o,scope:s,redirectPath:i,onSuccess:a,onFailure:c,onCancel:l,storeSession:u=!0}=t;const[d,p]=e.useState(n);return e.useEffect(()=>{p(n)},[n]),/*#__PURE__*/q.default.createElement(Ey,{open:d,title:r,subtitle:o,scope:s,redirectPath:i,onSuccess:e=>{a&&"function"==typeof a&&a(e),p(!1)},onFailure:c,onCancel:()=>{l&&"function"==typeof l&&l(),p(!1)},storeSession:u})},xy=function(e,t){void 0===t&&(t={});const{loginUrl:n,clientId:r,grantType:o,redirectUri:s,redirectPath:i}=ey(),[a]=Ym(Cy,pm({scope:e},t)),{redirectPath:c}=t,l=encodeURIComponent(s+"?next="+(c||i));return"password"===o?()=>{a({key:(new Date).getTime()})}:()=>{window.location.assign(n+"?response_type=code&client_id="+r+"&redirect_uri="+l+"&scope="+e)}};var Ty=Object.getOwnPropertySymbols,Iy=Object.prototype.hasOwnProperty,My=Object.prototype.propertyIsEnumerable,Oy=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,o=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s<arguments.length;s++){for(var i in n=Object(arguments[s]))Iy.call(n,i)&&(o[i]=n[i]);if(Ty){r=Ty(n);for(var a=0;a<r.length;a++)My.call(n,r[a])&&(o[r[a]]=n[r[a]])}}return o};const Py=({url:e,allowFullScreen:t,position:n,display:r,height:o,width:s,overflow:i,styles:a,onLoad:c,onMouseOver:l,onMouseOut:u,scrolling:d,id:p,frameBorder:h,ariaHidden:m,sandbox:f,allow:g,className:y,title:b,ariaLabel:v,ariaLabelledby:_,name:S,target:w,loading:k,importance:E,referrerpolicy:C,allowpaymentrequest:x,src:T,key:I})=>{const M=Oy({src:T||e,target:w||null,style:{position:n||null,display:r||"initial",overflow:i||null},scrolling:d||null,allowpaymentrequest:x||null,importance:E||null,sandbox:f&&[...f].join(" ")||null,loading:k||null,styles:a||null,name:S||null,className:y||null,allowFullScreen:"allowFullScreen",referrerpolicy:C||null,title:b||null,allow:g||null,id:p||null,"aria-labelledby":_||null,"aria-hidden":m||null,"aria-label":v||null,width:s||null,height:o||null,onLoad:c||null,onMouseOver:l||null,onMouseOut:u||null,key:I||"iframe"});let O=Object.create(null);for(let e of Object.keys(M))null!=M[e]&&(O[e]=M[e]);for(let e of Object.keys(O.style))null==O.style[e]&&delete O.style[e];if(O.styles)for(let e of Object.keys(O.styles))O.styles.hasOwnProperty(e)&&(O.style[e]=O.styles[e]),Object.keys(O.styles).pop()==e&&delete O.styles;if(t)if("allow"in O){const e=O.allow.replace("fullscreen","");O.allow=`fullscreen ${e.trim()}`.trim()}else O.allow="fullscreen";return h>=0&&(O.style.hasOwnProperty("border")||(O.style.border=h)),q.default.createElement("iframe",Object.assign({},O))},Ry=t=>{let{src:n}=t;const{setIframeMounted:r}=Yg();return e.useEffect(()=>(r(!0),()=>r(!1)),[r]),/*#__PURE__*/q.default.createElement(Py,{id:"external-content-iframe",src:n,width:"100%",frameBorder:"0",styles:{display:"block",height:"calc(100vh - 92px)"}})},Ay=n=>{var r;let{position:o,scrolled:s,showAcLogo:i,leadingText:c,title:l,titleStyles:d,content:p,contentStyles:h,navProps:m,userProps:f,menuProps:g,sidebarEnabled:y,sidebarOpen:b,onSidebarToggle:v,styles:_,"data-testid":S}=n;const{baseUrl:w}=ey(),k=u.useTheme(),E=be.default(k.breakpoints.up("md")),[C,x]=e.useState(c),[T,M]=e.useState(l),{t:O}=t.useTranslation(),{items:P}=pm({items:[]},m),{show:R,showCompanyLogo:A}=pm({show:!0,showCompanyLogo:!1},f),{items:D,buttonColor:L,dropdownStyles:N,styles:j}=pm({items:[],buttonColor:"white",dropdownStyles:{},styles:{}},g),[$,z]=e.useState(new Date),[H,F]=e.useState(null),B=(e=>{let{styles:t,titleStyles:n,contentStyles:r,menuStyles:o,menuDropdownStyles:s}=e;return{root:pm({padding:"10px 0",color:"rgba(255,255,255,0.85)",background:"transparent",zIndex:1201},t),leadingText:{display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":"2",maxHeight:"2em",marginRight:"8px",lineHeight:"1em",overflow:"hidden",textOverflow:"ellipsis"},title:pm({display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":"2",maxHeight:"2em",marginRight:"8px",lineHeight:"1em",overflow:"hidden",textOverflow:"ellipsis",flexGrow:1},n),content:pm({display:"flex",flexGrow:1,alignItems:"center",justifyContent:"center",marginRight:"8px"},r),nav:{marginRight:"10px"},user:{},userInfo:{marginLeft:"0.5em",color:"rgba(255,255,255,0.5)"},button:{height:"50px",marginRight:"10px",fontSize:"16px",fontWeight:600,backgroundColor:"#1B2027",boxShadow:"0px 2px 5px rgba(0, 0, 0, 0.28)",borderRadius:"4px","&:hover":{backgroundColor:"#252A32",filter:"brightness(1.1)"}},loginButton:{padding:"6px 18px"},logoutButton:{paddingRight:"18px"},menu:pm({marginTop:"62px",backgroundColor:"rgba(0,0,0,0.5)"},o,{"& .MuiPaper-root":pm({minWidth:"20%",backgroundColor:"#2d2d2d",color:"#E0E0E0"},s)})}})({styles:_,titleStyles:d,contentStyles:h,menuStyles:j,menuDropdownStyles:N}),[U,V]=e.useState({}),W=e.useMemo(()=>Object.keys(B).reduce((e,t)=>(e[t]=gf(B[t]||{},U[t]||{}),e),{}),[B,U]),K=a.useNavigate();e.useEffect(()=>{const e=setInterval(()=>{z(new Date)},1e3);return()=>clearInterval(e)}),e.useEffect(()=>{x(c)},[c]),e.useEffect(()=>{M(l)},[l]),e.useEffect(()=>{const e=e=>{if(!Bg(e.origin))return;const t=e.data;if(t&&"object"==typeof t)switch(t.type){case"SET_HEADER_LEADING_TEXT":"string"==typeof t.text&&x(t.text);break;case"RESET_HEADER_LEADING_TEXT":x(c);break;case"SET_HEADER_TITLE":"string"==typeof t.title&&M(t.title);break;case"RESET_HEADER_TITLE":M(l);break;case"SET_HEADER_STYLES":const e=t.target||"root";"object"==typeof t.styles&&V(n=>pm({},n,{[e]:gf(n[e]||{},t.styles)}));break;case"RESET_HEADER_STYLES":const n=t.target;V(e=>{if(n){const t=pm({},e);return delete t[n],t}return{}})}};return window.addEventListener("message",e),()=>window.removeEventListener("message",e)},[c,l]);const Z=()=>{F(null)},G=e=>{e.url?K(e.url):e.action&&"function"==typeof e.action&&e.action(),Z()},Y=function(){try{return Promise.resolve(qm.logout()).then(function(){K("/")})}catch(e){return Promise.reject(e)}};/*#__PURE__*/return q.default.createElement(de.default,{position:o,elevation:0,sx:pm({},W.root,"static"===o?{marginTop:"-70px"}:{},s||b?{background:(null==_?void 0:_.background)||(null==(r=U.root)?void 0:r.background)||"#1B2027"}:{}),"data-testid":S||"ac-sdk-header"},/*#__PURE__*/q.default.createElement(ge.default,{variant:"dense"},y&&/*#__PURE__*/q.default.createElement(he.default,{size:"large",sx:pm({color:"rgba(255,255,255,0.85)",borderRight:"1px solid rgba(255,255,255,0.5)"},b&&{color:"rgba(255,255,255,0.5)",borderTop:"1px solid rgba(255,255,255,0.5)",borderRightColor:"transparent"},{"> svg":{transform:"rotate(180deg)"}}),onClick:v},/*#__PURE__*/q.default.createElement(I.ViewSidebarRounded,null)),i&&/*#__PURE__*/q.default.createElement(a.Link,{to:"/"},/*#__PURE__*/q.default.createElement("img",{src:ve.default,alt:"AndonCloud",style:{display:"block",height:"50px",margin:"0 8px"}})),C&&/*#__PURE__*/q.default.createElement(ye.default,{variant:"subtitle1",sx:W.leadingText},C),p?/*#__PURE__*/q.default.createElement(se.default,{sx:W.content},p):/*#__PURE__*/q.default.createElement(ye.default,{variant:"subtitle1",align:"center",sx:W.title},T),P&&/*#__PURE__*/q.default.createElement(se.default,{display:"flex",sx:W.nav},P.map(e=>/*#__PURE__*/q.default.createElement(pe.default,{key:e.label,onClick:()=>G(e),endIcon:e.icon,sx:W.button},e.label))),R&&E&&/*#__PURE__*/q.default.createElement(se.default,{display:"flex",sx:W.user},rm.getCurrentUserJS?/*#__PURE__*/q.default.createElement(pe.default,{id:"logout-button",onClick:Y,sx:pm({},W.button,W.logoutButton),"data-testid":"ac-sdk-header-logout-button"},O("headerLogoutButton"),A&&(()=>{const e=(()=>{let e="";const t=rm.getCurrentUserJS;if(null===t)return e;const{company:n}=t;return e=n.logo_url,w+"/"+e})();/*#__PURE__*/return q.default.createElement("img",{src:e,alt:""})})(),(()=>{let{currentUser:e}=rm;/*#__PURE__*/return q.default.createElement(se.default,{display:"inline-block",sx:W.userInfo},e&&"("+e.name+")")})()):/*#__PURE__*/q.default.createElement(pe.default,{id:"login-button",onClick:()=>K("/login"),sx:pm({},W.button,W.loginButton),"data-testid":"ac-sdk-header-login-button"},O("headerLoginButton"))),/*#__PURE__*/q.default.createElement(le.default,null),/*#__PURE__*/q.default.createElement(ye.default,{variant:"body1",align:"center",style:{width:"5rem",padding:"0 5px"}},$.toLocaleTimeString()),D&&/*#__PURE__*/q.default.createElement(se.default,null,/*#__PURE__*/q.default.createElement(he.default,{onClick:e=>{F(e.currentTarget)}},/*#__PURE__*/q.default.createElement(ue.default,{style:L?{color:L}:{}})),/*#__PURE__*/q.default.createElement(me.default,{id:"menu-appbar",marginThreshold:0,anchorEl:H,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(H),onClose:Z,sx:W.menu},D.map(e=>/*#__PURE__*/q.default.createElement(fe.default,{key:e.label,onClick:()=>G(e)},e.label)),(()=>{if(!E)return rm.getCurrentUserJS?/*#__PURE__*/q.default.createElement(fe.default,{onClick:Y},O("headerLogoutButton")):/*#__PURE__*/q.default.createElement(fe.default,{onClick:()=>K("/login")},O("headerLoginButton"))})()))))};Ay.propTypes={position:p.PropTypes.string,scrolled:p.PropTypes.bool,showAcLogo:p.PropTypes.bool,leadingText:p.PropTypes.string,title:p.PropTypes.string,titleStyles:p.PropTypes.any,content:p.PropTypes.node,contentStyles:p.PropTypes.any,navProps:p.PropTypes.shape({items:p.PropTypes.any}),userProps:p.PropTypes.shape({show:p.PropTypes.bool,showCompanyLogo:p.PropTypes.bool}),menuProps:p.PropTypes.shape({items:p.PropTypes.any,buttonColor:p.PropTypes.string,dropdownStyles:p.PropTypes.any,styles:p.PropTypes.any}),styles:p.PropTypes.any},Ay.defaultProps={navProps:{},userProps:{},menuProps:{},styles:{}};var Dy=d.observer(Ay);const Ly=t=>{let{open:n,items:r,width:o,styles:i,listStyles:c,itemStyles:l,subitemStyles:u}=t;const[d,p]=e.useState([]),h=(e=>{let{styles:t,listStyles:n,itemStyles:r,subitemStyles:o}=e;return{root:pm({flexShrink:0,"& .MuiDrawer-paper":{width:t.width+"px",boxSizing:"border-box",marginTop:"70px",color:"rgba(255,255,255,0.85)",background:"rgba(255,255,255,0.025)"}},t),list:pm({height:"90%",overflowY:"scroll"},n),subList:{maxHeight:"50vh",overflowY:"auto"},item:pm({},r),itemIcon:{color:"rgba(255,255,255,0.85)"},itemText:{"& > .MuiTypography-root":{fontWeight:600}},subitem:pm({},o),subitemText:{"& > span":{fontSize:"95%"}},subitemButton:{paddingLeft:4}}})({styles:pm({},i,{width:o}),listStyles:c,itemStyles:l,subitemStyles:u}),m=a.useNavigate();e.useEffect(()=>{p(r.map(e=>!!e.defaultOpened))},[r]);const f=(e,t,n)=>{e?e():t&&(t.startsWith("/")?m(t):n?window.location.href=t:m("?external="+t))};/*#__PURE__*/return q.default.createElement(s.Drawer,{sx:h.root,variant:"persistent",anchor:"left",open:n},/*#__PURE__*/q.default.createElement(s.List,{sx:h.list},r.map((e,t)=>{let{action:n,url:r,redirect:o,icon:i,label:a,items:c}=e;/*#__PURE__*/return q.default.createElement(q.default.Fragment,{key:a},/*#__PURE__*/q.default.createElement(s.ListItem,{sx:h.item,disablePadding:!0},/*#__PURE__*/q.default.createElement(s.ListItemButton,{onClick:()=>{null!=c&&c.length?p(e=>(e[t]=!e[t],pm({},e))):f(n,r,o)}},i&&/*#__PURE__*/q.default.createElement(s.ListItemIcon,{sx:h.itemIcon},i),/*#__PURE__*/q.default.createElement(s.ListItemText,{primary:a,sx:h.itemText}),!(null==c||!c.length)&&/*#__PURE__*/q.default.createElement(d[t]?I.ExpandLess:I.ExpandMore,null))),!(null==c||!c.length)&&/*#__PURE__*/q.default.createElement(s.Collapse,{in:d[t],timeout:"auto",unmountOnExit:!0},(e=>/*#__PURE__*/q.default.createElement(s.List,{component:"div",disablePadding:!0,sx:h.subList},e.map(e=>{let{action:t,url:n,redirect:r,icon:o,label:i}=e;/*#__PURE__*/return q.default.createElement(s.ListItem,{key:i,sx:h.subitem,disablePadding:!0},/*#__PURE__*/q.default.createElement(s.ListItemButton,{sx:h.subitemButton,onClick:()=>f(t,n,r)},o&&/*#__PURE__*/q.default.createElement(s.ListItemIcon,{sx:h.itemIcon},o),/*#__PURE__*/q.default.createElement(s.ListItemText,{primary:i,sx:h.subitemText})))})))(c)))})))};Ly.propTypes={open:p.PropTypes.bool,items:p.PropTypes.any,width:p.PropTypes.number,styles:p.PropTypes.any,listStyles:p.PropTypes.any,itemStyles:p.PropTypes.any,subitemStyles:p.PropTypes.any},Ly.defaultProps={styles:{},listStyles:{},itemStyles:{},subitemStyles:{}};const Ny=e=>{let{open:t,onClose:n,title:r,mainContent:o,asideContent:i,width:a,mainContentWidth:c,asideContentWidth:l,styles:u,headerStyles:d,contentWrapperStyles:p,mainContentStyles:h,asideContentStyles:m}=e;const f=(e=>{let{hasAsideContent:t,styles:n,headerStyles:r,contentWrapperStyles:o,mainContentStyles:s,asideContentStyles:i}=e;return{root:pm({flexShrink:0,"& .MuiDrawer-paper":{width:n.width,boxSizing:"border-box",marginTop:"70px",color:"rgba(255,255,255,0.85)",borderTop:"1px solid rgba(255,255,255,0.1)",borderLeft:"1px solid rgba(255,255,255,0.1)",background:"#252A32",boxShadow:"-6px 0 10px rgba(0, 0, 0, 0.15), inset -6px 0 8px rgba(0, 0, 0, 0.1), inset 0 -6px 8px rgba(0, 0, 0, 0.1)"}},n),header:pm({display:"flex",alignItems:"center",height:"60px",padding:"8px 16px",borderBottom:"1px solid rgba(255,255,255,0.1)"},r),contentWrapper:pm({display:"flex",flexDirection:"row",height:"calc(100% - 152px)",borderRight:"16px solid rgba(0,0,0,0.1)"},o),mainContent:pm({flexBasis:t?n.mainContentWidth:"100%",padding:"16px",overflowY:"auto"},s),asideContent:pm({flexBasis:n.asideContentWidth,padding:" 16px 0",overflowY:"auto",background:"rgba(0,0,0,0.1)"},i)}})({hasAsideContent:Boolean(i),styles:pm({},u,{width:a,mainContentWidth:c,asideContentWidth:l}),headerStyles:d,contentWrapperStyles:p,mainContentStyles:h,asideContentStyles:m});/*#__PURE__*/return q.default.createElement(s.Drawer,{sx:f.root,variant:"persistent",anchor:"right",open:t},/*#__PURE__*/q.default.createElement(s.Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:f.header},/*#__PURE__*/q.default.createElement(s.Typography,{variant:"h6",fontSize:18},r),/*#__PURE__*/q.default.createElement(s.IconButton,{color:"secondary",onClick:n},/*#__PURE__*/q.default.createElement(_e.default,null))),/*#__PURE__*/q.default.createElement(s.Box,{sx:f.contentWrapper},/*#__PURE__*/q.default.createElement(s.Box,{sx:f.mainContent},o),i&&/*#__PURE__*/q.default.createElement(s.Box,{sx:f.asideContent},i)))};Ny.propTypes={enabled:p.PropTypes.bool,open:p.PropTypes.bool,onClose:p.PropTypes.func,title:p.PropTypes.string,mainContent:p.PropTypes.node,asideContent:p.PropTypes.node,width:p.PropTypes.string,mainContentWidth:p.PropTypes.string,asideContentWidth:p.PropTypes.string,styles:p.PropTypes.any,headerStyles:p.PropTypes.any,contentWrapperStyles:p.PropTypes.any,mainContentStyles:p.PropTypes.any,asideContentStyles:p.PropTypes.any};const jy={enabled:!0,open:!1,onClose:()=>{},title:"",mainContent:null,asideContent:null,width:null,mainContentWidth:null,asideContentWidth:null,styles:{},headerStyles:{},contentWrapperStyles:{},mainContentStyles:{},asideContentStyles:{}};Ny.defaultProps=jy;const $y=s.styled("main",{shouldForwardProp:e=>!["open","sidebarWidth"].includes(e)})(e=>{let{theme:t,open:n,sidebarWidth:r}=e;return pm({flexGrow:1,transition:t.transitions.create("margin",{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen}),marginLeft:0},n&&{transition:t.transitions.create("margin",{easing:t.transitions.easing.easeOut,duration:t.transitions.duration.enteringScreen}),marginLeft:r+"px"})}),zy=t=>{let{children:n,headerProps:r,sidebarMenuProps:o,sidePanelProps:i,styles:c,"data-testid":l}=t;const{isEmbeddedMode:u}=Yg(),[d]=a.useSearchParams(),[p,h]=e.useState(),[m,f]=e.useState(null==o?void 0:o.open),g=s.useScrollTrigger({disableHysteresis:!0,target:p,threshold:0}),y=d.get("external"),b=(null==o?void 0:o.width)||240,v=(null==i?void 0:i.width)||"45%",_=(null==i?void 0:i.mainContentWidth)||"70%",S=(null==i?void 0:i.asideContentWidth)||"30%",w=Jm({isEmbeddedMode:u});return e.useEffect(()=>{if(u)return f(!1);const e=Fm.get("sidebarMenuOpen");void 0!==e&&f((null==o?void 0:o.enabled)&&"true"===e)},[u,null==o?void 0:o.enabled,f]),e.useEffect(()=>{!u&&null!=o&&o.enabled&&Fm.set("sidebarMenuOpen",m)},[u,null==o?void 0:o.enabled,m]),/*#__PURE__*/q.default.createElement(ce.default,{ref:e=>{e&&h(e)},maxWidth:!1,disableGutters:!0,sx:pm({},w.root,c),"data-testid":l||"ac-sdk-container"},!u&&/*#__PURE__*/q.default.createElement(q.default.Fragment,null,/*#__PURE__*/q.default.createElement(Dy,pm({scrolled:g,showAcLogo:!0,sidebarEnabled:null==o?void 0:o.enabled,sidebarOpen:m,onSidebarToggle:()=>f(e=>!e)},r)),(null==o?void 0:o.enabled)&&/*#__PURE__*/q.default.createElement(Ly,{open:m,items:o.items,width:b})),/*#__PURE__*/q.default.createElement($y,{open:m,sidebarWidth:b},y?/*#__PURE__*/q.default.createElement(Ry,{src:y}):n),(null==i?void 0:i.enabled)&&/*#__PURE__*/q.default.createElement(Ny,pm({},i,{width:v,mainContentWidth:_,asideContentWidth:S})),!u&&/*#__PURE__*/q.default.createElement(s.Box,{sx:w.overlay}))};zy.propTypes={children:p.PropTypes.any,headerProps:p.PropTypes.shape({position:p.PropTypes.string,showAcLogo:p.PropTypes.bool,leadingText:p.PropTypes.string.isRequired,title:p.PropTypes.string,content:p.PropTypes.node,contentStyles:p.PropTypes.any,navProps:p.PropTypes.shape({items:p.PropTypes.any}),userProps:p.PropTypes.shape({show:p.PropTypes.bool,showCompanyLogo:p.PropTypes.bool}),menuProps:p.PropTypes.shape({items:p.PropTypes.any,buttonColor:p.PropTypes.string,dropdownStyles:p.PropTypes.any,styles:p.PropTypes.any}),styles:p.PropTypes.any}),sidebarMenuProps:p.PropTypes.shape({enabled:p.PropTypes.bool,open:p.PropTypes.bool,items:p.PropTypes.any,width:p.PropTypes.number}),sidePanelProps:p.PropTypes.shape({enabled:p.PropTypes.bool,open:p.PropTypes.bool,onClose:p.PropTypes.func,title:p.PropTypes.string,mainContent:p.PropTypes.node,asideContent:p.PropTypes.node,width:p.PropTypes.string}),styles:p.PropTypes.any},zy.defaultProps={headerProps:{},sidebarMenuProps:{enabled:!1,open:!1,items:[],width:240},sidePanelProps:{enabled:!1,open:!1,onClose:()=>{},title:"",mainContent:null,asideContent:null,width:"45%"}};const Hy=e=>{let{redirectPath:n}=e;const{i18n:r,t:o}=t.useTranslation();/*#__PURE__*/return q.default.createElement(zy,{headerProps:{position:"fixed",leadingText:"AndonCloud Software",userProps:{show:!1},menuProps:{items:[{label:o("changeLanguageText"),action:()=>{r.changeLanguage("pl"===r.language?"en":"pl")}}],buttonColor:"white"}},styles:{overflowY:"auto"}},/*#__PURE__*/q.default.createElement(se.default,{display:"flex",height:"100%",alignItems:"center",justifyContent:"center"},/*#__PURE__*/q.default.createElement(ie.default,{sx:{borderRadius:"20px"}},/*#__PURE__*/q.default.createElement(ae.default,null,/*#__PURE__*/q.default.createElement(by,{title:o("loginFormText"),redirectPath:n})))))};Hy.propTypes={redirectPath:p.PropTypes.string},Hy.defaultProps={redirectPath:"/"};var Fy=d.observer(Hy);const By=()=>{const{grantType:e,redirectPath:t}=ey(),n=xy("read write"),r=a.useNavigate();return"password"===e?/*#__PURE__*/q.default.createElement(Fy,{redirectPath:t}):(r("/"),n(),null)},Uy=function(e){if(!(yh&&bh&&vh&&_h&&Sh))return hh&&Rt.warn(`reactRouterV6Instrumentation was unable to wrap Routes because of one or more missing parameters.\n useEffect: ${yh}. useLocation: ${bh}. useNavigationType: ${vh}.\n createRoutesFromChildren: ${_h}. matchRoutes: ${Sh}.`),e;const t=t=>{const n=V.useRef(!0),r=bh(),o=vh();return yh(()=>{const e=_h(t.children);n.current?(qh(e),function({activeRootSpan:e,location:t,routes:n,matches:r,basename:o,allRoutes:s}){const i=Array.isArray(r)?r:Sh(s||n,t,o);if(i){const[r,a]=Nh(t,s||n,s||n,i,o);ir().setTransactionName(r||"/"),e&&(e.updateName(r),e.setAttribute(dr,a),Zh(e,t,n,o,"pageload"))}else e&&Zh(e,t,n,o,"pageload")}({activeRootSpan:jh(),location:r,routes:e,allRoutes:Array.from(Fh)}),n.current=!1):function(e){const{location:t,routes:n,navigationType:r,version:o,matches:s,basename:i,allRoutes:a}=e,c=Array.isArray(s)?s:Sh(a||n,t,i),l=lr();if(!l||!zh.has(l))return;const u=jh();if((!u||"pageload"!==Zr(u).op||"POP"!==r)&&("PUSH"===r||"POP"===r)&&c){const[e,r]=Nh(t,a||n,a||n,c,i),s=function(e){return`${e.pathname}${e.search||""}${e.hash||""}`}(t),u=Hh.get(l),d=!(!u||u.isPlaceholder||!Zr(u.span).timestamp),{skip:p,shouldUpdate:h}=function(e,t,n,r){if(!e)return{skip:!1,shouldUpdate:!1};if(e.locationKey===t&&(e.isPlaceholder||!r)){const t=!!e.routeName&&Th(e.routeName),r=Th(n),o=!!e.routeName&&Uh(e.routeName),s=Uh(n);return{skip:!0,shouldUpdate:!(!e.routeName||!(t&&!r||!o&&s||n!==e.routeName&&n.length>(e.routeName?.length||0)&&!r))}}return{skip:!1,shouldUpdate:!1}}(u,s,e,d);if(p){if(h&&u){const t=u.routeName;u.isPlaceholder?(u.routeName=e,hh&&Rt.log(`[Tracing] Updated placeholder navigation name from "${t}" to "${e}" (will apply to real span)`)):(u.span.updateName(e),u.span.setAttribute(dr,r),_n(u.span,"__sentry_navigation_name_set__",!0),u.routeName=e,hh&&Rt.log(`[Tracing] Updated navigation span name from "${t}" to "${e}"`))}else hh&&Rt.log(`[Tracing] Skipping duplicate navigation for location: ${s}`);return}const m={span:{end:()=>{}},routeName:e,pathname:t.pathname,locationKey:s,isPlaceholder:!0};let f;Hh.set(l,m);try{f=Kp(l,{name:m.routeName,attributes:{[dr]:r,[mr]:"navigation",[fr]:`auto.navigation.react.reactrouter_v${o}`}})}catch(e){throw Hh.delete(l),e}f?(Hh.set(l,{span:f,routeName:m.routeName,pathname:t.pathname,locationKey:s}),Zh(f,t,n,i,"navigation")):Hh.delete(l)}}({location:r,routes:e,navigationType:o,version:"6",allRoutes:Array.from(Fh)})},[r,o]),V.createElement(e,{...t})};return dh(t,e),t}(a.Routes),Vy=e=>{let{children:t}=e;/*#__PURE__*/return q.default.createElement(a.BrowserRouter,null,/*#__PURE__*/q.default.createElement(hy,null),/*#__PURE__*/q.default.createElement(Uy,null,t,/*#__PURE__*/q.default.createElement(a.Route,{exact:!0,path:"/login",element:/*#__PURE__*/q.default.createElement(By,null)}),/*#__PURE__*/q.default.createElement(a.Route,{path:"/oauth2/redirect",element:/*#__PURE__*/q.default.createElement(py,null)})))},qy=d.observer(n=>{let{children:r,baseUrl:o,authProps:s,gtmProps:i,i18nProps:c,sentryProps:l,metaProps:d,muiTheme:p}=n;const{status:h}=Wm(),{enabled:m,clientId:f,redirectUri:g}=pm({enabled:!0,redirectPath:"/"},s);return qm.setAuthConfig({baseUrl:o,clientId:f,redirectUri:g}),e.useEffect(()=>{!iy.gtmReady&&null!=i&&i.gtmId&&(bm.initialize(i),iy.setGtmReady())},[i]),e.useEffect(()=>{var t;!iy.sentryReady&&l&&(function(t){const n={...t};Gs(n,"react"),as("react",{version:e.version}),function(e={}){const t=!e.skipBrowserExtensionCheck&&!!function(){if(void 0===Oi.window)return!1;if(Oi.nw)return!1;const e=Oi.chrome||Oi.browser;if(!e?.runtime?.id)return!1;const t=yn();return!(Oi===Oi.top&&["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"].some(e=>t.startsWith(`${e}://`)))}()&&(Rc&&It(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0);let n=null==e.defaultIntegrations?[oi(),ti(),{name:"ConversationId",setup(e){e.on("spanStart",e=>{const t=ir().getScopeData(),n=ar().getScopeData(),r=t.conversationId||n.conversationId;r&&e.setAttribute("gen_ai.conversation.id",r)})}},Vc(),Bc(),Zc(),Jc(),mi(),{name:"HttpContext",preprocessEvent(e){if(!Oi.navigator&&!Oi.location&&!Oi.document)return;const t=Di(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}}},{name:"BrowserSession",setupOnce(){void 0!==Oi.document?(cs({ignoreDuration:!0}),ds(),hc(({from:e,to:t})=>{void 0!==e&&e!==t&&(cs({ignoreDuration:!0}),ds())})):Rc&&Rt.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.")}}]:e.defaultIntegrations;const r={...e,enabled:!t&&e.enabled,stackParser:(o=e.stackParser||Hc,Array.isArray(o)?Nt(...o):o),integrations:ms({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||Pc};var o;!function(e,t){!0===t.debug&&(_t?Rt.enable():It(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),ir().update(t.initialScope);const n=new e(t);(function(e){ir().setClient(e)})(n),n.init()}(qi,r)}(n)}(pm({tracesSampleRate:1,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1,integrations:[(t={useEffect:e.useEffect,useLocation:a.useLocation,useNavigationType:a.useNavigationType,createRoutesFromChildren:a.createRoutesFromChildren,matchRoutes:a.matchRoutes},Vh(t,"6")),Dp()]},l)),iy.setSentryReady())},[l]),e.useEffect(()=>{m?function(){try{const e=function(){if(m)return Promise.resolve(qm.recover()).then(function(){})}();return Promise.resolve(e&&e.then?e.then(function(){}):void 0)}catch(e){return Promise.reject(e)}}():iy.setAppReady()},[m]),e.useEffect(()=>{const e=null==c?void 0:c.locales;if(e){const t="translation";for(const[n,r]of Object.entries(e))X.default.addResources(n,t,r[t])}},[null==c?void 0:c.locales]),e.useEffect(()=>{m&&"unknown"!==h&&iy.setAppReady()},[m,h]),/*#__PURE__*/q.default.createElement(u.ThemeProvider,{theme:p},/*#__PURE__*/q.default.createElement(G.default,null),/*#__PURE__*/q.default.createElement(Y.default,{styles:{"::-webkit-scrollbar":{width:"6px"},"::-webkit-scrollbar-track":{backgroundColor:"transparent"},"::-webkit-scrollbar-thumb":{borderRadius:"3px",backgroundColor:"rgba(255, 255, 255, 0.25)"}}}),/*#__PURE__*/q.default.createElement(fh,{fallback:e=>/*#__PURE__*/q.default.createElement(Wg,pm({appVersion:d.appVersion,apiVersion:d.apiVersion},e))},/*#__PURE__*/q.default.createElement(bt,null),/*#__PURE__*/q.default.createElement(Qg,{config:pm({baseUrl:o},s)},/*#__PURE__*/q.default.createElement(sy,null,/*#__PURE__*/q.default.createElement(t.I18nextProvider,{i18n:X.default},/*#__PURE__*/q.default.createElement(ny,{info:d},/*#__PURE__*/q.default.createElement(Gg,null,qm.networkError?/*#__PURE__*/q.default.createElement(dy,{error:qm.networkError}):iy.appReady?/*#__PURE__*/q.default.createElement(q.default.Fragment,null,/*#__PURE__*/q.default.createElement(Vy,null,/*#__PURE__*/q.default.createElement(a.Route,{path:"*",element:/*#__PURE__*/q.default.createElement(Zm,null,r)}))):/*#__PURE__*/q.default.createElement(Jg,null),/*#__PURE__*/q.default.createElement(qg,{appVersion:d.appVersion,apiVersion:d.apiVersion}))))))))});qy.propTypes={children:p.PropTypes.any.isRequired,baseUrl:p.PropTypes.string.isRequired,authProps:p.PropTypes.shape({enabled:p.PropTypes.bool,loginUrl:p.PropTypes.string,redirectUri:p.PropTypes.string,redirectPath:p.PropTypes.string,clientId:p.PropTypes.string.isRequired,grantType:p.PropTypes.string}),gtmProps:p.PropTypes.any,i18nProps:p.PropTypes.shape({locales:p.PropTypes.any}),sentryProps:p.PropTypes.any,routerProps:p.PropTypes.shape({iframeNavigationItems:p.PropTypes.any}),metaProps:p.PropTypes.shape({appVersion:p.PropTypes.string,apiVersion:p.PropTypes.string,releaseVersion:p.PropTypes.string,releasePageLink:p.PropTypes.string}),muiTheme:p.PropTypes.any},qy.defaultProps={authProps:{},gtmProps:{},i18nProps:{},sentryProps:{},metaProps:{},muiTheme:uy};var Wy=function(e){const t=e.displayName||e.name||"unknown",n=n=>V.createElement(ph,{name:t,updateProps:n},V.createElement(e,{...n}));return n.displayName=`profiler(${t})`,dh(n,e),n}(qy);const Ky=u.styled("span")(e=>{let{theme:t}=e;return{width:"16px",height:"16px",border:"1px solid "+t.palette.stroke.dark,borderRadius:"2px","input:disabled ~ &":{backgroundColor:"#A7ADB6"},".Mui-error &":{border:"1px solid "+t.palette.error.main}}}),Zy=u.styled(Ky)(e=>{let{theme:t}=e;return{position:"relative",border:"none",background:t.palette.primary.main,"&::after":{content:'""',display:"block",position:"absolute",width:"16px",height:"16px",top:0,left:0,background:"url("+Se.default+") no-repeat center",backgroundSize:"80%"}}}),Gy=u.styled(s.Checkbox)(e=>{let{theme:t}=e;return{alignSelf:"flex-start",padding:t.spacing(.5,1,.5,1.5),color:t.palette.primary.main,"&:hover":{opacity:.8}}}),Yy=u.styled("span")(e=>{let{theme:t}=e;return{width:"16px",height:"16px",border:"1px solid "+t.palette.stroke.dark,borderRadius:"50%","input:disabled ~ &":{backgroundColor:"#A7ADB6"}}}),Jy=u.styled(Yy)(e=>{let{theme:t}=e;return{position:"relative",border:"none",background:t.palette.primary.main,"&::after":{content:'""',display:"block",position:"absolute",width:"8px",height:"8px",top:"calc(50% - 4px)",left:"calc(50% - 4px)",borderRadius:"50%",background:t.palette.common.white}}}),Xy=u.styled(s.Radio)(e=>{let{theme:t}=e;return{padding:0,color:t.palette.primary.main}}),Qy=u.styled(s.RadioGroup)(e=>{let{theme:t}=e;return{color:t.palette.primary.main,".MuiFormControlLabel-root":{gap:t.spacing(1),marginLeft:t.spacing(1),"&:hover":{opacity:.8}},".Mui-checked + .MuiFormControlLabel-label":{color:t.palette.common.white}}}),eb=Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function tb(e,t,n,r){navigator.serviceWorker.register(e).then(e=>{let o=null;r&&setInterval(function(){fetch("/manifest.json").then(function(t){try{return Promise.resolve(t.json()).then(function(t){let{version:r}=t;n!==r&&(o=r,e.update())})}catch(e){return Promise.reject(e)}}).catch(()=>{})},3e4),e.onupdatefound=()=>{const n=e.installing;null!=n&&(n.onstatechange=()=>{"installed"===n.state&&(navigator.serviceWorker.controller?(console.log("New content is available and will be used when all tabs for this page are closed. See https://cra.link/PWA."),t&&t.onUpdate&&(r?t.onUpdate(e,o):t.onUpdate(e))):(console.log("Content is cached for offline use."),t&&t.onSuccess&&t.onSuccess(e)))})}}).catch(e=>{console.error("Error during service worker registration:",e)})}exports.AccessBlocker=nm,exports.AccessGuard=e=>{let{features:t=[],extraPermissions:n=[],workplaceId:r,onTrialRequest:o,onFeatureRequest:s,children:i}=e;const{hasAccess:a,accessState:c,buttons:l,cooldownInfo:u,features:d}=dm(t,{extraPermissions:n,workplaceId:r});if(a)return i;const p=d.find(e=>e.accessState===c);/*#__PURE__*/return q.default.createElement(nm,{accessState:c,buttons:l,daysSinceExpiry:(null==p?void 0:p.daysSinceExpiry)||null,featureKey:(null==p?void 0:p.featureKey)||t[0],workplaceId:r,cooldownInfo:u,onTrialRequest:o,onFeatureRequest:s})},exports.App=Wy,exports.Checkbox=e=>q.default.createElement(Gy,pm({icon:q.default.createElement(Ky,null),checkedIcon:q.default.createElement(Zy,null)},e)),exports.Container=zy,exports.Radio=e=>q.default.createElement(Xy,pm({icon:q.default.createElement(Yy,null),checkedIcon:q.default.createElement(Jy,null)},e)),exports.RadioGroup=e=>q.default.createElement(Qy,pm({},e)),exports.captureException=ss,exports.fetch=Bm,exports.getDisplayMode=Ug,exports.getLocale=()=>X.default.language,exports.logout=()=>qm.logout(),exports.notify=vt,exports.refreshUserData=()=>qm.refreshUserData(),exports.registerServiceWorker=e=>{const{version:t}=e,n=e=>{const t=e.waiting;t&&(t.addEventListener("statechange",e=>{"activated"===e.target.state&&window.location.reload()}),t.postMessage({type:"SKIP_WAITING"}))},r=()=>vt(X.default.t("newVersionAvailable"),{duration:5e3,position:"bottom-left",style:{color:"rgba(255,255,255,0.85)",background:"#3F3F3F",border:"1px solid #FFE72F"}});!function(e){const{publicUrl:t,mode:n,autoUpdate:r,version:o,registrationConfig:s}=e;if(globalThis.version=o,"production"===n&&"serviceWorker"in navigator){if(new URL(t,window.location.href).origin!==window.location.origin)return;window.addEventListener("load",()=>{const e=t+"/service-worker.js";eb?(function(e,t){fetch(e,{headers:{"Service-Worker":"script"}}).then(n=>{const r=n.headers.get("content-type");404===n.status||null!=r&&-1===r.indexOf("javascript")?navigator.serviceWorker.ready.then(e=>{e.unregister().then(()=>{window.location.reload()})}):tb(e,t)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})}(e,s),navigator.serviceWorker.ready.then(()=>{console.log("This web app is being served cache-first by a service worker. To learn more, visit https://cra.link/PWA")})):tb(e,s,o,r)})}}(pm({},e,{registrationConfig:pm({},(null==e?void 0:e.registrationConfig)||{},{onUpdate:(o,s)=>{var i,a;null!=(i=e.registrationConfig)&&i.onUpdate&&(null==(a=e.registrationConfig)||a.onUpdate(o)),s&&t!==s?(r(),setTimeout(()=>{n(o)},5e3)):(r(),n(o))}})}))},exports.resetParentHeaderLeadingText=()=>{var e;"iframe"===Ug()&&(null==(e=window.parent)||e.postMessage({type:"RESET_HEADER_LEADING_TEXT"},"*"))},exports.resetParentHeaderStyles=e=>{var t;"iframe"===Ug()&&(null==(t=window.parent)||t.postMessage({type:"RESET_HEADER_STYLES",target:e},"*"))},exports.resetParentHeaderTitle=()=>{var e;"iframe"===Ug()&&(null==(e=window.parent)||e.postMessage({type:"RESET_HEADER_TITLE"},"*"))},exports.setLocale=e=>X.default.changeLanguage(e),exports.sidePanelDefaultProps=jy,exports.updateParentHeaderLeadingText=e=>{var t;"iframe"===Ug()&&(null==(t=window.parent)||t.postMessage({type:"SET_HEADER_LEADING_TEXT",text:e},"*"))},exports.updateParentHeaderStyles=e=>{var t;let{target:n,styles:r}=e;"iframe"===Ug()&&(null==(t=window.parent)||t.postMessage({type:"SET_HEADER_STYLES",target:n,styles:r},"*"))},exports.updateParentHeaderTitle=e=>{var t;"iframe"===Ug()&&(null==(t=window.parent)||t.postMessage({type:"SET_HEADER_TITLE",title:e},"*"))},exports.useAccess=dm,exports.useDisplay=Yg,exports.useFeatures=am,exports.useLogin=xy,exports.useLoginStatus=Wm,exports.usePermissions=cm,exports.useStore=()=>e.useContext(oy),exports.withAccessGuard=function(e,t){void 0===e&&(e=[]),void 0===t&&(t={});const{extraPermissions:n=[],workplaceId:r}=t;return t=>{const o=o=>{const{onTrialRequest:s,onFeatureRequest:i}=o,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(o,hm),{hasAccess:c,accessState:l,buttons:u,cooldownInfo:d,features:p,missingPermissions:h}=dm(e,{extraPermissions:n,workplaceId:r}),m=p.find(e=>e.accessState===l),f=(null==m?void 0:m.daysSinceExpiry)||null,g=(null==m?void 0:m.featureKey)||e[0];return c?/*#__PURE__*/q.default.createElement(t,pm({},a,{accessState:l,hasAccess:c,missingPermissions:h})):/*#__PURE__*/q.default.createElement(nm,{accessState:l,buttons:u,daysSinceExpiry:f,featureKey:g,workplaceId:r,cooldownInfo:d,onTrialRequest:s,onFeatureRequest:i})};return o.displayName="withAccessGuard("+(t.displayName||t.name||"Component")+")",o}};
|
|
173
173
|
//# sourceMappingURL=andoncloud-sdk.js.map
|