"use strict";(self.webpackChunkinitial_setup_wizard=self.webpackChunkinitial_setup_wizard||[]).push([[990],{3990:(F,r,e)=>{e.r(r),e.d(r,{AnalyticsConsentModule:()=>L});var m=e(177),l=e(7901),o=e(4341),c=e(4355),y=e(6381),h=e(8280),g=e(5737),C=e(1413),p=e(6977),u=e(7673),t=e(3953),d=e(949),f=e(6802);let v=(()=>{class i{constructor(n){this.whmapi=n}postAnalyticsConsent(n=!1){const a=new d.m(d.R.JsonApi,{method:"personalization_set",arguments:[new f.e("personalization",{analytics:n?"on":"off"})],config:{json:!0}});return this.whmapi.post(a)}static#t=this.\u0275fac=function(a){return new(a||i)(t.KVO(c.gB))};static#n=this.\u0275prov=t.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var P=e(3100);let M=(()=>{class i{constructor(n,a,s,b,k,S,w,A){this.router=n,this.locale=a,this.window=s,this.page=b,this._analyticsBuilder=k,this.analyticsConsentService=S,this.utilService=w,this.el=A,this.continueLabel="",this.canContinue=!0,this.loading=!1,this.stop$=new C.B,this.buttonState=g.w}ngOnInit(){this.analyticsForm=this._analyticsBuilder.group({analyticsCheckControl:[this.getAnalyticsConsent(this.page?.analytics_info?.analytics)]}),this.nextBtnLabel().pipe((0,p.Q)(this.stop$)).subscribe(n=>{this.continueLabel=n})}getAnalyticsConsent(n){return"on"===n}triggerConsentSavedEvent(n=!1){const a=new CustomEvent("consentPrivacySaved",{bubbles:!0,detail:{analytics:n}});this.el.nativeElement.dispatchEvent(a)}next(){this.analyticsConsentService.postAnalyticsConsent(this.analyticsForm.controls.analyticsCheckControl.value).pipe((0,p.Q)(this.stop$)).subscribe(n=>{"on"==n.data?.personalization?.analytics?.value?this.triggerConsentSavedEvent(!0):this.triggerConsentSavedEvent(),this.page.has_completed_analytics=!0,this.router.navigate(["server-setup"])})}nextBtnLabel(){return(0,u.of)((this.page.has_completed_initial_setup||this.page.is_dnsonly)&&this.page.has_accepted_legal_agreements?"Finish":"Next")}cancel(){this.exit()}exit(){this.window.location.href=h.GH}ngOnDestroy(){this.stop$.next(),this.stop$.complete()}static#t=this.\u0275fac=function(a){return new(a||i)(t.rXU(l.Ix),t.rXU(y.h),t.rXU(Window),t.rXU(h.KL),t.rXU(o.ze),t.rXU(v),t.rXU(P.a),t.rXU(t.aKT))};static#n=this.\u0275cmp=t.VBU({type:i,selectors:[["isw-analytics-consent"]],decls:9,vars:4,consts:[[1,"initial-setup-content-container","inner-container","container-align"],[1,"form-group","mb-5","col-12"],["id","analyticsForm","name","analyticsForm",3,"formGroup"],[1,"fw-bold"],[3,"innerHTML"],[1,"form-check"],["type","checkbox","formControlName","analyticsCheckControl","name","analyticsCheck","id","analyticsCheck",1,"form-check-input"],["for","analyticsCheck",1,"form-check-label",3,"innerHTML"]],template:function(a,s){1&a&&(t.j41(0,"div",0)(1,"div",1)(2,"form",2)(3,"h5",3),t.EFF(4),t.k0s(),t.nrm(5,"p",4),t.j41(6,"div",5),t.nrm(7,"input",6)(8,"label",7),t.k0s()()()()),2&a&&(t.R7$(2),t.Y8G("formGroup",s.analyticsForm),t.R7$(2),t.SpI(" ",s.locale.maketext("Consent and Privacy[comment,title]")," "),t.R7$(),t.Y8G("innerHTML",s.locale.maketext("WebPros International, LLC d.b.a cPanel is asking for your consent to participate in user activity tracking using third-party software for the purpose of understanding the performance of Webpros products. Information will be used pursuant to the [output,url,_1,cPanel and WHM Privacy Policy,title,cPanel and WHM Privacy Policy,data-testid,_2,target,_3,class,_4] and may be shared internally within the Webpros group. You can update your preferences at any time from the analytics slideout.","https://go.cpanel.net/privacy","privacy-policy","privacy-policy","external-link float-none"),t.npT),t.R7$(3),t.Y8G("innerHTML",s.locale.maketext("By checking this box, you agree that we may collect your usage statistics. [output,url,_1,Learn more here.,title,cPanel Analytics Documentation,class,_2,target,_3,id,_4,data-testid,_5]","https://go.cpanel.net/analytics","external-link float-none","analytics","learnLink","learnAnalyticsLink"),t.npT))},dependencies:[o.qT,o.Zm,o.BC,o.cb,o.j4,o.JD],styles:[".container-align[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:clamp(40%,400px,100%)}html[dir=ltr][_ngcontent-%COMP%] .container-align[_ngcontent-%COMP%], [dir=ltr][_ngcontent-%COMP%] .container-align[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .container-align[_ngcontent-%COMP%], html[dir=ltr][_nghost-%COMP%] .container-align[_ngcontent-%COMP%], html[dir=ltr] [_nghost-%COMP%] .container-align[_ngcontent-%COMP%], [dir=ltr][_nghost-%COMP%] .container-align[_ngcontent-%COMP%], [dir=ltr] [_nghost-%COMP%] .container-align[_ngcontent-%COMP%]{text-align:left}html[dir=rtl][_ngcontent-%COMP%] .container-align[_ngcontent-%COMP%], [dir=rtl][_ngcontent-%COMP%] .container-align[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .container-align[_ngcontent-%COMP%], html[dir=rtl][_nghost-%COMP%] .container-align[_ngcontent-%COMP%], html[dir=rtl] [_nghost-%COMP%] .container-align[_ngcontent-%COMP%], [dir=rtl][_nghost-%COMP%] .container-align[_ngcontent-%COMP%], [dir=rtl] [_nghost-%COMP%] .container-align[_ngcontent-%COMP%]{text-align:right}"]})}return i})();var O=e(3934);const x=[{path:"",component:M}];let L=(()=>{class i{static#t=this.\u0275fac=function(a){return new(a||i)};static#n=this.\u0275mod=t.$C({type:i});static#e=this.\u0275inj=t.G2t({providers:[c.gB],imports:[m.MD,o.X1,l.iI.forChild(x),O.MQ,g.tm,o.YN]})}return i})()}}]);