1(globalThis.webpackChunkPlesk=globalThis.webpackChunkPlesk||[]).push([["views/smb/web/setup"],{1749(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>b});var i=t(396),a=t(787),s=t.n(a),o=t(803),r=t.n(o),d=t(95),l=t(715),c=t(1753),m=t(1755),u=t(1756);t(1758);const p=d.Locale.getTranslate("components.domain-applications.applications"),g=(e,n)=>`ext-${e}:${n??e}`,f=({onFieldChange:e,onStepChange:n,formPrefix:a="",wizardConfig:s={enabled:!0,blankSite:!0,uploadFiles:!0,mailHosting:!0},isMailServiceSupported:o,embeddedForms:d=[],extensionButtons:f=[],values:b,children:x=null,entity:h,className:j,...v})=>{const w=(0,l.useLocation)(),[S,y]=(0,i.useState)(()=>new URLSearchParams(w.search).get("appName")),N=n=>{e("applicationName",n)},k=[s.blankSite&&{name:"blank-site",icon:t(1750),title:(0,i.jsx)(p,{content:"blank-site.title"}),description:(0,i.jsx)(p,{content:"blank-site.description"})},s.uploadFiles&&{name:"upload-files",icon:t(1751),title:(0,i.jsx)(p,{content:"upload-files.title"}),description:(0,i.jsx)(p,{content:"upload-files.description"})},...f.map(({id:e,extensionId:n,title:t,icon:i,description:a})=>({name:g(n,e),id:e,icon:i,title:t,description:a})),s.mailHosting&&o&&{name:"mail-hosting",icon:t(1752),title:(0,i.jsx)(p,{content:"mail-hosting.title"}),description:(0,i.jsx)(p,{content:"mail-hosting.description"})}].filter(Boolean),T=b.applicationName?k.find(({name:e})=>e===b.applicationName):null,I=T&&k.length>1,C=[k.length>1&&{key:"chooseApplicationStep",children:(0,i.jsx)(c.default,{onApplicationSelect:N,applicationsList:k}),nextButton:!1},{key:"addDomainStep",formPrefix:a,children:(0,i.jsxs)(i.Fragment,{children:[I&&(0,i.jsx)(u.default,{icon:T.icon,applicationTitle:T.title,entity:h}),x]}),embeddedForms:d}].filter(Boolean);if((0,i.useEffect)(()=>{if(0===k.length&&N("blank-site"),1===k.length){const[{name:e}]=k;N(e)}},[]),S&&!b.applicationName&&k.length>1){const e=k.find(({name:e,id:n})=>e===S||e===g(S,n));e&&N(e.name)}const F=b.applicationName&&1!==C.length?1:0;return(0,i.useEffect)(()=>{n?.(C[F].key)},[F]),(0,i.jsx)(m.default,{...v,className:r()(j,{"application-wizard-form__with-selected-info":I}),values:b,onFieldChange:e,onStepChange:(n,t)=>0===t&&C.length>1?(e("applicationName",null),S&&(y(null),window.history.replaceState(null,"",w.pathname)),n):t,step:F,steps:C})};f.propTypes={values:s().object.isRequired,className:s().string,onFieldChange:s().func.isRequired,onStepChange:s().func,children:s().node,formPrefix:s().string,wizardConfig:s().shape({enabled:s().bool,blankSite:s().bool,uploadFiles:s().bool}),isMailServiceSupported:s().bool.isRequired,embeddedForms:s().array,extensionButtons:s().array,entity:s().oneOf(["domain","subscription"])};const b=f},1753(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>c});var i=t(397),a=t(787),s=t.n(a),o=t(95),r=(t(1754),t(396));const d=o.Locale.getTranslate("components.domain-applications"),l=({onApplicationSelect:e,applicationsList:n=[]})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Heading,{level:"3",children:(0,r.jsx)(d,{content:"title"})}),(0,r.jsx)(i.ItemList,{minColumnWidth:220,gap:"xs",selectable:!0,stretchable:!0,children:n.map(({id:n,name:t,icon:a,title:s,description:o})=>(0,r.jsx)(i.Item,{"data-action":t,role:"button",icon:(0,r.jsx)(i.Icon,{src:a,intent:"info",size:"48",className:"choose-application-step__icon"}),"data-testid":"listItem","data-cy":n??t,title:(0,r.jsx)(i.Heading,{level:"4",children:s}),onClick:()=>e(t),children:(0,r.jsx)(i.Paragraph,{children:o})},t))})]});l.propTypes={onApplicationSelect:s().func.isRequired,applicationsList:s().arrayOf(s().shape({name:s().string.isRequired,icon:s().string.isRequired,title:s().node,description:s().node}))};const c=l},1755(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>m});var i=t(397),a=t(396),s=t(1371),o=t(95),r=t(787),d=t.n(r);const l=o.Locale.getTranslate("components.buttons"),c=({step:e=0,steps:n=[],onStepChange:t=(e,n)=>n,onSubmit:o,submitButton:r={},cancelButton:d={},...c})=>{const m=(0,a.useRef)(),[u,p]=(0,a.useState)(0),g=u+e,{children:f,formPrefix:b,embeddedForms:x,backButton:h,nextButton:j}={backButton:{},nextButton:{},...n[g]},v=g===n.length-1,w=0===g,S=n[g]?.key??g,y=()=>{m.current.handleEmbeddedFormValues(),p(n=>t(n+e,n+e-1)-e)},N=()=>{m.current.handleEmbeddedFormValues(),p(n=>t(n+e,n+e+1)-e)},k=()=>m.current.submit();return(0,a.jsx)(s.default,{...c,ref:m,additionalButtons:(()=>
1{const e=[w&&d&&(0,a.jsx)(i.Button,{id:"btn-cancel","data-type":S,children:(0,a.jsx)(l,{content:"cancel"}),...d},"cancel"),!w&&h&&(0,a.jsx)(i.Button,{id:"btn-back","data-type":S,arrow:"backward",onClick:y,children:(0,a.jsx)(l,{content:"back"}),...h},"back"),!v&&j&&(0,a.jsx)(i.Button,{id:"btn-next","data-type":S,intent:"primary",onClick:N,arrow:"forward",children:(0,a.jsx)(l,{content:"nextWithoutArrow"}),...j},"next")];return v&&r&&e.push((0,a.isValidElement)(r)?(0,a.cloneElement)(r,{handleSubmit:k}):(0,a.jsx)(i.Button,{id:"btn-submit","data-type":S,intent:"primary",arrow:"forward",onClick:k,children:(0,a.jsx)(l,{content:"ok"}),...r},"submit")),e})(),submitButton:!1,onSubmit:v?o:N,onError:i=>{const a=n.findIndex(({formPrefix:e})=>""===e),s=Object.keys(i).map(e=>{const t=n.findIndex(({formPrefix:n,embeddedForms:t=[]})=>n===e||t.some(({name:n})=>n===e));return t>=0?t:a});p(t(g,s.length>0?Math.min(...s):e)-e)},applyButton:!1,cancelButton:!1,formPrefix:b,embeddedForms:x,children:f})};c.propTypes={step:d().number,steps:d().arrayOf(d().shape({formPrefix:d().string,embeddedForms:d().array,children:d().node,nextButton:d().bool,backButton:d().bool,key:d().string})),onStepChange:d().func,onSubmit:d().func,submitButton:d().object,cancelButton:d().object};const m=c},1756(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>m});var i=t(787),a=t.n(i),s=t(95),o=t(397),r=(t(1757),t(396));const d=s.Locale.getTranslate("components.domain-applications.applications"),l=s.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:l.lmsg("selectedOptionIcon")}),(0,r.jsx)(d,{component:"div",content:"selectedOption",params:{optionName:(0,r.jsx)(o.Text,{bold:!0,children:t}),entity:l.lmsg(`${n}Entity`)}})]});c.propTypes={icon:a().string.isRequired,applicationTitle:a().node.isRequired,entity:a().oneOf(["domain","subscription"])};const m=c},1748(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>i.default});var i=t(1749)},1537(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>c});var i=t(397),a=t(787),s=t.n(a),o=t(95),r=t(396);const d=o.Locale.getTranslate("components.forms.ip-addresses-selector"),l=({ipAddresses:e,namePrefix:n,type:t,isOtherTypeAvailable:a,getIpAddressType:s,...o})=>{const l=(0,i.useTranslate)("components.forms.ip-addresses-selector");return!!e.length&&(0,r.jsxs)(i.FormFieldSelect,{label:(0,r.jsx)(d,{content:a?`${t}Address`:"ipAddress"}),name:`${n}[${t}]`,...o,children:[e.map(({id:e,ipAddress:n,publicIpAddress:t,type:a})=>(0,r.jsx)(i.SelectOption,{value:e,children:`${t||n}${s(a)}`},e)),a&&(0,r.jsx)(i.SelectOption,{value:"none",children:l("noIpAddressHint")})]},t)};l.propTypes={ipAddresses:s().array.isRequired,namePrefix:s().string.isRequired,type:s().string.isRequired,isOtherTypeAvailable:s().bool.isRequired,getIpAddressType:s().func.isRequired};const c=l},1536(e,n,t){"use strict";t.r(n),t.d(n,{TYPE_EXCLUSIVE:()=>m,TYPE_IPV4:()=>d,TYPE_IPV6:()=>l,TYPE_SHARED:()=>c,default:()=>p});var i=t(397),a=t(787),s=t.n(a),o=t(396),r=t(1537);const d="ipv4",l="ipv6",c="SHARED",m="EXCLUSIVE",u=({ipAddresses:e,namePrefix:n,isIPv6Supported:t=!0,...a})=>{const s=(0,i.useTranslate)("components.forms.ip-addresses-selector"),u=(0,o.useMemo)(()=>e.filter(({isIPv6:e,isBroken:n})=>!e&&!n),[e]),p=(0,o.useMemo)(()=>e.filter(({isIPv6:e,isBroken:n})=>e&&!n),[e]),g=(0,o.useCallback)(e=>{switch(e){case c:return` (${s("shared")})`;case m:return` (${s("exclusive")})`;default:return""}},[s]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.default,{ipAddresses:u,namePrefix:n,type:d,isOtherTypeAvailable:t&&!!p.length,getIpAddressType:g,...a}),t&&(0,o.jsx)(r.default,{ipAddresses:p,namePrefix:n,type:l,isOtherTypeAvailable:!!u.length,getIpAddressType:g,...a})]})};u.propTypes={ipAddresses:s().array.isRequired,namePrefix:s().string.isRequired,isIPv6Supported:s().bool};const p=u},1535(e,n,t){"use strict";t.r(n),t.d(n,{TYPE_EXCLUSIVE:()=>i.TYPE_EXCLUSIVE,TYPE_SHARED:()=>i.TYPE_SHARED,default:()=>i.default,prepareBackendData:()=>a});var i=t(1536);const a=e=>{const n=[];return Object.keys(e).forEach(t=>
1{Object.keys(e[t]).forEach(a=>{"none"!==a&&n.push({id:a,ipAddress:e[t][a],isIPv6:t===i.TYPE_IPV6})})}),n}},1746(e,n,t){"use strict";t.r(n),t.d(n,{TYPE_CUSTOM:()=>c,TYPE_TECH:()=>l,default:()=>b});var i=t(397),a=t(396),s=t(787),o=t.n(s),r=t(95),d=t(1747);const l="tech",c="custom",m=r.Locale.getTranslate("components.forms.domain.tech-domain-name"),u=({isEnabled:e,isDefault:n,url:t,vendor:s,maxDomainLength:o,typeName:r,name:d,ipAddress:u=null,onDomainNameChange:f,onTypeChange:b})=>{const[x,h]=(0,a.useState)(e&&n?l:c);if(!e)return(0,a.jsx)(p,{name:d,isEnabled:!1,onDomainNameChange:f});const j=[{key:c,icon:(0,a.jsx)(i.Icon,{name:"ribbon",intent:"success"})},{key:l,icon:(0,a.jsx)(i.Icon,{name:"rocket",intent:"info"})}];return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.Section,{title:(0,a.jsx)(m,{content:"title"}),vertical:!0,children:(0,a.jsx)(i.FormField,{name:r,onChange:e=>(e=>{h(e),b(e),f("")})(e),children:({getId:e,getName:n,getValue:t,setValue:s,isDisabled:o})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.ItemList,{stretchable:!0,selectable:!0,minColumnWidth:270,gap:"sm",value:t(),onSelect:e=>{e!==x&&s(e)},children:j.map(({key:e,icon:n})=>(0,a.jsx)(i.Item,{icon:n,role:"button",value:e,"data-action":`use-${e}-domain`,title:(0,a.jsx)(i.Heading,{level:"4",children:(0,a.jsx)(i.Paragraph,{children:(0,a.jsx)(m,{content:`${e}DomainTitle`})})}),disabled:o(),children:(0,a.jsx)(i.Text,{fontSize:"md",children:(0,a.jsx)(m,{content:`${e}DomainText`})})},e))}),(0,a.jsx)("input",{hidden:!0,id:e(),name:n(),value:t(),readOnly:!0})]})})}),x===l?(0,a.jsx)(g,{name:d,ipAddress:u,url:t,vendor:s,maxDomainLength:o,onDomainNameChange:f}):(0,a.jsx)(p,{name:d,isEnabled:!0,onDomainNameChange:f})]})},p=({name:e,isEnabled:n,onDomainNameChange:t})=>(0,a.jsx)(i.Section,{vertical:!0,children:(0,a.jsx)(d.default,{name:e,label:n?(0,a.jsx)(m,{content:"customDomain"}):(0,a.jsx)(m,{content:"domainName"}),onChange:t,required:!0})});p.propTypes={name:o().string.isRequired,isEnabled:o().bool.isRequired,onDomainNameChange:o().func.isRequired};const g=({name:e,onDomainNameChange:n,...t})=>(0,a.jsx)(i.Section,{vertical:!0,children:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.FormField,{label:(0,a.jsx)(m,{content:"techDomain"}),name:e,onChange:e=>n(e),children:({getId:e,getName:n,...i})=>(0,a.jsx)(f,{id:e(),name:n(),...i,...t})}),(0,a.jsxs)(i.Cuttable,{maxHeight:24,children:[(0,a.jsx)(i.Paragraph,{children:(0,a.jsx)(m,{content:"techDomainDesc"})}),(0,a.jsxs)("ul",{children:[(0,a.jsx)("li",{children:(0,a.jsx)(m,{content:"techDomainRandom"})}),(0,a.jsx)("li",{children:(0,a.jsx)(m,{content:"techDomainDns"})})]}),(0,a.jsx)(i.Paragraph,{children:(0,a.jsx)(m,{content:"techDomainSwitch"})})]})]})});g.propTypes={name:o().string.isRequired,onDomainNameChange:o().func.isRequired};const f=({id:e,name:n,ipAddress:t=null,url:s,vendor:o,getValue:r,setValue:d,maxDomainLength:l})=>{const[c,u]=(0,a.useState)(!1),[p,g]=(0,a.useState)(t),[f,b]=(0,a.useState)({}),x=(0,a.useCallback)(async()=>{if(b({}),!r()||t!==p)if(t){u(!0);try{const e=await(async({url:e,ipAddress:n,vendor:t,maxDomainLength:i})=>{const a=await fetch(e,{method:"POST",body:JSON.stringify({ip_address:n,vendor:t,max_length:i})}),{subdomain:s}=await a.json();if(!s)throw new Error("subdomain is empty");return s})({url:s,ipAddress:t,vendor:o,maxDomainLength:l});d(e),g(t)}catch{b({error:(0,a.jsx)(m,{content:"error"})})}finally{u(!1)}}else b({noIpAddress:(0,a.jsx)(m,{content:"errorNoIpAddress"})})},[r,d,t,p,s,o,l]);return(0,a.useEffect)(()=>{x()},[t]),(0,a.jsxs)(a.Fragment,{children:[c?(0,a.jsx)(i.Status,{progress:!0,children:(0,a.jsx)(m,{content:"generating"})}):(0,a.jsx)(i.Text,{bold:!0,children:r()}),(0,a.jsx)("input",{hidden:!0,id:e,name:n,value:r(),readOnly:!0}),Object.keys(f).map(e=>(0,a.jsxs)(i.Alert,{intent:"danger",children:[(0,a.jsx)(i.Icon,{name:"exclamation-mark-circle-filled",intent:"danger"})," ",f[e]]},e))]})};f.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},u.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=u},1747(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>d});var i=t(397),a=t(787),s=t.n(a),o=t(396);const r=({size:e="lg",...n})=>(0,o.jsx)(i.FormField,{...n,children:({getId:n,getName:t,getValue:a,setValue:s,isDisabled:r})=>(0,o.jsxs)("div",{className:"composite-field",children:[(0,o.jsx)(i.Text,{className:"composite-field__prefix",children:"www. "}),(0,o.jsx)(i.Input,{id:n(),name:t(),value:a(),placeholder:"domain.name",size:e,onCh
1ange:e=>s(e.target.value),disabled:r()})]})});r.propTypes={size:s().string};const d=r},1532(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>m});var i=t(787),a=t.n(i),s=t(397),o=t(1533),r=t(95),d=t(396);const l=r.Locale.getSection("components.elements.lookup"),c=({data:e,dataUrl:n,lookUpParams:t,newItemValue:i,locale:a,placeholder:r,...c})=>(0,d.jsx)(s.FormField,{...c,children:({getId:s,getName:c,getValue:m,setValue:u,isDisabled:p})=>(0,d.jsx)(o.default,{id:s(),name:c(),value:m(),onChange:e=>u(e),data:e,dataUrl:n,lookUpParams:t,newItemValue:i,locale:{...l.messages,...a},disabled:p(),placeholder:r})});c.propTypes={locale:a().object,data:a().array,dataUrl:a().string,lookUpParams:a().object,newItemValue:a().object,placeholder:a().string};const m=c},1745(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>F,useAddDomainFormInDrawer:()=>C});var i=t(396),a=t(787),s=t.n(a),o=t(741),r=t(715),d=t(95),l=t(397),c=t(806),m=t(663),u=t(1746),p=t(1371),g=t(1532),f=t(1748),b=t(1759),x=t.n(b),h=t(1760),j=t(1535);const v=d.Locale.getSection("smb.components.forms.web.add-domain"),w=d.Locale.getTranslate("smb.components.forms.web.add-domain"),S=d.Locale.getTranslate("smb.components.forms.domain-info-section"),y=d.Locale.getTranslate("smb.components.forms.web._shared"),N=d.Locale.getTranslate("admin.components.forms.admin-panel.form.contact-info"),k=d.Locale.getTranslate("components.buttons"),T=d.Locale.getTranslate("admin.components.forms.admin-panel.form.login-info"),I=({id:e,webspaceIpAddress:n=null,webspaceIpAddresses:t,allowCustomerCreation:a=!1,allowWebspaceCreation:s=!1,subscriptionsLookUpParams:c=null,webHostingAvailable:b=!0,canManageMailSettings:I=!1,maxSysnameSize:C,isWindows:F,techDomain:A,settingsEnabled:D=!1,settingsCollapsed:E=!1,applicationWizardConfig:q={},isMailServiceSupported:P=!1,embeddedForms:R,extensionButtons:L=[],cancelLink:V=null,className:H,render:B,onProcess:_,onToggleDomainSettings:U,status:O,...z})=>{const $=(0,o.useApolloClient)(),M=(0,r.useNavigate)(),[W,Y]=(0,i.useState)(z.values),[G,J]=(0,i.useState)(Boolean(z.values.hostingSettings.root)),[X,Q]=(0,i.useState)(!z.values.domainInfo),[Z,K]=(0,i.useState)(n),[ee,ne]=(0,i.useState)(t),te=t,ie=(0,i.useMemo)(()=>"mail-hosting"===W.applicationName,[W.applicationName]),[ae,se]=(0,i.useState)(b);(0,i.useEffect)(()=>{ie&&(Y((0,l.setIn)(W,"hostingType[hosting]","none")),Q(!0))},[ie]),(0,i.useEffect)(()=>{ae||"hosting"!==W.hostingType?.hosting||Y(e=>(0,l.setIn)(e,"hostingType[hosting]","none"))},[ae]),(0,i.useEffect)(()=>{if(G)return;let e=W.domainName.name.replace(/\*/g,"_");-1!==W.hostingSettings.rootPattern.indexOf("<domain>")&&(e=W.hostingSettings.rootPattern.replace("<domain>",e)),Y((0,l.setIn)(W,"hostingSettings[root]",(0,d.toPunycode)(e)))},[W.domainName.name]),(0,i.useEffect)(()=>{W.domainName.webspace?"new"!==W.domainName.webspace.id?$.query({query:x(),variables:{id:btoa(`Domain:${W.domainName.webspace.id}`)}}).then(({data:{domain:e}})=>{const{htype:n,ipAddresses:t=[]}=e??{},i=t[0];if(i){const{publicIpAddress:e,ipAddress:n}=i;K(e||n)}se("VIRTUAL"===n)}).catch(({message:e})=>{V&&M(V),(0,m.addToast)({intent:"danger",message:e})}):se(!0):se(b)},[W.domainName.webspace]);const oe=(e,n)=>{switch(Y(t=>{if(t=(0,l.setIn)(t,e,n),"domainName[name]"===e&&!X){const e=(0,h.generateUserName)({domainName:n,maxUserNameSize:C,isTechDomain:t.domainName.type===u.TYPE_TECH,isWindows:F});t=(0,l.setIn)(t,"domainInfo[userName]",e||z.values.domainInfo.userName)}return t}),["domainInfo[ipSelector][ipv4]","domainInfo[ipSelector][ipv6]","domainInfo[userName]","domainInfo[password]"].includes(e)&&d.UAT.dispatchAction("CUSTOM-VALUE",{name:e}),e){case"hostingSettings[root]":J(!0);break;case"domainInfo[userName]":Q(!0);break;case"domainName[customer]":ne(n.ipAddresses?n.ipAddresses:te)}},re="1"===W.domainName.assignToCustomer||void 0!==W.domainName.targetWebspace||W.domainName.webspace&&"new"===W.domainName.webspace.id,de=re||!Z?Object.keys(ee).map(e=>{const n=W.domainInfo.ipSelector[e];return"none"===n?null:ee[e][n]?.split(" ")[0]}).filter(Boolean)[0]:Z,le=q.enabled?f.default:p.default;return(0,i.jsxs)(le,{vertical:!0,id:e,className:H,render:B,values:W,onFieldChange:oe,onSubmit:e=>(e.domainName.customer&&(e=(0,l.setIn)(e,"domainName[customer]",e.domainName.customer.id)),e.domainName.webspace&&(e=(0,l.setIn)(e,"domainName[webspace]",e.domainName.webspace.id)),e),onLongTask:_,wizardConfig:q,isMailServiceSupported:P,embeddedForms:R,extensionButtons:L,submitButton:{id:"btn-send",children:(0,i.jsx)(w,{content:"buttonAddDomain"})}
1,applyButton:!1,cancelButton:!!V&&{id:"btn-cancel",children:(0,i.jsx)(k,{content:"cancel"}),onClick:()=>{M(V)}},entity:"domain",children:[(O||[]).filter(({status:e})=>"warning"===e).map(({content:e})=>(0,i.jsx)(l.StatusMessage,{intent:"warning",children:(0,i.jsx)("div",{dangerouslySetInnerHTML:{__html:e}})},e)),(0,i.jsx)(u.default,{isEnabled:void 0!==W.domainName.type,isDefault:W.domainName.type===u.TYPE_TECH,typeName:"domainName[type]",name:"domainName[name]",ipAddress:de,onTypeChange:e=>oe("domainName[type]",e),onDomainNameChange:e=>oe("domainName[name]",e),...A}),void 0===W.domainName.assignToCustomer?null:(0,i.jsxs)(l.Section,{children:[(0,i.jsx)(l.FormFieldCheckbox,{name:"domainName[assignToCustomer]",label:(0,i.jsx)(w,{content:"assignToCustomer"}),checkedValue:"1",uncheckedValue:"0"}),"1"===W.domainName.assignToCustomer?(0,i.jsxs)(l.Section,{collapsible:!0,children:[void 0===W.domainName.customer?null:(0,i.jsx)(g.default,{name:"domainName[customer]",label:(0,i.jsx)(w,{content:"customer"}),dataUrl:"/admin/customer/look-up",newItemValue:a?{id:"new",title:v.lmsg("createNewCustomer")}:null,locale:{label:v.lmsg("selectExistingCustomer")},required:!0}),void 0===W.domainName.customer||"new"===W.domainName.customer?.id?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.FormFieldText,{name:"customerInfo[customerContactInfo][contactName]",label:(0,i.jsx)(N,{content:"contactName"}),required:!0}),(0,i.jsx)(l.FormFieldText,{name:"customerInfo[customerContactInfo][email]",label:(0,i.jsx)(N,{content:"email"}),required:!0}),(0,i.jsx)("br",{}),(0,i.jsx)(l.Heading,{level:"4",children:(0,i.jsx)(w,{content:"customerLoginInfoHint"})}),(0,i.jsx)(l.FormFieldText,{name:"customerInfo[customerLoginInfo][userName]",label:(0,i.jsx)(T,{content:"userName"}),required:!0,autoComplete:"off"}),(0,i.jsx)(l.FormFieldPassword,{name:"customerInfo[customerLoginInfo][password]",label:(0,i.jsx)(T,{content:"password"}),required:!0,autoComplete:"new-password"}),(0,i.jsx)(l.FormFieldCheckbox,{name:"customerInfo[customerLoginInfo][isActivationRequired]",label:(0,i.jsx)(T,{content:"emailActivation"}),description:(0,i.jsx)(T,{content:"emailActivationHint"}),checkedValue:"1",uncheckedValue:"0"})]}):null]}):null]}),void 0===W.domainName.webspace||"1"===W.domainName.assignToCustomer?null:(0,i.jsx)(l.Section,{children:(0,i.jsx)(g.default,{name:"domainName[webspace]",label:(0,i.jsx)(w,{content:"target"}),dataUrl:"/smb/web/subscription-look-up",newItemValue:s?{id:"new",title:v.lmsg("createNewTarget")}:null,locale:{label:v.lmsg("selectExistingTarget")},lookUpParams:c,required:!0})}),re?D?(0,i.jsxs)(l.Section,{id:"domainInfo",title:(0,i.jsx)(w,{content:"webspaceLegend"}),collapsible:!0,collapsed:E,onToggle:U,children:[(0,i.jsx)(j.default,{ipAddresses:(0,j.prepareBackendData)(ee),namePrefix:"domainInfo[ipSelector]"}),(0,i.jsx)("br",{}),!ie&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.Heading,{level:"4",children:(0,i.jsx)(w,{content:"credentials"})}),(0,i.jsx)(l.Text,{component:"p",intent:"muted",children:(0,i.jsx)(w,{content:F?"credentialsHintWin":"credentialsHint"})}),(0,i.jsx)(l.FormFieldText,{name:"domainInfo[userName]",label:(0,i.jsx)(S,{content:"userName"}),required:!0}),(0,i.jsx)(l.FormFieldPassword,{name:"domainInfo[password]",label:(0,i.jsx)(S,{content:"password"}),required:!0})]})]}):null:(0,i.jsxs)(l.Section,{children:[(0,i.jsxs)(l.FormFieldSelect,{name:"hostingType[hosting]",label:(0,i.jsx)(w,{content:"hostingManagementOptions"}),children:[ae?(0,i.jsx)(l.SelectOption,{value:"hosting",label:"hosting",children:(0,i.jsx)(w,{content:"websiteHosting"})}):null,(0,i.jsx)(l.SelectOption,{value:"forwarding",label:"forwarding",children:(0,i.jsx)(w,{content:"websiteForwarding"})}),(0,i.jsx)(l.SelectOption,{value:"none",label:"none",children:(0,i.jsx)(w,{content:"websiteNoHosting"})})]}),void 0===W.dnsSettings?null:(0,i.jsx)(l.FormFieldCheckbox,{name:"dnsSettings[dns]",label:(0,i.jsx)(w,{content:"dns"}),description:(0,i.jsx)(w,{content:"dnsHint"}),disabled:W.domainName.type===u.TYPE_TECH,checkedValue:W.domainName.type!==u.TYPE_TECH&&"master",uncheckedValue:"none"}),void 0===W.mailSettings?null:(0,i.jsx)(l.FormFieldCheckbox,{name:"mailSettings[mail]",label:(0,i.jsx)(w,{content:"mail"}),description:I?(0,i.jsx)(w,{content:"mailHint"}):(0,i.jsx)(w,{content:"mailHintNoPermission"}),checkedValue:"1",uncheckedValue:"0"}),"hosting"===W.hostingType.hosting?(0,i.jsxs)(l.Section,{id:"hostingSettings",title:(0,i.jsx)(w,{content:"hostingSettingsSectionLegend"}),collapsible:!0,collapsed:!0,children:[(0,i.jsx)(l.FormField,{name:"hostingSettings[root]",label:(0,i.jsx)(y,{content:"documentRoot"}),description:(0,i.jsx)(y,{content:"documentRootHint"}),required:!0,children:({getId:e,getName:n,getValue:t,setValue:a})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.Icon,{name:"home"})," / ",(0,i.jsx)(l.Input,{id:e(),name:n(),value:t(),onChange:({target:e})=>a(e.value)})]})}),(0,i.jsx)(l.FormFieldRadioButtons,{name:"hostingSettings[seoRedirectDirection]",label:(0,i.jsx)(y,{content:"seoRedirectDirection"}),description:(0,i.jsx)(y,{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.jsx)(y,{content:"seoRedirectDirectionNone"})}]})]}):null,"forwarding"===W.hostingType.hosting?(0,i.jsxs)(l.Section,{id:"forwardingSettings",title:(0,i.jsx)(y,{content:"forwardingSettingsSectionLegend"}),collapsible:!0,collapsed:!0,children:[(0,i.jsx)(l.FormFieldText,{name:"forwardingSettings[forwardTo]",label:(0,i.jsx)(y,{content:"forwardDestination"}),description:(0,i.jsx)(y,{content:"forwardDestinationHint"}),required:!0}),(0,i.jsx)(l.FormFieldRadioButtons,{name:"forwardingSettings[forwardingType]",label:(0,i.jsx)(y,{content:"forwardingTypeOptions"}),options:[{value:"std_fwd301",label:(0,i.jsx)(y,{content:"forwardingHttpCode301"}),description:(0,i.jsx)(y,{content:"forwardingHttpCode301Hint"})},{value:"std_fwd302",label:(0,i.jsx)(y,{content:"forwardingHttpCode302"}),description:(0,i.jsx)(y,{content:"forwardingHttpCode302Hint"})},{value:"frm_fwd",label:(0,i.jsx)(y,{content:"forwardingFrame"}),description:(0,i.jsx)(y,{content:"forwardingFrameHint"})}]})]}):null]})]})};I.propTypes={id:s().string.isRequired,values:s().object.isRequired,webspaceIpAddresses:s().shape({ipv4:s().object,ipv6:s().object}).isRequired,allowCustomerCreation:s().bool,allowWebspaceCreation:s().bool,subscriptionsLookUpParams:s().object,webHostingAvailable:s().bool,webspaceIpAddress:s().string,canManageMailSettings:s().bool,maxSysnameSize:s().number.isRequired,isWindows:s().bool.isRequired,techDomain:s().object.isRequired,settingsEnabled:s().bool,settingsCollapsed:s().bool,applicationWizardConfig:s().object,isMailServiceSupported:s().bool,embeddedForms:s().array,extensionButtons:s().array,cancelLink:s().string,className:s().string,render:s().func,onProcess:s().func,onToggleDomainSettings:s().func,status:s().array};const C=(e,n)=>(0,c.useCreateFormInDrawer)(I,"add-domain",e,n),F=I},1533(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>d});var i=t(396),a=t(95),s=t(827),o=t(787);const r=({disabled:e=!1,...n})=>
1{const[t,o]=(0,i.useState)(null);return(0,i.useEffect)(()=>{const t=new a.LookUp({disabled:e,...n});return o(t),()=>{t.remove(),o(null)}},[]),(0,i.useEffect)(()=>{t&&(e?t.disable():t.enable())},[t,e]),t?(0,i.jsx)(s.default,{children:t}):null};r.propTypes={disabled:t.n(o)().bool};const d=r},1760(e,n,t){"use strict";t.r(n),t.d(n,{generateUserName:()=>s,randomString:()=>i});const i=()=>Math.random().toString(36).slice(2),a=()=>`_${i()}`,s=({domainName:e,maxUserNameSize:n,isTechDomain:t,isWindows:i,postfix:s=a()})=>{let o=e;const r=!i,d=!/^[a-zA-Z0-9_.\-]+$/.test(e),l=/^[0-9]+/.test(e);if("string"!=typeof e||"string"!=typeof s)return"";if(d)return"";if(r&&l)return"";if("number"!=typeof n&&void 0!==n)return"";if(n){if(s.length>n)return"";n-=s.length}return t&&(o=o.split(".")[0]),o=o.toLowerCase().substr(0,n)+s,i&&(o=o.replace(/\.+$/,"")),o}},1974(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>p});var i=t(397),a=t(787),s=t.n(a),o=t(95),r=t(832),d=t(801),l=t(1745),c=t(396);const m=o.Locale.getTranslate("smb.controllers.web.setup"),u=({addDomainUrl:e,openTutorialUrl:n,baseClassName:a="web-setup-panel"})=>{const[s]=(0,l.useAddDomainFormInDrawer)("/smb/web/setup","/smb/web/add-domain/create-webspace/true");return(0,c.jsxs)(c.Fragment,{children:[s,(0,c.jsx)(i.ListEmptyView,{className:a,title:(0,c.jsx)(m,{content:"noDomainTitle"}),description:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(m,{content:"description"}),(0,c.jsx)("br",{}),(0,c.jsx)(m,{content:"openTutorial",params:{link:(0,c.jsx)(r.default,{to:n,target:"_blank",id:"linkOpenTutorial",children:(0,c.jsx)(m,{content:"openTutorialLink"})})}})]}),image:(0,c.jsx)("img",{src:t(1975),width:"408",alt:""}),actions:(0,c.jsx)(i.Button,{component:r.default,to:e,size:"lg",icon:"plus",intent:"primary",id:"buttonAddDomain",children:(0,c.jsx)(m,{content:"addDomain"})})})]})};u.propTypes={addDomainUrl:s().string.isRequired,openTutorialUrl:s().string.isRequired,baseClassName:s().string};const p=(0,d.withPageLayout)(u)},1973(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>i.default});var i=t(1974)},1975(e){e.exports=Jsw.skinUrl+"/images/add-domain.png?d190c8c6ec4abdd19916bbce32c98082"},1750(e){e.exports=Jsw.skinUrl+"/images/code.svg?d9dcc332aeb03168d77f5fbcc97e7bcb"},1752(e){e.exports=Jsw.skinUrl+"/images/mail.svg?e19a5f99ea85bc24608c0601bfe29fcc"},1751(e){e.exports=Jsw.skinUrl+"/images/upload-files.svg?3659f9de736ae2576023d51cbfb48963"},1759(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:"htype"},arguments:[],directives:[]},{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:225}};n.loc.source={body:"query GetWebspaceIpAddress($id: ID!) {\n domain: node(id: $id) {\n ... on Domain {\n htype\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 i=e.type;"NamedType"===i.kind&&n.add(i.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 i={};function a(e,n){for(var t=0;t<e.definitions.length;t++){var i=e.definitions[t];if(i.name&&i.name.value==n)return i}}n.definitions.forEach(function(e){if(e.name){var n=new Set;t(e,n),i[e.name.value]=n}}),e.exports=n,e.exports.GetWebspaceIpAddress=function(e,n){var t={kind:e.kind,definitions:[a(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var s=i[n]||new Set,o=new Set,r=new Set;for(s.forEach(function(e){r.add(e)});r.size>0;){var d=r;r=new Set,d.forEach(function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach(function(e){r.add(e)}))})}return o.forEach(function(n){var i=a(e,n);i&&t.definitions.push(i)}),t}(n,"GetWebspaceIpAddress")},1758(e,n,t){"use strict";t.r(n)},1754(e,n,t){"use strict";t.r(n)},1757(e,n,t){"use strict";t.r(n)}}]); 2//# sourceMappingURL=setup.js.map?6a630761997c38a3ad82
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.