Viewing File: /usr/local/cpanel/whostmgr/docroot/templates/initial-setup-wizard/293.45c60720ed83764b.min.js

"use strict";(self.webpackChunkinitial_setup_wizard=self.webpackChunkinitial_setup_wizard||[]).push([[293],{8293:(Y,u,i)=>{i.r(u),i.d(u,{AnalyticsConsentModule:()=>S});var h=i(6895),p=i(5579),o=i(433),d=i(5419),v=i(269),g=i(2777),y=i(7945),f=i(7579),c=i(2722),r=i(9646),P=i(5577),M=i(4004),t=i(1571),m=i(4642),x=i(7709);let O=(()=>{class e{constructor(n){this.whmapi=n}postAnalyticsConsent(n,a=!1){const l=new m.r(m.N.JsonApi,{method:"personalization_set",arguments:[new x.h("personalization",{analytics:a?"on":"off",personhood:n})],config:{json:!0}});return this.whmapi.post(l)}}return e.ɵfac=function(n){return new(n||e)(t.LFG(d.A4))},e.ɵprov=t.Yz7({token:e,factory:e.ɵfac,providedIn:"root"}),e})();var A=i(2155),C=i(8674);function T(e,s){if(1&e&&(t.TgZ(0,"div",11),t._UZ(1,"i",12),t._uU(2),t.qZA()),2&e){const n=t.oxw();t.xp6(2),t.hij(" ",n.locale.maketext("You must choose an account type to continue.")," ")}}const b=[{path:"",component:(()=>{class e{constructor(n,a,l,w,F,L,Z,J){this.router=n,this.locale=a,this.window=l,this.page=w,this._analyticsBuilder=F,this.analyticsConsentService=L,this.utilService=Z,this.el=J,this.continueLabel="",this.canContinue=!0,this.loading=!1,this.accountTypes=[{name:this.locale.maketext("This account is for an individual."),value:"individual"},{name:this.locale.maketext("This account is for a business."),value:"business"}],this.selectedItem=null,this.stop$=new f.x,this.buttonState=y.BN}ngOnInit(){this.analyticsForm=this._analyticsBuilder.group({accountTypesControl:[this.getAccountType(this.page?.analytics_info?.personhood),[o.kI.required]],analyticsCheckControl:[this.getAnalyticsConsent(this.page?.analytics_info?.analytics)]}),this.analyticsForm.valueChanges.pipe((0,c.R)(this.stop$)).subscribe((()=>{this.canContinue=this.analyticsForm.valid})),this.nextBtnLabel().pipe((0,c.R)(this.stop$)).subscribe((n=>{this.continueLabel=n}))}getAccountType(n){return n?this.accountTypes.find((a=>a.value.toLowerCase()===n.toLowerCase())):this.accountTypes[0]}getAnalyticsConsent(n){return"on"===n}triggerConsentSavedEvent(n){const a=new CustomEvent("consentPrivacySaved",{bubbles:!0,detail:{analytics:n}});this.el.nativeElement.dispatchEvent(a)}next(){this.analyticsConsentService.postAnalyticsConsent(this.analyticsForm.controls.accountTypesControl.value?.value,this.analyticsForm.controls.analyticsCheckControl.value).pipe((0,c.R)(this.stop$)).subscribe((n=>{this.triggerConsentSavedEvent(n.data?.personalization?.analytics?.value),this.page.has_completed_analytics=!0,this.router.navigate(["trial-activation"])}))}nextBtnLabel(){const n=(this.page.has_completed_initial_setup||!!this.page.is_dnsonly)&&this.page.has_accepted_legal_agreements;return(0,r.of)(this.page.is_eligible_for_trial).pipe((0,P.z)((a=>null==a?this.utilService.isEligibeForTrialActivation(a).pipe((0,M.U)((l=>l||!n?"Next":"Finish"))):(0,r.of)(!1===a&&n?"Finish":"Next"))))}cancel(){this.exit()}exit(){this.window.location.href=g.Ho}ngOnDestroy(){this.stop$.next(),this.stop$.complete()}}return e.ɵfac=function(n){return new(n||e)(t.Y36(p.F0),t.Y36(v.g),t.Y36(Window),t.Y36(g.qX),t.Y36(o.QS),t.Y36(O),t.Y36(A.f),t.Y36(t.SBq))},e.ɵcmp=t.Xpm({type:e,selectors:[["isw-analytics-consent"]],decls:14,vars:7,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,"mb-2"],[1,"col-12","mb-5"],["name","personHoodSelect","placeholder","Select account type","formControlName","accountTypesControl","bindLabel","name",3,"items"],["class","invalid-feedback d-flex",4,"ngIf"],[1,"d-flex","flex-row"],["type","checkbox","formControlName","analyticsCheckControl","name","analyticsCheck","id","analyticsCheck",1,"mx-5"],[1,"invalid-feedback","d-flex"],["aria-hidden","true",1,"ri-error-warning-line"]],template:function(n,a){1&n&&(t.TgZ(0,"div",0)(1,"div",1)(2,"form",2)(3,"h5",3),t._uU(4),t.qZA(),t._UZ(5,"p",4),t.TgZ(6,"p",5),t._uU(7),t.qZA(),t.TgZ(8,"div",6),t._UZ(9,"ng-select",7),t.YNc(10,T,3,1,"div",8),t.qZA(),t.TgZ(11,"div",9),t._UZ(12,"input",10)(13,"div",4),t.qZA()()()()),2&n&&(t.xp6(2),t.Q6J("formGroup",a.analyticsForm),t.xp6(2),t.Oqu(a.locale.maketext("Consent and Privacy[comment,title]")),t.xp6(1),t.Q6J("innerHTML",a.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.oJD),t.xp6(2),t.hij(" ",a.locale.maketext("Select which account type best describes how you will use this product.")," "),t.xp6(2),t.Q6J("items",a.accountTypes),t.xp6(1),t.Q6J("ngIf",a.analyticsForm.controls.accountTypesControl.invalid),t.xp6(3),t.Q6J("innerHTML",a.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.oJD))},dependencies:[h.O5,o._Y,o.Wl,o.JJ,o.JL,o.sg,o.u,C.w9],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}"]}),e})()}];let S=(()=>{class e{}return e.ɵfac=function(n){return new(n||e)},e.ɵmod=t.oAB({type:e}),e.ɵinj=t.cJS({providers:[d.A4],imports:[h.ez,o.UX,p.Bz.forChild(b),C.A0,y.hJ,o.u5]}),e})()}}]);
Back to Directory File Manager