(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[464],{62705:function(e,n,t){var r=t(55639).Symbol;e.exports=r},44239:function(e,n,t){var r=t(62705),i=t(89607),l=t(2333),s=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?i(e):l(e)}},27561:function(e,n,t){var r=t(67990),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},31957:function(e,n,t){var r="object"==typeof t.g&&t.g&&t.g.Object===Object&&t.g;e.exports=r},89607:function(e,n,t){var r=t(62705),i=Object.prototype,l=i.hasOwnProperty,s=i.toString,a=r?r.toStringTag:void 0;e.exports=function(e){var n=l.call(e,a),t=e[a];try{e[a]=void 0;var r=!0}catch(e){}var i=s.call(e);return r&&(n?e[a]=t:delete e[a]),i}},2333:function(e){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},55639:function(e,n,t){var r=t(31957),i="object"==typeof self&&self&&self.Object===Object&&self,l=r||i||Function("return this")();e.exports=l},67990:function(e){var n=/\s/;e.exports=function(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}},23279:function(e,n,t){var r=t(13218),i=t(7771),l=t(14841),s=Math.max,a=Math.min;e.exports=function(e,n,t){var o,u,c,d,m,x,h=0,v=!1,f=!1,g=!0;if("function"!=typeof e)throw TypeError("Expected a function");function invokeFunc(n){var t=o,r=u;return o=u=void 0,h=n,d=e.apply(r,t)}function shouldInvoke(e){var t=e-x,r=e-h;return void 0===x||t>=n||t<0||f&&r>=c}function timerExpired(){var e,t,r,l=i();if(shouldInvoke(l))return trailingEdge(l);m=setTimeout(timerExpired,(e=l-x,t=l-h,r=n-e,f?a(r,c-t):r))}function trailingEdge(e){return(m=void 0,g&&o)?invokeFunc(e):(o=u=void 0,d)}function debounced(){var e,t=i(),r=shouldInvoke(t);if(o=arguments,u=this,x=t,r){if(void 0===m)return h=e=x,m=setTimeout(timerExpired,n),v?invokeFunc(e):d;if(f)return clearTimeout(m),m=setTimeout(timerExpired,n),invokeFunc(x)}return void 0===m&&(m=setTimeout(timerExpired,n)),d}return n=l(n)||0,r(t)&&(v=!!t.leading,c=(f="maxWait"in t)?s(l(t.maxWait)||0,n):c,g="trailing"in t?!!t.trailing:g),debounced.cancel=function(){void 0!==m&&clearTimeout(m),h=0,o=x=u=m=void 0},debounced.flush=function(){return void 0===m?d:trailingEdge(i())},debounced}},13218:function(e){e.exports=function(e){var n=typeof e;return null!=e&&("object"==n||"function"==n)}},37005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},33448:function(e,n,t){var r=t(44239),i=t(37005);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},7771:function(e,n,t){var r=t(55639);e.exports=function(){return r.Date.now()}},14841:function(e,n,t){var r=t(27561),i=t(13218),l=t(33448),s=0/0,a=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(l(e))return s;if(i(e)){var n="function"==typeof e.valueOf?e.valueOf():e;e=i(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var t=o.test(e);return t||u.test(e)?c(e.slice(2),t?2:8):a.test(e)?s:+e}},45844:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/init",function(){return t(35426)}])},35426:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return init}});var r=t(85893),i=t(5616),l=t(41098),s=t(48263),a=t(11163),o=t(67294),u=t(98436),c=t(6010),d=t(67645),m=t(56597),x=t(19467),h=t(55238),v=t(58128),f=t(94121),g=t(65939),p=t(92917),j=t(68917),b=t(21642),P=t(55675),lib_pad=function(e){let{fillString:n="0",maxLength:t=2,which:r="Start"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return String(e)["pad".concat(r)](t,n)};let Z={show:!0},SuggestButton=e=>{let{onClick:n,show:t=Z.show,...i}=e;return t?(0,r.jsx)(x.Z,{onClick:n,tabIndex:-1,...i,children:"Suggest"}):(0,r.jsx)(r.Fragment,{})};SuggestButton.defaultProps=Z;var k=t(50233),w=t(84154);let y={adminPassword:"adminPassword",confirmAdminPassword:"confirmAdminPassword",domainName:"domainName",hostName:"hostName",hostNumber:"hostNumber",organizationName:"organizationName",organizationPrefix:"organizationPrefix"},N={0:()=>"",1:e=>{let[n]=e;return n.substring(0,1).toLocaleLowerCase()},2:e=>e.map(e=>e.substring(0,1).toLocaleLowerCase()).join("")},buildOrganizationPrefix=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=e.split(/\s/).filter(e=>!/and|of/.test(e)).slice(0,5),t=n.length>1?2:n.length;return N[t](n)},buildHostName=e=>{let{organizationPrefix:n,hostNumber:t,domainName:r}=e;return[n,t,r].every(e=>!!e)?"".concat(n,"-striker").concat(lib_pad(t),".").concat(r):""},C=(0,o.forwardRef)((e,n)=>{var t,i,l,a;let{expectHostDetail:u=!1,hostDetail:c,onHostNumberBlurAppend:d,toggleSubmitDisabled:m}=e,[x,Z]=(0,o.useState)(),[N,C]=(0,o.useState)(!1),[S,A]=(0,o.useState)(!1),[V,R]=(0,o.useState)(!0),z=(0,o.useRef)(!0),F=(0,o.useRef)({}),O=(0,o.useRef)({}),_=(0,o.useRef)({}),H=(0,o.useRef)({}),I=(0,o.useRef)({}),q=(0,o.useRef)({}),E=(0,o.useRef)({}),D=(0,o.useRef)({}),T=(0,o.useCallback)(e=>{var n;return null===(n=D.current.setMessage)||void 0===n?void 0:n.call(null,y.organizationPrefix,e)},[]),B=(0,o.useCallback)(e=>{var n;return null===(n=D.current.setMessage)||void 0===n?void 0:n.call(null,y.hostNumber,e)},[]),L=(0,o.useCallback)(e=>{var n;return null===(n=D.current.setMessage)||void 0===n?void 0:n.call(null,y.domainName,e)},[]),$=(0,o.useCallback)(e=>{var n;return null===(n=D.current.setMessage)||void 0===n?void 0:n.call(null,y.hostName,e)},[]),M=(0,o.useCallback)(e=>{var n;return null===(n=D.current.setMessage)||void 0===n?void 0:n.call(null,y.adminPassword,e)},[]),Q=(0,o.useCallback)(e=>{var n;return null===(n=D.current.setMessage)||void 0===n?void 0:n.call(null,y.confirmAdminPassword,e)},[]),U=(0,o.useMemo)(()=>({[y.adminPassword]:{defaults:{getValue:()=>{var e;return null===(e=F.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:()=>{M(void 0)}},isRequired:!0,tests:[{onFailure:()=>{M({children:(0,r.jsxs)(r.Fragment,{children:["Admin password cannot contain single-quote (",(0,r.jsx)(w.Q0,{text:"'"}),"), double-quote (",(0,r.jsx)(w.Q0,{text:'"'}),"), slash (",(0,r.jsx)(w.Q0,{text:"/"}),"), backslash (",(0,r.jsx)(w.Q0,{text:"\\"}),"), angle brackets (",(0,r.jsx)(w.Q0,{text:"<>"}),"), curly brackets (",(0,r.jsx)(w.Q0,{text:"{}"}),")."]})})},test:e=>{let{value:n}=e;return!/['"/\\><}{]/g.test(n)}},{test:k.HJ}]},[y.confirmAdminPassword]:{defaults:{getValue:()=>{var e,n;return null===(n=O.current)||void 0===n?void 0:null===(e=n.getValue)||void 0===e?void 0:e.call(null)},onSuccess:()=>{Q(void 0)}},isRequired:!0,tests:[{onFailure:()=>{Q({children:"Confirmation doesn't match admin password."})},test:e=>{var n;let{value:t}=e;return t===(null===(n=F.current.getValue)||void 0===n?void 0:n.call(null))}},{test:k.HJ}]},[y.domainName]:{defaults:{compare:[!V],getValue:()=>{var e;return null===(e=I.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:()=>{L(void 0)}},isRequired:!0,tests:[{onFailure:()=>{L({children:(0,r.jsxs)(r.Fragment,{children:["Domain name can only contain lowercase alphanumeric, hyphen (",(0,r.jsx)(w.Q0,{text:"-"}),"), and dot (",(0,r.jsx)(w.Q0,{text:"."}),") characters."]})})},test:e=>{let{compare:n,value:t}=e;return n[0]||g.FZ.test(t)}},{test:k.HJ}]},[y.hostName]:{defaults:{compare:[!V],getValue:()=>{var e;return null===(e=E.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:()=>{$(void 0)}},isRequired:!0,tests:[{onFailure:()=>{$({children:(0,r.jsxs)(r.Fragment,{children:["Host name can only contain lowercase alphanumeric, hyphen (",(0,r.jsx)(w.Q0,{text:"-"}),"), and dot (",(0,r.jsx)(w.Q0,{text:"."}),") characters."]})})},test:e=>{let{compare:n,value:t}=e;return n[0]||g.FZ.test(t)}},{test:k.HJ}]},[y.hostNumber]:{defaults:{getValue:()=>{var e;return null===(e=q.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:()=>{B(void 0)}},isRequired:!0,tests:[{onFailure:()=>{B({children:"Striker number can only contain digits."})},test:e=>{let{value:n}=e;return/^\d+$/.test(n)}},{test:k.HJ}]},[y.organizationName]:{defaults:{getValue:()=>{var e;return null===(e=_.current.getValue)||void 0===e?void 0:e.call(null)}},isRequired:!0,tests:[{test:k.HJ}]},[y.organizationPrefix]:{defaults:{getValue:()=>{var e;return null===(e=H.current.getValue)||void 0===e?void 0:e.call(null)},max:5,min:1,onSuccess:()=>{T(void 0)}},isRequired:!0,tests:[{onFailure:e=>{let{max:n,min:t}=e;T({children:"Organization prefix must be ".concat(t," to ").concat(n," lowercase alphanumeric characters.")})},test:e=>{let{max:n,min:t,value:r}=e;return RegExp("^[a-z0-9]{".concat(t,",").concat(n,"}$")).test(r)}}]}}),[V,M,Q,L,$,B,T]),J=(0,o.useMemo)(()=>(0,k.LT)(U),[U]),G=(0,o.useCallback)(function(){let{excludeTestIds:e=[],inputs:n,isContinueOnFailure:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null==m||m.call(null,J({excludeTestIds:e,inputs:n,isContinueOnFailure:t,isIgnoreOnCallbacks:!0,isTestAll:!0}))},[J,m]),W=(0,o.useCallback)(function(){var e;let{organizationName:n=null===(t=_.current.getValue)||void 0===t?void 0:t.call(null)}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=buildOrganizationPrefix(n);return null===(e=H.current.setValue)||void 0===e||e.call(null,r),G({inputs:{[y.organizationPrefix]:{isIgnoreOnCallbacks:!1,value:r}},isContinueOnFailure:!0}),r},[G]),X=(0,o.useCallback)(function(){var e;let{organizationPrefix:n=null===(i=H.current.getValue)||void 0===i?void 0:i.call(null),hostNumber:t=null===(l=q.current.getValue)||void 0===l?void 0:l.call(null),domainName:r=null===(a=I.current.getValue)||void 0===a?void 0:a.call(null)}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=buildHostName({organizationPrefix:n,hostNumber:t,domainName:r});return null===(e=E.current.setValue)||void 0===e||e.call(null,s),G({inputs:{[y.hostName]:{isIgnoreOnCallbacks:!1,value:s}},isContinueOnFailure:!0}),s},[G]),Y=(0,o.useCallback)(()=>{var e;return!!(null===(e=_.current.getValue)||void 0===e?void 0:e.call(null))},[]),K=(0,o.useCallback)(()=>{var e,n,t;return[null===(e=H.current.getValue)||void 0===e?void 0:e.call(null),null===(n=q.current.getValue)||void 0===n?void 0:n.call(null),null===(t=I.current.getValue)||void 0===t?void 0:t.call(null)].every(e=>!!e)},[]),ee=(0,o.useCallback)(()=>{var e;(null===(e=H.current.getIsChangedByUser)||void 0===e?void 0:e.call(null))?C(Y()):W()},[Y,W]),en=(0,o.useCallback)(()=>{var e;(null===(e=E.current.getIsChangedByUser)||void 0===e?void 0:e.call(null))?A(K()):X()},[K,X]),et=(0,o.useCallback)(()=>{var e;let n=W();(null===(e=E.current.getIsChangedByUser)||void 0===e?void 0:e.call(null))||X({organizationPrefix:n})},[X,W]),er=(0,o.useCallback)(()=>{X()},[X]),ei=(0,o.useCallback)(e=>n=>n===e?void 0:e,[]),el=(0,o.useMemo)(()=>(0,r.jsx)(v.Z,{checked:V,onChange:(e,n)=>{R(n),G({inputs:{[y.domainName]:{compare:[!n],isIgnoreOnCallbacks:!1},[y.hostName]:{compare:[!n],isIgnoreOnCallbacks:!1}},isContinueOnFailure:!0})},sx:{padding:".2em"}}),[V,G]);return(0,o.useEffect)(()=>{if([u,c,z.current,I.current,E.current,q.current,_.current,H.current].every(e=>!!e)){var e,n,t,r,i;z.current=!1;let{domain:l,hostName:s,organization:a,prefix:o,sequence:u}=c;null===(e=I.current.setValue)||void 0===e||e.call(null,l),null===(n=E.current.setValue)||void 0===n||n.call(null,s),null===(t=q.current.setValue)||void 0===t||t.call(null,u),null===(r=_.current.setValue)||void 0===r||r.call(null,a),null===(i=H.current.setValue)||void 0===i||i.call(null,o),G()}},[u,c,G]),(0,o.useImperativeHandle)(n,()=>({get:()=>{var e,n,t,r,i,l;return{adminPassword:null===(e=F.current.getValue)||void 0===e?void 0:e.call(null),organizationName:null===(n=_.current.getValue)||void 0===n?void 0:n.call(null),organizationPrefix:null===(t=H.current.getValue)||void 0===t?void 0:t.call(null),domainName:null===(r=I.current.getValue)||void 0===r?void 0:r.call(null),hostNumber:null===(i=q.current.getValue)||void 0===i?void 0:i.call(null),hostName:null===(l=E.current.getValue)||void 0===l?void 0:l.call(null)}}})),(0,r.jsxs)(h.Z,{children:[(0,r.jsxs)(s.ZP,{columns:{xs:1,sm:2,md:3},container:!0,spacing:"1em",children:[(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsxs)(h.Z,{children:[(0,r.jsx)(p.Z,{input:(0,r.jsx)(P.Z,{id:"striker-init-general-organization-name",inputProps:{onBlur:ee},inputLabelProps:{isNotifyRequired:!0},label:"Organization name",onChange:()=>{G()},onHelp:()=>{Z(ei("Name of the organization that maintains this Anvil! system. You can enter anything that makes sense to you."))}}),ref:_}),(0,r.jsxs)(h.Z,{row:!0,sx:{"& > :first-child":{flexGrow:1}},children:[(0,r.jsx)(p.Z,{input:(0,r.jsx)(P.Z,{id:"striker-init-general-organization-prefix",inputProps:{endAdornment:(0,r.jsx)(SuggestButton,{show:N,onClick:et}),inputProps:{maxLength:5,sx:{minWidth:"2.5em"}},onBlur:function(e){for(var n=arguments.length,t=Array(n>1?n-1:0),r=1;r{let{target:{value:n}}=e;G({inputs:{[y.organizationPrefix]:{value:n}}}),T(),C(Y())},onHelp:()=>{Z(ei("Alphanumberic short-form of the organization name. It's used as the prefix for host names."))}}),ref:H}),(0,r.jsx)(p.Z,{input:(0,r.jsx)(P.Z,{id:"striker-init-general-host-number",inputProps:{inputProps:{maxLength:2,sx:{minWidth:"2em"}},onBlur:function(){for(var e=arguments.length,n=Array(e),t=0;t{let{target:{value:n}}=e;G({inputs:{[y.hostNumber]:{value:n}}}),B()},onHelp:()=>{Z(ei("Number or count of this striker; this should be '1' for the first striker, '2' for the second striker, and such."))}}),ref:q,valueType:"number"})]})]})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsxs)(h.Z,{children:[(0,r.jsx)(p.Z,{input:(0,r.jsx)(P.Z,{id:"striker-init-general-domain-name",inputProps:{onBlur:function(e){for(var n=arguments.length,t=Array(n>1?n-1:0),r=1;r{let{target:{value:n}}=e;G({inputs:{[y.domainName]:{value:n}}}),L()},onHelp:()=>{Z(ei("Domain name for this striker. It's also the default domain used when creating new install manifests."))}}),ref:I}),(0,r.jsx)(p.Z,{input:(0,r.jsx)(P.Z,{id:"striker-init-general-host-name",inputProps:{endAdornment:(0,r.jsx)(SuggestButton,{show:S,onClick:er}),onBlur:e=>{let{target:{value:n}}=e;J({inputs:{[y.hostName]:{value:n}}})}},inputLabelProps:{isNotifyRequired:!0},label:"Host name",onChange:e=>{let{target:{value:n}}=e;G({inputs:{[y.hostName]:{value:n}}}),$(),A(K())},onHelp:()=>{Z(ei("Host name for this striker. It's usually a good idea to use the auto-generated value."))}}),ref:E})]})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,sm:2,md:1,children:(0,r.jsxs)(s.ZP,{columns:{xs:1,sm:2,md:1},container:!0,spacing:"1em",sx:{"& > * > *":{width:"100%"}},children:[(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(p.Z,{input:(0,r.jsx)(P.Z,{disableAutofill:!0,id:"striker-init-general-admin-password",inputProps:{inputProps:{type:f.Z.password},onBlur:e=>{let{target:{value:n}}=e;J({inputs:{[y.adminPassword]:{value:n}}})}},inputLabelProps:{isNotifyRequired:!0},label:"Admin password",onChange:e=>{let{target:{value:n}}=e;G({inputs:{[y.adminPassword]:{value:n}}}),M()},onHelp:()=>{Z(ei("Password use to login to this Striker and connect to its database. Don't provide an used password here because it'll be stored as plaintext."))}}),ref:F})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(p.Z,{input:(0,r.jsx)(P.Z,{disableAutofill:!0,id:"striker-init-general-confirm-admin-password",inputProps:{inputProps:{type:f.Z.password},onBlur:e=>{let{target:{value:n}}=e;J({inputs:{[y.confirmAdminPassword]:{value:n}}})}},inputLabelProps:{isNotifyRequired:!0},label:"Confirm password",onChange:e=>{let{target:{value:n}}=e;G({inputs:{[y.confirmAdminPassword]:{value:n}}}),Q()}}),ref:O})})]})})]}),(0,r.jsx)(b.Z,{count:1,defaultMessageType:"warning",ref:D}),(0,r.jsx)(j.Z,{children:(0,r.jsxs)(h.Z,{row:!0,sx:{"& > :last-child":{flexGrow:1}},children:[el,(0,r.jsx)(w.Ac,{inverted:!0,children:V?"Uncheck to skip domain and host name pattern validation.":"Check to re-enable domain and host name pattern validation."})]})}),x&&(0,r.jsx)(j.Z,{onClose:()=>{Z(void 0)},children:x})]})});C.defaultProps={expectHostDetail:!1,hostDetail:void 0,onHostNumberBlurAppend:void 0,toggleSubmitDisabled:void 0},C.displayName="GeneralInitForm";var S=t(41247),A=t(83221),V=t(83909),R=t(66354),z=t(69836),F=t(7932),O=t(37260),_=t(10406),H=t(81796),components_StrikerInitForm=()=>{var e;let{isReady:n,query:{re:t}}=(0,a.useRouter)(),[i,v]=(0,o.useState)(),[f,g]=(0,o.useState)(),[p,b]=(0,o.useState)(!1),[P,Z]=(0,o.useState)(!0),[k,y]=(0,o.useState)(!1),[N,I]=(0,o.useState)(!1),[q,E]=(0,o.useState)(!1),[D,T]=(0,o.useState)(),[B,L]=(0,o.useState)(),$=(0,o.useRef)(!0),M=(0,o.useRef)({}),Q=(0,o.useRef)({}),U=(0,o.useRef)({}),J=(0,o.useRef)({}),[G,W]=(0,o.useState)("Loading..."),X=(0,o.useMemo)(()=>!!t,[t]),Y=(0,o.useMemo)(()=>q?(0,r.jsx)(H.Z,{}):(0,r.jsx)(h.Z,{row:!0,sx:{flexDirection:"row-reverse"},children:(0,r.jsx)(x.Z,{disabled:P,onClick:()=>{var e,n,t,r;g({...null!==(t=null===(e=M.current.get)||void 0===e?void 0:e.call(null))&&void 0!==t?t:{},...null!==(r=null===(n=Q.current.get)||void 0===n?void 0:n.call(null))&&void 0!==r?r:{networks:[]}}),b(!0)},children:"Initialize"})}),[P,q]),K=(0,o.useCallback)(function(){for(var e=arguments.length,n=Array(e),t=0;te))},[]);return(0,o.useEffect)(()=>{if(n){if(!X){W("Initialize striker");return}$.current&&($.current=!1,d.Z.get("/host/local").then(e=>{let{data:n}=e;L(n),W("Reconfigure ".concat(n.shortHostName))}).catch(e=>{let n=(0,S.Z)(e);n.children=(0,r.jsxs)(r.Fragment,{children:["Failed to get host detail data. ",n.children]}),v(n)}))}},[n,X,L]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(O.s_,{children:[(0,r.jsxs)(O.V9,{children:[(0,r.jsx)(w.z,{children:G}),(0,r.jsx)(A.Z,{onClick:e=>{var n,t;let{currentTarget:r}=e;null===(n=J.current.setAnchor)||void 0===n||n.call(null,r),null===(t=J.current.setOpen)||void 0===t||t.call(null,!0)},variant:"normal",children:(0,r.jsx)(V.Z,{icon:l.Z,ref:U})})]}),(0,r.jsxs)(h.Z,{children:[(0,r.jsx)(C,{expectHostDetail:X,hostDetail:B,onHostNumberBlurAppend:e=>{let{target:{value:n}}=e;T(n)},ref:M,toggleSubmitDisabled:e=>{e!==k&&(y(e),K(e,N))}}),(0,r.jsx)(F.Z,{expectHostDetail:X,hostDetail:B,hostSequence:D,ref:Q,toggleSubmitDisabled:e=>{e!==N&&(I(e),K(k,e))}}),i&&(0,r.jsx)(j.Z,{...i,onClose:()=>v(void 0)}),Y]})]}),(0,r.jsx)(m.Z,{actionProceedText:"Initialize",content:(0,r.jsxs)(s.ZP,{container:!0,spacing:".6em",columns:{xs:2},children:[(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.Ac,{children:"Organization name"})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.$_,{children:null==f?void 0:f.organizationName})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.Ac,{children:"Organization prefix"})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.$_,{children:null==f?void 0:f.organizationPrefix})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.Ac,{children:"Striker number"})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.$_,{children:null==f?void 0:f.hostNumber})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.Ac,{children:"Domain name"})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.$_,{children:null==f?void 0:f.domainName})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.Ac,{children:"Host name"})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.$_,{children:null==f?void 0:f.hostName})}),(0,r.jsx)(s.ZP,{item:!0,sx:{marginTop:"1.4em"},xs:2,children:(0,r.jsx)(w.Ac,{children:"Networks"})}),null==f?void 0:f.networks.map(e=>{let{inputUUID:n,interfaces:t,ipAddress:i,name:l,subnetMask:a,type:o,typeCount:u}=e;return(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsxs)(s.ZP,{container:!0,spacing:".6em",columns:{xs:2},children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsxs)(w.Ac,{children:[l," (",(0,r.jsx)(w.Q0,{children:"".concat(o.toUpperCase()).concat(u)}),")"]})}),t.map((e,t)=>{let i="network-confirm-".concat(n,"-interface").concat(t),l="none";if(e){let{networkInterfaceName:n,networkInterfaceUUID:t}=e;i="".concat(i,"-").concat(t),l=n}return(0,r.jsxs)(s.ZP,{columns:{xs:2},container:!0,item:!0,children:[(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.Ac,{children:"Link ".concat(t+1)})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.$_,{children:l})})]},i)}),(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsx)(w.$_,{children:"".concat(i,"/").concat(a)})})]})},"network-confirm-".concat(n))}),(0,r.jsx)(s.ZP,{item:!0,sx:{marginBottom:"1.4em"},xs:2}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.Ac,{children:"Gateway"})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.$_,{children:null==f?void 0:f.gateway})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.Ac,{children:"Gateway network"})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.$_,{children:null==f?void 0:null===(e=f.gatewayInterface)||void 0===e?void 0:e.toUpperCase()})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.Ac,{children:"Domain name server(s)"})}),(0,r.jsx)(s.ZP,{item:!0,xs:1,children:(0,r.jsx)(w.$_,{children:null==f?void 0:f.dns})})]}),dialogProps:{open:p},onCancelAppend:()=>{b(!1)},onProceedAppend:()=>{v(void 0),E(!0),b(!1),d.Z.put("/init",f).then(()=>{(0,_.Z)(0),E(!1),v({children:X?(0,r.jsx)(r.Fragment,{children:"Successfully initiated reconfiguration."}):(0,r.jsxs)(r.Fragment,{children:["Successfully registered the configuration job! You can check the progress at the top right icon. Once the job completes, you can access the"," ",(0,r.jsx)(z.Z,{href:"/login",sx:{color:c.E5,display:"inline-flex"},children:"login page"}),"."]}),type:"info"})}).catch(e=>{let n=(0,S.Z)(e);v(n),E(!1)})},titleText:"Confirm striker initialization"}),(0,r.jsx)(R.Z,{getJobUrl:e=>"".concat(u.Z,"/init/job?start=").concat(e),onFetchSuccessAppend:e=>{var n;null===(n=U.current.indicate)||void 0===n||n.call(null,Object.keys(e).length>0)},ref:J})]})},init=()=>(0,r.jsx)(i.Z,{sx:{display:"flex",flexDirection:"column"},children:(0,r.jsx)(components_StrikerInitForm,{})})}},function(e){e.O(0,[494,804,50,263,213,310,203,197,775,675,633,556,270,774,888,179],function(){return e(e.s=45844)}),_N_E=e.O()}]);