try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="fb698d27-9aba-4f5b-b280-c98f11328246",e._sentryDebugIdIdentifier="sentry-dbid-fb698d27-9aba-4f5b-b280-c98f11328246")}catch(e){}("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:{}).SENTRY_RELEASE={id:"c6e90b75029143378cf96f31f3bee729c9327ca4"};(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[3439],{3203:(e,t,a)=>{a.d(t,{A:()=>d});var n=a(96540),l=a(3319),o=a(74848);const r=e=>t=>{let{callback:a,feature:r,isStart:i,isSuccess:d,isFailure:s,eventReason:c,payload:u={},...f}=t;const{sendLog:h,isReady:g}=(0,l.A)(),b=(0,n.useCallback)((e=>{const t=f[a],n={feature:r,isStart:i,isSuccess:d,isFailure:s,eventReason:c,...u,...f["data-ga"]?{dataGa:f["data-ga"]}:{},...f.dataGa?{dataGa:f.dataGa}:{},...f["data-track"]?{dataTrack:f["data-track"]}:{},...f.label?{label:f.label}:{}};"function"===typeof t&&t(e),h(n,!0)}),[a,h,g,u,f]),p=(0,n.useMemo)((()=>({...f,[a]:b})),[f,a,b]);return(0,o.jsx)(e,{...p})};var i=a(81691);const d=e=>t=>{let{payload:a={},...n}=t;const l=r(e);return(0,o.jsx)(l,{...n,callback:"onClick",payload:{...a,action:i.o1.buttonClicked}})}},33439:(e,t,a)=>{a.r(t),a.d(t,{Trust:()=>g,default:()=>b});a(98992),a(72577);var n=a(96540),l=a(86663),o=a(99275),r=a(72060),i=a(26363),d=a(55093),s=a(3203),c=a(3319),u=a(60908),f=a(74848);const h=(0,s.A)(o.Button),g=()=>{const[e,t]=(0,n.useMemo)((()=>{const{search:e}=window.location,{redirect_uri:t,agent_uri:a}=l.parse(e);return[(0,r.A)(t),a]})),[a,s]=(0,n.useState)(),[g,b,p]=(0,i.LC)(),[y,m]=(0,i.Yr)({},[g]),{sendLog:x,isReady:w}=(0,c.A)();return(0,n.useEffect)((()=>{let a=!0,n=null;const l=y.find((e=>e.url===t));return l?x({feature:"TrustUrl",description:"Redirect due to trusted url"}).finally((()=>{location.replace(`/api/v1/auth/account/origins/${l.id}/redirect?redirect_uri=${encodeURIComponent(e)}&agent_uri=${encodeURIComponent(t)}`)})):n=setTimeout((()=>{a&&s(!0)}),1e3),()=>{a=!1,n&&(clearTimeout(n),n=null)}}),[e,t,y,w]),a?(0,f.jsx)(u.Ay,{feature:"TrustUrl",children:(0,f.jsx)(o.Layer,{full:!0,children:(0,f.jsxs)(o.Flex,{"data-testid":"trust",alignItems:"center",justifyContent:"center",column:!0,width:"100%",height:"100%",background:"mainBackground",gap:4,children:[(0,f.jsx)(d.m,{animate:p}),(0,f.jsxs)(o.Text,{textAlign:"center",children:["Do you trust ",(0,f.jsx)(o.Text,{strong:!0,children:t}),"?"]}),(0,f.jsxs)(o.Flex,{column:!0,gap:2,alignItems:"center",children:[(0,f.jsx)(o.TextBig,{children:"Authorizing this URL will allow it to request your Netdata data."}),(0,f.jsxs)(o.Flex,{gap:2,children:[(0,f.jsx)(h,{flavour:"borderless",onClick:()=>window.location.replace(decodeURIComponent(e)),disabled:m||p,"data-ga":"url-authorization::click-cancel-button",feature:"TrustUrl",payload:{label:"Cancel"},children:"Cancel"}),(0,f.jsx)(h,{onClick:()=>b(t),disabled:m||p,isLoading:m||p,"data-ga":"url-authorization::click-yes-button",feature:"TrustUrl",payload:{label:"Yes"},children:"Yes"})]})]})]})})}):(0,f.jsx)(d.A,{})},b=g},55093:(e,t,a)=>{a.d(t,{A:()=>s,m:()=>d});a(96540);var n=a(33185),l=a(99275),o=a(74848);const r=(0,n.keyframes)(["from{opacity:0.4;}to{opacity:1;}"]),i=(0,n.default)(l.Icon).withConfig({displayName:"loader__StyledIcon",componentId:"sc-a76ek6-0"})(["width:",";height:",";animation:",";"],(e=>e.width),(e=>e.height),(e=>{let{animate:t}=e;return t?(0,n.css)([""," 1.6s ease-in infinite"],r):""})),d=e=>{let{title:t="Loading",width:a="208px",height:n="177px",...l}=e;return(0,o.jsx)(i,{name:"netdata",color:"primary",title:t,"data-testid":"loading-logo",width:a,height:n,...l})},s=e=>{let{title:t,body:a,iconProps:n,animate:r=!0,testId:i="",...s}=e;return(0,o.jsxs)(l.Flex,{column:!0,height:"100vh",background:"mainBackground",width:"100%",justifyContent:"center",alignItems:"center","data-testid":`loader-container-${i}`,...s,children:[(0,o.jsx)(d,{...n,animate:r}),t&&(0,o.jsx)(l.H3,{color:"text",margin:[1,0,0],children:t}),a&&(0,o.jsx)(l.Text,{color:"text",margin:[4.5,0,0],children:a})]})}},72060:(t,a,n)=>{n.d(a,{A:()=>l});const l=t=>{try{if(!t)return null;const e=document.createElement("a");return e.href=t,/https?/.test(e.protocol)?new URL(e.protocol+"//"+e.host+e.pathname+e.search+e.hash).toString():null}catch(e){return null}}}}]);