andoncloud-sdk 1.4.48 → 1.4.50

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.
@@ -1,4 +1,4 @@
1
- var t=require("react"),e=require("react-router-dom"),n=require("@mui/material/CssBaseline"),r=require("@mui/material/GlobalStyles"),i=require("@mui/material/styles"),s=require("mobx-react-lite"),a=require("prop-types"),o=require("mobx"),c=require("@mui/icons-material/HelpOutline"),l=require("@mui/material"),u=require("./assets/loader.svg"),d=require("@mui/material/Dialog"),p=require("@mui/material/DialogContent"),h=require("@mui/lab"),f=require("@mui/material/Box"),_=require("@mui/material/Card"),m=require("@mui/material/CardContent"),g=require("@mui/material/Container"),y=require("@mui/icons-material/AccessTime"),v=require("@mui/icons-material/Menu"),b=require("@mui/material/AppBar"),E=require("@mui/material/Button"),S=require("@mui/material/IconButton"),w=require("@mui/material/Menu"),k=require("@mui/material/MenuItem"),T=require("@mui/material/Toolbar"),C=require("@mui/material/Typography"),x=require("./assets/logo.svg"),R=require("react-is");function D(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function I(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}}),e.default=t,e}var N=/*#__PURE__*/I(t),O=/*#__PURE__*/D(t),U=/*#__PURE__*/D(n),A=/*#__PURE__*/D(r),B=/*#__PURE__*/D(c),M=/*#__PURE__*/D(u),P=/*#__PURE__*/D(d),L=/*#__PURE__*/D(p),H=/*#__PURE__*/D(f),z=/*#__PURE__*/D(_),G=/*#__PURE__*/D(m),Y=/*#__PURE__*/D(g),$=/*#__PURE__*/D(y),F=/*#__PURE__*/D(v),j=/*#__PURE__*/D(b),V=/*#__PURE__*/D(E),Z=/*#__PURE__*/D(S),q=/*#__PURE__*/D(w),W=/*#__PURE__*/D(k),K=/*#__PURE__*/D(T),J=/*#__PURE__*/D(C),X=/*#__PURE__*/D(x),Q=/*#__PURE__*/D(R);let tt,et,nt,rt={data:""},it=t=>"object"==typeof window?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||rt,st=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,at=/\/\*[^]*?\*\/| +/g,ot=/\n+/g,ct=(t,e)=>{let n="",r="",i="";for(let s in t){let a=t[s];"@"==s[0]?"i"==s[1]?n=s+" "+a+";":r+="f"==s[1]?ct(a,s):s+"{"+ct(a,"k"==s[1]?"":e)+"}":"object"==typeof a?r+=ct(a,e?e.replace(/([^,])+/g,t=>s.replace(/(^:.*)|([^,])+/g,e=>/&/.test(e)?e.replace(/&/g,t):t?t+" "+e:e)):s):null!=a&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=ct.p?ct.p(s,a):s+":"+a+";")}return n+(e&&i?e+"{"+i+"}":i)+r},lt={},ut=t=>{if("object"==typeof t){let e="";for(let n in t)e+=n+ut(t[n]);return e}return t},dt=(t,e,n,r,i)=>{let s=ut(t),a=lt[s]||(lt[s]=(t=>{let e=0,n=11;for(;e<t.length;)n=101*n+t.charCodeAt(e++)>>>0;return"go"+n})(s));if(!lt[a]){let e=s!==t?t:(t=>{let e,n,r=[{}];for(;e=st.exec(t.replace(at,""));)e[4]?r.shift():e[3]?(n=e[3].replace(ot," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][e[1]]=e[2].replace(ot," ").trim();return r[0]})(t);lt[a]=ct(i?{["@keyframes "+a]:e}:e,n?"":"."+a)}let o=n&&lt.g?lt.g:null;return n&&(lt.g=lt[a]),((t,e,n,r)=>{r?e.data=e.data.replace(r,t):-1===e.data.indexOf(t)&&(e.data=n?t+e.data:e.data+t)})(lt[a],e,r,o),a},pt=(t,e,n)=>t.reduce((t,r,i)=>{let s=e[i];if(s&&s.call){let t=s(n),e=t&&t.props&&t.props.className||/^go/.test(t)&&t;s=e?"."+e:t&&"object"==typeof t?t.props?"":ct(t,""):!1===t?"":t}return t+r+(null==s?"":s)},"");function ht(t){let e=this||{},n=t.call?t(e.p):t;return dt(n.unshift?n.raw?pt(n,[].slice.call(arguments,1),e.p):n.reduce((t,n)=>Object.assign(t,n&&n.call?n(e.p):n),{}):n,it(e.target),e.g,e.o,e.k)}ht.bind({g:1});let ft=ht.bind({k:1});function _t(t,e){let n=this||{};return function(){let r=arguments;function i(s,a){let o=Object.assign({},s),c=o.className||i.className;n.p=Object.assign({theme:et&&et()},o),n.o=/ *go\d+/.test(c),o.className=ht.apply(n,r)+(c?" "+c:""),e&&(o.ref=a);let l=t;return t[0]&&(l=o.as||t,delete o.as),nt&&l[0]&&nt(o),tt(l,o)}return e?e(i):i}}var mt=(t,e)=>(t=>"function"==typeof t)(t)?t(e):t,gt=(()=>{let t=0;return()=>(++t).toString()})(),yt=(()=>{let t;return()=>{if(void 0===t&&typeof window<"u"){let e=matchMedia("(prefers-reduced-motion: reduce)");t=!e||e.matches}return t}})(),vt=new Map,bt=t=>{if(vt.has(t))return;let e=setTimeout(()=>{vt.delete(t),kt({type:4,toastId:t})},1e3);vt.set(t,e)},Et=(t,e)=>{switch(e.type){case 0:return{...t,toasts:[e.toast,...t.toasts].slice(0,20)};case 1:return e.toast.id&&(t=>{let e=vt.get(t);e&&clearTimeout(e)})(e.toast.id),{...t,toasts:t.toasts.map(t=>t.id===e.toast.id?{...t,...e.toast}:t)};case 2:let{toast:n}=e;return t.toasts.find(t=>t.id===n.id)?Et(t,{type:1,toast:n}):Et(t,{type:0,toast:n});case 3:let{toastId:r}=e;return r?bt(r):t.toasts.forEach(t=>{bt(t.id)}),{...t,toasts:t.toasts.map(t=>t.id===r||void 0===r?{...t,visible:!1}:t)};case 4:return void 0===e.toastId?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(t=>t.id!==e.toastId)};case 5:return{...t,pausedAt:e.time};case 6:let i=e.time-(t.pausedAt||0);return{...t,pausedAt:void 0,toasts:t.toasts.map(t=>({...t,pauseDuration:t.pauseDuration+i}))}}},St=[],wt={toasts:[],pausedAt:void 0},kt=t=>{wt=Et(wt,t),St.forEach(t=>{t(wt)})},Tt={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Ct=t=>(e,n)=>{let r=((t,e="blank",n)=>({createdAt:Date.now(),visible:!0,type:e,ariaProps:{role:"status","aria-live":"polite"},message:t,pauseDuration:0,...n,id:(null==n?void 0:n.id)||gt()}))(e,t,n);return kt({type:2,toast:r}),r.id},xt=(t,e)=>Ct("blank")(t,e);xt.error=Ct("error"),xt.success=Ct("success"),xt.loading=Ct("loading"),xt.custom=Ct("custom"),xt.dismiss=t=>{kt({type:3,toastId:t})},xt.remove=t=>kt({type:4,toastId:t}),xt.promise=(t,e,n)=>{let r=xt.loading(e.loading,{...n,...null==n?void 0:n.loading});return t.then(t=>(xt.success(mt(e.success,t),{id:r,...n,...null==n?void 0:n.success}),t)).catch(t=>{xt.error(mt(e.error,t),{id:r,...n,...null==n?void 0:n.error})}),t};var Rt,Dt=(t,e)=>{kt({type:1,toast:{id:t,height:e}})},It=()=>{kt({type:5,time:Date.now()})},Nt=ft`
1
+ var t=require("react"),e=require("react-router-dom"),n=require("@mui/material/CssBaseline"),r=require("@mui/material/GlobalStyles"),i=require("@mui/material/styles"),s=require("mobx-react-lite"),a=require("prop-types"),o=require("mobx"),c=require("@mui/icons-material/HelpOutline"),l=require("@mui/material"),u=require("./assets/loader.svg"),d=require("@mui/material/Dialog"),p=require("@mui/material/DialogContent"),h=require("@mui/lab"),f=require("@mui/material/Box"),_=require("@mui/material/Card"),m=require("@mui/material/CardContent"),g=require("@mui/material/Container"),y=require("@mui/icons-material/AccessTime"),v=require("@mui/icons-material/Menu"),b=require("@mui/material/AppBar"),E=require("@mui/material/Button"),S=require("@mui/material/IconButton"),w=require("@mui/material/Menu"),k=require("@mui/material/MenuItem"),T=require("@mui/material/Toolbar"),C=require("@mui/material/Typography"),x=require("./assets/logo.svg"),R=require("react-is");function D(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function I(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}}),e.default=t,e}var N=/*#__PURE__*/I(t),O=/*#__PURE__*/D(t),A=/*#__PURE__*/D(n),U=/*#__PURE__*/D(r),B=/*#__PURE__*/D(c),M=/*#__PURE__*/D(u),P=/*#__PURE__*/D(d),L=/*#__PURE__*/D(p),H=/*#__PURE__*/D(f),z=/*#__PURE__*/D(_),G=/*#__PURE__*/D(m),Y=/*#__PURE__*/D(g),F=/*#__PURE__*/D(y),$=/*#__PURE__*/D(v),j=/*#__PURE__*/D(b),V=/*#__PURE__*/D(E),Z=/*#__PURE__*/D(S),q=/*#__PURE__*/D(w),W=/*#__PURE__*/D(k),K=/*#__PURE__*/D(T),J=/*#__PURE__*/D(C),X=/*#__PURE__*/D(x),Q=/*#__PURE__*/D(R);let tt,et,nt,rt={data:""},it=t=>"object"==typeof window?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||rt,st=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,at=/\/\*[^]*?\*\/| +/g,ot=/\n+/g,ct=(t,e)=>{let n="",r="",i="";for(let s in t){let a=t[s];"@"==s[0]?"i"==s[1]?n=s+" "+a+";":r+="f"==s[1]?ct(a,s):s+"{"+ct(a,"k"==s[1]?"":e)+"}":"object"==typeof a?r+=ct(a,e?e.replace(/([^,])+/g,t=>s.replace(/(^:.*)|([^,])+/g,e=>/&/.test(e)?e.replace(/&/g,t):t?t+" "+e:e)):s):null!=a&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=ct.p?ct.p(s,a):s+":"+a+";")}return n+(e&&i?e+"{"+i+"}":i)+r},lt={},ut=t=>{if("object"==typeof t){let e="";for(let n in t)e+=n+ut(t[n]);return e}return t},dt=(t,e,n,r,i)=>{let s=ut(t),a=lt[s]||(lt[s]=(t=>{let e=0,n=11;for(;e<t.length;)n=101*n+t.charCodeAt(e++)>>>0;return"go"+n})(s));if(!lt[a]){let e=s!==t?t:(t=>{let e,n,r=[{}];for(;e=st.exec(t.replace(at,""));)e[4]?r.shift():e[3]?(n=e[3].replace(ot," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][e[1]]=e[2].replace(ot," ").trim();return r[0]})(t);lt[a]=ct(i?{["@keyframes "+a]:e}:e,n?"":"."+a)}let o=n&&lt.g?lt.g:null;return n&&(lt.g=lt[a]),((t,e,n,r)=>{r?e.data=e.data.replace(r,t):-1===e.data.indexOf(t)&&(e.data=n?t+e.data:e.data+t)})(lt[a],e,r,o),a},pt=(t,e,n)=>t.reduce((t,r,i)=>{let s=e[i];if(s&&s.call){let t=s(n),e=t&&t.props&&t.props.className||/^go/.test(t)&&t;s=e?"."+e:t&&"object"==typeof t?t.props?"":ct(t,""):!1===t?"":t}return t+r+(null==s?"":s)},"");function ht(t){let e=this||{},n=t.call?t(e.p):t;return dt(n.unshift?n.raw?pt(n,[].slice.call(arguments,1),e.p):n.reduce((t,n)=>Object.assign(t,n&&n.call?n(e.p):n),{}):n,it(e.target),e.g,e.o,e.k)}ht.bind({g:1});let ft=ht.bind({k:1});function _t(t,e){let n=this||{};return function(){let r=arguments;function i(s,a){let o=Object.assign({},s),c=o.className||i.className;n.p=Object.assign({theme:et&&et()},o),n.o=/ *go\d+/.test(c),o.className=ht.apply(n,r)+(c?" "+c:""),e&&(o.ref=a);let l=t;return t[0]&&(l=o.as||t,delete o.as),nt&&l[0]&&nt(o),tt(l,o)}return e?e(i):i}}var mt=(t,e)=>(t=>"function"==typeof t)(t)?t(e):t,gt=(()=>{let t=0;return()=>(++t).toString()})(),yt=(()=>{let t;return()=>{if(void 0===t&&typeof window<"u"){let e=matchMedia("(prefers-reduced-motion: reduce)");t=!e||e.matches}return t}})(),vt=new Map,bt=t=>{if(vt.has(t))return;let e=setTimeout(()=>{vt.delete(t),kt({type:4,toastId:t})},1e3);vt.set(t,e)},Et=(t,e)=>{switch(e.type){case 0:return{...t,toasts:[e.toast,...t.toasts].slice(0,20)};case 1:return e.toast.id&&(t=>{let e=vt.get(t);e&&clearTimeout(e)})(e.toast.id),{...t,toasts:t.toasts.map(t=>t.id===e.toast.id?{...t,...e.toast}:t)};case 2:let{toast:n}=e;return t.toasts.find(t=>t.id===n.id)?Et(t,{type:1,toast:n}):Et(t,{type:0,toast:n});case 3:let{toastId:r}=e;return r?bt(r):t.toasts.forEach(t=>{bt(t.id)}),{...t,toasts:t.toasts.map(t=>t.id===r||void 0===r?{...t,visible:!1}:t)};case 4:return void 0===e.toastId?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(t=>t.id!==e.toastId)};case 5:return{...t,pausedAt:e.time};case 6:let i=e.time-(t.pausedAt||0);return{...t,pausedAt:void 0,toasts:t.toasts.map(t=>({...t,pauseDuration:t.pauseDuration+i}))}}},St=[],wt={toasts:[],pausedAt:void 0},kt=t=>{wt=Et(wt,t),St.forEach(t=>{t(wt)})},Tt={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Ct=t=>(e,n)=>{let r=((t,e="blank",n)=>({createdAt:Date.now(),visible:!0,type:e,ariaProps:{role:"status","aria-live":"polite"},message:t,pauseDuration:0,...n,id:(null==n?void 0:n.id)||gt()}))(e,t,n);return kt({type:2,toast:r}),r.id},xt=(t,e)=>Ct("blank")(t,e);xt.error=Ct("error"),xt.success=Ct("success"),xt.loading=Ct("loading"),xt.custom=Ct("custom"),xt.dismiss=t=>{kt({type:3,toastId:t})},xt.remove=t=>kt({type:4,toastId:t}),xt.promise=(t,e,n)=>{let r=xt.loading(e.loading,{...n,...null==n?void 0:n.loading});return t.then(t=>(xt.success(mt(e.success,t),{id:r,...n,...null==n?void 0:n.success}),t)).catch(t=>{xt.error(mt(e.error,t),{id:r,...n,...null==n?void 0:n.error})}),t};var Rt,Dt=(t,e)=>{kt({type:1,toast:{id:t,height:e}})},It=()=>{kt({type:5,time:Date.now()})},Nt=ft`
2
2
  from {
3
3
  transform: scale(0) rotate(45deg);
4
4
  opacity: 0;
@@ -14,7 +14,7 @@ from {
14
14
  to {
15
15
  transform: scale(1);
16
16
  opacity: 1;
17
- }`,Ut=ft`
17
+ }`,At=ft`
18
18
  from {
19
19
  transform: scale(0) rotate(90deg);
20
20
  opacity: 0;
@@ -22,7 +22,7 @@ from {
22
22
  to {
23
23
  transform: scale(1) rotate(90deg);
24
24
  opacity: 1;
25
- }`,At=_t("div")`
25
+ }`,Ut=_t("div")`
26
26
  width: 20px;
27
27
  opacity: 0;
28
28
  height: 20px;
@@ -51,7 +51,7 @@ to {
51
51
  }
52
52
 
53
53
  &:before {
54
- animation: ${Ut} 0.15s ease-out forwards;
54
+ animation: ${At} 0.15s ease-out forwards;
55
55
  animation-delay: 180ms;
56
56
  transform: rotate(90deg);
57
57
  }
@@ -137,14 +137,14 @@ from {
137
137
  to {
138
138
  transform: scale(1);
139
139
  opacity: 1;
140
- }`,$t=_t("div")`
140
+ }`,Ft=_t("div")`
141
141
  position: relative;
142
142
  transform: scale(0.6);
143
143
  opacity: 0.4;
144
144
  min-width: 20px;
145
145
  animation: ${Yt} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
146
146
  forwards;
147
- `,Ft=({toast:t})=>{let{icon:e,type:n,iconTheme:r}=t;return void 0!==e?"string"==typeof e?N.createElement($t,null,e):e:"blank"===n?null:N.createElement(Gt,null,N.createElement(Mt,{...r}),"loading"!==n&&N.createElement(zt,null,N.createElement("error"===n?At:Ht,{...r})))},jt=t=>`\n0% {transform: translate3d(0,${-200*t}%,0) scale(.6); opacity:.5;}\n100% {transform: translate3d(0,0,0) scale(1); opacity:1;}\n`,Vt=t=>`\n0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}\n100% {transform: translate3d(0,${-150*t}%,-1px) scale(.6); opacity:0;}\n`,Zt=_t("div")`
147
+ `,$t=({toast:t})=>{let{icon:e,type:n,iconTheme:r}=t;return void 0!==e?"string"==typeof e?N.createElement(Ft,null,e):e:"blank"===n?null:N.createElement(Gt,null,N.createElement(Mt,{...r}),"loading"!==n&&N.createElement(zt,null,N.createElement("error"===n?Ut:Ht,{...r})))},jt=t=>`\n0% {transform: translate3d(0,${-200*t}%,0) scale(.6); opacity:.5;}\n100% {transform: translate3d(0,0,0) scale(1); opacity:1;}\n`,Vt=t=>`\n0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}\n100% {transform: translate3d(0,${-150*t}%,-1px) scale(.6); opacity:0;}\n`,Zt=_t("div")`
148
148
  display: flex;
149
149
  align-items: center;
150
150
  background: #fff;
@@ -163,10 +163,10 @@ to {
163
163
  color: inherit;
164
164
  flex: 1 1 auto;
165
165
  white-space: pre-line;
166
- `,Wt=N.memo(({toast:t,position:e,style:n,children:r})=>{let i=t.height?((t,e)=>{let n=t.includes("top")?1:-1,[r,i]=yt()?["0%{opacity:0;} 100%{opacity:1;}","0%{opacity:1;} 100%{opacity:0;}"]:[jt(n),Vt(n)];return{animation:e?`${ft(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${ft(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}})(t.position||e||"top-center",t.visible):{opacity:0},s=N.createElement(Ft,{toast:t}),a=N.createElement(qt,{...t.ariaProps},mt(t.message,t));return N.createElement(Zt,{className:t.className,style:{...i,...n,...t.style}},"function"==typeof r?r({icon:s,message:a}):N.createElement(N.Fragment,null,s,a))});Rt=N.createElement,ct.p=void 0,tt=Rt,et=void 0,nt=void 0;var Kt=({id:t,className:e,style:n,onHeightUpdate:r,children:i})=>{let s=N.useCallback(e=>{if(e){let n=()=>{let n=e.getBoundingClientRect().height;r(t,n)};n(),new MutationObserver(n).observe(e,{subtree:!0,childList:!0,characterData:!0})}},[t,r]);return N.createElement("div",{ref:s,className:e,style:n},i)},Jt=ht`
166
+ `,Wt=N.memo(({toast:t,position:e,style:n,children:r})=>{let i=t.height?((t,e)=>{let n=t.includes("top")?1:-1,[r,i]=yt()?["0%{opacity:0;} 100%{opacity:1;}","0%{opacity:1;} 100%{opacity:0;}"]:[jt(n),Vt(n)];return{animation:e?`${ft(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${ft(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}})(t.position||e||"top-center",t.visible):{opacity:0},s=N.createElement($t,{toast:t}),a=N.createElement(qt,{...t.ariaProps},mt(t.message,t));return N.createElement(Zt,{className:t.className,style:{...i,...n,...t.style}},"function"==typeof r?r({icon:s,message:a}):N.createElement(N.Fragment,null,s,a))});Rt=N.createElement,ct.p=void 0,tt=Rt,et=void 0,nt=void 0;var Kt=({id:t,className:e,style:n,onHeightUpdate:r,children:i})=>{let s=N.useCallback(e=>{if(e){let n=()=>{let n=e.getBoundingClientRect().height;r(t,n)};n(),new MutationObserver(n).observe(e,{subtree:!0,childList:!0,characterData:!0})}},[t,r]);return N.createElement("div",{ref:s,className:e,style:n},i)},Jt=ht`
167
167
  z-index: 9999;
168
168
  > * {
169
169
  pointer-events: auto;
170
170
  }
171
- `,Xt=({reverseOrder:e,position:n="top-center",toastOptions:r,gutter:i,children:s,containerStyle:a,containerClassName:o})=>{let{toasts:c,handlers:l}=(e=>{let{toasts:n,pausedAt:r}=((e={})=>{let[n,r]=t.useState(wt);t.useEffect(()=>(St.push(r),()=>{let t=St.indexOf(r);t>-1&&St.splice(t,1)}),[n]);let i=n.toasts.map(t=>{var n,r;return{...e,...e[t.type],...t,duration:t.duration||(null==(n=e[t.type])?void 0:n.duration)||(null==e?void 0:e.duration)||Tt[t.type],style:{...e.style,...null==(r=e[t.type])?void 0:r.style,...t.style}}});return{...n,toasts:i}})(e);t.useEffect(()=>{if(r)return;let t=Date.now(),e=n.map(e=>{if(e.duration===1/0)return;let n=(e.duration||0)+e.pauseDuration-(t-e.createdAt);if(!(n<0))return setTimeout(()=>xt.dismiss(e.id),n);e.visible&&xt.dismiss(e.id)});return()=>{e.forEach(t=>t&&clearTimeout(t))}},[n,r]);let i=t.useCallback(()=>{r&&kt({type:6,time:Date.now()})},[r]),s=t.useCallback((t,e)=>{let{reverseOrder:r=!1,gutter:i=8,defaultPosition:s}=e||{},a=n.filter(e=>(e.position||s)===(t.position||s)&&e.height),o=a.findIndex(e=>e.id===t.id),c=a.filter((t,e)=>e<o&&t.visible).length;return a.filter(t=>t.visible).slice(...r?[c+1]:[0,c]).reduce((t,e)=>t+(e.height||0)+i,0)},[n]);return{toasts:n,handlers:{updateHeight:Dt,startPause:It,endPause:i,calculateOffset:s}}})(r);return N.createElement("div",{style:{position:"fixed",zIndex:9999,top:16,left:16,right:16,bottom:16,pointerEvents:"none",...a},className:o,onMouseEnter:l.startPause,onMouseLeave:l.endPause},c.map(t=>{let r=t.position||n,a=((t,e)=>{let n=t.includes("top"),r=n?{top:0}:{bottom:0},i=t.includes("center")?{justifyContent:"center"}:t.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:yt()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${e*(n?1:-1)}px)`,...r,...i}})(r,l.calculateOffset(t,{reverseOrder:e,gutter:i,defaultPosition:n}));return N.createElement(Kt,{id:t.id,key:t.id,onHeightUpdate:l.updateHeight,className:t.visible?Jt:"",style:a},"custom"===t.type?mt(t.message,t):s?s(t):N.createElement(Wt,{toast:t,position:r}))}))},Qt=xt;const te=Object.prototype.toString;function ee(t){switch(te.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return pe(t,Error)}}function ne(t,e){return te.call(t)===`[object ${e}]`}function re(t){return ne(t,"ErrorEvent")}function ie(t){return ne(t,"DOMError")}function se(t){return ne(t,"String")}function ae(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function oe(t){return ne(t,"Object")}function ce(t){return"undefined"!=typeof Event&&pe(t,Event)}function le(t){return ne(t,"RegExp")}function ue(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function de(t){return"number"==typeof t&&t!=t}function pe(t,e){try{return t instanceof e}catch(t){return!1}}function he(t){return t&&t.Math==Math?t:void 0}const fe="object"==typeof globalThis&&he(globalThis)||"object"==typeof window&&he(window)||"object"==typeof self&&he(self)||"object"==typeof global&&he(global)||function(){return this}()||{};function _e(){return fe}function me(t,e,n){const r=n||fe,i=r.__SENTRY__=r.__SENTRY__||{};return i[t]||(i[t]=e())}const ge=_e(),ye=80;function ve(t,e={}){try{let n=t;const r=5,i=[];let s=0,a=0;const o=" > ",c=o.length;let l;const u=Array.isArray(e)?e:e.keyAttrs,d=!Array.isArray(e)&&e.maxStringLength||ye;for(;n&&s++<r&&(l=be(n,u),!("html"===l||s>1&&a+i.length*c+l.length>=d));)i.push(l),a+=l.length,n=n.parentNode;return i.reverse().join(o)}catch(t){return"<unknown>"}}function be(t,e){const n=t,r=[];let i,s,a,o,c;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());const l=e&&e.length?e.filter(t=>n.getAttribute(t)).map(t=>[t,n.getAttribute(t)]):null;if(l&&l.length)l.forEach(t=>{r.push(`[${t[0]}="${t[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),i=n.className,i&&se(i))for(s=i.split(/\s+/),c=0;c<s.length;c++)r.push(`.${s[c]}`);const u=["aria-label","type","name","title","alt"];for(c=0;c<u.length;c++)a=u[c],o=n.getAttribute(a),o&&r.push(`[${a}="${o}"]`);return r.join("")}class Ee extends Error{constructor(t,e="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=e}}const Se=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function we(t,e=!1){const{host:n,path:r,pass:i,port:s,projectId:a,protocol:o,publicKey:c}=t;return`${o}://${c}${e&&i?`:${i}`:""}@${n}${s?`:${s}`:""}/${r?`${r}/`:r}${a}`}function ke(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function Te(t){const e="string"==typeof t?function(t){const e=Se.exec(t);if(!e)throw new Ee(`Invalid Sentry Dsn: ${t}`);const[n,r,i="",s,a="",o]=e.slice(1);let c="",l=o;const u=l.split("/");if(u.length>1&&(c=u.slice(0,-1).join("/"),l=u.pop()),l){const t=l.match(/^\d+/);t&&(l=t[0])}return ke({host:s,pass:i,path:c,projectId:l,port:a,protocol:n,publicKey:r})}(t):ke(t);return function(t){if("undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__)return;const{port:e,projectId:n,protocol:r}=t;if(["protocol","publicKey","host","projectId"].forEach(e=>{if(!t[e])throw new Ee(`Invalid Sentry Dsn: ${e} missing`)}),!n.match(/^\d+$/))throw new Ee(`Invalid Sentry Dsn: Invalid projectId ${n}`);if(!function(t){return"http"===t||"https"===t}(r))throw new Ee(`Invalid Sentry Dsn: Invalid protocol ${r}`);if(e&&isNaN(parseInt(e,10)))throw new Ee(`Invalid Sentry Dsn: Invalid port ${e}`)}(e),e}const Ce=["debug","info","warn","error","log","assert","trace"];function xe(t){if(!("console"in fe))return t();const e=fe.console,n={};Ce.forEach(t=>{const r=e[t]&&e[t].__sentry_original__;t in e&&r&&(n[t]=e[t],e[t]=r)});try{return t()}finally{Object.keys(n).forEach(t=>{e[t]=n[t]})}}function Re(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1}};return"undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?Ce.forEach(n=>{e[n]=(...e)=>{t&&xe(()=>{fe.console[n](`Sentry Logger [${n}]:`,...e)})}}):Ce.forEach(t=>{e[t]=()=>{}}),e}let De;function Ie(t,e=0){return"string"!=typeof t||0===e||t.length<=e?t:`${t.slice(0,e)}...`}function Ne(t,e){if(!Array.isArray(t))return"";const n=[];for(let e=0;e<t.length;e++){const r=t[e];try{n.push(String(r))}catch(t){n.push("[value cannot be serialized]")}}return n.join(e)}function Oe(t,e=[],n=!1){return e.some(e=>function(t,e,n=!1){return!!se(t)&&(le(e)?e.test(t):!!se(e)&&(n?t===e:t.includes(e)))}(t,e,n))}function Ue(t,e,n){if(!(e in t))return;const r=t[e],i=n(r);if("function"==typeof i)try{Be(i,r)}catch(t){}t[e]=i}function Ae(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}function Be(t,e){t.prototype=e.prototype=e.prototype||{},Ae(t,"__sentry_original__",e)}function Me(t){return t.__sentry_original__}function Pe(t){if(ee(t))return{message:t.message,name:t.name,stack:t.stack,...He(t)};if(ce(t)){const e={type:t.type,target:Le(t.target),currentTarget:Le(t.currentTarget),...He(t)};return"undefined"!=typeof CustomEvent&&pe(t,CustomEvent)&&(e.detail=t.detail),e}return t}function Le(t){try{return"undefined"!=typeof Element&&pe(t,Element)?ve(t):Object.prototype.toString.call(t)}catch(t){return"<unknown>"}}function He(t){if("object"==typeof t&&null!==t){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}return{}}function ze(t,e=40){const n=Object.keys(Pe(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return Ie(n[0],e);for(let t=n.length;t>0;t--){const r=n.slice(0,t).join(", ");if(!(r.length>e))return t===n.length?r:Ie(r,e)}return""}function Ge(t){return Ye(t,new Map)}function Ye(t,e){if(oe(t)){const n=e.get(t);if(void 0!==n)return n;const r={};e.set(t,r);for(const n of Object.keys(t))void 0!==t[n]&&(r[n]=Ye(t[n],e));return r}if(Array.isArray(t)){const n=e.get(t);if(void 0!==n)return n;const r=[];return e.set(t,r),t.forEach(t=>{r.push(Ye(t,e))}),r}return t}De="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?me("logger",Re):Re();const $e=/\(error: (.*)\)/;function Fe(...t){const e=t.sort((t,e)=>t[0]-e[0]).map(t=>t[1]);return(t,n=0)=>{const r=[],i=t.split("\n");for(let t=n;t<i.length;t++){const n=i[t];if(n.length>1024)continue;const s=$e.test(n)?n.replace($e,"$1"):n;if(!s.match(/\S*Error: /)){for(const t of e){const e=t(s);if(e){r.push(e);break}}if(r.length>=50)break}}return function(t){if(!t.length)return[];const e=t.slice(0,50),n=e[e.length-1].function;n&&/sentryWrapped/.test(n)&&e.pop(),e.reverse();const r=e[e.length-1].function;return r&&/captureMessage|captureException/.test(r)&&e.pop(),e.map(t=>({...t,filename:t.filename||e[e.length-1].filename,function:t.function||"?"}))}(r)}}const je="<anonymous>";function Ve(t){try{return t&&"function"==typeof t&&t.name||je}catch(t){return je}}const Ze=_e();function qe(){if(!("fetch"in Ze))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(t){return!1}}function We(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}const Ke=_e(),Je=_e(),Xe="__sentry_xhr_v2__",Qe={},tn={};function en(t,e){Qe[t]=Qe[t]||[],Qe[t].push(e),function(t){if(!tn[t])switch(tn[t]=!0,t){case"console":"console"in Je&&Ce.forEach(function(t){t in Je.console&&Ue(Je.console,t,function(e){return function(...n){nn("console",{args:n,level:t}),e&&e.apply(Je.console,n)}})});break;case"dom":!function(){if(!("document"in Je))return;const t=nn.bind(null,"dom"),e=un(t,!0);Je.document.addEventListener("click",e,!1),Je.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(e=>{const n=Je[e]&&Je[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(Ue(n,"addEventListener",function(e){return function(n,r,i){if("click"===n||"keypress"==n)try{const r=this,s=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},a=s[n]=s[n]||{refCount:0};if(!a.handler){const r=un(t);a.handler=r,e.call(this,n,r,i)}a.refCount++}catch(t){}return e.call(this,n,r,i)}}),Ue(n,"removeEventListener",function(t){return function(e,n,r){if("click"===e||"keypress"==e)try{const n=this,i=n.__sentry_instrumentation_handlers__||{},s=i[e];s&&(s.refCount--,s.refCount<=0&&(t.call(this,e,s.handler,r),s.handler=void 0,delete i[e]),0===Object.keys(i).length&&delete n.__sentry_instrumentation_handlers__)}catch(t){}return t.call(this,e,n,r)}}))})}();break;case"xhr":!function(){if(!("XMLHttpRequest"in Je))return;const t=XMLHttpRequest.prototype;Ue(t,"open",function(t){return function(...e){const n=e[1],r=this[Xe]={method:se(e[0])?e[0].toUpperCase():e[0],url:e[1],request_headers:{}};se(n)&&"POST"===r.method&&n.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const i=()=>{const t=this[Xe];if(t&&4===this.readyState){try{t.status_code=this.status}catch(t){}nn("xhr",{args:e,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:this})}};return"onreadystatechange"in this&&"function"==typeof this.onreadystatechange?Ue(this,"onreadystatechange",function(t){return function(...e){return i(),t.apply(this,e)}}):this.addEventListener("readystatechange",i),Ue(this,"setRequestHeader",function(t){return function(...e){const[n,r]=e,i=this[Xe];return i&&(i.request_headers[n.toLowerCase()]=r),t.apply(this,e)}}),t.apply(this,e)}}),Ue(t,"send",function(t){return function(...e){const n=this[Xe];return n&&void 0!==e[0]&&(n.body=e[0]),nn("xhr",{args:e,startTimestamp:Date.now(),xhr:this}),t.apply(this,e)}})}();break;case"fetch":(function(){if(!qe())return!1;if(We(Ze.fetch))return!0;let t=!1;const e=Ze.document;if(e&&"function"==typeof e.createElement)try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(t=We(n.contentWindow.fetch)),e.head.removeChild(n)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return t})()&&Ue(Je,"fetch",function(t){return function(...e){const{method:n,url:r}=function(t){if(0===t.length)return{method:"GET",url:""};if(2===t.length){const[e,n]=t;return{url:sn(e),method:rn(n,"method")?String(n.method).toUpperCase():"GET"}}const e=t[0];return{url:sn(e),method:rn(e,"method")?String(e.method).toUpperCase():"GET"}}(e),i={args:e,fetchData:{method:n,url:r},startTimestamp:Date.now()};return nn("fetch",{...i}),t.apply(Je,e).then(t=>(nn("fetch",{...i,endTimestamp:Date.now(),response:t}),t),t=>{throw nn("fetch",{...i,endTimestamp:Date.now(),error:t}),t})}});break;case"history":!function(){if(!function(){const t=Ke.chrome;return!(t&&t.app&&t.app.runtime||!("history"in Ke)||!Ke.history.pushState||!Ke.history.replaceState)}())return;const t=Je.onpopstate;function e(t){return function(...e){const n=e.length>2?e[2]:void 0;if(n){const t=an,e=String(n);an=e,nn("history",{from:t,to:e})}return t.apply(this,e)}}Je.onpopstate=function(...e){const n=Je.location.href,r=an;if(an=n,nn("history",{from:r,to:n}),t)try{return t.apply(this,e)}catch(t){}},Ue(Je.history,"pushState",e),Ue(Je.history,"replaceState",e)}();break;case"error":dn=Je.onerror,Je.onerror=function(t,e,n,r,i){return nn("error",{column:r,error:i,line:n,msg:t,url:e}),!(!dn||dn.__SENTRY_LOADER__)&&dn.apply(this,arguments)},Je.onerror.__SENTRY_INSTRUMENTED__=!0;break;case"unhandledrejection":pn=Je.onunhandledrejection,Je.onunhandledrejection=function(t){return nn("unhandledrejection",t),!(pn&&!pn.__SENTRY_LOADER__)||pn.apply(this,arguments)},Je.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0;break;default:("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn("unknown instrumentation type:",t)}}(t)}function nn(t,e){if(t&&Qe[t])for(const n of Qe[t]||[])try{n(e)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${Ve(n)}\nError:`,e)}}function rn(t,e){return!!t&&"object"==typeof t&&!!t[e]}function sn(t){return"string"==typeof t?t:t?rn(t,"url")?t.url:t.toString?t.toString():"":""}let an;const on=1e3;let cn,ln;function un(t,e=!1){return n=>{if(!n||ln===n)return;if(function(t){if("keypress"!==t.type)return!1;try{const e=t.target;if(!e||!e.tagName)return!0;if("INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable)return!1}catch(t){}return!0}(n))return;const r="keypress"===n.type?"input":n.type;(void 0===cn||function(t,e){if(!t)return!0;if(t.type!==e.type)return!0;try{if(t.target!==e.target)return!0}catch(t){}return!1}(ln,n))&&(t({event:n,name:r,global:e}),ln=n),clearTimeout(cn),cn=Je.setTimeout(()=>{cn=void 0},on)}}let dn=null,pn=null;function hn(){const t=fe.crypto||fe.msCrypto;if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");const e=t&&t.getRandomValues?()=>t.getRandomValues(new Uint8Array(1))[0]:()=>16*Math.random();return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,t=>(t^(15&e())>>t/4).toString(16))}function fn(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function _n(t){const{message:e,event_id:n}=t;if(e)return e;const r=fn(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function mn(t,e,n){const r=t.exception=t.exception||{},i=r.values=r.values||[],s=i[0]=i[0]||{};s.value||(s.value=e||""),s.type||(s.type=n||"Error")}function gn(t,e){const n=fn(t);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...e},e&&"data"in e){const t={...r&&r.data,...e.data};n.mechanism.data=t}}function yn(t){if(t&&t.__sentry_captured__)return!0;try{Ae(t,"__sentry_captured__",!0)}catch(t){}return!1}function vn(t){return Array.isArray(t)?t:[t]}function bn(){return!("undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function En(t,e){return t.require(e)}function Sn(t){let e;try{e=En(module,t)}catch(t){}try{const{cwd:n}=En(module,"process");e=En(module,`${n()}/node_modules/${t}`)}catch(t){}return e}function wn(t,e=100,n=Infinity){try{return Tn("",t,e,n)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function kn(t,e=3,n=102400){const r=wn(t,e);return i=JSON.stringify(r),~-encodeURI(i).split(/%..|./).length>n?kn(t,e-1,n):r;var i}function Tn(t,e,n=Infinity,r=Infinity,i=function(){const t="function"==typeof WeakSet,e=t?new WeakSet:[];return[function(n){if(t)return!!e.has(n)||(e.add(n),!1);for(let t=0;t<e.length;t++)if(e[t]===n)return!0;return e.push(n),!1},function(n){if(t)e.delete(n);else for(let t=0;t<e.length;t++)if(e[t]===n){e.splice(t,1);break}}]}()){const[s,a]=i;if(null==e||["number","boolean","string"].includes(typeof e)&&!de(e))return e;const o=function(t,e){try{if("domain"===t&&e&&"object"==typeof e&&e._events)return"[Domain]";if("domainEmitter"===t)return"[DomainEmitter]";if("undefined"!=typeof global&&e===global)return"[Global]";if("undefined"!=typeof window&&e===window)return"[Window]";if("undefined"!=typeof document&&e===document)return"[Document]";if(oe(n=e)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n)return"[SyntheticEvent]";if("number"==typeof e&&e!=e)return"[NaN]";if("function"==typeof e)return`[Function: ${Ve(e)}]`;if("symbol"==typeof e)return`[${String(e)}]`;if("bigint"==typeof e)return`[BigInt: ${String(e)}]`;const r=function(t){const e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}(e);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(t){return`**non-serializable** (${t})`}var n}(t,e);if(!o.startsWith("[object "))return o;if(e.__sentry_skip_normalization__)return e;const c="number"==typeof e.__sentry_override_normalization_depth__?e.__sentry_override_normalization_depth__:n;if(0===c)return o.replace("object ","");if(s(e))return"[Circular ~]";const l=e;if(l&&"function"==typeof l.toJSON)try{return Tn("",l.toJSON(),c-1,r,i)}catch(t){}const u=Array.isArray(e)?[]:{};let d=0;const p=Pe(e);for(const t in p)if(Object.prototype.hasOwnProperty.call(p,t)){if(d>=r){u[t]="[MaxProperties ~]";break}u[t]=Tn(t,p[t],c-1,r,i),d++}return a(e),u}var Cn;function xn(t){return new Dn(e=>{e(t)})}function Rn(t){return new Dn((e,n)=>{n(t)})}!function(t){t[t.PENDING=0]="PENDING",t[t.RESOLVED=1]="RESOLVED",t[t.REJECTED=2]="REJECTED"}(Cn||(Cn={}));class Dn{__init(){this._state=Cn.PENDING}__init2(){this._handlers=[]}constructor(t){Dn.prototype.__init.call(this),Dn.prototype.__init2.call(this),Dn.prototype.__init3.call(this),Dn.prototype.__init4.call(this),Dn.prototype.__init5.call(this),Dn.prototype.__init6.call(this);try{t(this._resolve,this._reject)}catch(t){this._reject(t)}}then(t,e){return new Dn((n,r)=>{this._handlers.push([!1,e=>{if(t)try{n(t(e))}catch(t){r(t)}else n(e)},t=>{if(e)try{n(e(t))}catch(t){r(t)}else r(t)}]),this._executeHandlers()})}catch(t){return this.then(t=>t,t)}finally(t){return new Dn((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{i?n(r):e(r)})})}__init3(){this._resolve=t=>{this._setResult(Cn.RESOLVED,t)}}__init4(){this._reject=t=>{this._setResult(Cn.REJECTED,t)}}__init5(){this._setResult=(t,e)=>{this._state===Cn.PENDING&&(ue(e)?e.then(this._resolve,this._reject):(this._state=t,this._value=e,this._executeHandlers()))}}__init6(){this._executeHandlers=()=>{if(this._state===Cn.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(t=>{t[0]||(this._state===Cn.RESOLVED&&t[1](this._value),this._state===Cn.REJECTED&&t[2](this._value),t[0]=!0)})}}}function In(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}function Nn(t){return t.split(/\\?\//).filter(t=>t.length>0&&","!==t).length}const On=["fatal","error","warning","log","info","debug"],Un=_e(),An={nowSeconds:()=>Date.now()/1e3},Bn=bn()?function(){try{return En(module,"perf_hooks").performance}catch(t){return}}():function(){const{performance:t}=Un;if(t&&t.now)return{now:()=>t.now(),timeOrigin:Date.now()-t.now()}}(),Mn=void 0===Bn?An:{nowSeconds:()=>(Bn.timeOrigin+Bn.now())/1e3},Pn=An.nowSeconds.bind(An),Ln=Mn.nowSeconds.bind(Mn),Hn=(()=>{const{performance:t}=Un;if(!t||!t.now)return;const e=36e5,n=t.now(),r=Date.now(),i=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,s=i<e,a=t.timing&&t.timing.navigationStart,o="number"==typeof a?Math.abs(a+n-r):e;return s||o<e?i<=o?t.timeOrigin:a:r})(),zn=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Gn(t,e=[]){return[t,e]}function Yn(t,e){const[n,r]=t;return[n,[...r,e]]}function $n(t,e){const n=t[1];for(const t of n)if(e(t,t[0].type))return!0;return!1}function Fn(t,e){return(e||new TextEncoder).encode(t)}function jn(t,e){const[n,r]=t;let i=JSON.stringify(n);function s(t){"string"==typeof i?i="string"==typeof t?i+t:[Fn(i,e),t]:i.push("string"==typeof t?Fn(t,e):t)}for(const t of r){const[e,n]=t;if(s(`\n${JSON.stringify(e)}\n`),"string"==typeof n||n instanceof Uint8Array)s(n);else{let t;try{t=JSON.stringify(n)}catch(e){t=JSON.stringify(wn(n))}s(t)}}return"string"==typeof i?i:function(t){const e=t.reduce((t,e)=>t+e.length,0),n=new Uint8Array(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n}(i)}function Vn(t,e){const n="string"==typeof t.data?Fn(t.data,e):t.data;return[Ge({type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),n]}const Zn={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor"};function qn(t){return Zn[t]}function Wn(t){if(!t||!t.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function Kn(t,e,n,r){const i=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&{sdk:e},...!!n&&{dsn:we(r)},...i&&{trace:Ge({...i})}}}const Jn=6e4,Xn="baggage",Qn="sentry-",tr=/^sentry-/,er=8192;function nr(t){return function(t){if(0!==Object.keys(t).length)return Object.entries(t).reduce((t,[e,n],r)=>{const i=`${encodeURIComponent(e)}=${encodeURIComponent(n)}`,s=0===r?i:`${t},${i}`;return s.length>er?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn(`Not adding key: ${e} with val: ${n} to baggage header due to exceeding baggage size limits.`),t):s},"")}(Object.entries(t).reduce((t,[e,n])=>(n&&(t[`${Qn}${e}`]=n),t),{}))}function rr(t){return t.split(",").map(t=>t.split("=").map(t=>decodeURIComponent(t.trim()))).reduce((t,[e,n])=>(t[e]=n,t),{})}const ir="production";function sr(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),t.did||e.did||(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||Ln(),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=32===e.sid.length?e.sid:hn()),void 0!==e.init&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),"number"==typeof e.started&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof e.duration)t.duration=e.duration;else{const e=t.timestamp-t.started;t.duration=e>=0?e:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),"number"==typeof e.errors&&(t.errors=e.errors),e.status&&(t.status=e.status)}class ar{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(t){const e=new ar;return t&&(e._breadcrumbs=[...t._breadcrumbs],e._tags={...t._tags},e._extra={...t._extra},e._contexts={...t._contexts},e._user=t._user,e._level=t._level,e._span=t._span,e._session=t._session,e._transactionName=t._transactionName,e._fingerprint=t._fingerprint,e._eventProcessors=[...t._eventProcessors],e._requestSession=t._requestSession,e._attachments=[...t._attachments],e._sdkProcessingMetadata={...t._sdkProcessingMetadata}),e}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{},this._session&&sr(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,e){return this._tags={...this._tags,[t]:e},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,e){return this._extra={...this._extra,[t]:e},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,e){return null===e?delete this._contexts[t]:this._contexts[t]=e,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const t=this.getSpan();return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;if("function"==typeof t){const e=t(this);return e instanceof ar?e:this}return t instanceof ar?(this._tags={...this._tags,...t._tags},this._extra={...this._extra,...t._extra},this._contexts={...this._contexts,...t._contexts},t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession)):oe(t)&&(this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(t,e){const n="number"==typeof e?e:100;if(n<=0)return this;const r={timestamp:Pn(),...t};return this._breadcrumbs=[...this._breadcrumbs,r].slice(-n),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(t,e={}){if(this._extra&&Object.keys(this._extra).length&&(t.extra={...this._extra,...t.extra}),this._tags&&Object.keys(this._tags).length&&(t.tags={...this._tags,...t.tags}),this._user&&Object.keys(this._user).length&&(t.user={...this._user,...t.user}),this._contexts&&Object.keys(this._contexts).length&&(t.contexts={...this._contexts,...t.contexts}),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span){t.contexts={trace:this._span.getTraceContext(),...t.contexts};const e=this._span.transaction;if(e){t.sdkProcessingMetadata={dynamicSamplingContext:e.getDynamicSamplingContext(),...t.sdkProcessingMetadata};const n=e.name;n&&(t.tags={transaction:n,...t.tags})}}return this._applyFingerprint(t),t.breadcrumbs=[...t.breadcrumbs||[],...this._breadcrumbs],t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...or(),...this._eventProcessors],t,e)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}_notifyEventProcessors(t,e,n,r=0){return new Dn((i,s)=>{const a=t[r];if(null===e||"function"!=typeof a)i(e);else{const o=a({...e},n);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.id&&null===o&&De.log(`Event processor "${a.id}" dropped event`),ue(o)?o.then(e=>this._notifyEventProcessors(t,e,n,r+1).then(i)).then(null,s):this._notifyEventProcessors(t,o,n,r+1).then(i).then(null,s)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}_applyFingerprint(t){t.fingerprint=t.fingerprint?vn(t.fingerprint):[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}}function or(){return me("globalEventProcessors",()=>[])}function cr(t){or().push(t)}const lr=4,ur=100;class dr{constructor(t,e=new ar,n=lr){this._version=n,this._stack=[{scope:e}],t&&this.bindClient(t)}isOlderThan(t){return this._version<t}bindClient(t){this.getStackTop().client=t,t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=ar.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return!(this.getStack().length<=1||!this.getStack().pop())}withScope(t){const e=this.pushScope();try{t(e)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,e){const n=this._lastEventId=e&&e.event_id?e.event_id:hn(),r=new Error("Sentry syntheticException");return this._withClient((i,s)=>{i.captureException(t,{originalException:t,syntheticException:r,...e,event_id:n},s)}),n}captureMessage(t,e,n){const r=this._lastEventId=n&&n.event_id?n.event_id:hn(),i=new Error(t);return this._withClient((s,a)=>{s.captureMessage(t,e,{originalException:t,syntheticException:i,...n,event_id:r},a)}),r}captureEvent(t,e){const n=e&&e.event_id?e.event_id:hn();return t.type||(this._lastEventId=n),this._withClient((r,i)=>{r.captureEvent(t,{...e,event_id:n},i)}),n}lastEventId(){return this._lastEventId}addBreadcrumb(t,e){const{scope:n,client:r}=this.getStackTop();if(!r)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:s=ur}=r.getOptions&&r.getOptions()||{};if(s<=0)return;const a={timestamp:Pn(),...t},o=i?xe(()=>i(a,e)):a;null!==o&&(r.emit&&r.emit("beforeAddBreadcrumb",o,e),n.addBreadcrumb(o,s))}setUser(t){this.getScope().setUser(t)}setTags(t){this.getScope().setTags(t)}setExtras(t){this.getScope().setExtras(t)}setTag(t,e){this.getScope().setTag(t,e)}setExtra(t,e){this.getScope().setExtra(t,e)}setContext(t,e){this.getScope().setContext(t,e)}configureScope(t){const{scope:e,client:n}=this.getStackTop();n&&t(e)}run(t){const e=hr(this);try{t(this)}finally{hr(e)}}getIntegration(t){const e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(e){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,e){const n=this._callExtensionMethod("startTransaction",t,e);return"undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__||n||console.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"),n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){const t=this.getStackTop().scope,e=t.getSession();e&&function(t,e){let n={};"ok"===t.status&&(n={status:"exited"}),sr(t,n)}(e),this._sendSessionUpdate(),t.setSession()}startSession(t){const{scope:e,client:n}=this.getStackTop(),{release:r,environment:i=ir}=n&&n.getOptions()||{},{userAgent:s}=fe.navigator||{},a=function(t){const e=Ln(),n={sid:hn(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return Ge({sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}(n)};return t&&sr(n,t),n}({release:r,environment:i,user:e.getUser(),...s&&{userAgent:s},...t}),o=e.getSession&&e.getSession();return o&&"ok"===o.status&&sr(o,{status:"exited"}),this.endSession(),e.setSession(a),a}shouldSendDefaultPii(){const t=this.getClient(),e=t&&t.getOptions();return Boolean(e&&e.sendDefaultPii)}_sendSessionUpdate(){const{scope:t,client:e}=this.getStackTop(),n=t.getSession();n&&e&&e.captureSession&&e.captureSession(n)}_withClient(t){const{scope:e,client:n}=this.getStackTop();n&&t(n,e)}_callExtensionMethod(t,...e){const n=pr().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[t])return n.extensions[t].apply(this,e);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function pr(){return fe.__SENTRY__=fe.__SENTRY__||{extensions:{},hub:void 0},fe}function hr(t){const e=pr(),n=_r(e);return mr(e,t),n}function fr(){const t=pr();if(t.__SENTRY__&&t.__SENTRY__.acs){const e=t.__SENTRY__.acs.getCurrentHub();if(e)return e}return function(t=pr()){var e;return(e=t)&&e.__SENTRY__&&e.__SENTRY__.hub&&!_r(t).isOlderThan(lr)||mr(t,new dr),_r(t)}(t)}function _r(t){return me("hub",()=>new dr,t)}function mr(t,e){return!!t&&((t.__SENTRY__=t.__SENTRY__||{}).hub=e,!0)}function gr(t){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const e=fr().getClient(),n=t||e&&e.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function yr(t){return(t||fr()).getScope().getTransaction()}let vr=!1;function br(){const t=yr();if(t){const e="internal_error";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log(`[Tracing] Transaction: ${e} -> Global error occured`),t.setStatus(e)}}br.tag="sentry_tracingErrorCallback";class Er{__init(){this.spans=[]}constructor(t=1e3){Er.prototype.__init.call(this),this._maxlen=t}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}}class Sr{__init2(){this.traceId=hn()}__init3(){this.spanId=hn().substring(16)}__init4(){this.startTimestamp=Ln()}__init5(){this.tags={}}__init6(){this.data={}}__init7(){this.instrumenter="sentry"}constructor(t){if(Sr.prototype.__init2.call(this),Sr.prototype.__init3.call(this),Sr.prototype.__init4.call(this),Sr.prototype.__init5.call(this),Sr.prototype.__init6.call(this),Sr.prototype.__init7.call(this),!t)return this;t.traceId&&(this.traceId=t.traceId),t.spanId&&(this.spanId=t.spanId),t.parentSpanId&&(this.parentSpanId=t.parentSpanId),"sampled"in t&&(this.sampled=t.sampled),t.op&&(this.op=t.op),t.description&&(this.description=t.description),t.data&&(this.data=t.data),t.tags&&(this.tags=t.tags),t.status&&(this.status=t.status),t.startTimestamp&&(this.startTimestamp=t.startTimestamp),t.endTimestamp&&(this.endTimestamp=t.endTimestamp),t.instrumenter&&(this.instrumenter=t.instrumenter)}startChild(t){const e=new Sr({...t,parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId});if(e.spanRecorder=this.spanRecorder,e.spanRecorder&&e.spanRecorder.add(e),e.transaction=this.transaction,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&e.transaction){const n=`[Tracing] Starting '${t&&t.op||"< unknown op >"}' span on transaction '${e.transaction.name||"< unknown name >"}' (${e.transaction.spanId}).`;e.transaction.metadata.spanMetadata[e.spanId]={logMessage:n},De.log(n)}return e}setTag(t,e){return this.tags={...this.tags,[t]:e},this}setData(t,e){return this.data={...this.data,[t]:e},this}setStatus(t){return this.status=t,this}setHttpStatus(t){this.setTag("http.status_code",String(t));const e=function(t){if(t<400&&t>=100)return"ok";if(t>=400&&t<500)switch(t){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(t>=500&&t<600)switch(t){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}(t);return"unknown_error"!==e&&this.setStatus(e),this}isSuccess(){return"ok"===this.status}finish(t){if(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&this.transaction&&this.transaction.spanId!==this.spanId){const{logMessage:t}=this.transaction.metadata.spanMetadata[this.spanId];t&&De.log(t.replace("Starting","Finishing"))}this.endTimestamp="number"==typeof t?t:Ln()}toTraceparent(){let t="";return void 0!==this.sampled&&(t=this.sampled?"-1":"-0"),`${this.traceId}-${this.spanId}${t}`}toContext(){return Ge({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})}updateWithContext(t){return this.data=t.data||{},this.description=t.description,this.endTimestamp=t.endTimestamp,this.op=t.op,this.parentSpanId=t.parentSpanId,this.sampled=t.sampled,this.spanId=t.spanId||this.spanId,this.startTimestamp=t.startTimestamp||this.startTimestamp,this.status=t.status,this.tags=t.tags||{},this.traceId=t.traceId||this.traceId,this}getTraceContext(){return Ge({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})}toJSON(){return Ge({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId})}}class wr extends Sr{__init(){this._measurements={}}__init2(){this._contexts={}}__init3(){this._frozenDynamicSamplingContext=void 0}constructor(t,e){super(t),wr.prototype.__init.call(this),wr.prototype.__init2.call(this),wr.prototype.__init3.call(this),this._hub=e||fr(),this._name=t.name||"",this.metadata={source:"custom",...t.metadata,spanMetadata:{}},this._trimEnd=t.trimEnd,this.transaction=this;const n=this.metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(t){this.setName(t)}setName(t,e="custom"){this._name=t,this.metadata.source=e}initSpanRecorder(t=1e3){this.spanRecorder||(this.spanRecorder=new Er(t)),this.spanRecorder.add(this)}setContext(t,e){null===e?delete this._contexts[t]:this._contexts[t]=e}setMeasurement(t,e,n=""){this._measurements[t]={value:e,unit:n}}setMetadata(t){this.metadata={...this.metadata,...t}}finish(t){if(void 0!==this.endTimestamp)return;this.name||(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this.name="<unlabeled transaction>"),super.finish(t);const e=this._hub.getClient();if(e&&e.emit&&e.emit("finishTransaction",this),!0!==this.sampled)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),void(e&&e.recordDroppedEvent("sample_rate","transaction"));const n=this.spanRecorder?this.spanRecorder.spans.filter(t=>t!==this&&t.endTimestamp):[];this._trimEnd&&n.length>0&&(this.endTimestamp=n.reduce((t,e)=>t.endTimestamp&&e.endTimestamp?t.endTimestamp>e.endTimestamp?t:e:t).endTimestamp);const r=this.metadata,i={contexts:{...this._contexts,trace:this.getTraceContext()},spans:n,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:{...r,dynamicSamplingContext:this.getDynamicSamplingContext()},...r.source&&{transaction_info:{source:r.source}}};return Object.keys(this._measurements).length>0&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),i.measurements=this._measurements),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`),this._hub.captureEvent(i)}toContext(){return Ge({...super.toContext(),name:this.name,trimEnd:this._trimEnd})}updateWithContext(t){return super.updateWithContext(t),this.name=t.name||"",this._trimEnd=t.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext;const t=this._hub||fr(),e=t&&t.getClient();if(!e)return{};const{environment:n,release:r}=e.getOptions()||{},{publicKey:i}=e.getDsn()||{},s=this.metadata.sampleRate,a=void 0!==s?s.toString():void 0,{segment:o}=t.getScope().getUser()||{},c=this.metadata.source,l=Ge({environment:n||ir,release:r,transaction:c&&"url"!==c?this.name:void 0,user_segment:o,public_key:i,trace_id:this.traceId,sample_rate:a});return e.emit&&e.emit("createDsc",l),l}setHub(t){this._hub=t}}const kr={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},Tr=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class Cr extends Er{constructor(t,e,n,r){super(r),this._pushActivity=t,this._popActivity=e,this.transactionSpanId=n}add(t){t.spanId!==this.transactionSpanId&&(t.finish=e=>{t.endTimestamp="number"==typeof e?e:Ln(),this._popActivity(t.spanId)},void 0===t.endTimestamp&&this._pushActivity(t.spanId)),super.add(t)}}class xr extends wr{__init(){this.activities={}}__init2(){this._heartbeatCounter=0}__init3(){this._finished=!1}__init4(){this._idleTimeoutCanceledPermanently=!1}__init5(){this._beforeFinishCallbacks=[]}__init6(){this._finishReason=Tr[4]}constructor(t,e,n=kr.idleTimeout,r=kr.finalTimeout,i=kr.heartbeatInterval,s=!1){super(t,e),this._idleHub=e,this._idleTimeout=n,this._finalTimeout=r,this._heartbeatInterval=i,this._onScope=s,xr.prototype.__init.call(this),xr.prototype.__init2.call(this),xr.prototype.__init3.call(this),xr.prototype.__init4.call(this),xr.prototype.__init5.call(this),xr.prototype.__init6.call(this),s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log(`Setting idle transaction on scope. Span ID: ${this.spanId}`),e.configureScope(t=>t.setSpan(this))),this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=Tr[3],this.finish())},this._finalTimeout)}finish(t=Ln()){if(this._finished=!0,this.activities={},"ui.action.click"===this.op&&this.setTag("finishReason",this._finishReason),this.spanRecorder){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("[Tracing] finishing IdleTransaction",new Date(1e3*t).toISOString(),this.op);for(const e of this._beforeFinishCallbacks)e(this,t);this.spanRecorder.spans=this.spanRecorder.spans.filter(e=>{if(e.spanId===this.spanId)return!0;e.endTimestamp||(e.endTimestamp=t,e.setStatus("cancelled"),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(e,void 0,2)));const n=e.startTimestamp<t;return n||("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("[Tracing] discarding Span since it happened after Transaction was finished",JSON.stringify(e,void 0,2)),n}),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("[Tracing] flushing IdleTransaction")}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("[Tracing] No active IdleTransaction");if(this._onScope){const t=this._idleHub.getScope();t.getTransaction()===this&&t.setSpan(void 0)}return super.finish(t)}registerBeforeFinishCallback(t){this._beforeFinishCallbacks.push(t)}initSpanRecorder(t){this.spanRecorder||(this.spanRecorder=new Cr(t=>{this._finished||this._pushActivity(t)},t=>{this._finished||this._popActivity(t)},this.spanId,t),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("Starting heartbeat"),this._pingHeartbeat()),this.spanRecorder.add(this)}cancelIdleTimeout(t,{restartOnChildSpanChange:e}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=!1===e,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,0===Object.keys(this.activities).length&&this._idleTimeoutCanceledPermanently&&(this._finishReason=Tr[5],this.finish(t)))}setFinishReason(t){this._finishReason=t}_restartIdleTimeout(t){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{this._finished||0!==Object.keys(this.activities).length||(this._finishReason=Tr[1],this.finish(t))},this._idleTimeout)}_pushActivity(t){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log(`[Tracing] pushActivity: ${t}`),this.activities[t]=!0,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(t){if(this.activities[t]&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log(`[Tracing] popActivity ${t}`),delete this.activities[t],("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("[Tracing] new activities count",Object.keys(this.activities).length)),0===Object.keys(this.activities).length){const t=Ln();this._idleTimeoutCanceledPermanently?(this._finishReason=Tr[5],this.finish(t)):this._restartIdleTimeout(t+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const t=Object.keys(this.activities).join("");t===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=Tr[0],this.finish()):this._pingHeartbeat()}_pingHeartbeat(){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}}function Rr(){const t=this.getScope().getSpan();return t?{"sentry-trace":t.toTraceparent()}:{}}function Dr(t,e,n){if(!gr(e))return t.sampled=!1,t;if(void 0!==t.sampled)return t.setMetadata({sampleRate:Number(t.sampled)}),t;let r;return"function"==typeof e.tracesSampler?(r=e.tracesSampler(n),t.setMetadata({sampleRate:Number(r)})):void 0!==n.parentSampled?r=n.parentSampled:void 0!==e.tracesSampleRate?(r=e.tracesSampleRate,t.setMetadata({sampleRate:Number(r)})):(r=1,t.setMetadata({sampleRate:r})),(de(i=r)||"number"!=typeof i&&"boolean"!=typeof i?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(i)} of type ${JSON.stringify(typeof i)}.`),0):!(i<0||i>1)||(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${i}.`),0))?r?(t.sampled=Math.random()<r,t.sampled?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log(`[Tracing] starting ${t.op} transaction - ${t.name}`),t):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`),t)):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.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")),t.sampled=!1,t):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn("[Tracing] Discarding transaction because of invalid sample rate."),t.sampled=!1,t);var i}function Ir(t,e){const n=this.getClient(),r=n&&n.getOptions()||{},i=r.instrumenter||"sentry",s=t.instrumenter||"sentry";i!==s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error(`A transaction was started with instrumenter=\`${s}\`, but the SDK is configured with the \`${i}\` instrumenter.\nThe transaction will not be sampled. Please use the ${i} instrumentation to start transactions.`),t.sampled=!1);let a=new wr(t,this);return a=Dr(a,r,{parentSampled:t.parentSampled,transactionContext:t,...e}),a.sampled&&a.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",a),a}function Nr(t,e,n,r,i,s,a){const o=t.getClient(),c=o&&o.getOptions()||{};let l=new xr(e,t,n,r,a,i);return l=Dr(l,c,{parentSampled:e.parentSampled,transactionContext:e,...s}),l.sampled&&l.initSpanRecorder(c._experiments&&c._experiments.maxSpans),o&&o.emit&&o.emit("startTransaction",l),l}function Or(){const t=pr();t.__SENTRY__&&(t.__SENTRY__.extensions=t.__SENTRY__.extensions||{},t.__SENTRY__.extensions.startTransaction||(t.__SENTRY__.extensions.startTransaction=Ir),t.__SENTRY__.extensions.traceHeaders||(t.__SENTRY__.extensions.traceHeaders=Rr),vr||(vr=!0,en("error",br),en("unhandledrejection",br)))}function Ur(t,e,n=(()=>{})){const r={...t};void 0!==r.name&&void 0===r.description&&(r.description=r.name);const i=fr(),s=i.getScope(),a=s.getSpan(),o=a?a.startChild(r):i.startTransaction(r);function c(){o&&o.finish(),i.getScope().setSpan(a)}let l;s.setSpan(o);try{l=e(o)}catch(t){throw o&&o.setStatus("internal_error"),n(t),c(),t}return ue(l)?Promise.resolve(l).then(()=>{c()},t=>{o&&o.setStatus("internal_error"),n(t),c()}):c(),l}function Ar(t,e){return fr().captureException(t,{captureContext:e})}function Br(t){fr().withScope(t)}function Mr(t){return`${t.protocol?`${t.protocol}:`:""}//${t.host}${t.port?`:${t.port}`:""}${t.path?`/${t.path}`:""}/api/`}const Pr=[];function Lr(t){const e=t.defaultIntegrations||[],n=t.integrations;let r;e.forEach(t=>{t.isDefaultInstance=!0}),r=Array.isArray(n)?[...e,...n]:"function"==typeof n?vn(n(e)):e;const i=function(t){const e={};return t.forEach(t=>{const{name:n}=t,r=e[n];r&&!r.isDefaultInstance&&t.isDefaultInstance||(e[n]=t)}),Object.keys(e).map(t=>e[t])}(r),s=function(t,e){for(let e=0;e<t.length;e++)if(1==("Debug"===t[e].name))return e;return-1}(i);if(-1!==s){const[t]=i.splice(s,1);i.push(t)}return i}function Hr(t,e){e[t.name]=t,-1===Pr.indexOf(t.name)&&(t.setupOnce(cr,fr),Pr.push(t.name),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log(`Integration installed: ${t.name}`))}function zr(t,e,n,r){const{normalizeDepth:i=3,normalizeMaxBreadth:s=1e3}=t,a={...e,event_id:e.event_id||n.event_id||hn(),timestamp:e.timestamp||Pn()},o=n.integrations||t.integrations.map(t=>t.name);!function(t,e){const{environment:n,release:r,dist:i,maxValueLength:s=250}=e;"environment"in t||(t.environment="environment"in e?n:ir),void 0===t.release&&void 0!==r&&(t.release=r),void 0===t.dist&&void 0!==i&&(t.dist=i),t.message&&(t.message=Ie(t.message,s));const a=t.exception&&t.exception.values&&t.exception.values[0];a&&a.value&&(a.value=Ie(a.value,s));const o=t.request;o&&o.url&&(o.url=Ie(o.url,s))}(a,t),function(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}(a,o),void 0===e.type&&function(t,e){const n=fe._sentryDebugIds;if(!n)return;let r;const i=Gr.get(e);i?r=i:(r=new Map,Gr.set(e,r));const s=Object.keys(n).reduce((t,i)=>{let s;const a=r.get(i);a?s=a:(s=e(i),r.set(i,s));for(let e=s.length-1;e>=0;e--){const r=s[e];if(r.filename){t[r.filename]=n[i];break}}return t},{}),a=new Set;try{t.exception.values.forEach(t=>{t.stacktrace.frames.forEach(t=>{t.filename&&a.add(t.filename)})})}catch(t){}t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const o=t.debug_meta.images;a.forEach(t=>{s[t]&&o.push({type:"sourcemap",code_file:t,debug_id:s[t]})})}(a,t.stackParser);let c=r;n.captureContext&&(c=ar.clone(c).update(n.captureContext));let l=xn(a);if(c){if(c.getAttachments){const t=[...n.attachments||[],...c.getAttachments()];t.length&&(n.attachments=t)}l=c.applyToEvent(a,n)}return l.then(t=>"number"==typeof i&&i>0?function(t,e,n){if(!t)return null;const r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(t=>({...t,...t.data&&{data:wn(t.data,e,n)}}))},...t.user&&{user:wn(t.user,e,n)},...t.contexts&&{contexts:wn(t.contexts,e,n)},...t.extra&&{extra:wn(t.extra,e,n)}};return t.contexts&&t.contexts.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=wn(t.contexts.trace.data,e,n))),t.spans&&(r.spans=t.spans.map(t=>(t.data&&(t.data=wn(t.data,e,n)),t))),r}(t,i,s):t)}const Gr=new WeakMap,Yr="Not capturing exception because it's already been captured.";class $r{__init(){this._integrations={}}__init2(){this._integrationsInitialized=!1}__init3(){this._numProcessing=0}__init4(){this._outcomes={}}__init5(){this._hooks={}}constructor(t){if($r.prototype.__init.call(this),$r.prototype.__init2.call(this),$r.prototype.__init3.call(this),$r.prototype.__init4.call(this),$r.prototype.__init5.call(this),this._options=t,t.dsn){this._dsn=Te(t.dsn);const e=function(t,e={}){const n="string"!=typeof e&&e._metadata?e._metadata.sdk:void 0;return("string"==typeof e?e:e.tunnel)||`${function(t){return`${Mr(t)}${t.projectId}/envelope/`}(t)}?${function(t,e){return n={sentry_key:t.publicKey,sentry_version:"7",...e&&{sentry_client:`${e.name}/${e.version}`}},Object.keys(n).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(n[t])}`).join("&");var n}(t,n)}`}(this._dsn,t);this._transport=t.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:e})}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn("No DSN provided, client will not do anything.")}captureException(t,e,n){if(yn(t))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log(Yr));let r=e&&e.event_id;return this._process(this.eventFromException(t,e).then(t=>this._captureEvent(t,e,n)).then(t=>{r=t})),r}captureMessage(t,e,n,r){let i=n&&n.event_id;const s=ae(t)?this.eventFromMessage(String(t),e,n):this.eventFromException(t,n);return this._process(s.then(t=>this._captureEvent(t,n,r)).then(t=>{i=t})),i}captureEvent(t,e,n){if(e&&e.originalException&&yn(e.originalException))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log(Yr));let r=e&&e.event_id;return this._process(this._captureEvent(t,e,n).then(t=>{r=t})),r}captureSession(t){this._isEnabled()?"string"!=typeof t.release?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),sr(t,{init:!1})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn("SDK not enabled, will not capture session.")}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const e=this._transport;return e?this._isClientDoneProcessing(t).then(n=>e.flush(t).then(t=>n&&t)):xn(!0)}close(t){return this.flush(t).then(t=>(this.getOptions().enabled=!1,t))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=function(t){const e={};return t.forEach(t=>{t&&Hr(t,e)}),e}(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch(e){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}addIntegration(t){Hr(t,this._integrations)}sendEvent(t,e={}){if(this._dsn){let n=function(t,e,n,r){const i=Wn(n),s=t.type&&"replay_event"!==t.type?t.type:"event";!function(t,e){e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]])}(t,n&&n.sdk);const a=Kn(t,i,r,e);return delete t.sdkProcessingMetadata,Gn(a,[[{type:s},t]])}(t,this._dsn,this._options._metadata,this._options.tunnel);for(const t of e.attachments||[])n=Yn(n,Vn(t,this._options.transportOptions&&this._options.transportOptions.textEncoder));const r=this._sendEnvelope(n);r&&r.then(e=>this.emit("afterSendEvent",t,e),null)}}sendSession(t){if(this._dsn){const e=function(t,e,n,r){const i=Wn(n);return Gn({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&{dsn:we(e)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t]])}(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(e)}}recordDroppedEvent(t,e,n){if(this._options.sendClientReports){const n=`${t}:${e}`;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log(`Adding outcome: "${n}"`),this._outcomes[n]=this._outcomes[n]+1||1}}on(t,e){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(e)}emit(t,...e){this._hooks[t]&&this._hooks[t].forEach(t=>t(...e))}_updateSessionFromEvent(t,e){let n=!1,r=!1;const i=e.exception&&e.exception.values;if(i){r=!0;for(const t of i){const e=t.mechanism;if(e&&!1===e.handled){n=!0;break}}}const s="ok"===t.status;(s&&0===t.errors||s&&n)&&(sr(t,{...n&&{status:"crashed"},errors:t.errors||Number(r||n)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Dn(e=>{let n=0;const r=setInterval(()=>{0==this._numProcessing?(clearInterval(r),e(!0)):(n+=1,t&&n>=t&&(clearInterval(r),e(!1)))},1)})}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._dsn}_prepareEvent(t,e,n){const r=this.getOptions(),i=Object.keys(this._integrations);return!e.integrations&&i.length>0&&(e.integrations=i),zr(r,t,e,n)}_captureEvent(t,e={},n){return this._processEvent(t,e,n).then(t=>t.event_id,t=>{if("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__){const e=t;"log"===e.logLevel?De.log(e.message):De.warn(e)}})}_processEvent(t,e,n){const r=this.getOptions(),{sampleRate:i}=r;if(!this._isEnabled())return Rn(new Ee("SDK not enabled, will not capture event.","log"));const s=jr(t),a=Fr(t),o=t.type||"error",c=`before send for type \`${o}\``;if(a&&"number"==typeof i&&Math.random()>i)return this.recordDroppedEvent("sample_rate","error",t),Rn(new Ee(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const l="replay_event"===o?"replay":o;return this._prepareEvent(t,e,n).then(n=>{if(null===n)throw this.recordDroppedEvent("event_processor",l,t),new Ee("An event processor returned `null`, will not send event.","log");if(e.data&&!0===e.data.__sentry__)return n;const i=function(t,e,n){const{beforeSend:r,beforeSendTransaction:i}=t;return Fr(e)&&r?r(e,n):jr(e)&&i?i(e,n):e}(r,n,e);return function(t,e){const n=`${e} must return \`null\` or a valid event.`;if(ue(t))return t.then(t=>{if(!oe(t)&&null!==t)throw new Ee(n);return t},t=>{throw new Ee(`${e} rejected with ${t}`)});if(!oe(t)&&null!==t)throw new Ee(n);return t}(i,c)}).then(r=>{if(null===r)throw this.recordDroppedEvent("before_send",l,t),new Ee(`${c} returned \`null\`, will not send event.`,"log");const i=n&&n.getSession();!s&&i&&this._updateSessionFromEvent(i,r);const a=r.transaction_info;if(s&&a&&r.transaction!==t.transaction){const t="custom";r.transaction_info={...a,source:t}}return this.sendEvent(r,e),r}).then(null,t=>{if(t instanceof Ee)throw t;throw this.captureException(t,{data:{__sentry__:!0},originalException:t}),new Ee(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)})}_process(t){this._numProcessing++,t.then(t=>(this._numProcessing--,t),t=>(this._numProcessing--,t))}_sendEnvelope(t){if(this._transport&&this._dsn)return this.emit("beforeEnvelope",t),this._transport.send(t).then(null,t=>{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error("Error while sending event:",t)});("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error("Transport disabled")}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.keys(t).map(e=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t[e]}})}}function Fr(t){return void 0===t.type}function jr(t){return"transaction"===t.type}const Vr=30;function Zr(t,e,n=function(t){const e=[];function n(t){return e.splice(e.indexOf(t),1)[0]}return{$:e,add:function(r){if(!(void 0===t||e.length<t))return Rn(new Ee("Not adding Promise because buffer limit was reached."));const i=r();return-1===e.indexOf(i)&&e.push(i),i.then(()=>n(i)).then(null,()=>n(i).then(null,()=>{})),i},drain:function(t){return new Dn((n,r)=>{let i=e.length;if(!i)return n(!0);const s=setTimeout(()=>{t&&t>0&&n(!1)},t);e.forEach(t=>{xn(t).then(()=>{--i||(clearTimeout(s),n(!0))},r)})})}}}(t.bufferSize||Vr)){let r={};function i(i){const s=[];if($n(i,(e,n)=>{const i=qn(n);if(function(t,e,n=Date.now()){return function(t,e){return t[e]||t.all||0}(t,e)>n}(r,i)){const r=qr(e,n);t.recordDroppedEvent("ratelimit_backoff",i,r)}else s.push(e)}),0===s.length)return xn();const a=Gn(i[0],s),o=e=>{$n(a,(n,r)=>{const i=qr(n,r);t.recordDroppedEvent(e,qn(r),i)})};return n.add(()=>e({body:jn(a,t.textEncoder)}).then(t=>(void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),r=function(t,{statusCode:e,headers:n},r=Date.now()){const i={...t},s=n&&n["x-sentry-rate-limits"],a=n&&n["retry-after"];if(s)for(const t of s.trim().split(",")){const[e,n]=t.split(":",2),s=parseInt(e,10),a=1e3*(isNaN(s)?60:s);if(n)for(const t of n.split(";"))i[t]=r+a;else i.all=r+a}else a?i.all=r+function(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${t}`);return isNaN(r)?Jn:r-e}(a,r):429===e&&(i.all=r+6e4);return i}(r,t),t),t=>{throw o("network_error"),t})).then(t=>t,t=>{if(t instanceof Ee)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error("Skipped sending event because buffer is full."),o("queue_overflow"),xn();throw t})}return i.__sentry__baseTransport__=!0,{send:i,flush:t=>n.drain(t)}}function qr(t,e){if("event"===e||"transaction"===e)return Array.isArray(t)?t[1]:void 0}const Wr="7.52.0";let Kr;class Jr{constructor(){Jr.prototype.__init.call(this)}static __initStatic(){this.id="FunctionToString"}__init(){this.name=Jr.id}setupOnce(){Kr=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=Me(this)||this;return Kr.apply(e,t)}}catch(t){}}}Jr.__initStatic();const Xr=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/];class Qr{static __initStatic(){this.id="InboundFilters"}__init(){this.name=Qr.id}constructor(t={}){this._options=t,Qr.prototype.__init.call(this)}setupOnce(t,e){const n=t=>{const n=e();if(n){const e=n.getIntegration(Qr);if(e){const r=n.getClient(),i=r?r.getOptions():{},s=function(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...Xr],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]],ignoreInternal:void 0===t.ignoreInternal||t.ignoreInternal}}(e._options,i);return function(t,e){return e.ignoreInternal&&function(t){try{return"SentryError"===t.exception.values[0].type}catch(t){}return!1}(t)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${_n(t)}`),!0):function(t,e){return!(t.type||!e||!e.length)&&function(t){if(t.message)return[t.message];if(t.exception){const{values:e}=t.exception;try{const{type:t="",value:n=""}=e&&e[e.length-1]||{};return[`${n}`,`${t}: ${n}`]}catch(e){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error(`Cannot extract message for event ${_n(t)}`),[]}}return[]}(t).some(t=>Oe(t,e))}(t,e.ignoreErrors)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${_n(t)}`),!0):function(t,e){if("transaction"!==t.type||!e||!e.length)return!1;const n=t.transaction;return!!n&&Oe(n,e)}(t,e.ignoreTransactions)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${_n(t)}`),!0):function(t,e){if(!e||!e.length)return!1;const n=ti(t);return!!n&&Oe(n,e)}(t,e.denyUrls)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${_n(t)}.\nUrl: ${ti(t)}`),!0):!function(t,e){if(!e||!e.length)return!0;const n=ti(t);return!n||Oe(n,e)}(t,e.allowUrls)&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${_n(t)}.\nUrl: ${ti(t)}`),!0)}(t,s)?null:t}}return t};n.id=this.name,t(n)}}function ti(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch(t){}return e?function(t=[]){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(e):null}catch(e){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error(`Cannot extract url for event ${_n(t)}`),null}}Qr.__initStatic();const ei=fe;let ni=0;function ri(){return ni>0}function ii(t,e={},n){if("function"!=typeof t)return t;try{const e=t.__sentry_wrapped__;if(e)return e;if(Me(t))return t}catch(e){return t}const r=function(){const r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);const i=r.map(t=>ii(t,e));return t.apply(this,i)}catch(t){throw ni++,setTimeout(()=>{ni--}),Br(n=>{n.addEventProcessor(t=>(e.mechanism&&(mn(t,void 0,void 0),gn(t,e.mechanism)),t.extra={...t.extra,arguments:r},t)),Ar(t)}),t}};try{for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=t[e])}catch(t){}Be(r,t),Ae(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:()=>t.name})}catch(t){}return r}function si(t,e){const n=oi(t,e),r={type:e&&e.name,value:li(e)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function ai(t,e){return{exception:{values:[si(t,e)]}}}function oi(t,e){const n=e.stacktrace||e.stack||"",r=function(t){if(t){if("number"==typeof t.framesToPop)return t.framesToPop;if(ci.test(t.message))return 1}return 0}(e);try{return t(n,r)}catch(t){}return[]}const ci=/Minified React error #\d+;/i;function li(t){const e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}function ui(t,e,n,r,i){let s;if(re(e)&&e.error)return ai(t,e.error);if(ie(e)||ne(e,"DOMException")){const i=e;if("stack"in e)s=ai(t,e);else{const e=i.name||(ie(i)?"DOMError":"DOMException"),a=i.message?`${e}: ${i.message}`:e;s=di(t,a,n,r),mn(s,a)}return"code"in i&&(s.tags={...s.tags,"DOMException.code":`${i.code}`}),s}return ee(e)?ai(t,e):oe(e)||ce(e)?(s=function(t,e,n,r){const i=fr().getClient(),s=i&&i.getOptions().normalizeDepth,a={exception:{values:[{type:ce(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:`Non-Error ${r?"promise rejection":"exception"} captured with keys: ${ze(e)}`}]},extra:{__serialized__:kn(e,s)}};if(n){const e=oi(t,n);e.length&&(a.exception.values[0].stacktrace={frames:e})}return a}(t,e,n,i),gn(s,{synthetic:!0}),s):(s=di(t,e,n,r),mn(s,`${e}`,void 0),gn(s,{synthetic:!0}),s)}function di(t,e,n,r){const i={message:e};if(r&&n){const r=oi(t,n);r.length&&(i.exception={values:[{value:e,stacktrace:{frames:r}}]})}return i}const pi="Breadcrumbs";class hi{static __initStatic(){this.id=pi}__init(){this.name=hi.id}constructor(t){hi.prototype.__init.call(this),this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t}}setupOnce(){var t;this.options.console&&en("console",fi),this.options.dom&&en("dom",(t=this.options.dom,function(e){let n,r="object"==typeof t?t.serializeAttribute:void 0,i="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;i&&i>1024&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${i} was configured. Sentry will use 1024 instead.`),i=1024),"string"==typeof r&&(r=[r]);try{const t=e.event;n=function(t){return t&&!!t.target}(t)?ve(t.target,{keyAttrs:r,maxStringLength:i}):ve(t,{keyAttrs:r,maxStringLength:i})}catch(t){n="<unknown>"}0!==n.length&&fr().addBreadcrumb({category:`ui.${e.name}`,message:n},{event:e.event,name:e.name,global:e.global})})),this.options.xhr&&en("xhr",_i),this.options.fetch&&en("fetch",mi),this.options.history&&en("history",gi)}addSentryBreadcrumb(t){this.options.sentry&&fr().addBreadcrumb({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:_n(t)},{event:t})}}function fi(t){for(let e=0;e<t.args.length;e++)if("ref=Ref<"===t.args[e]){t.args[e+1]="viewRef";break}const e={category:"console",data:{arguments:t.args,logger:"console"},level:(n=t.level,"warn"===n?"warning":On.includes(n)?n:"log"),message:Ne(t.args," ")};var n;if("assert"===t.level){if(!1!==t.args[0])return;e.message=`Assertion failed: ${Ne(t.args.slice(1)," ")||"console.assert"}`,e.data.arguments=t.args.slice(1)}fr().addBreadcrumb(e,{input:t.args,level:t.level})}function _i(t){const{startTimestamp:e,endTimestamp:n}=t,r=t.xhr[Xe];if(!e||!n||!r)return;const{method:i,url:s,status_code:a,body:o}=r,c={method:i,url:s,status_code:a},l={xhr:t.xhr,input:o,startTimestamp:e,endTimestamp:n};fr().addBreadcrumb({category:"xhr",data:c,type:"http"},l)}function mi(t){const{startTimestamp:e,endTimestamp:n}=t;if(n&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){const r=t.fetchData,i={data:t.error,input:t.args,startTimestamp:e,endTimestamp:n};fr().addBreadcrumb({category:"fetch",data:r,level:"error",type:"http"},i)}else{const r={...t.fetchData,status_code:t.response&&t.response.status},i={input:t.args,response:t.response,startTimestamp:e,endTimestamp:n};fr().addBreadcrumb({category:"fetch",data:r,type:"http"},i)}}function gi(t){let e=t.from,n=t.to;const r=In(ei.location.href);let i=In(e);const s=In(n);i.path||(i=r),r.protocol===s.protocol&&r.host===s.host&&(n=s.relative),r.protocol===i.protocol&&r.host===i.host&&(e=i.relative),fr().addBreadcrumb({category:"navigation",data:{from:e,to:n}})}hi.__initStatic();class yi extends $r{constructor(t){const e=ei.SENTRY_SDK_SOURCE||"npm";t._metadata=t._metadata||{},t._metadata.sdk=t._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:`${e}:@sentry/browser`,version:Wr}],version:Wr},super(t),t.sendClientReports&&ei.document&&ei.document.addEventListener("visibilitychange",()=>{"hidden"===ei.document.visibilityState&&this._flushOutcomes()})}eventFromException(t,e){return function(t,e,n,r){const i=ui(t,e,n&&n.syntheticException||void 0,r);return gn(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),xn(i)}(this._options.stackParser,t,e,this._options.attachStacktrace)}eventFromMessage(t,e="info",n){return function(t,e,n="info",r,i){const s=di(t,e,r&&r.syntheticException||void 0,i);return s.level=n,r&&r.event_id&&(s.event_id=r.event_id),xn(s)}(this._options.stackParser,t,e,n,this._options.attachStacktrace)}sendEvent(t,e){const n=this.getIntegrationById(pi);n&&n.addSentryBreadcrumb&&n.addSentryBreadcrumb(t),super.sendEvent(t,e)}captureUserFeedback(t){if(!this._isEnabled())return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn("SDK not enabled, will not capture user feedback."));const e=function(t,{metadata:e,tunnel:n,dsn:r}){const i={event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}},...!!n&&!!r&&{dsn:we(r)}},s=function(t){return[{type:"user_report"},t]}(t);return Gn(i,[s])}(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(e)}_prepareEvent(t,e,n){return t.platform=t.platform||"javascript",super._prepareEvent(t,e,n)}_flushOutcomes(){const t=this._clearOutcomes();if(0===t.length)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("No outcomes to send"));if(!this._dsn)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("No dsn provided, will not send outcomes"));("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("Sending outcomes:",t);const e=(n=t,Gn((r=this._options.tunnel&&we(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:Pn(),discarded_events:n}]]));var n,r;this._sendEnvelope(e)}}let vi;function bi(t,e=function(){if(vi)return vi;if(We(ei.fetch))return vi=ei.fetch.bind(ei);const t=ei.document;let e=ei.fetch;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(e=r.fetch),t.head.removeChild(n)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return vi=e.bind(ei)}()){let n=0,r=0;return Zr(t,function(i){const s=i.body.length;n+=s,r++;const a={body:i.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&r<15,...t.fetchOptions};try{return e(t.url,a).then(t=>(n-=s,r--,{statusCode:t.status,headers:{"x-sentry-rate-limits":t.headers.get("X-Sentry-Rate-Limits"),"retry-after":t.headers.get("Retry-After")}}))}catch(t){return vi=void 0,n-=s,r--,Rn(t)}})}function Ei(t){return Zr(t,function(e){return new Dn((n,r)=>{const i=new XMLHttpRequest;i.onerror=r,i.onreadystatechange=()=>{4===i.readyState&&n({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",t.url);for(const e in t.headers)Object.prototype.hasOwnProperty.call(t.headers,e)&&i.setRequestHeader(e,t.headers[e]);i.send(e.body)})})}const Si="?";function wi(t,e,n,r){const i={filename:t,function:e,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}const ki=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ti=/\((\S*)(?::(\d+))(?::(\d+))\)/,Ci=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,xi=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ri=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Di=Fe([30,t=>{const e=ki.exec(t);if(e){if(e[2]&&0===e[2].indexOf("eval")){const t=Ti.exec(e[2]);t&&(e[2]=t[1],e[3]=t[2],e[4]=t[3])}const[t,n]=Ii(e[1]||Si,e[2]);return wi(n,t,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}}],[50,t=>{const e=Ci.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const t=xi.exec(e[3]);t&&(e[1]=e[1]||"eval",e[3]=t[1],e[4]=t[2],e[5]="")}let t=e[3],n=e[1]||Si;return[n,t]=Ii(n,t),wi(t,n,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}],[40,t=>{const e=Ri.exec(t);return e?wi(e[2],e[1]||Si,+e[3],e[4]?+e[4]:void 0):void 0}]),Ii=(t,e)=>{const n=-1!==t.indexOf("safari-extension"),r=-1!==t.indexOf("safari-web-extension");return n||r?[-1!==t.indexOf("@")?t.split("@")[0]:Si,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};class Ni{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=Ni.id}__init2(){this._installFunc={onerror:Oi,onunhandledrejection:Ui}}constructor(t){Ni.prototype.__init.call(this),Ni.prototype.__init2.call(this),this._options={onerror:!0,onunhandledrejection:!0,...t}}setupOnce(){Error.stackTraceLimit=50;const t=this._options;for(const e in t){const n=this._installFunc[e];n&&t[e]&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log(`Global Handler attached: ${e}`),n(),this._installFunc[e]=void 0)}}}function Oi(){en("error",t=>{const[e,n,r]=Mi();if(!e.getIntegration(Ni))return;const{msg:i,url:s,line:a,column:o,error:c}=t;if(ri()||c&&c.__sentry_own_request__)return;const l=void 0===c&&se(i)?function(t,e,n,r){let i=re(t)?t.message:t,s="Error";const a=i.match(/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i);return a&&(s=a[1],i=a[2]),Ai({exception:{values:[{type:s,value:i}]}},e,n,r)}(i,s,a,o):Ai(ui(n,c||i,void 0,r,!1),s,a,o);l.level="error",Bi(e,c,l,"onerror")})}function Ui(){en("unhandledrejection",t=>{const[e,n,r]=Mi();if(!e.getIntegration(Ni))return;let i=t;try{"reason"in t?i=t.reason:"detail"in t&&"reason"in t.detail&&(i=t.detail.reason)}catch(t){}if(ri()||i&&i.__sentry_own_request__)return!0;const s=ae(i)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:ui(n,i,void 0,r,!0);s.level="error",Bi(e,i,s,"onunhandledrejection")})}function Ai(t,e,n,r){const i=t.exception=t.exception||{},s=i.values=i.values||[],a=s[0]=s[0]||{},o=a.stacktrace=a.stacktrace||{},c=o.frames=o.frames||[],l=isNaN(parseInt(r,10))?void 0:r,u=isNaN(parseInt(n,10))?void 0:n,d=se(e)&&e.length>0?e:function(){try{return ge.document.location.href}catch(t){return""}}();return 0===c.length&&c.push({colno:l,filename:d,function:"?",in_app:!0,lineno:u}),t}function Bi(t,e,n,r){gn(n,{handled:!1,type:r}),t.captureEvent(n,{originalException:e})}function Mi(){const t=fr(),e=t.getClient(),n=e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[t,n.stackParser,n.attachStacktrace]}Ni.__initStatic();const Pi=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class Li{static __initStatic(){this.id="TryCatch"}__init(){this.name=Li.id}constructor(t){Li.prototype.__init.call(this),this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t}}setupOnce(){this._options.setTimeout&&Ue(ei,"setTimeout",Hi),this._options.setInterval&&Ue(ei,"setInterval",Hi),this._options.requestAnimationFrame&&Ue(ei,"requestAnimationFrame",zi),this._options.XMLHttpRequest&&"XMLHttpRequest"in ei&&Ue(XMLHttpRequest.prototype,"send",Gi);const t=this._options.eventTarget;t&&(Array.isArray(t)?t:Pi).forEach(Yi)}}function Hi(t){return function(...e){return e[0]=ii(e[0],{mechanism:{data:{function:Ve(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}function zi(t){return function(e){return t.apply(this,[ii(e,{mechanism:{data:{function:"requestAnimationFrame",handler:Ve(t)},handled:!0,type:"instrument"}})])}}function Gi(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(t=>{t in n&&"function"==typeof n[t]&&Ue(n,t,function(e){const n={mechanism:{data:{function:t,handler:Ve(e)},handled:!0,type:"instrument"}},r=Me(e);return r&&(n.mechanism.data.handler=Ve(r)),ii(e,n)})}),t.apply(this,e)}}function Yi(t){const e=ei[t]&&ei[t].prototype;e&&e.hasOwnProperty&&e.hasOwnProperty("addEventListener")&&(Ue(e,"addEventListener",function(e){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=ii(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Ve(r),target:t},handled:!0,type:"instrument"}}))}catch(t){}return e.apply(this,[n,ii(r,{mechanism:{data:{function:"addEventListener",handler:Ve(r),target:t},handled:!0,type:"instrument"}}),i])}}),Ue(e,"removeEventListener",function(t){return function(e,n,r){const i=n;try{const n=i&&i.__sentry_wrapped__;n&&t.call(this,e,n,r)}catch(t){}return t.call(this,e,i,r)}}))}Li.__initStatic();class $i{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=$i.id}constructor(t={}){$i.prototype.__init.call(this),this._key=t.key||"cause",this._limit=t.limit||5}setupOnce(){const t=fr().getClient();t&&cr((e,n)=>{const r=fr().getIntegration($i);return r?function(t,e,n,r,i){if(!(r.exception&&r.exception.values&&i&&pe(i.originalException,Error)))return r;const s=Fi(t,n,i.originalException,e);return r.exception.values=[...s,...r.exception.values],r}(t.getOptions().stackParser,r._key,r._limit,e,n):e})}}function Fi(t,e,n,r,i=[]){if(!pe(n[r],Error)||i.length+1>=e)return i;const s=si(t,n[r]);return Fi(t,e,n[r],r,[s,...i])}$i.__initStatic();class ji{constructor(){ji.prototype.__init.call(this)}static __initStatic(){this.id="HttpContext"}__init(){this.name=ji.id}setupOnce(){cr(t=>{if(fr().getIntegration(ji)){if(!ei.navigator&&!ei.location&&!ei.document)return t;const e=t.request&&t.request.url||ei.location&&ei.location.href,{referrer:n}=ei.document||{},{userAgent:r}=ei.navigator||{},i={...t.request&&t.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},s={...t.request,...e&&{url:e},headers:i};return{...t,request:s}}return t})}}ji.__initStatic();class Vi{constructor(){Vi.prototype.__init.call(this)}static __initStatic(){this.id="Dedupe"}__init(){this.name=Vi.id}setupOnce(t,e){const n=t=>{if(t.type)return t;const n=e().getIntegration(Vi);if(n){try{if(function(t,e){return!(!e||!function(t,e){const n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!qi(t,e)||!Zi(t,e))}(t,e)&&!function(t,e){const n=Wi(e),r=Wi(t);return!!(n&&r&&n.type===r.type&&n.value===r.value&&qi(t,e)&&Zi(t,e))}(t,e))}(t,n._previousEvent))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(e){return n._previousEvent=t}return n._previousEvent=t}return t};n.id=this.name,t(n)}}function Zi(t,e){let n=Ki(t),r=Ki(e);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let t=0;t<r.length;t++){const e=r[t],i=n[t];if(e.filename!==i.filename||e.lineno!==i.lineno||e.colno!==i.colno||e.function!==i.function)return!1}return!0}function qi(t,e){let n=t.fingerprint,r=e.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch(t){return!1}}function Wi(t){return t.exception&&t.exception.values&&t.exception.values[0]}function Ki(t){const e=t.exception;if(e)try{return e.values[0].stacktrace.frames}catch(t){return}}Vi.__initStatic();const Ji=[new Qr,new Jr,new Li,new hi,new Ni,new $i,new Vi,new ji];function Xi(t={},e=fr()){if(!ei.document)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error("Global document not defined in showReportDialog call"));const{client:n,scope:r}=e.getStackTop(),i=t.dsn||n&&n.getDsn();if(!i)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error("DSN not configured for showReportDialog call"));r&&(t.user={...r.getUser(),...t.user}),t.eventId||(t.eventId=e.lastEventId());const s=ei.document.createElement("script");s.async=!0,s.src=function(t,e){const n=Te(t),r=`${Mr(n)}embed/error-page/`;let i=`dsn=${we(n)}`;for(const t in e)if("dsn"!==t)if("user"===t){const t=e.user;if(!t)continue;t.name&&(i+=`&name=${encodeURIComponent(t.name)}`),t.email&&(i+=`&email=${encodeURIComponent(t.email)}`)}else i+=`&${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`;return`${r}?${i}`}(i,t),t.onLoad&&(s.onload=t.onLoad);const a=ei.document.head||ei.document.body;a?a.appendChild(s):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error("Not injecting report dialog. No injection point found in HTML")}function Qi(t){t.startSession({ignoreDuration:!0}),t.captureSession()}const ts=fe,es="sentryReplaySession",ns="Unable to send Replay",rs=15e4,is=5e3;var ss;function as(t){const e=null==t?void 0:t.host;return Boolean(e&&e.shadowRoot&&e.shadowRoot===t)}function os({maskInputOptions:t,tagName:e,type:n}){"option"===e.toLowerCase()&&(e="select");const r="string"==typeof n?n.toLowerCase():void 0;return t[e.toLowerCase()]||r&&t[r]||"password"===r||"input"===e&&!n&&t.text}function cs({input:t,maskInputSelector:e,unmaskInputSelector:n,maskInputOptions:r,tagName:i,type:s,value:a,maskInputFn:o}){let c=a||"";return n&&t.matches(n)||(t.hasAttribute("data-rr-is-password")&&(s="password"),(os({maskInputOptions:r,tagName:i,type:s})||e&&t.matches(e))&&(c=o?o(c):"*".repeat(c.length))),c}!function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"}(ss||(ss={}));const ls="__rrweb_original__";function us(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?e.toLowerCase():null}function ds(t,e,n){return"string"==typeof n&&n.toLowerCase(),"INPUT"!==e||"radio"!==n&&"checkbox"!==n?t.value:t.getAttribute("value")||""}let ps=1;const hs=new RegExp("[^a-z0-9-_:]"),fs=-2;function _s(t){return t?t.replace(/[\S]/g,"*"):""}function ms(t){try{const e=t.rules||t.cssRules;return e?Array.from(e).map(gs).join(""):null}catch(t){return null}}function gs(t){let e=t.cssText;if(function(t){return"styleSheet"in t}(t))try{e=ms(t.styleSheet)||e}catch(t){}return ys(e)}function ys(t){return t.indexOf(":")>-1?t.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2"):t}let vs,bs;const Es=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Ss=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,ws=/^(data:)([^,]*),(.*)/i;function ks(t,e){return(t||"").replace(Es,(t,n,r,i,s,a)=>{const o=r||s||a,c=n||i||"";if(!o)return t;if(!Ss.test(o))return`url(${c}${o}${c})`;if(ws.test(o))return`url(${c}${o}${c})`;if("/"===o[0])return`url(${c}${function(t){let e="";return e=t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0],e=e.split("?")[0],e}(e)+o}${c})`;const l=e.split("/"),u=o.split("/");l.pop();for(const t of u)"."!==t&&(".."===t?l.pop():l.push(t));return`url(${c}${l.join("/")}${c})`})}const Ts=/^[^ \t\n\r\u000c]+/,Cs=/^[, \t\n\r\u000c]+/;function xs(t,e){if(!e||""===e.trim())return e;const n=t.createElement("a");return n.href=e,n.href}function Rs(){const t=document.createElement("a");return t.href="",t.href}function Ds(t,e,n,r,i,s,a,o){if(!i)return i;const c=r.toLowerCase(),l=n.toLowerCase();return"src"===c||"href"===c||"xlink:href"===c&&"#"!==i[0]?xs(t,i):"background"!==c||"table"!==l&&"td"!==l&&"th"!==l?"srcset"===c?function(t,e){if(""===e.trim())return e;let n=0;function r(t){let r,i=t.exec(e.substring(n));return i?(r=i[0],n+=r.length,r):""}let i=[];for(;r(Cs),!(n>=e.length);){let s=r(Ts);if(","===s.slice(-1))s=xs(t,s.substring(0,s.length-1)),i.push(s);else{let r="";s=xs(t,s);let a=!1;for(;;){let t=e.charAt(n);if(""===t){i.push((s+r).trim());break}if(a)")"===t&&(a=!1);else{if(","===t){n+=1,i.push((s+r).trim());break}"("===t&&(a=!0)}r+=t,n+=1}}}return i.join(", ")}(t,i):"style"===c?ks(i,Rs()):"object"===l&&"data"===c?xs(t,i):s&&function(t,e,n,r){return(!r||!t.matches(r))&&(["placeholder","title","aria-label"].indexOf(e)>-1||"input"===n&&"value"===e&&t.hasAttribute("type")&&["submit","button"].indexOf(t.getAttribute("type").toLowerCase())>-1)}(e,c,l,a)?o?o(i):_s(i):i:xs(t,i)}function Is(t,e,n,r,i){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return Is(t.parentNode,e,n,r,i);if(r&&(t.matches(r)||t.closest(r)))return!1;if(i)return!0;if("string"==typeof e){if(t.classList.contains(e))return!0}else for(let n=0;n<t.classList.length;n++)if(e.test(t.classList[n]))return!0;return!(!n||!t.matches(n))||Is(t.parentNode,e,n,r,i)}function Ns(t){return null==t?"":t.toLowerCase()}function Os(t,e){const{doc:n,map:r,blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,skipChild:u=!1,inlineStylesheet:d=!0,maskInputSelector:p,unmaskInputSelector:h,maskAllText:f,maskInputOptions:_={},maskTextFn:m,maskInputFn:g,slimDOMOptions:y,dataURLOptions:v={},inlineImages:b=!1,recordCanvas:E=!1,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:k=5e3,keepIframeSrcFn:T=(()=>!1)}=e;let{preserveWhiteSpace:C=!0}=e;const x=function(t,e){var n;const{doc:r,blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,inlineStylesheet:u,maskInputSelector:d,unmaskInputSelector:p,maskAllText:h,maskInputOptions:f={},maskTextFn:_,maskInputFn:m,dataURLOptions:g={},inlineImages:y,recordCanvas:v,keepIframeSrcFn:b}=e;let E;if(r.__sn){const t=r.__sn.id;E=1===t?void 0:t}switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:ss.Document,childNodes:[],compatMode:t.compatMode,rootId:E}:{type:ss.Document,childNodes:[],rootId:E};case t.DOCUMENT_TYPE_NODE:return{type:ss.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:E};case t.ELEMENT_NODE:const e=function(t,e,n,r){if(r&&t.matches(r))return!1;if("string"==typeof e){if(t.classList.contains(e))return!0}else for(let n=0;n<t.classList.length;n++)if(e.test(t.classList[n]))return!0;return!!n&&t.matches(n)}(t,i,s,a),k=function(t){if(t instanceof HTMLFormElement)return"form";const e=t.tagName.toLowerCase().trim();return hs.test(e)?"div":e}(t);let T={};for(const{name:e,value:n}of Array.from(t.attributes))Us(k,e)||(T[e]=Ds(r,t,k,e,n,h,l,_));if("link"===k&&u){const e=Array.from(r.styleSheets).find(e=>e.href===t.href);let n=null;e&&(n=ms(e)),n&&(delete T.rel,delete T.href,T._cssText=ks(n,e.href))}if("style"===k&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){const e=ms(t.sheet);e&&(T._cssText=ks(e,Rs()))}if("input"===k||"textarea"===k||"select"===k||"option"===k){const e=t,n=us(e),r=ds(e,k.toUpperCase(),n),i=t.checked;"submit"!==n&&"button"!==n&&r&&(T.value=cs({input:e,type:n,tagName:k,value:r,maskInputSelector:d,unmaskInputSelector:p,maskInputOptions:f,maskInputFn:m})),i&&(T.checked=i)}if("option"===k&&(t.selected&&!f.select?T.selected=!0:delete T.selected),"canvas"===k&&v)if("2d"===t.__context)(function(t){const e=t.getContext("2d");if(!e)return!0;for(let n=0;n<t.width;n+=50)for(let r=0;r<t.height;r+=50){const i=e.getImageData;if(new Uint32Array((ls in i?i[ls]:i).call(e,n,r,Math.min(50,t.width-n),Math.min(50,t.height-r)).data.buffer).some(t=>0!==t))return!1}return!0})(t)||(T.rr_dataURL=t.toDataURL(g.type,g.quality));else if(!("__context"in t)){const e=t.toDataURL(g.type,g.quality),n=document.createElement("canvas");n.width=t.width,n.height=t.height,e!==n.toDataURL(g.type,g.quality)&&(T.rr_dataURL=e)}if("img"===k&&y){vs||(vs=r.createElement("canvas"),bs=vs.getContext("2d"));const e=t,n=e.crossOrigin;e.crossOrigin="anonymous";const i=()=>{try{vs.width=e.naturalWidth,vs.height=e.naturalHeight,bs.drawImage(e,0,0),T.rr_dataURL=vs.toDataURL(g.type,g.quality)}catch(t){console.warn(`Cannot inline img src=${e.currentSrc}! Error: ${t}`)}n?T.crossOrigin=n:delete T.crossOrigin};e.complete&&0!==e.naturalWidth?i():e.onload=i}if("audio"!==k&&"video"!==k||(T.rr_mediaState=t.paused?"paused":"played",T.rr_mediaCurrentTime=t.currentTime),t.scrollLeft&&(T.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(T.rr_scrollTop=t.scrollTop),e){const{width:e,height:n}=t.getBoundingClientRect();T={class:T.class,rr_width:`${e}px`,rr_height:`${n}px`}}return"iframe"!==k||b(T.src)||(t.contentDocument||(T.rr_src=T.src),delete T.src),{type:ss.Element,tagName:k,attributes:T,childNodes:[],isSVG:(w=t,Boolean("svg"===w.tagName||w.ownerSVGElement)||void 0),needBlock:e,rootId:E};case t.TEXT_NODE:const C=t.parentNode&&t.parentNode.tagName;let x=t.textContent;const R="STYLE"===C||void 0,D="SCRIPT"===C||void 0;if(R&&x){try{t.nextSibling||t.previousSibling||(null===(n=t.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(x=(S=t.parentNode.sheet).cssRules?Array.from(S.cssRules).map(t=>t.cssText?ys(t.cssText):"").join(""):"")}catch(e){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${e}`,t)}x=ks(x,Rs())}return D&&(x="SCRIPT_PLACEHOLDER"),"TEXTAREA"===C&&x?x="":"OPTION"===C&&x?x=cs({input:t.parentNode,type:null,tagName:C,value:x,maskInputSelector:d,unmaskInputSelector:p,maskInputOptions:f,maskInputFn:m}):!R&&!D&&Is(t,o,c,l,h)&&x&&(x=_?_(x):_s(x)),{type:ss.Text,textContent:x||"",isStyle:R,rootId:E};case t.CDATA_SECTION_NODE:return{type:ss.CDATA,textContent:"",rootId:E};case t.COMMENT_NODE:return{type:ss.Comment,textContent:t.textContent||"",rootId:E};default:return!1}var S,w}(t,{doc:n,blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,inlineStylesheet:d,maskInputSelector:p,unmaskInputSelector:h,maskAllText:f,maskInputOptions:_,maskTextFn:m,maskInputFn:g,dataURLOptions:v,inlineImages:b,recordCanvas:E,keepIframeSrcFn:T});if(!x)return console.warn(t,"not serialized"),null;let R;R="__sn"in t?t.__sn.id:!function(t,e){if(e.comment&&t.type===ss.Comment)return!0;if(t.type===ss.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel||"modulepreload"===t.attributes.rel)&&"script"===t.attributes.as||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&t.attributes.href.endsWith(".js")))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(Ns(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Ns(t.attributes.name)||"icon"===Ns(t.attributes.rel)||"apple-touch-icon"===Ns(t.attributes.rel)||"shortcut icon"===Ns(t.attributes.rel))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&Ns(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(Ns(t.attributes.property).match(/^(og|twitter|fb):/)||Ns(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===Ns(t.attributes.name)))return!0;if(e.headMetaRobots&&("robots"===Ns(t.attributes.name)||"googlebot"===Ns(t.attributes.name)||"bingbot"===Ns(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&("author"===Ns(t.attributes.name)||"generator"===Ns(t.attributes.name)||"framework"===Ns(t.attributes.name)||"publisher"===Ns(t.attributes.name)||"progid"===Ns(t.attributes.name)||Ns(t.attributes.property).match(/^article:/)||Ns(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&("google-site-verification"===Ns(t.attributes.name)||"yandex-verification"===Ns(t.attributes.name)||"csrf-token"===Ns(t.attributes.name)||"p:domain_verify"===Ns(t.attributes.name)||"verify-v1"===Ns(t.attributes.name)||"verification"===Ns(t.attributes.name)||"shopify-checkout-api-token"===Ns(t.attributes.name)))return!0}}return!1}(x,y)&&(C||x.type!==ss.Text||x.isStyle||x.textContent.replace(/^\s+|\s+$/gm,"").length)?ps++:fs;const D=Object.assign(x,{id:R});if(t.__sn=D,R===fs)return null;r[R]=t,S&&S(t);let I=!u;if(D.type===ss.Element&&(I=I&&!D.needBlock,delete D.needBlock,t.shadowRoot&&(D.isShadowHost=!0)),(D.type===ss.Document||D.type===ss.Element)&&I){y.headWhitespace&&x.type===ss.Element&&"head"===x.tagName&&(C=!1);const e={doc:n,map:r,blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,skipChild:u,inlineStylesheet:d,maskInputSelector:p,unmaskInputSelector:h,maskAllText:f,maskInputOptions:_,maskTextFn:m,maskInputFn:g,slimDOMOptions:y,dataURLOptions:v,inlineImages:b,recordCanvas:E,preserveWhiteSpace:C,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:k,keepIframeSrcFn:T};for(const n of Array.from(t.childNodes)){const t=Os(n,e);t&&D.childNodes.push(t)}if(function(t){return t.nodeType===t.ELEMENT_NODE}(t)&&t.shadowRoot)for(const n of Array.from(t.shadowRoot.childNodes)){const t=Os(n,e);t&&(t.isShadow=!0,D.childNodes.push(t))}}return t.parentNode&&as(t.parentNode)&&(D.isShadow=!0),D.type===ss.Element&&"iframe"===D.tagName&&function(t,e,n){const r=t.contentWindow;if(!r)return;let i,s=!1;try{i=r.document.readyState}catch(t){return}if("complete"!==i){const r=setTimeout(()=>{s||(e(),s=!0)},n);return void t.addEventListener("load",()=>{clearTimeout(r),s=!0,e()})}const a="about:blank";r.location.href===a&&t.src!==a&&""!==t.src?t.addEventListener("load",e):setTimeout(e,0)}(t,()=>{const e=t.contentDocument;if(e&&w){const n=Os(e,{doc:e,map:r,blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputSelector:p,unmaskInputSelector:h,maskAllText:f,maskInputOptions:_,maskTextFn:m,maskInputFn:g,slimDOMOptions:y,dataURLOptions:v,inlineImages:b,recordCanvas:E,preserveWhiteSpace:C,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:k,keepIframeSrcFn:T});n&&w(t,n)}},k),D}function Us(t,e,n){return("video"===t||"audio"===t)&&"autoplay"===e}var As,Bs,Ms,Ps,Ls,Hs;function zs(t,e,n=document){const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}!function(t){t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin"}(As||(As={})),function(t){t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration"}(Bs||(Bs={})),function(t){t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel"}(Ms||(Ms={})),function(t){t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2"}(Ps||(Ps={})),function(t){t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange"}(Ls||(Ls={})),function(t){t.Start="start",t.Pause="pause",t.Resume="resume",t.Resize="resize",t.Finish="finish",t.FullsnapshotRebuilded="fullsnapshot-rebuilded",t.LoadStylesheetStart="load-stylesheet-start",t.LoadStylesheetEnd="load-stylesheet-end",t.SkipStart="skip-start",t.SkipEnd="skip-end",t.MouseInteraction="mouse-interaction",t.EventCast="event-cast",t.CustomEvent="custom-event",t.Flush="flush",t.StateChange="state-change",t.PlayBack="play-back"}(Hs||(Hs={}));const Gs="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 Ys={map:{},getId:()=>(console.error(Gs),-1),getNode:()=>(console.error(Gs),null),removeNodeFromMap(){console.error(Gs)},has:()=>(console.error(Gs),!1),reset(){console.error(Gs)}};function $s(t,e,n={}){let r=null,i=0;return function(s){let a=Date.now();i||!1!==n.leading||(i=a);let o=e-(a-i),c=this,l=arguments;o<=0||o>e?(r&&(clearTimeout(r),r=null),i=a,t.apply(c,l)):r||!1===n.trailing||(r=setTimeout(()=>{i=!1===n.leading?0:Date.now(),r=null,t.apply(c,l)},o))}}function Fs(t,e,n,r,i=window){const s=i.Object.getOwnPropertyDescriptor(t,e);return i.Object.defineProperty(t,e,r?n:{set(t){setTimeout(()=>{n.set.call(this,t)},0),s&&s.set&&s.set.call(this,t)}}),()=>Fs(t,e,s||{},!0)}function js(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],i=n(r);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=i,()=>{t[e]=r}}catch(t){return()=>{}}}function Vs(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Zs(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function qs(t,e,n,r){if(!t)return!1;if(t.nodeType===t.ELEMENT_NODE){let i=!1;const s=r&&t.matches(r);return"string"==typeof e?i=void 0!==t.closest?!s&&null!==t.closest("."+e):!s&&t.classList.contains(e):!s&&t.classList.forEach(t=>{e.test(t)&&(i=!0)}),!i&&n&&(i=t.matches(n)),!s&&i||qs(t.parentNode,e,n,r)}return qs(t.parentNode,e,n,r)}function Ws(t){return"__sn"in t&&t.__sn.id===fs}function Ks(t,e){if(as(t))return!1;const n=e.getId(t);return!e.has(n)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||Ks(t.parentNode,e))}function Js(t){return Boolean(t.changedTouches)}function Xs(t){return"__sn"in t&&t.__sn.type===ss.Element&&"iframe"===t.__sn.tagName}function Qs(t){return Boolean(null==t?void 0:t.shadowRoot)}function ta(t){return"__ln"in t}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Ys=new Proxy(Ys,{get:(t,e,n)=>("map"===e&&console.error(Gs),Reflect.get(t,e,n))}));class ea{constructor(){this.length=0,this.head=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let e=this.head;for(let n=0;n<t;n++)e=(null==e?void 0:e.next)||null;return e}addNode(t){const e={value:t,previous:null,next:null};if(t.__ln=e,t.previousSibling&&ta(t.previousSibling)){const n=t.previousSibling.__ln.next;e.next=n,e.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=e,n&&(n.previous=e)}else if(t.nextSibling&&ta(t.nextSibling)&&t.nextSibling.__ln.previous){const n=t.nextSibling.__ln.previous;e.previous=n,e.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=e,n&&(n.next=e)}else this.head&&(this.head.previous=e),e.next=this.head,this.head=e;this.length++}removeNode(t){const e=t.__ln;this.head&&(e.previous?(e.previous.next=e.next,e.next&&(e.next.previous=e.previous)):(this.head=e.next,this.head&&(this.head.previous=null)),t.__ln&&delete t.__ln,this.length--)}}const na=(t,e)=>`${t}@${e}`;function ra(t){return"__sn"in t}class ia{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],e=new ea,n=t=>{let e=t,n=fs;for(;n===fs;)e=e&&e.nextSibling,n=e&&this.mirror.getId(e);return n},r=r=>{var i,s,a,o,c;const l=r.getRootNode?null===(i=r.getRootNode())||void 0===i?void 0:i.host:null;let u=l;for(;null===(a=null===(s=null==u?void 0:u.getRootNode)||void 0===s?void 0:s.call(u))||void 0===a?void 0:a.host;)u=(null===(c=null===(o=null==u?void 0:u.getRootNode)||void 0===o?void 0:o.call(u))||void 0===c?void 0:c.host)||null;const d=!(this.doc.contains(r)||u&&this.doc.contains(u));if(!r.parentNode||d)return;const p=as(r.parentNode)?this.mirror.getId(l):this.mirror.getId(r.parentNode),h=n(r);if(-1===p||-1===h)return e.addNode(r);let f=Os(r,{doc:this.doc,map:this.mirror.map,blockClass:this.blockClass,blockSelector:this.blockSelector,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,maskInputSelector:this.maskInputSelector,unmaskInputSelector:this.unmaskInputSelector,skipChild:!0,inlineStylesheet:this.inlineStylesheet,maskAllText:this.maskAllText,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:t=>{Xs(t)&&this.iframeManager.addIframe(t),Qs(r)&&this.shadowDomManager.addShadowRoot(r.shadowRoot,document)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)}});f&&t.push({parentId:p,nextId:h,node:f})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const t of this.movedSet)aa(this.removes,t,this.mirror)&&!this.movedSet.has(t.parentNode)||r(t);for(const t of this.addedSet)oa(this.droppedSet,t)||aa(this.removes,t,this.mirror)?oa(this.movedSet,t)?r(t):this.droppedSet.add(t):r(t);let i=null;for(;e.length;){let t=null;if(i){const e=this.mirror.getId(i.value.parentNode),r=n(i.value);-1!==e&&-1!==r&&(t=i)}if(!t)for(let r=e.length-1;r>=0;r--){const i=e.get(r);if(i){const e=this.mirror.getId(i.value.parentNode),r=n(i.value);if(-1!==e&&-1!==r){t=i;break}}}if(!t){for(;e.head;)e.removeNode(e.head.value);break}i=t.previous,e.removeNode(t.value),r(t.value)}const s={texts:this.texts.map(t=>({id:this.mirror.getId(t.node),value:t.value})).filter(t=>this.mirror.has(t.id)),attributes:this.attributes.map(t=>({id:this.mirror.getId(t.node),attributes:t.attributes})).filter(t=>this.mirror.has(t.id)),removes:this.removes,adds:t};(s.texts.length||s.attributes.length||s.removes.length||s.adds.length)&&(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(s))},this.processMutation=t=>{if(!Ws(t.target))switch(t.type){case"characterData":{const e=t.target.textContent;qs(t.target,this.blockClass,this.blockSelector,this.unblockSelector)||e===t.oldValue||this.texts.push({value:Is(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextSelector,this.maskAllText)&&e?this.maskTextFn?this.maskTextFn(e):e.replace(/[\S]/g,"*"):e,node:t.target});break}case"attributes":{const e=t.target;let n=e.getAttribute(t.attributeName);if("value"===t.attributeName&&(n=cs({input:e,maskInputSelector:this.maskInputSelector,unmaskInputSelector:this.unmaskInputSelector,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:e.getAttribute("type"),value:n,maskInputFn:this.maskInputFn})),qs(t.target,this.blockClass,this.blockSelector,this.unblockSelector)||n===t.oldValue)return;let r=this.attributes.find(e=>e.node===t.target);if(r||(r={node:t.target,attributes:{}},this.attributes.push(r)),"type"===t.attributeName&&"INPUT"===e.tagName&&"password"===(t.oldValue||"").toLowerCase()&&e.setAttribute("data-rr-is-password","true"),"style"===t.attributeName){const n=this.doc.createElement("span");t.oldValue&&n.setAttribute("style",t.oldValue),null==r.attributes.style&&(r.attributes.style={});try{const t=r.attributes.style;for(const r of Array.from(e.style)){const i=e.style.getPropertyValue(r),s=e.style.getPropertyPriority(r);i===n.style.getPropertyValue(r)&&s===n.style.getPropertyPriority(r)||(t[r]=""===s?i:[i,s])}for(const r of Array.from(n.style))""===e.style.getPropertyValue(r)&&(t[r]=!1)}catch(t){console.warn("[rrweb] Error when parsing update to style attribute:",t)}}else{const e=t.target;r.attributes[t.attributeName]=Ds(this.doc,e,e.tagName,t.attributeName,n,this.maskAllText,this.unmaskTextSelector,this.maskTextFn)}break}case"childList":t.addedNodes.forEach(e=>this.genAdds(e,t.target)),t.removedNodes.forEach(e=>{const n=this.mirror.getId(e),r=as(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);qs(t.target,this.blockClass,this.blockSelector,this.unblockSelector)||Ws(e)||(this.addedSet.has(e)?(sa(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===n||Ks(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[na(n,r)]?sa(this.movedSet,e):this.removes.push({parentId:r,id:n,isShadow:!!as(t.target)||void 0})),this.mapRemoves.push(e))})}},this.genAdds=(t,e)=>{if(!e||!qs(e,this.blockClass,this.blockSelector,this.unblockSelector)){if(ra(t)){if(Ws(t))return;this.movedSet.add(t);let n=null;e&&ra(e)&&(n=e.__sn.id),n&&(this.movedMap[na(t.__sn.id,n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);qs(t,this.blockClass,this.blockSelector,this.unblockSelector)||t.childNodes.forEach(t=>this.genAdds(t))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskTextClass","maskTextSelector","unmaskTextSelector","maskInputSelector","unmaskInputSelector","inlineStylesheet","maskAllText","maskInputOptions","maskTextFn","maskInputFn","recordCanvas","inlineImages","slimDOMOptions","doc","mirror","iframeManager","shadowDomManager","canvasManager"].forEach(e=>{this[e]=t[e]})}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 sa(t,e){t.delete(e),e.childNodes.forEach(e=>sa(t,e))}function aa(t,e,n){const{parentNode:r}=e;if(!r)return!1;const i=n.getId(r);return!!t.some(t=>t.id===i)||aa(t,r,n)}function oa(t,e){const{parentNode:n}=e;return!!n&&(!!t.has(n)||oa(t,n))}const ca=t=>(...e)=>{try{return t(...e)}catch(t){try{t.__rrweb__=!0}catch(t){}throw t}},la=[];function ua(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch(t){}return t&&t.target}function da(t,e){var n,r;const i=new ia;la.push(i),i.init(t);let s=window.MutationObserver||window.__rrMutationObserver;const a=null===(r=null===(n=null===window||void 0===window?void 0:window.Zone)||void 0===n?void 0:n.__symbol__)||void 0===r?void 0:r.call(n,"MutationObserver");a&&window[a]&&(s=window[a]);const o=new s(ca(e=>{t.onMutation&&!1===t.onMutation(e)||i.processMutations(e)}));return o.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function pa({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,sampling:a}){const o=$s(a=>{const o=ua(a);if(!o||qs(o,r,i,s))return;const c=n.getId(o);if(o===e){const n=e.scrollingElement||e.documentElement;ca(t)({id:c,x:n.scrollLeft,y:n.scrollTop})}else ca(t)({id:c,x:o.scrollLeft,y:o.scrollTop})},a.scroll||100);return zs("scroll",ca(o),e)}function ha(t,e){const n=Object.assign({},t);return e||delete n.userTriggered,n}const fa=["INPUT","TEXTAREA","SELECT"],_a=new WeakMap;function ma(t){return function(t,e){if(ya("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||ya("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||ya("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||ya("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule){const n=Array.from(t.parentRule.cssRules).indexOf(t);e.unshift(n)}else{const n=Array.from(t.parentStyleSheet.cssRules).indexOf(t);e.unshift(n)}return e}(t,[])}function ga(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};!function(t,e){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:i,scrollCb:s,viewportResizeCb:a,inputCb:o,mediaInteractionCb:c,styleSheetRuleCb:l,styleDeclarationCb:u,canvasMutationCb:d,fontCb:p}=t;t.mutationCb=(...t)=>{e.mutation&&e.mutation(...t),n(...t)},t.mousemoveCb=(...t)=>{e.mousemove&&e.mousemove(...t),r(...t)},t.mouseInteractionCb=(...t)=>{e.mouseInteraction&&e.mouseInteraction(...t),i(...t)},t.scrollCb=(...t)=>{e.scroll&&e.scroll(...t),s(...t)},t.viewportResizeCb=(...t)=>{e.viewportResize&&e.viewportResize(...t),a(...t)},t.inputCb=(...t)=>{e.input&&e.input(...t),o(...t)},t.mediaInteractionCb=(...t)=>{e.mediaInteaction&&e.mediaInteaction(...t),c(...t)},t.styleSheetRuleCb=(...t)=>{e.styleSheetRule&&e.styleSheetRule(...t),l(...t)},t.styleDeclarationCb=(...t)=>{e.styleDeclaration&&e.styleDeclaration(...t),u(...t)},t.canvasMutationCb=(...t)=>{e.canvasMutation&&e.canvasMutation(...t),d(...t)},t.fontCb=(...t)=>{e.font&&e.font(...t),p(...t)}}(t,e);const r=da(t,t.doc),i=function({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(!1===e.mousemove)return()=>{};const i="number"==typeof e.mousemove?e.mousemove:50;let s,a=[];const o=$s(e=>{const n=Date.now()-s;ca(t)(a.map(t=>(t.timeOffset-=n,t)),e),a=[],s=null},"number"==typeof e.mousemoveCallback?e.mousemoveCallback:500),c=$s(t=>{const e=ua(t),{clientX:n,clientY:i}=Js(t)?t.changedTouches[0]:t;s||(s=Date.now()),a.push({x:n,y:i,id:r.getId(e),timeOffset:Date.now()-s}),o("undefined"!=typeof DragEvent&&t instanceof DragEvent?Bs.Drag:t instanceof MouseEvent?Bs.MouseMove:Bs.TouchMove)},i,{trailing:!1}),l=[zs("mousemove",ca(c),n),zs("touchmove",ca(c),n),zs("drag",ca(c),n)];return ca(()=>{l.forEach(t=>t())})}(t),s=function({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,sampling:a}){if(!1===a.mouseInteraction)return()=>{};const o=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,c=[];return Object.keys(Ms).filter(t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==o[t]).forEach(a=>{const o=a.toLowerCase(),l=ca((e=>a=>{const o=ua(a);if(qs(o,r,i,s))return;const c=Js(a)?a.changedTouches[0]:a;if(!c)return;const l=n.getId(o),{clientX:u,clientY:d}=c;ca(t)({type:Ms[e],id:l,x:u,y:d})})(a));c.push(zs(o,l,e))}),ca(()=>{c.forEach(t=>t())})}(t),a=pa(t),o=function({viewportResizeCb:t}){let e=-1,n=-1;const r=$s(()=>{const r=Vs(),i=Zs();e===r&&n===i||(ca(t)({width:Number(i),height:Number(r)}),e=r,n=i)},200);return zs("resize",ca(r),window)}(t),c=function({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,ignoreClass:a,ignoreSelector:o,maskInputSelector:c,unmaskInputSelector:l,maskInputOptions:u,maskInputFn:d,sampling:p,userTriggeredOnInput:h}){function f(t){let n=ua(t);const p=n&&n.tagName,f=t.isTrusted;if("OPTION"===p&&(n=n.parentElement),!n||!p||fa.indexOf(p)<0||qs(n,r,i,s))return;const m=n,g=us(m);if(m.classList.contains(a)||o&&m.matches(o))return;let y=ds(m,p,g),v=!1;"radio"!==g&&"checkbox"!==g||(v=n.checked),function({tagName:t,type:e,maskInputOptions:n,maskInputSelector:r}){return r||os({maskInputOptions:n,tagName:t,type:e})}({maskInputOptions:u,maskInputSelector:c,tagName:p,type:g})&&(y=cs({input:m,maskInputOptions:u,maskInputSelector:c,unmaskInputSelector:l,tagName:p,type:g,value:y,maskInputFn:d})),_(n,ca(ha)({text:y,isChecked:v,userTriggered:f},h));const b=n.name;"radio"===g&&b&&v&&e.querySelectorAll(`input[type="radio"][name="${b}"]`).forEach(t=>{if(t!==n){const e=cs({input:t,maskInputOptions:u,maskInputSelector:c,unmaskInputSelector:l,tagName:p,type:g,value:ds(t,p,g),maskInputFn:d});_(t,ca(ha)({text:e,isChecked:!v,userTriggered:!1},h))}})}function _(e,r){const i=_a.get(e);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){_a.set(e,r);const i=n.getId(e);t(Object.assign(Object.assign({},r),{id:i}))}}const m=("last"===p.input?["change"]:["input","change"]).map(t=>zs(t,ca(f),e)),g=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),y=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"],[HTMLOptionElement.prototype,"selected"]];return g&&g.set&&m.push(...y.map(t=>Fs(t[0],t[1],{set(){ca(f)({target:this})}}))),ca(()=>{m.forEach(t=>t())})}(t),l=function({mediaInteractionCb:t,blockClass:e,blockSelector:n,unblockSelector:r,mirror:i,sampling:s}){const a=a=>$s(ca(s=>{const o=ua(s);if(!o||qs(o,e,n,r))return;const{currentTime:c,volume:l,muted:u}=o;t({type:a,id:i.getId(o),currentTime:c,volume:l,muted:u})}),s.media||500),o=[zs("play",a(0)),zs("pause",a(1)),zs("seeked",a(2)),zs("volumechange",a(3))];return ca(()=>{o.forEach(t=>t())})}(t),u=function({styleSheetRuleCb:t,mirror:e},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};const r=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(r,{apply:ca((n,r,i)=>{const[s,a]=i,o=e.getId(r.ownerNode);return-1!==o&&t({id:o,adds:[{rule:s,index:a}]}),n.apply(r,i)})});const i=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:ca((n,r,i)=>{const[s]=i,a=e.getId(r.ownerNode);return-1!==a&&t({id:a,removes:[{index:s}]}),n.apply(r,i)})});const s={};va("CSSGroupingRule")?s.CSSGroupingRule=n.CSSGroupingRule:(va("CSSMediaRule")&&(s.CSSMediaRule=n.CSSMediaRule),va("CSSConditionRule")&&(s.CSSConditionRule=n.CSSConditionRule),va("CSSSupportsRule")&&(s.CSSSupportsRule=n.CSSSupportsRule));const a={};return Object.entries(s).forEach(([n,r])=>{a[n]={insertRule:r.prototype.insertRule,deleteRule:r.prototype.deleteRule},r.prototype.insertRule=new Proxy(a[n].insertRule,{apply:ca((n,r,i)=>{const[s,a]=i,o=e.getId(r.parentStyleSheet.ownerNode);return-1!==o&&t({id:o,adds:[{rule:s,index:[...ma(r),a||0]}]}),n.apply(r,i)})}),r.prototype.deleteRule=new Proxy(a[n].deleteRule,{apply:ca((n,r,i)=>{const[s]=i,a=e.getId(r.parentStyleSheet.ownerNode);return-1!==a&&t({id:a,removes:[{index:[...ma(r),s]}]}),n.apply(r,i)})})}),ca(()=>{n.CSSStyleSheet.prototype.insertRule=r,n.CSSStyleSheet.prototype.deleteRule=i,Object.entries(s).forEach(([t,e])=>{e.prototype.insertRule=a[t].insertRule,e.prototype.deleteRule=a[t].deleteRule})})}(t,{win:n}),d=function({styleDeclarationCb:t,mirror:e},{win:n}){const r=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(r,{apply:ca((n,r,i)=>{var s,a;const[o,c,l]=i,u=e.getId(null===(a=null===(s=r.parentRule)||void 0===s?void 0:s.parentStyleSheet)||void 0===a?void 0:a.ownerNode);return-1!==u&&t({id:u,set:{property:o,value:c,priority:l},index:ma(r.parentRule)}),n.apply(r,i)})});const i=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:ca((n,r,i)=>{var s,a;const[o]=i,c=e.getId(null===(a=null===(s=r.parentRule)||void 0===s?void 0:s.parentStyleSheet)||void 0===a?void 0:a.ownerNode);return-1!==c&&t({id:c,remove:{property:o},index:ma(r.parentRule)}),n.apply(r,i)})}),ca(()=>{n.CSSStyleDeclaration.prototype.setProperty=r,n.CSSStyleDeclaration.prototype.removeProperty=i})}(t,{win:n}),p=t.collectFonts?function({fontCb:t,doc:e}){const n=e.defaultView;if(!n)return()=>{};const r=[],i=new WeakMap,s=n.FontFace;n.FontFace=function(t,e,n){const r=new s(t,e,n);return i.set(r,{family:t,buffer:"string"!=typeof e,descriptors:n,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),r};const a=js(e.fonts,"add",function(e){return function(n){return setTimeout(()=>{const e=i.get(n);e&&(t(e),i.delete(n))},0),e.apply(this,[n])}});return r.push(()=>{n.FontFace=s}),r.push(a),ca(()=>{r.forEach(t=>t())})}(t):()=>{},h=[];for(const e of t.plugins)h.push(e.observer(e.callback,n,e.options));return ca(()=>{la.forEach(t=>t.reset()),r.disconnect(),i(),s(),a(),o(),c(),l();try{u(),d()}catch(t){}p(),h.forEach(t=>t())})}function ya(t){return void 0!==window[t]}function va(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class ba{constructor(t){this.iframes=new WeakMap,this.mutationCb=t.mutationCb}addIframe(t){this.iframes.set(t,!0)}addLoadListener(t){this.loadListener=t}attachIframe(t,e){var n;this.mutationCb({adds:[{parentId:t.__sn.id,nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,t)}}class Ea{constructor(t){this.restorePatches=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror;const e=this;this.restorePatches.push(js(HTMLElement.prototype,"attachShadow",function(t){return function(){const n=t.apply(this,arguments);return this.shadowRoot&&e.addShadowRoot(this.shadowRoot,this.ownerDocument),n}}))}addShadowRoot(t,e){da(Object.assign(Object.assign({},this.bypassOptions),{doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t),pa(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))}observeAttachShadow(t){if(t.contentWindow){const e=this;this.restorePatches.push(js(t.contentWindow.HTMLElement.prototype,"attachShadow",function(n){return function(){const r=n.apply(this,arguments);return this.shadowRoot&&e.addShadowRoot(this.shadowRoot,t.contentDocument),r}}))}}reset(){this.restorePatches.forEach(t=>t())}}for(var Sa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wa="undefined"==typeof Uint8Array?[]:new Uint8Array(256),ka=0;ka<64;ka++)wa[Sa.charCodeAt(ka)]=ka;const Ta=new Map,Ca=(t,e,n)=>{if(!t||!Da(t,e)&&"object"!=typeof t)return;const r=function(t,e){let n=Ta.get(t);return n||(n=new Map,Ta.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}(n,t.constructor.name);let i=r.indexOf(t);return-1===i&&(i=r.length,r.push(t)),i};function xa(t,e,n){if(t instanceof Array)return t.map(t=>xa(t,e,n));if(null===t)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer){const e=t.constructor.name,n=function(t){var e,n=new Uint8Array(t),r=n.length,i="";for(e=0;e<r;e+=3)i+=Sa[n[e]>>2],i+=Sa[(3&n[e])<<4|n[e+1]>>4],i+=Sa[(15&n[e+1])<<2|n[e+2]>>6],i+=Sa[63&n[e+2]];return r%3==2?i=i.substring(0,i.length-1)+"=":r%3==1&&(i=i.substring(0,i.length-2)+"=="),i}(t);return{rr_type:e,base64:n}}if(t instanceof DataView)return{rr_type:t.constructor.name,args:[xa(t.buffer,e,n),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){const e=t.constructor.name,{src:n}=t;return{rr_type:e,src:n}}return t instanceof ImageData?{rr_type:t.constructor.name,args:[xa(t.data,e,n),t.width,t.height]}:Da(t,e)||"object"==typeof t?{rr_type:t.constructor.name,index:Ca(t,e,n)}:t}const Ra=(t,e,n)=>[...t].map(t=>xa(t,e,n)),Da=(t,e)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(t=>"function"==typeof e[t]);return Boolean(n.find(n=>t instanceof e[n]))};function Ia(t,e,n,r,i,s,a,o){const c=[],l=Object.getOwnPropertyNames(t);for(const u of l)try{if("function"!=typeof t[u])continue;const l=js(t,u,function(c){return function(...l){const d=c.apply(this,l);if(Ca(d,o,t),!qs(this.canvas,r,s,i)){a.getId(this.canvas);const r=Ra([...l],o,t);n(this.canvas,{type:e,property:u,args:r})}return d}});c.push(l)}catch(r){const i=Fs(t,u,{set(t){n(this.canvas,{type:e,property:u,args:[t],setter:!0})}});c.push(i)}return c}class Na{reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(t,e){!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(t)||this.pendingCanvasMutations.set(t,[]),this.pendingCanvasMutations.get(t).push(e)},this.mutationCb=t.mutationCb,this.mirror=t.mirror,!0===t.recordCanvas&&this.initCanvasMutationObserver(t.win,t.blockClass,t.blockSelector,t.unblockSelector)}initCanvasMutationObserver(t,e,n,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=function(t,e,n,r){const i=[];try{const s=js(t.HTMLCanvasElement.prototype,"getContext",function(t){return function(i,...s){return qs(this,e,n,r)||"__context"in this||(this.__context=i),t.apply(this,[i,...s])}});i.push(s)}catch(t){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(t=>t())}}(t,e,r,n),s=function(t,e,n,r,i,s){const a=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const s of o)try{if("function"!=typeof e.CanvasRenderingContext2D.prototype[s])continue;const o=js(e.CanvasRenderingContext2D.prototype,s,function(e){return function(...a){return qs(this.canvas,n,i,r)||setTimeout(()=>{const e=[...a];if("drawImage"===s&&e[0]&&e[0]instanceof HTMLCanvasElement){const t=e[0],n=t.getContext("2d");let r=null==n?void 0:n.getImageData(0,0,t.width,t.height);e[0]=JSON.stringify(null==r?void 0:r.data)}t(this.canvas,{type:Ps["2D"],property:s,args:e})},0),e.apply(this,a)}});a.push(o)}catch(n){const r=Fs(e.CanvasRenderingContext2D.prototype,s,{set(e){t(this.canvas,{type:Ps["2D"],property:s,args:[e],setter:!0})}});a.push(r)}return()=>{a.forEach(t=>t())}}(this.processMutation.bind(this),t,e,r,n),a=function(t,e,n,r,i,s){const a=[];return a.push(...Ia(e.WebGLRenderingContext.prototype,Ps.WebGL,t,n,r,i,s,e)),void 0!==e.WebGL2RenderingContext&&a.push(...Ia(e.WebGL2RenderingContext.prototype,Ps.WebGL2,t,n,r,i,s,e)),()=>{a.forEach(t=>t())}}(this.processMutation.bind(this),t,e,r,n,this.mirror);this.resetObservers=()=>{i(),s(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=e=>{this.rafStamps.latestId=e,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,e)=>{const n=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,e){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(t);if(!n||-1===e)return;const r=n.map(t=>{const e=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}(t,["type"]);return e}),{type:i}=n[0];this.mutationCb({id:e,type:i,commands:r}),this.pendingCanvasMutations.delete(t)}}function Oa(t){return Object.assign(Object.assign({},t),{timestamp:Date.now()})}let Ua,Aa;const Ba={map:{},getId:t=>t&&t.__sn?t.__sn.id:-1,getNode(t){return this.map[t]||null},removeNodeFromMap(t){delete this.map[t.__sn&&t.__sn.id],t.childNodes&&t.childNodes.forEach(t=>this.removeNodeFromMap(t))},has(t){return this.map.hasOwnProperty(t)},reset(){this.map={}}};function Ma(t={}){const{emit:e,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:s=null,unblockSelector:a=null,ignoreClass:o="rr-ignore",ignoreSelector:c=null,maskTextClass:l="rr-mask",maskTextSelector:u=null,maskInputSelector:d=null,unmaskTextSelector:p=null,unmaskInputSelector:h=null,inlineStylesheet:f=!0,maskAllText:_=!1,maskAllInputs:m,maskInputOptions:g,slimDOMOptions:y,maskInputFn:v,maskTextFn:b,hooks:E,packFn:S,sampling:w={},mousemoveWait:k,recordCanvas:T=!1,userTriggeredOnInput:C=!1,collectFonts:x=!1,inlineImages:R=!1,plugins:D,keepIframeSrcFn:I=(()=>!1),onMutation:N}=t;if(!e)throw new Error("emit function is required");void 0!==k&&void 0===w.mousemove&&(w.mousemove=k);const O=!0===m?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:void 0!==g?g:{},U=!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 A;!function(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(t){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}();let B=0;Ua=(t,i)=>{var s;if(!(null===(s=la[0])||void 0===s?void 0:s.isFrozen())||t.type===As.FullSnapshot||t.type===As.IncrementalSnapshot&&t.data.source===Bs.Mutation||la.forEach(t=>t.unfreeze()),e((t=>{for(const e of D||[])e.eventProcessor&&(t=e.eventProcessor(t));return S&&(t=S(t)),t})(t),i),t.type===As.FullSnapshot)A=t,B=0;else if(t.type===As.IncrementalSnapshot){if(t.data.source===Bs.Mutation&&t.data.isAttachIframe)return;B++,(r&&B>=r||n&&t.timestamp-A.timestamp>n)&&Aa(!0)}};const M=t=>{Ua(Oa({type:As.IncrementalSnapshot,data:Object.assign({source:Bs.Mutation},t)}))},P=t=>Ua(Oa({type:As.IncrementalSnapshot,data:Object.assign({source:Bs.Scroll},t)})),L=t=>Ua(Oa({type:As.IncrementalSnapshot,data:Object.assign({source:Bs.CanvasMutation},t)})),H=new ba({mutationCb:M}),z=new Na({recordCanvas:T,mutationCb:L,win:window,blockClass:i,blockSelector:s,unblockSelector:a,mirror:Ba}),G=new Ea({mutationCb:M,scrollCb:P,bypassOptions:{onMutation:N,blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:l,maskTextSelector:u,unmaskTextSelector:p,maskInputSelector:d,unmaskInputSelector:h,inlineStylesheet:f,maskAllText:_,maskInputOptions:O,maskTextFn:b,maskInputFn:v,recordCanvas:T,inlineImages:R,sampling:w,slimDOMOptions:U,iframeManager:H,canvasManager:z},mirror:Ba});Aa=(t=!1)=>{var e,n,r,o;Ua(Oa({type:As.Meta,data:{href:window.location.href,width:Zs(),height:Vs()}}),t),la.forEach(t=>t.lock());const[c,m]=function(t,e){const{blockClass:n="rr-block",blockSelector:r=null,unblockSelector:i=null,maskTextClass:s="rr-mask",maskTextSelector:a=null,unmaskTextSelector:o=null,inlineStylesheet:c=!0,inlineImages:l=!1,recordCanvas:u=!1,maskInputSelector:d=null,unmaskInputSelector:p=null,maskAllText:h=!1,maskAllInputs:f=!1,maskTextFn:_,maskInputFn:m,slimDOM:g=!1,dataURLOptions:y,preserveWhiteSpace:v,onSerialize:b,onIframeLoad:E,iframeLoadTimeout:S,keepIframeSrcFn:w=(()=>!1)}=e||{},k={};return[Os(t,{doc:t,map:k,blockClass:n,blockSelector:r,unblockSelector:i,maskTextClass:s,maskTextSelector:a,unmaskTextSelector:o,skipChild:!1,inlineStylesheet:c,maskInputSelector:d,unmaskInputSelector:p,maskAllText:h,maskInputOptions:!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}:!1===f?{}:f,maskTextFn:_,maskInputFn:m,slimDOMOptions:!0===g||"all"===g?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===g,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===g?{}:g,dataURLOptions:y,inlineImages:l,recordCanvas:u,preserveWhiteSpace:v,onSerialize:b,onIframeLoad:E,iframeLoadTimeout:S,keepIframeSrcFn:w}),k]}(document,{blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:l,maskTextSelector:u,unmaskTextSelector:p,maskInputSelector:d,unmaskInputSelector:h,inlineStylesheet:f,maskAllText:_,maskAllInputs:O,maskTextFn:b,slimDOM:U,recordCanvas:T,inlineImages:R,onSerialize:t=>{Xs(t)&&H.addIframe(t),Qs(t)&&G.addShadowRoot(t.shadowRoot,document)},onIframeLoad:(t,e)=>{H.attachIframe(t,e),G.observeAttachShadow(t)},keepIframeSrcFn:I});if(!c)return console.warn("Failed to snapshot the document");Ba.map=m,Ua(Oa({type:As.FullSnapshot,data:{node:c,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===document||void 0===document?void 0:document.documentElement.scrollLeft)||(null===(n=null===(e=null===document||void 0===document?void 0:document.body)||void 0===e?void 0:e.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===document||void 0===document?void 0:document.body.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===document||void 0===document?void 0:document.documentElement.scrollTop)||(null===(o=null===(r=null===document||void 0===document?void 0:document.body)||void 0===r?void 0:r.parentElement)||void 0===o?void 0:o.scrollTop)||(null===document||void 0===document?void 0:document.body.scrollTop)||0}}})),la.forEach(t=>t.unlock())};try{const t=[];t.push(zs("DOMContentLoaded",()=>{Ua(Oa({type:As.DomContentLoaded,data:{}}))}));const e=t=>{var e;return ca(ga)({onMutation:N,mutationCb:M,mousemoveCb:(t,e)=>Ua(Oa({type:As.IncrementalSnapshot,data:{source:e,positions:t}})),mouseInteractionCb:t=>Ua(Oa({type:As.IncrementalSnapshot,data:Object.assign({source:Bs.MouseInteraction},t)})),scrollCb:P,viewportResizeCb:t=>Ua(Oa({type:As.IncrementalSnapshot,data:Object.assign({source:Bs.ViewportResize},t)})),inputCb:t=>Ua(Oa({type:As.IncrementalSnapshot,data:Object.assign({source:Bs.Input},t)})),mediaInteractionCb:t=>Ua(Oa({type:As.IncrementalSnapshot,data:Object.assign({source:Bs.MediaInteraction},t)})),styleSheetRuleCb:t=>Ua(Oa({type:As.IncrementalSnapshot,data:Object.assign({source:Bs.StyleSheetRule},t)})),styleDeclarationCb:t=>Ua(Oa({type:As.IncrementalSnapshot,data:Object.assign({source:Bs.StyleDeclaration},t)})),canvasMutationCb:L,fontCb:t=>Ua(Oa({type:As.IncrementalSnapshot,data:Object.assign({source:Bs.Font},t)})),blockClass:i,ignoreClass:o,ignoreSelector:c,maskTextClass:l,maskTextSelector:u,unmaskTextSelector:p,maskInputSelector:d,unmaskInputSelector:h,maskInputOptions:O,inlineStylesheet:f,sampling:w,recordCanvas:T,inlineImages:R,userTriggeredOnInput:C,collectFonts:x,doc:t,maskAllText:_,maskInputFn:v,maskTextFn:b,blockSelector:s,unblockSelector:a,slimDOMOptions:U,mirror:Ba,iframeManager:H,shadowDomManager:G,canvasManager:z,plugins:(null===(e=null==D?void 0:D.filter(t=>t.observer))||void 0===e?void 0:e.map(t=>({observer:t.observer,options:t.options,callback:e=>Ua(Oa({type:As.Plugin,data:{plugin:t.name,payload:e}}))})))||[]},E)};H.addLoadListener(n=>{try{t.push(e(n.contentDocument))}catch(t){console.warn(t)}});const n=()=>{Aa(),t.push(e(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():t.push(zs("load",()=>{Ua(Oa({type:As.Load,data:{}})),n()},window)),()=>{t.forEach(t=>t())}}catch(t){console.warn(t)}}function Pa(t){return{timestamp:Date.now()/1e3,type:"default",...t}}var La;function Ha(t){return t>9999999999?t:1e3*t}async function za(t,e,n){if(!t.eventBuffer)return null;if(t.isPaused())return null;if(Ha(e.timestamp)+t.timeouts.sessionIdlePause<Date.now())return null;try{return n&&t.eventBuffer.clear(),await t.eventBuffer.addEvent(e)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error(e),await t.stop("addEvent");const n=fr().getClient();n&&n.recordDroppedEvent("internal_sdk_error","replay")}}function Ga(t,e){"sentry.transaction"!==e.category&&(["ui.click","ui.input"].includes(e.category)?t.triggerUserActivity():t.checkAndHandleExpiredSession(),t.addUpdate(()=>(za(t,{type:As.Custom,timestamp:1e3*(e.timestamp||0),data:{tag:"breadcrumb",payload:wn(e,10,1e3)}}),"console"===e.category)))}Ma.addCustomEvent=(t,e)=>{if(!Ua)throw new Error("please add custom event after start recording");Ua(Oa({type:As.Custom,data:{tag:t,payload:e}}))},Ma.freezePage=()=>{la.forEach(t=>t.freeze())},Ma.takeFullSnapshot=t=>{if(!Aa)throw new Error("please take full snapshot after start recording");Aa(t)},Ma.mirror=Ba,function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"}(La||(La={}));const Ya=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid"]);function $a(t){const e={};for(const n in t)if(Ya.has(n)){let r=n;"data-testid"!==n&&"data-test-id"!==n||(r="testId"),e[r]=t[n]}return e}function Fa(t,e){const n=t&&"__sn"in t&&t.__sn.type===La.Element?t.__sn:null;return{message:e,data:n?{nodeId:n.id,node:{id:n.id,tagName:n.tagName,textContent:t?Array.from(t.childNodes).map(t=>"__sn"in t&&t.__sn.type===La.Text&&t.__sn.textContent).filter(Boolean).map(t=>t.trim()).join(""):"",attributes:$a(n.attributes)}}:{}}}function ja(t){return function(t){return"object"==typeof t&&!!t&&"target"in t}(t)?t.target:t}const Va=["name","type","startTime","transferSize","duration"];function Za(t){return function(e){return Va.every(n=>t[n]===e[n])}}class qa{constructor(){this.events=[]}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){this.events.push(t)}finish(){return new Promise(t=>{const e=this.events;this.events=[],t(JSON.stringify(e))})}clear(){this.events=[]}getEarliestTimestamp(){const t=this.events.map(t=>t.timestamp).sort()[0];return t?Ha(t):null}}class Wa{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise((t,e)=>{this._worker.addEventListener("message",({data:n})=>{n.success?t():e()},{once:!0}),this._worker.addEventListener("error",t=>{e(t)},{once:!0})})),this._ensureReadyPromise}destroy(){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("[Replay] Destroying compression worker"),this._worker.terminate()}postMessage(t,e){const n=this._getAndIncrementId();return new Promise((r,i)=>{const s=({data:e})=>{const a=e;if(a.method===t&&a.id===n){if(this._worker.removeEventListener("message",s),!a.success)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error("[Replay]",a.response),void i(new Error("Error in compression worker"));r(a.response)}};this._worker.addEventListener("message",s),this._worker.postMessage({id:n,method:t,arg:e})})}_getAndIncrementId(){return this._id++}}class Ka{constructor(t){this._worker=new Wa(t),this._earliestTimestamp=null}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const e=Ha(t.timestamp);return(!this._earliestTimestamp||e<this._earliestTimestamp)&&(this._earliestTimestamp=e),this._sendEventToWorker(t)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._worker.postMessage("clear")}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",JSON.stringify(t))}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,t}}class Ja{constructor(t){this._fallback=new qa,this._compression=new Ka(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("[Replay] Failed to load the compression worker, falling back to simple buffer"))}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t}=this._fallback,e=[];for(const n of t)e.push(this._compression.addEvent(n));this._used=this._compression;try{await Promise.all(e)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn("[Replay] Failed to add events when switching buffers.",t)}}}function Xa(t,e,n=+new Date){return null===t||void 0===e||e<0||0!==e&&t+e<=n}function Qa(t,e,n=+new Date){return Xa(t.started,e.maxSessionLife,n)||Xa(t.lastActivity,e.sessionIdleExpire,n)}function to(t){return void 0!==t&&Math.random()<t}function eo(t){if("sessionStorage"in ts)try{ts.sessionStorage.setItem(es,JSON.stringify(t))}catch(t){}}function no(t){const e=Date.now();return{id:t.id||hn(),started:t.started||e,lastActivity:t.lastActivity||e,segmentId:t.segmentId||0,sampled:t.sampled,shouldRefresh:!0}}function ro({sessionSampleRate:t,allowBuffering:e,stickySession:n=!1}){const r=function(t,e){return to(t)?"session":!!e&&"buffer"}(t,e),i=no({sampled:r});return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log(`[Replay] Creating new session: ${i.id}`),n&&eo(i),i}function io({timeouts:t,currentSession:e,stickySession:n,sessionSampleRate:r,allowBuffering:i}){const s=e||n&&function(){if(!("sessionStorage"in ts))return null;try{const t=ts.sessionStorage.getItem(es);return t?no(JSON.parse(t)):null}catch(t){return null}}();if(s){if(!Qa(s,t))return{type:"saved",session:s};if(!s.shouldRefresh)return{type:"new",session:no({sampled:!1})};("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("[Replay] Session has expired")}return{type:"new",session:ro({stickySession:n,sessionSampleRate:r,allowBuffering:i})}}function so(t){return!t.type}function ao(t){return"transaction"===t.type}function oo(t){const e=function(){const t=fr().getClient();if(!t)return!1;const e=t.getTransport();return e&&e.send.__sentry__baseTransport__||!1}();return(n,r)=>{if(!so(n)&&!ao(n))return;const i=r&&r.statusCode;e&&(!i||i<200||i>=300)||(ao(n)&&n.contexts&&n.contexts.trace&&n.contexts.trace.trace_id?t.getContext().traceIds.add(n.contexts.trace.trace_id):so(n)&&(n.event_id&&t.getContext().errorIds.add(n.event_id),"buffer"===t.recordingMode&&n.tags&&n.tags.replayId&&setTimeout(()=>{t.sendBufferedReplayOrFlush()})))}}function co(t,e){return e.map(({type:e,start:n,end:r,name:i,data:s})=>za(t,{type:As.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:e,description:i,startTimestamp:n,endTimestamp:r,data:s}}}))}function lo(t,e){t.isEnabled()&&null!==e&&(function(t,e){return("undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__||!t.getOptions()._experiments.traceInternals)&&function(t){const e=fr().getClient(),n=e&&e.getDsn();return!!n&&t.includes(n.host)}(e)}(t,e.name)||t.addUpdate(()=>(co(t,[e]),!0)))}const uo=10,po=11,ho=12,fo=13,_o=14,mo=15,go=20,yo=21,vo=22,bo=23,Eo=["true","false","null"];function So(t,e,n){const r=t[t.length-1],i=e[n];if(!/\s/.test(i))if('"'!==i||wo(e,n))switch(i){case"{":!function(t,e){e&&e!==fo?(e===yo&&t.push(uo),e===go&&t.push(uo)):t.push(uo)}(t,r);break;case"[":!function(t,e){e?e===fo?(t.push(go),t.push(yo)):(e===yo&&(t.push(go),t.push(yo)),e===go&&(t.push(go),t.push(yo))):(t.push(go),t.push(yo))}(t,r);break;case":":!function(t,e){e===po&&(t.pop(),t.push(fo))}(t,r);break;case",":!function(t,e){if(e!==fo)return e===mo?(t.pop(),void t.pop()):void(e!==yo&&e===bo&&t.pop());t.pop()}(t,r);break;case"}":!function(t,e){e===uo&&t.pop(),e===fo&&(t.pop(),t.pop()),e===mo&&(t.pop(),t.pop(),t.pop()),t[t.length-1]===fo&&t.push(mo),t[t.length-1]===yo&&t.push(bo)}(t,r);break;case"]":!function(t,e){e===go&&t.pop(),e===yo&&(t.pop(),t.pop()),e===bo&&(t.pop(),t.pop(),t.pop()),t[t.length-1]===fo&&t.push(mo),t[t.length-1]===yo&&t.push(bo)}(t,r)}else!function(t,e){e===_o?(t.pop(),t.push(mo)):e===vo?(t.pop(),t.push(bo)):e!==fo?e!==yo?e!==uo?e===ho&&(t.pop(),t.push(po)):t.push(ho):t.push(vo):t.push(_o)}(t,r)}function wo(t,e){return"\\"===t[e-1]&&!wo(t,e-1)}function ko(t){return function(t,e){if(!e.length)return t;let n=t;const r=e.length-1;n=function(t,e){switch(e){case uo:return`${t}"~~":"~~"`;case po:return`${t}:"~~"`;case ho:return`${t}~~":"~~"`;case fo:return function(t){const e=t.lastIndexOf(":"),n=t.slice(e+1);return Eo.includes(n.trim())?`${t},"~~":"~~"`:`${t.slice(0,e+1)}"~~"`}(t);case _o:return`${t}~~"`;case mo:return`${t},"~~":"~~"`;case go:return`${t}"~~"`;case yo:return function(t){const e=function(t){for(let e=t.length-1;e>=0;e--){const n=t[e];if(","===n||"["===n)return e}return-1}(t);if(e>-1){const n=t.slice(e+1);return Eo.includes(n.trim())?`${t},"~~"`:`${t.slice(0,e+1)}"~~"`}return t}(t);case vo:return`${t}~~"`;case bo:return`${t},"~~"`}return t}(n,e[r]);for(let t=r;t>=0;t--)switch(e[t]){case uo:n=`${n}}`;break;case go:n=`${n}]`}return n}(t,function(t){const e=[];for(let n=0;n<t.length;n++)So(e,t,n);return e}(t))}function To(t,e){if(t)try{if("string"==typeof t)return e.encode(t).length;if(t instanceof URLSearchParams)return e.encode(t.toString()).length;if(t instanceof FormData){const n=Oo(t);return e.encode(n).length}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength}catch(t){}}function Co(t){if(!t)return;const e=parseInt(t,10);return isNaN(e)?void 0:e}function xo(t){return"string"==typeof t?t:t instanceof URLSearchParams?t.toString():t instanceof FormData?Oo(t):void 0}function Ro(t,e){if(!e)return null;const{startTimestamp:n,endTimestamp:r,url:i,method:s,statusCode:a,request:o,response:c}=e;return{type:t,start:n/1e3,end:r/1e3,name:i,data:Ge({method:s,statusCode:a,request:o,response:c})}}function Do(t){return{headers:{},size:t,_meta:{warnings:["URL_SKIPPED"]}}}function Io(t,e,n){if(!e&&0===Object.keys(t).length)return;if(!e)return{headers:t};if(!n)return{headers:t,size:e};const r={headers:t,size:e},{body:i,warnings:s}=function(t){if(!t||"string"!=typeof t)return{body:t,warnings:[]};const e=t.length>rs;if(function(t){const e=t[0],n=t[t.length-1];return"["===e&&"]"===n||"{"===e&&"}"===n}(t))try{const n=e?ko(t.slice(0,rs)):t;return{body:JSON.parse(n),warnings:e?["JSON_TRUNCATED"]:[]}}catch(n){return{body:e?`${t.slice(0,rs)}…`:t,warnings:e?["INVALID_JSON","TEXT_TRUNCATED"]:["INVALID_JSON"]}}return{body:e?`${t.slice(0,rs)}…`:t,warnings:e?["TEXT_TRUNCATED"]:[]}}(n);return r.body=i,s.length>0&&(r._meta={warnings:s}),r}function No(t,e){return Object.keys(t).reduce((n,r)=>{const i=r.toLowerCase();return e.includes(i)&&t[r]&&(n[i]=t[r]),n},{})}function Oo(t){return new URLSearchParams(t).toString()}function Uo(t,e){const n=function(t,e=ts.document.baseURI){if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith(ts.location.origin))return t;const n=new URL(t,e);if(n.origin!==new URL(e).origin)return t;const r=n.href;return!t.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}(t);return Oe(n,e)}function Ao(t=[]){if(2===t.length&&"object"==typeof t[1])return t[1].body}function Bo(t,e){const n={};return e.forEach(e=>{t.get(e)&&(n[e]=t.get(e))}),n}function Mo(t,e){if(!t)return{};const n=t.headers;return n?n instanceof Headers?Bo(n,e):Array.isArray(n)?{}:No(n,e):{}}let Po=null;function Lo(t){return!(!t||!t.on)}function Ho(t){const{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}=t,i=Date.now()/1e3;return{type:"memory",name:"memory",start:i,end:i,data:{memory:{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}}}}const zo={resource:function(t){const{entryType:e,initiatorType:n,name:r,responseEnd:i,startTime:s,decodedBodySize:a,encodedBodySize:o,responseStatus:c,transferSize:l}=t;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${e}.${n}`,start:Yo(s),end:Yo(i),name:r,data:{size:l,statusCode:c,decodedBodySize:a,encodedBodySize:o}}},paint:function(t){const{duration:e,entryType:n,name:r,startTime:i}=t,s=Yo(i);return{type:n,name:r,start:s,end:s+e,data:void 0}},navigation:function(t){const{entryType:e,name:n,decodedBodySize:r,duration:i,domComplete:s,encodedBodySize:a,domContentLoadedEventStart:o,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:d,redirectCount:p,startTime:h,transferSize:f,type:_}=t;return 0===i?null:{type:`${e}.${_}`,start:Yo(h),end:Yo(s),name:n,data:{size:f,decodedBodySize:r,encodedBodySize:a,duration:i,domInteractive:l,domContentLoadedEventStart:o,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:d,domComplete:s,redirectCount:p}}},"largest-contentful-paint":function(t){const{entryType:e,startTime:n,size:r}=t;let i=0;if(ts.performance){const t=ts.performance.getEntriesByType("navigation")[0];i=t&&t.activationStart||0}const s=Math.max(n-i,0),a=Yo(i)+s/1e3;return{type:e,name:e,start:a,end:a,data:{value:s,size:r,nodeId:Ma.mirror.getId(t.element)}}}};function Go(t){return void 0===zo[t.entryType]?null:zo[t.entryType](t)}function Yo(t){return((Hn||ts.performance.timeOrigin)+t)/1e3}var $o;function Fo(t){let e=!1;return(n,r)=>{if(!t.checkAndHandleExpiredSession())return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn("[Replay] Received replay event after session expired."));const i=r||!e;e=!0,t.addUpdate(()=>{if("buffer"===t.recordingMode&&i&&t.setInitialState(),za(t,n,i),!i)return!1;if(function(t,e){if(!e||!t.session||0!==t.session.segmentId)return Promise.resolve(null);za(t,function(t){const e=t.getOptions();return{type:$o.Custom,timestamp:Date.now(),data:{tag:"options",payload:{sessionSampleRate:e.sessionSampleRate,errorSampleRate:e.errorSampleRate,useCompressionOption:e.useCompression,blockAllMedia:e.blockAllMedia,maskAllText:e.maskAllText,maskAllInputs:e.maskAllInputs,useCompression:!!t.eventBuffer&&"worker"===t.eventBuffer.type,networkDetailHasUrls:e.networkDetailAllowUrls.length>0,networkCaptureBodies:e.networkCaptureBodies,networkRequestHasHeaders:e.networkRequestHeaders.length>0,networkResponseHasHeaders:e.networkResponseHeaders.length>0}}}}(t),!1)}(t,i),t.session&&t.session.previousSessionId)return!0;if("buffer"===t.recordingMode&&t.session&&t.eventBuffer){const e=t.eventBuffer.getEarliestTimestamp();e&&(t.session.started=e,t.getOptions().stickySession&&eo(t.session))}return"session"===t.recordingMode&&t.flushImmediate(),!0})}}!function(t){t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin"}($o||($o={}));class jo extends Error{constructor(t){super(`Transport returned status code ${t}`)}}async function Vo(t,e={count:0,interval:5e3}){const{recordingData:n,options:r}=t;var i;if(n.length)try{return await async function({recordingData:t,replayId:e,segmentId:n,eventContext:r,timestamp:i,session:s}){const a=function({recordingData:t,headers:e}){let n;const r=`${JSON.stringify(e)}\n`;if("string"==typeof t)n=`${r}${t}`;else{const e=(new TextEncoder).encode(r);n=new Uint8Array(e.length+t.length),n.set(e),n.set(t,e.length)}return n}({recordingData:t,headers:{segment_id:n}}),{urls:o,errorIds:c,traceIds:l,initialTimestamp:u}=r,d=fr(),p=d.getClient(),h=d.getScope(),f=p&&p.getTransport(),_=p&&p.getDsn();if(!(p&&h&&f&&_&&s.sampled))return;const m={type:"replay_event",replay_start_timestamp:u/1e3,timestamp:i/1e3,error_ids:c,trace_ids:l,urls:o,replay_id:e,segment_id:n,replay_type:s.sampled},g=await async function({client:t,scope:e,replayId:n,event:r}){const i="object"!=typeof t._integrations||null===t._integrations||Array.isArray(t._integrations)?void 0:Object.keys(t._integrations),s=await zr(t.getOptions(),r,{event_id:n,integrations:i},e);if(!s)return null;s.platform=s.platform||"javascript";const a=t.getSdkMetadata&&t.getSdkMetadata(),{name:o,version:c}=a&&a.sdk||{};return s.sdk={...s.sdk,name:o||"sentry.javascript.unknown",version:c||"0.0.0"},s}({scope:h,client:p,replayId:e,event:m});if(!g)return p.recordDroppedEvent("event_processor","replay",m),void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("An event processor returned `null`, will not send event."));const y=function(t,e,n,r){return Gn(Kn(t,Wn(t),r,n),[[{type:"replay_event"},t],[{type:"replay_recording",length:"string"==typeof e?(new TextEncoder).encode(e).length:e.length},e]])}(g,a,_,p.getOptions().tunnel);let v;try{v=await f.send(y)}catch(t){const e=new Error(ns);try{e.cause=t}catch(t){}throw e}if(!v)return v;if("number"==typeof v.statusCode&&(v.statusCode<200||v.statusCode>=300))throw new jo(v.statusCode);return v}(t),!0}catch(n){if(n instanceof jo)throw n;if(i={_retryCount:e.count},fr().setContext("Replays",i),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r._experiments&&r._experiments.captureExceptions&&Ar(n),e.count>=3){const t=new Error(`${ns} - max retries exceeded`);try{t.cause=n}catch(t){}throw t}return e.interval*=++e.count,await new Promise((n,r)=>{setTimeout(async()=>{try{await Vo(t,e),n(!0)}catch(t){r(t)}},e.interval)})}}class Zo{__init(){this.eventBuffer=null}__init2(){this.performanceEvents=[]}__init3(){this.recordingMode="session"}__init4(){this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5,maxSessionLife:36e5}}__init5(){this._performanceObserver=null}__init6(){this._flushLock=null}__init7(){this._lastActivity=Date.now()}__init8(){this._isEnabled=!1}__init9(){this._isPaused=!1}__init10(){this._hasInitializedCoreListeners=!1}__init11(){this._stopRecording=null}__init12(){this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""}}constructor({options:t,recordingOptions:e}){Zo.prototype.__init.call(this),Zo.prototype.__init2.call(this),Zo.prototype.__init3.call(this),Zo.prototype.__init4.call(this),Zo.prototype.__init5.call(this),Zo.prototype.__init6.call(this),Zo.prototype.__init7.call(this),Zo.prototype.__init8.call(this),Zo.prototype.__init9.call(this),Zo.prototype.__init10.call(this),Zo.prototype.__init11.call(this),Zo.prototype.__init12.call(this),Zo.prototype.__init13.call(this),Zo.prototype.__init14.call(this),Zo.prototype.__init15.call(this),Zo.prototype.__init16.call(this),Zo.prototype.__init17.call(this),Zo.prototype.__init18.call(this),this._recordingOptions=e,this._options=t,this._debouncedFlush=function(t,e,n){let r,i,s;const a=n&&n.maxWait?Math.max(n.maxWait,e):0;function o(){return c(),r=t(),r}function c(){void 0!==i&&clearTimeout(i),void 0!==s&&clearTimeout(s),i=s=void 0}function l(){return i&&clearTimeout(i),i=setTimeout(o,e),a&&void 0===s&&(s=setTimeout(o,a)),r}return l.cancel=c,l.flush=function(){return void 0!==i||void 0!==s?o():r},l}(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay})}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}getOptions(){return this._options}initializeSampling(){const{errorSampleRate:t,sessionSampleRate:e}=this._options;t<=0&&e<=0||this._loadAndCheckSession()&&(this.session?(this.session.sampled&&"session"!==this.session.sampled&&(this.recordingMode="buffer"),this._initializeRecording()):this._handleException(new Error("Unable to initialize and create session")))}start(){if(this._isEnabled&&"session"===this.recordingMode)throw new Error("Replay recording is already in progress");if(this._isEnabled&&"buffer"===this.recordingMode)throw new Error("Replay buffering is in progress, call `flush()` to save the replay");const t=this.session&&this.session.id,{session:e}=io({timeouts:this.timeouts,stickySession:Boolean(this._options.stickySession),currentSession:this.session,sessionSampleRate:1,allowBuffering:!1});e.previousSessionId=t,this.session=e,this._initializeRecording()}startBuffering(){if(this._isEnabled)throw new Error("Replay recording is already in progress");const t=this.session&&this.session.id,{session:e}=io({timeouts:this.timeouts,stickySession:Boolean(this._options.stickySession),currentSession:this.session,sessionSampleRate:0,allowBuffering:!0});e.previousSessionId=t,this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{this._stopRecording=Ma({...this._recordingOptions,..."buffer"===this.recordingMode&&{checkoutEveryNms:6e4},emit:Fo(this),onMutation:this._onMutationHandler})}catch(t){this._handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this._handleException(t),!1}}async stop(t){if(this._isEnabled)try{if("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__){const e="[Replay] Stopping Replay"+(t?` triggered by ${t}`:"");(this.getOptions()._experiments.traceInternals?console.warn:De.log)(e)}this._isEnabled=!1,this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,function(){if("sessionStorage"in ts)try{ts.sessionStorage.removeItem(es)}catch(t){}}(),this.session=void 0}catch(t){this._handleException(t)}}pause(){this._isPaused=!0,this.stopRecording()}resume(){this._loadAndCheckSession()&&(this._isPaused=!1,this.startRecording())}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();await this.flushImmediate();const e=this.stopRecording();t&&e&&(this.recordingMode="session",this.session&&(this.session.shouldRefresh=!1,this._maybeSaveSession()),this.startRecording())}addUpdate(t){const e=t();"buffer"!==this.recordingMode&&!0!==e&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._loadAndCheckSession())return;this.resume()}}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){const t=this.getSessionId();if(this._lastActivity&&Xa(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled)this.pause();else if(this._loadAndCheckSession())return t===this.getSessionId()||(this._triggerFullSnapshot(),!1)}setInitialState(){const t=`${ts.location.origin}${ts.location.pathname}${ts.location.hash}${ts.location.search}`;this.performanceEvents=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=function({useCompression:t}){if(t&&window.Worker)try{const t=function(){const t=new Blob(['/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */\nfunction t(t){let e=t.length;for(;--e>=0;)t[e]=0}const e=new Uint8Array([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]),a=new Uint8Array([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]),i=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),n=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=new Array(576);t(s);const r=new Array(60);t(r);const o=new Array(512);t(o);const l=new Array(256);t(l);const h=new Array(29);t(h);const d=new Array(30);function _(t,e,a,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}let f,c,u;function w(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}t(d);const m=t=>t<256?o[t]:o[256+(t>>>7)],b=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},g=(t,e,a)=>{t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,b(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},p=(t,e,a)=>{g(t,a[2*e],a[2*e+1])},k=(t,e)=>{let a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},v=(t,e,a)=>{const i=new Array(16);let n,s,r=0;for(n=1;n<=15;n++)r=r+a[n-1]<<1,i[n]=r;for(s=0;s<=e;s++){let e=t[2*s+1];0!==e&&(t[2*s]=k(i[e]++,e))}},y=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},x=t=>{t.bi_valid>8?b(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},z=(t,e,a,i)=>{const n=2*e,s=2*a;return t[n]<t[s]||t[n]===t[s]&&i[e]<=i[a]},A=(t,e,a)=>{const i=t.heap[a];let n=a<<1;for(;n<=t.heap_len&&(n<t.heap_len&&z(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!z(e,i,t.heap[n],t.depth));)t.heap[a]=t.heap[n],a=n,n<<=1;t.heap[a]=i},E=(t,i,n)=>{let s,r,o,_,f=0;if(0!==t.sym_next)do{s=255&t.pending_buf[t.sym_buf+f++],s+=(255&t.pending_buf[t.sym_buf+f++])<<8,r=t.pending_buf[t.sym_buf+f++],0===s?p(t,r,i):(o=l[r],p(t,o+256+1,i),_=e[o],0!==_&&(r-=h[o],g(t,r,_)),s--,o=m(s),p(t,o,n),_=a[o],0!==_&&(s-=d[o],g(t,s,_)))}while(f<t.sym_next);p(t,256,i)},R=(t,e)=>{const a=e.dyn_tree,i=e.stat_desc.static_tree,n=e.stat_desc.has_stree,s=e.stat_desc.elems;let r,o,l,h=-1;for(t.heap_len=0,t.heap_max=573,r=0;r<s;r++)0!==a[2*r]?(t.heap[++t.heap_len]=h=r,t.depth[r]=0):a[2*r+1]=0;for(;t.heap_len<2;)l=t.heap[++t.heap_len]=h<2?++h:0,a[2*l]=1,t.depth[l]=0,t.opt_len--,n&&(t.static_len-=i[2*l+1]);for(e.max_code=h,r=t.heap_len>>1;r>=1;r--)A(t,a,r);l=s;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],A(t,a,1),o=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=o,a[2*l]=a[2*r]+a[2*o],t.depth[l]=(t.depth[r]>=t.depth[o]?t.depth[r]:t.depth[o])+1,a[2*r+1]=a[2*o+1]=l,t.heap[1]=l++,A(t,a,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const a=e.dyn_tree,i=e.max_code,n=e.stat_desc.static_tree,s=e.stat_desc.has_stree,r=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,l=e.stat_desc.max_length;let h,d,_,f,c,u,w=0;for(f=0;f<=15;f++)t.bl_count[f]=0;for(a[2*t.heap[t.heap_max]+1]=0,h=t.heap_max+1;h<573;h++)d=t.heap[h],f=a[2*a[2*d+1]+1]+1,f>l&&(f=l,w++),a[2*d+1]=f,d>i||(t.bl_count[f]++,c=0,d>=o&&(c=r[d-o]),u=a[2*d],t.opt_len+=u*(f+c),s&&(t.static_len+=u*(n[2*d+1]+c)));if(0!==w){do{for(f=l-1;0===t.bl_count[f];)f--;t.bl_count[f]--,t.bl_count[f+1]+=2,t.bl_count[l]--,w-=2}while(w>0);for(f=l;0!==f;f--)for(d=t.bl_count[f];0!==d;)_=t.heap[--h],_>i||(a[2*_+1]!==f&&(t.opt_len+=(f-a[2*_+1])*a[2*_],a[2*_+1]=f),d--)}})(t,e),v(a,h,t.bl_count)},Z=(t,e,a)=>{let i,n,s=-1,r=e[1],o=0,l=7,h=4;for(0===r&&(l=138,h=3),e[2*(a+1)+1]=65535,i=0;i<=a;i++)n=r,r=e[2*(i+1)+1],++o<l&&n===r||(o<h?t.bl_tree[2*n]+=o:0!==n?(n!==s&&t.bl_tree[2*n]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=0,s=n,0===r?(l=138,h=3):n===r?(l=6,h=3):(l=7,h=4))},U=(t,e,a)=>{let i,n,s=-1,r=e[1],o=0,l=7,h=4;for(0===r&&(l=138,h=3),i=0;i<=a;i++)if(n=r,r=e[2*(i+1)+1],!(++o<l&&n===r)){if(o<h)do{p(t,n,t.bl_tree)}while(0!=--o);else 0!==n?(n!==s&&(p(t,n,t.bl_tree),o--),p(t,16,t.bl_tree),g(t,o-3,2)):o<=10?(p(t,17,t.bl_tree),g(t,o-3,3)):(p(t,18,t.bl_tree),g(t,o-11,7));o=0,s=n,0===r?(l=138,h=3):n===r?(l=6,h=3):(l=7,h=4)}};let S=!1;const D=(t,e,a,i)=>{g(t,0+(i?1:0),3),x(t),b(t,a),b(t,~a),a&&t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a};var T=(t,e,a,i)=>{let o,l,h=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),R(t,t.l_desc),R(t,t.d_desc),h=(t=>{let e;for(Z(t,t.dyn_ltree,t.l_desc.max_code),Z(t,t.dyn_dtree,t.d_desc.max_code),R(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*n[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),o=t.opt_len+3+7>>>3,l=t.static_len+3+7>>>3,l<=o&&(o=l)):o=l=a+5,a+4<=o&&-1!==e?D(t,e,a,i):4===t.strategy||l===o?(g(t,2+(i?1:0),3),E(t,s,r)):(g(t,4+(i?1:0),3),((t,e,a,i)=>{let s;for(g(t,e-257,5),g(t,a-1,5),g(t,i-4,4),s=0;s<i;s++)g(t,t.bl_tree[2*n[s]+1],3);U(t,t.dyn_ltree,e-1),U(t,t.dyn_dtree,a-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,h+1),E(t,t.dyn_ltree,t.dyn_dtree)),y(t),i&&x(t)},O={_tr_init:t=>{S||((()=>{let t,n,w,m,b;const g=new Array(16);for(w=0,m=0;m<28;m++)for(h[m]=w,t=0;t<1<<e[m];t++)l[w++]=m;for(l[w-1]=m,b=0,m=0;m<16;m++)for(d[m]=b,t=0;t<1<<a[m];t++)o[b++]=m;for(b>>=7;m<30;m++)for(d[m]=b<<7,t=0;t<1<<a[m]-7;t++)o[256+b++]=m;for(n=0;n<=15;n++)g[n]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,g[8]++;for(;t<=255;)s[2*t+1]=9,t++,g[9]++;for(;t<=279;)s[2*t+1]=7,t++,g[7]++;for(;t<=287;)s[2*t+1]=8,t++,g[8]++;for(v(s,287,g),t=0;t<30;t++)r[2*t+1]=5,r[2*t]=k(t,5);f=new _(s,e,257,286,15),c=new _(r,a,0,30,15),u=new _(new Array(0),i,0,19,7)})(),S=!0),t.l_desc=new w(t.dyn_ltree,f),t.d_desc=new w(t.dyn_dtree,c),t.bl_desc=new w(t.bl_tree,u),t.bi_buf=0,t.bi_valid=0,y(t)},_tr_stored_block:D,_tr_flush_block:T,_tr_tally:(t,e,a)=>(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=a,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(l[a]+256+1)]++,t.dyn_dtree[2*m(e)]++),t.sym_next===t.sym_end),_tr_align:t=>{g(t,2,3),p(t,256,s),(t=>{16===t.bi_valid?(b(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}};var F=(t,e,a,i)=>{let n=65535&t|0,s=t>>>16&65535|0,r=0;for(;0!==a;){r=a>2e3?2e3:a,a-=r;do{n=n+e[i++]|0,s=s+n|0}while(--r);n%=65521,s%=65521}return n|s<<16|0};const L=new Uint32Array((()=>{let t,e=[];for(var a=0;a<256;a++){t=a;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e})());var N=(t,e,a,i)=>{const n=L,s=i+a;t^=-1;for(let a=i;a<s;a++)t=t>>>8^n[255&(t^e[a])];return-1^t},I={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},B={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:C,_tr_stored_block:H,_tr_flush_block:M,_tr_tally:j,_tr_align:K}=O,{Z_NO_FLUSH:P,Z_PARTIAL_FLUSH:Y,Z_FULL_FLUSH:G,Z_FINISH:X,Z_BLOCK:W,Z_OK:q,Z_STREAM_END:J,Z_STREAM_ERROR:Q,Z_DATA_ERROR:V,Z_BUF_ERROR:$,Z_DEFAULT_COMPRESSION:tt,Z_FILTERED:et,Z_HUFFMAN_ONLY:at,Z_RLE:it,Z_FIXED:nt,Z_DEFAULT_STRATEGY:st,Z_UNKNOWN:rt,Z_DEFLATED:ot}=B,lt=(t,e)=>(t.msg=I[e],e),ht=t=>2*t-(t>4?9:0),dt=t=>{let e=t.length;for(;--e>=0;)t[e]=0},_t=t=>{let e,a,i,n=t.w_size;e=t.hash_size,i=e;do{a=t.head[--i],t.head[i]=a>=n?a-n:0}while(--e);e=n,i=e;do{a=t.prev[--i],t.prev[i]=a>=n?a-n:0}while(--e)};let ft=(t,e,a)=>(e<<t.hash_shift^a)&t.hash_mask;const ct=t=>{const e=t.state;let a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},ut=(t,e)=>{M(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,ct(t.strm)},wt=(t,e)=>{t.pending_buf[t.pending++]=e},mt=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},bt=(t,e,a,i)=>{let n=t.avail_in;return n>i&&(n=i),0===n?0:(t.avail_in-=n,e.set(t.input.subarray(t.next_in,t.next_in+n),a),1===t.state.wrap?t.adler=F(t.adler,e,n,a):2===t.state.wrap&&(t.adler=N(t.adler,e,n,a)),t.next_in+=n,t.total_in+=n,n)},gt=(t,e)=>{let a,i,n=t.max_chain_length,s=t.strstart,r=t.prev_length,o=t.nice_match;const l=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,h=t.window,d=t.w_mask,_=t.prev,f=t.strstart+258;let c=h[s+r-1],u=h[s+r];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do{if(a=e,h[a+r]===u&&h[a+r-1]===c&&h[a]===h[s]&&h[++a]===h[s+1]){s+=2,a++;do{}while(h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&s<f);if(i=258-(f-s),s=f-258,i>r){if(t.match_start=e,r=i,i>=o)break;c=h[s+r-1],u=h[s+r]}}}while((e=_[e&d])>l&&0!=--n);return r<=t.lookahead?r:t.lookahead},pt=t=>{const e=t.w_size;let a,i,n;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-262)&&(t.window.set(t.window.subarray(e,e+e-i),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),_t(t),i+=e),0===t.strm.avail_in)break;if(a=bt(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=a,t.lookahead+t.insert>=3)for(n=t.strstart-t.insert,t.ins_h=t.window[n],t.ins_h=ft(t,t.ins_h,t.window[n+1]);t.insert&&(t.ins_h=ft(t,t.ins_h,t.window[n+3-1]),t.prev[n&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=n,n++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)},kt=(t,e)=>{let a,i,n,s=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,r=0,o=t.strm.avail_in;do{if(a=65535,n=t.bi_valid+42>>3,t.strm.avail_out<n)break;if(n=t.strm.avail_out-n,i=t.strstart-t.block_start,a>i+t.strm.avail_in&&(a=i+t.strm.avail_in),a>n&&(a=n),a<s&&(0===a&&e!==X||e===P||a!==i+t.strm.avail_in))break;r=e===X&&a===i+t.strm.avail_in?1:0,H(t,0,0,r),t.pending_buf[t.pending-4]=a,t.pending_buf[t.pending-3]=a>>8,t.pending_buf[t.pending-2]=~a,t.pending_buf[t.pending-1]=~a>>8,ct(t.strm),i&&(i>a&&(i=a),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+i),t.strm.next_out),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i,t.block_start+=i,a-=i),a&&(bt(t.strm,t.strm.output,t.strm.next_out,a),t.strm.next_out+=a,t.strm.avail_out-=a,t.strm.total_out+=a)}while(0===r);return o-=t.strm.avail_in,o&&(o>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=o&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-o,t.strm.next_in),t.strstart),t.strstart+=o,t.insert+=o>t.w_size-t.insert?t.w_size-t.insert:o),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),r?4:e!==P&&e!==X&&0===t.strm.avail_in&&t.strstart===t.block_start?2:(n=t.window_size-t.strstart,t.strm.avail_in>n&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,n+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),n>t.strm.avail_in&&(n=t.strm.avail_in),n&&(bt(t.strm,t.window,t.strstart,n),t.strstart+=n,t.insert+=n>t.w_size-t.insert?t.w_size-t.insert:n),t.high_water<t.strstart&&(t.high_water=t.strstart),n=t.bi_valid+42>>3,n=t.pending_buf_size-n>65535?65535:t.pending_buf_size-n,s=n>t.w_size?t.w_size:n,i=t.strstart-t.block_start,(i>=s||(i||e===X)&&e!==P&&0===t.strm.avail_in&&i<=n)&&(a=i>n?n:i,r=e===X&&0===t.strm.avail_in&&a===i?1:0,H(t,t.block_start,a,r),t.block_start+=a,ct(t.strm)),r?3:1)},vt=(t,e)=>{let a,i;for(;;){if(t.lookahead<262){if(pt(t),t.lookahead<262&&e===P)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-262&&(t.match_length=gt(t,a)),t.match_length>=3)if(i=j(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=ft(t,t.ins_h,t.window[t.strstart+1]);else i=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2},yt=(t,e)=>{let a,i,n;for(;;){if(t.lookahead<262){if(pt(t),t.lookahead<262&&e===P)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-262&&(t.match_length=gt(t,a),t.match_length<=5&&(t.strategy===et||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-3,i=j(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=n&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,i&&(ut(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(i=j(t,0,t.window[t.strstart-1]),i&&ut(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=j(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2};function xt(t,e,a,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=i,this.func=n}const zt=[new xt(0,0,0,0,kt),new xt(4,4,8,4,vt),new xt(4,5,16,8,vt),new xt(4,6,32,32,vt),new xt(4,4,16,16,yt),new xt(8,16,32,32,yt),new xt(8,16,128,128,yt),new xt(8,32,128,256,yt),new xt(32,128,258,1024,yt),new xt(32,258,258,4096,yt)];function At(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ot,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),dt(this.dyn_ltree),dt(this.dyn_dtree),dt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),dt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),dt(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Et=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||42!==e.status&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&113!==e.status&&666!==e.status?1:0},Rt=t=>{if(Et(t))return lt(t,Q);t.total_in=t.total_out=0,t.data_type=rt;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=-2,C(e),q},Zt=t=>{const e=Rt(t);var a;return e===q&&((a=t.state).window_size=2*a.w_size,dt(a.head),a.max_lazy_match=zt[a.level].max_lazy,a.good_match=zt[a.level].good_length,a.nice_match=zt[a.level].nice_length,a.max_chain_length=zt[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=2,a.match_available=0,a.ins_h=0),e},Ut=(t,e,a,i,n,s)=>{if(!t)return Q;let r=1;if(e===tt&&(e=6),i<0?(r=0,i=-i):i>15&&(r=2,i-=16),n<1||n>9||a!==ot||i<8||i>15||e<0||e>9||s<0||s>nt||8===i&&1!==r)return lt(t,Q);8===i&&(i=9);const o=new At;return t.state=o,o.strm=t,o.status=42,o.wrap=r,o.gzhead=null,o.w_bits=i,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=n+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+3-1)/3),o.window=new Uint8Array(2*o.w_size),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<n+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=3*(o.lit_bufsize-1),o.level=e,o.strategy=s,o.method=a,Zt(t)};var St={deflateInit:(t,e)=>Ut(t,e,ot,15,8,st),deflateInit2:Ut,deflateReset:Zt,deflateResetKeep:Rt,deflateSetHeader:(t,e)=>Et(t)||2!==t.state.wrap?Q:(t.state.gzhead=e,q),deflate:(t,e)=>{if(Et(t)||e>W||e<0)return t?lt(t,Q):Q;const a=t.state;if(!t.output||0!==t.avail_in&&!t.input||666===a.status&&e!==X)return lt(t,0===t.avail_out?$:Q);const i=a.last_flush;if(a.last_flush=e,0!==a.pending){if(ct(t),0===t.avail_out)return a.last_flush=-1,q}else if(0===t.avail_in&&ht(e)<=ht(i)&&e!==X)return lt(t,$);if(666===a.status&&0!==t.avail_in)return lt(t,$);if(42===a.status&&0===a.wrap&&(a.status=113),42===a.status){let e=ot+(a.w_bits-8<<4)<<8,i=-1;if(i=a.strategy>=at||a.level<2?0:a.level<6?1:6===a.level?2:3,e|=i<<6,0!==a.strstart&&(e|=32),e+=31-e%31,mt(a,e),0!==a.strstart&&(mt(a,t.adler>>>16),mt(a,65535&t.adler)),t.adler=1,a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q}if(57===a.status)if(t.adler=0,wt(a,31),wt(a,139),wt(a,8),a.gzhead)wt(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),wt(a,255&a.gzhead.time),wt(a,a.gzhead.time>>8&255),wt(a,a.gzhead.time>>16&255),wt(a,a.gzhead.time>>24&255),wt(a,9===a.level?2:a.strategy>=at||a.level<2?4:0),wt(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(wt(a,255&a.gzhead.extra.length),wt(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(t.adler=N(t.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69;else if(wt(a,0),wt(a,0),wt(a,0),wt(a,0),wt(a,0),wt(a,9===a.level?2:a.strategy>=at||a.level<2?4:0),wt(a,3),a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q;if(69===a.status){if(a.gzhead.extra){let e=a.pending,i=(65535&a.gzhead.extra.length)-a.gzindex;for(;a.pending+i>a.pending_buf_size;){let n=a.pending_buf_size-a.pending;if(a.pending_buf.set(a.gzhead.extra.subarray(a.gzindex,a.gzindex+n),a.pending),a.pending=a.pending_buf_size,a.gzhead.hcrc&&a.pending>e&&(t.adler=N(t.adler,a.pending_buf,a.pending-e,e)),a.gzindex+=n,ct(t),0!==a.pending)return a.last_flush=-1,q;e=0,i-=n}let n=new Uint8Array(a.gzhead.extra);a.pending_buf.set(n.subarray(a.gzindex,a.gzindex+i),a.pending),a.pending+=i,a.gzhead.hcrc&&a.pending>e&&(t.adler=N(t.adler,a.pending_buf,a.pending-e,e)),a.gzindex=0}a.status=73}if(73===a.status){if(a.gzhead.name){let e,i=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),ct(t),0!==a.pending)return a.last_flush=-1,q;i=0}e=a.gzindex<a.gzhead.name.length?255&a.gzhead.name.charCodeAt(a.gzindex++):0,wt(a,e)}while(0!==e);a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),a.gzindex=0}a.status=91}if(91===a.status){if(a.gzhead.comment){let e,i=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),ct(t),0!==a.pending)return a.last_flush=-1,q;i=0}e=a.gzindex<a.gzhead.comment.length?255&a.gzhead.comment.charCodeAt(a.gzindex++):0,wt(a,e)}while(0!==e);a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i))}a.status=103}if(103===a.status){if(a.gzhead.hcrc){if(a.pending+2>a.pending_buf_size&&(ct(t),0!==a.pending))return a.last_flush=-1,q;wt(a,255&t.adler),wt(a,t.adler>>8&255),t.adler=0}if(a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q}if(0!==t.avail_in||0!==a.lookahead||e!==P&&666!==a.status){let i=0===a.level?kt(a,e):a.strategy===at?((t,e)=>{let a;for(;;){if(0===t.lookahead&&(pt(t),0===t.lookahead)){if(e===P)return 1;break}if(t.match_length=0,a=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2})(a,e):a.strategy===it?((t,e)=>{let a,i,n,s;const r=t.window;for(;;){if(t.lookahead<=258){if(pt(t),t.lookahead<=258&&e===P)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=t.strstart-1,i=r[n],i===r[++n]&&i===r[++n]&&i===r[++n])){s=t.strstart+258;do{}while(i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&n<s);t.match_length=258-(s-n),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=j(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2})(a,e):zt[a.level].func(a,e);if(3!==i&&4!==i||(a.status=666),1===i||3===i)return 0===t.avail_out&&(a.last_flush=-1),q;if(2===i&&(e===Y?K(a):e!==W&&(H(a,0,0,!1),e===G&&(dt(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),ct(t),0===t.avail_out))return a.last_flush=-1,q}return e!==X?q:a.wrap<=0?J:(2===a.wrap?(wt(a,255&t.adler),wt(a,t.adler>>8&255),wt(a,t.adler>>16&255),wt(a,t.adler>>24&255),wt(a,255&t.total_in),wt(a,t.total_in>>8&255),wt(a,t.total_in>>16&255),wt(a,t.total_in>>24&255)):(mt(a,t.adler>>>16),mt(a,65535&t.adler)),ct(t),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?q:J)},deflateEnd:t=>{if(Et(t))return Q;const e=t.state.status;return t.state=null,113===e?lt(t,V):q},deflateSetDictionary:(t,e)=>{let a=e.length;if(Et(t))return Q;const i=t.state,n=i.wrap;if(2===n||1===n&&42!==i.status||i.lookahead)return Q;if(1===n&&(t.adler=F(t.adler,e,a,0)),i.wrap=0,a>=i.w_size){0===n&&(dt(i.head),i.strstart=0,i.block_start=0,i.insert=0);let t=new Uint8Array(i.w_size);t.set(e.subarray(a-i.w_size,a),0),e=t,a=i.w_size}const s=t.avail_in,r=t.next_in,o=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,pt(i);i.lookahead>=3;){let t=i.strstart,e=i.lookahead-2;do{i.ins_h=ft(i,i.ins_h,i.window[t+3-1]),i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++}while(--e);i.strstart=t,i.lookahead=2,pt(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=r,t.input=o,t.avail_in=s,i.wrap=n,q},deflateInfo:"pako deflate (from Nodeca project)"};const Dt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var Tt=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const a=e.shift();if(a){if("object"!=typeof a)throw new TypeError(a+"must be non-object");for(const e in a)Dt(a,e)&&(t[e]=a[e])}}return t},Ot=t=>{let e=0;for(let a=0,i=t.length;a<i;a++)e+=t[a].length;const a=new Uint8Array(e);for(let e=0,i=0,n=t.length;e<n;e++){let n=t[e];a.set(n,i),i+=n.length}return a};let Ft=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){Ft=!1}const Lt=new Uint8Array(256);for(let t=0;t<256;t++)Lt[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Lt[254]=Lt[254]=1;var Nt=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,i,n,s,r=t.length,o=0;for(n=0;n<r;n++)a=t.charCodeAt(n),55296==(64512&a)&&n+1<r&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(a=65536+(a-55296<<10)+(i-56320),n++)),o+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(o),s=0,n=0;s<o;n++)a=t.charCodeAt(n),55296==(64512&a)&&n+1<r&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(a=65536+(a-55296<<10)+(i-56320),n++)),a<128?e[s++]=a:a<2048?(e[s++]=192|a>>>6,e[s++]=128|63&a):a<65536?(e[s++]=224|a>>>12,e[s++]=128|a>>>6&63,e[s++]=128|63&a):(e[s++]=240|a>>>18,e[s++]=128|a>>>12&63,e[s++]=128|a>>>6&63,e[s++]=128|63&a);return e},It=(t,e)=>{const a=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let i,n;const s=new Array(2*a);for(n=0,i=0;i<a;){let e=t[i++];if(e<128){s[n++]=e;continue}let r=Lt[e];if(r>4)s[n++]=65533,i+=r-1;else{for(e&=2===r?31:3===r?15:7;r>1&&i<a;)e=e<<6|63&t[i++],r--;r>1?s[n++]=65533:e<65536?s[n++]=e:(e-=65536,s[n++]=55296|e>>10&1023,s[n++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&Ft)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let a="";for(let i=0;i<e;i++)a+=String.fromCharCode(t[i]);return a})(s,n)},Bt=(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let a=e-1;for(;a>=0&&128==(192&t[a]);)a--;return a<0||0===a?e:a+Lt[t[a]]>e?a:e};var Ct=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Ht=Object.prototype.toString,{Z_NO_FLUSH:Mt,Z_SYNC_FLUSH:jt,Z_FULL_FLUSH:Kt,Z_FINISH:Pt,Z_OK:Yt,Z_STREAM_END:Gt,Z_DEFAULT_COMPRESSION:Xt,Z_DEFAULT_STRATEGY:Wt,Z_DEFLATED:qt}=B;function Jt(t){this.options=Tt({level:Xt,method:qt,chunkSize:16384,windowBits:15,memLevel:8,strategy:Wt},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ct,this.strm.avail_out=0;let a=St.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==Yt)throw new Error(I[a]);if(e.header&&St.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?Nt(e.dictionary):"[object ArrayBuffer]"===Ht.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,a=St.deflateSetDictionary(this.strm,t),a!==Yt)throw new Error(I[a]);this._dict_set=!0}}function Qt(t,e){const a=new Jt(e);if(a.push(t,!0),a.err)throw a.msg||I[a.err];return a.result}Jt.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize;let n,s;if(this.ended)return!1;for(s=e===~~e?e:!0===e?Pt:Mt,"string"==typeof t?a.input=Nt(t):"[object ArrayBuffer]"===Ht.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;)if(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),(s===jt||s===Kt)&&a.avail_out<=6)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else{if(n=St.deflate(a,s),n===Gt)return a.next_out>0&&this.onData(a.output.subarray(0,a.next_out)),n=St.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Yt;if(0!==a.avail_out){if(s>0&&a.next_out>0)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else if(0===a.avail_in)break}else this.onData(a.output)}return!0},Jt.prototype.onData=function(t){this.chunks.push(t)},Jt.prototype.onEnd=function(t){t===Yt&&(this.result=Ot(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Vt={Deflate:Jt,deflate:Qt,deflateRaw:function(t,e){return(e=e||{}).raw=!0,Qt(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,Qt(t,e)},constants:B};var $t=function(t,e){let a,i,n,s,r,o,l,h,d,_,f,c,u,w,m,b,g,p,k,v,y,x,z,A;const E=t.state;a=t.next_in,z=t.input,i=a+(t.avail_in-5),n=t.next_out,A=t.output,s=n-(e-t.avail_out),r=n+(t.avail_out-257),o=E.dmax,l=E.wsize,h=E.whave,d=E.wnext,_=E.window,f=E.hold,c=E.bits,u=E.lencode,w=E.distcode,m=(1<<E.lenbits)-1,b=(1<<E.distbits)-1;t:do{c<15&&(f+=z[a++]<<c,c+=8,f+=z[a++]<<c,c+=8),g=u[f&m];e:for(;;){if(p=g>>>24,f>>>=p,c-=p,p=g>>>16&255,0===p)A[n++]=65535&g;else{if(!(16&p)){if(0==(64&p)){g=u[(65535&g)+(f&(1<<p)-1)];continue e}if(32&p){E.mode=16191;break t}t.msg="invalid literal/length code",E.mode=16209;break t}k=65535&g,p&=15,p&&(c<p&&(f+=z[a++]<<c,c+=8),k+=f&(1<<p)-1,f>>>=p,c-=p),c<15&&(f+=z[a++]<<c,c+=8,f+=z[a++]<<c,c+=8),g=w[f&b];a:for(;;){if(p=g>>>24,f>>>=p,c-=p,p=g>>>16&255,!(16&p)){if(0==(64&p)){g=w[(65535&g)+(f&(1<<p)-1)];continue a}t.msg="invalid distance code",E.mode=16209;break t}if(v=65535&g,p&=15,c<p&&(f+=z[a++]<<c,c+=8,c<p&&(f+=z[a++]<<c,c+=8)),v+=f&(1<<p)-1,v>o){t.msg="invalid distance too far back",E.mode=16209;break t}if(f>>>=p,c-=p,p=n-s,v>p){if(p=v-p,p>h&&E.sane){t.msg="invalid distance too far back",E.mode=16209;break t}if(y=0,x=_,0===d){if(y+=l-p,p<k){k-=p;do{A[n++]=_[y++]}while(--p);y=n-v,x=A}}else if(d<p){if(y+=l+d-p,p-=d,p<k){k-=p;do{A[n++]=_[y++]}while(--p);if(y=0,d<k){p=d,k-=p;do{A[n++]=_[y++]}while(--p);y=n-v,x=A}}}else if(y+=d-p,p<k){k-=p;do{A[n++]=_[y++]}while(--p);y=n-v,x=A}for(;k>2;)A[n++]=x[y++],A[n++]=x[y++],A[n++]=x[y++],k-=3;k&&(A[n++]=x[y++],k>1&&(A[n++]=x[y++]))}else{y=n-v;do{A[n++]=A[y++],A[n++]=A[y++],A[n++]=A[y++],k-=3}while(k>2);k&&(A[n++]=A[y++],k>1&&(A[n++]=A[y++]))}break}}break}}while(a<i&&n<r);k=c>>3,a-=k,c-=k<<3,f&=(1<<c)-1,t.next_in=a,t.next_out=n,t.avail_in=a<i?i-a+5:5-(a-i),t.avail_out=n<r?r-n+257:257-(n-r),E.hold=f,E.bits=c};const te=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),ee=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),ae=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),ie=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var ne=(t,e,a,i,n,s,r,o)=>{const l=o.bits;let h,d,_,f,c,u,w=0,m=0,b=0,g=0,p=0,k=0,v=0,y=0,x=0,z=0,A=null;const E=new Uint16Array(16),R=new Uint16Array(16);let Z,U,S,D=null;for(w=0;w<=15;w++)E[w]=0;for(m=0;m<i;m++)E[e[a+m]]++;for(p=l,g=15;g>=1&&0===E[g];g--);if(p>g&&(p=g),0===g)return n[s++]=20971520,n[s++]=20971520,o.bits=1,0;for(b=1;b<g&&0===E[b];b++);for(p<b&&(p=b),y=1,w=1;w<=15;w++)if(y<<=1,y-=E[w],y<0)return-1;if(y>0&&(0===t||1!==g))return-1;for(R[1]=0,w=1;w<15;w++)R[w+1]=R[w]+E[w];for(m=0;m<i;m++)0!==e[a+m]&&(r[R[e[a+m]]++]=m);if(0===t?(A=D=r,u=20):1===t?(A=te,D=ee,u=257):(A=ae,D=ie,u=0),z=0,m=0,w=b,c=s,k=p,v=0,_=-1,x=1<<p,f=x-1,1===t&&x>852||2===t&&x>592)return 1;for(;;){Z=w-v,r[m]+1<u?(U=0,S=r[m]):r[m]>=u?(U=D[r[m]-u],S=A[r[m]-u]):(U=96,S=0),h=1<<w-v,d=1<<k,b=d;do{d-=h,n[c+(z>>v)+d]=Z<<24|U<<16|S|0}while(0!==d);for(h=1<<w-1;z&h;)h>>=1;if(0!==h?(z&=h-1,z+=h):z=0,m++,0==--E[w]){if(w===g)break;w=e[a+r[m]]}if(w>p&&(z&f)!==_){for(0===v&&(v=p),c+=b,k=w-v,y=1<<k;k+v<g&&(y-=E[k+v],!(y<=0));)k++,y<<=1;if(x+=1<<k,1===t&&x>852||2===t&&x>592)return 1;_=z&f,n[_]=p<<24|k<<16|c-s|0}}return 0!==z&&(n[c+z]=w-v<<24|64<<16|0),o.bits=p,0};const{Z_FINISH:se,Z_BLOCK:re,Z_TREES:oe,Z_OK:le,Z_STREAM_END:he,Z_NEED_DICT:de,Z_STREAM_ERROR:_e,Z_DATA_ERROR:fe,Z_MEM_ERROR:ce,Z_BUF_ERROR:ue,Z_DEFLATED:we}=B,me=16209,be=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function ge(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const pe=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<16180||e.mode>16211?1:0},ke=t=>{if(pe(t))return _e;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=16180,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,le},ve=t=>{if(pe(t))return _e;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,ke(t)},ye=(t,e)=>{let a;if(pe(t))return _e;const i=t.state;return e<0?(a=0,e=-e):(a=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?_e:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=a,i.wbits=e,ve(t))},xe=(t,e)=>{if(!t)return _e;const a=new ge;t.state=a,a.strm=t,a.window=null,a.mode=16180;const i=ye(t,e);return i!==le&&(t.state=null),i};let ze,Ae,Ee=!0;const Re=t=>{if(Ee){ze=new Int32Array(512),Ae=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(ne(1,t.lens,0,288,ze,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;ne(2,t.lens,0,32,Ae,0,t.work,{bits:5}),Ee=!1}t.lencode=ze,t.lenbits=9,t.distcode=Ae,t.distbits=5},Ze=(t,e,a,i)=>{let n;const s=t.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new Uint8Array(s.wsize)),i>=s.wsize?(s.window.set(e.subarray(a-s.wsize,a),0),s.wnext=0,s.whave=s.wsize):(n=s.wsize-s.wnext,n>i&&(n=i),s.window.set(e.subarray(a-i,a-i+n),s.wnext),(i-=n)?(s.window.set(e.subarray(a-i,a),0),s.wnext=i,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=n))),0};var Ue={inflateReset:ve,inflateReset2:ye,inflateResetKeep:ke,inflateInit:t=>xe(t,15),inflateInit2:xe,inflate:(t,e)=>{let a,i,n,s,r,o,l,h,d,_,f,c,u,w,m,b,g,p,k,v,y,x,z=0;const A=new Uint8Array(4);let E,R;const Z=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(pe(t)||!t.output||!t.input&&0!==t.avail_in)return _e;a=t.state,16191===a.mode&&(a.mode=16192),r=t.next_out,n=t.output,l=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,_=o,f=l,x=le;t:for(;;)switch(a.mode){case 16180:if(0===a.wrap){a.mode=16192;break}for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(2&a.wrap&&35615===h){0===a.wbits&&(a.wbits=15),a.check=0,A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0),h=0,d=0,a.mode=16181;break}if(a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",a.mode=me;break}if((15&h)!==we){t.msg="unknown compression method",a.mode=me;break}if(h>>>=4,d-=4,y=8+(15&h),0===a.wbits&&(a.wbits=y),y>15||y>a.wbits){t.msg="invalid window size",a.mode=me;break}a.dmax=1<<a.wbits,a.flags=0,t.adler=a.check=1,a.mode=512&h?16189:16191,h=0,d=0;break;case 16181:for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(a.flags=h,(255&a.flags)!==we){t.msg="unknown compression method",a.mode=me;break}if(57344&a.flags){t.msg="unknown header flags set",a.mode=me;break}a.head&&(a.head.text=h>>8&1),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0,a.mode=16182;case 16182:for(;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.head&&(a.head.time=h),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,A[2]=h>>>16&255,A[3]=h>>>24&255,a.check=N(a.check,A,4,0)),h=0,d=0,a.mode=16183;case 16183:for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.head&&(a.head.xflags=255&h,a.head.os=h>>8),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0,a.mode=16184;case 16184:if(1024&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.length=h,a.head&&(a.head.extra_len=h),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0}else a.head&&(a.head.extra=null);a.mode=16185;case 16185:if(1024&a.flags&&(c=a.length,c>o&&(c=o),c&&(a.head&&(y=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Uint8Array(a.head.extra_len)),a.head.extra.set(i.subarray(s,s+c),y)),512&a.flags&&4&a.wrap&&(a.check=N(a.check,i,c,s)),o-=c,s+=c,a.length-=c),a.length))break t;a.length=0,a.mode=16186;case 16186:if(2048&a.flags){if(0===o)break t;c=0;do{y=i[s+c++],a.head&&y&&a.length<65536&&(a.head.name+=String.fromCharCode(y))}while(y&&c<o);if(512&a.flags&&4&a.wrap&&(a.check=N(a.check,i,c,s)),o-=c,s+=c,y)break t}else a.head&&(a.head.name=null);a.length=0,a.mode=16187;case 16187:if(4096&a.flags){if(0===o)break t;c=0;do{y=i[s+c++],a.head&&y&&a.length<65536&&(a.head.comment+=String.fromCharCode(y))}while(y&&c<o);if(512&a.flags&&4&a.wrap&&(a.check=N(a.check,i,c,s)),o-=c,s+=c,y)break t}else a.head&&(a.head.comment=null);a.mode=16188;case 16188:if(512&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(4&a.wrap&&h!==(65535&a.check)){t.msg="header crc mismatch",a.mode=me;break}h=0,d=0}a.head&&(a.head.hcrc=a.flags>>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=16191;break;case 16189:for(;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}t.adler=a.check=be(h),h=0,d=0,a.mode=16190;case 16190:if(0===a.havedict)return t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,de;t.adler=a.check=1,a.mode=16191;case 16191:if(e===re||e===oe)break t;case 16192:if(a.last){h>>>=7&d,d-=7&d,a.mode=16206;break}for(;d<3;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}switch(a.last=1&h,h>>>=1,d-=1,3&h){case 0:a.mode=16193;break;case 1:if(Re(a),a.mode=16199,e===oe){h>>>=2,d-=2;break t}break;case 2:a.mode=16196;break;case 3:t.msg="invalid block type",a.mode=me}h>>>=2,d-=2;break;case 16193:for(h>>>=7&d,d-=7&d;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if((65535&h)!=(h>>>16^65535)){t.msg="invalid stored block lengths",a.mode=me;break}if(a.length=65535&h,h=0,d=0,a.mode=16194,e===oe)break t;case 16194:a.mode=16195;case 16195:if(c=a.length,c){if(c>o&&(c=o),c>l&&(c=l),0===c)break t;n.set(i.subarray(s,s+c),r),o-=c,s+=c,l-=c,r+=c,a.length-=c;break}a.mode=16191;break;case 16196:for(;d<14;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(a.nlen=257+(31&h),h>>>=5,d-=5,a.ndist=1+(31&h),h>>>=5,d-=5,a.ncode=4+(15&h),h>>>=4,d-=4,a.nlen>286||a.ndist>30){t.msg="too many length or distance symbols",a.mode=me;break}a.have=0,a.mode=16197;case 16197:for(;a.have<a.ncode;){for(;d<3;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.lens[Z[a.have++]]=7&h,h>>>=3,d-=3}for(;a.have<19;)a.lens[Z[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,E={bits:a.lenbits},x=ne(0,a.lens,0,19,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid code lengths set",a.mode=me;break}a.have=0,a.mode=16198;case 16198:for(;a.have<a.nlen+a.ndist;){for(;z=a.lencode[h&(1<<a.lenbits)-1],m=z>>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(g<16)h>>>=m,d-=m,a.lens[a.have++]=g;else{if(16===g){for(R=m+2;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(h>>>=m,d-=m,0===a.have){t.msg="invalid bit length repeat",a.mode=me;break}y=a.lens[a.have-1],c=3+(3&h),h>>>=2,d-=2}else if(17===g){for(R=m+3;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=m,d-=m,y=0,c=3+(7&h),h>>>=3,d-=3}else{for(R=m+7;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=m,d-=m,y=0,c=11+(127&h),h>>>=7,d-=7}if(a.have+c>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=me;break}for(;c--;)a.lens[a.have++]=y}}if(a.mode===me)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=me;break}if(a.lenbits=9,E={bits:a.lenbits},x=ne(1,a.lens,0,a.nlen,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid literal/lengths set",a.mode=me;break}if(a.distbits=6,a.distcode=a.distdyn,E={bits:a.distbits},x=ne(2,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,E),a.distbits=E.bits,x){t.msg="invalid distances set",a.mode=me;break}if(a.mode=16199,e===oe)break t;case 16199:a.mode=16200;case 16200:if(o>=6&&l>=258){t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,$t(t,f),r=t.next_out,n=t.output,l=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,16191===a.mode&&(a.back=-1);break}for(a.back=0;z=a.lencode[h&(1<<a.lenbits)-1],m=z>>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(b&&0==(240&b)){for(p=m,k=b,v=g;z=a.lencode[v+((h&(1<<p+k)-1)>>p)],m=z>>>24,b=z>>>16&255,g=65535&z,!(p+m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,a.length=g,0===b){a.mode=16205;break}if(32&b){a.back=-1,a.mode=16191;break}if(64&b){t.msg="invalid literal/length code",a.mode=me;break}a.extra=15&b,a.mode=16201;case 16201:if(a.extra){for(R=a.extra;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.length+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=16202;case 16202:for(;z=a.distcode[h&(1<<a.distbits)-1],m=z>>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(0==(240&b)){for(p=m,k=b,v=g;z=a.distcode[v+((h&(1<<p+k)-1)>>p)],m=z>>>24,b=z>>>16&255,g=65535&z,!(p+m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,64&b){t.msg="invalid distance code",a.mode=me;break}a.offset=g,a.extra=15&b,a.mode=16203;case 16203:if(a.extra){for(R=a.extra;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.offset+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=me;break}a.mode=16204;case 16204:if(0===l)break t;if(c=f-l,a.offset>c){if(c=a.offset-c,c>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=me;break}c>a.wnext?(c-=a.wnext,u=a.wsize-c):u=a.wnext-c,c>a.length&&(c=a.length),w=a.window}else w=n,u=r-a.offset,c=a.length;c>l&&(c=l),l-=c,a.length-=c;do{n[r++]=w[u++]}while(--c);0===a.length&&(a.mode=16200);break;case 16205:if(0===l)break t;n[r++]=a.length,l--,a.mode=16200;break;case 16206:if(a.wrap){for(;d<32;){if(0===o)break t;o--,h|=i[s++]<<d,d+=8}if(f-=l,t.total_out+=f,a.total+=f,4&a.wrap&&f&&(t.adler=a.check=a.flags?N(a.check,n,f,r-f):F(a.check,n,f,r-f)),f=l,4&a.wrap&&(a.flags?h:be(h))!==a.check){t.msg="incorrect data check",a.mode=me;break}h=0,d=0}a.mode=16207;case 16207:if(a.wrap&&a.flags){for(;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(4&a.wrap&&h!==(4294967295&a.total)){t.msg="incorrect length check",a.mode=me;break}h=0,d=0}a.mode=16208;case 16208:x=he;break t;case me:x=fe;break t;case 16210:return ce;default:return _e}return t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,(a.wsize||f!==t.avail_out&&a.mode<me&&(a.mode<16206||e!==se))&&Ze(t,t.output,t.next_out,f-t.avail_out),_-=t.avail_in,f-=t.avail_out,t.total_in+=_,t.total_out+=f,a.total+=f,4&a.wrap&&f&&(t.adler=a.check=a.flags?N(a.check,n,f,t.next_out-f):F(a.check,n,f,t.next_out-f)),t.data_type=a.bits+(a.last?64:0)+(16191===a.mode?128:0)+(16199===a.mode||16194===a.mode?256:0),(0===_&&0===f||e===se)&&x===le&&(x=ue),x},inflateEnd:t=>{if(pe(t))return _e;let e=t.state;return e.window&&(e.window=null),t.state=null,le},inflateGetHeader:(t,e)=>{if(pe(t))return _e;const a=t.state;return 0==(2&a.wrap)?_e:(a.head=e,e.done=!1,le)},inflateSetDictionary:(t,e)=>{const a=e.length;let i,n,s;return pe(t)?_e:(i=t.state,0!==i.wrap&&16190!==i.mode?_e:16190===i.mode&&(n=1,n=F(n,e,a,0),n!==i.check)?fe:(s=Ze(t,e,a,a),s?(i.mode=16210,ce):(i.havedict=1,le)))},inflateInfo:"pako inflate (from Nodeca project)"};var Se=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const De=Object.prototype.toString,{Z_NO_FLUSH:Te,Z_FINISH:Oe,Z_OK:Fe,Z_STREAM_END:Le,Z_NEED_DICT:Ne,Z_STREAM_ERROR:Ie,Z_DATA_ERROR:Be,Z_MEM_ERROR:Ce}=B;function He(t){this.options=Tt({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ct,this.strm.avail_out=0;let a=Ue.inflateInit2(this.strm,e.windowBits);if(a!==Fe)throw new Error(I[a]);if(this.header=new Se,Ue.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=Nt(e.dictionary):"[object ArrayBuffer]"===De.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(a=Ue.inflateSetDictionary(this.strm,e.dictionary),a!==Fe)))throw new Error(I[a])}He.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize,n=this.options.dictionary;let s,r,o;if(this.ended)return!1;for(r=e===~~e?e:!0===e?Oe:Te,"[object ArrayBuffer]"===De.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;){for(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),s=Ue.inflate(a,r),s===Ne&&n&&(s=Ue.inflateSetDictionary(a,n),s===Fe?s=Ue.inflate(a,r):s===Be&&(s=Ne));a.avail_in>0&&s===Le&&a.state.wrap>0&&0!==t[a.next_in];)Ue.inflateReset(a),s=Ue.inflate(a,r);switch(s){case Ie:case Be:case Ne:case Ce:return this.onEnd(s),this.ended=!0,!1}if(o=a.avail_out,a.next_out&&(0===a.avail_out||s===Le))if("string"===this.options.to){let t=Bt(a.output,a.next_out),e=a.next_out-t,n=It(a.output,t);a.next_out=e,a.avail_out=i-e,e&&a.output.set(a.output.subarray(t,t+e),0),this.onData(n)}else this.onData(a.output.length===a.next_out?a.output:a.output.subarray(0,a.next_out));if(s!==Fe||0!==o){if(s===Le)return s=Ue.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===a.avail_in)break}}return!0},He.prototype.onData=function(t){this.chunks.push(t)},He.prototype.onEnd=function(t){t===Fe&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Ot(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};const{Deflate:Me,deflate:je,deflateRaw:Ke,gzip:Pe}=Vt;var Ye=Me,Ge=je,Xe=B;const We=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const e=this._hasEvents?",":"";this.deflate.push(e+t,Xe.Z_SYNC_FLUSH),this._hasEvents=!0}finish(){if(this.deflate.push("]",Xe.Z_FINISH),this.deflate.err)throw this.deflate.err;const t=this.deflate.result;return this._init(),t}_init(){this._hasEvents=!1,this.deflate=new Ye,this.deflate.push("[",Xe.Z_NO_FLUSH)}},qe={clear:()=>{We.clear()},addEvent:t=>We.addEvent(t),finish:()=>We.finish(),compress:t=>function(t){return Ge(t)}(t)};addEventListener("message",(function(t){const e=t.data.method,a=t.data.id,i=t.data.arg;if(e in qe&&"function"==typeof qe[e])try{const t=qe[e](i);postMessage({id:a,method:e,success:!0,response:t})}catch(t){postMessage({id:a,method:e,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});']);return URL.createObjectURL(t)}();("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("[Replay] Using compression worker");const e=new Worker(t);return new Ja(e)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("[Replay] Failed to create compression worker")}return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("[Replay] Using simple buffer"),new qa}({useCompression:this._options.useCompression}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this.startRecording()}_handleException(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error("[Replay]",t),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&this._options._experiments&&this._options._experiments.captureExceptions&&Ar(t)}_loadAndCheckSession(){const{type:t,session:e}=io({timeouts:this.timeouts,stickySession:Boolean(this._options.stickySession),currentSession:this.session,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:this._options.errorSampleRate>0});"new"===t&&this.setInitialState();const n=this.getSessionId();return e.id!==n&&(e.previousSessionId=n),this.session=e,!!this.session.sampled||(this.stop("session unsampled"),!1)}_addListeners(){try{ts.document.addEventListener("visibilitychange",this._handleVisibilityChange),ts.addEventListener("blur",this._handleWindowBlur),ts.addEventListener("focus",this._handleWindowFocus),ts.addEventListener("keydown",this._handleKeyboardEvent),this._hasInitializedCoreListeners||(function(t){const e=fr().getScope(),n=fr().getClient();e&&e.addScopeListener((t=>e=>{if(!t.isEnabled())return;const n=function(t){const e=t.getLastBreadcrumb&&t.getLastBreadcrumb();return Po!==e&&e?(Po=e,e.category&&(["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui."))?null:"console"===e.category?function(t){const e=t.data&&t.data.arguments;if(!Array.isArray(e)||0===e.length)return Pa(t);let n=!1;const r=e.map(t=>{if(!t)return t;if("string"==typeof t)return t.length>is?(n=!0,`${t.slice(0,is)}…`):t;if("object"==typeof t)try{const e=wn(t,7),r=JSON.stringify(e);if(r.length>is){const t=ko(r.slice(0,is)),e=JSON.parse(t);return n=!0,e}return e}catch(t){}return t});return Pa({...t,data:{...t.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(e):Pa(e)):null}(e);n&&Ga(t,n)})(t)),en("dom",(t=>e=>{if(!t.isEnabled())return;const n=function(t){const{target:e,message:n}=function(t){const e="click"===t.name;let n,r=null;try{r=e?function(t){const e=ja(t);return e&&e instanceof Element&&e.closest("button,a")||e}(t.event):ja(t.event),n=ve(r,{maxStringLength:200})||"<unknown>"}catch(t){n="<unknown>"}return{target:r,message:n}}(t);return Pa({category:`ui.${t.name}`,...Fa(e,n)})}(e);n&&Ga(t,n)})(t)),en("history",function(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{from:e,to:n}=t,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:e}}}(e);null!==n&&(t.getContext().urls.push(n.name),t.triggerUserActivity(),t.addUpdate(()=>(co(t,[n]),!1)))}}(t)),function(t){const e=fr().getClient();try{const n=new TextEncoder,{networkDetailAllowUrls:r,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:a}=t.getOptions(),o={replay:t,textEncoder:n,networkDetailAllowUrls:r,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:a};e&&e.on?e.on("beforeAddBreadcrumb",(t,e)=>function(t,e,n){if(e.data)try{(function(t){return"xhr"===t.category})(e)&&function(t){return t&&t.xhr}(n)&&(function(t,e,n){const{xhr:r,input:i}=e,s=To(i,n.textEncoder),a=r.getResponseHeader("content-length")?Co(r.getResponseHeader("content-length")):To(r.response,n.textEncoder);void 0!==s&&(t.data.request_body_size=s),void 0!==a&&(t.data.response_body_size=a)}(e,n,t),async function(t,e,n){try{const r=function(t,e,n){const{startTimestamp:r,endTimestamp:i,input:s,xhr:a}=e,{url:o,method:c,status_code:l=0,request_body_size:u,response_body_size:d}=t.data;if(!o)return null;if(!Uo(o,n.networkDetailAllowUrls))return{startTimestamp:r,endTimestamp:i,url:o,method:c,statusCode:l,request:Do(u),response:Do(d)};const p=a[Xe],h=p?No(p.request_headers,n.networkRequestHeaders):{},f=No(function(t){const e=t.getAllResponseHeaders();return e?e.split("\r\n").reduce((t,e)=>{const[n,r]=e.split(": ");return t[n.toLowerCase()]=r,t},{}):{}}(a),n.networkResponseHeaders);return{startTimestamp:r,endTimestamp:i,url:o,method:c,statusCode:l,request:Io(h,u,n.networkCaptureBodies?xo(s):void 0),response:Io(f,d,n.networkCaptureBodies?e.xhr.responseText:void 0)}}(t,e,n),i=Ro("resource.xhr",r);lo(n.replay,i)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error("[Replay] Failed to capture fetch breadcrumb",t)}}(e,n,t)),function(t){return"fetch"===t.category}(e)&&function(t){return t&&t.response}(n)&&(function(t,e,n){const{input:r,response:i}=e,s=To(Ao(r),n.textEncoder),a=i?Co(i.headers.get("content-length")):void 0;void 0!==s&&(t.data.request_body_size=s),void 0!==a&&(t.data.response_body_size=a)}(e,n,t),async function(t,e,n){try{const r=await async function(t,e,n){const{startTimestamp:r,endTimestamp:i}=e,{url:s,method:a,status_code:o=0,request_body_size:c,response_body_size:l}=t.data,u=Uo(s,n.networkDetailAllowUrls),d=u?function({networkCaptureBodies:t,networkRequestHeaders:e},n,r){var i,s;return Io((s=e,1===(i=n).length&&"string"!=typeof i[0]?Mo(i[0],s):2===i.length?Mo(i[1],s):{}),r,t?xo(Ao(n)):void 0)}(n,e.input,c):Do(c),p=await async function(t,{networkCaptureBodies:e,textEncoder:n,networkResponseHeaders:r},i,s){if(!t&&void 0!==s)return Do(s);const a=Bo(i.headers,r);if(!e&&void 0!==s)return Io(a,s,void 0);try{const r=i.clone(),o=await async function(t){try{return await t.text()}catch(t){return}}(r),c=o&&o.length&&void 0===s?To(o,n):s;return t?Io(a,c,e?o:void 0):Do(c)}catch(t){return Io(a,s,void 0)}}(u,n,e.response,l);return{startTimestamp:r,endTimestamp:i,url:s,method:a,statusCode:o,request:d,response:p}}(t,e,n),i=Ro("resource.fetch",r);lo(n.replay,i)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error("[Replay] Failed to capture fetch breadcrumb",t)}}(e,n,t))}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn("Error when enriching network breadcrumb")}}(o,t,e)):(en("fetch",function(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{startTimestamp:e,endTimestamp:n,fetchData:r,response:i}=t;if(!n)return null;const{method:s,url:a}=r;return{type:"resource.fetch",start:e/1e3,end:n/1e3,name:a,data:{method:s,statusCode:i&&i.status}}}(e);lo(t,n)}}(t)),en("xhr",function(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{startTimestamp:e,endTimestamp:n,xhr:r}=t,i=r[Xe];if(!e||!n||!i)return null;const{method:s,url:a,status_code:o}=i;return void 0===a?null:{type:"resource.xhr",name:a,start:e/1e3,end:n/1e3,data:{method:s,statusCode:o}}}(e);lo(t,n)}}(t)))}catch(t){}}(t),cr(function(t,e=!1){const n=e?oo(t):void 0;return(e,r)=>{if(function(t){return"replay_event"===t.type}(e))return delete e.breadcrumbs,e;if(!so(e)&&!ao(e))return e;if(function(t,e){return!(t.type||!t.exception||!t.exception.values||!t.exception.values.length)&&(!(!e.originalException||!e.originalException.__rrweb__)||t.exception.values.some(t=>!!(t.stacktrace&&t.stacktrace.frames&&t.stacktrace.frames.length)&&t.stacktrace.frames.some(t=>t.filename&&t.filename.includes("/rrweb/src/"))))}(e,r)&&!t.getOptions()._experiments.captureExceptions)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("[Replay] Ignoring error from rrweb internals",e),null;const i=function(t,e){return"buffer"===t.recordingMode&&e.message!==ns&&!(!e.exception||e.type)&&to(t.getOptions().errorSampleRate)}(t,e);if((i||"session"===t.recordingMode)&&(e.tags={...e.tags,replayId:t.getSessionId()}),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&t.getOptions()._experiments.traceInternals&&so(e)){const t=function(t){return{type:"Unknown",value:"n/a",...t.exception&&t.exception.values&&t.exception.values[0]}}(e);!function(t){const{category:e,level:n,message:r,...i}=t;var s;s={category:e||"console",level:n||"debug",message:`[debug]: ${r}`,...i},fr().addBreadcrumb(s)}({message:`Tagging event (${e.event_id}) - ${e.message} - ${t.type}: ${t.value}`})}return n&&n(e,{statusCode:200}),e}}(t,!Lo(n))),Lo(n)&&(n.on("afterSendEvent",oo(t)),n.on("createDsc",e=>{const n=t.getSessionId();n&&t.isEnabled()&&"session"===t.recordingMode&&(e.replay_id=n)}))}(this),this._hasInitializedCoreListeners=!0)}catch(t){this._handleException(t)}"PerformanceObserver"in ts&&(this._performanceObserver=function(t){const e=new PerformanceObserver(e=>{const n=function(t,e){const[n,r,i]=t.reduce((t,e)=>("navigation"===e.entryType?t[0].push(e):"largest-contentful-paint"===e.entryType?t[1].push(e):t[2].push(e),t),[[],[],[]]),s=[],a=[];let o=r.length?r[r.length-1]:void 0;return e.forEach(t=>{if("largest-contentful-paint"!==t.entryType)if("navigation"!==t.entryType)s.push(t);else{const e=t;t.duration>0&&!n.find(Za(e))&&!a.find(Za(e))&&a.push(e)}else(!o||o.startTime<t.startTime)&&(o=t)}),[...o?[o]:[],...n,...i,...s,...a].sort((t,e)=>t.startTime-e.startTime)}(t.performanceEvents,e.getEntries());t.performanceEvents=n});return["element","event","first-input","largest-contentful-paint","layout-shift","longtask","navigation","paint","resource"].forEach(t=>{try{e.observe({type:t,buffered:!0})}catch(t){}}),e}(this))}_removeListeners(){try{ts.document.removeEventListener("visibilitychange",this._handleVisibilityChange),ts.removeEventListener("blur",this._handleWindowBlur),ts.removeEventListener("focus",this._handleWindowFocus),ts.removeEventListener("keydown",this._handleKeyboardEvent),this._performanceObserver&&(this._performanceObserver.disconnect(),this._performanceObserver=null)}catch(t){this._handleException(t)}}__init13(){this._handleVisibilityChange=()=>{"visible"===ts.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init14(){this._handleWindowBlur=()=>{const t=Pa({category:"ui.blur"});this._doChangeToBackgroundTasks(t)}}__init15(){this._handleWindowFocus=()=>{const t=Pa({category:"ui.focus"});this._doChangeToForegroundTasks(t)}}__init16(){this._handleKeyboardEvent=t=>{!function(t,e){if(!t.isEnabled())return;t.triggerUserActivity();const n=function(t){const{metaKey:e,shiftKey:n,ctrlKey:r,altKey:i,key:s,target:a}=t;if(!a||function(t){return"INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable}(a))return null;if(!(e||r||i)&&1===s.length)return null;const o=ve(a,{maxStringLength:200})||"<unknown>";return Pa({category:"ui.keyDown",message:o,data:{...Fa(a,o).data,metaKey:e,shiftKey:n,ctrlKey:r,altKey:i,key:s}})}(e);n&&Ga(t,n)}(this,t)}}_doChangeToBackgroundTasks(t){if(!this.session)return;const e=Qa(this.session,this.timeouts);t&&!e&&this._createCustomBreadcrumb(t),this._conditionalFlush()}_doChangeToForegroundTasks(t){this.session&&(this.checkAndHandleExpiredSession()?t&&this._createCustomBreadcrumb(t):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("[Replay] Document has become active, but session has expired"))}_triggerFullSnapshot(t=!0){try{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("[Replay] Taking full rrweb snapshot"),Ma.takeFullSnapshot(t)}catch(t){this._handleException(t)}}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{za(this,{type:As.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){const t=[...this.performanceEvents];return this.performanceEvents=[],Promise.all(co(this,function(t){return t.map(Go).filter(Boolean)}(t)))}_conditionalFlush(){"buffer"!==this.recordingMode&&this.flushImmediate()}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:e}=this;if(!t||!e)return;if(t.segmentId)return;const n=e.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){if(this.session&&this.eventBuffer){if(await this._addPerformanceEntries(),this.eventBuffer&&this.eventBuffer.hasEvents&&(await async function(t){try{return Promise.all(co(t,[Ho(ts.performance.memory)]))}catch(t){return[]}}(this),this.eventBuffer))try{this._updateInitialTimestampFromEventBuffer();const t=await this.eventBuffer.finish(),e=this.session.id,n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession(),await Vo({replayId:e,recordingData:t,segmentId:r,eventContext:n,session:this.session,options:this.getOptions(),timestamp:Date.now()})}catch(t){this._handleException(t),this.stop("sendReplay");const e=fr().getClient();e&&e.recordDroppedEvent("send_error","replay")}}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error("[Replay] No session or eventBuffer found to flush.")}__init17(){this._flush=async({force:t=!1}={})=>{if(this._isEnabled||t)if(this.checkAndHandleExpiredSession())if(this.session){if(this._debouncedFlush.cancel(),!this._flushLock)return this._flushLock=this._runFlush(),await this._flushLock,void(this._flushLock=null);try{await this._flushLock}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error(t)}finally{this._debouncedFlush()}}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error("[Replay] No session found to flush.");else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error("[Replay] Attempting to finish replay event after session expired.")}}_maybeSaveSession(){this.session&&this._options.stickySession&&eo(this.session)}__init18(){this._onMutationHandler=t=>{const e=t.length,n=this._options._experiments.mutationLimit||0,r=n&&e>n;if(e>(this._options._experiments.mutationBreadcrumbLimit||1e3)||r){const t=Pa({category:"replay.mutations",data:{count:e}});this._createCustomBreadcrumb(t)}return!r||(this._triggerFullSnapshot(!1),!1)}}}function qo(t,e,n,r){const i=[...t,..."string"==typeof r?r.split(","):[],...e];return void 0!==n&&("string"==typeof n&&i.push(`.${n}`),console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")),i.join(",")}function Wo({mask:t,unmask:e,block:n,unblock:r,ignore:i,blockClass:s,blockSelector:a,maskTextClass:o,maskTextSelector:c,ignoreClass:l}){const u=qo(t,[".sentry-mask","[data-sentry-mask]"],o,c),d=qo(e,[".sentry-unmask","[data-sentry-unmask]"]),p={maskTextSelector:u,unmaskTextSelector:d,maskInputSelector:u,unmaskInputSelector:d,blockSelector:qo(n,[".sentry-block","[data-sentry-block]",'base[href="/"]'],s,a),unblockSelector:qo(r,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:qo(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],l)};return s instanceof RegExp&&(p.blockClass=s),o instanceof RegExp&&(p.maskTextClass=o),p}function Ko(){return"undefined"!=typeof window&&(!bn()||"undefined"!=typeof process&&"renderer"===process.type)}const Jo='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',Xo=["content-length","content-type","accept"];let Qo=!1;class tc{static __initStatic(){this.id="Replay"}__init(){this.name=tc.id}constructor({flushMinDelay:t=5e3,flushMaxDelay:e=5500,stickySession:n=!0,useCompression:r=!0,_experiments:i={},sessionSampleRate:s,errorSampleRate:a,maskAllText:o=!0,maskAllInputs:c=!0,blockAllMedia:l=!0,networkDetailAllowUrls:u=[],networkCaptureBodies:d=!0,networkRequestHeaders:p=[],networkResponseHeaders:h=[],mask:f=[],unmask:_=[],block:m=[],unblock:g=[],ignore:y=[],maskFn:v,blockClass:b,blockSelector:E,maskInputOptions:S,maskTextClass:w,maskTextSelector:k,ignoreClass:T}={}){if(tc.prototype.__init.call(this),this._recordingOptions={maskAllInputs:c,maskAllText:o,maskInputOptions:{...S||{},password:!0},maskTextFn:v,maskInputFn:v,...Wo({mask:f,unmask:_,block:m,unblock:g,ignore:y,blockClass:b,blockSelector:E,maskTextClass:w,maskTextSelector:k,ignoreClass:T}),slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0},this._initialOptions={flushMinDelay:t,flushMaxDelay:e,stickySession:n,sessionSampleRate:s,errorSampleRate:a,useCompression:r,blockAllMedia:l,maskAllInputs:c,maskAllText:o,networkDetailAllowUrls:u,networkCaptureBodies:d,networkRequestHeaders:ec(p),networkResponseHeaders:ec(h),_experiments:i},"number"==typeof s&&(console.warn(`[Replay] You are passing \`sessionSampleRate\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \`replaysSessionSampleRate\` directly in the SDK init options, e.g.:\nSentry.init({ replaysSessionSampleRate: ${s} })`),this._initialOptions.sessionSampleRate=s),"number"==typeof a&&(console.warn(`[Replay] You are passing \`errorSampleRate\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \`replaysOnErrorSampleRate\` directly in the SDK init options, e.g.:\nSentry.init({ replaysOnErrorSampleRate: ${a} })`),this._initialOptions.errorSampleRate=a),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Jo}`:Jo),this._isInitialized&&Ko())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Qo}set _isInitialized(t){Qo=t}setupOnce(){Ko()&&(this._setup(),setTimeout(()=>this._initialize()))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop():Promise.resolve()}flush(t){return this._replay&&this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):Promise.resolve()}getReplayId(){if(this._replay&&this._replay.isEnabled())return this._replay.getSessionId()}_initialize(){this._replay&&this._replay.initializeSampling()}_setup(){const t=function(t){const e=fr().getClient(),n=e&&e.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...Ge(t)};return n?(null==t.sessionSampleRate&&null==t.errorSampleRate&&null==n.replaysSessionSampleRate&&null==n.replaysOnErrorSampleRate&&console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set."),"number"==typeof n.replaysSessionSampleRate&&(r.sessionSampleRate=n.replaysSessionSampleRate),"number"==typeof n.replaysOnErrorSampleRate&&(r.errorSampleRate=n.replaysOnErrorSampleRate),r):(console.warn("SDK client is not available."),r)}(this._initialOptions);this._replay=new Zo({options:t,recordingOptions:this._recordingOptions})}}function ec(t){return[...Xo,...t.map(t=>t.toLowerCase())]}function nc(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],s=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=s(n)):"call"!==i&&"optionalCall"!==i||(n=s((...t)=>n.call(e,...t)),e=void 0)}return n}function rc(t){const e=nc([t,"call",t=>t(),"access",t=>t.getClient,"call",t=>t(),"optionalAccess",t=>t.getOptions,"call",t=>t()]);return"sentry"!==(nc([e,"optionalAccess",t=>t.instrumenter])||"sentry")}tc.__initStatic();class ic{static __initStatic(){this.id="Express"}__init(){this.name=ic.id}constructor(t={}){ic.prototype.__init.call(this),this._router=t.router||t.app,this._methods=(Array.isArray(t.methods)?t.methods:[]).concat("use")}setupOnce(t,e){this._router?rc(e)?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("Express Integration is skipped because of instrumenter configuration."):(function(t,e=[]){e.forEach(e=>function(t,e){const n=t[e];return t[e]=function(...t){return n.call(this,...function(t,e){return t.map(t=>"function"==typeof t?sc(t,e):Array.isArray(t)?t.map(t=>"function"==typeof t?sc(t,e):t):t)}(t,e))},t}(t,e))}(this._router,this._methods),function(t){const e="settings"in t;e&&void 0===t._router&&t.lazyrouter&&t.lazyrouter();const n=e?t._router:t;if(!n)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.debug("Cannot instrument router for URL Parameterization (did not find a valid router)."),void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.debug("Routing instrumentation is currently only supported in Express 4."));const r=Object.getPrototypeOf(n),i=r.process_params;r.process_params=function(t,e,n,r,s){n._reconstructedRoute||(n._reconstructedRoute="");const{layerRoutePath:a,isRegex:o,isArray:c,numExtraSegments:l}=function(t){const e=nc([t,"access",t=>t.route,"optionalAccess",t=>t.path]),n=le(e),r=Array.isArray(e);if(!e)return{isRegex:n,isArray:r,numExtraSegments:0};const i=r?Math.max(e.reduce((t,e)=>t+Nn(e.toString()),0)-Nn(t.path||""),0):0,s=function(t,e){return t?e.map(t=>t.toString()).join(","):e&&e.toString()}(r,e);return{layerRoutePath:s,isRegex:n,isArray:r,numExtraSegments:i}}(t);(a||o||c)&&(n._hasParameters=!0);const u=(a||t.path||"").split("/").filter(t=>t.length>0&&(o||c||!t.includes("*"))).join("/");if(u&&u.length>0&&(n._reconstructedRoute+=`/${u}${o?"/":""}`),Nn(n.originalUrl||"")+l===Nn(n._reconstructedRoute)){n._hasParameters||n._reconstructedRoute!==n.originalUrl&&(n._reconstructedRoute=n.originalUrl);const t=r.__sentry_transaction;t&&"custom"!==t.metadata.source&&t.setName(...function(t,e={}){const n=t.method&&t.method.toUpperCase();let r="",i="url";e.customRoute||t.route?(r=e.customRoute||`${t.baseUrl||""}${t.route&&t.route.path}`,i="route"):(t.originalUrl||t.url)&&(r=(t.originalUrl||t.url||"").split(/[\?#]/,1)[0]);let s="";return e.method&&n&&(s+=n),e.method&&e.path&&(s+=" "),e.path&&r&&(s+=r),[s,i]}(n,{path:!0,method:!0,customRoute:n._reconstructedRoute||"/"}))}return i.call(this,t,e,n,r,s)}}(this._router)):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error("ExpressIntegration is missing an Express instance")}}function sc(t,e){const n=t.length;switch(n){case 2:return function(n,r){const i=r.__sentry_transaction;if(i){const n=i.startChild({description:t.name,op:`middleware.express.${e}`});r.once("finish",()=>{n.finish()})}return t.call(this,n,r)};case 3:return function(n,r,i){const s=nc([r.__sentry_transaction,"optionalAccess",t=>t.startChild,"call",n=>n({description:t.name,op:`middleware.express.${e}`})]);t.call(this,n,r,function(...t){nc([s,"optionalAccess",t=>t.finish,"call",t=>t()]),i.call(this,...t)})};case 4:return function(n,r,i,s){const a=nc([i.__sentry_transaction,"optionalAccess",t=>t.startChild,"call",n=>n({description:t.name,op:`middleware.express.${e}`})]);t.call(this,n,r,i,function(...t){nc([a,"optionalAccess",t=>t.finish,"call",t=>t()]),s.call(this,...t)})};default:throw new Error(`Express middleware takes 2-4 arguments. Got: ${n}`)}}ic.__initStatic();class ac{static __initStatic(){this.id="Postgres"}__init(){this.name=ac.id}constructor(t={}){ac.prototype.__init.call(this),this._usePgNative=!!t.usePgNative}loadDependency(){return this._module=this._module||Sn("pg")}setupOnce(t,e){if(rc(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("Postgres Integration is skipped because of instrumenter configuration."));const n=this.loadDependency();if(!n)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error("Postgres Integration was unable to require `pg` package."));if(this._usePgNative&&!nc([n,"access",t=>t.native,"optionalAccess",t=>t.Client]))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error("Postgres Integration was unable to access 'pg-native' bindings."));const{Client:r}=this._usePgNative?n.native:n;Ue(r.prototype,"query",function(t){return function(n,r,i){const s=nc([e().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),a=nc([s,"optionalAccess",t=>t.startChild,"call",t=>t({description:"string"==typeof n?n:n.text,op:"db",data:{"db.system":"postgresql"}})]);if("function"==typeof i)return t.call(this,n,r,function(t,e){nc([a,"optionalAccess",t=>t.finish,"call",t=>t()]),i(t,e)});if("function"==typeof r)return t.call(this,n,function(t,e){nc([a,"optionalAccess",t=>t.finish,"call",t=>t()]),r(t,e)});const o=void 0!==r?t.call(this,n,r):t.call(this,n);return ue(o)?o.then(t=>(nc([a,"optionalAccess",t=>t.finish,"call",t=>t()]),t)):(nc([a,"optionalAccess",t=>t.finish,"call",t=>t()]),o)}})}}ac.__initStatic();class oc{constructor(){oc.prototype.__init.call(this)}static __initStatic(){this.id="Mysql"}__init(){this.name=oc.id}loadDependency(){return this._module=this._module||Sn("mysql/lib/Connection.js")}setupOnce(t,e){if(rc(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("Mysql Integration is skipped because of instrumenter configuration."));const n=this.loadDependency();n?Ue(n,"createQuery",function(t){return function(n,r,i){const s=nc([e().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),a=nc([s,"optionalAccess",t=>t.startChild,"call",t=>t({description:"string"==typeof n?n:n.sql,op:"db",data:{"db.system":"mysql"}})]);return"function"==typeof i?t.call(this,n,r,function(t,e,n){nc([a,"optionalAccess",t=>t.finish,"call",t=>t()]),i(t,e,n)}):"function"==typeof r?t.call(this,n,function(t,e,n){nc([a,"optionalAccess",t=>t.finish,"call",t=>t()]),r(t,e,n)}):t.call(this,n,r,i)}}):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error("Mysql Integration was unable to require `mysql` package.")}}oc.__initStatic();const cc=["aggregate","bulkWrite","countDocuments","createIndex","createIndexes","deleteMany","deleteOne","distinct","drop","dropIndex","dropIndexes","estimatedDocumentCount","find","findOne","findOneAndDelete","findOneAndReplace","findOneAndUpdate","indexes","indexExists","indexInformation","initializeOrderedBulkOp","insertMany","insertOne","isCapped","mapReduce","options","parallelCollectionScan","rename","replaceOne","stats","updateMany","updateOne"],lc={bulkWrite:["operations"],countDocuments:["query"],createIndex:["fieldOrSpec"],createIndexes:["indexSpecs"],deleteMany:["filter"],deleteOne:["filter"],distinct:["key","query"],dropIndex:["indexName"],find:["query"],findOne:["query"],findOneAndDelete:["filter"],findOneAndReplace:["filter","replacement"],findOneAndUpdate:["filter","update"],indexExists:["indexes"],insertMany:["docs"],insertOne:["doc"],mapReduce:["map","reduce"],rename:["newName"],replaceOne:["filter","doc"],updateMany:["filter","update"],updateOne:["filter","update"]};class uc{static __initStatic(){this.id="Mongo"}__init(){this.name=uc.id}constructor(t={}){uc.prototype.__init.call(this),this._operations=Array.isArray(t.operations)?t.operations:cc,this._describeOperations=!("describeOperations"in t)||t.describeOperations,this._useMongoose=!!t.useMongoose}loadDependency(){return this._module=this._module||Sn(this._useMongoose?"mongoose":"mongodb")}setupOnce(t,e){if(rc(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("Mongo Integration is skipped because of instrumenter configuration."));const n=this.loadDependency();n?this._instrumentOperations(n.Collection,this._operations,e):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error(`Mongo Integration was unable to require \`${this._useMongoose?"mongoose":"mongodb"}\` package.`)}_instrumentOperations(t,e,n){e.forEach(e=>this._patchOperation(t,e,n))}_patchOperation(t,e,n){if(!(e in t.prototype))return;const r=this._getSpanContextFromOperationArguments.bind(this);Ue(t.prototype,e,function(t){return function(...i){const s=i[i.length-1],a=nc([n().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]);if("function"!=typeof s||"mapReduce"===e&&2===i.length){const n=nc([a,"optionalAccess",t=>t.startChild,"call",t=>t(r(this,e,i))]),s=t.call(this,...i);if(ue(s))return s.then(t=>(nc([n,"optionalAccess",t=>t.finish,"call",t=>t()]),t));if((o=s)&&"object"==typeof o&&o.once&&"function"==typeof o.once){const t=s;try{t.once("close",()=>{nc([n,"optionalAccess",t=>t.finish,"call",t=>t()])})}catch(t){nc([n,"optionalAccess",t=>t.finish,"call",t=>t()])}return t}return nc([n,"optionalAccess",t=>t.finish,"call",t=>t()]),s}var o;const c=nc([a,"optionalAccess",t=>t.startChild,"call",t=>t(r(this,e,i.slice(0,-1)))]);return t.call(this,...i.slice(0,-1),function(t,e){nc([c,"optionalAccess",t=>t.finish,"call",t=>t()]),s(t,e)})}})}_getSpanContextFromOperationArguments(t,e,n){const r={collectionName:t.collectionName,dbName:t.dbName,namespace:t.namespace,"db.system":"mongodb"},i={op:"db",description:e,data:r},s=lc[e],a=Array.isArray(this._describeOperations)?this._describeOperations.includes(e):this._describeOperations;if(!s||!a)return i;try{if("mapReduce"===e){const[t,e]=n;r[s[0]]="string"==typeof t?t:t.name||"<anonymous>",r[s[1]]="string"==typeof e?e:e.name||"<anonymous>"}else for(let t=0;t<s.length;t++)r[s[t]]=JSON.stringify(n[t])}catch(t){}return i}}uc.__initStatic();class dc{static __initStatic(){this.id="Prisma"}__init(){this.name=dc.id}constructor(t={}){var e;dc.prototype.__init.call(this),(e=t.client)&&e.$use?this._client=t.client:("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn(`Unsupported Prisma client provided to PrismaIntegration. Provided client: ${JSON.stringify(t.client)}`)}setupOnce(t,e){this._client?rc(e)?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("Prisma Integration is skipped because of instrumenter configuration."):this._client.$use((t,e)=>{const n=t.action,r=t.model;return Ur({name:r?`${r} ${n}`:n,op:"db.sql.prisma",data:{"db.system":"prisma"}},()=>e(t))}):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error("PrismaIntegration is missing a Prisma Client Instance")}}dc.__initStatic();class pc{constructor(){pc.prototype.__init.call(this)}static __initStatic(){this.id="GraphQL"}__init(){this.name=pc.id}loadDependency(){return this._module=this._module||Sn("graphql/execution/execute.js")}setupOnce(t,e){if(rc(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("GraphQL Integration is skipped because of instrumenter configuration."));const n=this.loadDependency();n?Ue(n,"execute",function(t){return function(...n){const r=e().getScope(),i=nc([r,"optionalAccess",t=>t.getSpan,"call",t=>t()]),s=nc([i,"optionalAccess",t=>t.startChild,"call",t=>t({description:"execute",op:"graphql.execute"})]);nc([r,"optionalAccess",t=>t.setSpan,"call",t=>t(s)]);const a=t.call(this,...n);return ue(a)?a.then(t=>(nc([s,"optionalAccess",t=>t.finish,"call",t=>t()]),nc([r,"optionalAccess",t=>t.setSpan,"call",t=>t(i)]),t)):(nc([s,"optionalAccess",t=>t.finish,"call",t=>t()]),nc([r,"optionalAccess",t=>t.setSpan,"call",t=>t(i)]),a)}}):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error("GraphQL Integration was unable to require graphql/execution package.")}}pc.__initStatic();class hc{static __initStatic(){this.id="Apollo"}__init(){this.name=hc.id}constructor(t={useNestjs:!1}){hc.prototype.__init.call(this),this._useNest=!!t.useNestjs}loadDependency(){return this._module=this._useNest?this._module||Sn("@nestjs/graphql"):this._module||Sn("apollo-server-core"),this._module}setupOnce(t,e){if(rc(e))("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("Apollo Integration is skipped because of instrumenter configuration.");else if(this._useNest){const t=this.loadDependency();if(!t)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error("Apollo-NestJS Integration was unable to require @nestjs/graphql package."));Ue(t.GraphQLFactory.prototype,"mergeWithSchema",function(t){return function(...n){return Ue(this.resolversExplorerService,"explore",function(t){return function(){return fc(vn(t.call(this)),e)}}),t.call(this,...n)}})}else{const t=this.loadDependency();if(!t)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error("Apollo Integration was unable to require apollo-server-core package."));Ue(t.ApolloServerBase.prototype,"constructSchema",function(t){return function(){if(!this.config.resolvers)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&(this.config.schema?(De.warn("Apollo integration is not able to trace `ApolloServer` instances constructed via `schema` property.If you are using NestJS with Apollo, please use `Sentry.Integrations.Apollo({ useNestjs: true })` instead."),De.warn()):this.config.modules&&De.warn("Apollo integration is not able to trace `ApolloServer` instances constructed via `modules` property."),De.error("Skipping tracing as no resolvers found on the `ApolloServer` instance.")),t.call(this);const n=vn(this.config.resolvers);return this.config.resolvers=fc(n,e),t.call(this)}})}}}function fc(t,e){return t.map(t=>(Object.keys(t).forEach(n=>{Object.keys(t[n]).forEach(r=>{"function"==typeof t[n][r]&&function(t,e,n,r){Ue(t[e],n,function(t){return function(...i){const s=nc([r().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),a=nc([s,"optionalAccess",t=>t.startChild,"call",t=>t({description:`${e}.${n}`,op:"graphql.resolve"})]),o=t.call(this,...i);return ue(o)?o.then(t=>(nc([a,"optionalAccess",t=>t.finish,"call",t=>t()]),t)):(nc([a,"optionalAccess",t=>t.finish,"call",t=>t()]),o)}})}(t,n,r,e)})}),t))}hc.__initStatic();const _c=fe,mc=(t,e,n)=>{let r,i;return s=>{e.value>=0&&(s||n)&&(i=e.value-(r||0),(i||void 0===r)&&(r=e.value,e.delta=i,t(e)))}},gc=()=>_c.__WEB_VITALS_POLYFILL__?_c.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||(()=>{const t=_c.performance.timing,e=_c.performance.navigation.type,n={entryType:"navigation",startTime:0,type:2==e?"back_forward":1===e?"reload":"navigate"};for(const e in t)"navigationStart"!==e&&"toJSON"!==e&&(n[e]=Math.max(t[e]-t.navigationStart,0));return n})()):_c.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],yc=()=>{const t=gc();return t&&t.activationStart||0},vc=(t,e)=>{const n=gc();let r="navigate";return n&&(r=_c.document.prerendering||yc()>0?"prerender":n.type.replace(/_/g,"-")),{name:t,value:void 0===e?-1:e,rating:"good",delta:0,entries:[],id:`v3-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},bc=(t,e,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver(t=>{e(t.getEntries())});return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch(t){}},Ec=(t,e)=>{const n=r=>{"pagehide"!==r.type&&"hidden"!==_c.document.visibilityState||(t(r),e&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)};let Sc=-1;const wc=()=>(Sc<0&&(Sc="hidden"!==_c.document.visibilityState||_c.document.prerendering?Infinity:0,Ec(({timeStamp:t})=>{Sc=t},!0)),{get firstHiddenTime(){return Sc}}),kc={};function Tc(t){return"number"==typeof t&&isFinite(t)}function Cc(t,{startTimestamp:e,...n}){return e&&t.startTimestamp>e&&(t.startTimestamp=e),t.startChild({startTimestamp:e,...n})}function xc(t){return t/1e3}function Rc(){return _c&&_c.addEventListener&&_c.performance}let Dc,Ic,Nc=0,Oc={};function Uc(t,e,n,r,i,s){const a=s?e[s]:e[`${n}End`],o=e[`${n}Start`];o&&a&&Cc(t,{op:"browser",description:i||n,startTimestamp:r+xc(o),endTimestamp:r+xc(a)})}const Ac=["localhost",/^\/(?!\/)/],Bc={traceFetch:!0,traceXHR:!0,tracingOrigins:Ac,tracePropagationTargets:Ac};function Mc(t){const{traceFetch:e,traceXHR:n,tracePropagationTargets:r,tracingOrigins:i,shouldCreateSpanForRequest:s}={traceFetch:Bc.traceFetch,traceXHR:Bc.traceXHR,...t},a="function"==typeof s?s:t=>!0,o=t=>function(t,e){return Oe(t,e||Ac)}(t,r||i),c={};e&&en("fetch",t=>{!function(t,e,n,r){if(!gr()||!t.fetchData||!e(t.fetchData.url))return;if(t.endTimestamp){const e=t.fetchData.__span;if(!e)return;const n=r[e];return void(n&&(t.response?n.setHttpStatus(t.response.status):t.error&&n.setStatus("internal_error"),n.finish(),delete r[e]))}const i=t.response&&t.response.headers&&t.response.headers.get("content-length"),s=fr().getScope(),a=s&&s.getSpan(),o=a&&a.transaction;if(a&&o){const{method:e,url:s}=t.fetchData,c=a.startChild({data:{url:s,type:"fetch",...i?{"http.response_content_length":i}:{},"http.method":e},description:`${e} ${s}`,op:"http.client"});t.fetchData.__span=c.spanId,r[c.spanId]=c;const l=t.args[0];t.args[1]=t.args[1]||{};const u=t.args[1];n(t.fetchData.url)&&(u.headers=function(t,e,n,r){const i=nr(e),s=n.toTraceparent(),a="undefined"!=typeof Request&&pe(t,Request)?t.headers:r.headers;if(a){if("undefined"!=typeof Headers&&pe(a,Headers)){const t=new Headers(a);return t.append("sentry-trace",s),i&&t.append(Xn,i),t}if(Array.isArray(a)){const t=[...a,["sentry-trace",s]];return i&&t.push([Xn,i]),t}{const t="baggage"in a?a.baggage:void 0,e=[];return Array.isArray(t)?e.push(...t):t&&e.push(t),i&&e.push(i),{...a,"sentry-trace":s,baggage:e.length>0?e.join(","):void 0}}}return{"sentry-trace":s,baggage:i}}(l,o.getDynamicSamplingContext(),c,u))}}(t,a,o,c)}),n&&en("xhr",t=>{!function(t,e,n,r){const i=t.xhr,s=i&&i[Xe];if(!gr()||i&&i.__sentry_own_request__||!(i&&s&&e(s.url)))return;if(t.endTimestamp){const t=i.__sentry_xhr_span_id__;if(!t)return;const e=r[t];return void(e&&(e.setHttpStatus(s.status_code),e.finish(),delete r[t]))}const a=fr().getScope(),o=a&&a.getSpan(),c=o&&o.transaction;if(o&&c){const t=o.startChild({data:{...s.data,type:"xhr","http.method":s.method,url:s.url},description:`${s.method} ${s.url}`,op:"http.client"});if(i.__sentry_xhr_span_id__=t.spanId,r[i.__sentry_xhr_span_id__]=t,i.setRequestHeader&&n(s.url))try{i.setRequestHeader("sentry-trace",t.toTraceparent());const e=nr(c.getDynamicSamplingContext());e&&i.setRequestHeader(Xn,e)}catch(t){}}}(t,a,o,c)})}const Pc={...kr,markBackgroundTransactions:!0,routingInstrumentation:function(t,e=!0,n=!0){if(!_c||!_c.location)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn("Could not initialize routing instrumentation due to invalid location"));let r,i=_c.location.href;e&&(r=t({name:_c.location.pathname,startTimestamp:Hn?Hn/1e3:void 0,op:"pageload",metadata:{source:"url"}})),n&&en("history",({to:e,from:n})=>{void 0===n&&i&&-1!==i.indexOf(e)?i=void 0:n!==e&&(i=void 0,r&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log(`[Tracing] Finishing current transaction with op: ${r.op}`),r.finish()),r=t({name:_c.location.pathname,op:"navigation",metadata:{source:"url"}}))})},startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,_experiments:{},...Bc};class Lc{__init(){this.name="BrowserTracing"}constructor(t){Lc.prototype.__init.call(this),Or(),this.options={...Pc,...t},void 0!==this.options._experiments.enableLongTask&&(this.options.enableLongTask=this.options._experiments.enableLongTask),t&&!t.tracePropagationTargets&&t.tracingOrigins&&(this.options.tracePropagationTargets=t.tracingOrigins),this._collectWebVitals=function(){const t=Rc();if(t&&Hn){t.mark&&_c.performance.mark("sentry-tracing-init"),(t=>{const e=wc(),n=vc("FID");let r;const i=t=>{t.startTime<e.firstHiddenTime&&(n.value=t.processingStart-t.startTime,n.entries.push(t),r(!0))},s=t=>{t.forEach(i)},a=bc("first-input",s);r=mc(t=>{const e=t.entries.pop();if(!e)return;const n=xc(Hn),r=xc(e.startTime);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("[Measurements] Adding FID"),Oc.fid={value:t.value,unit:"millisecond"},Oc["mark.fid"]={value:n+r,unit:"second"}},n),a&&Ec(()=>{s(a.takeRecords()),a.disconnect()},!0)})();const e=(t=>{const e=vc("CLS",0);let n,r=0,i=[];const s=t=>{t.forEach(t=>{t.hadRecentInput||(r&&0!==i.length&&t.startTime-i[i.length-1].startTime<1e3&&t.startTime-i[0].startTime<5e3?(r+=t.value,i.push(t)):(r=t.value,i=[t]),r>e.value&&(e.value=r,e.entries=i,n&&n()))})},a=bc("layout-shift",s);if(a){n=mc(t=>{const e=t.entries.pop();e&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("[Measurements] Adding CLS"),Oc.cls={value:t.value,unit:""},Ic=e)},e);const t=()=>{s(a.takeRecords()),n(!0)};return Ec(t),t}})(),n=(t=>{const e=wc(),n=vc("LCP");let r;const i=t=>{const i=t[t.length-1];if(i){const t=Math.max(i.startTime-yc(),0);t<e.firstHiddenTime&&(n.value=t,n.entries=[i],r())}},s=bc("largest-contentful-paint",i);if(s){r=mc(t=>{const e=t.entries.pop();e&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("[Measurements] Adding LCP"),Oc.lcp={value:t.value,unit:"millisecond"},Dc=e)},n);const t=()=>{kc[n.id]||(i(s.takeRecords()),s.disconnect(),kc[n.id]=!0,r(!0))};return["keydown","click"].forEach(e=>{addEventListener(e,t,{once:!0,capture:!0})}),Ec(t,!0),t}})();return()=>{e&&e(),n&&n()}}return()=>{}}(),this.options.enableLongTask&&bc("longtask",t=>{for(const e of t){const t=yr();if(!t)return;const n=xc(Hn+e.startTime),r=xc(e.duration);t.startChild({description:"Main UI thread blocked",op:"ui.long-task",startTimestamp:n,endTimestamp:n+r})}}),this.options._experiments.enableInteractions&&bc("event",t=>{for(const e of t){const t=yr();if(!t)return;if("click"===e.name){const n=xc(Hn+e.startTime),r=xc(e.duration);t.startChild({description:ve(e.target),op:`ui.interaction.${e.name}`,startTimestamp:n,endTimestamp:n+r})}}},{durationThreshold:0})}setupOnce(t,e){this._getCurrentHub=e;const{routingInstrumentation:n,startTransactionOnLocationChange:r,startTransactionOnPageLoad:i,markBackgroundTransactions:s,traceFetch:a,traceXHR:o,tracePropagationTargets:c,shouldCreateSpanForRequest:l,_experiments:u}=this.options;n(t=>{const n=this._createRouteTransaction(t);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(n,t,e),n},i,r),s&&(_c&&_c.document?_c.document.addEventListener("visibilitychange",()=>{const t=yr();if(_c.document.hidden&&t){const e="cancelled";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${t.op}`),t.status||t.setStatus(e),t.setTag("visibilitychange","document.hidden"),t.finish()}}):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn("[Tracing] Could not set up background tab detection due to lack of global document")),u.enableInteractions&&this._registerInteractionListener(),Mc({traceFetch:a,traceXHR:o,tracePropagationTargets:c,shouldCreateSpanForRequest:l})}_createRouteTransaction(t){if(!this._getCurrentHub)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn(`[Tracing] Did not create ${t.op} transaction because _getCurrentHub is invalid.`));const{beforeNavigate:e,idleTimeout:n,finalTimeout:r,heartbeatInterval:i}=this.options,s="pageload"===t.op,a=s?Hc("sentry-trace"):null,o=s?Hc("baggage"):null,c=a?function(t){const e=t.match(zn);if(!t||!e)return;let n;return"1"===e[3]?n=!0:"0"===e[3]&&(n=!1),{traceId:e[1],parentSampled:n,parentSpanId:e[2]}}(a):void 0,l=o?function(t){if(!se(t)&&!Array.isArray(t))return;let e={};if(Array.isArray(t))e=t.reduce((t,e)=>({...t,...rr(e)}),{});else{if(!t)return;e=rr(t)}const n=Object.entries(e).reduce((t,[e,n])=>(e.match(tr)&&(t[e.slice(Qn.length)]=n),t),{});return Object.keys(n).length>0?n:void 0}(o):void 0,u={...t,...c,metadata:{...t.metadata,dynamicSamplingContext:c&&!l?{}:l},trimEnd:!0},d="function"==typeof e?e(u):u,p=void 0===d?{...u,sampled:!1}:d;p.metadata=p.name!==u.name?{...p.metadata,source:"custom"}:p.metadata,this._latestRouteName=p.name,this._latestRouteSource=p.metadata&&p.metadata.source,!1===p.sampled&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log(`[Tracing] Will not send ${p.op} transaction because of beforeNavigate.`),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log(`[Tracing] Starting ${p.op} transaction on scope`);const h=this._getCurrentHub(),{location:f}=_c,_=Nr(h,p,n,r,!0,{location:f},i);return _.registerBeforeFinishCallback(t=>{this._collectWebVitals(),function(t){const e=Rc();if(!e||!_c.performance.getEntries||!Hn)return;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("[Tracing] Adding & adjusting spans using Performance API");const n=xc(Hn),r=e.getEntries();let i,s;if(r.slice(Nc).forEach(e=>{const r=xc(e.startTime),a=xc(e.duration);if(!("navigation"===t.op&&n+r<t.startTimestamp))switch(e.entryType){case"navigation":!function(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Uc(t,e,r,n)}),Uc(t,e,"secureConnection",n,"TLS/SSL","connectEnd"),Uc(t,e,"fetch",n,"cache","domainLookupStart"),Uc(t,e,"domainLookup",n,"DNS"),function(t,e,n){Cc(t,{op:"browser",description:"request",startTimestamp:n+xc(e.requestStart),endTimestamp:n+xc(e.responseEnd)}),Cc(t,{op:"browser",description:"response",startTimestamp:n+xc(e.responseStart),endTimestamp:n+xc(e.responseEnd)})}(t,e,n)}(t,e,n),i=n+xc(e.responseStart),s=n+xc(e.requestStart);break;case"mark":case"paint":case"measure":{!function(t,e,n,r,i){const s=i+n;Cc(t,{description:e.name,endTimestamp:s+r,op:e.entryType,startTimestamp:s})}(t,e,r,a,n);const i=wc(),s=e.startTime<i.firstHiddenTime;"first-paint"===e.name&&s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("[Measurements] Adding FP"),Oc.fp={value:e.startTime,unit:"millisecond"}),"first-contentful-paint"===e.name&&s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("[Measurements] Adding FCP"),Oc.fcp={value:e.startTime,unit:"millisecond"});break}case"resource":{const i=e.name.replace(_c.location.origin,"");!function(t,e,n,r,i,s){if("xmlhttprequest"===e.initiatorType||"fetch"===e.initiatorType)return;const a={};"transferSize"in e&&(a["http.response_transfer_size"]=e.transferSize),"encodedBodySize"in e&&(a["http.response_content_length"]=e.encodedBodySize),"decodedBodySize"in e&&(a["http.decoded_response_content_length"]=e.decodedBodySize),"renderBlockingStatus"in e&&(a["resource.render_blocking_status"]=e.renderBlockingStatus);const o=s+r;Cc(t,{description:n,endTimestamp:o+i,op:e.initiatorType?`resource.${e.initiatorType}`:"resource.other",startTimestamp:o,data:a})}(t,e,i,r,a,n);break}}}),Nc=Math.max(r.length-1,0),function(t){const e=_c.navigator;if(!e)return;const n=e.connection;n&&(n.effectiveType&&t.setTag("effectiveConnectionType",n.effectiveType),n.type&&t.setTag("connectionType",n.type),Tc(n.rtt)&&(Oc["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Tc(e.deviceMemory)&&t.setTag("deviceMemory",`${e.deviceMemory} GB`),Tc(e.hardwareConcurrency)&&t.setTag("hardwareConcurrency",String(e.hardwareConcurrency))}(t),"pageload"===t.op){"number"==typeof i&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("[Measurements] Adding TTFB"),Oc.ttfb={value:1e3*(i-t.startTimestamp),unit:"millisecond"},"number"==typeof s&&s<=i&&(Oc["ttfb.requestTime"]={value:1e3*(i-s),unit:"millisecond"})),["fcp","fp","lcp"].forEach(e=>{if(!Oc[e]||n>=t.startTimestamp)return;const r=Oc[e].value,i=n+xc(r),s=Math.abs(1e3*(i-t.startTimestamp));("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log(`[Measurements] Normalized ${e} from ${r} to ${s} (${s-r})`),Oc[e].value=s});const e=Oc["mark.fid"];e&&Oc.fid&&(Cc(t,{description:"first input delay",endTimestamp:e.value+xc(Oc.fid.value),op:"ui.action",startTimestamp:e.value}),delete Oc["mark.fid"]),"fcp"in Oc||delete Oc.cls,Object.keys(Oc).forEach(e=>{t.setMeasurement(e,Oc[e].value,Oc[e].unit)}),function(t){Dc&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("[Measurements] Adding LCP Data"),Dc.element&&t.setTag("lcp.element",ve(Dc.element)),Dc.id&&t.setTag("lcp.id",Dc.id),Dc.url&&t.setTag("lcp.url",Dc.url.trim().slice(0,200)),t.setTag("lcp.size",Dc.size)),Ic&&Ic.sources&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("[Measurements] Adding CLS Data"),Ic.sources.forEach((e,n)=>t.setTag(`cls.source.${n+1}`,ve(e.node))))}(t)}Dc=void 0,Ic=void 0,Oc={}}(t)}),_}_registerInteractionListener(){let t;const e=()=>{const{idleTimeout:e,finalTimeout:n,heartbeatInterval:r}=this.options,i="ui.action.click",s=yr();if(s&&s.op&&["navigation","pageload"].includes(s.op))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn(`[Tracing] Did not create ${i} transaction because a pageload or navigation transaction is in progress.`));if(t&&(t.setFinishReason("interactionInterrupted"),t.finish(),t=void 0),!this._getCurrentHub)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn(`[Tracing] Did not create ${i} transaction because _getCurrentHub is invalid.`));if(!this._latestRouteName)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn(`[Tracing] Did not create ${i} transaction because _latestRouteName is missing.`));const a=this._getCurrentHub(),{location:o}=_c;t=Nr(a,{name:this._latestRouteName,op:i,trimEnd:!0,metadata:{source:this._latestRouteSource||"url"}},e,n,!0,{location:o},r)};["click"].forEach(t=>{addEventListener(t,e,{once:!1,capture:!0})})}}function Hc(t){const e=ge.document&&ge.document.querySelector?ge.document.querySelector(`meta[name=${t}]`):null;return e?e.getAttribute("content"):null}var zc={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Gc={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Yc={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},$c={};function Fc(t){return Q.default.isMemo(t)?Yc:$c[t.$$typeof]||zc}$c[Q.default.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},$c[Q.default.Memo]=Yc;var jc=Object.defineProperty,Vc=Object.getOwnPropertyNames,Zc=Object.getOwnPropertySymbols,qc=Object.getOwnPropertyDescriptor,Wc=Object.getPrototypeOf,Kc=Object.prototype,Jc=function t(e,n,r){if("string"!=typeof n){if(Kc){var i=Wc(n);i&&i!==Kc&&t(e,i,r)}var s=Vc(n);Zc&&(s=s.concat(Zc(n)));for(var a=Fc(e),o=Fc(n),c=0;c<s.length;++c){var l=s[c];if(!(Gc[l]||r&&r[l]||o&&o[l]||a&&a[l])){var u=qc(n,l);try{jc(e,l,u)}catch(t){}}}}return e};const Xc="/home/runner/work/sentry-javascript/sentry-javascript/packages/react/src/profiler.tsx";class Qc extends N.Component{__init(){this._mountSpan=void 0}__init2(){this._updateSpan=void 0}static __initStatic(){this.defaultProps={disabled:!1,includeRender:!0,includeUpdates:!0}}constructor(t){super(t),Qc.prototype.__init.call(this),Qc.prototype.__init2.call(this);const{name:e,disabled:n=!1}=this.props;if(n)return;const r=function(t=fr()){if(t){const e=t.getScope();if(e)return e.getTransaction()}}();r&&(this._mountSpan=r.startChild({description:`<${e}>`,op:"ui.react.mount"}))}componentDidMount(){this._mountSpan&&this._mountSpan.finish()}shouldComponentUpdate({updateProps:t,includeUpdates:e=!0}){if(e&&this._mountSpan&&t!==this.props.updateProps){const e=Object.keys(t).filter(e=>t[e]!==this.props.updateProps[e]);if(e.length>0){const t=Ln();this._updateSpan=this._mountSpan.startChild({data:{changedProps:e},description:`<${this.props.name}>`,op:"ui.react.update",startTimestamp:t})}}return!0}componentDidUpdate(){this._updateSpan&&(this._updateSpan.finish(),this._updateSpan=void 0)}componentWillUnmount(){const{name:t,includeRender:e=!0}=this.props;this._mountSpan&&e&&this._mountSpan.startChild({description:`<${t}>`,endTimestamp:Ln(),op:"ui.react.render",startTimestamp:this._mountSpan.endTimestamp})}render(){return this.props.children}}Qc.__initStatic();const tl={componentStack:null,error:null,eventId:null};class el extends N.Component{__init(){this.state=tl}__init2(){this._openFallbackReportDialog=!0}constructor(t){super(t),el.prototype.__init.call(this),el.prototype.__init2.call(this),el.prototype.__init3.call(this);const e=fr().getClient();e&&e.on&&t.showDialog&&(this._openFallbackReportDialog=!1,e.on("afterSendEvent",e=>{e.type||e.event_id!==this._lastEventId||Xi({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,{componentStack:e}){const{beforeCapture:n,onError:r,showDialog:i,dialogOptions:s}=this.props;Br(a=>{if(function(t){const e=N.version.match(/^([^.]+)/);return null!==e&&parseInt(e[0])>=17}()&&ee(t)){const n=new Error(t.message);n.name=`React ErrorBoundary ${n.name}`,n.stack=e,function(t,e){const n=new WeakMap;!function t(e,r){if(!n.has(e))return e.cause?(n.set(e,!0),t(e.cause,r)):void(e.cause=r)}(t,e)}(t,n)}n&&n(a,t,e);const o=Ar(t,{contexts:{react:{componentStack:e}}});r&&r(t,e,o),i&&(this._lastEventId=o,this._openFallbackReportDialog&&Xi({...s,eventId:o})),this.setState({error:t,componentStack:e,eventId:o})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:e,eventId:n}=this.state,{onUnmount:r}=this.props;r&&r(t,e,n)}__init3(){this.resetErrorBoundary=()=>{const{onReset:t}=this.props,{error:e,componentStack:n,eventId:r}=this.state;t&&t(e,n,r),this.setState(tl)}}render(){const{fallback:t,children:e}=this.props,n=this.state;if(n.error){let e;return e="function"==typeof t?t({error:n.error,componentStack:n.componentStack,resetError:this.resetErrorBoundary,eventId:n.eventId}):t,N.isValidElement(e)?e:(t&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn("fallback did not produce a valid ReactElement"),null)}return"function"==typeof e?e():e}}let nl,rl,il,sl,al,ol,cl,ll;const ul={"routing.instrumentation":"react-router-v6"};function dl(t,e,n){if(!t||0===t.length)return[e.pathname,"url"];let r="";if(n)for(let t=0;t<n.length;t++){const i=n[t],s=i.route;if(s){if(s.index)return[i.pathname,"route"];const t=s.path;if(t){const n="/"===t[0]||"/"===r[r.length-1]?t:`/${t}`;if(r+=n,i.pathname===e.pathname)return Nn(r)!==Nn(i.pathname)&&"/*"!==r.slice(-2)?[n,"route"]:[r,"route"]}}}return[e.pathname,"url"]}function pl(){return pl=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},pl.apply(this,arguments)}const hl={BrowserTracing:Lc,Apollo:hc,Express:ic,GraphQL:pc,Mongo:uc,Mysql:oc,Postgres:ac,Prisma:dc};("undefined"==typeof __SENTRY_TRACING__||__SENTRY_TRACING__)&&(Or(),bn()&&function(){const t=pr();if(!t.__SENTRY__)return;const e={mongodb:()=>new(En(module,"./node/integrations/mongo").Mongo),mongoose:()=>new(En(module,"./node/integrations/mongo").Mongo),mysql:()=>new(En(module,"./node/integrations/mysql").Mysql),pg:()=>new(En(module,"./node/integrations/postgres").Postgres)},n=Object.keys(e).filter(t=>!!Sn(t)).map(t=>{try{return e[t]()}catch(t){return}}).filter(t=>t);n.length>0&&(t.__SENTRY__.integrations=[...t.__SENTRY__.integrations||[],...n])}());var fl={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 5 seconds..."},_l={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 5 sekund nastąpi odświeżenie aplikacji..."},ml=navigator.language.slice(0,2),gl="pl";["en","pl"].includes(ml)&&(gl=ml);var yl=new(/*#__PURE__*/function(){function t(){this.locale=gl,this.translations=_l,o.makeObservable(this,{locale:o.observable,translations:o.observable,setLocale:o.action})}return t.prototype.setLocale=function(t){this.locale=t,this.translations="en"===t?fl:_l},t}());function vl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}var bl,El=function t(e,n){function r(t,r,i){if("undefined"!=typeof document){"number"==typeof(i=vl({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var a in i)i[a]&&(s+="; "+a,!0!==i[a]&&(s+="="+i[a].split(";")[0]));return document.cookie=t+"="+e.write(r,t)+s}}return Object.create({set:r,get:function(t){if("undefined"!=typeof document&&(!arguments.length||t)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var s=n[i].split("="),a=s.slice(1).join("=");try{var o=decodeURIComponent(s[0]);if(r[o]=e.read(a,o),t===o)break}catch(t){}}return t?r[t]:r}},remove:function(t,e){r(t,"",vl({},e,{expires:-1}))},withAttributes:function(e){return t(this.converter,vl({},this.attributes,e))},withConverter:function(e){return t(vl({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(e)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"}),Sl=/*#__PURE__*/function(){function t(){}return t.recognizeRootDomain=function(){if(!this.rootDomain){var t=window.location.hostname;if(0===window.location.port.length){var e,n,r=t.split(".");e=r[0],n=r.slice(1),this.subdomain=e,this.rootDomain=n.join(".")}else this.rootDomain=t}return this.rootDomain},t.get=function(t){var e=this.recognizeRootDomain();return El.get(t,{domain:e})},t.set=function(t,e){var n=this.recognizeRootDomain();return El.set(t,e,{domain:n})},t.remove=function(t){var e=this.recognizeRootDomain();return El.remove(t,{domain:e})},t}(),wl=function(t,e){void 0===e&&(e={});try{var n=function(){var n=Rl.requestHeaders();return null!==n&&(e.headers=Object.assign({},n,e.headers)),Promise.resolve(fetch(t,e).catch(function(t){Ar(t),Rl.setNetworkError({title:yl.translations.somethingWentWrongMessage,details:t.message})})).then(function(t){var e=function(){if(t){var e=function(){if(401!==t.status)return Promise.resolve(t.clone().text()).then(function(e){switch(t.status){case 403:Qt.error(yl.translations.forbiddenErrorMessage);break;case 500:Qt.error(/*#__PURE__*/O.default.createElement(O.default.Fragment,null,/*#__PURE__*/O.default.createElement(l.Typography,{mr:e?2:0},yl.translations.somethingWentWrongMessage),e&&/*#__PURE__*/O.default.createElement(l.Tooltip,{title:e,arrow:!0},/*#__PURE__*/O.default.createElement(B.default,null))))}});Rl.removeSession(),Rl.removeCurrentUser(),Rl.setNotAuthorizedLoginStatus()}();if(e&&e.then)return e.then(function(){})}}();return e&&e.then?e.then(function(){return t}):t})},r=function(){if(Rl.isLoggedIn()&&!e.refresh){var t=Rl.session,n=t.createdAt,r=t.expiresIn,i=function(){if(n+r<Math.round(+new Date/1e3)){var t=Rl.refreshTokenPromise?Promise.resolve(Rl.refreshTokenPromise).then(function(){}):Promise.resolve(Rl.refresh()).then(function(){});if(t&&t.then)return t.then(function(){})}}();if(i&&i.then)return i.then(function(){})}}();return Promise.resolve(r&&r.then?r.then(n):n())}catch(t){return Promise.reject(t)}},kl=new(/*#__PURE__*/function(){function t(){this.currentUser=null,o.makeObservable(this,{setCurrentUser:o.action,removeCurrentUser:o.action,currentUser:o.observable.deep,getCurrentUserJS:o.computed})}var e,n,r=t.prototype;return r.setCurrentUser=function(t){this.currentUser=t},r.removeCurrentUser=function(){this.currentUser=null},e=t,(n=[{key:"getCurrentUserJS",get:function(){return o.toJS(this.currentUser)}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,"symbol"==typeof(i=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key))?i:String(i),r)}var i}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}()),Tl=function(){this.user={},this.accessToken=null,this.refreshToken=null,this.tokenType=null,this.createdAt=null,this.expiresIn=null},Cl=/*#__PURE__*/function(){function t(){}var e=t.prototype;return e.setAuthConfig=function(t){var e=t.clientId,n=t.redirectUri;this.baseUrl=t.baseUrl,this.clientId=e,this.redirectUri=n},e.authorize=function(t){try{var e,n=this,r=new FormData,i=t.scope,s=t.refresh,a=t.code,o=t.username,c=t.password;return r.append("client_id",n.clientId),i&&r.append("scope",i),s?(r.append("grant_type","refresh_token"),r.append("refresh_token",s),r.append("redirect_uri",n.redirectUri)):a?(r.append("grant_type","authorization_code"),r.append("code",a),r.append("redirect_uri",n.redirectUri)):(r.append("grant_type","password"),r.append("username",o),r.append("password",c)),Promise.resolve(wl(n.baseUrl+"/v2/oauth2/token",{method:"POST",body:r,refresh:!!s}).then(function(t){try{var r,i;return Promise.resolve(function(){if(t){var a=function(t){if(r)return t;function a(){e.accessToken=i.access_token,e.refreshToken=i.refresh_token,e.tokenType=i.token_type,e.createdAt=i.created_at,e.expiresIn=i.expires_in}e=new Tl;var o=function(){if(!s)return Promise.resolve(n.getUserData(i)).then(function(t){e.user=t})}();return o&&o.then?o.then(a):a()},o=function(e,n){try{var s=Promise.resolve(t.json()).then(function(e){i=e,t.ok&&200===t.status||(Qt.error(i.error_description),r=1)})}catch(t){return n()}return s&&s.then?s.then(void 0,n):s}(0,function(){Qt.error(yl.translations.somethingWentWrongMessage),r=1});return o&&o.then?o.then(a):a(o)}}())}catch(t){return Promise.reject(t)}}).catch(function(t){Qt.error(t.message)})).then(function(){return e})}catch(t){return Promise.reject(t)}},e.getUserData=function(t){try{var e={method:"GET"};return t&&(e.headers={Authorization:t.token_type+" "+t.access_token}),Promise.resolve(wl(this.baseUrl+"/v2/me",e)).then(function(t){var e,n=function(){if(null!=t&&t.ok)return Promise.resolve(t.json()).then(function(t){var n=t.user;return e=1,{id:n.id,companyId:n.company_id,roleId:n.role_id,username:n.username,email:n.email,name:n.name}})}();return n&&n.then?n.then(function(t){return e?t:null}):e?n:null})}catch(t){return Promise.reject(t)}},e.signOut=function(){try{var t=new FormData;return t.append("client_id",this.clientId),Promise.resolve(wl(this.baseUrl+"/v2/oauth2/revoke",{method:"POST",body:t})).then(function(){})}catch(t){return Promise.reject(t)}},t}(),xl=/*#__PURE__*/function(){function t(){this.loading=!1,this.loginStatus={status:"unknown"},this.refreshTokenPromise=null,this.api=new Cl,this.networkError=null,o.makeObservable(this,{loading:o.observable,setLoading:o.action,loginStatus:o.observable.deep,setConnectedLoginStatus:o.action,setNotAuthorizedLoginStatus:o.action})}var e=t.prototype;return e.setLoading=function(t){this.loading=t},e.setConnectedLoginStatus=function(){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}}},e.setNotAuthorizedLoginStatus=function(){this.loginStatus={status:"not_authorized"}},e.setAuthConfig=function(t){this.api.setAuthConfig(t)},e.setNetworkError=function(t){this.networkError=t},e.isLoggedIn=function(){return Boolean(this.session)},e.requestHeaders=function(){var t={"Accept-Language":yl.locale};if(this.isLoggedIn()){var e=this.session;return pl({},t,{Authorization:e.tokenType+" "+e.accessToken})}return t},e.authorize=function(t,e){void 0===e&&(e=!0);try{var n=this;return n.setLoading(!0),Promise.resolve(n.api.authorize(t)).then(function(t){return n.setLoading(!1),t?(e&&(n.session=t,n.storeSession(),n.setCurrentUser(t.user),n.setConnectedLoginStatus()),t):null})}catch(t){return Promise.reject(t)}},e.refresh=function(){try{var t=this;return t.session&&(t.refreshTokenPromise=t.api.authorize({refresh:t.session.refreshToken}),t.refreshTokenPromise.then(function(e){e?(t.session=pl({},t.session,e,{user:t.session.user}),t.storeSession(),t.setConnectedLoginStatus(),t.refreshTokenPromise=null):(t.removeSession(),t.removeCurrentUser(),t.setNotAuthorizedLoginStatus(),t.refreshTokenPromise=null)})),Promise.resolve(t.refreshTokenPromise)}catch(t){return Promise.reject(t)}},e.recover=function(){try{var t=this;return t.session?Promise.resolve():Promise.resolve(t.restoreSession()).then(function(){var e=function(){if(t.session)return Promise.resolve(t.api.getUserData()).then(function(e){t.setCurrentUser(e),t.setConnectedLoginStatus()});t.setNotAuthorizedLoginStatus()}();if(e&&e.then)return e.then(function(){})})}catch(t){return Promise.reject(t)}},e.logout=function(){try{var t=this,e=function(){if(t.session)return Promise.resolve(t.api.signOut()).then(function(){t.removeSession(),t.removeCurrentUser(),t.setNotAuthorizedLoginStatus()})}();return Promise.resolve(e&&e.then?e.then(function(){}):void 0)}catch(t){return Promise.reject(t)}},e.storeSession=function(){try{var t=this,e={};e["access-token"]=t.session.accessToken,e["refresh-token"]=t.session.refreshToken,e["token-type"]=t.session.tokenType,e["created-at"]=t.session.createdAt,e["expires-in"]=t.session.expiresIn;var n=JSON.stringify(e);return Sl.set("authHeaders",n),Promise.resolve()}catch(t){return Promise.reject(t)}},e.restoreSession=function(){try{var t=this,e=Sl.get("authHeaders");if(!e||"null"===e)return Promise.resolve();var n=JSON.parse(e),r=new Tl;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"],t.session=r,Promise.resolve(t.api.getUserData()).then(function(e){e&&(t.session.user=e)})}catch(t){return Promise.reject(t)}},e.removeSession=function(){Sl.remove("authHeaders"),this.session=null},e.setCurrentUser=function(t){kl.setCurrentUser(t)},e.removeCurrentUser=function(){kl.removeCurrentUser()},t}(),Rl=new xl,Dl=function(){var e=t.useState(Rl.loginStatus),n=e[0],r=e[1];return t.useEffect(function(){return o.reaction(function(){return o.toJS(Rl.loginStatus)},function(){r(Rl.loginStatus)})},[]),n},Il=O.default.createContext({showModal:null,hideModal:null,isOpenedModal:!1}),Nl=function(e){var n=e.children,r=t.useState({}),i=r[0],s=r[1],a=t.useCallback(function(t,e){s(function(e){var n;return pl({},e,((n={})[t]=pl({},e[t],{isOpen:!1}),n))}),e&&e()},[s]),o=t.useCallback(function(t,e,n){s(function(r){var i;return pl({},r,((i={})[t]={isOpen:!0,component:e,data:n},i))})},[s]),c=t.useMemo(function(){return{showModal:o,hideModal:a,isOpenedModal:Object.values(i).some(function(t){return t.isOpen})}},[a,o,i]);/*#__PURE__*/return O.default.createElement(Il.Provider,{value:c},n,Object.keys(i).map(function(t){var e=i[t],n=e.isOpen;return n&&/*#__PURE__*/O.default.createElement(e.component,pl({onClose:function(){return a(t)},key:t,isOpen:n},e.data))}))},Ol=(bl=0,function(){return""+ ++bl});function Ul(e,n,r){var i=t.useMemo(Ol,[]),s=t.useContext(Il);return[t.useCallback(function(t){return s.showModal(i,e,t instanceof Event?n:pl({},n,t))},[n,s.showModal]),t.useCallback(function(){return s.hideModal(i,r)},[s.hideModal,r,i])]}Ul.ModalContext=Il,Ul.ModalProvider=Nl;var Al={root:{height:"100vh",paddingTop:"70px",mixBlendMode:"color",background:"#1E1E1E"},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);"}},Bl=function(t){/*#__PURE__*/return O.default.createElement(l.Container,{maxWidth:!1,disableGutters:!0,sx:Al.root},/*#__PURE__*/O.default.createElement(l.Card,{style:{background:"linear-gradient(180deg, #393939 0%, #4A4A4A 100%)",maxWidth:"650px",margin:"200px auto",borderRadius:"20px"}},/*#__PURE__*/O.default.createElement(l.CardContent,{style:{minHeight:"unset"}},/*#__PURE__*/O.default.createElement(l.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",m:"125px 80px"},/*#__PURE__*/O.default.createElement(l.Typography,{variant:"h4",sx:{display:"flex",alignItems:"center",marginBottom:"40px",color:"rgba(255, 255, 255, 0.6)"}},yl.translations.somethingWentWrongMessage,/*#__PURE__*/O.default.createElement(l.Tooltip,{title:t.error.toString(),arrow:!0},/*#__PURE__*/O.default.createElement(B.default,{sx:{marginLeft:"1em",fontSize:"inherit"}}))),/*#__PURE__*/O.default.createElement(l.Button,{onClick:function(){return window.location.reload()}},yl.translations.networkErrorButtonText)))),/*#__PURE__*/O.default.createElement(l.Box,{sx:Al.overlay}))};Bl.propTypes={error:a.PropTypes.any,componentStack:a.PropTypes.any},Bl.defaultProps={};var Ml=t.createContext(),Pl=function(t){/*#__PURE__*/return O.default.createElement(Ml.Provider,{value:t.config},t.children)},Ll=function(){return t.useContext(Ml)},Hl=new(/*#__PURE__*/function(){function t(){this.appReady=!1,this.sentryReady=!1,o.makeAutoObservable(this)}var e=t.prototype;return e.setAppReady=function(){this.appReady=!0},e.setSentryReady=function(){this.sentryReady=!0},t}()),zl=i.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:"#1E1E1E",primary:{light:"#156bd1",main:"#155ed1",dark:"#1551d1",contrastText:"rgba(255,255,255,0.85)"},secondary:{light:"#656565",main:"#595959",dark:"#4d4d4d",contrastText:"rgba(255,255,255,0.85)"}},typography:{fontFamily:"'Inter', system-ui",fontWeightLight:"400",fontWeightRegular:"500",fontWeightMedium:"600",button:{textTransform:"none"}}}),Gl=i.createTheme(zl,{components:{MuiBackdrop:{styleOverrides:{root:{marginTop:70}}},MuiButton:{defaultProps:{variant:"contained",disableElevation:!0},styleOverrides:{root:{fontWeight:"normal",borderRadius:6}}},MuiLoadingButton:{defaultProps:{variant:"contained",disableElevation:!0},styleOverrides:{root:{fontWeight:"normal",borderRadius:6}}},MuiCardHeader:{styleOverrides:{root:{color:"rgba(255,255,255,0.85)",background:"linear-gradient(180deg, #4A4A4A 0%, #3F3F3F 100%)"},subheader:{marginTop:"0.5em",color:"rgba(255,255,255,0.5)"}}},MuiPaper:{styleOverrides:{rounded:{borderRadius:"20px"}}},MuiCard:{styleOverrides:{root:{borderRadius:"4px",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.25)"}}},MuiCardContent:{styleOverrides:{root:{background:"rgba(45, 45, 45, 1)","&:last-child":{paddingBottom:16}}}},MuiDialogTitle:{styleOverrides:{root:{textAlign:"center",color:"white",background:"linear-gradient(#4a4a4a 0%, #3e3e3e 100%)"}}},MuiDialogContent:{styleOverrides:{root:{minWidth:550,padding:"16px 24px",background:"linear-gradient(180deg, #393939 0%, #4A4A4A 100%)"}}},MuiDialogContentText:{styleOverrides:{root:{textAlign:"center",color:"white"}}},MuiMenu:{styleOverrides:{paper:{background:"#2d2d2d"}}},MuiMenuItem:{styleOverrides:{root:{color:"white"}}},MuiFormControl:{styleOverrides:{root:{alignItems:"center"}}},MuiOutlinedInput:{styleOverrides:{root:{color:"white","&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"rgba(255,255,255,0.35)"}},notchedOutline:{borderColor:"rgba(255,255,255,0.25)"},input:{padding:"13px 16px",background:"transparent",color:"white",borderColor:"white"}}}}}),Yl=function(t){/*#__PURE__*/return O.default.createElement(l.Box,{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100vh"},/*#__PURE__*/O.default.createElement("img",{"data-testid":t["data-testid"],alt:"loader",width:t.width,src:M.default}))},$l=function(t){var e=t.error;/*#__PURE__*/return O.default.createElement(l.Container,{maxWidth:!1,disableGutters:!0,sx:Al.root},/*#__PURE__*/O.default.createElement(l.Card,{style:{background:"linear-gradient(180deg, #393939 0%, #4A4A4A 100%)",maxWidth:"600px",margin:"200px auto",borderRadius:"20px"}},/*#__PURE__*/O.default.createElement(l.CardContent,{style:{minHeight:"unset"}},/*#__PURE__*/O.default.createElement(l.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",m:"125px 80px"},/*#__PURE__*/O.default.createElement("h1",{style:{textAlign:"center",color:"rgba(255, 255, 255, 0.6)"}},yl.translations.networkErrorHeader),/*#__PURE__*/O.default.createElement("p",{style:{display:"inline-flex",textAlign:"center",color:"rgba(255, 255, 255, 0.6)"}},/*#__PURE__*/O.default.createElement(l.Typography,{mr:2},e.title),/*#__PURE__*/O.default.createElement(l.Tooltip,{title:e.details,arrow:!0},/*#__PURE__*/O.default.createElement(B.default,null))),/*#__PURE__*/O.default.createElement(l.Button,{onClick:function(){return window.location.reload()}},yl.translations.networkErrorButtonText)))),/*#__PURE__*/O.default.createElement(l.Box,{sx:Al.overlay}))},Fl=function(){var n=new URLSearchParams(e.useLocation().search),r=n.get("next");return t.useEffect(function(){var t=n.get("code");t&&Rl.authorize({code:t})},[n]),Rl.isLoggedIn()?/*#__PURE__*/O.default.createElement(e.Navigate,{to:r}):null};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var jl=function(t){var e={exports:{}};return function(t,e){var n;t.exports=(n={attachTo:function(t,e){if(void 0!==t.scannerDetectionData)throw new Error("onScan.js is already initialized for DOM element "+t);return e=this._mergeOptions({onScan:function(t,e){},onScanError:function(t){},onKeyProcess:function(t,e){},onKeyDetect:function(t,e){},onPaste:function(t,e){},keyCodeMapper:function(t){return n.decodeKeyEvent(t)},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},e),t.scannerDetectionData={options:e,vars:{firstCharTime:0,lastCharTime:0,accumulatedString:"",testTimer:!1,longPressTimeStart:0,longPressed:!1}},!0===e.reactToPaste&&t.addEventListener("paste",this._handlePaste,e.captureEvents),!1!==e.scanButtonKeyCode&&t.addEventListener("keyup",this._handleKeyUp,e.captureEvents),!0!==e.reactToKeydown&&!1===e.scanButtonKeyCode||t.addEventListener("keydown",this._handleKeyDown,e.captureEvents),this},detachFrom:function(t){t.scannerDetectionData.options.reactToPaste&&t.removeEventListener("paste",this._handlePaste),!1!==t.scannerDetectionData.options.scanButtonKeyCode&&t.removeEventListener("keyup",this._handleKeyUp),t.removeEventListener("keydown",this._handleKeyDown),t.scannerDetectionData=void 0},getOptions:function(t){return t.scannerDetectionData.options},setOptions:function(t,e){switch(t.scannerDetectionData.options.reactToPaste){case!0:!1===e.reactToPaste&&t.removeEventListener("paste",this._handlePaste);break;case!1:!0===e.reactToPaste&&t.addEventListener("paste",this._handlePaste)}return!1===t.scannerDetectionData.options.scanButtonKeyCode?!1!==e.scanButtonKeyCode&&t.addEventListener("keyup",this._handleKeyUp):!1===e.scanButtonKeyCode&&t.removeEventListener("keyup",this._handleKeyUp),t.scannerDetectionData.options=this._mergeOptions(t.scannerDetectionData.options,e),this._reinitialize(t),this},decodeKeyEvent:function(t){var e=this._getNormalizedKeyNum(t);switch(!0){case e>=48&&e<=90:case e>=106&&e<=111:if(void 0!==t.key&&""!==t.key)return t.key;var n=String.fromCharCode(e);switch(t.shiftKey){case!1:n=n.toLowerCase();break;case!0:n=n.toUpperCase()}return n;case e>=96&&e<=105:return e-96+0}return""},simulate:function(t,e){return this._reinitialize(t),Array.isArray(e)?e.forEach(function(t){var e={};"object"!=typeof t&&"function"!=typeof t||null===t?e.keyCode=parseInt(t):e=t;var n=new KeyboardEvent("keydown",e);document.dispatchEvent(n)}):this._validateScanCode(t,e),this},_reinitialize:function(t){var e=t.scannerDetectionData.vars;e.firstCharTime=0,e.lastCharTime=0,e.accumulatedString=""},_isFocusOnIgnoredElement:function(t){var e=t.scannerDetectionData.options.ignoreIfFocusOn;if(!e)return!1;var n=document.activeElement;if(Array.isArray(e)){for(var r=0;r<e.length;r++)if(!0===n.matches(e[r]))return!0}else if(n.matches(e))return!0;return!1},_validateScanCode:function(t,e){var r,i=t.scannerDetectionData,s=i.options,a=i.options.singleScanQty,o=i.vars.firstCharTime,c=i.vars.lastCharTime,l={};switch(!0){case e.length<s.minLength:l={message:"Receieved code is shorter then minimal length"};break;case c-o>e.length*s.avgTimeByChar:l={message:"Receieved code was not entered in time"};break;default:return s.onScan.call(t,e,a),r=new CustomEvent("scan",{detail:{scanCode:e,qty:a}}),t.dispatchEvent(r),n._reinitialize(t),!0}return l.scanCode=e,l.scanDuration=c-o,l.avgTimeByChar=s.avgTimeByChar,l.minLength=s.minLength,s.onScanError.call(t,l),r=new CustomEvent("scanError",{detail:l}),t.dispatchEvent(r),n._reinitialize(t),!1},_mergeOptions:function(t,e){var n,r={};for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},_getNormalizedKeyNum:function(t){return t.which||t.keyCode},_handleKeyDown:function(t){var e=n._getNormalizedKeyNum(t),r=this.scannerDetectionData.options,i=this.scannerDetectionData.vars,s=!1;if(!1!==r.onKeyDetect.call(this,e,t)&&!n._isFocusOnIgnoredElement(this))if(!1===r.scanButtonKeyCode||e!=r.scanButtonKeyCode){switch(!0){case i.firstCharTime&&-1!==r.suffixKeyCodes.indexOf(e):t.preventDefault(),t.stopImmediatePropagation(),s=!0;break;case!i.firstCharTime&&-1!==r.prefixKeyCodes.indexOf(e):t.preventDefault(),t.stopImmediatePropagation(),s=!1;break;default:var a=r.keyCodeMapper.call(this,t);if(null===a)return;i.accumulatedString+=a,r.preventDefault&&t.preventDefault(),r.stopPropagation&&t.stopImmediatePropagation(),s=!1}i.firstCharTime||(i.firstCharTime=Date.now()),i.lastCharTime=Date.now(),i.testTimer&&clearTimeout(i.testTimer),s?(n._validateScanCode(this,i.accumulatedString),i.testTimer=!1):i.testTimer=setTimeout(n._validateScanCode,r.timeBeforeScanTest,this,i.accumulatedString),r.onKeyProcess.call(this,a,t)}else i.longPressed||(i.longPressTimer=setTimeout(r.onScanButtonLongPress,r.scanButtonLongPressTime,this),i.longPressed=!0)},_handlePaste:function(t){var e=this.scannerDetectionData.options,r=this.scannerDetectionData.vars,i=(event.clipboardData||window.clipboardData).getData("text");n._isFocusOnIgnoredElement(this)||(t.preventDefault(),e.stopPropagation&&t.stopImmediatePropagation(),e.onPaste.call(this,i,event),r.firstCharTime=0,r.lastCharTime=0,n._validateScanCode(this,i))},_handleKeyUp:function(t){n._isFocusOnIgnoredElement(this)||n._getNormalizedKeyNum(t)==this.scannerDetectionData.options.scanButtonKeyCode&&(clearTimeout(this.scannerDetectionData.vars.longPressTimer),this.scannerDetectionData.vars.longPressed=!1)},isScanInProgressFor:function(t){return t.scannerDetectionData.vars.firstCharTime>0},isAttachedTo:function(t){return void 0!==t.scannerDetectionData}},n)}(e),e.exports}(),Vl=function(n){var r=n.scope,i=n.redirectPath,s=n.onSuccess,a=n.onFailure,o=n.onCancel,c=n.storeSession,u=n.title,d=n["data-testid"],p=t.useState(""),f=p[0],_=p[1],m=t.useState(""),g=m[0],y=m[1],v=e.useNavigate(),b=function(t){try{return Promise.resolve(Rl.authorize(pl({scope:r},t),c)).then(function(t){t?(s&&"function"==typeof s&&s(t),y(""),v(i)):a&&"function"==typeof a&&a()})}catch(t){return Promise.reject(t)}};t.useEffect(function(){return jl.attachTo(document,{suffixKeyCodes:[13],onScan:function(t){_(""),y(""),b({username:"code",password:t})}}),function(){jl.detachFrom(document)}},[]);var E=function(t){try{return t.preventDefault(),b({username:f,password:g}),Promise.resolve()}catch(t){return Promise.reject(t)}};/*#__PURE__*/return O.default.createElement("form",{onSubmit:E,"data-testid":d||"ac-sdk-login-form"},/*#__PURE__*/O.default.createElement(l.Box,{m:"0 80px"},/*#__PURE__*/O.default.createElement(l.Box,{display:"flex",alignItems:"center",justifyContent:"center",m:"100px 0"},/*#__PURE__*/O.default.createElement(Jl,null)),/*#__PURE__*/O.default.createElement(l.Box,{m:"0 0 30px 0",color:"rgba(255, 255, 255, 0.6)"},/*#__PURE__*/O.default.createElement(l.Typography,{align:"center",color:"inherit"},u)),/*#__PURE__*/O.default.createElement(l.Box,{m:"0",display:"grid",sx:{gridGap:"18px"},gridTemplateColumns:"1fr"},/*#__PURE__*/O.default.createElement(l.FormControl,{fullWidth:!0},/*#__PURE__*/O.default.createElement(l.TextField,{autoFocus:!0,fullWidth:!0,variant:"outlined",placeholder:yl.translations.loginCardUsernameHint,onChange:function(t){_(t.target.value)},value:f,id:"login-input",inputProps:{"data-testid":"ac-sdk-login-form-username-input"}})),/*#__PURE__*/O.default.createElement(l.FormControl,{fullWidth:!0},/*#__PURE__*/O.default.createElement(l.TextField,{fullWidth:!0,variant:"outlined",placeholder:yl.translations.loginCardPasswordHint,onChange:function(t){y(t.target.value)},value:g,type:"password",id:"password-input",inputProps:{"data-testid":"ac-sdk-login-form-password-input"}})),/*#__PURE__*/O.default.createElement(h.LoadingButton,{id:"login-button",type:"submit",size:"large",color:"primary",onClick:E,loading:Rl.loading,"data-testid":"ac-sdk-login-form-submit-button"},yl.translations.loginCardSubmitButton),/*#__PURE__*/O.default.createElement(l.Button,{id:"cancel-button",type:"button",size:"large",color:"secondary",onClick:function(t){o&&"function"==typeof o?o():v("/")},"data-testid":"ac-sdk-login-form-cancel-button"},yl.translations.loginCardCancelButton)),/*#__PURE__*/O.default.createElement(l.Box,{m:"30px 0 40px 0",color:"rgba(255, 255, 255, 0.6)"},/*#__PURE__*/O.default.createElement(l.Typography,{align:"center",color:"inherit"},"or scan")),/*#__PURE__*/O.default.createElement(l.Box,{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",alignItems:"center",justifyItems:"center",marginBottom:"30px"},/*#__PURE__*/O.default.createElement(l.Box,{style:{filter:"brightness(0.5)"}},/*#__PURE__*/O.default.createElement(ql,null)),/*#__PURE__*/O.default.createElement(Wl,null),/*#__PURE__*/O.default.createElement(l.Box,{style:{filter:"brightness(0.5)"}},/*#__PURE__*/O.default.createElement(Kl,null)))))};Vl.propTypes={scope:a.PropTypes.string,redirectPath:a.PropTypes.string,onSuccess:a.PropTypes.func,onFailure:a.PropTypes.func,onCancel:a.PropTypes.func,storeSession:a.PropTypes.bool},Vl.defaultProps={redirectPath:"/",storeSession:!0};var Zl=s.observer(Vl),ql=function(){/*#__PURE__*/return O.default.createElement("svg",{width:"51",height:"53",viewBox:"0 0 51 53",fill:"none",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/O.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__*/O.default.createElement("g",{clipPath:"url(#clip0_2183_35009)"},/*#__PURE__*/O.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__*/O.default.createElement("path",{d:"M19.1081 6.47128H17.4688V8.11102H19.1081V6.47128Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.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__*/O.default.createElement("path",{d:"M35.7147 17.5176H34.0754V23.081H32.4653V21.8366H30.826V23.0591H28.8281V24.6988H35.7147V17.5176Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M19.1081 19.8893H17.4688V21.529H19.1081V19.8893Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.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__*/O.default.createElement("path",{d:"M32.5221 6.47128H30.8828V8.11102H32.5221V6.47128Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M22.3014 13.184H17.5664V14.8237H22.3014V13.184Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M15.9167 13.184H14.2773V14.8237H15.9167V13.184Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M30.041 13.184H23.9375V14.8237H30.041V13.184Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M35.7121 15.8778V13.1766H31.6797V14.8237H34.0728V15.8778H35.7121Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M25.819 6.56622H24.1797V11.3024H25.819V6.56622Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M25.819 3.27948H24.1797V4.91922H25.819V3.27948Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.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__*/O.default.createElement("path",{d:"M29.1874 19.5598H30.8267V18.3373H32.1587V16.7122H27.8555V18.352H29.1874V19.5598Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.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__*/O.default.createElement("path",{d:"M12.6408 1.63985H16.7391V0.00012207H11.0234V5.73188H12.6627L12.6408 1.63985Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M37.3678 26.3603H33.2695V28.0001H39.0071V22.261H37.3678V26.3603Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M12.6408 22.261H11.0234V28.0001H16.761V26.3603H12.6627L12.6408 22.261Z",fill:"white",fillOpacity:"0.35"})),/*#__PURE__*/O.default.createElement("defs",null,/*#__PURE__*/O.default.createElement("clipPath",{id:"clip0_2183_35009"},/*#__PURE__*/O.default.createElement("rect",{width:"28",height:"28",fill:"white",transform:"translate(11 0.00012207)"}))))},Wl=function(){/*#__PURE__*/return O.default.createElement("svg",{width:"52",height:"49",viewBox:"0 0 52 49",fill:"none",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/O.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__*/O.default.createElement("g",{clipPath:"url(#clip0_2183_35008)"},/*#__PURE__*/O.default.createElement("path",{d:"M47 9.00012H7V10.0001H47V9.00012Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M43 0.00012207H42V7.00012H43V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M43 12.0001H42V19.0001H43V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M41 12.0001H39V19.0001H41V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M41 0.00012207H39V7.00012H41V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M38 0.00012207H35V7.00012H38V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M38 12.0001H35V19.0001H38V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M33 12.0001H31V19.0001H33V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M33 0.00012207H31V7.00012H33V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M30 0.00012207H28V7.00012H30V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M30 12.0001H28V19.0001H30V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M27 0.00012207H26V7.00012H27V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M27 12.0001H26V19.0001H27V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M25 0.00012207H24V7.00012H25V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M25 12.0001H24V19.0001H25V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M23 0.00012207H20V7.00012H23V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M23 12.0001H20V19.0001H23V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M18 0.00012207H16V7.00012H18V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M18 12.0001H16V19.0001H18V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M15 12.0001H14V19.0001H15V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M15 0.00012207H14V7.00012H15V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M13 0.00012207H10V7.00012H13V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M13 12.0001H10V19.0001H13V12.0001Z",fill:"white",fillOpacity:"0.35"})),/*#__PURE__*/O.default.createElement("defs",null,/*#__PURE__*/O.default.createElement("clipPath",{id:"clip0_2183_35008"},/*#__PURE__*/O.default.createElement("rect",{width:"40",height:"20",fill:"white",transform:"translate(7 0.00012207)"}))))},Kl=function(){/*#__PURE__*/return O.default.createElement("svg",{width:"58",height:"49",viewBox:"0 0 58 49",fill:"none",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/O.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__*/O.default.createElement("g",{clipPath:"url(#clip0_2183_35036)"},/*#__PURE__*/O.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__*/O.default.createElement("defs",null,/*#__PURE__*/O.default.createElement("clipPath",{id:"clip0_2183_35036"},/*#__PURE__*/O.default.createElement("rect",{width:"26",height:"20",fill:"white",transform:"translate(16 0.00012207)"}))))},Jl=function(){/*#__PURE__*/return O.default.createElement("svg",{width:"98",height:"50",viewBox:"0 0 98 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/O.default.createElement("g",{opacity:"0.25"},/*#__PURE__*/O.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__*/O.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__*/O.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__*/O.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__*/O.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__*/O.default.createElement("path",{d:"M30.1227 48.8867H23.1055V31.6463H25.6974V46.342H30.1859L30.1227 48.8867Z",fill:"white"}),/*#__PURE__*/O.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__*/O.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__*/O.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__*/O.default.createElement("path",{d:"M87.2555 1.49487L92.7555 20.0713V1.49487H96.9279V29.1686H92.5027L86.813 11.4193V29.1686H82.6406V1.49487H87.2555Z",fill:"white"})))},Xl=function(t){var e=t.subtitle,n=t.onCancel;/*#__PURE__*/return O.default.createElement(P.default,{open:t.open,onClose:n,disableEscapeKeyDown:!0,"data-testid":t["data-testid"]||"ac-sdk-login-modal"},/*#__PURE__*/O.default.createElement(L.default,null,/*#__PURE__*/O.default.createElement(Zl,{title:void 0!==e?e:yl.translations.loginCardSubtitle,scope:t.scope,redirectPath:t.redirectPath,onSuccess:t.onSuccess,onFailure:t.onFailure,onCancel:n,storeSession:t.storeSession})))};Xl.propTypes={title:a.PropTypes.string,subtitle:a.PropTypes.string,scope:a.PropTypes.string,redirectPath:a.PropTypes.string,onSuccess:a.PropTypes.func,onFailure:a.PropTypes.func,onCancel:a.PropTypes.func,storeSession:a.PropTypes.bool},Xl.defaultProps={redirectPath:"/",storeSession:!1};var Ql=s.observer(Xl),tu=function(e){var n=e.isOpen,r=e.title,i=e.subtitle,s=e.scope,a=e.redirectPath,o=e.onSuccess,c=e.onFailure,l=e.onCancel,u=e.storeSession,d=void 0===u||u,p=t.useState(n),h=p[0],f=p[1];return t.useEffect(function(){f(n)},[n]),/*#__PURE__*/O.default.createElement(Ql,{open:h,title:r,subtitle:i,scope:s,redirectPath:a,onSuccess:function(t){o&&"function"==typeof o&&o(t),f(!1)},onFailure:c,onCancel:function(){l&&"function"==typeof l&&l(),f(!1)},storeSession:d})},eu=function(t,e){void 0===e&&(e={});var n=Ll(),r=n.loginUrl,i=n.clientId,s=n.grantType,a=n.redirectUri,o=n.redirectPath,c=Ul(tu,pl({scope:t},e))[0],l=encodeURIComponent(a+"?next="+(e.redirectPath||o));return"password"===s?function(){c({key:(new Date).getTime()})}:function(){window.location.assign(r+"?response_type=code&client_id="+i+"&redirect_uri="+l+"&scope="+t)}},nu=function(n){var r=n.position,i=n.scrolled,s=n.showAcLogo,a=n.leadingText,o=n.title,c=n.titleStyles,l=n.navProps,u=n.userProps,d=n.menuProps,p=n.styles,h=n["data-testid"],f=Ll().baseUrl,_=pl({items:[]},l).items,m=pl({show:!0,showCompanyLogo:!1},u),g=m.show,y=m.showCompanyLogo,v=pl({items:[],buttonColor:"white",dropdownStyles:{},styles:{}},d),b=v.items,E=v.buttonColor,S=v.dropdownStyles,w=v.styles,k=t.useState(new Date),T=k[0],C=k[1],x=t.useState(null),R=x[0],D=x[1],I=function(t){var e=t.titleStyles,n=t.menuStyles,r=t.menuDropdownStyles;return{root:pl({padding:"10px 0",color:"rgba(255,255,255,0.85)",background:"transparent"},t.styles),title:pl({flexGrow:1},e),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:"rgba(79, 79, 79, 1)",boxShadow:"0px 2px 5px rgba(0, 0, 0, 0.28)",borderRadius:"4px","&:hover":{backgroundColor:"rgba(79, 79, 79, 1)",filter:"brightness(1.1)"}},loginButton:{padding:"6px 18px"},logoutButton:{paddingRight:"18px"},menu:pl({marginTop:"70px",backgroundColor:"rgba(0,0,0,0.5)"},n,{"& .MuiPaper-root":pl({minWidth:"20%",backgroundColor:"#2d2d2d",color:"white"},r)})}}({styles:p,titleStyles:c,menuStyles:w,menuDropdownStyles:S}),N=e.useNavigate();t.useEffect(function(){var t=setInterval(function(){C(new Date)},1e3);return function(){return clearInterval(t)}});var U,A,B=function(){D(null)},M=function(t){t.url?N(t.url):t.action&&"function"==typeof t.action&&t.action(),B()};/*#__PURE__*/return O.default.createElement(j.default,{position:r,elevation:0,sx:pl({},I.root,"static"===r?{marginTop:"-70px"}:{},i?{background:"#1E1E1E"}:{}),"data-testid":h||"ac-sdk-header"},/*#__PURE__*/O.default.createElement(K.default,{variant:"dense"},s&&/*#__PURE__*/O.default.createElement(e.Link,{to:"/"},/*#__PURE__*/O.default.createElement("img",{src:X.default,alt:"AndonCloud",style:{display:"block",marginLeft:"-4px"}})),a&&/*#__PURE__*/O.default.createElement(J.default,{variant:"subtitle1"},a),/*#__PURE__*/O.default.createElement(J.default,{variant:"subtitle1",align:"center",style:{flexGrow:1},sx:I.title},o),_&&/*#__PURE__*/O.default.createElement(H.default,{display:"flex",sx:I.nav},_.map(function(t){/*#__PURE__*/return O.default.createElement(V.default,{key:t.label,onClick:function(){return M(t)},endIcon:t.icon,sx:I.button},t.label)})),g&&/*#__PURE__*/O.default.createElement(H.default,{display:"flex",sx:I.user},kl.getCurrentUserJS?/*#__PURE__*/O.default.createElement(V.default,{id:"logout-button",onClick:function(){try{return Promise.resolve(Rl.logout()).then(function(){N("/")})}catch(t){return Promise.reject(t)}},sx:pl({},I.button,I.logoutButton),"data-testid":"ac-sdk-header-logout-button"},yl.translations.headerLogoutButton,y&&(A=function(){var t="",e=kl.getCurrentUserJS;return null===e?t:f+"/"+(t=e.company.logo_url)}(),/*#__PURE__*/O.default.createElement("img",{src:A,alt:""})),/*#__PURE__*/O.default.createElement(H.default,{display:"inline-block",sx:I.userInfo},(U=kl.currentUser)&&"("+U.name+")")):/*#__PURE__*/O.default.createElement(V.default,{id:"login-button",onClick:function(){return N("/login")},sx:pl({},I.button,I.loginButton),"data-testid":"ac-sdk-header-login-button"},yl.translations.headerLoginButton)),/*#__PURE__*/O.default.createElement($.default,null),/*#__PURE__*/O.default.createElement(J.default,{variant:"body1",align:"center",style:{width:"5rem",padding:"0 5px"}},T.toLocaleTimeString()),b&&/*#__PURE__*/O.default.createElement(H.default,null,/*#__PURE__*/O.default.createElement(Z.default,{onClick:function(t){D(t.currentTarget)}},/*#__PURE__*/O.default.createElement(F.default,{style:E?{color:E}:{}})),/*#__PURE__*/O.default.createElement(q.default,{id:"menu-appbar",marginThreshold:0,anchorEl:R,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(R),onClose:B,sx:I.menu},b.map(function(t){/*#__PURE__*/return O.default.createElement(W.default,{key:t.label,onClick:function(){return M(t)}},t.label)})))))};nu.propTypes={position:a.PropTypes.string,scrolled:a.PropTypes.bool,showAcLogo:a.PropTypes.bool,leadingText:a.PropTypes.string,title:a.PropTypes.string,titleStyles:a.PropTypes.any,navProps:a.PropTypes.shape({items:a.PropTypes.any}),userProps:a.PropTypes.shape({show:a.PropTypes.bool,showCompanyLogo:a.PropTypes.bool}),menuProps:a.PropTypes.shape({items:a.PropTypes.any,buttonColor:a.PropTypes.string,dropdownStyles:a.PropTypes.any,styles:a.PropTypes.any}),styles:a.PropTypes.any},nu.defaultProps={navProps:{},userProps:{},menuProps:{},styles:{}};var ru=s.observer(nu),iu=function(e){var n=e.children,r=e.headerProps,i=e.styles,s=e["data-testid"],a=t.useState(),o=a[1],c=l.useScrollTrigger({disableHysteresis:!0,target:a[0],threshold:0});/*#__PURE__*/return O.default.createElement(Y.default,{ref:function(t){t&&o(t)},maxWidth:!1,disableGutters:!0,sx:pl({},Al.root,i),"data-testid":s||"ac-sdk-container"},/*#__PURE__*/O.default.createElement(ru,pl({scrolled:c,showAcLogo:!0},r)),n,/*#__PURE__*/O.default.createElement(l.Box,{sx:Al.overlay}))};iu.propTypes={children:a.PropTypes.any,headerProps:a.PropTypes.shape({position:a.PropTypes.string,showAcLogo:a.PropTypes.bool,leadingText:a.PropTypes.string.isRequired,title:a.PropTypes.string,navProps:a.PropTypes.shape({items:a.PropTypes.any}),userProps:a.PropTypes.shape({show:a.PropTypes.bool,showCompanyLogo:a.PropTypes.bool}),menuProps:a.PropTypes.shape({items:a.PropTypes.any,buttonColor:a.PropTypes.string,dropdownStyles:a.PropTypes.any,styles:a.PropTypes.any}),styles:a.PropTypes.any}),styles:a.PropTypes.any},iu.defaultProps={headerProps:{}};var su=function(t){/*#__PURE__*/return O.default.createElement(iu,{headerProps:{position:"static",leadingText:"AndonCloud Software",userProps:{show:!1},menuProps:{items:[{label:yl.translations.changeLanguageText,action:function(){yl.setLocale("pl"===yl.locale?"en":"pl")}}],buttonColor:"white"}}},/*#__PURE__*/O.default.createElement(H.default,{display:"flex",height:"100%",alignItems:"center",justifyContent:"center"},/*#__PURE__*/O.default.createElement(z.default,{sx:{borderRadius:"20px"}},/*#__PURE__*/O.default.createElement(G.default,null,/*#__PURE__*/O.default.createElement(Zl,{title:yl.translations.loginFormText,redirectPath:t.redirectPath})))))};su.propTypes={redirectPath:a.PropTypes.string},su.defaultProps={redirectPath:"/"};var au=s.observer(su),ou=function(){var t=Ll(),n=t.grantType,r=t.redirectPath,i=eu("read write"),s=e.useNavigate();return"password"===n?/*#__PURE__*/O.default.createElement(au,{redirectPath:r}):(s("/"),i(),null)},cu=function(t){if(!(rl&&il&&sl&&al&&ol&&cl))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn(`reactRouterV6Instrumentation was unable to wrap Routes because of one or more missing parameters.\n useEffect: ${rl}. useLocation: ${il}. useNavigationType: ${sl}.\n createRoutesFromChildren: ${al}. matchRoutes: ${ol}. customStartTransaction: ${cl}.`),t;let e=!0;const n=n=>{const r=il(),i=sl();return rl(()=>{const t=al(n.children);e?(function(t,e,n){const r=Array.isArray(n)?n:ol(e,t);nl&&r&&nl.setName(...dl(e,t,r))}(r,t),e=!1):function(t,e,n,r){const i=Array.isArray(r)?r:ol(e,t);if(ll&&("PUSH"===n||"POP"===n)&&i){nl&&nl.finish();const[n,r]=dl(e,t,i);nl=cl({name:n,op:"navigation",tags:ul,metadata:{source:r}})}}(r,t,i)},[r,i]),N.createElement(t,{...n,__self:this,__source:{fileName:"/home/runner/work/sentry-javascript/sentry-javascript/packages/react/src/reactrouterv6.tsx",lineNumber:197}})};return Jc(n,t),n}(e.Routes),lu=function(t){/*#__PURE__*/return O.default.createElement(e.BrowserRouter,null,/*#__PURE__*/O.default.createElement(cu,null,t.children,/*#__PURE__*/O.default.createElement(e.Route,{exact:!0,path:"/login",element:/*#__PURE__*/O.default.createElement(ou,null)}),/*#__PURE__*/O.default.createElement(e.Route,{path:"/oauth2/redirect",element:/*#__PURE__*/O.default.createElement(Fl,null)})))},uu=s.observer(function(n){var r=n.children,s=n.baseUrl,a=n.authProps,o=n.sentryProps,c=n.muiTheme,l=Dl().status,u=pl({enabled:!0,redirectPath:"/"},a),d=u.enabled;return Rl.setAuthConfig({baseUrl:s,clientId:u.clientId,redirectUri:u.redirectUri}),t.useEffect(function(){var n,r,i,s,a,c;!Hl.sentryReady&&o&&((n=pl({tracesSampleRate:1,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1,integrations:[new hl.BrowserTracing({routingInstrumentation:(r=t.useEffect,i=e.useLocation,s=e.useNavigationType,a=e.createRoutesFromChildren,c=e.matchRoutes,(t,e=!0,n=!0)=>{const o=ei&&ei.location&&ei.location.pathname;e&&o&&(nl=t({name:o,op:"pageload",tags:ul,metadata:{source:"url"}})),rl=r,il=i,sl=s,ol=c,al=a,cl=t,ll=n})}),new tc]},o))._metadata=n._metadata||{},n._metadata.sdk=n._metadata.sdk||{name:"sentry.javascript.react",packages:[{name:"npm:@sentry/react",version:Wr}],version:Wr},function(t={}){void 0===t.defaultIntegrations&&(t.defaultIntegrations=Ji),void 0===t.release&&("string"==typeof __SENTRY_RELEASE__&&(t.release=__SENTRY_RELEASE__),ei.SENTRY_RELEASE&&ei.SENTRY_RELEASE.id&&(t.release=ei.SENTRY_RELEASE.id)),void 0===t.autoSessionTracking&&(t.autoSessionTracking=!0),void 0===t.sendClientReports&&(t.sendClientReports=!0);const e={...t,stackParser:(n=t.stackParser||Di,Array.isArray(n)?Fe(...n):n),integrations:Lr(t),transport:t.transport||(qe()?bi:Ei)};var n;!function(t,e){!0===e.debug&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?De.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));const n=fr();n.getScope().update(e.initialScope);const r=new t(e);n.bindClient(r)}(yi,e),t.autoSessionTracking&&function(){if(void 0===ei.document)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn("Session tracking in non-browser environment with @sentry/browser is not supported."));const t=fr();t.captureSession&&(Qi(t),en("history",({from:t,to:e})=>{void 0!==t&&t!==e&&Qi(fr())}))}()}(n),Hl.setSentryReady())},[Hl,Hl.sentryReady,o]),t.useEffect(function(){d?function(){try{var t=function(){if(d)return Promise.resolve(Rl.recover()).then(function(){})}();return Promise.resolve(t&&t.then?t.then(function(){}):void 0)}catch(t){return Promise.reject(t)}}():Hl.setAppReady()},[Hl,d]),t.useEffect(function(){d&&"unknown"!==l&&Hl.setAppReady()},[Hl,d,l]),/*#__PURE__*/O.default.createElement(i.ThemeProvider,{theme:i.createTheme(c)},/*#__PURE__*/O.default.createElement(U.default,null),/*#__PURE__*/O.default.createElement(A.default,{styles:{"::-webkit-scrollbar":{width:"6px"},"::-webkit-scrollbar-track":{backgroundColor:"transparent"},"::-webkit-scrollbar-thumb":{borderRadius:"3px",backgroundColor:"rgba(255, 255, 255, 0.25)"}}}),/*#__PURE__*/O.default.createElement(el,{fallback:function(t){/*#__PURE__*/return O.default.createElement(Bl,t)}},/*#__PURE__*/O.default.createElement(Xt,null),/*#__PURE__*/O.default.createElement(Pl,{config:pl({baseUrl:s},a)},Rl.networkError?/*#__PURE__*/O.default.createElement($l,{error:Rl.networkError}):Hl.appReady?/*#__PURE__*/O.default.createElement(lu,null,/*#__PURE__*/O.default.createElement(e.Route,{path:"*",element:/*#__PURE__*/O.default.createElement(Nl,null,r)})):/*#__PURE__*/O.default.createElement(Yl,{"data-testid":"ac-sdk-app-loading",width:"500px"}))))});uu.propTypes={children:a.PropTypes.any.isRequired,baseUrl:a.PropTypes.string.isRequired,authProps:a.PropTypes.shape({enabled:a.PropTypes.bool,loginUrl:a.PropTypes.string,redirectUri:a.PropTypes.string,redirectPath:a.PropTypes.string,clientId:a.PropTypes.string.isRequired,grantType:a.PropTypes.string}),sentryProps:a.PropTypes.any,muiTheme:a.PropTypes.any},uu.defaultProps={authProps:{},sentryProps:{},muiTheme:Gl};var du=function(t,e){const n=t.displayName||t.name||"unknown",r=e=>N.createElement(Qc,{name:n,updateProps:e,__self:this,__source:{fileName:Xc,lineNumber:146}},N.createElement(t,{...e,__self:this,__source:{fileName:Xc,lineNumber:147}}));return r.displayName=`profiler(${n})`,Jc(r,t),r}(uu),pu=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 hu(t,e,n,r){navigator.serviceWorker.register(t).then(function(t){var i=null;r&&setInterval(function(){fetch("/manifest.json").then(function(e){try{return Promise.resolve(e.json()).then(function(e){var r=e.version;n!==r&&(i=r,t.update())})}catch(t){return Promise.reject(t)}}).catch(function(){})},3e4),t.onupdatefound=function(){var n=t.installing;null!=n&&(n.onstatechange=function(){"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."),e&&e.onUpdate&&(r?e.onUpdate(t,i):e.onUpdate(t))):(console.log("Content is cached for offline use."),e&&e.onSuccess&&e.onSuccess(t)))})}}).catch(function(t){console.error("Error during service worker registration:",t)})}exports.App=du,exports.Container=iu,exports.captureException=Ar,exports.fetch=wl,exports.getLocale=function(){return yl.locale},exports.logout=function(){return Rl.logout()},exports.notify=Qt,exports.registerServiceWorker=function(t){var e=t.version;!function(t){var e=t.publicUrl,n=t.mode,r=t.autoUpdate,i=t.version,s=t.registrationConfig;if(globalThis.version=i,"production"===n&&"serviceWorker"in navigator){if(new URL(e,window.location.href).origin!==window.location.origin)return;window.addEventListener("load",function(){var t=e+"/service-worker.js";pu?(function(t,e){fetch(t,{headers:{"Service-Worker":"script"}}).then(function(n){var r=n.headers.get("content-type");404===n.status||null!=r&&-1===r.indexOf("javascript")?navigator.serviceWorker.ready.then(function(t){t.unregister().then(function(){window.location.reload()})}):hu(t,e)}).catch(function(){console.log("No internet connection found. App is running in offline mode.")})}(t,s),navigator.serviceWorker.ready.then(function(){console.log("This web app is being served cache-first by a service worker. To learn more, visit https://cra.link/PWA")})):hu(t,s,i,r)})}}(pl({},t,{registrationConfig:pl({},(null==t?void 0:t.registrationConfig)||{},{onUpdate:function(n,r){var i,s;n&&n.waiting&&n.waiting.postMessage({type:"SKIP_WAITING"}),r&&e!==r&&(Qt(yl.translations.newVersionAvailable,{duration:5e3,position:"bottom-left",style:{color:"rgba(255,255,255,0.85)",background:"#3F3F3F",border:"1px solid #FFE72F"}}),setTimeout(function(){window.location.reload()},5e3)),null!=(i=t.registrationConfig)&&i.onUpdate&&(null==(s=t.registrationConfig)||s.onUpdate(n))}})}))},exports.setLocale=function(t){return yl.setLocale(t)},exports.useLogin=eu,exports.useLoginStatus=Dl;
171
+ `,Xt=({reverseOrder:e,position:n="top-center",toastOptions:r,gutter:i,children:s,containerStyle:a,containerClassName:o})=>{let{toasts:c,handlers:l}=(e=>{let{toasts:n,pausedAt:r}=((e={})=>{let[n,r]=t.useState(wt);t.useEffect(()=>(St.push(r),()=>{let t=St.indexOf(r);t>-1&&St.splice(t,1)}),[n]);let i=n.toasts.map(t=>{var n,r;return{...e,...e[t.type],...t,duration:t.duration||(null==(n=e[t.type])?void 0:n.duration)||(null==e?void 0:e.duration)||Tt[t.type],style:{...e.style,...null==(r=e[t.type])?void 0:r.style,...t.style}}});return{...n,toasts:i}})(e);t.useEffect(()=>{if(r)return;let t=Date.now(),e=n.map(e=>{if(e.duration===1/0)return;let n=(e.duration||0)+e.pauseDuration-(t-e.createdAt);if(!(n<0))return setTimeout(()=>xt.dismiss(e.id),n);e.visible&&xt.dismiss(e.id)});return()=>{e.forEach(t=>t&&clearTimeout(t))}},[n,r]);let i=t.useCallback(()=>{r&&kt({type:6,time:Date.now()})},[r]),s=t.useCallback((t,e)=>{let{reverseOrder:r=!1,gutter:i=8,defaultPosition:s}=e||{},a=n.filter(e=>(e.position||s)===(t.position||s)&&e.height),o=a.findIndex(e=>e.id===t.id),c=a.filter((t,e)=>e<o&&t.visible).length;return a.filter(t=>t.visible).slice(...r?[c+1]:[0,c]).reduce((t,e)=>t+(e.height||0)+i,0)},[n]);return{toasts:n,handlers:{updateHeight:Dt,startPause:It,endPause:i,calculateOffset:s}}})(r);return N.createElement("div",{style:{position:"fixed",zIndex:9999,top:16,left:16,right:16,bottom:16,pointerEvents:"none",...a},className:o,onMouseEnter:l.startPause,onMouseLeave:l.endPause},c.map(t=>{let r=t.position||n,a=((t,e)=>{let n=t.includes("top"),r=n?{top:0}:{bottom:0},i=t.includes("center")?{justifyContent:"center"}:t.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:yt()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${e*(n?1:-1)}px)`,...r,...i}})(r,l.calculateOffset(t,{reverseOrder:e,gutter:i,defaultPosition:n}));return N.createElement(Kt,{id:t.id,key:t.id,onHeightUpdate:l.updateHeight,className:t.visible?Jt:"",style:a},"custom"===t.type?mt(t.message,t):s?s(t):N.createElement(Wt,{toast:t,position:r}))}))},Qt=xt;const te=Object.prototype.toString;function ee(t){switch(te.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return pe(t,Error)}}function ne(t,e){return te.call(t)===`[object ${e}]`}function re(t){return ne(t,"ErrorEvent")}function ie(t){return ne(t,"DOMError")}function se(t){return ne(t,"String")}function ae(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function oe(t){return ne(t,"Object")}function ce(t){return"undefined"!=typeof Event&&pe(t,Event)}function le(t){return ne(t,"RegExp")}function ue(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function de(t){return"number"==typeof t&&t!=t}function pe(t,e){try{return t instanceof e}catch(t){return!1}}function he(t){return t&&t.Math==Math?t:void 0}const fe="object"==typeof globalThis&&he(globalThis)||"object"==typeof window&&he(window)||"object"==typeof self&&he(self)||"object"==typeof global&&he(global)||function(){return this}()||{};function _e(){return fe}function me(t,e,n){const r=n||fe,i=r.__SENTRY__=r.__SENTRY__||{};return i[t]||(i[t]=e())}const ge=_e(),ye=80;function ve(t,e={}){try{let n=t;const r=5,i=[];let s=0,a=0;const o=" > ",c=o.length;let l;const u=Array.isArray(e)?e:e.keyAttrs,d=!Array.isArray(e)&&e.maxStringLength||ye;for(;n&&s++<r&&(l=be(n,u),!("html"===l||s>1&&a+i.length*c+l.length>=d));)i.push(l),a+=l.length,n=n.parentNode;return i.reverse().join(o)}catch(t){return"<unknown>"}}function be(t,e){const n=t,r=[];let i,s,a,o,c;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());const l=e&&e.length?e.filter(t=>n.getAttribute(t)).map(t=>[t,n.getAttribute(t)]):null;if(l&&l.length)l.forEach(t=>{r.push(`[${t[0]}="${t[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),i=n.className,i&&se(i))for(s=i.split(/\s+/),c=0;c<s.length;c++)r.push(`.${s[c]}`);const u=["aria-label","type","name","title","alt"];for(c=0;c<u.length;c++)a=u[c],o=n.getAttribute(a),o&&r.push(`[${a}="${o}"]`);return r.join("")}const Ee=["debug","info","warn","error","log","assert","trace"];function Se(t){if(!("console"in fe))return t();const e=fe.console,n={};Ee.forEach(t=>{const r=e[t]&&e[t].__sentry_original__;t in e&&r&&(n[t]=e[t],e[t]=r)});try{return t()}finally{Object.keys(n).forEach(t=>{e[t]=n[t]})}}function we(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1}};return"undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?Ee.forEach(n=>{e[n]=(...e)=>{t&&Se(()=>{fe.console[n](`Sentry Logger [${n}]:`,...e)})}}):Ee.forEach(t=>{e[t]=()=>{}}),e}let ke;ke="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?me("logger",we):we();const Te=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Ce(t,e=!1){const{host:n,path:r,pass:i,port:s,projectId:a,protocol:o,publicKey:c}=t;return`${o}://${c}${e&&i?`:${i}`:""}@${n}${s?`:${s}`:""}/${r?`${r}/`:r}${a}`}function xe(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function Re(t){const e="string"==typeof t?function(t){const e=Te.exec(t);if(!e)return void console.error(`Invalid Sentry Dsn: ${t}`);const[n,r,i="",s,a="",o]=e.slice(1);let c="",l=o;const u=l.split("/");if(u.length>1&&(c=u.slice(0,-1).join("/"),l=u.pop()),l){const t=l.match(/^\d+/);t&&(l=t[0])}return xe({host:s,pass:i,path:c,projectId:l,port:a,protocol:n,publicKey:r})}(t):xe(t);if(e&&function(t){if("undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__)return!0;const{port:e,projectId:n,protocol:r}=t;return!(["protocol","publicKey","host","projectId"].find(e=>!t[e]&&(ke.error(`Invalid Sentry Dsn: ${e} missing`),!0))||(n.match(/^\d+$/)?function(t){return"http"===t||"https"===t}(r)?e&&isNaN(parseInt(e,10))&&(ke.error(`Invalid Sentry Dsn: Invalid port ${e}`),1):(ke.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(ke.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(e))return e}class De extends Error{constructor(t,e="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=e}}function Ie(t,e=0){return"string"!=typeof t||0===e||t.length<=e?t:`${t.slice(0,e)}...`}function Ne(t,e){if(!Array.isArray(t))return"";const n=[];for(let e=0;e<t.length;e++){const r=t[e];try{n.push(String(r))}catch(t){n.push("[value cannot be serialized]")}}return n.join(e)}function Oe(t,e=[],n=!1){return e.some(e=>function(t,e,n=!1){return!!se(t)&&(le(e)?e.test(t):!!se(e)&&(n?t===e:t.includes(e)))}(t,e,n))}function Ae(t,e,n){if(!(e in t))return;const r=t[e],i=n(r);if("function"==typeof i)try{Be(i,r)}catch(t){}t[e]=i}function Ue(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}function Be(t,e){t.prototype=e.prototype=e.prototype||{},Ue(t,"__sentry_original__",e)}function Me(t){return t.__sentry_original__}function Pe(t){if(ee(t))return{message:t.message,name:t.name,stack:t.stack,...He(t)};if(ce(t)){const e={type:t.type,target:Le(t.target),currentTarget:Le(t.currentTarget),...He(t)};return"undefined"!=typeof CustomEvent&&pe(t,CustomEvent)&&(e.detail=t.detail),e}return t}function Le(t){try{return"undefined"!=typeof Element&&pe(t,Element)?ve(t):Object.prototype.toString.call(t)}catch(t){return"<unknown>"}}function He(t){if("object"==typeof t&&null!==t){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}return{}}function ze(t,e=40){const n=Object.keys(Pe(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return Ie(n[0],e);for(let t=n.length;t>0;t--){const r=n.slice(0,t).join(", ");if(!(r.length>e))return t===n.length?r:Ie(r,e)}return""}function Ge(t){return Ye(t,new Map)}function Ye(t,e){if(oe(t)){const n=e.get(t);if(void 0!==n)return n;const r={};e.set(t,r);for(const n of Object.keys(t))void 0!==t[n]&&(r[n]=Ye(t[n],e));return r}if(Array.isArray(t)){const n=e.get(t);if(void 0!==n)return n;const r=[];return e.set(t,r),t.forEach(t=>{r.push(Ye(t,e))}),r}return t}const Fe=/\(error: (.*)\)/;function $e(...t){const e=t.sort((t,e)=>t[0]-e[0]).map(t=>t[1]);return(t,n=0)=>{const r=[],i=t.split("\n");for(let t=n;t<i.length;t++){const n=i[t];if(n.length>1024)continue;const s=Fe.test(n)?n.replace(Fe,"$1"):n;if(!s.match(/\S*Error: /)){for(const t of e){const e=t(s);if(e){r.push(e);break}}if(r.length>=50)break}}return function(t){if(!t.length)return[];const e=t.slice(0,50),n=e[e.length-1].function;n&&/sentryWrapped/.test(n)&&e.pop(),e.reverse();const r=e[e.length-1].function;return r&&/captureMessage|captureException/.test(r)&&e.pop(),e.map(t=>({...t,filename:t.filename||e[e.length-1].filename,function:t.function||"?"}))}(r)}}const je="<anonymous>";function Ve(t){try{return t&&"function"==typeof t&&t.name||je}catch(t){return je}}const Ze=_e();function qe(){if(!("fetch"in Ze))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(t){return!1}}function We(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}const Ke=_e(),Je=_e(),Xe="__sentry_xhr_v2__",Qe={},tn={};function en(t,e){Qe[t]=Qe[t]||[],Qe[t].push(e),function(t){if(!tn[t])switch(tn[t]=!0,t){case"console":"console"in Je&&Ee.forEach(function(t){t in Je.console&&Ae(Je.console,t,function(e){return function(...n){nn("console",{args:n,level:t}),e&&e.apply(Je.console,n)}})});break;case"dom":!function(){if(!("document"in Je))return;const t=nn.bind(null,"dom"),e=un(t,!0);Je.document.addEventListener("click",e,!1),Je.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(e=>{const n=Je[e]&&Je[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(Ae(n,"addEventListener",function(e){return function(n,r,i){if("click"===n||"keypress"==n)try{const r=this,s=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},a=s[n]=s[n]||{refCount:0};if(!a.handler){const r=un(t);a.handler=r,e.call(this,n,r,i)}a.refCount++}catch(t){}return e.call(this,n,r,i)}}),Ae(n,"removeEventListener",function(t){return function(e,n,r){if("click"===e||"keypress"==e)try{const n=this,i=n.__sentry_instrumentation_handlers__||{},s=i[e];s&&(s.refCount--,s.refCount<=0&&(t.call(this,e,s.handler,r),s.handler=void 0,delete i[e]),0===Object.keys(i).length&&delete n.__sentry_instrumentation_handlers__)}catch(t){}return t.call(this,e,n,r)}}))})}();break;case"xhr":!function(){if(!("XMLHttpRequest"in Je))return;const t=XMLHttpRequest.prototype;Ae(t,"open",function(t){return function(...e){const n=e[1],r=this[Xe]={method:se(e[0])?e[0].toUpperCase():e[0],url:e[1],request_headers:{}};se(n)&&"POST"===r.method&&n.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const i=()=>{const t=this[Xe];if(t&&4===this.readyState){try{t.status_code=this.status}catch(t){}nn("xhr",{args:e,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:this})}};return"onreadystatechange"in this&&"function"==typeof this.onreadystatechange?Ae(this,"onreadystatechange",function(t){return function(...e){return i(),t.apply(this,e)}}):this.addEventListener("readystatechange",i),Ae(this,"setRequestHeader",function(t){return function(...e){const[n,r]=e,i=this[Xe];return i&&(i.request_headers[n.toLowerCase()]=r),t.apply(this,e)}}),t.apply(this,e)}}),Ae(t,"send",function(t){return function(...e){const n=this[Xe];return n&&void 0!==e[0]&&(n.body=e[0]),nn("xhr",{args:e,startTimestamp:Date.now(),xhr:this}),t.apply(this,e)}})}();break;case"fetch":(function(){if(!qe())return!1;if(We(Ze.fetch))return!0;let t=!1;const e=Ze.document;if(e&&"function"==typeof e.createElement)try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(t=We(n.contentWindow.fetch)),e.head.removeChild(n)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return t})()&&Ae(Je,"fetch",function(t){return function(...e){const{method:n,url:r}=function(t){if(0===t.length)return{method:"GET",url:""};if(2===t.length){const[e,n]=t;return{url:sn(e),method:rn(n,"method")?String(n.method).toUpperCase():"GET"}}const e=t[0];return{url:sn(e),method:rn(e,"method")?String(e.method).toUpperCase():"GET"}}(e),i={args:e,fetchData:{method:n,url:r},startTimestamp:Date.now()};return nn("fetch",{...i}),t.apply(Je,e).then(t=>(nn("fetch",{...i,endTimestamp:Date.now(),response:t}),t),t=>{throw nn("fetch",{...i,endTimestamp:Date.now(),error:t}),t})}});break;case"history":!function(){if(!function(){const t=Ke.chrome;return!(t&&t.app&&t.app.runtime||!("history"in Ke)||!Ke.history.pushState||!Ke.history.replaceState)}())return;const t=Je.onpopstate;function e(t){return function(...e){const n=e.length>2?e[2]:void 0;if(n){const t=an,e=String(n);an=e,nn("history",{from:t,to:e})}return t.apply(this,e)}}Je.onpopstate=function(...e){const n=Je.location.href,r=an;if(an=n,nn("history",{from:r,to:n}),t)try{return t.apply(this,e)}catch(t){}},Ae(Je.history,"pushState",e),Ae(Je.history,"replaceState",e)}();break;case"error":dn=Je.onerror,Je.onerror=function(t,e,n,r,i){return nn("error",{column:r,error:i,line:n,msg:t,url:e}),!(!dn||dn.__SENTRY_LOADER__)&&dn.apply(this,arguments)},Je.onerror.__SENTRY_INSTRUMENTED__=!0;break;case"unhandledrejection":pn=Je.onunhandledrejection,Je.onunhandledrejection=function(t){return nn("unhandledrejection",t),!(pn&&!pn.__SENTRY_LOADER__)||pn.apply(this,arguments)},Je.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0;break;default:("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("unknown instrumentation type:",t)}}(t)}function nn(t,e){if(t&&Qe[t])for(const n of Qe[t]||[])try{n(e)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${Ve(n)}\nError:`,e)}}function rn(t,e){return!!t&&"object"==typeof t&&!!t[e]}function sn(t){return"string"==typeof t?t:t?rn(t,"url")?t.url:t.toString?t.toString():"":""}let an;const on=1e3;let cn,ln;function un(t,e=!1){return n=>{if(!n||ln===n)return;if(function(t){if("keypress"!==t.type)return!1;try{const e=t.target;if(!e||!e.tagName)return!0;if("INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable)return!1}catch(t){}return!0}(n))return;const r="keypress"===n.type?"input":n.type;(void 0===cn||function(t,e){if(!t)return!0;if(t.type!==e.type)return!0;try{if(t.target!==e.target)return!0}catch(t){}return!1}(ln,n))&&(t({event:n,name:r,global:e}),ln=n),clearTimeout(cn),cn=Je.setTimeout(()=>{cn=void 0},on)}}let dn=null,pn=null;function hn(){const t=fe.crypto||fe.msCrypto;if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");const e=t&&t.getRandomValues?()=>t.getRandomValues(new Uint8Array(1))[0]:()=>16*Math.random();return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,t=>(t^(15&e())>>t/4).toString(16))}function fn(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function _n(t){const{message:e,event_id:n}=t;if(e)return e;const r=fn(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function mn(t,e,n){const r=t.exception=t.exception||{},i=r.values=r.values||[],s=i[0]=i[0]||{};s.value||(s.value=e||""),s.type||(s.type=n||"Error")}function gn(t,e){const n=fn(t);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...e},e&&"data"in e){const t={...r&&r.data,...e.data};n.mechanism.data=t}}function yn(t){if(t&&t.__sentry_captured__)return!0;try{Ue(t,"__sentry_captured__",!0)}catch(t){}return!1}function vn(t){return Array.isArray(t)?t:[t]}function bn(){return!("undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function En(t,e){return t.require(e)}function Sn(t){let e;try{e=En(module,t)}catch(t){}try{const{cwd:n}=En(module,"process");e=En(module,`${n()}/node_modules/${t}`)}catch(t){}return e}function wn(t,e=100,n=Infinity){try{return Tn("",t,e,n)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function kn(t,e=3,n=102400){const r=wn(t,e);return i=JSON.stringify(r),~-encodeURI(i).split(/%..|./).length>n?kn(t,e-1,n):r;var i}function Tn(t,e,n=Infinity,r=Infinity,i=function(){const t="function"==typeof WeakSet,e=t?new WeakSet:[];return[function(n){if(t)return!!e.has(n)||(e.add(n),!1);for(let t=0;t<e.length;t++)if(e[t]===n)return!0;return e.push(n),!1},function(n){if(t)e.delete(n);else for(let t=0;t<e.length;t++)if(e[t]===n){e.splice(t,1);break}}]}()){const[s,a]=i;if(null==e||["number","boolean","string"].includes(typeof e)&&!de(e))return e;const o=function(t,e){try{if("domain"===t&&e&&"object"==typeof e&&e._events)return"[Domain]";if("domainEmitter"===t)return"[DomainEmitter]";if("undefined"!=typeof global&&e===global)return"[Global]";if("undefined"!=typeof window&&e===window)return"[Window]";if("undefined"!=typeof document&&e===document)return"[Document]";if(oe(n=e)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n)return"[SyntheticEvent]";if("number"==typeof e&&e!=e)return"[NaN]";if("function"==typeof e)return`[Function: ${Ve(e)}]`;if("symbol"==typeof e)return`[${String(e)}]`;if("bigint"==typeof e)return`[BigInt: ${String(e)}]`;const r=function(t){const e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}(e);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(t){return`**non-serializable** (${t})`}var n}(t,e);if(!o.startsWith("[object "))return o;if(e.__sentry_skip_normalization__)return e;const c="number"==typeof e.__sentry_override_normalization_depth__?e.__sentry_override_normalization_depth__:n;if(0===c)return o.replace("object ","");if(s(e))return"[Circular ~]";const l=e;if(l&&"function"==typeof l.toJSON)try{return Tn("",l.toJSON(),c-1,r,i)}catch(t){}const u=Array.isArray(e)?[]:{};let d=0;const p=Pe(e);for(const t in p)if(Object.prototype.hasOwnProperty.call(p,t)){if(d>=r){u[t]="[MaxProperties ~]";break}u[t]=Tn(t,p[t],c-1,r,i),d++}return a(e),u}var Cn;function xn(t){return new Dn(e=>{e(t)})}function Rn(t){return new Dn((e,n)=>{n(t)})}!function(t){t[t.PENDING=0]="PENDING",t[t.RESOLVED=1]="RESOLVED",t[t.REJECTED=2]="REJECTED"}(Cn||(Cn={}));class Dn{__init(){this._state=Cn.PENDING}__init2(){this._handlers=[]}constructor(t){Dn.prototype.__init.call(this),Dn.prototype.__init2.call(this),Dn.prototype.__init3.call(this),Dn.prototype.__init4.call(this),Dn.prototype.__init5.call(this),Dn.prototype.__init6.call(this);try{t(this._resolve,this._reject)}catch(t){this._reject(t)}}then(t,e){return new Dn((n,r)=>{this._handlers.push([!1,e=>{if(t)try{n(t(e))}catch(t){r(t)}else n(e)},t=>{if(e)try{n(e(t))}catch(t){r(t)}else r(t)}]),this._executeHandlers()})}catch(t){return this.then(t=>t,t)}finally(t){return new Dn((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{i?n(r):e(r)})})}__init3(){this._resolve=t=>{this._setResult(Cn.RESOLVED,t)}}__init4(){this._reject=t=>{this._setResult(Cn.REJECTED,t)}}__init5(){this._setResult=(t,e)=>{this._state===Cn.PENDING&&(ue(e)?e.then(this._resolve,this._reject):(this._state=t,this._value=e,this._executeHandlers()))}}__init6(){this._executeHandlers=()=>{if(this._state===Cn.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(t=>{t[0]||(this._state===Cn.RESOLVED&&t[1](this._value),this._state===Cn.REJECTED&&t[2](this._value),t[0]=!0)})}}}function In(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}function Nn(t){return t.split(/\\?\//).filter(t=>t.length>0&&","!==t).length}const On=["fatal","error","warning","log","info","debug"],An=_e(),Un={nowSeconds:()=>Date.now()/1e3},Bn=bn()?function(){try{return En(module,"perf_hooks").performance}catch(t){return}}():function(){const{performance:t}=An;if(t&&t.now)return{now:()=>t.now(),timeOrigin:Date.now()-t.now()}}(),Mn=void 0===Bn?Un:{nowSeconds:()=>(Bn.timeOrigin+Bn.now())/1e3},Pn=Un.nowSeconds.bind(Un),Ln=Mn.nowSeconds.bind(Mn),Hn=(()=>{const{performance:t}=An;if(!t||!t.now)return;const e=36e5,n=t.now(),r=Date.now(),i=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,s=i<e,a=t.timing&&t.timing.navigationStart,o="number"==typeof a?Math.abs(a+n-r):e;return s||o<e?i<=o?t.timeOrigin:a:r})(),zn=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Gn(t,e=[]){return[t,e]}function Yn(t,e){const[n,r]=t;return[n,[...r,e]]}function Fn(t,e){const n=t[1];for(const t of n)if(e(t,t[0].type))return!0;return!1}function $n(t,e){return(e||new TextEncoder).encode(t)}function jn(t,e){const[n,r]=t;let i=JSON.stringify(n);function s(t){"string"==typeof i?i="string"==typeof t?i+t:[$n(i,e),t]:i.push("string"==typeof t?$n(t,e):t)}for(const t of r){const[e,n]=t;if(s(`\n${JSON.stringify(e)}\n`),"string"==typeof n||n instanceof Uint8Array)s(n);else{let t;try{t=JSON.stringify(n)}catch(e){t=JSON.stringify(wn(n))}s(t)}}return"string"==typeof i?i:function(t){const e=t.reduce((t,e)=>t+e.length,0),n=new Uint8Array(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n}(i)}function Vn(t,e){const n="string"==typeof t.data?$n(t.data,e):t.data;return[Ge({type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),n]}const Zn={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor"};function qn(t){return Zn[t]}function Wn(t){if(!t||!t.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function Kn(t,e,n,r){const i=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&{sdk:e},...!!n&&{dsn:Ce(r)},...i&&{trace:Ge({...i})}}}const Jn=6e4,Xn="baggage",Qn="sentry-",tr=/^sentry-/,er=8192;function nr(t){return function(t){if(0!==Object.keys(t).length)return Object.entries(t).reduce((t,[e,n],r)=>{const i=`${encodeURIComponent(e)}=${encodeURIComponent(n)}`,s=0===r?i:`${t},${i}`;return s.length>er?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`Not adding key: ${e} with val: ${n} to baggage header due to exceeding baggage size limits.`),t):s},"")}(Object.entries(t).reduce((t,[e,n])=>(n&&(t[`${Qn}${e}`]=n),t),{}))}function rr(t){return t.split(",").map(t=>t.split("=").map(t=>decodeURIComponent(t.trim()))).reduce((t,[e,n])=>(t[e]=n,t),{})}const ir="production";function sr(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),t.did||e.did||(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||Ln(),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=32===e.sid.length?e.sid:hn()),void 0!==e.init&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),"number"==typeof e.started&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof e.duration)t.duration=e.duration;else{const e=t.timestamp-t.started;t.duration=e>=0?e:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),"number"==typeof e.errors&&(t.errors=e.errors),e.status&&(t.status=e.status)}class ar{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(t){const e=new ar;return t&&(e._breadcrumbs=[...t._breadcrumbs],e._tags={...t._tags},e._extra={...t._extra},e._contexts={...t._contexts},e._user=t._user,e._level=t._level,e._span=t._span,e._session=t._session,e._transactionName=t._transactionName,e._fingerprint=t._fingerprint,e._eventProcessors=[...t._eventProcessors],e._requestSession=t._requestSession,e._attachments=[...t._attachments],e._sdkProcessingMetadata={...t._sdkProcessingMetadata}),e}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{},this._session&&sr(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,e){return this._tags={...this._tags,[t]:e},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,e){return this._extra={...this._extra,[t]:e},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,e){return null===e?delete this._contexts[t]:this._contexts[t]=e,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const t=this.getSpan();return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;if("function"==typeof t){const e=t(this);return e instanceof ar?e:this}return t instanceof ar?(this._tags={...this._tags,...t._tags},this._extra={...this._extra,...t._extra},this._contexts={...this._contexts,...t._contexts},t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession)):oe(t)&&(this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(t,e){const n="number"==typeof e?e:100;if(n<=0)return this;const r={timestamp:Pn(),...t};return this._breadcrumbs=[...this._breadcrumbs,r].slice(-n),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(t,e={}){if(this._extra&&Object.keys(this._extra).length&&(t.extra={...this._extra,...t.extra}),this._tags&&Object.keys(this._tags).length&&(t.tags={...this._tags,...t.tags}),this._user&&Object.keys(this._user).length&&(t.user={...this._user,...t.user}),this._contexts&&Object.keys(this._contexts).length&&(t.contexts={...this._contexts,...t.contexts}),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span){t.contexts={trace:this._span.getTraceContext(),...t.contexts};const e=this._span.transaction;if(e){t.sdkProcessingMetadata={dynamicSamplingContext:e.getDynamicSamplingContext(),...t.sdkProcessingMetadata};const n=e.name;n&&(t.tags={transaction:n,...t.tags})}}return this._applyFingerprint(t),t.breadcrumbs=[...t.breadcrumbs||[],...this._breadcrumbs],t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...or(),...this._eventProcessors],t,e)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}_notifyEventProcessors(t,e,n,r=0){return new Dn((i,s)=>{const a=t[r];if(null===e||"function"!=typeof a)i(e);else{const o=a({...e},n);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.id&&null===o&&ke.log(`Event processor "${a.id}" dropped event`),ue(o)?o.then(e=>this._notifyEventProcessors(t,e,n,r+1).then(i)).then(null,s):this._notifyEventProcessors(t,o,n,r+1).then(i).then(null,s)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}_applyFingerprint(t){t.fingerprint=t.fingerprint?vn(t.fingerprint):[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}}function or(){return me("globalEventProcessors",()=>[])}function cr(t){or().push(t)}const lr=4,ur=100;class dr{constructor(t,e=new ar,n=lr){this._version=n,this._stack=[{scope:e}],t&&this.bindClient(t)}isOlderThan(t){return this._version<t}bindClient(t){this.getStackTop().client=t,t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=ar.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return!(this.getStack().length<=1||!this.getStack().pop())}withScope(t){const e=this.pushScope();try{t(e)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,e){const n=this._lastEventId=e&&e.event_id?e.event_id:hn(),r=new Error("Sentry syntheticException");return this._withClient((i,s)=>{i.captureException(t,{originalException:t,syntheticException:r,...e,event_id:n},s)}),n}captureMessage(t,e,n){const r=this._lastEventId=n&&n.event_id?n.event_id:hn(),i=new Error(t);return this._withClient((s,a)=>{s.captureMessage(t,e,{originalException:t,syntheticException:i,...n,event_id:r},a)}),r}captureEvent(t,e){const n=e&&e.event_id?e.event_id:hn();return t.type||(this._lastEventId=n),this._withClient((r,i)=>{r.captureEvent(t,{...e,event_id:n},i)}),n}lastEventId(){return this._lastEventId}addBreadcrumb(t,e){const{scope:n,client:r}=this.getStackTop();if(!r)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:s=ur}=r.getOptions&&r.getOptions()||{};if(s<=0)return;const a={timestamp:Pn(),...t},o=i?Se(()=>i(a,e)):a;null!==o&&(r.emit&&r.emit("beforeAddBreadcrumb",o,e),n.addBreadcrumb(o,s))}setUser(t){this.getScope().setUser(t)}setTags(t){this.getScope().setTags(t)}setExtras(t){this.getScope().setExtras(t)}setTag(t,e){this.getScope().setTag(t,e)}setExtra(t,e){this.getScope().setExtra(t,e)}setContext(t,e){this.getScope().setContext(t,e)}configureScope(t){const{scope:e,client:n}=this.getStackTop();n&&t(e)}run(t){const e=hr(this);try{t(this)}finally{hr(e)}}getIntegration(t){const e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(e){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,e){const n=this._callExtensionMethod("startTransaction",t,e);return"undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__||n||console.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"),n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){const t=this.getStackTop().scope,e=t.getSession();e&&function(t,e){let n={};"ok"===t.status&&(n={status:"exited"}),sr(t,n)}(e),this._sendSessionUpdate(),t.setSession()}startSession(t){const{scope:e,client:n}=this.getStackTop(),{release:r,environment:i=ir}=n&&n.getOptions()||{},{userAgent:s}=fe.navigator||{},a=function(t){const e=Ln(),n={sid:hn(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return Ge({sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}(n)};return t&&sr(n,t),n}({release:r,environment:i,user:e.getUser(),...s&&{userAgent:s},...t}),o=e.getSession&&e.getSession();return o&&"ok"===o.status&&sr(o,{status:"exited"}),this.endSession(),e.setSession(a),a}shouldSendDefaultPii(){const t=this.getClient(),e=t&&t.getOptions();return Boolean(e&&e.sendDefaultPii)}_sendSessionUpdate(){const{scope:t,client:e}=this.getStackTop(),n=t.getSession();n&&e&&e.captureSession&&e.captureSession(n)}_withClient(t){const{scope:e,client:n}=this.getStackTop();n&&t(n,e)}_callExtensionMethod(t,...e){const n=pr().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[t])return n.extensions[t].apply(this,e);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function pr(){return fe.__SENTRY__=fe.__SENTRY__||{extensions:{},hub:void 0},fe}function hr(t){const e=pr(),n=_r(e);return mr(e,t),n}function fr(){const t=pr();if(t.__SENTRY__&&t.__SENTRY__.acs){const e=t.__SENTRY__.acs.getCurrentHub();if(e)return e}return function(t=pr()){var e;return(e=t)&&e.__SENTRY__&&e.__SENTRY__.hub&&!_r(t).isOlderThan(lr)||mr(t,new dr),_r(t)}(t)}function _r(t){return me("hub",()=>new dr,t)}function mr(t,e){return!!t&&((t.__SENTRY__=t.__SENTRY__||{}).hub=e,!0)}function gr(t){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const e=fr().getClient(),n=t||e&&e.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function yr(t){return(t||fr()).getScope().getTransaction()}let vr=!1;function br(){const t=yr();if(t){const e="internal_error";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`[Tracing] Transaction: ${e} -> Global error occured`),t.setStatus(e)}}br.tag="sentry_tracingErrorCallback";class Er{__init(){this.spans=[]}constructor(t=1e3){Er.prototype.__init.call(this),this._maxlen=t}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}}class Sr{__init2(){this.traceId=hn()}__init3(){this.spanId=hn().substring(16)}__init4(){this.startTimestamp=Ln()}__init5(){this.tags={}}__init6(){this.data={}}__init7(){this.instrumenter="sentry"}constructor(t){if(Sr.prototype.__init2.call(this),Sr.prototype.__init3.call(this),Sr.prototype.__init4.call(this),Sr.prototype.__init5.call(this),Sr.prototype.__init6.call(this),Sr.prototype.__init7.call(this),!t)return this;t.traceId&&(this.traceId=t.traceId),t.spanId&&(this.spanId=t.spanId),t.parentSpanId&&(this.parentSpanId=t.parentSpanId),"sampled"in t&&(this.sampled=t.sampled),t.op&&(this.op=t.op),t.description&&(this.description=t.description),t.data&&(this.data=t.data),t.tags&&(this.tags=t.tags),t.status&&(this.status=t.status),t.startTimestamp&&(this.startTimestamp=t.startTimestamp),t.endTimestamp&&(this.endTimestamp=t.endTimestamp),t.instrumenter&&(this.instrumenter=t.instrumenter)}startChild(t){const e=new Sr({...t,parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId});if(e.spanRecorder=this.spanRecorder,e.spanRecorder&&e.spanRecorder.add(e),e.transaction=this.transaction,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&e.transaction){const n=`[Tracing] Starting '${t&&t.op||"< unknown op >"}' span on transaction '${e.transaction.name||"< unknown name >"}' (${e.transaction.spanId}).`;e.transaction.metadata.spanMetadata[e.spanId]={logMessage:n},ke.log(n)}return e}setTag(t,e){return this.tags={...this.tags,[t]:e},this}setData(t,e){return this.data={...this.data,[t]:e},this}setStatus(t){return this.status=t,this}setHttpStatus(t){this.setTag("http.status_code",String(t));const e=function(t){if(t<400&&t>=100)return"ok";if(t>=400&&t<500)switch(t){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(t>=500&&t<600)switch(t){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}(t);return"unknown_error"!==e&&this.setStatus(e),this}isSuccess(){return"ok"===this.status}finish(t){if(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&this.transaction&&this.transaction.spanId!==this.spanId){const{logMessage:t}=this.transaction.metadata.spanMetadata[this.spanId];t&&ke.log(t.replace("Starting","Finishing"))}this.endTimestamp="number"==typeof t?t:Ln()}toTraceparent(){let t="";return void 0!==this.sampled&&(t=this.sampled?"-1":"-0"),`${this.traceId}-${this.spanId}${t}`}toContext(){return Ge({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})}updateWithContext(t){return this.data=t.data||{},this.description=t.description,this.endTimestamp=t.endTimestamp,this.op=t.op,this.parentSpanId=t.parentSpanId,this.sampled=t.sampled,this.spanId=t.spanId||this.spanId,this.startTimestamp=t.startTimestamp||this.startTimestamp,this.status=t.status,this.tags=t.tags||{},this.traceId=t.traceId||this.traceId,this}getTraceContext(){return Ge({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})}toJSON(){return Ge({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId})}}class wr extends Sr{__init(){this._measurements={}}__init2(){this._contexts={}}__init3(){this._frozenDynamicSamplingContext=void 0}constructor(t,e){super(t),wr.prototype.__init.call(this),wr.prototype.__init2.call(this),wr.prototype.__init3.call(this),this._hub=e||fr(),this._name=t.name||"",this.metadata={source:"custom",...t.metadata,spanMetadata:{}},this._trimEnd=t.trimEnd,this.transaction=this;const n=this.metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(t){this.setName(t)}setName(t,e="custom"){this._name=t,this.metadata.source=e}initSpanRecorder(t=1e3){this.spanRecorder||(this.spanRecorder=new Er(t)),this.spanRecorder.add(this)}setContext(t,e){null===e?delete this._contexts[t]:this._contexts[t]=e}setMeasurement(t,e,n=""){this._measurements[t]={value:e,unit:n}}setMetadata(t){this.metadata={...this.metadata,...t}}finish(t){if(void 0!==this.endTimestamp)return;this.name||(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this.name="<unlabeled transaction>"),super.finish(t);const e=this._hub.getClient();if(e&&e.emit&&e.emit("finishTransaction",this),!0!==this.sampled)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),void(e&&e.recordDroppedEvent("sample_rate","transaction"));const n=this.spanRecorder?this.spanRecorder.spans.filter(t=>t!==this&&t.endTimestamp):[];this._trimEnd&&n.length>0&&(this.endTimestamp=n.reduce((t,e)=>t.endTimestamp&&e.endTimestamp?t.endTimestamp>e.endTimestamp?t:e:t).endTimestamp);const r=this.metadata,i={contexts:{...this._contexts,trace:this.getTraceContext()},spans:n,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:{...r,dynamicSamplingContext:this.getDynamicSamplingContext()},...r.source&&{transaction_info:{source:r.source}}};return Object.keys(this._measurements).length>0&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),i.measurements=this._measurements),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`),this._hub.captureEvent(i)}toContext(){return Ge({...super.toContext(),name:this.name,trimEnd:this._trimEnd})}updateWithContext(t){return super.updateWithContext(t),this.name=t.name||"",this._trimEnd=t.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext;const t=this._hub||fr(),e=t&&t.getClient();if(!e)return{};const{environment:n,release:r}=e.getOptions()||{},{publicKey:i}=e.getDsn()||{},s=this.metadata.sampleRate,a=void 0!==s?s.toString():void 0,{segment:o}=t.getScope().getUser()||{},c=this.metadata.source,l=Ge({environment:n||ir,release:r,transaction:c&&"url"!==c?this.name:void 0,user_segment:o,public_key:i,trace_id:this.traceId,sample_rate:a});return e.emit&&e.emit("createDsc",l),l}setHub(t){this._hub=t}}const kr={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},Tr=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class Cr extends Er{constructor(t,e,n,r){super(r),this._pushActivity=t,this._popActivity=e,this.transactionSpanId=n}add(t){t.spanId!==this.transactionSpanId&&(t.finish=e=>{t.endTimestamp="number"==typeof e?e:Ln(),this._popActivity(t.spanId)},void 0===t.endTimestamp&&this._pushActivity(t.spanId)),super.add(t)}}class xr extends wr{__init(){this.activities={}}__init2(){this._heartbeatCounter=0}__init3(){this._finished=!1}__init4(){this._idleTimeoutCanceledPermanently=!1}__init5(){this._beforeFinishCallbacks=[]}__init6(){this._finishReason=Tr[4]}constructor(t,e,n=kr.idleTimeout,r=kr.finalTimeout,i=kr.heartbeatInterval,s=!1){super(t,e),this._idleHub=e,this._idleTimeout=n,this._finalTimeout=r,this._heartbeatInterval=i,this._onScope=s,xr.prototype.__init.call(this),xr.prototype.__init2.call(this),xr.prototype.__init3.call(this),xr.prototype.__init4.call(this),xr.prototype.__init5.call(this),xr.prototype.__init6.call(this),s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`Setting idle transaction on scope. Span ID: ${this.spanId}`),e.configureScope(t=>t.setSpan(this))),this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=Tr[3],this.finish())},this._finalTimeout)}finish(t=Ln()){if(this._finished=!0,this.activities={},"ui.action.click"===this.op&&this.setTag("finishReason",this._finishReason),this.spanRecorder){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Tracing] finishing IdleTransaction",new Date(1e3*t).toISOString(),this.op);for(const e of this._beforeFinishCallbacks)e(this,t);this.spanRecorder.spans=this.spanRecorder.spans.filter(e=>{if(e.spanId===this.spanId)return!0;e.endTimestamp||(e.endTimestamp=t,e.setStatus("cancelled"),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(e,void 0,2)));const n=e.startTimestamp<t;return n||("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Tracing] discarding Span since it happened after Transaction was finished",JSON.stringify(e,void 0,2)),n}),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Tracing] flushing IdleTransaction")}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Tracing] No active IdleTransaction");if(this._onScope){const t=this._idleHub.getScope();t.getTransaction()===this&&t.setSpan(void 0)}return super.finish(t)}registerBeforeFinishCallback(t){this._beforeFinishCallbacks.push(t)}initSpanRecorder(t){this.spanRecorder||(this.spanRecorder=new Cr(t=>{this._finished||this._pushActivity(t)},t=>{this._finished||this._popActivity(t)},this.spanId,t),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("Starting heartbeat"),this._pingHeartbeat()),this.spanRecorder.add(this)}cancelIdleTimeout(t,{restartOnChildSpanChange:e}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=!1===e,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,0===Object.keys(this.activities).length&&this._idleTimeoutCanceledPermanently&&(this._finishReason=Tr[5],this.finish(t)))}setFinishReason(t){this._finishReason=t}_restartIdleTimeout(t){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{this._finished||0!==Object.keys(this.activities).length||(this._finishReason=Tr[1],this.finish(t))},this._idleTimeout)}_pushActivity(t){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`[Tracing] pushActivity: ${t}`),this.activities[t]=!0,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(t){if(this.activities[t]&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`[Tracing] popActivity ${t}`),delete this.activities[t],("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Tracing] new activities count",Object.keys(this.activities).length)),0===Object.keys(this.activities).length){const t=Ln();this._idleTimeoutCanceledPermanently?(this._finishReason=Tr[5],this.finish(t)):this._restartIdleTimeout(t+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const t=Object.keys(this.activities).join("");t===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=Tr[0],this.finish()):this._pingHeartbeat()}_pingHeartbeat(){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}}function Rr(){const t=this.getScope().getSpan();return t?{"sentry-trace":t.toTraceparent()}:{}}function Dr(t,e,n){if(!gr(e))return t.sampled=!1,t;if(void 0!==t.sampled)return t.setMetadata({sampleRate:Number(t.sampled)}),t;let r;return"function"==typeof e.tracesSampler?(r=e.tracesSampler(n),t.setMetadata({sampleRate:Number(r)})):void 0!==n.parentSampled?r=n.parentSampled:void 0!==e.tracesSampleRate?(r=e.tracesSampleRate,t.setMetadata({sampleRate:Number(r)})):(r=1,t.setMetadata({sampleRate:r})),(de(i=r)||"number"!=typeof i&&"boolean"!=typeof i?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(i)} of type ${JSON.stringify(typeof i)}.`),0):!(i<0||i>1)||(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${i}.`),0))?r?(t.sampled=Math.random()<r,t.sampled?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`[Tracing] starting ${t.op} transaction - ${t.name}`),t):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`),t)):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.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")),t.sampled=!1,t):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("[Tracing] Discarding transaction because of invalid sample rate."),t.sampled=!1,t);var i}function Ir(t,e){const n=this.getClient(),r=n&&n.getOptions()||{},i=r.instrumenter||"sentry",s=t.instrumenter||"sentry";i!==s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error(`A transaction was started with instrumenter=\`${s}\`, but the SDK is configured with the \`${i}\` instrumenter.\nThe transaction will not be sampled. Please use the ${i} instrumentation to start transactions.`),t.sampled=!1);let a=new wr(t,this);return a=Dr(a,r,{parentSampled:t.parentSampled,transactionContext:t,...e}),a.sampled&&a.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",a),a}function Nr(t,e,n,r,i,s,a){const o=t.getClient(),c=o&&o.getOptions()||{};let l=new xr(e,t,n,r,a,i);return l=Dr(l,c,{parentSampled:e.parentSampled,transactionContext:e,...s}),l.sampled&&l.initSpanRecorder(c._experiments&&c._experiments.maxSpans),o&&o.emit&&o.emit("startTransaction",l),l}function Or(){const t=pr();t.__SENTRY__&&(t.__SENTRY__.extensions=t.__SENTRY__.extensions||{},t.__SENTRY__.extensions.startTransaction||(t.__SENTRY__.extensions.startTransaction=Ir),t.__SENTRY__.extensions.traceHeaders||(t.__SENTRY__.extensions.traceHeaders=Rr),vr||(vr=!0,en("error",br),en("unhandledrejection",br)))}function Ar(t,e,n=(()=>{})){const r={...t};void 0!==r.name&&void 0===r.description&&(r.description=r.name);const i=fr(),s=i.getScope(),a=s.getSpan(),o=a?a.startChild(r):i.startTransaction(r);function c(){o&&o.finish(),i.getScope().setSpan(a)}let l;s.setSpan(o);try{l=e(o)}catch(t){throw o&&o.setStatus("internal_error"),n(t),c(),t}return ue(l)?Promise.resolve(l).then(()=>{c()},t=>{o&&o.setStatus("internal_error"),n(t),c()}):c(),l}function Ur(t,e){return fr().captureException(t,{captureContext:e})}function Br(t){fr().withScope(t)}function Mr(t){return`${t.protocol?`${t.protocol}:`:""}//${t.host}${t.port?`:${t.port}`:""}${t.path?`/${t.path}`:""}/api/`}const Pr=[];function Lr(t){const e=t.defaultIntegrations||[],n=t.integrations;let r;e.forEach(t=>{t.isDefaultInstance=!0}),r=Array.isArray(n)?[...e,...n]:"function"==typeof n?vn(n(e)):e;const i=function(t){const e={};return t.forEach(t=>{const{name:n}=t,r=e[n];r&&!r.isDefaultInstance&&t.isDefaultInstance||(e[n]=t)}),Object.keys(e).map(t=>e[t])}(r),s=function(t,e){for(let e=0;e<t.length;e++)if(1==("Debug"===t[e].name))return e;return-1}(i);if(-1!==s){const[t]=i.splice(s,1);i.push(t)}return i}function Hr(t,e){e[t.name]=t,-1===Pr.indexOf(t.name)&&(t.setupOnce(cr,fr),Pr.push(t.name),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`Integration installed: ${t.name}`))}function zr(t,e,n,r){const{normalizeDepth:i=3,normalizeMaxBreadth:s=1e3}=t,a={...e,event_id:e.event_id||n.event_id||hn(),timestamp:e.timestamp||Pn()},o=n.integrations||t.integrations.map(t=>t.name);!function(t,e){const{environment:n,release:r,dist:i,maxValueLength:s=250}=e;"environment"in t||(t.environment="environment"in e?n:ir),void 0===t.release&&void 0!==r&&(t.release=r),void 0===t.dist&&void 0!==i&&(t.dist=i),t.message&&(t.message=Ie(t.message,s));const a=t.exception&&t.exception.values&&t.exception.values[0];a&&a.value&&(a.value=Ie(a.value,s));const o=t.request;o&&o.url&&(o.url=Ie(o.url,s))}(a,t),function(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}(a,o),void 0===e.type&&function(t,e){const n=fe._sentryDebugIds;if(!n)return;let r;const i=Gr.get(e);i?r=i:(r=new Map,Gr.set(e,r));const s=Object.keys(n).reduce((t,i)=>{let s;const a=r.get(i);a?s=a:(s=e(i),r.set(i,s));for(let e=s.length-1;e>=0;e--){const r=s[e];if(r.filename){t[r.filename]=n[i];break}}return t},{}),a=new Set;try{t.exception.values.forEach(t=>{t.stacktrace.frames.forEach(t=>{t.filename&&a.add(t.filename)})})}catch(t){}t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const o=t.debug_meta.images;a.forEach(t=>{s[t]&&o.push({type:"sourcemap",code_file:t,debug_id:s[t]})})}(a,t.stackParser);let c=r;n.captureContext&&(c=ar.clone(c).update(n.captureContext));let l=xn(a);if(c){if(c.getAttachments){const t=[...n.attachments||[],...c.getAttachments()];t.length&&(n.attachments=t)}l=c.applyToEvent(a,n)}return l.then(t=>"number"==typeof i&&i>0?function(t,e,n){if(!t)return null;const r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(t=>({...t,...t.data&&{data:wn(t.data,e,n)}}))},...t.user&&{user:wn(t.user,e,n)},...t.contexts&&{contexts:wn(t.contexts,e,n)},...t.extra&&{extra:wn(t.extra,e,n)}};return t.contexts&&t.contexts.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=wn(t.contexts.trace.data,e,n))),t.spans&&(r.spans=t.spans.map(t=>(t.data&&(t.data=wn(t.data,e,n)),t))),r}(t,i,s):t)}const Gr=new WeakMap,Yr="Not capturing exception because it's already been captured.";class Fr{__init(){this._integrations={}}__init2(){this._integrationsInitialized=!1}__init3(){this._numProcessing=0}__init4(){this._outcomes={}}__init5(){this._hooks={}}constructor(t){if(Fr.prototype.__init.call(this),Fr.prototype.__init2.call(this),Fr.prototype.__init3.call(this),Fr.prototype.__init4.call(this),Fr.prototype.__init5.call(this),this._options=t,t.dsn?this._dsn=Re(t.dsn):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("No DSN provided, client will not do anything."),this._dsn){const e=function(t,e={}){const n="string"!=typeof e&&e._metadata?e._metadata.sdk:void 0;return("string"==typeof e?e:e.tunnel)||`${function(t){return`${Mr(t)}${t.projectId}/envelope/`}(t)}?${function(t,e){return n={sentry_key:t.publicKey,sentry_version:"7",...e&&{sentry_client:`${e.name}/${e.version}`}},Object.keys(n).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(n[t])}`).join("&");var n}(t,n)}`}(this._dsn,t);this._transport=t.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:e})}}captureException(t,e,n){if(yn(t))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(Yr));let r=e&&e.event_id;return this._process(this.eventFromException(t,e).then(t=>this._captureEvent(t,e,n)).then(t=>{r=t})),r}captureMessage(t,e,n,r){let i=n&&n.event_id;const s=ae(t)?this.eventFromMessage(String(t),e,n):this.eventFromException(t,n);return this._process(s.then(t=>this._captureEvent(t,n,r)).then(t=>{i=t})),i}captureEvent(t,e,n){if(e&&e.originalException&&yn(e.originalException))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(Yr));let r=e&&e.event_id;return this._process(this._captureEvent(t,e,n).then(t=>{r=t})),r}captureSession(t){this._isEnabled()?"string"!=typeof t.release?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),sr(t,{init:!1})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("SDK not enabled, will not capture session.")}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const e=this._transport;return e?this._isClientDoneProcessing(t).then(n=>e.flush(t).then(t=>n&&t)):xn(!0)}close(t){return this.flush(t).then(t=>(this.getOptions().enabled=!1,t))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=function(t){const e={};return t.forEach(t=>{t&&Hr(t,e)}),e}(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch(e){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}addIntegration(t){Hr(t,this._integrations)}sendEvent(t,e={}){if(this._dsn){let n=function(t,e,n,r){const i=Wn(n),s=t.type&&"replay_event"!==t.type?t.type:"event";!function(t,e){e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]])}(t,n&&n.sdk);const a=Kn(t,i,r,e);return delete t.sdkProcessingMetadata,Gn(a,[[{type:s},t]])}(t,this._dsn,this._options._metadata,this._options.tunnel);for(const t of e.attachments||[])n=Yn(n,Vn(t,this._options.transportOptions&&this._options.transportOptions.textEncoder));const r=this._sendEnvelope(n);r&&r.then(e=>this.emit("afterSendEvent",t,e),null)}}sendSession(t){if(this._dsn){const e=function(t,e,n,r){const i=Wn(n);return Gn({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&{dsn:Ce(e)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(e)}}recordDroppedEvent(t,e,n){if(this._options.sendClientReports){const n=`${t}:${e}`;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`Adding outcome: "${n}"`),this._outcomes[n]=this._outcomes[n]+1||1}}on(t,e){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(e)}emit(t,...e){this._hooks[t]&&this._hooks[t].forEach(t=>t(...e))}_updateSessionFromEvent(t,e){let n=!1,r=!1;const i=e.exception&&e.exception.values;if(i){r=!0;for(const t of i){const e=t.mechanism;if(e&&!1===e.handled){n=!0;break}}}const s="ok"===t.status;(s&&0===t.errors||s&&n)&&(sr(t,{...n&&{status:"crashed"},errors:t.errors||Number(r||n)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Dn(e=>{let n=0;const r=setInterval(()=>{0==this._numProcessing?(clearInterval(r),e(!0)):(n+=1,t&&n>=t&&(clearInterval(r),e(!1)))},1)})}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._dsn}_prepareEvent(t,e,n){const r=this.getOptions(),i=Object.keys(this._integrations);return!e.integrations&&i.length>0&&(e.integrations=i),zr(r,t,e,n)}_captureEvent(t,e={},n){return this._processEvent(t,e,n).then(t=>t.event_id,t=>{if("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__){const e=t;"log"===e.logLevel?ke.log(e.message):ke.warn(e)}})}_processEvent(t,e,n){const r=this.getOptions(),{sampleRate:i}=r;if(!this._isEnabled())return Rn(new De("SDK not enabled, will not capture event.","log"));const s=jr(t),a=$r(t),o=t.type||"error",c=`before send for type \`${o}\``;if(a&&"number"==typeof i&&Math.random()>i)return this.recordDroppedEvent("sample_rate","error",t),Rn(new De(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const l="replay_event"===o?"replay":o;return this._prepareEvent(t,e,n).then(n=>{if(null===n)throw this.recordDroppedEvent("event_processor",l,t),new De("An event processor returned `null`, will not send event.","log");if(e.data&&!0===e.data.__sentry__)return n;const i=function(t,e,n){const{beforeSend:r,beforeSendTransaction:i}=t;return $r(e)&&r?r(e,n):jr(e)&&i?i(e,n):e}(r,n,e);return function(t,e){const n=`${e} must return \`null\` or a valid event.`;if(ue(t))return t.then(t=>{if(!oe(t)&&null!==t)throw new De(n);return t},t=>{throw new De(`${e} rejected with ${t}`)});if(!oe(t)&&null!==t)throw new De(n);return t}(i,c)}).then(r=>{if(null===r)throw this.recordDroppedEvent("before_send",l,t),new De(`${c} returned \`null\`, will not send event.`,"log");const i=n&&n.getSession();!s&&i&&this._updateSessionFromEvent(i,r);const a=r.transaction_info;if(s&&a&&r.transaction!==t.transaction){const t="custom";r.transaction_info={...a,source:t}}return this.sendEvent(r,e),r}).then(null,t=>{if(t instanceof De)throw t;throw this.captureException(t,{data:{__sentry__:!0},originalException:t}),new De(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)})}_process(t){this._numProcessing++,t.then(t=>(this._numProcessing--,t),t=>(this._numProcessing--,t))}_sendEnvelope(t){if(this._transport&&this._dsn)return this.emit("beforeEnvelope",t),this._transport.send(t).then(null,t=>{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("Error while sending event:",t)});("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("Transport disabled")}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.keys(t).map(e=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t[e]}})}}function $r(t){return void 0===t.type}function jr(t){return"transaction"===t.type}const Vr=30;function Zr(t,e,n=function(t){const e=[];function n(t){return e.splice(e.indexOf(t),1)[0]}return{$:e,add:function(r){if(!(void 0===t||e.length<t))return Rn(new De("Not adding Promise because buffer limit was reached."));const i=r();return-1===e.indexOf(i)&&e.push(i),i.then(()=>n(i)).then(null,()=>n(i).then(null,()=>{})),i},drain:function(t){return new Dn((n,r)=>{let i=e.length;if(!i)return n(!0);const s=setTimeout(()=>{t&&t>0&&n(!1)},t);e.forEach(t=>{xn(t).then(()=>{--i||(clearTimeout(s),n(!0))},r)})})}}}(t.bufferSize||Vr)){let r={};function i(i){const s=[];if(Fn(i,(e,n)=>{const i=qn(n);if(function(t,e,n=Date.now()){return function(t,e){return t[e]||t.all||0}(t,e)>n}(r,i)){const r=qr(e,n);t.recordDroppedEvent("ratelimit_backoff",i,r)}else s.push(e)}),0===s.length)return xn();const a=Gn(i[0],s),o=e=>{Fn(a,(n,r)=>{const i=qr(n,r);t.recordDroppedEvent(e,qn(r),i)})};return n.add(()=>e({body:jn(a,t.textEncoder)}).then(t=>(void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),r=function(t,{statusCode:e,headers:n},r=Date.now()){const i={...t},s=n&&n["x-sentry-rate-limits"],a=n&&n["retry-after"];if(s)for(const t of s.trim().split(",")){const[e,n]=t.split(":",2),s=parseInt(e,10),a=1e3*(isNaN(s)?60:s);if(n)for(const t of n.split(";"))i[t]=r+a;else i.all=r+a}else a?i.all=r+function(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${t}`);return isNaN(r)?Jn:r-e}(a,r):429===e&&(i.all=r+6e4);return i}(r,t),t),t=>{throw o("network_error"),t})).then(t=>t,t=>{if(t instanceof De)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("Skipped sending event because buffer is full."),o("queue_overflow"),xn();throw t})}return i.__sentry__baseTransport__=!0,{send:i,flush:t=>n.drain(t)}}function qr(t,e){if("event"===e||"transaction"===e)return Array.isArray(t)?t[1]:void 0}const Wr="7.53.1";let Kr;class Jr{constructor(){Jr.prototype.__init.call(this)}static __initStatic(){this.id="FunctionToString"}__init(){this.name=Jr.id}setupOnce(){Kr=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=Me(this)||this;return Kr.apply(e,t)}}catch(t){}}}Jr.__initStatic();const Xr=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/];class Qr{static __initStatic(){this.id="InboundFilters"}__init(){this.name=Qr.id}constructor(t={}){this._options=t,Qr.prototype.__init.call(this)}setupOnce(t,e){const n=t=>{const n=e();if(n){const e=n.getIntegration(Qr);if(e){const r=n.getClient(),i=r?r.getOptions():{},s=function(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...Xr],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]],ignoreInternal:void 0===t.ignoreInternal||t.ignoreInternal}}(e._options,i);return function(t,e){return e.ignoreInternal&&function(t){try{return"SentryError"===t.exception.values[0].type}catch(t){}return!1}(t)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${_n(t)}`),!0):function(t,e){return!(t.type||!e||!e.length)&&function(t){if(t.message)return[t.message];if(t.exception){const{values:e}=t.exception;try{const{type:t="",value:n=""}=e&&e[e.length-1]||{};return[`${n}`,`${t}: ${n}`]}catch(e){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error(`Cannot extract message for event ${_n(t)}`),[]}}return[]}(t).some(t=>Oe(t,e))}(t,e.ignoreErrors)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${_n(t)}`),!0):function(t,e){if("transaction"!==t.type||!e||!e.length)return!1;const n=t.transaction;return!!n&&Oe(n,e)}(t,e.ignoreTransactions)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${_n(t)}`),!0):function(t,e){if(!e||!e.length)return!1;const n=ti(t);return!!n&&Oe(n,e)}(t,e.denyUrls)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${_n(t)}.\nUrl: ${ti(t)}`),!0):!function(t,e){if(!e||!e.length)return!0;const n=ti(t);return!n||Oe(n,e)}(t,e.allowUrls)&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${_n(t)}.\nUrl: ${ti(t)}`),!0)}(t,s)?null:t}}return t};n.id=this.name,t(n)}}function ti(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch(t){}return e?function(t=[]){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(e):null}catch(e){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error(`Cannot extract url for event ${_n(t)}`),null}}Qr.__initStatic();const ei=fe;let ni=0;function ri(){return ni>0}function ii(t,e={},n){if("function"!=typeof t)return t;try{const e=t.__sentry_wrapped__;if(e)return e;if(Me(t))return t}catch(e){return t}const r=function(){const r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);const i=r.map(t=>ii(t,e));return t.apply(this,i)}catch(t){throw ni++,setTimeout(()=>{ni--}),Br(n=>{n.addEventProcessor(t=>(e.mechanism&&(mn(t,void 0,void 0),gn(t,e.mechanism)),t.extra={...t.extra,arguments:r},t)),Ur(t)}),t}};try{for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=t[e])}catch(t){}Be(r,t),Ue(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:()=>t.name})}catch(t){}return r}function si(t,e){const n=oi(t,e),r={type:e&&e.name,value:li(e)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function ai(t,e){return{exception:{values:[si(t,e)]}}}function oi(t,e){const n=e.stacktrace||e.stack||"",r=function(t){if(t){if("number"==typeof t.framesToPop)return t.framesToPop;if(ci.test(t.message))return 1}return 0}(e);try{return t(n,r)}catch(t){}return[]}const ci=/Minified React error #\d+;/i;function li(t){const e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}function ui(t,e,n,r,i){let s;if(re(e)&&e.error)return ai(t,e.error);if(ie(e)||ne(e,"DOMException")){const i=e;if("stack"in e)s=ai(t,e);else{const e=i.name||(ie(i)?"DOMError":"DOMException"),a=i.message?`${e}: ${i.message}`:e;s=di(t,a,n,r),mn(s,a)}return"code"in i&&(s.tags={...s.tags,"DOMException.code":`${i.code}`}),s}return ee(e)?ai(t,e):oe(e)||ce(e)?(s=function(t,e,n,r){const i=fr().getClient(),s=i&&i.getOptions().normalizeDepth,a={exception:{values:[{type:ce(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:`Non-Error ${r?"promise rejection":"exception"} captured with keys: ${ze(e)}`}]},extra:{__serialized__:kn(e,s)}};if(n){const e=oi(t,n);e.length&&(a.exception.values[0].stacktrace={frames:e})}return a}(t,e,n,i),gn(s,{synthetic:!0}),s):(s=di(t,e,n,r),mn(s,`${e}`,void 0),gn(s,{synthetic:!0}),s)}function di(t,e,n,r){const i={message:e};if(r&&n){const r=oi(t,n);r.length&&(i.exception={values:[{value:e,stacktrace:{frames:r}}]})}return i}const pi="Breadcrumbs";class hi{static __initStatic(){this.id=pi}__init(){this.name=hi.id}constructor(t){hi.prototype.__init.call(this),this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t}}setupOnce(){var t;this.options.console&&en("console",fi),this.options.dom&&en("dom",(t=this.options.dom,function(e){let n,r="object"==typeof t?t.serializeAttribute:void 0,i="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;i&&i>1024&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${i} was configured. Sentry will use 1024 instead.`),i=1024),"string"==typeof r&&(r=[r]);try{const t=e.event;n=function(t){return t&&!!t.target}(t)?ve(t.target,{keyAttrs:r,maxStringLength:i}):ve(t,{keyAttrs:r,maxStringLength:i})}catch(t){n="<unknown>"}0!==n.length&&fr().addBreadcrumb({category:`ui.${e.name}`,message:n},{event:e.event,name:e.name,global:e.global})})),this.options.xhr&&en("xhr",_i),this.options.fetch&&en("fetch",mi),this.options.history&&en("history",gi)}addSentryBreadcrumb(t){this.options.sentry&&fr().addBreadcrumb({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:_n(t)},{event:t})}}function fi(t){for(let e=0;e<t.args.length;e++)if("ref=Ref<"===t.args[e]){t.args[e+1]="viewRef";break}const e={category:"console",data:{arguments:t.args,logger:"console"},level:(n=t.level,"warn"===n?"warning":On.includes(n)?n:"log"),message:Ne(t.args," ")};var n;if("assert"===t.level){if(!1!==t.args[0])return;e.message=`Assertion failed: ${Ne(t.args.slice(1)," ")||"console.assert"}`,e.data.arguments=t.args.slice(1)}fr().addBreadcrumb(e,{input:t.args,level:t.level})}function _i(t){const{startTimestamp:e,endTimestamp:n}=t,r=t.xhr[Xe];if(!e||!n||!r)return;const{method:i,url:s,status_code:a,body:o}=r,c={method:i,url:s,status_code:a},l={xhr:t.xhr,input:o,startTimestamp:e,endTimestamp:n};fr().addBreadcrumb({category:"xhr",data:c,type:"http"},l)}function mi(t){const{startTimestamp:e,endTimestamp:n}=t;if(n&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){const r=t.fetchData,i={data:t.error,input:t.args,startTimestamp:e,endTimestamp:n};fr().addBreadcrumb({category:"fetch",data:r,level:"error",type:"http"},i)}else{const r={...t.fetchData,status_code:t.response&&t.response.status},i={input:t.args,response:t.response,startTimestamp:e,endTimestamp:n};fr().addBreadcrumb({category:"fetch",data:r,type:"http"},i)}}function gi(t){let e=t.from,n=t.to;const r=In(ei.location.href);let i=In(e);const s=In(n);i.path||(i=r),r.protocol===s.protocol&&r.host===s.host&&(n=s.relative),r.protocol===i.protocol&&r.host===i.host&&(e=i.relative),fr().addBreadcrumb({category:"navigation",data:{from:e,to:n}})}hi.__initStatic();class yi extends Fr{constructor(t){const e=ei.SENTRY_SDK_SOURCE||"npm";t._metadata=t._metadata||{},t._metadata.sdk=t._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:`${e}:@sentry/browser`,version:Wr}],version:Wr},super(t),t.sendClientReports&&ei.document&&ei.document.addEventListener("visibilitychange",()=>{"hidden"===ei.document.visibilityState&&this._flushOutcomes()})}eventFromException(t,e){return function(t,e,n,r){const i=ui(t,e,n&&n.syntheticException||void 0,r);return gn(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),xn(i)}(this._options.stackParser,t,e,this._options.attachStacktrace)}eventFromMessage(t,e="info",n){return function(t,e,n="info",r,i){const s=di(t,e,r&&r.syntheticException||void 0,i);return s.level=n,r&&r.event_id&&(s.event_id=r.event_id),xn(s)}(this._options.stackParser,t,e,n,this._options.attachStacktrace)}sendEvent(t,e){const n=this.getIntegrationById(pi);n&&n.addSentryBreadcrumb&&n.addSentryBreadcrumb(t),super.sendEvent(t,e)}captureUserFeedback(t){if(!this._isEnabled())return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("SDK not enabled, will not capture user feedback."));const e=function(t,{metadata:e,tunnel:n,dsn:r}){const i={event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}},...!!n&&!!r&&{dsn:Ce(r)}},s=function(t){return[{type:"user_report"},t]}(t);return Gn(i,[s])}(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(e)}_prepareEvent(t,e,n){return t.platform=t.platform||"javascript",super._prepareEvent(t,e,n)}_flushOutcomes(){const t=this._clearOutcomes();if(0===t.length)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("No outcomes to send"));if(!this._dsn)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("No dsn provided, will not send outcomes"));("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("Sending outcomes:",t);const e=(n=t,Gn((r=this._options.tunnel&&Ce(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:Pn(),discarded_events:n}]]));var n,r;this._sendEnvelope(e)}}let vi;function bi(t,e=function(){if(vi)return vi;if(We(ei.fetch))return vi=ei.fetch.bind(ei);const t=ei.document;let e=ei.fetch;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(e=r.fetch),t.head.removeChild(n)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return vi=e.bind(ei)}()){let n=0,r=0;return Zr(t,function(i){const s=i.body.length;n+=s,r++;const a={body:i.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&r<15,...t.fetchOptions};try{return e(t.url,a).then(t=>(n-=s,r--,{statusCode:t.status,headers:{"x-sentry-rate-limits":t.headers.get("X-Sentry-Rate-Limits"),"retry-after":t.headers.get("Retry-After")}}))}catch(t){return vi=void 0,n-=s,r--,Rn(t)}})}function Ei(t){return Zr(t,function(e){return new Dn((n,r)=>{const i=new XMLHttpRequest;i.onerror=r,i.onreadystatechange=()=>{4===i.readyState&&n({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",t.url);for(const e in t.headers)Object.prototype.hasOwnProperty.call(t.headers,e)&&i.setRequestHeader(e,t.headers[e]);i.send(e.body)})})}const Si="?";function wi(t,e,n,r){const i={filename:t,function:e,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}const ki=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ti=/\((\S*)(?::(\d+))(?::(\d+))\)/,Ci=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,xi=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ri=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Di=$e([30,t=>{const e=ki.exec(t);if(e){if(e[2]&&0===e[2].indexOf("eval")){const t=Ti.exec(e[2]);t&&(e[2]=t[1],e[3]=t[2],e[4]=t[3])}const[t,n]=Ii(e[1]||Si,e[2]);return wi(n,t,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}}],[50,t=>{const e=Ci.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const t=xi.exec(e[3]);t&&(e[1]=e[1]||"eval",e[3]=t[1],e[4]=t[2],e[5]="")}let t=e[3],n=e[1]||Si;return[n,t]=Ii(n,t),wi(t,n,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}],[40,t=>{const e=Ri.exec(t);return e?wi(e[2],e[1]||Si,+e[3],e[4]?+e[4]:void 0):void 0}]),Ii=(t,e)=>{const n=-1!==t.indexOf("safari-extension"),r=-1!==t.indexOf("safari-web-extension");return n||r?[-1!==t.indexOf("@")?t.split("@")[0]:Si,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};class Ni{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=Ni.id}__init2(){this._installFunc={onerror:Oi,onunhandledrejection:Ai}}constructor(t){Ni.prototype.__init.call(this),Ni.prototype.__init2.call(this),this._options={onerror:!0,onunhandledrejection:!0,...t}}setupOnce(){Error.stackTraceLimit=50;const t=this._options;for(const e in t){const n=this._installFunc[e];n&&t[e]&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`Global Handler attached: ${e}`),n(),this._installFunc[e]=void 0)}}}function Oi(){en("error",t=>{const[e,n,r]=Mi();if(!e.getIntegration(Ni))return;const{msg:i,url:s,line:a,column:o,error:c}=t;if(ri()||c&&c.__sentry_own_request__)return;const l=void 0===c&&se(i)?function(t,e,n,r){let i=re(t)?t.message:t,s="Error";const a=i.match(/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i);return a&&(s=a[1],i=a[2]),Ui({exception:{values:[{type:s,value:i}]}},e,n,r)}(i,s,a,o):Ui(ui(n,c||i,void 0,r,!1),s,a,o);l.level="error",Bi(e,c,l,"onerror")})}function Ai(){en("unhandledrejection",t=>{const[e,n,r]=Mi();if(!e.getIntegration(Ni))return;let i=t;try{"reason"in t?i=t.reason:"detail"in t&&"reason"in t.detail&&(i=t.detail.reason)}catch(t){}if(ri()||i&&i.__sentry_own_request__)return!0;const s=ae(i)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:ui(n,i,void 0,r,!0);s.level="error",Bi(e,i,s,"onunhandledrejection")})}function Ui(t,e,n,r){const i=t.exception=t.exception||{},s=i.values=i.values||[],a=s[0]=s[0]||{},o=a.stacktrace=a.stacktrace||{},c=o.frames=o.frames||[],l=isNaN(parseInt(r,10))?void 0:r,u=isNaN(parseInt(n,10))?void 0:n,d=se(e)&&e.length>0?e:function(){try{return ge.document.location.href}catch(t){return""}}();return 0===c.length&&c.push({colno:l,filename:d,function:"?",in_app:!0,lineno:u}),t}function Bi(t,e,n,r){gn(n,{handled:!1,type:r}),t.captureEvent(n,{originalException:e})}function Mi(){const t=fr(),e=t.getClient(),n=e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[t,n.stackParser,n.attachStacktrace]}Ni.__initStatic();const Pi=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class Li{static __initStatic(){this.id="TryCatch"}__init(){this.name=Li.id}constructor(t){Li.prototype.__init.call(this),this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t}}setupOnce(){this._options.setTimeout&&Ae(ei,"setTimeout",Hi),this._options.setInterval&&Ae(ei,"setInterval",Hi),this._options.requestAnimationFrame&&Ae(ei,"requestAnimationFrame",zi),this._options.XMLHttpRequest&&"XMLHttpRequest"in ei&&Ae(XMLHttpRequest.prototype,"send",Gi);const t=this._options.eventTarget;t&&(Array.isArray(t)?t:Pi).forEach(Yi)}}function Hi(t){return function(...e){return e[0]=ii(e[0],{mechanism:{data:{function:Ve(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}function zi(t){return function(e){return t.apply(this,[ii(e,{mechanism:{data:{function:"requestAnimationFrame",handler:Ve(t)},handled:!0,type:"instrument"}})])}}function Gi(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(t=>{t in n&&"function"==typeof n[t]&&Ae(n,t,function(e){const n={mechanism:{data:{function:t,handler:Ve(e)},handled:!0,type:"instrument"}},r=Me(e);return r&&(n.mechanism.data.handler=Ve(r)),ii(e,n)})}),t.apply(this,e)}}function Yi(t){const e=ei[t]&&ei[t].prototype;e&&e.hasOwnProperty&&e.hasOwnProperty("addEventListener")&&(Ae(e,"addEventListener",function(e){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=ii(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Ve(r),target:t},handled:!0,type:"instrument"}}))}catch(t){}return e.apply(this,[n,ii(r,{mechanism:{data:{function:"addEventListener",handler:Ve(r),target:t},handled:!0,type:"instrument"}}),i])}}),Ae(e,"removeEventListener",function(t){return function(e,n,r){const i=n;try{const n=i&&i.__sentry_wrapped__;n&&t.call(this,e,n,r)}catch(t){}return t.call(this,e,i,r)}}))}Li.__initStatic();class Fi{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=Fi.id}constructor(t={}){Fi.prototype.__init.call(this),this._key=t.key||"cause",this._limit=t.limit||5}setupOnce(){const t=fr().getClient();t&&cr((e,n)=>{const r=fr().getIntegration(Fi);return r?function(t,e,n,r,i){if(!(r.exception&&r.exception.values&&i&&pe(i.originalException,Error)))return r;const s=$i(t,n,i.originalException,e);return r.exception.values=[...s,...r.exception.values],r}(t.getOptions().stackParser,r._key,r._limit,e,n):e})}}function $i(t,e,n,r,i=[]){if(!pe(n[r],Error)||i.length+1>=e)return i;const s=si(t,n[r]);return $i(t,e,n[r],r,[s,...i])}Fi.__initStatic();class ji{constructor(){ji.prototype.__init.call(this)}static __initStatic(){this.id="HttpContext"}__init(){this.name=ji.id}setupOnce(){cr(t=>{if(fr().getIntegration(ji)){if(!ei.navigator&&!ei.location&&!ei.document)return t;const e=t.request&&t.request.url||ei.location&&ei.location.href,{referrer:n}=ei.document||{},{userAgent:r}=ei.navigator||{},i={...t.request&&t.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},s={...t.request,...e&&{url:e},headers:i};return{...t,request:s}}return t})}}ji.__initStatic();class Vi{constructor(){Vi.prototype.__init.call(this)}static __initStatic(){this.id="Dedupe"}__init(){this.name=Vi.id}setupOnce(t,e){const n=t=>{if(t.type)return t;const n=e().getIntegration(Vi);if(n){try{if(function(t,e){return!(!e||!function(t,e){const n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!qi(t,e)||!Zi(t,e))}(t,e)&&!function(t,e){const n=Wi(e),r=Wi(t);return!!(n&&r&&n.type===r.type&&n.value===r.value&&qi(t,e)&&Zi(t,e))}(t,e))}(t,n._previousEvent))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(e){return n._previousEvent=t}return n._previousEvent=t}return t};n.id=this.name,t(n)}}function Zi(t,e){let n=Ki(t),r=Ki(e);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let t=0;t<r.length;t++){const e=r[t],i=n[t];if(e.filename!==i.filename||e.lineno!==i.lineno||e.colno!==i.colno||e.function!==i.function)return!1}return!0}function qi(t,e){let n=t.fingerprint,r=e.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch(t){return!1}}function Wi(t){return t.exception&&t.exception.values&&t.exception.values[0]}function Ki(t){const e=t.exception;if(e)try{return e.values[0].stacktrace.frames}catch(t){return}}Vi.__initStatic();const Ji=[new Qr,new Jr,new Li,new hi,new Ni,new Fi,new Vi,new ji];function Xi(t={},e=fr()){if(!ei.document)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("Global document not defined in showReportDialog call"));const{client:n,scope:r}=e.getStackTop(),i=t.dsn||n&&n.getDsn();if(!i)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("DSN not configured for showReportDialog call"));r&&(t.user={...r.getUser(),...t.user}),t.eventId||(t.eventId=e.lastEventId());const s=ei.document.createElement("script");s.async=!0,s.src=function(t,e){const n=Re(t);if(!n)return"";const r=`${Mr(n)}embed/error-page/`;let i=`dsn=${Ce(n)}`;for(const t in e)if("dsn"!==t)if("user"===t){const t=e.user;if(!t)continue;t.name&&(i+=`&name=${encodeURIComponent(t.name)}`),t.email&&(i+=`&email=${encodeURIComponent(t.email)}`)}else i+=`&${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`;return`${r}?${i}`}(i,t),t.onLoad&&(s.onload=t.onLoad);const a=ei.document.head||ei.document.body;a?a.appendChild(s):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("Not injecting report dialog. No injection point found in HTML")}function Qi(t){t.startSession({ignoreDuration:!0}),t.captureSession()}const ts=fe,es="sentryReplaySession",ns="Unable to send Replay",rs=15e4,is=5e3;var ss;function as(t){const e=null==t?void 0:t.host;return Boolean(e&&e.shadowRoot&&e.shadowRoot===t)}function os({maskInputOptions:t,tagName:e,type:n}){"option"===e.toLowerCase()&&(e="select");const r="string"==typeof n?n.toLowerCase():void 0;return t[e.toLowerCase()]||r&&t[r]||"password"===r||"input"===e&&!n&&t.text}function cs({input:t,maskInputSelector:e,unmaskInputSelector:n,maskInputOptions:r,tagName:i,type:s,value:a,maskInputFn:o}){let c=a||"";return n&&t.matches(n)||(t.hasAttribute("data-rr-is-password")&&(s="password"),(os({maskInputOptions:r,tagName:i,type:s})||e&&t.matches(e))&&(c=o?o(c):"*".repeat(c.length))),c}!function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"}(ss||(ss={}));const ls="__rrweb_original__";function us(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?e.toLowerCase():null}function ds(t,e,n){return"string"==typeof n&&n.toLowerCase(),"INPUT"!==e||"radio"!==n&&"checkbox"!==n?t.value:t.getAttribute("value")||""}let ps=1;const hs=new RegExp("[^a-z0-9-_:]"),fs=-2;function _s(t){return t?t.replace(/[\S]/g,"*"):""}function ms(t){try{const e=t.rules||t.cssRules;return e?Array.from(e).map(gs).join(""):null}catch(t){return null}}function gs(t){let e=t.cssText;if(function(t){return"styleSheet"in t}(t))try{e=ms(t.styleSheet)||e}catch(t){}return ys(e)}function ys(t){return t.indexOf(":")>-1?t.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2"):t}let vs,bs;const Es=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Ss=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,ws=/^(data:)([^,]*),(.*)/i;function ks(t,e){return(t||"").replace(Es,(t,n,r,i,s,a)=>{const o=r||s||a,c=n||i||"";if(!o)return t;if(!Ss.test(o))return`url(${c}${o}${c})`;if(ws.test(o))return`url(${c}${o}${c})`;if("/"===o[0])return`url(${c}${function(t){let e="";return e=t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0],e=e.split("?")[0],e}(e)+o}${c})`;const l=e.split("/"),u=o.split("/");l.pop();for(const t of u)"."!==t&&(".."===t?l.pop():l.push(t));return`url(${c}${l.join("/")}${c})`})}const Ts=/^[^ \t\n\r\u000c]+/,Cs=/^[, \t\n\r\u000c]+/;function xs(t,e){if(!e||""===e.trim())return e;const n=t.createElement("a");return n.href=e,n.href}function Rs(){const t=document.createElement("a");return t.href="",t.href}function Ds(t,e,n,r,i,s,a,o){if(!i)return i;const c=r.toLowerCase(),l=n.toLowerCase();return"src"===c||"href"===c||"xlink:href"===c&&"#"!==i[0]?xs(t,i):"background"!==c||"table"!==l&&"td"!==l&&"th"!==l?"srcset"===c?function(t,e){if(""===e.trim())return e;let n=0;function r(t){let r,i=t.exec(e.substring(n));return i?(r=i[0],n+=r.length,r):""}let i=[];for(;r(Cs),!(n>=e.length);){let s=r(Ts);if(","===s.slice(-1))s=xs(t,s.substring(0,s.length-1)),i.push(s);else{let r="";s=xs(t,s);let a=!1;for(;;){let t=e.charAt(n);if(""===t){i.push((s+r).trim());break}if(a)")"===t&&(a=!1);else{if(","===t){n+=1,i.push((s+r).trim());break}"("===t&&(a=!0)}r+=t,n+=1}}}return i.join(", ")}(t,i):"style"===c?ks(i,Rs()):"object"===l&&"data"===c?xs(t,i):s&&function(t,e,n,r){return(!r||!t.matches(r))&&(["placeholder","title","aria-label"].indexOf(e)>-1||"input"===n&&"value"===e&&t.hasAttribute("type")&&["submit","button"].indexOf(t.getAttribute("type").toLowerCase())>-1)}(e,c,l,a)?o?o(i):_s(i):i:xs(t,i)}function Is(t,e,n,r,i){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return Is(t.parentNode,e,n,r,i);if(r&&(t.matches(r)||t.closest(r)))return!1;if(i)return!0;if("string"==typeof e){if(t.classList.contains(e))return!0}else for(let n=0;n<t.classList.length;n++)if(e.test(t.classList[n]))return!0;return!(!n||!t.matches(n))||Is(t.parentNode,e,n,r,i)}function Ns(t){return null==t?"":t.toLowerCase()}function Os(t,e){const{doc:n,map:r,blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,skipChild:u=!1,inlineStylesheet:d=!0,maskInputSelector:p,unmaskInputSelector:h,maskAllText:f,maskInputOptions:_={},maskTextFn:m,maskInputFn:g,slimDOMOptions:y,dataURLOptions:v={},inlineImages:b=!1,recordCanvas:E=!1,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:k=5e3,keepIframeSrcFn:T=(()=>!1)}=e;let{preserveWhiteSpace:C=!0}=e;const x=function(t,e){var n;const{doc:r,blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,inlineStylesheet:u,maskInputSelector:d,unmaskInputSelector:p,maskAllText:h,maskInputOptions:f={},maskTextFn:_,maskInputFn:m,dataURLOptions:g={},inlineImages:y,recordCanvas:v,keepIframeSrcFn:b}=e;let E;if(r.__sn){const t=r.__sn.id;E=1===t?void 0:t}switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:ss.Document,childNodes:[],compatMode:t.compatMode,rootId:E}:{type:ss.Document,childNodes:[],rootId:E};case t.DOCUMENT_TYPE_NODE:return{type:ss.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:E};case t.ELEMENT_NODE:const e=function(t,e,n,r){if(r&&t.matches(r))return!1;if("string"==typeof e){if(t.classList.contains(e))return!0}else for(let n=0;n<t.classList.length;n++)if(e.test(t.classList[n]))return!0;return!!n&&t.matches(n)}(t,i,s,a),k=function(t){if(t instanceof HTMLFormElement)return"form";const e=t.tagName.toLowerCase().trim();return hs.test(e)?"div":e}(t);let T={};for(const{name:e,value:n}of Array.from(t.attributes))As(k,e)||(T[e]=Ds(r,t,k,e,n,h,l,_));if("link"===k&&u){const e=Array.from(r.styleSheets).find(e=>e.href===t.href);let n=null;e&&(n=ms(e)),n&&(delete T.rel,delete T.href,T._cssText=ks(n,e.href))}if("style"===k&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){const e=ms(t.sheet);e&&(T._cssText=ks(e,Rs()))}if("input"===k||"textarea"===k||"select"===k||"option"===k){const e=t,n=us(e),r=ds(e,k.toUpperCase(),n),i=t.checked;"submit"!==n&&"button"!==n&&r&&(T.value=cs({input:e,type:n,tagName:k,value:r,maskInputSelector:d,unmaskInputSelector:p,maskInputOptions:f,maskInputFn:m})),i&&(T.checked=i)}if("option"===k&&(t.selected&&!f.select?T.selected=!0:delete T.selected),"canvas"===k&&v)if("2d"===t.__context)(function(t){const e=t.getContext("2d");if(!e)return!0;for(let n=0;n<t.width;n+=50)for(let r=0;r<t.height;r+=50){const i=e.getImageData;if(new Uint32Array((ls in i?i[ls]:i).call(e,n,r,Math.min(50,t.width-n),Math.min(50,t.height-r)).data.buffer).some(t=>0!==t))return!1}return!0})(t)||(T.rr_dataURL=t.toDataURL(g.type,g.quality));else if(!("__context"in t)){const e=t.toDataURL(g.type,g.quality),n=document.createElement("canvas");n.width=t.width,n.height=t.height,e!==n.toDataURL(g.type,g.quality)&&(T.rr_dataURL=e)}if("img"===k&&y){vs||(vs=r.createElement("canvas"),bs=vs.getContext("2d"));const e=t,n=e.crossOrigin;e.crossOrigin="anonymous";const i=()=>{try{vs.width=e.naturalWidth,vs.height=e.naturalHeight,bs.drawImage(e,0,0),T.rr_dataURL=vs.toDataURL(g.type,g.quality)}catch(t){console.warn(`Cannot inline img src=${e.currentSrc}! Error: ${t}`)}n?T.crossOrigin=n:delete T.crossOrigin};e.complete&&0!==e.naturalWidth?i():e.onload=i}if("audio"!==k&&"video"!==k||(T.rr_mediaState=t.paused?"paused":"played",T.rr_mediaCurrentTime=t.currentTime),t.scrollLeft&&(T.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(T.rr_scrollTop=t.scrollTop),e){const{width:e,height:n}=t.getBoundingClientRect();T={class:T.class,rr_width:`${e}px`,rr_height:`${n}px`}}return"iframe"!==k||b(T.src)||(t.contentDocument||(T.rr_src=T.src),delete T.src),{type:ss.Element,tagName:k,attributes:T,childNodes:[],isSVG:(w=t,Boolean("svg"===w.tagName||w.ownerSVGElement)||void 0),needBlock:e,rootId:E};case t.TEXT_NODE:const C=t.parentNode&&t.parentNode.tagName;let x=t.textContent;const R="STYLE"===C||void 0,D="SCRIPT"===C||void 0;if(R&&x){try{t.nextSibling||t.previousSibling||(null===(n=t.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(x=(S=t.parentNode.sheet).cssRules?Array.from(S.cssRules).map(t=>t.cssText?ys(t.cssText):"").join(""):"")}catch(e){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${e}`,t)}x=ks(x,Rs())}return D&&(x="SCRIPT_PLACEHOLDER"),"TEXTAREA"===C&&x?x="":"OPTION"===C&&x?x=cs({input:t.parentNode,type:null,tagName:C,value:x,maskInputSelector:d,unmaskInputSelector:p,maskInputOptions:f,maskInputFn:m}):!R&&!D&&Is(t,o,c,l,h)&&x&&(x=_?_(x):_s(x)),{type:ss.Text,textContent:x||"",isStyle:R,rootId:E};case t.CDATA_SECTION_NODE:return{type:ss.CDATA,textContent:"",rootId:E};case t.COMMENT_NODE:return{type:ss.Comment,textContent:t.textContent||"",rootId:E};default:return!1}var S,w}(t,{doc:n,blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,inlineStylesheet:d,maskInputSelector:p,unmaskInputSelector:h,maskAllText:f,maskInputOptions:_,maskTextFn:m,maskInputFn:g,dataURLOptions:v,inlineImages:b,recordCanvas:E,keepIframeSrcFn:T});if(!x)return console.warn(t,"not serialized"),null;let R;R="__sn"in t?t.__sn.id:!function(t,e){if(e.comment&&t.type===ss.Comment)return!0;if(t.type===ss.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel||"modulepreload"===t.attributes.rel)&&"script"===t.attributes.as||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&t.attributes.href.endsWith(".js")))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(Ns(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Ns(t.attributes.name)||"icon"===Ns(t.attributes.rel)||"apple-touch-icon"===Ns(t.attributes.rel)||"shortcut icon"===Ns(t.attributes.rel))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&Ns(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(Ns(t.attributes.property).match(/^(og|twitter|fb):/)||Ns(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===Ns(t.attributes.name)))return!0;if(e.headMetaRobots&&("robots"===Ns(t.attributes.name)||"googlebot"===Ns(t.attributes.name)||"bingbot"===Ns(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&("author"===Ns(t.attributes.name)||"generator"===Ns(t.attributes.name)||"framework"===Ns(t.attributes.name)||"publisher"===Ns(t.attributes.name)||"progid"===Ns(t.attributes.name)||Ns(t.attributes.property).match(/^article:/)||Ns(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&("google-site-verification"===Ns(t.attributes.name)||"yandex-verification"===Ns(t.attributes.name)||"csrf-token"===Ns(t.attributes.name)||"p:domain_verify"===Ns(t.attributes.name)||"verify-v1"===Ns(t.attributes.name)||"verification"===Ns(t.attributes.name)||"shopify-checkout-api-token"===Ns(t.attributes.name)))return!0}}return!1}(x,y)&&(C||x.type!==ss.Text||x.isStyle||x.textContent.replace(/^\s+|\s+$/gm,"").length)?ps++:fs;const D=Object.assign(x,{id:R});if(t.__sn=D,R===fs)return null;r[R]=t,S&&S(t);let I=!u;if(D.type===ss.Element&&(I=I&&!D.needBlock,delete D.needBlock,t.shadowRoot&&(D.isShadowHost=!0)),(D.type===ss.Document||D.type===ss.Element)&&I){y.headWhitespace&&x.type===ss.Element&&"head"===x.tagName&&(C=!1);const e={doc:n,map:r,blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,skipChild:u,inlineStylesheet:d,maskInputSelector:p,unmaskInputSelector:h,maskAllText:f,maskInputOptions:_,maskTextFn:m,maskInputFn:g,slimDOMOptions:y,dataURLOptions:v,inlineImages:b,recordCanvas:E,preserveWhiteSpace:C,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:k,keepIframeSrcFn:T};for(const n of Array.from(t.childNodes)){const t=Os(n,e);t&&D.childNodes.push(t)}if(function(t){return t.nodeType===t.ELEMENT_NODE}(t)&&t.shadowRoot)for(const n of Array.from(t.shadowRoot.childNodes)){const t=Os(n,e);t&&(t.isShadow=!0,D.childNodes.push(t))}}return t.parentNode&&as(t.parentNode)&&(D.isShadow=!0),D.type===ss.Element&&"iframe"===D.tagName&&function(t,e,n){const r=t.contentWindow;if(!r)return;let i,s=!1;try{i=r.document.readyState}catch(t){return}if("complete"!==i){const r=setTimeout(()=>{s||(e(),s=!0)},n);return void t.addEventListener("load",()=>{clearTimeout(r),s=!0,e()})}const a="about:blank";r.location.href===a&&t.src!==a&&""!==t.src?t.addEventListener("load",e):setTimeout(e,0)}(t,()=>{const e=t.contentDocument;if(e&&w){const n=Os(e,{doc:e,map:r,blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputSelector:p,unmaskInputSelector:h,maskAllText:f,maskInputOptions:_,maskTextFn:m,maskInputFn:g,slimDOMOptions:y,dataURLOptions:v,inlineImages:b,recordCanvas:E,preserveWhiteSpace:C,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:k,keepIframeSrcFn:T});n&&w(t,n)}},k),D}function As(t,e,n){return("video"===t||"audio"===t)&&"autoplay"===e}var Us,Bs,Ms,Ps,Ls,Hs;function zs(t,e,n=document){const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}!function(t){t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin"}(Us||(Us={})),function(t){t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration"}(Bs||(Bs={})),function(t){t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel"}(Ms||(Ms={})),function(t){t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2"}(Ps||(Ps={})),function(t){t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange"}(Ls||(Ls={})),function(t){t.Start="start",t.Pause="pause",t.Resume="resume",t.Resize="resize",t.Finish="finish",t.FullsnapshotRebuilded="fullsnapshot-rebuilded",t.LoadStylesheetStart="load-stylesheet-start",t.LoadStylesheetEnd="load-stylesheet-end",t.SkipStart="skip-start",t.SkipEnd="skip-end",t.MouseInteraction="mouse-interaction",t.EventCast="event-cast",t.CustomEvent="custom-event",t.Flush="flush",t.StateChange="state-change",t.PlayBack="play-back"}(Hs||(Hs={}));const Gs="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 Ys={map:{},getId:()=>(console.error(Gs),-1),getNode:()=>(console.error(Gs),null),removeNodeFromMap(){console.error(Gs)},has:()=>(console.error(Gs),!1),reset(){console.error(Gs)}};function Fs(t,e,n={}){let r=null,i=0;return function(s){let a=Date.now();i||!1!==n.leading||(i=a);let o=e-(a-i),c=this,l=arguments;o<=0||o>e?(r&&(clearTimeout(r),r=null),i=a,t.apply(c,l)):r||!1===n.trailing||(r=setTimeout(()=>{i=!1===n.leading?0:Date.now(),r=null,t.apply(c,l)},o))}}function $s(t,e,n,r,i=window){const s=i.Object.getOwnPropertyDescriptor(t,e);return i.Object.defineProperty(t,e,r?n:{set(t){setTimeout(()=>{n.set.call(this,t)},0),s&&s.set&&s.set.call(this,t)}}),()=>$s(t,e,s||{},!0)}function js(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],i=n(r);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=i,()=>{t[e]=r}}catch(t){return()=>{}}}function Vs(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Zs(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function qs(t,e,n,r){if(!t)return!1;if(t.nodeType===t.ELEMENT_NODE){let i=!1;const s=r&&t.matches(r);return"string"==typeof e?i=void 0!==t.closest?!s&&null!==t.closest("."+e):!s&&t.classList.contains(e):!s&&t.classList.forEach(t=>{e.test(t)&&(i=!0)}),!i&&n&&(i=t.matches(n)),!s&&i||qs(t.parentNode,e,n,r)}return qs(t.parentNode,e,n,r)}function Ws(t){return"__sn"in t&&t.__sn.id===fs}function Ks(t,e){if(as(t))return!1;const n=e.getId(t);return!e.has(n)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||Ks(t.parentNode,e))}function Js(t){return Boolean(t.changedTouches)}function Xs(t){return"__sn"in t&&t.__sn.type===ss.Element&&"iframe"===t.__sn.tagName}function Qs(t){return Boolean(null==t?void 0:t.shadowRoot)}function ta(t){return"__ln"in t}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Ys=new Proxy(Ys,{get:(t,e,n)=>("map"===e&&console.error(Gs),Reflect.get(t,e,n))}));class ea{constructor(){this.length=0,this.head=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let e=this.head;for(let n=0;n<t;n++)e=(null==e?void 0:e.next)||null;return e}addNode(t){const e={value:t,previous:null,next:null};if(t.__ln=e,t.previousSibling&&ta(t.previousSibling)){const n=t.previousSibling.__ln.next;e.next=n,e.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=e,n&&(n.previous=e)}else if(t.nextSibling&&ta(t.nextSibling)&&t.nextSibling.__ln.previous){const n=t.nextSibling.__ln.previous;e.previous=n,e.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=e,n&&(n.next=e)}else this.head&&(this.head.previous=e),e.next=this.head,this.head=e;this.length++}removeNode(t){const e=t.__ln;this.head&&(e.previous?(e.previous.next=e.next,e.next&&(e.next.previous=e.previous)):(this.head=e.next,this.head&&(this.head.previous=null)),t.__ln&&delete t.__ln,this.length--)}}const na=(t,e)=>`${t}@${e}`;function ra(t){return"__sn"in t}class ia{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],e=new ea,n=t=>{let e=t,n=fs;for(;n===fs;)e=e&&e.nextSibling,n=e&&this.mirror.getId(e);return n},r=r=>{var i,s,a,o,c;const l=r.getRootNode?null===(i=r.getRootNode())||void 0===i?void 0:i.host:null;let u=l;for(;null===(a=null===(s=null==u?void 0:u.getRootNode)||void 0===s?void 0:s.call(u))||void 0===a?void 0:a.host;)u=(null===(c=null===(o=null==u?void 0:u.getRootNode)||void 0===o?void 0:o.call(u))||void 0===c?void 0:c.host)||null;const d=!(this.doc.contains(r)||u&&this.doc.contains(u));if(!r.parentNode||d)return;const p=as(r.parentNode)?this.mirror.getId(l):this.mirror.getId(r.parentNode),h=n(r);if(-1===p||-1===h)return e.addNode(r);let f=Os(r,{doc:this.doc,map:this.mirror.map,blockClass:this.blockClass,blockSelector:this.blockSelector,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,maskInputSelector:this.maskInputSelector,unmaskInputSelector:this.unmaskInputSelector,skipChild:!0,inlineStylesheet:this.inlineStylesheet,maskAllText:this.maskAllText,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:t=>{Xs(t)&&this.iframeManager.addIframe(t),Qs(r)&&this.shadowDomManager.addShadowRoot(r.shadowRoot,document)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)}});f&&t.push({parentId:p,nextId:h,node:f})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const t of this.movedSet)aa(this.removes,t,this.mirror)&&!this.movedSet.has(t.parentNode)||r(t);for(const t of this.addedSet)oa(this.droppedSet,t)||aa(this.removes,t,this.mirror)?oa(this.movedSet,t)?r(t):this.droppedSet.add(t):r(t);let i=null;for(;e.length;){let t=null;if(i){const e=this.mirror.getId(i.value.parentNode),r=n(i.value);-1!==e&&-1!==r&&(t=i)}if(!t)for(let r=e.length-1;r>=0;r--){const i=e.get(r);if(i){const e=this.mirror.getId(i.value.parentNode),r=n(i.value);if(-1!==e&&-1!==r){t=i;break}}}if(!t){for(;e.head;)e.removeNode(e.head.value);break}i=t.previous,e.removeNode(t.value),r(t.value)}const s={texts:this.texts.map(t=>({id:this.mirror.getId(t.node),value:t.value})).filter(t=>this.mirror.has(t.id)),attributes:this.attributes.map(t=>({id:this.mirror.getId(t.node),attributes:t.attributes})).filter(t=>this.mirror.has(t.id)),removes:this.removes,adds:t};(s.texts.length||s.attributes.length||s.removes.length||s.adds.length)&&(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(s))},this.processMutation=t=>{if(!Ws(t.target))switch(t.type){case"characterData":{const e=t.target.textContent;qs(t.target,this.blockClass,this.blockSelector,this.unblockSelector)||e===t.oldValue||this.texts.push({value:Is(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextSelector,this.maskAllText)&&e?this.maskTextFn?this.maskTextFn(e):e.replace(/[\S]/g,"*"):e,node:t.target});break}case"attributes":{const e=t.target;let n=e.getAttribute(t.attributeName);if("value"===t.attributeName&&(n=cs({input:e,maskInputSelector:this.maskInputSelector,unmaskInputSelector:this.unmaskInputSelector,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:e.getAttribute("type"),value:n,maskInputFn:this.maskInputFn})),qs(t.target,this.blockClass,this.blockSelector,this.unblockSelector)||n===t.oldValue)return;let r=this.attributes.find(e=>e.node===t.target);if(r||(r={node:t.target,attributes:{}},this.attributes.push(r)),"type"===t.attributeName&&"INPUT"===e.tagName&&"password"===(t.oldValue||"").toLowerCase()&&e.setAttribute("data-rr-is-password","true"),"style"===t.attributeName){const n=this.doc.createElement("span");t.oldValue&&n.setAttribute("style",t.oldValue),null==r.attributes.style&&(r.attributes.style={});try{const t=r.attributes.style;for(const r of Array.from(e.style)){const i=e.style.getPropertyValue(r),s=e.style.getPropertyPriority(r);i===n.style.getPropertyValue(r)&&s===n.style.getPropertyPriority(r)||(t[r]=""===s?i:[i,s])}for(const r of Array.from(n.style))""===e.style.getPropertyValue(r)&&(t[r]=!1)}catch(t){console.warn("[rrweb] Error when parsing update to style attribute:",t)}}else{const e=t.target;r.attributes[t.attributeName]=Ds(this.doc,e,e.tagName,t.attributeName,n,this.maskAllText,this.unmaskTextSelector,this.maskTextFn)}break}case"childList":t.addedNodes.forEach(e=>this.genAdds(e,t.target)),t.removedNodes.forEach(e=>{const n=this.mirror.getId(e),r=as(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);qs(t.target,this.blockClass,this.blockSelector,this.unblockSelector)||Ws(e)||(this.addedSet.has(e)?(sa(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===n||Ks(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[na(n,r)]?sa(this.movedSet,e):this.removes.push({parentId:r,id:n,isShadow:!!as(t.target)||void 0})),this.mapRemoves.push(e))})}},this.genAdds=(t,e)=>{if(!e||!qs(e,this.blockClass,this.blockSelector,this.unblockSelector)){if(ra(t)){if(Ws(t))return;this.movedSet.add(t);let n=null;e&&ra(e)&&(n=e.__sn.id),n&&(this.movedMap[na(t.__sn.id,n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);qs(t,this.blockClass,this.blockSelector,this.unblockSelector)||t.childNodes.forEach(t=>this.genAdds(t))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskTextClass","maskTextSelector","unmaskTextSelector","maskInputSelector","unmaskInputSelector","inlineStylesheet","maskAllText","maskInputOptions","maskTextFn","maskInputFn","recordCanvas","inlineImages","slimDOMOptions","doc","mirror","iframeManager","shadowDomManager","canvasManager"].forEach(e=>{this[e]=t[e]})}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 sa(t,e){t.delete(e),e.childNodes.forEach(e=>sa(t,e))}function aa(t,e,n){const{parentNode:r}=e;if(!r)return!1;const i=n.getId(r);return!!t.some(t=>t.id===i)||aa(t,r,n)}function oa(t,e){const{parentNode:n}=e;return!!n&&(!!t.has(n)||oa(t,n))}const ca=t=>(...e)=>{try{return t(...e)}catch(t){try{t.__rrweb__=!0}catch(t){}throw t}},la=[];function ua(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch(t){}return t&&t.target}function da(t,e){var n,r;const i=new ia;la.push(i),i.init(t);let s=window.MutationObserver||window.__rrMutationObserver;const a=null===(r=null===(n=null===window||void 0===window?void 0:window.Zone)||void 0===n?void 0:n.__symbol__)||void 0===r?void 0:r.call(n,"MutationObserver");a&&window[a]&&(s=window[a]);const o=new s(ca(e=>{t.onMutation&&!1===t.onMutation(e)||i.processMutations(e)}));return o.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function pa({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,sampling:a}){const o=Fs(a=>{const o=ua(a);if(!o||qs(o,r,i,s))return;const c=n.getId(o);if(o===e){const n=e.scrollingElement||e.documentElement;ca(t)({id:c,x:n.scrollLeft,y:n.scrollTop})}else ca(t)({id:c,x:o.scrollLeft,y:o.scrollTop})},a.scroll||100);return zs("scroll",ca(o),e)}function ha(t,e){const n=Object.assign({},t);return e||delete n.userTriggered,n}const fa=["INPUT","TEXTAREA","SELECT"],_a=new WeakMap;function ma(t){return function(t,e){if(ya("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||ya("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||ya("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||ya("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule){const n=Array.from(t.parentRule.cssRules).indexOf(t);e.unshift(n)}else{const n=Array.from(t.parentStyleSheet.cssRules).indexOf(t);e.unshift(n)}return e}(t,[])}function ga(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};!function(t,e){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:i,scrollCb:s,viewportResizeCb:a,inputCb:o,mediaInteractionCb:c,styleSheetRuleCb:l,styleDeclarationCb:u,canvasMutationCb:d,fontCb:p}=t;t.mutationCb=(...t)=>{e.mutation&&e.mutation(...t),n(...t)},t.mousemoveCb=(...t)=>{e.mousemove&&e.mousemove(...t),r(...t)},t.mouseInteractionCb=(...t)=>{e.mouseInteraction&&e.mouseInteraction(...t),i(...t)},t.scrollCb=(...t)=>{e.scroll&&e.scroll(...t),s(...t)},t.viewportResizeCb=(...t)=>{e.viewportResize&&e.viewportResize(...t),a(...t)},t.inputCb=(...t)=>{e.input&&e.input(...t),o(...t)},t.mediaInteractionCb=(...t)=>{e.mediaInteaction&&e.mediaInteaction(...t),c(...t)},t.styleSheetRuleCb=(...t)=>{e.styleSheetRule&&e.styleSheetRule(...t),l(...t)},t.styleDeclarationCb=(...t)=>{e.styleDeclaration&&e.styleDeclaration(...t),u(...t)},t.canvasMutationCb=(...t)=>{e.canvasMutation&&e.canvasMutation(...t),d(...t)},t.fontCb=(...t)=>{e.font&&e.font(...t),p(...t)}}(t,e);const r=da(t,t.doc),i=function({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(!1===e.mousemove)return()=>{};const i="number"==typeof e.mousemove?e.mousemove:50;let s,a=[];const o=Fs(e=>{const n=Date.now()-s;ca(t)(a.map(t=>(t.timeOffset-=n,t)),e),a=[],s=null},"number"==typeof e.mousemoveCallback?e.mousemoveCallback:500),c=Fs(t=>{const e=ua(t),{clientX:n,clientY:i}=Js(t)?t.changedTouches[0]:t;s||(s=Date.now()),a.push({x:n,y:i,id:r.getId(e),timeOffset:Date.now()-s}),o("undefined"!=typeof DragEvent&&t instanceof DragEvent?Bs.Drag:t instanceof MouseEvent?Bs.MouseMove:Bs.TouchMove)},i,{trailing:!1}),l=[zs("mousemove",ca(c),n),zs("touchmove",ca(c),n),zs("drag",ca(c),n)];return ca(()=>{l.forEach(t=>t())})}(t),s=function({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,sampling:a}){if(!1===a.mouseInteraction)return()=>{};const o=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,c=[];return Object.keys(Ms).filter(t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==o[t]).forEach(a=>{const o=a.toLowerCase(),l=ca((e=>a=>{const o=ua(a);if(qs(o,r,i,s))return;const c=Js(a)?a.changedTouches[0]:a;if(!c)return;const l=n.getId(o),{clientX:u,clientY:d}=c;ca(t)({type:Ms[e],id:l,x:u,y:d})})(a));c.push(zs(o,l,e))}),ca(()=>{c.forEach(t=>t())})}(t),a=pa(t),o=function({viewportResizeCb:t}){let e=-1,n=-1;const r=Fs(()=>{const r=Vs(),i=Zs();e===r&&n===i||(ca(t)({width:Number(i),height:Number(r)}),e=r,n=i)},200);return zs("resize",ca(r),window)}(t),c=function({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,ignoreClass:a,ignoreSelector:o,maskInputSelector:c,unmaskInputSelector:l,maskInputOptions:u,maskInputFn:d,sampling:p,userTriggeredOnInput:h}){function f(t){let n=ua(t);const p=n&&n.tagName,f=t.isTrusted;if("OPTION"===p&&(n=n.parentElement),!n||!p||fa.indexOf(p)<0||qs(n,r,i,s))return;const m=n,g=us(m);if(m.classList.contains(a)||o&&m.matches(o))return;let y=ds(m,p,g),v=!1;"radio"!==g&&"checkbox"!==g||(v=n.checked),function({tagName:t,type:e,maskInputOptions:n,maskInputSelector:r}){return r||os({maskInputOptions:n,tagName:t,type:e})}({maskInputOptions:u,maskInputSelector:c,tagName:p,type:g})&&(y=cs({input:m,maskInputOptions:u,maskInputSelector:c,unmaskInputSelector:l,tagName:p,type:g,value:y,maskInputFn:d})),_(n,ca(ha)({text:y,isChecked:v,userTriggered:f},h));const b=n.name;"radio"===g&&b&&v&&e.querySelectorAll(`input[type="radio"][name="${b}"]`).forEach(t=>{if(t!==n){const e=cs({input:t,maskInputOptions:u,maskInputSelector:c,unmaskInputSelector:l,tagName:p,type:g,value:ds(t,p,g),maskInputFn:d});_(t,ca(ha)({text:e,isChecked:!v,userTriggered:!1},h))}})}function _(e,r){const i=_a.get(e);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){_a.set(e,r);const i=n.getId(e);t(Object.assign(Object.assign({},r),{id:i}))}}const m=("last"===p.input?["change"]:["input","change"]).map(t=>zs(t,ca(f),e)),g=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),y=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"],[HTMLOptionElement.prototype,"selected"]];return g&&g.set&&m.push(...y.map(t=>$s(t[0],t[1],{set(){ca(f)({target:this})}}))),ca(()=>{m.forEach(t=>t())})}(t),l=function({mediaInteractionCb:t,blockClass:e,blockSelector:n,unblockSelector:r,mirror:i,sampling:s}){const a=a=>Fs(ca(s=>{const o=ua(s);if(!o||qs(o,e,n,r))return;const{currentTime:c,volume:l,muted:u}=o;t({type:a,id:i.getId(o),currentTime:c,volume:l,muted:u})}),s.media||500),o=[zs("play",a(0)),zs("pause",a(1)),zs("seeked",a(2)),zs("volumechange",a(3))];return ca(()=>{o.forEach(t=>t())})}(t),u=function({styleSheetRuleCb:t,mirror:e},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};const r=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(r,{apply:ca((n,r,i)=>{const[s,a]=i,o=e.getId(r.ownerNode);return-1!==o&&t({id:o,adds:[{rule:s,index:a}]}),n.apply(r,i)})});const i=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:ca((n,r,i)=>{const[s]=i,a=e.getId(r.ownerNode);return-1!==a&&t({id:a,removes:[{index:s}]}),n.apply(r,i)})});const s={};va("CSSGroupingRule")?s.CSSGroupingRule=n.CSSGroupingRule:(va("CSSMediaRule")&&(s.CSSMediaRule=n.CSSMediaRule),va("CSSConditionRule")&&(s.CSSConditionRule=n.CSSConditionRule),va("CSSSupportsRule")&&(s.CSSSupportsRule=n.CSSSupportsRule));const a={};return Object.entries(s).forEach(([n,r])=>{a[n]={insertRule:r.prototype.insertRule,deleteRule:r.prototype.deleteRule},r.prototype.insertRule=new Proxy(a[n].insertRule,{apply:ca((n,r,i)=>{const[s,a]=i,o=e.getId(r.parentStyleSheet.ownerNode);return-1!==o&&t({id:o,adds:[{rule:s,index:[...ma(r),a||0]}]}),n.apply(r,i)})}),r.prototype.deleteRule=new Proxy(a[n].deleteRule,{apply:ca((n,r,i)=>{const[s]=i,a=e.getId(r.parentStyleSheet.ownerNode);return-1!==a&&t({id:a,removes:[{index:[...ma(r),s]}]}),n.apply(r,i)})})}),ca(()=>{n.CSSStyleSheet.prototype.insertRule=r,n.CSSStyleSheet.prototype.deleteRule=i,Object.entries(s).forEach(([t,e])=>{e.prototype.insertRule=a[t].insertRule,e.prototype.deleteRule=a[t].deleteRule})})}(t,{win:n}),d=function({styleDeclarationCb:t,mirror:e},{win:n}){const r=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(r,{apply:ca((n,r,i)=>{var s,a;const[o,c,l]=i,u=e.getId(null===(a=null===(s=r.parentRule)||void 0===s?void 0:s.parentStyleSheet)||void 0===a?void 0:a.ownerNode);return-1!==u&&t({id:u,set:{property:o,value:c,priority:l},index:ma(r.parentRule)}),n.apply(r,i)})});const i=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:ca((n,r,i)=>{var s,a;const[o]=i,c=e.getId(null===(a=null===(s=r.parentRule)||void 0===s?void 0:s.parentStyleSheet)||void 0===a?void 0:a.ownerNode);return-1!==c&&t({id:c,remove:{property:o},index:ma(r.parentRule)}),n.apply(r,i)})}),ca(()=>{n.CSSStyleDeclaration.prototype.setProperty=r,n.CSSStyleDeclaration.prototype.removeProperty=i})}(t,{win:n}),p=t.collectFonts?function({fontCb:t,doc:e}){const n=e.defaultView;if(!n)return()=>{};const r=[],i=new WeakMap,s=n.FontFace;n.FontFace=function(t,e,n){const r=new s(t,e,n);return i.set(r,{family:t,buffer:"string"!=typeof e,descriptors:n,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),r};const a=js(e.fonts,"add",function(e){return function(n){return setTimeout(()=>{const e=i.get(n);e&&(t(e),i.delete(n))},0),e.apply(this,[n])}});return r.push(()=>{n.FontFace=s}),r.push(a),ca(()=>{r.forEach(t=>t())})}(t):()=>{},h=[];for(const e of t.plugins)h.push(e.observer(e.callback,n,e.options));return ca(()=>{la.forEach(t=>t.reset()),r.disconnect(),i(),s(),a(),o(),c(),l();try{u(),d()}catch(t){}p(),h.forEach(t=>t())})}function ya(t){return void 0!==window[t]}function va(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class ba{constructor(t){this.iframes=new WeakMap,this.mutationCb=t.mutationCb}addIframe(t){this.iframes.set(t,!0)}addLoadListener(t){this.loadListener=t}attachIframe(t,e){var n;this.mutationCb({adds:[{parentId:t.__sn.id,nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,t)}}class Ea{constructor(t){this.restorePatches=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror;const e=this;this.restorePatches.push(js(HTMLElement.prototype,"attachShadow",function(t){return function(){const n=t.apply(this,arguments);return this.shadowRoot&&e.addShadowRoot(this.shadowRoot,this.ownerDocument),n}}))}addShadowRoot(t,e){da(Object.assign(Object.assign({},this.bypassOptions),{doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t),pa(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))}observeAttachShadow(t){if(t.contentWindow){const e=this;this.restorePatches.push(js(t.contentWindow.HTMLElement.prototype,"attachShadow",function(n){return function(){const r=n.apply(this,arguments);return this.shadowRoot&&e.addShadowRoot(this.shadowRoot,t.contentDocument),r}}))}}reset(){this.restorePatches.forEach(t=>t())}}for(var Sa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wa="undefined"==typeof Uint8Array?[]:new Uint8Array(256),ka=0;ka<64;ka++)wa[Sa.charCodeAt(ka)]=ka;const Ta=new Map,Ca=(t,e,n)=>{if(!t||!Da(t,e)&&"object"!=typeof t)return;const r=function(t,e){let n=Ta.get(t);return n||(n=new Map,Ta.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}(n,t.constructor.name);let i=r.indexOf(t);return-1===i&&(i=r.length,r.push(t)),i};function xa(t,e,n){if(t instanceof Array)return t.map(t=>xa(t,e,n));if(null===t)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer){const e=t.constructor.name,n=function(t){var e,n=new Uint8Array(t),r=n.length,i="";for(e=0;e<r;e+=3)i+=Sa[n[e]>>2],i+=Sa[(3&n[e])<<4|n[e+1]>>4],i+=Sa[(15&n[e+1])<<2|n[e+2]>>6],i+=Sa[63&n[e+2]];return r%3==2?i=i.substring(0,i.length-1)+"=":r%3==1&&(i=i.substring(0,i.length-2)+"=="),i}(t);return{rr_type:e,base64:n}}if(t instanceof DataView)return{rr_type:t.constructor.name,args:[xa(t.buffer,e,n),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){const e=t.constructor.name,{src:n}=t;return{rr_type:e,src:n}}return t instanceof ImageData?{rr_type:t.constructor.name,args:[xa(t.data,e,n),t.width,t.height]}:Da(t,e)||"object"==typeof t?{rr_type:t.constructor.name,index:Ca(t,e,n)}:t}const Ra=(t,e,n)=>[...t].map(t=>xa(t,e,n)),Da=(t,e)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(t=>"function"==typeof e[t]);return Boolean(n.find(n=>t instanceof e[n]))};function Ia(t,e,n,r,i,s,a,o){const c=[],l=Object.getOwnPropertyNames(t);for(const u of l)try{if("function"!=typeof t[u])continue;const l=js(t,u,function(c){return function(...l){const d=c.apply(this,l);if(Ca(d,o,t),!qs(this.canvas,r,s,i)){a.getId(this.canvas);const r=Ra([...l],o,t);n(this.canvas,{type:e,property:u,args:r})}return d}});c.push(l)}catch(r){const i=$s(t,u,{set(t){n(this.canvas,{type:e,property:u,args:[t],setter:!0})}});c.push(i)}return c}class Na{reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(t,e){!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(t)||this.pendingCanvasMutations.set(t,[]),this.pendingCanvasMutations.get(t).push(e)},this.mutationCb=t.mutationCb,this.mirror=t.mirror,!0===t.recordCanvas&&this.initCanvasMutationObserver(t.win,t.blockClass,t.blockSelector,t.unblockSelector)}initCanvasMutationObserver(t,e,n,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=function(t,e,n,r){const i=[];try{const s=js(t.HTMLCanvasElement.prototype,"getContext",function(t){return function(i,...s){return qs(this,e,n,r)||"__context"in this||(this.__context=i),t.apply(this,[i,...s])}});i.push(s)}catch(t){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(t=>t())}}(t,e,r,n),s=function(t,e,n,r,i,s){const a=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const s of o)try{if("function"!=typeof e.CanvasRenderingContext2D.prototype[s])continue;const o=js(e.CanvasRenderingContext2D.prototype,s,function(e){return function(...a){return qs(this.canvas,n,i,r)||setTimeout(()=>{const e=[...a];if("drawImage"===s&&e[0]&&e[0]instanceof HTMLCanvasElement){const t=e[0],n=t.getContext("2d");let r=null==n?void 0:n.getImageData(0,0,t.width,t.height);e[0]=JSON.stringify(null==r?void 0:r.data)}t(this.canvas,{type:Ps["2D"],property:s,args:e})},0),e.apply(this,a)}});a.push(o)}catch(n){const r=$s(e.CanvasRenderingContext2D.prototype,s,{set(e){t(this.canvas,{type:Ps["2D"],property:s,args:[e],setter:!0})}});a.push(r)}return()=>{a.forEach(t=>t())}}(this.processMutation.bind(this),t,e,r,n),a=function(t,e,n,r,i,s){const a=[];return a.push(...Ia(e.WebGLRenderingContext.prototype,Ps.WebGL,t,n,r,i,s,e)),void 0!==e.WebGL2RenderingContext&&a.push(...Ia(e.WebGL2RenderingContext.prototype,Ps.WebGL2,t,n,r,i,s,e)),()=>{a.forEach(t=>t())}}(this.processMutation.bind(this),t,e,r,n,this.mirror);this.resetObservers=()=>{i(),s(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=e=>{this.rafStamps.latestId=e,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,e)=>{const n=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,e){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(t);if(!n||-1===e)return;const r=n.map(t=>{const e=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}(t,["type"]);return e}),{type:i}=n[0];this.mutationCb({id:e,type:i,commands:r}),this.pendingCanvasMutations.delete(t)}}function Oa(t){return Object.assign(Object.assign({},t),{timestamp:Date.now()})}let Aa,Ua;const Ba={map:{},getId:t=>t&&t.__sn?t.__sn.id:-1,getNode(t){return this.map[t]||null},removeNodeFromMap(t){delete this.map[t.__sn&&t.__sn.id],t.childNodes&&t.childNodes.forEach(t=>this.removeNodeFromMap(t))},has(t){return this.map.hasOwnProperty(t)},reset(){this.map={}}};function Ma(t={}){const{emit:e,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:s=null,unblockSelector:a=null,ignoreClass:o="rr-ignore",ignoreSelector:c=null,maskTextClass:l="rr-mask",maskTextSelector:u=null,maskInputSelector:d=null,unmaskTextSelector:p=null,unmaskInputSelector:h=null,inlineStylesheet:f=!0,maskAllText:_=!1,maskAllInputs:m,maskInputOptions:g,slimDOMOptions:y,maskInputFn:v,maskTextFn:b,hooks:E,packFn:S,sampling:w={},mousemoveWait:k,recordCanvas:T=!1,userTriggeredOnInput:C=!1,collectFonts:x=!1,inlineImages:R=!1,plugins:D,keepIframeSrcFn:I=(()=>!1),onMutation:N}=t;if(!e)throw new Error("emit function is required");void 0!==k&&void 0===w.mousemove&&(w.mousemove=k);const O=!0===m?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:void 0!==g?g:{},A=!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(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(t){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}();let B=0;Aa=(t,i)=>{var s;if(!(null===(s=la[0])||void 0===s?void 0:s.isFrozen())||t.type===Us.FullSnapshot||t.type===Us.IncrementalSnapshot&&t.data.source===Bs.Mutation||la.forEach(t=>t.unfreeze()),e((t=>{for(const e of D||[])e.eventProcessor&&(t=e.eventProcessor(t));return S&&(t=S(t)),t})(t),i),t.type===Us.FullSnapshot)U=t,B=0;else if(t.type===Us.IncrementalSnapshot){if(t.data.source===Bs.Mutation&&t.data.isAttachIframe)return;B++,(r&&B>=r||n&&t.timestamp-U.timestamp>n)&&Ua(!0)}};const M=t=>{Aa(Oa({type:Us.IncrementalSnapshot,data:Object.assign({source:Bs.Mutation},t)}))},P=t=>Aa(Oa({type:Us.IncrementalSnapshot,data:Object.assign({source:Bs.Scroll},t)})),L=t=>Aa(Oa({type:Us.IncrementalSnapshot,data:Object.assign({source:Bs.CanvasMutation},t)})),H=new ba({mutationCb:M}),z=new Na({recordCanvas:T,mutationCb:L,win:window,blockClass:i,blockSelector:s,unblockSelector:a,mirror:Ba}),G=new Ea({mutationCb:M,scrollCb:P,bypassOptions:{onMutation:N,blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:l,maskTextSelector:u,unmaskTextSelector:p,maskInputSelector:d,unmaskInputSelector:h,inlineStylesheet:f,maskAllText:_,maskInputOptions:O,maskTextFn:b,maskInputFn:v,recordCanvas:T,inlineImages:R,sampling:w,slimDOMOptions:A,iframeManager:H,canvasManager:z},mirror:Ba});Ua=(t=!1)=>{var e,n,r,o;Aa(Oa({type:Us.Meta,data:{href:window.location.href,width:Zs(),height:Vs()}}),t),la.forEach(t=>t.lock());const[c,m]=function(t,e){const{blockClass:n="rr-block",blockSelector:r=null,unblockSelector:i=null,maskTextClass:s="rr-mask",maskTextSelector:a=null,unmaskTextSelector:o=null,inlineStylesheet:c=!0,inlineImages:l=!1,recordCanvas:u=!1,maskInputSelector:d=null,unmaskInputSelector:p=null,maskAllText:h=!1,maskAllInputs:f=!1,maskTextFn:_,maskInputFn:m,slimDOM:g=!1,dataURLOptions:y,preserveWhiteSpace:v,onSerialize:b,onIframeLoad:E,iframeLoadTimeout:S,keepIframeSrcFn:w=(()=>!1)}=e||{},k={};return[Os(t,{doc:t,map:k,blockClass:n,blockSelector:r,unblockSelector:i,maskTextClass:s,maskTextSelector:a,unmaskTextSelector:o,skipChild:!1,inlineStylesheet:c,maskInputSelector:d,unmaskInputSelector:p,maskAllText:h,maskInputOptions:!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}:!1===f?{}:f,maskTextFn:_,maskInputFn:m,slimDOMOptions:!0===g||"all"===g?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===g,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===g?{}:g,dataURLOptions:y,inlineImages:l,recordCanvas:u,preserveWhiteSpace:v,onSerialize:b,onIframeLoad:E,iframeLoadTimeout:S,keepIframeSrcFn:w}),k]}(document,{blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:l,maskTextSelector:u,unmaskTextSelector:p,maskInputSelector:d,unmaskInputSelector:h,inlineStylesheet:f,maskAllText:_,maskAllInputs:O,maskTextFn:b,slimDOM:A,recordCanvas:T,inlineImages:R,onSerialize:t=>{Xs(t)&&H.addIframe(t),Qs(t)&&G.addShadowRoot(t.shadowRoot,document)},onIframeLoad:(t,e)=>{H.attachIframe(t,e),G.observeAttachShadow(t)},keepIframeSrcFn:I});if(!c)return console.warn("Failed to snapshot the document");Ba.map=m,Aa(Oa({type:Us.FullSnapshot,data:{node:c,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===document||void 0===document?void 0:document.documentElement.scrollLeft)||(null===(n=null===(e=null===document||void 0===document?void 0:document.body)||void 0===e?void 0:e.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===document||void 0===document?void 0:document.body.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===document||void 0===document?void 0:document.documentElement.scrollTop)||(null===(o=null===(r=null===document||void 0===document?void 0:document.body)||void 0===r?void 0:r.parentElement)||void 0===o?void 0:o.scrollTop)||(null===document||void 0===document?void 0:document.body.scrollTop)||0}}})),la.forEach(t=>t.unlock())};try{const t=[];t.push(zs("DOMContentLoaded",()=>{Aa(Oa({type:Us.DomContentLoaded,data:{}}))}));const e=t=>{var e;return ca(ga)({onMutation:N,mutationCb:M,mousemoveCb:(t,e)=>Aa(Oa({type:Us.IncrementalSnapshot,data:{source:e,positions:t}})),mouseInteractionCb:t=>Aa(Oa({type:Us.IncrementalSnapshot,data:Object.assign({source:Bs.MouseInteraction},t)})),scrollCb:P,viewportResizeCb:t=>Aa(Oa({type:Us.IncrementalSnapshot,data:Object.assign({source:Bs.ViewportResize},t)})),inputCb:t=>Aa(Oa({type:Us.IncrementalSnapshot,data:Object.assign({source:Bs.Input},t)})),mediaInteractionCb:t=>Aa(Oa({type:Us.IncrementalSnapshot,data:Object.assign({source:Bs.MediaInteraction},t)})),styleSheetRuleCb:t=>Aa(Oa({type:Us.IncrementalSnapshot,data:Object.assign({source:Bs.StyleSheetRule},t)})),styleDeclarationCb:t=>Aa(Oa({type:Us.IncrementalSnapshot,data:Object.assign({source:Bs.StyleDeclaration},t)})),canvasMutationCb:L,fontCb:t=>Aa(Oa({type:Us.IncrementalSnapshot,data:Object.assign({source:Bs.Font},t)})),blockClass:i,ignoreClass:o,ignoreSelector:c,maskTextClass:l,maskTextSelector:u,unmaskTextSelector:p,maskInputSelector:d,unmaskInputSelector:h,maskInputOptions:O,inlineStylesheet:f,sampling:w,recordCanvas:T,inlineImages:R,userTriggeredOnInput:C,collectFonts:x,doc:t,maskAllText:_,maskInputFn:v,maskTextFn:b,blockSelector:s,unblockSelector:a,slimDOMOptions:A,mirror:Ba,iframeManager:H,shadowDomManager:G,canvasManager:z,plugins:(null===(e=null==D?void 0:D.filter(t=>t.observer))||void 0===e?void 0:e.map(t=>({observer:t.observer,options:t.options,callback:e=>Aa(Oa({type:Us.Plugin,data:{plugin:t.name,payload:e}}))})))||[]},E)};H.addLoadListener(n=>{try{t.push(e(n.contentDocument))}catch(t){console.warn(t)}});const n=()=>{Ua(),t.push(e(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():t.push(zs("load",()=>{Aa(Oa({type:Us.Load,data:{}})),n()},window)),()=>{t.forEach(t=>t())}}catch(t){console.warn(t)}}function Pa(t){return{timestamp:Date.now()/1e3,type:"default",...t}}var La,Ha;function za(t){return t>9999999999?t:1e3*t}async function Ga(t,e,n){if(!t.eventBuffer)return null;if(t.isPaused())return null;if(za(e.timestamp)+t.timeouts.sessionIdlePause<Date.now())return null;try{n&&t.eventBuffer.clear();const r=t.getOptions(),i="function"==typeof r.beforeAddRecordingEvent&&e.type===Ha.Custom?r.beforeAddRecordingEvent(e):e;if(!i)return;return await t.eventBuffer.addEvent(i)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error(e),await t.stop("addEvent");const n=fr().getClient();n&&n.recordDroppedEvent("internal_sdk_error","replay")}}function Ya(t,e){"sentry.transaction"!==e.category&&(["ui.click","ui.input"].includes(e.category)?t.triggerUserActivity():t.checkAndHandleExpiredSession(),t.addUpdate(()=>(Ga(t,{type:Us.Custom,timestamp:1e3*(e.timestamp||0),data:{tag:"breadcrumb",payload:wn(e,10,1e3)}}),"console"===e.category)))}function Fa(t,e,n,r,i){const s=Date.now()-1e3*e.timestamp;return s>n&&($a(t,e,Math.min(s,r),i),!0)}function $a(t,e,n,r){Ya(t,{message:e.message,timestamp:e.timestamp,category:"ui.slowClickDetected",data:{...e.data,url:ts.location.href,timeAfterClickMs:n,endReason:r}})}Ma.addCustomEvent=(t,e)=>{if(!Aa)throw new Error("please add custom event after start recording");Aa(Oa({type:Us.Custom,data:{tag:t,payload:e}}))},Ma.freezePage=()=>{la.forEach(t=>t.freeze())},Ma.takeFullSnapshot=t=>{if(!Ua)throw new Error("please take full snapshot after start recording");Ua(t)},Ma.mirror=Ba,function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"}(La||(La={})),function(t){t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin"}(Ha||(Ha={}));const ja=["SELECT","OPTION"],Va=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid"]);function Za(t){const e={};for(const n in t)if(Va.has(n)){let r=n;"data-testid"!==n&&"data-test-id"!==n||(r="testId"),e[r]=t[n]}return e}function qa(t,e){const n=t&&"__sn"in t&&t.__sn.type===La.Element?t.__sn:null;return{message:e,data:n?{nodeId:n.id,node:{id:n.id,tagName:n.tagName,textContent:t?Array.from(t.childNodes).map(t=>"__sn"in t&&t.__sn.type===La.Text&&t.__sn.textContent).filter(Boolean).map(t=>t.trim()).join(""):"",attributes:Za(n.attributes)}}:{}}}function Wa(t){return function(t){return"object"==typeof t&&!!t&&"target"in t}(t)?t.target:t}function Ka(t){const e=Wa(t);return e&&e instanceof Element&&e.closest("button,a")||e}const Ja=["name","type","startTime","transferSize","duration"];function Xa(t){return function(e){return Ja.every(n=>t[n]===e[n])}}class Qa{constructor(){this.events=[]}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){this.events.push(t)}finish(){return new Promise(t=>{const e=this.events;this.events=[],t(JSON.stringify(e))})}clear(){this.events=[]}getEarliestTimestamp(){const t=this.events.map(t=>t.timestamp).sort()[0];return t?za(t):null}}class to{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise((t,e)=>{this._worker.addEventListener("message",({data:n})=>{n.success?t():e()},{once:!0}),this._worker.addEventListener("error",t=>{e(t)},{once:!0})})),this._ensureReadyPromise}destroy(){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Replay] Destroying compression worker"),this._worker.terminate()}postMessage(t,e){const n=this._getAndIncrementId();return new Promise((r,i)=>{const s=({data:e})=>{const a=e;if(a.method===t&&a.id===n){if(this._worker.removeEventListener("message",s),!a.success)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("[Replay]",a.response),void i(new Error("Error in compression worker"));r(a.response)}};this._worker.addEventListener("message",s),this._worker.postMessage({id:n,method:t,arg:e})})}_getAndIncrementId(){return this._id++}}class eo{constructor(t){this._worker=new to(t),this._earliestTimestamp=null}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const e=za(t.timestamp);return(!this._earliestTimestamp||e<this._earliestTimestamp)&&(this._earliestTimestamp=e),this._sendEventToWorker(t)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._worker.postMessage("clear")}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",JSON.stringify(t))}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,t}}class no{constructor(t){this._fallback=new Qa,this._compression=new eo(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Replay] Failed to load the compression worker, falling back to simple buffer"))}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t}=this._fallback,e=[];for(const n of t)e.push(this._compression.addEvent(n));this._used=this._compression;try{await Promise.all(e)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("[Replay] Failed to add events when switching buffers.",t)}}}function ro(t,e,n=+new Date){return null===t||void 0===e||e<0||0!==e&&t+e<=n}function io(t,e,n=+new Date){return ro(t.started,e.maxSessionLife,n)||ro(t.lastActivity,e.sessionIdleExpire,n)}function so(t){return void 0!==t&&Math.random()<t}function ao(t){if("sessionStorage"in ts)try{ts.sessionStorage.setItem(es,JSON.stringify(t))}catch(t){}}function oo(t){const e=Date.now();return{id:t.id||hn(),started:t.started||e,lastActivity:t.lastActivity||e,segmentId:t.segmentId||0,sampled:t.sampled,shouldRefresh:!0}}function co({sessionSampleRate:t,allowBuffering:e,stickySession:n=!1}){const r=function(t,e){return so(t)?"session":!!e&&"buffer"}(t,e),i=oo({sampled:r});return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`[Replay] Creating new session: ${i.id}`),n&&ao(i),i}function lo({timeouts:t,currentSession:e,stickySession:n,sessionSampleRate:r,allowBuffering:i}){const s=e||n&&function(){if(!("sessionStorage"in ts))return null;try{const t=ts.sessionStorage.getItem(es);return t?oo(JSON.parse(t)):null}catch(t){return null}}();if(s){if(!io(s,t))return{type:"saved",session:s};if(!s.shouldRefresh)return{type:"new",session:oo({sampled:!1})};("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Replay] Session has expired")}return{type:"new",session:co({stickySession:n,sessionSampleRate:r,allowBuffering:i})}}function uo(t){return!t.type}function po(t){return"transaction"===t.type}function ho(t){const e=function(){const t=fr().getClient();if(!t)return!1;const e=t.getTransport();return e&&e.send.__sentry__baseTransport__||!1}();return(n,r)=>{if(!uo(n)&&!po(n))return;const i=r&&r.statusCode;e&&(!i||i<200||i>=300)||(po(n)&&n.contexts&&n.contexts.trace&&n.contexts.trace.trace_id?t.getContext().traceIds.add(n.contexts.trace.trace_id):uo(n)&&(n.event_id&&t.getContext().errorIds.add(n.event_id),"buffer"===t.recordingMode&&n.tags&&n.tags.replayId&&setTimeout(()=>{t.sendBufferedReplayOrFlush()})))}}function fo(t,e){return e.map(({type:e,start:n,end:r,name:i,data:s})=>Ga(t,{type:Us.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:e,description:i,startTimestamp:n,endTimestamp:r,data:s}}}))}function _o(t,e){t.isEnabled()&&null!==e&&(function(t,e){return("undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__||!t.getOptions()._experiments.traceInternals)&&function(t){const e=fr().getClient(),n=e&&e.getDsn();return!!n&&t.includes(n.host)}(e)}(t,e.name)||t.addUpdate(()=>(fo(t,[e]),!0)))}const mo=10,go=11,yo=12,vo=13,bo=14,Eo=15,So=20,wo=21,ko=22,To=23,Co=["true","false","null"];function xo(t,e,n){const r=t[t.length-1],i=e[n];if(!/\s/.test(i))if('"'!==i||Ro(e,n))switch(i){case"{":!function(t,e){e&&e!==vo?(e===wo&&t.push(mo),e===So&&t.push(mo)):t.push(mo)}(t,r);break;case"[":!function(t,e){e?e===vo?(t.push(So),t.push(wo)):(e===wo&&(t.push(So),t.push(wo)),e===So&&(t.push(So),t.push(wo))):(t.push(So),t.push(wo))}(t,r);break;case":":!function(t,e){e===go&&(t.pop(),t.push(vo))}(t,r);break;case",":!function(t,e){if(e!==vo)return e===Eo?(t.pop(),void t.pop()):void(e!==wo&&e===To&&t.pop());t.pop()}(t,r);break;case"}":!function(t,e){e===mo&&t.pop(),e===vo&&(t.pop(),t.pop()),e===Eo&&(t.pop(),t.pop(),t.pop()),t[t.length-1]===vo&&t.push(Eo),t[t.length-1]===wo&&t.push(To)}(t,r);break;case"]":!function(t,e){e===So&&t.pop(),e===wo&&(t.pop(),t.pop()),e===To&&(t.pop(),t.pop(),t.pop()),t[t.length-1]===vo&&t.push(Eo),t[t.length-1]===wo&&t.push(To)}(t,r)}else!function(t,e){e===bo?(t.pop(),t.push(Eo)):e===ko?(t.pop(),t.push(To)):e!==vo?e!==wo?e!==mo?e===yo&&(t.pop(),t.push(go)):t.push(yo):t.push(ko):t.push(bo)}(t,r)}function Ro(t,e){return"\\"===t[e-1]&&!Ro(t,e-1)}function Do(t){return function(t,e){if(!e.length)return t;let n=t;const r=e.length-1;n=function(t,e){switch(e){case mo:return`${t}"~~":"~~"`;case go:return`${t}:"~~"`;case yo:return`${t}~~":"~~"`;case vo:return function(t){const e=t.lastIndexOf(":"),n=t.slice(e+1);return Co.includes(n.trim())?`${t},"~~":"~~"`:`${t.slice(0,e+1)}"~~"`}(t);case bo:return`${t}~~"`;case Eo:return`${t},"~~":"~~"`;case So:return`${t}"~~"`;case wo:return function(t){const e=function(t){for(let e=t.length-1;e>=0;e--){const n=t[e];if(","===n||"["===n)return e}return-1}(t);if(e>-1){const n=t.slice(e+1);return Co.includes(n.trim())?`${t},"~~"`:`${t.slice(0,e+1)}"~~"`}return t}(t);case ko:return`${t}~~"`;case To:return`${t},"~~"`}return t}(n,e[r]);for(let t=r;t>=0;t--)switch(e[t]){case mo:n=`${n}}`;break;case So:n=`${n}]`}return n}(t,function(t){const e=[];for(let n=0;n<t.length;n++)xo(e,t,n);return e}(t))}function Io(t,e){if(t)try{if("string"==typeof t)return e.encode(t).length;if(t instanceof URLSearchParams)return e.encode(t.toString()).length;if(t instanceof FormData){const n=Po(t);return e.encode(n).length}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength}catch(t){}}function No(t){if(!t)return;const e=parseInt(t,10);return isNaN(e)?void 0:e}function Oo(t){return"string"==typeof t?t:t instanceof URLSearchParams?t.toString():t instanceof FormData?Po(t):void 0}function Ao(t,e){if(!e)return null;const{startTimestamp:n,endTimestamp:r,url:i,method:s,statusCode:a,request:o,response:c}=e;return{type:t,start:n/1e3,end:r/1e3,name:i,data:Ge({method:s,statusCode:a,request:o,response:c})}}function Uo(t){return{headers:{},size:t,_meta:{warnings:["URL_SKIPPED"]}}}function Bo(t,e,n){if(!e&&0===Object.keys(t).length)return;if(!e)return{headers:t};if(!n)return{headers:t,size:e};const r={headers:t,size:e},{body:i,warnings:s}=function(t){if(!t||"string"!=typeof t)return{body:t,warnings:[]};const e=t.length>rs;if(function(t){const e=t[0],n=t[t.length-1];return"["===e&&"]"===n||"{"===e&&"}"===n}(t))try{const n=e?Do(t.slice(0,rs)):t;return{body:JSON.parse(n),warnings:e?["JSON_TRUNCATED"]:[]}}catch(n){return{body:e?`${t.slice(0,rs)}…`:t,warnings:e?["INVALID_JSON","TEXT_TRUNCATED"]:["INVALID_JSON"]}}return{body:e?`${t.slice(0,rs)}…`:t,warnings:e?["TEXT_TRUNCATED"]:[]}}(n);return r.body=i,s.length>0&&(r._meta={warnings:s}),r}function Mo(t,e){return Object.keys(t).reduce((n,r)=>{const i=r.toLowerCase();return e.includes(i)&&t[r]&&(n[i]=t[r]),n},{})}function Po(t){return new URLSearchParams(t).toString()}function Lo(t,e){const n=function(t,e=ts.document.baseURI){if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith(ts.location.origin))return t;const n=new URL(t,e);if(n.origin!==new URL(e).origin)return t;const r=n.href;return!t.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}(t);return Oe(n,e)}function Ho(t=[]){if(2===t.length&&"object"==typeof t[1])return t[1].body}function zo(t,e){const n={};return e.forEach(e=>{t.get(e)&&(n[e]=t.get(e))}),n}function Go(t,e){if(!t)return{};const n=t.headers;return n?n instanceof Headers?zo(n,e):Array.isArray(n)?{}:Mo(n,e):{}}let Yo=null;function Fo(t){return!(!t||!t.on)}function $o(t){const{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}=t,i=Date.now()/1e3;return{type:"memory",name:"memory",start:i,end:i,data:{memory:{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}}}}const jo={resource:function(t){const{entryType:e,initiatorType:n,name:r,responseEnd:i,startTime:s,decodedBodySize:a,encodedBodySize:o,responseStatus:c,transferSize:l}=t;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${e}.${n}`,start:Zo(s),end:Zo(i),name:r,data:{size:l,statusCode:c,decodedBodySize:a,encodedBodySize:o}}},paint:function(t){const{duration:e,entryType:n,name:r,startTime:i}=t,s=Zo(i);return{type:n,name:r,start:s,end:s+e,data:void 0}},navigation:function(t){const{entryType:e,name:n,decodedBodySize:r,duration:i,domComplete:s,encodedBodySize:a,domContentLoadedEventStart:o,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:d,redirectCount:p,startTime:h,transferSize:f,type:_}=t;return 0===i?null:{type:`${e}.${_}`,start:Zo(h),end:Zo(s),name:n,data:{size:f,decodedBodySize:r,encodedBodySize:a,duration:i,domInteractive:l,domContentLoadedEventStart:o,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:d,domComplete:s,redirectCount:p}}},"largest-contentful-paint":function(t){const{entryType:e,startTime:n,size:r}=t;let i=0;if(ts.performance){const t=ts.performance.getEntriesByType("navigation")[0];i=t&&t.activationStart||0}const s=Math.max(n-i,0),a=Zo(i)+s/1e3;return{type:e,name:e,start:a,end:a,data:{value:s,size:r,nodeId:Ma.mirror.getId(t.element)}}}};function Vo(t){return void 0===jo[t.entryType]?null:jo[t.entryType](t)}function Zo(t){return((Hn||ts.performance.timeOrigin)+t)/1e3}function qo(t){let e=!1;return(n,r)=>{if(!t.checkAndHandleExpiredSession())return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("[Replay] Received replay event after session expired."));const i=r||!e;e=!0,t.addUpdate(()=>{if("buffer"===t.recordingMode&&i&&t.setInitialState(),Ga(t,n,i),!i)return!1;if(function(t,e){if(!e||!t.session||0!==t.session.segmentId)return Promise.resolve(null);Ga(t,function(t){const e=t.getOptions();return{type:Ha.Custom,timestamp:Date.now(),data:{tag:"options",payload:{sessionSampleRate:e.sessionSampleRate,errorSampleRate:e.errorSampleRate,useCompressionOption:e.useCompression,blockAllMedia:e.blockAllMedia,maskAllText:e.maskAllText,maskAllInputs:e.maskAllInputs,useCompression:!!t.eventBuffer&&"worker"===t.eventBuffer.type,networkDetailHasUrls:e.networkDetailAllowUrls.length>0,networkCaptureBodies:e.networkCaptureBodies,networkRequestHasHeaders:e.networkRequestHeaders.length>0,networkResponseHasHeaders:e.networkResponseHeaders.length>0}}}}(t),!1)}(t,i),t.session&&t.session.previousSessionId)return!0;if("buffer"===t.recordingMode&&t.session&&t.eventBuffer){const e=t.eventBuffer.getEarliestTimestamp();e&&(t.session.started=e,t.getOptions().stickySession&&ao(t.session))}const e=t.getOptions();return e._experiments.delayFlushOnCheckout?(setTimeout(()=>t.conditionalFlush(),e._experiments.delayFlushOnCheckout),t.cancelFlush(),!0):("session"===t.recordingMode&&t.flushImmediate(),!0)})}}class Wo extends Error{constructor(t){super(`Transport returned status code ${t}`)}}async function Ko(t,e={count:0,interval:5e3}){const{recordingData:n,options:r}=t;var i;if(n.length)try{return await async function({recordingData:t,replayId:e,segmentId:n,eventContext:r,timestamp:i,session:s}){const a=function({recordingData:t,headers:e}){let n;const r=`${JSON.stringify(e)}\n`;if("string"==typeof t)n=`${r}${t}`;else{const e=(new TextEncoder).encode(r);n=new Uint8Array(e.length+t.length),n.set(e),n.set(t,e.length)}return n}({recordingData:t,headers:{segment_id:n}}),{urls:o,errorIds:c,traceIds:l,initialTimestamp:u}=r,d=fr(),p=d.getClient(),h=d.getScope(),f=p&&p.getTransport(),_=p&&p.getDsn();if(!(p&&h&&f&&_&&s.sampled))return;const m={type:"replay_event",replay_start_timestamp:u/1e3,timestamp:i/1e3,error_ids:c,trace_ids:l,urls:o,replay_id:e,segment_id:n,replay_type:s.sampled},g=await async function({client:t,scope:e,replayId:n,event:r}){const i="object"!=typeof t._integrations||null===t._integrations||Array.isArray(t._integrations)?void 0:Object.keys(t._integrations),s=await zr(t.getOptions(),r,{event_id:n,integrations:i},e);if(!s)return null;s.platform=s.platform||"javascript";const a=t.getSdkMetadata&&t.getSdkMetadata(),{name:o,version:c}=a&&a.sdk||{};return s.sdk={...s.sdk,name:o||"sentry.javascript.unknown",version:c||"0.0.0"},s}({scope:h,client:p,replayId:e,event:m});if(!g)return p.recordDroppedEvent("event_processor","replay",m),void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("An event processor returned `null`, will not send event."));const y=function(t,e,n,r){return Gn(Kn(t,Wn(t),r,n),[[{type:"replay_event"},t],[{type:"replay_recording",length:"string"==typeof e?(new TextEncoder).encode(e).length:e.length},e]])}(g,a,_,p.getOptions().tunnel);let v;try{v=await f.send(y)}catch(t){const e=new Error(ns);try{e.cause=t}catch(t){}throw e}if(!v)return v;if("number"==typeof v.statusCode&&(v.statusCode<200||v.statusCode>=300))throw new Wo(v.statusCode);return v}(t),!0}catch(n){if(n instanceof Wo)throw n;if(i={_retryCount:e.count},fr().setContext("Replays",i),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r._experiments&&r._experiments.captureExceptions&&Ur(n),e.count>=3){const t=new Error(`${ns} - max retries exceeded`);try{t.cause=n}catch(t){}throw t}return e.interval*=++e.count,await new Promise((n,r)=>{setTimeout(async()=>{try{await Ko(t,e),n(!0)}catch(t){r(t)}},e.interval)})}}class Jo{__init(){this.eventBuffer=null}__init2(){this.performanceEvents=[]}__init3(){this.recordingMode="session"}__init4(){this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5,maxSessionLife:36e5}}__init5(){this._performanceObserver=null}__init6(){this._flushLock=null}__init7(){this._lastActivity=Date.now()}__init8(){this._isEnabled=!1}__init9(){this._isPaused=!1}__init10(){this._hasInitializedCoreListeners=!1}__init11(){this._stopRecording=null}__init12(){this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""}}constructor({options:t,recordingOptions:e}){Jo.prototype.__init.call(this),Jo.prototype.__init2.call(this),Jo.prototype.__init3.call(this),Jo.prototype.__init4.call(this),Jo.prototype.__init5.call(this),Jo.prototype.__init6.call(this),Jo.prototype.__init7.call(this),Jo.prototype.__init8.call(this),Jo.prototype.__init9.call(this),Jo.prototype.__init10.call(this),Jo.prototype.__init11.call(this),Jo.prototype.__init12.call(this),Jo.prototype.__init13.call(this),Jo.prototype.__init14.call(this),Jo.prototype.__init15.call(this),Jo.prototype.__init16.call(this),Jo.prototype.__init17.call(this),Jo.prototype.__init18.call(this),this._recordingOptions=e,this._options=t,this._debouncedFlush=function(t,e,n){let r,i,s;const a=n&&n.maxWait?Math.max(n.maxWait,e):0;function o(){return c(),r=t(),r}function c(){void 0!==i&&clearTimeout(i),void 0!==s&&clearTimeout(s),i=s=void 0}function l(){return i&&clearTimeout(i),i=setTimeout(o,e),a&&void 0===s&&(s=setTimeout(o,a)),r}return l.cancel=c,l.flush=function(){return void 0!==i||void 0!==s?o():r},l}(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay})}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}getOptions(){return this._options}initializeSampling(){const{errorSampleRate:t,sessionSampleRate:e}=this._options;t<=0&&e<=0||this._loadAndCheckSession()&&(this.session?(this.session.sampled&&"session"!==this.session.sampled&&(this.recordingMode="buffer"),this._initializeRecording()):this._handleException(new Error("Unable to initialize and create session")))}start(){if(this._isEnabled&&"session"===this.recordingMode)throw new Error("Replay recording is already in progress");if(this._isEnabled&&"buffer"===this.recordingMode)throw new Error("Replay buffering is in progress, call `flush()` to save the replay");const t=this.session&&this.session.id,{session:e}=lo({timeouts:this.timeouts,stickySession:Boolean(this._options.stickySession),currentSession:this.session,sessionSampleRate:1,allowBuffering:!1});e.previousSessionId=t,this.session=e,this._initializeRecording()}startBuffering(){if(this._isEnabled)throw new Error("Replay recording is already in progress");const t=this.session&&this.session.id,{session:e}=lo({timeouts:this.timeouts,stickySession:Boolean(this._options.stickySession),currentSession:this.session,sessionSampleRate:0,allowBuffering:!0});e.previousSessionId=t,this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{this._stopRecording=Ma({...this._recordingOptions,..."buffer"===this.recordingMode&&{checkoutEveryNms:6e4},emit:qo(this),onMutation:this._onMutationHandler})}catch(t){this._handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this._handleException(t),!1}}async stop(t){if(this._isEnabled)try{if("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__){const e="[Replay] Stopping Replay"+(t?` triggered by ${t}`:"");(this.getOptions()._experiments.traceInternals?console.warn:ke.log)(e)}this._isEnabled=!1,this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),"session"===this.recordingMode&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,function(){if("sessionStorage"in ts)try{ts.sessionStorage.removeItem(es)}catch(t){}}(),this.session=void 0}catch(t){this._handleException(t)}}pause(){this._isPaused=!0,this.stopRecording()}resume(){this._loadAndCheckSession()&&(this._isPaused=!1,this.startRecording())}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();await this.flushImmediate();const e=this.stopRecording();t&&e&&(this.recordingMode="session",this.session&&(this.session.shouldRefresh=!1,this._maybeSaveSession()),this.startRecording())}addUpdate(t){const e=t();"buffer"!==this.recordingMode&&!0!==e&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._loadAndCheckSession())return;this.resume()}}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){const t=this.getSessionId();if(this._lastActivity&&ro(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled)this.pause();else if(this._loadAndCheckSession())return t===this.getSessionId()||(this._triggerFullSnapshot(),!1)}setInitialState(){const t=`${ts.location.origin}${ts.location.pathname}${ts.location.hash}${ts.location.search}`;this.performanceEvents=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=function({useCompression:t}){if(t&&window.Worker)try{const t=function(){const t=new Blob(['/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */\nfunction t(t){let e=t.length;for(;--e>=0;)t[e]=0}const e=new Uint8Array([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]),a=new Uint8Array([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]),i=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),n=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=new Array(576);t(s);const r=new Array(60);t(r);const o=new Array(512);t(o);const l=new Array(256);t(l);const h=new Array(29);t(h);const d=new Array(30);function _(t,e,a,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}let f,c,u;function w(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}t(d);const m=t=>t<256?o[t]:o[256+(t>>>7)],b=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},g=(t,e,a)=>{t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,b(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},p=(t,e,a)=>{g(t,a[2*e],a[2*e+1])},k=(t,e)=>{let a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},v=(t,e,a)=>{const i=new Array(16);let n,s,r=0;for(n=1;n<=15;n++)r=r+a[n-1]<<1,i[n]=r;for(s=0;s<=e;s++){let e=t[2*s+1];0!==e&&(t[2*s]=k(i[e]++,e))}},y=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},x=t=>{t.bi_valid>8?b(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},z=(t,e,a,i)=>{const n=2*e,s=2*a;return t[n]<t[s]||t[n]===t[s]&&i[e]<=i[a]},A=(t,e,a)=>{const i=t.heap[a];let n=a<<1;for(;n<=t.heap_len&&(n<t.heap_len&&z(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!z(e,i,t.heap[n],t.depth));)t.heap[a]=t.heap[n],a=n,n<<=1;t.heap[a]=i},E=(t,i,n)=>{let s,r,o,_,f=0;if(0!==t.sym_next)do{s=255&t.pending_buf[t.sym_buf+f++],s+=(255&t.pending_buf[t.sym_buf+f++])<<8,r=t.pending_buf[t.sym_buf+f++],0===s?p(t,r,i):(o=l[r],p(t,o+256+1,i),_=e[o],0!==_&&(r-=h[o],g(t,r,_)),s--,o=m(s),p(t,o,n),_=a[o],0!==_&&(s-=d[o],g(t,s,_)))}while(f<t.sym_next);p(t,256,i)},R=(t,e)=>{const a=e.dyn_tree,i=e.stat_desc.static_tree,n=e.stat_desc.has_stree,s=e.stat_desc.elems;let r,o,l,h=-1;for(t.heap_len=0,t.heap_max=573,r=0;r<s;r++)0!==a[2*r]?(t.heap[++t.heap_len]=h=r,t.depth[r]=0):a[2*r+1]=0;for(;t.heap_len<2;)l=t.heap[++t.heap_len]=h<2?++h:0,a[2*l]=1,t.depth[l]=0,t.opt_len--,n&&(t.static_len-=i[2*l+1]);for(e.max_code=h,r=t.heap_len>>1;r>=1;r--)A(t,a,r);l=s;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],A(t,a,1),o=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=o,a[2*l]=a[2*r]+a[2*o],t.depth[l]=(t.depth[r]>=t.depth[o]?t.depth[r]:t.depth[o])+1,a[2*r+1]=a[2*o+1]=l,t.heap[1]=l++,A(t,a,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const a=e.dyn_tree,i=e.max_code,n=e.stat_desc.static_tree,s=e.stat_desc.has_stree,r=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,l=e.stat_desc.max_length;let h,d,_,f,c,u,w=0;for(f=0;f<=15;f++)t.bl_count[f]=0;for(a[2*t.heap[t.heap_max]+1]=0,h=t.heap_max+1;h<573;h++)d=t.heap[h],f=a[2*a[2*d+1]+1]+1,f>l&&(f=l,w++),a[2*d+1]=f,d>i||(t.bl_count[f]++,c=0,d>=o&&(c=r[d-o]),u=a[2*d],t.opt_len+=u*(f+c),s&&(t.static_len+=u*(n[2*d+1]+c)));if(0!==w){do{for(f=l-1;0===t.bl_count[f];)f--;t.bl_count[f]--,t.bl_count[f+1]+=2,t.bl_count[l]--,w-=2}while(w>0);for(f=l;0!==f;f--)for(d=t.bl_count[f];0!==d;)_=t.heap[--h],_>i||(a[2*_+1]!==f&&(t.opt_len+=(f-a[2*_+1])*a[2*_],a[2*_+1]=f),d--)}})(t,e),v(a,h,t.bl_count)},Z=(t,e,a)=>{let i,n,s=-1,r=e[1],o=0,l=7,h=4;for(0===r&&(l=138,h=3),e[2*(a+1)+1]=65535,i=0;i<=a;i++)n=r,r=e[2*(i+1)+1],++o<l&&n===r||(o<h?t.bl_tree[2*n]+=o:0!==n?(n!==s&&t.bl_tree[2*n]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=0,s=n,0===r?(l=138,h=3):n===r?(l=6,h=3):(l=7,h=4))},U=(t,e,a)=>{let i,n,s=-1,r=e[1],o=0,l=7,h=4;for(0===r&&(l=138,h=3),i=0;i<=a;i++)if(n=r,r=e[2*(i+1)+1],!(++o<l&&n===r)){if(o<h)do{p(t,n,t.bl_tree)}while(0!=--o);else 0!==n?(n!==s&&(p(t,n,t.bl_tree),o--),p(t,16,t.bl_tree),g(t,o-3,2)):o<=10?(p(t,17,t.bl_tree),g(t,o-3,3)):(p(t,18,t.bl_tree),g(t,o-11,7));o=0,s=n,0===r?(l=138,h=3):n===r?(l=6,h=3):(l=7,h=4)}};let S=!1;const D=(t,e,a,i)=>{g(t,0+(i?1:0),3),x(t),b(t,a),b(t,~a),a&&t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a};var T=(t,e,a,i)=>{let o,l,h=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),R(t,t.l_desc),R(t,t.d_desc),h=(t=>{let e;for(Z(t,t.dyn_ltree,t.l_desc.max_code),Z(t,t.dyn_dtree,t.d_desc.max_code),R(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*n[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),o=t.opt_len+3+7>>>3,l=t.static_len+3+7>>>3,l<=o&&(o=l)):o=l=a+5,a+4<=o&&-1!==e?D(t,e,a,i):4===t.strategy||l===o?(g(t,2+(i?1:0),3),E(t,s,r)):(g(t,4+(i?1:0),3),((t,e,a,i)=>{let s;for(g(t,e-257,5),g(t,a-1,5),g(t,i-4,4),s=0;s<i;s++)g(t,t.bl_tree[2*n[s]+1],3);U(t,t.dyn_ltree,e-1),U(t,t.dyn_dtree,a-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,h+1),E(t,t.dyn_ltree,t.dyn_dtree)),y(t),i&&x(t)},O={_tr_init:t=>{S||((()=>{let t,n,w,m,b;const g=new Array(16);for(w=0,m=0;m<28;m++)for(h[m]=w,t=0;t<1<<e[m];t++)l[w++]=m;for(l[w-1]=m,b=0,m=0;m<16;m++)for(d[m]=b,t=0;t<1<<a[m];t++)o[b++]=m;for(b>>=7;m<30;m++)for(d[m]=b<<7,t=0;t<1<<a[m]-7;t++)o[256+b++]=m;for(n=0;n<=15;n++)g[n]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,g[8]++;for(;t<=255;)s[2*t+1]=9,t++,g[9]++;for(;t<=279;)s[2*t+1]=7,t++,g[7]++;for(;t<=287;)s[2*t+1]=8,t++,g[8]++;for(v(s,287,g),t=0;t<30;t++)r[2*t+1]=5,r[2*t]=k(t,5);f=new _(s,e,257,286,15),c=new _(r,a,0,30,15),u=new _(new Array(0),i,0,19,7)})(),S=!0),t.l_desc=new w(t.dyn_ltree,f),t.d_desc=new w(t.dyn_dtree,c),t.bl_desc=new w(t.bl_tree,u),t.bi_buf=0,t.bi_valid=0,y(t)},_tr_stored_block:D,_tr_flush_block:T,_tr_tally:(t,e,a)=>(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=a,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(l[a]+256+1)]++,t.dyn_dtree[2*m(e)]++),t.sym_next===t.sym_end),_tr_align:t=>{g(t,2,3),p(t,256,s),(t=>{16===t.bi_valid?(b(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}};var F=(t,e,a,i)=>{let n=65535&t|0,s=t>>>16&65535|0,r=0;for(;0!==a;){r=a>2e3?2e3:a,a-=r;do{n=n+e[i++]|0,s=s+n|0}while(--r);n%=65521,s%=65521}return n|s<<16|0};const L=new Uint32Array((()=>{let t,e=[];for(var a=0;a<256;a++){t=a;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e})());var N=(t,e,a,i)=>{const n=L,s=i+a;t^=-1;for(let a=i;a<s;a++)t=t>>>8^n[255&(t^e[a])];return-1^t},I={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},B={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:C,_tr_stored_block:H,_tr_flush_block:M,_tr_tally:j,_tr_align:K}=O,{Z_NO_FLUSH:P,Z_PARTIAL_FLUSH:Y,Z_FULL_FLUSH:G,Z_FINISH:X,Z_BLOCK:W,Z_OK:q,Z_STREAM_END:J,Z_STREAM_ERROR:Q,Z_DATA_ERROR:V,Z_BUF_ERROR:$,Z_DEFAULT_COMPRESSION:tt,Z_FILTERED:et,Z_HUFFMAN_ONLY:at,Z_RLE:it,Z_FIXED:nt,Z_DEFAULT_STRATEGY:st,Z_UNKNOWN:rt,Z_DEFLATED:ot}=B,lt=(t,e)=>(t.msg=I[e],e),ht=t=>2*t-(t>4?9:0),dt=t=>{let e=t.length;for(;--e>=0;)t[e]=0},_t=t=>{let e,a,i,n=t.w_size;e=t.hash_size,i=e;do{a=t.head[--i],t.head[i]=a>=n?a-n:0}while(--e);e=n,i=e;do{a=t.prev[--i],t.prev[i]=a>=n?a-n:0}while(--e)};let ft=(t,e,a)=>(e<<t.hash_shift^a)&t.hash_mask;const ct=t=>{const e=t.state;let a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},ut=(t,e)=>{M(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,ct(t.strm)},wt=(t,e)=>{t.pending_buf[t.pending++]=e},mt=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},bt=(t,e,a,i)=>{let n=t.avail_in;return n>i&&(n=i),0===n?0:(t.avail_in-=n,e.set(t.input.subarray(t.next_in,t.next_in+n),a),1===t.state.wrap?t.adler=F(t.adler,e,n,a):2===t.state.wrap&&(t.adler=N(t.adler,e,n,a)),t.next_in+=n,t.total_in+=n,n)},gt=(t,e)=>{let a,i,n=t.max_chain_length,s=t.strstart,r=t.prev_length,o=t.nice_match;const l=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,h=t.window,d=t.w_mask,_=t.prev,f=t.strstart+258;let c=h[s+r-1],u=h[s+r];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do{if(a=e,h[a+r]===u&&h[a+r-1]===c&&h[a]===h[s]&&h[++a]===h[s+1]){s+=2,a++;do{}while(h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&s<f);if(i=258-(f-s),s=f-258,i>r){if(t.match_start=e,r=i,i>=o)break;c=h[s+r-1],u=h[s+r]}}}while((e=_[e&d])>l&&0!=--n);return r<=t.lookahead?r:t.lookahead},pt=t=>{const e=t.w_size;let a,i,n;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-262)&&(t.window.set(t.window.subarray(e,e+e-i),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),_t(t),i+=e),0===t.strm.avail_in)break;if(a=bt(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=a,t.lookahead+t.insert>=3)for(n=t.strstart-t.insert,t.ins_h=t.window[n],t.ins_h=ft(t,t.ins_h,t.window[n+1]);t.insert&&(t.ins_h=ft(t,t.ins_h,t.window[n+3-1]),t.prev[n&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=n,n++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)},kt=(t,e)=>{let a,i,n,s=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,r=0,o=t.strm.avail_in;do{if(a=65535,n=t.bi_valid+42>>3,t.strm.avail_out<n)break;if(n=t.strm.avail_out-n,i=t.strstart-t.block_start,a>i+t.strm.avail_in&&(a=i+t.strm.avail_in),a>n&&(a=n),a<s&&(0===a&&e!==X||e===P||a!==i+t.strm.avail_in))break;r=e===X&&a===i+t.strm.avail_in?1:0,H(t,0,0,r),t.pending_buf[t.pending-4]=a,t.pending_buf[t.pending-3]=a>>8,t.pending_buf[t.pending-2]=~a,t.pending_buf[t.pending-1]=~a>>8,ct(t.strm),i&&(i>a&&(i=a),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+i),t.strm.next_out),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i,t.block_start+=i,a-=i),a&&(bt(t.strm,t.strm.output,t.strm.next_out,a),t.strm.next_out+=a,t.strm.avail_out-=a,t.strm.total_out+=a)}while(0===r);return o-=t.strm.avail_in,o&&(o>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=o&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-o,t.strm.next_in),t.strstart),t.strstart+=o,t.insert+=o>t.w_size-t.insert?t.w_size-t.insert:o),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),r?4:e!==P&&e!==X&&0===t.strm.avail_in&&t.strstart===t.block_start?2:(n=t.window_size-t.strstart,t.strm.avail_in>n&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,n+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),n>t.strm.avail_in&&(n=t.strm.avail_in),n&&(bt(t.strm,t.window,t.strstart,n),t.strstart+=n,t.insert+=n>t.w_size-t.insert?t.w_size-t.insert:n),t.high_water<t.strstart&&(t.high_water=t.strstart),n=t.bi_valid+42>>3,n=t.pending_buf_size-n>65535?65535:t.pending_buf_size-n,s=n>t.w_size?t.w_size:n,i=t.strstart-t.block_start,(i>=s||(i||e===X)&&e!==P&&0===t.strm.avail_in&&i<=n)&&(a=i>n?n:i,r=e===X&&0===t.strm.avail_in&&a===i?1:0,H(t,t.block_start,a,r),t.block_start+=a,ct(t.strm)),r?3:1)},vt=(t,e)=>{let a,i;for(;;){if(t.lookahead<262){if(pt(t),t.lookahead<262&&e===P)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-262&&(t.match_length=gt(t,a)),t.match_length>=3)if(i=j(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=ft(t,t.ins_h,t.window[t.strstart+1]);else i=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2},yt=(t,e)=>{let a,i,n;for(;;){if(t.lookahead<262){if(pt(t),t.lookahead<262&&e===P)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-262&&(t.match_length=gt(t,a),t.match_length<=5&&(t.strategy===et||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-3,i=j(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=n&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,i&&(ut(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(i=j(t,0,t.window[t.strstart-1]),i&&ut(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=j(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2};function xt(t,e,a,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=i,this.func=n}const zt=[new xt(0,0,0,0,kt),new xt(4,4,8,4,vt),new xt(4,5,16,8,vt),new xt(4,6,32,32,vt),new xt(4,4,16,16,yt),new xt(8,16,32,32,yt),new xt(8,16,128,128,yt),new xt(8,32,128,256,yt),new xt(32,128,258,1024,yt),new xt(32,258,258,4096,yt)];function At(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ot,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),dt(this.dyn_ltree),dt(this.dyn_dtree),dt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),dt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),dt(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Et=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||42!==e.status&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&113!==e.status&&666!==e.status?1:0},Rt=t=>{if(Et(t))return lt(t,Q);t.total_in=t.total_out=0,t.data_type=rt;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=-2,C(e),q},Zt=t=>{const e=Rt(t);var a;return e===q&&((a=t.state).window_size=2*a.w_size,dt(a.head),a.max_lazy_match=zt[a.level].max_lazy,a.good_match=zt[a.level].good_length,a.nice_match=zt[a.level].nice_length,a.max_chain_length=zt[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=2,a.match_available=0,a.ins_h=0),e},Ut=(t,e,a,i,n,s)=>{if(!t)return Q;let r=1;if(e===tt&&(e=6),i<0?(r=0,i=-i):i>15&&(r=2,i-=16),n<1||n>9||a!==ot||i<8||i>15||e<0||e>9||s<0||s>nt||8===i&&1!==r)return lt(t,Q);8===i&&(i=9);const o=new At;return t.state=o,o.strm=t,o.status=42,o.wrap=r,o.gzhead=null,o.w_bits=i,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=n+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+3-1)/3),o.window=new Uint8Array(2*o.w_size),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<n+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=3*(o.lit_bufsize-1),o.level=e,o.strategy=s,o.method=a,Zt(t)};var St={deflateInit:(t,e)=>Ut(t,e,ot,15,8,st),deflateInit2:Ut,deflateReset:Zt,deflateResetKeep:Rt,deflateSetHeader:(t,e)=>Et(t)||2!==t.state.wrap?Q:(t.state.gzhead=e,q),deflate:(t,e)=>{if(Et(t)||e>W||e<0)return t?lt(t,Q):Q;const a=t.state;if(!t.output||0!==t.avail_in&&!t.input||666===a.status&&e!==X)return lt(t,0===t.avail_out?$:Q);const i=a.last_flush;if(a.last_flush=e,0!==a.pending){if(ct(t),0===t.avail_out)return a.last_flush=-1,q}else if(0===t.avail_in&&ht(e)<=ht(i)&&e!==X)return lt(t,$);if(666===a.status&&0!==t.avail_in)return lt(t,$);if(42===a.status&&0===a.wrap&&(a.status=113),42===a.status){let e=ot+(a.w_bits-8<<4)<<8,i=-1;if(i=a.strategy>=at||a.level<2?0:a.level<6?1:6===a.level?2:3,e|=i<<6,0!==a.strstart&&(e|=32),e+=31-e%31,mt(a,e),0!==a.strstart&&(mt(a,t.adler>>>16),mt(a,65535&t.adler)),t.adler=1,a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q}if(57===a.status)if(t.adler=0,wt(a,31),wt(a,139),wt(a,8),a.gzhead)wt(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),wt(a,255&a.gzhead.time),wt(a,a.gzhead.time>>8&255),wt(a,a.gzhead.time>>16&255),wt(a,a.gzhead.time>>24&255),wt(a,9===a.level?2:a.strategy>=at||a.level<2?4:0),wt(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(wt(a,255&a.gzhead.extra.length),wt(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(t.adler=N(t.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69;else if(wt(a,0),wt(a,0),wt(a,0),wt(a,0),wt(a,0),wt(a,9===a.level?2:a.strategy>=at||a.level<2?4:0),wt(a,3),a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q;if(69===a.status){if(a.gzhead.extra){let e=a.pending,i=(65535&a.gzhead.extra.length)-a.gzindex;for(;a.pending+i>a.pending_buf_size;){let n=a.pending_buf_size-a.pending;if(a.pending_buf.set(a.gzhead.extra.subarray(a.gzindex,a.gzindex+n),a.pending),a.pending=a.pending_buf_size,a.gzhead.hcrc&&a.pending>e&&(t.adler=N(t.adler,a.pending_buf,a.pending-e,e)),a.gzindex+=n,ct(t),0!==a.pending)return a.last_flush=-1,q;e=0,i-=n}let n=new Uint8Array(a.gzhead.extra);a.pending_buf.set(n.subarray(a.gzindex,a.gzindex+i),a.pending),a.pending+=i,a.gzhead.hcrc&&a.pending>e&&(t.adler=N(t.adler,a.pending_buf,a.pending-e,e)),a.gzindex=0}a.status=73}if(73===a.status){if(a.gzhead.name){let e,i=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),ct(t),0!==a.pending)return a.last_flush=-1,q;i=0}e=a.gzindex<a.gzhead.name.length?255&a.gzhead.name.charCodeAt(a.gzindex++):0,wt(a,e)}while(0!==e);a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),a.gzindex=0}a.status=91}if(91===a.status){if(a.gzhead.comment){let e,i=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),ct(t),0!==a.pending)return a.last_flush=-1,q;i=0}e=a.gzindex<a.gzhead.comment.length?255&a.gzhead.comment.charCodeAt(a.gzindex++):0,wt(a,e)}while(0!==e);a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i))}a.status=103}if(103===a.status){if(a.gzhead.hcrc){if(a.pending+2>a.pending_buf_size&&(ct(t),0!==a.pending))return a.last_flush=-1,q;wt(a,255&t.adler),wt(a,t.adler>>8&255),t.adler=0}if(a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q}if(0!==t.avail_in||0!==a.lookahead||e!==P&&666!==a.status){let i=0===a.level?kt(a,e):a.strategy===at?((t,e)=>{let a;for(;;){if(0===t.lookahead&&(pt(t),0===t.lookahead)){if(e===P)return 1;break}if(t.match_length=0,a=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2})(a,e):a.strategy===it?((t,e)=>{let a,i,n,s;const r=t.window;for(;;){if(t.lookahead<=258){if(pt(t),t.lookahead<=258&&e===P)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=t.strstart-1,i=r[n],i===r[++n]&&i===r[++n]&&i===r[++n])){s=t.strstart+258;do{}while(i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&n<s);t.match_length=258-(s-n),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=j(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2})(a,e):zt[a.level].func(a,e);if(3!==i&&4!==i||(a.status=666),1===i||3===i)return 0===t.avail_out&&(a.last_flush=-1),q;if(2===i&&(e===Y?K(a):e!==W&&(H(a,0,0,!1),e===G&&(dt(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),ct(t),0===t.avail_out))return a.last_flush=-1,q}return e!==X?q:a.wrap<=0?J:(2===a.wrap?(wt(a,255&t.adler),wt(a,t.adler>>8&255),wt(a,t.adler>>16&255),wt(a,t.adler>>24&255),wt(a,255&t.total_in),wt(a,t.total_in>>8&255),wt(a,t.total_in>>16&255),wt(a,t.total_in>>24&255)):(mt(a,t.adler>>>16),mt(a,65535&t.adler)),ct(t),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?q:J)},deflateEnd:t=>{if(Et(t))return Q;const e=t.state.status;return t.state=null,113===e?lt(t,V):q},deflateSetDictionary:(t,e)=>{let a=e.length;if(Et(t))return Q;const i=t.state,n=i.wrap;if(2===n||1===n&&42!==i.status||i.lookahead)return Q;if(1===n&&(t.adler=F(t.adler,e,a,0)),i.wrap=0,a>=i.w_size){0===n&&(dt(i.head),i.strstart=0,i.block_start=0,i.insert=0);let t=new Uint8Array(i.w_size);t.set(e.subarray(a-i.w_size,a),0),e=t,a=i.w_size}const s=t.avail_in,r=t.next_in,o=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,pt(i);i.lookahead>=3;){let t=i.strstart,e=i.lookahead-2;do{i.ins_h=ft(i,i.ins_h,i.window[t+3-1]),i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++}while(--e);i.strstart=t,i.lookahead=2,pt(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=r,t.input=o,t.avail_in=s,i.wrap=n,q},deflateInfo:"pako deflate (from Nodeca project)"};const Dt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var Tt=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const a=e.shift();if(a){if("object"!=typeof a)throw new TypeError(a+"must be non-object");for(const e in a)Dt(a,e)&&(t[e]=a[e])}}return t},Ot=t=>{let e=0;for(let a=0,i=t.length;a<i;a++)e+=t[a].length;const a=new Uint8Array(e);for(let e=0,i=0,n=t.length;e<n;e++){let n=t[e];a.set(n,i),i+=n.length}return a};let Ft=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){Ft=!1}const Lt=new Uint8Array(256);for(let t=0;t<256;t++)Lt[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Lt[254]=Lt[254]=1;var Nt=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,i,n,s,r=t.length,o=0;for(n=0;n<r;n++)a=t.charCodeAt(n),55296==(64512&a)&&n+1<r&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(a=65536+(a-55296<<10)+(i-56320),n++)),o+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(o),s=0,n=0;s<o;n++)a=t.charCodeAt(n),55296==(64512&a)&&n+1<r&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(a=65536+(a-55296<<10)+(i-56320),n++)),a<128?e[s++]=a:a<2048?(e[s++]=192|a>>>6,e[s++]=128|63&a):a<65536?(e[s++]=224|a>>>12,e[s++]=128|a>>>6&63,e[s++]=128|63&a):(e[s++]=240|a>>>18,e[s++]=128|a>>>12&63,e[s++]=128|a>>>6&63,e[s++]=128|63&a);return e},It=(t,e)=>{const a=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let i,n;const s=new Array(2*a);for(n=0,i=0;i<a;){let e=t[i++];if(e<128){s[n++]=e;continue}let r=Lt[e];if(r>4)s[n++]=65533,i+=r-1;else{for(e&=2===r?31:3===r?15:7;r>1&&i<a;)e=e<<6|63&t[i++],r--;r>1?s[n++]=65533:e<65536?s[n++]=e:(e-=65536,s[n++]=55296|e>>10&1023,s[n++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&Ft)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let a="";for(let i=0;i<e;i++)a+=String.fromCharCode(t[i]);return a})(s,n)},Bt=(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let a=e-1;for(;a>=0&&128==(192&t[a]);)a--;return a<0||0===a?e:a+Lt[t[a]]>e?a:e};var Ct=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Ht=Object.prototype.toString,{Z_NO_FLUSH:Mt,Z_SYNC_FLUSH:jt,Z_FULL_FLUSH:Kt,Z_FINISH:Pt,Z_OK:Yt,Z_STREAM_END:Gt,Z_DEFAULT_COMPRESSION:Xt,Z_DEFAULT_STRATEGY:Wt,Z_DEFLATED:qt}=B;function Jt(t){this.options=Tt({level:Xt,method:qt,chunkSize:16384,windowBits:15,memLevel:8,strategy:Wt},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ct,this.strm.avail_out=0;let a=St.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==Yt)throw new Error(I[a]);if(e.header&&St.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?Nt(e.dictionary):"[object ArrayBuffer]"===Ht.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,a=St.deflateSetDictionary(this.strm,t),a!==Yt)throw new Error(I[a]);this._dict_set=!0}}function Qt(t,e){const a=new Jt(e);if(a.push(t,!0),a.err)throw a.msg||I[a.err];return a.result}Jt.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize;let n,s;if(this.ended)return!1;for(s=e===~~e?e:!0===e?Pt:Mt,"string"==typeof t?a.input=Nt(t):"[object ArrayBuffer]"===Ht.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;)if(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),(s===jt||s===Kt)&&a.avail_out<=6)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else{if(n=St.deflate(a,s),n===Gt)return a.next_out>0&&this.onData(a.output.subarray(0,a.next_out)),n=St.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Yt;if(0!==a.avail_out){if(s>0&&a.next_out>0)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else if(0===a.avail_in)break}else this.onData(a.output)}return!0},Jt.prototype.onData=function(t){this.chunks.push(t)},Jt.prototype.onEnd=function(t){t===Yt&&(this.result=Ot(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Vt={Deflate:Jt,deflate:Qt,deflateRaw:function(t,e){return(e=e||{}).raw=!0,Qt(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,Qt(t,e)},constants:B};var $t=function(t,e){let a,i,n,s,r,o,l,h,d,_,f,c,u,w,m,b,g,p,k,v,y,x,z,A;const E=t.state;a=t.next_in,z=t.input,i=a+(t.avail_in-5),n=t.next_out,A=t.output,s=n-(e-t.avail_out),r=n+(t.avail_out-257),o=E.dmax,l=E.wsize,h=E.whave,d=E.wnext,_=E.window,f=E.hold,c=E.bits,u=E.lencode,w=E.distcode,m=(1<<E.lenbits)-1,b=(1<<E.distbits)-1;t:do{c<15&&(f+=z[a++]<<c,c+=8,f+=z[a++]<<c,c+=8),g=u[f&m];e:for(;;){if(p=g>>>24,f>>>=p,c-=p,p=g>>>16&255,0===p)A[n++]=65535&g;else{if(!(16&p)){if(0==(64&p)){g=u[(65535&g)+(f&(1<<p)-1)];continue e}if(32&p){E.mode=16191;break t}t.msg="invalid literal/length code",E.mode=16209;break t}k=65535&g,p&=15,p&&(c<p&&(f+=z[a++]<<c,c+=8),k+=f&(1<<p)-1,f>>>=p,c-=p),c<15&&(f+=z[a++]<<c,c+=8,f+=z[a++]<<c,c+=8),g=w[f&b];a:for(;;){if(p=g>>>24,f>>>=p,c-=p,p=g>>>16&255,!(16&p)){if(0==(64&p)){g=w[(65535&g)+(f&(1<<p)-1)];continue a}t.msg="invalid distance code",E.mode=16209;break t}if(v=65535&g,p&=15,c<p&&(f+=z[a++]<<c,c+=8,c<p&&(f+=z[a++]<<c,c+=8)),v+=f&(1<<p)-1,v>o){t.msg="invalid distance too far back",E.mode=16209;break t}if(f>>>=p,c-=p,p=n-s,v>p){if(p=v-p,p>h&&E.sane){t.msg="invalid distance too far back",E.mode=16209;break t}if(y=0,x=_,0===d){if(y+=l-p,p<k){k-=p;do{A[n++]=_[y++]}while(--p);y=n-v,x=A}}else if(d<p){if(y+=l+d-p,p-=d,p<k){k-=p;do{A[n++]=_[y++]}while(--p);if(y=0,d<k){p=d,k-=p;do{A[n++]=_[y++]}while(--p);y=n-v,x=A}}}else if(y+=d-p,p<k){k-=p;do{A[n++]=_[y++]}while(--p);y=n-v,x=A}for(;k>2;)A[n++]=x[y++],A[n++]=x[y++],A[n++]=x[y++],k-=3;k&&(A[n++]=x[y++],k>1&&(A[n++]=x[y++]))}else{y=n-v;do{A[n++]=A[y++],A[n++]=A[y++],A[n++]=A[y++],k-=3}while(k>2);k&&(A[n++]=A[y++],k>1&&(A[n++]=A[y++]))}break}}break}}while(a<i&&n<r);k=c>>3,a-=k,c-=k<<3,f&=(1<<c)-1,t.next_in=a,t.next_out=n,t.avail_in=a<i?i-a+5:5-(a-i),t.avail_out=n<r?r-n+257:257-(n-r),E.hold=f,E.bits=c};const te=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),ee=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),ae=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),ie=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var ne=(t,e,a,i,n,s,r,o)=>{const l=o.bits;let h,d,_,f,c,u,w=0,m=0,b=0,g=0,p=0,k=0,v=0,y=0,x=0,z=0,A=null;const E=new Uint16Array(16),R=new Uint16Array(16);let Z,U,S,D=null;for(w=0;w<=15;w++)E[w]=0;for(m=0;m<i;m++)E[e[a+m]]++;for(p=l,g=15;g>=1&&0===E[g];g--);if(p>g&&(p=g),0===g)return n[s++]=20971520,n[s++]=20971520,o.bits=1,0;for(b=1;b<g&&0===E[b];b++);for(p<b&&(p=b),y=1,w=1;w<=15;w++)if(y<<=1,y-=E[w],y<0)return-1;if(y>0&&(0===t||1!==g))return-1;for(R[1]=0,w=1;w<15;w++)R[w+1]=R[w]+E[w];for(m=0;m<i;m++)0!==e[a+m]&&(r[R[e[a+m]]++]=m);if(0===t?(A=D=r,u=20):1===t?(A=te,D=ee,u=257):(A=ae,D=ie,u=0),z=0,m=0,w=b,c=s,k=p,v=0,_=-1,x=1<<p,f=x-1,1===t&&x>852||2===t&&x>592)return 1;for(;;){Z=w-v,r[m]+1<u?(U=0,S=r[m]):r[m]>=u?(U=D[r[m]-u],S=A[r[m]-u]):(U=96,S=0),h=1<<w-v,d=1<<k,b=d;do{d-=h,n[c+(z>>v)+d]=Z<<24|U<<16|S|0}while(0!==d);for(h=1<<w-1;z&h;)h>>=1;if(0!==h?(z&=h-1,z+=h):z=0,m++,0==--E[w]){if(w===g)break;w=e[a+r[m]]}if(w>p&&(z&f)!==_){for(0===v&&(v=p),c+=b,k=w-v,y=1<<k;k+v<g&&(y-=E[k+v],!(y<=0));)k++,y<<=1;if(x+=1<<k,1===t&&x>852||2===t&&x>592)return 1;_=z&f,n[_]=p<<24|k<<16|c-s|0}}return 0!==z&&(n[c+z]=w-v<<24|64<<16|0),o.bits=p,0};const{Z_FINISH:se,Z_BLOCK:re,Z_TREES:oe,Z_OK:le,Z_STREAM_END:he,Z_NEED_DICT:de,Z_STREAM_ERROR:_e,Z_DATA_ERROR:fe,Z_MEM_ERROR:ce,Z_BUF_ERROR:ue,Z_DEFLATED:we}=B,me=16209,be=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function ge(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const pe=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<16180||e.mode>16211?1:0},ke=t=>{if(pe(t))return _e;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=16180,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,le},ve=t=>{if(pe(t))return _e;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,ke(t)},ye=(t,e)=>{let a;if(pe(t))return _e;const i=t.state;return e<0?(a=0,e=-e):(a=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?_e:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=a,i.wbits=e,ve(t))},xe=(t,e)=>{if(!t)return _e;const a=new ge;t.state=a,a.strm=t,a.window=null,a.mode=16180;const i=ye(t,e);return i!==le&&(t.state=null),i};let ze,Ae,Ee=!0;const Re=t=>{if(Ee){ze=new Int32Array(512),Ae=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(ne(1,t.lens,0,288,ze,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;ne(2,t.lens,0,32,Ae,0,t.work,{bits:5}),Ee=!1}t.lencode=ze,t.lenbits=9,t.distcode=Ae,t.distbits=5},Ze=(t,e,a,i)=>{let n;const s=t.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new Uint8Array(s.wsize)),i>=s.wsize?(s.window.set(e.subarray(a-s.wsize,a),0),s.wnext=0,s.whave=s.wsize):(n=s.wsize-s.wnext,n>i&&(n=i),s.window.set(e.subarray(a-i,a-i+n),s.wnext),(i-=n)?(s.window.set(e.subarray(a-i,a),0),s.wnext=i,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=n))),0};var Ue={inflateReset:ve,inflateReset2:ye,inflateResetKeep:ke,inflateInit:t=>xe(t,15),inflateInit2:xe,inflate:(t,e)=>{let a,i,n,s,r,o,l,h,d,_,f,c,u,w,m,b,g,p,k,v,y,x,z=0;const A=new Uint8Array(4);let E,R;const Z=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(pe(t)||!t.output||!t.input&&0!==t.avail_in)return _e;a=t.state,16191===a.mode&&(a.mode=16192),r=t.next_out,n=t.output,l=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,_=o,f=l,x=le;t:for(;;)switch(a.mode){case 16180:if(0===a.wrap){a.mode=16192;break}for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(2&a.wrap&&35615===h){0===a.wbits&&(a.wbits=15),a.check=0,A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0),h=0,d=0,a.mode=16181;break}if(a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",a.mode=me;break}if((15&h)!==we){t.msg="unknown compression method",a.mode=me;break}if(h>>>=4,d-=4,y=8+(15&h),0===a.wbits&&(a.wbits=y),y>15||y>a.wbits){t.msg="invalid window size",a.mode=me;break}a.dmax=1<<a.wbits,a.flags=0,t.adler=a.check=1,a.mode=512&h?16189:16191,h=0,d=0;break;case 16181:for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(a.flags=h,(255&a.flags)!==we){t.msg="unknown compression method",a.mode=me;break}if(57344&a.flags){t.msg="unknown header flags set",a.mode=me;break}a.head&&(a.head.text=h>>8&1),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0,a.mode=16182;case 16182:for(;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.head&&(a.head.time=h),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,A[2]=h>>>16&255,A[3]=h>>>24&255,a.check=N(a.check,A,4,0)),h=0,d=0,a.mode=16183;case 16183:for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.head&&(a.head.xflags=255&h,a.head.os=h>>8),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0,a.mode=16184;case 16184:if(1024&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.length=h,a.head&&(a.head.extra_len=h),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0}else a.head&&(a.head.extra=null);a.mode=16185;case 16185:if(1024&a.flags&&(c=a.length,c>o&&(c=o),c&&(a.head&&(y=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Uint8Array(a.head.extra_len)),a.head.extra.set(i.subarray(s,s+c),y)),512&a.flags&&4&a.wrap&&(a.check=N(a.check,i,c,s)),o-=c,s+=c,a.length-=c),a.length))break t;a.length=0,a.mode=16186;case 16186:if(2048&a.flags){if(0===o)break t;c=0;do{y=i[s+c++],a.head&&y&&a.length<65536&&(a.head.name+=String.fromCharCode(y))}while(y&&c<o);if(512&a.flags&&4&a.wrap&&(a.check=N(a.check,i,c,s)),o-=c,s+=c,y)break t}else a.head&&(a.head.name=null);a.length=0,a.mode=16187;case 16187:if(4096&a.flags){if(0===o)break t;c=0;do{y=i[s+c++],a.head&&y&&a.length<65536&&(a.head.comment+=String.fromCharCode(y))}while(y&&c<o);if(512&a.flags&&4&a.wrap&&(a.check=N(a.check,i,c,s)),o-=c,s+=c,y)break t}else a.head&&(a.head.comment=null);a.mode=16188;case 16188:if(512&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(4&a.wrap&&h!==(65535&a.check)){t.msg="header crc mismatch",a.mode=me;break}h=0,d=0}a.head&&(a.head.hcrc=a.flags>>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=16191;break;case 16189:for(;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}t.adler=a.check=be(h),h=0,d=0,a.mode=16190;case 16190:if(0===a.havedict)return t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,de;t.adler=a.check=1,a.mode=16191;case 16191:if(e===re||e===oe)break t;case 16192:if(a.last){h>>>=7&d,d-=7&d,a.mode=16206;break}for(;d<3;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}switch(a.last=1&h,h>>>=1,d-=1,3&h){case 0:a.mode=16193;break;case 1:if(Re(a),a.mode=16199,e===oe){h>>>=2,d-=2;break t}break;case 2:a.mode=16196;break;case 3:t.msg="invalid block type",a.mode=me}h>>>=2,d-=2;break;case 16193:for(h>>>=7&d,d-=7&d;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if((65535&h)!=(h>>>16^65535)){t.msg="invalid stored block lengths",a.mode=me;break}if(a.length=65535&h,h=0,d=0,a.mode=16194,e===oe)break t;case 16194:a.mode=16195;case 16195:if(c=a.length,c){if(c>o&&(c=o),c>l&&(c=l),0===c)break t;n.set(i.subarray(s,s+c),r),o-=c,s+=c,l-=c,r+=c,a.length-=c;break}a.mode=16191;break;case 16196:for(;d<14;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(a.nlen=257+(31&h),h>>>=5,d-=5,a.ndist=1+(31&h),h>>>=5,d-=5,a.ncode=4+(15&h),h>>>=4,d-=4,a.nlen>286||a.ndist>30){t.msg="too many length or distance symbols",a.mode=me;break}a.have=0,a.mode=16197;case 16197:for(;a.have<a.ncode;){for(;d<3;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.lens[Z[a.have++]]=7&h,h>>>=3,d-=3}for(;a.have<19;)a.lens[Z[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,E={bits:a.lenbits},x=ne(0,a.lens,0,19,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid code lengths set",a.mode=me;break}a.have=0,a.mode=16198;case 16198:for(;a.have<a.nlen+a.ndist;){for(;z=a.lencode[h&(1<<a.lenbits)-1],m=z>>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(g<16)h>>>=m,d-=m,a.lens[a.have++]=g;else{if(16===g){for(R=m+2;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(h>>>=m,d-=m,0===a.have){t.msg="invalid bit length repeat",a.mode=me;break}y=a.lens[a.have-1],c=3+(3&h),h>>>=2,d-=2}else if(17===g){for(R=m+3;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=m,d-=m,y=0,c=3+(7&h),h>>>=3,d-=3}else{for(R=m+7;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=m,d-=m,y=0,c=11+(127&h),h>>>=7,d-=7}if(a.have+c>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=me;break}for(;c--;)a.lens[a.have++]=y}}if(a.mode===me)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=me;break}if(a.lenbits=9,E={bits:a.lenbits},x=ne(1,a.lens,0,a.nlen,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid literal/lengths set",a.mode=me;break}if(a.distbits=6,a.distcode=a.distdyn,E={bits:a.distbits},x=ne(2,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,E),a.distbits=E.bits,x){t.msg="invalid distances set",a.mode=me;break}if(a.mode=16199,e===oe)break t;case 16199:a.mode=16200;case 16200:if(o>=6&&l>=258){t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,$t(t,f),r=t.next_out,n=t.output,l=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,16191===a.mode&&(a.back=-1);break}for(a.back=0;z=a.lencode[h&(1<<a.lenbits)-1],m=z>>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(b&&0==(240&b)){for(p=m,k=b,v=g;z=a.lencode[v+((h&(1<<p+k)-1)>>p)],m=z>>>24,b=z>>>16&255,g=65535&z,!(p+m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,a.length=g,0===b){a.mode=16205;break}if(32&b){a.back=-1,a.mode=16191;break}if(64&b){t.msg="invalid literal/length code",a.mode=me;break}a.extra=15&b,a.mode=16201;case 16201:if(a.extra){for(R=a.extra;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.length+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=16202;case 16202:for(;z=a.distcode[h&(1<<a.distbits)-1],m=z>>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(0==(240&b)){for(p=m,k=b,v=g;z=a.distcode[v+((h&(1<<p+k)-1)>>p)],m=z>>>24,b=z>>>16&255,g=65535&z,!(p+m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,64&b){t.msg="invalid distance code",a.mode=me;break}a.offset=g,a.extra=15&b,a.mode=16203;case 16203:if(a.extra){for(R=a.extra;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.offset+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=me;break}a.mode=16204;case 16204:if(0===l)break t;if(c=f-l,a.offset>c){if(c=a.offset-c,c>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=me;break}c>a.wnext?(c-=a.wnext,u=a.wsize-c):u=a.wnext-c,c>a.length&&(c=a.length),w=a.window}else w=n,u=r-a.offset,c=a.length;c>l&&(c=l),l-=c,a.length-=c;do{n[r++]=w[u++]}while(--c);0===a.length&&(a.mode=16200);break;case 16205:if(0===l)break t;n[r++]=a.length,l--,a.mode=16200;break;case 16206:if(a.wrap){for(;d<32;){if(0===o)break t;o--,h|=i[s++]<<d,d+=8}if(f-=l,t.total_out+=f,a.total+=f,4&a.wrap&&f&&(t.adler=a.check=a.flags?N(a.check,n,f,r-f):F(a.check,n,f,r-f)),f=l,4&a.wrap&&(a.flags?h:be(h))!==a.check){t.msg="incorrect data check",a.mode=me;break}h=0,d=0}a.mode=16207;case 16207:if(a.wrap&&a.flags){for(;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(4&a.wrap&&h!==(4294967295&a.total)){t.msg="incorrect length check",a.mode=me;break}h=0,d=0}a.mode=16208;case 16208:x=he;break t;case me:x=fe;break t;case 16210:return ce;default:return _e}return t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,(a.wsize||f!==t.avail_out&&a.mode<me&&(a.mode<16206||e!==se))&&Ze(t,t.output,t.next_out,f-t.avail_out),_-=t.avail_in,f-=t.avail_out,t.total_in+=_,t.total_out+=f,a.total+=f,4&a.wrap&&f&&(t.adler=a.check=a.flags?N(a.check,n,f,t.next_out-f):F(a.check,n,f,t.next_out-f)),t.data_type=a.bits+(a.last?64:0)+(16191===a.mode?128:0)+(16199===a.mode||16194===a.mode?256:0),(0===_&&0===f||e===se)&&x===le&&(x=ue),x},inflateEnd:t=>{if(pe(t))return _e;let e=t.state;return e.window&&(e.window=null),t.state=null,le},inflateGetHeader:(t,e)=>{if(pe(t))return _e;const a=t.state;return 0==(2&a.wrap)?_e:(a.head=e,e.done=!1,le)},inflateSetDictionary:(t,e)=>{const a=e.length;let i,n,s;return pe(t)?_e:(i=t.state,0!==i.wrap&&16190!==i.mode?_e:16190===i.mode&&(n=1,n=F(n,e,a,0),n!==i.check)?fe:(s=Ze(t,e,a,a),s?(i.mode=16210,ce):(i.havedict=1,le)))},inflateInfo:"pako inflate (from Nodeca project)"};var Se=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const De=Object.prototype.toString,{Z_NO_FLUSH:Te,Z_FINISH:Oe,Z_OK:Fe,Z_STREAM_END:Le,Z_NEED_DICT:Ne,Z_STREAM_ERROR:Ie,Z_DATA_ERROR:Be,Z_MEM_ERROR:Ce}=B;function He(t){this.options=Tt({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ct,this.strm.avail_out=0;let a=Ue.inflateInit2(this.strm,e.windowBits);if(a!==Fe)throw new Error(I[a]);if(this.header=new Se,Ue.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=Nt(e.dictionary):"[object ArrayBuffer]"===De.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(a=Ue.inflateSetDictionary(this.strm,e.dictionary),a!==Fe)))throw new Error(I[a])}He.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize,n=this.options.dictionary;let s,r,o;if(this.ended)return!1;for(r=e===~~e?e:!0===e?Oe:Te,"[object ArrayBuffer]"===De.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;){for(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),s=Ue.inflate(a,r),s===Ne&&n&&(s=Ue.inflateSetDictionary(a,n),s===Fe?s=Ue.inflate(a,r):s===Be&&(s=Ne));a.avail_in>0&&s===Le&&a.state.wrap>0&&0!==t[a.next_in];)Ue.inflateReset(a),s=Ue.inflate(a,r);switch(s){case Ie:case Be:case Ne:case Ce:return this.onEnd(s),this.ended=!0,!1}if(o=a.avail_out,a.next_out&&(0===a.avail_out||s===Le))if("string"===this.options.to){let t=Bt(a.output,a.next_out),e=a.next_out-t,n=It(a.output,t);a.next_out=e,a.avail_out=i-e,e&&a.output.set(a.output.subarray(t,t+e),0),this.onData(n)}else this.onData(a.output.length===a.next_out?a.output:a.output.subarray(0,a.next_out));if(s!==Fe||0!==o){if(s===Le)return s=Ue.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===a.avail_in)break}}return!0},He.prototype.onData=function(t){this.chunks.push(t)},He.prototype.onEnd=function(t){t===Fe&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Ot(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};const{Deflate:Me,deflate:je,deflateRaw:Ke,gzip:Pe}=Vt;var Ye=Me,Ge=je,Xe=B;const We=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const e=this._hasEvents?",":"";this.deflate.push(e+t,Xe.Z_SYNC_FLUSH),this._hasEvents=!0}finish(){if(this.deflate.push("]",Xe.Z_FINISH),this.deflate.err)throw this.deflate.err;const t=this.deflate.result;return this._init(),t}_init(){this._hasEvents=!1,this.deflate=new Ye,this.deflate.push("[",Xe.Z_NO_FLUSH)}},qe={clear:()=>{We.clear()},addEvent:t=>We.addEvent(t),finish:()=>We.finish(),compress:t=>function(t){return Ge(t)}(t)};addEventListener("message",(function(t){const e=t.data.method,a=t.data.id,i=t.data.arg;if(e in qe&&"function"==typeof qe[e])try{const t=qe[e](i);postMessage({id:a,method:e,success:!0,response:t})}catch(t){postMessage({id:a,method:e,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});']);return URL.createObjectURL(t)}();("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Replay] Using compression worker");const e=new Worker(t);return new no(e)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Replay] Failed to create compression worker")}return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Replay] Using simple buffer"),new Qa}({useCompression:this._options.useCompression}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this.startRecording()}_handleException(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("[Replay]",t),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&this._options._experiments&&this._options._experiments.captureExceptions&&Ur(t)}_loadAndCheckSession(){const{type:t,session:e}=lo({timeouts:this.timeouts,stickySession:Boolean(this._options.stickySession),currentSession:this.session,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:this._options.errorSampleRate>0});"new"===t&&this.setInitialState();const n=this.getSessionId();return e.id!==n&&(e.previousSessionId=n),this.session=e,!!this.session.sampled||(this.stop("session unsampled"),!1)}_addListeners(){try{ts.document.addEventListener("visibilitychange",this._handleVisibilityChange),ts.addEventListener("blur",this._handleWindowBlur),ts.addEventListener("focus",this._handleWindowFocus),ts.addEventListener("keydown",this._handleKeyboardEvent),this._hasInitializedCoreListeners||(function(t){const e=fr().getScope(),n=fr().getClient();e&&e.addScopeListener((t=>e=>{if(!t.isEnabled())return;const n=function(t){const e=t.getLastBreadcrumb&&t.getLastBreadcrumb();return Yo!==e&&e?(Yo=e,e.category&&(["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui."))?null:"console"===e.category?function(t){const e=t.data&&t.data.arguments;if(!Array.isArray(e)||0===e.length)return Pa(t);let n=!1;const r=e.map(t=>{if(!t)return t;if("string"==typeof t)return t.length>is?(n=!0,`${t.slice(0,is)}…`):t;if("object"==typeof t)try{const e=wn(t,7),r=JSON.stringify(e);if(r.length>is){const t=Do(r.slice(0,is)),e=JSON.parse(t);return n=!0,e}return e}catch(t){}return t});return Pa({...t,data:{...t.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(e):Pa(e)):null}(e);n&&Ya(t,n)})(t)),en("dom",(t=>{const e=t.getOptions()._experiments.slowClicks,n=e?{threshold:e.threshold,timeout:e.timeout,scrollTimeout:e.scrollTimeout,ignoreSelector:e.ignoreSelectors?e.ignoreSelectors.join(","):""}:void 0;return e=>{if(!t.isEnabled())return;const r=function(t){const{target:e,message:n}=function(t){const e="click"===t.name;let n,r=null;try{r=e?Ka(t.event):Wa(t.event),n=ve(r,{maxStringLength:200})||"<unknown>"}catch(t){n="<unknown>"}return{target:r,message:n}}(t);return Pa({category:`ui.${t.name}`,...qa(e,n)})}(e);if(!r)return;const i="click"===e.name,s=i&&e.event;i&&n&&s&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&function(t,e,n,r){if(function(t,e){return"INPUT"===t.tagName&&!["submit","button"].includes(t.getAttribute("type")||"")||!!ja.includes(t.tagName)||!("A"!==t.tagName||!(t.hasAttribute("download")||t.hasAttribute("target")&&"_self"!==t.getAttribute("target")))||!(!e.ignoreSelector||!t.matches(e.ignoreSelector))}(r,e))return;let i=()=>{};const s=setTimeout(()=>{$a(t,n,e.timeout,"timeout"),i()},e.timeout),a=()=>{Fa(t,n,e.scrollTimeout,e.timeout,"scroll"),i()},o=new MutationObserver(()=>{Fa(t,n,e.threshold,e.timeout,"mutation"),i()});o.observe(ts.document.documentElement,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),ts.addEventListener("scroll",a);const c=setTimeout(()=>{ts.removeEventListener("scroll",a)},e.scrollTimeout);i=()=>{clearTimeout(s),clearTimeout(c),o.disconnect(),ts.removeEventListener("scroll",a)}}(t,n,r,Ka(e.event)),Ya(t,r)}})(t)),en("history",function(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{from:e,to:n}=t,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:e}}}(e);null!==n&&(t.getContext().urls.push(n.name),t.triggerUserActivity(),t.addUpdate(()=>(fo(t,[n]),!1)))}}(t)),function(t){const e=fr().getClient();try{const n=new TextEncoder,{networkDetailAllowUrls:r,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:a}=t.getOptions(),o={replay:t,textEncoder:n,networkDetailAllowUrls:r,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:a};e&&e.on?e.on("beforeAddBreadcrumb",(t,e)=>function(t,e,n){if(e.data)try{(function(t){return"xhr"===t.category})(e)&&function(t){return t&&t.xhr}(n)&&(function(t,e,n){const{xhr:r,input:i}=e,s=Io(i,n.textEncoder),a=r.getResponseHeader("content-length")?No(r.getResponseHeader("content-length")):Io(r.response,n.textEncoder);void 0!==s&&(t.data.request_body_size=s),void 0!==a&&(t.data.response_body_size=a)}(e,n,t),async function(t,e,n){try{const r=function(t,e,n){const{startTimestamp:r,endTimestamp:i,input:s,xhr:a}=e,{url:o,method:c,status_code:l=0,request_body_size:u,response_body_size:d}=t.data;if(!o)return null;if(!Lo(o,n.networkDetailAllowUrls))return{startTimestamp:r,endTimestamp:i,url:o,method:c,statusCode:l,request:Uo(u),response:Uo(d)};const p=a[Xe],h=p?Mo(p.request_headers,n.networkRequestHeaders):{},f=Mo(function(t){const e=t.getAllResponseHeaders();return e?e.split("\r\n").reduce((t,e)=>{const[n,r]=e.split(": ");return t[n.toLowerCase()]=r,t},{}):{}}(a),n.networkResponseHeaders);return{startTimestamp:r,endTimestamp:i,url:o,method:c,statusCode:l,request:Bo(h,u,n.networkCaptureBodies?Oo(s):void 0),response:Bo(f,d,n.networkCaptureBodies?e.xhr.responseText:void 0)}}(t,e,n),i=Ao("resource.xhr",r);_o(n.replay,i)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("[Replay] Failed to capture fetch breadcrumb",t)}}(e,n,t)),function(t){return"fetch"===t.category}(e)&&function(t){return t&&t.response}(n)&&(function(t,e,n){const{input:r,response:i}=e,s=Io(Ho(r),n.textEncoder),a=i?No(i.headers.get("content-length")):void 0;void 0!==s&&(t.data.request_body_size=s),void 0!==a&&(t.data.response_body_size=a)}(e,n,t),async function(t,e,n){try{const r=await async function(t,e,n){const{startTimestamp:r,endTimestamp:i}=e,{url:s,method:a,status_code:o=0,request_body_size:c,response_body_size:l}=t.data,u=Lo(s,n.networkDetailAllowUrls),d=u?function({networkCaptureBodies:t,networkRequestHeaders:e},n,r){var i,s;return Bo((s=e,1===(i=n).length&&"string"!=typeof i[0]?Go(i[0],s):2===i.length?Go(i[1],s):{}),r,t?Oo(Ho(n)):void 0)}(n,e.input,c):Uo(c),p=await async function(t,{networkCaptureBodies:e,textEncoder:n,networkResponseHeaders:r},i,s){if(!t&&void 0!==s)return Uo(s);const a=zo(i.headers,r);if(!e&&void 0!==s)return Bo(a,s,void 0);try{const r=i.clone(),o=await async function(t){try{return await t.text()}catch(t){return}}(r),c=o&&o.length&&void 0===s?Io(o,n):s;return t?Bo(a,c,e?o:void 0):Uo(c)}catch(t){return Bo(a,s,void 0)}}(u,n,e.response,l);return{startTimestamp:r,endTimestamp:i,url:s,method:a,statusCode:o,request:d,response:p}}(t,e,n),i=Ao("resource.fetch",r);_o(n.replay,i)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("[Replay] Failed to capture fetch breadcrumb",t)}}(e,n,t))}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("Error when enriching network breadcrumb")}}(o,t,e)):(en("fetch",function(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{startTimestamp:e,endTimestamp:n,fetchData:r,response:i}=t;if(!n)return null;const{method:s,url:a}=r;return{type:"resource.fetch",start:e/1e3,end:n/1e3,name:a,data:{method:s,statusCode:i&&i.status}}}(e);_o(t,n)}}(t)),en("xhr",function(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{startTimestamp:e,endTimestamp:n,xhr:r}=t,i=r[Xe];if(!e||!n||!i)return null;const{method:s,url:a,status_code:o}=i;return void 0===a?null:{type:"resource.xhr",name:a,start:e/1e3,end:n/1e3,data:{method:s,statusCode:o}}}(e);_o(t,n)}}(t)))}catch(t){}}(t),cr(function(t,e=!1){const n=e?ho(t):void 0;return(e,r)=>{if(function(t){return"replay_event"===t.type}(e))return delete e.breadcrumbs,e;if(!uo(e)&&!po(e))return e;if(function(t,e){return!(t.type||!t.exception||!t.exception.values||!t.exception.values.length)&&(!(!e.originalException||!e.originalException.__rrweb__)||t.exception.values.some(t=>!!(t.stacktrace&&t.stacktrace.frames&&t.stacktrace.frames.length)&&t.stacktrace.frames.some(t=>t.filename&&t.filename.includes("/rrweb/src/"))))}(e,r)&&!t.getOptions()._experiments.captureExceptions)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Replay] Ignoring error from rrweb internals",e),null;const i=function(t,e){return"buffer"===t.recordingMode&&e.message!==ns&&!(!e.exception||e.type)&&so(t.getOptions().errorSampleRate)}(t,e);if((i||"session"===t.recordingMode)&&(e.tags={...e.tags,replayId:t.getSessionId()}),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&t.getOptions()._experiments.traceInternals&&uo(e)){const t=function(t){return{type:"Unknown",value:"n/a",...t.exception&&t.exception.values&&t.exception.values[0]}}(e);!function(t){const{category:e,level:n,message:r,...i}=t;var s;s={category:e||"console",level:n||"debug",message:`[debug]: ${r}`,...i},fr().addBreadcrumb(s)}({message:`Tagging event (${e.event_id}) - ${e.message} - ${t.type}: ${t.value}`})}return n&&n(e,{statusCode:200}),e}}(t,!Fo(n))),Fo(n)&&(n.on("afterSendEvent",ho(t)),n.on("createDsc",e=>{const n=t.getSessionId();n&&t.isEnabled()&&"session"===t.recordingMode&&(e.replay_id=n)}))}(this),this._hasInitializedCoreListeners=!0)}catch(t){this._handleException(t)}"PerformanceObserver"in ts&&(this._performanceObserver=function(t){const e=new PerformanceObserver(e=>{const n=function(t,e){const[n,r,i]=t.reduce((t,e)=>("navigation"===e.entryType?t[0].push(e):"largest-contentful-paint"===e.entryType?t[1].push(e):t[2].push(e),t),[[],[],[]]),s=[],a=[];let o=r.length?r[r.length-1]:void 0;return e.forEach(t=>{if("largest-contentful-paint"!==t.entryType)if("navigation"!==t.entryType)s.push(t);else{const e=t;t.duration>0&&!n.find(Xa(e))&&!a.find(Xa(e))&&a.push(e)}else(!o||o.startTime<t.startTime)&&(o=t)}),[...o?[o]:[],...n,...i,...s,...a].sort((t,e)=>t.startTime-e.startTime)}(t.performanceEvents,e.getEntries());t.performanceEvents=n});return["element","event","first-input","largest-contentful-paint","layout-shift","longtask","navigation","paint","resource"].forEach(t=>{try{e.observe({type:t,buffered:!0})}catch(t){}}),e}(this))}_removeListeners(){try{ts.document.removeEventListener("visibilitychange",this._handleVisibilityChange),ts.removeEventListener("blur",this._handleWindowBlur),ts.removeEventListener("focus",this._handleWindowFocus),ts.removeEventListener("keydown",this._handleKeyboardEvent),this._performanceObserver&&(this._performanceObserver.disconnect(),this._performanceObserver=null)}catch(t){this._handleException(t)}}__init13(){this._handleVisibilityChange=()=>{"visible"===ts.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init14(){this._handleWindowBlur=()=>{const t=Pa({category:"ui.blur"});this._doChangeToBackgroundTasks(t)}}__init15(){this._handleWindowFocus=()=>{const t=Pa({category:"ui.focus"});this._doChangeToForegroundTasks(t)}}__init16(){this._handleKeyboardEvent=t=>{!function(t,e){if(!t.isEnabled())return;t.triggerUserActivity();const n=function(t){const{metaKey:e,shiftKey:n,ctrlKey:r,altKey:i,key:s,target:a}=t;if(!a||function(t){return"INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable}(a))return null;if(!(e||r||i)&&1===s.length)return null;const o=ve(a,{maxStringLength:200})||"<unknown>";return Pa({category:"ui.keyDown",message:o,data:{...qa(a,o).data,metaKey:e,shiftKey:n,ctrlKey:r,altKey:i,key:s}})}(e);n&&Ya(t,n)}(this,t)}}_doChangeToBackgroundTasks(t){if(!this.session)return;const e=io(this.session,this.timeouts);t&&!e&&this._createCustomBreadcrumb(t),this.conditionalFlush()}_doChangeToForegroundTasks(t){this.session&&(this.checkAndHandleExpiredSession()?t&&this._createCustomBreadcrumb(t):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Replay] Document has become active, but session has expired"))}_triggerFullSnapshot(t=!0){try{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Replay] Taking full rrweb snapshot"),Ma.takeFullSnapshot(t)}catch(t){this._handleException(t)}}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{Ga(this,{type:Us.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){const t=[...this.performanceEvents];return this.performanceEvents=[],Promise.all(fo(this,function(t){return t.map(Vo).filter(Boolean)}(t)))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:e}=this;if(!t||!e)return;if(t.segmentId)return;const n=e.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){if(this.session&&this.eventBuffer){if(await this._addPerformanceEntries(),this.eventBuffer&&this.eventBuffer.hasEvents&&(await async function(t){try{return Promise.all(fo(t,[$o(ts.performance.memory)]))}catch(t){return[]}}(this),this.eventBuffer))try{this._updateInitialTimestampFromEventBuffer();const t=await this.eventBuffer.finish(),e=this.session.id,n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession(),await Ko({replayId:e,recordingData:t,segmentId:r,eventContext:n,session:this.session,options:this.getOptions(),timestamp:Date.now()})}catch(t){this._handleException(t),this.stop("sendReplay");const e=fr().getClient();e&&e.recordDroppedEvent("send_error","replay")}}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("[Replay] No session or eventBuffer found to flush.")}__init17(){this._flush=async({force:t=!1}={})=>{if(this._isEnabled||t)if(this.checkAndHandleExpiredSession())if(this.session){if(this._debouncedFlush.cancel(),!this._flushLock)return this._flushLock=this._runFlush(),await this._flushLock,void(this._flushLock=null);try{await this._flushLock}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error(t)}finally{this._debouncedFlush()}}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("[Replay] No session found to flush.");else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("[Replay] Attempting to finish replay event after session expired.")}}_maybeSaveSession(){this.session&&this._options.stickySession&&ao(this.session)}__init18(){this._onMutationHandler=t=>{const e=t.length,n=this._options._experiments.mutationLimit||0,r=n&&e>n;if(e>(this._options._experiments.mutationBreadcrumbLimit||1e3)||r){const t=Pa({category:"replay.mutations",data:{count:e}});this._createCustomBreadcrumb(t)}return!r||(this._triggerFullSnapshot(!1),!1)}}}function Xo(t,e,n,r){const i=[...t,..."string"==typeof r?r.split(","):[],...e];return void 0!==n&&("string"==typeof n&&i.push(`.${n}`),console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")),i.join(",")}function Qo({mask:t,unmask:e,block:n,unblock:r,ignore:i,blockClass:s,blockSelector:a,maskTextClass:o,maskTextSelector:c,ignoreClass:l}){const u=Xo(t,[".sentry-mask","[data-sentry-mask]"],o,c),d=Xo(e,[".sentry-unmask","[data-sentry-unmask]"]),p={maskTextSelector:u,unmaskTextSelector:d,maskInputSelector:u,unmaskInputSelector:d,blockSelector:Xo(n,[".sentry-block","[data-sentry-block]",'base[href="/"]'],s,a),unblockSelector:Xo(r,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:Xo(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],l)};return s instanceof RegExp&&(p.blockClass=s),o instanceof RegExp&&(p.maskTextClass=o),p}function tc(){return"undefined"!=typeof window&&(!bn()||"undefined"!=typeof process&&"renderer"===process.type)}const ec='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',nc=["content-length","content-type","accept"];let rc=!1;class ic{static __initStatic(){this.id="Replay"}__init(){this.name=ic.id}constructor({flushMinDelay:t=5e3,flushMaxDelay:e=5500,stickySession:n=!0,useCompression:r=!0,_experiments:i={},sessionSampleRate:s,errorSampleRate:a,maskAllText:o=!0,maskAllInputs:c=!0,blockAllMedia:l=!0,networkDetailAllowUrls:u=[],networkCaptureBodies:d=!0,networkRequestHeaders:p=[],networkResponseHeaders:h=[],mask:f=[],unmask:_=[],block:m=[],unblock:g=[],ignore:y=[],maskFn:v,beforeAddRecordingEvent:b,blockClass:E,blockSelector:S,maskInputOptions:w,maskTextClass:k,maskTextSelector:T,ignoreClass:C}={}){if(ic.prototype.__init.call(this),this._recordingOptions={maskAllInputs:c,maskAllText:o,maskInputOptions:{...w||{},password:!0},maskTextFn:v,maskInputFn:v,...Qo({mask:f,unmask:_,block:m,unblock:g,ignore:y,blockClass:E,blockSelector:S,maskTextClass:k,maskTextSelector:T,ignoreClass:C}),slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0},this._initialOptions={flushMinDelay:t,flushMaxDelay:e,stickySession:n,sessionSampleRate:s,errorSampleRate:a,useCompression:r,blockAllMedia:l,maskAllInputs:c,maskAllText:o,networkDetailAllowUrls:u,networkCaptureBodies:d,networkRequestHeaders:sc(p),networkResponseHeaders:sc(h),beforeAddRecordingEvent:b,_experiments:i},"number"==typeof s&&(console.warn(`[Replay] You are passing \`sessionSampleRate\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \`replaysSessionSampleRate\` directly in the SDK init options, e.g.:\nSentry.init({ replaysSessionSampleRate: ${s} })`),this._initialOptions.sessionSampleRate=s),"number"==typeof a&&(console.warn(`[Replay] You are passing \`errorSampleRate\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \`replaysOnErrorSampleRate\` directly in the SDK init options, e.g.:\nSentry.init({ replaysOnErrorSampleRate: ${a} })`),this._initialOptions.errorSampleRate=a),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${ec}`:ec),this._isInitialized&&tc())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return rc}set _isInitialized(t){rc=t}setupOnce(){tc()&&(this._setup(),setTimeout(()=>this._initialize()))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop():Promise.resolve()}flush(t){return this._replay&&this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):Promise.resolve()}getReplayId(){if(this._replay&&this._replay.isEnabled())return this._replay.getSessionId()}_initialize(){this._replay&&this._replay.initializeSampling()}_setup(){const t=function(t){const e=fr().getClient(),n=e&&e.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...Ge(t)};return n?(null==t.sessionSampleRate&&null==t.errorSampleRate&&null==n.replaysSessionSampleRate&&null==n.replaysOnErrorSampleRate&&console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set."),"number"==typeof n.replaysSessionSampleRate&&(r.sessionSampleRate=n.replaysSessionSampleRate),"number"==typeof n.replaysOnErrorSampleRate&&(r.errorSampleRate=n.replaysOnErrorSampleRate),r):(console.warn("SDK client is not available."),r)}(this._initialOptions);this._replay=new Jo({options:t,recordingOptions:this._recordingOptions})}}function sc(t){return[...nc,...t.map(t=>t.toLowerCase())]}function ac(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],s=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=s(n)):"call"!==i&&"optionalCall"!==i||(n=s((...t)=>n.call(e,...t)),e=void 0)}return n}function oc(t){const e=ac([t,"call",t=>t(),"access",t=>t.getClient,"call",t=>t(),"optionalAccess",t=>t.getOptions,"call",t=>t()]);return"sentry"!==(ac([e,"optionalAccess",t=>t.instrumenter])||"sentry")}ic.__initStatic();class cc{static __initStatic(){this.id="Express"}__init(){this.name=cc.id}constructor(t={}){cc.prototype.__init.call(this),this._router=t.router||t.app,this._methods=(Array.isArray(t.methods)?t.methods:[]).concat("use")}setupOnce(t,e){this._router?oc(e)?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("Express Integration is skipped because of instrumenter configuration."):(function(t,e=[]){e.forEach(e=>function(t,e){const n=t[e];return t[e]=function(...t){return n.call(this,...function(t,e){return t.map(t=>"function"==typeof t?lc(t,e):Array.isArray(t)?t.map(t=>"function"==typeof t?lc(t,e):t):t)}(t,e))},t}(t,e))}(this._router,this._methods),function(t){const e="settings"in t;e&&void 0===t._router&&t.lazyrouter&&t.lazyrouter();const n=e?t._router:t;if(!n)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.debug("Cannot instrument router for URL Parameterization (did not find a valid router)."),void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.debug("Routing instrumentation is currently only supported in Express 4."));const r=Object.getPrototypeOf(n),i=r.process_params;r.process_params=function(t,e,n,r,s){n._reconstructedRoute||(n._reconstructedRoute="");const{layerRoutePath:a,isRegex:o,isArray:c,numExtraSegments:l}=function(t){const e=ac([t,"access",t=>t.route,"optionalAccess",t=>t.path]),n=le(e),r=Array.isArray(e);if(!e)return{isRegex:n,isArray:r,numExtraSegments:0};const i=r?Math.max(e.reduce((t,e)=>t+Nn(e.toString()),0)-Nn(t.path||""),0):0,s=function(t,e){return t?e.map(t=>t.toString()).join(","):e&&e.toString()}(r,e);return{layerRoutePath:s,isRegex:n,isArray:r,numExtraSegments:i}}(t);(a||o||c)&&(n._hasParameters=!0);const u=(a||t.path||"").split("/").filter(t=>t.length>0&&(o||c||!t.includes("*"))).join("/");if(u&&u.length>0&&(n._reconstructedRoute+=`/${u}${o?"/":""}`),Nn(n.originalUrl||"")+l===Nn(n._reconstructedRoute)){n._hasParameters||n._reconstructedRoute!==n.originalUrl&&(n._reconstructedRoute=n.originalUrl);const t=r.__sentry_transaction;t&&"custom"!==t.metadata.source&&t.setName(...function(t,e={}){const n=t.method&&t.method.toUpperCase();let r="",i="url";e.customRoute||t.route?(r=e.customRoute||`${t.baseUrl||""}${t.route&&t.route.path}`,i="route"):(t.originalUrl||t.url)&&(r=(t.originalUrl||t.url||"").split(/[\?#]/,1)[0]);let s="";return e.method&&n&&(s+=n),e.method&&e.path&&(s+=" "),e.path&&r&&(s+=r),[s,i]}(n,{path:!0,method:!0,customRoute:n._reconstructedRoute||"/"}))}return i.call(this,t,e,n,r,s)}}(this._router)):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("ExpressIntegration is missing an Express instance")}}function lc(t,e){const n=t.length;switch(n){case 2:return function(n,r){const i=r.__sentry_transaction;if(i){const n=i.startChild({description:t.name,op:`middleware.express.${e}`});r.once("finish",()=>{n.finish()})}return t.call(this,n,r)};case 3:return function(n,r,i){const s=ac([r.__sentry_transaction,"optionalAccess",t=>t.startChild,"call",n=>n({description:t.name,op:`middleware.express.${e}`})]);t.call(this,n,r,function(...t){ac([s,"optionalAccess",t=>t.finish,"call",t=>t()]),i.call(this,...t)})};case 4:return function(n,r,i,s){const a=ac([i.__sentry_transaction,"optionalAccess",t=>t.startChild,"call",n=>n({description:t.name,op:`middleware.express.${e}`})]);t.call(this,n,r,i,function(...t){ac([a,"optionalAccess",t=>t.finish,"call",t=>t()]),s.call(this,...t)})};default:throw new Error(`Express middleware takes 2-4 arguments. Got: ${n}`)}}cc.__initStatic();class uc{static __initStatic(){this.id="Postgres"}__init(){this.name=uc.id}constructor(t={}){uc.prototype.__init.call(this),this._usePgNative=!!t.usePgNative}loadDependency(){return this._module=this._module||Sn("pg")}setupOnce(t,e){if(oc(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("Postgres Integration is skipped because of instrumenter configuration."));const n=this.loadDependency();if(!n)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("Postgres Integration was unable to require `pg` package."));if(this._usePgNative&&!ac([n,"access",t=>t.native,"optionalAccess",t=>t.Client]))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("Postgres Integration was unable to access 'pg-native' bindings."));const{Client:r}=this._usePgNative?n.native:n;Ae(r.prototype,"query",function(t){return function(n,r,i){const s=ac([e().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),a=ac([s,"optionalAccess",t=>t.startChild,"call",t=>t({description:"string"==typeof n?n:n.text,op:"db",data:{"db.system":"postgresql"}})]);if("function"==typeof i)return t.call(this,n,r,function(t,e){ac([a,"optionalAccess",t=>t.finish,"call",t=>t()]),i(t,e)});if("function"==typeof r)return t.call(this,n,function(t,e){ac([a,"optionalAccess",t=>t.finish,"call",t=>t()]),r(t,e)});const o=void 0!==r?t.call(this,n,r):t.call(this,n);return ue(o)?o.then(t=>(ac([a,"optionalAccess",t=>t.finish,"call",t=>t()]),t)):(ac([a,"optionalAccess",t=>t.finish,"call",t=>t()]),o)}})}}uc.__initStatic();class dc{constructor(){dc.prototype.__init.call(this)}static __initStatic(){this.id="Mysql"}__init(){this.name=dc.id}loadDependency(){return this._module=this._module||Sn("mysql/lib/Connection.js")}setupOnce(t,e){if(oc(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("Mysql Integration is skipped because of instrumenter configuration."));const n=this.loadDependency();n?Ae(n,"createQuery",function(t){return function(n,r,i){const s=ac([e().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),a=ac([s,"optionalAccess",t=>t.startChild,"call",t=>t({description:"string"==typeof n?n:n.sql,op:"db",data:{"db.system":"mysql"}})]);return"function"==typeof i?t.call(this,n,r,function(t,e,n){ac([a,"optionalAccess",t=>t.finish,"call",t=>t()]),i(t,e,n)}):"function"==typeof r?t.call(this,n,function(t,e,n){ac([a,"optionalAccess",t=>t.finish,"call",t=>t()]),r(t,e,n)}):t.call(this,n,r,i)}}):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("Mysql Integration was unable to require `mysql` package.")}}dc.__initStatic();const pc=["aggregate","bulkWrite","countDocuments","createIndex","createIndexes","deleteMany","deleteOne","distinct","drop","dropIndex","dropIndexes","estimatedDocumentCount","find","findOne","findOneAndDelete","findOneAndReplace","findOneAndUpdate","indexes","indexExists","indexInformation","initializeOrderedBulkOp","insertMany","insertOne","isCapped","mapReduce","options","parallelCollectionScan","rename","replaceOne","stats","updateMany","updateOne"],hc={bulkWrite:["operations"],countDocuments:["query"],createIndex:["fieldOrSpec"],createIndexes:["indexSpecs"],deleteMany:["filter"],deleteOne:["filter"],distinct:["key","query"],dropIndex:["indexName"],find:["query"],findOne:["query"],findOneAndDelete:["filter"],findOneAndReplace:["filter","replacement"],findOneAndUpdate:["filter","update"],indexExists:["indexes"],insertMany:["docs"],insertOne:["doc"],mapReduce:["map","reduce"],rename:["newName"],replaceOne:["filter","doc"],updateMany:["filter","update"],updateOne:["filter","update"]};class fc{static __initStatic(){this.id="Mongo"}__init(){this.name=fc.id}constructor(t={}){fc.prototype.__init.call(this),this._operations=Array.isArray(t.operations)?t.operations:pc,this._describeOperations=!("describeOperations"in t)||t.describeOperations,this._useMongoose=!!t.useMongoose}loadDependency(){return this._module=this._module||Sn(this._useMongoose?"mongoose":"mongodb")}setupOnce(t,e){if(oc(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("Mongo Integration is skipped because of instrumenter configuration."));const n=this.loadDependency();n?this._instrumentOperations(n.Collection,this._operations,e):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error(`Mongo Integration was unable to require \`${this._useMongoose?"mongoose":"mongodb"}\` package.`)}_instrumentOperations(t,e,n){e.forEach(e=>this._patchOperation(t,e,n))}_patchOperation(t,e,n){if(!(e in t.prototype))return;const r=this._getSpanContextFromOperationArguments.bind(this);Ae(t.prototype,e,function(t){return function(...i){const s=i[i.length-1],a=ac([n().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]);if("function"!=typeof s||"mapReduce"===e&&2===i.length){const n=ac([a,"optionalAccess",t=>t.startChild,"call",t=>t(r(this,e,i))]),s=t.call(this,...i);if(ue(s))return s.then(t=>(ac([n,"optionalAccess",t=>t.finish,"call",t=>t()]),t));if((o=s)&&"object"==typeof o&&o.once&&"function"==typeof o.once){const t=s;try{t.once("close",()=>{ac([n,"optionalAccess",t=>t.finish,"call",t=>t()])})}catch(t){ac([n,"optionalAccess",t=>t.finish,"call",t=>t()])}return t}return ac([n,"optionalAccess",t=>t.finish,"call",t=>t()]),s}var o;const c=ac([a,"optionalAccess",t=>t.startChild,"call",t=>t(r(this,e,i.slice(0,-1)))]);return t.call(this,...i.slice(0,-1),function(t,e){ac([c,"optionalAccess",t=>t.finish,"call",t=>t()]),s(t,e)})}})}_getSpanContextFromOperationArguments(t,e,n){const r={collectionName:t.collectionName,dbName:t.dbName,namespace:t.namespace,"db.system":"mongodb"},i={op:"db",description:e,data:r},s=hc[e],a=Array.isArray(this._describeOperations)?this._describeOperations.includes(e):this._describeOperations;if(!s||!a)return i;try{if("mapReduce"===e){const[t,e]=n;r[s[0]]="string"==typeof t?t:t.name||"<anonymous>",r[s[1]]="string"==typeof e?e:e.name||"<anonymous>"}else for(let t=0;t<s.length;t++)r[s[t]]=JSON.stringify(n[t])}catch(t){}return i}}fc.__initStatic();class _c{static __initStatic(){this.id="Prisma"}__init(){this.name=_c.id}constructor(t={}){var e;_c.prototype.__init.call(this),(e=t.client)&&e.$use?this._client=t.client:("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`Unsupported Prisma client provided to PrismaIntegration. Provided client: ${JSON.stringify(t.client)}`)}setupOnce(t,e){this._client?oc(e)?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("Prisma Integration is skipped because of instrumenter configuration."):this._client.$use((t,e)=>{const n=t.action,r=t.model;return Ar({name:r?`${r} ${n}`:n,op:"db.sql.prisma",data:{"db.system":"prisma"}},()=>e(t))}):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("PrismaIntegration is missing a Prisma Client Instance")}}_c.__initStatic();class mc{constructor(){mc.prototype.__init.call(this)}static __initStatic(){this.id="GraphQL"}__init(){this.name=mc.id}loadDependency(){return this._module=this._module||Sn("graphql/execution/execute.js")}setupOnce(t,e){if(oc(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("GraphQL Integration is skipped because of instrumenter configuration."));const n=this.loadDependency();n?Ae(n,"execute",function(t){return function(...n){const r=e().getScope(),i=ac([r,"optionalAccess",t=>t.getSpan,"call",t=>t()]),s=ac([i,"optionalAccess",t=>t.startChild,"call",t=>t({description:"execute",op:"graphql.execute"})]);ac([r,"optionalAccess",t=>t.setSpan,"call",t=>t(s)]);const a=t.call(this,...n);return ue(a)?a.then(t=>(ac([s,"optionalAccess",t=>t.finish,"call",t=>t()]),ac([r,"optionalAccess",t=>t.setSpan,"call",t=>t(i)]),t)):(ac([s,"optionalAccess",t=>t.finish,"call",t=>t()]),ac([r,"optionalAccess",t=>t.setSpan,"call",t=>t(i)]),a)}}):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("GraphQL Integration was unable to require graphql/execution package.")}}mc.__initStatic();class gc{static __initStatic(){this.id="Apollo"}__init(){this.name=gc.id}constructor(t={useNestjs:!1}){gc.prototype.__init.call(this),this._useNest=!!t.useNestjs}loadDependency(){return this._module=this._useNest?this._module||Sn("@nestjs/graphql"):this._module||Sn("apollo-server-core"),this._module}setupOnce(t,e){if(oc(e))("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("Apollo Integration is skipped because of instrumenter configuration.");else if(this._useNest){const t=this.loadDependency();if(!t)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("Apollo-NestJS Integration was unable to require @nestjs/graphql package."));Ae(t.GraphQLFactory.prototype,"mergeWithSchema",function(t){return function(...n){return Ae(this.resolversExplorerService,"explore",function(t){return function(){return yc(vn(t.call(this)),e)}}),t.call(this,...n)}})}else{const t=this.loadDependency();if(!t)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("Apollo Integration was unable to require apollo-server-core package."));Ae(t.ApolloServerBase.prototype,"constructSchema",function(t){return function(){if(!this.config.resolvers)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&(this.config.schema?(ke.warn("Apollo integration is not able to trace `ApolloServer` instances constructed via `schema` property.If you are using NestJS with Apollo, please use `Sentry.Integrations.Apollo({ useNestjs: true })` instead."),ke.warn()):this.config.modules&&ke.warn("Apollo integration is not able to trace `ApolloServer` instances constructed via `modules` property."),ke.error("Skipping tracing as no resolvers found on the `ApolloServer` instance.")),t.call(this);const n=vn(this.config.resolvers);return this.config.resolvers=yc(n,e),t.call(this)}})}}}function yc(t,e){return t.map(t=>(Object.keys(t).forEach(n=>{Object.keys(t[n]).forEach(r=>{"function"==typeof t[n][r]&&function(t,e,n,r){Ae(t[e],n,function(t){return function(...i){const s=ac([r().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),a=ac([s,"optionalAccess",t=>t.startChild,"call",t=>t({description:`${e}.${n}`,op:"graphql.resolve"})]),o=t.call(this,...i);return ue(o)?o.then(t=>(ac([a,"optionalAccess",t=>t.finish,"call",t=>t()]),t)):(ac([a,"optionalAccess",t=>t.finish,"call",t=>t()]),o)}})}(t,n,r,e)})}),t))}gc.__initStatic();const vc=fe,bc=(t,e,n)=>{let r,i;return s=>{e.value>=0&&(s||n)&&(i=e.value-(r||0),(i||void 0===r)&&(r=e.value,e.delta=i,t(e)))}},Ec=()=>vc.__WEB_VITALS_POLYFILL__?vc.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||(()=>{const t=vc.performance.timing,e=vc.performance.navigation.type,n={entryType:"navigation",startTime:0,type:2==e?"back_forward":1===e?"reload":"navigate"};for(const e in t)"navigationStart"!==e&&"toJSON"!==e&&(n[e]=Math.max(t[e]-t.navigationStart,0));return n})()):vc.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],Sc=()=>{const t=Ec();return t&&t.activationStart||0},wc=(t,e)=>{const n=Ec();let r="navigate";return n&&(r=vc.document.prerendering||Sc()>0?"prerender":n.type.replace(/_/g,"-")),{name:t,value:void 0===e?-1:e,rating:"good",delta:0,entries:[],id:`v3-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},kc=(t,e,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver(t=>{e(t.getEntries())});return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch(t){}},Tc=(t,e)=>{const n=r=>{"pagehide"!==r.type&&"hidden"!==vc.document.visibilityState||(t(r),e&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)};let Cc=-1;const xc=()=>(Cc<0&&(Cc="hidden"!==vc.document.visibilityState||vc.document.prerendering?Infinity:0,Tc(({timeStamp:t})=>{Cc=t},!0)),{get firstHiddenTime(){return Cc}}),Rc={};function Dc(t){return"number"==typeof t&&isFinite(t)}function Ic(t,{startTimestamp:e,...n}){return e&&t.startTimestamp>e&&(t.startTimestamp=e),t.startChild({startTimestamp:e,...n})}function Nc(t){return t/1e3}function Oc(){return vc&&vc.addEventListener&&vc.performance}let Ac,Uc,Bc=0,Mc={};function Pc(t,e,n,r,i,s){const a=s?e[s]:e[`${n}End`],o=e[`${n}Start`];o&&a&&Ic(t,{op:"browser",description:i||n,startTimestamp:r+Nc(o),endTimestamp:r+Nc(a)})}const Lc=["localhost",/^\/(?!\/)/],Hc={traceFetch:!0,traceXHR:!0,tracingOrigins:Lc,tracePropagationTargets:Lc};function zc(t){const{traceFetch:e,traceXHR:n,tracePropagationTargets:r,tracingOrigins:i,shouldCreateSpanForRequest:s}={traceFetch:Hc.traceFetch,traceXHR:Hc.traceXHR,...t},a="function"==typeof s?s:t=>!0,o=t=>function(t,e){return Oe(t,e||Lc)}(t,r||i),c={};e&&en("fetch",t=>{!function(t,e,n,r){if(!gr()||!t.fetchData||!e(t.fetchData.url))return;if(t.endTimestamp){const e=t.fetchData.__span;if(!e)return;const n=r[e];if(n){if(t.response){n.setHttpStatus(t.response.status);const e=t.response&&t.response.headers&&t.response.headers.get("content-length"),r=parseInt(e);r>0&&n.setData("http.response_content_length",r)}else t.error&&n.setStatus("internal_error");n.finish(),delete r[e]}return}const i=fr().getScope(),s=i&&i.getSpan(),a=s&&s.transaction;if(s&&a){const{method:e,url:i}=t.fetchData,o=s.startChild({data:{url:i,type:"fetch","http.method":e},description:`${e} ${i}`,op:"http.client"});t.fetchData.__span=o.spanId,r[o.spanId]=o;const c=t.args[0];t.args[1]=t.args[1]||{};const l=t.args[1];n(t.fetchData.url)&&(l.headers=function(t,e,n,r){const i=nr(e),s=n.toTraceparent(),a="undefined"!=typeof Request&&pe(t,Request)?t.headers:r.headers;if(a){if("undefined"!=typeof Headers&&pe(a,Headers)){const t=new Headers(a);return t.append("sentry-trace",s),i&&t.append(Xn,i),t}if(Array.isArray(a)){const t=[...a,["sentry-trace",s]];return i&&t.push([Xn,i]),t}{const t="baggage"in a?a.baggage:void 0,e=[];return Array.isArray(t)?e.push(...t):t&&e.push(t),i&&e.push(i),{...a,"sentry-trace":s,baggage:e.length>0?e.join(","):void 0}}}return{"sentry-trace":s,baggage:i}}(c,a.getDynamicSamplingContext(),o,l))}}(t,a,o,c)}),n&&en("xhr",t=>{!function(t,e,n,r){const i=t.xhr,s=i&&i[Xe];if(!gr()||i&&i.__sentry_own_request__||!(i&&s&&e(s.url)))return;if(t.endTimestamp){const t=i.__sentry_xhr_span_id__;if(!t)return;const e=r[t];return void(e&&(e.setHttpStatus(s.status_code),e.finish(),delete r[t]))}const a=fr().getScope(),o=a&&a.getSpan(),c=o&&o.transaction;if(o&&c){const t=o.startChild({data:{...s.data,type:"xhr","http.method":s.method,url:s.url},description:`${s.method} ${s.url}`,op:"http.client"});if(i.__sentry_xhr_span_id__=t.spanId,r[i.__sentry_xhr_span_id__]=t,i.setRequestHeader&&n(s.url))try{i.setRequestHeader("sentry-trace",t.toTraceparent());const e=nr(c.getDynamicSamplingContext());e&&i.setRequestHeader(Xn,e)}catch(t){}}}(t,a,o,c)})}const Gc={...kr,markBackgroundTransactions:!0,routingInstrumentation:function(t,e=!0,n=!0){if(!vc||!vc.location)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("Could not initialize routing instrumentation due to invalid location"));let r,i=vc.location.href;e&&(r=t({name:vc.location.pathname,startTimestamp:Hn?Hn/1e3:void 0,op:"pageload",metadata:{source:"url"}})),n&&en("history",({to:e,from:n})=>{void 0===n&&i&&-1!==i.indexOf(e)?i=void 0:n!==e&&(i=void 0,r&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`[Tracing] Finishing current transaction with op: ${r.op}`),r.finish()),r=t({name:vc.location.pathname,op:"navigation",metadata:{source:"url"}}))})},startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,_experiments:{},...Hc};class Yc{__init(){this.name="BrowserTracing"}constructor(t){Yc.prototype.__init.call(this),Or(),this.options={...Gc,...t},void 0!==this.options._experiments.enableLongTask&&(this.options.enableLongTask=this.options._experiments.enableLongTask),t&&!t.tracePropagationTargets&&t.tracingOrigins&&(this.options.tracePropagationTargets=t.tracingOrigins),this._collectWebVitals=function(){const t=Oc();if(t&&Hn){t.mark&&vc.performance.mark("sentry-tracing-init"),(t=>{const e=xc(),n=wc("FID");let r;const i=t=>{t.startTime<e.firstHiddenTime&&(n.value=t.processingStart-t.startTime,n.entries.push(t),r(!0))},s=t=>{t.forEach(i)},a=kc("first-input",s);r=bc(t=>{const e=t.entries.pop();if(!e)return;const n=Nc(Hn),r=Nc(e.startTime);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Measurements] Adding FID"),Mc.fid={value:t.value,unit:"millisecond"},Mc["mark.fid"]={value:n+r,unit:"second"}},n),a&&Tc(()=>{s(a.takeRecords()),a.disconnect()},!0)})();const e=(t=>{const e=wc("CLS",0);let n,r=0,i=[];const s=t=>{t.forEach(t=>{t.hadRecentInput||(r&&0!==i.length&&t.startTime-i[i.length-1].startTime<1e3&&t.startTime-i[0].startTime<5e3?(r+=t.value,i.push(t)):(r=t.value,i=[t]),r>e.value&&(e.value=r,e.entries=i,n&&n()))})},a=kc("layout-shift",s);if(a){n=bc(t=>{const e=t.entries.pop();e&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Measurements] Adding CLS"),Mc.cls={value:t.value,unit:""},Uc=e)},e);const t=()=>{s(a.takeRecords()),n(!0)};return Tc(t),t}})(),n=(t=>{const e=xc(),n=wc("LCP");let r;const i=t=>{const i=t[t.length-1];if(i){const t=Math.max(i.startTime-Sc(),0);t<e.firstHiddenTime&&(n.value=t,n.entries=[i],r())}},s=kc("largest-contentful-paint",i);if(s){r=bc(t=>{const e=t.entries.pop();e&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Measurements] Adding LCP"),Mc.lcp={value:t.value,unit:"millisecond"},Ac=e)},n);const t=()=>{Rc[n.id]||(i(s.takeRecords()),s.disconnect(),Rc[n.id]=!0,r(!0))};return["keydown","click"].forEach(e=>{addEventListener(e,t,{once:!0,capture:!0})}),Tc(t,!0),t}})();return()=>{e&&e(),n&&n()}}return()=>{}}(),this.options.enableLongTask&&kc("longtask",t=>{for(const e of t){const t=yr();if(!t)return;const n=Nc(Hn+e.startTime),r=Nc(e.duration);t.startChild({description:"Main UI thread blocked",op:"ui.long-task",startTimestamp:n,endTimestamp:n+r})}}),this.options._experiments.enableInteractions&&kc("event",t=>{for(const e of t){const t=yr();if(!t)return;if("click"===e.name){const n=Nc(Hn+e.startTime),r=Nc(e.duration);t.startChild({description:ve(e.target),op:`ui.interaction.${e.name}`,startTimestamp:n,endTimestamp:n+r})}}},{durationThreshold:0})}setupOnce(t,e){this._getCurrentHub=e;const{routingInstrumentation:n,startTransactionOnLocationChange:r,startTransactionOnPageLoad:i,markBackgroundTransactions:s,traceFetch:a,traceXHR:o,tracePropagationTargets:c,shouldCreateSpanForRequest:l,_experiments:u}=this.options;n(t=>{const n=this._createRouteTransaction(t);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(n,t,e),n},i,r),s&&(vc&&vc.document?vc.document.addEventListener("visibilitychange",()=>{const t=yr();if(vc.document.hidden&&t){const e="cancelled";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${t.op}`),t.status||t.setStatus(e),t.setTag("visibilitychange","document.hidden"),t.finish()}}):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("[Tracing] Could not set up background tab detection due to lack of global document")),u.enableInteractions&&this._registerInteractionListener(),zc({traceFetch:a,traceXHR:o,tracePropagationTargets:c,shouldCreateSpanForRequest:l})}_createRouteTransaction(t){if(!this._getCurrentHub)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`[Tracing] Did not create ${t.op} transaction because _getCurrentHub is invalid.`));const{beforeNavigate:e,idleTimeout:n,finalTimeout:r,heartbeatInterval:i}=this.options,s="pageload"===t.op,a=s?Fc("sentry-trace"):null,o=s?Fc("baggage"):null,c=a?function(t){const e=t.match(zn);if(!t||!e)return;let n;return"1"===e[3]?n=!0:"0"===e[3]&&(n=!1),{traceId:e[1],parentSampled:n,parentSpanId:e[2]}}(a):void 0,l=o?function(t){if(!se(t)&&!Array.isArray(t))return;let e={};if(Array.isArray(t))e=t.reduce((t,e)=>({...t,...rr(e)}),{});else{if(!t)return;e=rr(t)}const n=Object.entries(e).reduce((t,[e,n])=>(e.match(tr)&&(t[e.slice(Qn.length)]=n),t),{});return Object.keys(n).length>0?n:void 0}(o):void 0,u={...t,...c,metadata:{...t.metadata,dynamicSamplingContext:c&&!l?{}:l},trimEnd:!0},d="function"==typeof e?e(u):u,p=void 0===d?{...u,sampled:!1}:d;p.metadata=p.name!==u.name?{...p.metadata,source:"custom"}:p.metadata,this._latestRouteName=p.name,this._latestRouteSource=p.metadata&&p.metadata.source,!1===p.sampled&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`[Tracing] Will not send ${p.op} transaction because of beforeNavigate.`),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`[Tracing] Starting ${p.op} transaction on scope`);const h=this._getCurrentHub(),{location:f}=vc,_=Nr(h,p,n,r,!0,{location:f},i);return _.registerBeforeFinishCallback(t=>{this._collectWebVitals(),function(t){const e=Oc();if(!e||!vc.performance.getEntries||!Hn)return;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Tracing] Adding & adjusting spans using Performance API");const n=Nc(Hn),r=e.getEntries();let i,s;if(r.slice(Bc).forEach(e=>{const r=Nc(e.startTime),a=Nc(e.duration);if(!("navigation"===t.op&&n+r<t.startTimestamp))switch(e.entryType){case"navigation":!function(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Pc(t,e,r,n)}),Pc(t,e,"secureConnection",n,"TLS/SSL","connectEnd"),Pc(t,e,"fetch",n,"cache","domainLookupStart"),Pc(t,e,"domainLookup",n,"DNS"),function(t,e,n){Ic(t,{op:"browser",description:"request",startTimestamp:n+Nc(e.requestStart),endTimestamp:n+Nc(e.responseEnd)}),Ic(t,{op:"browser",description:"response",startTimestamp:n+Nc(e.responseStart),endTimestamp:n+Nc(e.responseEnd)})}(t,e,n)}(t,e,n),i=n+Nc(e.responseStart),s=n+Nc(e.requestStart);break;case"mark":case"paint":case"measure":{!function(t,e,n,r,i){const s=i+n;Ic(t,{description:e.name,endTimestamp:s+r,op:e.entryType,startTimestamp:s})}(t,e,r,a,n);const i=xc(),s=e.startTime<i.firstHiddenTime;"first-paint"===e.name&&s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Measurements] Adding FP"),Mc.fp={value:e.startTime,unit:"millisecond"}),"first-contentful-paint"===e.name&&s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Measurements] Adding FCP"),Mc.fcp={value:e.startTime,unit:"millisecond"});break}case"resource":{const i=e.name.replace(vc.location.origin,"");!function(t,e,n,r,i,s){if("xmlhttprequest"===e.initiatorType||"fetch"===e.initiatorType)return;const a={};"transferSize"in e&&(a["http.response_transfer_size"]=e.transferSize),"encodedBodySize"in e&&(a["http.response_content_length"]=e.encodedBodySize),"decodedBodySize"in e&&(a["http.decoded_response_content_length"]=e.decodedBodySize),"renderBlockingStatus"in e&&(a["resource.render_blocking_status"]=e.renderBlockingStatus);const o=s+r;Ic(t,{description:n,endTimestamp:o+i,op:e.initiatorType?`resource.${e.initiatorType}`:"resource.other",startTimestamp:o,data:a})}(t,e,i,r,a,n);break}}}),Bc=Math.max(r.length-1,0),function(t){const e=vc.navigator;if(!e)return;const n=e.connection;n&&(n.effectiveType&&t.setTag("effectiveConnectionType",n.effectiveType),n.type&&t.setTag("connectionType",n.type),Dc(n.rtt)&&(Mc["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Dc(e.deviceMemory)&&t.setTag("deviceMemory",`${e.deviceMemory} GB`),Dc(e.hardwareConcurrency)&&t.setTag("hardwareConcurrency",String(e.hardwareConcurrency))}(t),"pageload"===t.op){"number"==typeof i&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Measurements] Adding TTFB"),Mc.ttfb={value:1e3*(i-t.startTimestamp),unit:"millisecond"},"number"==typeof s&&s<=i&&(Mc["ttfb.requestTime"]={value:1e3*(i-s),unit:"millisecond"})),["fcp","fp","lcp"].forEach(e=>{if(!Mc[e]||n>=t.startTimestamp)return;const r=Mc[e].value,i=n+Nc(r),s=Math.abs(1e3*(i-t.startTimestamp));("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`[Measurements] Normalized ${e} from ${r} to ${s} (${s-r})`),Mc[e].value=s});const e=Mc["mark.fid"];e&&Mc.fid&&(Ic(t,{description:"first input delay",endTimestamp:e.value+Nc(Mc.fid.value),op:"ui.action",startTimestamp:e.value}),delete Mc["mark.fid"]),"fcp"in Mc||delete Mc.cls,Object.keys(Mc).forEach(e=>{t.setMeasurement(e,Mc[e].value,Mc[e].unit)}),function(t){Ac&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Measurements] Adding LCP Data"),Ac.element&&t.setTag("lcp.element",ve(Ac.element)),Ac.id&&t.setTag("lcp.id",Ac.id),Ac.url&&t.setTag("lcp.url",Ac.url.trim().slice(0,200)),t.setTag("lcp.size",Ac.size)),Uc&&Uc.sources&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Measurements] Adding CLS Data"),Uc.sources.forEach((e,n)=>t.setTag(`cls.source.${n+1}`,ve(e.node))))}(t)}Ac=void 0,Uc=void 0,Mc={}}(t)}),_}_registerInteractionListener(){let t;const e=()=>{const{idleTimeout:e,finalTimeout:n,heartbeatInterval:r}=this.options,i="ui.action.click",s=yr();if(s&&s.op&&["navigation","pageload"].includes(s.op))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`[Tracing] Did not create ${i} transaction because a pageload or navigation transaction is in progress.`));if(t&&(t.setFinishReason("interactionInterrupted"),t.finish(),t=void 0),!this._getCurrentHub)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`[Tracing] Did not create ${i} transaction because _getCurrentHub is invalid.`));if(!this._latestRouteName)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`[Tracing] Did not create ${i} transaction because _latestRouteName is missing.`));const a=this._getCurrentHub(),{location:o}=vc;t=Nr(a,{name:this._latestRouteName,op:i,trimEnd:!0,metadata:{source:this._latestRouteSource||"url"}},e,n,!0,{location:o},r)};["click"].forEach(t=>{addEventListener(t,e,{once:!1,capture:!0})})}}function Fc(t){const e=ge.document&&ge.document.querySelector?ge.document.querySelector(`meta[name=${t}]`):null;return e?e.getAttribute("content"):null}var $c={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},jc={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Vc={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Zc={};function qc(t){return Q.default.isMemo(t)?Vc:Zc[t.$$typeof]||$c}Zc[Q.default.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Zc[Q.default.Memo]=Vc;var Wc=Object.defineProperty,Kc=Object.getOwnPropertyNames,Jc=Object.getOwnPropertySymbols,Xc=Object.getOwnPropertyDescriptor,Qc=Object.getPrototypeOf,tl=Object.prototype,el=function t(e,n,r){if("string"!=typeof n){if(tl){var i=Qc(n);i&&i!==tl&&t(e,i,r)}var s=Kc(n);Jc&&(s=s.concat(Jc(n)));for(var a=qc(e),o=qc(n),c=0;c<s.length;++c){var l=s[c];if(!(jc[l]||r&&r[l]||o&&o[l]||a&&a[l])){var u=Xc(n,l);try{Wc(e,l,u)}catch(t){}}}}return e};const nl="/home/runner/work/sentry-javascript/sentry-javascript/packages/react/src/profiler.tsx";class rl extends N.Component{__init(){this._mountSpan=void 0}__init2(){this._updateSpan=void 0}static __initStatic(){this.defaultProps={disabled:!1,includeRender:!0,includeUpdates:!0}}constructor(t){super(t),rl.prototype.__init.call(this),rl.prototype.__init2.call(this);const{name:e,disabled:n=!1}=this.props;if(n)return;const r=function(t=fr()){if(t){const e=t.getScope();if(e)return e.getTransaction()}}();r&&(this._mountSpan=r.startChild({description:`<${e}>`,op:"ui.react.mount"}))}componentDidMount(){this._mountSpan&&this._mountSpan.finish()}shouldComponentUpdate({updateProps:t,includeUpdates:e=!0}){if(e&&this._mountSpan&&t!==this.props.updateProps){const e=Object.keys(t).filter(e=>t[e]!==this.props.updateProps[e]);if(e.length>0){const t=Ln();this._updateSpan=this._mountSpan.startChild({data:{changedProps:e},description:`<${this.props.name}>`,op:"ui.react.update",startTimestamp:t})}}return!0}componentDidUpdate(){this._updateSpan&&(this._updateSpan.finish(),this._updateSpan=void 0)}componentWillUnmount(){const{name:t,includeRender:e=!0}=this.props;this._mountSpan&&e&&this._mountSpan.startChild({description:`<${t}>`,endTimestamp:Ln(),op:"ui.react.render",startTimestamp:this._mountSpan.endTimestamp})}render(){return this.props.children}}rl.__initStatic();const il={componentStack:null,error:null,eventId:null};class sl extends N.Component{__init(){this.state=il}__init2(){this._openFallbackReportDialog=!0}constructor(t){super(t),sl.prototype.__init.call(this),sl.prototype.__init2.call(this),sl.prototype.__init3.call(this);const e=fr().getClient();e&&e.on&&t.showDialog&&(this._openFallbackReportDialog=!1,e.on("afterSendEvent",e=>{e.type||e.event_id!==this._lastEventId||Xi({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,{componentStack:e}){const{beforeCapture:n,onError:r,showDialog:i,dialogOptions:s}=this.props;Br(a=>{if(function(t){const e=N.version.match(/^([^.]+)/);return null!==e&&parseInt(e[0])>=17}()&&ee(t)){const n=new Error(t.message);n.name=`React ErrorBoundary ${n.name}`,n.stack=e,function(t,e){const n=new WeakMap;!function t(e,r){if(!n.has(e))return e.cause?(n.set(e,!0),t(e.cause,r)):void(e.cause=r)}(t,e)}(t,n)}n&&n(a,t,e);const o=Ur(t,{contexts:{react:{componentStack:e}}});r&&r(t,e,o),i&&(this._lastEventId=o,this._openFallbackReportDialog&&Xi({...s,eventId:o})),this.setState({error:t,componentStack:e,eventId:o})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:e,eventId:n}=this.state,{onUnmount:r}=this.props;r&&r(t,e,n)}__init3(){this.resetErrorBoundary=()=>{const{onReset:t}=this.props,{error:e,componentStack:n,eventId:r}=this.state;t&&t(e,n,r),this.setState(il)}}render(){const{fallback:t,children:e}=this.props,n=this.state;if(n.error){let e;return e="function"==typeof t?t({error:n.error,componentStack:n.componentStack,resetError:this.resetErrorBoundary,eventId:n.eventId}):t,N.isValidElement(e)?e:(t&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("fallback did not produce a valid ReactElement"),null)}return"function"==typeof e?e():e}}let al,ol,cl,ll,ul,dl,pl,hl;const fl={"routing.instrumentation":"react-router-v6"};function _l(t,e,n){if(!t||0===t.length)return[e.pathname,"url"];let r="";if(n)for(let t=0;t<n.length;t++){const i=n[t],s=i.route;if(s){if(s.index)return[i.pathname,"route"];const t=s.path;if(t){const n="/"===t[0]||"/"===r[r.length-1]?t:`/${t}`;if(r+=n,i.pathname===e.pathname)return Nn(r)!==Nn(i.pathname)&&"/*"!==r.slice(-2)?[n,"route"]:[r,"route"]}}}return[e.pathname,"url"]}function ml(){return ml=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ml.apply(this,arguments)}const gl={BrowserTracing:Yc,Apollo:gc,Express:cc,GraphQL:mc,Mongo:fc,Mysql:dc,Postgres:uc,Prisma:_c};("undefined"==typeof __SENTRY_TRACING__||__SENTRY_TRACING__)&&(Or(),bn()&&function(){const t=pr();if(!t.__SENTRY__)return;const e={mongodb:()=>new(En(module,"./node/integrations/mongo").Mongo),mongoose:()=>new(En(module,"./node/integrations/mongo").Mongo),mysql:()=>new(En(module,"./node/integrations/mysql").Mysql),pg:()=>new(En(module,"./node/integrations/postgres").Postgres)},n=Object.keys(e).filter(t=>!!Sn(t)).map(t=>{try{return e[t]()}catch(t){return}}).filter(t=>t);n.length>0&&(t.__SENTRY__.integrations=[...t.__SENTRY__.integrations||[],...n])}());var yl={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 5 seconds..."},vl={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 5 sekund nastąpi odświeżenie aplikacji..."},bl=navigator.language.slice(0,2),El="pl";["en","pl"].includes(bl)&&(El=bl);var Sl=new(/*#__PURE__*/function(){function t(){this.locale=El,this.translations=vl,o.makeObservable(this,{locale:o.observable,translations:o.observable,setLocale:o.action})}return t.prototype.setLocale=function(t){this.locale=t,this.translations="en"===t?yl:vl},t}());function wl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}var kl,Tl=function t(e,n){function r(t,r,i){if("undefined"!=typeof document){"number"==typeof(i=wl({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var a in i)i[a]&&(s+="; "+a,!0!==i[a]&&(s+="="+i[a].split(";")[0]));return document.cookie=t+"="+e.write(r,t)+s}}return Object.create({set:r,get:function(t){if("undefined"!=typeof document&&(!arguments.length||t)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var s=n[i].split("="),a=s.slice(1).join("=");try{var o=decodeURIComponent(s[0]);if(r[o]=e.read(a,o),t===o)break}catch(t){}}return t?r[t]:r}},remove:function(t,e){r(t,"",wl({},e,{expires:-1}))},withAttributes:function(e){return t(this.converter,wl({},this.attributes,e))},withConverter:function(e){return t(wl({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(e)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"}),Cl=/*#__PURE__*/function(){function t(){}return t.recognizeRootDomain=function(){if(!this.rootDomain){var t=window.location.hostname;if(0===window.location.port.length){var e,n,r=t.split(".");e=r[0],n=r.slice(1),this.subdomain=e,this.rootDomain=n.join(".")}else this.rootDomain=t}return this.rootDomain},t.get=function(t){var e=this.recognizeRootDomain();return Tl.get(t,{domain:e})},t.set=function(t,e){var n=this.recognizeRootDomain();return Tl.set(t,e,{domain:n})},t.remove=function(t){var e=this.recognizeRootDomain();return Tl.remove(t,{domain:e})},t}(),xl=function(t,e){void 0===e&&(e={});try{var n=function(){var n=r.requestHeaders();return null!==n&&(e.headers=Object.assign({},n,e.headers)),Promise.resolve(fetch(t,e).catch(function(t){Ur(t),r.setNetworkError({title:Sl.translations.somethingWentWrongMessage,details:t.message})})).then(function(t){var e=function(){if(t){var e=function(){if(401!==t.status)return Promise.resolve(t.clone().text()).then(function(e){switch(t.status){case 403:Qt.error(Sl.translations.forbiddenErrorMessage);break;case 500:Qt.error(/*#__PURE__*/O.default.createElement(O.default.Fragment,null,/*#__PURE__*/O.default.createElement(l.Typography,{mr:e?2:0},Sl.translations.somethingWentWrongMessage),e&&/*#__PURE__*/O.default.createElement(l.Tooltip,{title:e,arrow:!0},/*#__PURE__*/O.default.createElement(B.default,null))))}});r.removeSession(),r.removeCurrentUser(),r.setNotAuthorizedLoginStatus()}();if(e&&e.then)return e.then(function(){})}}();return e&&e.then?e.then(function(){return t}):t})},r=e.sessionStore||Ol,i=function(){if(r.isLoggedIn()&&!e.refresh){var t=r.session,n=t.createdAt,i=t.expiresIn,s=function(){if(n+i<Math.round(+new Date/1e3)){var t=r.refreshTokenPromise?Promise.resolve(r.refreshTokenPromise).then(function(){}):Promise.resolve(r.refresh()).then(function(){});if(t&&t.then)return t.then(function(){})}}();if(s&&s.then)return s.then(function(){})}}();return Promise.resolve(i&&i.then?i.then(n):n())}catch(t){return Promise.reject(t)}},Rl=new(/*#__PURE__*/function(){function t(){this.currentUser=null,o.makeObservable(this,{setCurrentUser:o.action,removeCurrentUser:o.action,currentUser:o.observable.deep,getCurrentUserJS:o.computed})}var e,n,r=t.prototype;return r.setCurrentUser=function(t){this.currentUser=t},r.removeCurrentUser=function(){this.currentUser=null},e=t,(n=[{key:"getCurrentUserJS",get:function(){return o.toJS(this.currentUser)}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,"symbol"==typeof(i=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key))?i:String(i),r)}var i}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}()),Dl=function(){this.user={},this.accessToken=null,this.refreshToken=null,this.tokenType=null,this.createdAt=null,this.expiresIn=null},Il=/*#__PURE__*/function(){function t(){}var e=t.prototype;return e.setAuthConfig=function(t){var e=t.clientId,n=t.redirectUri;this.baseUrl=t.baseUrl,this.clientId=e,this.redirectUri=n},e.authorize=function(t){try{var e,n=this,r=new FormData,i=t.scope,s=t.refresh,a=t.code,o=t.username,c=t.password;return r.append("client_id",n.clientId),i&&r.append("scope",i),s?(r.append("grant_type","refresh_token"),r.append("refresh_token",s),r.append("redirect_uri",n.redirectUri)):a?(r.append("grant_type","authorization_code"),r.append("code",a),r.append("redirect_uri",n.redirectUri)):(r.append("grant_type","password"),r.append("username",o),r.append("password",c)),Promise.resolve(xl(n.baseUrl+"/v2/oauth2/token",{method:"POST",body:r,refresh:!!s}).then(function(t){try{var r,i;return Promise.resolve(function(){if(t){var a=function(t){if(r)return t;function a(){e.accessToken=i.access_token,e.refreshToken=i.refresh_token,e.tokenType=i.token_type,e.createdAt=i.created_at,e.expiresIn=i.expires_in}e=new Dl;var o=function(){if(!s)return Promise.resolve(n.getUserData(i)).then(function(t){e.user=t})}();return o&&o.then?o.then(a):a()},o=function(e,n){try{var s=Promise.resolve(t.json()).then(function(e){i=e,t.ok&&200===t.status||(Qt.error(i.error_description),r=1)})}catch(t){return n()}return s&&s.then?s.then(void 0,n):s}(0,function(){Qt.error(Sl.translations.somethingWentWrongMessage),r=1});return o&&o.then?o.then(a):a(o)}}())}catch(t){return Promise.reject(t)}}).catch(function(t){Qt.error(t.message)})).then(function(){return e})}catch(t){return Promise.reject(t)}},e.getUserData=function(t){try{var e={method:"GET"};return t&&(e.headers={Authorization:t.token_type+" "+t.access_token}),Promise.resolve(xl(this.baseUrl+"/v2/me",e)).then(function(t){var e,n=function(){if(null!=t&&t.ok)return Promise.resolve(t.json()).then(function(t){var n=t.user;return e=1,{id:n.id,companyId:n.company_id,roleId:n.role_id,username:n.username,email:n.email,name:n.name}})}();return n&&n.then?n.then(function(t){return e?t:null}):e?n:null})}catch(t){return Promise.reject(t)}},e.signOut=function(){try{var t=new FormData;return t.append("client_id",this.clientId),Promise.resolve(xl(this.baseUrl+"/v2/oauth2/revoke",{method:"POST",body:t})).then(function(){})}catch(t){return Promise.reject(t)}},t}(),Nl=/*#__PURE__*/function(){function t(){this.loading=!1,this.loginStatus={status:"unknown"},this.refreshTokenPromise=null,this.api=new Il,this.networkError=null,o.makeObservable(this,{loading:o.observable,setLoading:o.action,loginStatus:o.observable.deep,setConnectedLoginStatus:o.action,setNotAuthorizedLoginStatus:o.action})}var e=t.prototype;return e.setLoading=function(t){this.loading=t},e.setConnectedLoginStatus=function(){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}}},e.setNotAuthorizedLoginStatus=function(){this.loginStatus={status:"not_authorized"}},e.setAuthConfig=function(t){this.api.setAuthConfig(t)},e.setNetworkError=function(t){this.networkError=t},e.isLoggedIn=function(){return Boolean(this.session)},e.requestHeaders=function(){var t={"Accept-Language":Sl.locale};if(this.isLoggedIn()){var e=this.session;return ml({},t,{Authorization:e.tokenType+" "+e.accessToken})}return t},e.authorize=function(t,e){void 0===e&&(e=!0);try{var n=this;return n.setLoading(!0),Promise.resolve(n.api.authorize(t)).then(function(t){return n.setLoading(!1),t?(e&&(n.session=t,n.storeSession(),n.setCurrentUser(t.user),n.setConnectedLoginStatus()),t):null})}catch(t){return Promise.reject(t)}},e.refresh=function(){try{var t=this;return t.session&&(t.refreshTokenPromise=t.api.authorize({refresh:t.session.refreshToken}),t.refreshTokenPromise.then(function(e){e?(t.session=ml({},t.session,e,{user:t.session.user}),t.storeSession(),t.setConnectedLoginStatus(),t.refreshTokenPromise=null):(t.removeSession(),t.removeCurrentUser(),t.setNotAuthorizedLoginStatus(),t.refreshTokenPromise=null)})),Promise.resolve(t.refreshTokenPromise)}catch(t){return Promise.reject(t)}},e.recover=function(){try{var t=this;return t.session?Promise.resolve():Promise.resolve(t.restoreSession()).then(function(){var e=function(){if(t.session)return Promise.resolve(t.api.getUserData()).then(function(e){t.setCurrentUser(e),t.setConnectedLoginStatus()});t.setNotAuthorizedLoginStatus()}();if(e&&e.then)return e.then(function(){})})}catch(t){return Promise.reject(t)}},e.logout=function(){try{var t=this,e=function(){if(t.session)return Promise.resolve(t.api.signOut()).then(function(){t.removeSession(),t.removeCurrentUser(),t.setNotAuthorizedLoginStatus()})}();return Promise.resolve(e&&e.then?e.then(function(){}):void 0)}catch(t){return Promise.reject(t)}},e.storeSession=function(){try{var t=this,e={};e["access-token"]=t.session.accessToken,e["refresh-token"]=t.session.refreshToken,e["token-type"]=t.session.tokenType,e["created-at"]=t.session.createdAt,e["expires-in"]=t.session.expiresIn;var n=JSON.stringify(e);return Cl.set("authHeaders",n),Promise.resolve()}catch(t){return Promise.reject(t)}},e.restoreSession=function(){try{var t=this,e=Cl.get("authHeaders");if(!e||"null"===e)return Promise.resolve();var n=JSON.parse(e),r=new Dl;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"],t.session=r,Promise.resolve(t.api.getUserData()).then(function(e){e&&(t.session.user=e)})}catch(t){return Promise.reject(t)}},e.removeSession=function(){Cl.remove("authHeaders"),this.session=null},e.setCurrentUser=function(t){Rl.setCurrentUser(t)},e.removeCurrentUser=function(){Rl.removeCurrentUser()},t}(),Ol=new Nl,Al=function(){var e=t.useState(Ol.loginStatus),n=e[0],r=e[1];return t.useEffect(function(){return o.reaction(function(){return o.toJS(Ol.loginStatus)},function(){r(Ol.loginStatus)})},[]),n},Ul=O.default.createContext({showModal:null,hideModal:null,isOpenedModal:!1}),Bl=function(e){var n=e.children,r=t.useState({}),i=r[0],s=r[1],a=t.useCallback(function(t,e){s(function(e){var n;return ml({},e,((n={})[t]=ml({},e[t],{isOpen:!1}),n))}),e&&e()},[s]),o=t.useCallback(function(t,e,n){s(function(r){var i;return ml({},r,((i={})[t]={isOpen:!0,component:e,data:n},i))})},[s]),c=t.useMemo(function(){return{showModal:o,hideModal:a,isOpenedModal:Object.values(i).some(function(t){return t.isOpen})}},[a,o,i]);/*#__PURE__*/return O.default.createElement(Ul.Provider,{value:c},n,Object.keys(i).map(function(t){var e=i[t],n=e.isOpen;return n&&/*#__PURE__*/O.default.createElement(e.component,ml({onClose:function(){return a(t)},key:t,isOpen:n},e.data))}))},Ml=(kl=0,function(){return""+ ++kl});function Pl(e,n,r){var i=t.useMemo(Ml,[]),s=t.useContext(Ul);return[t.useCallback(function(t){return s.showModal(i,e,t instanceof Event?n:ml({},n,t))},[n,s.showModal]),t.useCallback(function(){return s.hideModal(i,r)},[s.hideModal,r,i])]}Pl.ModalContext=Ul,Pl.ModalProvider=Bl;var Ll={root:{height:"100vh",paddingTop:"70px",mixBlendMode:"color",background:"#1E1E1E"},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);"}},Hl=function(t){/*#__PURE__*/return O.default.createElement(l.Container,{maxWidth:!1,disableGutters:!0,sx:Ll.root},/*#__PURE__*/O.default.createElement(l.Card,{style:{background:"linear-gradient(180deg, #393939 0%, #4A4A4A 100%)",maxWidth:"650px",margin:"200px auto",borderRadius:"20px"}},/*#__PURE__*/O.default.createElement(l.CardContent,{style:{minHeight:"unset"}},/*#__PURE__*/O.default.createElement(l.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",m:"125px 80px"},/*#__PURE__*/O.default.createElement(l.Typography,{variant:"h4",sx:{display:"flex",alignItems:"center",marginBottom:"40px",color:"rgba(255, 255, 255, 0.6)"}},Sl.translations.somethingWentWrongMessage,/*#__PURE__*/O.default.createElement(l.Tooltip,{title:t.error.toString(),arrow:!0},/*#__PURE__*/O.default.createElement(B.default,{sx:{marginLeft:"1em",fontSize:"inherit"}}))),/*#__PURE__*/O.default.createElement(l.Button,{onClick:function(){return window.location.reload()}},Sl.translations.networkErrorButtonText)))),/*#__PURE__*/O.default.createElement(l.Box,{sx:Ll.overlay}))};Hl.propTypes={error:a.PropTypes.any,componentStack:a.PropTypes.any},Hl.defaultProps={};var zl=t.createContext(),Gl=function(t){/*#__PURE__*/return O.default.createElement(zl.Provider,{value:t.config},t.children)},Yl=function(){return t.useContext(zl)},Fl={sessionStore:Ol},$l=t.createContext(Fl),jl=function(t){/*#__PURE__*/return O.default.createElement($l.Provider,{value:Fl},t.children)},Vl=function(){return t.useContext($l)},Zl=new(/*#__PURE__*/function(){function t(){this.appReady=!1,this.sentryReady=!1,o.makeAutoObservable(this)}var e=t.prototype;return e.setAppReady=function(){this.appReady=!0},e.setSentryReady=function(){this.sentryReady=!0},t}()),ql=i.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:"#1E1E1E",primary:{light:"#156bd1",main:"#155ed1",dark:"#1551d1",contrastText:"rgba(255,255,255,0.85)"},secondary:{light:"#656565",main:"#595959",dark:"#4d4d4d",contrastText:"rgba(255,255,255,0.85)"}},typography:{fontFamily:"'Inter', system-ui",fontWeightLight:"400",fontWeightRegular:"500",fontWeightMedium:"600",button:{textTransform:"none"}}}),Wl=i.createTheme(ql,{components:{MuiBackdrop:{styleOverrides:{root:{marginTop:70}}},MuiButton:{defaultProps:{variant:"contained",disableElevation:!0},styleOverrides:{root:{fontWeight:"normal",borderRadius:6}}},MuiLoadingButton:{defaultProps:{variant:"contained",disableElevation:!0},styleOverrides:{root:{fontWeight:"normal",borderRadius:6}}},MuiCardHeader:{styleOverrides:{root:{color:"rgba(255,255,255,0.85)",background:"linear-gradient(180deg, #4A4A4A 0%, #3F3F3F 100%)"},subheader:{marginTop:"0.5em",color:"rgba(255,255,255,0.5)"}}},MuiPaper:{styleOverrides:{rounded:{borderRadius:"20px"}}},MuiCard:{styleOverrides:{root:{borderRadius:"4px",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.25)"}}},MuiCardContent:{styleOverrides:{root:{background:"rgba(45, 45, 45, 1)","&:last-child":{paddingBottom:16}}}},MuiDialogTitle:{styleOverrides:{root:{textAlign:"center",color:"white",background:"linear-gradient(#4a4a4a 0%, #3e3e3e 100%)"}}},MuiDialogContent:{styleOverrides:{root:{minWidth:550,padding:"16px 24px",background:"linear-gradient(180deg, #393939 0%, #4A4A4A 100%)"}}},MuiDialogContentText:{styleOverrides:{root:{textAlign:"center",color:"white"}}},MuiMenu:{styleOverrides:{paper:{background:"#2d2d2d"}}},MuiMenuItem:{styleOverrides:{root:{color:"white"}}},MuiFormControl:{styleOverrides:{root:{alignItems:"center"}}},MuiOutlinedInput:{styleOverrides:{root:{color:"white","&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"rgba(255,255,255,0.35)"}},notchedOutline:{borderColor:"rgba(255,255,255,0.25)"},input:{padding:"13px 16px",background:"transparent",color:"white",borderColor:"white"}}}}}),Kl=function(t){/*#__PURE__*/return O.default.createElement(l.Box,{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100vh"},/*#__PURE__*/O.default.createElement("img",{"data-testid":t["data-testid"],alt:"loader",width:t.width,src:M.default}))},Jl=function(t){var e=t.error;/*#__PURE__*/return O.default.createElement(l.Container,{maxWidth:!1,disableGutters:!0,sx:Ll.root},/*#__PURE__*/O.default.createElement(l.Card,{style:{background:"linear-gradient(180deg, #393939 0%, #4A4A4A 100%)",maxWidth:"600px",margin:"200px auto",borderRadius:"20px"}},/*#__PURE__*/O.default.createElement(l.CardContent,{style:{minHeight:"unset"}},/*#__PURE__*/O.default.createElement(l.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",m:"125px 80px"},/*#__PURE__*/O.default.createElement("h1",{style:{textAlign:"center",color:"rgba(255, 255, 255, 0.6)"}},Sl.translations.networkErrorHeader),/*#__PURE__*/O.default.createElement("p",{style:{display:"inline-flex",textAlign:"center",color:"rgba(255, 255, 255, 0.6)"}},/*#__PURE__*/O.default.createElement(l.Typography,{mr:2},e.title),/*#__PURE__*/O.default.createElement(l.Tooltip,{title:e.details,arrow:!0},/*#__PURE__*/O.default.createElement(B.default,null))),/*#__PURE__*/O.default.createElement(l.Button,{onClick:function(){return window.location.reload()}},Sl.translations.networkErrorButtonText)))),/*#__PURE__*/O.default.createElement(l.Box,{sx:Ll.overlay}))},Xl=function(){var n=new URLSearchParams(e.useLocation().search),r=n.get("next");return t.useEffect(function(){var t=n.get("code");t&&Ol.authorize({code:t})},[n]),Ol.isLoggedIn()?/*#__PURE__*/O.default.createElement(e.Navigate,{to:r}):null};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var Ql=function(t){var e={exports:{}};return function(t,e){var n;t.exports=(n={attachTo:function(t,e){if(void 0!==t.scannerDetectionData)throw new Error("onScan.js is already initialized for DOM element "+t);return e=this._mergeOptions({onScan:function(t,e){},onScanError:function(t){},onKeyProcess:function(t,e){},onKeyDetect:function(t,e){},onPaste:function(t,e){},keyCodeMapper:function(t){return n.decodeKeyEvent(t)},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},e),t.scannerDetectionData={options:e,vars:{firstCharTime:0,lastCharTime:0,accumulatedString:"",testTimer:!1,longPressTimeStart:0,longPressed:!1}},!0===e.reactToPaste&&t.addEventListener("paste",this._handlePaste,e.captureEvents),!1!==e.scanButtonKeyCode&&t.addEventListener("keyup",this._handleKeyUp,e.captureEvents),!0!==e.reactToKeydown&&!1===e.scanButtonKeyCode||t.addEventListener("keydown",this._handleKeyDown,e.captureEvents),this},detachFrom:function(t){t.scannerDetectionData.options.reactToPaste&&t.removeEventListener("paste",this._handlePaste),!1!==t.scannerDetectionData.options.scanButtonKeyCode&&t.removeEventListener("keyup",this._handleKeyUp),t.removeEventListener("keydown",this._handleKeyDown),t.scannerDetectionData=void 0},getOptions:function(t){return t.scannerDetectionData.options},setOptions:function(t,e){switch(t.scannerDetectionData.options.reactToPaste){case!0:!1===e.reactToPaste&&t.removeEventListener("paste",this._handlePaste);break;case!1:!0===e.reactToPaste&&t.addEventListener("paste",this._handlePaste)}return!1===t.scannerDetectionData.options.scanButtonKeyCode?!1!==e.scanButtonKeyCode&&t.addEventListener("keyup",this._handleKeyUp):!1===e.scanButtonKeyCode&&t.removeEventListener("keyup",this._handleKeyUp),t.scannerDetectionData.options=this._mergeOptions(t.scannerDetectionData.options,e),this._reinitialize(t),this},decodeKeyEvent:function(t){var e=this._getNormalizedKeyNum(t);switch(!0){case e>=48&&e<=90:case e>=106&&e<=111:if(void 0!==t.key&&""!==t.key)return t.key;var n=String.fromCharCode(e);switch(t.shiftKey){case!1:n=n.toLowerCase();break;case!0:n=n.toUpperCase()}return n;case e>=96&&e<=105:return e-96+0}return""},simulate:function(t,e){return this._reinitialize(t),Array.isArray(e)?e.forEach(function(t){var e={};"object"!=typeof t&&"function"!=typeof t||null===t?e.keyCode=parseInt(t):e=t;var n=new KeyboardEvent("keydown",e);document.dispatchEvent(n)}):this._validateScanCode(t,e),this},_reinitialize:function(t){var e=t.scannerDetectionData.vars;e.firstCharTime=0,e.lastCharTime=0,e.accumulatedString=""},_isFocusOnIgnoredElement:function(t){var e=t.scannerDetectionData.options.ignoreIfFocusOn;if(!e)return!1;var n=document.activeElement;if(Array.isArray(e)){for(var r=0;r<e.length;r++)if(!0===n.matches(e[r]))return!0}else if(n.matches(e))return!0;return!1},_validateScanCode:function(t,e){var r,i=t.scannerDetectionData,s=i.options,a=i.options.singleScanQty,o=i.vars.firstCharTime,c=i.vars.lastCharTime,l={};switch(!0){case e.length<s.minLength:l={message:"Receieved code is shorter then minimal length"};break;case c-o>e.length*s.avgTimeByChar:l={message:"Receieved code was not entered in time"};break;default:return s.onScan.call(t,e,a),r=new CustomEvent("scan",{detail:{scanCode:e,qty:a}}),t.dispatchEvent(r),n._reinitialize(t),!0}return l.scanCode=e,l.scanDuration=c-o,l.avgTimeByChar=s.avgTimeByChar,l.minLength=s.minLength,s.onScanError.call(t,l),r=new CustomEvent("scanError",{detail:l}),t.dispatchEvent(r),n._reinitialize(t),!1},_mergeOptions:function(t,e){var n,r={};for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},_getNormalizedKeyNum:function(t){return t.which||t.keyCode},_handleKeyDown:function(t){var e=n._getNormalizedKeyNum(t),r=this.scannerDetectionData.options,i=this.scannerDetectionData.vars,s=!1;if(!1!==r.onKeyDetect.call(this,e,t)&&!n._isFocusOnIgnoredElement(this))if(!1===r.scanButtonKeyCode||e!=r.scanButtonKeyCode){switch(!0){case i.firstCharTime&&-1!==r.suffixKeyCodes.indexOf(e):t.preventDefault(),t.stopImmediatePropagation(),s=!0;break;case!i.firstCharTime&&-1!==r.prefixKeyCodes.indexOf(e):t.preventDefault(),t.stopImmediatePropagation(),s=!1;break;default:var a=r.keyCodeMapper.call(this,t);if(null===a)return;i.accumulatedString+=a,r.preventDefault&&t.preventDefault(),r.stopPropagation&&t.stopImmediatePropagation(),s=!1}i.firstCharTime||(i.firstCharTime=Date.now()),i.lastCharTime=Date.now(),i.testTimer&&clearTimeout(i.testTimer),s?(n._validateScanCode(this,i.accumulatedString),i.testTimer=!1):i.testTimer=setTimeout(n._validateScanCode,r.timeBeforeScanTest,this,i.accumulatedString),r.onKeyProcess.call(this,a,t)}else i.longPressed||(i.longPressTimer=setTimeout(r.onScanButtonLongPress,r.scanButtonLongPressTime,this),i.longPressed=!0)},_handlePaste:function(t){var e=this.scannerDetectionData.options,r=this.scannerDetectionData.vars,i=(event.clipboardData||window.clipboardData).getData("text");n._isFocusOnIgnoredElement(this)||(t.preventDefault(),e.stopPropagation&&t.stopImmediatePropagation(),e.onPaste.call(this,i,event),r.firstCharTime=0,r.lastCharTime=0,n._validateScanCode(this,i))},_handleKeyUp:function(t){n._isFocusOnIgnoredElement(this)||n._getNormalizedKeyNum(t)==this.scannerDetectionData.options.scanButtonKeyCode&&(clearTimeout(this.scannerDetectionData.vars.longPressTimer),this.scannerDetectionData.vars.longPressed=!1)},isScanInProgressFor:function(t){return t.scannerDetectionData.vars.firstCharTime>0},isAttachedTo:function(t){return void 0!==t.scannerDetectionData}},n)}(e),e.exports}(),tu=function(n){var r=n.scope,i=n.redirectPath,s=n.onSuccess,a=n.onFailure,o=n.onCancel,c=n.storeSession,u=n.title,d=n["data-testid"],p=t.useState(""),f=p[0],_=p[1],m=t.useState(""),g=m[0],y=m[1],v=e.useNavigate(),b=function(t){try{return Promise.resolve(Ol.authorize(ml({scope:r},t),c)).then(function(t){t?(s&&"function"==typeof s&&s(t),y(""),v(i)):a&&"function"==typeof a&&a()})}catch(t){return Promise.reject(t)}};t.useEffect(function(){return Ql.attachTo(document,{suffixKeyCodes:[13],onScan:function(t){_(""),y(""),b({username:"code",password:t})}}),function(){Ql.detachFrom(document)}},[]);var E=function(t){try{return t.preventDefault(),b({username:f,password:g}),Promise.resolve()}catch(t){return Promise.reject(t)}};/*#__PURE__*/return O.default.createElement("form",{onSubmit:E,"data-testid":d||"ac-sdk-login-form"},/*#__PURE__*/O.default.createElement(l.Box,{m:"0 80px"},/*#__PURE__*/O.default.createElement(l.Box,{display:"flex",alignItems:"center",justifyContent:"center",m:"100px 0"},/*#__PURE__*/O.default.createElement(su,null)),/*#__PURE__*/O.default.createElement(l.Box,{m:"0 0 30px 0",color:"rgba(255, 255, 255, 0.6)"},/*#__PURE__*/O.default.createElement(l.Typography,{align:"center",color:"inherit"},u)),/*#__PURE__*/O.default.createElement(l.Box,{m:"0",display:"grid",sx:{gridGap:"18px"},gridTemplateColumns:"1fr"},/*#__PURE__*/O.default.createElement(l.FormControl,{fullWidth:!0},/*#__PURE__*/O.default.createElement(l.TextField,{autoFocus:!0,fullWidth:!0,variant:"outlined",placeholder:Sl.translations.loginCardUsernameHint,onChange:function(t){_(t.target.value)},value:f,id:"login-input",inputProps:{"data-testid":"ac-sdk-login-form-username-input"}})),/*#__PURE__*/O.default.createElement(l.FormControl,{fullWidth:!0},/*#__PURE__*/O.default.createElement(l.TextField,{fullWidth:!0,variant:"outlined",placeholder:Sl.translations.loginCardPasswordHint,onChange:function(t){y(t.target.value)},value:g,type:"password",id:"password-input",inputProps:{"data-testid":"ac-sdk-login-form-password-input"}})),/*#__PURE__*/O.default.createElement(h.LoadingButton,{id:"login-button",type:"submit",size:"large",color:"primary",onClick:E,loading:Ol.loading,"data-testid":"ac-sdk-login-form-submit-button"},Sl.translations.loginCardSubmitButton),/*#__PURE__*/O.default.createElement(l.Button,{id:"cancel-button",type:"button",size:"large",color:"secondary",onClick:function(t){o&&"function"==typeof o?o():v("/")},"data-testid":"ac-sdk-login-form-cancel-button"},Sl.translations.loginCardCancelButton)),/*#__PURE__*/O.default.createElement(l.Box,{m:"30px 0 40px 0",color:"rgba(255, 255, 255, 0.6)"},/*#__PURE__*/O.default.createElement(l.Typography,{align:"center",color:"inherit"},"or scan")),/*#__PURE__*/O.default.createElement(l.Box,{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",alignItems:"center",justifyItems:"center",marginBottom:"30px"},/*#__PURE__*/O.default.createElement(l.Box,{style:{filter:"brightness(0.5)"}},/*#__PURE__*/O.default.createElement(nu,null)),/*#__PURE__*/O.default.createElement(ru,null),/*#__PURE__*/O.default.createElement(l.Box,{style:{filter:"brightness(0.5)"}},/*#__PURE__*/O.default.createElement(iu,null)))))};tu.propTypes={scope:a.PropTypes.string,redirectPath:a.PropTypes.string,onSuccess:a.PropTypes.func,onFailure:a.PropTypes.func,onCancel:a.PropTypes.func,storeSession:a.PropTypes.bool},tu.defaultProps={redirectPath:"/",storeSession:!0};var eu=s.observer(tu),nu=function(){/*#__PURE__*/return O.default.createElement("svg",{width:"51",height:"53",viewBox:"0 0 51 53",fill:"none",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/O.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__*/O.default.createElement("g",{clipPath:"url(#clip0_2183_35009)"},/*#__PURE__*/O.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__*/O.default.createElement("path",{d:"M19.1081 6.47128H17.4688V8.11102H19.1081V6.47128Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.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__*/O.default.createElement("path",{d:"M35.7147 17.5176H34.0754V23.081H32.4653V21.8366H30.826V23.0591H28.8281V24.6988H35.7147V17.5176Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M19.1081 19.8893H17.4688V21.529H19.1081V19.8893Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.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__*/O.default.createElement("path",{d:"M32.5221 6.47128H30.8828V8.11102H32.5221V6.47128Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M22.3014 13.184H17.5664V14.8237H22.3014V13.184Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M15.9167 13.184H14.2773V14.8237H15.9167V13.184Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M30.041 13.184H23.9375V14.8237H30.041V13.184Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M35.7121 15.8778V13.1766H31.6797V14.8237H34.0728V15.8778H35.7121Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M25.819 6.56622H24.1797V11.3024H25.819V6.56622Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M25.819 3.27948H24.1797V4.91922H25.819V3.27948Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.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__*/O.default.createElement("path",{d:"M29.1874 19.5598H30.8267V18.3373H32.1587V16.7122H27.8555V18.352H29.1874V19.5598Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.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__*/O.default.createElement("path",{d:"M12.6408 1.63985H16.7391V0.00012207H11.0234V5.73188H12.6627L12.6408 1.63985Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M37.3678 26.3603H33.2695V28.0001H39.0071V22.261H37.3678V26.3603Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M12.6408 22.261H11.0234V28.0001H16.761V26.3603H12.6627L12.6408 22.261Z",fill:"white",fillOpacity:"0.35"})),/*#__PURE__*/O.default.createElement("defs",null,/*#__PURE__*/O.default.createElement("clipPath",{id:"clip0_2183_35009"},/*#__PURE__*/O.default.createElement("rect",{width:"28",height:"28",fill:"white",transform:"translate(11 0.00012207)"}))))},ru=function(){/*#__PURE__*/return O.default.createElement("svg",{width:"52",height:"49",viewBox:"0 0 52 49",fill:"none",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/O.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__*/O.default.createElement("g",{clipPath:"url(#clip0_2183_35008)"},/*#__PURE__*/O.default.createElement("path",{d:"M47 9.00012H7V10.0001H47V9.00012Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M43 0.00012207H42V7.00012H43V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M43 12.0001H42V19.0001H43V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M41 12.0001H39V19.0001H41V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M41 0.00012207H39V7.00012H41V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M38 0.00012207H35V7.00012H38V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M38 12.0001H35V19.0001H38V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M33 12.0001H31V19.0001H33V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M33 0.00012207H31V7.00012H33V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M30 0.00012207H28V7.00012H30V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M30 12.0001H28V19.0001H30V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M27 0.00012207H26V7.00012H27V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M27 12.0001H26V19.0001H27V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M25 0.00012207H24V7.00012H25V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M25 12.0001H24V19.0001H25V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M23 0.00012207H20V7.00012H23V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M23 12.0001H20V19.0001H23V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M18 0.00012207H16V7.00012H18V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M18 12.0001H16V19.0001H18V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M15 12.0001H14V19.0001H15V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M15 0.00012207H14V7.00012H15V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M13 0.00012207H10V7.00012H13V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/O.default.createElement("path",{d:"M13 12.0001H10V19.0001H13V12.0001Z",fill:"white",fillOpacity:"0.35"})),/*#__PURE__*/O.default.createElement("defs",null,/*#__PURE__*/O.default.createElement("clipPath",{id:"clip0_2183_35008"},/*#__PURE__*/O.default.createElement("rect",{width:"40",height:"20",fill:"white",transform:"translate(7 0.00012207)"}))))},iu=function(){/*#__PURE__*/return O.default.createElement("svg",{width:"58",height:"49",viewBox:"0 0 58 49",fill:"none",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/O.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__*/O.default.createElement("g",{clipPath:"url(#clip0_2183_35036)"},/*#__PURE__*/O.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__*/O.default.createElement("defs",null,/*#__PURE__*/O.default.createElement("clipPath",{id:"clip0_2183_35036"},/*#__PURE__*/O.default.createElement("rect",{width:"26",height:"20",fill:"white",transform:"translate(16 0.00012207)"}))))},su=function(){/*#__PURE__*/return O.default.createElement("svg",{width:"98",height:"50",viewBox:"0 0 98 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/O.default.createElement("g",{opacity:"0.25"},/*#__PURE__*/O.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__*/O.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__*/O.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__*/O.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__*/O.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__*/O.default.createElement("path",{d:"M30.1227 48.8867H23.1055V31.6463H25.6974V46.342H30.1859L30.1227 48.8867Z",fill:"white"}),/*#__PURE__*/O.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__*/O.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__*/O.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__*/O.default.createElement("path",{d:"M87.2555 1.49487L92.7555 20.0713V1.49487H96.9279V29.1686H92.5027L86.813 11.4193V29.1686H82.6406V1.49487H87.2555Z",fill:"white"})))},au=function(t){var e=t.subtitle,n=t.onCancel;/*#__PURE__*/return O.default.createElement(P.default,{open:t.open,onClose:n,disableEscapeKeyDown:!0,"data-testid":t["data-testid"]||"ac-sdk-login-modal"},/*#__PURE__*/O.default.createElement(L.default,null,/*#__PURE__*/O.default.createElement(eu,{title:void 0!==e?e:Sl.translations.loginCardSubtitle,scope:t.scope,redirectPath:t.redirectPath,onSuccess:t.onSuccess,onFailure:t.onFailure,onCancel:n,storeSession:t.storeSession})))};au.propTypes={title:a.PropTypes.string,subtitle:a.PropTypes.string,scope:a.PropTypes.string,redirectPath:a.PropTypes.string,onSuccess:a.PropTypes.func,onFailure:a.PropTypes.func,onCancel:a.PropTypes.func,storeSession:a.PropTypes.bool},au.defaultProps={redirectPath:"/",storeSession:!1};var ou=s.observer(au),cu=function(e){var n=e.isOpen,r=e.title,i=e.subtitle,s=e.scope,a=e.redirectPath,o=e.onSuccess,c=e.onFailure,l=e.onCancel,u=e.storeSession,d=void 0===u||u,p=t.useState(n),h=p[0],f=p[1];return t.useEffect(function(){f(n)},[n]),/*#__PURE__*/O.default.createElement(ou,{open:h,title:r,subtitle:i,scope:s,redirectPath:a,onSuccess:function(t){o&&"function"==typeof o&&o(t),f(!1)},onFailure:c,onCancel:function(){l&&"function"==typeof l&&l(),f(!1)},storeSession:d})},lu=function(t,e){void 0===e&&(e={});var n=Yl(),r=n.loginUrl,i=n.clientId,s=n.grantType,a=n.redirectUri,o=n.redirectPath,c=Pl(cu,ml({scope:t},e))[0],l=encodeURIComponent(a+"?next="+(e.redirectPath||o));return"password"===s?function(){c({key:(new Date).getTime()})}:function(){window.location.assign(r+"?response_type=code&client_id="+i+"&redirect_uri="+l+"&scope="+t)}},uu=function(n){var r=n.position,i=n.scrolled,s=n.showAcLogo,a=n.leadingText,o=n.title,c=n.titleStyles,l=n.navProps,u=n.userProps,d=n.menuProps,p=n.styles,h=n["data-testid"],f=Yl().baseUrl,_=ml({items:[]},l).items,m=ml({show:!0,showCompanyLogo:!1},u),g=m.show,y=m.showCompanyLogo,v=ml({items:[],buttonColor:"white",dropdownStyles:{},styles:{}},d),b=v.items,E=v.buttonColor,S=v.dropdownStyles,w=v.styles,k=t.useState(new Date),T=k[0],C=k[1],x=t.useState(null),R=x[0],D=x[1],I=function(t){var e=t.titleStyles,n=t.menuStyles,r=t.menuDropdownStyles;return{root:ml({padding:"10px 0",color:"rgba(255,255,255,0.85)",background:"transparent"},t.styles),title:ml({flexGrow:1},e),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:"rgba(79, 79, 79, 1)",boxShadow:"0px 2px 5px rgba(0, 0, 0, 0.28)",borderRadius:"4px","&:hover":{backgroundColor:"rgba(79, 79, 79, 1)",filter:"brightness(1.1)"}},loginButton:{padding:"6px 18px"},logoutButton:{paddingRight:"18px"},menu:ml({marginTop:"70px",backgroundColor:"rgba(0,0,0,0.5)"},n,{"& .MuiPaper-root":ml({minWidth:"20%",backgroundColor:"#2d2d2d",color:"white"},r)})}}({styles:p,titleStyles:c,menuStyles:w,menuDropdownStyles:S}),N=e.useNavigate();t.useEffect(function(){var t=setInterval(function(){C(new Date)},1e3);return function(){return clearInterval(t)}});var A,U,B=function(){D(null)},M=function(t){t.url?N(t.url):t.action&&"function"==typeof t.action&&t.action(),B()};/*#__PURE__*/return O.default.createElement(j.default,{position:r,elevation:0,sx:ml({},I.root,"static"===r?{marginTop:"-70px"}:{},i?{background:"#1E1E1E"}:{}),"data-testid":h||"ac-sdk-header"},/*#__PURE__*/O.default.createElement(K.default,{variant:"dense"},s&&/*#__PURE__*/O.default.createElement(e.Link,{to:"/"},/*#__PURE__*/O.default.createElement("img",{src:X.default,alt:"AndonCloud",style:{display:"block",marginLeft:"-4px"}})),a&&/*#__PURE__*/O.default.createElement(J.default,{variant:"subtitle1"},a),/*#__PURE__*/O.default.createElement(J.default,{variant:"subtitle1",align:"center",style:{flexGrow:1},sx:I.title},o),_&&/*#__PURE__*/O.default.createElement(H.default,{display:"flex",sx:I.nav},_.map(function(t){/*#__PURE__*/return O.default.createElement(V.default,{key:t.label,onClick:function(){return M(t)},endIcon:t.icon,sx:I.button},t.label)})),g&&/*#__PURE__*/O.default.createElement(H.default,{display:"flex",sx:I.user},Rl.getCurrentUserJS?/*#__PURE__*/O.default.createElement(V.default,{id:"logout-button",onClick:function(){try{return Promise.resolve(Ol.logout()).then(function(){N("/")})}catch(t){return Promise.reject(t)}},sx:ml({},I.button,I.logoutButton),"data-testid":"ac-sdk-header-logout-button"},Sl.translations.headerLogoutButton,y&&(U=function(){var t="",e=Rl.getCurrentUserJS;return null===e?t:f+"/"+(t=e.company.logo_url)}(),/*#__PURE__*/O.default.createElement("img",{src:U,alt:""})),/*#__PURE__*/O.default.createElement(H.default,{display:"inline-block",sx:I.userInfo},(A=Rl.currentUser)&&"("+A.name+")")):/*#__PURE__*/O.default.createElement(V.default,{id:"login-button",onClick:function(){return N("/login")},sx:ml({},I.button,I.loginButton),"data-testid":"ac-sdk-header-login-button"},Sl.translations.headerLoginButton)),/*#__PURE__*/O.default.createElement(F.default,null),/*#__PURE__*/O.default.createElement(J.default,{variant:"body1",align:"center",style:{width:"5rem",padding:"0 5px"}},T.toLocaleTimeString()),b&&/*#__PURE__*/O.default.createElement(H.default,null,/*#__PURE__*/O.default.createElement(Z.default,{onClick:function(t){D(t.currentTarget)}},/*#__PURE__*/O.default.createElement($.default,{style:E?{color:E}:{}})),/*#__PURE__*/O.default.createElement(q.default,{id:"menu-appbar",marginThreshold:0,anchorEl:R,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(R),onClose:B,sx:I.menu},b.map(function(t){/*#__PURE__*/return O.default.createElement(W.default,{key:t.label,onClick:function(){return M(t)}},t.label)})))))};uu.propTypes={position:a.PropTypes.string,scrolled:a.PropTypes.bool,showAcLogo:a.PropTypes.bool,leadingText:a.PropTypes.string,title:a.PropTypes.string,titleStyles:a.PropTypes.any,navProps:a.PropTypes.shape({items:a.PropTypes.any}),userProps:a.PropTypes.shape({show:a.PropTypes.bool,showCompanyLogo:a.PropTypes.bool}),menuProps:a.PropTypes.shape({items:a.PropTypes.any,buttonColor:a.PropTypes.string,dropdownStyles:a.PropTypes.any,styles:a.PropTypes.any}),styles:a.PropTypes.any},uu.defaultProps={navProps:{},userProps:{},menuProps:{},styles:{}};var du=s.observer(uu),pu=function(e){var n=e.children,r=e.headerProps,i=e.styles,s=e["data-testid"],a=t.useState(),o=a[1],c=l.useScrollTrigger({disableHysteresis:!0,target:a[0],threshold:0});/*#__PURE__*/return O.default.createElement(Y.default,{ref:function(t){t&&o(t)},maxWidth:!1,disableGutters:!0,sx:ml({},Ll.root,i),"data-testid":s||"ac-sdk-container"},/*#__PURE__*/O.default.createElement(du,ml({scrolled:c,showAcLogo:!0},r)),n,/*#__PURE__*/O.default.createElement(l.Box,{sx:Ll.overlay}))};pu.propTypes={children:a.PropTypes.any,headerProps:a.PropTypes.shape({position:a.PropTypes.string,showAcLogo:a.PropTypes.bool,leadingText:a.PropTypes.string.isRequired,title:a.PropTypes.string,navProps:a.PropTypes.shape({items:a.PropTypes.any}),userProps:a.PropTypes.shape({show:a.PropTypes.bool,showCompanyLogo:a.PropTypes.bool}),menuProps:a.PropTypes.shape({items:a.PropTypes.any,buttonColor:a.PropTypes.string,dropdownStyles:a.PropTypes.any,styles:a.PropTypes.any}),styles:a.PropTypes.any}),styles:a.PropTypes.any},pu.defaultProps={headerProps:{}};var hu=function(t){/*#__PURE__*/return O.default.createElement(pu,{headerProps:{position:"static",leadingText:"AndonCloud Software",userProps:{show:!1},menuProps:{items:[{label:Sl.translations.changeLanguageText,action:function(){Sl.setLocale("pl"===Sl.locale?"en":"pl")}}],buttonColor:"white"}}},/*#__PURE__*/O.default.createElement(H.default,{display:"flex",height:"100%",alignItems:"center",justifyContent:"center"},/*#__PURE__*/O.default.createElement(z.default,{sx:{borderRadius:"20px"}},/*#__PURE__*/O.default.createElement(G.default,null,/*#__PURE__*/O.default.createElement(eu,{title:Sl.translations.loginFormText,redirectPath:t.redirectPath})))))};hu.propTypes={redirectPath:a.PropTypes.string},hu.defaultProps={redirectPath:"/"};var fu=s.observer(hu),_u=function(){var t=Yl(),n=t.grantType,r=t.redirectPath,i=lu("read write"),s=e.useNavigate();return"password"===n?/*#__PURE__*/O.default.createElement(fu,{redirectPath:r}):(s("/"),i(),null)},mu=function(t){if(!(ol&&cl&&ll&&ul&&dl&&pl))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`reactRouterV6Instrumentation was unable to wrap Routes because of one or more missing parameters.\n useEffect: ${ol}. useLocation: ${cl}. useNavigationType: ${ll}.\n createRoutesFromChildren: ${ul}. matchRoutes: ${dl}. customStartTransaction: ${pl}.`),t;let e=!0;const n=n=>{const r=cl(),i=ll();return ol(()=>{const t=ul(n.children);e?(function(t,e,n){const r=Array.isArray(n)?n:dl(e,t);al&&r&&al.setName(..._l(e,t,r))}(r,t),e=!1):function(t,e,n,r){const i=Array.isArray(r)?r:dl(e,t);if(hl&&("PUSH"===n||"POP"===n)&&i){al&&al.finish();const[n,r]=_l(e,t,i);al=pl({name:n,op:"navigation",tags:fl,metadata:{source:r}})}}(r,t,i)},[r,i]),N.createElement(t,{...n,__self:this,__source:{fileName:"/home/runner/work/sentry-javascript/sentry-javascript/packages/react/src/reactrouterv6.tsx",lineNumber:197}})};return el(n,t),n}(e.Routes),gu=function(t){/*#__PURE__*/return O.default.createElement(e.BrowserRouter,null,/*#__PURE__*/O.default.createElement(mu,null,t.children,/*#__PURE__*/O.default.createElement(e.Route,{exact:!0,path:"/login",element:/*#__PURE__*/O.default.createElement(_u,null)}),/*#__PURE__*/O.default.createElement(e.Route,{path:"/oauth2/redirect",element:/*#__PURE__*/O.default.createElement(Xl,null)})))},yu=s.observer(function(n){var r=n.children,s=n.baseUrl,a=n.authProps,o=n.sentryProps,c=n.muiTheme,l=Al().status,u=ml({enabled:!0,redirectPath:"/"},a),d=u.enabled;return Ol.setAuthConfig({baseUrl:s,clientId:u.clientId,redirectUri:u.redirectUri}),t.useEffect(function(){var n,r,i,s,a,c;!Zl.sentryReady&&o&&((n=ml({tracesSampleRate:1,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1,integrations:[new gl.BrowserTracing({routingInstrumentation:(r=t.useEffect,i=e.useLocation,s=e.useNavigationType,a=e.createRoutesFromChildren,c=e.matchRoutes,(t,e=!0,n=!0)=>{const o=ei&&ei.location&&ei.location.pathname;e&&o&&(al=t({name:o,op:"pageload",tags:fl,metadata:{source:"url"}})),ol=r,cl=i,ll=s,dl=c,ul=a,pl=t,hl=n})}),new ic]},o))._metadata=n._metadata||{},n._metadata.sdk=n._metadata.sdk||{name:"sentry.javascript.react",packages:[{name:"npm:@sentry/react",version:Wr}],version:Wr},function(t={}){void 0===t.defaultIntegrations&&(t.defaultIntegrations=Ji),void 0===t.release&&("string"==typeof __SENTRY_RELEASE__&&(t.release=__SENTRY_RELEASE__),ei.SENTRY_RELEASE&&ei.SENTRY_RELEASE.id&&(t.release=ei.SENTRY_RELEASE.id)),void 0===t.autoSessionTracking&&(t.autoSessionTracking=!0),void 0===t.sendClientReports&&(t.sendClientReports=!0);const e={...t,stackParser:(n=t.stackParser||Di,Array.isArray(n)?$e(...n):n),integrations:Lr(t),transport:t.transport||(qe()?bi:Ei)};var n;!function(t,e){!0===e.debug&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?ke.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));const n=fr();n.getScope().update(e.initialScope);const r=new t(e);n.bindClient(r)}(yi,e),t.autoSessionTracking&&function(){if(void 0===ei.document)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("Session tracking in non-browser environment with @sentry/browser is not supported."));const t=fr();t.captureSession&&(Qi(t),en("history",({from:t,to:e})=>{void 0!==t&&t!==e&&Qi(fr())}))}()}(n),Zl.setSentryReady())},[o]),t.useEffect(function(){d?function(){try{var t=function(){if(d)return Promise.resolve(Ol.recover()).then(function(){})}();return Promise.resolve(t&&t.then?t.then(function(){}):void 0)}catch(t){return Promise.reject(t)}}():Zl.setAppReady()},[d]),t.useEffect(function(){d&&"unknown"!==l&&Zl.setAppReady()},[d,l]),/*#__PURE__*/O.default.createElement(i.ThemeProvider,{theme:i.createTheme(c)},/*#__PURE__*/O.default.createElement(A.default,null),/*#__PURE__*/O.default.createElement(U.default,{styles:{"::-webkit-scrollbar":{width:"6px"},"::-webkit-scrollbar-track":{backgroundColor:"transparent"},"::-webkit-scrollbar-thumb":{borderRadius:"3px",backgroundColor:"rgba(255, 255, 255, 0.25)"}}}),/*#__PURE__*/O.default.createElement(sl,{fallback:function(t){/*#__PURE__*/return O.default.createElement(Hl,t)}},/*#__PURE__*/O.default.createElement(Xt,null),/*#__PURE__*/O.default.createElement(Gl,{config:ml({baseUrl:s},a)},/*#__PURE__*/O.default.createElement(jl,null,Ol.networkError?/*#__PURE__*/O.default.createElement(Jl,{error:Ol.networkError}):Zl.appReady?/*#__PURE__*/O.default.createElement(gu,null,/*#__PURE__*/O.default.createElement(e.Route,{path:"*",element:/*#__PURE__*/O.default.createElement(Bl,null,r)})):/*#__PURE__*/O.default.createElement(Kl,{"data-testid":"ac-sdk-app-loading",width:"500px"})))))});yu.propTypes={children:a.PropTypes.any.isRequired,baseUrl:a.PropTypes.string.isRequired,authProps:a.PropTypes.shape({enabled:a.PropTypes.bool,loginUrl:a.PropTypes.string,redirectUri:a.PropTypes.string,redirectPath:a.PropTypes.string,clientId:a.PropTypes.string.isRequired,grantType:a.PropTypes.string}),sentryProps:a.PropTypes.any,muiTheme:a.PropTypes.any},yu.defaultProps={authProps:{},sentryProps:{},muiTheme:Wl};var vu=function(t,e){const n=t.displayName||t.name||"unknown",r=e=>N.createElement(rl,{name:n,updateProps:e,__self:this,__source:{fileName:nl,lineNumber:146}},N.createElement(t,{...e,__self:this,__source:{fileName:nl,lineNumber:147}}));return r.displayName=`profiler(${n})`,el(r,t),r}(yu),bu=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 Eu(t,e,n,r){navigator.serviceWorker.register(t).then(function(t){var i=null;r&&setInterval(function(){fetch("/manifest.json").then(function(e){try{return Promise.resolve(e.json()).then(function(e){var r=e.version;n!==r&&(i=r,t.update())})}catch(t){return Promise.reject(t)}}).catch(function(){})},3e4),t.onupdatefound=function(){var n=t.installing;null!=n&&(n.onstatechange=function(){"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."),e&&e.onUpdate&&(r?e.onUpdate(t,i):e.onUpdate(t))):(console.log("Content is cached for offline use."),e&&e.onSuccess&&e.onSuccess(t)))})}}).catch(function(t){console.error("Error during service worker registration:",t)})}exports.App=vu,exports.Container=pu,exports.captureException=Ur,exports.fetch=xl,exports.getLocale=function(){return Sl.locale},exports.logout=function(){return Ol.logout()},exports.notify=Qt,exports.registerServiceWorker=function(t){var e=t.version;!function(t){var e=t.publicUrl,n=t.mode,r=t.autoUpdate,i=t.version,s=t.registrationConfig;if(globalThis.version=i,"production"===n&&"serviceWorker"in navigator){if(new URL(e,window.location.href).origin!==window.location.origin)return;window.addEventListener("load",function(){var t=e+"/service-worker.js";bu?(function(t,e){fetch(t,{headers:{"Service-Worker":"script"}}).then(function(n){var r=n.headers.get("content-type");404===n.status||null!=r&&-1===r.indexOf("javascript")?navigator.serviceWorker.ready.then(function(t){t.unregister().then(function(){window.location.reload()})}):Eu(t,e)}).catch(function(){console.log("No internet connection found. App is running in offline mode.")})}(t,s),navigator.serviceWorker.ready.then(function(){console.log("This web app is being served cache-first by a service worker. To learn more, visit https://cra.link/PWA")})):Eu(t,s,i,r)})}}(ml({},t,{registrationConfig:ml({},(null==t?void 0:t.registrationConfig)||{},{onUpdate:function(n,r){var i,s;n&&n.waiting&&n.waiting.postMessage({type:"SKIP_WAITING"}),r&&e!==r&&(Qt(Sl.translations.newVersionAvailable,{duration:5e3,position:"bottom-left",style:{color:"rgba(255,255,255,0.85)",background:"#3F3F3F",border:"1px solid #FFE72F"}}),setTimeout(function(){window.location.reload()},5e3)),null!=(i=t.registrationConfig)&&i.onUpdate&&(null==(s=t.registrationConfig)||s.onUpdate(n))}})}))},exports.setLocale=function(t){return Sl.setLocale(t)},exports.useFetch=function(){var t=Vl().sessionStore;return function(e,n){return void 0===n&&(n={}),xl(e,ml({sessionStore:t},n))}},exports.useLogin=lu,exports.useLoginStatus=Al,exports.useStore=Vl;
172
172
  //# sourceMappingURL=andoncloud-sdk.js.map