(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["views/admin/customer/domains"],{765:(e,t,n)=>{"use strict";n.r(t),n.d(t,{useAddDomainFormInDrawer:()=>x});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(766),g=n(722),b=n(767),E=n(576),f=n(769),h=n(770),w=n(772);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"),C=d.Locale.getTranslate("smb.components.forms.domain-info-section"),S=d.Locale.getTranslate("components.forms.ip-addresses-selector"),k=d.Locale.getTranslate("smb.components.forms.web._shared"),N=d.Locale.getTranslate("smb.components.forms.web.seo-settings"),A=d.Locale.getTranslate("admin.components.forms.admin-panel.form.contact-info"),D=d.Locale.getTranslate("components.buttons"),P=({id:e,showDomainRegistrationPromo:t,ipAddresses:a,allowCustomerCreation:l,allowWebspaceCreation:r,subscriptionsLookUpParams:s,canManageMailSettings:h,maxSysnameSize:P,isWindows:x,techDomain:R,settingsEnabled:I,settingsCollapsed:F,applicationWizardConfig:q,embeddedForms:H,applicationWizardEmbeddedForms:_,cancelLink:U,className:B,render:$,onProcess:L,onStepPropsChange:O,status:j,...z})=>{var V;const M=(0,c.useApolloClient)(),J=(0,m.useHistory)(),[W,Y]=(0,i.useState)(z.values),[G,Z]=(0,i.useState)(Boolean(z.values.hostingSettings.root)),[K,Q]=(0,i.useState)(!z.values.domainInfo),[X,ee]=(0,i.useState)(z.webspaceIpAddress),[te,ne]=(0,i.useState)(null);(0,i.useEffect)((()=>{if(G)return;let e=/^[a-zA-Z0-9\.\-\*]+$/.match(W.domainName.name)?W.domainName.name.replace(/\*/g,"_"):"";-1!==W.hostingSettings.rootPattern.indexOf("<domain>")&&(e=W.hostingSettings.rootPattern.replace("<domain>",e)),Y((0,p.setIn)(W,"hostingSettings[root]",e))}),[W.domainName.name]),(0,i.useEffect)((()=>{W.domainName.webspace&&"new"!==W.domainName.webspace.id&&M.query({query:v,variables:{id:btoa(`Domain:${W.domainName.webspace.id}`)}}).then((({data:{domain:{ipAddresses:e}}})=>{ee(e[0].ipAddress)}))}),[W.domainName.webspace]);const ae=(e,t)=>{switch(Y((n=>{if(n=(0,p.setIn)(n,e,t),"domainName[name]"===e&&!K){let e=/^[a-zA-Z0-9_.\-]+$/.match(t)?n.domainName.type===u.TYPE_TECH?t.split(".")[0]:t:"";e=e.toLowerCase().substr(0,P),x&&"."===e.substr(-1)&&(e=e.substr(0,e.length-1)),n=(0,p.setIn)(n,"domainInfo[userName]",e||z.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]":Z(!0);break;case"domainInfo[userName]":Q(!0)}},oe="1"===W.domainName.assignToCustomer||void 0!==W.domainName.targetWebspace||W.domainName.webspace&&"new"===W.domainName.webspace.id,ie=oe||!X?Object.keys(a).map((e=>{const t=W.domainInfo.ipSelector[e];return"none"===t?null:a[e][t].split(" ")[0]})).filter(Boolean)[0]:X;(0,i.useEffect)((()=>{q.enabled||null==O||O({sideBanner:n(777),sideBannerContainer:{background:"#faf5f7"}})}),[q.enabled]);const le=q.enabled?w.default:g.default;return(0,i.createElement)(le,{vertical:!0,id:e,className:B,render:$,values:W,onFieldChange:ae,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:e=>{ne(e),null==L||L(e),null==O||O({sideBanner:n(779),sideBannerContainer:{background:"#e0f3f9"}})},onStepChange:e=>{te||null==O||O("chooseApplicationStep"===e?{sideBanner:n(778),sideBannerContainer:{background:"#f3f4f5"}}:{sideBanner:n(777),sideBannerContainer:{background:"#faf5f7"}})},embeddedForms:H,wizardConfig:q,wizardEmbeddedForms:_,submitButton:{id:"btn-send",children:(0,i.createElement)(T,{content:"buttonAddDomain"})},applyButton:!1,cancelButton:!!U&&{id:"btn-cancel",children:(0,i.createElement)(D,{content:"cancel"}),onClick:()=>{J.push(U)}}},(j||[]).filter((({status:e})=>"warning"===e)).map((({content:e})=>(0,i.createElement)(p.StatusMessage,{intent:"warning",key:e},e))),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!==W.domainName.type,isDefault:W.domainName.type===u.TYPE_TECH,typeName:"domainName[type]",name:"domainName[name]",ipAddress:ie,onTypeChange:e=>ae("domainName[type]",e),onDomainNameChange:e=>ae("domainName[name]",e)},R)),void 0===W.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"===W.domainName.assignToCustomer?(0,i.createElement)(p.Section,{collapsible:!0},void 0===W.domainName.customer?null:(0,i.createElement)(b.default,{name:"domainName[customer]",label:(0,i.createElement)(T,{content:"customer"}),dataUrl:"/admin/customer/look-up",newItemValue:l?{id:"new",title:y.lmsg("createNewCustomer")}:null,locale:{label:y.lmsg("selectExistingCustomer")},required:!0}),void 0===W.domainName.customer||"new"===(null===(V=W.domainName.customer)||void 0===V?void 0:V.id)?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(p.FormFieldText,{name:"customerInfo[customerContactInfo][contactName]",label:(0,i.createElement)(A,{content:"contactName"}),required:!0}),(0,i.createElement)(p.FormFieldText,{name:"customerInfo[customerContactInfo][email]",label:(0,i.createElement)(A,{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===W.domainName.webspace||"1"===W.domainName.assignToCustomer?null:(0,i.createElement)(p.Section,null,(0,i.createElement)(b.default,{name:"domainName[webspace]",label:(0,i.createElement)(T,{content:"target"}),dataUrl:"/smb/web/subscription-look-up",newItemValue:r?{id:"new",title:y.lmsg("createNewTarget")}:null,locale:{label:y.lmsg("selectExistingTarget")},lookUpParams:s,required:!0})),oe?I?(0,i.createElement)(p.Section,{id:"domainInfo",title:(0,i.createElement)(T,{content:"webspaceLegend"}),collapsible:!0,collapsed:F},Object.keys(a).map((e=>(0,i.createElement)(p.FormFieldSelect,{key:e,name:`domainInfo[ipSelector][${e}]`,label:(0,i.createElement)(S,{content:Object.keys(a).length>1?`${e}Address`:"ipAddress"}),required:!0},Object.keys(a[e]).map((t=>(0,i.createElement)(p.SelectOption,{key:t,value:t},a[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:x?"credentialsHintWin":"credentialsHint"})),(0,i.createElement)(p.FormFieldText,{name:"domainInfo[userName]",label:(0,i.createElement)(C,{content:"userName"}),required:!0}),(0,i.createElement)(p.FormFieldPassword,{name:"domainInfo[password]",label:(0,i.createElement)(C,{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===W.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:W.domainName.type===u.TYPE_TECH,checkedValue:W.domainName.type===u.TYPE_TECH?null:"master",uncheckedValue:W.domainName.type===u.TYPE_TECH?null:"none"}),void 0===W.mailSettings?null:(0,i.createElement)(p.FormFieldCheckbox,{name:"mailSettings[mail]",label:(0,i.createElement)(T,{content:"mail"}),description:h?(0,i.createElement)(T,{content:"mailHint"}):(0,i.createElement)(T,{content:"mailHintNoPermission"}),disabled:W.domainName.type===u.TYPE_TECH,checkedValue:W.domainName.type===u.TYPE_TECH?null:"1",uncheckedValue:W.domainName.type===u.TYPE_TECH?null:"0"}),"hosting"===W.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)(k,{content:"documentRoot"}),description:(0,i.createElement)(k,{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.${W.domainName.name||"<your_domain>"}`},{value:"non-www",label:W.domainName.name||"<your_domain>"},{value:"none",label:(0,i.createElement)(N,{content:"seoRedirectDirectionNone"})}]})):null,"forwarding"===W.hostingType.hosting?(0,i.createElement)(p.Section,{id:"forwardingSettings",title:(0,i.createElement)(k,{content:"forwardingSettingsSectionLegend"}),collapsible:!0,collapsed:!0},(0,i.createElement)(p.FormFieldText,{name:"forwardingSettings[forwardTo]",label:(0,i.createElement)(k,{content:"forwardDestination"}),description:(0,i.createElement)(k,{content:"forwardDestinationHint"}),required:!0}),(0,i.createElement)(p.FormFieldRadioButtons,{name:"forwardingSettings[forwardingType]",label:(0,i.createElement)(k,{content:"forwardingTypeOptions"}),options:[{value:"std_fwd301",label:(0,i.createElement)(k,{content:"forwardingHttpCode301"}),description:(0,i.createElement)(k,{content:"forwardingHttpCode301Hint"})},{value:"std_fwd302",label:(0,i.createElement)(k,{content:"forwardingHttpCode302"}),description:(0,i.createElement)(k,{content:"forwardingHttpCode302Hint"})},{value:"frm_fwd",label:(0,i.createElement)(k,{content:"forwardingFrame"}),description:(0,i.createElement)(k,{content:"forwardingFrameHint"})}]})):null))};P.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,onStepPropsChange:r().func,status:r().array},P.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,onStepPropsChange:void 0,status:void 0};const x=(e,t)=>(0,h.default)(P,"add-domain",e,t);t.default=P},772:(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(773),m=n(774);const d=s.Locale.getTranslate("components.domain-applications.applications"),p=({onFieldChange:e,onStepChange:t,formPrefix:a,wizardConfig:l,embeddedForms:r,wizardEmbeddedForms:s,values:p,children:u,...g})=>{const[b,E]=(0,i.useState)([]),f=t=>{e("applicationName",t),E([...s.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}]})))])},h=[l.blankSite&&{name:"blank-site",icon:n(775),title:(0,i.createElement)(d,{content:"blank-site.title"}),description:(0,i.createElement)(d,{content:"blank-site.description"})},l.uploadFiles&&{name:"upload-files",icon:n(776),title:(0,i.createElement)(d,{content:"upload-files.title"}),description:(0,i.createElement)(d,{content:"upload-files.description"})},...s.map((({ext:e,name:t,title:n,icon:a,description:o})=>({name:`ext-${e}-${t}`,icon:a,title:n,description:o})))].filter(Boolean),w=[h.length>1&&{key:"chooseApplicationStep",children:(0,i.createElement)(c.default,{onApplicationSelect:f,applicationsList:h}),nextButton:!1},{key:"addDomainStep",formPrefix:a,children:u,embeddedForms:r}].filter(Boolean);(0,i.useEffect)((()=>{if(0===h.length&&f("blank-site"),1===h.length){const[{name:e}]=h;f(e)}}),[]);const v=p.applicationName&&1!==w.length?1:0;return(0,i.useEffect)((()=>{null==t||t(w[v].key)}),[v]),(0,i.createElement)(m.default,o()({},g,{values:p,onFieldChange:e,onStepChange:(t,n)=>0===n&&w.length>1?(e("applicationName",null),E([]),t):n,step:v,steps:[...w,...b]}))};p.propTypes={values:r().object.isRequired,onFieldChange:r().func.isRequired,onStepChange:r().func,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,onStepChange:void 0,formPrefix:"",wizardConfig:{enabled:!0,blankSite:!0,uploadFiles:!0},embeddedForms:[],wizardEmbeddedForms:[]},t.default=p},773:(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.isRequired,applicationsList:l().arrayOf(l().shape({name:l().string.isRequired,icon:l().string.isRequired,title:l().node,description:l().node}))},s.defaultProps={applicationsList:[]},t.default=s},780:(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),c=n(781);const m=l.Locale.getSection("admin.components.lists.domains"),d=l.Locale.getSection("components.icp-permit"),p=({action:e}={})=>{const t=window.location.pathname.split("/");return e&&(t[3]=e),t.join("/")},u=({data:e,searchFilters:t,dataAction:o,deleteAction:u,allowCreateDomain:g,allowManageSubdomain:b,allowManageDomainAliases:E,showDeleteButton:f,isHomonymSearchEnabled:h,showOwnerName:w,showExpirationDate:v,userId:y,icpPermitSupported:T,icpPermitLink:C})=>{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:p({action:o}),searchFilters:t,searchOveral:"domainName",disabledSelectHint:m.lmsg("disabledSelectHint"),operations:[g?{componentType:l.SmallButton,id:"buttonAddDomain",cls:"s-btn sb-new-domain",title:m.lmsg("buttonAddDomain"),description:m.lmsg("hintAddDomain"),href:p({action:"add-domain"}),handler:k}:null,b?{componentType:l.SmallButton,id:"buttonAddSubDomain",cls:"s-btn sb-new-subdomain",title:m.lmsg("buttonAddSubdomain"),description:m.lmsg("hintAddSubdomain"),href:p({action:"add-subdomain"})}:null,E?{componentType:l.SmallButton,id:"buttonAddDomainAlias",cls:"s-btn sb-new-domain-alias",title:m.lmsg("buttonAddDomainAlias"),description:m.lmsg("hintAddDomainAlias"),href:p({action:"add-domain-alias"})}:null,g||b||E?{componentType:l.bar.Separator}:null,{componentType:l.list.AdditionalActions,title:m.lmsg("buttonChangeStatus"),operations:[{componentType:l.SmallButton,id:"buttonSuspendDomains",title:m.lmsg("buttonSuspendDomains"),description:m.lmsg("hintSuspendDomains"),addCls:"sb-suspend",cls:"sb-btn",handler(){(0,l.getComponent)("domains-list").execGroupOperation({url:`/domain/suspend/?redirect=${p()}`,skipConfirmation:!0})}},{componentType:l.SmallButton,id:"buttonDisableDomains",title:m.lmsg("buttonDisableDomains"),description:m.lmsg("hintDisableDomains"),addCls:"sb-turn-off",cls:"sb-btn",handler(){(0,l.getComponent)("domains-list").execGroupOperation({url:`/domain/disable/?redirect=${p()}`,skipConfirmation:!0})}},{componentType:l.SmallButton,id:"buttonActivateDomains",title:m.lmsg("buttonActivateDomains"),description:m.lmsg("hintActivateDomains"),addCls:"sb-activate",cls:"sb-btn",handler(){(0,l.getComponent)("domains-list").execGroupOperation({url:`/domain/activate/?redirect=${p()}`,skipConfirmation:!0})}}]},f?{componentType:l.bar.Separator}:null,f?{componentType:l.SmallButton,id:"buttonRemoveSite",title:l.Locale.getSection("components.buttons").lmsg("remove"),description:m.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:p({action:u}),subtype:l.messageBox.SUBTYPE_DELETE,mouseEvent:e,text:m.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?m.lmsg("removeConfirmationSubscription",{domains:a.join(", ")}).replace(/\n/gm,"<br>"):"",isAjax:h,requestUrl:p({action:"search-homonym-data"}),loadingTitle:l.Locale.getSection("components.homonyms").lmsg("loading")})}}:null].filter(Boolean),columns:[l.list.COLUMN_SELECTION,{header:m.lmsg("domainName"),sortable:!0,dataIndex:"domainDisplayName",renderer(e){const t=e.overviewUrl?(0,l.createElement)("a",{href:(0,l.prepareUrl)(e.overviewUrl),onclick:k},(0,l.escapeHtml)(e.domainDisplayName)):(0,l.escapeHtml)(e.domainDisplayName);if(parseInt(e.domainStatus)){const a="suspend"===e.turnOffAction,o=a?m.lmsg("statusSuspended"):m.lmsg("statusDisabled"),i=n(a?782:783),r=a?"suspended":"disabled";return(0,l.createElement)(".b-indent",[(0,l.createElement)("span.b-indent-icon",(0,l.createElement)("span",[(0,l.createElement)("span.tooltipData",o),(0,l.createElement)("img",{src:i,alt:r,title:""})])),t,...(0,c.default)(e,m)])}return(0,l.createElement)(".",[t,...(0,c.default)(e,m)])}},T?{header:d.lmsg("icpPermit"),sortable:!0,dataIndex:"icpStatus",renderer({icpStatus:e,icpPermit:t}){const a=1==e?d.lmsg("icpStatusAllowedDescription"):d.lmsg("icpStatusNotAllowedDescription"),o=n(1==e?784:785);let i=t?(0,l.escapeHtml)(t):1==e?"":d.lmsg("icpStatusNotAllowed");return C&&(i=`<a href="${C}" target="_blank">${i}</a>`),`<span class="tooltipData">${a}</span><img src="${o}" alt="" /> ${i}`}}:null,{header:m.lmsg("hostingType"),sortable:!0,dataIndex:"hostingType",renderer(e){let t="";return"alias"===e.hostingType?t=`<img src="${n(786)}"/> ${m.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(787)}"/> ${m.lmsg(e.parentDomainId>0?"subdomainWebsite":"website")}`:"none"===e.hostingType?t=`<img src="${n(788)}"/><em class="hint">${m.lmsg("noHosting")}</em>`:"frm_fwd"!==e.hostingType&&"std_fwd"!==e.hostingType||(t=`<img src="${n(789)}"/> ${m.lmsg("forwardingTo")} <a href="${(0,l.escapeHtml)(e.forwardingUrl)}" target="_blank">${(0,l.escapeHtml)(e.forwardingDisplayUrl)}</a>`),t}},w?{header:m.lmsg("ownerName"),sortable:!0,dataIndex:"ownerName",renderer({ownerId:e,ownerType:t,ownerName:n,ownerCompanyName:a}){let o=null;return parseInt(e)!==y&&("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,v?{header:m.lmsg("expirationDate"),sortable:!1,dataIndex:"expirationDate",renderer:({expirationDateString:e})=>e?(0,l.escapeHtml)(e):"&mdash;"}:null,{header:m.lmsg("diskUsage"),sortable:!0,dataIndex:"realSize",renderer:({diskUsage:e})=>(0,l.escapeHtml)(e)},{header:m.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",m.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",m.lmsg("previewSite")))}},{header:"",sortable:!1,renderer({manageUrl:e,ownerId:t,ownerType:n}){if(!e||parseInt(t)===y)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",m.lmsg("reseller"===n?"manageInResellerPanel":"manageInCustomerPanel")))}}].filter(Boolean)})]})))};u.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},u.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=u},771:(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),p=n(582);const u="running",g=()=>(0,r.getComponent)("asyncProgressBarWrapper"),b=({children:e,dataType:t,isOpen:n,onClose:a,task:s,history:c,pageUrl:b,...E})=>{const[f,h]=(0,i.useState)([]),[w,v]=(0,i.useState)(null),[y,T]=(0,i.useState)(null),[C,S]=(0,i.useState)(null),k=s?s.id:null,{addToast:N}=(0,d.useToaster)(),A=()=>c&&y&&(0,p.isMatch)(y)&&!((e,t)=>{if(e===t)return!0;try{const n=new URLSearchParams(new URL(e,window.location.origin).search);return n.get("returnUrl")===t||n.get("pageUrl")===t}catch(e){}return!0})(y,b),D=({id:e,steps:t,status:a,errors:o,output:l,progressValue:s,progressTitle:c,progressTitleHtml:m})=>{if(!n||k!==e)return;const d=m||c,p=r.Task.STATUS_STARTED===a?u:a,g=e=>(e||[]).map((e=>(0,i.createElement)("div",{key:e},e)));S(p),t&&t.length?(v(d),h(t.map((({errors:e,...t})=>({children:g(e),...t}))))):h([{title:d,status:p,progress:Number(s),children:(0,i.createElement)(i.Fragment,null,g(o),g(l))}])};(0,i.useEffect)((()=>{const e=g();n?(null==e||e.hide(),h([]),v(null),T(null),S(null)):(async()=>{P()||await x(),null==e||e.show()})()}),[n]),(0,i.useEffect)((()=>{var e;k&&(null===(e=g())||void 0===e||e.update(),D(s))}),[k,s]),(0,m.default)("plesk:taskStepUpdate",D,r.Observer),(0,m.default)("plesk:taskComplete",(({id:e,redirect:t,status:a})=>{n&&k===e&&r.Task.STATUS_DONE===a&&T(t.url||t)}),r.Observer);const P=()=>r.Task.STATUS_NOT_STARTED===C||u===C,x=()=>{var e,t;return k&&(null===(e=g())||void 0===e||null===(t=e.getItems().find((e=>e.getId()===k)))||void 0===t?void 0:t.remove())};return(0,i.createElement)(l.Drawer,o()({"data-type":t,isOpen:n,onClose:()=>{y?A()?c.push(y,{reload:!0}):(0,r.redirect)(y):a()},progress:f.length?{cancelable:!1,title:w,steps:f,onFinish:()=>{x(),N({intent:"success",message:w||f[0].title})},autoCloseTimeout:1}:null,hideButton:P()},E),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}),history:c().object,pageUrl:c().string},b.defaultProps={children:null,isOpen:!1,task:null,history:null,pageUrl:null},t.default=b},767:(e,t,n)=>{"use strict";n.r(t);var a=n(154),o=n(261),i=n.n(o),l=n(155),r=n(768);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},768:(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}},774:(e,t,n)=>{"use strict";n.r(t);var a=n(153),o=n.n(a),i=n(155),l=n(154),r=n(722),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,g]=(0,l.useState)(0),b=u+e,{children:E,formPrefix:f,embeddedForms:h,backButton:w,nextButton:v}={backButton:{},nextButton:{},...t[b]},y=b===t.length-1,T=0===b,C=()=>{p.current.handleEmbeddedFormValues(),g((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(),g((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:C,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:C,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}));g(n(b,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},769:(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},781:(e,t,n)=>{"use strict";n.r(t);var a=n(144);t.default=({adminDescription:e,resellerDescription:t,ownerDescription:n,hideResellerTitleDescription:o,hideOwnerTitleDescription:i},l,r="hint")=>[e?(0,a.createElement)(`.${r}`,[(0,a.escapeHtml)(e.truncate(50,"...")),(0,a.createElement)("span.tooltipData",(0,a.escapeHtml)(e))]):"",t?(0,a.createElement)(`.${r}`,[`${o?"":`${l.lmsg("resellerDescription")}: `}${(0,a.escapeHtml)(t.truncate(50,"..."))}`,(0,a.createElement)("span.tooltipData",(0,a.escapeHtml)(t))]):"",n?(0,a.createElement)(`.${r}`,[`${i?"":`${l.lmsg("ownerDescription")}: `}${(0,a.escapeHtml)(n.truncate(50,"..."))}`,(0,a.createElement)("span.tooltipData",(0,a.escapeHtml)(n))]):""]},797:(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},766:(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)(g,{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)(b,{name:r,ipAddress:s,url:n,vendor:a,onDomainNameChange:c}):(0,l.createElement)(g,{name:r,isEnabled:!0,onDomainNameChange:c}))},g=({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()}))))));g.propTypes={name:s().string.isRequired,isEnabled:s().bool.isRequired,onDomainNameChange:s().func.isRequired};const b=({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"})))));b.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),[g,b]=(0,l.useState)({}),E=(0,l.useCallback)((async()=>{if(b({}),!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 b({error:(0,l.createElement)(p,{content:"error"})});s(t),u(n)}catch{b({error:(0,l.createElement)(p,{content:"error"})})}finally{m(!1)}}else b({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(g).map((e=>(0,l.createElement)(i.Alert,{key:e,intent:"danger"},(0,l.createElement)(i.Icon,{name:"exclamation-mark-circle-filled",intent:"danger"})," ",g[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},770:(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(771);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),g=(0,s.useHistory)(),[b,E]=(0,i.useState)(null),[f,h]=(0,i.useState)(null),[w,v]=(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 y=()=>{g.push(n)};return[(0,i.createElement)(d.default,o()({dataType:t,title:b?b.pageTitle:"",size:"sm",isOpen:u,onClose:y,form:b?(0,i.createElement)(e,o()({onCancel:y,onProcess:h,onStepPropsChange:v},b)):null,task:f,history:g,pageUrl:n},w),b?null:(0,i.createElement)(c.ContentLoader,null))]}},798:(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(799),m=n(800);const d=r.Locale.getSection("admin.components.customer-sidebar"),p=r.Locale.getTranslate("admin.components.customer-sidebar"),u=r.Locale.getTranslate("admin.components.elements.status"),g=({id:e,canCreateClients:t,contactName:o,companyName:i,emailAddress:g,setupDate:b,isAdmin:E,resellersSupport:f,hasLegacyResources:h,isActive:w,username:v,allowLogIn:y,provider:T,hasResellers:C,hasResellerCustomers:S,description:k,isIisAppPoolsPolicyMixed:N})=>{const A=(t,n)=>{r.messageBox.show({type:r.messageBox.TYPE_YESNO,subtype:r.messageBox.SUBTYPE_TOGGLE,text:d.lmsg("applyConfirmation"),onYesClick(){(0,r.redirectPost)(`/business-model-upgrade/manual-customer-solution/solution/${n}`,{redirect:`/customer/overview/id/${e}`,ids:[e]})},needAttention:!0,needAttentionText:t,needAttentionBlockSubmit:!0})};return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(c.default,{id:"panel-customer-overviewSection"},(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.Tooltip,{title:(0,a.createElement)(p,{content:"buttonEditContactHint"})},(0,a.createElement)(l.Action,{id:"buttonEditContactInfo",icon:{src:n(801)},href:`/admin/customer/personal-info/id/${e}`},(0,a.createElement)(p,{content:"buttonEditContact"})))),E&&f?(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Tooltip,{title:(0,a.createElement)(p,{content:"buttonConvertToResellerHint"})},(0,a.createElement)(l.Action,{id:"buttonConvertToReseller",icon:{src:n(802)},onClick:async()=>{new(await Plesk.require("app/convert-customers-to-resellers"))({id:"convertCustomersToReseller",cls:"popup-panel",prepareUrl:"/admin/customer/prepare-convert/",handlerUrl:"/admin/customer/convert-to-reseller/?redirect=/customer/list/",ids:[e]})}},(0,a.createElement)(p,{content:"buttonConvertToReseller"})))):null,h?(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Popover,{title:(0,a.createElement)(l.Heading,{level:5},(0,a.createElement)(p,{content:"bunchSolutionsAction"})),target:(0,a.createElement)("a",{id:"bunchSolutionsLink"},(0,a.createElement)(p,{content:"bunchSolutions"})),placement:"left",className:"side-panel-popover"},(0,a.createElement)("div",{className:"side-panel-popover__item"},(0,a.createElement)(l.Action,{id:"t1s1ApplyButton",icon:{src:n(803)},onClick:()=>A(d.lmsg("t1s1ApplyHint"),"t1s1")},(0,a.createElement)(p,{content:"t1s1ApplyButton"}))),(0,a.createElement)("div",{className:"side-panel-popover__item"},(0,a.createElement)(l.Action,{id:"t1s2ApplyButton",icon:{src:n(804)},onClick:()=>A(d.lmsg("t2s1ApplyHint"),"t1s2")},(0,a.createElement)(p,{content:"t1s2ApplyButton"}))),(0,a.createElement)("div",{className:"side-panel-popover__item"},(0,a.createElement)(l.Action,{id:"t1s3ApplyButton",icon:{src:n(805)},onClick:()=>A(d.lmsg("t1s3ApplyHint"),"t1s3")},(0,a.createElement)(p,{content:"t1s3ApplyButton"}))),(0,a.createElement)("div",{className:"side-panel-popover__item"},(0,a.createElement)(l.Action,{id:"t1s6cApplyButton",icon:{src:n(803)},onClick:()=>A(d.lmsg("t1s6cApplyHint"),"t1s6c")},(0,a.createElement)(p,{content:"t1s6cApplyButton"}))),"admin"===(null==T?void 0:T.type)?(0,a.createElement)("div",{className:"side-panel-popover__item"},(0,a.createElement)(l.Action,{id:"t1s6rApplyButton",icon:{src:n(806)},onClick:()=>A(d.lmsg("t1s6rApplyHint"),"t1s6r")},(0,a.createElement)(p,{content:"t1s6rApplyButton"}))):null)):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,b)),(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:w?"success":"danger"},w?(0,a.createElement)(u,{content:"onStateCustomer"}):(0,a.createElement)(u,{content:"offStateCustomer"})))," ",(0,a.createElement)(l.AuxiliaryActions,null,(0,a.createElement)(l.Tooltip,{title:w?(0,a.createElement)(p,{content:"buttonSuspendHint"}):(0,a.createElement)(p,{content:"buttonActivateHint"})},(0,a.createElement)("a",{id:"buttonToggle",onClick:()=>{(0,r.redirectPost)(`/admin/customer/toggle/id/${e}`)}},w?(0,a.createElement)(p,{content:"buttonSuspend"}):(0,a.createElement)(p,{content:"buttonActivate"}))))),T?(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Text,{intent:"muted"},(0,a.createElement)(p,{content:"provider"}),":")," ",(0,a.createElement)("b",null,"reseller"===T.type&&f?(0,a.createElement)(s.default,{to:`/admin/reseller/overview/id/${T.id}`},T.name):T.name)," ",E&&C&&(f||S)?(0,a.createElement)(l.AuxiliaryActions,null,(0,a.createElement)("a",{id:"buttonChangeOwner",onClick:async()=>{new(await Plesk.require("app/change-customers-owner"))({id:"changeOwner",cls:"popup-panel",prepareUrl:"/admin/customer/prepare-change-owner/",handlerUrl:`/admin/customer/change-owner/?redirect=/customer/overview/id/${e}`,ids:[e]})}},(0,a.createElement)(p,{content:"buttonChangeOwner"}))):null):null,(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,v)),(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(807)},href:`/admin/customer/login-info/id/${e}`},(0,a.createElement)(p,{content:"buttonChangePassword"})))),y?(0,a.createElement)("div",{className:"side-panel__item"},(0,a.createElement)(l.Tooltip,{title:(0,a.createElement)(p,{content:"buttonLoginAsCustomerHint"})},(0,a.createElement)(l.Action,{id:"buttonLogin",icon:{src:n(808)},href:`/admin/customer/login/id/${e}`},(0,a.createElement)(p,{content:"buttonLoginAsCustomer"})))):null,(0,a.createElement)(m.default,{url:`/admin/customer/edit-description/id/${e}`,data:{owner:k},object:o,objectType:"customer"})),N?(0,a.createElement)(c.default,{id:"panel-customer-iisAppPoolSection"},(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(809)},href:`/admin/iis-app-pool/settings/id/${e}`},(0,a.createElement)(p,{content:"buttonIisAppPool"}))))):null,t?(0,a.createElement)(c.default,{id:"panel-customer-removeSection"},(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(810)},onClick:()=>{r.messageBox.show({type:r.messageBox.TYPE_YESNO,subtype:r.messageBox.SUBTYPE_DELETE,text:d.lmsg("buttonRemoveCustomerConfirmationTitle",{name:`<b>${o}</b>`}),description:d.lmsg("buttonRemoveCustomerConfirmationDescription"),onYesClick(){(0,r.redirectPost)(`/customer/delete-current/id/${e}`)}})}},(0,a.createElement)(p,{content:"buttonRemove"}))))):null)};g.propTypes={id:i().number.isRequired,canCreateClients:i().bool.isRequired,contactName:i().string.isRequired,companyName:i().string.isRequired,emailAddress:i().string.isRequired,setupDate:i().string.isRequired,isAdmin:i().bool.isRequired,resellersSupport:i().bool.isRequired,hasLegacyResources:i().bool.isRequired,isActive:i().bool.isRequired,username:i().string.isRequired,allowLogIn:i().bool.isRequired,provider:i().shape({id:i().number.isRequired,type:i().string.isRequired,name:i().string.isRequired}),hasResellers:i().bool.isRequired,hasResellerCustomers:i().bool.isRequired,description:i().string.isRequired,isIisAppPoolsPolicyMixed:i().bool},g.defaultProps={provider:void 0,isIisAppPoolsPolicyMixed:!1},t.default=g},799:(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},800:(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},796:(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(648),d=n(765),p=n(780),u=n(576),g=n(797),b=n(798);const E=s.Locale.getSection("admin.controllers.customer.domains"),f=({tabs:e,id:t,...n})=>{const[a]=(0,d.useAddDomainFormInDrawer)(`/admin/customer/domains/id/${t}`,`/admin/customer/add-domain/id/${t}`);return(0,i.createElement)(i.Fragment,null,a,(0,i.createElement)(g.default,{items:e}),(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)(b.default,e)})))},795:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a.default});var a=n(796)},785:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/att-tr.png?f00bf7056f997d02b1565fff15ed7ab7"},807:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/change-password.png?54304f321bc897402075b73230593f04"},802:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/convert-to-reseller.png?92f150ae967d586471eabfbb347d4dfd"},810:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/delete.png?27d654be29d57ad05641c2ff392035fa"},786:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/dns.png?d10cfc4afe5c5c040eaf99c3ea14429d"},801:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/edit-contact-info.png?052e4fc494a39464dad26f4f40e38eaf"},789:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/forward-to-dom.png?761778de5722f4bb1f3611d27968cb0f"},809:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/iis-app-pool.png?1bcf2ef7b099732f96f82bfb815c5146"},804:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/inherits-from-client.png?a22fe751c94ac0dc04f942415c0e8865"},805:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/inherits-from-domain.png?386f7e5dc544dc203b31ce3934eb982d"},803:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/inherits-the-lesser.png?6a711e632da0050efe725b03bca9aeb4"},808:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/login-as-customer.png?f61b4adc663106baef7704c16dd4d207"},783:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/off.png?84d64d1bd3267c21795505b7daa43800"},788:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/spacer.png?4710d0e07ee1a4d7ebdb1972701168fa"},784:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/subscription-status-ok.png?6d52f91c87cbdc73b4ef0b5ded92c441"},782:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/subscription-status-suspended.png?7968ea094f0aa3fdced5d59b0c7f3196"},806:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/upgrade-to-reseller.png?ad970c843c70a8c819528d90d01395b0"},787:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/website.png?ac6aa9eaf06048cbd5799a61daad9766"},779:e=>{e.exports=Jsw.skinUrl+"/images/add-domain/process.svg?2cd8b0c86019c2d951acd8c173a6974f"},778:e=>{e.exports=Jsw.skinUrl+"/images/add-domain/step1.svg?cdb98922dc6afaf36776f30b81762d6d"},777:e=>{e.exports=Jsw.skinUrl+"/images/add-domain/step2.svg?5c9d5f36abe3d2707367cb8a7f9e432a"},775:e=>{e.exports=Jsw.skinUrl+"/images/code.svg?e9fb9feb605b8cf334414f688a603918"},776:e=>{e.exports=Jsw.skinUrl+"/images/upload-files.svg?e6091d3474a27a3eafe63b2d09b1b943"}}]);
//# sourceMappingURL=domains.js.map?9c722c3dfbeba302ba9c