Loading
function(e,t,s){s.d(t,{A:()=>b});var i=s(627968),a=s(64700),l=s(503698),n=s.n(l),r=s(284009),c=s.n(r),d=s(17928),o=s(534514),h=s(150934),u=s(192308),p=s(834730),A=s(293066),m=s(975571),v=s(428262),x=s(652215),L=s(375708),f=s(470330);class S extends a.Component{state={hasAcceptedEULA:!this.props.forceShow&&this.props.hasPreviouslyAcceptedEULA,hasAcceptedWithdrawalWaiver:!1};componentDidMount(){this.props.onChange(this.hasAcceptedNeccessaryTerms(this.props,this.state))}componentDidUpdate(e,t){let s=this.hasAcceptedNeccessaryTerms(e,t),i=this.hasAcceptedNeccessaryTerms(this.props,this.state);i!==s&&this.props.onChange(i)}hasAcceptedNeccessaryTerms(e,t){return(null==e.eulaId||t.hasAcceptedEULA)&&(!e.showWithdrawalWaiver||t.hasAcceptedWithdrawalWaiver)}render(){let{eulaId:e,applicationName:t,hasPreviouslyAcceptedEULA:a,forceShow:l,disabled:r,className:d,finePrint:p,showPricingLink:A,showWithdrawalWaiver:v,isTrial:S,isDiscount:b,subscriptionPlan:g,finePrintClassname:C}=this.props,{hasAcceptedEULA:T,hasAcceptedWithdrawalWaiver:U}=this.state;return(c()(!S||null!=g,"subscriptionPlan cannot be null if shouldShowTrialOrDiscountLayout is true"),l||null!=e&&!a||v)?(0,i.jsxs)("div",{className:d,children:[v&&(0,i.jsx)(o.D,{variant:"heading-md/semibold",className:f.Hc,children:L.intl.string(L.t.Ogvn5o)}),null!=e&&(l||!a)?(0,i.jsx)(h.S,{checked:T,onChange:e=>this.setState({hasAcceptedEULA:e}),disabled:r,label:L.intl.format(L.t.IodJKT,{applicationName:t,onClick:t=>{(0,u.openModalLazy)(async()=>{let{default:t}=await Promise.all([s.e("82333"),s.e("25508"),s.e("86364"),s.e("76821"),s.e("71568"),s.e("64615"),s.e("92064"),s.e("87297")]).then(s.bind(s,294264));return s=>(0,i.jsx)(t,{eulaId:e,...s})}),t.preventDefault()}})}):null,null==p?null:(0,i.jsx)("div",{className:n()(f.aO,C),children:p}),v?(0,i.jsxs)("div",{className:d,children:[(0,i.jsx)(h.S,{checked:U,onChange:e=>this.setState({hasAcceptedWithdrawalWaiver:e}),disabled:r,label:L.intl.string(L.t["DFCVN+"])}),(0,i.jsx)("div",{className:f.aO,children:L.intl.string(L.t.jhu6zm)})]}):null,A&&(0,i.jsxs)("div",{className:f.aO,children:["*",L.intl.format(L.t["5zmY3F"],{documentationLink:m.A.getArticleURL(x.MVz.LOCALIZED_PRICING)})]}),(0,i.jsx)(E,{isTrial:S,subscriptionPlan:g,isDiscount:b})]}):null}}function E(e){let{isTrial:t,subscriptionPlan:s,isDiscount:a}=e;return(0,i.jsxs)(i.Fragment,{children:[t&&null!=s&&(0,i.jsx)(p.E,{variant:"text-xs/medium",color:"interactive-text-default",children:L.intl.format(L.t["Hvo/Z5"],{buttonText:(0,v.ff)(null,s),interval:v.Ay.formatInterval(s?.interval),cancelSubscriptionArticle:m.A.getArticleURL(x.MVz.PREMIUM_DETAILS_CANCEL_SUB),paidServiceTermsArticle:m.A.getArticleURL(x.MVz.PAID_TERMS)})}),a&&null!=s&&(0,i.jsx)(p.E,{variant:"text-xs/medium",color:"interactive-text-default",children:L.intl.format(L.t["Z2c+aV"],{buttonText:(0,v.ff)(null,s),interval:v.Ay.formatInterval(s?.interval),cancelSubscriptionArticle:m.A.getArticleURL(x.MVz.PREMIUM_DETAILS_CANCEL_SUB),paidServiceTermsArticle:m.A.getArticleURL(x.MVz.PAID_TERMS)})})]})}let b=d.Ay.connectStores([A.A],e=>{let{eulaId:t}=e;return{hasPreviouslyAcceptedEULA:null!=t&&A.A.hasAcceptedEULA(t)}})(S)}