File: //opt/netdata/usr/local/local/share/netdata/web/v3/4484.3ff637789cdb32d89555.chunk.js
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"3c253701267e9b7af50090f7cc5ae44ccccdde3d"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="dd156701-0da7-4333-9b99-7a84b8fd7b53",e._sentryDebugIdIdentifier="sentry-dbid-dd156701-0da7-4333-9b99-7a84b8fd7b53")}catch(e){}}(),(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[4484],{14484(e,t,n){n.r(t),n.d(t,{default:()=>P});var r=n(64467),l=(n(98992),n(54520),n(3949),n(62953),n(96540)),o=n(42358),i=n(46587),a=n(43891),s=n(71282),d=n(42711),c=n(74848);const u=e=>{let{daysRemaining:t,onOptOutClick:n,isFailure:r}=e;return(0,c.jsx)(o.Flex,{column:!0,gap:4,width:{max:120},padding:[0,0,4,0],children:r?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(o.TextBigger,{children:"Enrolment to 14-day free Business trial failed."}),(0,c.jsx)(o.TextBigger,{lineHeight:1.5,children:"Something unexpected happened when trying to enrol you to the free Business trial."})]}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(o.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,c.jsxs)(o.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,c.jsx)(o.TextBigger,{lineHeight:1.5,strong:!0,children:"Free Community plan."})]}),(0,c.jsx)(o.TextBigger,{lineHeight:1.5,children:"Happy monitoring!"}),"function"===typeof n&&(0,c.jsx)(d.A,{onOptOutClick:n})]})})};var g=n(6304),f=n(94404),p=n(60908),h=n(10444),y=n(10853),b=n(68399),m=n(53142),x=n(18739),j=n(24285);function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){(0,r.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const v=(0,f.A)(o.Button),P=(0,l.memo)((()=>{const{trialWelcomeVisible:e,daysRemaining:t}=(0,y.A)(),n=(0,h.J)(),r=(0,i.uW)("email"),[d,,,f]=(0,g.A)(!0),[w,,P]=(0,g.A)(),{isFailure:C,reset:T}=(0,m.A)(),[_,,A,k]=(0,g.A)(),{refreshPlan:B}=(0,y.A)(),[,E]=(0,j.ng)("trialModalDismissed"),I=(0,x.i5)(),M=(0,l.useCallback)((()=>{A(),I({email:r}).then((()=>{setTimeout((()=>{B(),T(),k()}),2e3)})).catch((()=>{k()}))}),[r]),D=(0,l.useMemo)((()=>C?{feature:"CloseTrialEnrolmentErrorModal",label:"Close",flavour:"hollow"}:{feature:"TrialAccept",label:"OK",textTransform:"uppercase",flavour:"hollow",icon:"thumb_up"}),[C]);return e?w?(0,c.jsx)(s.A,{onDecline:P,onCancellingEnd:()=>{localStorage.setItem(b.$B,!0),P(),f()}}):d?(0,c.jsx)(o.Modal,{backdropProps:{backdropBlur:!0},children:(0,c.jsx)(p.Ay,{feature:"TrialWelcome",children:(0,c.jsxs)(a.P,{isMobile:n,children:[(0,c.jsx)(o.ModalHeader,{children:(0,c.jsxs)(o.Flex,{gap:2,alignItems:"center",children:[(0,c.jsx)(o.Icon,{name:"netdataPress",color:"text"}),(0,c.jsx)(o.H4,{children:"Welcome to Netdata!"})]})}),(0,c.jsx)(o.ModalBody,{children:(0,c.jsx)(u,{daysRemaining:t,isFailure:C})}),(0,c.jsx)(o.ModalFooter,{children:(0,c.jsxs)(o.Flex,{gap:4,justifyContent:"end",padding:[1,2],children:[C&&(0,c.jsx)(v,{feature:"RetryTrialEnrolment",label:"Retry",onClick:M,disabled:_,isLoading:_}),(0,c.jsx)(v,O({onClick:()=>{var e,t;(f(),T(),localStorage.setItem(b.$B,!0),!C&&null!==(e=window.posthog)&&void 0!==e&&e.setPersonProperties)&&(null===(t=window.posthog)||void 0===t||t.setPersonProperties({netdata_cloud_trial_modal_seen:!0}));E(!0)},disabled:_},D))]})})]})})}):null:null}))},43891(e,t,n){n.d(t,{K:()=>o,P:()=>i});var r=n(51510),l=n(42358);const o=r.default.ul.withConfig({displayName:"styled__StyledList",componentId:"sc-z791f1-0"})(["list-style:disc outside none;margin-left:16px;"]),i=(0,r.default)(l.ModalContent).attrs((e=>{let{isMobile:t}=e;return{width:t?{base:"95vw"}:{}}})).withConfig({displayName:"styled__TrialWelcomeModalContent",componentId:"sc-z791f1-1"})([""])}}]);