!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"d1c7ac46f068d62cb709fcb0a5f45d31b06ca6ae"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f7bec544-fbaa-4c89-8cb1-4214a08b8090",e._sentryDebugIdIdentifier="sentry-dbid-f7bec544-fbaa-4c89-8cb1-4214a08b8090")}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),a=l(56327),i=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)(a.Flex,{column:!0,gap:4,width:{max:120},padding:[0,0,4,0],children:n?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(a.TextBigger,{children:"Enrolment to 14-day free Business trial failed."}),(0,d.jsx)(a.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)(a.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)(a.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)(a.TextBigger,{lineHeight:1.5,strong:!0,children:"Free Community plan."})]}),(0,d.jsx)(a.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),m=l(68399),b=l(53142),x=l(18739),y=l(24285);const j=(0,g.A)(a.Button),w=(0,n.memo)(()=>{const{trialWelcomeVisible:e,daysRemaining:t}=(0,p.A)(),l=(0,f.J)(),s=(0,i.uW)("email"),[g,,,w]=(0,u.A)(!0),[T,,C]=(0,u.A)(),{isFailure:_,reset:A}=(0,b.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(m.$B,!0),C(),w()}}):g?(0,d.jsx)(a.Modal,{backdropProps:{backdropBlur:!0},children:(0,d.jsx)(h.Ay,{feature:"TrialWelcome",children:(0,d.jsxs)(o.P,{isMobile:l,children:[(0,d.jsx)(a.ModalHeader,{children:(0,d.jsxs)(a.Flex,{gap:2,alignItems:"center",children:[(0,d.jsx)(a.Icon,{name:"netdataPress",color:"text"}),(0,d.jsx)(a.H4,{children:"Welcome to Netdata!"})]})}),(0,d.jsx)(a.ModalBody,{children:(0,d.jsx)(c,{daysRemaining:t,isFailure:_})}),(0,d.jsx)(a.ModalFooter,{children:(0,d.jsxs)(a.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(m.$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:()=>i,P:()=>o});var n=l(882),a=l(56327);const i=n.default.ul.withConfig({displayName:"styled__StyledList",componentId:"sc-z791f1-0"})(["list-style:disc outside none;margin-left:16px;"]),o=(0,n.default)(a.ModalContent).attrs(e=>{let{isMobile:t}=e;return{width:t?{base:"95vw"}:{}}}).withConfig({displayName:"styled__TrialWelcomeModalContent",componentId:"sc-z791f1-1"})([""])}}]);