From 82444301e55a610f5d30b71ebc074820bc886886 Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Thu, 21 Dec 2023 16:13:07 -0500 Subject: [PATCH] fix(striker-ui): rebuild --- .../out/_next/static/Kz-iFpfWQR4uU-BQo8Tpi/_buildManifest.js | 1 + .../_middlewareManifest.js | 0 .../_ssgManifest.js | 0 .../out/_next/static/L_YVfOsZ3q029Wna3HXeD/_buildManifest.js | 1 - striker-ui/out/_next/static/chunks/336-33ece0c8120f3bd4.js | 1 - striker-ui/out/_next/static/chunks/336-fc22c38ce3bd59c5.js | 1 + striker-ui/out/_next/static/chunks/86-9d0634bddd7b8dc2.js | 1 + striker-ui/out/_next/static/chunks/86-af7e2d6c5444a983.js | 1 - .../{config-e3aa9a84a8baacc1.js => config-0c3fc9e77c3ed0ed.js} | 2 +- .../out/_next/static/chunks/pages/init-a4caa81141ec112f.js | 1 + .../out/_next/static/chunks/pages/init-b774a276c8a4ad79.js | 1 - .../{login-270fe7adf9f44c67.js => login-452bcef79590e137.js} | 2 +- .../static/chunks/pages/manage-element-0c2dc758c633b42d.js | 1 + .../static/chunks/pages/manage-element-e577aadd99900dcb.js | 1 - striker-ui/out/anvil.html | 2 +- striker-ui/out/config.html | 2 +- striker-ui/out/file-manager.html | 2 +- striker-ui/out/index.html | 2 +- striker-ui/out/init.html | 2 +- striker-ui/out/login.html | 2 +- striker-ui/out/manage-element.html | 2 +- striker-ui/out/server.html | 2 +- 22 files changed, 15 insertions(+), 15 deletions(-) create mode 100644 striker-ui/out/_next/static/Kz-iFpfWQR4uU-BQo8Tpi/_buildManifest.js rename striker-ui/out/_next/static/{L_YVfOsZ3q029Wna3HXeD => Kz-iFpfWQR4uU-BQo8Tpi}/_middlewareManifest.js (100%) rename striker-ui/out/_next/static/{L_YVfOsZ3q029Wna3HXeD => Kz-iFpfWQR4uU-BQo8Tpi}/_ssgManifest.js (100%) delete mode 100644 striker-ui/out/_next/static/L_YVfOsZ3q029Wna3HXeD/_buildManifest.js delete mode 100644 striker-ui/out/_next/static/chunks/336-33ece0c8120f3bd4.js create mode 100644 striker-ui/out/_next/static/chunks/336-fc22c38ce3bd59c5.js create mode 100644 striker-ui/out/_next/static/chunks/86-9d0634bddd7b8dc2.js delete mode 100644 striker-ui/out/_next/static/chunks/86-af7e2d6c5444a983.js rename striker-ui/out/_next/static/chunks/pages/{config-e3aa9a84a8baacc1.js => config-0c3fc9e77c3ed0ed.js} (99%) create mode 100644 striker-ui/out/_next/static/chunks/pages/init-a4caa81141ec112f.js delete mode 100644 striker-ui/out/_next/static/chunks/pages/init-b774a276c8a4ad79.js rename striker-ui/out/_next/static/chunks/pages/{login-270fe7adf9f44c67.js => login-452bcef79590e137.js} (98%) create mode 100644 striker-ui/out/_next/static/chunks/pages/manage-element-0c2dc758c633b42d.js delete mode 100644 striker-ui/out/_next/static/chunks/pages/manage-element-e577aadd99900dcb.js diff --git a/striker-ui/out/_next/static/Kz-iFpfWQR4uU-BQo8Tpi/_buildManifest.js b/striker-ui/out/_next/static/Kz-iFpfWQR4uU-BQo8Tpi/_buildManifest.js new file mode 100644 index 00000000..e91b1f39 --- /dev/null +++ b/striker-ui/out/_next/static/Kz-iFpfWQR4uU-BQo8Tpi/_buildManifest.js @@ -0,0 +1 @@ +self.__BUILD_MANIFEST=function(s,c,a,e,t,n,i,f,u,k,h,j,b,d,r,g,l,_,o,p){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[s,a,e,i,u,h,r,"static/chunks/936-f64829e0e2013921.js",c,t,n,f,g,l,"static/chunks/pages/index-8766524a2b0384fc.js"],"/_error":["static/chunks/pages/_error-2280fa386d040b66.js"],"/anvil":[s,a,e,i,u,h,"static/chunks/638-13a283c3a7da370b.js",c,t,n,f,g,"static/chunks/pages/anvil-7fb5cba6fcb66e8c.js"],"/config":[k,s,a,e,b,"static/chunks/519-4b7761e884c88eb9.js",c,t,n,f,j,d,_,"static/chunks/pages/config-0c3fc9e77c3ed0ed.js"],"/file-manager":[k,s,a,e,i,u,"static/chunks/176-7308c25ba374961e.js",c,t,n,j,"static/chunks/pages/file-manager-ef725a93a3e227aa.js"],"/init":[k,s,a,i,u,h,b,o,c,t,n,f,p,"static/chunks/pages/init-a4caa81141ec112f.js"],"/login":[k,s,a,e,c,t,f,j,d,"static/chunks/pages/login-452bcef79590e137.js"],"/manage-element":[k,s,a,e,i,u,h,b,o,"static/chunks/195-d5fd184cc249f755.js",c,t,n,f,j,d,p,_,"static/chunks/pages/manage-element-0c2dc758c633b42d.js"],"/server":[s,e,i,r,c,n,l,"static/chunks/pages/server-97d4cafd19cb2e9d.js"],sortedPages:["/","/_app","/_error","/anvil","/config","/file-manager","/init","/login","/manage-element","/server"]}}("static/chunks/498-e1933a5461cd8607.js","static/chunks/668-b264bf73f0c1b5eb.js","static/chunks/910-2a0e86a170f6eb77.js","static/chunks/894-e57948de523bcf96.js","static/chunks/284-03dc30df5d459e72.js","static/chunks/157-0528651bf3cd10a7.js","static/chunks/839-dabd319a60c8df83.js","static/chunks/27-7790e406eb2ea28d.js","static/chunks/213-a0488f84cc98f172.js","static/chunks/29107295-fbcfe2172188e46f.js","static/chunks/209-4e2794319babfeec.js","static/chunks/48-d4400834d0a31c6e.js","static/chunks/644-4eec2b397fdacb0c.js","static/chunks/336-fc22c38ce3bd59c5.js","static/chunks/570-6bad4610969fc14b.js","static/chunks/707-ee38ab2abcd0aa3f.js","static/chunks/170-357f4683929223df.js","static/chunks/560-a9c9ecda0eca25a9.js","static/chunks/404-b8e9ff2043a0d30c.js","static/chunks/86-9d0634bddd7b8dc2.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/striker-ui/out/_next/static/L_YVfOsZ3q029Wna3HXeD/_middlewareManifest.js b/striker-ui/out/_next/static/Kz-iFpfWQR4uU-BQo8Tpi/_middlewareManifest.js similarity index 100% rename from striker-ui/out/_next/static/L_YVfOsZ3q029Wna3HXeD/_middlewareManifest.js rename to striker-ui/out/_next/static/Kz-iFpfWQR4uU-BQo8Tpi/_middlewareManifest.js diff --git a/striker-ui/out/_next/static/L_YVfOsZ3q029Wna3HXeD/_ssgManifest.js b/striker-ui/out/_next/static/Kz-iFpfWQR4uU-BQo8Tpi/_ssgManifest.js similarity index 100% rename from striker-ui/out/_next/static/L_YVfOsZ3q029Wna3HXeD/_ssgManifest.js rename to striker-ui/out/_next/static/Kz-iFpfWQR4uU-BQo8Tpi/_ssgManifest.js diff --git a/striker-ui/out/_next/static/L_YVfOsZ3q029Wna3HXeD/_buildManifest.js b/striker-ui/out/_next/static/L_YVfOsZ3q029Wna3HXeD/_buildManifest.js deleted file mode 100644 index 132ad4d7..00000000 --- a/striker-ui/out/_next/static/L_YVfOsZ3q029Wna3HXeD/_buildManifest.js +++ /dev/null @@ -1 +0,0 @@ -self.__BUILD_MANIFEST=function(s,c,e,a,t,n,i,f,u,k,h,j,b,d,r,g,l,_,o){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[s,e,a,i,u,k,d,"static/chunks/936-f64829e0e2013921.js",c,t,n,f,r,g,"static/chunks/pages/index-8766524a2b0384fc.js"],"/_error":["static/chunks/pages/_error-2280fa386d040b66.js"],"/anvil":[s,e,a,i,u,k,"static/chunks/638-13a283c3a7da370b.js",c,t,n,f,r,"static/chunks/pages/anvil-7fb5cba6fcb66e8c.js"],"/config":[s,e,a,j,"static/chunks/519-4b7761e884c88eb9.js",c,t,n,f,h,b,l,"static/chunks/pages/config-e3aa9a84a8baacc1.js"],"/file-manager":["static/chunks/29107295-fbcfe2172188e46f.js",s,e,a,i,u,"static/chunks/176-7308c25ba374961e.js",c,t,n,h,"static/chunks/pages/file-manager-ef725a93a3e227aa.js"],"/init":[s,e,i,u,k,j,_,c,t,n,f,o,"static/chunks/pages/init-b774a276c8a4ad79.js"],"/login":[s,e,a,c,t,f,h,b,"static/chunks/pages/login-270fe7adf9f44c67.js"],"/manage-element":[s,e,a,i,u,k,j,_,"static/chunks/195-d5fd184cc249f755.js",c,t,n,f,h,b,o,l,"static/chunks/pages/manage-element-e577aadd99900dcb.js"],"/server":[s,a,i,d,c,n,g,"static/chunks/pages/server-97d4cafd19cb2e9d.js"],sortedPages:["/","/_app","/_error","/anvil","/config","/file-manager","/init","/login","/manage-element","/server"]}}("static/chunks/498-e1933a5461cd8607.js","static/chunks/668-b264bf73f0c1b5eb.js","static/chunks/910-2a0e86a170f6eb77.js","static/chunks/894-e57948de523bcf96.js","static/chunks/284-03dc30df5d459e72.js","static/chunks/157-0528651bf3cd10a7.js","static/chunks/839-dabd319a60c8df83.js","static/chunks/27-7790e406eb2ea28d.js","static/chunks/213-a0488f84cc98f172.js","static/chunks/209-4e2794319babfeec.js","static/chunks/48-d4400834d0a31c6e.js","static/chunks/644-4eec2b397fdacb0c.js","static/chunks/336-33ece0c8120f3bd4.js","static/chunks/570-6bad4610969fc14b.js","static/chunks/707-ee38ab2abcd0aa3f.js","static/chunks/170-357f4683929223df.js","static/chunks/560-a9c9ecda0eca25a9.js","static/chunks/404-b8e9ff2043a0d30c.js","static/chunks/86-af7e2d6c5444a983.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/336-33ece0c8120f3bd4.js b/striker-ui/out/_next/static/chunks/336-33ece0c8120f3bd4.js deleted file mode 100644 index fb246f93..00000000 --- a/striker-ui/out/_next/static/chunks/336-33ece0c8120f3bd4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[336],{7504:function(n,e,t){var r=t(5893),u=t(7294),l=t(8263),o=t(7357);function i(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t=0||(u[t]=n[t]);return u}(n,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(n);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(u[t]=n[t])}return u}function f(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=null==n?null:"undefined"!==typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var r,u,l=[],o=!0,i=!1;try{for(t=t.call(n);!(o=(r=t.next()).done)&&(l.push(r.value),!e||l.length!==e);o=!0);}catch(a){i=!0,u=a}finally{try{o||null==t.return||t.return()}finally{if(i)throw u}}return l}}(n,e)||function(n,e){if(!n)return;if("string"===typeof n)return i(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return i(n,e)}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}e.Z=function(n){var e=n.calculateItemBreakpoints,t=void 0===e?function(){return{xs:1}}:e,i=n.layout,a=n.wrapperBoxProps,v=s(n,["calculateItemBreakpoints","layout","wrapperBoxProps"]),d=(0,u.useMemo)((function(){return Object.entries(i).map((function(n,e){var r=f(n,2),o=r[0],i=r[1],a=o;return i?(0,u.createElement)(l.ZP,c({},t(e,a),{key:a,item:!0},i)):void 0}))}),[t,i]);return(0,r.jsx)(o.Z,c({},a,{children:(0,r.jsx)(l.ZP,c({container:!0},v,{children:d}))}))}},4069:function(n,e,t){t.d(e,{Z:function(){return g}});var r=t(7294),u=t(3675),l=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=n.postSet,t=n.preSet,r=n.set,l=n.setType,o=void 0===l?"string":l,i=n.valueKey,a=void 0===i?"value":i;return function(n){var l=n.target[a],i=u.Z[o](l);null===t||void 0===t||t.call(null,n),null===r||void 0===r||r.call(null,i),null===e||void 0===e||e.call(null,n)}},o=t(2027);function i(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t=0||(u[t]=n[t]);return u}(n,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(n);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(u[t]=n[t])}return u}function f(n){return function(n){if(Array.isArray(n))return i(n)}(n)||function(n){if("undefined"!==typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||function(n,e){if(!n)return;if("string"===typeof n)return i(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return i(n,e)}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(n){var e=function(n,e){if("object"!==d(n)||null===n)return n;var t=n[Symbol.toPrimitive];if(void 0!==t){var r=t.call(n,e||"default");if("object"!==d(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(n)}(n,"string");return"symbol"===d(e)?e:String(e)}var d=function(n){return n&&"undefined"!==typeof Symbol&&n.constructor===Symbol?"symbol":typeof n};var p="input",y={boolean:!1,number:0,string:""},b={createInputOnChangeHandlerOptions:{},required:!1,valueType:"string"},m=(0,r.forwardRef)((function(n,e){var t=n.input,u=n.inputTestBatch,i=n.onBlurAppend,d=n.onFirstRender,m=n.onFocusAppend,g=n.onUnmount,h=n.required,O=void 0===h?b.required:h,S=n.valueKey,j=n.valueType,w=void 0===j?b.valueType:j,k=n.createInputOnChangeHandlerOptions,C=void 0===k?b.createInputOnChangeHandlerOptions:k,A=C.postSet,I=C.valueKey,M=void 0===I?S:I,P=s(n.createInputOnChangeHandlerOptions,["postSet","valueKey"]),E=t.props,F=(0,r.useMemo)((function(){return null!==M&&void 0!==M?M:"checked"in E?"checked":"value"}),[E,M]),T=E.onBlur,x=E.onChange,B=E.onFocus,Z=E[F],R=void 0===Z?y[w]:Z,V=s(E,["onBlur","onChange","onFocus",F].map(v)),K=(0,r.useState)(R),U=K[0],q=K[1],H=(0,r.useState)(!1),N=H[0],_=H[1],$=(0,r.useState)(!1),D=$[0],L=$[1],W=(0,r.useCallback)((function(n){q(n)}),[]),z=(0,r.useMemo)((function(){var n;return u&&(u.isRequired=O,n=(0,o.LT)(a({},p,u))),n}),[u,O]),G=(0,r.useMemo)((function(){return null!==T&&void 0!==T?T:z&&function(){for(var n=arguments.length,e=new Array(n),t=0;tn.length)&&(e=n.length);for(var t=0,r=new Array(e);tn.length)&&(e=n.length);for(var t=0,r=new Array(e);t=0||(u[t]=n[t]);return u}(n,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(n);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(u[t]=n[t])}return u}function f(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=null==n?null:"undefined"!==typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var r,u,l=[],o=!0,i=!1;try{for(t=t.call(n);!(o=(r=t.next()).done)&&(l.push(r.value),!e||l.length!==e);o=!0);}catch(a){i=!0,u=a}finally{try{o||null==t.return||t.return()}finally{if(i)throw u}}return l}}(n,e)||function(n,e){if(!n)return;if("string"===typeof n)return i(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return i(n,e)}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}e.Z=function(n){var e=n.calculateItemBreakpoints,t=void 0===e?function(){return{xs:1}}:e,i=n.layout,a=n.wrapperBoxProps,d=s(n,["calculateItemBreakpoints","layout","wrapperBoxProps"]),v=(0,u.useMemo)((function(){return Object.entries(i).map((function(n,e){var r=f(n,2),o=r[0],i=r[1],a=o;return i?(0,u.createElement)(l.ZP,c({},t(e,a),{key:a,item:!0},i)):void 0}))}),[t,i]);return(0,r.jsx)(o.Z,c({},a,{children:(0,r.jsx)(l.ZP,c({container:!0},d,{children:v}))}))}},4069:function(n,e,t){t.d(e,{Z:function(){return h}});var r=t(6486),u=t(7294),l=t(3675),o=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=n.postSet,t=n.preSet,r=n.set,u=n.setType,o=void 0===u?"string":u,i=n.valueKey,a=void 0===i?"value":i;return function(n){var u=n.target[a],i=l.Z[o](u);null===t||void 0===t||t.call(null,n),null===r||void 0===r||r.call(null,i),null===e||void 0===e||e.call(null,n)}},i=t(2027);function a(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t=0||(u[t]=n[t]);return u}(n,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(n);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(u[t]=n[t])}return u}function d(n){return function(n){if(Array.isArray(n))return a(n)}(n)||function(n){if("undefined"!==typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||function(n,e){if(!n)return;if("string"===typeof n)return a(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return a(n,e)}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(n){var e=function(n,e){if("object"!==p(n)||null===n)return n;var t=n[Symbol.toPrimitive];if(void 0!==t){var r=t.call(n,e||"default");if("object"!==p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(n)}(n,"string");return"symbol"===p(e)?e:String(e)}var p=function(n){return n&&"undefined"!==typeof Symbol&&n.constructor===Symbol?"symbol":typeof n};var y="input",b={boolean:!1,number:0,string:""},m={createInputOnChangeHandlerOptions:{},debounceWait:500,required:!1,valueType:"string"},g=(0,u.forwardRef)((function(n,e){var t=n.debounceWait,l=void 0===t?m.debounceWait:t,a=n.input,p=n.inputTestBatch,g=n.onBlurAppend,h=n.onFirstRender,O=n.onFocusAppend,S=n.onUnmount,j=n.required,w=void 0===j?m.required:j,k=n.valueKey,C=n.valueType,A=void 0===C?m.valueType:C,I=n.createInputOnChangeHandlerOptions,M=void 0===I?m.createInputOnChangeHandlerOptions:I,P=M.postSet,E=M.valueKey,F=void 0===E?k:E,T=f(n.createInputOnChangeHandlerOptions,["postSet","valueKey"]),x=a.props,B=(0,u.useMemo)((function(){return null!==F&&void 0!==F?F:"checked"in x?"checked":"value"}),[x,F]),Z=x.onBlur,R=x.onChange,V=x.onFocus,K=x[B],U=void 0===K?b[A]:K,q=f(x,["onBlur","onChange","onFocus",B].map(v)),H=(0,u.useState)(U),N=H[0],W=H[1],_=(0,u.useState)(!1),$=_[0],D=_[1],L=(0,u.useState)(!1),z=L[0],G=L[1],J=(0,u.useCallback)((function(n){W(n)}),[]),Q=(0,u.useMemo)((function(){var n;return p&&(p.isRequired=w,n=(0,i.LT)(c({},y,p))),n}),[p,w]),X=(0,u.useCallback)((function(n){var e,t=null!==(e=null===Q||void 0===Q?void 0:Q.call(null,{inputs:c({},y,{value:n}),isIgnoreOnCallbacks:!0}))&&void 0!==e&&e;null===h||void 0===h||h.call(null,{isValid:t}),G(t)}),[h,Q]),Y=(0,u.useMemo)((function(){return(0,r.debounce)(X,l)}),[l,X]),nn=(0,u.useMemo)((function(){return null!==Z&&void 0!==Z?Z:Q&&function(){for(var n=arguments.length,e=new Array(n),t=0;tn.length)&&(e=n.length);for(var t=0,r=new Array(e);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var c="Decorator",s={ok:"".concat(c,"-ok"),warning:"".concat(c,"-warning"),error:"".concat(c,"-error"),off:"".concat(c,"-off")};n.Z=function(e){var n,t=e.colour,c=e.sx,f=l(e,["colour","sx"]);return(0,r.jsx)(o.Z,a({},f,{className:s[t],sx:a((n={borderRadius:i.n_,height:"100%",width:"1.4em"},u(n,"&.".concat(s.ok),{backgroundColor:i.Ej}),u(n,"&.".concat(s.warning),{backgroundColor:i.Wd}),u(n,"&.".concat(s.error),{backgroundColor:i.hM}),u(n,"&.".concat(s.off),{backgroundColor:i.s7}),n),c)}))}},5741:function(e,n,t){var r=t(5893),o=t(1714),i=t(122),u=t(7169),a=t(4690);function l(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function c(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}n.Z=function(e){var n=e.children,t=e.sx,l=s(e,["children","sx"]);return(0,r.jsx)(i.Z,c({underline:"hover",variant:"subtitle1"},l,{sx:c({color:u.lD,textDecorationColor:u.s7},t),children:(0,r.jsxs)(a.Z,{row:!0,children:[n,(0,r.jsx)(o.Z,{sx:{marginLeft:".3em"}})]})}))}},4427:function(e,n,t){var r=t(5893),o=t(2429),i=t(9309),u=t(7169);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function l(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var C=function(e){var n=e.isFloating,t=e.networkInterface.networkInterfaceName,i=e.onClose,u=e.sx,a=O(e,["isFloating","networkInterface","onClose","sx"]),l=n?{borderColor:y.s7,borderRadius:y.n_,borderStyle:"solid",borderWidth:"1px",backgroundColor:y.E5,padding:".6em 1.2em"}:{};return(0,r.jsxs)(o.Z,I({sx:I({display:"flex",flexDirection:"row",alignItems:"center","& > :not(:first-child)":{marginLeft:".5em"}},l,u)},a,{children:[(0,r.jsx)(x.$_,{children:t}),i&&(0,r.jsx)(w.Z,{onClick:i,size:"small",sx:{color:y.s7},children:(0,r.jsx)(s.Z,{})})]}))};C.defaultProps={isFloating:!1,onClose:void 0};var Z=C,M=t(1939),S=(0,t(1496).ZP)(o.Z)((function(){return{borderColor:y.s7,borderStyle:"dashed",borderWidth:"4px",display:"flex",flexDirection:"column",padding:".6em","& > :not(:first-child)":{marginTop:".3em"}}})),P=t(4690),D=t(7971),U=t(4069),A=t(7869),N=t(6284),R=t(3679),E=t(1905),V=t(2519),T=t(634),F=t(2152),L=t(2027);function q(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function $(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],u=!0,a=!1;try{for(t=t.call(e);!(u=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);u=!0);}catch(l){a=!0,o=l}finally{try{u||null==t.return||t.return()}finally{if(a)throw o}}return i}}(e,n)||G(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function W(e){return function(e){if(Array.isArray(e))return q(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||G(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(e,n){if(e){if("string"===typeof e)return q(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?q(e,n):void 0}}var J={ifaceNotApplied:"".concat("NetworkInitForm","-network-interface-not-applied")},z=[void 0,void 0],X="dns",K="gateway",Y=function(e){return"".concat(e,"Interface")},Q=function(e){return"".concat(e,"IPAddress")},ee=function(e){return"".concat(e,"Name")},ne=function(e){return"".concat(e,"SubnetMask")},te=function(e){return"".concat(e,"NetworkSubnetConflict")},re=Array.from({length:2},(function(e,n){return n+1})),oe={bcn:{ip:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"10.20".concat(e,".").concat(n)},mask:"255.255.0.0"},ifn:{ip:function(){return""},mask:""},mn:{ip:function(){return"10.199."},mask:"255.255.0.0"},sn:{ip:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"10.10".concat(e,".").concat(n)},mask:"255.255.0.0"}},ie=function(e){return"network".concat(e)},ue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.inputUUID,t=void 0===n?(0,m.Z)():n,r=e.interfaces,o=void 0===r?W(z):r,i=e.ipAddress,u=void 0===i?"":i,a=e.name,l=e.subnetMask,c=void 0===l?"":l,s=e.type,f=void 0===s?"":s,d=e.typeCount,v=void 0===d?0:d,p=_(e,["inputUUID","interfaces","ipAddress","name","subnetMask","type","typeCount"]),b=a;return a||(b=h.Z[f]&&v>0?"".concat(h.Z[f]," ").concat(v):"Unknown Network"),H({inputUUID:t,interfaces:o,ipAddress:u,name:b,subnetMask:c,type:f,typeCount:v},p)},ae=function(e,n){return[{align:"center",field:"",renderCell:function(t){var i,u=t.row,a=(null!==(i=n[u.networkInterfaceUUID])&&void 0!==i&&i).isApplied,s="grab",f=function(){for(var n=arguments.length,t=new Array(n),r=0;r :not(:first-child)":{marginLeft:".5em"}},children:[(0,r.jsx)(M.Z,{colour:"up"===t?"ok":"off",sx:{height:"auto"}}),(0,r.jsx)(x.$_,{children:i})]})}},{field:"networkInterfaceMACAddress",flex:1,headerName:"MAC",renderCell:function(e){var n=e.value;return(0,r.jsx)(x.$_,{text:n})}},{field:"networkInterfaceState",flex:1,headerName:"State",renderCell:function(e){var n=e.value,t=String(n);return(0,r.jsx)(x.KI,{text:"".concat(t.charAt(0).toUpperCase()).concat(t.substring(1))})}},{field:"networkInterfaceSpeed",flex:1,headerName:"Speed",renderCell:function(e){var n=e.value;return(0,r.jsx)(x.KI,{text:"".concat(parseFloat(n).toLocaleString()," Mbps")})}},{field:"networkInterfaceOrder",flex:1,headerName:"Order"}]},le=function(e){var n=e.allowMigrationNetwork,t=e.createDropMouseUpHandler,a=e.getNetworkTypeCount,l=e.hostDetail,c=void 0===l?{}:l,d=c.hostType,v=c.sequence,p=e.networkIndex,m=e.networkInput,g=e.networkInterfaceCount,k=e.networkInterfaceInputMap,w=e.removeNetwork,j=e.setMessageRe,I=e.setNetworkInputs,O=e.setNetworkInterfaceInputMap,C=e.testInput,M=e.testInputToToggleSubmitDisabled,P=(0,i.Z)(),A=(0,u.Z)(P.breakpoints.up("md")),E=(0,u.Z)(P.breakpoints.up("lg")),T=(0,b.useRef)({}),F=(0,b.useRef)({}),L=m.inputUUID,q=m.interfaces,_=m.ipAddress,G=m.isRequired,J=m.subnetMask,z=m.type,X=m.typeCount,K=(0,b.useMemo)((function(){return ie(L)}),[L]),ee=(0,b.useMemo)((function(){return Y(K)}),[K]),ue=(0,b.useMemo)((function(){return Q(K)}),[K]),ae=(0,b.useMemo)((function(){return ne(K)}),[K]),le=(0,b.useMemo)((function(){return te(K)}),[K]),ce=(0,b.useMemo)((function(){return"node"===d}),[d]),se=(0,b.useMemo)((function(){return!ce&&g<=2?[1]:re}),[ce,g]),fe=(0,b.useMemo)((function(){var e=h.Z.bcn,t=h.Z.ifn,r=h.Z.mn,o=h.Z.sn;return ce&&g>=8&&(n||"mn"===z)?{bcn:e,ifn:t,mn:r,sn:o}:{bcn:e,ifn:t,sn:o}}),[n,ce,g,z]),de=(0,b.useCallback)((function(e,n,t){var r=T.current,o=r.getIsChangedByUser,i=r.setValue,u=F.current,a=u.getIsChangedByUser,l=u.setValue;(null===o||void 0===o?void 0:o.call(null))||(e.ipAddress=n,null===i||void 0===i||i.call(null,n)),(null===a||void 0===a?void 0:a.call(null))||(e.subnetMask=t,null===l||void 0===l||l.call(null,t))}),[]);return(0,b.useEffect)((function(){var e,n;"striker"===d&&"ifn"!==z&&(!(null===(e=T.current.getIsChangedByUser)||void 0===e?void 0:e.call(null))&&Number(v)&&(null===(n=T.current.setValue)||void 0===n||n.call(null,_.replace(/^((?:\d+\.){3})\d*$/,"$1".concat(v)))))}),[d,_,v,z]),(0,b.useEffect)((function(){var e=m.ipAddressInputRef,n=m.subnetMaskInputRef;e===T&&n===F||(m.ipAddressInputRef=T,m.subnetMaskInputRef=F,I((function(e){return W(e)})))}),[m,I]),(0,r.jsxs)(R.Lg,{children:[(0,r.jsxs)(R.CH,{children:[(0,r.jsx)(V.Z,{id:"network-".concat(L,"-name"),isReadOnly:G,inputLabelProps:{isNotifyRequired:!0},label:"Network name",selectItems:Object.entries(fe).map((function(e){var n=$(e,2),t=n[0],r=n[1],o=a(t,{lastIndex:p});return t!==z&&(o+=1),{value:t,displayValue:"".concat(r," ").concat(o)}})),selectProps:{onChange:function(e){var n=e.target.value,t=String(n);m.type=t;var r=a(t,{lastIndex:p});m.typeCount=r,m.name="".concat(h.Z[t]," ").concat(r);var o=oe[t];if(o){var i,u=o.ip,l=o.mask;"striker"===d&&"bcn"===t&&(i="4."),de(m,u(r,i),l)}I((function(e){return W(e)}))},renderValue:E?void 0:function(e){return"".concat(String(e).toUpperCase()," ").concat(X)},value:z}}),!G&&(0,r.jsx)(D.Z,{onClick:function(){w(p)},sx:{padding:".2em",position:"absolute",right:"-9px",top:"-4px"},children:(0,r.jsx)(s.Z,{fontSize:"small"})})]}),(0,r.jsxs)(o.Z,{sx:{display:"flex",flexDirection:"column",margin:".6em","& > :not(:first-child)":{marginTop:"1em"}},children:[se.map((function(e){var n="Link ".concat(e),i=e-1,u=q[i],a=(null!==u&&void 0!==u?u:{}).networkInterfaceUUID,l=void 0===a?"":a,c=A?(0,r.jsx)(x.Ac,{text:"Drop to add interface."}):(0,r.jsx)(f.Z,{sx:{alignSelf:"center",color:y.s7}});return(0,r.jsxs)(o.Z,{sx:{alignItems:"center",display:"flex",flexDirection:"row","& > :not(:first-child)":{marginLeft:"1em"},"& > :last-child":{flexGrow:1}},children:[(0,r.jsx)(x.Ac,{sx:{whiteSpace:"nowrap"},text:n}),(0,r.jsx)(S,{onMouseUp:function(){for(var e=arguments.length,n=new Array(e),r=0;r=we.length||Object.values(_).every((function(e){return e.isApplied}))||"node"===t&&we.length<=6}),[t,re,we,_]),Ie=(0,b.useMemo)((function(){return u&&!l}),[u,l]),Oe=(0,b.useMemo)((function(){return re.every((function(e){return"mn"!==e.type}))}),[re]),Ce=(0,b.useCallback)((function(e,n){var t;return null===(t=ye.current.setMessage)||void 0===t?void 0:t.call(null,e,n)}),[]),Ze=(0,b.useCallback)((function(e,n){var t;return null===(t=ye.current.setMessageRe)||void 0===t?void 0:t.call(null,e,n)}),[]),Me=(0,b.useCallback)((function(e){return Ce(X,e)}),[Ce]),Se=(0,b.useCallback)((function(e){return Ce(K,e)}),[Ce]),Pe=(0,b.useCallback)((function(e){var n,t=e.fn,r=void 0===t?"every":t,o=e.ip,i=void 0===o?"":o,u=e.mask,a=void 0===u?"":u,l=e.isNegateMatch,c=void 0===l?"every"===r:l,s=e.onMatch,f=e.onMiss,d=e.skipUUID,v="every"===r;try{n=new p.Netmask("".concat(i,"/").concat(a))}catch(b){}return re[r]((function(e){var t,r,o=e.inputUUID,u=e.ipAddressInputRef,a=e.subnetMaskInputRef;if(o===d)return v;var l=null===(t=null===u||void 0===u?void 0:u.current.getValue)||void 0===t?void 0:t.call(null),m=null===(r=null===a||void 0===a?void 0:a.current.getValue)||void 0===r?void 0:r.call(null),g=!1;try{g=function(e,n){var t=n.b,r=n.bIP,o=void 0===r?"":r;return e.contains(null!==t&&void 0!==t?t:o)||void 0!==t&&t.contains(e)}(new p.Netmask("".concat(l,"/").concat(m)),{b:n,bIP:i})}catch(b){}return g?null===s||void 0===s||s.call(null,e):null===f||void 0===f||f.call(null,e),c?!g:g}))}),[re]),De=(0,b.useCallback)((function(e){Ce("api",e)}),[Ce]),Ue=(0,b.useMemo)((function(){var e,n=(B(e={},X,{defaults:{getValue:function(){var e;return null===(e=be.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:function(){Me()}},tests:[{onFailure:function(){Me({children:"Domain name servers should be a comma-separated list of IPv4 addresses without trailing comma(s)."})},test:function(e){var n=e.value;return k.ah.test(n)}},{test:L.HJ}]}),B(e,K,{defaults:{getValue:function(){var e;return null===(e=me.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:function(){Se()}},tests:[{onFailure:function(){Se({children:"Gateway should be a valid IPv4 address."})},test:function(e){var n=e.value;return k.tf.test(n)}},{test:function(e){var n=e.value,t=!0,r=Pe({fn:"some",ip:n,onMatch:function(e){var r=e.ipAddress,o=e.name,i=e.type,u=e.typeCount;if(n===r)return t=!1,void Se({children:"Gateway cannot be the same as IP address in ".concat(o,".")});pe("".concat(i).concat(u))}});return r||Se({children:"Gateway must be in one network's subnet."}),r&&t}},{test:L.HJ}]}),e);return re.forEach((function(e){var t,r,o=e.inputUUID,i=e.interfaces,u=e.ipAddressInputRef,a=e.name,l=e.subnetMaskInputRef,c=ie(o),s=Y(c),f=Q(c),d=ne(c),v=function(e){return Ce(s,e)},p=function(e){return Ce(f,e)},b=function(e){return Ce(d,e)},m=function(e,n,t){var r,o="".concat(te(c),"-").concat(n),i="".concat(te(ie(n)),"-").concat(e);Ce((null===(r=ye.current.exists)||void 0===r?void 0:r.call(null,i))?i:o,t)},g=function(e){var n=e.ip,i=void 0===n?null===(t=null===u||void 0===u?void 0:u.current.getValue)||void 0===t?void 0:t.call(null):n,c=e.mask,s=void 0===c?null===(r=null===l||void 0===l?void 0:l.current.getValue)||void 0===r?void 0:r.call(null):c;return Pe({ip:i,mask:s,onMatch:function(e){var n=e.inputUUID,t=e.name;m(o,n,{children:'"'.concat(a,'" and "').concat(t,'" cannot be in the same subnet.')})},onMiss:function(e){var n=e.inputUUID;m(o,n)},skipUUID:o})};n[s]={defaults:{getCompare:function(){return i.map((function(e){return void 0!==e}))},onSuccess:function(){v()}},tests:[{onFailure:function(){v({children:"".concat(a," must have at least 1 interface.")})},test:function(e){return e.compare.some((function(e){return e}))}},{onFailure:function(){v({children:"".concat(a," must have a Link 1 interface.")})},test:function(e){var n=$(e.compare,2),t=n[0];return!(n[1]&&!t)}}]},n[f]={defaults:{getValue:function(){var e;return null===(e=null===u||void 0===u?void 0:u.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:function(){p()}},tests:[{onFailure:function(){p({children:"IP address in ".concat(a," must be a valid IPv4 address.")})},test:function(e){var n=e.value;return k.tf.test(n)}},{test:function(e){var n=e.value;return g({ip:n})}},{test:L.HJ}]},n[ee(c)]={defaults:{value:a},tests:[{test:L.HJ}]},n[d]={defaults:{getValue:function(){var e;return null===(e=null===l||void 0===l?void 0:l.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:function(){b()}},tests:[{onFailure:function(){b({children:"Subnet mask in ".concat(a," must be a valid IPv4 address.")})},test:function(e){var n=e.value;return k.tf.test(n)}},{test:function(e){var n=e.value;return g({mask:n})}},{test:L.HJ}]}})),n}),[re,Me,Se,Ce,Pe]),Ae=(0,b.useMemo)((function(){return(0,L.LT)(Ue)}),[Ue]),Ne=(0,b.useCallback)((function(e){null===s||void 0===s||s.call(null,Ae(H({isIgnoreOnCallbacks:!0,isTestAll:!0},e)))}),[Ae,s]),Re=(0,b.useCallback)((function(){fe(void 0)}),[]),Ee=(0,b.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};re.unshift(ue(e)),null===s||void 0===s||s.call(null,!1),oe(W(re))}),[re,s]),Ve=(0,b.useCallback)((function(e){var n=$(re.splice(e,1),1)[0],t=n.inputUUID;n.interfaces.forEach((function(e){if(void 0!==e){var n=e.networkInterfaceUUID;_[n].isApplied=!1}})),Ne({excludeTestIdsRe:RegExp(t)}),oe(W(re)),G((function(e){return H({},e)}))}),[re,_,Ne]),Te=(0,b.useCallback)((function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.inputs,r=void 0===t?re:t,o=n.lastIndex,i=void 0===o?0:o,u=0,a=r.length-1;a>=i;a-=1)r[a].type===e&&(u+=1);return u}),[re]),Fe=(0,b.useMemo)((function(){if(void 0!==se){var e=se.networkInterfaceUUID;return function(n,t){return function(){var r,o=(null!==(r=n[t])&&void 0!==r?r:{}).networkInterfaceUUID;o&&o!==e&&(_[o].isApplied=!1),n[t]=se,_[e].isApplied=!0}}}}),[se,_]),Le=(0,b.useMemo)((function(){return se?{cursor:"grabbing",userSelect:"none"}:{}}),[se]),qe=(0,b.useMemo)((function(){if(void 0===se)return(0,r.jsx)(r.Fragment,{});var e=R.x,n=R.y;return(0,r.jsx)(Z,{isFloating:!0,networkInterface:se,sx:{left:"calc(".concat(e,"px + .4em)"),position:"absolute",top:"calc(".concat(n,"px - 1.6em)"),zIndex:20}})}),[R,se]),Be=(0,b.useMemo)((function(){return se?function(){Re()}:void 0}),[Re,se]),He=(0,b.useMemo)((function(){return se?function(e){var n=e.currentTarget,t=e.nativeEvent,r=t.clientX,o=t.clientY,i=n.getBoundingClientRect(),u=i.left,a=i.top;V({x:r-u,y:o-a})}:void 0}),[se]),_e=(0,b.useMemo)((function(){return se?function(){Re()}:void 0}),[Re,se]);(0,b.useEffect)((function(){if([Object.keys(_).length>0,u,l,ge.current,be.current,me.current].every((function(e){return Boolean(e)}))){var e,n;ge.current=!1;var t=l.dns,r=l.gateway,o=l.gatewayInterface,i=l.networks;if([t,r,o,i].some((function(e){return!e})))return;null===(e=be.current.setValue)||void 0===e||e.call(null,t),null===(n=me.current.setValue)||void 0===n||n.call(null,r);var a=[],c=Object.values(i).reduce((function(e,n){var t,r,o=n.ip,i=n.link1Uuid,u=n.link2Uuid,l=void 0===u?"":u,c=n.subnetMask,s=n.type,f=Te(s,{inputs:e})+1,d=M[s]===f,v="".concat(h.Z[s]," ").concat(f);return a.push(i,l),e.push({inputUUID:(0,m.Z)(),interfaces:[null===(t=_[i])||void 0===t?void 0:t.metadata,null===(r=_[l])||void 0===r?void 0:r.metadata],ipAddress:o,isRequired:d,name:v,subnetMask:c,type:s,typeCount:f}),e}),[]);pe(o),G((function(e){var n=H({},e);return a.forEach((function(e){n[e]&&(n[e].isApplied=!0)})),n})),oe(c),Ne()}}),[u,Te,l,_,M,Ne]),(0,b.useEffect)((function(){return(0,T.Z)(1,De),window&&window.addEventListener("beforeunload",(function(){var e=new XMLHttpRequest;e.open("PUT","".concat(g.Z,"/init/set-map-network"),!1),e.send(null)}),{once:!0}),function(){(0,T.Z)(0,De)}}),[De]),(0,b.useImperativeHandle)(n,(function(){return H({},ye.current,{get:function(){var e,n;return{dns:null===(e=be.current.getValue)||void 0===e?void 0:e.call(null),gateway:null===(n=me.current.getValue)||void 0===n?void 0:n.call(null),gatewayInterface:ve,networks:re.map((function(e){var n,t,r=e.inputUUID,o=e.interfaces,i=e.ipAddressInputRef,u=e.name,a=e.subnetMaskInputRef,l=e.type,c=e.typeCount;return{inputUUID:r,interfaces:o,ipAddress:null!==(I=null===(n=null===i||void 0===i?void 0:i.current.getValue)||void 0===n?void 0:n.call(null))&&void 0!==I?I:"",name:u,subnetMask:null!==(O=null===(t=null===a||void 0===a?void 0:a.current.getValue)||void 0===t?void 0:t.call(null))&&void 0!==O?O:"",type:l,typeCount:c}}))}}})}),[ve,re]);var $e,We="13em";return xe?(0,r.jsx)(F.Z,{}):(0,r.jsxs)(o.Z,{onMouseDown:function(e){var n=e.clientX,t=e.clientY,r=e.currentTarget.getBoundingClientRect(),o=r.left,i=r.top;V({x:n-o,y:t-i})},onMouseLeave:Be,onMouseMove:He,onMouseUp:_e,sx:H({position:"relative"},Le),children:[qe,(0,r.jsxs)(o.Z,{sx:{display:"flex",flexDirection:"column","& > :not(:first-child, :nth-child(3))":{marginTop:"1em"}},children:[(0,r.jsx)(d._,{autoHeight:!0,columns:ae((function(e){fe(e)}),_),componentsProps:{row:{onMouseDown:function(e){var n=e.target,t=(void 0===n?{}:n).parentElement,r=(void 0===t?{}:t).dataset,o=(void 0===r?{}:r).id,i=void 0===o?void 0:o;if(i){var u=_[i],a=u.isApplied,l=u.metadata;a||fe(l)}}}},disableColumnMenu:!0,disableSelectionOnClick:!0,getRowClassName:function(e){var n,t=e.row.networkInterfaceUUID,r="";return(null!==(n=_[t])&&void 0!==n&&n).isApplied||(r+=" ".concat(J.ifaceNotApplied)),r},getRowId:function(e){return e.networkInterfaceUUID},hideFooter:!0,initialState:{sorting:{sortModel:[{field:"networkInterfaceName",sort:"asc"}]}},rows:we,sx:($e={color:y.s7},B($e,"& .".concat(a.Z.root),{color:"inherit"}),B($e,"& .".concat(v._.cell,":focus"),{outline:"none"}),B($e,"& .".concat(v._.row,".").concat(J.ifaceNotApplied,":hover"),B({cursor:"grab"},"& .".concat(v._.cell," p"),{cursor:"auto"})),$e)}),!Ie&&(0,r.jsx)(P.Z,{row:!0,sx:{"& > :first-child":{alignSelf:"start",marginTop:".7em"},"& > :last-child":{flexGrow:1}},children:(0,r.jsx)(o.Z,{sx:{alignItems:"strech",display:"flex",flexDirection:"row",overflowX:"auto",paddingLeft:".3em","& > div":{marginBottom:".8em",marginTop:".4em",minWidth:We,width:"25%"},"& > :not(:first-child)":{marginLeft:"1em"}},children:re.map((function(e,n){var o=e.inputUUID;return(0,r.jsx)(le,{allowMigrationNetwork:Oe,createDropMouseUpHandler:Fe,getNetworkTypeCount:Te,hostDetail:{hostType:t,sequence:x},networkIndex:n,networkInput:e,networkInterfaceCount:we.length,networkInterfaceInputMap:_,removeNetwork:Ve,setMessageRe:Ze,setNetworkInputs:oe,setNetworkInterfaceInputMap:G,testInput:Ae,testInputToToggleSubmitDisabled:Ne},"network-".concat(o))}))})}),(0,r.jsxs)(P.Z,{sm:"row",sx:{marginTop:".2em","& > :not(button)":{minWidth:We,width:{sm:"25%"}}},children:[(0,r.jsx)(D.Z,{disabled:je,onClick:function(){Ee()},children:(0,r.jsx)(f.Z,{})}),(0,r.jsx)(U.Z,{input:(0,r.jsx)(N.Z,{id:"network-init-gateway",inputProps:{onBlur:function(e){var n=e.target.value;Ae({inputs:B({},K,{value:n})})}},inputLabelProps:{isNotifyRequired:!0},onChange:function(e){var n=e.target.value;Ne({inputs:B({},K,{value:n})}),Se()},label:"Gateway"}),ref:me}),(0,r.jsx)(U.Z,{input:(0,r.jsx)(N.Z,{id:"network-init-dns-csv",inputProps:{onBlur:function(e){var n=e.target.value;Ae({inputs:B({},X,{value:n})})}},inputLabelProps:{isNotifyRequired:!0},onChange:function(e){var n=e.target.value;Ne({inputs:B({},X,{value:n})}),Me()},label:"Domain name server(s)"}),ref:be})]}),(0,r.jsx)(A.Z,{count:1,defaultMessageType:"warning",ref:ye})]})]})}));ce.defaultProps={expectHostDetail:!1,hostDetail:void 0,hostSequence:void 0,toggleSubmitDisabled:void 0},ce.displayName="NetworkInitForm";var se=ce},2519:function(e,n,t){t.d(n,{Z:function(){return Z}});var r=t(5893),o=t(5603),i=t(8128),u=t(3640),a=t(7294),l=t(1363),c=t(4427),s=t(9),f=t(192),d=t(5537),v=t(9558),p=t(6239),b=t(7021),m=t(1057),g=t(4799),y=t(3213),h=t(7169);function k(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function w(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var j=function(e){var n=e.onClearIndicatorClick,t=x(e,["onClearIndicatorClick"]),i=t.sx,u=t.value,l=x(t,["sx","value"]),c=(0,a.useMemo)((function(){var e;return w((k(e={},"& .".concat(o.Z.icon),{color:h.s7}),k(e,"& .".concat(v.Z.root),{marginRight:".8em"}),k(e,"& .".concat(p.Z.root),{color:h.s7,visibility:"hidden"}),k(e,"&:hover .".concat(v.Z.root," .").concat(p.Z.root,",\n &.").concat(b.Z.focused," .").concat(v.Z.root," .").concat(p.Z.root),{visibility:"visible"}),e),i)}),[i]),s=(0,a.useMemo)((function(){return String(u).length>0&&n&&(0,r.jsx)(m.Z,{position:"end",children:(0,r.jsx)(g.Z,{onClick:n,children:(0,r.jsx)(d.Z,{fontSize:"small"})})})}),[n,u]);return(0,r.jsx)(y.Z,w({endAdornment:s,value:u},l,{sx:c}))};function I(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function O(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var Z=function(e){var n=e.id,t=e.label,d=e.selectItems,v=e.checkItem,p=e.disableItem,b=e.formControlProps,m=e.hideItem,g=e.inputLabelProps,y=void 0===g?{}:g,h=e.isReadOnly,k=void 0!==h&&h,w=e.messageBoxProps,x=void 0===w?{}:w,Z=e.name,M=e.onBlur,S=e.onChange,P=e.onFocus,D=e.required,U=e.selectProps,A=void 0===U?{}:U,N=A.multiple,R=A.sx,E=e.value,V=e.isCheckableItems,T=void 0===V?N:V,F=C(e.selectProps,["multiple","sx"]),L=(0,a.useMemo)((function(){return k?O(I({},"& .".concat(o.Z.icon),{visibility:"hidden"}),R):R}),[k,R]),q=(0,a.useCallback)((function(e){return T&&(0,r.jsx)(i.Z,{checked:null===v||void 0===v?void 0:v.call(null,e)})}),[v,T]),B=(0,a.useCallback)((function(e,t){return(0,r.jsxs)(c.Z,{disabled:null===p||void 0===p?void 0:p.call(null,e),sx:{display:(null===m||void 0===m?void 0:m.call(null,e))?"none":void 0},value:e,children:[q(e),t]},"".concat(n,"-").concat(e))}),[q,p,m,n]),H=(0,a.useMemo)((function(){return"".concat(n,"-select-element")}),[n]),_=(0,a.useMemo)((function(){return(0,r.jsx)(s.Z,{id:n,label:t})}),[n,t]),$=(0,a.useMemo)((function(){return t&&(0,r.jsx)(f.Z,O({htmlFor:H,isNotifyRequired:D},y,{children:t}))}),[y,D,t,H]),W=(0,a.useMemo)((function(){return d.map((function(e){var n="string"===typeof e?{value:e}:e,t=n.value,r=n.displayValue;return B(t,void 0===r?t:r)}))}),[B,d]);return(0,r.jsxs)(u.Z,O({fullWidth:!0},b,{children:[$,(0,r.jsx)(j,O({id:H,input:_,multiple:N,name:Z,onBlur:M,onChange:S,onFocus:P,readOnly:k,value:E},F,{sx:L,children:W})),(0,r.jsx)(l.Z,O({},x))]}))}},3106:function(e,n){n.Z={bcn:"Back-Channel Network",ifn:"Internet-Facing Network",mn:"Migration Network",sn:"Storage Network"}},634:function(e,n,t){var r=t(5893),o=t(4390),i=t(1770);n.Z=function(e,n){o.Z.put("/init/set-map-network",{value:e}).catch((function(t){var o=(0,i.Z)(t);o.children=(0,r.jsxs)(r.Fragment,{children:["Failed to ",e?"enable":"disable"," network mapping."," ",o.children]}),null===n||void 0===n||n.call(null,o)}))}}}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/86-af7e2d6c5444a983.js b/striker-ui/out/_next/static/chunks/86-af7e2d6c5444a983.js deleted file mode 100644 index 1597de65..00000000 --- a/striker-ui/out/_next/static/chunks/86-af7e2d6c5444a983.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[86],{1939:function(e,n,t){var r=t(5893),o=t(7357),i=t(7169);function u(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var c="Decorator",s={ok:"".concat(c,"-ok"),warning:"".concat(c,"-warning"),error:"".concat(c,"-error"),off:"".concat(c,"-off")};n.Z=function(e){var n,t=e.colour,c=e.sx,f=l(e,["colour","sx"]);return(0,r.jsx)(o.Z,a({},f,{className:s[t],sx:a((n={borderRadius:i.n_,height:"100%",width:"1.4em"},u(n,"&.".concat(s.ok),{backgroundColor:i.Ej}),u(n,"&.".concat(s.warning),{backgroundColor:i.Wd}),u(n,"&.".concat(s.error),{backgroundColor:i.hM}),u(n,"&.".concat(s.off),{backgroundColor:i.s7}),n),c)}))}},5741:function(e,n,t){var r=t(5893),o=t(1714),i=t(122),u=t(7169),a=t(4690);function l(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function c(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}n.Z=function(e){var n=e.children,t=e.sx,l=s(e,["children","sx"]);return(0,r.jsx)(i.Z,c({underline:"hover",variant:"subtitle1"},l,{sx:c({color:u.lD,textDecorationColor:u.s7},t),children:(0,r.jsxs)(a.Z,{row:!0,children:[n,(0,r.jsx)(o.Z,{sx:{marginLeft:".3em"}})]})}))}},4427:function(e,n,t){var r=t(5893),o=t(2429),i=t(9309),u=t(7169);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function l(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var Z=function(e){var n=e.isFloating,t=e.networkInterface,i=t.networkInterfaceName,u=t.networkInterfaceState,a=e.onClose,l=e.sx,c=C(e,["isFloating","networkInterface","onClose","sx"]),f=n?{borderColor:y.s7,borderRadius:y.n_,borderStyle:"solid",borderWidth:"1px",backgroundColor:y.E5,padding:".6em 1.2em"}:{};return(0,r.jsxs)(o.Z,O({sx:O({display:"flex",flexDirection:"row","& > :not(:first-child)":{alignSelf:"center",marginLeft:".5em"}},f,l)},c,{children:[(0,r.jsx)(x.Z,{colour:"up"===u?"ok":"off",sx:{height:"auto"}}),(0,r.jsx)(j.Ac,{text:i}),a&&(0,r.jsx)(w.Z,{onClick:a,size:"small",sx:{color:y.s7},children:(0,r.jsx)(s.Z,{})})]}))};Z.defaultProps={isFloating:!1,onClose:void 0};var M=Z,S=(0,t(1496).ZP)(o.Z)((function(){return{borderColor:y.s7,borderStyle:"dashed",borderWidth:"4px",display:"flex",flexDirection:"column",padding:".6em","& > :not(:first-child)":{marginTop:".3em"}}})),P=t(4690),D=t(7971),U=t(4069),A=t(7869),N=t(6284),R=t(3679),E=t(1905),V=t(2519),T=t(634),F=t(2152),L=t(2027);function q(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function W(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],u=!0,a=!1;try{for(t=t.call(e);!(u=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);u=!0);}catch(l){a=!0,o=l}finally{try{u||null==t.return||t.return()}finally{if(a)throw o}}return i}}(e,n)||$(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(e){return function(e){if(Array.isArray(e))return q(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||$(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $(e,n){if(e){if("string"===typeof e)return q(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?q(e,n):void 0}}var J={ifaceNotApplied:"".concat("NetworkInitForm","-network-interface-not-applied")},z=[void 0,void 0],X="dns",K="gateway",Y=function(e){return"".concat(e,"Interface")},Q=function(e){return"".concat(e,"IPAddress")},ee=function(e){return"".concat(e,"Name")},ne=function(e){return"".concat(e,"SubnetMask")},te=function(e){return"".concat(e,"NetworkSubnetConflict")},re=Array.from({length:2},(function(e,n){return n+1})),oe={bcn:{ip:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"10.20".concat(e,".").concat(n)},mask:"255.255.0.0"},ifn:{ip:function(){return""},mask:""},mn:{ip:function(){return"10.199."},mask:"255.255.0.0"},sn:{ip:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"10.10".concat(e,".").concat(n)},mask:"255.255.0.0"}},ie=function(e){return"network".concat(e)},ue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.inputUUID,t=void 0===n?(0,m.Z)():n,r=e.interfaces,o=void 0===r?G(z):r,i=e.ipAddress,u=void 0===i?"":i,a=e.name,l=e.subnetMask,c=void 0===l?"":l,s=e.type,f=void 0===s?"":s,d=e.typeCount,v=void 0===d?0:d,p=_(e,["inputUUID","interfaces","ipAddress","name","subnetMask","type","typeCount"]),b=a;return a||(b=h.Z[f]&&v>0?"".concat(h.Z[f]," ").concat(v):"Unknown Network"),H({inputUUID:t,interfaces:o,ipAddress:u,name:b,subnetMask:c,type:f,typeCount:v},p)},ae=function(e,n){return[{align:"center",field:"",renderCell:function(t){var i,u=t.row,a=(null!==(i=n[u.networkInterfaceUUID])&&void 0!==i&&i).isApplied,s="grab",f=function(){for(var n=arguments.length,t=new Array(n),r=0;r :not(:first-child)":{marginLeft:".5em"}},children:[(0,r.jsx)(x.Z,{colour:"up"===t?"ok":"off",sx:{height:"auto"}}),(0,r.jsx)(j.KI,{text:i})]})}},{field:"networkInterfaceMACAddress",flex:1,headerName:"MAC",renderCell:function(e){var n=e.value;return(0,r.jsx)(j.$_,{text:n})}},{field:"networkInterfaceState",flex:1,headerName:"State",renderCell:function(e){var n=e.value,t=String(n);return(0,r.jsx)(j.KI,{text:"".concat(t.charAt(0).toUpperCase()).concat(t.substring(1))})}},{field:"networkInterfaceSpeed",flex:1,headerName:"Speed",renderCell:function(e){var n=e.value;return(0,r.jsx)(j.KI,{text:"".concat(parseFloat(n).toLocaleString()," Mbps")})}},{field:"networkInterfaceOrder",flex:1,headerName:"Order"}]},le=function(e){var n=e.allowMigrationNetwork,t=e.createDropMouseUpHandler,a=e.getNetworkTypeCount,l=e.hostDetail,c=void 0===l?{}:l,d=c.hostType,v=c.sequence,p=e.networkIndex,m=e.networkInput,g=e.networkInterfaceCount,k=e.networkInterfaceInputMap,w=e.removeNetwork,x=e.setMessageRe,I=e.setNetworkInputs,O=e.setNetworkInterfaceInputMap,C=e.testInput,Z=e.testInputToToggleSubmitDisabled,P=(0,i.Z)(),A=(0,u.Z)(P.breakpoints.up("md")),E=(0,u.Z)(P.breakpoints.up("lg")),T=(0,b.useRef)({}),F=(0,b.useRef)({}),L=m.inputUUID,q=m.interfaces,_=m.ipAddress,$=m.isRequired,J=m.subnetMask,z=m.type,X=m.typeCount,K=(0,b.useMemo)((function(){return ie(L)}),[L]),ee=(0,b.useMemo)((function(){return Y(K)}),[K]),ue=(0,b.useMemo)((function(){return Q(K)}),[K]),ae=(0,b.useMemo)((function(){return ne(K)}),[K]),le=(0,b.useMemo)((function(){return te(K)}),[K]),ce=(0,b.useMemo)((function(){return"node"===d}),[d]),se=(0,b.useMemo)((function(){return!ce&&g<=2?[1]:re}),[ce,g]),fe=(0,b.useMemo)((function(){var e=h.Z.bcn,t=h.Z.ifn,r=h.Z.mn,o=h.Z.sn;return ce&&g>=8&&(n||"mn"===z)?{bcn:e,ifn:t,mn:r,sn:o}:{bcn:e,ifn:t,sn:o}}),[n,ce,g,z]),de=(0,b.useCallback)((function(e,n,t){var r=T.current,o=r.getIsChangedByUser,i=r.setValue,u=F.current,a=u.getIsChangedByUser,l=u.setValue;(null===o||void 0===o?void 0:o.call(null))||(e.ipAddress=n,null===i||void 0===i||i.call(null,n)),(null===a||void 0===a?void 0:a.call(null))||(e.subnetMask=t,null===l||void 0===l||l.call(null,t))}),[]);return(0,b.useEffect)((function(){var e,n;"striker"===d&&"ifn"!==z&&(!(null===(e=T.current.getIsChangedByUser)||void 0===e?void 0:e.call(null))&&Number(v)&&(null===(n=T.current.setValue)||void 0===n||n.call(null,_.replace(/^((?:\d+\.){3})\d*$/,"$1".concat(v)))))}),[d,_,v,z]),(0,b.useEffect)((function(){var e=m.ipAddressInputRef,n=m.subnetMaskInputRef;e===T&&n===F||(m.ipAddressInputRef=T,m.subnetMaskInputRef=F,I((function(e){return G(e)})))}),[m,I]),(0,r.jsxs)(R.Lg,{children:[(0,r.jsxs)(R.CH,{children:[(0,r.jsx)(V.Z,{id:"network-".concat(L,"-name"),isReadOnly:$,inputLabelProps:{isNotifyRequired:!0},label:"Network name",selectItems:Object.entries(fe).map((function(e){var n=W(e,2),t=n[0],r=n[1],o=a(t,{lastIndex:p});return t!==z&&(o+=1),{value:t,displayValue:"".concat(r," ").concat(o)}})),selectProps:{onChange:function(e){var n=e.target.value,t=String(n);m.type=t;var r=a(t,{lastIndex:p});m.typeCount=r,m.name="".concat(h.Z[t]," ").concat(r);var o=oe[t];if(o){var i,u=o.ip,l=o.mask;"striker"===d&&"bcn"===t&&(i="4."),de(m,u(r,i),l)}I((function(e){return G(e)}))},renderValue:E?void 0:function(e){return"".concat(String(e).toUpperCase()," ").concat(X)},value:z}}),!$&&(0,r.jsx)(D.Z,{onClick:function(){w(p)},sx:{padding:".2em",position:"absolute",right:"-9px",top:"-4px"},children:(0,r.jsx)(s.Z,{fontSize:"small"})})]}),(0,r.jsxs)(o.Z,{sx:{display:"flex",flexDirection:"column",margin:".6em","& > :not(:first-child)":{marginTop:"1em"}},children:[se.map((function(e){var n="Link ".concat(e),i=e-1,u=q[i],a=(null!==u&&void 0!==u?u:{}).networkInterfaceUUID,l=void 0===a?"":a,c=A?(0,r.jsx)(j.Ac,{text:"Drop to add interface."}):(0,r.jsx)(f.Z,{sx:{alignSelf:"center",color:y.s7}});return(0,r.jsxs)(o.Z,{sx:{alignItems:"center",display:"flex",flexDirection:"row","& > :not(:first-child)":{marginLeft:"1em"},"& > :last-child":{flexGrow:1}},children:[(0,r.jsx)(j.Ac,{sx:{whiteSpace:"nowrap"},text:n}),(0,r.jsx)(S,{onMouseUp:function(){for(var e=arguments.length,n=new Array(e),r=0;r=we.length||Object.values(_).every((function(e){return e.isApplied}))||"node"===t&&we.length<=6}),[t,re,we,_]),Ie=(0,b.useMemo)((function(){return u&&!l}),[u,l]),Oe=(0,b.useMemo)((function(){return re.every((function(e){return"mn"!==e.type}))}),[re]),Ce=(0,b.useCallback)((function(e,n){var t;return null===(t=ye.current.setMessage)||void 0===t?void 0:t.call(null,e,n)}),[]),Ze=(0,b.useCallback)((function(e,n){var t;return null===(t=ye.current.setMessageRe)||void 0===t?void 0:t.call(null,e,n)}),[]),Me=(0,b.useCallback)((function(e){return Ce(X,e)}),[Ce]),Se=(0,b.useCallback)((function(e){return Ce(K,e)}),[Ce]),Pe=(0,b.useCallback)((function(e){var n,t=e.fn,r=void 0===t?"every":t,o=e.ip,i=void 0===o?"":o,u=e.mask,a=void 0===u?"":u,l=e.isNegateMatch,c=void 0===l?"every"===r:l,s=e.onMatch,f=e.onMiss,d=e.skipUUID,v="every"===r;try{n=new p.Netmask("".concat(i,"/").concat(a))}catch(b){}return re[r]((function(e){var t,r,o=e.inputUUID,u=e.ipAddressInputRef,a=e.subnetMaskInputRef;if(o===d)return v;var l=null===(t=null===u||void 0===u?void 0:u.current.getValue)||void 0===t?void 0:t.call(null),m=null===(r=null===a||void 0===a?void 0:a.current.getValue)||void 0===r?void 0:r.call(null),g=!1;try{g=function(e,n){var t=n.b,r=n.bIP,o=void 0===r?"":r;return e.contains(null!==t&&void 0!==t?t:o)||void 0!==t&&t.contains(e)}(new p.Netmask("".concat(l,"/").concat(m)),{b:n,bIP:i})}catch(b){}return g?null===s||void 0===s||s.call(null,e):null===f||void 0===f||f.call(null,e),c?!g:g}))}),[re]),De=(0,b.useCallback)((function(e){Ce("api",e)}),[Ce]),Ue=(0,b.useMemo)((function(){var e,n=(B(e={},X,{defaults:{getValue:function(){var e;return null===(e=be.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:function(){Me()}},tests:[{onFailure:function(){Me({children:"Domain name servers should be a comma-separated list of IPv4 addresses without trailing comma(s)."})},test:function(e){var n=e.value;return k.ah.test(n)}},{test:L.HJ}]}),B(e,K,{defaults:{getValue:function(){var e;return null===(e=me.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:function(){Se()}},tests:[{onFailure:function(){Se({children:"Gateway should be a valid IPv4 address."})},test:function(e){var n=e.value;return k.tf.test(n)}},{test:function(e){var n=e.value,t=!0,r=Pe({fn:"some",ip:n,onMatch:function(e){var r=e.ipAddress,o=e.name,i=e.type,u=e.typeCount;if(n===r)return t=!1,void Se({children:"Gateway cannot be the same as IP address in ".concat(o,".")});pe("".concat(i).concat(u))}});return r||Se({children:"Gateway must be in one network's subnet."}),r&&t}},{test:L.HJ}]}),e);return re.forEach((function(e){var t,r,o=e.inputUUID,i=e.interfaces,u=e.ipAddressInputRef,a=e.name,l=e.subnetMaskInputRef,c=ie(o),s=Y(c),f=Q(c),d=ne(c),v=function(e){return Ce(s,e)},p=function(e){return Ce(f,e)},b=function(e){return Ce(d,e)},m=function(e,n,t){var r,o="".concat(te(c),"-").concat(n),i="".concat(te(ie(n)),"-").concat(e);Ce((null===(r=ye.current.exists)||void 0===r?void 0:r.call(null,i))?i:o,t)},g=function(e){var n=e.ip,i=void 0===n?null===(t=null===u||void 0===u?void 0:u.current.getValue)||void 0===t?void 0:t.call(null):n,c=e.mask,s=void 0===c?null===(r=null===l||void 0===l?void 0:l.current.getValue)||void 0===r?void 0:r.call(null):c;return Pe({ip:i,mask:s,onMatch:function(e){var n=e.inputUUID,t=e.name;m(o,n,{children:'"'.concat(a,'" and "').concat(t,'" cannot be in the same subnet.')})},onMiss:function(e){var n=e.inputUUID;m(o,n)},skipUUID:o})};n[s]={defaults:{getCompare:function(){return i.map((function(e){return void 0!==e}))},onSuccess:function(){v()}},tests:[{onFailure:function(){v({children:"".concat(a," must have at least 1 interface.")})},test:function(e){return e.compare.some((function(e){return e}))}},{onFailure:function(){v({children:"".concat(a," must have a Link 1 interface.")})},test:function(e){var n=W(e.compare,2),t=n[0];return!(n[1]&&!t)}}]},n[f]={defaults:{getValue:function(){var e;return null===(e=null===u||void 0===u?void 0:u.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:function(){p()}},tests:[{onFailure:function(){p({children:"IP address in ".concat(a," must be a valid IPv4 address.")})},test:function(e){var n=e.value;return k.tf.test(n)}},{test:function(e){var n=e.value;return g({ip:n})}},{test:L.HJ}]},n[ee(c)]={defaults:{value:a},tests:[{test:L.HJ}]},n[d]={defaults:{getValue:function(){var e;return null===(e=null===l||void 0===l?void 0:l.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:function(){b()}},tests:[{onFailure:function(){b({children:"Subnet mask in ".concat(a," must be a valid IPv4 address.")})},test:function(e){var n=e.value;return k.tf.test(n)}},{test:function(e){var n=e.value;return g({mask:n})}},{test:L.HJ}]}})),n}),[re,Me,Se,Ce,Pe]),Ae=(0,b.useMemo)((function(){return(0,L.LT)(Ue)}),[Ue]),Ne=(0,b.useCallback)((function(e){null===s||void 0===s||s.call(null,Ae(H({isIgnoreOnCallbacks:!0,isTestAll:!0},e)))}),[Ae,s]),Re=(0,b.useCallback)((function(){fe(void 0)}),[]),Ee=(0,b.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};re.unshift(ue(e)),null===s||void 0===s||s.call(null,!1),oe(G(re))}),[re,s]),Ve=(0,b.useCallback)((function(e){var n=W(re.splice(e,1),1)[0],t=n.inputUUID;n.interfaces.forEach((function(e){if(void 0!==e){var n=e.networkInterfaceUUID;_[n].isApplied=!1}})),Ne({excludeTestIdsRe:RegExp(t)}),oe(G(re)),$((function(e){return H({},e)}))}),[re,_,Ne]),Te=(0,b.useCallback)((function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.inputs,r=void 0===t?re:t,o=n.lastIndex,i=void 0===o?0:o,u=0,a=r.length-1;a>=i;a-=1)r[a].type===e&&(u+=1);return u}),[re]),Fe=(0,b.useMemo)((function(){if(void 0!==se){var e=se.networkInterfaceUUID;return function(n,t){return function(){var r,o=(null!==(r=n[t])&&void 0!==r?r:{}).networkInterfaceUUID;o&&o!==e&&(_[o].isApplied=!1),n[t]=se,_[e].isApplied=!0}}}}),[se,_]),Le=(0,b.useMemo)((function(){return se?{cursor:"grabbing",userSelect:"none"}:{}}),[se]),qe=(0,b.useMemo)((function(){if(void 0===se)return(0,r.jsx)(r.Fragment,{});var e=R.x,n=R.y;return(0,r.jsx)(M,{isFloating:!0,networkInterface:se,sx:{left:"calc(".concat(e,"px + .4em)"),position:"absolute",top:"calc(".concat(n,"px - 1.6em)"),zIndex:20}})}),[R,se]),Be=(0,b.useMemo)((function(){return se?function(){Re()}:void 0}),[Re,se]),He=(0,b.useMemo)((function(){return se?function(e){var n=e.currentTarget,t=e.nativeEvent,r=t.clientX,o=t.clientY,i=n.getBoundingClientRect(),u=i.left,a=i.top;V({x:r-u,y:o-a})}:void 0}),[se]),_e=(0,b.useMemo)((function(){return se?function(){Re()}:void 0}),[Re,se]);(0,b.useEffect)((function(){if([Object.keys(_).length>0,u,l,ge.current,be.current,me.current].every((function(e){return Boolean(e)}))){var e,n;ge.current=!1;var t=l.dns,r=l.gateway,o=l.gatewayInterface,i=l.networks;if([t,r,o,i].some((function(e){return!e})))return;null===(e=be.current.setValue)||void 0===e||e.call(null,t),null===(n=me.current.setValue)||void 0===n||n.call(null,r);var a=[],c=Object.values(i).reduce((function(e,n){var t,r,o=n.ip,i=n.link1Uuid,u=n.link2Uuid,l=void 0===u?"":u,c=n.subnetMask,s=n.type,f=Te(s,{inputs:e})+1,d=Z[s]===f,v="".concat(h.Z[s]," ").concat(f);return a.push(i,l),e.push({inputUUID:(0,m.Z)(),interfaces:[null===(t=_[i])||void 0===t?void 0:t.metadata,null===(r=_[l])||void 0===r?void 0:r.metadata],ipAddress:o,isRequired:d,name:v,subnetMask:c,type:s,typeCount:f}),e}),[]);pe(o),$((function(e){var n=H({},e);return a.forEach((function(e){n[e]&&(n[e].isApplied=!0)})),n})),oe(c),Ne()}}),[u,Te,l,_,Z,Ne]),(0,b.useEffect)((function(){return(0,T.Z)(1,De),window&&window.addEventListener("beforeunload",(function(){var e=new XMLHttpRequest;e.open("PUT","".concat(g.Z,"/init/set-map-network"),!1),e.send(null)}),{once:!0}),function(){(0,T.Z)(0,De)}}),[De]),(0,b.useImperativeHandle)(n,(function(){return H({},ye.current,{get:function(){var e,n;return{dns:null===(e=be.current.getValue)||void 0===e?void 0:e.call(null),gateway:null===(n=me.current.getValue)||void 0===n?void 0:n.call(null),gatewayInterface:ve,networks:re.map((function(e){var n,t,r=e.inputUUID,o=e.interfaces,i=e.ipAddressInputRef,u=e.name,a=e.subnetMaskInputRef,l=e.type,c=e.typeCount;return{inputUUID:r,interfaces:o,ipAddress:null!==(I=null===(n=null===i||void 0===i?void 0:i.current.getValue)||void 0===n?void 0:n.call(null))&&void 0!==I?I:"",name:u,subnetMask:null!==(O=null===(t=null===a||void 0===a?void 0:a.current.getValue)||void 0===t?void 0:t.call(null))&&void 0!==O?O:"",type:l,typeCount:c}}))}}})}),[ve,re]);var We,Ge="13em";return xe?(0,r.jsx)(F.Z,{}):(0,r.jsxs)(o.Z,{onMouseDown:function(e){var n=e.clientX,t=e.clientY,r=e.currentTarget.getBoundingClientRect(),o=r.left,i=r.top;V({x:n-o,y:t-i})},onMouseLeave:Be,onMouseMove:He,onMouseUp:_e,sx:H({position:"relative"},Le),children:[qe,(0,r.jsxs)(o.Z,{sx:{display:"flex",flexDirection:"column","& > :not(:first-child, :nth-child(3))":{marginTop:"1em"}},children:[(0,r.jsx)(d._,{autoHeight:!0,columns:ae((function(e){fe(e)}),_),componentsProps:{row:{onMouseDown:function(e){var n=e.target,t=(void 0===n?{}:n).parentElement,r=(void 0===t?{}:t).dataset,o=(void 0===r?{}:r).id,i=void 0===o?void 0:o;if(i){var u=_[i],a=u.isApplied,l=u.metadata;a||fe(l)}}}},disableColumnMenu:!0,disableSelectionOnClick:!0,getRowClassName:function(e){var n,t=e.row.networkInterfaceUUID,r="";return(null!==(n=_[t])&&void 0!==n&&n).isApplied||(r+=" ".concat(J.ifaceNotApplied)),r},getRowId:function(e){return e.networkInterfaceUUID},hideFooter:!0,initialState:{sorting:{sortModel:[{field:"networkInterfaceName",sort:"asc"}]}},rows:we,sx:(We={color:y.s7},B(We,"& .".concat(a.Z.root),{color:"inherit"}),B(We,"& .".concat(v._.cell,":focus"),{outline:"none"}),B(We,"& .".concat(v._.row,".").concat(J.ifaceNotApplied,":hover"),B({cursor:"grab"},"& .".concat(v._.cell," p"),{cursor:"auto"})),We)}),!Ie&&(0,r.jsx)(P.Z,{row:!0,sx:{"& > :first-child":{alignSelf:"start",marginTop:".7em"},"& > :last-child":{flexGrow:1}},children:(0,r.jsx)(o.Z,{sx:{alignItems:"strech",display:"flex",flexDirection:"row",overflowX:"auto",paddingLeft:".3em","& > div":{marginBottom:".8em",marginTop:".4em",minWidth:Ge,width:"25%"},"& > :not(:first-child)":{marginLeft:"1em"}},children:re.map((function(e,n){var o=e.inputUUID;return(0,r.jsx)(le,{allowMigrationNetwork:Oe,createDropMouseUpHandler:Fe,getNetworkTypeCount:Te,hostDetail:{hostType:t,sequence:x},networkIndex:n,networkInput:e,networkInterfaceCount:we.length,networkInterfaceInputMap:_,removeNetwork:Ve,setMessageRe:Ze,setNetworkInputs:oe,setNetworkInterfaceInputMap:$,testInput:Ae,testInputToToggleSubmitDisabled:Ne},"network-".concat(o))}))})}),(0,r.jsxs)(P.Z,{sm:"row",sx:{marginTop:".2em","& > :not(button)":{minWidth:Ge,width:{sm:"25%"}}},children:[(0,r.jsx)(D.Z,{disabled:je,onClick:function(){Ee()},children:(0,r.jsx)(f.Z,{})}),(0,r.jsx)(U.Z,{input:(0,r.jsx)(N.Z,{id:"network-init-gateway",inputProps:{onBlur:function(e){var n=e.target.value;Ae({inputs:B({},K,{value:n})})}},inputLabelProps:{isNotifyRequired:!0},onChange:function(e){var n=e.target.value;Ne({inputs:B({},K,{value:n})}),Se()},label:"Gateway"}),ref:me}),(0,r.jsx)(U.Z,{input:(0,r.jsx)(N.Z,{id:"network-init-dns-csv",inputProps:{onBlur:function(e){var n=e.target.value;Ae({inputs:B({},X,{value:n})})}},inputLabelProps:{isNotifyRequired:!0},onChange:function(e){var n=e.target.value;Ne({inputs:B({},X,{value:n})}),Me()},label:"Domain name server(s)"}),ref:be})]}),(0,r.jsx)(A.Z,{count:1,defaultMessageType:"warning",ref:ye})]})]})}));ce.defaultProps={expectHostDetail:!1,hostDetail:void 0,hostSequence:void 0,toggleSubmitDisabled:void 0},ce.displayName="NetworkInitForm";var se=ce},2519:function(e,n,t){t.d(n,{Z:function(){return Z}});var r=t(5893),o=t(5603),i=t(8128),u=t(3640),a=t(7294),l=t(1363),c=t(4427),s=t(9),f=t(192),d=t(5537),v=t(9558),p=t(6239),b=t(7021),m=t(1057),g=t(4799),y=t(3213),h=t(7169);function k(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function w(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var j=function(e){var n=e.onClearIndicatorClick,t=x(e,["onClearIndicatorClick"]),i=t.sx,u=t.value,l=x(t,["sx","value"]),c=(0,a.useMemo)((function(){var e;return w((k(e={},"& .".concat(o.Z.icon),{color:h.s7}),k(e,"& .".concat(v.Z.root),{marginRight:".8em"}),k(e,"& .".concat(p.Z.root),{color:h.s7,visibility:"hidden"}),k(e,"&:hover .".concat(v.Z.root," .").concat(p.Z.root,",\n &.").concat(b.Z.focused," .").concat(v.Z.root," .").concat(p.Z.root),{visibility:"visible"}),e),i)}),[i]),s=(0,a.useMemo)((function(){return String(u).length>0&&n&&(0,r.jsx)(m.Z,{position:"end",children:(0,r.jsx)(g.Z,{onClick:n,children:(0,r.jsx)(d.Z,{fontSize:"small"})})})}),[n,u]);return(0,r.jsx)(y.Z,w({endAdornment:s,value:u},l,{sx:c}))};function I(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function O(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var Z=function(e){var n=e.id,t=e.label,d=e.selectItems,v=e.checkItem,p=e.disableItem,b=e.formControlProps,m=e.hideItem,g=e.inputLabelProps,y=void 0===g?{}:g,h=e.isReadOnly,k=void 0!==h&&h,w=e.messageBoxProps,x=void 0===w?{}:w,Z=e.name,M=e.onBlur,S=e.onChange,P=e.onFocus,D=e.required,U=e.selectProps,A=void 0===U?{}:U,N=A.multiple,R=A.sx,E=e.value,V=e.isCheckableItems,T=void 0===V?N:V,F=C(e.selectProps,["multiple","sx"]),L=(0,a.useMemo)((function(){return k?O(I({},"& .".concat(o.Z.icon),{visibility:"hidden"}),R):R}),[k,R]),q=(0,a.useCallback)((function(e){return T&&(0,r.jsx)(i.Z,{checked:null===v||void 0===v?void 0:v.call(null,e)})}),[v,T]),B=(0,a.useCallback)((function(e,t){return(0,r.jsxs)(c.Z,{disabled:null===p||void 0===p?void 0:p.call(null,e),sx:{display:(null===m||void 0===m?void 0:m.call(null,e))?"none":void 0},value:e,children:[q(e),t]},"".concat(n,"-").concat(e))}),[q,p,m,n]),H=(0,a.useMemo)((function(){return"".concat(n,"-select-element")}),[n]),_=(0,a.useMemo)((function(){return(0,r.jsx)(s.Z,{id:n,label:t})}),[n,t]),W=(0,a.useMemo)((function(){return t&&(0,r.jsx)(f.Z,O({htmlFor:H,isNotifyRequired:D},y,{children:t}))}),[y,D,t,H]),G=(0,a.useMemo)((function(){return d.map((function(e){var n="string"===typeof e?{value:e}:e,t=n.value,r=n.displayValue;return B(t,void 0===r?t:r)}))}),[B,d]);return(0,r.jsxs)(u.Z,O({fullWidth:!0},b,{children:[W,(0,r.jsx)(j,O({id:H,input:_,multiple:N,name:Z,onBlur:M,onChange:S,onFocus:P,readOnly:k,value:E},F,{sx:L,children:G})),(0,r.jsx)(l.Z,O({},x))]}))}},3106:function(e,n){n.Z={bcn:"Back-Channel Network",ifn:"Internet-Facing Network",mn:"Migration Network",sn:"Storage Network"}},634:function(e,n,t){var r=t(5893),o=t(4390),i=t(1770);n.Z=function(e,n){o.Z.put("/init/set-map-network",{value:e}).catch((function(t){var o=(0,i.Z)(t);o.children=(0,r.jsxs)(r.Fragment,{children:["Failed to ",e?"enable":"disable"," network mapping."," ",o.children]}),null===n||void 0===n||n.call(null,o)}))}}}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/pages/config-e3aa9a84a8baacc1.js b/striker-ui/out/_next/static/chunks/pages/config-0c3fc9e77c3ed0ed.js similarity index 99% rename from striker-ui/out/_next/static/chunks/pages/config-e3aa9a84a8baacc1.js rename to striker-ui/out/_next/static/chunks/pages/config-0c3fc9e77c3ed0ed.js index 74e1c5ee..40485880 100644 --- a/striker-ui/out/_next/static/chunks/pages/config-e3aa9a84a8baacc1.js +++ b/striker-ui/out/_next/static/chunks/pages/config-0c3fc9e77c3ed0ed.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[490],{329:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/config",function(){return t(6028)}])},5741:function(e,n,t){"use strict";var r=t(5893),o=t(1714),i=t(122),c=t(7169),l=t(4690);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function s(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}n.Z=function(e){var n=e.children,t=e.sx,a=u(e,["children","sx"]);return(0,r.jsx)(i.Z,s({underline:"hover",variant:"subtitle1"},a,{sx:s({color:c.lD,textDecorationColor:c.s7},t),children:(0,r.jsxs)(l.Z,{row:!0,children:[n,(0,r.jsx)(o.Z,{sx:{marginLeft:".3em"}})]})}))}},3106:function(e,n){"use strict";n.Z={bcn:"Back-Channel Network",ifn:"Internet-Facing Network",mn:"Migration Network",sn:"Storage Network"}},6028:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Ke}});var r=t(5893),o=t(8263),i=t(9008),c=t(7294),l=t(2029),a=t(157),s=t(8750),u=t(1905),d=t(3106),f=t(4188),h=t(4390);function p(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t3&&void 0!==arguments[3]?arguments[3]:e,o=function(t){var r;null===(r=n.current.setMessage)||void 0===r||r.call(null,e,t)};return t&&(t[r]=o),o},b=function(e,n){var t,r,o={};return t=e,o=(null!=(r=Array)&&"undefined"!==typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](t):t instanceof r)?e.reduce((function(e,t){return y(t,n,e),e}),o):Object.entries(e).reduce((function(e,t){var r=m(t,2),o=r[0],i=r[1];return y(i,n,e,o),e}),o)},v=t(6607),g=t(480),x=t(2349),j=t(7750);function w(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function P(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&(g({actionProceedText:"Delete",content:"The peer relationship between this striker and the selected ".concat(t," host(s) will terminate. The removed peer(s) can be re-added later."),onProceedAppend:function(){h.Z.delete("/host/connection",{data:n}).catch((function(e){var n=(0,S.Z)(e);n.children="Failed to delete peer connection(s). ".concat(n.children),y(n)}))},proceedColour:"red",titleText:"Delete ".concat(t," peer(s) from this striker?")}),null===(e=f.current.setOpen)||void 0===e||e.call(null,!0))},onEdit:function(){k((function(e){return!e}))},onItemCheckboxChange:function(e,n,t){T[e].isChecked=t,C((function(e){return ne({},e)}))},renderListItem:function(e,n){var t=n.isPingTest,o=void 0!==t&&t;return(0,r.jsx)(Z.Z,{row:!0,spacing:0,children:(0,r.jsxs)(Z.Z,{spacing:0,children:[(0,r.jsx)(j.$_,{children:e}),(0,r.jsx)(J,{label:"Ping",state:o})]})})}})}),E]})}),(0,r.jsx)(B,{ref:s}),(0,r.jsx)(a.Z,ne({closeOnProceed:!0},v,{ref:f}))]})},oe=t(582),ie=t(5741),ce=t(3906);function le(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t1}),[y]),F=(0,u.Z)("".concat(l.Z,"/ssh-key/conflict"),{onError:function(e){p({children:"Failed to fetch SSH key conflicts. Error: ".concat(e),type:"error"})},onSuccess:function(e){b((function(n){return Object.values(e).reduce((function(e,t){return Object.values(t).forEach((function(t){var r=t.hostName,o=t.hostUUID,i=t.ipAddress,c=t.stateUUID;e[c]=se({},n[c],{hostName:r,hostUUID:o,ipAddress:i})})),e}),{})}))},refreshInterval:i}).isLoading;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(G.TZ,{header:"Manage changed SSH keys",loading:F,children:[(0,r.jsxs)(Z.Z,{spacing:".2em",children:[(0,r.jsx)(j.Ac,{children:"The identity of the following targets have unexpectedly changed."}),(0,r.jsxs)(V.Z,{type:"warning",isAllowClose:!0,children:["If you haven't rebuilt the listed targets, then you could be experiencing a"," ",(0,r.jsx)(ie.Z,{href:t,sx:{display:"inline-flex"},target:"_blank",children:'"Man In The Middle"'})," ","attack. Please verify the targets have changed for a known reason before proceeding to remove the broken keys."]}),(0,r.jsx)(H.Z,{header:(0,r.jsxs)(Z.Z,{row:!0,spacing:".3em",sx:{width:"100%","& > :not(:last-child)":{display:{xs:"none",sm:"flex"}},"& > :last-child":{display:{xs:"initial",sm:"none"},marginLeft:0}},children:[(0,r.jsxs)(Z.Z,{row:!0,spacing:".3em",sx:{flexBasis:"calc(50% + 1em)"},children:[(0,r.jsx)(j.Ac,{children:"Host name"}),(0,r.jsx)(oe.Z,{sx:{flexGrow:1}})]}),(0,r.jsxs)(Z.Z,{row:!0,spacing:".3em",sx:{flexGrow:1},children:[(0,r.jsx)(j.Ac,{children:"IP address"}),(0,r.jsx)(oe.Z,{sx:{flexGrow:1}})]}),(0,r.jsx)(oe.Z,{sx:{flexGrow:1}})]}),allowCheckAll:E,allowCheckItem:!0,allowDelete:!0,allowEdit:!1,disableDelete:!k,edit:!0,getListCheckboxProps:function(){return{checked:O}},listEmpty:(0,r.jsx)(j.Ac,{align:"center",children:"No conflicting keys found."}),listItems:y,onAllCheckboxChange:function(e,n){I(n)},onDelete:function(){var e,n=P.reduce((function(e,n){if(!A(n))return e;var t=y[n].hostUUID;return e[t]||(e[t]=[]),e[t].push(n),e}),{});x({actionProceedText:"Delete",content:"Resolve ".concat(P.length," SSH key conflicts. Please make sure the identity change(s) are expected to avoid MITM attacks."),onProceedAppend:function(){h.Z.delete("/ssh-key/conflict",{data:n}).catch((function(e){var n=(0,S.Z)(e);n.children="Failed to delete selected SSH key conflicts. ".concat(n.children),p(n)}))},proceedColour:"red",titleText:"Delete ".concat(P.length," conflicting SSH keys?")}),null===(e=s.current.setOpen)||void 0===e||e.call(null,!0)},onItemCheckboxChange:function(e,n,t){T(e,t)},renderListItem:function(e,n){var t=n.hostName,o=n.ipAddress;return(0,r.jsxs)(Z.Z,{spacing:0,sm:"row",sx:{width:"100%","& > *":{flexBasis:"50%"}},xs:"column",children:[(0,r.jsx)(j.Ac,{children:t}),(0,r.jsx)(j.Ac,{children:o})]})},renderListItemCheckboxState:function(e){return A(e)}})]}),C]}),(0,r.jsx)(a.Z,se({closeOnProceed:!0},g,{ref:s}))]})};function fe(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function he(e){for(var n=1;n0),l(pe,t===(null===(n=y.current.getValue)||void 0===n?void 0:n.call(null)))},onFirstRender:o(ye),ref:m,required:h})},"common-user-input-cell-confirm-password":{children:(0,r.jsx)(I.Z,{input:(0,r.jsx)(C.Z,{id:pe,inputProps:{readOnly:!v},label:"Confirm password",type:f.Z.password}),inputTestBatch:{defaults:{onSuccess:function(){i(pe)}},onFinishBatch:t(pe),tests:[{test:E.HJ},{onFailure:function(){i(pe,{children:"The passwords do not match."})},test:function(e){var n;return e.value===(null===(n=m.current.getValue)||void 0===n?void 0:n.call(null))}}]},onFirstRender:o(pe),ref:y,required:v})}}:void 0}),[t,o,v,h,i,l,p]);return(0,r.jsx)(O.Z,{columns:{xs:1,sm:2,md:3},layout:he({"common-user-input-cell-name":{children:(0,r.jsx)(I.Z,{input:(0,r.jsx)(C.Z,{id:me,inputProps:{readOnly:u},label:be,value:s}),inputTestBatch:(0,E.Gn)(be,(function(){i(me)}),{onFinishBatch:t(me)},(function(e){i(me,{children:e})})),onFirstRender:o(me),required:!0}),md:1,sm:2}},x),spacing:"1em"})},xe=t(2545),je=t(8610),we=t(6632),Pe=t(8859);function Ae(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function qe(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],c=!0,l=!1;try{for(t=t.call(e);!(c=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);c=!0);}catch(a){l=!0,o=a}finally{try{c||null==t.return||t.return()}finally{if(l)throw o}}return i}}(e,n)||We(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ze(e){return function(e){if(Array.isArray(e))return He(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||We(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function We(e,n){if(e){if("string"===typeof e)return He(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?He(e,n):void 0}}var Ke=function(e){var n=e.refreshInterval,t=void 0===n?6e4:n,d=(0,Y.Z)().protect,f=(0,c.useState)(!1),h=f[0],p=f[1],m=(0,c.useState)({actionProceedText:"",closeOnProceed:!0,content:"",dialogProps:{open:h},onCancelAppend:function(){p(!1)},onProceedAppend:function(){p(!1)},titleText:""}),y=m[0],b=m[1],v=qe((0,M.Z)(void 0,d),2),g=v[0],x=v[1],j=qe((0,M.Z)("",d),2),w=j[0],P=j[1],A=(0,u.Z)("".concat(l.Z,"/host/local"),{onError:function(){P("Unknown")},onSuccess:function(e){var n=e.installTarget,t=e.shortHostName;x(n),P(t)},refreshInterval:t}),Z=A.data,O=A.isLoading;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.default,{children:(0,r.jsx)("title",{children:O?"Loading...":"".concat(null===Z||void 0===Z?void 0:Z.shortHostName," Config")})}),(0,r.jsx)(s.Z,{}),(0,r.jsxs)(o.ZP,{container:!0,columns:{xs:1,md:3,lg:4},children:[(0,r.jsx)(o.ZP,{item:!0,xs:1,children:(0,r.jsx)(Be,{installTarget:g,onSubmit:function(e){var n=e.onProceedAppend,t=$e(e,["onProceedAppend"]);b((function(e){return Ge({},e,t,{onProceedAppend:function(){for(var e=arguments.length,t=new Array(e),r=0;r=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}n.Z=function(e){var n=e.children,t=e.sx,a=u(e,["children","sx"]);return(0,r.jsx)(i.Z,s({underline:"hover",variant:"subtitle1"},a,{sx:s({color:c.lD,textDecorationColor:c.s7},t),children:(0,r.jsxs)(l.Z,{row:!0,children:[n,(0,r.jsx)(o.Z,{sx:{marginLeft:".3em"}})]})}))}},3106:function(e,n){"use strict";n.Z={bcn:"Back-Channel Network",ifn:"Internet-Facing Network",mn:"Migration Network",sn:"Storage Network"}},6028:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Ke}});var r=t(5893),o=t(8263),i=t(9008),c=t(7294),l=t(2029),a=t(157),s=t(8750),u=t(1905),d=t(3106),f=t(4188),h=t(4390);function p(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t3&&void 0!==arguments[3]?arguments[3]:e,o=function(t){var r;null===(r=n.current.setMessage)||void 0===r||r.call(null,e,t)};return t&&(t[r]=o),o},b=function(e,n){var t,r,o={};return t=e,o=(null!=(r=Array)&&"undefined"!==typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](t):t instanceof r)?e.reduce((function(e,t){return y(t,n,e),e}),o):Object.entries(e).reduce((function(e,t){var r=m(t,2),o=r[0],i=r[1];return y(i,n,e,o),e}),o)},v=t(6607),g=t(480),x=t(2349),j=t(7750);function w(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function P(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&(g({actionProceedText:"Delete",content:"The peer relationship between this striker and the selected ".concat(t," host(s) will terminate. The removed peer(s) can be re-added later."),onProceedAppend:function(){h.Z.delete("/host/connection",{data:n}).catch((function(e){var n=(0,S.Z)(e);n.children="Failed to delete peer connection(s). ".concat(n.children),y(n)}))},proceedColour:"red",titleText:"Delete ".concat(t," peer(s) from this striker?")}),null===(e=f.current.setOpen)||void 0===e||e.call(null,!0))},onEdit:function(){k((function(e){return!e}))},onItemCheckboxChange:function(e,n,t){T[e].isChecked=t,C((function(e){return ne({},e)}))},renderListItem:function(e,n){var t=n.isPingTest,o=void 0!==t&&t;return(0,r.jsx)(Z.Z,{row:!0,spacing:0,children:(0,r.jsxs)(Z.Z,{spacing:0,children:[(0,r.jsx)(j.$_,{children:e}),(0,r.jsx)(J,{label:"Ping",state:o})]})})}})}),E]})}),(0,r.jsx)(B,{ref:s}),(0,r.jsx)(a.Z,ne({closeOnProceed:!0},v,{ref:f}))]})},oe=t(582),ie=t(5741),ce=t(3906);function le(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t1}),[y]),F=(0,u.Z)("".concat(l.Z,"/ssh-key/conflict"),{onError:function(e){p({children:"Failed to fetch SSH key conflicts. Error: ".concat(e),type:"error"})},onSuccess:function(e){b((function(n){return Object.values(e).reduce((function(e,t){return Object.values(t).forEach((function(t){var r=t.hostName,o=t.hostUUID,i=t.ipAddress,c=t.stateUUID;e[c]=se({},n[c],{hostName:r,hostUUID:o,ipAddress:i})})),e}),{})}))},refreshInterval:i}).isLoading;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(G.TZ,{header:"Manage changed SSH keys",loading:F,children:[(0,r.jsxs)(Z.Z,{spacing:".2em",children:[(0,r.jsx)(j.Ac,{children:"The identity of the following targets have unexpectedly changed."}),(0,r.jsxs)(V.Z,{type:"warning",isAllowClose:!0,children:["If you haven't rebuilt the listed targets, then you could be experiencing a"," ",(0,r.jsx)(ie.Z,{href:t,sx:{display:"inline-flex"},target:"_blank",children:'"Man In The Middle"'})," ","attack. Please verify the targets have changed for a known reason before proceeding to remove the broken keys."]}),(0,r.jsx)(H.Z,{header:(0,r.jsxs)(Z.Z,{row:!0,spacing:".3em",sx:{width:"100%","& > :not(:last-child)":{display:{xs:"none",sm:"flex"}},"& > :last-child":{display:{xs:"initial",sm:"none"},marginLeft:0}},children:[(0,r.jsxs)(Z.Z,{row:!0,spacing:".3em",sx:{flexBasis:"calc(50% + 1em)"},children:[(0,r.jsx)(j.Ac,{children:"Host name"}),(0,r.jsx)(oe.Z,{sx:{flexGrow:1}})]}),(0,r.jsxs)(Z.Z,{row:!0,spacing:".3em",sx:{flexGrow:1},children:[(0,r.jsx)(j.Ac,{children:"IP address"}),(0,r.jsx)(oe.Z,{sx:{flexGrow:1}})]}),(0,r.jsx)(oe.Z,{sx:{flexGrow:1}})]}),allowCheckAll:E,allowCheckItem:!0,allowDelete:!0,allowEdit:!1,disableDelete:!k,edit:!0,getListCheckboxProps:function(){return{checked:O}},listEmpty:(0,r.jsx)(j.Ac,{align:"center",children:"No conflicting keys found."}),listItems:y,onAllCheckboxChange:function(e,n){I(n)},onDelete:function(){var e,n=P.reduce((function(e,n){if(!A(n))return e;var t=y[n].hostUUID;return e[t]||(e[t]=[]),e[t].push(n),e}),{});x({actionProceedText:"Delete",content:"Resolve ".concat(P.length," SSH key conflicts. Please make sure the identity change(s) are expected to avoid MITM attacks."),onProceedAppend:function(){h.Z.delete("/ssh-key/conflict",{data:n}).catch((function(e){var n=(0,S.Z)(e);n.children="Failed to delete selected SSH key conflicts. ".concat(n.children),p(n)}))},proceedColour:"red",titleText:"Delete ".concat(P.length," conflicting SSH keys?")}),null===(e=s.current.setOpen)||void 0===e||e.call(null,!0)},onItemCheckboxChange:function(e,n,t){T(e,t)},renderListItem:function(e,n){var t=n.hostName,o=n.ipAddress;return(0,r.jsxs)(Z.Z,{spacing:0,sm:"row",sx:{width:"100%","& > *":{flexBasis:"50%"}},xs:"column",children:[(0,r.jsx)(j.Ac,{children:t}),(0,r.jsx)(j.Ac,{children:o})]})},renderListItemCheckboxState:function(e){return A(e)}})]}),C]}),(0,r.jsx)(a.Z,se({closeOnProceed:!0},g,{ref:s}))]})};function fe(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function he(e){for(var n=1;n0),l(pe,t===(null===(n=y.current.getValue)||void 0===n?void 0:n.call(null)))},onFirstRender:o(ye),ref:m,required:h})},"common-user-input-cell-confirm-password":{children:(0,r.jsx)(I.Z,{input:(0,r.jsx)(C.Z,{id:pe,inputProps:{readOnly:!v},label:"Confirm password",type:f.Z.password}),inputTestBatch:{defaults:{onSuccess:function(){i(pe)}},onFinishBatch:t(pe),tests:[{test:E.HJ},{onFailure:function(){i(pe,{children:"The passwords do not match."})},test:function(e){var n;return e.value===(null===(n=m.current.getValue)||void 0===n?void 0:n.call(null))}}]},onFirstRender:o(pe),ref:y,required:v})}}:void 0}),[t,o,v,h,i,l,p]);return(0,r.jsx)(O.Z,{columns:{xs:1,sm:2,md:3},layout:he({"common-user-input-cell-name":{children:(0,r.jsx)(I.Z,{input:(0,r.jsx)(C.Z,{id:me,inputProps:{readOnly:u},label:be,value:s}),inputTestBatch:(0,E.Gn)(be,(function(){i(me)}),{onFinishBatch:t(me)},(function(e){i(me,{children:e})})),onFirstRender:o(me),required:!0}),md:1,sm:2}},x),spacing:"1em"})},xe=t(2545),je=t(8610),we=t(6632),Pe=t(8859);function Ae(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function qe(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],c=!0,l=!1;try{for(t=t.call(e);!(c=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);c=!0);}catch(a){l=!0,o=a}finally{try{c||null==t.return||t.return()}finally{if(l)throw o}}return i}}(e,n)||We(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ze(e){return function(e){if(Array.isArray(e))return He(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||We(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function We(e,n){if(e){if("string"===typeof e)return He(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?He(e,n):void 0}}var Ke=function(e){var n=e.refreshInterval,t=void 0===n?6e4:n,d=(0,Y.Z)().protect,f=(0,c.useState)(!1),h=f[0],p=f[1],m=(0,c.useState)({actionProceedText:"",closeOnProceed:!0,content:"",dialogProps:{open:h},onCancelAppend:function(){p(!1)},onProceedAppend:function(){p(!1)},titleText:""}),y=m[0],b=m[1],v=qe((0,M.Z)(void 0,d),2),g=v[0],x=v[1],j=qe((0,M.Z)("",d),2),w=j[0],P=j[1],A=(0,u.Z)("".concat(l.Z,"/host/local"),{onError:function(){P("Unknown")},onSuccess:function(e){var n=e.installTarget,t=e.shortHostName;x(n),P(t)},refreshInterval:t}),Z=A.data,O=A.isLoading;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.default,{children:(0,r.jsx)("title",{children:O?"Loading...":"".concat(null===Z||void 0===Z?void 0:Z.shortHostName," Config")})}),(0,r.jsx)(s.Z,{}),(0,r.jsxs)(o.ZP,{container:!0,columns:{xs:1,md:3,lg:4},children:[(0,r.jsx)(o.ZP,{item:!0,xs:1,children:(0,r.jsx)(Be,{installTarget:g,onSubmit:function(e){var n=e.onProceedAppend,t=$e(e,["onProceedAppend"]);b((function(e){return Ge({},e,t,{onProceedAppend:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{},n=e.postSet,t=e.preSet,r=e.set,i=e.setType,l=void 0===i?"string":i,u=e.valueKey,a=void 0===u?"value":u;return function(e){var i=e.target[a],u=o.Z[l](i);null===t||void 0===t||t.call(null,e),null===r||void 0===r||r.call(null,u),null===n||void 0===n||n.call(null,e)}},u=t(2027);function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function f(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"===typeof e)return a(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return a(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e){var n=function(e,n){if("object"!==p(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===p(n)?n:String(n)}var p=function(e){return e&&"undefined"!==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};var m="input",h={boolean:!1,number:0,string:""},g={createInputOnChangeHandlerOptions:{},debounceWait:500,required:!1,valueType:"string"},b=(0,i.forwardRef)((function(e,n){var t=e.debounceWait,o=void 0===t?g.debounceWait:t,a=e.input,p=e.inputTestBatch,b=e.onBlurAppend,y=e.onFirstRender,x=e.onFocusAppend,j=e.onUnmount,w=e.required,P=void 0===w?g.required:w,O=e.valueKey,S=e.valueType,k=void 0===S?g.valueType:S,Z=e.createInputOnChangeHandlerOptions,C=void 0===Z?g.createInputOnChangeHandlerOptions:Z,A=C.postSet,I=C.valueKey,N=void 0===I?O:I,V=d(e.createInputOnChangeHandlerOptions,["postSet","valueKey"]),H=a.props,M=(0,i.useMemo)((function(){return null!==N&&void 0!==N?N:"checked"in H?"checked":"value"}),[H,N]),R=H.onBlur,F=H.onChange,E=H.onFocus,T=H[M],z=void 0===T?h[k]:T,B=d(H,["onBlur","onChange","onFocus",M].map(v)),D=(0,i.useState)(z),_=D[0],L=D[1],q=(0,i.useState)(!1),U=q[0],$=q[1],Q=(0,i.useState)(!1),J=Q[0],G=Q[1],W=(0,i.useCallback)((function(e){L(e)}),[]),K=(0,i.useMemo)((function(){var e;return p&&(p.isRequired=P,e=(0,u.LT)(c({},m,p))),e}),[p,P]),X=(0,i.useCallback)((function(e){var n,t=null!==(n=null===K||void 0===K?void 0:K.call(null,{inputs:c({},m,{value:e}),isIgnoreOnCallbacks:!0}))&&void 0!==n&&n;null===y||void 0===y||y.call(null,{isValid:t}),G(t)}),[y,K]),Y=(0,i.useMemo)((function(){return(0,r.debounce)(X,o)}),[o,X]),ee=(0,i.useMemo)((function(){return null!==R&&void 0!==R?R:K&&function(){for(var e=arguments.length,n=new Array(e),t=0;te.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function c(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,i,o=[],l=!0,u=!1;try{for(t=t.call(e);!(l=(r=t.next()).done)&&(o.push(r.value),!n||o.length!==n);l=!0);}catch(a){u=!0,i=a}finally{try{l||null==t.return||t.return()}finally{if(u)throw i}}return o}}(e,n)||function(e,n){if(!e)return;if("string"===typeof e)return l(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e){var n=function(e,n){if("object"!==d(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==d(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===d(n)?n:String(n)}var d=function(e){return e&&"undefined"!==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};var f={count:0,defaultMessageType:"info",messages:void 0,onSet:void 0,usePlaceholder:!0},v=(0,i.forwardRef)((function(e,n){var t=e.count,l=void 0===t?f.count:t,d=e.defaultMessageType,v=void 0===d?f.defaultMessageType:d,p=e.messages,m=e.onSet,h=e.usePlaceholder,g=void 0===h?f.usePlaceholder:h,b=(0,i.useState)({}),y=b[0],x=b[1],j=(0,i.useMemo)((function(){return function(e){for(var n=1;n0,t=n?l:e.length,i=[];if(e.every((function(e){var n=c(e,2),l=n[0],u=n[1],a=u.children,s=u.type,d=void 0===s?v:s;return i.push((0,r.jsx)(o.Z,{type:d,children:a},"message-".concat(l))),i.length1&&void 0!==arguments[1]?arguments[1]:{},t=n.fillString,r=void 0===t?"0":t,i=n.maxLength,o=void 0===i?2:i,l=n.which,u=void 0===l?"Start":l;return String(e)["pad".concat(u)](o,r)};function P(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function O(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var S={show:!0},k=function(e){var n=e.onClick,t=e.show,i=void 0===t?S.show:t,o=O(e,["onClick","show"]);return i?(0,r.jsx)(v.Z,function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&void 0!==arguments[0]?arguments[0]:"",n=e.split(/\s/).filter((function(e){return!/and|of/.test(e)})).slice(0,5),t=n.length>1?2:n.length;return _[t](n)},q=function(e){var n=e.organizationPrefix,t=e.hostNumber,r=e.domainName;return[n,t,r].every((function(e){return Boolean(e)}))?"".concat(n,"-striker").concat(w(t),".").concat(r):""},U=(0,a.forwardRef)((function(e,n){var t,i,o,u,c=e.expectHostDetail,s=void 0!==c&&c,d=e.hostDetail,f=e.onHostNumberBlurAppend,v=e.toggleSubmitDisabled,w=(0,a.useState)(),P=w[0],O=w[1],S=(0,a.useState)(!1),k=S[0],I=S[1],M=(0,a.useState)(!1),_=M[0],U=M[1],$=(0,a.useState)(!0),Q=$[0],J=$[1],G=(0,a.useState)(!0),W=G[0],K=G[1],X=(0,a.useRef)(!0),Y=(0,a.useRef)({}),ee=(0,a.useRef)({}),ne=(0,a.useRef)({}),te=(0,a.useRef)({}),re=(0,a.useRef)({}),ie=(0,a.useRef)({}),oe=(0,a.useRef)({}),le=(0,a.useRef)({}),ue=(0,a.useCallback)((function(e){var n;return null===(n=le.current.setMessage)||void 0===n?void 0:n.call(null,D,e)}),[]),ae=(0,a.useCallback)((function(e){var n;return null===(n=le.current.setMessage)||void 0===n?void 0:n.call(null,z,e)}),[]),ce=(0,a.useCallback)((function(e){var n;return null===(n=le.current.setMessage)||void 0===n?void 0:n.call(null,E,e)}),[]),se=(0,a.useCallback)((function(e){var n;return null===(n=le.current.setMessage)||void 0===n?void 0:n.call(null,T,e)}),[]),de=(0,a.useCallback)((function(e){var n;return null===(n=le.current.setMessage)||void 0===n?void 0:n.call(null,R,e)}),[]),fe=(0,a.useCallback)((function(e){var n;return null===(n=le.current.setMessage)||void 0===n?void 0:n.call(null,F,e)}),[]),ve=(0,a.useMemo)((function(){var e;return N(e={},R,{defaults:{getValue:function(){var e;return null===(e=Y.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:function(){de(void 0)}},tests:[{onFailure:function(){de({children:(0,r.jsxs)(r.Fragment,{children:["Admin password cannot contain single-quote (",(0,r.jsx)(A.Q0,{text:"'"}),"), double-quote (",(0,r.jsx)(A.Q0,{text:'"'}),"), slash (",(0,r.jsx)(A.Q0,{text:"/"}),"), backslash (",(0,r.jsx)(A.Q0,{text:"\\"}),"), angle brackets (",(0,r.jsx)(A.Q0,{text:"<>"}),"), curly brackets (",(0,r.jsx)(A.Q0,{text:"{}"}),")."]})})},test:function(e){var n=e.value;return!/['"/\\><}{]/g.test(n)}},{test:C.HJ}]}),N(e,F,{defaults:{getValue:function(){var e,n;return null===(e=ee.current)||void 0===e||null===(n=e.getValue)||void 0===n?void 0:n.call(null)},onSuccess:function(){fe(void 0)}},tests:[{onFailure:function(){fe({children:"Confirmation doesn't match admin password."})},test:function(e){var n;return e.value===(null===(n=Y.current.getValue)||void 0===n?void 0:n.call(null))}},{test:C.HJ}]}),N(e,E,{defaults:{compare:[!W],getValue:function(){var e;return null===(e=re.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:function(){ce(void 0)}},tests:[{onFailure:function(){ce({children:(0,r.jsxs)(r.Fragment,{children:["Domain name can only contain lowercase alphanumeric, hyphen (",(0,r.jsx)(A.Q0,{text:"-"}),"), and dot (",(0,r.jsx)(A.Q0,{text:"."}),") characters."]})})},test:function(e){var n=e.compare,t=e.value;return n[0]||g.FZ.test(t)}},{test:C.HJ}]}),N(e,T,{defaults:{compare:[!W],getValue:function(){var e;return null===(e=oe.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:function(){se(void 0)}},tests:[{onFailure:function(){se({children:(0,r.jsxs)(r.Fragment,{children:["Host name can only contain lowercase alphanumeric, hyphen (",(0,r.jsx)(A.Q0,{text:"-"}),"), and dot (",(0,r.jsx)(A.Q0,{text:"."}),") characters."]})})},test:function(e){var n=e.compare,t=e.value;return n[0]||g.FZ.test(t)}},{test:C.HJ}]}),N(e,z,{defaults:{getValue:function(){var e;return null===(e=ie.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:function(){ae(void 0)}},tests:[{onFailure:function(){ae({children:"Striker number can only contain digits."})},test:function(e){var n=e.value;return/^\d+$/.test(n)}},{test:C.HJ}]}),N(e,B,{defaults:{getValue:function(){var e;return null===(e=ne.current.getValue)||void 0===e?void 0:e.call(null)}},tests:[{test:C.HJ}]}),N(e,D,{defaults:{getValue:function(){var e;return null===(e=te.current.getValue)||void 0===e?void 0:e.call(null)},max:5,min:1,onSuccess:function(){ue(void 0)}},tests:[{onFailure:function(e){var n=e.max,t=e.min;ue({children:"Organization prefix must be ".concat(t," to ").concat(n," lowercase alphanumeric characters.")})},test:function(e){var n=e.max,t=e.min,r=e.value;return RegExp("^[a-z0-9]{".concat(t,",").concat(n,"}$")).test(r)}}]}),e}),[W,de,fe,ce,se,ae,ue]),pe=(0,a.useMemo)((function(){return(0,C.LT)(ve)}),[ve]),me=(0,a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.excludeTestIds,t=void 0===n?[]:n,r=e.inputs,i=e.isContinueOnFailure,o=e.isExcludeConfirmAdminPassword,l=void 0===o?!Q:o;l&&t.push(F),null===v||void 0===v||v.call(null,pe({excludeTestIds:t,inputs:r,isContinueOnFailure:i,isIgnoreOnCallbacks:!0,isTestAll:!0}))}),[Q,pe,v]),he=(0,a.useCallback)((function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.organizationName,i=void 0===r?null===(t=ne.current.getValue)||void 0===t?void 0:t.call(null):r,o=L(i);return null===(e=te.current.setValue)||void 0===e||e.call(null,o),me({inputs:N({},D,{isIgnoreOnCallbacks:!1,value:o}),isContinueOnFailure:!0}),o}),[me]),ge=(0,a.useCallback)((function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=n.organizationPrefix,r=void 0===t?null===(i=te.current.getValue)||void 0===i?void 0:i.call(null):t,l=n.hostNumber,a=void 0===l?null===(o=ie.current.getValue)||void 0===o?void 0:o.call(null):l,c=n.domainName,s=void 0===c?null===(u=re.current.getValue)||void 0===u?void 0:u.call(null):c,d=q({organizationPrefix:r,hostNumber:a,domainName:s});return null===(e=oe.current.setValue)||void 0===e||e.call(null,d),me({inputs:N({},T,{isIgnoreOnCallbacks:!1,value:d}),isContinueOnFailure:!0}),d}),[me]),be=(0,a.useCallback)((function(){var e;return Boolean(null===(e=ne.current.getValue)||void 0===e?void 0:e.call(null))}),[]),ye=(0,a.useCallback)((function(){var e,n,t;return[null===(e=te.current.getValue)||void 0===e?void 0:e.call(null),null===(n=ie.current.getValue)||void 0===n?void 0:n.call(null),null===(t=re.current.getValue)||void 0===t?void 0:t.call(null)].every((function(e){return Boolean(e)}))}),[]),xe=(0,a.useCallback)((function(){var e;(null===(e=te.current.getIsChangedByUser)||void 0===e?void 0:e.call(null))?I(be()):he()}),[be,he]),je=(0,a.useCallback)((function(){var e;(null===(e=oe.current.getIsChangedByUser)||void 0===e?void 0:e.call(null))?U(ye()):ge()}),[ye,ge]),we=(0,a.useCallback)((function(){var e,n=he();(null===(e=oe.current.getIsChangedByUser)||void 0===e?void 0:e.call(null))||ge({organizationPrefix:n})}),[ge,he]),Pe=(0,a.useCallback)((function(){ge()}),[ge]),Oe=(0,a.useCallback)((function(e){return function(n){return n===e?void 0:e}}),[]),Se=(0,a.useMemo)((function(){return(0,r.jsx)(m.Z,{checked:W,onChange:function(e,n){var t;K(n),me({inputs:(t={},N(t,E,{compare:[!n],isIgnoreOnCallbacks:!1}),N(t,T,{compare:[!n],isIgnoreOnCallbacks:!1}),t),isContinueOnFailure:!0})},sx:{padding:".2em"}})}),[W,me]);return(0,a.useEffect)((function(){if([s,d,X.current,re.current,oe.current,ie.current,ne.current,te.current].every((function(e){return Boolean(e)}))){var e,n,t,r,i;X.current=!1;var o=d.domain,l=d.hostName,u=d.organization,a=d.prefix,c=d.sequence;null===(e=re.current.setValue)||void 0===e||e.call(null,o),null===(n=oe.current.setValue)||void 0===n||n.call(null,l),null===(t=ie.current.setValue)||void 0===t||t.call(null,c),null===(r=ne.current.setValue)||void 0===r||r.call(null,u),null===(i=te.current.setValue)||void 0===i||i.call(null,a),me()}}),[s,d,me]),(0,a.useImperativeHandle)(n,(function(){return{get:function(){var e,n,t,r,i,o;return{adminPassword:null===(e=Y.current.getValue)||void 0===e?void 0:e.call(null),organizationName:null===(n=ne.current.getValue)||void 0===n?void 0:n.call(null),organizationPrefix:null===(t=te.current.getValue)||void 0===t?void 0:t.call(null),domainName:null===(r=re.current.getValue)||void 0===r?void 0:r.call(null),hostNumber:null===(i=ie.current.getValue)||void 0===i?void 0:i.call(null),hostName:null===(o=oe.current.getValue)||void 0===o?void 0:o.call(null)}}}})),(0,r.jsxs)(p.Z,{children:[(0,r.jsxs)(l.ZP,{columns:{xs:1,sm:2,md:3},container:!0,spacing:"1em",children:[(0,r.jsx)(l.ZP,{item:!0,xs:1,children:(0,r.jsxs)(p.Z,{children:[(0,r.jsx)(b.Z,{input:(0,r.jsx)(j.Z,{id:"striker-init-general-organization-name",inputProps:{onBlur:xe},inputLabelProps:{isNotifyRequired:!0},label:"Organization name",onChange:function(){me()},onHelp:function(){O(Oe("Name of the organization that maintains this Anvil! system. You can enter anything that makes sense to you."))}}),ref:ne}),(0,r.jsxs)(p.Z,{row:!0,sx:{"& > :first-child":{flexGrow:1}},children:[(0,r.jsx)(b.Z,{input:(0,r.jsx)(j.Z,{id:"striker-init-general-organization-prefix",inputProps:{endAdornment:(0,r.jsx)(Z,{show:k,onClick:we}),inputProps:{maxLength:5,sx:{minWidth:"2.5em"}},onBlur:function(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),r=1;r1?n-1:0),r=1;r * > *":{width:"100%"}},children:[(0,r.jsx)(l.ZP,{item:!0,xs:1,children:(0,r.jsx)(b.Z,{input:(0,r.jsx)(j.Z,{id:"striker-init-general-admin-password",inputProps:{inputProps:{type:h.Z.password},onBlur:function(e){var n=e.target.value;pe({inputs:N({},R,{value:n})})},onPasswordVisibilityAppend:function(e){var n=e===h.Z.password;me({isExcludeConfirmAdminPassword:!n}),J(n),fe()}},inputLabelProps:{isNotifyRequired:!0},label:"Admin password",onChange:function(e){var n=e.target.value;me({inputs:N({},R,{value:n})}),de()},onHelp:function(){O(Oe("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:Y})}),Q&&(0,r.jsx)(l.ZP,{item:!0,xs:1,children:(0,r.jsx)(b.Z,{input:(0,r.jsx)(j.Z,{id:"striker-init-general-confirm-admin-password",inputProps:{inputProps:{type:h.Z.password},onBlur:function(e){var n=e.target.value;pe({inputs:N({},F,{value:n})})}},inputLabelProps:{isNotifyRequired:Q},label:"Confirm password",onChange:function(e){var n=e.target.value;me({inputs:N({},F,{value:n})}),fe()}}),ref:ee})})]})})]}),(0,r.jsx)(x.Z,{count:1,defaultMessageType:"warning",ref:le}),(0,r.jsx)(y.Z,{children:(0,r.jsxs)(p.Z,{row:!0,sx:{"& > :last-child":{flexGrow:1}},children:[Se,(0,r.jsx)(A.Ac,{inverted:!0,children:W?"Uncheck to skip domain and host name pattern validation.":"Check to re-enable domain and host name pattern validation."})]})}),P&&(0,r.jsx)(y.Z,{onClose:function(){O(void 0)},children:P})]})}));U.defaultProps={expectHostDetail:!1,hostDetail:void 0,onHostNumberBlurAppend:void 0,toggleSubmitDisabled:void 0},U.displayName="GeneralInitForm";var $=U,Q=t(1770),J=t(7971),G=t(3377),W=t(2444),K=t(5741),X=t(4596),Y=t(3679),ee=t(634),ne=t(2152),te=t(2749);function re(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&void 0!==arguments[0]?arguments[0]:{},n=e.postSet,t=e.preSet,r=e.set,o=e.setType,l=void 0===o?"string":o,u=e.valueKey,a=void 0===u?"value":u;return function(e){var o=e.target[a],u=i.Z[l](o);null===t||void 0===t||t.call(null,e),null===r||void 0===r||r.call(null,u),null===n||void 0===n||n.call(null,e)}},l=t(2027);function u(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function d(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"===typeof e)return u(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return u(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e){var n=function(e,n){if("object"!==v(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==v(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===v(n)?n:String(n)}var v=function(e){return e&&"undefined"!==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};var p="input",m={boolean:!1,number:0,string:""},h={createInputOnChangeHandlerOptions:{},required:!1,valueType:"string"},g=(0,r.forwardRef)((function(e,n){var t=e.input,i=e.inputTestBatch,u=e.onBlurAppend,v=e.onFirstRender,g=e.onFocusAppend,y=e.onUnmount,b=e.required,x=void 0===b?h.required:b,j=e.valueKey,w=e.valueType,P=void 0===w?h.valueType:w,O=e.createInputOnChangeHandlerOptions,S=void 0===O?h.createInputOnChangeHandlerOptions:O,k=S.postSet,Z=S.valueKey,C=void 0===Z?j:Z,A=s(e.createInputOnChangeHandlerOptions,["postSet","valueKey"]),I=t.props,N=(0,r.useMemo)((function(){return null!==C&&void 0!==C?C:"checked"in I?"checked":"value"}),[I,C]),V=I.onBlur,H=I.onChange,R=I.onFocus,M=I[N],F=void 0===M?m[P]:M,T=s(I,["onBlur","onChange","onFocus",N].map(f)),E=(0,r.useState)(F),z=E[0],B=E[1],D=(0,r.useState)(!1),_=D[0],L=D[1],q=(0,r.useState)(!1),U=q[0],$=q[1],Q=(0,r.useCallback)((function(e){B(e)}),[]),J=(0,r.useMemo)((function(){var e;return i&&(i.isRequired=x,e=(0,l.LT)(a({},p,i))),e}),[i,x]),G=(0,r.useMemo)((function(){return null!==V&&void 0!==V?V:J&&function(){for(var e=arguments.length,n=new Array(e),t=0;te.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function c(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,i,o=[],l=!0,u=!1;try{for(t=t.call(e);!(l=(r=t.next()).done)&&(o.push(r.value),!n||o.length!==n);l=!0);}catch(a){u=!0,i=a}finally{try{l||null==t.return||t.return()}finally{if(u)throw i}}return o}}(e,n)||function(e,n){if(!e)return;if("string"===typeof e)return l(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e){var n=function(e,n){if("object"!==d(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==d(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===d(n)?n:String(n)}var d=function(e){return e&&"undefined"!==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};var f={count:0,defaultMessageType:"info",messages:void 0,onSet:void 0,usePlaceholder:!0},v=(0,i.forwardRef)((function(e,n){var t=e.count,l=void 0===t?f.count:t,d=e.defaultMessageType,v=void 0===d?f.defaultMessageType:d,p=e.messages,m=e.onSet,h=e.usePlaceholder,g=void 0===h?f.usePlaceholder:h,y=(0,i.useState)({}),b=y[0],x=y[1],j=(0,i.useMemo)((function(){return function(e){for(var n=1;n0,t=n?l:e.length,i=[];if(e.every((function(e){var n=c(e,2),l=n[0],u=n[1],a=u.children,s=u.type,d=void 0===s?v:s;return i.push((0,r.jsx)(o.Z,{type:d,children:a},"message-".concat(l))),i.length1&&void 0!==arguments[1]?arguments[1]:{},t=n.fillString,r=void 0===t?"0":t,i=n.maxLength,o=void 0===i?2:i,l=n.which,u=void 0===l?"Start":l;return String(e)["pad".concat(u)](o,r)};function P(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function O(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var S={show:!0},k=function(e){var n=e.onClick,t=e.show,i=void 0===t?S.show:t,o=O(e,["onClick","show"]);return i?(0,r.jsx)(v.Z,function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&void 0!==arguments[0]?arguments[0]:"",n=e.split(/\s/).filter((function(e){return!/and|of/.test(e)})).slice(0,5),t=n.length>1?2:n.length;return _[t](n)},q=function(e){var n=e.organizationPrefix,t=e.hostNumber,r=e.domainName;return[n,t,r].every((function(e){return Boolean(e)}))?"".concat(n,"-striker").concat(w(t),".").concat(r):""},U=(0,a.forwardRef)((function(e,n){var t,i,o,u,c=e.expectHostDetail,s=void 0!==c&&c,d=e.hostDetail,f=e.onHostNumberBlurAppend,v=e.toggleSubmitDisabled,w=(0,a.useState)(),P=w[0],O=w[1],S=(0,a.useState)(!1),k=S[0],I=S[1],R=(0,a.useState)(!1),_=R[0],U=R[1],$=(0,a.useState)(!0),Q=$[0],J=$[1],G=(0,a.useState)(!0),K=G[0],W=G[1],X=(0,a.useRef)(!0),Y=(0,a.useRef)({}),ee=(0,a.useRef)({}),ne=(0,a.useRef)({}),te=(0,a.useRef)({}),re=(0,a.useRef)({}),ie=(0,a.useRef)({}),oe=(0,a.useRef)({}),le=(0,a.useRef)({}),ue=(0,a.useCallback)((function(e){var n;return null===(n=le.current.setMessage)||void 0===n?void 0:n.call(null,D,e)}),[]),ae=(0,a.useCallback)((function(e){var n;return null===(n=le.current.setMessage)||void 0===n?void 0:n.call(null,z,e)}),[]),ce=(0,a.useCallback)((function(e){var n;return null===(n=le.current.setMessage)||void 0===n?void 0:n.call(null,T,e)}),[]),se=(0,a.useCallback)((function(e){var n;return null===(n=le.current.setMessage)||void 0===n?void 0:n.call(null,E,e)}),[]),de=(0,a.useCallback)((function(e){var n;return null===(n=le.current.setMessage)||void 0===n?void 0:n.call(null,M,e)}),[]),fe=(0,a.useCallback)((function(e){var n;return null===(n=le.current.setMessage)||void 0===n?void 0:n.call(null,F,e)}),[]),ve=(0,a.useMemo)((function(){var e;return N(e={},M,{defaults:{getValue:function(){var e;return null===(e=Y.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:function(){de(void 0)}},tests:[{onFailure:function(){de({children:(0,r.jsxs)(r.Fragment,{children:["Admin password cannot contain single-quote (",(0,r.jsx)(A.Q0,{text:"'"}),"), double-quote (",(0,r.jsx)(A.Q0,{text:'"'}),"), slash (",(0,r.jsx)(A.Q0,{text:"/"}),"), backslash (",(0,r.jsx)(A.Q0,{text:"\\"}),"), angle brackets (",(0,r.jsx)(A.Q0,{text:"<>"}),"), curly brackets (",(0,r.jsx)(A.Q0,{text:"{}"}),")."]})})},test:function(e){var n=e.value;return!/['"/\\><}{]/g.test(n)}},{test:C.HJ}]}),N(e,F,{defaults:{getValue:function(){var e,n;return null===(e=ee.current)||void 0===e||null===(n=e.getValue)||void 0===n?void 0:n.call(null)},onSuccess:function(){fe(void 0)}},tests:[{onFailure:function(){fe({children:"Confirmation doesn't match admin password."})},test:function(e){var n;return e.value===(null===(n=Y.current.getValue)||void 0===n?void 0:n.call(null))}},{test:C.HJ}]}),N(e,T,{defaults:{compare:[!K],getValue:function(){var e;return null===(e=re.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:function(){ce(void 0)}},tests:[{onFailure:function(){ce({children:(0,r.jsxs)(r.Fragment,{children:["Domain name can only contain lowercase alphanumeric, hyphen (",(0,r.jsx)(A.Q0,{text:"-"}),"), and dot (",(0,r.jsx)(A.Q0,{text:"."}),") characters."]})})},test:function(e){var n=e.compare,t=e.value;return n[0]||g.FZ.test(t)}},{test:C.HJ}]}),N(e,E,{defaults:{compare:[!K],getValue:function(){var e;return null===(e=oe.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:function(){se(void 0)}},tests:[{onFailure:function(){se({children:(0,r.jsxs)(r.Fragment,{children:["Host name can only contain lowercase alphanumeric, hyphen (",(0,r.jsx)(A.Q0,{text:"-"}),"), and dot (",(0,r.jsx)(A.Q0,{text:"."}),") characters."]})})},test:function(e){var n=e.compare,t=e.value;return n[0]||g.FZ.test(t)}},{test:C.HJ}]}),N(e,z,{defaults:{getValue:function(){var e;return null===(e=ie.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:function(){ae(void 0)}},tests:[{onFailure:function(){ae({children:"Striker number can only contain digits."})},test:function(e){var n=e.value;return/^\d+$/.test(n)}},{test:C.HJ}]}),N(e,B,{defaults:{getValue:function(){var e;return null===(e=ne.current.getValue)||void 0===e?void 0:e.call(null)}},tests:[{test:C.HJ}]}),N(e,D,{defaults:{getValue:function(){var e;return null===(e=te.current.getValue)||void 0===e?void 0:e.call(null)},max:5,min:1,onSuccess:function(){ue(void 0)}},tests:[{onFailure:function(e){var n=e.max,t=e.min;ue({children:"Organization prefix must be ".concat(t," to ").concat(n," lowercase alphanumeric characters.")})},test:function(e){var n=e.max,t=e.min,r=e.value;return RegExp("^[a-z0-9]{".concat(t,",").concat(n,"}$")).test(r)}}]}),e}),[K,de,fe,ce,se,ae,ue]),pe=(0,a.useMemo)((function(){return(0,C.LT)(ve)}),[ve]),me=(0,a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.excludeTestIds,t=void 0===n?[]:n,r=e.inputs,i=e.isContinueOnFailure,o=e.isExcludeConfirmAdminPassword,l=void 0===o?!Q:o;l&&t.push(F),null===v||void 0===v||v.call(null,pe({excludeTestIds:t,inputs:r,isContinueOnFailure:i,isIgnoreOnCallbacks:!0,isTestAll:!0}))}),[Q,pe,v]),he=(0,a.useCallback)((function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.organizationName,i=void 0===r?null===(t=ne.current.getValue)||void 0===t?void 0:t.call(null):r,o=L(i);return null===(e=te.current.setValue)||void 0===e||e.call(null,o),me({inputs:N({},D,{isIgnoreOnCallbacks:!1,value:o}),isContinueOnFailure:!0}),o}),[me]),ge=(0,a.useCallback)((function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=n.organizationPrefix,r=void 0===t?null===(i=te.current.getValue)||void 0===i?void 0:i.call(null):t,l=n.hostNumber,a=void 0===l?null===(o=ie.current.getValue)||void 0===o?void 0:o.call(null):l,c=n.domainName,s=void 0===c?null===(u=re.current.getValue)||void 0===u?void 0:u.call(null):c,d=q({organizationPrefix:r,hostNumber:a,domainName:s});return null===(e=oe.current.setValue)||void 0===e||e.call(null,d),me({inputs:N({},E,{isIgnoreOnCallbacks:!1,value:d}),isContinueOnFailure:!0}),d}),[me]),ye=(0,a.useCallback)((function(){var e;return Boolean(null===(e=ne.current.getValue)||void 0===e?void 0:e.call(null))}),[]),be=(0,a.useCallback)((function(){var e,n,t;return[null===(e=te.current.getValue)||void 0===e?void 0:e.call(null),null===(n=ie.current.getValue)||void 0===n?void 0:n.call(null),null===(t=re.current.getValue)||void 0===t?void 0:t.call(null)].every((function(e){return Boolean(e)}))}),[]),xe=(0,a.useCallback)((function(){var e;(null===(e=te.current.getIsChangedByUser)||void 0===e?void 0:e.call(null))?I(ye()):he()}),[ye,he]),je=(0,a.useCallback)((function(){var e;(null===(e=oe.current.getIsChangedByUser)||void 0===e?void 0:e.call(null))?U(be()):ge()}),[be,ge]),we=(0,a.useCallback)((function(){var e,n=he();(null===(e=oe.current.getIsChangedByUser)||void 0===e?void 0:e.call(null))||ge({organizationPrefix:n})}),[ge,he]),Pe=(0,a.useCallback)((function(){ge()}),[ge]),Oe=(0,a.useCallback)((function(e){return function(n){return n===e?void 0:e}}),[]),Se=(0,a.useMemo)((function(){return(0,r.jsx)(m.Z,{checked:K,onChange:function(e,n){var t;W(n),me({inputs:(t={},N(t,T,{compare:[!n],isIgnoreOnCallbacks:!1}),N(t,E,{compare:[!n],isIgnoreOnCallbacks:!1}),t),isContinueOnFailure:!0})},sx:{padding:".2em"}})}),[K,me]);return(0,a.useEffect)((function(){if([s,d,X.current,re.current,oe.current,ie.current,ne.current,te.current].every((function(e){return Boolean(e)}))){var e,n,t,r,i;X.current=!1;var o=d.domain,l=d.hostName,u=d.organization,a=d.prefix,c=d.sequence;null===(e=re.current.setValue)||void 0===e||e.call(null,o),null===(n=oe.current.setValue)||void 0===n||n.call(null,l),null===(t=ie.current.setValue)||void 0===t||t.call(null,c),null===(r=ne.current.setValue)||void 0===r||r.call(null,u),null===(i=te.current.setValue)||void 0===i||i.call(null,a),me()}}),[s,d,me]),(0,a.useImperativeHandle)(n,(function(){return{get:function(){var e,n,t,r,i,o;return{adminPassword:null===(e=Y.current.getValue)||void 0===e?void 0:e.call(null),organizationName:null===(n=ne.current.getValue)||void 0===n?void 0:n.call(null),organizationPrefix:null===(t=te.current.getValue)||void 0===t?void 0:t.call(null),domainName:null===(r=re.current.getValue)||void 0===r?void 0:r.call(null),hostNumber:null===(i=ie.current.getValue)||void 0===i?void 0:i.call(null),hostName:null===(o=oe.current.getValue)||void 0===o?void 0:o.call(null)}}}})),(0,r.jsxs)(p.Z,{children:[(0,r.jsxs)(l.ZP,{columns:{xs:1,sm:2,md:3},container:!0,spacing:"1em",children:[(0,r.jsx)(l.ZP,{item:!0,xs:1,children:(0,r.jsxs)(p.Z,{children:[(0,r.jsx)(y.Z,{input:(0,r.jsx)(j.Z,{id:"striker-init-general-organization-name",inputProps:{onBlur:xe},inputLabelProps:{isNotifyRequired:!0},label:"Organization name",onChange:function(){me()},onHelp:function(){O(Oe("Name of the organization that maintains this Anvil! system. You can enter anything that makes sense to you."))}}),ref:ne}),(0,r.jsxs)(p.Z,{row:!0,sx:{"& > :first-child":{flexGrow:1}},children:[(0,r.jsx)(y.Z,{input:(0,r.jsx)(j.Z,{id:"striker-init-general-organization-prefix",inputProps:{endAdornment:(0,r.jsx)(Z,{show:k,onClick:we}),inputProps:{maxLength:5,sx:{minWidth:"2.5em"}},onBlur:function(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),r=1;r1?n-1:0),r=1;r * > *":{width:"100%"}},children:[(0,r.jsx)(l.ZP,{item:!0,xs:1,children:(0,r.jsx)(y.Z,{input:(0,r.jsx)(j.Z,{id:"striker-init-general-admin-password",inputProps:{inputProps:{type:h.Z.password},onBlur:function(e){var n=e.target.value;pe({inputs:N({},M,{value:n})})},onPasswordVisibilityAppend:function(e){var n=e===h.Z.password;me({isExcludeConfirmAdminPassword:!n}),J(n),fe()}},inputLabelProps:{isNotifyRequired:!0},label:"Admin password",onChange:function(e){var n=e.target.value;me({inputs:N({},M,{value:n})}),de()},onHelp:function(){O(Oe("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:Y})}),Q&&(0,r.jsx)(l.ZP,{item:!0,xs:1,children:(0,r.jsx)(y.Z,{input:(0,r.jsx)(j.Z,{id:"striker-init-general-confirm-admin-password",inputProps:{inputProps:{type:h.Z.password},onBlur:function(e){var n=e.target.value;pe({inputs:N({},F,{value:n})})}},inputLabelProps:{isNotifyRequired:Q},label:"Confirm password",onChange:function(e){var n=e.target.value;me({inputs:N({},F,{value:n})}),fe()}}),ref:ee})})]})})]}),(0,r.jsx)(x.Z,{count:1,defaultMessageType:"warning",ref:le}),(0,r.jsx)(b.Z,{children:(0,r.jsxs)(p.Z,{row:!0,sx:{"& > :last-child":{flexGrow:1}},children:[Se,(0,r.jsx)(A.Ac,{inverted:!0,children:K?"Uncheck to skip domain and host name pattern validation.":"Check to re-enable domain and host name pattern validation."})]})}),P&&(0,r.jsx)(b.Z,{onClose:function(){O(void 0)},children:P})]})}));U.defaultProps={expectHostDetail:!1,hostDetail:void 0,onHostNumberBlurAppend:void 0,toggleSubmitDisabled:void 0},U.displayName="GeneralInitForm";var $=U,Q=t(1770),J=t(7971),G=t(3377),K=t(2444),W=t(5741),X=t(4596),Y=t(3679),ee=t(634),ne=t(2152),te=t(2749);function re(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&(t[`spacing-xs-${String(e)}`]||`spacing-xs-${String(e)}`),Number(i)>0&&(t[`spacing-sm-${String(i)}`]||`spacing-sm-${String(i)}`),Number(o)>0&&(t[`spacing-md-${String(o)}`]||`spacing-md-${String(o)}`),Number(a)>0&&(t[`spacing-lg-${String(a)}`]||`spacing-lg-${String(a)}`),Number(s)>0&&(t[`spacing-xl-${String(s)}`]||`spacing-xl-${String(s)}`)]}const b=(0,c.ZP)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(n,r)=>{const{container:t,direction:e,item:i,lg:o,md:a,sm:s,spacing:u,wrap:l,xl:c,xs:p,zeroMinWidth:d}=n.ownerState;return[r.root,t&&r.container,i&&r.item,d&&r.zeroMinWidth,...x(u,t,r),"row"!==e&&r[`direction-xs-${String(e)}`],"wrap"!==l&&r[`wrap-xs-${String(l)}`],!1!==p&&r[`grid-xs-${String(p)}`],!1!==s&&r[`grid-sm-${String(s)}`],!1!==a&&r[`grid-md-${String(a)}`],!1!==o&&r[`grid-lg-${String(o)}`],!1!==c&&r[`grid-xl-${String(c)}`]]}})((({ownerState:n})=>(0,i.Z)({boxSizing:"border-box"},n.container&&{display:"flex",flexWrap:"wrap",width:"100%"},n.item&&{margin:0},n.zeroMinWidth&&{minWidth:0},"wrap"!==n.wrap&&{flexWrap:n.wrap})),(function({theme:n,ownerState:r}){const t=(0,s.P$)({values:r.direction,breakpoints:n.breakpoints.values});return(0,s.k9)({theme:n},t,(n=>{const r={flexDirection:n};return 0===n.indexOf("column")&&(r[`& > .${m.Z.item}`]={maxWidth:"none"}),r}))}),(function({theme:n,ownerState:r}){const{container:t,rowSpacing:e}=r;let i={};if(t&&0!==e){const r=(0,s.P$)({values:e,breakpoints:n.breakpoints.values});i=(0,s.k9)({theme:n},r,(r=>{const t=n.spacing(r);return"0px"!==t?{marginTop:`-${h(t)}`,[`& > .${m.Z.item}`]:{paddingTop:h(t)}}:{}}))}return i}),(function({theme:n,ownerState:r}){const{container:t,columnSpacing:e}=r;let i={};if(t&&0!==e){const r=(0,s.P$)({values:e,breakpoints:n.breakpoints.values});i=(0,s.k9)({theme:n},r,(r=>{const t=n.spacing(r);return"0px"!==t?{width:`calc(100% + ${h(t)})`,marginLeft:`-${h(t)}`,[`& > .${m.Z.item}`]:{paddingLeft:h(t)}}:{}}))}return i}),(function({theme:n,ownerState:r}){let t;return n.breakpoints.keys.reduce(((e,o)=>{let a={};if(r[o]&&(t=r[o]),!t)return e;if(!0===t)a={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===t)a={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const u=(0,s.P$)({values:r.columns,breakpoints:n.breakpoints.values}),l="object"===typeof u?u[o]:u;if(void 0===l||null===l)return e;const c=Math.round(t/l*1e8)/1e6+"%";let p={};if(r.container&&r.item&&0!==r.columnSpacing){const t=n.spacing(r.columnSpacing);if("0px"!==t){const n=`calc(${c} + ${h(t)})`;p={flexBasis:n,maxWidth:n}}}a=(0,i.Z)({flexBasis:c,flexGrow:0,maxWidth:c},p)}return 0===n.breakpoints.values[o]?Object.assign(e,a):e[n.breakpoints.up(o)]=a,e}),{})}));var v=o.forwardRef((function(n,r){const t=(0,p.Z)({props:n,name:"MuiGrid"}),s=(0,u.Z)(t),{className:c,columns:h,columnSpacing:v,component:w="div",container:S=!1,direction:y="row",item:$=!1,lg:P=!1,md:j=!1,rowSpacing:Z,sm:O=!1,spacing:k=0,wrap:I="wrap",xl:W=!1,xs:M=!1,zeroMinWidth:N=!1}=s,A=(0,e.Z)(s,g),L=Z||k,C=v||k,B=o.useContext(d),F=h||B||12,R=(0,i.Z)({},s,{columns:F,container:S,direction:y,item:$,lg:P,md:j,sm:O,rowSpacing:L,columnSpacing:C,wrap:I,xl:W,xs:M,zeroMinWidth:N}),_=(n=>{const{classes:r,container:t,direction:e,item:i,lg:o,md:a,sm:s,spacing:u,wrap:c,xl:p,xs:d,zeroMinWidth:f}=n,g={root:["root",t&&"container",i&&"item",f&&"zeroMinWidth",...x(u,t),"row"!==e&&`direction-xs-${String(e)}`,"wrap"!==c&&`wrap-xs-${String(c)}`,!1!==d&&`grid-xs-${String(d)}`,!1!==s&&`grid-sm-${String(s)}`,!1!==a&&`grid-md-${String(a)}`,!1!==o&&`grid-lg-${String(o)}`,!1!==p&&`grid-xl-${String(p)}`]};return(0,l.Z)(g,m.H,r)})(R);return T=(0,f.jsx)(b,(0,i.Z)({ownerState:R,className:(0,a.Z)(_.root,c),as:w,ref:r},A)),12!==F?(0,f.jsx)(d.Provider,{value:F,children:T}):T;var T}))},8673:function(n,r,t){"use strict";t.d(r,{H:function(){return i}});var e=t(8979);function i(n){return(0,e.Z)("MuiGrid",n)}const o=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],a=(0,t(6087).Z)("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map((n=>`spacing-xs-${n}`)),...["column-reverse","column","row-reverse","row"].map((n=>`direction-xs-${n}`)),...["nowrap","wrap-reverse","wrap"].map((n=>`wrap-xs-${n}`)),...o.map((n=>`grid-xs-${n}`)),...o.map((n=>`grid-sm-${n}`)),...o.map((n=>`grid-md-${n}`)),...o.map((n=>`grid-lg-${n}`)),...o.map((n=>`grid-xl-${n}`))]);r.Z=a},7106:function(n,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/login",function(){return t(1686)}])},4629:function(n,r,t){"use strict";var e=t(5893),i=t(7357),o=t(7294),a=t(4188),s=t(4825),u=t(4690),l=t(7504),c=t(4069),p=t(7869),d=t(6284),m=t(2152),f=t(2027),g=t(8859),h=t(2749);function x(n,r){(null==r||r>n.length)&&(r=n.length);for(var t=0,e=new Array(r);t=0||(i[t]=n[t]);return i}(n,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);for(e=0;e=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(i[t]=n[t])}return i}function S(n,r){return function(n){if(Array.isArray(n))return n}(n)||function(n,r){var t=null==n?null:"undefined"!==typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var e,i,o=[],a=!0,s=!1;try{for(t=t.call(n);!(a=(e=t.next()).done)&&(o.push(e.value),!r||o.length!==r);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==t.return||t.return()}finally{if(s)throw i}}return o}}(n,r)||$(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(n){return function(n){if(Array.isArray(n))return x(n)}(n)||function(n){if("undefined"!==typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||$(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $(n,r){if(n){if("string"===typeof n)return x(n,r);var t=Object.prototype.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?x(n,r):void 0}}var P={width:"100%"},j="gate-input",Z="".concat(j,"-credential-id"),O="".concat(j,"-credential-passphrase"),k="access",I=(0,o.forwardRef)((function(n,r){var t,x,b=n.formContainer,$=void 0===b||b,j=n.gridProps,I=void 0===j?{}:j,W=I.columns,M=void 0===W?{xs:1,sm:2}:W,N=(I.layout,I.spacing),A=void 0===N?"1em":N,L=n.identifierId,C=void 0===L?Z:L,B=n.identifierInputTestBatchBuilder,F=void 0===B?f.Gn:B,R=n.identifierLabel,_=n.identifierOutlinedInputWithLabelProps,T=void 0===_?{}:_,G=T.formControlProps,z=void 0===G?{}:G,E=T.inputProps,U=n.onIdentifierBlurAppend,q=n.onSubmit,D=n.onSubmitAppend,H=n.passphraseId,V=void 0===H?O:H,X=n.passphraseLabel,J=n.passphraseOutlinedInputWithLabelProps,K=void 0===J?{}:J,Q=K.formControlProps,Y=void 0===Q?{}:Q,nn=K.inputProps,rn=n.submitLabel,tn=n.allowSubmit,en=void 0===tn?$:tn,on=w(n.gridProps,["columns","layout","spacing"]),an=w(n.identifierOutlinedInputWithLabelProps,["formControlProps","inputProps"]),sn=w(n.passphraseOutlinedInputWithLabelProps,["formControlProps","inputProps"]),un=z.sx,ln=w(z,["sx"]),cn=Y.sx,pn=w(Y,["sx"]),dn=(0,o.useRef)({}),mn=(0,o.useRef)({}),fn=(0,o.useRef)({}),gn=S((0,h.Z)(!1),2),hn=gn[0],xn=gn[1],bn=(0,g.Z)([Z,O],fn),vn=bn.buildFinishInputTestBatchFunction,wn=bn.buildInputFirstRenderFunction,Sn=bn.buildInputUnmountFunction,yn=bn.isFormInvalid,$n=bn.setMessage,Pn=(0,o.useMemo)((function(){return null!==q&&void 0!==q?q:function(){for(var n=arguments.length,r=new Array(n),t=0;t0&&(t[`spacing-xs-${String(e)}`]||`spacing-xs-${String(e)}`),Number(i)>0&&(t[`spacing-sm-${String(i)}`]||`spacing-sm-${String(i)}`),Number(o)>0&&(t[`spacing-md-${String(o)}`]||`spacing-md-${String(o)}`),Number(a)>0&&(t[`spacing-lg-${String(a)}`]||`spacing-lg-${String(a)}`),Number(s)>0&&(t[`spacing-xl-${String(s)}`]||`spacing-xl-${String(s)}`)]}const b=(0,c.ZP)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(n,r)=>{const{container:t,direction:e,item:i,lg:o,md:a,sm:s,spacing:u,wrap:l,xl:c,xs:p,zeroMinWidth:d}=n.ownerState;return[r.root,t&&r.container,i&&r.item,d&&r.zeroMinWidth,...x(u,t,r),"row"!==e&&r[`direction-xs-${String(e)}`],"wrap"!==l&&r[`wrap-xs-${String(l)}`],!1!==p&&r[`grid-xs-${String(p)}`],!1!==s&&r[`grid-sm-${String(s)}`],!1!==a&&r[`grid-md-${String(a)}`],!1!==o&&r[`grid-lg-${String(o)}`],!1!==c&&r[`grid-xl-${String(c)}`]]}})((({ownerState:n})=>(0,i.Z)({boxSizing:"border-box"},n.container&&{display:"flex",flexWrap:"wrap",width:"100%"},n.item&&{margin:0},n.zeroMinWidth&&{minWidth:0},"wrap"!==n.wrap&&{flexWrap:n.wrap})),(function({theme:n,ownerState:r}){const t=(0,s.P$)({values:r.direction,breakpoints:n.breakpoints.values});return(0,s.k9)({theme:n},t,(n=>{const r={flexDirection:n};return 0===n.indexOf("column")&&(r[`& > .${m.Z.item}`]={maxWidth:"none"}),r}))}),(function({theme:n,ownerState:r}){const{container:t,rowSpacing:e}=r;let i={};if(t&&0!==e){const r=(0,s.P$)({values:e,breakpoints:n.breakpoints.values});i=(0,s.k9)({theme:n},r,(r=>{const t=n.spacing(r);return"0px"!==t?{marginTop:`-${h(t)}`,[`& > .${m.Z.item}`]:{paddingTop:h(t)}}:{}}))}return i}),(function({theme:n,ownerState:r}){const{container:t,columnSpacing:e}=r;let i={};if(t&&0!==e){const r=(0,s.P$)({values:e,breakpoints:n.breakpoints.values});i=(0,s.k9)({theme:n},r,(r=>{const t=n.spacing(r);return"0px"!==t?{width:`calc(100% + ${h(t)})`,marginLeft:`-${h(t)}`,[`& > .${m.Z.item}`]:{paddingLeft:h(t)}}:{}}))}return i}),(function({theme:n,ownerState:r}){let t;return n.breakpoints.keys.reduce(((e,o)=>{let a={};if(r[o]&&(t=r[o]),!t)return e;if(!0===t)a={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===t)a={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const u=(0,s.P$)({values:r.columns,breakpoints:n.breakpoints.values}),l="object"===typeof u?u[o]:u;if(void 0===l||null===l)return e;const c=Math.round(t/l*1e8)/1e6+"%";let p={};if(r.container&&r.item&&0!==r.columnSpacing){const t=n.spacing(r.columnSpacing);if("0px"!==t){const n=`calc(${c} + ${h(t)})`;p={flexBasis:n,maxWidth:n}}}a=(0,i.Z)({flexBasis:c,flexGrow:0,maxWidth:c},p)}return 0===n.breakpoints.values[o]?Object.assign(e,a):e[n.breakpoints.up(o)]=a,e}),{})}));var v=o.forwardRef((function(n,r){const t=(0,p.Z)({props:n,name:"MuiGrid"}),s=(0,u.Z)(t),{className:c,columns:h,columnSpacing:v,component:w="div",container:S=!1,direction:y="row",item:$=!1,lg:P=!1,md:j=!1,rowSpacing:Z,sm:O=!1,spacing:k=0,wrap:I="wrap",xl:W=!1,xs:M=!1,zeroMinWidth:N=!1}=s,A=(0,e.Z)(s,g),L=Z||k,C=v||k,B=o.useContext(d),F=h||B||12,R=(0,i.Z)({},s,{columns:F,container:S,direction:y,item:$,lg:P,md:j,sm:O,rowSpacing:L,columnSpacing:C,wrap:I,xl:W,xs:M,zeroMinWidth:N}),_=(n=>{const{classes:r,container:t,direction:e,item:i,lg:o,md:a,sm:s,spacing:u,wrap:c,xl:p,xs:d,zeroMinWidth:f}=n,g={root:["root",t&&"container",i&&"item",f&&"zeroMinWidth",...x(u,t),"row"!==e&&`direction-xs-${String(e)}`,"wrap"!==c&&`wrap-xs-${String(c)}`,!1!==d&&`grid-xs-${String(d)}`,!1!==s&&`grid-sm-${String(s)}`,!1!==a&&`grid-md-${String(a)}`,!1!==o&&`grid-lg-${String(o)}`,!1!==p&&`grid-xl-${String(p)}`]};return(0,l.Z)(g,m.H,r)})(R);return T=(0,f.jsx)(b,(0,i.Z)({ownerState:R,className:(0,a.Z)(_.root,c),as:w,ref:r},A)),12!==F?(0,f.jsx)(d.Provider,{value:F,children:T}):T;var T}))},8673:function(n,r,t){"use strict";t.d(r,{H:function(){return i}});var e=t(8979);function i(n){return(0,e.Z)("MuiGrid",n)}const o=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],a=(0,t(6087).Z)("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map((n=>`spacing-xs-${n}`)),...["column-reverse","column","row-reverse","row"].map((n=>`direction-xs-${n}`)),...["nowrap","wrap-reverse","wrap"].map((n=>`wrap-xs-${n}`)),...o.map((n=>`grid-xs-${n}`)),...o.map((n=>`grid-sm-${n}`)),...o.map((n=>`grid-md-${n}`)),...o.map((n=>`grid-lg-${n}`)),...o.map((n=>`grid-xl-${n}`))]);r.Z=a},7106:function(n,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/login",function(){return t(1686)}])},4629:function(n,r,t){"use strict";var e=t(5893),i=t(7357),o=t(7294),a=t(4188),s=t(4825),u=t(4690),l=t(7504),c=t(4069),p=t(7869),d=t(6284),m=t(2152),f=t(2027),g=t(8859),h=t(2749);function x(n,r){(null==r||r>n.length)&&(r=n.length);for(var t=0,e=new Array(r);t=0||(i[t]=n[t]);return i}(n,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);for(e=0;e=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(i[t]=n[t])}return i}function S(n,r){return function(n){if(Array.isArray(n))return n}(n)||function(n,r){var t=null==n?null:"undefined"!==typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var e,i,o=[],a=!0,s=!1;try{for(t=t.call(n);!(a=(e=t.next()).done)&&(o.push(e.value),!r||o.length!==r);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==t.return||t.return()}finally{if(s)throw i}}return o}}(n,r)||$(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(n){return function(n){if(Array.isArray(n))return x(n)}(n)||function(n){if("undefined"!==typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||$(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $(n,r){if(n){if("string"===typeof n)return x(n,r);var t=Object.prototype.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?x(n,r):void 0}}var P={width:"100%"},j="gate-input",Z="".concat(j,"-credential-id"),O="".concat(j,"-credential-passphrase"),k="access",I=(0,o.forwardRef)((function(n,r){var t,x,b=n.formContainer,$=void 0===b||b,j=n.gridProps,I=void 0===j?{}:j,W=I.columns,M=void 0===W?{xs:1,sm:2}:W,N=(I.layout,I.spacing),A=void 0===N?"1em":N,L=n.identifierId,C=void 0===L?Z:L,B=n.identifierInputTestBatchBuilder,F=void 0===B?f.Gn:B,R=n.identifierLabel,_=n.identifierOutlinedInputWithLabelProps,T=void 0===_?{}:_,G=T.formControlProps,z=void 0===G?{}:G,E=T.inputProps,U=n.onIdentifierBlurAppend,q=n.onSubmit,D=n.onSubmitAppend,H=n.passphraseId,V=void 0===H?O:H,X=n.passphraseLabel,J=n.passphraseOutlinedInputWithLabelProps,K=void 0===J?{}:J,Q=K.formControlProps,Y=void 0===Q?{}:Q,nn=K.inputProps,rn=n.submitLabel,tn=n.allowSubmit,en=void 0===tn?$:tn,on=w(n.gridProps,["columns","layout","spacing"]),an=w(n.identifierOutlinedInputWithLabelProps,["formControlProps","inputProps"]),sn=w(n.passphraseOutlinedInputWithLabelProps,["formControlProps","inputProps"]),un=z.sx,ln=w(z,["sx"]),cn=Y.sx,pn=w(Y,["sx"]),dn=(0,o.useRef)({}),mn=(0,o.useRef)({}),fn=(0,o.useRef)({}),gn=S((0,h.Z)(!1),2),hn=gn[0],xn=gn[1],bn=(0,g.Z)([Z,O],fn),vn=bn.buildFinishInputTestBatchFunction,wn=bn.buildInputFirstRenderFunction,Sn=bn.buildInputUnmountFunction,yn=bn.isFormInvalid,$n=bn.setMessage,Pn=(0,o.useMemo)((function(){return null!==q&&void 0!==q?q:function(){for(var n=arguments.length,r=new Array(n),t=0;t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var b=function(e){return(0,r.jsx)(o.Z,{in:!0,children:(0,r.jsx)(i.Z,h({},e))})};n.Z=function(e){var n=e.componentsProps,t=e.extendRenderInput,o=e.label,i=e.messageBoxProps,y=e.renderInput,g=e.sx,j=v(e,["componentsProps","extendRenderInput","label","messageBoxProps","renderInput","sx"]),w=h({paper:{sx:{backgroundColor:d.lD}}},n),x=null!==y&&void 0!==y?y:function(e){var n=e.fullWidth,i=e.InputProps,a=e.InputLabelProps,u=e.inputProps,c={formControlProps:{fullWidth:n,ref:i.ref},inputLabelProps:a,inputProps:{className:i.className,endAdornment:i.endAdornment,inputProps:u,startAdornment:i.startAdornment},label:o};return null===t||void 0===t||t.call(null,c,e),(0,r.jsx)(p.Z,h({},c))},k=h(m({},"& .".concat(a.Z.root," .").concat(u.Z.endAdornment),m({right:"7px"},"& .".concat(c.Z.root),{color:d.s7})),g);return(0,r.jsxs)(s.Z,{sx:{display:"flex",flexDirection:"column"},children:[(0,r.jsx)(l.Z,h({PaperComponent:b},j,{componentsProps:w,renderInput:x,sx:k})),(0,r.jsx)(f.Z,h({},i))]})}},4629:function(e,n,t){"use strict";var r=t(5893),o=t(7357),i=t(7294),a=t(4188),u=t(4825),c=t(4690),s=t(7504),l=t(4069),d=t(7869),f=t(6284),p=t(2152),m=t(2027),h=t(8859),v=t(2749);function b(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function w(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}}(e,n)||k(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||k(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,n){if(e){if("string"===typeof e)return b(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?b(e,n):void 0}}var O={width:"100%"},I="gate-input",P="".concat(I,"-credential-id"),S="".concat(I,"-credential-passphrase"),Z="access",A=(0,i.forwardRef)((function(e,n){var t,b,y=e.formContainer,k=void 0===y||y,I=e.gridProps,A=void 0===I?{}:I,M=A.columns,F=void 0===M?{xs:1,sm:2}:M,T=(A.layout,A.spacing),C=void 0===T?"1em":T,U=e.identifierId,N=void 0===U?P:U,E=e.identifierInputTestBatchBuilder,R=void 0===E?m.Gn:E,B=e.identifierLabel,D=e.identifierOutlinedInputWithLabelProps,q=void 0===D?{}:D,L=q.formControlProps,_=void 0===L?{}:L,H=q.inputProps,$=e.onIdentifierBlurAppend,G=e.onSubmit,V=e.onSubmitAppend,z=e.passphraseId,W=void 0===z?S:z,Q=e.passphraseLabel,Y=e.passphraseOutlinedInputWithLabelProps,J=void 0===Y?{}:Y,K=J.formControlProps,X=void 0===K?{}:K,ee=J.inputProps,ne=e.submitLabel,te=e.allowSubmit,re=void 0===te?k:te,oe=j(e.gridProps,["columns","layout","spacing"]),ie=j(e.identifierOutlinedInputWithLabelProps,["formControlProps","inputProps"]),ae=j(e.passphraseOutlinedInputWithLabelProps,["formControlProps","inputProps"]),ue=_.sx,ce=j(_,["sx"]),se=X.sx,le=j(X,["sx"]),de=(0,i.useRef)({}),fe=(0,i.useRef)({}),pe=(0,i.useRef)({}),me=w((0,v.Z)(!1),2),he=me[0],ve=me[1],be=(0,h.Z)([P,S],pe),ye=be.buildFinishInputTestBatchFunction,ge=be.buildInputFirstRenderFunction,je=be.buildInputUnmountFunction,we=be.isFormInvalid,xe=be.setMessage,ke=(0,i.useMemo)((function(){return null!==G&&void 0!==G?G:function(){for(var e=arguments.length,n=new Array(e),t=0;t1&&void 0!==arguments[1]?arguments[1]:{},t=n.fallbackValue,r=void 0===t?"":t,o=n.joinSeparator,i=void 0===o?"":o,a=n.limit,u=void 0===a?1:a;return c(e,Array)?e.slice(0,u).join(i):null!==e&&void 0!==e?e:r},l=t(7504),d=t(1770),f=t(8750),p=t(2029),m=t(7357),h=t(4594),v=t(1496),b=t(4386),y=t(4188),g=t(4690),j=t(4069),w=t(6284),x=t(3679),k=t(2519),O=t(480),I=t(2852),P=t(7169),S=t(7750);function Z(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function A(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);tN(n,1)[0]?1:-1})).reduce((function(e,o){var a=N(o,2),u=a[0],c=a[1],s=c.content_type,l=c.default,d=c.deprecated,p=c.description,h=c.options,v=c.required;if("1"===String(d))return e;var y,g,j=e.optional,w=e.required,x=null!==(y=D[s])&&void 0!==y?y:D.string,k=q(n,u),O=null!==(g=f[k])&&void 0!==g?g:l,I="1"===String(v),P=/passw/i.test(u),Z=x({formUtils:i,id:k,isChecked:E.includes(O),isRequired:I,isSensitive:P,label:u,selectOptions:h,value:O}),A=(0,r.jsx)(b.Z,function(e){for(var n=1;n div:first-child":{marginTop:0},"& > div":{marginBottom:0}},children:[(0,r.jsx)(x.TZ,{expandInitially:!0,header:"Required parameters",children:(0,r.jsxs)(L,{children:[(0,r.jsx)(j.Z,{input:(0,r.jsx)(w.Z,{id:y,label:k,name:y,value:u}),inputTestBatch:(0,T.Gn)(k,(function(){d(y)}),{onFinishBatch:s(y)},(function(e){d(y,{children:e})})),onFirstRender:l(y),required:!0},"".concat(y,"-wrapper")),v]})}),(0,r.jsx)(x.TZ,{header:"Optional parameters",children:(0,r.jsx)(L,{children:h})})]})}return e}),[s,l,n,t,o,i,u,c,d]);return(0,r.jsx)(r.Fragment,{children:f})},H=t(2152),$=t(1081);function G(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);tz(n,1)[0]?1:-1})).map((function(e){var n=z(e,2),t=n[0],r=n[1].description;return{fenceDescription:"string"===typeof r?r:"No description.",fenceId:t,label:t}})):[]}),[n]),f=(0,a.useMemo)((function(){return(0,r.jsx)(h.Z,{id:W,isOptionEqualToValue:function(e,n){return e.fenceId===n.fenceId},label:"Fence device type",onChange:function(e,n){i(W,null!==n),l(n)},openOnFocus:!0,options:d,renderOption:function(e,n,t){var o=n.fenceDescription,i=n.fenceId,a=t.selected;return(0,r.jsxs)(m.Z,function(e){for(var n=1;n *":{width:"100%"}}},e,{children:[(0,r.jsx)(S.Ac,{inverted:!0,sx:{fontSize:"1.2em",fontWeight:a?400:void 0},children:i}),(0,r.jsx)(S.Ac,{selected:!1,children:o})]}))},sx:{marginTop:".3em"},value:s})}),[d,s,i]),p=(0,a.useMemo)((function(){return(0,r.jsx)(_,{fenceId:null===s||void 0===s?void 0:s.fenceId,fenceTemplate:n,formUtils:t})}),[n,null===s||void 0===s?void 0:s.fenceId,t]),v=(0,a.useMemo)((function(){return o?(0,r.jsx)(H.Z,{}):(0,r.jsxs)(g.Z,{children:[f,p]})}),[f,p,o]);return(0,a.useEffect)((function(){u&&i(W,null!==s)}),[s,u,i]),(0,r.jsx)(r.Fragment,{children:v})},Y=t(157),J=function(e){var n=e.fenceId,t=e.fenceTemplate,o=e.formUtils,i=e.loading,u=e.previousFenceName,c=e.previousFenceParameters,s=(0,a.useMemo)((function(){return i?(0,r.jsx)(H.Z,{}):(0,r.jsx)(_,{fenceId:n,fenceTemplate:t,formUtils:o,previousFenceName:u,previousFenceParameters:c})}),[t,n,o,i,u,c]);return(0,r.jsx)(r.Fragment,{children:s})},K=t(2545),X=t(8610),ee=t(6125),ne=t(7869),te=t(1905),re=t(3906),oe=t(6632),ie=t(8859),ae=t(2749);function ue(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t1?n-1:0),r=1;re.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function un(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}}(e,n)||function(e,n){if(!e)return;if("string"===typeof e)return tn(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tn(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var cn="an-network-config-input",sn="".concat(cn,"-cell"),ln="".concat(cn,"-dns"),dn="".concat(cn,"-mtu"),fn="".concat(cn,"-ntp"),pn=Object.entries(Ve.Z),mn={bcn:{base:"10.201.0.0",mask:"255.255.0.0"},mn:{base:"10.199.0.0",mask:"255.255.0.0"},sn:{base:"10.101.0.0",mask:"255.255.0.0"}},hn=function(e){return"ifn"===e},vn=function(e){return"mn"===e},bn=function(e){var n,t=e.entries,r=e.type,o=t.filter((function(e){return un(e,2)[1].networkType===r})).sort((function(e,n){return un(e,2)[1].networkNumber>un(n,2)[1].networkNumber?1:-1})).pop();if(!o)return null!==(n=mn[r])&&void 0!==n?n:{};var i=un(o,2)[1],a=i.networkMinIp,u=i.networkSubnetMask;try{var c=new be.Netmask("".concat(a,"/").concat(u)).next();return{base:c.base,mask:c.mask}}catch(s){return{}}},yn=function(e){var n=e.formUtils,t=e.networkListEntries,o=e.previous,i=void 0===o?{}:o,u=i.dnsCsv,c=void 0===u?"8.8.8.8,8.8.4.4":u,s=i.mtu,d=i.ntpCsv,f=e.setNetworkList,p=n.buildFinishInputTestBatchFunction,m=n.buildInputFirstRenderFunction,h=n.setMessage,v=n.setMessageRe,b=(0,a.useCallback)((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.input,o=void 0===r?t:r,i=n.end,a=void 0===i?t.length:i,u=a-1,c=0;return o.every((function(n,t){return un(n,2)[1].networkType===e&&(c+=1),t0&&void 0!==arguments[0]?arguments[0]:{},n=e.networkMinIp,r=void 0===n?"":n,o=e.networkSubnetMask,i=void 0===o?"":o,a=e.networkType,u=void 0===a?t.some((function(e){var n=un(e,2)[1].networkType;return vn(n)}))?"ifn":"mn":a,c=e.networkGateway,s=void 0===c?hn(u)?"":void 0:c,l=e.networkNumber,d=void 0===l?b(u)+1:l,f=bn({entries:t,type:u}),p=f.base,m=void 0===p?r:p,h=f.mask,v=void 0===h?i:h;return{network:{networkGateway:s,networkMinIp:m,networkNumber:d,networkSubnetMask:v,networkType:u},networkId:(0,Ge.Z)()}}),[b,t]),x=(0,a.useCallback)((function(e,n){return f((0,nn.ZP)(e,n))}),[f]),k=(0,a.useCallback)((function(e,n,t){return f((function(r){var o=on({},r),i=o[e];return i&&(i[n]=t),o}))}),[f]),O=(0,a.useCallback)((function(e,n){var r=e.networkId,o=e.networkType,i=n.target.value,a=String(i),u=!1,c=0,s=t.reduce((function(e,n){var i=un(n,2),s=i[0],l=i[1],d=l.networkNumber,f=l.networkType,p=l.networkMinIp,m=l.networkSubnetMask,h=an(l,["networkNumber","networkType","networkMinIp","networkSubnetMask"]),b=d,y=f;s===r&&(u=!0,y=a,v(RegExp(s)));var g=y===a;if(g&&(c+=1),u){g?b=c:y===o&&(b-=1);var j=bn({entries:t,type:y}),w=j.base,x=void 0===w?p:w,k=j.mask,O=void 0===k?m:k;e[s]=on({},h,{networkMinIp:x,networkSubnetMask:O,networkNumber:b,networkType:y})}else e[s]=l;return e}),{});f(s)}),[t,v,f]),I=(0,a.useCallback)((function(e){var n=e.networkId,r=e.networkType,o=!1,i=0,a=t.reduce((function(e,t){var a=un(t,2),u=a[0],c=a[1];if(u===n)return o=!0,e;var s=c.networkType===r;return s&&(i+=1),e[u]=o&&s?on({},c,{networkNumber:i}):c,e}),{});f(a)}),[t,f]),P=(0,a.useMemo)((function(){var e={};return e=t.reduce((function(e,t){var o=un(t,2),i=o[0],a=o[1],u=a.networkGateway,c=a.networkMinIp,s=a.networkNumber,l=a.networkSubnetMask,d=a.networkType,f="".concat(sn,"-").concat(i),p=1===s,m=hn(d),h=vn(d)||!p;return e[f]={children:(0,r.jsx)(en,{formUtils:n,networkId:i,networkNumber:s,networkType:d,networkTypeOptions:y,onClose:I,onNetworkMinIpChange:function(e,n){var t=e.networkId,r=n.target.value;return k(t,"networkMinIp",r)},onNetworkSubnetMaskChange:function(e,n){var t=e.networkId,r=n.target.value;return k(t,"networkSubnetMask",r)},onNetworkTypeChange:O,previous:{gateway:u,minIp:c,subnetMask:l},readonlyNetworkName:!h,showCloseButton:h,showGateway:m}),md:3,sm:2},e}),e)}),[t,n,y,I,O,k]);return(0,r.jsx)(l.Z,{columns:{xs:1,sm:2,md:3},layout:on({},P,{"an-network-config-cell-add-network":{children:(0,r.jsx)(ze.Z,{mapPreset:"add",onClick:function(){var e=g(),n=e.network,t=e.networkId;x(t,n)}}),display:"flex",justifyContent:"center",md:3,sm:2},"an-network-config-input-cell-dns":{children:(0,r.jsx)(j.Z,{input:(0,r.jsx)(w.Z,{id:ln,label:"DNS",value:c}),inputTestBatch:(0,T.dg)("DNS",(function(){h(ln)}),{onFinishBatch:p(ln)},(function(e){h(ln,{children:e})})),onFirstRender:m(ln),required:!0})},"an-network-config-input-cell-ntp":{children:(0,r.jsx)(j.Z,{input:(0,r.jsx)(w.Z,{id:fn,label:"NTP",value:d}),inputTestBatch:(0,T.dg)("NTP",(function(){h(fn)}),{onFinishBatch:p(fn)},(function(e){h(fn,{children:e})})),onFirstRender:m(fn)})},"an-network-config-input-cell-mtu":{children:(0,r.jsx)(j.Z,{input:(0,r.jsx)(w.Z,{id:dn,inputProps:{placeholder:"1500"},label:"MTU",value:s}),inputTestBatch:(0,T.qY)("MTU",(function(){h(dn)}),{onFinishBatch:p(dn)},(function(e){h(dn,{children:e})})),onFirstRender:m(dn),valueType:"number"})}}),spacing:"1em"})};function gn(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var jn={bcn1:{networkMinIp:"10.201.0.0",networkNumber:1,networkSubnetMask:"255.255.0.0",networkType:"bcn"},sn1:{networkMinIp:"10.101.0.0",networkNumber:1,networkSubnetMask:"255.255.0.0",networkType:"sn"},ifn1:{networkMinIp:"",networkNumber:1,networkSubnetMask:"",networkType:"ifn"}},wn=function(e){var n,t=e.formUtils,o=e.knownFences,i=e.knownUpses,u=e.previous,c=void 0===u?{}:u,s=c.hostConfig,l=c.networkConfig,d=void 0===l?{}:l,f=gn(e.previous,["hostConfig","networkConfig"]),p=d.networks,m=void 0===p?jn:p,h=(0,a.useState)(null!==(n=null===f||void 0===f?void 0:f.sequence)&&void 0!==n?n:0),v=h[0],b=h[1],y=(0,a.useState)(m),j=y[0],w=y[1],x=(0,a.useMemo)((function(){return Object.entries(j)}),[j]);return(0,r.jsxs)(g.Z,{children:[(0,r.jsx)($e,{formUtils:t,onSequenceChange:function(e){var n=e.target.value;b(Number(n))},previous:f}),(0,r.jsx)(yn,{formUtils:t,networkListEntries:x,previous:d,setNetworkList:w}),(0,r.jsx)(Ne,{anSequence:v,formUtils:t,knownFences:o,knownUpses:i,networkListEntries:x,previous:s})]})},xn=function(e){var n=e.formUtils,t=e.knownFences,o=e.knownUpses,i=e.previous;return(0,r.jsx)(wn,{formUtils:n,knownFences:t,knownUpses:o,previous:i})};function kn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t1?n-1:0),r=1;re.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t1?n-1:0),r=1;re.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function Zt(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}}(e,n)||function(e,n){if(!e)return;if("string"===typeof e)return Ot(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ot(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var At=function(e){var n=e.formControlProps,t=e.formControlLabelProps,o=e.formLabelProps,i=e.id,u=e.label,c=e.onChange,s=e.radioItems,l=e.radioProps,d=(void 0===l?{}:l).sx,f=e.radioGroupProps,p=St(e.radioProps,["sx"]),m=(0,a.useMemo)((function(){return"string"===typeof u?(0,r.jsx)(S.Ac,{children:u}):u}),[u]),h=(0,a.useMemo)((function(){return Object.entries(s).map((function(e){var n=Zt(e,2),o=n[0],a=n[1],u=a.label,c=a.value,s="string"===typeof u?(0,r.jsx)(S.Ac,{children:u}):u;return(0,r.jsx)(O.Z,Pt({control:(0,r.jsx)(gt.Z,Pt({},p,{sx:Pt(It({},"&.".concat(jt.Z.root),{color:P.s7}),d)})),value:c,label:s},t),"".concat(i,"-").concat(o))}))}),[t,i,s,d,p]);return(0,r.jsxs)(wt.Z,Pt({},n,{children:[(0,r.jsx)(xt.Z,Pt({},o,{children:m})),(0,r.jsx)(kt.Z,Pt({onChange:c,row:!0},f,{children:h}))]}))},Mt=t(3144);function Ft(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function Jt(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}}(e,n)||Xt(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Kt(e){return function(e){if(Array.isArray(e))return zt(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Xt(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xt(e,n){if(e){if("string"===typeof e)return zt(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?zt(e,n):void 0}}var er="prepare-network-host-name-input",nr="prepare-network-netconf-input-group",tr="Host name",rr=function(e){for(var n=e.netconf,t=arguments.length,r=new Array(t>1?t-1:0),o=1;o=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var lr=function(e){var n=e.label,t=sr(e,["label"]),o=(0,a.useMemo)((function(){return"string"===typeof n?(0,r.jsx)(S.Ac,{inheritColour:!0,children:n}):n}),[n]);return(0,r.jsx)(ar.Z,function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function gr(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}}(e,n)||function(e,n){if(!e)return;if("string"===typeof e)return vr(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return vr(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var jr="1.8em",wr=function(e){var n,t,o=e.orientation,i=e.variant,u=void 0===i?"fullWidth":i,c=yr(e,["orientation","variant"]),s=(0,fr.Z)(),l=(0,a.useCallback)((function(e){return s.breakpoints.up(e)}),[s]),d=(0,pr.Z)(l("xs")),f=(0,pr.Z)(l("sm")),p=(0,pr.Z)(l("md")),m=(0,pr.Z)(l("lg")),h=(0,pr.Z)(l("xl")),v=(0,a.useMemo)((function(){return[["xs",d],["sm",f],["md",p],["lg",m],["xl",h]]}),[m,p,f,h,d]),b=(0,a.useMemo)((function(){var e;return"object"===typeof o?v.some((function(n){var t=gr(n,2),r=t[0],i=t[1];return i&&o[r]&&(e=o[r]),!i})):e=o,e}),[v,o]);return(0,r.jsx)(mr.Z,function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var b=function(e){return(0,r.jsx)(o.Z,{in:!0,children:(0,r.jsx)(i.Z,h({},e))})};n.Z=function(e){var n=e.componentsProps,t=e.extendRenderInput,o=e.label,i=e.messageBoxProps,y=e.renderInput,g=e.sx,j=v(e,["componentsProps","extendRenderInput","label","messageBoxProps","renderInput","sx"]),x=h({paper:{sx:{backgroundColor:d.lD}}},n),w=null!==y&&void 0!==y?y:function(e){var n=e.fullWidth,i=e.InputProps,a=e.InputLabelProps,u=e.inputProps,c={formControlProps:{fullWidth:n,ref:i.ref},inputLabelProps:a,inputProps:{className:i.className,endAdornment:i.endAdornment,inputProps:u,startAdornment:i.startAdornment},label:o};return null===t||void 0===t||t.call(null,c,e),(0,r.jsx)(p.Z,h({},c))},k=h(m({},"& .".concat(a.Z.root," .").concat(u.Z.endAdornment),m({right:"7px"},"& .".concat(c.Z.root),{color:d.s7})),g);return(0,r.jsxs)(s.Z,{sx:{display:"flex",flexDirection:"column"},children:[(0,r.jsx)(l.Z,h({PaperComponent:b},j,{componentsProps:x,renderInput:w,sx:k})),(0,r.jsx)(f.Z,h({},i))]})}},4629:function(e,n,t){"use strict";var r=t(5893),o=t(7357),i=t(7294),a=t(4188),u=t(4825),c=t(4690),s=t(7504),l=t(4069),d=t(7869),f=t(6284),p=t(2152),m=t(2027),h=t(8859),v=t(2749);function b(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function x(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}}(e,n)||k(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||k(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,n){if(e){if("string"===typeof e)return b(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?b(e,n):void 0}}var O={width:"100%"},I="gate-input",P="".concat(I,"-credential-id"),Z="".concat(I,"-credential-passphrase"),S="access",A=(0,i.forwardRef)((function(e,n){var t,b,y=e.formContainer,k=void 0===y||y,I=e.gridProps,A=void 0===I?{}:I,F=A.columns,M=void 0===F?{xs:1,sm:2}:F,T=(A.layout,A.spacing),C=void 0===T?"1em":T,U=e.identifierId,N=void 0===U?P:U,E=e.identifierInputTestBatchBuilder,R=void 0===E?m.Gn:E,B=e.identifierLabel,D=e.identifierOutlinedInputWithLabelProps,q=void 0===D?{}:D,L=q.formControlProps,_=void 0===L?{}:L,H=q.inputProps,V=e.onIdentifierBlurAppend,$=e.onSubmit,G=e.onSubmitAppend,z=e.passphraseId,W=void 0===z?Z:z,Q=e.passphraseLabel,Y=e.passphraseOutlinedInputWithLabelProps,J=void 0===Y?{}:Y,K=J.formControlProps,X=void 0===K?{}:K,ee=J.inputProps,ne=e.submitLabel,te=e.allowSubmit,re=void 0===te?k:te,oe=j(e.gridProps,["columns","layout","spacing"]),ie=j(e.identifierOutlinedInputWithLabelProps,["formControlProps","inputProps"]),ae=j(e.passphraseOutlinedInputWithLabelProps,["formControlProps","inputProps"]),ue=_.sx,ce=j(_,["sx"]),se=X.sx,le=j(X,["sx"]),de=(0,i.useRef)({}),fe=(0,i.useRef)({}),pe=(0,i.useRef)({}),me=x((0,v.Z)(!1),2),he=me[0],ve=me[1],be=(0,h.Z)([P,Z],pe),ye=be.buildFinishInputTestBatchFunction,ge=be.buildInputFirstRenderFunction,je=be.buildInputUnmountFunction,xe=be.isFormInvalid,we=be.setMessage,ke=(0,i.useMemo)((function(){return null!==$&&void 0!==$?$:function(){for(var e=arguments.length,n=new Array(e),t=0;t1&&void 0!==arguments[1]?arguments[1]:{},t=n.fallbackValue,r=void 0===t?"":t,o=n.joinSeparator,i=void 0===o?"":o,a=n.limit,u=void 0===a?1:a;return c(e,Array)?e.slice(0,u).join(i):null!==e&&void 0!==e?e:r},l=t(7504),d=t(1770),f=t(8750),p=t(2029),m=t(7357),h=t(4594),v=t(1496),b=t(4386),y=t(4188),g=t(4690),j=t(4069),x=t(6284),w=t(3679),k=t(2519),O=t(480),I=t(2852),P=t(7169),Z=t(7750);function S(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function A(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);tN(n,1)[0]?1:-1})).reduce((function(e,o){var a=N(o,2),u=a[0],c=a[1],s=c.content_type,l=c.default,d=c.deprecated,p=c.description,h=c.options,v=c.required;if("1"===String(d))return e;var y,g,j=e.optional,x=e.required,w=null!==(y=D[s])&&void 0!==y?y:D.string,k=q(n,u),O=null!==(g=f[k])&&void 0!==g?g:l,I="1"===String(v),P=/passw/i.test(u),S=w({formUtils:i,id:k,isChecked:E.includes(O),isRequired:I,isSensitive:P,label:u,selectOptions:h,value:O}),A=(0,r.jsx)(b.Z,function(e){for(var n=1;n div:first-child":{marginTop:0},"& > div":{marginBottom:0}},children:[(0,r.jsx)(w.TZ,{expandInitially:!0,header:"Required parameters",children:(0,r.jsxs)(L,{children:[(0,r.jsx)(j.Z,{input:(0,r.jsx)(x.Z,{id:y,label:k,name:y,value:u}),inputTestBatch:(0,T.Gn)(k,(function(){d(y)}),{onFinishBatch:s(y)},(function(e){d(y,{children:e})})),onFirstRender:l(y),required:!0},"".concat(y,"-wrapper")),v]})}),(0,r.jsx)(w.TZ,{header:"Optional parameters",children:(0,r.jsx)(L,{children:h})})]})}return e}),[s,l,n,t,o,i,u,c,d]);return(0,r.jsx)(r.Fragment,{children:f})},H=t(2152),V=t(1081);function $(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);tz(n,1)[0]?1:-1})).map((function(e){var n=z(e,2),t=n[0],r=n[1].description;return{fenceDescription:"string"===typeof r?r:"No description.",fenceId:t,label:t}})):[]}),[n]),f=(0,a.useMemo)((function(){return(0,r.jsx)(h.Z,{id:W,isOptionEqualToValue:function(e,n){return e.fenceId===n.fenceId},label:"Fence device type",onChange:function(e,n){i(W,null!==n),l(n)},openOnFocus:!0,options:d,renderOption:function(e,n,t){var o=n.fenceDescription,i=n.fenceId,a=t.selected;return(0,r.jsxs)(m.Z,function(e){for(var n=1;n *":{width:"100%"}}},e,{children:[(0,r.jsx)(Z.Ac,{inverted:!0,sx:{fontSize:"1.2em",fontWeight:a?400:void 0},children:i}),(0,r.jsx)(Z.Ac,{selected:!1,children:o})]}))},sx:{marginTop:".3em"},value:s})}),[d,s,i]),p=(0,a.useMemo)((function(){return(0,r.jsx)(_,{fenceId:null===s||void 0===s?void 0:s.fenceId,fenceTemplate:n,formUtils:t})}),[n,null===s||void 0===s?void 0:s.fenceId,t]),v=(0,a.useMemo)((function(){return o?(0,r.jsx)(H.Z,{}):(0,r.jsxs)(g.Z,{children:[f,p]})}),[f,p,o]);return(0,a.useEffect)((function(){u&&i(W,null!==s)}),[s,u,i]),(0,r.jsx)(r.Fragment,{children:v})},Y=t(157),J=function(e){var n=e.fenceId,t=e.fenceTemplate,o=e.formUtils,i=e.loading,u=e.previousFenceName,c=e.previousFenceParameters,s=(0,a.useMemo)((function(){return i?(0,r.jsx)(H.Z,{}):(0,r.jsx)(_,{fenceId:n,fenceTemplate:t,formUtils:o,previousFenceName:u,previousFenceParameters:c})}),[t,n,o,i,u,c]);return(0,r.jsx)(r.Fragment,{children:s})},K=t(2545),X=t(8610),ee=t(6125),ne=t(7869),te=t(1905),re=t(3906),oe=t(6632),ie=t(8859),ae=t(2749);function ue(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t1?n-1:0),r=1;re.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t1&&void 0!==arguments[1]?arguments[1]:{},r=n.input,o=void 0===r?t:r,i=n.end,a=void 0===i?t.length:i,u=a-1,c=0;return o.every((function(n,t){return tn(n,2)[1].networkType===e&&(c+=1),t0&&void 0!==arguments[0]?arguments[0]:{},n=e.networkMinIp,t=void 0===n?"":n,r=e.networkSubnetMask,o=void 0===r?"":r,i=e.networkType,a=void 0===i?"ifn":i,u=e.networkGateway,c=void 0===u?ln(a)?"":void 0:u,s=e.networkNumber,l=void 0===s?b(a)+1:s;return{network:{networkGateway:c,networkMinIp:t,networkNumber:l,networkSubnetMask:o,networkType:a},networkId:(0,_e.Z)()}}),[b]),w=(0,a.useCallback)((function(e,n){return f((0,Ke.ZP)(e,n))}),[f]),k=(0,a.useCallback)((function(e,n){var r=e.networkId,o=e.networkType,i=n.target.value,a=String(i),u=!1,c=0,s=t.reduce((function(e,n){var t=tn(n,2),i=t[0],s=t[1],l=s.networkNumber,d=s.networkType;i===r&&(u=!0,d=a,v(RegExp(i)));var f=d===a;return f&&(c+=1),u?(f?l=c:d===o&&(l-=1),e[i]=nn({},s,{networkNumber:l,networkType:d})):e[i]=s,e}),{});f(s)}),[t,v,f]),O=(0,a.useCallback)((function(e){var n=e.networkId,r=e.networkType,o=!1,i=0,a=t.reduce((function(e,t){var a=tn(t,2),u=a[0],c=a[1];u===n?o=!0:(c.networkType===r&&(i+=1),e[u]=o?nn({},c,{networkNumber:i}):c);return e}),{});f(a)}),[t,f]),I=(0,a.useMemo)((function(){var e={};return e=t.reduce((function(e,t){var o=tn(t,2),i=o[0],a=o[1],u=a.networkGateway,c=a.networkMinIp,s=a.networkNumber,l=a.networkSubnetMask,d=a.networkType,f="".concat(on,"-").concat(i),p=1===s,m=ln(d),h="mn"===d||!p;return e[f]={children:(0,r.jsx)(Je,{formUtils:n,networkId:i,networkNumber:s,networkType:d,networkTypeOptions:y,onClose:O,onNetworkTypeChange:k,previous:{gateway:u,minIp:c,subnetMask:l},readonlyNetworkName:!h,showCloseButton:h,showGateway:m}),md:3,sm:2},e}),e)}),[n,t,y,O,k]);return(0,r.jsx)(l.Z,{columns:{xs:1,sm:2,md:3},layout:nn({},I,{"an-network-config-cell-add-network":{children:(0,r.jsx)(Ve.Z,{mapPreset:"add",onClick:function(){var e=g(),n=e.network,t=e.networkId;w(t,n)}}),display:"flex",justifyContent:"center",md:3,sm:2},"an-network-config-input-cell-dns":{children:(0,r.jsx)(j.Z,{input:(0,r.jsx)(x.Z,{id:an,label:"DNS",value:c}),inputTestBatch:(0,T.dg)("DNS",(function(){h(an)}),{onFinishBatch:p(an)},(function(e){h(an,{children:e})})),onFirstRender:m(an),required:!0})},"an-network-config-input-cell-ntp":{children:(0,r.jsx)(j.Z,{input:(0,r.jsx)(x.Z,{id:cn,label:"NTP",value:d}),inputTestBatch:(0,T.dg)("NTP",(function(){h(cn)}),{onFinishBatch:p(cn)},(function(e){h(cn,{children:e})})),onFirstRender:m(cn)})},"an-network-config-input-cell-mtu":{children:(0,r.jsx)(j.Z,{input:(0,r.jsx)(x.Z,{id:un,inputProps:{placeholder:"1500"},label:"MTU",value:s}),inputTestBatch:(0,T.qY)("MTU",(function(){h(un)}),{onFinishBatch:p(un)},(function(e){h(un,{children:e})})),onFirstRender:m(un),valueType:"number"})}}),spacing:"1em"})};function fn(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var pn={bcn1:{networkMinIp:"10.201.0.0",networkNumber:1,networkSubnetMask:"255.255.0.0",networkType:"bcn"},sn1:{networkMinIp:"10.101.0.0",networkNumber:1,networkSubnetMask:"255.255.0.0",networkType:"sn"},ifn1:{networkMinIp:"",networkNumber:1,networkSubnetMask:"",networkType:"ifn"}},mn=function(e){var n=e.formUtils,t=e.knownFences,o=e.knownUpses,i=e.previous,u=void 0===i?{}:i,c=u.hostConfig,s=u.networkConfig,l=void 0===s?{}:s,d=fn(e.previous,["hostConfig","networkConfig"]),f=l.networks,p=void 0===f?pn:f,m=(0,a.useState)(p),h=m[0],v=m[1],b=(0,a.useMemo)((function(){return Object.entries(h)}),[h]);return(0,r.jsxs)(g.Z,{children:[(0,r.jsx)(Le,{formUtils:n,previous:d}),(0,r.jsx)(dn,{formUtils:n,networkListEntries:b,previous:l,setNetworkList:v}),(0,r.jsx)(Ce,{formUtils:n,knownFences:t,knownUpses:o,networkListEntries:b,previous:c})]})},hn=function(e){var n=e.formUtils,t=e.knownFences,o=e.knownUpses,i=e.previous;return(0,r.jsx)(mn,{formUtils:n,knownFences:t,knownUpses:o,previous:i})};function vn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t1?n-1:0),r=1;re.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t1?n-1:0),r=1;re.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function xt(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}}(e,n)||function(e,n){if(!e)return;if("string"===typeof e)return bt(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return bt(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var wt=function(e){var n=e.formControlProps,t=e.formControlLabelProps,o=e.formLabelProps,i=e.id,u=e.label,c=e.onChange,s=e.radioItems,l=e.radioProps,d=(void 0===l?{}:l).sx,f=e.radioGroupProps,p=jt(e.radioProps,["sx"]),m=(0,a.useMemo)((function(){return"string"===typeof u?(0,r.jsx)(Z.Ac,{children:u}):u}),[u]),h=(0,a.useMemo)((function(){return Object.entries(s).map((function(e){var n=xt(e,2),o=n[0],a=n[1],u=a.label,c=a.value,s="string"===typeof u?(0,r.jsx)(Z.Ac,{children:u}):u;return(0,r.jsx)(O.Z,gt({control:(0,r.jsx)(ft.Z,gt({},p,{sx:gt(yt({},"&.".concat(pt.Z.root),{color:P.s7}),d)})),value:c,label:s},t),"".concat(i,"-").concat(o))}))}),[t,i,s,d,p]);return(0,r.jsxs)(mt.Z,gt({},n,{children:[(0,r.jsx)(ht.Z,gt({},o,{children:m})),(0,r.jsx)(vt.Z,gt({onChange:c,row:!0},f,{children:h}))]}))},kt=t(3144);function Ot(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function Vt(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}}(e,n)||Gt(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $t(e){return function(e){if(Array.isArray(e))return qt(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Gt(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gt(e,n){if(e){if("string"===typeof e)return qt(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?qt(e,n):void 0}}var zt="prepare-network-host-name-input",Wt="prepare-network-netconf-input-group",Qt="Host name",Yt=function(e){for(var n=e.netconf,t=arguments.length,r=new Array(t>1?t-1:0),o=1;o=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var rr=function(e){var n=e.label,t=tr(e,["label"]),o=(0,a.useMemo)((function(){return"string"===typeof n?(0,r.jsx)(Z.Ac,{inheritColour:!0,children:n}):n}),[n]);return(0,r.jsx)(Xt.Z,function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function fr(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,u=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==t.return||t.return()}finally{if(u)throw o}}return i}}(e,n)||function(e,n){if(!e)return;if("string"===typeof e)return sr(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return sr(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var pr="1.8em",mr=function(e){var n,t,o=e.orientation,i=e.variant,u=void 0===i?"fullWidth":i,c=dr(e,["orientation","variant"]),s=(0,ir.Z)(),l=(0,a.useCallback)((function(e){return s.breakpoints.up(e)}),[s]),d=(0,ar.Z)(l("xs")),f=(0,ar.Z)(l("sm")),p=(0,ar.Z)(l("md")),m=(0,ar.Z)(l("lg")),h=(0,ar.Z)(l("xl")),v=(0,a.useMemo)((function(){return[["xs",d],["sm",f],["md",p],["lg",m],["xl",h]]}),[m,p,f,h,d]),b=(0,a.useMemo)((function(){var e;return"object"===typeof o?v.some((function(n){var t=fr(n,2),r=t[0],i=t[1];return i&&o[r]&&(e=o[r]),!i})):e=o,e}),[v,o]);return(0,r.jsx)(ur.Z,function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);tAnvil
\ No newline at end of file +Anvil
\ No newline at end of file diff --git a/striker-ui/out/config.html b/striker-ui/out/config.html index fc15f920..5ebbc287 100644 --- a/striker-ui/out/config.html +++ b/striker-ui/out/config.html @@ -1 +1 @@ -Loading...
Install target
Configure striker peers
Configure striker peers
Inbound connections

    No inbound connections found.
Peer connections

    No peer connections found.
Manage changed SSH keys
Manage changed SSH keys
The identity of the following targets have unexpectedly changed.
If you haven't rebuilt the listed targets, then you could be experiencing a
"Man In The Middle"
attack. Please verify the targets have changed for a known reason before proceeding to remove the broken keys.

Host name

IP address


    No conflicting keys found.
Manage users
Manage users

    No users found.
\ No newline at end of file +Loading...
Install target
Configure striker peers
Configure striker peers
Inbound connections

    No inbound connections found.
Peer connections

    No peer connections found.
Manage changed SSH keys
Manage changed SSH keys
The identity of the following targets have unexpectedly changed.
If you haven't rebuilt the listed targets, then you could be experiencing a
"Man In The Middle"
attack. Please verify the targets have changed for a known reason before proceeding to remove the broken keys.

Host name

IP address


    No conflicting keys found.
Manage users
Manage users

    No users found.
\ No newline at end of file diff --git a/striker-ui/out/file-manager.html b/striker-ui/out/file-manager.html index 8add65b1..b7aa582a 100644 --- a/striker-ui/out/file-manager.html +++ b/striker-ui/out/file-manager.html @@ -1 +1 @@ -File Manager

Files

\ No newline at end of file +File Manager

Files

\ No newline at end of file diff --git a/striker-ui/out/index.html b/striker-ui/out/index.html index 08111867..12c965b1 100644 --- a/striker-ui/out/index.html +++ b/striker-ui/out/index.html @@ -1 +1 @@ -Dashboard

Nodes

\ No newline at end of file +Dashboard

Nodes

\ No newline at end of file diff --git a/striker-ui/out/init.html b/striker-ui/out/init.html index de8395c4..f6d5ada6 100644 --- a/striker-ui/out/init.html +++ b/striker-ui/out/init.html @@ -1 +1 @@ -

Loading...

Placeholder
Uncheck to skip domain and host name pattern validation.
\ No newline at end of file +

Loading...

Placeholder
Uncheck to skip domain and host name pattern validation.
\ No newline at end of file diff --git a/striker-ui/out/login.html b/striker-ui/out/login.html index 5871dfb3..80aed6f7 100644 --- a/striker-ui/out/login.html +++ b/striker-ui/out/login.html @@ -1 +1 @@ -Login
Placeholder
\ No newline at end of file +Login
Placeholder
\ No newline at end of file diff --git a/striker-ui/out/manage-element.html b/striker-ui/out/manage-element.html index 78955fc3..fc6ea159 100644 --- a/striker-ui/out/manage-element.html +++ b/striker-ui/out/manage-element.html @@ -1 +1 @@ -Loading
\ No newline at end of file +Loading
\ No newline at end of file diff --git a/striker-ui/out/server.html b/striker-ui/out/server.html index 8d98e8e8..1501bb5a 100644 --- a/striker-ui/out/server.html +++ b/striker-ui/out/server.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file