"use strict";(self.webpackChunktransfer_cpanel_account=self.webpackChunktransfer_cpanel_account||[]).push([[792],{2251:(F,S,d)=>{var w=d(345),e=d(9953),m=d(2166),a=d(177),T=d(611),N=d(8658),l=d(6805),C=d(4355),A=d(6381),j=d(2584);const U=window&&window.PAGE?window.PAGE.base:"",k=(!(!window||!window.PAGE)&&window,window&&window.PAGE?window.PAGE.cp_security_token:""),L=!(!window||!window.PAGE)&&"0"!==window.PAGE.dedicated_ip_available,D=window&&window.PAGE?window.PAGE.pending_sessions:[],M=window&&window.PAGE?window.PAGE.transfer_states:[],I=!(!window||!window.PAGE)&&(0,j.G)(window.PAGE.does_license_disable_form),E=window&&window.PAGE?0===window.PAGE.license_disable_form_level?"partial":"full":"";var f=d(7410),c=function(s){return s.fromLocalFile="transferFromLocalFile",s.fromUpload="transferFromUploadFile",s.fromRemote="transferFromRemoteAccount",s}(c||{}),v=function(s){return s.none="NONE",s.attemptAccount="ATTEMPT_ACCOUNT",s}(v||{}),u=function(s){return s.all="all",s.cpanelOnly="basic",s}(u||{}),R=d(6354),Y=d(6802),$=d(949);let y=(()=>{class s{constructor(t,r,o){this._whmApiClient=t,this._http=r,this._location=o,this._securityToken=k}createLocalRestoreSession(t){const r=this._apiCall("start_local_cpmove_restore",{cpmovepath:t.cpMovePath,overwrite:t.overwrite?"1":"0",dedicated_ip:t.dedicatedIP?"1":"0",restricted:t.restrictedRestore?"1":"0",update_a_records:t.updateARecords,mail_location:t.mailNode});return this._whmApiClient.post(r).pipe((0,R.T)((o=>{if(1===o.status)return o.data.transfer_session_id;throw o.messages.pop()})))}createRemoteTransferSession(t){const r=this._apiCall("create_remote_user_transfer_session",{host:t.hostname,password:t.password,unrestricted_restore:t.restrictedRestore?0:1});return this._whmApiClient.post(r).pipe((0,R.T)((o=>{if(1===o.status)return o.data.transfer_session_id;throw o.messages.pop()})))}createUploadRestoreSession(t){const o=this._location.prepareExternalUrl(`${this._securityToken}/scripts5/upload_and_restore_cpmove`);return this._http.post(o,t,{responseType:"text"})}enqueueTransfer(t,r){const o=this._apiCall("enqueue_transfer_item",{module:"AccountRemoteUser",transfer_session_id:r,ip:t.dedicatedIP?1:0,user:t.username,localuser:t.username,skipres:1,mail_location:t.mailNode});return this._whmApiClient.post(o).pipe((0,R.T)((n=>{if(1===n.status)return!0;throw n.messages.pop()})))}getArchiveFiles(){const t=this._apiCall("list_cparchive_files");return this._whmApiClient.post(t).pipe((0,R.T)((r=>r.data.sort(((o,n)=>o.user<n.user?-1:o.user>n.user?1:0)))))}getLinkedMailNodes(){const t=this._apiCall("list_linked_server_nodes");return this._whmApiClient.post(t).pipe((0,R.T)((r=>(r.data=r.data.filter((o=>o.worker_capabilities.Mail||"Mail"===o.worker_capabilities)),r.data))))}_apiCall(t,r){const o=r?Object.keys(r).map((n=>new Y.e(n,r[n]))):[];return new $.m($.R.JsonApi,{method:t,arguments:o})}static#e=this.ɵfac=function(r){return new(r||s)(e.KVO(C.gB),e.KVO(T.Qq),e.KVO(a.aZ))};static#t=this.ɵprov=e.jDH({token:s,factory:s.ɵfac,providedIn:"root"})}return s})();const H=s=>{const i=[new RegExp("(?:.*)(?:.tar.gz)$"),new RegExp("(?:.*)(?:.tar)$"),new RegExp("^(?:cpmove-)(?:.*)")],t=new RegExp("^(?:C:\\\\fakepath\\\\cpmove-)(?:.*)");return r=>{const o=r.value.file?r.value.file:r.value,n=i.slice();return r.value.file||n.push(t),n.every((p=>!p.test(o)))?{cpmoveFileValidator:{value:o,message:s}}:null}},V=[[["","form-group-label",""]],[["","form-group-control",""]]],B=["[form-group-label]","[form-group-control]"];let X=(()=>{class s{constructor(){}hasErrors(){return this.control.invalid}hasChanged(){return this.control.dirty||this.control.touched}hasValidators(){return!!this.control.validator||!!this.control.asyncValidator}getFieldErrors(){return Object.keys(this.control.errors).map((t=>({key:t,message:this.control.errors[t].message})))}getFieldStateClasses(){return this.hasValidators()&&this.hasChanged()?this.hasErrors()?"has-error":"has-success":""}ngOnInit(){this.id=`formGroup_${this.for}`,this.labelID=`${this.id}_formLabel`,this.validationContainerID=`${this.id}_validationContainer`}static#e=this.ɵfac=function(r){return new(r||s)};static#t=this.ɵcmp=e.VBU({type:s,selectors:[["app-whm-transfer-cp-acct-form-grp"]],inputs:{for:"for",label:"label",control:"control",showAllHelp:"showAllHelp"},ngContentSelectors:B,decls:11,vars:8,consts:[[1,"form-group",3,"ngClass"],[1,"row"],[1,"col-xs-12"],[3,"id","for","labelText","showInfoBlock"],[3,"id","control"]],template:function(r,o){1&r&&(e.NAR(V),e.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"cp-form-label",3),e.SdG(4),e.k0s()()(),e.j41(5,"div",1)(6,"div",2),e.SdG(7,1),e.k0s()(),e.j41(8,"div",1)(9,"div",2),e.nrm(10,"cp-validation-container",4),e.k0s()()()),2&r&&(e.Y8G("ngClass",o.getFieldStateClasses()),e.BMQ("id",o.id),e.R7$(3),e.Y8G("id",o.labelID)("for",o.for)("labelText",o.label)("showInfoBlock",o.showAllHelp),e.R7$(7),e.Y8G("id",o.validationContainerID)("control",o.control))},dependencies:[a.YU,l.Wp,l.kl],encapsulation:2})}return s})();const z=["uploadedFile"],q=s=>({"margin-left":s}),J=s=>({"margin-top":s});function Q(s,i){1&s&&e.nrm(0,"cp-loading-spinner",3)}function Z(s,i){if(1&s){const t=e.RV6();e.j41(0,"label",38)(1,"input",39),e.bIt("click",(function(){e.eBV(t);const o=e.XpG().$implicit,n=e.XpG(2);return e.Njj(n.patchTransferOption(o.type))})),e.k0s(),e.j41(2,"span"),e.EFF(3),e.k0s()()}if(2&s){const t=e.XpG().$implicit;e.Mz_("for","transferOption_",t.id,""),e.R7$(),e.Mz_("id","transferOption_",t.id,""),e.Y8G("value",t.type),e.R7$(2),e.JRh(t.label)}}function W(s,i){if(1&s&&(e.qex(0),e.DNE(1,Z,4,6,"label",36),e.j41(2,"span",37),e.EFF(3),e.k0s(),e.bVm()),2&s){const t=i.$implicit;e.R7$(),e.Y8G("ngIf",!t.optionHidden),e.R7$(2),e.JRh(t.description)}}function K(s,i){if(1&s&&(e.j41(0,"span",49),e.EFF(1),e.k0s()),2&s){const t=e.XpG(3);e.R7$(),e.SpI(" ",t.performSearchIconLabel," ")}}function ee(s,i){if(1&s&&(e.j41(0,"span",49),e.EFF(1),e.k0s()),2&s){const t=e.XpG(3);e.R7$(),e.SpI(" ",t.clearSearchIconLabel," ")}}function te(s,i){if(1&s&&(e.qex(0),e.j41(1,"option",50),e.EFF(2),e.k0s(),e.bVm()),2&s){const t=i.$implicit,r=e.XpG(3);e.R7$(),e.FS9("value",t.file),e.R7$(),e.LHq(" ",r.locale.maketext("User"),": ",t.user," ",r.locale.maketext("File"),": ",t.file," ")}}function se(s,i){if(1&s){const t=e.RV6();e.j41(0,"section",40)(1,"app-whm-transfer-cp-acct-form-grp",41)(2,"div",22),e.EFF(3),e.k0s(),e.j41(4,"div",23)(5,"div",42)(6,"input",43),e.bIt("keyup.esc",(function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.clearSearchValue())})),e.k0s(),e.j41(7,"span",44)(8,"button",45),e.bIt("click",(function(){e.eBV(t);const o=e.XpG(2);return e.Njj(o.clearSearchValue())})),e.nrm(9,"span",46),e.DNE(10,K,2,1,"span",47)(11,ee,2,1,"span",47),e.k0s()()(),e.j41(12,"datalist",48)(13,"select"),e.DNE(14,te,3,5,"ng-container",25),e.k0s()()()()()}if(2&s){const t=e.XpG(2);e.R7$(),e.Y8G("showAllHelp",t.showAllHelp)("control",t.selectedUserFile)("label",t.locale.maketext("Select a File")),e.R7$(2),e.SpI(" ",t.locale.maketext("Select the file on the server to use for the restoration.")," "),e.R7$(3),e.FS9("placeholder",t.locale.maketext("Search for or select the [asis,cpmove] restoration file.")),e.R7$(3),e.Y8G("ngClass",t.selectedUserFile.value.length>0?"fas fa-times":"fas fa-search"),e.R7$(),e.Y8G("ngIf",0===t.selectedUserFile.value.length),e.R7$(),e.Y8G("ngIf",t.selectedUserFile.value.length>0),e.R7$(3),e.Y8G("ngForOf",t.archiveFiles)}}function re(s,i){if(1&s&&(e.j41(0,"section",51)(1,"app-whm-transfer-cp-acct-form-grp",41)(2,"div",22),e.EFF(3),e.k0s(),e.j41(4,"div",23)(5,"label"),e.nrm(6,"input",52,0),e.k0s()()()()),2&s){const t=e.XpG(2);e.R7$(),e.Y8G("showAllHelp",t.showAllHelp)("control",t.selectedUserFile)("label",t.locale.maketext("Upload File")),e.R7$(2),e.SpI(" ",t.locale.maketext("Select a [asis,cpmove] file to upload.")," ")}}function oe(s,i){if(1&s&&(e.j41(0,"section",53)(1,"app-whm-transfer-cp-acct-form-grp",54)(2,"div",22),e.EFF(3),e.k0s(),e.nrm(4,"input",55),e.k0s(),e.j41(5,"app-whm-transfer-cp-acct-form-grp",56)(6,"div",22),e.EFF(7),e.k0s(),e.nrm(8,"input",57),e.k0s(),e.j41(9,"app-whm-transfer-cp-acct-form-grp",58)(10,"div",22),e.EFF(11),e.k0s(),e.nrm(12,"input",59),e.k0s()()),2&s){const t=e.XpG(2);e.R7$(),e.FS9("label",t.locale.maketext("Remote Server:")),e.Y8G("control",t.hostname)("showAllHelp",t.showAllHelp),e.R7$(2),e.SpI(" ",t.locale.maketext("If the site is not reachable and the server is online, this should be the address of the server that contains the account.")," "),e.R7$(),e.FS9("placeholder",t.locale.maketext("192.0.2.100 or host.example.com")),e.BMQ("aria-label",t.locale.maketext("Remote Server:")),e.R7$(),e.FS9("label",t.locale.maketext("Remote username:")),e.Y8G("control",t.username)("showAllHelp",t.showAllHelp),e.R7$(2),e.SpI(" ",t.locale.maketext("The username of the [asis,cPanel] account to transfer.")," "),e.R7$(),e.BMQ("aria-label",t.locale.maketext("Remote username:")),e.R7$(),e.FS9("label",t.locale.maketext("Remote password:")),e.Y8G("control",t.password)("showAllHelp",t.showAllHelp),e.R7$(2),e.SpI(" ",t.locale.maketext("The password of the [asis,cPanel] account to transfer.")," "),e.R7$(),e.BMQ("aria-label",t.locale.maketext("Remote password:"))}}function ne(s,i){if(1&s&&(e.j41(0,"section",60)(1,"app-whm-transfer-cp-acct-form-grp",61)(2,"div",22),e.EFF(3),e.k0s(),e.j41(4,"div",62)(5,"label"),e.nrm(6,"input",63),e.j41(7,"span"),e.EFF(8),e.k0s()()()()()),2&s){const t=e.XpG(2);e.R7$(),e.Y8G("showAllHelp",t.showAllHelp)("control",t.overwriteExisting)("label",t.locale.maketext("Overwrite Existing")),e.R7$(2),e.SpI(" ",t.locale.maketext("Select this option to overwrite any [asis,cPanel] accounts with the same username.")," "),e.R7$(5),e.JRh(t.locale.maketext("Overwrite if the [asis,cPanel] user already exists."))}}function ie(s,i){if(1&s){const t=e.RV6();e.qex(0),e.j41(1,"label")(2,"input",66),e.bIt("click",(function(){const o=e.eBV(t).$implicit,n=e.XpG(3);return e.Njj(n.patchMigrateAOption(o.type))})),e.k0s(),e.j41(3,"span"),e.EFF(4),e.k0s()(),e.j41(5,"span",37),e.EFF(6),e.k0s(),e.bVm()}if(2&s){const t=i.$implicit;e.R7$(2),e.Y8G("id",t.id)("value",t.type),e.R7$(2),e.JRh(t.label),e.R7$(2),e.JRh(t.description)}}function ae(s,i){if(1&s&&(e.j41(0,"section",64)(1,"h4",13),e.EFF(2),e.k0s(),e.j41(3,"app-whm-transfer-cp-acct-form-grp",65)(4,"div",22),e.EFF(5),e.k0s(),e.j41(6,"div",23)(7,"div",24),e.DNE(8,ie,7,4,"ng-container",25),e.k0s()()()()),2&s){const t=e.XpG(2);e.R7$(2),e.SpI(" ",t.locale.maketext("[asis,A] Records")," "),e.R7$(),e.Y8G("showAllHelp",t.showAllHelp)("control",t.migrateARecord)("label",t.locale.maketext("Migrate [asis,A] Records")),e.R7$(2),e.SpI(" ",t.locale.maketext("Replace either all or some of the [asis,A] records upon restoration for the [asis,cPanel] account.")," "),e.R7$(3),e.Y8G("ngForOf",t.migrateARecordOptions)}}function le(s,i){if(1&s&&(e.j41(0,"option",75),e.EFF(1),e.k0s()),2&s){const t=i.$implicit;e.Y8G("ngValue",t),e.R7$(),e.Lme(" ",t.alias," (",t.hostname,") ")}}function ce(s,i){if(1&s&&(e.j41(0,"section",40)(1,"h4",13),e.EFF(2),e.k0s(),e.j41(3,"app-whm-transfer-cp-acct-form-grp",67)(4,"div",22)(5,"p",68),e.EFF(6),e.k0s()(),e.j41(7,"div",69)(8,"span",70),e.EFF(9),e.k0s(),e.j41(10,"select",71)(11,"option",72),e.EFF(12),e.k0s(),e.j41(13,"option",73),e.EFF(14),e.k0s(),e.DNE(15,le,2,3,"option",74),e.k0s()()()()),2&s){const t=e.XpG(2);e.R7$(2),e.SpI(" ",t.locale.maketext("Linked Nodes")," "),e.R7$(),e.Y8G("showAllHelp",t.showAllHelp)("control",t.mailNodeOption)("label",t.locale.maketext("Linked Node Options")),e.R7$(2),e.Y8G("ngStyle",e.eq3(10,J,t.warningLabelMargin)),e.R7$(),e.SpI(" ",t.locale.maketext("Select whether to link to a child node. Select the “Use the archive file’s stored configuration.” setting to use the archive file’s stored configuration. If the archive file indicates the use of one of the local server’s linked nodes, the system will attempt to use that linked node. Otherwise, the account will restore to the local server.")," "),e.R7$(3),e.JRh(t.locale.maketext("Mail")),e.R7$(3),e.SpI(" ",t.locale.maketext("Use the archive file’s stored configuration.")," "),e.R7$(2),e.SpI(" ",t.locale.maketext("Use only this server. Transfer or restore locally.")," "),e.R7$(),e.Y8G("ngForOf",t.linkedMailNodes)}}function pe(s,i){if(1&s){const t=e.RV6();e.j41(0,"form",4)(1,"div",5)(2,"div",6)(3,"div",7),e.EFF(4),e.k0s(),e.j41(5,"div",8)(6,"button",9),e.bIt("click",(function(){e.eBV(t);const o=e.XpG();return e.Njj(o.toggleHelp())})),e.EFF(7),e.nrm(8,"i",10),e.k0s()(),e.nrm(9,"div",11),e.k0s(),e.j41(10,"div",12)(11,"h4",13),e.EFF(12),e.k0s(),e.j41(13,"section",14)(14,"div",15)(15,"cp-form-label",16),e.EFF(16),e.k0s(),e.j41(17,"div",17)(18,"label"),e.nrm(19,"input",18),e.j41(20,"span"),e.EFF(21),e.k0s(),e.j41(22,"span",19),e.EFF(23),e.k0s()()()()(),e.j41(24,"h4",13),e.EFF(25),e.k0s(),e.j41(26,"section",20)(27,"app-whm-transfer-cp-acct-form-grp",21)(28,"div",22),e.EFF(29),e.k0s(),e.j41(30,"div",23)(31,"div",24),e.DNE(32,W,4,2,"ng-container",25),e.k0s()()()(),e.DNE(33,se,15,9,"section",26)(34,re,8,4,"section",27)(35,oe,13,16,"section",28)(36,ne,9,5,"section",29)(37,ae,9,6,"section",30),e.j41(38,"section",31)(39,"h4",13),e.EFF(40),e.k0s(),e.j41(41,"div",15)(42,"cp-form-label",32),e.EFF(43),e.k0s(),e.j41(44,"div",17)(45,"label"),e.nrm(46,"input",33),e.j41(47,"span"),e.EFF(48),e.k0s()()()()(),e.DNE(49,ce,16,12,"section",26),e.k0s(),e.j41(50,"div",34)(51,"cp-action-button",35),e.bIt("click",(function(){e.eBV(t);const o=e.XpG();return e.Njj(o.submitForm())})),e.EFF(52),e.k0s()()()()}if(2&s){const t=e.XpG();e.Y8G("formGroup",t.transferAcctForm),e.R7$(4),e.SpI(" ",t.locale.maketext("Transfer or Restore a [asis,cPanel] Account")," "),e.R7$(3),e.SpI(" ",t.toggleHelpLabel," "),e.R7$(5),e.JRh(t.locale.maketext("Security")),e.R7$(3),e.Y8G("showInfoBlock",t.showAllHelp),e.R7$(),e.SpI(" ",t.locale.maketext("The Restricted Restore feature performs extra security checks on the backup file. If part of the backup file has a security issue, the system will not restore that part of the backup.")," "),e.R7$(5),e.JRh(t.locale.maketext("Enable Restricted Restore.")),e.R7$(),e.Y8G("ngStyle",e.eq3(29,q,t.warningLabelMargin)),e.R7$(),e.JRh(t.locale.maketext("Experimental")),e.R7$(2),e.SpI(" ",t.locale.maketext("Transfer Options")," "),e.R7$(2),e.Y8G("showAllHelp",t.showAllHelp)("control",t.transferOption)("label",t.locale.maketext("Transfer Options")),e.R7$(2),e.SpI(" ",t.locale.maketext("Select the transfer or restoration method.")," "),e.R7$(3),e.Y8G("ngForOf",t.transferOptions),e.R7$(),e.Y8G("ngIf",t.showTransferOptionSection("transferFromLocalFile",!0)),e.R7$(),e.Y8G("ngIf",t.showTransferOptionSection("transferFromUploadFile",!0)),e.R7$(),e.Y8G("ngIf",t.showTransferOptionSection("transferFromRemoteAccount",!0)),e.R7$(),e.Y8G("ngIf",t.showTransferOptionSection("transferFromRemoteAccount",!1)),e.R7$(),e.Y8G("ngIf",t.showTransferOptionSection("transferFromRemoteAccount",!1)),e.R7$(3),e.SpI(" ",t.locale.maketext("[asis,IP] Address")," "),e.R7$(2),e.Y8G("showInfoBlock",t.showAllHelp)("labelText",t.locale.maketext("Dedicated [asis,IP] Address")),e.R7$(),e.SpI(" ",t.locale.maketext("Assign a dedicated [asis,IP] address to the new [asis,cPanel] account.")," "),e.R7$(5),e.JRh(t.locale.maketext("Dedicated [asis,IP] Address")),e.R7$(),e.Y8G("ngIf",t.isLinkedNodesAvailable),e.R7$(2),e.Y8G("buttonClass",t.buttonClass)("buttonState",t.buttonState),e.R7$(),e.SpI(" ",t.submitBtnText," ")}}let de=(()=>{class s{constructor(t,r,o,n,p,h){this._alertService=t,this._formBuilder=r,this.locale=o,this._location=n,this._locationStrategy=p,this._transferService=h,this.showAllHelp=!0,this.doesLicenseCheckDisableForm=I,this.licenseCheckFormDisableLevel=E,this.loading=!0,this._linkedMailNodes=[],this._securityToken=k,this._submitBtnConfig={buttonClass:"btn-primary",buttonState:l.kj.enabled}}get buttonClass(){return this._submitBtnConfig.buttonClass}get dedicatedIP(){return this.transferAcctForm.get("dedicatedIP")}get hostname(){return this.transferAcctForm.get("hostname")}get isFormValid(){return this.transferAcctForm.valid}get isLinkedNodesAvailable(){return this.linkedMailNodes.length>0}get isTransferOptionHidden(){return this.doesLicenseCheckDisableForm&&"partial"===this.licenseCheckFormDisableLevel}get mailNode(){let t;return t=this.mailNodeOption.value===v.none?".local":this.mailNodeOption.value===v.attemptAccount?".existing":"",t||(t=this.mailNodeOption.value.alias),t}get mailNodeOption(){return this.transferAcctForm.get("mailNodeOption")}get migrateARecord(){return this.transferAcctForm.get("migrateARecord")}get migrateARecordOptions(){return[{id:"ALL",type:u.all,label:this.locale.maketext("Replace All Matching [asis,A] Records."),description:this.locale.maketext("Replace all instances of the original server’s IP address with the new IP address, such as in custom A records (default).")},{id:"CPANEL_ONLY",type:u.cpanelOnly,label:this.locale.maketext("[asis,cPanel]-provided [asis,A] Records."),description:this.locale.maketext("Only replace basic [asis,cPanel]-provided [asis,A] records in zone files.")}]}get overwriteExisting(){return this.transferAcctForm.get("overwriteExisting")}get password(){return this.transferAcctForm.get("password")}get restrictedRestore(){return this.transferAcctForm.get("restrictedRestore")}get selectedUserFile(){return this.transferAcctForm.get("selectedUserFile")}get submitBtnText(){return this.locale.maketext(this.transferOption.value===c.fromRemote?"Transfer":"Restore")}get toggleHelpLabel(){return this.locale.maketext(this.showAllHelp?"Hide Help Text":"Show Help Text")}get transferOption(){return this.transferAcctForm.get("transferOption")}get transferOptions(){return[{id:"FROM_LOCAL_FILE",optionHidden:!1,type:c.fromLocalFile,label:this.locale.maketext("Restore from a local [asis,cpmove] file."),description:this.locale.maketext("Select this option if the [asis,cpmove] file already exists on the server in one of the predefined locations.")},{id:"FROM_UPLOAD",optionHidden:!1,type:c.fromUpload,label:this.locale.maketext("Upload a file to restore."),description:this.locale.maketext("Select this option if you want to upload the [asis,cpmove] file to the server.")},{id:"FROM_REMOTE",optionHidden:this.isTransferOptionHidden,type:c.fromRemote,label:this.locale.maketext("Transfer from Remote [asis,cPanel] Account."),description:this.locale.maketext("Select this option if you want to transfer a [asis,cPanel] account from a remote server.")}]}get username(){return this.transferAcctForm.get("username")}get warningLabelMargin(){return"5px"}get archiveFiles(){return this._archiveFiles}set archiveFiles(t){this._archiveFiles=t}get buttonState(){return this._submitBtnConfig.buttonState}set buttonState(t){this._submitBtnConfig.buttonState=t}get hasIPsAvailable(){return this._hasIPsAvailable}set hasIPsAvailable(t){this._hasIPsAvailable=t}get linkedMailNodes(){return this._linkedMailNodes}set linkedMailNodes(t){this._linkedMailNodes=t}get localFormData(){return this._localFormData}set localFormData(t){this._localFormData=t}get redirectURL(){return this._redirectURL}set redirectURL(t){this._redirectURL=this._location.prepareExternalUrl(`${this._securityToken}/scripts5/${t}`)}get remoteFormData(){return this._remoteFormData}set remoteFormData(t){this._remoteFormData=t}get uploadFormData(){return this._uploadFormData}set uploadFormData(t){this._uploadFormData=t}clearSearchValue(){this.selectedUserFile.patchValue("")}patchMigrateAOption(t){t===u.all?this.transferAcctForm.patchValue({migrateARecord:u.all}):t===u.cpanelOnly&&this.transferAcctForm.patchValue({migrateARecord:u.cpanelOnly})}patchTransferOption(t){this._resetFormControls(),t===c.fromLocalFile?this.transferOption.patchValue(c.fromLocalFile):t===c.fromUpload?this.transferOption.patchValue(c.fromUpload):t===c.fromRemote&&this.transferOption.patchValue(c.fromRemote),this._setFormValidators(),this._doLicenseCheck()}showTransferOptionSection(t,r){return r?this.transferOption.value===t:this.transferOption.value!==t}submitForm(){this.isFormValid?(this.transferAcctForm.disable(),this.buttonState=l.kj.loading,this.transferOption.value===c.fromRemote?(this.remoteFormData=this._setRemoteDataInterface(),this._createRemoteTransferSession(this.remoteFormData)):this.transferOption.value===c.fromLocalFile?(this.localFormData=this._setLocalDataInterface(),this.localFormData.cpMovePath?this._createLocalRestoreSession(this.localFormData):(this.selectedUserFile.patchValue(""),this.selectedUserFile.updateValueAndValidity(),this._checkForm())):(this.uploadFormData=this._setUploadFormDataInterface(),this._createUploadRestoreSession(this.uploadFormData))):this._markFormDirty()}toggleHelp(){this.showAllHelp=!this.showAllHelp}ngOnInit(){f.uv.locale=this.locale,this.hasIPsAvailable=L,this.clearSearchIconLabel=this.locale.maketext("Clear Input"),this.performSearchIconLabel=this.locale.maketext("Search Input"),this._initializeAsyncData(),this.transferAcctForm=this._formBuilder.group({restrictedRestore:[!0],transferOption:[c.fromLocalFile],selectedUserFile:[""],hostname:[""],username:[""],password:[""],migrateARecord:[u.all],overwriteExisting:[!1],dedicatedIP:[{value:!1,disabled:!this.hasIPsAvailable}],mailNodeOption:[v.attemptAccount]}),this._setFormValidators(),this._doLicenseCheck()}ngOnDestroy(){this._archiveFilesSubscription.unsubscribe(),this._enqueuedSubscription.unsubscribe(),this._localRestoreSubscription.unsubscribe(),this._mailNodesSubscription.unsubscribe(),this._remoteTransferSession.unsubscribe(),this._uploadRestoreSubscription.unsubscribe()}_buildURL(t){return this._location.prepareExternalUrl(`${this._securityToken}/scripts5/transfer_session?transfer_session_id=${t}&action=start`)}_checkForm(){this.buttonState=l.kj.enabled,this.transferAcctForm.enable()}_createLocalRestoreSession(t){const r=this._transferService.createLocalRestoreSession(t);let o;this._localRestoreSubscription=r.subscribe({error:n=>{this._alertService.error(n.message),this._checkForm()},next:n=>{o=this._buildURL(n)},complete:()=>{window.location.href=o}})}_createRemoteTransferSession(t){const r=this._transferService.createRemoteTransferSession(t);let o;this._remoteTransferSession=r.subscribe({error:n=>{this._alertService.error(n.message),this._checkForm()},next:n=>{o=n},complete:()=>{this._enqueueTransfer(t,o)}})}_createUploadRestoreSession(t){const r=this._transferService.createUploadRestoreSession(t);let o,n;this._uploadRestoreSubscription=r.subscribe({next:p=>{const g=new RegExp('(?:.*)<script .*>window.location.href=\\"(.*)\\";<\/script>(?:.*)').exec(p);g?n=`${k}/scripts5/${g[1]}`:o=this._parseResponseErrors(p)},complete:()=>{o?this._alertService.error(o):window.location.href=this._location.prepareExternalUrl(n)}})}_doLicenseCheck(){this.doesLicenseCheckDisableForm&&("full"===this.licenseCheckFormDisableLevel?(this.transferAcctForm.disable(),this.buttonState=l.kj.disabled):"partial"===this.licenseCheckFormDisableLevel&&(this.overwriteExisting.patchValue(!0),this.overwriteExisting.disable()))}_enqueueTransfer(t,r){const o=this._transferService.enqueueTransfer(t,r);let n;this._enqueuedSubscription=o.subscribe({error:p=>{this._alertService.error(p.message)},next:p=>{n=this._buildURL(r)},complete:()=>{window.location.href=n}})}_getcPArchiveFiles(){const t=this._transferService.getArchiveFiles();let r;this._archiveFilesSubscription=t.subscribe({error:o=>{this._alertService.error(o)},next:o=>{r=o},complete:()=>{this.archiveFiles=this._transformArchiveFiles(r),this.loading=!1}})}_getLinkedMailNodes(){const t=this._transferService.getLinkedMailNodes();let r;this._mailNodesSubscription=t.subscribe({error:o=>{this._alertService.error(o)},next:o=>{r=o},complete:()=>{this.linkedMailNodes=this._transformMailNodes(r)}})}_initializeAsyncData(){this._getLinkedMailNodes(),this._getcPArchiveFiles()}_markFormDirty(){Object.keys(this.transferAcctForm.controls).forEach((t=>{this.transferAcctForm.controls[t].markAsTouched(),this.transferAcctForm.controls[t].updateValueAndValidity()}))}_parseResponseErrors(t){const $e=[/(.*)(\[invalid_format_error])([^]+)/,/(.*)(\[free_space_error])([^]+)/,/(.*)(\[unspecified_error])([^]+)/,/(.*)(\[user_exists_error])([^]+)/,/(.*)(\[missing_archives_error])([^]+)/];let G,O;for(const P of $e)if(G=P.exec(t),null!==G)return O=t.replace(P,"$1"),O}_resetFormControls(){this.transferAcctForm.reset({restrictedRestore:!0,selectedUserFile:"",hostname:"",username:"",password:"",migrateARecord:u.all,overwriteExisting:!1,dedicatedIP:!1,mailNodeOption:v.attemptAccount},{onlySelf:!0})}_setFormValidators(){const t=this.transferOption.value;Object.keys(this.transferAcctForm.controls).forEach((r=>{this.transferAcctForm.controls[r].setValidators(null)})),t===c.fromLocalFile||t===c.fromUpload?this.transferAcctForm.controls.selectedUserFile.setValidators([f.ln.required(this.locale.maketext("You [output,strong,must] select a file to transfer.")),H(this.locale.maketext("Your file [output,strong,must] match the naming schema."))]):t===c.fromRemote&&(this.transferAcctForm.controls.hostname.setValidators([f.ln.required(this.locale.maketext("You [output,strong,must] enter a hostname or [asis,IP] address.")),f.md.validDomainLength(),f.md.fqdnOrIP()]),this.transferAcctForm.controls.username.setValidators(f.ln.required(this.locale.maketext("You [output,strong,must] enter a username."))),this.transferAcctForm.controls.password.setValidators(f.ln.required(this.locale.maketext("You [output,strong,must] enter a password.")))),Object.keys(this.transferAcctForm.controls).forEach((r=>{this.transferAcctForm.controls[r].updateValueAndValidity()}))}_setLocalDataInterface(){let t;return this.archiveFiles.forEach((n=>{n.file===this.selectedUserFile.value&&(t=n)})),{cpMovePath:t?t.value:"",overwrite:this.overwriteExisting.value,dedicatedIP:this.dedicatedIP.value,restrictedRestore:this.restrictedRestore.value,updateARecords:this.migrateARecord.value,transferType:this.transferOption.value,username:t?t.user:"",mailNode:this.mailNode}}_setRemoteDataInterface(){return{restrictedRestore:this.restrictedRestore.value,hostname:this.hostname.value,username:this.username.value,password:this.password.value,dedicatedIP:this.dedicatedIP.value,mailNode:this.mailNode,transferType:this.transferOption.value}}_setUploadFormDataInterface(){const t=new FormData,r=this.overwriteExisting.value?"1":"0",o=this.restrictedRestore.value?"0":"1",p=this.migrateARecord.value,h=this.dedicatedIP.value?"1":"0",g=this.uploadedFile?this.uploadedFile.nativeElement.files[0]:new File([""],"testfile");return t.set("restorePackage",g,g.name),t.set("filepath","1"),t.set("force_overwrite",r),t.set("unrestricted_restore",o),t.set("replaceip",p),t.set("mail_location",this.mailNode),t.set("ip",h),t}_transformArchiveFiles(t){let r;const o=[];return t.forEach((n=>{r={file:n.file,path:n.path,user:n.user,value:`${n.path}/${n.file}`},o.push(r)})),o}_transformMailNodes(t){let r;const o=[];return t.forEach((n=>{r={alias:n.alias,hostname:n.hostname},o.push(r)})),o}static#e=this.ɵfac=function(r){return new(r||s)(e.rXU(l.uE),e.rXU(m.ze),e.rXU(A.h),e.rXU(a.aZ),e.rXU(a.hb),e.rXU(y))};static#t=this.ɵcmp=e.VBU({type:s,selectors:[["app-whm-transfer-cpanel-account"]],viewQuery:function(r,o){if(1&r&&e.GBs(z,5),2&r){let n;e.mGM(n=e.lsd())&&(o.uploadedFile=n.first)}},inputs:{showAllHelp:"showAllHelp"},features:[e.Jv_([y])],decls:2,vars:2,consts:[["uploadedFile",""],["id","loadingSpinner",4,"ngIf"],["id","transfercPanelAcctForm","name","transfercPanelAcctForm",3,"formGroup",4,"ngIf"],["id","loadingSpinner"],["id","transfercPanelAcctForm","name","transfercPanelAcctForm",3,"formGroup"],[1,"panel","panel-default"],[1,"panel-heading"],[1,"widget-title","pull-left","flip"],[1,"pull-right","flip"],["type","button","id","transferAcctShowHideHelp",1,"btn","btn-default","btn-xs",3,"click"],[1,"far","fa-question-circle","form-info-sign"],[1,"clearfix"],[1,"panel-body"],[1,"widget-title"],[1,"security-section"],[1,"form-group"],["id","transferRestrictedRestoreLabel","for","transferRestrictedRestore","labelText","Restricted Restore",3,"showInfoBlock"],[1,"checkbox"],["id","transferRestrictedRestoreCheck","name","transferRestrictedRestore","type","checkbox","formControlName","restrictedRestore"],[1,"label","label-warning",3,"ngStyle"],[1,"transfer-option-section"],["for","transferOption",3,"showAllHelp","control","label"],["form-group-label",""],["form-group-control",""],[1,"radio"],[4,"ngFor","ngForOf"],["class","local-file-section",4,"ngIf"],["class","file-upload-section",4,"ngIf"],["class","remote-account-section",4,"ngIf"],["class","overwrite-existing-section",4,"ngIf"],["class","migrate-a-records-section",4,"ngIf"],[1,"ip-section"],["id","transferAcctDedIPCheckLabel","for","transferAcctDedIP",3,"showInfoBlock","labelText"],["form-group-control","","id","transferAcctDedIPCheck","name","transferAcctDedIP","type","checkbox","formControlName","dedicatedIP"],[1,"panel-footer"],["id","transferAcctButton","type","submit","name","submitButton",3,"click","buttonClass","buttonState"],[3,"for",4,"ngIf"],[1,"help-block"],[3,"for"],["type","radio","name","transferOption","formControlName","transferOption",3,"click","id","value"],[1,"local-file-section"],["for","selectedUserFile",3,"showAllHelp","control","label"],["role","search",1,"input-group"],["id","cparchive-search-input","list","cparchiveFileList","type","search","formControlName","selectedUserFile","name","selectedUserFile","spellcheck","false","aria-label","locale.maketext('Select a File')",1,"form-control",3,"keyup.esc","placeholder"],[1,"input-group-btn"],["role","button","id","cparchive-search-input-button",1,"btn","btn-default",3,"click"],["aria-hidden","true","id","cparchive-search-input-icon",3,"ngClass"],["class","sr-only",4,"ngIf"],["id","cparchiveFileList"],[1,"sr-only"],[3,"value"],[1,"file-upload-section"],["type","file","accept","application/*","name","selectedUserFile","id","transferOption_file_upload","formControlName","selectedUserFile","attr.aria-required","true"],[1,"remote-account-section"],["for","transferAcctDomain",3,"label","control","showAllHelp"],["form-group-control","","autocomplete","off","id","transferAcctDomainInput","name","transferAcctDomain","type","text","formControlName","hostname",1,"form-control",3,"placeholder"],["for","transferAcctUsername",3,"label","control","showAllHelp"],["form-group-control","","autocomplete","off","type","text","id","transferAcctUsernameInput","name","transferAcctUsername","formControlName","username",1,"form-control"],["for","transferAcctPwd",3,"label","control","showAllHelp"],["form-group-control","","autocomplete","off","type","password","id","transferAcctPwdInput","name","transferAcctPwd","formControlName","password",1,"form-control"],[1,"overwrite-existing-section"],["for","overwriteExisting",3,"showAllHelp","control","label"],["form-group-control","",1,"checkbox"],["type","checkbox","id","overwriteExisting","formControlName","overwriteExisting"],[1,"migrate-a-records-section"],["for","migrateARecord",3,"showAllHelp","control","label"],["type","radio","name","migrateARecord","formControlName","migrateARecord",3,"click","id","value"],["for","mailNodeOption",3,"showAllHelp","control","label"],[3,"ngStyle"],["form-group-control","",1,"input-group"],[1,"input-group-addon"],["attr.aria-required","true","name","mailNodeOption","formControlName","mailNodeOption","aria-label","locale.maketext('Linked Node Options')",1,"form-control"],["value","ATTEMPT_ACCOUNT"],["value","NONE"],[3,"ngValue",4,"ngFor","ngForOf"],[3,"ngValue"]],template:function(r,o){1&r&&e.DNE(0,Q,1,0,"cp-loading-spinner",1)(1,pe,53,31,"form",2),2&r&&(e.Y8G("ngIf",o.loading),e.R7$(),e.Y8G("ngIf",!o.loading))},dependencies:[a.YU,a.Sq,a.bT,a.B3,m.qT,m.xH,m.y7,m.me,m.Zm,m.wz,m.Fm,m.BC,m.cb,m.j4,m.JD,l.Wp,l.C7,l.NB,X],encapsulation:2})}return s})();var _=function(s){return s.view="view",s.resume="resume",s.abort="abort",s}(_||{}),b=function(s){return s.paused="PAUSED",s.pausing="PAUSING",s.running="RUNNING",s}(b||{});const x=s=>({display:s});function me(s,i){if(1&s&&(e.j41(0,"th",9),e.EFF(1),e.k0s()),2&s){const t=i.$implicit;e.Mz_("id","table_header_",t,""),e.R7$(),e.SpI(" ",t," ")}}function ue(s,i){if(1&s&&(e.j41(0,"a",10),e.EFF(1),e.k0s()),2&s){const t=e.XpG().$implicit,r=e.XpG(2);e.FS9("href",t.resume_link,e.B4B),e.Mz_("id","resume_",t.session_id,"_link"),e.Y8G("ngStyle",e.eq3(5,x,r.linkDisplayStyle)),e.R7$(),e.SpI(" ",r.locale.maketext("Resume")," ")}}function he(s,i){if(1&s&&(e.j41(0,"a",10),e.EFF(1),e.k0s()),2&s){const t=e.XpG().$implicit,r=e.XpG(2);e.FS9("href",t.abort_link,e.B4B),e.Mz_("id","abort_",t.session_id,"_link"),e.Y8G("ngStyle",e.eq3(5,x,r.linkDisplayStyle)),e.R7$(),e.SpI(" ",r.locale.maketext("Abort")," ")}}function fe(s,i){if(1&s&&(e.qex(0),e.j41(1,"tr",9)(2,"td",9),e.EFF(3),e.k0s(),e.j41(4,"td",9),e.EFF(5),e.k0s(),e.j41(6,"td",9),e.EFF(7),e.k0s(),e.j41(8,"td",9),e.EFF(9),e.k0s(),e.j41(10,"td",9)(11,"a",10),e.EFF(12),e.k0s(),e.DNE(13,ue,2,7,"a",11)(14,he,2,7,"a",11),e.k0s()(),e.bVm()),2&s){const t=i.$implicit,r=e.XpG(2);e.R7$(),e.Mz_("id","table_row_",t.session_id,""),e.R7$(),e.Mz_("id","session_id_",t.session_id,""),e.R7$(),e.SpI(" ",t.session_id," "),e.R7$(),e.Mz_("id","source_host_",t.session_id,""),e.R7$(),e.SpI(" ",t.source_host," "),e.R7$(),e.Mz_("id","start_time_",t.session_id,""),e.R7$(),e.SpI(" ",t.start_time," "),e.R7$(),e.Mz_("id","session_state_",t.session_id,""),e.R7$(),e.SpI(" ",t.state," "),e.R7$(),e.Mz_("id","session_actions_",t.session_id,""),e.R7$(),e.FS9("href",t.view_link,e.B4B),e.Mz_("id","view_",t.session_id,"_link"),e.Y8G("ngStyle",e.eq3(23,x,r.linkDisplayStyle)),e.R7$(),e.SpI(" ",r.locale.maketext("View")," "),e.R7$(),e.Y8G("ngIf",r.showResumeLink(t.state)),e.R7$(),e.Y8G("ngIf",r.showAbortLink(t.state))}}function _e(s,i){if(1&s&&(e.j41(0,"div",1)(1,"div",2)(2,"div",3),e.EFF(3),e.k0s(),e.nrm(4,"div",4),e.k0s(),e.j41(5,"div",5)(6,"table",6)(7,"thead")(8,"tr"),e.DNE(9,me,2,3,"th",7),e.k0s()(),e.j41(10,"tbody"),e.DNE(11,fe,15,25,"ng-container",8),e.k0s()()()()),2&s){const t=e.XpG();e.R7$(3),e.SpI(" ",t.locale.maketext("Sessions in Progress")," "),e.R7$(6),e.Y8G("ngForOf",t.tableHeaders),e.R7$(2),e.Y8G("ngForOf",t.pendingSessions)}}let ge=(()=>{class s{constructor(t,r,o){this.locale=t,this._location=r,this._locationStrategy=o,this.linkDisplayStyle="block",this.rawPendingSessions=D,this._securityToken=k,this._transferStates=M}get isTableVisible(){return!!(this.pendingSessions&&this.pendingSessions.length>0)}get pendingSessions(){return this._pendingSessions}set pendingSessions(t){this._pendingSessions=t}get transferStates(){return this._transferStates}set transferStates(t){this._transferStates=t}showAbortLink(t){return t===b.paused||t===b.pausing||t===b.running}showResumeLink(t){return t===b.paused}ngOnInit(){this.tableHeaders=[this.locale.maketext("Session"),this.locale.maketext("Source Host"),this.locale.maketext("Start Time"),this.locale.maketext("State"),this.locale.maketext("Actions")],this.tableTitle=this.locale.maketext("Sessions in Progress"),this.pendingSessions=this._transformData(this.rawPendingSessions)}_buildURL(t,r){let o=`${this._securityToken}/scripts5/transfer_session?transfer_session_id=${r.sessionid}`;switch(t){case _.view:return this._location.prepareExternalUrl(o);case _.resume:return o=`${o}&action=resume`,this._location.prepareExternalUrl(o);case _.abort:return o=`${o}&action=abort`,this._location.prepareExternalUrl(o)}}_transformData(t){const r=[];let o,n,p;for(const h in t)t[h]&&(n=t[h],o=n.state.toString(),p={session_id:n.sessionid,source_host:n.source_host,start_time:n.starttime,state:this.transferStates[o]?this.transferStates[o]:this.locale.maketext("UNKNOWN: [_1]",n.state),view_link:this._buildURL(_.view,n),resume_link:this._buildURL(_.resume,n),abort_link:this._buildURL(_.abort,n)},r.push(p));return r}static#e=this.ɵfac=function(r){return new(r||s)(e.rXU(A.h),e.rXU(a.aZ),e.rXU(a.hb))};static#t=this.ɵcmp=e.VBU({type:s,selectors:[["app-pending-transfers-table"]],decls:1,vars:1,consts:[["id","transfer_cp_acct_pending_sessions","class","panel panel-default",4,"ngIf"],["id","transfer_cp_acct_pending_sessions",1,"panel","panel-default"],[1,"panel-heading"],[1,"widget-title","pull-left","flip"],[1,"clearfix"],[1,"table-responsive"],["id","pending_sessions_table",1,"table","table-striped"],[3,"id",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[3,"id"],["target","_blank",3,"href","id","ngStyle"],["target","_blank",3,"href","id","ngStyle",4,"ngIf"]],template:function(r,o){1&r&&e.DNE(0,_e,12,3,"div",0),2&r&&e.Y8G("ngIf",o.isTableVisible)},dependencies:[a.Sq,a.bT,a.B3],encapsulation:2})}return s})();function Fe(s,i){1&s&&e.nrm(0,"cp-alert-list",5)}function ke(s,i){1&s&&e.eu8(0)}function ve(s,i){if(1&s&&(e.j41(0,"div",12)(1,"div",15),e.DNE(2,ke,1,0,"ng-container",16),e.k0s()()),2&s){const t=e.XpG(2),r=e.sdS(3);e.Y8G("ngClass",t.sidePanelClasses),e.R7$(2),e.Y8G("ngTemplateOutlet",r)("ngTemplateOutletContext",t.viewContextDefault)}}function Re(s,i){1&s&&e.eu8(0)}function be(s,i){1&s&&e.eu8(0)}function we(s,i){1&s&&e.eu8(0)}function Ae(s,i){if(1&s&&(e.j41(0,"div",17)(1,"div",15),e.DNE(2,we,1,0,"ng-container",16),e.k0s()()),2&s){const t=e.XpG(2),r=e.sdS(3);e.R7$(2),e.Y8G("ngTemplateOutlet",r)("ngTemplateOutletContext",t.viewContextMobile)}}function xe(s,i){if(1&s&&(e.j41(0,"div",6)(1,"div",7)(2,"strong"),e.EFF(3,"Warning:"),e.k0s(),e.EFF(4," Your server "),e.j41(5,"strong"),e.EFF(6,"must"),e.k0s(),e.EFF(7," have at least "),e.j41(8,"strong"),e.EFF(9,"double"),e.k0s(),e.EFF(10," the archive file’s size available in disk space. The system requires the available disk space to extract the file. For more information, read our "),e.j41(11,"a",8),e.EFF(12,"Transfer or Restore a cPanel Account documentation"),e.k0s(),e.EFF(13,". "),e.k0s(),e.j41(14,"div")(15,"div",9)(16,"div",10),e.DNE(17,ve,3,3,"div",11),e.j41(18,"div",12),e.DNE(19,Re,1,0,"ng-container",13),e.k0s(),e.j41(20,"div",12),e.DNE(21,be,1,0,"ng-container",13),e.k0s(),e.DNE(22,Ae,3,2,"div",14),e.k0s()()()()),2&s){const t=e.XpG(),r=e.sdS(5),o=e.sdS(7);e.R7$(17),e.Y8G("ngIf",t.showResourcePanel),e.R7$(),e.Y8G("ngClass",t.mainPanelClasses),e.R7$(),e.Y8G("ngTemplateOutlet",o),e.R7$(),e.Y8G("ngClass",t.mainPanelClasses),e.R7$(),e.Y8G("ngTemplateOutlet",r),e.R7$(),e.Y8G("ngIf",t.showResourcePanel)}}function Se(s,i){if(1&s&&(e.j41(0,"section",18)(1,"h3",19),e.EFF(2),e.k0s(),e.j41(3,"ul")(4,"li")(5,"a",20),e.nrm(6,"i",21),e.EFF(7),e.k0s()(),e.j41(8,"li")(9,"a",22),e.nrm(10,"i",21),e.EFF(11),e.k0s()()()(),e.j41(12,"section",18)(13,"h3",19),e.EFF(14),e.k0s(),e.j41(15,"ul")(16,"li")(17,"a",23),e.nrm(18,"i",21),e.EFF(19),e.k0s()(),e.j41(20,"li")(21,"a",23),e.nrm(22,"i",21),e.EFF(23),e.k0s()()()()),2&s){const t=i.viewContext,r=e.XpG();e.R7$(2),e.JRh(r.locale.maketext("Need Help?")),e.R7$(3),e.Mz_("id","xferOrRestoreAboutTheInterface_",t,""),e.FS9("title",r.locale.maketext("Need help? Click here to read more about this interface.")),e.R7$(2),e.SpI(" ",r.locale.maketext("About This Interface")," "),e.R7$(2),e.Mz_("id","xferOrRestoreAboutRestrictedRestore_",t,""),e.FS9("title",r.locale.maketext("Need help? Click here to read more about the Restricted Restore feature.")),e.R7$(2),e.SpI(" ",r.locale.maketext("About Restricted Restore")," "),e.R7$(3),e.SpI(" ",r.locale.maketext("Related Interfaces")," "),e.R7$(3),e.FS9("href",r.restoreModulesLink,e.B4B),e.Mz_("id","xferOrRestoreRestoreModules_",t,""),e.FS9("title",r.locale.maketext("Navigate to the Restore Modules Summary interface.")),e.R7$(2),e.SpI(" ",r.locale.maketext("Restore Modules Summary")," "),e.R7$(2),e.FS9("href",r.transferToolLink,e.B4B),e.Mz_("id","xferOrRestoreTransferTool_",t,""),e.FS9("title",r.locale.maketext("Navigate to the Transfer Tool interface.")),e.R7$(2),e.SpI(" ",r.locale.maketext("Transfer Tool")," ")}}function Te(s,i){1&s&&e.nrm(0,"app-whm-transfer-cpanel-account")}function Ce(s,i){1&s&&e.nrm(0,"app-pending-transfers-table")}let Ie=(()=>{class s{constructor(t,r){this.locale=t,this._location=r,this.showResourcePanel=!0,this.viewContextDefault={viewContext:"default"},this.viewContextMobile={viewContext:"mobile"},this._securityToken=k}get isUIHidden(){return I&&"full"===E}ngOnInit(){this.transferToolLink=this._createTransferToolLink(),this.restoreModulesLink=this._createRestoreModulesLink(),this._updatePanelClasses()}_createRestoreModulesLink(){let t=`${this._securityToken}/scripts5/restore_modules_summary`;return t=this._location.prepareExternalUrl(t),t}_createTransferToolLink(){let t=`${this._securityToken}/scripts5/account_copy_input`;return t=this._location.prepareExternalUrl(t),t}_updatePanelClasses(){this.sidePanelClasses="col-md-4 hidden-xs hidden-sm",this.sidePanelClasses+=" ",this.sidePanelClasses+="pull-right",this.mainPanelClasses=this.showResourcePanel?"col-xs-12 col-sm-12 col-md-8 pull-left":"col-xs-12"}static#e=this.ɵfac=function(r){return new(r||s)(e.rXU(A.h),e.rXU(a.aZ))};static#t=this.ɵcmp=e.VBU({type:s,selectors:[["app-root"]],decls:8,vars:2,consts:[["resourceTemplate",""],["transfercPanelAcctForm",""],["pendingTransfersTable",""],["position","top-right",4,"ngIf"],["id","content",4,"ngIf"],["position","top-right"],["id","content"],[1,"callout","callout-warning"],["href","https://docs.cpanel.net/whm/transfers/transfer-or-restore-a-cpanel-account/","target","_blank",1,"external-link"],[1,"row"],[1,"col-xs-12","col-lg-10"],[3,"ngClass",4,"ngIf"],[3,"ngClass"],[4,"ngTemplateOutlet"],["class","col-xs-12 hidden-lg hidden-md",4,"ngIf"],[1,"section"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"col-xs-12","hidden-lg","hidden-md"],[1,"widget"],[1,"widget-title"],["href","https://go.cpanel.net/whmdocsTransferorRestoreacPanelAccount","target","whm_documentation",3,"id","title"],["aria-hidden","true",1,"fas","fa-fw","fa-external-link-alt"],["href","https://go.cpanel.net/restrictedrestore","target","whm_documentation",3,"id","title"],["target","whm_documentation",3,"href","id","title"]],template:function(r,o){1&r&&e.DNE(0,Fe,1,0,"cp-alert-list",3)(1,xe,23,6,"div",4)(2,Se,24,20,"ng-template",null,0,e.C5r)(4,Te,1,0,"ng-template",null,1,e.C5r)(6,Ce,1,0,"ng-template",null,2,e.C5r),2&r&&(e.Y8G("ngIf",!o.isUIHidden),e.R7$(),e.Y8G("ngIf",!o.isUIHidden))},dependencies:[a.YU,a.bT,a.T3,l.Ab,de,ge],encapsulation:2})}return s})(),Ee=(()=>{class s{static#e=this.ɵfac=function(r){return new(r||s)};static#t=this.ɵmod=e.$C({type:s,bootstrap:[Ie]});static#s=this.ɵinj=e.G2t({providers:[l.uE,a.aZ,{provide:a.kB,useValue:U},{provide:a.hb,useClass:a.Sm}],imports:[w.Bb,a.MD,m.X1,l.rY,l.H7,l.jM,C.fg,l.Zi,l.sb,l.pt,T.q1,l.ys,N.B]})}return s})();(0,e.SmG)(),w.sG().bootstrapModule(Ee).catch((s=>console.error(s)))}},F=>{F.O(0,[502],(()=>F(F.s=2251))),F.O()}]);