!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6eb9d5f8-2836-412d-9afe-8250a729f8cc",e._sentryDebugIdIdentifier="sentry-dbid-6eb9d5f8-2836-412d-9afe-8250a729f8cc")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"4c4e0af8211f6cc5779d35dea21bc1aab0b3690c"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[6147],{46147:(e,t,l)=>{l.r(t),l.d(t,{default:()=>_});var n=l(58168),a=l(96540),o=l(8573),r=l(22292),i=l(33644),d=l(34641),s=l(66732);const c=e=>{let{daysRemaining:t,onOptOutClick:l,isFailure:n}=e;return a.createElement(o.Flex,{column:!0,gap:4,width:{max:120},padding:[0,0,4,0]},n?a.createElement(a.Fragment,null,a.createElement(o.TextBigger,null,"Enrolment to 14-day free Business trial failed."),a.createElement(o.TextBigger,{lineHeight:1.5},"Something unexpected happened when trying to enrol you to the free Business trial.")):a.createElement(a.Fragment,null,a.createElement(o.TextBigger,{lineHeight:1.5},"We are happy to upgrade your account to Netdata Business, for free, for"," ",a.createElement(o.TextBigger,{strong:!0},t," days"),"."),a.createElement(o.TextBigger,null,"Enjoy the best of Netdata!"),"function"===typeof l&&a.createElement(s.A,{onOptOutClick:l})))};var u=l(87659),m=l(92155),f=l(63314),g=l(47731),p=l(25624),y=l(35454),E=l(50503),b=l(19673),h=l(23490);const w=(0,m.A)(o.Button),_=(0,a.memo)((()=>{const{trialWelcomeVisible:e,daysRemaining:t}=(0,p.A)(),l=(0,g.J)(),s=(0,r.uW)("email"),[m,,,_]=(0,u.A)(!0),[C,,x]=(0,u.A)(),{isFailure:A,reset:B}=(0,E.A)(),[T,,k,I]=(0,u.A)(),{refreshPlan:M}=(0,p.A)(),[,F]=(0,h.ng)("trialModalDismissed"),P=(0,b.i5)(),v=(0,a.useCallback)((()=>{k(),P({email:s}).then((()=>{setTimeout((()=>{M(),B(),I()}),2e3)})).catch((()=>{I()}))}),[s]),R=(0,a.useMemo)((()=>A?{feature:"CloseTrialEnrolmentErrorModal",label:"Close",flavour:"hollow"}:{feature:"TrialAccept",label:"OK",textTransform:"uppercase",flavour:"hollow",icon:"thumb_up"}),[A]);return e?C?a.createElement(d.A,{onDecline:x,onCancellingEnd:()=>{localStorage.setItem(y.$B,!0),x(),_()}}):m?a.createElement(o.Modal,{backdropProps:{backdropBlur:!0}},a.createElement(f.Ay,{feature:"TrialWelcome"},a.createElement(i.P,{isMobile:l},a.createElement(o.ModalHeader,null,a.createElement(o.Flex,{gap:2,alignItems:"center"},a.createElement(o.Icon,{name:"netdataPress",color:"text"}),a.createElement(o.H4,null,"Welcome to Netdata!"))),a.createElement(o.ModalBody,null,a.createElement(c,{daysRemaining:t,isFailure:A})),a.createElement(o.ModalFooter,null,a.createElement(o.Flex,{gap:4,justifyContent:"end",padding:[1,2]},A&&a.createElement(w,{feature:"RetryTrialEnrolment",label:"Retry",onClick:v,disabled:T,isLoading:T}),a.createElement(w,(0,n.A)({onClick:()=>{_(),B(),localStorage.setItem(y.$B,!0),!A&&window.posthog?.setPersonProperties&&window.posthog?.setPersonProperties({netdata_cloud_trial_modal_seen:!0}),F(!0)},disabled:T},R))))))):null:null}))},33644:(e,t,l)=>{l.d(t,{K:()=>o,P:()=>r});var n=l(8711),a=l(8573);const o=n.default.ul.withConfig({displayName:"styled__StyledList",componentId:"sc-z791f1-0"})(["list-style:disc outside none;margin-left:16px;"]),r=(0,n.default)(a.ModalContent).attrs((e=>{let{isMobile:t}=e;return{width:t?{base:"95vw"}:{}}})).withConfig({displayName:"styled__TrialWelcomeModalContent",componentId:"sc-z791f1-1"})([""])}}]);