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]="43878ce4-fab8-4c78-a85c-7c20f49c0452",e._sentryDebugIdIdentifier="sentry-dbid-43878ce4-fab8-4c78-a85c-7c20f49c0452")}catch(e){}("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:{}).SENTRY_RELEASE={id:"b0610930f891423c3567547ad7119d4cfa1f1e68"};(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[4484],{14484:(e,t,l)=>{l.r(t),l.d(t,{default:()=>T});var n=l(58168),a=l(96540),o=l(10302),r=l(46587),i=l(43891),d=l(71282),s=l(42711);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(6304),f=l(3203),m=l(60908),g=l(10444),p=l(10853),y=l(68399),E=l(53142),b=l(18739),h=l(24285);const w=(0,f.A)(o.Button),T=(0,a.memo)((()=>{const{trialWelcomeVisible:e,daysRemaining:t}=(0,p.A)(),l=(0,g.J)(),s=(0,r.uW)("email"),[f,,,T]=(0,u.A)(!0),[_,,C]=(0,u.A)(),{isFailure:x,reset:A}=(0,E.A)(),[B,,k,I]=(0,u.A)(),{refreshPlan:M}=(0,p.A)(),[,F]=(0,h.ng)("trialModalDismissed"),P=(0,b.i5)(),R=(0,a.useCallback)((()=>{k(),P({email:s}).then((()=>{setTimeout((()=>{M(),A(),I()}),2e3)})).catch((()=>{I()}))}),[s]),v=(0,a.useMemo)((()=>x?{feature:"CloseTrialEnrolmentErrorModal",label:"Close",flavour:"hollow"}:{feature:"TrialAccept",label:"OK",textTransform:"uppercase",flavour:"hollow",icon:"thumb_up"}),[x]);return e?_?a.createElement(d.A,{onDecline:C,onCancellingEnd:()=>{localStorage.setItem(y.$B,!0),C(),T()}}):f?a.createElement(o.Modal,{backdropProps:{backdropBlur:!0}},a.createElement(m.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:x})),a.createElement(o.ModalFooter,null,a.createElement(o.Flex,{gap:4,justifyContent:"end",padding:[1,2]},x&&a.createElement(w,{feature:"RetryTrialEnrolment",label:"Retry",onClick:R,disabled:B,isLoading:B}),a.createElement(w,(0,n.A)({onClick:()=>{T(),A(),localStorage.setItem(y.$B,!0),!x&&window.posthog?.setPersonProperties&&window.posthog?.setPersonProperties({netdata_cloud_trial_modal_seen:!0}),F(!0)},disabled:B},v))))))):null:null}))},43891:(e,t,l)=>{l.d(t,{K:()=>o,P:()=>r});var n=l(33185),a=l(10302);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"})([""])}}]);