D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
psa
/
admin
/
cp
/
public
/
javascript
/
views
/
admin
/
customer
/
Filename :
domains.js
back
Copy
(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["views/admin/customer/domains"],{1626:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>b});var s=t(285),i=t(596),a=t.n(i),o=t(611),r=t.n(o),l=t(89),d=t(580),c=t(1627),m=t(1629),p=t(1630);t(1632);const u=l.Locale.getTranslate("components.domain-applications.applications"),g=e=>`ext-${e}`,h=({onFieldChange:e,onStepChange:n,formPrefix:i="",wizardConfig:a={enabled:!0,blankSite:!0,uploadFiles:!0,mailHosting:!0},isMailServiceSupported:o,embeddedForms:l=[],extensionButtons:h=[],values:b,children:x=null,entity:f,className:j,...v})=>{const w=(0,d.useLocation)(),[y,S]=(0,s.useState)((()=>new URLSearchParams(w.search).get("appName"))),T=n=>{e("applicationName",n)},k=[a.blankSite&&{name:"blank-site",icon:t(1633),title:(0,s.jsx)(u,{content:"blank-site.title"}),description:(0,s.jsx)(u,{content:"blank-site.description"})},a.uploadFiles&&{name:"upload-files",icon:t(1634),title:(0,s.jsx)(u,{content:"upload-files.title"}),description:(0,s.jsx)(u,{content:"upload-files.description"})},...h.map((({id:e,extensionId:n,title:t,icon:s,description:i})=>({name:g(n),id:e,icon:s,title:t,description:i}))),a.mailHosting&&o&&{name:"mail-hosting",icon:t(1635),title:(0,s.jsx)(u,{content:"mail-hosting.title"}),description:(0,s.jsx)(u,{content:"mail-hosting.description"})}].filter(Boolean),C=b.applicationName?k.find((({name:e})=>e===b.applicationName)):null,N=C&&k.length>1,I=[k.length>1&&{key:"chooseApplicationStep",children:(0,s.jsx)(c.default,{onApplicationSelect:T,applicationsList:k}),nextButton:!1},{key:"addDomainStep",formPrefix:i,children:(0,s.jsxs)(s.Fragment,{children:[N&&(0,s.jsx)(p.default,{icon:C.icon,applicationTitle:C.title,entity:f}),x]}),embeddedForms:l}].filter(Boolean);if((0,s.useEffect)((()=>{if(0===k.length&&T("blank-site"),1===k.length){const[{name:e}]=k;T(e)}}),[]),y&&!b.applicationName&&k.length>1){const e=k.find((({name:e})=>e===y||e===g(y)));e&&T(e.name)}const D=b.applicationName&&1!==I.length?1:0;return(0,s.useEffect)((()=>{n?.(I[D].key)}),[D]),(0,s.jsx)(m.default,{...v,className:r()(j,{"application-wizard-form__with-selected-info":N}),values:b,onFieldChange:e,onStepChange:(n,t)=>0===t&&I.length>1?(e("applicationName",null),y&&(S(null),window.history.replaceState(null,"",w.pathname)),n):t,step:D,steps:I})};h.propTypes={values:a().object.isRequired,className:a().string,onFieldChange:a().func.isRequired,onStepChange:a().func,children:a().node,formPrefix:a().string,wizardConfig:a().shape({enabled:a().bool,blankSite:a().bool,uploadFiles:a().bool}),isMailServiceSupported:a().bool.isRequired,embeddedForms:a().array,extensionButtons:a().array,entity:a().oneOf(["domain","subscription"])};const b=h},1627:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>c});var s=t(286),i=t(596),a=t.n(i),o=t(89),r=(t(1628),t(285));const l=o.Locale.getTranslate("components.domain-applications"),d=({onApplicationSelect:e,applicationsList:n=[]})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.Heading,{level:"3",children:(0,r.jsx)(l,{content:"title"})}),(0,r.jsx)(s.ItemList,{minColumnWidth:220,gap:"xs",selectable:!0,stretchable:!0,children:n.map((({id:n,name:t,icon:i,title:a,description:o})=>(0,r.jsx)(s.Item,{"data-action":t,role:"button",icon:(0,r.jsx)(s.Icon,{src:i,intent:"info",size:"48",className:"choose-application-step__icon"}),"data-testid":"listItem","data-cy":n??t,title:(0,r.jsx)(s.Heading,{level:"4",children:a}),onClick:()=>e(t),children:(0,r.jsx)(s.Paragraph,{children:o})},t)))})]});d.propTypes={onApplicationSelect:a().func.isRequired,applicationsList:a().arrayOf(a().shape({name:a().string.isRequired,icon:a().string.isRequired,title:a().node,description:a().node}))};const c=d},1629:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>m});var s=t(286),i=t(285),a=t(1289),o=t(89),r=t(596),l=t.n(r);const d=o.Locale.getTranslate("components.buttons"),c=({step:e=0,steps:n=[],onStepChange:t=(e,n)=>n,onSubmit:o,submitButton:r={},cancelButton:l={},...c})=>{const m=(0,i.useRef)(),[p,u]=(0,i.useState)(0),g=p+e,{children:h,formPrefix:b,embeddedForms:x,backButton:f,nextButton:j}={backButton:{},nextButton:{},...n[g]},v=g===n.length-1,w=0===g,y=n[g]?.key??g,S=()=>{m.current.handleEmbeddedFormValues(),u((n=>t(n+e,n+e-1)-e))},T=()=>{m.current.handleEmbeddedFormValues(),u((n=>t(n+e,n+e+1)-e))},k=()=>m.current.submit();return(0,i.jsx)(a.default,{...c,ref:m,additionalButtons:(()=>{const e=[w&&l&&(0,i.jsx)(s.Button,{id:"btn-cancel","data-type":y,children:(0,i.jsx)(d,{content:"cancel"}),...l},"cancel"),!w&&f&&(0,i.jsx)(s.Button,{id:"btn-back","data-type":y,arrow:"backward",onClick:S,children:(0,i.jsx)(d,{content:"back"}),...f},"back"),!v&&j&&(0,i.jsx)(s.Button,{id:"btn-next","data-type":y,intent:"primary",onClick:T,arrow:"forward",children:(0,i.jsx)(d,{content:"nextWithoutArrow"}),...j},"next")];return v&&r&&e.push((0,i.isValidElement)(r)?(0,i.cloneElement)(r,{handleSubmit:k}):(0,i.jsx)(s.Button,{id:"btn-submit","data-type":y,intent:"primary",arrow:"forward",onClick:k,children:(0,i.jsx)(d,{content:"ok"}),...r},"submit")),e})(),submitButton:!1,onSubmit:v?o:T,onError:s=>{const i=n.findIndex((({formPrefix:e})=>""===e)),a=Object.keys(s).map((e=>{const t=n.findIndex((({formPrefix:n,embeddedForms:t=[]})=>n===e||t.some((({name:n})=>n===e))));return t>=0?t:i}));u(t(g,a.length>0?Math.min(...a):e)-e)},applyButton:!1,cancelButton:!1,formPrefix:b,embeddedForms:x,children:h})};c.propTypes={step:l().number,steps:l().arrayOf(l().shape({formPrefix:l().string,embeddedForms:l().array,children:l().node,nextButton:l().bool,backButton:l().bool,key:l().string})),onStepChange:l().func,onSubmit:l().func,submitButton:l().object,cancelButton:l().object};const m=c},1630:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>m});var s=t(596),i=t.n(s),a=t(89),o=t(286),r=(t(1631),t(285));const l=a.Locale.getTranslate("components.domain-applications.applications"),d=a.Locale.getSection("components.domain-applications.applications"),c=({icon:e,entity:n="domain",applicationTitle:t})=>(0,r.jsxs)("div",{className:"application-wizard-selected-application-info",children:[(0,r.jsx)(o.Icon,{src:e,size:"32",alt:d.lmsg("selectedOptionIcon")}),(0,r.jsx)(l,{component:"div",content:"selectedOption",params:{optionName:(0,r.jsx)(o.Text,{bold:!0,children:t}),entity:d.lmsg(`${n}Entity`)}})]});c.propTypes={icon:i().string.isRequired,applicationTitle:i().node.isRequired,entity:i().oneOf(["domain","subscription"])};const m=c},1625:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>s.default});var s=t(1626)},1417:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>c});var s=t(286),i=t(596),a=t.n(i),o=t(89),r=t(285);const l=o.Locale.getTranslate("components.forms.ip-addresses-selector"),d=({ipAddresses:e,namePrefix:n,type:t,isOtherTypeAvailable:i,getIpAddressType:a,...o})=>{const d=(0,s.useTranslate)("components.forms.ip-addresses-selector");return!!e.length&&(0,r.jsxs)(s.FormFieldSelect,{label:(0,r.jsx)(l,{content:i?`${t}Address`:"ipAddress"}),name:`${n}[${t}]`,...o,children:[e.map((({id:e,ipAddress:n,publicIpAddress:t,type:i})=>(0,r.jsx)(s.SelectOption,{value:e,children:`${t||n}${a(i)}`},e))),i&&(0,r.jsx)(s.SelectOption,{value:"none",children:d("noIpAddressHint")})]},t)};d.propTypes={ipAddresses:a().array.isRequired,namePrefix:a().string.isRequired,type:a().string.isRequired,isOtherTypeAvailable:a().bool.isRequired,getIpAddressType:a().func.isRequired};const c=d},1416:(e,n,t)=>{"use strict";t.r(n),t.d(n,{TYPE_EXCLUSIVE:()=>m,TYPE_IPV4:()=>l,TYPE_IPV6:()=>d,TYPE_SHARED:()=>c,default:()=>u});var s=t(286),i=t(596),a=t.n(i),o=t(285),r=t(1417);const l="ipv4",d="ipv6",c="SHARED",m="EXCLUSIVE",p=({ipAddresses:e,namePrefix:n,isIPv6Supported:t=!0,...i})=>{const a=(0,s.useTranslate)("components.forms.ip-addresses-selector"),p=(0,o.useMemo)((()=>e.filter((({isIPv6:e,isBroken:n})=>!e&&!n))),[e]),u=(0,o.useMemo)((()=>e.filter((({isIPv6:e,isBroken:n})=>e&&!n))),[e]),g=(0,o.useCallback)((e=>{switch(e){case c:return` (${a("shared")})`;case m:return` (${a("exclusive")})`;default:return""}}),[a]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.default,{ipAddresses:p,namePrefix:n,type:l,isOtherTypeAvailable:t&&!!u.length,getIpAddressType:g,...i}),t&&(0,o.jsx)(r.default,{ipAddresses:u,namePrefix:n,type:d,isOtherTypeAvailable:!!p.length,getIpAddressType:g,...i})]})};p.propTypes={ipAddresses:a().array.isRequired,namePrefix:a().string.isRequired,isIPv6Supported:a().bool};const u=p},1415:(e,n,t)=>{"use strict";t.r(n),t.d(n,{TYPE_EXCLUSIVE:()=>s.TYPE_EXCLUSIVE,TYPE_SHARED:()=>s.TYPE_SHARED,default:()=>s.default,prepareBackendData:()=>i});var s=t(1416);const i=e=>{const n=[];return Object.keys(e).forEach((t=>{Object.keys(e[t]).forEach((i=>{"none"!==i&&n.push({id:i,ipAddress:e[t][i],isIPv6:t===s.TYPE_IPV6})}))})),n}},1623:(e,n,t)=>{"use strict";t.r(n),t.d(n,{TYPE_CUSTOM:()=>c,TYPE_TECH:()=>d,default:()=>b});var s=t(286),i=t(285),a=t(596),o=t.n(a),r=t(89),l=t(1624);const d="tech",c="custom",m=r.Locale.getTranslate("components.forms.domain.tech-domain-name"),p=({isEnabled:e,isDefault:n,url:t,vendor:a,maxDomainLength:o,typeName:r,name:l,ipAddress:p=null,onDomainNameChange:h,onTypeChange:b})=>{const[x,f]=(0,i.useState)(e&&n?d:c);if(!e)return(0,i.jsx)(u,{name:l,isEnabled:!1,onDomainNameChange:h});const j=[{key:c,icon:(0,i.jsx)(s.Icon,{name:"ribbon",intent:"success"})},{key:d,icon:(0,i.jsx)(s.Icon,{name:"rocket",intent:"info"})}];return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.Section,{title:(0,i.jsx)(m,{content:"title"}),vertical:!0,children:(0,i.jsx)(s.FormField,{name:r,onChange:e=>(e=>{f(e),b(e),h("")})(e),children:({getId:e,getName:n,getValue:t,setValue:a,isDisabled:o})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.ItemList,{stretchable:!0,selectable:!0,minColumnWidth:270,gap:"sm",value:t(),onSelect:e=>{e!==x&&a(e)},children:j.map((({key:e,icon:n})=>(0,i.jsx)(s.Item,{icon:n,role:"button",value:e,"data-action":`use-${e}-domain`,title:(0,i.jsx)(s.Heading,{level:"4",children:(0,i.jsx)(s.Paragraph,{children:(0,i.jsx)(m,{content:`${e}DomainTitle`})})}),disabled:o(),children:(0,i.jsx)(s.Text,{fontSize:"md",children:(0,i.jsx)(m,{content:`${e}DomainText`})})},e)))}),(0,i.jsx)("input",{hidden:!0,id:e(),name:n(),value:t(),readOnly:!0})]})})}),x===d?(0,i.jsx)(g,{name:l,ipAddress:p,url:t,vendor:a,maxDomainLength:o,onDomainNameChange:h}):(0,i.jsx)(u,{name:l,isEnabled:!0,onDomainNameChange:h})]})},u=({name:e,isEnabled:n,onDomainNameChange:t})=>(0,i.jsx)(s.Section,{vertical:!0,children:(0,i.jsx)(l.default,{name:e,label:n?(0,i.jsx)(m,{content:"customDomain"}):(0,i.jsx)(m,{content:"domainName"}),onChange:t,required:!0})});u.propTypes={name:o().string.isRequired,isEnabled:o().bool.isRequired,onDomainNameChange:o().func.isRequired};const g=({name:e,onDomainNameChange:n,...t})=>(0,i.jsx)(s.Section,{vertical:!0,children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.FormField,{label:(0,i.jsx)(m,{content:"techDomain"}),name:e,onChange:e=>n(e),children:({getId:e,getName:n,...s})=>(0,i.jsx)(h,{id:e(),name:n(),...s,...t})}),(0,i.jsxs)(s.Cuttable,{maxHeight:24,children:[(0,i.jsx)(s.Paragraph,{children:(0,i.jsx)(m,{content:"techDomainDesc"})}),(0,i.jsxs)("ul",{children:[(0,i.jsx)("li",{children:(0,i.jsx)(m,{content:"techDomainRandom"})}),(0,i.jsx)("li",{children:(0,i.jsx)(m,{content:"techDomainDns"})})]}),(0,i.jsx)(s.Paragraph,{children:(0,i.jsx)(m,{content:"techDomainSwitch"})})]})]})});g.propTypes={name:o().string.isRequired,onDomainNameChange:o().func.isRequired};const h=({id:e,name:n,ipAddress:t=null,url:a,vendor:o,getValue:r,setValue:l,maxDomainLength:d})=>{const[c,p]=(0,i.useState)(!1),[u,g]=(0,i.useState)(t),[h,b]=(0,i.useState)({}),x=(0,i.useCallback)((async()=>{if(b({}),!r()||t!==u)if(t){p(!0);try{const e=await(async({url:e,ipAddress:n,vendor:t,maxDomainLength:s})=>{const i=await fetch(e,{method:"POST",body:JSON.stringify({ip_address:n,vendor:t,max_length:s})}),{subdomain:a}=await i.json();if(!a)throw new Error("subdomain is empty");return a})({url:a,ipAddress:t,vendor:o,maxDomainLength:d});l(e),g(t)}catch{b({error:(0,i.jsx)(m,{content:"error"})})}finally{p(!1)}}else b({noIpAddress:(0,i.jsx)(m,{content:"errorNoIpAddress"})})}),[r,l,t,u,a,o,d]);return(0,i.useEffect)((()=>{x()}),[t]),(0,i.jsxs)(i.Fragment,{children:[c?(0,i.jsx)(s.Status,{progress:!0,children:(0,i.jsx)(m,{content:"generating"})}):(0,i.jsx)(s.Text,{bold:!0,children:r()}),(0,i.jsx)("input",{hidden:!0,id:e,name:n,value:r(),readOnly:!0}),Object.keys(h).map((e=>(0,i.jsxs)(s.Alert,{intent:"danger",children:[(0,i.jsx)(s.Icon,{name:"exclamation-mark-circle-filled",intent:"danger"})," ",h[e]]},e)))]})};h.propTypes={id:o().string.isRequired,name:o().string.isRequired,ipAddress:o().string,url:o().string.isRequired,vendor:o().string.isRequired,maxDomainLength:o().number.isRequired,getValue:o().func.isRequired,setValue:o().func.isRequired},p.propTypes={isEnabled:o().bool.isRequired,isDefault:o().bool.isRequired,url:o().string.isRequired,vendor:o().string.isRequired,maxDomainLength:o().number.isRequired,typeName:o().string.isRequired,name:o().string.isRequired,ipAddress:o().string,onDomainNameChange:o().func.isRequired,onTypeChange:o().func.isRequired};const b=p},1624:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>l});var s=t(286),i=t(596),a=t.n(i),o=t(285);const r=({size:e="lg",...n})=>(0,o.jsx)(s.FormField,{...n,children:({getId:n,getName:t,getValue:i,setValue:a,isDisabled:r})=>(0,o.jsxs)("div",{className:"composite-field",children:[(0,o.jsx)(s.Text,{className:"composite-field__prefix",children:"www. "}),(0,o.jsx)(s.Input,{id:n(),name:t(),value:i(),placeholder:"domain.name",size:e,onChange:e=>a(e.target.value),disabled:r()})]})});r.propTypes={size:a().string};const l=r},1412:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>m});var s=t(596),i=t.n(s),a=t(286),o=t(1413),r=t(89),l=t(285);const d=r.Locale.getSection("components.elements.lookup"),c=({data:e,dataUrl:n,lookUpParams:t,newItemValue:s,locale:i,placeholder:r,...c})=>(0,l.jsx)(a.FormField,{...c,children:({getId:a,getName:c,getValue:m,setValue:p,isDisabled:u})=>(0,l.jsx)(o.default,{id:a(),name:c(),value:m(),onChange:e=>p(e),data:e,dataUrl:n,lookUpParams:t,newItemValue:s,locale:{...d.messages,...i},disabled:u(),placeholder:r})});c.propTypes={locale:i().object,data:i().array,dataUrl:i().string,lookUpParams:i().object,newItemValue:i().object,placeholder:i().string};const m=c},1622:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>D,useAddDomainFormInDrawer:()=>I});var s=t(285),i=t(596),a=t.n(i),o=t(588),r=t(580),l=t(89),d=t(286),c=t(620),m=t(536),p=t(1623),u=t(1289),g=t(1412),h=t(1625),b=t(1636),x=t.n(b),f=t(1637),j=t(1415);const v=l.Locale.getSection("smb.components.forms.web.add-domain"),w=l.Locale.getTranslate("smb.components.forms.web.add-domain"),y=l.Locale.getTranslate("smb.components.forms.domain-info-section"),S=l.Locale.getTranslate("smb.components.forms.web._shared"),T=l.Locale.getTranslate("admin.components.forms.admin-panel.form.contact-info"),k=l.Locale.getTranslate("components.buttons"),C=l.Locale.getTranslate("admin.components.forms.admin-panel.form.login-info"),N=({id:e,webspaceIpAddress:n=null,webspaceIpAddresses:t,allowCustomerCreation:i=!1,allowWebspaceCreation:a=!1,subscriptionsLookUpParams:c=null,canManageMailSettings:b=!1,maxSysnameSize:N,isWindows:I,techDomain:D,settingsEnabled:A=!1,settingsCollapsed:P=!1,applicationWizardConfig:R={},isMailServiceSupported:E=!1,embeddedForms:_,extensionButtons:q=[],cancelLink:F=null,className:L,render:H,onProcess:B,onToggleDomainSettings:$,status:U,...O})=>{const V=(0,o.useApolloClient)(),M=(0,r.useNavigate)(),[J,Y]=(0,s.useState)(O.values),[z,W]=(0,s.useState)(Boolean(O.values.hostingSettings.root)),[G,X]=(0,s.useState)(!O.values.domainInfo),[Q,Z]=(0,s.useState)(n),[K,ee]=(0,s.useState)(t),ne=t,te=(0,s.useMemo)((()=>"mail-hosting"===J.applicationName),[J.applicationName]);(0,s.useEffect)((()=>{te&&(Y((0,d.setIn)(J,"hostingType[hosting]","none")),X(!0))}),[te]),(0,s.useEffect)((()=>{if(z)return;let e=J.domainName.name.replace(/\*/g,"_");-1!==J.hostingSettings.rootPattern.indexOf("<domain>")&&(e=J.hostingSettings.rootPattern.replace("<domain>",e)),Y((0,d.setIn)(J,"hostingSettings[root]",(0,l.toPunycode)(e)))}),[J.domainName.name]),(0,s.useEffect)((()=>{J.domainName.webspace&&"new"!==J.domainName.webspace.id&&V.query({query:x(),variables:{id:btoa(`Domain:${J.domainName.webspace.id}`)}}).then((({data:{domain:{ipAddresses:e}}})=>{const{publicIpAddress:n,ipAddress:t}=e[0];Z(n||t)})).catch((({message:e})=>{F&&M(F),(0,m.addToast)({intent:"danger",message:e})}))}),[J.domainName.webspace]);const se=(e,n)=>{switch(Y((t=>{if(t=(0,d.setIn)(t,e,n),"domainName[name]"===e&&!G){const e=(0,f.generateUserName)({domainName:n,maxUserNameSize:N,isTechDomain:t.domainName.type===p.TYPE_TECH,isWindows:I});t=(0,d.setIn)(t,"domainInfo[userName]",e||O.values.domainInfo.userName)}return t})),["domainInfo[ipSelector][ipv4]","domainInfo[ipSelector][ipv6]","domainInfo[userName]","domainInfo[password]"].includes(e)&&l.UAT.dispatchAction("CUSTOM-VALUE",{name:e}),e){case"hostingSettings[root]":W(!0);break;case"domainInfo[userName]":X(!0);break;case"domainName[customer]":ee(n.ipAddresses?n.ipAddresses:ne)}},ie="1"===J.domainName.assignToCustomer||void 0!==J.domainName.targetWebspace||J.domainName.webspace&&"new"===J.domainName.webspace.id,ae=ie||!Q?Object.keys(K).map((e=>{const n=J.domainInfo.ipSelector[e];return"none"===n?null:K[e][n]?.split(" ")[0]})).filter(Boolean)[0]:Q,oe=R.enabled?h.default:u.default;return(0,s.jsxs)(oe,{vertical:!0,id:e,className:L,render:H,values:J,onFieldChange:se,onSubmit:e=>(e.domainName.customer&&(e=(0,d.setIn)(e,"domainName[customer]",e.domainName.customer.id)),e.domainName.webspace&&(e=(0,d.setIn)(e,"domainName[webspace]",e.domainName.webspace.id)),e),onLongTask:B,wizardConfig:R,isMailServiceSupported:E,embeddedForms:_,extensionButtons:q,submitButton:{id:"btn-send",children:(0,s.jsx)(w,{content:"buttonAddDomain"})},applyButton:!1,cancelButton:!!F&&{id:"btn-cancel",children:(0,s.jsx)(k,{content:"cancel"}),onClick:()=>{M(F)}},entity:"domain",children:[(U||[]).filter((({status:e})=>"warning"===e)).map((({content:e})=>(0,s.jsx)(d.StatusMessage,{intent:"warning",children:(0,s.jsx)("div",{dangerouslySetInnerHTML:{__html:e}})},e))),(0,s.jsx)(p.default,{isEnabled:void 0!==J.domainName.type,isDefault:J.domainName.type===p.TYPE_TECH,typeName:"domainName[type]",name:"domainName[name]",ipAddress:ae,onTypeChange:e=>se("domainName[type]",e),onDomainNameChange:e=>se("domainName[name]",e),...D}),void 0===J.domainName.assignToCustomer?null:(0,s.jsxs)(d.Section,{children:[(0,s.jsx)(d.FormFieldCheckbox,{name:"domainName[assignToCustomer]",label:(0,s.jsx)(w,{content:"assignToCustomer"}),checkedValue:"1",uncheckedValue:"0"}),"1"===J.domainName.assignToCustomer?(0,s.jsxs)(d.Section,{collapsible:!0,children:[void 0===J.domainName.customer?null:(0,s.jsx)(g.default,{name:"domainName[customer]",label:(0,s.jsx)(w,{content:"customer"}),dataUrl:"/admin/customer/look-up",newItemValue:i?{id:"new",title:v.lmsg("createNewCustomer")}:null,locale:{label:v.lmsg("selectExistingCustomer")},required:!0}),void 0===J.domainName.customer||"new"===J.domainName.customer?.id?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.FormFieldText,{name:"customerInfo[customerContactInfo][contactName]",label:(0,s.jsx)(T,{content:"contactName"}),required:!0}),(0,s.jsx)(d.FormFieldText,{name:"customerInfo[customerContactInfo][email]",label:(0,s.jsx)(T,{content:"email"}),required:!0}),(0,s.jsx)("br",{}),(0,s.jsx)(d.Heading,{level:"4",children:(0,s.jsx)(w,{content:"customerLoginInfoHint"})}),(0,s.jsx)(d.FormFieldText,{name:"customerInfo[customerLoginInfo][userName]",label:(0,s.jsx)(C,{content:"userName"}),required:!0,autoComplete:"off"}),(0,s.jsx)(d.FormFieldPassword,{name:"customerInfo[customerLoginInfo][password]",label:(0,s.jsx)(C,{content:"password"}),required:!0,autoComplete:"new-password"}),(0,s.jsx)(d.FormFieldCheckbox,{name:"customerInfo[customerLoginInfo][isActivationRequired]",label:(0,s.jsx)(C,{content:"emailActivation"}),description:(0,s.jsx)(C,{content:"emailActivationHint"}),checkedValue:"1",uncheckedValue:"0"})]}):null]}):null]}),void 0===J.domainName.webspace||"1"===J.domainName.assignToCustomer?null:(0,s.jsx)(d.Section,{children:(0,s.jsx)(g.default,{name:"domainName[webspace]",label:(0,s.jsx)(w,{content:"target"}),dataUrl:"/smb/web/subscription-look-up",newItemValue:a?{id:"new",title:v.lmsg("createNewTarget")}:null,locale:{label:v.lmsg("selectExistingTarget")},lookUpParams:c,required:!0})}),ie?A?(0,s.jsxs)(d.Section,{id:"domainInfo",title:(0,s.jsx)(w,{content:"webspaceLegend"}),collapsible:!0,collapsed:P,onToggle:$,children:[(0,s.jsx)(j.default,{ipAddresses:(0,j.prepareBackendData)(K),namePrefix:"domainInfo[ipSelector]"}),(0,s.jsx)("br",{}),!te&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.Heading,{level:"4",children:(0,s.jsx)(w,{content:"credentials"})}),(0,s.jsx)(d.Text,{component:"p",intent:"muted",children:(0,s.jsx)(w,{content:I?"credentialsHintWin":"credentialsHint"})}),(0,s.jsx)(d.FormFieldText,{name:"domainInfo[userName]",label:(0,s.jsx)(y,{content:"userName"}),required:!0}),(0,s.jsx)(d.FormFieldPassword,{name:"domainInfo[password]",label:(0,s.jsx)(y,{content:"password"}),required:!0})]})]}):null:(0,s.jsxs)(d.Section,{children:[(0,s.jsxs)(d.FormFieldSelect,{name:"hostingType[hosting]",label:(0,s.jsx)(w,{content:"hostingManagementOptions"}),children:[(0,s.jsx)(d.SelectOption,{value:"hosting",label:"hosting",children:(0,s.jsx)(w,{content:"websiteHosting"})}),(0,s.jsx)(d.SelectOption,{value:"forwarding",label:"forwarding",children:(0,s.jsx)(w,{content:"websiteForwarding"})}),(0,s.jsx)(d.SelectOption,{value:"none",label:"none",children:(0,s.jsx)(w,{content:"websiteNoHosting"})})]}),void 0===J.dnsSettings?null:(0,s.jsx)(d.FormFieldCheckbox,{name:"dnsSettings[dns]",label:(0,s.jsx)(w,{content:"dns"}),description:(0,s.jsx)(w,{content:"dnsHint"}),disabled:J.domainName.type===p.TYPE_TECH,checkedValue:J.domainName.type!==p.TYPE_TECH&&"master",uncheckedValue:"none"}),void 0===J.mailSettings?null:(0,s.jsx)(d.FormFieldCheckbox,{name:"mailSettings[mail]",label:(0,s.jsx)(w,{content:"mail"}),description:b?(0,s.jsx)(w,{content:"mailHint"}):(0,s.jsx)(w,{content:"mailHintNoPermission"}),checkedValue:"1",uncheckedValue:"0"}),"hosting"===J.hostingType.hosting?(0,s.jsxs)(d.Section,{id:"hostingSettings",title:(0,s.jsx)(w,{content:"hostingSettingsSectionLegend"}),collapsible:!0,collapsed:!0,children:[(0,s.jsx)(d.FormField,{name:"hostingSettings[root]",label:(0,s.jsx)(S,{content:"documentRoot"}),description:(0,s.jsx)(S,{content:"documentRootHint"}),required:!0,children:({getId:e,getName:n,getValue:t,setValue:i})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.Icon,{name:"home"})," / ",(0,s.jsx)(d.Input,{id:e(),name:n(),value:t(),onChange:({target:e})=>i(e.value)})]})}),(0,s.jsx)(d.FormFieldRadioButtons,{name:"hostingSettings[seoRedirectDirection]",label:(0,s.jsx)(S,{content:"seoRedirectDirection"}),description:(0,s.jsx)(S,{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,s.jsx)(S,{content:"seoRedirectDirectionNone"})}]})]}):null,"forwarding"===J.hostingType.hosting?(0,s.jsxs)(d.Section,{id:"forwardingSettings",title:(0,s.jsx)(S,{content:"forwardingSettingsSectionLegend"}),collapsible:!0,collapsed:!0,children:[(0,s.jsx)(d.FormFieldText,{name:"forwardingSettings[forwardTo]",label:(0,s.jsx)(S,{content:"forwardDestination"}),description:(0,s.jsx)(S,{content:"forwardDestinationHint"}),required:!0}),(0,s.jsx)(d.FormFieldRadioButtons,{name:"forwardingSettings[forwardingType]",label:(0,s.jsx)(S,{content:"forwardingTypeOptions"}),options:[{value:"std_fwd301",label:(0,s.jsx)(S,{content:"forwardingHttpCode301"}),description:(0,s.jsx)(S,{content:"forwardingHttpCode301Hint"})},{value:"std_fwd302",label:(0,s.jsx)(S,{content:"forwardingHttpCode302"}),description:(0,s.jsx)(S,{content:"forwardingHttpCode302Hint"})},{value:"frm_fwd",label:(0,s.jsx)(S,{content:"forwardingFrame"}),description:(0,s.jsx)(S,{content:"forwardingFrameHint"})}]})]}):null]})]})};N.propTypes={id:a().string.isRequired,values:a().object.isRequired,webspaceIpAddresses:a().shape({ipv4:a().object,ipv6:a().object}).isRequired,allowCustomerCreation:a().bool,allowWebspaceCreation:a().bool,subscriptionsLookUpParams:a().object,webspaceIpAddress:a().string,canManageMailSettings:a().bool,maxSysnameSize:a().number.isRequired,isWindows:a().bool.isRequired,techDomain:a().object.isRequired,settingsEnabled:a().bool,settingsCollapsed:a().bool,applicationWizardConfig:a().object,isMailServiceSupported:a().bool,embeddedForms:a().array,extensionButtons:a().array,cancelLink:a().string,className:a().string,render:a().func,onProcess:a().func,onToggleDomainSettings:a().func,status:a().array};const I=(e,n)=>(0,c.useCreateFormInDrawer)(N,"add-domain",e,n),D=N},1534:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>c});var s=t(596),i=t.n(s),a=t(89),o=t(1535);const r={id:i().string,dataUrl:i().string,operations:i().array,itemActions:i().object,columns:i().array,data:i().shape({data:i().array,state:i().object,pager:i().object,locale:i().object,additional:i().object,pathbar:i().any}),searchFilters:i().object,searchOveral:i().string,disabledSelectHint:i().string,isDisabledItem:i().func,onRedraw:i().func,emptyViewMode:i().oneOf(["all","items"]),emptyView:i().any},l={id:void 0,dataUrl:void 0,operations:void 0,itemActions:void 0,columns:void 0,data:void 0,searchFilters:void 0,searchOveral:void 0,disabledSelectHint:void 0,isDisabledItem:void 0,onRedraw:void 0,emptyViewMode:void 0,emptyView:void 0},d=(0,o.default)(a.List,{propsList:Object.keys(r),defaultProps:l});d.displayName="JswList",d.propTypes=r;const c=d},1413:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>l});var s=t(285),i=t(89),a=t(641),o=t(596);const r=({disabled:e=!1,...n})=>{const[t,o]=(0,s.useState)(null);return(0,s.useEffect)((()=>{const t=new i.LookUp({disabled:e,...n});return o(t),()=>{t.remove(),o(null)}}),[]),(0,s.useEffect)((()=>{t&&(e?t.disable():t.enable())}),[t,e]),t?(0,s.jsx)(a.default,{children:t}):null};r.propTypes={disabled:t.n(o)().bool};const l=r},1538:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>c});var s=t(596),i=t.n(s),a=t(286),o=t(89),r=t(646),l=t(285);const d=({items:e})=>e&&e.length>1?(0,l.jsx)(a.Tabs,{active:e.findIndex((({containerCls:e})=>"active"===e))+1,children:e.map((({title:e,href:n},t)=>(0,l.jsx)(a.Tab,{title:e,component:r.default,to:(0,o.prepareUrl)(n)},t)))}):null;d.propTypes={items:i().arrayOf(i().shape({title:i().string.isRequired,href:i().string.isRequired,containerCls:i().string}))};const c=d},1535:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>a});var s=t(285),i=t(89);const a=(e,{propsList:n=[],setters:t={},defaultProps:a={}})=>o=>{const r=(0,s.useRef)(),l=(0,s.useRef)(),[d,c]=Object.entries({...a,...o}).reduce(((e,[t,s])=>(e[n.includes(t)?0:1][t]=s,e)),[{},{}]),m=n.map((e=>{const n=d[e];return t[e]?(l.current?.[t[e]](n),null):n}));return(0,s.useLayoutEffect)((()=>(l.current=new e(d),(0,i.render)(r.current,l.current),()=>{l.current.remove(),l.current=null})),[c.key,...m]),(0,s.jsx)("div",{ref:r,...c})}},1653:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>u});var s=t(285),i=t(596),a=t(89),o=t(646),r=t(1534),l=t(1622),d=t(1645);const c=a.Locale.getSection("admin.components.lists.domains"),m=a.Locale.getSection("components.icp-permit"),p=({pageUrl:e,data:n,searchFilters:i,dataAction:p,deleteAction:u,allowCreateDomain:g=!1,allowManageSubdomain:h=!1,allowManageDomainAliases:b=!1,showDeleteButton:x=!1,isHomonymSearchEnabled:f=!1,showOwnerName:j=!1,showExpirationDate:v=!1,userId:w,icpPermitSupported:y=!1,icpPermitLink:S})=>{const T=(0,s.useCallback)((({action:n}={})=>{const t=e.split("/");return n&&(t[3]=n),t.join("/")}),[e]),[k]=(0,l.useAddDomainFormInDrawer)(e,T({action:"add-domain"})),C=(0,o.useNavigateCallback)(),N=(0,s.useMemo)((()=>[g?{componentType:a.SmallButton,id:"buttonAddDomain",cls:"s-btn sb-new-domain btn-primary",title:c.lmsg("buttonAddDomain"),description:c.lmsg("hintAddDomain"),href:T({action:"add-domain"}),handler:C}:null,h?{componentType:a.SmallButton,id:"buttonAddSubDomain",cls:"s-btn sb-new-subdomain",title:c.lmsg("buttonAddSubdomain"),description:c.lmsg("hintAddSubdomain"),href:T({action:"add-subdomain"})}:null,b?{componentType:a.SmallButton,id:"buttonAddDomainAlias",cls:"s-btn sb-new-domain-alias",title:c.lmsg("buttonAddDomainAlias"),description:c.lmsg("hintAddDomainAlias"),href:T({action:"add-domain-alias"})}:null,g||h||b?{componentType:a.bar.Separator}:null,{componentType:a.list.AdditionalActions,title:c.lmsg("buttonSetStatus"),description:c.lmsg("hintSetStatus"),operations:[{componentType:a.SmallButton,id:"buttonSuspendDomains",title:c.lmsg("suspendActionStatus"),description:c.lmsg("hintSuspendDomains"),addCls:"sb-suspend",cls:"sb-btn",handler(){(0,a.getComponent)("domains-list").execGroupOperation({url:`/admin/domain/suspend/?redirect=${T()}`,skipConfirmation:!0})}},{componentType:a.SmallButton,id:"buttonDisableDomains",title:c.lmsg("disableActionStatus"),description:c.lmsg("hintDisableDomains"),addCls:"sb-turn-off",cls:"sb-btn",handler(){(0,a.getComponent)("domains-list").execGroupOperation({url:`/admin/domain/disable/?redirect=${T()}`,skipConfirmation:!0})}},{componentType:a.SmallButton,id:"buttonActivateDomains",title:c.lmsg("activateActionStatus"),description:c.lmsg("hintActivateDomains"),addCls:"sb-activate",cls:"sb-btn",handler(){(0,a.getComponent)("domains-list").execGroupOperation({url:`/admin/domain/activate/?redirect=${T()}`,skipConfirmation:!0})}}]},x?{componentType:a.bar.Separator}:null,x?{componentType:a.SmallButton,id:"buttonRemoveSite",title:a.Locale.getSection("components.buttons").lmsg("remove"),description:c.lmsg("hintRemove"),cls:"s-btn sb-remove-selected",handler(e){const n=(0,a.getComponent)("domains-list").getSelectedItems(),t=n.reduce(((e,{relatedDomains:n})=>e.concat(n)),[]).filter((e=>n.every((({domainDisplayName:n})=>n!==e))));(0,a.getComponent)("domains-list").execGroupOperation({url:T({action:u}),subtype:a.messageBox.SUBTYPE_DELETE,mouseEvent:e,text:c.formatMessage("removeConfirmation",{name:`<b>${(0,a.escapeHtml)(n[0]?.domainDisplayName)}</b>`,count:n.length}),description:t.length?c.lmsg("removeConfirmationSubscription",{domains:t.join(", ")}).replace(/\n/gm,"<br>"):"",isAjax:f,requestUrl:T({action:"search-homonym-data"}),loadingTitle:a.Locale.getSection("components.homonyms").lmsg("loading"),toJsonPayload:!0,submitHandler:async(e,n)=>{const{task:t,error:s}=await a.api.post((0,a.prepareUrl)("/domain/delete-async/"),{ids:n.ids});s?(0,a.addStatusMessage)("error",s):t&&"Jsw.Task.ProgressBar.Item"===t.componentType&&(0,a.getComponent)("asyncProgressBarWrapper").progressDialog(t)}})}}:null].filter(Boolean)),[g,b,h,T,u,f,C,x]),I=(0,s.useMemo)((()=>[a.list.COLUMN_SELECTION,{header:c.lmsg("domainName"),sortable:!0,dataIndex:"domainDisplayName",renderer(e){const n=e.overviewUrl?(0,a.createElement)("a",{href:(0,a.prepareUrl)(e.overviewUrl),onclick:C},(0,a.escapeHtml)(e.domainDisplayName)):(0,a.escapeHtml)(e.domainDisplayName);if(parseInt(e.domainStatus)){const s="suspend"===e.turnOffAction,i=s?c.lmsg("statusSuspended"):c.lmsg("statusDisabled"),o=t(s?1651:1604),r=s?"suspended":"disabled";return(0,a.createElement)(".b-indent",[(0,a.createElement)("span.b-indent-icon",(0,a.createElement)("span",[(0,a.createElement)("span.tooltipData",i),(0,a.createElement)("img",{src:o,alt:r,title:""})])),n,...(0,d.createSiteDescription)(e,c)])}return(0,a.createElement)(".",[n,...(0,d.createSiteDescription)(e,c)])}},y?{header:m.lmsg("icpPermit"),sortable:!0,dataIndex:"icpStatus",renderer({icpStatus:e,icpPermit:n}){const s=1==e?m.lmsg("icpStatusAllowedDescription"):m.lmsg("icpStatusNotAllowedDescription"),i=t(1==e?1650:1654);let o=n?(0,a.escapeHtml)(n):1==e?"":m.lmsg("icpStatusNotAllowed");return S&&(o=`<a href="${S}" target="_blank">${o}</a>`),`<span class="tooltipData">${s}</span><img src="${i}" alt="" /> ${o}`}}:null,{header:c.lmsg("hostingType"),sortable:!0,dataIndex:"hostingType",renderer(e){let n="";return"alias"===e.hostingType?n=`<img src="${t(1655)}"/> ${c.lmsg("aliasFor")} <a href="http://${(0,a.escapeHtml)(e.realDomainName)}" target="_blank">${(0,a.escapeHtml)(e.realDomainDisplayName)}</a>`:"vrt_hst"===e.hostingType?n=`<img src="${t(1656)}"/> ${c.lmsg(e.parentDomainId>0?"subdomainWebsite":"website")}`:"none"===e.hostingType?n=`<img src="${t(1657)}"/><em class="hint">${c.lmsg("noHosting")}</em>`:"frm_fwd"!==e.hostingType&&"std_fwd"!==e.hostingType||(n=`<img src="${t(1658)}"/> ${c.lmsg("forwardingTo")} <a href="${(0,a.escapeHtml)(e.forwardingUrl)}" target="_blank">${(0,a.escapeHtml)(e.forwardingDisplayUrl)}</a>`),n}},j?{header:c.lmsg("ownerName"),sortable:!0,dataIndex:"ownerName",renderer({ownerId:e,ownerType:n,ownerName:t,ownerCompanyName:s}){let i=null;return parseInt(e)!==w&&("client"===n?i=`/admin/customer/overview/id/${e}`:"reseller"===n&&(i=`/admin/reseller/overview/id/${e}`)),[i?(0,a.createElement)("a",{href:i,onclick:C},(0,a.escapeHtml)(t)):(0,a.escapeHtml)(t),s?`, ${(0,a.escapeHtml)(s)}`:null]}}:null,{header:c.lmsg("setupDate"),sortable:!0,dataIndex:"setupDate",renderer:({setupDateString:e})=>(0,a.escapeHtml)(e)},v?{header:c.lmsg("expirationDate"),sortable:!1,dataIndex:"expirationDate",renderer:({expirationDateString:e})=>e?(0,a.escapeHtml)(e):"—"}:null,{header:c.lmsg("diskUsage"),sortable:!0,dataIndex:"realSize",renderer:({diskUsage:e})=>(0,a.escapeHtml)(e)},{header:c.lmsg("traffic"),sortable:!0,dataIndex:"traffic"},{header:"",sortable:!1,renderer:({hostingType:e,siteUrl:n})=>"none"===e?"":(0,a.createElement)("a.s-btn.sb-publish",{href:n,target:"_blank"},(0,a.createElement)("span",c.lmsg("openSite")))},{header:"",sortable:!1,renderer({previewSupported:e,domainId:n}){if(!e)return"";const t=`/admin/domain/preview?domainId=${n}`;return(0,a.createElement)("a.s-btn.sb-view-site",{href:t,target:"_blank"},(0,a.createElement)("span",c.lmsg("previewSite")))}},{header:"",sortable:!1,renderer({manageUrl:e,ownerId:n,ownerType:t}){if(!e||parseInt(n)===w)return"";const s=`/admin${"reseller"===t?"/reseller":"/customer"}/login/id/${n}?pageUrl=${encodeURIComponent(e)}`;return(0,a.createElement)("a.s-btn.sb-login",{href:s},(0,a.createElement)("span",c.lmsg("reseller"===t?"manageInResellerPanel":"manageInCustomerPanel")))}}].filter(Boolean)),[S,y,C,v,j,w]);return(0,s.jsxs)(s.Fragment,{children:[k,(0,s.jsx)(r.default,{id:"domains-list",data:n,dataUrl:T({action:p}),searchFilters:i,searchOveral:"domainName",disabledSelectHint:c.lmsg("disabledSelectHint"),operations:N,columns:I})]})};p.propTypes={pageUrl:i.PropTypes.string.isRequired,data:r.default.propTypes.data.isRequired,searchFilters:r.default.propTypes.searchFilters.isRequired,dataAction:i.PropTypes.string.isRequired,deleteAction:i.PropTypes.string.isRequired,allowCreateDomain:i.PropTypes.bool,allowManageSubdomain:i.PropTypes.bool,allowManageDomainAliases:i.PropTypes.bool,showDeleteButton:i.PropTypes.bool,isHomonymSearchEnabled:i.PropTypes.bool,showOwnerName:i.PropTypes.bool,showExpirationDate:i.PropTypes.bool,userId:i.PropTypes.number,icpPermitSupported:i.PropTypes.bool,icpPermitLink:i.PropTypes.string};const u=p},1652:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>u});var s=t(89),i=t(1538),a=t(603),o=t(1653),r=t(1659),l=t(596),d=t.n(l),c=t(285);const m=s.Locale.getTranslate("components.pages.customer-domains"),p=({tabs:e,id:n,...t})=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(i.default,{items:e}),(0,c.jsx)("p",{children:(0,c.jsx)(m,{content:"hint"})}),(0,c.jsx)(o.default,{dataAction:"domains-list-data",deleteAction:"delete-domain",pageUrl:`/admin/customer/domains/id/${n}`,...t})]});p.propTypes={tabs:i.default.propTypes.items.isRequired,id:d().number.isRequired};const u=(0,a.withPageLayout)(p,(({sidebarProps:e})=>({secondary:(0,c.jsx)(r.default,{...e})})))},1659:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>h});var s=t(596),i=t.n(s),a=t(286),o=t(89),r=t(646),l=t(1172),d=t(1660),c=t(285);const m=o.Locale.getSection("admin.components.customer-sidebar"),p=o.Locale.getTranslate("admin.components.customer-sidebar"),u=o.Locale.getTranslate("admin.components.elements.status"),g=({id:e,canCreateClients:n,contactName:s,companyName:i,emailAddress:g,setupDate:h,isAdmin:b,resellersSupport:x,isActive:f,username:j,allowLogIn:v,provider:w,hasResellers:y,hasResellerCustomers:S,description:T,isIisAppPoolsPolicyMixed:k=!1})=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(l.default,{id:"panel-customer-overviewSection",children:[(0,c.jsxs)("div",{className:"side-panel__item",children:[(0,c.jsxs)(a.Text,{intent:"muted",children:[(0,c.jsx)(p,{content:"contactName"}),":"]})," ",(0,c.jsx)("b",{children:s})]}),i?(0,c.jsxs)("div",{className:"side-panel__item",children:[(0,c.jsxs)(a.Text,{intent:"muted",children:[(0,c.jsx)(p,{content:"companyName"}),":"]})," ",(0,c.jsx)("b",{children:i})]}):null,g?(0,c.jsxs)("div",{className:"side-panel__item",children:[(0,c.jsxs)(a.Text,{intent:"muted",children:[(0,c.jsx)(p,{content:"emailAddress"}),":"]})," ",(0,c.jsx)("b",{children:(0,c.jsx)("a",{href:`mailto:${g}`,children:g})})]}):null,(0,c.jsx)("div",{className:"side-panel__item",children:(0,c.jsx)(a.Tooltip,{title:(0,c.jsx)(p,{content:"buttonEditContactHint"}),children:(0,c.jsx)(a.Action,{id:"buttonEditContactInfo",icon:{src:t(1662)},href:`/admin/customer/personal-info/id/${e}`,children:(0,c.jsx)(p,{content:"buttonEditContact"})})})}),b&&x?(0,c.jsx)("div",{className:"side-panel__item",children:(0,c.jsx)(a.Tooltip,{title:(0,c.jsx)(p,{content:"buttonConvertToResellerHint"}),children:(0,c.jsx)(a.Action,{id:"buttonConvertToReseller",icon:{src:t(1663)},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]})},children:(0,c.jsx)(p,{content:"buttonConvertToReseller"})})})}):null,(0,c.jsxs)("div",{className:"side-panel__item",children:[(0,c.jsxs)(a.Text,{intent:"muted",children:[(0,c.jsx)(p,{content:"setupDate"}),":"]})," ",(0,c.jsx)("b",{children:h})]}),(0,c.jsxs)("div",{className:"side-panel__item",children:[(0,c.jsxs)(a.Text,{intent:"muted",children:[(0,c.jsx)(p,{content:"status"}),":"]})," ",(0,c.jsx)("b",{children:(0,c.jsx)(a.Status,{intent:f?"success":"danger",children:f?(0,c.jsx)(u,{content:"onStateCustomer"}):(0,c.jsx)(u,{content:"offStateCustomer"})})})," ",(0,c.jsx)(a.AuxiliaryActions,{children:(0,c.jsx)(a.Tooltip,{title:f?(0,c.jsx)(p,{content:"buttonSuspendHint"}):(0,c.jsx)(p,{content:"buttonActivateHint"}),children:(0,c.jsx)("a",{id:"buttonToggle",onClick:()=>{(0,o.redirectPost)(`/admin/customer/toggle/id/${e}`)},children:f?(0,c.jsx)(p,{content:"buttonSuspend"}):(0,c.jsx)(p,{content:"buttonActivate"})})})})]}),w?(0,c.jsxs)("div",{className:"side-panel__item",children:[(0,c.jsxs)(a.Text,{intent:"muted",children:[(0,c.jsx)(p,{content:"provider"}),":"]})," ",(0,c.jsx)("b",{children:"reseller"===w.type&&x?(0,c.jsx)(r.default,{to:`/admin/reseller/overview/id/${w.id}`,children:w.name}):w.name})," ",b&&y&&(x||S)?(0,c.jsx)(a.AuxiliaryActions,{children:(0,c.jsx)("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]})},children:(0,c.jsx)(p,{content:"buttonChangeOwner"})})}):null]}):null,(0,c.jsxs)("div",{className:"side-panel__item",children:[(0,c.jsxs)(a.Text,{intent:"muted",children:[(0,c.jsx)(p,{content:"username"}),":"]})," ",(0,c.jsx)("b",{children:j})]}),(0,c.jsx)("div",{className:"side-panel__item",children:(0,c.jsx)(a.Tooltip,{title:(0,c.jsx)(p,{content:"buttonChangePasswordHint"}),children:(0,c.jsx)(a.Action,{id:"buttonChangePassword",icon:{src:t(1664)},href:`/admin/customer/login-info/id/${e}`,children:(0,c.jsx)(p,{content:"buttonChangePassword"})})})}),v?(0,c.jsx)("div",{className:"side-panel__item",children:(0,c.jsx)(a.Tooltip,{title:(0,c.jsx)(p,{content:"buttonLoginAsCustomerHint"}),children:(0,c.jsx)(a.Action,{id:"buttonLogin",icon:{src:t(1665)},href:`/admin/customer/login/id/${e}`,children:(0,c.jsx)(p,{content:"buttonLoginAsCustomer"})})})}):null,(0,c.jsx)(d.default,{type:"customer",id:e,name:s,descriptions:{owner:T}})]}),k?(0,c.jsx)(l.default,{id:"panel-customer-iisAppPoolSection",children:(0,c.jsx)("div",{className:"side-panel__item",children:(0,c.jsx)(a.Tooltip,{title:(0,c.jsx)(p,{content:"buttonIisAppPoolHint"}),children:(0,c.jsx)(a.Action,{id:"buttonIisAppPool",icon:{src:t(1666)},href:`/admin/iis-app-pool/settings/id/${e}`,children:(0,c.jsx)(p,{content:"buttonIisAppPool"})})})})}):null,n?(0,c.jsx)(l.default,{id:"panel-customer-removeSection",children:(0,c.jsx)("div",{className:"side-panel__item",children:(0,c.jsx)(a.Tooltip,{title:(0,c.jsx)(p,{content:"buttonRemoveHint"}),children:(0,c.jsx)(a.Action,{id:"buttonRemove",icon:{src:t(1667)},onClick:()=>{o.messageBox.show({type:o.messageBox.TYPE_YESNO,subtype:o.messageBox.SUBTYPE_DELETE,text:m.lmsg("buttonRemoveCustomerConfirmationTitle",{name:`<b>${s}</b>`}),description:m.lmsg("buttonRemoveCustomerConfirmationDescription"),async onYesClick(){const{task:n}=await o.api.post((0,o.prepareUrl)("/customer/delete-async/"),{ids:[e]});n&&"Jsw.Task.ProgressBar.Item"===n.componentType&&(0,o.getComponent)("asyncProgressBarWrapper").progressDialog(n)}})},children:(0,c.jsx)(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,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};const h=g},1660:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>m});var s=t(596),i=t.n(s),a=t(286),o=t(89),r=t(1661),l=t(285);const d=o.Locale.getTranslate("components.forms.admin-info"),c=({type:e,id:n,name:t,descriptions:s})=>{const{edit:i,remove:o}=(0,r.createHandlers)({type:e,id:n,name:t});return Object.entries(s).map((([e,n])=>(0,l.jsxs)("div",{className:"side-panel__item",children:[(0,l.jsxs)(a.Text,{intent:"muted",children:[(0,l.jsx)(d,{content:`description-${e}`}),":"]})," ",(0,l.jsx)("b",{children:(0,l.jsx)("span",{id:`${e}-description`,children:n})})," ",(0,l.jsxs)(a.AuxiliaryActions,{children:[(0,l.jsx)(a.Link,{id:`${e}-description-edit`,onClick:()=>i(e,n),children:n?(0,l.jsx)(d,{content:"edit"}):(0,l.jsx)(d,{content:"add"})}),n?(0,l.jsx)(a.Link,{id:`${e}-description-remove`,onClick:()=>o(e),children:(0,l.jsx)(d,{content:"remove"})}):null]})]},e)))};c.propTypes={type:i().oneOf(["reseller","customer","subscription"]).isRequired,id:i().number.isRequired,name:i().string.isRequired,descriptions:i().shape({admin:i().string,reseller:i().string,owner:i().string}).isRequired};const m=c},1661:(e,n,t)=>{"use strict";t.r(n),t.d(n,{EditPopupForm:()=>o,createHandlers:()=>r});var s=t(89);const i=s.Locale.getSection("components.forms.admin-info"),a=s.Locale.getSection("components.buttons");class o extends s.PopupForm{_initConfiguration(e){super._initConfiguration(e),this._hint=this._getConfigParam("hint",""),this._value=this._getConfigParam("value",""),this._handler=this._getConfigParam("handler",null),this._sendButtonId=this._getConfigParam("sendButtonId","btn-send"),this._cancelButtonId=this._getConfigParam("cancelButtonId","btn-cancel")}render(){super.render(),this.setBoxType("form-box"),this.setTitle(this.lmsg("popupTitle")),this.setTitleType(this._getConfigParam("titleCls","pp-edit-description")),document.getElementById(this._contentAreaId).innerHTML=`<p>${this._hint}</p><textarea id="${this._id}-description" class="js-auto-resize" rows="4" maxlength="255" cols="80">${(0,s.escapeHtml)(this._value)}</textarea>`,this.addOkButton(),this.addCancelButton()}addOkButton(){this.addRightButton(this.lmsg("buttonOk"),this._onOkClick,!0,!0,{id:this._sendButtonId})}addCancelButton(){this.addRightButton(this.lmsg("buttonCancel"),this._onCancelClick,!1,!1,{id:this._cancelButtonId})}_onOkClick(){this._handler(document.getElementById(`${this._id}-description`).value),this.hide()}_onCancelClick(){this.hide()}}const r=e=>{const n={reseller:"/admin/reseller/edit-description",customer:"/admin/customer/edit-description",subscription:"/admin/subscription/edit-description",site:"/smb/web/edit-description"}[e.type];if(!n)throw new Error(`Custom description not supported for '${e.type}' type`);return{edit:(t,r)=>{new o({id:"editDescription",cls:"popup-panel",hint:i.lmsg(`popupHint-${t}`),value:r,locale:{popupTitle:i.lmsg(`popupTitle-${e.type}`,{descriptionType:i.lmsg(`description-${t}`),name:(0,s.escapeHtml)(e.name)}),buttonOk:a.lmsg("save"),buttonCancel:a.lmsg("cancel")},handler(i){(0,s.redirectPost)(n,{id:e.id,type:t,description:i})}})},remove:t=>{s.messageBox.show({type:Jsw.messageBox.TYPE_YESNO,subtype:"delete",buttonTitles:{yes:a.lmsg("yes"),no:a.lmsg("no"),wait:a.lmsg("wait")},text:i.lmsg("confirmOnRemove"),onYesClick(){(0,s.redirectPost)(n,{id:e.id,type:t,description:""})}})}}}},1645:(e,n,t)=>{"use strict";t.r(n),t.d(n,{createDescription:()=>a,createSiteDescription:()=>o,truncate:()=>i});var s=t(89);const i=(e,n=50)=>e.length<n?e:`${e.slice(0,n-3)}...`,a=(e,n,t)=>(0,s.createElement)(e,[(t?`${t}: `:"")+(0,s.escapeHtml)(i(n,50)),(0,s.createElement)("span.tooltipData",(0,s.escapeHtml)(n))]),o=({adminDescription:e,resellerDescription:n,ownerDescription:t,hideResellerTitleDescription:s,hideOwnerTitleDescription:i},o,r="hint")=>[e?a(`.${r}`,e):"",n?a(`.${r}`,n,!s&&o.lmsg("resellerDescription")):"",t?a(`.${r}`,t,!i&&o.lmsg("ownerDescription")):""]},1637:(e,n,t)=>{"use strict";t.r(n),t.d(n,{generateUserName:()=>a,randomString:()=>s});const s=()=>Math.random().toString(36).slice(2),i=()=>`_${s()}`,a=({domainName:e,maxUserNameSize:n,isTechDomain:t,isWindows:s,postfix:a=i()})=>{let o=e;const r=!s,l=!/^[a-zA-Z0-9_.\-]+$/.test(e),d=/^[0-9]+/.test(e);if("string"!=typeof e||"string"!=typeof a)return"";if(l)return"";if(r&&d)return"";if("number"!=typeof n&&void 0!==n)return"";if(n){if(a.length>n)return"";n-=a.length}return t&&(o=o.split(".")[0]),o=o.toLowerCase().substr(0,n)+a,s&&(o=o.replace(/\.+$/,"")),o}},1654:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/att-tr.png?f00bf7056f997d02b1565fff15ed7ab7"},1664:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/change-password.png?54304f321bc897402075b73230593f04"},1663:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/convert-to-reseller.png?92f150ae967d586471eabfbb347d4dfd"},1667:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/delete.png?27d654be29d57ad05641c2ff392035fa"},1655:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/dns.png?d10cfc4afe5c5c040eaf99c3ea14429d"},1662:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/edit-contact-info.png?052e4fc494a39464dad26f4f40e38eaf"},1658:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/forward-to-dom.png?761778de5722f4bb1f3611d27968cb0f"},1666:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/iis-app-pool.png?1bcf2ef7b099732f96f82bfb815c5146"},1665:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/login-as-customer.png?f61b4adc663106baef7704c16dd4d207"},1604:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/off.png?84d64d1bd3267c21795505b7daa43800"},1657:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/spacer.png?4710d0e07ee1a4d7ebdb1972701168fa"},1650:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/subscription-status-ok.png?6d52f91c87cbdc73b4ef0b5ded92c441"},1651:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/subscription-status-suspended.png?7968ea094f0aa3fdced5d59b0c7f3196"},1656:e=>{e.exports=Jsw.skinUrl+"/icons/16/plesk/website.png?ac6aa9eaf06048cbd5799a61daad9766"},1633:e=>{e.exports=Jsw.skinUrl+"/images/code.svg?d9dcc332aeb03168d77f5fbcc97e7bcb"},1635:e=>{e.exports=Jsw.skinUrl+"/images/mail.svg?e19a5f99ea85bc24608c0601bfe29fcc"},1634:e=>{e.exports=Jsw.skinUrl+"/images/upload-files.svg?3659f9de736ae2576023d51cbfb48963"},1636:e=>{var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetWebspaceIpAddress"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"domain"},name:{kind:"Name",value:"node"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Domain"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"ipAddresses"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"publicIpAddress"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ipAddress"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:207}};n.loc.source={body:"query GetWebspaceIpAddress($id: ID!) {\n domain: node(id: $id) {\n ... on Domain {\n ipAddresses {\n publicIpAddress\n ipAddress\n }\n }\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var s=e.type;"NamedType"===s.kind&&n.add(s.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){t(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){t(e,n)})),e.definitions&&e.definitions.forEach((function(e){t(e,n)}))}var s={};function i(e,n){for(var t=0;t<e.definitions.length;t++){var s=e.definitions[t];if(s.name&&s.name.value==n)return s}}n.definitions.forEach((function(e){if(e.name){var n=new Set;t(e,n),s[e.name.value]=n}})),e.exports=n,e.exports.GetWebspaceIpAddress=function(e,n){var t={kind:e.kind,definitions:[i(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var a=s[n]||new Set,o=new Set,r=new Set;for(a.forEach((function(e){r.add(e)}));r.size>0;){var l=r;r=new Set,l.forEach((function(e){o.has(e)||(o.add(e),(s[e]||new Set).forEach((function(e){r.add(e)})))}))}return o.forEach((function(n){var s=i(e,n);s&&t.definitions.push(s)})),t}(n,"GetWebspaceIpAddress")},1632:(e,n,t)=>{"use strict";t.r(n)},1628:(e,n,t)=>{"use strict";t.r(n)},1631:(e,n,t)=>{"use strict";t.r(n)}}]); //# sourceMappingURL=domains.js.map?f65dd6646023cae076ec