!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"6c5c4a21a2e48a657cc46560f5c18b469ebbf32c"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="4b2c1e0b-b08a-40b5-9da9-f3335ca0c95b",e._sentryDebugIdIdentifier="sentry-dbid-4b2c1e0b-b08a-40b5-9da9-f3335ca0c95b")}catch(e){}}(),(globalThis.webpackChunkcloud_frontend=globalThis.webpackChunkcloud_frontend||[]).push([[4484],{14484(e,t,l){l.r(t),l.d(t,{default:()=>w});var n=l(96540),i=l(32977),a=l(46587),o=l(43891),r=l(71282),s=l(42711),d=l(74848);const c=e=>{let{daysRemaining:t,onOptOutClick:l,isFailure:n}=e;return(0,d.jsx)(i.Flex,{column:!0,gap:4,width:{max:120},padding:[0,0,4,0],children:n?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.TextBigger,{children:"Enrolment to 14-day free Business trial failed."}),(0,d.jsx)(i.TextBigger,{lineHeight:1.5,children:"Something unexpected happened when trying to enrol you to the free Business trial."})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(i.TextBigger,{lineHeight:1.5,strong:!0,children:["Your ",t,"-day trial has started, giving you access to all premium features and 10 free Netdata AI credits to help you troubleshoot faster."]}),(0,d.jsxs)(i.TextBigger,{lineHeight:1.5,children:["At the end of your trial, you can choose to upgrade to a paid plan, alternatively your space will automatically switch to the"," ",(0,d.jsx)(i.TextBigger,{lineHeight:1.5,strong:!0,children:"Free Community plan."})]}),(0,d.jsx)(i.TextBigger,{lineHeight:1.5,children:"Happy monitoring!"}),"function"===typeof l&&(0,d.jsx)(s.A,{onOptOutClick:l})]})})};var u=l(6304),g=l(94404),h=l(60908),f=l(10444),p=l(10853),b=l(68399),m=l(53142),x=l(18739),y=l(24285);const j=(0,g.A)(i.Button),w=(0,n.memo)(()=>{const{trialWelcomeVisible:e,daysRemaining:t}=(0,p.A)(),l=(0,f.J)(),s=(0,a.uW)("email"),[g,,,w]=(0,u.A)(!0),[T,,C]=(0,u.A)(),{isFailure:_,reset:A}=(0,m.A)(),[B,,k,I]=(0,u.A)(),{refreshPlan:M}=(0,p.A)(),[,v]=(0,y.ng)("trialModalDismissed"),E=(0,x.i5)(),F=(0,n.useCallback)(()=>{k(),E({email:s}).then(()=>{setTimeout(()=>{M(),A(),I()},2e3)}).catch(()=>{I()})},[s]),P=(0,n.useMemo)(()=>_?{feature:"CloseTrialEnrolmentErrorModal",label:"Close",flavour:"hollow"}:{feature:"TrialAccept",label:"OK",textTransform:"uppercase",flavour:"hollow",icon:"thumb_up"},[_]);return e?T?(0,d.jsx)(r.A,{onDecline:C,onCancellingEnd:()=>{localStorage.setItem(b.$B,!0),C(),w()}}):g?(0,d.jsx)(i.Modal,{backdropProps:{backdropBlur:!0},children:(0,d.jsx)(h.Ay,{feature:"TrialWelcome",children:(0,d.jsxs)(o.P,{isMobile:l,children:[(0,d.jsx)(i.ModalHeader,{children:(0,d.jsxs)(i.Flex,{gap:2,alignItems:"center",children:[(0,d.jsx)(i.Icon,{name:"netdataPress",color:"text"}),(0,d.jsx)(i.H4,{children:"Welcome to Netdata!"})]})}),(0,d.jsx)(i.ModalBody,{children:(0,d.jsx)(c,{daysRemaining:t,isFailure:_})}),(0,d.jsx)(i.ModalFooter,{children:(0,d.jsxs)(i.Flex,{gap:4,justifyContent:"end",padding:[1,2],children:[_&&(0,d.jsx)(j,{feature:"RetryTrialEnrolment",label:"Retry",onClick:F,disabled:B,isLoading:B}),(0,d.jsx)(j,{onClick:()=>{w(),A(),localStorage.setItem(b.$B,!0),!_&&window.posthog?.setPersonProperties&&window.posthog?.setPersonProperties({netdata_cloud_trial_modal_seen:!0}),v(!0)},disabled:B,...P})]})})]})})}):null:null})},43891(e,t,l){l.d(t,{K:()=>a,P:()=>o});var n=l(882),i=l(32977);const a=n.default.ul.withConfig({displayName:"styled__StyledList",componentId:"sc-z791f1-0"})(["list-style:disc outside none;margin-left:16px;"]),o=(0,n.default)(i.ModalContent).attrs(e=>{let{isMobile:t}=e;return{width:t?{base:"95vw"}:{}}}).withConfig({displayName:"styled__TrialWelcomeModalContent",componentId:"sc-z791f1-1"})([""])}}]);