(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["views/admin/reseller/domains"],{763:(e,t,n)=>{"use strict";n.r(t),n.d(t,{useAddDomainFormInDrawer:()=>A});var a=n(153),o=n.n(a),i=n(154),l=n(261),r=n.n(l),s=n(302),c=n(405),m=n(556),d=n(144),p=n(155),u=n(764),b=n(720),g=n(765),E=n(576),f=n(767),h=n(768),w=n(770);const v=s.gql`
    query GetWebspaceIpAddress($id: ID!) {
        domain: node(id: $id) {
            ... on Domain {
                ipAddresses {
                    ipAddress(publicIp: true)
                }
            }
        }
    }
`,y=d.Locale.getSection("smb.components.forms.web.add-domain"),T=d.Locale.getTranslate("smb.components.forms.web.add-domain"),S=d.Locale.getTranslate("smb.components.forms.domain-info-section"),k=d.Locale.getTranslate("components.forms.ip-addresses-selector"),C=d.Locale.getTranslate("smb.components.forms.web._shared"),N=d.Locale.getTranslate("smb.components.forms.web.seo-settings"),D=d.Locale.getTranslate("admin.components.forms.admin-panel.form.contact-info"),P=d.Locale.getTranslate("components.buttons"),x=({id:e,showDomainRegistrationPromo:t,ipAddresses:n,allowCustomerCreation:a,allowWebspaceCreation:l,subscriptionsLookUpParams:r,canManageMailSettings:s,maxSysnameSize:h,isWindows:x,techDomain:A,settingsEnabled:R,settingsCollapsed:I,applicationWizardConfig:F,embeddedForms:q,applicationWizardEmbeddedForms:$,cancelLink:H,className:L,render:U,onProcess:_,...B})=>{var O;const z=(0,c.useApolloClient)(),M=(0,m.useHistory)(),[j,V]=(0,i.useState)(B.values),[J,W]=(0,i.useState)(Boolean(B.values.hostingSettings.root)),[Y,G]=(0,i.useState)(!B.values.domainInfo),[Z,K]=(0,i.useState)(B.webspaceIpAddress);(0,i.useEffect)((()=>{if(J)return;let e=/^[a-zA-Z0-9\.\-\*]+$/.match(j.domainName.name)?j.domainName.name.replace(/\*/g,"_"):"";-1!==j.hostingSettings.rootPattern.indexOf("<domain>")&&(e=j.hostingSettings.rootPattern.replace("<domain>",e)),V((0,p.setIn)(j,"hostingSettings[root]",e))}),[j.domainName.name]),(0,i.useEffect)((()=>{j.domainName.webspace&&"new"!==j.domainName.webspace.id&&z.query({query:v,variables:{id:btoa(`Domain:${j.domainName.webspace.id}`)}}).then((({data:{domain:{ipAddresses:e}}})=>{K(e[0].ipAddress)}))}),[j.domainName.webspace]);const Q=(e,t)=>{switch(V((n=>{if(n=(0,p.setIn)(n,e,t),"domainName[name]"===e&&!Y){let e=/^[a-zA-Z0-9_.\-]+$/.match(t)?n.domainName.type===u.TYPE_TECH?t.split(".")[0]:t:"";e=e.toLowerCase().substr(0,h),x&&"."===e.substr(-1)&&(e=e.substr(0,e.length-1)),n=(0,p.setIn)(n,"domainInfo[userName]",e||B.values.domainInfo.userName)}return n})),["domainInfo[ipSelector][ipv4]","domainInfo[ipSelector][ipv6]","domainInfo[userName]","domainInfo[password]"].includes(e)&&d.UAT.dispatchAction("CUSTOM-VALUE",{name:e}),e){case"hostingSettings[root]":W(!0);break;case"domainInfo[userName]":G(!0)}},X="1"===j.domainName.assignToCustomer||void 0!==j.domainName.targetWebspace||void 0!==j.domainName.webspace&&(null===j.domainName.webspace||"new"===j.domainName.webspace.id),ee=X||!Z?Object.keys(n).map((e=>{const t=j.domainInfo.ipSelector[e];return"none"===t?null:n[e][t].split(" ")[0]})).filter(Boolean)[0]:Z,te=F.enabled?w.default:b.default;return(0,i.createElement)(te,{vertical:!0,id:e,className:L,render:U,values:j,onFieldChange:Q,onSubmit:e=>(e.domainName.customer&&(e=(0,p.setIn)(e,"domainName[customer]",e.domainName.customer.id)),e.domainName.webspace&&(e=(0,p.setIn)(e,"domainName[webspace]",e.domainName.webspace.id)),e),onLongTask:_,embeddedForms:q,wizardConfig:F,wizardEmbeddedForms:$,submitButton:{id:"btn-send",children:(0,i.createElement)(T,{content:"buttonAddDomain"})},applyButton:!1,cancelButton:!!H&&{id:"btn-cancel",children:(0,i.createElement)(P,{content:"cancel"}),onClick:()=>{M.push(H)}}},t?(0,i.createElement)(E.default,null,(()=>new Jsw.Panel({cls:"tools-box",items:[{componentType:"Jsw.Hint",hint:y.lmsg("formRegistrationHint",{link:`<a href="${(0,d.prepareUrl)("/mpc/register-domains")}" target="_blank">${y.lmsg("portalLink")}</a>`})}]}))):null,(0,i.createElement)(u.default,o()({isEnabled:void 0!==j.domainName.type,isDefault:j.domainName.type===u.TYPE_TECH,typeName:"domainName[type]",name:"domainName[name]",ipAddress:ee,onTypeChange:e=>Q("domainName[type]",e),onDomainNameChange:e=>Q("domainName[name]",e)},A)),void 0===j.domainName.assignToCustomer?null:(0,i.createElement)(p.Section,null,(0,i.createElement)(p.FormFieldCheckbox,{name:"domainName[assignToCustomer]",label:(0,i.createElement)(T,{content:"assignToCustomer"}),checkedValue:"1",uncheckedValue:"0"}),"1"===j.domainName.assignToCustomer?(0,i.createElement)(p.Section,{collapsible:!0},void 0===j.domainName.customer?null:(0,i.createElement)(g.default,{name:"domainName[customer]",label:(0,i.createElement)(T,{content:"customer"}),dataUrl:"/admin/customer/look-up",newItemValue:a?{id:"new",title:y.lmsg("createNewCustomer")}:null,locale:{label:y.lmsg("selectExistingCustomer")},required:!0}),void 0===j.domainName.customer||"new"===(null===(O=j.domainName.customer)||void 0===O?void 0:O.id)?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(p.FormFieldText,{name:"customerInfo[customerContactInfo][contactName]",label:(0,i.createElement)(D,{content:"contactName"}),required:!0}),(0,i.createElement)(p.FormFieldText,{name:"customerInfo[customerContactInfo][email]",label:(0,i.createElement)(D,{content:"email"}),required:!0}),(0,i.createElement)("br",null),(0,i.createElement)(p.Heading,{level:"4"},(0,i.createElement)(T,{content:"customerLoginInfoHint"})),(0,i.createElement)(f.default,{prefix:"customerInfo[customerLoginInfo]"})):null):null),void 0===j.domainName.webspace||"1"===j.domainName.assignToCustomer?null:(0,i.createElement)(p.Section,null,(0,i.createElement)(g.default,{name:"domainName[webspace]",label:(0,i.createElement)(T,{content:"target"}),dataUrl:"/smb/web/subscription-look-up",newItemValue:l?{id:"new",title:y.lmsg("createNewTarget")}:null,locale:{label:y.lmsg("selectExistingTarget")},lookUpParams:r,required:!0})),X?R?(0,i.createElement)(p.Section,{id:"domainInfo",title:(0,i.createElement)(T,{content:"webspaceLegend"}),collapsible:!0,collapsed:I},Object.keys(n).map((e=>(0,i.createElement)(p.FormFieldSelect,{key:e,name:`domainInfo[ipSelector][${e}]`,label:(0,i.createElement)(k,{content:Object.keys(n).length>1?`${e}Address`:"ipAddress"}),required:!0},Object.keys(n[e]).map((t=>(0,i.createElement)(p.SelectOption,{key:t,value:t},n[e][t])))))),(0,i.createElement)("br",null),(0,i.createElement)(p.Heading,{level:"4"},(0,i.createElement)(T,{content:"credentials"})),(0,i.createElement)(p.Text,{component:"p",intent:"muted"},(0,i.createElement)(T,{content:"credentialsHint"})),(0,i.createElement)(p.FormFieldText,{name:"domainInfo[userName]",label:(0,i.createElement)(S,{content:"userName"}),required:!0}),(0,i.createElement)(p.FormFieldPassword,{name:"domainInfo[password]",label:(0,i.createElement)(S,{content:"password"}),required:!0})):null:(0,i.createElement)(p.Section,null,(0,i.createElement)(p.FormFieldSelect,{name:"hostingType[hosting]",label:(0,i.createElement)(T,{content:"hostingManagementOptions"})},(0,i.createElement)(p.SelectOption,{value:"hosting",label:"hosting"},(0,i.createElement)(T,{content:"websiteHosting"})),(0,i.createElement)(p.SelectOption,{value:"forwarding",label:"forwarding"},(0,i.createElement)(T,{content:"websiteForwarding"})),(0,i.createElement)(p.SelectOption,{value:"none",label:"none"},(0,i.createElement)(T,{content:"websiteNoHosting"}))),void 0===j.dnsSettings?null:(0,i.createElement)(p.FormFieldCheckbox,{name:"dnsSettings[dns]",label:(0,i.createElement)(T,{content:"dns"}),description:(0,i.createElement)(T,{content:"dnsHint"}),disabled:j.domainName.type===u.TYPE_TECH,checkedValue:"master",uncheckedValue:"none"}),void 0===j.mailSettings?null:(0,i.createElement)(p.FormFieldCheckbox,{name:"mailSettings[mail]",label:(0,i.createElement)(T,{content:"mail"}),description:s?(0,i.createElement)(T,{content:"mailHint"}):(0,i.createElement)(T,{content:"mailHintNoPermission"}),disabled:j.domainName.type===u.TYPE_TECH,checkedValue:"1",uncheckedValue:"0"}),"hosting"===j.hostingType.hosting?(0,i.createElement)(p.Section,{id:"hostingSettings",title:(0,i.createElement)(T,{content:"hostingSettingsSectionLegend"}),collapsible:!0,collapsed:!0},(0,i.createElement)(p.FormField,{name:"hostingSettings[root]",label:(0,i.createElement)(C,{content:"documentRoot"}),description:(0,i.createElement)(C,{content:"documentRootHint"}),required:!0},(({getId:e,getName:t,getValue:n,setValue:a})=>(0,i.createElement)(i.Fragment,null,(0,i.createElement)(p.Icon,{name:"home"})," / ",(0,i.createElement)(p.Input,{id:e(),name:t(),value:n(),onChange:({target:e})=>a(e.value)})))),(0,i.createElement)(p.FormFieldRadioButtons,{name:"hostingSettings[seoRedirectDirection]",label:(0,i.createElement)(N,{content:"seoRedirectDirection"}),description:(0,i.createElement)(N,{content:"seoRedirectDirectionHint"}),required:!0,options:[{value:"www",label:`www.${j.domainName.name||"<your_domain>"}`},{value:"non-www",label:j.domainName.name||"<your_domain>"},{value:"none",label:(0,i.createElement)(N,{content:"seoRedirectDirectionNone"})}]})):null,"forwarding"===j.hostingType.hosting?(0,i.createElement)(p.Section,{id:"forwardingSettings",title:(0,i.createElement)(C,{content:"forwardingSettingsSectionLegend"}),collapsible:!0,collapsed:!0},(0,i.createElement)(p.FormFieldText,{name:"forwardingSettings[forwardTo]",label:(0,i.createElement)(C,{content:"forwardDestination"}),description:(0,i.createElement)(C,{content:"forwardDestinationHint"}),required:!0}),(0,i.createElement)(p.FormFieldRadioButtons,{name:"forwardingSettings[forwardingType]",label:(0,i.createElement)(C,{content:"forwardingTypeOptions"}),options:[{value:"std_fwd301",label:(0,i.createElement)(C,{content:"forwardingHttpCode301"}),description:(0,i.createElement)(C,{content:"forwardingHttpCode301Hint"})},{value:"std_fwd302",label:(0,i.createElement)(C,{content:"forwardingHttpCode302"}),description:(0,i.createElement)(C,{content:"forwardingHttpCode302Hint"})},{value:"frm_fwd",label:(0,i.createElement)(C,{content:"forwardingFrame"}),description:(0,i.createElement)(C,{content:"forwardingFrameHint"})}]})):null))};x.propTypes={id:r().string.isRequired,showDomainRegistrationPromo:r().bool,values:r().object.isRequired,ipAddresses:r().shape({ipv4:r().object,ipv6:r().object}).isRequired,allowCustomerCreation:r().bool,allowWebspaceCreation:r().bool,subscriptionsLookUpParams:r().object,webspaceIpAddress:r().string,canManageMailSettings:r().bool,maxSysnameSize:r().number.isRequired,isWindows:r().bool.isRequired,techDomain:r().object.isRequired,settingsEnabled:r().bool,settingsCollapsed:r().bool,applicationWizardConfig:r().object,cancelLink:r().string,embeddedForms:r().array,applicationWizardEmbeddedForms:r().array,className:r().string,render:r().func,onProcess:r().func},x.defaultProps={showDomainRegistrationPromo:!1,allowCustomerCreation:!1,allowWebspaceCreation:!1,subscriptionsLookUpParams:null,webspaceIpAddress:null,canManageMailSettings:!1,settingsEnabled:!1,settingsCollapsed:!1,applicationWizardConfig:{},cancelLink:null,embeddedForms:void 0,applicationWizardEmbeddedForms:void 0,className:void 0,render:void 0,onProcess:void 0};const A=(e,t)=>(0,h.default)(x,"add-domain",e,t);t.default=x},770:(e,t,n)=>{"use strict";n.r(t);var a=n(153),o=n.n(a),i=n(154),l=n(261),r=n.n(l),s=n(144),c=n(771),m=n(772);const d=s.Locale.getTranslate("components.domain-applications.applications"),p=({onFieldChange:e,formPrefix:t,wizardConfig:a,embeddedForms:l,wizardEmbeddedForms:r,values:s,children:p,...u})=>{const[b,g]=(0,i.useState)([]),E=t=>{e("applicationName",t),g([...r.filter((({ext:e,name:n})=>t===`ext-${e}-${n}`)).filter((({content:e})=>Boolean(e))).map((({ext:e,name:t,...n})=>({key:`ext-${e}-${t}`,children:"",embeddedForms:[{name:t,...n}]})))])},f=[a.blankSite&&{name:"blank-site",icon:n(773),title:(0,i.createElement)(d,{content:"blank-site.title"}),description:(0,i.createElement)(d,{content:"blank-site.description"})},a.uploadFiles&&{name:"upload-files",icon:n(774),title:(0,i.createElement)(d,{content:"upload-files.title"}),description:(0,i.createElement)(d,{content:"upload-files.description"})},...r.map((({ext:e,name:t,title:n,icon:a,description:o})=>({name:`ext-${e}-${t}`,icon:a,title:n,description:o})))].filter(Boolean),h=[f.length>1&&{key:"chooseApplicationStep",children:(0,i.createElement)(c.default,{onApplicationSelect:E,applicationsList:f}),nextButton:!1},{key:"addDomainStep",formPrefix:t,children:p,embeddedForms:l}].filter(Boolean);return(0,i.useEffect)((()=>{if(0===f.length&&E("blank-site"),1===f.length){const[{name:e}]=f;E(e)}}),[]),(0,i.createElement)(m.default,o()({},u,{values:s,onFieldChange:e,onStepChange:(t,n)=>0===n&&h.length>1?(e("applicationName",null),g([]),t):n,step:s.applicationName&&1!==h.length?1:0,steps:[...h,...b]}))};p.propTypes={values:r().object.isRequired,onFieldChange:r().func.isRequired,children:r().node,formPrefix:r().string,wizardConfig:r().shape({enabled:r().bool,blankSite:r().bool,uploadFiles:r().bool}),embeddedForms:r().array,wizardEmbeddedForms:r().array},p.defaultProps={children:null,formPrefix:"",wizardConfig:{enabled:!0,blankSite:!0,uploadFiles:!0},embeddedForms:[],wizardEmbeddedForms:[]},t.default=p},771:(e,t,n)=>{"use strict";n.r(t);var a=n(154),o=n(155),i=n(261),l=n.n(i);const r=n(144).Locale.getTranslate("components.domain-applications"),s=({onApplicationSelect:e,applicationsList:t})=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(o.Heading,{level:"3"},(0,a.createElement)(r,{content:"title"})),(0,a.createElement)(o.ItemList,{minColumnWidth:220,gap:"xs",selectable:!0},t.map((({name:t,icon:n,title:i,description:l})=>(0,a.createElement)(o.Item,{"data-action":t,key:t,icon:(0,a.createElement)(o.Icon,{src:n,intent:"info",size:"64"}),title:(0,a.createElement)(o.Heading,{level:"4"},i),onClick:()=>e(t)},(0,a.createElement)(o.Paragraph,null,l))))));s.propTypes={onApplicationSelect:l().func,applicationsList:l().arrayOf(l().shape({name:l().string.isRequired,icon:l().string.isRequired,title:l().node,description:l().node}))},s.defaultProps={onApplicationSelect:null,applicationsList:[]},t.default=s},775:(e,t,n)=>{"use strict";n.r(t);var a=n(154),o=n(261),i=n(556),l=n(144),r=n(576),s=n(582);const c=l.Locale.getSection("admin.components.lists.domains"),m=l.Locale.getSection("components.icp-permit"),d=({action:e}={})=>{const t=window.location.pathname.split("/");return e&&(t[3]=e),t.join("/")},p=({data:e,searchFilters:t,dataAction:o,deleteAction:p,allowCreateDomain:u,allowManageSubdomain:b,allowManageDomainAliases:g,showDeleteButton:E,isHomonymSearchEnabled:f,showOwnerName:h,showExpirationDate:w,userId:v,icpPermitSupported:y,icpPermitLink:T})=>{const S=(0,i.useHistory)(),k=(0,s.createNavigateHandler)(S);return(0,a.createElement)(r.default,null,(()=>new l.Panel({cls:"list-box",items:[new l.List({id:"domains-list",data:e,dataUrl:d({action:o}),searchFilters:t,searchOveral:"domainName",disabledSelectHint:c.lmsg("disabledSelectHint"),operations:[u?{componentType:l.SmallButton,id:"buttonAddDomain",cls:"s-btn sb-new-domain",title:c.lmsg("buttonAddDomain"),description:c.lmsg("hintAddDomain"),href:d({action:"add-domain"}),handler:k}:null,b?{componentType:l.SmallButton,id:"buttonAddSubDomain",cls:"s-btn sb-new-subdomain",title:c.lmsg("buttonAddSubdomain"),description:c.lmsg("hintAddSubdomain"),href:d({action:"add-subdomain"})}:null,g?{componentType:l.SmallButton,id:"buttonAddDomainAlias",cls:"s-btn sb-new-domain-alias",title:c.lmsg("buttonAddDomainAlias"),description:c.lmsg("hintAddDomainAlias"),href:d({action:"add-domain-alias"})}:null,u||b||g?{componentType:l.bar.Separator}:null,{componentType:l.list.AdditionalActions,title:c.lmsg("buttonChangeStatus"),operations:[{componentType:l.SmallButton,id:"buttonSuspendDomains",title:c.lmsg("buttonSuspendDomains"),description:c.lmsg("hintSuspendDomains"),addCls:"sb-suspend",cls:"sb-btn",handler(){(0,l.getComponent)("domains-list").execGroupOperation({url:`/domain/suspend/?redirect=${d()}`,skipConfirmation:!0})}},{componentType:l.SmallButton,id:"buttonDisableDomains",title:c.lmsg("buttonDisableDomains"),description:c.lmsg("hintDisableDomains"),addCls:"sb-turn-off",cls:"sb-btn",handler(){(0,l.getComponent)("domains-list").execGroupOperation({url:`/domain/disable/?redirect=${d()}`,skipConfirmation:!0})}},{componentType:l.SmallButton,id:"buttonActivateDomains",title:c.lmsg("buttonActivateDomains"),description:c.lmsg("hintActivateDomains"),addCls:"sb-activate",cls:"sb-btn",handler(){(0,l.getComponent)("domains-list").execGroupOperation({url:`/domain/activate/?redirect=${d()}`,skipConfirmation:!0})}}]},E?{componentType:l.bar.Separator}:null,E?{componentType:l.SmallButton,id:"buttonRemoveSite",title:l.Locale.getSection("components.buttons").lmsg("remove"),description:c.lmsg("hintRemove"),cls:"s-btn sb-remove-selected",handler(e){var t;const n=(0,l.getComponent)("domains-list").getSelectedItems(),a=n.reduce(((e,{relatedDomains:t})=>e.concat(t)),[]).filter((e=>n.every((({domainDisplayName:t})=>t!==e))));(0,l.getComponent)("domains-list").execGroupOperation({url:d({action:p}),subtype:l.messageBox.SUBTYPE_DELETE,mouseEvent:e,text:c.formatMessage("removeConfirmation",{name:`<b>${(0,l.escapeHtml)(null===(t=n[0])||void 0===t?void 0:t.domainDisplayName)}</b>`,count:n.length}),description:a.length?c.lmsg("removeConfirmationSubscription",{domains:a.join(", ")}).replace(/\n/gm,"<br>"):"",isAjax:f,requestUrl:d({action:"search-homonym-data"}),loadingTitle:l.Locale.getSection("components.homonyms").lmsg("loading")})}}:null].filter(Boolean),columns:[l.list.COLUMN_SELECTION,{header:c.lmsg("domainName"),sortable:!0,dataIndex:"domainDisplayName",renderer(e){let t="";if(parseInt(e.domainStatus)){let a=c.lmsg("statusDisabled"),o=n(776),i="disabled";"suspend"===e.turnOffAction&&(a=c.lmsg("statusSuspended"),o=n(777),i="suspended"),t+=`<div class="b-indent"><span class="b-indent-icon"><span><span class="tooltipData">${a}</span><img src="${o}" alt="${i}" title=""></span>`}t+=e.overviewUrl?`<a href="${(0,l.prepareUrl)(e.overviewUrl)}">${(0,l.escapeHtml)(e.domainDisplayName)}</a>`:(0,l.escapeHtml)(e.domainDisplayName),parseInt(e.domainStatus)&&(t+="</span></div>");let a="";if(e.adminDescription&&(a+=`<div class="hint">${(0,l.escapeHtml)(e.adminDescription.truncate(50,"..."))}<span class="tooltipData">${(0,l.escapeHtml)(e.adminDescription)}</span></div>`),e.resellerDescription){a+=`<div class="hint">${e.hideResellerTitleDescription?"":`${c.lmsg("resellerDescription")}: `}${(0,l.escapeHtml)(e.resellerDescription.truncate(50,"..."))}<span class="tooltipData">${(0,l.escapeHtml)(e.resellerDescription)}</span></div>`}return e.ownerDescription&&(a+=`<div class="hint">${c.lmsg("ownerDescription")}: ${(0,l.escapeHtml)(e.ownerDescription.truncate(50,"..."))}<span class="tooltipData">${(0,l.escapeHtml)(e.ownerDescription)}</span></div>`),t+=a,t}},y?{header:m.lmsg("icpPermit"),sortable:!0,dataIndex:"icpStatus",renderer({icpStatus:e,icpPermit:t}){const a=1==e?m.lmsg("icpStatusAllowedDescription"):m.lmsg("icpStatusNotAllowedDescription"),o=n(1==e?778:779);let i=t?(0,l.escapeHtml)(t):1==e?"":m.lmsg("icpStatusNotAllowed");return T&&(i=`<a href="${T}" target="_blank">${i}</a>`),`<span class="tooltipData">${a}</span><img src="${o}" alt="" /> ${i}`}}:null,{header:c.lmsg("hostingType"),sortable:!0,dataIndex:"hostingType",renderer(e){let t="";return"alias"===e.hostingType?t=`<img src="${n(780)}"/> ${c.lmsg("aliasFor")} <a href="http://${(0,l.escapeHtml)(e.realDomainName)}" target="_blank">${(0,l.escapeHtml)(e.realDomainDisplayName)}</a>`:"vrt_hst"===e.hostingType?t=`<img src="${n(781)}"/> ${c.lmsg(e.parentDomainId>0?"subdomainWebsite":"website")}`:"none"===e.hostingType?t=`<img src="${n(782)}"/><em class="hint">${c.lmsg("noHosting")}</em>`:"frm_fwd"!==e.hostingType&&"std_fwd"!==e.hostingType||(t=`<img src="${n(783)}"/> ${c.lmsg("forwardingTo")} <a href="${(0,l.escapeHtml)(e.forwardingUrl)}" target="_blank">${(0,l.escapeHtml)(e.forwardingDisplayUrl)}</a>`),t}},h?{header:c.lmsg("ownerName"),sortable:!0,dataIndex:"ownerName",renderer({ownerId:e,ownerType:t,ownerName:n,ownerCompanyName:a}){let o=null;return parseInt(e)!==v&&("client"===t?o=`/admin/customer/overview/id/${e}`:"reseller"===t&&(o=`/admin/reseller/overview/id/${e}`)),[o?(0,l.createElement)("a",{href:o,onclick:k},(0,l.escapeHtml)(n)):(0,l.escapeHtml)(n),a?`, ${(0,l.escapeHtml)(a)}`:null]}}:null,w?{header:c.lmsg("expirationDate"),sortable:!1,dataIndex:"expirationDate",renderer:({expirationDateString:e})=>e?(0,l.escapeHtml)(e):"&mdash;"}:null,{header:c.lmsg("diskUsage"),sortable:!0,dataIndex:"realSize",renderer:({diskUsage:e})=>(0,l.escapeHtml)(e)},{header:c.lmsg("traffic"),sortable:!0,dataIndex:"traffic"},{header:"",sortable:!1,renderer:({hostingType:e,siteUrl:t})=>"none"===e?"":(0,l.createElement)("a.s-btn.sb-publish",{href:t,target:"_blank"},(0,l.createElement)("span",c.lmsg("openSite")))},{header:"",sortable:!1,renderer({previewSupported:e,domainId:t}){if(!e)return"";const n=`/admin/domain/preview?domainId=${t}`;return(0,l.createElement)("a.s-btn.sb-view-site",{href:n,target:"_blank"},(0,l.createElement)("span",c.lmsg("previewSite")))}},{header:"",sortable:!1,renderer({manageUrl:e,ownerId:t,ownerType:n}){if(!e||parseInt(t)===v)return"";const a=`/admin${"reseller"===n?"/reseller":"/customer"}/login/id/${t}?pageUrl=${encodeURIComponent(e)}`;return(0,l.createElement)("a.s-btn.sb-login",{href:a},(0,l.createElement)("span",c.lmsg("reseller"===n?"manageInResellerPanel":"manageInCustomerPanel")))}}].filter(Boolean)})]})))};p.propTypes={data:o.PropTypes.object.isRequired,searchFilters:o.PropTypes.object.isRequired,dataAction:o.PropTypes.string.isRequired,deleteAction:o.PropTypes.string.isRequired,allowCreateDomain:o.PropTypes.bool,allowManageSubdomain:o.PropTypes.bool,allowManageDomainAliases:o.PropTypes.bool,showDeleteButton:o.PropTypes.bool,isHomonymSearchEnabled:o.PropTypes.bool,showOwnerName:o.PropTypes.bool,showExpirationDate:o.PropTypes.bool,userId:o.PropTypes.number,icpPermitSupported:o.PropTypes.bool,icpPermitLink:o.PropTypes.string},p.defaultProps={allowCreateDomain:!1,allowManageSubdomain:!1,allowManageDomainAliases:!1,showDeleteButton:!1,isHomonymSearchEnabled:!1,showOwnerName:!1,showExpirationDate:!1,userId:void 0,icpPermitSupported:!1,icpPermitLink:void 0},t.default=p},769:(e,t,n)=>{"use strict";n.r(t);var a=n(153),o=n.n(a),i=n(154),l=n(155),r=n(144),s=n(261),c=n.n(s),m=n(615),d=n(635);const p="running",u=()=>(0,r.getComponent)("asyncProgressBarWrapper"),b=({children:e,dataType:t,isOpen:n,onClose:a,task:s,...c})=>{const[b,g]=(0,i.useState)([]),[E,f]=(0,i.useState)(null),[h,w]=(0,i.useState)(null),[v,y]=(0,i.useState)(null),T=s?s.id:null,{addToast:S}=(0,d.useToaster)(),k=({id:e,steps:t,status:a,errors:o,output:l,progressValue:s,progressTitle:c,progressTitleHtml:m})=>{if(!n||T!==e)return;const d=m||c,u=r.Task.STATUS_STARTED===a?p:a,b=e=>(e||[]).map((e=>(0,i.createElement)("div",{key:e},e)));y(u),t&&t.length?(f(d),g(t.map((({errors:e,...t})=>({children:b(e),...t}))))):g([{title:d,status:u,progress:Number(s),children:(0,i.createElement)(i.Fragment,null,b(o),b(l))}])};(0,i.useEffect)((()=>{const e=u();n?(null==e||e.hide(),g([]),f(null),w(null),y(null)):(async()=>{C()||await N(),null==e||e.show()})()}),[n]),(0,i.useEffect)((()=>{var e;T&&(null===(e=u())||void 0===e||e.update(),k(s))}),[T,s]),(0,m.default)("plesk:taskStepUpdate",k,r.Observer),(0,m.default)("plesk:taskComplete",(({id:e,redirect:t,status:a})=>{n&&T===e&&r.Task.STATUS_DONE===a&&w(t)}),r.Observer);const C=()=>r.Task.STATUS_NOT_STARTED===v||p===v,N=()=>{var e,t;return T&&(null===(e=u())||void 0===e||null===(t=e.getItems().find((e=>e.getId()===T)))||void 0===t?void 0:t.remove())};return(0,i.createElement)(l.Drawer,o()({"data-type":t,isOpen:n,onClose:()=>{h?(0,r.redirect)(h):a()},progress:b.length?{cancelable:!1,title:E,steps:b,onFinish:()=>{N(),S({intent:"success",message:E||b[0].title})}}:null,hideButton:C()},c),e)};b.propTypes={children:c().node,dataType:c().string.isRequired,isOpen:c().bool,onClose:c().func.isRequired,task:c().shape({id:c().string.isRequired,steps:c().array,status:c().string,progressTitle:c().string,progressTitleHtml:c().string})},b.defaultProps={children:null,isOpen:!1,task:null},t.default=b},765:(e,t,n)=>{"use strict";n.r(t);var a=n(154),o=n(261),i=n.n(o),l=n(155),r=n(766);const s=n(144).Locale.getSection("components.elements.lookup"),c=({data:e,dataUrl:t,lookUpParams:n,newItemValue:o,locale:i,placeholder:c,...m})=>(0,a.createElement)(l.FormField,m,(({getId:l,getName:m,getValue:d,setValue:p,isDisabled:u})=>(0,a.createElement)(r.default,{id:l(),name:m(),value:d(),onChange:e=>p(e),data:e,dataUrl:t,lookUpParams:n,newItemValue:o,locale:{...s.messages,...i},disabled:u(),placeholder:c})));c.propTypes={locale:i().object,data:i().array,dataUrl:i().string,lookUpParams:i().object,newItemValue:i().object,placeholder:i().string},c.defaultProps={locale:void 0,data:void 0,dataUrl:void 0,lookUpParams:void 0,newItemValue:void 0,placeholder:void 0},t.default=c},766:(e,t,n)=>{"use strict";n.r(t);var a=n(154),o=n(144),i=n(576);t.default=e=>{const[t,n]=(0,a.useState)(null);return(0,a.useEffect)((()=>{const t=new o.LookUp(e);return n(t),()=>{t.remove(),n(null)}}),[]),t?(0,a.createElement)(i.default,null,t):null}},772:(e,t,n)=>{"use strict";n.r(t);var a=n(153),o=n.n(a),i=n(155),l=n(154),r=n(720),s=n(144),c=n(261),m=n.n(c);const d=s.Locale.getTranslate("components.buttons"),p=({step:e,steps:t,onStepChange:n,onSubmit:a,submitButton:s,cancelButton:c,...m})=>{const p=(0,l.useRef)(),[u,b]=(0,l.useState)(0),g=u+e,{children:E,formPrefix:f,embeddedForms:h,backButton:w,nextButton:v}={backButton:{},nextButton:{},...t[g]},y=g===t.length-1,T=0===g,S=()=>{p.current.handleEmbeddedFormValues(),b((t=>n(t+e,t+e+1)-e))};return(0,l.createElement)(r.default,o()({},m,{ref:p,additionalButtons:[T&&c&&(0,l.createElement)(i.Button,o()({key:"cancel",children:(0,l.createElement)(d,{content:"cancel"})},c)),!T&&w&&(0,l.createElement)(i.Button,o()({key:"back",arrow:"backward",onClick:()=>{p.current.handleEmbeddedFormValues(),b((t=>n(t+e,t+e-1)-e))},children:(0,l.createElement)(d,{content:"back"})},w)),!y&&v&&(0,l.createElement)(i.Button,o()({key:"next",intent:"primary",onClick:S,arrow:"forward",children:(0,l.createElement)(d,{content:"nextWithoutArrow"})},v)),y&&s&&(0,l.createElement)(i.Button,o()({key:"submit",intent:"primary",arrow:"forward",onClick:()=>p.current.submit(),children:(0,l.createElement)(d,{content:"ok"})},s))],onSubmit:y?a:S,onError:a=>{const o=t.findIndex((({formPrefix:e})=>""===e)),i=Object.keys(a).map((e=>{const n=t.findIndex((({formPrefix:t,embeddedForms:n=[]})=>t===e||n.any((({name:t})=>t===e))));return n>=0?n:o}));b(n(g,i.length>0?Math.min(...i):e)-e)},applyButton:!1,submitButton:!1,cancelButton:!1,formPrefix:f,embeddedForms:h}),E)};p.propTypes={step:m().number,steps:m().arrayOf(m().shape({formPrefix:m().string,embeddedForms:m().array,children:m().node,nextButton:m().bool,backButton:m().bool})),onStepChange:m().func,onSubmit:m().func,submitButton:m().object,cancelButton:m().object},p.defaultProps={step:0,steps:[],onStepChange:(e,t)=>t,onSubmit:void 0,submitButton:{},cancelButton:{}},t.default=p},767:(e,t,n)=>{"use strict";n.r(t);var a=n(154),o=n(155),i=n(144),l=n(261),r=n.n(l);const s=i.Locale.getTranslate("admin.components.forms.admin-panel.form.login-info"),c=({prefix:e})=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(o.FormFieldText,{name:"".concat(e,"[userName]"),label:(0,a.createElement)(s,{content:"userName"}),required:!0,autoComplete:"off"}),(0,a.createElement)(o.FormFieldPassword,{name:"".concat(e,"[password]"),label:(0,a.createElement)(s,{content:"password"}),required:!0,autoComplete:"off"}),(0,a.createElement)(o.FormFieldCheckbox,{name:"".concat(e,"[isActivationRequired]"),label:(0,a.createElement)(s,{content:"emailActivation"}),description:(0,a.createElement)(s,{content:"emailActivationHint"}),checkedValue:"1",uncheckedValue:"0"}));c.propTypes={prefix:r().string.isRequired},t.default=c},791:(e,t,n)=>{"use strict";n.r(t);var a=n(154),o=n(261),i=n.n(o),l=n(155),r=n(144),s=n(582);const c=({items:e})=>(0,a.createElement)(l.Tabs,{active:e.findIndex((({containerCls:e})=>"active"===e))+1},e.map((({title:e,href:t},n)=>(0,a.createElement)(l.Tab,{key:n,title:e,component:s.default,to:(0,r.prepareUrl)(t)}))));c.propTypes={items:i().arrayOf(i().shape({title:i().string.isRequired,href:i().string.isRequired,containerCls:i().string.isRequired})).isRequired},t.default=c},764:(e,t,n)=>{"use strict";n.r(t),n.d(t,{TYPE_TECH:()=>m,TYPE_CUSTOM:()=>d});var a=n(153),o=n.n(a),i=n(155),l=n(154),r=n(261),s=n.n(r),c=n(144);const m="tech",d="custom",p=c.Locale.getTranslate("components.forms.domain.tech-domain-name"),u=({isEnabled:e,isDefault:t,url:n,vendor:a,typeName:o,name:r,ipAddress:s,onDomainNameChange:c,onTypeChange:u})=>{const[E,f]=(0,l.useState)(e&&t?m:d);if(!e)return(0,l.createElement)(b,{name:r,isEnabled:!1,onDomainNameChange:c});const h=[{key:d,icon:(0,l.createElement)(i.Icon,{name:"ribbon",intent:"success"})},{key:m,icon:(0,l.createElement)(i.Icon,{name:"rocket",intent:"info"})}];return(0,l.createElement)(l.Fragment,null,(0,l.createElement)(i.Section,{title:(0,l.createElement)(p,{content:"title"}),vertical:!0},(0,l.createElement)(i.FormField,{name:o,onChange:e=>(e=>{f(e),u(e),c("")})(e)},(({getId:e,getName:t,getValue:n,setValue:a,isDisabled:o})=>(0,l.createElement)(l.Fragment,null,(0,l.createElement)(i.ItemList,{stretchable:!0,selectable:!0,minColumnWidth:270,gap:"sm",value:n(),onSelect:e=>a(e)},h.map((({key:e,icon:t})=>(0,l.createElement)(i.Item,{icon:t,key:e,value:e,"data-action":`use-${e}-domain`,title:(0,l.createElement)(i.Heading,{level:"4"},(0,l.createElement)(i.Paragraph,null,(0,l.createElement)(p,{content:`${e}DomainTitle`}))),disabled:o()},(0,l.createElement)(i.Text,{fontSize:"md"},(0,l.createElement)(p,{content:`${e}DomainText`})))))),(0,l.createElement)("input",{hidden:!0,id:e(),name:t(),value:n(),readOnly:!0}))))),E===m?(0,l.createElement)(g,{name:r,ipAddress:s,url:n,vendor:a,onDomainNameChange:c}):(0,l.createElement)(b,{name:r,isEnabled:!0,onDomainNameChange:c}))},b=({name:e,isEnabled:t,onDomainNameChange:n})=>(0,l.createElement)(i.Section,{vertical:!0},(0,l.createElement)(i.FormField,{name:e,label:t?(0,l.createElement)(p,{content:"customDomain"}):(0,l.createElement)(p,{content:"domainName"}),onChange:e=>n(e),required:!0},(({getId:e,getName:t,getValue:n,setValue:a,isDisabled:o})=>(0,l.createElement)(l.Fragment,null,(0,l.createElement)("span",{dir:"ltr"},"www. ",(0,l.createElement)(i.Input,{id:e(),name:t(),value:n(),placeholder:"domain.name",size:"lg",onChange:e=>a(e.target.value),disabled:o()}))))));b.propTypes={name:s().string.isRequired,isEnabled:s().bool.isRequired,onDomainNameChange:s().func.isRequired};const g=({name:e,onDomainNameChange:t,...n})=>(0,l.createElement)(i.Section,{vertical:!0},(0,l.createElement)(l.Fragment,null,(0,l.createElement)(i.FormField,{label:(0,l.createElement)(p,{content:"techDomain"}),name:e,onChange:e=>t(e)},(({getId:e,getName:t,...a})=>(0,l.createElement)(E,o()({id:e(),name:t()},a,n)))),(0,l.createElement)(i.Cuttable,{maxHeight:24},(0,l.createElement)(i.Paragraph,null,(0,l.createElement)(p,{content:"techDomainDesc"})),(0,l.createElement)("ul",null,(0,l.createElement)("li",null,(0,l.createElement)(p,{content:"techDomainRandom"})),(0,l.createElement)("li",null,(0,l.createElement)(p,{content:"techDomainDns"})),(0,l.createElement)("li",null,(0,l.createElement)(p,{content:"techDomainMail"}))),(0,l.createElement)(i.Paragraph,null,(0,l.createElement)(p,{content:"techDomainSwitch"})))));g.propTypes={name:s().string.isRequired,onDomainNameChange:s().func.isRequired};const E=({id:e,name:t,ipAddress:n,url:a,vendor:o,getValue:r,setValue:s})=>{const[c,m]=(0,l.useState)(!1),[d,u]=(0,l.useState)(n),[b,g]=(0,l.useState)({}),E=(0,l.useCallback)((async()=>{if(g({}),!r()||n!==d)if(n){m(!0);try{const e=await fetch(a,{method:"POST",body:JSON.stringify({ip_address:n,vendor:o})}),{subdomain:t}=await e.json();if(!t)return void g({error:(0,l.createElement)(p,{content:"error"})});s(t),u(n)}catch{g({error:(0,l.createElement)(p,{content:"error"})})}finally{m(!1)}}else g({noIpAddress:(0,l.createElement)(p,{content:"errorNoIpAddress"})})}),[r,s,n,d,a,o]);return(0,l.useEffect)((()=>{E()}),[n]),(0,l.createElement)(l.Fragment,null,c?(0,l.createElement)(i.Status,{progress:!0},(0,l.createElement)(p,{content:"generating"})):(0,l.createElement)(i.Text,{bold:!0},r()),(0,l.createElement)("input",{hidden:!0,id:e,name:t,value:r(),readOnly:!0}),Object.keys(b).map((e=>(0,l.createElement)(i.Alert,{key:e,intent:"danger"},(0,l.createElement)(i.Icon,{name:"exclamation-mark-circle-filled",intent:"danger"})," ",b[e]))))};E.propTypes={id:s().string.isRequired,name:s().string.isRequired,ipAddress:s().string,url:s().string.isRequired,vendor:s().string.isRequired,getValue:s().func.isRequired,setValue:s().func.isRequired},E.defaultProps={ipAddress:null},u.propTypes={isEnabled:s().bool.isRequired,isDefault:s().bool.isRequired,url:s().string.isRequired,vendor:s().string.isRequired,typeName:s().string.isRequired,name:s().string.isRequired,ipAddress:s().string,onDomainNameChange:s().func.isRequired,onTypeChange:s().func.isRequired},u.defaultProps={ipAddress:null},t.default=u},768:(e,t,n)=>{"use strict";n.r(t);var a=n(153),o=n.n(a),i=n(154),l=n(302),r=n(405),s=n(556),c=n(155),m=n(144),d=n(769);const p=l.gql`
    query GetAddDomainData {
        config {
            domainManagement {
                settings {
                    enabled
                    collapsed
                }
                applicationWizard {
                    enabled
                    blankSite
                    uploadFiles
                }
            }
            techDomain {
                url
                vendor
            }
        }
    }
`;t.default=(e,t,n,a)=>{const l=(0,r.useApolloClient)(),u=!!(0,s.useRouteMatch)(a),b=(0,s.useHistory)(),[g,E]=(0,i.useState)(null),[f,h]=(0,i.useState)(null);(0,i.useEffect)((()=>{u&&(E(null),h(null),Promise.all([m.api.get(a),l.query({query:p})]).then((([e,{data:{config:t}}])=>{e.redirect?(0,m.redirect)(e.redirect):E({...e,techDomain:{url:`${t.techDomain.url}/api/subdomain`,vendor:t.techDomain.vendor},settingsEnabled:t.domainManagement.settings.enabled,settingsCollapsed:t.domainManagement.settings.collapsed,applicationWizardConfig:t.domainManagement.applicationWizard})})))}),[u,a,l]);const w=()=>{b.push(n)};return[(0,i.createElement)(d.default,{dataType:t,title:g?g.pageTitle:"",size:"sm",isOpen:u,onClose:w,form:g?(0,i.createElement)(e,o()({onCancel:w,onProcess:h},g)):null,task:f},g?null:(0,i.createElement)(c.ContentLoader,null))]}},816:(e,t,n)=>{"use strict";n.r(t);var a=n(154),o=n(261),i=n.n(o),l=n(155),r=n(144),s=n(582),c=n(793),m=n(794);const d=r.Locale.getSection("admin.components.reseller-sidebar"),p=r.Locale.getTranslate("admin.components.reseller-sidebar"),u=r.Locale.getTranslate("admin.components.elements.status"),b=r.Locale.getTranslate("admin.components.lists.resellers"),g=({id:e,login:t,contactName:o,companyName:i,emailAddress:g,description:E,setupDate:f,isActive:h,ownCustomers:w,ownPlans:v,ownSubscriptions:y,isIisAppPoolsPolicyMixed:T,subscription:S})=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(c.default,{id:"panel-reseller-overviewSection",title:(0,a.createElement)(p,{content:"overviewPanelTitle"})},(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Text,{intent:"muted"},(0,a.createElement)(p,{content:"contactName"}),":")," ",(0,a.createElement)("b",null,o)),i?(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Text,{intent:"muted"},(0,a.createElement)(p,{content:"companyName"}),":")," ",(0,a.createElement)("b",null,i)):null,g?(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Text,{intent:"muted"},(0,a.createElement)(p,{content:"emailAddress"}),":")," ",(0,a.createElement)("b",null,(0,a.createElement)("a",{href:`mailto:${g}`},g))):null,(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Text,{intent:"muted"},(0,a.createElement)(p,{content:"setupDate"}),":")," ",(0,a.createElement)("b",null,f)),(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Text,{intent:"muted"},(0,a.createElement)(p,{content:"status"}),":")," ",(0,a.createElement)("b",null,(0,a.createElement)(l.Status,{intent:h?"success":"danger"},h?(0,a.createElement)(u,{content:"onStateReseller"}):(0,a.createElement)(u,{content:"offStateReseller"})))," ",(0,a.createElement)(l.AuxiliaryActions,null,(0,a.createElement)(l.Tooltip,{title:h?(0,a.createElement)(p,{content:"buttonSuspendHint"}):(0,a.createElement)(p,{content:"buttonActivateHint"})},(0,a.createElement)("a",{id:"buttonToggle",onClick:()=>{(0,r.redirectPost)(`/admin/reseller/toggle/id/${e}`)}},h?(0,a.createElement)(p,{content:"buttonSuspend"}):(0,a.createElement)(p,{content:"buttonActivate"}))))),(0,a.createElement)(m.default,{url:`/admin/reseller/edit-description/id/${e}`,data:{owner:E},objectType:"reseller",object:o}),(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Tooltip,{title:(0,a.createElement)(p,{content:"buttonEditContactHint"})},(0,a.createElement)(l.Action,{id:"buttonEditContactInfo",icon:{src:n(795)},href:`/admin/reseller/personal-info/id/${e}`},(0,a.createElement)(p,{content:"buttonEditContact"}))))),(0,a.createElement)(c.default,{id:"panel-reseller-resourcesSection",title:(0,a.createElement)(p,{content:"resourcesPanelTitle"})},(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Text,{intent:"muted"},(0,a.createElement)(p,{content:"ownCustomers"}),":")," ",(0,a.createElement)("b",null,(0,a.createElement)(s.default,{to:`/admin/customer/list/?force-show-search=true&searchFilter[ownership][searchText]=${encodeURIComponent(t)}`},w))),(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Text,{intent:"muted"},(0,a.createElement)(p,{content:"ownPlans"}),":")," ",(0,a.createElement)("b",null,(0,a.createElement)(s.default,{to:`/admin/customer-service-plan/list/?force-show-search=true&searchFilter[ownership][searchText]=${encodeURIComponent(t)}`},v))),(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Text,{intent:"muted"},(0,a.createElement)(p,{content:"ownSubscriptions"}),":")," ",(0,a.createElement)("b",null,(0,a.createElement)(s.default,{to:`/admin/subscription/list?force-show-search=true&searchFilter[subscriberName][searchText]=${encodeURIComponent(`login:${t}`)}`},y))),(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Text,{intent:"muted"},(0,a.createElement)(p,{content:"plan"}),":")," ",(0,a.createElement)("b",null,S?(0,a.createElement)(a.Fragment,null,S.name,S.isLocked||!S.isSynchronized?(0,a.createElement)(a.Fragment,null," (",(0,a.createElement)(l.Tooltip,{title:S.isLocked?(0,a.createElement)(b,{content:"statusLocked"}):(0,a.createElement)(b,{content:"statusUnsynchronized"})},(0,a.createElement)(l.Status,{icon:{src:S.isLocked?n(808):n(809)}},S.isLocked?(0,a.createElement)(u,{content:"lockedStateClient"}):(0,a.createElement)(u,{content:"unsynchronizedStateClient"}))),")"):null):(0,a.createElement)(p,{content:"planCustom"}))," ",(0,a.createElement)(l.AuxiliaryActions,null,(0,a.createElement)(l.Tooltip,{title:(0,a.createElement)(p,{content:"buttonChangeResellerSubscriptionHint"})},(0,a.createElement)(s.default,{id:"buttonChangeResellerSubscription",to:`/admin/reseller/change-reseller-subscription/id/${e}`},(0,a.createElement)(p,{content:"buttonChangeResellerSubscription"}))),(0,a.createElement)(l.Tooltip,{title:(0,a.createElement)(p,{content:"buttonManuallyEditSubscriptionParametersHint"})},(0,a.createElement)(s.default,{id:"buttonEditSubscriptionParameters",to:`/admin/reseller/customize-subscription/id/${e}`},(0,a.createElement)(p,{content:"buttonManuallyEditSubscriptionParameters"}))),!S||!S.isLocked&&S.isSynchronized?null:(0,a.createElement)(l.Tooltip,{title:S.isLocked?(0,a.createElement)(p,{content:"buttonUnlockAndSyncHint"}):(0,a.createElement)(p,{content:"buttonSyncHint"})},(0,a.createElement)("a",{id:"buttonUnlockAndSync",href:`/admin/reseller/synchronize/id/${e}`,"data-method":"post"},S.isLocked?(0,a.createElement)(p,{content:"buttonUnlockAndSync"}):(0,a.createElement)(p,{content:"buttonSync"}))))),(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Tooltip,{title:(0,a.createElement)(p,{content:"buttonMoreStatsHint"})},(0,a.createElement)(l.Action,{id:"buttonMoreStats",icon:{src:n(747)},href:`/admin/reseller/stats/id/${e}`},(0,a.createElement)(p,{content:"buttonMoreStats"}))))),(0,a.createElement)(c.default,{id:"panel-reseller-loginSection",title:(0,a.createElement)(p,{content:"loginPanelTitle"})},(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Text,{intent:"muted"},(0,a.createElement)(p,{content:"username"}),":")," ",(0,a.createElement)("b",null,t)),h?(0,a.createElement)("p",null,(0,a.createElement)(l.Tooltip,{title:(0,a.createElement)(p,{content:"buttonLoginHint"})},(0,a.createElement)(l.Action,{id:"buttonLogin",icon:{src:n(817)},href:`/admin/reseller/login/id/${e}`},(0,a.createElement)(p,{content:"buttonLogin"})))):null,(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Tooltip,{title:(0,a.createElement)(p,{content:"buttonChangePasswordHint"})},(0,a.createElement)(l.Action,{id:"buttonChangePassword",icon:{src:n(801)},href:`/admin/reseller/login-info/id/${e}`},(0,a.createElement)(p,{content:"buttonChangePassword"}))))),(0,a.createElement)(c.default,{id:"panel-reseller-toolsSection",title:(0,a.createElement)(p,{content:"toolsPanelTitle"})},(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Tooltip,{title:(0,a.createElement)(p,{content:"buttonIPAddressesHint"})},(0,a.createElement)(l.Action,{id:"buttonManageIpPool",icon:{src:n(818)},href:`/plesk/client@${e}/ipaddress@/`},(0,a.createElement)(p,{content:"buttonIPAddresses"})))),T?(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Tooltip,{title:(0,a.createElement)(p,{content:"buttonIisAppPoolHint"})},(0,a.createElement)(l.Action,{id:"buttonIisAppPool",icon:{src:n(803)},href:`/admin/iis-app-pool/settings/id/${e}`},(0,a.createElement)(p,{content:"buttonIisAppPool"})))):null,w?null:(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Tooltip,{title:(0,a.createElement)(p,{content:"buttonConvertToCustomerHint"})},(0,a.createElement)(l.Action,{id:"buttonConvertToCustomer",icon:{src:n(819)},onClick:async()=>{new(await Plesk.require("app/convert-resellers-to-customers"))({id:"convertResellersToCustomers",cls:"popup-panel",prepareUrl:"/admin/reseller/prepare-convert/",handlerUrl:"/admin/reseller/convert-to-customer/?redirect=/reseller/list/",ids:[e]})}},(0,a.createElement)(p,{content:"buttonConvertToCustomer"})))),(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Tooltip,{title:(0,a.createElement)(p,{content:"buttonRemoveHint"})},(0,a.createElement)(l.Action,{id:"buttonRemove",icon:{src:n(804)},onClick:()=>{r.messageBox.show({type:r.messageBox.TYPE_YESNO,subtype:r.messageBox.SUBTYPE_DELETE,text:d.lmsg("buttonRemoveResellerConfirmationTitle",{name:`<b>${o}</b>`}),description:d.lmsg("buttonRemoveResellerConfirmationDescription"),onYesClick(){(0,r.redirectPost)(`/reseller/delete-current/id/${e}`)}})}},(0,a.createElement)(p,{content:"buttonRemove"}))))));g.propTypes={id:i().number.isRequired,login:i().string.isRequired,contactName:i().string.isRequired,companyName:i().string.isRequired,emailAddress:i().string.isRequired,description:i().string.isRequired,setupDate:i().string.isRequired,isActive:i().bool.isRequired,ownCustomers:i().number.isRequired,ownPlans:i().number.isRequired,ownSubscriptions:i().number.isRequired,isIisAppPoolsPolicyMixed:i().bool,subscription:i().shape({name:i().string.isRequired,isLocked:i().bool.isRequired,isSynchronized:i().bool.isRequired})},g.defaultProps={isIisAppPoolsPolicyMixed:!1,subscription:void 0},t.default=g},793:(e,t,n)=>{"use strict";n.r(t);var a=n(153),o=n.n(a),i=n(154),l=n(261),r=n.n(l),s=n(578),c=n.n(s),m=n(613),d=n(155);const p=({baseClassName:e,className:t,id:n,title:a,children:l,...r})=>{const[s,p]=(0,m.useLocalStorage)("".concat(n,"-hidden"));return(0,i.createElement)(d.Panel,o()({className:c()(e,t),id:n,title:a?(0,i.createElement)(d.Heading,{level:4},a):null,collapsible:!!n,collapsed:!!a&&"true"===s,onToggle:()=>p("true"===s?"false":"true")},r),l)};p.propTypes={id:r().string,title:r().any,children:r().any.isRequired,className:r().string,baseClassName:r().string},p.defaultProps={id:void 0,title:void 0,className:void 0,baseClassName:"side-panel"},t.default=p},794:(e,t,n)=>{"use strict";n.r(t);var a=n(154),o=n(261),i=n.n(o),l=n(155),r=n(144);const s=r.Locale.getSection("components.forms.admin-info"),c=r.Locale.getTranslate("components.forms.admin-info"),m=r.Locale.getSection("components.buttons"),d=({url:e,data:t,objectType:n,object:o})=>Object.keys(t).map((i=>(0,a.createElement)("div",{className:"side-panel__item",key:i},(0,a.createElement)(l.Text,{intent:"muted"},(0,a.createElement)(c,{content:"description".concat(i.capitalize())}),":")," ",(0,a.createElement)("b",null,(0,a.createElement)("span",{id:"".concat(i,"-description")},t[i]))," ",(0,a.createElement)(l.AuxiliaryActions,null,(0,a.createElement)(l.Link,{id:"".concat(i,"-description-edit"),onClick:()=>((t,a)=>{new r.CustomDescription.PopupForm({id:"editDescription",cls:"popup-panel",hint:s.lmsg("popupHint".concat(t.capitalize())),value:a,locale:{popupTitle:s.lmsg("popupTitle".concat(n.capitalize()),{descriptionType:s.lmsg("description".concat(t.capitalize())),name:o}),buttonOk:m.lmsg("save"),buttonCancel:m.lmsg("cancel")},handler(n){(0,r.redirectPost)(e,{type:t,description:n})}})})(i,t[i])},t[i]?(0,a.createElement)(c,{content:"edit"}):(0,a.createElement)(c,{content:"add"})),t[i]?(0,a.createElement)(l.Link,{id:"".concat(i,"-description-remove"),onClick:()=>(t=>{r.messageBox.show({type:Jsw.messageBox.TYPE_YESNO,subtype:"delete",buttonTitles:{yes:m.lmsg("yes"),no:m.lmsg("no"),wait:m.lmsg("wait")},text:s.lmsg("confirmOnRemove"),onYesClick(){(0,r.redirectPost)(e,{type:t,description:""})}})})(i)},(0,a.createElement)(c,{content:"remove"})):null))));d.propTypes={url:i().string.isRequired,data:i().shape({admin:i().string,reseller:i().string,owner:i().string}).isRequired,objectType:i().oneOf(["reseller","customer","subscription"]).isRequired,object:i().string.isRequired},t.default=d},821:(e,t,n)=>{"use strict";n.r(t);var a=n(153),o=n.n(a),i=n(154),l=n(261),r=n.n(l),s=n(144),c=n(602),m=n(647),d=n(763),p=n(775),u=n(576),b=n(791),g=n(816);const E=s.Locale.getSection("admin.controllers.reseller.domains"),f=({id:e,tabs:t,...n})=>{const[a]=(0,d.useAddDomainFormInDrawer)(`/admin/reseller/domains/id/${e}`,`/admin/reseller/add-domain/id/${e}`);return(0,i.createElement)(i.Fragment,null,a,(0,i.createElement)(b.default,{items:t}),(0,i.createElement)(u.default,null,(()=>new s.Hint({hint:E.lmsg("hint")}))),(0,i.createElement)(p.default,o()({dataAction:"domains-list-data",deleteAction:"delete-domain"},n)))};f.propTypes={id:r().number.isRequired,tabs:r().array.isRequired},t.default=(0,c.withPageLayout)((0,m.withPageContent)(f),(({sidebarProps:e})=>({secondary:(0,i.createElement)(g.default,e)})))},820:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a.default});var a=n(821)},779:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/att-tr.png?f00bf7056f997d02b1565fff15ed7ab7"},801:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/change-password.png?54304f321bc897402075b73230593f04"},819:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/convert-to-customer.png?597b1b6aa17102a0d694f2acd4275f1e"},804:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/delete.png?27d654be29d57ad05641c2ff392035fa"},780:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/dns.png?d10cfc4afe5c5c040eaf99c3ea14429d"},795:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/edit-contact-info.png?052e4fc494a39464dad26f4f40e38eaf"},783:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/forward-to-dom.png?761778de5722f4bb1f3611d27968cb0f"},803:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/iis-app-pool.png?1bcf2ef7b099732f96f82bfb815c5146"},818:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/ip-pool.png?660f416531a7d16c58da56704aa08b79"},817:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/login.png?b68531bba0e522a3a35a90de80b8892a"},776:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/off.png?84d64d1bd3267c21795505b7daa43800"},782:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/spacer.png?4710d0e07ee1a4d7ebdb1972701168fa"},747:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/stats.png?6a39051adc0633466df48a83a804028c"},808:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/subscription-status-locked.png?791d616dde33b19ebd4b7fbf3b305ffe"},778:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/subscription-status-ok.png?6d52f91c87cbdc73b4ef0b5ded92c441"},777:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/subscription-status-suspended.png?7968ea094f0aa3fdced5d59b0c7f3196"},809:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/subscription-status-unsynchronized.png?c075e72041171bb35d0a9b6542518ccf"},781:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/website.png?ac6aa9eaf06048cbd5799a61daad9766"},773:e=>{e.exports=Jsw.skinUrl+"/images/code.svg?e9fb9feb605b8cf334414f688a603918"},774:e=>{e.exports=Jsw.skinUrl+"/images/upload-files.svg?e6091d3474a27a3eafe63b2d09b1b943"}}]);
//# sourceMappingURL=domains.js.map?581ffe143aa918787a1a