From 65f7b020e3674629b3edd686eea09a2bf5129a43 Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Mon, 27 Nov 2023 17:07:16 -0500 Subject: [PATCH] build(striker-ui): rebuild --- .../out/_next/static/Qp2JU8cXYp9Orw8l0IAb0/_buildManifest.js | 1 + .../_middlewareManifest.js | 0 .../_ssgManifest.js | 0 .../out/_next/static/XrSz84FzD2mYzU_3k8aL2/_buildManifest.js | 1 - striker-ui/out/_next/static/chunks/248-749f2bec4cb43d28.js | 1 - .../chunks/{336-6e600f08d9387d72.js => 336-24770f9b2621610a.js} | 2 +- striker-ui/out/_next/static/chunks/48-d4400834d0a31c6e.js | 1 + striker-ui/out/_next/static/chunks/825-07aab1f379d63d3c.js | 1 - striker-ui/out/_next/static/chunks/86-447b52c8195dea3d.js | 1 - striker-ui/out/_next/static/chunks/86-afca85346d822222.js | 1 + striker-ui/out/_next/static/chunks/898-e0785f5528d640fa.js | 1 + .../{_app-7a436d09afd002b7.js => _app-adb26b7c14183a1f.js} | 2 +- .../{anvil-53b02ffa883f4c5a.js => anvil-4cce8c1450ca6ceb.js} | 2 +- .../{config-7be24d332b231569.js => config-f22ac92929f0daf0.js} | 2 +- ...ger-6501dafd856c22ec.js => file-manager-53de9163caaf5a86.js} | 2 +- .../{index-0771f2825962ebc3.js => index-e791ea908d3ba943.js} | 2 +- .../{init-7cf62951388d0e3b.js => init-ce942046cf0bafb2.js} | 2 +- .../{login-0b2f91a926538f7c.js => login-6f7a93d56a339079.js} | 2 +- ...t-3ed34f8c3a72590a.js => manage-element-8a411e7d32491cf4.js} | 2 +- .../out/_next/static/chunks/pages/server-8faafa80170f67f2.js | 1 + .../out/_next/static/chunks/pages/server-d4d91dcbacc827c4.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 +- 29 files changed, 22 insertions(+), 22 deletions(-) create mode 100644 striker-ui/out/_next/static/Qp2JU8cXYp9Orw8l0IAb0/_buildManifest.js rename striker-ui/out/_next/static/{XrSz84FzD2mYzU_3k8aL2 => Qp2JU8cXYp9Orw8l0IAb0}/_middlewareManifest.js (100%) rename striker-ui/out/_next/static/{XrSz84FzD2mYzU_3k8aL2 => Qp2JU8cXYp9Orw8l0IAb0}/_ssgManifest.js (100%) delete mode 100644 striker-ui/out/_next/static/XrSz84FzD2mYzU_3k8aL2/_buildManifest.js delete mode 100644 striker-ui/out/_next/static/chunks/248-749f2bec4cb43d28.js rename striker-ui/out/_next/static/chunks/{336-6e600f08d9387d72.js => 336-24770f9b2621610a.js} (59%) create mode 100644 striker-ui/out/_next/static/chunks/48-d4400834d0a31c6e.js delete mode 100644 striker-ui/out/_next/static/chunks/825-07aab1f379d63d3c.js delete mode 100644 striker-ui/out/_next/static/chunks/86-447b52c8195dea3d.js create mode 100644 striker-ui/out/_next/static/chunks/86-afca85346d822222.js create mode 100644 striker-ui/out/_next/static/chunks/898-e0785f5528d640fa.js rename striker-ui/out/_next/static/chunks/pages/{_app-7a436d09afd002b7.js => _app-adb26b7c14183a1f.js} (70%) rename striker-ui/out/_next/static/chunks/pages/{anvil-53b02ffa883f4c5a.js => anvil-4cce8c1450ca6ceb.js} (99%) rename striker-ui/out/_next/static/chunks/pages/{config-7be24d332b231569.js => config-f22ac92929f0daf0.js} (99%) rename striker-ui/out/_next/static/chunks/pages/{file-manager-6501dafd856c22ec.js => file-manager-53de9163caaf5a86.js} (99%) rename striker-ui/out/_next/static/chunks/pages/{index-0771f2825962ebc3.js => index-e791ea908d3ba943.js} (98%) rename striker-ui/out/_next/static/chunks/pages/{init-7cf62951388d0e3b.js => init-ce942046cf0bafb2.js} (76%) rename striker-ui/out/_next/static/chunks/pages/{login-0b2f91a926538f7c.js => login-6f7a93d56a339079.js} (98%) rename striker-ui/out/_next/static/chunks/pages/{manage-element-3ed34f8c3a72590a.js => manage-element-8a411e7d32491cf4.js} (79%) create mode 100644 striker-ui/out/_next/static/chunks/pages/server-8faafa80170f67f2.js delete mode 100644 striker-ui/out/_next/static/chunks/pages/server-d4d91dcbacc827c4.js diff --git a/striker-ui/out/_next/static/Qp2JU8cXYp9Orw8l0IAb0/_buildManifest.js b/striker-ui/out/_next/static/Qp2JU8cXYp9Orw8l0IAb0/_buildManifest.js new file mode 100644 index 00000000..76e0bf67 --- /dev/null +++ b/striker-ui/out/_next/static/Qp2JU8cXYp9Orw8l0IAb0/_buildManifest.js @@ -0,0 +1 @@ +self.__BUILD_MANIFEST=function(s,c,a,e,t,n,i,f,b,d,u,k,h,j,r,g,l,_){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[s,a,e,f,b,h,"static/chunks/433-a3be905e7a7d3bfc.js",c,t,n,i,j,r,"static/chunks/pages/index-e791ea908d3ba943.js"],"/_error":["static/chunks/pages/_error-2280fa386d040b66.js"],"/anvil":[s,a,e,f,b,h,c,t,n,i,j,"static/chunks/pages/anvil-4cce8c1450ca6ceb.js"],"/config":[s,a,e,u,"static/chunks/519-4b7761e884c88eb9.js",c,t,n,i,d,k,g,"static/chunks/pages/config-f22ac92929f0daf0.js"],"/file-manager":["static/chunks/29107295-fbcfe2172188e46f.js",s,a,e,f,"static/chunks/176-7308c25ba374961e.js",c,t,i,d,"static/chunks/pages/file-manager-53de9163caaf5a86.js"],"/init":[s,a,f,b,u,l,c,t,n,i,_,"static/chunks/pages/init-ce942046cf0bafb2.js"],"/login":[s,a,e,c,t,n,d,k,"static/chunks/pages/login-6f7a93d56a339079.js"],"/manage-element":[s,a,e,f,b,u,l,"static/chunks/111-2605129c170ed35d.js",c,t,n,i,d,k,_,g,"static/chunks/pages/manage-element-8a411e7d32491cf4.js"],"/server":[s,e,"static/chunks/528-72edc50189f30fa9.js",c,r,"static/chunks/pages/server-8faafa80170f67f2.js"],sortedPages:["/","/_app","/_error","/anvil","/config","/file-manager","/init","/login","/manage-element","/server"]}}("static/chunks/412-ae4bab5809f6a209.js","static/chunks/62-2c80eba24b792af8.js","static/chunks/438-0147a63d98e89439.js","static/chunks/894-e57948de523bcf96.js","static/chunks/195-fa06e61dd4339031.js","static/chunks/987-1ff0d82724b0e58b.js","static/chunks/157-d1418743accab385.js","static/chunks/182-08683bbe95fbb010.js","static/chunks/900-af716a39aed22219.js","static/chunks/48-d4400834d0a31c6e.js","static/chunks/644-c7c6e21c71345aed.js","static/chunks/336-24770f9b2621610a.js","static/chunks/485-77798bccc4308d0e.js","static/chunks/898-e0785f5528d640fa.js","static/chunks/94-8322ed453a3c08f0.js","static/chunks/560-0ed707609765e23a.js","static/chunks/676-6159ce853338cc1f.js","static/chunks/86-afca85346d822222.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/striker-ui/out/_next/static/XrSz84FzD2mYzU_3k8aL2/_middlewareManifest.js b/striker-ui/out/_next/static/Qp2JU8cXYp9Orw8l0IAb0/_middlewareManifest.js similarity index 100% rename from striker-ui/out/_next/static/XrSz84FzD2mYzU_3k8aL2/_middlewareManifest.js rename to striker-ui/out/_next/static/Qp2JU8cXYp9Orw8l0IAb0/_middlewareManifest.js diff --git a/striker-ui/out/_next/static/XrSz84FzD2mYzU_3k8aL2/_ssgManifest.js b/striker-ui/out/_next/static/Qp2JU8cXYp9Orw8l0IAb0/_ssgManifest.js similarity index 100% rename from striker-ui/out/_next/static/XrSz84FzD2mYzU_3k8aL2/_ssgManifest.js rename to striker-ui/out/_next/static/Qp2JU8cXYp9Orw8l0IAb0/_ssgManifest.js diff --git a/striker-ui/out/_next/static/XrSz84FzD2mYzU_3k8aL2/_buildManifest.js b/striker-ui/out/_next/static/XrSz84FzD2mYzU_3k8aL2/_buildManifest.js deleted file mode 100644 index 96e3f938..00000000 --- a/striker-ui/out/_next/static/XrSz84FzD2mYzU_3k8aL2/_buildManifest.js +++ /dev/null @@ -1 +0,0 @@ -self.__BUILD_MANIFEST=function(s,a,c,e,t,n,i,f,b,u,k,h,j,d,r,g,l,_){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[s,c,e,f,b,j,"static/chunks/433-a3be905e7a7d3bfc.js",a,t,n,i,d,r,"static/chunks/pages/index-0771f2825962ebc3.js"],"/_error":["static/chunks/pages/_error-2280fa386d040b66.js"],"/anvil":[s,c,e,f,b,j,a,t,n,i,d,"static/chunks/pages/anvil-53b02ffa883f4c5a.js"],"/config":[s,c,e,k,"static/chunks/519-4b7761e884c88eb9.js",a,t,n,i,u,h,g,"static/chunks/pages/config-7be24d332b231569.js"],"/file-manager":["static/chunks/29107295-fbcfe2172188e46f.js",s,c,e,f,"static/chunks/176-7308c25ba374961e.js",a,t,i,u,"static/chunks/pages/file-manager-6501dafd856c22ec.js"],"/init":[s,c,f,b,k,l,a,t,n,i,_,"static/chunks/pages/init-7cf62951388d0e3b.js"],"/login":[s,c,e,a,t,n,u,h,"static/chunks/pages/login-0b2f91a926538f7c.js"],"/manage-element":[s,c,e,f,b,k,l,"static/chunks/111-2605129c170ed35d.js",a,t,n,i,u,h,_,g,"static/chunks/pages/manage-element-3ed34f8c3a72590a.js"],"/server":[s,e,"static/chunks/528-72edc50189f30fa9.js",a,r,"static/chunks/pages/server-d4d91dcbacc827c4.js"],sortedPages:["/","/_app","/_error","/anvil","/config","/file-manager","/init","/login","/manage-element","/server"]}}("static/chunks/412-ae4bab5809f6a209.js","static/chunks/62-2c80eba24b792af8.js","static/chunks/438-0147a63d98e89439.js","static/chunks/894-e57948de523bcf96.js","static/chunks/195-fa06e61dd4339031.js","static/chunks/987-1ff0d82724b0e58b.js","static/chunks/157-d1418743accab385.js","static/chunks/182-08683bbe95fbb010.js","static/chunks/900-af716a39aed22219.js","static/chunks/248-749f2bec4cb43d28.js","static/chunks/644-c7c6e21c71345aed.js","static/chunks/336-6e600f08d9387d72.js","static/chunks/485-77798bccc4308d0e.js","static/chunks/825-07aab1f379d63d3c.js","static/chunks/94-8322ed453a3c08f0.js","static/chunks/560-0ed707609765e23a.js","static/chunks/676-6159ce853338cc1f.js","static/chunks/86-447b52c8195dea3d.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/248-749f2bec4cb43d28.js b/striker-ui/out/_next/static/chunks/248-749f2bec4cb43d28.js deleted file mode 100644 index 66e7463b..00000000 --- a/striker-ui/out/_next/static/chunks/248-749f2bec4cb43d28.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[248],{5521:function(n,e,t){t.d(e,{Z:function(){return W}});var r=t(5893),o=t(1113),i=t(1496),c=t(2293),a=t(7357),u=t(2992),l=t(4799),s=t(7294),f=t(7169),d=t(4433),p=t(9029),g=t(7533),m=t(8462),y=t(7212),v=t(8619),b=[{text:"Anvil",image:"/pngs/anvil_icon_on.png",uri:"/manage-element"},{text:"Files",image:"/pngs/files_on.png",uri:"/file-manager"},{text:"Configure",image:"/pngs/configure_icon_on.png",uri:"/config"},{text:"Help",image:"/pngs/help_icon_on.png",uri:"https://alteeve.com/w/Support"}],h={width:"40em",height:"40em"},j=t(4390),x=t(582),w=t(4690),O=t(1770),S=t(7750),Z=t(1081);function P(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t1&&void 0!==arguments[1]?arguments[1]:"suiapi.";return t["".concat(e).concat(n)]}),[t]),i=(0,s.useCallback)((function(){return o("user")}),[o]);return(0,s.useEffect)((function(){if(n){var e=document.cookie.split(/\s*;\s*/);r(e.reduce((function(n,e){var t,r=k(e.split("=",2),2),o=r[0],i=r[1],c=decodeURIComponent(i);if(c.startsWith("j:"))try{t=JSON.parse(c.substring(2))}catch(a){t=i}else t=i;return n[o]=t,n}),{}))}}),[n]),{cookieJar:t,getCookie:o,getSessionUser:i}};function C(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function I(n){for(var e=1;e0)},ref:e})]})}},7869:function(n,e,t){var r=t(5893),o=t(7294),i=t(8187);function c(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t=0||(o[t]=n[t]);return o}(n,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(o[t]=n[t])}return o}function l(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,o,i=[],c=!0,a=!1;try{for(t=t.call(n);!(c=(r=t.next()).done)&&(i.push(r.value),!e||i.length!==e);c=!0);}catch(u){a=!0,o=u}finally{try{c||null==t.return||t.return()}finally{if(a)throw o}}return i}}(n,e)||function(n,e){if(!n)return;if("string"===typeof n)return c(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 c(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.")}()}function s(n){var e=function(n,e){if("object"!==f(n)||null===n)return n;var t=n[Symbol.toPrimitive];if(void 0!==t){var r=t.call(n,e||"default");if("object"!==f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(n)}(n,"string");return"symbol"===f(e)?e:String(e)}var f=function(n){return n&&"undefined"!==typeof Symbol&&n.constructor===Symbol?"symbol":typeof n};var d={count:0,defaultMessageType:"info",messages:void 0,onSet:void 0,usePlaceholder:!0},p=(0,o.forwardRef)((function(n,e){var t=n.count,c=void 0===t?d.count:t,f=n.defaultMessageType,p=void 0===f?d.defaultMessageType:f,g=n.messages,m=n.onSet,y=n.usePlaceholder,v=void 0===y?d.usePlaceholder:y,b=(0,o.useState)({}),h=b[0],j=b[1],x=(0,o.useMemo)((function(){return function(n){for(var e=1;e0,t=e?c:n.length,o=[];if(n.every((function(n){var e=l(n,2),c=e[0],a=e[1],u=a.children,s=a.type,f=void 0===s?p:s;return o.push((0,r.jsx)(i.Z,{type:f,children:u},"message-".concat(c))),o.lengthn.length)&&(e=n.length);for(var t=0,r=new Array(e);t=0||(o[t]=n[t]);return o}(n,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(o[t]=n[t])}return o}function a(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,o,i=[],c=!0,a=!1;try{for(t=t.call(n);!(c=(r=t.next()).done)&&(i.push(r.value),!e||i.length!==e);c=!0);}catch(u){a=!0,o=u}finally{try{c||null==t.return||t.return()}finally{if(a)throw o}}return i}}(n,e)||function(n,e){if(!n)return;if("string"===typeof n)return r(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 r(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.")}()}function u(n){var e=function(n,e){if("object"!==l(n)||null===n)return n;var t=n[Symbol.toPrimitive];if(void 0!==t){var r=t.call(n,e||"default");if("object"!==l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(n)}(n,"string");return"symbol"===l(e)?e:String(e)}t.d(e,{Um:function(){return d}});var l=function(n){return n&&"undefined"!==typeof Symbol&&n.constructor===Symbol?"symbol":typeof n};var s=function(){for(var n=arguments.length,e=new Array(n),t=0;t2&&void 0!==arguments[2]?arguments[2]:{},r=t.guard,o=void 0===r?function(){return!0}:r,a=t.set,l=void 0===a?s:a;return function(t){t[n];var r=i({},c(t,[n].map(u)));return o(t,n,e)&&l(t,r,n,e),r}},d=function(n,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.set,o=void 0===r?s:r;return function(t){var r={};return Object.keys(t).forEach((function(i){var c=i;n.test(i)?o(t,r,c,e):r[c]=t[c]})),r}};e.ZP=f},3675:function(n,e){var t={boolean:function(n){return Boolean(n)},number:function(n){return parseInt(String(n),10)||0},string:function(n){return String(n)}};e.Z=t}}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/336-6e600f08d9387d72.js b/striker-ui/out/_next/static/chunks/336-24770f9b2621610a.js similarity index 59% rename from striker-ui/out/_next/static/chunks/336-6e600f08d9387d72.js rename to striker-ui/out/_next/static/chunks/336-24770f9b2621610a.js index 094b32c9..32f5e372 100644 --- a/striker-ui/out/_next/static/chunks/336-6e600f08d9387d72.js +++ b/striker-ui/out/_next/static/chunks/336-24770f9b2621610a.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[336],{7504:function(n,e,t){var r=t(5893),u=t(7294),o=t(8263),l=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 o=Object.getOwnPropertySymbols(n);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(u[t]=n[t])}return u}function s(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,o=[],l=!0,i=!1;try{for(t=t.call(n);!(l=(r=t.next()).done)&&(o.push(r.value),!e||o.length!==e);l=!0);}catch(a){i=!0,u=a}finally{try{l||null==t.return||t.return()}finally{if(i)throw u}}return o}}(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=f(n,["calculateItemBreakpoints","layout","wrapperBoxProps"]),y=(0,u.useMemo)((function(){return Object.entries(i).map((function(n,e){var r=s(n,2),l=r[0],i=r[1],a=l;return i?(0,u.createElement)(o.ZP,c({},t(e,a),{key:a,item:!0},i)):void 0}))}),[t,i]);return(0,r.jsx)(l.Z,c({},a,{children:(0,r.jsx)(o.ZP,c({container:!0},v,{children:y}))}))}},4069:function(n,e,t){t.d(e,{Z:function(){return g}});var r=t(7294),u=t(3675),o=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=n.postSet,t=n.preSet,r=n.set,o=n.setType,l=void 0===o?"string":o,i=n.valueKey,a=void 0===i?"value":i;return function(n){var o=n.target[a],i=u.Z[l](o);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)}},l=t(7987);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 o=Object.getOwnPropertySymbols(n);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(u[t]=n[t])}return u}function s(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"!==y(n)||null===n)return n;var t=n[Symbol.toPrimitive];if(void 0!==t){var r=t.call(n,e||"default");if("object"!==y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(n)}(n,"string");return"symbol"===y(e)?e:String(e)}var y=function(n){return n&&"undefined"!==typeof Symbol&&n.constructor===Symbol?"symbol":typeof n};var p="input",d={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,y=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,I=C.postSet,A=C.valueKey,P=void 0===A?S:A,M=f(n.createInputOnChangeHandlerOptions,["postSet","valueKey"]),E=t.props,F=(0,r.useMemo)((function(){return null!==P&&void 0!==P?P:"checked"in E?"checked":"value"}),[E,P]),T=E.onBlur,x=E.onChange,B=E.onFocus,Z=E[F],R=void 0===Z?d[w]:Z,V=f(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,l.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,v=s(n,["calculateItemBreakpoints","layout","wrapperBoxProps"]),y=(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:y}))}))}},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(7987);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"!==y(n)||null===n)return n;var t=n[Symbol.toPrimitive];if(void 0!==t){var r=t.call(n,e||"default");if("object"!==y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(n)}(n,"string");return"symbol"===y(e)?e:String(e)}var y=function(n){return n&&"undefined"!==typeof Symbol&&n.constructor===Symbol?"symbol":typeof n};var d="input",p={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,y=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,I=C.postSet,A=C.valueKey,P=void 0===A?S:A,M=s(n.createInputOnChangeHandlerOptions,["postSet","valueKey"]),E=t.props,F=(0,r.useMemo)((function(){return null!==P&&void 0!==P?P:"checked"in E?"checked":"value"}),[E,P]),T=E.onBlur,x=E.onChange,B=E.onFocus,Z=E[F],R=void 0===Z?p[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({},d,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);t0)},ref:e})]})}},7869:function(n,e,t){var r=t(5893),o=t(7294),i=t(8187);function c(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t=0||(o[t]=n[t]);return o}(n,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(o[t]=n[t])}return o}function u(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,o,i=[],c=!0,a=!1;try{for(t=t.call(n);!(c=(r=t.next()).done)&&(i.push(r.value),!e||i.length!==e);c=!0);}catch(l){a=!0,o=l}finally{try{c||null==t.return||t.return()}finally{if(a)throw o}}return i}}(n,e)||function(n,e){if(!n)return;if("string"===typeof n)return c(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 c(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.")}()}function s(n){var e=function(n,e){if("object"!==f(n)||null===n)return n;var t=n[Symbol.toPrimitive];if(void 0!==t){var r=t.call(n,e||"default");if("object"!==f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(n)}(n,"string");return"symbol"===f(e)?e:String(e)}var f=function(n){return n&&"undefined"!==typeof Symbol&&n.constructor===Symbol?"symbol":typeof n};var d={count:0,defaultMessageType:"info",messages:void 0,onSet:void 0,usePlaceholder:!0},p=(0,o.forwardRef)((function(n,e){var t=n.count,c=void 0===t?d.count:t,f=n.defaultMessageType,p=void 0===f?d.defaultMessageType:f,g=n.messages,m=n.onSet,b=n.usePlaceholder,h=void 0===b?d.usePlaceholder:b,v=(0,o.useState)({}),y=v[0],j=v[1],x=(0,o.useMemo)((function(){return function(n){for(var e=1;e0,t=e?c:n.length,o=[];if(n.every((function(n){var e=u(n,2),c=e[0],a=e[1],l=a.children,s=a.type,f=void 0===s?p:s;return o.push((0,r.jsx)(i.Z,{type:f,children:l},"message-".concat(c))),o.lengthn.length)&&(e=n.length);for(var t=0,r=new Array(e);t=0||(o[t]=n[t]);return o}(n,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(o[t]=n[t])}return o}function a(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,o,i=[],c=!0,a=!1;try{for(t=t.call(n);!(c=(r=t.next()).done)&&(i.push(r.value),!e||i.length!==e);c=!0);}catch(l){a=!0,o=l}finally{try{c||null==t.return||t.return()}finally{if(a)throw o}}return i}}(n,e)||function(n,e){if(!n)return;if("string"===typeof n)return r(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 r(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.")}()}function l(n){var e=function(n,e){if("object"!==u(n)||null===n)return n;var t=n[Symbol.toPrimitive];if(void 0!==t){var r=t.call(n,e||"default");if("object"!==u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(n)}(n,"string");return"symbol"===u(e)?e:String(e)}t.d(e,{Um:function(){return d}});var u=function(n){return n&&"undefined"!==typeof Symbol&&n.constructor===Symbol?"symbol":typeof n};var s=function(){for(var n=arguments.length,e=new Array(n),t=0;t2&&void 0!==arguments[2]?arguments[2]:{},r=t.guard,o=void 0===r?function(){return!0}:r,a=t.set,u=void 0===a?s:a;return function(t){t[n];var r=i({},c(t,[n].map(l)));return o(t,n,e)&&u(t,r,n,e),r}},d=function(n,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.set,o=void 0===r?s:r;return function(t){var r={};return Object.keys(t).forEach((function(i){var c=i;n.test(i)?o(t,r,c,e):r[c]=t[c]})),r}};e.ZP=f},3675:function(n,e){var t={boolean:function(n){return Boolean(n)},number:function(n){return parseInt(String(n),10)||0},string:function(n){return String(n)}};e.Z=t}}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/825-07aab1f379d63d3c.js b/striker-ui/out/_next/static/chunks/825-07aab1f379d63d3c.js deleted file mode 100644 index f4b93bef..00000000 --- a/striker-ui/out/_next/static/chunks/825-07aab1f379d63d3c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[825],{4594:function(e,n,t){var r=t(5893),o=t(6514),i=t(5113),a=t(4656),s=t(482),l=t(2994),u=t(7357),c=t(9890),p=t(7169),d=t(1363),f=t(6284);function v(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function m(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 g=function(e){return(0,r.jsx)(o.Z,{in:!0,children:(0,r.jsx)(i.Z,m({},e))})};n.Z=function(e){var n=e.componentsProps,t=e.extendRenderInput,o=e.label,i=e.messageBoxProps,h=e.renderInput,b=e.sx,y=x(e,["componentsProps","extendRenderInput","label","messageBoxProps","renderInput","sx"]),j=m({paper:{sx:{backgroundColor:p.lD}}},n),S=null!==h&&void 0!==h?h:function(e){var n=e.fullWidth,i=e.InputProps,a=e.InputLabelProps,s=e.inputProps,l={formControlProps:{fullWidth:n,ref:i.ref},inputLabelProps:a,inputProps:{className:i.className,endAdornment:i.endAdornment,inputProps:s,startAdornment:i.startAdornment},label:o};return null===t||void 0===t||t.call(null,l,e),(0,r.jsx)(f.Z,m({},l))},U=m(v({},"& .".concat(a.Z.root," .").concat(s.Z.endAdornment),v({right:"7px"},"& .".concat(l.Z.root),{color:p.s7})),b);return(0,r.jsxs)(u.Z,{sx:{display:"flex",flexDirection:"column"},children:[(0,r.jsx)(c.Z,m({PaperComponent:g},y,{componentsProps:j,renderInput:S,sx:U})),(0,r.jsx)(d.Z,m({},i))]})}},5521:function(e,n,t){t.d(n,{Z:function(){return E}});var r=t(5893),o=t(1113),i=t(1496),a=t(2293),s=t(7357),l=t(2992),u=t(4799),c=t(7294),p=t(7169),d=t(4433),f=t(9029),v=t(7533),m=t(8462),x=t(7212),g=t(8619),h=[{text:"Anvil",image:"/pngs/anvil_icon_on.png",uri:"/manage-element"},{text:"Files",image:"/pngs/files_on.png",uri:"/file-manager"},{text:"Configure",image:"/pngs/configure_icon_on.png",uri:"/config"},{text:"Help",image:"/pngs/help_icon_on.png",uri:"https://alteeve.com/w/Support"}],b={width:"40em",height:"40em"},y=t(4390),j=t(582),S=t(4690),U=t(1770),I=t(7750),P=t(1081);function O(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t1&&void 0!==arguments[1]?arguments[1]:"suiapi.";return t["".concat(n).concat(e)]}),[t]),i=(0,c.useCallback)((function(){return o("user")}),[o]);return(0,c.useEffect)((function(){if(e){var n=document.cookie.split(/\s*;\s*/);r(n.reduce((function(e,n){var t,r=D(n.split("=",2),2),o=r[0],i=r[1],a=decodeURIComponent(i);if(a.startsWith("j:"))try{t=JSON.parse(a.substring(2))}catch(s){t=i}else t=i;return e[o]=t,e}),{}))}}),[e]),{cookieJar:t,getCookie:o,getSessionUser:i}};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 C(e){for(var n=1;n0)},ref:n})]})}},4427:function(e,n,t){var r=t(5893),o=t(2429),i=t(9309),a=t(7169);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 l(e){for(var n=1;n :first-child":{flexGrow:1},"& > :not(:last-child)":{marginRight:".5em"}},"&:hover\n .".concat(y.Z.root,"\n .").concat(j.Z.root,"\n .").concat(j.Z.notchedOutline),{borderColor:p.s7}),children:[(0,r.jsx)(b.Z,P({id:n,label:t},i)),(0,r.jsx)(U.Z,P({formControlProps:{fullWidth:!1},id:"".concat(n,"-nested-select"),selectItems:u},d))]}),(0,r.jsx)(S.Z,P({},l))]})};D.defaultProps=O;var Z=D,w=t(3679),C=t(3640),M=t(6727),k=t(1184),A=t(9),G=t(192),B=t(7750);function z(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(e){return function(e){if(Array.isArray(e))return z(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 z(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 z(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.")}()}var W={inputLabelProps:{},isAllowTextInput:!1,labelId:"",messageBoxProps:{},sliderProps:{}},R={root:"".concat("SliderInputLabelDecorator","-root")},V=function(e){var n=e.isFocused,t=e.label,o=p.s7,i="solid",s="0",l="0 .6em 0 .4em",u="1px 0 0 0",c="0.3";return n&&(s="-1px",l="0 1em 0 1em",u="2px 0 0 0",c="1"),(0,r.jsxs)(a.Z,{className:R.root,sx:{display:"flex",flexDirection:"row",position:"absolute",top:s,width:"calc(100% - 6px)","> :last-child":{flexGrow:1}},children:[(0,r.jsx)(a.Z,{sx:{borderColor:o,borderStyle:i,borderWidth:u,content:'""',opacity:c,width:".6em"}}),(0,r.jsx)(B.Ac,{sx:{fontSize:".75em",margin:l,visibility:"hidden"},text:t}),(0,r.jsx)(a.Z,{sx:{borderColor:o,borderStyle:i,borderWidth:u,content:'""',opacity:c}})]})},_=function(e,n){var t=Number.parseFloat(e);return Number.isNaN(t)?n:t},Q=function(e){return F(e,Array)?e.map((function(e){return String(e)})):[String(e)]},q=function(e){var n,t=e.messageBoxProps,i=void 0===t?W.messageBoxProps:t,s=e.isAllowTextInput,l=void 0===s?W.isAllowTextInput:s,u=e.label,c=e.labelId,d=void 0===c?W.labelId:c,f=e.inputLabelProps,v=void 0===f?W.inputLabelProps:f,m=e.sliderProps,x=void 0===m?W.sliderProps:m,g=e.value,h=x.max,b=x.min,y=x.onChange,U=x.sx,I=x.valueLabelDisplay,P=g,O=(0,o.useState)({range:Q(g)}),D=O[0],Z=O[1],w=(0,o.useState)(!1),B=w[0],z=w[1],q=function(){z(!1)},H=function(){z(!0)},J=function(){P=function(e,n){return F(n,Array)?e.map((function(e,t){return _(e,n[t])})):_(e[0],n)}(D.range,P),null===y||void 0===y||y.call(null,P)};return(0,r.jsxs)(C.Z,{sx:{display:"flex",flexDirection:"column","&:hover":(n={},T(n,"& .".concat(R.root," div"),{opacity:1}),T(n,"& .".concat(j.Z.notchedOutline),{borderColor:p.s7}),n)},children:[(0,r.jsx)(G.Z,N({className:B?M.Z.focused:"",id:d,shrink:!0},v,{children:u})),V({isFocused:B,label:u}),(0,r.jsxs)(a.Z,{sx:{alignItems:"center",display:"flex",flexDirection:"row","> :first-child":{flexGrow:1}},children:[(0,r.jsx)(k.ZP,{"aria-labelledby":d,max:h,min:b,onBlur:q,onChange:function(e,n){Z({range:Q(n)}),null===y||void 0===y||y.call(null,n)},onFocus:H,sx:N(T({color:p.s7,marginLeft:"1em",marginRight:"1em"},"& .".concat(k.TW.thumb),{borderRadius:p.n_,transform:"translate(-50%, -50%) rotate(45deg)"}),U),value:P,valueLabelDisplay:I}),D.range.map((function(e,n){return function(e){var n=e.key,t=e.isFocused,o=L(e,["key","isFocused"]);return(0,r.jsx)(A.Z,N({key:n,className:t?j.Z.focused:"",type:"number"},o))}({key:"slider-nested-text-input-".concat(n),inputProps:{max:h,min:b},isFocused:B,onBlur:q,onChange:function(){for(var e=arguments.length,t=new Array(e),r=0;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 oe(e,n){return $(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,s=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(l){s=!0,o=l}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}}(e,n)||se(e,n)||ne()}function ie(e){return $(e)||ee(e)||se(e,i)||ne()}function ae(e){return function(e){if(Array.isArray(e))return K(e)}(e)||ee(e)||se(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 se(e,n){if(e){if("string"===typeof e)return K(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)?K(e,n):void 0}}var le,ue,ce=BigInt(0),pe=[{value:"B"},{value:"KiB"},{value:"MiB"},{value:"GiB"},{value:"TiB"}],de="GiB",fe=BigInt(65536),ve=BigInt(104857600),me={backgroundColor:p.Ej,color:p.lD,"&:hover":{backgroundColor:p.Ej}},xe=function(e,n){var t=n.onButtonClick;return(0,r.jsx)(m.Z,{disabled:void 0===t,onClick:t,sx:{minWidth:"unset",whiteSpace:"nowrap"},children:"Max: ".concat(e)})},ge=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.endAdornment,t=e.mainLabel,o=e.subLabel;return(0,r.jsxs)(a.Z,{sx:{alignItems:"center",display:"flex",flexDirection:"row",width:"100%","& > :first-child":{flexGrow:1}},children:[(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column"},children:[t&&(0,r.jsx)(B.Ac,{inverted:!0,text:t}),o&&(0,r.jsx)(B.Ac,{inverted:!0,text:o})]}),n]})},he=function(e,n,t,r,o,i,a){var s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{},l=s.includeAnvilUUIDs,u=void 0===l?[]:l,c=s.includeFileUUIDs,p=void 0===c?[]:c,d=s.includeStorageGroupUUIDs,f=void 0===d?[]:d,v=function(){return!0},m=function(){return!0},x=function(){return!0};u.length>0&&(v=function(e){return u.includes(e)}),p.length>0&&(m=function(e){return p.includes(e)}),f.length>0&&(x=function(e){return f.includes(e)});var g={},h=i.reduce((function(e,n,t){var r,i=null!==(r=o[t])&&void 0!==r?r:ce;return e.all+=i,""===n||(void 0===e[n]&&(e[n]=ce),e[n]+=i),e}),{all:ce}),b=e.reduce((function(e,s){var l=s.anvilUUID;if(v(l)){var u,c=s.anvilTotalCPUCores,p=s.anvilTotalAvailableMemory,d=s.files,f=s.fileUUIDs,b=s.storageGroups,y=[],j=ce,S=ce;if(b.forEach((function(e){var n=e.storageGroupUUID,t=e.storageGroupFree;x(n)&&(y.push(n),S+=t,t>j&&(j=t))})),[function(){return b.length>0},function(){return t<=c},function(){return r<=p},function(){return i.every((function(e,t){var r,i=null!==(r=o[t])&&void 0!==r?r:ce,a=!0,s=i<=j;return""!==e&&(a=y.includes(e),s=i<=n[e].storageGroupFree),a&&s}))},function(){return Object.entries(h).every((function(e){var t=oe(e,2),r=t[0],o=t[1];return"all"===r?o<=S:o<=n[r].storageGroupFree}))},function(){return a.every((function(e){return""===e||f.includes(e)}))}].every((function(e){return e()})))e.anvils.push(s),e.anvilUUIDs.push(l),e.maxCPUCores=Math.max(c,e.maxCPUCores),p>e.maxMemory&&(e.maxMemory=p),d.forEach((function(e){var n=e.fileUUID;m(n)&&(g[n]=!0)})),(u=e.storageGroupUUIDs).push.apply(u,ae(y)),e.maxVirtualDiskSizes.fill(j)}return e}),{anvils:[],anvilUUIDs:[],fileUUIDs:[],maxCPUCores:0,maxMemory:ce,maxVirtualDiskSizes:i.map((function(){return ce})),storageGroupUUIDs:[]});return b.fileUUIDs=Object.keys(g),i.forEach((function(e,t){""!==e&&(b.maxVirtualDiskSizes[t]=n[e].storageGroupFree)})),b},be=function(e){return e.filter((function(e){return""!==e}))},ye=function(e){return{fromUnit:"B",onSuccess:{string:e},precision:0,toUnit:"ibyte"}};(0,x.Bh)(fe,ye((function(e,n){le="".concat(e," ").concat(n)}))),(0,x.Bh)(ve,ye((function(e,n){ue="".concat(e," ").concat(n)})));var je=function(e){var n=e.dialogProps.open,t=e.onClose,i=(0,o.useState)([]),y=i[0],j=i[1],S=(0,o.useState)({}),I=S[0],P=S[1],O=(0,o.useState)({}),D=O[0],C=O[1],M=(0,o.useState)({}),k=M[0],A=M[1],G=(0,o.useState)({}),z=G[0],T=G[1],F=(0,o.useState)([]),N=F[0],L=F[1],E=(0,o.useState)([]),W=E[0],R=E[1],V=(0,o.useState)([]),_=V[0],Q=V[1],q=(0,o.useState)([]),K=q[0],$=q[1],ee=(0,o.useState)(""),ne=ee[0],se=ee[1],ye=(0,o.useState)(),je=ye[0],Se=ye[1],Ue=(0,o.useState)(1),Ie=Ue[0],Pe=Ue[1],Oe=(0,o.useState)(0),De=Oe[0],Ze=Oe[1],we=(0,o.useState)(),Ce=we[0],Me=we[1],ke=(0,o.useState)(ce),Ae=ke[0],Ge=ke[1],Be=(0,o.useState)(ce),ze=Be[0],Te=Be[1],Fe=(0,o.useState)(),Ne=Fe[0],Le=Fe[1],Ee=(0,o.useState)("0"),We=Ee[0],Re=Ee[1],Ve=(0,o.useState)(""),_e=Ve[0],Qe=Ve[1],qe=(0,o.useState)(de),He=qe[0],Je=qe[1],Ye=(0,o.useState)(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.existingVirtualDisks,t=void 0===n?{stateIds:[],inputMaxes:[],inputSizeMessages:[],inputSizes:[],inputStorageGroupUUIDMessages:[],inputStorageGroupUUIDs:[],inputUnits:[],maxes:[],sizes:[]}:n,r=e.stateId,o=void 0===r?(0,c.Z)():r,i=e.inputMax,a=void 0===i?"0":i,s=e.inputSize,l=void 0===s?"":s,u=e.inputSizeMessage,p=void 0===u?void 0:u,d=e.inputStorageGroupUUID,f=void 0===d?"":d,v=e.inputStorageGroupUUIDMessage,m=void 0===v?void 0:v,x=e.inputUnit,g=void 0===x?de:x,h=e.max,b=void 0===h?ce:h,y=e.setVirtualDisks,j=e.size,S=void 0===j?ce:j,U=t.stateIds,I=t.inputMaxes,P=t.inputSizeMessages,O=t.inputSizes,D=t.inputStorageGroupUUIDMessages,Z=t.inputStorageGroupUUIDs,w=t.inputUnits,C=t.maxes,M=t.sizes;return U.push(o),I.push(a),P.push(p),O.push(l),D.push(m),Z.push(f),w.push(g),C.push(b),M.push(S),null===y||void 0===y||y.call(null,te({},t)),t}()),Ke=Ye[0],$e=Ye[1],Xe=(0,o.useState)(""),en=Xe[0],nn=Xe[1],tn=(0,o.useState)(),rn=tn[0],on=tn[1],an=(0,o.useState)(""),sn=an[0],ln=an[1],un=(0,o.useState)()[0],cn=(0,o.useState)(""),pn=cn[0],dn=cn[1],fn=(0,o.useState)(),vn=fn[0],mn=fn[1],xn=(0,o.useState)(null),gn=xn[0],hn=xn[1],bn=(0,o.useState)(),yn=bn[0],jn=bn[1],Sn=(0,o.useState)([]),Un=Sn[0],In=Sn[1],Pn=(0,o.useState)([]),On=Pn[0],Dn=Pn[1],Zn=(0,o.useState)([]),wn=Zn[0],Cn=Zn[1],Mn=(0,o.useState)(!1),kn=Mn[0],An=Mn[1],Gn=(0,o.useState)(!1),Bn=Gn[0],zn=Gn[1],Tn=(0,o.useState)(!1),Fn=Tn[0],Nn=Tn[1],Ln=(0,o.useState)(0),En=Ln[0],Wn=Ln[1],Rn={serverName:{defaults:{onSuccess:function(){Se(void 0)},value:ne},tests:[{onFailure:function(){Se({text:"The server name length must be 1 to 16 characters.",type:"warning"})},test:function(e){var n=e.value.length;return n>=1&&n<=16}},{onFailure:function(){Se({text:"The server name is expected to only contain alphanumeric, hyphen, or underscore characters.",type:"warning"})},test:function(e){var n=e.value;return/^[a-zA-Z0-9_-]+$/.test(n)}},{onFailure:function(){Se({text:"This server name already exists, please choose another name.",type:"warning"})},test:function(e){var n=e.value;return void 0===k[n]}}]},cpuCores:{defaults:{max:De,min:1,onSuccess:function(){Me(void 0)},value:Ie},tests:[{onFailure:function(){Me({text:"Non available.",type:"warning"})},test:Y.X7},{onFailure:function(e){var n=e.displayMax,t=e.displayMin;Me({text:"The number of CPU cores is expected to be between ".concat(t," and ").concat(n,"."),type:"warning"})},test:Y.SQ}]},memory:{defaults:{displayMax:"".concat(We," ").concat(He),displayMin:le,max:ze,min:fe,onSuccess:function(){Le(void 0)},value:Ae},tests:[{onFailure:function(){Le({text:"Non available.",type:"warning"})},test:Y.X7},{onFailure:function(e){var n=e.displayMax,t=e.displayMin;Le({text:"Memory is expected to be between ".concat(t," and ").concat(n,"."),type:"warning"})},test:Y.SQ}]},installISO:{defaults:{onSuccess:function(){on(void 0)},value:en},tests:[{test:Y.HJ}]},anvil:{defaults:{onSuccess:function(){mn(void 0)},value:pn},tests:[{test:Y.HJ}]},optimizeForOS:{defaults:{onSuccess:function(){jn(void 0)},value:null===gn||void 0===gn?void 0:gn.key},tests:[{test:Y.HJ}]}};Ke.inputSizeMessages.forEach((function(e,n){Rn["vd".concat(n,"Size")]={defaults:{displayMax:"".concat(Ke.inputMaxes[n]," ").concat(Ke.inputUnits[n]),displayMin:ue,max:Ke.maxes[n],min:ve,onSuccess:function(){Ke.inputSizeMessages[n]=void 0},value:Ke.sizes[n]},onFinishBatch:function(){$e(te({},Ke))},tests:[{onFailure:function(){Ke.inputSizeMessages[n]={text:"Non available.",type:"warning"}},test:Y.X7},{onFailure:function(e){var t=e.displayMax,r=e.displayMin;Ke.inputSizeMessages[n]={text:"Virtual disk ".concat(n," size is expected to be between ").concat(r," and ").concat(t,"."),type:"warning"}},test:Y.SQ}]},Rn["vd".concat(n,"StorageGroup")]={defaults:{onSuccess:function(){Ke.inputStorageGroupUUIDMessages[n]=void 0},value:Ke.inputStorageGroupUUIDs[n]},onFinishBatch:function(){$e(te({},Ke))},tests:[{test:Y.HJ}]}}));var Vn,_n,Qn,qn,Hn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.allAnvils,t=void 0===n?y:n,r=e.cpuCores,o=void 0===r?Ie:r,i=e.fileUUIDs,a=void 0===i?[en,sn]:i,s=e.includeAnvilUUIDs,l=void 0===s?be([pn]):s,u=e.includeFileUUIDs,c=e.includeStorageGroupUUIDs,p=e.inputMemoryUnit,d=void 0===p?He:p,f=e.memory,v=void 0===f?Ae:f,m=e.storageGroupUUIDMapToData,g=void 0===m?z:m,h=e.virtualDisks,b=void 0===h?Ke:h,j=he(t,g,o,v,b.sizes,b.inputStorageGroupUUIDs,a,{includeAnvilUUIDs:l,includeFileUUIDs:u,includeStorageGroupUUIDs:c}),S=j.anvilUUIDs,U=j.fileUUIDs,I=j.maxCPUCores,P=j.maxMemory,O=j.maxVirtualDiskSizes,D=j.storageGroupUUIDs;Ze(I),Te(P);var Z=[];b.maxes=O,b.maxes.forEach((function(e,n){(0,x.Bh)(e,{fromUnit:"B",onSuccess:{string:function(e,t){b.inputMaxes[n]=e,Z[n]="".concat(e," ").concat(t)}},toUnit:b.inputUnits[n]})})),$e(te({},b)),In(S),Dn(U),Cn(D);var w="";return(0,x.Bh)(P,{fromUnit:"B",onSuccess:{string:function(e,n){Re(e),w="".concat(e," ").concat(n)}},toUnit:d}),{formattedMaxMemory:w,formattedMaxVDSizes:Z,maxCPUCores:I,maxMemory:P,maxVirtualDiskSizes:O}},Jn=(0,o.useCallback)(Hn,[]),Yn=function(){for(var e=arguments.length,n=new Array(e),t=0;t0&&void 0!==arguments[0]?arguments[0]:{},n=e.cmValue,t=void 0===n?ce:n,r=e.cmUnit,o=void 0===r?He:r;Ge(t);var i=Hn({inputMemoryUnit:o,memory:t}),a=i.formattedMaxMemory,s=i.maxMemory;Yn({inputs:{memory:{displayMax:a,max:s,value:t}}})},$n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.value,t=void 0===n?_e:n,r=e.unit,o=void 0===r?He:r;t!==_e&&Qe(t),o!==He&&Je(o),(0,x.KY)(t,o,(function(e){return Kn({cmValue:e,cmUnit:o})}),(function(){return Kn({cmUnit:o})}))},Xn=function(e){nn(e),Hn({fileUUIDs:[e,sn]})},et=function(e){ln(e),Hn({fileUUIDs:[en,e]})},nt=function(e){var n=be([e]);dn(e),Hn({includeAnvilUUIDs:n})};return(0,o.useEffect)((function(){d.Z.get("/anvil",{params:{anvilUUIDs:"all",isForProvisionServer:!0}}).then((function(e){var n=e.data,t=function(e){var n={},t=e.reduce((function(e,t){var o=t.anvilUUID,i=t.anvilName,s=t.anvilTotalMemory,l=t.anvilTotalAllocatedMemory,u=t.anvilTotalAvailableMemory,c=t.hosts,p=t.servers,d=t.storageGroups,f=t.files,v=d.reduce((function(n,t){var a=te({},t,{anvilUUID:o,anvilName:i,storageGroupSize:BigInt(t.storageGroupSize),storageGroupFree:BigInt(t.storageGroupFree),humanizedStorageGroupFree:""});return(0,x.Bh)(t.storageGroupFree,{fromUnit:"B",onSuccess:{string:function(e,n){a.humanizedStorageGroupFree="".concat(e," ").concat(n)}},precision:0,toUnit:"ibyte"}),n.anvilStorageGroupUUIDs.push(t.storageGroupUUID),n.anvilStorageGroups.push(a),e.storageGroups.push(a),e.storageGroupSelectItems.push({displayValue:ge({endAdornment:(0,r.jsx)(B.Ac,{inverted:!0,text:"~".concat(a.humanizedStorageGroupFree," free")}),mainLabel:t.storageGroupName,subLabel:i}),value:t.storageGroupUUID}),e.storageGroupUUIDMapToData[t.storageGroupUUID]=a,n}),{anvilStorageGroups:[],anvilStorageGroupUUIDs:[]}),m=v.anvilStorageGroups,g=v.anvilStorageGroupUUIDs,h=[];f.forEach((function(e){var t=e.fileUUID;h.push(t),n[t]=e}));var b=te({},t,{anvilTotalMemory:BigInt(s),anvilTotalAllocatedMemory:BigInt(l),anvilTotalAvailableMemory:BigInt(u),humanizedAnvilTotalAvailableMemory:"",hosts:c.map((function(e){return te({},e,{hostMemory:BigInt(e.hostMemory)})})),servers:p.map((function(n){var t=n.serverMemory,r=n.serverName,o=te({},re(n,["serverMemory","serverName"]),{serverMemory:BigInt(t),serverName:r});return e.serverNameMapToData[r]=o,o})),storageGroupUUIDs:g,storageGroups:m,fileUUIDs:h});return(0,x.Bh)(u,{fromUnit:"B",onSuccess:{string:function(e,n){b.humanizedAnvilTotalAvailableMemory="".concat(e," ").concat(n)}},precision:0,toUnit:"ibyte"}),e.anvils.push(b),e.anvilSelectItems.push({displayValue:ge({endAdornment:(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",width:"8rem"},children:[(0,r.jsx)(B.Ac,{inverted:!0,text:"CPU: ".concat(b.anvilTotalCPUCores," cores")}),(0,r.jsx)(B.Ac,{inverted:!0,text:"Memory: ~".concat(b.humanizedAnvilTotalAvailableMemory)})]}),mainLabel:b.anvilName,subLabel:b.anvilDescription}),value:o}),e.anvilUUIDMapToData[o]=b,e}),{anvils:[],anvilSelectItems:[],anvilUUIDMapToData:{},files:[],fileSelectItems:[],fileUUIDMapToData:{},serverNameMapToData:{},storageGroups:[],storageGroupSelectItems:[],storageGroupUUIDMapToData:{}});return Object.values(n).forEach((function(e){t.files.push(e),t.fileSelectItems.push({displayValue:e.fileName,value:e.fileUUID}),t.fileUUIDMapToData[e.fileUUID]=e})),t}(n.anvils),o=t.anvils,i=t.anvilSelectItems,s=t.anvilUUIDMapToData,l=t.fileSelectItems,u=t.fileUUIDMapToData,c=t.serverNameMapToData,p=t.storageGroupSelectItems,d=t.storageGroupUUIDMapToData;j(o),P(s),C(u),A(c),T(d),L(i),R(l),$(p),Jn({allAnvils:o,storageGroupUUIDMapToData:d}),Q(Object.entries(n.oses).map((function(e){var n=oe(e,2);return{key:n[0],label:n[1]}}))),An(!0)}))}),[Jn]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(l.Z,{fullWidth:!0,maxWidth:"sm",open:n,PaperComponent:w.s_,PaperProps:{sx:{overflow:"visible"}},children:[(0,r.jsxs)(w.V9,{children:[(0,r.jsx)(B.z,{text:"Provision a Server"}),(0,r.jsx)(g.Z,{onClick:t,sx:{backgroundColor:p.hM,color:p.lD,"&:hover":{backgroundColor:p.hM}},children:(0,r.jsx)(u.Z,{})})]}),kn?(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",maxHeight:"50vh",overflowY:"scroll",paddingTop:".6em","& > :not(:first-child)":{marginTop:"1em"}},children:[(0,r.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column"},children:(0,r.jsx)(b.Z,{id:"ps-server-name",label:"Server name",inputProps:{onChange:function(e){var n=e.target.value;se(n),Yn({inputs:{serverName:{value:n}}})},value:ne},inputLabelProps:{isNotifyRequired:0===ne.length},messageBoxProps:je})}),(Vn="ps-cpu-cores",_n="CPU cores",Qn=Ie,qn={messageBoxProps:Ce,sliderProps:{onChange:function(e){var n=e;if(n!==Ie){Pe(n);var t=Hn({cpuCores:n}).maxCPUCores;Yn({inputs:{cpuCores:{max:t,value:n}}})}},max:De,min:1}},(0,r.jsx)(H,te({isAllowTextInput:!0,label:_n,labelId:"".concat(Vn,"-label"),value:Qn},qn))),(0,r.jsx)(Z,{id:"ps-memory",label:"Memory",messageBoxProps:Ne,inputWithLabelProps:{inputProps:{endAdornment:xe("".concat(We," ").concat(He),{onButtonClick:function(){Qe(We),Kn({cmValue:ze})}}),onChange:function(e){var n=e.target.value;$n({value:n})},type:"number",value:_e},inputLabelProps:{isNotifyRequired:Ae===ce}},selectItems:pe,selectWithLabelProps:{selectProps:{onChange:function(e){var n=e.target.value;$n({unit:n})},value:He}}}),Ke.stateIds.map((function(e,n){return function(e,n,t,o,i,s,l,u){var c=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;return e[t][r]},p=function(r,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n;e[r][i]=o,t(te({},e))},d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ce;p("sizes",t);var r=s({virtualDisks:e}),o=r.formattedMaxVDSizes,i=r.maxVirtualDiskSizes;u({inputs:X({},"vd".concat(n,"Size"),{displayMax:"".concat(o[n]),max:i[n],value:t})})},f=function(e){var n=e.value,t=void 0===n?c("inputSizes"):n,r=e.unit,o=void 0===r?c("inputUnits"):r;t!==c("inputSizes")&&p("inputSizes",t),o!==c("inputUnits")&&p("inputUnits",o),(0,x.KY)(t,o,(function(e){return d(e)}),(function(){return d()}))},v=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c("inputStorageGroupUUIDs");n!==c("inputStorageGroupUUIDs")&&p("inputStorageGroupUUIDs",n),s({virtualDisks:e})};return(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column","& > :not(:first-child)":{marginTop:"1em"}},children:[(0,r.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column"},children:(0,r.jsx)(Z,{id:"ps-virtual-disk-size-".concat(n),label:"Disk size",messageBoxProps:c("inputSizeMessages"),inputWithLabelProps:{inputProps:{endAdornment:xe("".concat(c("inputMaxes")," ").concat(c("inputUnits")),{onButtonClick:function(){p("inputSizes",c("inputMaxes")),d(c("maxes"))}}),onChange:function(e){var n=e.target.value;f({value:n})},type:"number",value:c("inputSizes")},inputLabelProps:{isNotifyRequired:c("sizes")===ce}},selectItems:pe,selectWithLabelProps:{selectProps:{onChange:function(e){var n=e.target.value;f({unit:n})},value:c("inputUnits")}}})}),(0,r.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column"},children:(0,r.jsx)(U.Z,{id:"ps-storage-group-".concat(n),label:"Storage group",disableItem:function(e){return!(i.includes(e)&&c("sizes")<=l[e].storageGroupFree)},inputLabelProps:{isNotifyRequired:0===c("inputStorageGroupUUIDs").length},messageBoxProps:c("inputStorageGroupUUIDMessages"),selectItems:o,selectProps:{onChange:function(e){var n=e.target.value;v(n)},onClearIndicatorClick:function(){return v("")},renderValue:function(e){var n,t=null!==(n=l[e])&&void 0!==n?n:{},r=t.anvilName,o=void 0===r?"?":r,i=t.storageGroupName,a=void 0===i?"Unknown (".concat(e,")"):i;return"".concat(a," (").concat(o,")")},value:c("inputStorageGroupUUIDs")}})})]},"ps-virtual-disk-".concat(c("stateIds")))}(Ke,n,$e,K,wn,Hn,z,Yn)})),(0,r.jsx)(U.Z,{disableItem:function(e){return e===sn},hideItem:function(e){return!On.includes(e)},id:"ps-install-image",inputLabelProps:{isNotifyRequired:0===en.length},label:"Install ISO",messageBoxProps:rn,selectItems:W,selectProps:{onChange:function(e){var n=e.target.value;Xn(n)},onClearIndicatorClick:function(){return Xn("")},value:en}}),(0,r.jsx)(U.Z,{disableItem:function(e){return e===en},hideItem:function(e){return!On.includes(e)},id:"ps-driver-image",label:"Driver ISO",messageBoxProps:un,selectItems:W,selectProps:{onChange:function(e){var n=e.target.value;et(n)},onClearIndicatorClick:function(){return et("")},value:sn}}),(0,r.jsx)(U.Z,{disableItem:function(e){return!Un.includes(e)},id:"ps-anvil",inputLabelProps:{isNotifyRequired:0===pn.length},label:"Anvil node",messageBoxProps:vn,selectItems:N,selectProps:{onChange:function(e){var n=e.target.value;nt(n)},onClearIndicatorClick:function(){return nt("")},renderValue:function(e){var n,t=(null!==(n=I[e])&&void 0!==n?n:{}).anvilName;return void 0===t?"Unknown ".concat(e):t},value:pn}}),(0,r.jsx)(f.Z,{id:"ps-optimize-for-os",extendRenderInput:function(e){var n=e.inputLabelProps;(void 0===n?{}:n).isNotifyRequired=null===gn},isOptionEqualToValue:function(e,n){return e.key===n.key},label:"Optimize for OS",messageBoxProps:yn,noOptionsText:"No matching OS",onChange:function(e,n){hn(n)},openOnFocus:!0,options:_,renderOption:function(e,n){return(0,o.createElement)("li",te({},e,{key:"ps-optimize-for-os-".concat(n.key),children:[n.label," (",n.key,")"]}))},value:gn})]}):(0,r.jsx)(J.Z,{}),(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",marginTop:"1em","& > :not(:first-child)":{marginTop:"1em"}},children:[En>0&&(0,r.jsx)(h.Z,{isAllowClose:!0,text:"Provision server job registered. You can provision another server, or exit; it won't affect the registered job."}),Fn?(0,r.jsx)(J.Z,{mt:0}):(0,r.jsx)(a.Z,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-end",width:"100%"},children:(0,r.jsx)(m.Z,{disabled:!Yn({isIgnoreOnCallbacks:!0}),onClick:function(){zn(!0)},sx:me,children:"Provision"})})]})]}),Bn&&(0,r.jsx)(v.Z,{actionProceedText:"Provision",content:(0,r.jsxs)(s.ZP,{container:!0,columns:8,direction:"column",children:[(0,r.jsx)(s.ZP,{direction:"row",item:!0,xs:8,children:(0,r.jsxs)(B.Ac,{children:["Server ",(0,r.jsx)(B.Q0,{text:ne})," will be created on anvil node"," ",(0,r.jsx)(B.Q0,{text:I[pn].anvilName})," ","with the following properties:"]})}),(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsx)(B.Ac,{text:"CPU"})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsxs)(B.Ac,{children:[(0,r.jsx)(B.Q0,{text:Ie})," core(s)"]})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsxs)(B.Ac,{children:[(0,r.jsx)(B.Q0,{text:De})," core(s) available"]})})]}),(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsx)(B.Ac,{text:"Memory"})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsx)(B.Ac,{children:(0,r.jsxs)(B.Q0,{children:[_e," ",He]})})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsxs)(B.Ac,{children:[(0,r.jsx)(B.Q0,{text:"".concat(We," ").concat(He)})," ","available"]})})]}),Ke.stateIds.map((function(e,n){var t=Ke.inputMaxes[n],o=Ke.inputSizes[n],i=Ke.inputUnits[n],a=z[Ke.inputStorageGroupUUIDs[n]].storageGroupName;return(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsxs)(B.Ac,{children:["Disk ",(0,r.jsx)(B.Q0,{text:n})]})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsxs)(B.Ac,{children:[(0,r.jsx)(B.Q0,{text:"".concat(o," ").concat(i)})," on"," ",a]})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsxs)(B.Ac,{children:[(0,r.jsx)(B.Q0,{text:"".concat(t," ").concat(i)})," ","available"]})})]},"ps-virtual-disk-".concat(e,"-summary"))})),(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsx)(B.Ac,{text:"Install ISO"})}),(0,r.jsx)(s.ZP,{item:!0,xs:6,children:(0,r.jsx)(B.Ac,{children:(0,r.jsx)(B.Q0,{children:D[en].fileName})})})]}),(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsx)(B.Ac,{text:"Driver ISO"})}),(0,r.jsx)(s.ZP,{item:!0,xs:6,children:(0,r.jsx)(B.Ac,{children:D[sn]?(0,r.jsx)(B.Q0,{children:D[sn].fileName}):"none"})})]}),(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsx)(B.Ac,{text:"Optimize for OS"})}),(0,r.jsx)(s.ZP,{item:!0,xs:6,children:(0,r.jsx)(B.Ac,{text:"".concat(null===gn||void 0===gn?void 0:gn.label)})})]})]}),dialogProps:{open:Bn},onCancelAppend:function(){zn(!1)},onProceedAppend:function(){var e={serverName:ne,cpuCores:Ie,memory:Ae.toString(),virtualDisks:Ke.stateIds.map((function(e,n){return{storageSize:Ke.sizes[n].toString(),storageGroupUUID:Ke.inputStorageGroupUUIDs[n]}})),installISOFileUUID:en,driverISOFileUUID:sn,anvilUUID:pn,optimizeForOS:null===gn||void 0===gn?void 0:gn.key};Nn(!0),d.Z.post("/server",e).then((function(){Nn(!1),Wn(En+1)})),zn(!1)},proceedButtonProps:{sx:me},titleText:"Provision ".concat(ne,"?")})]})}},2519:function(e,n,t){t.d(n,{Z:function(){return D}});var r=t(5893),o=t(5603),i=t(8128),a=t(3640),s=t(7294),l=t(1363),u=t(4427),c=t(9),p=t(192),d=t(5537),f=t(9558),v=t(6239),m=t(7021),x=t(1057),g=t(4799),h=t(3213),b=t(7169);function y(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function j(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 U=function(e){var n=e.onClearIndicatorClick,t=S(e,["onClearIndicatorClick"]),i=t.sx,a=t.value,l=S(t,["sx","value"]),u=(0,s.useMemo)((function(){var e;return j((y(e={},"& .".concat(o.Z.icon),{color:b.s7}),y(e,"& .".concat(f.Z.root),{marginRight:".8em"}),y(e,"& .".concat(v.Z.root),{color:b.s7,visibility:"hidden"}),y(e,"&:hover .".concat(f.Z.root," .").concat(v.Z.root,",\n &.").concat(m.Z.focused," .").concat(f.Z.root," .").concat(v.Z.root),{visibility:"visible"}),e),i)}),[i]),c=(0,s.useMemo)((function(){return String(a).length>0&&n&&(0,r.jsx)(x.Z,{position:"end",children:(0,r.jsx)(g.Z,{onClick:n,children:(0,r.jsx)(d.Z,{fontSize:"small"})})})}),[n,a]);return(0,r.jsx)(h.Z,j({endAdornment:c,value:a},l,{sx:u}))};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 P(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 D=function(e){var n=e.id,t=e.label,d=e.selectItems,f=e.checkItem,v=e.disableItem,m=e.formControlProps,x=e.hideItem,g=e.inputLabelProps,h=void 0===g?{}:g,b=e.isReadOnly,y=void 0!==b&&b,j=e.messageBoxProps,S=void 0===j?{}:j,D=e.name,Z=e.onBlur,w=e.onChange,C=e.onFocus,M=e.required,k=e.selectProps,A=void 0===k?{}:k,G=A.multiple,B=A.sx,z=e.value,T=e.isCheckableItems,F=void 0===T?G:T,N=O(e.selectProps,["multiple","sx"]),L=(0,s.useMemo)((function(){return y?P(I({},"& .".concat(o.Z.icon),{visibility:"hidden"}),B):B}),[y,B]),E=(0,s.useCallback)((function(e){return F&&(0,r.jsx)(i.Z,{checked:null===f||void 0===f?void 0:f.call(null,e)})}),[f,F]),W=(0,s.useCallback)((function(e,t){return(0,r.jsxs)(u.Z,{disabled:null===v||void 0===v?void 0:v.call(null,e),sx:{display:(null===x||void 0===x?void 0:x.call(null,e))?"none":void 0},value:e,children:[E(e),t]},"".concat(n,"-").concat(e))}),[E,v,x,n]),R=(0,s.useMemo)((function(){return"".concat(n,"-select-element")}),[n]),V=(0,s.useMemo)((function(){return(0,r.jsx)(c.Z,{id:n,label:t})}),[n,t]),_=(0,s.useMemo)((function(){return t&&(0,r.jsx)(p.Z,P({htmlFor:R,isNotifyRequired:M},h,{children:t}))}),[h,M,t,R]),Q=(0,s.useMemo)((function(){return d.map((function(e){var n="string"===typeof e?{value:e}:e,t=n.value,r=n.displayValue;return W(t,void 0===r?t:r)}))}),[W,d]);return(0,r.jsxs)(a.Z,P({fullWidth:!0},m,{children:[_,(0,r.jsx)(U,P({id:R,input:V,multiple:G,name:D,onBlur:Z,onChange:w,onFocus:C,readOnly:y,value:z},N,{sx:L,children:Q})),(0,r.jsx)(l.Z,P({},S))]}))}},1081:function(e,n,t){var r=t(7294);n.Z=function(){var e=(0,r.useRef)(!0);return e.current?(e.current=!1,!0):e.current}},5737:function(e,n,t){t.d(n,{Bh:function(){return o},KY:function(){return i},MU:function(){return a}});var r=t(4490),o=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.fromUnit,o=n.onFailure,i=n.onSuccess,a=n.precision,s=n.toUnit,l=(0,r.gO)(e,{fromUnit:t,precision:a,toUnit:s});if(l){var u=l.value,c=l.unit;try{var p,d,f;null===i||void 0===i||null===(p=i.bigint)||void 0===p||p.call(null,BigInt(u),c),null===i||void 0===i||null===(d=i.number)||void 0===d||d.call(null,parseFloat(u),c),null===i||void 0===i||null===(f=i.string)||void 0===f||f.call(null,u,c)}catch(v){null===o||void 0===o||o.call(null,v,u,c)}}else null===o||void 0===o||o.call(null)},i=function(e,n,t,r){o(e,{fromUnit:n,onFailure:r,onSuccess:{bigint:t},precision:0,toUnit:"B"})},a=function(e){return(0,r._d)(e,{toUnit:"ibyte"})}}}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/86-447b52c8195dea3d.js b/striker-ui/out/_next/static/chunks/86-447b52c8195dea3d.js deleted file mode 100644 index 3f636c19..00000000 --- a/striker-ui/out/_next/static/chunks/86-447b52c8195dea3d.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 M=function(e){var n=e.isFloating,t=e.networkInterface,i=t.networkInterfaceName,u=t.networkInterfaceState,a=e.onClose,l=e.sx,c=Z(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,C({sx:C({display:"flex",flexDirection:"row","& > :not(:first-child)":{alignSelf:"center",marginLeft:".5em"}},f,l)},c,{children:[(0,r.jsx)(j.Z,{colour:"up"===u?"ok":"off",sx:{height:"auto"}}),(0,r.jsx)(I.Ac,{text:i}),a&&(0,r.jsx)(x.Z,{onClick:a,size:"small",sx:{color:y.s7},children:(0,r.jsx)(s.Z,{})})]}))};M.defaultProps={isFloating:!1,onClose:void 0};var S=M,P=(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"}}})),D=t(4690),U=t(1770),A=t(1706),N=t(4069),R=t(7869),E=t(6284),V=t(3679),T=t(1905),F=t(2519),L=t(2152),q=t(7987);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 G(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)||J(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 $(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)||J(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 J(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 z={ifaceNotApplied:"".concat("NetworkInitForm","-network-interface-not-applied")},X=[void 0,void 0],K="dns",Y="gateway",Q=function(e){return"".concat(e,"Interface")},ee=function(e){return"".concat(e,"IPAddress")},ne=function(e){return"".concat(e,"Name")},te=function(e){return"".concat(e,"SubnetMask")},re=function(e){return"".concat(e,"NetworkSubnetConflict")},oe=Array.from({length:2},(function(e,n){return n+1})),ie={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"}},ue=function(e){return"network".concat(e)},ae=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?$(X):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=W(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"),_({inputUUID:t,interfaces:o,ipAddress:u,name:b,subnetMask:c,type:f,typeCount:v},p)},le=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)(j.Z,{colour:"up"===t?"ok":"off",sx:{height:"auto"}}),(0,r.jsx)(I.KI,{text:i})]})}},{field:"networkInterfaceMACAddress",flex:1,headerName:"MAC",renderCell:function(e){var n=e.value;return(0,r.jsx)(I.$_,{text:n})}},{field:"networkInterfaceState",flex:1,headerName:"State",renderCell:function(e){var n=e.value,t=String(n);return(0,r.jsx)(I.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)(I.KI,{text:"".concat(parseFloat(n).toLocaleString()," Mbps")})}},{field:"networkInterfaceOrder",flex:1,headerName:"Order"}]},ce=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,j=e.setNetworkInputs,O=e.setNetworkInterfaceInputMap,C=e.testInput,Z=e.testInputToToggleSubmitDisabled,M=(0,i.Z)(),D=(0,u.Z)(M.breakpoints.up("md")),U=(0,u.Z)(M.breakpoints.up("lg")),R=(0,b.useRef)({}),T=(0,b.useRef)({}),L=m.inputUUID,q=m.interfaces,B=m.ipAddress,W=m.isRequired,J=m.subnetMask,z=m.type,X=m.typeCount,K=(0,b.useMemo)((function(){return ue(L)}),[L]),Y=(0,b.useMemo)((function(){return Q(K)}),[K]),ne=(0,b.useMemo)((function(){return ee(K)}),[K]),ae=(0,b.useMemo)((function(){return te(K)}),[K]),le=(0,b.useMemo)((function(){return re(K)}),[K]),ce=(0,b.useMemo)((function(){return"node"===d}),[d]),se=(0,b.useMemo)((function(){return!ce&&g<=2?[1]:oe}),[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=R.current,o=r.getIsChangedByUser,i=r.setValue,u=T.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=R.current.getIsChangedByUser)||void 0===e?void 0:e.call(null))&&Number(v)&&(null===(n=R.current.setValue)||void 0===n||n.call(null,B.replace(/^((?:\d+\.){3})\d*$/,"$1".concat(v)))))}),[d,B,v,z]),(0,b.useEffect)((function(){var e=m.ipAddressInputRef,n=m.subnetMaskInputRef;e===R&&n===T||(m.ipAddressInputRef=R,m.subnetMaskInputRef=T,j((function(e){return $(e)})))}),[m,j]),(0,r.jsxs)(V.Lg,{children:[(0,r.jsxs)(V.CH,{children:[(0,r.jsx)(F.Z,{id:"network-".concat(L,"-name"),isReadOnly:W,inputLabelProps:{isNotifyRequired:!0},label:"Network name",selectItems:Object.entries(fe).map((function(e){var n=G(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=ie[t];if(o){var i,u=o.ip,l=o.mask;"striker"===d&&"bcn"===t&&(i="4."),de(m,u(r,i),l)}j((function(e){return $(e)}))},renderValue:U?void 0:function(e){return"".concat(String(e).toUpperCase()," ").concat(X)},value:z}}),!W&&(0,r.jsx)(A.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=D?(0,r.jsx)(I.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)(I.Ac,{sx:{whiteSpace:"nowrap"},text:n}),(0,r.jsx)(P,{onMouseUp:function(){for(var e=arguments.length,n=new Array(e),r=0;r=xe.length||Object.values(W).every((function(e){return e.isApplied}))||"node"===t&&xe.length<=6}),[t,oe,xe,W]),Oe=(0,b.useMemo)((function(){return u&&!l}),[u,l]),Ce=(0,b.useMemo)((function(){return oe.every((function(e){return"mn"!==e.type}))}),[oe]),Ze=(0,b.useCallback)((function(e,n){var t;return null===(t=he.current.setMessage)||void 0===t?void 0:t.call(null,e,n)}),[]),Me=(0,b.useCallback)((function(e,n){var t;return null===(t=he.current.setMessageRe)||void 0===t?void 0:t.call(null,e,n)}),[]),Se=(0,b.useCallback)((function(e){return Ze(K,e)}),[Ze]),Pe=(0,b.useCallback)((function(e){return Ze(Y,e)}),[Ze]),De=(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 oe[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}))}),[oe]),Ue=(0,b.useCallback)((function(e){w.Z.put("/init/set-map-network",{value:e}).catch((function(n){var t=(0,U.Z)(n);t.children=(0,r.jsxs)(r.Fragment,{children:["Failed to ",e?"enable":"disable"," network mapping."," ",t.children]}),Ze("api",t)}))}),[Ze]),Ae=(0,b.useMemo)((function(){var e,n=(H(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:"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:q.HJ}]}),H(e,Y,{defaults:{getValue:function(){var e;return null===(e=ge.current.getValue)||void 0===e?void 0:e.call(null)},onSuccess:function(){Pe()}},tests:[{onFailure:function(){Pe({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=De({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 Pe({children:"Gateway cannot be the same as IP address in ".concat(o,".")});be("".concat(i).concat(u))}});return r||Pe({children:"Gateway must be in one network's subnet."}),r&&t}},{test:q.HJ}]}),e);return oe.forEach((function(e){var t,r,o=e.inputUUID,i=e.interfaces,u=e.ipAddressInputRef,a=e.name,l=e.subnetMaskInputRef,c=ue(o),s=Q(c),f=ee(c),d=te(c),v=function(e){return Ze(s,e)},p=function(e){return Ze(f,e)},b=function(e){return Ze(d,e)},m=function(e,n,t){var r,o="".concat(re(c),"-").concat(n),i="".concat(re(ue(n)),"-").concat(e);Ze((null===(r=he.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 De({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=G(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:q.HJ}]},n[ne(c)]={defaults:{value:a},tests:[{test:q.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:q.HJ}]}})),n}),[oe,Se,Pe,Ze,De]),Ne=(0,b.useMemo)((function(){return(0,q.LT)(Ae)}),[Ae]),Re=(0,b.useCallback)((function(e){null===s||void 0===s||s.call(null,Ne(_({isIgnoreOnCallbacks:!0,isTestAll:!0},e)))}),[Ne,s]),Ee=(0,b.useCallback)((function(){de(void 0)}),[]),Ve=(0,b.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};oe.unshift(ae(e)),null===s||void 0===s||s.call(null,!1),ie($(oe))}),[oe,s]),Te=(0,b.useCallback)((function(e){var n=G(oe.splice(e,1),1)[0],t=n.inputUUID;n.interfaces.forEach((function(e){if(void 0!==e){var n=e.networkInterfaceUUID;W[n].isApplied=!1}})),Re({excludeTestIdsRe:RegExp(t)}),ie($(oe)),J((function(e){return _({},e)}))}),[oe,W,Re]),Fe=(0,b.useCallback)((function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.inputs,r=void 0===t?oe: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}),[oe]),Le=(0,b.useMemo)((function(){if(void 0!==fe){var e=fe.networkInterfaceUUID;return function(n,t){return function(){var r,o=(null!==(r=n[t])&&void 0!==r?r:{}).networkInterfaceUUID;o&&o!==e&&(W[o].isApplied=!1),n[t]=fe,W[e].isApplied=!0}}}}),[fe,W]),qe=(0,b.useMemo)((function(){return fe?{cursor:"grabbing",userSelect:"none"}:{}}),[fe]),Be=(0,b.useMemo)((function(){if(void 0===fe)return(0,r.jsx)(r.Fragment,{});var e=V.x,n=V.y;return(0,r.jsx)(S,{isFloating:!0,networkInterface:fe,sx:{left:"calc(".concat(e,"px + .4em)"),position:"absolute",top:"calc(".concat(n,"px - 1.6em)"),zIndex:20}})}),[V,fe]),He=(0,b.useMemo)((function(){return fe?function(){Ee()}:void 0}),[Ee,fe]),_e=(0,b.useMemo)((function(){return fe?function(e){var n=e.currentTarget,t=e.nativeEvent,r=t.clientX,o=t.clientY,i=n.getBoundingClientRect(),u=i.left,a=i.top;F({x:r-u,y:o-a})}:void 0}),[fe]),We=(0,b.useMemo)((function(){return fe?function(){Ee()}:void 0}),[Ee,fe]);(0,b.useEffect)((function(){if([Object.keys(W).length>0,u,l,ye.current,me.current,ge.current].every((function(e){return Boolean(e)}))){var e,n;ye.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=me.current.setValue)||void 0===e||e.call(null,t),null===(n=ge.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=Fe(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=W[i])||void 0===t?void 0:t.metadata,null===(r=W[l])||void 0===r?void 0:r.metadata],ipAddress:o,isRequired:d,name:v,subnetMask:c,type:s,typeCount:f}),e}),[]);be(o),J((function(e){var n=_({},e);return a.forEach((function(e){n[e]&&(n[e].isApplied=!0)})),n})),ie(c),Re()}}),[u,Fe,l,W,M,Re]),(0,b.useEffect)((function(){return Ue(1),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(){Ue(0)}}),[Ue]),(0,b.useImperativeHandle)(n,(function(){return _({},he.current,{get:function(){var e,n;return{dns:null===(e=me.current.getValue)||void 0===e?void 0:e.call(null),gateway:null===(n=ge.current.getValue)||void 0===n?void 0:n.call(null),gatewayInterface:pe,networks:oe.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!==(O=null===(n=null===i||void 0===i?void 0:i.current.getValue)||void 0===n?void 0:n.call(null))&&void 0!==O?O:"",name:u,subnetMask:null!==(C=null===(t=null===a||void 0===a?void 0:a.current.getValue)||void 0===t?void 0:t.call(null))&&void 0!==C?C:"",type:l,typeCount:c}}))}}})}),[pe,oe]);var Ge,$e="13em";return je?(0,r.jsx)(L.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;F({x:n-o,y:t-i})},onMouseLeave:He,onMouseMove:_e,onMouseUp:We,sx:_({position:"relative"},qe),children:[Be,(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:le((function(e){de(e)}),W),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=W[i],a=u.isApplied,l=u.metadata;a||de(l)}}}},disableColumnMenu:!0,disableSelectionOnClick:!0,getRowClassName:function(e){var n,t=e.row.networkInterfaceUUID,r="";return(null!==(n=W[t])&&void 0!==n&&n).isApplied||(r+=" ".concat(z.ifaceNotApplied)),r},getRowId:function(e){return e.networkInterfaceUUID},hideFooter:!0,initialState:{sorting:{sortModel:[{field:"networkInterfaceName",sort:"asc"}]}},rows:xe,sx:(Ge={color:y.s7},H(Ge,"& .".concat(a.Z.root),{color:"inherit"}),H(Ge,"& .".concat(v._.cell,":focus"),{outline:"none"}),H(Ge,"& .".concat(v._.row,".").concat(z.ifaceNotApplied,":hover"),H({cursor:"grab"},"& .".concat(v._.cell," p"),{cursor:"auto"})),Ge)}),!Oe&&(0,r.jsx)(D.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:$e,width:"25%"},"& > :not(:first-child)":{marginLeft:"1em"}},children:oe.map((function(e,n){var o=e.inputUUID;return(0,r.jsx)(ce,{allowMigrationNetwork:Ce,createDropMouseUpHandler:Le,getNetworkTypeCount:Fe,hostDetail:{hostType:t,sequence:j},networkIndex:n,networkInput:e,networkInterfaceCount:xe.length,networkInterfaceInputMap:W,removeNetwork:Te,setMessageRe:Me,setNetworkInputs:ie,setNetworkInterfaceInputMap:J,testInput:Ne,testInputToToggleSubmitDisabled:Re},"network-".concat(o))}))})}),(0,r.jsxs)(D.Z,{sm:"row",sx:{marginTop:".2em","& > :not(button)":{minWidth:$e,width:{sm:"25%"}}},children:[(0,r.jsx)(A.Z,{disabled:Ie,onClick:function(){Ve()},children:(0,r.jsx)(f.Z,{})}),(0,r.jsx)(N.Z,{input:(0,r.jsx)(E.Z,{id:"network-init-gateway",inputProps:{onBlur:function(e){var n=e.target.value;Ne({inputs:H({},Y,{value:n})})}},inputLabelProps:{isNotifyRequired:!0},onChange:function(e){var n=e.target.value;Re({inputs:H({},Y,{value:n})}),Pe()},label:"Gateway"}),ref:ge}),(0,r.jsx)(N.Z,{input:(0,r.jsx)(E.Z,{id:"network-init-dns-csv",inputProps:{onBlur:function(e){var n=e.target.value;Ne({inputs:H({},K,{value:n})})}},inputLabelProps:{isNotifyRequired:!0},onChange:function(e){var n=e.target.value;Re({inputs:H({},K,{value:n})}),Se()},label:"Domain name server(s)"}),ref:me})]}),(0,r.jsx)(R.Z,{count:1,defaultMessageType:"warning",ref:he})]})]})}));se.defaultProps={expectHostDetail:!1,hostDetail:void 0,hostSequence:void 0,toggleSubmitDisabled:void 0},se.displayName="NetworkInitForm";var fe=se},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"}}}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/86-afca85346d822222.js b/striker-ui/out/_next/static/chunks/86-afca85346d822222.js new file mode 100644 index 00000000..8efaccc7 --- /dev/null +++ b/striker-ui/out/_next/static/chunks/86-afca85346d822222.js @@ -0,0 +1 @@ +"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(1706),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(7987);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/898-e0785f5528d640fa.js b/striker-ui/out/_next/static/chunks/898-e0785f5528d640fa.js new file mode 100644 index 00000000..29697fe6 --- /dev/null +++ b/striker-ui/out/_next/static/chunks/898-e0785f5528d640fa.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[898],{4594:function(e,n,t){var r=t(5893),o=t(6514),i=t(5113),a=t(4656),s=t(482),l=t(2994),c=t(7357),u=t(9890),p=t(7169),d=t(1363),f=t(6284);function v(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function m(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 g=function(e){return(0,r.jsx)(o.Z,{in:!0,children:(0,r.jsx)(i.Z,m({},e))})};n.Z=function(e){var n=e.componentsProps,t=e.extendRenderInput,o=e.label,i=e.messageBoxProps,h=e.renderInput,b=e.sx,y=x(e,["componentsProps","extendRenderInput","label","messageBoxProps","renderInput","sx"]),j=m({paper:{sx:{backgroundColor:p.lD}}},n),S=null!==h&&void 0!==h?h:function(e){var n=e.fullWidth,i=e.InputProps,a=e.InputLabelProps,s=e.inputProps,l={formControlProps:{fullWidth:n,ref:i.ref},inputLabelProps:a,inputProps:{className:i.className,endAdornment:i.endAdornment,inputProps:s,startAdornment:i.startAdornment},label:o};return null===t||void 0===t||t.call(null,l,e),(0,r.jsx)(f.Z,m({},l))},U=m(v({},"& .".concat(a.Z.root," .").concat(s.Z.endAdornment),v({right:"7px"},"& .".concat(l.Z.root),{color:p.s7})),b);return(0,r.jsxs)(c.Z,{sx:{display:"flex",flexDirection:"column"},children:[(0,r.jsx)(u.Z,m({PaperComponent:g},y,{componentsProps:j,renderInput:S,sx:U})),(0,r.jsx)(d.Z,m({},i))]})}},8750:function(e,n,t){t.d(n,{Z:function(){return T}});var r=t(5893),o=t(1113),i=t(1496),a=t(2293),s=t(7357),l=t(2992),c=t(4799),u=t(7294),p=t(7169),d=t(4433),f=t(9029),v=t(7533),m=t(8462),x=t(7212),g=t(8619),h=[{text:"Anvil",image:"/pngs/anvil_icon_on.png",uri:"/manage-element"},{text:"Files",image:"/pngs/files_on.png",uri:"/file-manager"},{text:"Configure",image:"/pngs/configure_icon_on.png",uri:"/config"},{text:"Help",image:"/pngs/help_icon_on.png",uri:"https://alteeve.com/w/Support"}],b={width:"40em",height:"40em"},y=t(4390),j=t(582),S=t(4690),U=t(1770),I=t(7750),P=t(1883);function O(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function D(e){for(var n=1;n0)},ref:n})]})}},4427:function(e,n,t){var r=t(5893),o=t(2429),i=t(9309),a=t(7169);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 l(e){for(var n=1;n :first-child":{flexGrow:1},"& > :not(:last-child)":{marginRight:".5em"}},"&:hover\n .".concat(y.Z.root,"\n .").concat(j.Z.root,"\n .").concat(j.Z.notchedOutline),{borderColor:p.s7}),children:[(0,r.jsx)(b.Z,P({id:n,label:t},i)),(0,r.jsx)(U.Z,P({formControlProps:{fullWidth:!1},id:"".concat(n,"-nested-select"),selectItems:c},d))]}),(0,r.jsx)(S.Z,P({},l))]})};D.defaultProps=O;var Z=D,w=t(3679),C=t(3640),M=t(6727),k=t(1184),A=t(9),G=t(192),B=t(7750);function z(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(e){return function(e){if(Array.isArray(e))return z(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 z(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 z(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.")}()}var W={inputLabelProps:{},isAllowTextInput:!1,labelId:"",messageBoxProps:{},sliderProps:{}},V={root:"".concat("SliderInputLabelDecorator","-root")},R=function(e){var n=e.isFocused,t=e.label,o=p.s7,i="solid",s="0",l="0 .6em 0 .4em",c="1px 0 0 0",u="0.3";return n&&(s="-1px",l="0 1em 0 1em",c="2px 0 0 0",u="1"),(0,r.jsxs)(a.Z,{className:V.root,sx:{display:"flex",flexDirection:"row",position:"absolute",top:s,width:"calc(100% - 6px)","> :last-child":{flexGrow:1}},children:[(0,r.jsx)(a.Z,{sx:{borderColor:o,borderStyle:i,borderWidth:c,content:'""',opacity:u,width:".6em"}}),(0,r.jsx)(B.Ac,{sx:{fontSize:".75em",margin:l,visibility:"hidden"},text:t}),(0,r.jsx)(a.Z,{sx:{borderColor:o,borderStyle:i,borderWidth:c,content:'""',opacity:u}})]})},_=function(e,n){var t=Number.parseFloat(e);return Number.isNaN(t)?n:t},Q=function(e){return T(e,Array)?e.map((function(e){return String(e)})):[String(e)]},q=function(e){var n,t=e.messageBoxProps,i=void 0===t?W.messageBoxProps:t,s=e.isAllowTextInput,l=void 0===s?W.isAllowTextInput:s,c=e.label,u=e.labelId,d=void 0===u?W.labelId:u,f=e.inputLabelProps,v=void 0===f?W.inputLabelProps:f,m=e.sliderProps,x=void 0===m?W.sliderProps:m,g=e.value,h=x.max,b=x.min,y=x.onChange,U=x.sx,I=x.valueLabelDisplay,P=g,O=(0,o.useState)({range:Q(g)}),D=O[0],Z=O[1],w=(0,o.useState)(!1),B=w[0],z=w[1],q=function(){z(!1)},H=function(){z(!0)},Y=function(){P=function(e,n){return T(n,Array)?e.map((function(e,t){return _(e,n[t])})):_(e[0],n)}(D.range,P),null===y||void 0===y||y.call(null,P)};return(0,r.jsxs)(C.Z,{sx:{display:"flex",flexDirection:"column","&:hover":(n={},F(n,"& .".concat(V.root," div"),{opacity:1}),F(n,"& .".concat(j.Z.notchedOutline),{borderColor:p.s7}),n)},children:[(0,r.jsx)(G.Z,N({className:B?M.Z.focused:"",id:d,shrink:!0},v,{children:c})),R({isFocused:B,label:c}),(0,r.jsxs)(a.Z,{sx:{alignItems:"center",display:"flex",flexDirection:"row","> :first-child":{flexGrow:1}},children:[(0,r.jsx)(k.ZP,{"aria-labelledby":d,max:h,min:b,onBlur:q,onChange:function(e,n){Z({range:Q(n)}),null===y||void 0===y||y.call(null,n)},onFocus:H,sx:N(F({color:p.s7,marginLeft:"1em",marginRight:"1em"},"& .".concat(k.TW.thumb),{borderRadius:p.n_,transform:"translate(-50%, -50%) rotate(45deg)"}),U),value:P,valueLabelDisplay:I}),D.range.map((function(e,n){return function(e){var n=e.key,t=e.isFocused,o=L(e,["key","isFocused"]);return(0,r.jsx)(A.Z,N({key:n,className:t?j.Z.focused:"",type:"number"},o))}({key:"slider-nested-text-input-".concat(n),inputProps:{max:h,min:b},isFocused:B,onBlur:q,onChange:function(){for(var e=arguments.length,t=new Array(e),r=0;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 oe(e,n){return X(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,s=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(l){s=!0,o=l}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}}(e,n)||se(e,n)||ne()}function ie(e){return X(e)||ee(e)||se(e,i)||ne()}function ae(e){return function(e){if(Array.isArray(e))return K(e)}(e)||ee(e)||se(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 se(e,n){if(e){if("string"===typeof e)return K(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)?K(e,n):void 0}}var le,ce,ue=BigInt(0),pe=[{value:"B"},{value:"KiB"},{value:"MiB"},{value:"GiB"},{value:"TiB"}],de="GiB",fe=BigInt(65536),ve=BigInt(104857600),me={backgroundColor:p.Ej,color:p.lD,"&:hover":{backgroundColor:p.Ej}},xe=function(e,n){var t=n.onButtonClick;return(0,r.jsx)(m.Z,{disabled:void 0===t,onClick:t,sx:{minWidth:"unset",whiteSpace:"nowrap"},children:"Max: ".concat(e)})},ge=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.endAdornment,t=e.mainLabel,o=e.subLabel;return(0,r.jsxs)(a.Z,{sx:{alignItems:"center",display:"flex",flexDirection:"row",width:"100%","& > :first-child":{flexGrow:1}},children:[(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column"},children:[t&&(0,r.jsx)(B.Ac,{inverted:!0,text:t}),o&&(0,r.jsx)(B.Ac,{inverted:!0,text:o})]}),n]})},he=function(e,n,t,r,o,i,a){var s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{},l=s.includeAnvilUUIDs,c=void 0===l?[]:l,u=s.includeFileUUIDs,p=void 0===u?[]:u,d=s.includeStorageGroupUUIDs,f=void 0===d?[]:d,v=function(){return!0},m=function(){return!0},x=function(){return!0};c.length>0&&(v=function(e){return c.includes(e)}),p.length>0&&(m=function(e){return p.includes(e)}),f.length>0&&(x=function(e){return f.includes(e)});var g={},h=i.reduce((function(e,n,t){var r,i=null!==(r=o[t])&&void 0!==r?r:ue;return e.all+=i,""===n||(void 0===e[n]&&(e[n]=ue),e[n]+=i),e}),{all:ue}),b=e.reduce((function(e,s){var l=s.anvilUUID;if(v(l)){var c,u=s.anvilTotalCPUCores,p=s.anvilTotalAvailableMemory,d=s.files,f=s.fileUUIDs,b=s.storageGroups,y=[],j=ue,S=ue;if(b.forEach((function(e){var n=e.storageGroupUUID,t=e.storageGroupFree;x(n)&&(y.push(n),S+=t,t>j&&(j=t))})),[function(){return b.length>0},function(){return t<=u},function(){return r<=p},function(){return i.every((function(e,t){var r,i=null!==(r=o[t])&&void 0!==r?r:ue,a=!0,s=i<=j;return""!==e&&(a=y.includes(e),s=i<=n[e].storageGroupFree),a&&s}))},function(){return Object.entries(h).every((function(e){var t=oe(e,2),r=t[0],o=t[1];return"all"===r?o<=S:o<=n[r].storageGroupFree}))},function(){return a.every((function(e){return""===e||f.includes(e)}))}].every((function(e){return e()})))e.anvils.push(s),e.anvilUUIDs.push(l),e.maxCPUCores=Math.max(u,e.maxCPUCores),p>e.maxMemory&&(e.maxMemory=p),d.forEach((function(e){var n=e.fileUUID;m(n)&&(g[n]=!0)})),(c=e.storageGroupUUIDs).push.apply(c,ae(y)),e.maxVirtualDiskSizes.fill(j)}return e}),{anvils:[],anvilUUIDs:[],fileUUIDs:[],maxCPUCores:0,maxMemory:ue,maxVirtualDiskSizes:i.map((function(){return ue})),storageGroupUUIDs:[]});return b.fileUUIDs=Object.keys(g),i.forEach((function(e,t){""!==e&&(b.maxVirtualDiskSizes[t]=n[e].storageGroupFree)})),b},be=function(e){return e.filter((function(e){return""!==e}))},ye=function(e){return{fromUnit:"B",onSuccess:{string:e},precision:0,toUnit:"ibyte"}};(0,x.Bh)(fe,ye((function(e,n){le="".concat(e," ").concat(n)}))),(0,x.Bh)(ve,ye((function(e,n){ce="".concat(e," ").concat(n)})));var je=function(e){var n=e.dialogProps.open,t=e.onClose,i=(0,o.useState)([]),y=i[0],j=i[1],S=(0,o.useState)({}),I=S[0],P=S[1],O=(0,o.useState)({}),D=O[0],C=O[1],M=(0,o.useState)({}),k=M[0],A=M[1],G=(0,o.useState)({}),z=G[0],F=G[1],T=(0,o.useState)([]),N=T[0],L=T[1],E=(0,o.useState)([]),W=E[0],V=E[1],R=(0,o.useState)([]),_=R[0],Q=R[1],q=(0,o.useState)([]),K=q[0],X=q[1],ee=(0,o.useState)(""),ne=ee[0],se=ee[1],ye=(0,o.useState)(),je=ye[0],Se=ye[1],Ue=(0,o.useState)(1),Ie=Ue[0],Pe=Ue[1],Oe=(0,o.useState)(0),De=Oe[0],Ze=Oe[1],we=(0,o.useState)(),Ce=we[0],Me=we[1],ke=(0,o.useState)(ue),Ae=ke[0],Ge=ke[1],Be=(0,o.useState)(ue),ze=Be[0],Fe=Be[1],Te=(0,o.useState)(),Ne=Te[0],Le=Te[1],Ee=(0,o.useState)("0"),We=Ee[0],Ve=Ee[1],Re=(0,o.useState)(""),_e=Re[0],Qe=Re[1],qe=(0,o.useState)(de),He=qe[0],Ye=qe[1],Je=(0,o.useState)(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.existingVirtualDisks,t=void 0===n?{stateIds:[],inputMaxes:[],inputSizeMessages:[],inputSizes:[],inputStorageGroupUUIDMessages:[],inputStorageGroupUUIDs:[],inputUnits:[],maxes:[],sizes:[]}:n,r=e.stateId,o=void 0===r?(0,u.Z)():r,i=e.inputMax,a=void 0===i?"0":i,s=e.inputSize,l=void 0===s?"":s,c=e.inputSizeMessage,p=void 0===c?void 0:c,d=e.inputStorageGroupUUID,f=void 0===d?"":d,v=e.inputStorageGroupUUIDMessage,m=void 0===v?void 0:v,x=e.inputUnit,g=void 0===x?de:x,h=e.max,b=void 0===h?ue:h,y=e.setVirtualDisks,j=e.size,S=void 0===j?ue:j,U=t.stateIds,I=t.inputMaxes,P=t.inputSizeMessages,O=t.inputSizes,D=t.inputStorageGroupUUIDMessages,Z=t.inputStorageGroupUUIDs,w=t.inputUnits,C=t.maxes,M=t.sizes;return U.push(o),I.push(a),P.push(p),O.push(l),D.push(m),Z.push(f),w.push(g),C.push(b),M.push(S),null===y||void 0===y||y.call(null,te({},t)),t}()),Ke=Je[0],Xe=Je[1],$e=(0,o.useState)(""),en=$e[0],nn=$e[1],tn=(0,o.useState)(),rn=tn[0],on=tn[1],an=(0,o.useState)(""),sn=an[0],ln=an[1],cn=(0,o.useState)()[0],un=(0,o.useState)(""),pn=un[0],dn=un[1],fn=(0,o.useState)(),vn=fn[0],mn=fn[1],xn=(0,o.useState)(null),gn=xn[0],hn=xn[1],bn=(0,o.useState)(),yn=bn[0],jn=bn[1],Sn=(0,o.useState)([]),Un=Sn[0],In=Sn[1],Pn=(0,o.useState)([]),On=Pn[0],Dn=Pn[1],Zn=(0,o.useState)([]),wn=Zn[0],Cn=Zn[1],Mn=(0,o.useState)(!1),kn=Mn[0],An=Mn[1],Gn=(0,o.useState)(!1),Bn=Gn[0],zn=Gn[1],Fn=(0,o.useState)(!1),Tn=Fn[0],Nn=Fn[1],Ln=(0,o.useState)(0),En=Ln[0],Wn=Ln[1],Vn={serverName:{defaults:{onSuccess:function(){Se(void 0)},value:ne},tests:[{onFailure:function(){Se({text:"The server name length must be 1 to 16 characters.",type:"warning"})},test:function(e){var n=e.value.length;return n>=1&&n<=16}},{onFailure:function(){Se({text:"The server name is expected to only contain alphanumeric, hyphen, or underscore characters.",type:"warning"})},test:function(e){var n=e.value;return/^[a-zA-Z0-9_-]+$/.test(n)}},{onFailure:function(){Se({text:"This server name already exists, please choose another name.",type:"warning"})},test:function(e){var n=e.value;return void 0===k[n]}}]},cpuCores:{defaults:{max:De,min:1,onSuccess:function(){Me(void 0)},value:Ie},tests:[{onFailure:function(){Me({text:"Non available.",type:"warning"})},test:J.X7},{onFailure:function(e){var n=e.displayMax,t=e.displayMin;Me({text:"The number of CPU cores is expected to be between ".concat(t," and ").concat(n,"."),type:"warning"})},test:J.SQ}]},memory:{defaults:{displayMax:"".concat(We," ").concat(He),displayMin:le,max:ze,min:fe,onSuccess:function(){Le(void 0)},value:Ae},tests:[{onFailure:function(){Le({text:"Non available.",type:"warning"})},test:J.X7},{onFailure:function(e){var n=e.displayMax,t=e.displayMin;Le({text:"Memory is expected to be between ".concat(t," and ").concat(n,"."),type:"warning"})},test:J.SQ}]},installISO:{defaults:{onSuccess:function(){on(void 0)},value:en},tests:[{test:J.HJ}]},anvil:{defaults:{onSuccess:function(){mn(void 0)},value:pn},tests:[{test:J.HJ}]},optimizeForOS:{defaults:{onSuccess:function(){jn(void 0)},value:null===gn||void 0===gn?void 0:gn.key},tests:[{test:J.HJ}]}};Ke.inputSizeMessages.forEach((function(e,n){Vn["vd".concat(n,"Size")]={defaults:{displayMax:"".concat(Ke.inputMaxes[n]," ").concat(Ke.inputUnits[n]),displayMin:ce,max:Ke.maxes[n],min:ve,onSuccess:function(){Ke.inputSizeMessages[n]=void 0},value:Ke.sizes[n]},onFinishBatch:function(){Xe(te({},Ke))},tests:[{onFailure:function(){Ke.inputSizeMessages[n]={text:"Non available.",type:"warning"}},test:J.X7},{onFailure:function(e){var t=e.displayMax,r=e.displayMin;Ke.inputSizeMessages[n]={text:"Virtual disk ".concat(n," size is expected to be between ").concat(r," and ").concat(t,"."),type:"warning"}},test:J.SQ}]},Vn["vd".concat(n,"StorageGroup")]={defaults:{onSuccess:function(){Ke.inputStorageGroupUUIDMessages[n]=void 0},value:Ke.inputStorageGroupUUIDs[n]},onFinishBatch:function(){Xe(te({},Ke))},tests:[{test:J.HJ}]}}));var Rn,_n,Qn,qn,Hn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.allAnvils,t=void 0===n?y:n,r=e.cpuCores,o=void 0===r?Ie:r,i=e.fileUUIDs,a=void 0===i?[en,sn]:i,s=e.includeAnvilUUIDs,l=void 0===s?be([pn]):s,c=e.includeFileUUIDs,u=e.includeStorageGroupUUIDs,p=e.inputMemoryUnit,d=void 0===p?He:p,f=e.memory,v=void 0===f?Ae:f,m=e.storageGroupUUIDMapToData,g=void 0===m?z:m,h=e.virtualDisks,b=void 0===h?Ke:h,j=he(t,g,o,v,b.sizes,b.inputStorageGroupUUIDs,a,{includeAnvilUUIDs:l,includeFileUUIDs:c,includeStorageGroupUUIDs:u}),S=j.anvilUUIDs,U=j.fileUUIDs,I=j.maxCPUCores,P=j.maxMemory,O=j.maxVirtualDiskSizes,D=j.storageGroupUUIDs;Ze(I),Fe(P);var Z=[];b.maxes=O,b.maxes.forEach((function(e,n){(0,x.Bh)(e,{fromUnit:"B",onSuccess:{string:function(e,t){b.inputMaxes[n]=e,Z[n]="".concat(e," ").concat(t)}},toUnit:b.inputUnits[n]})})),Xe(te({},b)),In(S),Dn(U),Cn(D);var w="";return(0,x.Bh)(P,{fromUnit:"B",onSuccess:{string:function(e,n){Ve(e),w="".concat(e," ").concat(n)}},toUnit:d}),{formattedMaxMemory:w,formattedMaxVDSizes:Z,maxCPUCores:I,maxMemory:P,maxVirtualDiskSizes:O}},Yn=(0,o.useCallback)(Hn,[]),Jn=function(){for(var e=arguments.length,n=new Array(e),t=0;t0&&void 0!==arguments[0]?arguments[0]:{},n=e.cmValue,t=void 0===n?ue:n,r=e.cmUnit,o=void 0===r?He:r;Ge(t);var i=Hn({inputMemoryUnit:o,memory:t}),a=i.formattedMaxMemory,s=i.maxMemory;Jn({inputs:{memory:{displayMax:a,max:s,value:t}}})},Xn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.value,t=void 0===n?_e:n,r=e.unit,o=void 0===r?He:r;t!==_e&&Qe(t),o!==He&&Ye(o),(0,x.KY)(t,o,(function(e){return Kn({cmValue:e,cmUnit:o})}),(function(){return Kn({cmUnit:o})}))},$n=function(e){nn(e),Hn({fileUUIDs:[e,sn]})},et=function(e){ln(e),Hn({fileUUIDs:[en,e]})},nt=function(e){var n=be([e]);dn(e),Hn({includeAnvilUUIDs:n})};return(0,o.useEffect)((function(){d.Z.get("/anvil",{params:{anvilUUIDs:"all",isForProvisionServer:!0}}).then((function(e){var n=e.data,t=function(e){var n={},t=e.reduce((function(e,t){var o=t.anvilUUID,i=t.anvilName,s=t.anvilTotalMemory,l=t.anvilTotalAllocatedMemory,c=t.anvilTotalAvailableMemory,u=t.hosts,p=t.servers,d=t.storageGroups,f=t.files,v=d.reduce((function(n,t){var a=te({},t,{anvilUUID:o,anvilName:i,storageGroupSize:BigInt(t.storageGroupSize),storageGroupFree:BigInt(t.storageGroupFree),humanizedStorageGroupFree:""});return(0,x.Bh)(t.storageGroupFree,{fromUnit:"B",onSuccess:{string:function(e,n){a.humanizedStorageGroupFree="".concat(e," ").concat(n)}},precision:0,toUnit:"ibyte"}),n.anvilStorageGroupUUIDs.push(t.storageGroupUUID),n.anvilStorageGroups.push(a),e.storageGroups.push(a),e.storageGroupSelectItems.push({displayValue:ge({endAdornment:(0,r.jsx)(B.Ac,{inverted:!0,text:"~".concat(a.humanizedStorageGroupFree," free")}),mainLabel:t.storageGroupName,subLabel:i}),value:t.storageGroupUUID}),e.storageGroupUUIDMapToData[t.storageGroupUUID]=a,n}),{anvilStorageGroups:[],anvilStorageGroupUUIDs:[]}),m=v.anvilStorageGroups,g=v.anvilStorageGroupUUIDs,h=[];f.forEach((function(e){var t=e.fileUUID;h.push(t),n[t]=e}));var b=te({},t,{anvilTotalMemory:BigInt(s),anvilTotalAllocatedMemory:BigInt(l),anvilTotalAvailableMemory:BigInt(c),humanizedAnvilTotalAvailableMemory:"",hosts:u.map((function(e){return te({},e,{hostMemory:BigInt(e.hostMemory)})})),servers:p.map((function(n){var t=n.serverMemory,r=n.serverName,o=te({},re(n,["serverMemory","serverName"]),{serverMemory:BigInt(t),serverName:r});return e.serverNameMapToData[r]=o,o})),storageGroupUUIDs:g,storageGroups:m,fileUUIDs:h});return(0,x.Bh)(c,{fromUnit:"B",onSuccess:{string:function(e,n){b.humanizedAnvilTotalAvailableMemory="".concat(e," ").concat(n)}},precision:0,toUnit:"ibyte"}),e.anvils.push(b),e.anvilSelectItems.push({displayValue:ge({endAdornment:(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",width:"8rem"},children:[(0,r.jsx)(B.Ac,{inverted:!0,text:"CPU: ".concat(b.anvilTotalCPUCores," cores")}),(0,r.jsx)(B.Ac,{inverted:!0,text:"Memory: ~".concat(b.humanizedAnvilTotalAvailableMemory)})]}),mainLabel:b.anvilName,subLabel:b.anvilDescription}),value:o}),e.anvilUUIDMapToData[o]=b,e}),{anvils:[],anvilSelectItems:[],anvilUUIDMapToData:{},files:[],fileSelectItems:[],fileUUIDMapToData:{},serverNameMapToData:{},storageGroups:[],storageGroupSelectItems:[],storageGroupUUIDMapToData:{}});return Object.values(n).forEach((function(e){t.files.push(e),t.fileSelectItems.push({displayValue:e.fileName,value:e.fileUUID}),t.fileUUIDMapToData[e.fileUUID]=e})),t}(n.anvils),o=t.anvils,i=t.anvilSelectItems,s=t.anvilUUIDMapToData,l=t.fileSelectItems,c=t.fileUUIDMapToData,u=t.serverNameMapToData,p=t.storageGroupSelectItems,d=t.storageGroupUUIDMapToData;j(o),P(s),C(c),A(u),F(d),L(i),V(l),X(p),Yn({allAnvils:o,storageGroupUUIDMapToData:d}),Q(Object.entries(n.oses).map((function(e){var n=oe(e,2);return{key:n[0],label:n[1]}}))),An(!0)}))}),[Yn]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(l.Z,{fullWidth:!0,maxWidth:"sm",open:n,PaperComponent:w.s_,PaperProps:{sx:{overflow:"visible"}},children:[(0,r.jsxs)(w.V9,{children:[(0,r.jsx)(B.z,{text:"Provision a Server"}),(0,r.jsx)(g.Z,{onClick:t,sx:{backgroundColor:p.hM,color:p.lD,"&:hover":{backgroundColor:p.hM}},children:(0,r.jsx)(c.Z,{})})]}),kn?(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",maxHeight:"50vh",overflowY:"scroll",paddingTop:".6em","& > :not(:first-child)":{marginTop:"1em"}},children:[(0,r.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column"},children:(0,r.jsx)(b.Z,{id:"ps-server-name",label:"Server name",inputProps:{onChange:function(e){var n=e.target.value;se(n),Jn({inputs:{serverName:{value:n}}})},value:ne},inputLabelProps:{isNotifyRequired:0===ne.length},messageBoxProps:je})}),(Rn="ps-cpu-cores",_n="CPU cores",Qn=Ie,qn={messageBoxProps:Ce,sliderProps:{onChange:function(e){var n=e;if(n!==Ie){Pe(n);var t=Hn({cpuCores:n}).maxCPUCores;Jn({inputs:{cpuCores:{max:t,value:n}}})}},max:De,min:1}},(0,r.jsx)(H,te({isAllowTextInput:!0,label:_n,labelId:"".concat(Rn,"-label"),value:Qn},qn))),(0,r.jsx)(Z,{id:"ps-memory",label:"Memory",messageBoxProps:Ne,inputWithLabelProps:{inputProps:{endAdornment:xe("".concat(We," ").concat(He),{onButtonClick:function(){Qe(We),Kn({cmValue:ze})}}),onChange:function(e){var n=e.target.value;Xn({value:n})},type:"number",value:_e},inputLabelProps:{isNotifyRequired:Ae===ue}},selectItems:pe,selectWithLabelProps:{selectProps:{onChange:function(e){var n=e.target.value;Xn({unit:n})},value:He}}}),Ke.stateIds.map((function(e,n){return function(e,n,t,o,i,s,l,c){var u=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;return e[t][r]},p=function(r,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n;e[r][i]=o,t(te({},e))},d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ue;p("sizes",t);var r=s({virtualDisks:e}),o=r.formattedMaxVDSizes,i=r.maxVirtualDiskSizes;c({inputs:$({},"vd".concat(n,"Size"),{displayMax:"".concat(o[n]),max:i[n],value:t})})},f=function(e){var n=e.value,t=void 0===n?u("inputSizes"):n,r=e.unit,o=void 0===r?u("inputUnits"):r;t!==u("inputSizes")&&p("inputSizes",t),o!==u("inputUnits")&&p("inputUnits",o),(0,x.KY)(t,o,(function(e){return d(e)}),(function(){return d()}))},v=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u("inputStorageGroupUUIDs");n!==u("inputStorageGroupUUIDs")&&p("inputStorageGroupUUIDs",n),s({virtualDisks:e})};return(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column","& > :not(:first-child)":{marginTop:"1em"}},children:[(0,r.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column"},children:(0,r.jsx)(Z,{id:"ps-virtual-disk-size-".concat(n),label:"Disk size",messageBoxProps:u("inputSizeMessages"),inputWithLabelProps:{inputProps:{endAdornment:xe("".concat(u("inputMaxes")," ").concat(u("inputUnits")),{onButtonClick:function(){p("inputSizes",u("inputMaxes")),d(u("maxes"))}}),onChange:function(e){var n=e.target.value;f({value:n})},type:"number",value:u("inputSizes")},inputLabelProps:{isNotifyRequired:u("sizes")===ue}},selectItems:pe,selectWithLabelProps:{selectProps:{onChange:function(e){var n=e.target.value;f({unit:n})},value:u("inputUnits")}}})}),(0,r.jsx)(a.Z,{sx:{display:"flex",flexDirection:"column"},children:(0,r.jsx)(U.Z,{id:"ps-storage-group-".concat(n),label:"Storage group",disableItem:function(e){return!(i.includes(e)&&u("sizes")<=l[e].storageGroupFree)},inputLabelProps:{isNotifyRequired:0===u("inputStorageGroupUUIDs").length},messageBoxProps:u("inputStorageGroupUUIDMessages"),selectItems:o,selectProps:{onChange:function(e){var n=e.target.value;v(n)},onClearIndicatorClick:function(){return v("")},renderValue:function(e){var n,t=null!==(n=l[e])&&void 0!==n?n:{},r=t.anvilName,o=void 0===r?"?":r,i=t.storageGroupName,a=void 0===i?"Unknown (".concat(e,")"):i;return"".concat(a," (").concat(o,")")},value:u("inputStorageGroupUUIDs")}})})]},"ps-virtual-disk-".concat(u("stateIds")))}(Ke,n,Xe,K,wn,Hn,z,Jn)})),(0,r.jsx)(U.Z,{disableItem:function(e){return e===sn},hideItem:function(e){return!On.includes(e)},id:"ps-install-image",inputLabelProps:{isNotifyRequired:0===en.length},label:"Install ISO",messageBoxProps:rn,selectItems:W,selectProps:{onChange:function(e){var n=e.target.value;$n(n)},onClearIndicatorClick:function(){return $n("")},value:en}}),(0,r.jsx)(U.Z,{disableItem:function(e){return e===en},hideItem:function(e){return!On.includes(e)},id:"ps-driver-image",label:"Driver ISO",messageBoxProps:cn,selectItems:W,selectProps:{onChange:function(e){var n=e.target.value;et(n)},onClearIndicatorClick:function(){return et("")},value:sn}}),(0,r.jsx)(U.Z,{disableItem:function(e){return!Un.includes(e)},id:"ps-anvil",inputLabelProps:{isNotifyRequired:0===pn.length},label:"Anvil node",messageBoxProps:vn,selectItems:N,selectProps:{onChange:function(e){var n=e.target.value;nt(n)},onClearIndicatorClick:function(){return nt("")},renderValue:function(e){var n,t=(null!==(n=I[e])&&void 0!==n?n:{}).anvilName;return void 0===t?"Unknown ".concat(e):t},value:pn}}),(0,r.jsx)(f.Z,{id:"ps-optimize-for-os",extendRenderInput:function(e){var n=e.inputLabelProps;(void 0===n?{}:n).isNotifyRequired=null===gn},isOptionEqualToValue:function(e,n){return e.key===n.key},label:"Optimize for OS",messageBoxProps:yn,noOptionsText:"No matching OS",onChange:function(e,n){hn(n)},openOnFocus:!0,options:_,renderOption:function(e,n){return(0,o.createElement)("li",te({},e,{key:"ps-optimize-for-os-".concat(n.key),children:[n.label," (",n.key,")"]}))},value:gn})]}):(0,r.jsx)(Y.Z,{}),(0,r.jsxs)(a.Z,{sx:{display:"flex",flexDirection:"column",marginTop:"1em","& > :not(:first-child)":{marginTop:"1em"}},children:[En>0&&(0,r.jsx)(h.Z,{isAllowClose:!0,text:"Provision server job registered. You can provision another server, or exit; it won't affect the registered job."}),Tn?(0,r.jsx)(Y.Z,{mt:0}):(0,r.jsx)(a.Z,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-end",width:"100%"},children:(0,r.jsx)(m.Z,{disabled:!Jn({isIgnoreOnCallbacks:!0}),onClick:function(){zn(!0)},sx:me,children:"Provision"})})]})]}),Bn&&(0,r.jsx)(v.Z,{actionProceedText:"Provision",content:(0,r.jsxs)(s.ZP,{container:!0,columns:8,direction:"column",children:[(0,r.jsx)(s.ZP,{direction:"row",item:!0,xs:8,children:(0,r.jsxs)(B.Ac,{children:["Server ",(0,r.jsx)(B.Q0,{text:ne})," will be created on anvil node"," ",(0,r.jsx)(B.Q0,{text:I[pn].anvilName})," ","with the following properties:"]})}),(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsx)(B.Ac,{text:"CPU"})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsxs)(B.Ac,{children:[(0,r.jsx)(B.Q0,{text:Ie})," core(s)"]})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsxs)(B.Ac,{children:[(0,r.jsx)(B.Q0,{text:De})," core(s) available"]})})]}),(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsx)(B.Ac,{text:"Memory"})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsx)(B.Ac,{children:(0,r.jsxs)(B.Q0,{children:[_e," ",He]})})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsxs)(B.Ac,{children:[(0,r.jsx)(B.Q0,{text:"".concat(We," ").concat(He)})," ","available"]})})]}),Ke.stateIds.map((function(e,n){var t=Ke.inputMaxes[n],o=Ke.inputSizes[n],i=Ke.inputUnits[n],a=z[Ke.inputStorageGroupUUIDs[n]].storageGroupName;return(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsxs)(B.Ac,{children:["Disk ",(0,r.jsx)(B.Q0,{text:n})]})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsxs)(B.Ac,{children:[(0,r.jsx)(B.Q0,{text:"".concat(o," ").concat(i)})," on"," ",a]})}),(0,r.jsx)(s.ZP,{item:!0,xs:3,children:(0,r.jsxs)(B.Ac,{children:[(0,r.jsx)(B.Q0,{text:"".concat(t," ").concat(i)})," ","available"]})})]},"ps-virtual-disk-".concat(e,"-summary"))})),(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsx)(B.Ac,{text:"Install ISO"})}),(0,r.jsx)(s.ZP,{item:!0,xs:6,children:(0,r.jsx)(B.Ac,{children:(0,r.jsx)(B.Q0,{children:D[en].fileName})})})]}),(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsx)(B.Ac,{text:"Driver ISO"})}),(0,r.jsx)(s.ZP,{item:!0,xs:6,children:(0,r.jsx)(B.Ac,{children:D[sn]?(0,r.jsx)(B.Q0,{children:D[sn].fileName}):"none"})})]}),(0,r.jsxs)(s.ZP,{container:!0,direction:"row",item:!0,xs:8,children:[(0,r.jsx)(s.ZP,{item:!0,xs:2,children:(0,r.jsx)(B.Ac,{text:"Optimize for OS"})}),(0,r.jsx)(s.ZP,{item:!0,xs:6,children:(0,r.jsx)(B.Ac,{text:"".concat(null===gn||void 0===gn?void 0:gn.label)})})]})]}),dialogProps:{open:Bn},onCancelAppend:function(){zn(!1)},onProceedAppend:function(){var e={serverName:ne,cpuCores:Ie,memory:Ae.toString(),virtualDisks:Ke.stateIds.map((function(e,n){return{storageSize:Ke.sizes[n].toString(),storageGroupUUID:Ke.inputStorageGroupUUIDs[n]}})),installISOFileUUID:en,driverISOFileUUID:sn,anvilUUID:pn,optimizeForOS:null===gn||void 0===gn?void 0:gn.key};Nn(!0),d.Z.post("/server",e).then((function(){Nn(!1),Wn(En+1)})),zn(!1)},proceedButtonProps:{sx:me},titleText:"Provision ".concat(ne,"?")})]})}},2519:function(e,n,t){t.d(n,{Z:function(){return D}});var r=t(5893),o=t(5603),i=t(8128),a=t(3640),s=t(7294),l=t(1363),c=t(4427),u=t(9),p=t(192),d=t(5537),f=t(9558),v=t(6239),m=t(7021),x=t(1057),g=t(4799),h=t(3213),b=t(7169);function y(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function j(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 U=function(e){var n=e.onClearIndicatorClick,t=S(e,["onClearIndicatorClick"]),i=t.sx,a=t.value,l=S(t,["sx","value"]),c=(0,s.useMemo)((function(){var e;return j((y(e={},"& .".concat(o.Z.icon),{color:b.s7}),y(e,"& .".concat(f.Z.root),{marginRight:".8em"}),y(e,"& .".concat(v.Z.root),{color:b.s7,visibility:"hidden"}),y(e,"&:hover .".concat(f.Z.root," .").concat(v.Z.root,",\n &.").concat(m.Z.focused," .").concat(f.Z.root," .").concat(v.Z.root),{visibility:"visible"}),e),i)}),[i]),u=(0,s.useMemo)((function(){return String(a).length>0&&n&&(0,r.jsx)(x.Z,{position:"end",children:(0,r.jsx)(g.Z,{onClick:n,children:(0,r.jsx)(d.Z,{fontSize:"small"})})})}),[n,a]);return(0,r.jsx)(h.Z,j({endAdornment:u,value:a},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 P(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 D=function(e){var n=e.id,t=e.label,d=e.selectItems,f=e.checkItem,v=e.disableItem,m=e.formControlProps,x=e.hideItem,g=e.inputLabelProps,h=void 0===g?{}:g,b=e.isReadOnly,y=void 0!==b&&b,j=e.messageBoxProps,S=void 0===j?{}:j,D=e.name,Z=e.onBlur,w=e.onChange,C=e.onFocus,M=e.required,k=e.selectProps,A=void 0===k?{}:k,G=A.multiple,B=A.sx,z=e.value,F=e.isCheckableItems,T=void 0===F?G:F,N=O(e.selectProps,["multiple","sx"]),L=(0,s.useMemo)((function(){return y?P(I({},"& .".concat(o.Z.icon),{visibility:"hidden"}),B):B}),[y,B]),E=(0,s.useCallback)((function(e){return T&&(0,r.jsx)(i.Z,{checked:null===f||void 0===f?void 0:f.call(null,e)})}),[f,T]),W=(0,s.useCallback)((function(e,t){return(0,r.jsxs)(c.Z,{disabled:null===v||void 0===v?void 0:v.call(null,e),sx:{display:(null===x||void 0===x?void 0:x.call(null,e))?"none":void 0},value:e,children:[E(e),t]},"".concat(n,"-").concat(e))}),[E,v,x,n]),V=(0,s.useMemo)((function(){return"".concat(n,"-select-element")}),[n]),R=(0,s.useMemo)((function(){return(0,r.jsx)(u.Z,{id:n,label:t})}),[n,t]),_=(0,s.useMemo)((function(){return t&&(0,r.jsx)(p.Z,P({htmlFor:V,isNotifyRequired:M},h,{children:t}))}),[h,M,t,V]),Q=(0,s.useMemo)((function(){return d.map((function(e){var n="string"===typeof e?{value:e}:e,t=n.value,r=n.displayValue;return W(t,void 0===r?t:r)}))}),[W,d]);return(0,r.jsxs)(a.Z,P({fullWidth:!0},m,{children:[_,(0,r.jsx)(U,P({id:V,input:R,multiple:G,name:D,onBlur:Z,onChange:w,onFocus:C,readOnly:y,value:z},N,{sx:L,children:Q})),(0,r.jsx)(l.Z,P({},S))]}))}},5737:function(e,n,t){t.d(n,{Bh:function(){return o},KY:function(){return i},MU:function(){return a}});var r=t(4490),o=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.fromUnit,o=n.onFailure,i=n.onSuccess,a=n.precision,s=n.toUnit,l=(0,r.gO)(e,{fromUnit:t,precision:a,toUnit:s});if(l){var c=l.value,u=l.unit;try{var p,d,f;null===i||void 0===i||null===(p=i.bigint)||void 0===p||p.call(null,BigInt(c),u),null===i||void 0===i||null===(d=i.number)||void 0===d||d.call(null,parseFloat(c),u),null===i||void 0===i||null===(f=i.string)||void 0===f||f.call(null,c,u)}catch(v){null===o||void 0===o||o.call(null,v,c,u)}}else null===o||void 0===o||o.call(null)},i=function(e,n,t,r){o(e,{fromUnit:n,onFailure:r,onSuccess:{bigint:t},precision:0,toUnit:"B"})},a=function(e){return(0,r._d)(e,{toUnit:"ibyte"})}}}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/pages/_app-7a436d09afd002b7.js b/striker-ui/out/_next/static/chunks/pages/_app-adb26b7c14183a1f.js similarity index 70% rename from striker-ui/out/_next/static/chunks/pages/_app-7a436d09afd002b7.js rename to striker-ui/out/_next/static/chunks/pages/_app-adb26b7c14183a1f.js index 66fedc6a..f5fab811 100644 --- a/striker-ui/out/_next/static/chunks/pages/_app-7a436d09afd002b7.js +++ b/striker-ui/out/_next/static/chunks/pages/_app-adb26b7c14183a1f.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[888],{4474:function(e,t,n){"use strict";n.d(t,{Z:function(){return ie}});var r=n(1526),i=Math.abs,a=String.fromCharCode,o=Object.assign;function c(e){return e.trim()}function u(e,t,n){return e.replace(t,n)}function s(e,t){return e.indexOf(t)}function f(e,t){return 0|e.charCodeAt(t)}function l(e,t,n){return e.slice(t,n)}function d(e){return e.length}function p(e){return e.length}function h(e,t){return t.push(e),e}var g=1,m=1,b=0,y=0,v=0,k="";function x(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:g,column:m,length:o,return:""}}function w(e,t){return o(x("",null,null,"",null,null,0),e,{length:-e.length},t)}function $(){return v=y>0?f(k,--y):0,m--,10===v&&(m=1,g--),v}function A(){return v=y2||j(v)>3?"":" "}function P(e,t){for(;--t&&A()&&!(v<48||v>102||v>57&&v<65||v>70&&v<97););return S(e,Z()+(t<6&&32==O()&&32==A()))}function T(e){for(;A();)switch(v){case e:return y;case 34:case 39:34!==e&&39!==e&&T(v);break;case 40:41===e&&T(e);break;case 92:A()}return y}function R(e,t){for(;A()&&e+v!==57&&(e+v!==84||47!==O()););return"/*"+S(t,y-1)+"*"+a(47===e?e:A())}function I(e){for(;!j(O());)A();return S(e,y)}var z="-ms-",B="-moz-",W="-webkit-",F="comm",N="rule",D="decl",L="@keyframes";function H(e,t){for(var n="",r=p(e),i=0;i6)switch(f(e,t+1)){case 109:if(45!==f(e,t+4))break;case 102:return u(e,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1"+B+(108==f(e,t+3)?"$3":"$2-$3"))+e;case 115:return~s(e,"stretch")?X(u(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==f(e,t+1))break;case 6444:switch(f(e,d(e)-3-(~s(e,"!important")&&10))){case 107:return u(e,":",":"+W)+e;case 101:return u(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+W+(45===f(e,14)?"inline-":"")+"box$3$1"+W+"$2$3$1"+z+"$2box$3")+e}break;case 5936:switch(f(e,t+11)){case 114:return W+e+z+u(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return W+e+z+u(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return W+e+z+u(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return W+e+z+e+e}return e}function q(e){return E(V("",null,null,null,[""],e=C(e),0,[0],e))}function V(e,t,n,r,i,o,c,f,l){for(var p=0,g=0,m=c,b=0,y=0,v=0,k=1,x=1,w=1,S=0,j="",C=i,E=o,T=r,z=j;x;)switch(v=S,S=A()){case 40:if(108!=v&&58==z.charCodeAt(m-1)){-1!=s(z+=u(M(S),"&","&\f"),"&\f")&&(w=-1);break}case 34:case 39:case 91:z+=M(S);break;case 9:case 10:case 13:case 32:z+=_(v);break;case 92:z+=P(Z()-1,7);continue;case 47:switch(O()){case 42:case 47:h(Y(R(A(),Z()),t,n),l);break;default:z+="/"}break;case 123*k:f[p++]=d(z)*w;case 125*k:case 59:case 0:switch(S){case 0:case 125:x=0;case 59+g:y>0&&d(z)-m&&h(y>32?J(z+";",r,n,m-1):J(u(z," ","")+";",r,n,m-2),l);break;case 59:z+=";";default:if(h(T=U(z,t,n,p,g,i,f,j,C=[],E=[],m),o),123===S)if(0===g)V(z,t,T,T,C,o,m,f,E);else switch(b){case 100:case 109:case 115:V(e,T,T,r&&h(U(e,T,T,0,0,i,f,j,i,C=[],m),E),i,E,m,f,r?C:E);break;default:V(z,T,T,T,[""],E,0,f,E)}}p=g=y=0,k=w=1,j=z="",m=c;break;case 58:m=1+d(z),y=v;default:if(k<1)if(123==S)--k;else if(125==S&&0==k++&&125==$())continue;switch(z+=a(S),S*k){case 38:w=g>0?1:(z+="\f",-1);break;case 44:f[p++]=(d(z)-1)*w,w=1;break;case 64:45===O()&&(z+=M(A())),b=O(),g=m=d(j=z+=I(Z())),S++;break;case 45:45===v&&2==d(z)&&(k=0)}}return o}function U(e,t,n,r,a,o,s,f,d,h,g){for(var m=a-1,b=0===a?o:[""],y=p(b),v=0,k=0,w=0;v0?b[$]+" "+A:u(A,/&\f/g,b[$])))&&(d[w++]=O);return x(e,t,n,0===a?N:f,d,h,g)}function Y(e,t,n){return x(e,t,n,F,a(v),l(e,2,-2),0)}function J(e,t,n,r){return x(e,t,n,D,l(e,0,r),l(e,r+1,-1),r)}var K=function(e,t,n){for(var r=0,i=0;r=i,i=O(),38===r&&12===i&&(t[n]=1),!j(i);)A();return S(e,y)},Q=function(e,t){return E(function(e,t){var n=-1,r=44;do{switch(j(r)){case 0:38===r&&12===O()&&(t[n]=1),e[n]+=K(y-1,t,n);break;case 2:e[n]+=M(r);break;case 4:if(44===r){e[++n]=58===O()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=a(r)}}while(r=A());return e}(C(e),t))},ee=new WeakMap,te=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||ee.get(n))&&!r){ee.set(e,!0);for(var i=[],a=Q(t,i),o=n.props,c=0,u=0;c-1&&!e.return)switch(e.type){case D:e.return=X(e.value,e.length);break;case L:return H([w(e,{value:u(e.value,"@","@"+W)})],r);case N:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return H([w(e,{props:[u(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return H([w(e,{props:[u(t,/:(plac\w+)/,":-webkit-input-$1")]}),w(e,{props:[u(t,/:(plac\w+)/,":-moz-$1")]}),w(e,{props:[u(t,/:(plac\w+)/,z+"input-$1")]})],r)}return""}))}}],ie=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var i=e.stylisPlugins||re;var a,o,c={},u=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},i={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},a=n(7866),o=/[A-Z]|^ms/g,c=/_EMO_([^_]+?)_([^]*?)_EMO_/g,u=function(e){return 45===e.charCodeAt(1)},s=function(e){return null!=e&&"boolean"!==typeof e},f=(0,a.Z)((function(e){return u(e)?e:e.replace(o,"-$&").toLowerCase()})),l=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(c,(function(e,t,n){return p={name:t,styles:n,next:p},t}))}return 1===i[e]||u(e)||"number"!==typeof t||0===t?t:t+"px"};function d(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return p={name:n.name,styles:n.styles,next:p},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)p={name:r.name,styles:r.styles,next:p},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;ie,r=(()=>{let e=n;return{configure(t){e=t},generate:t=>e(t),reset(){e=n}}})();t.Z=r},8979:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(9981);const i={active:"Mui-active",checked:"Mui-checked",completed:"Mui-completed",disabled:"Mui-disabled",error:"Mui-error",expanded:"Mui-expanded",focused:"Mui-focused",focusVisible:"Mui-focusVisible",required:"Mui-required",selected:"Mui-selected"};function a(e,t){return i[t]||`${r.Z.generate(e)}-${t}`}},6087:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(8979);function i(e,t){const n={};return t.forEach((t=>{n[t]=(0,r.Z)(e,t)})),n}},9632:function(e,t,n){"use strict";n.d(t,{H:function(){return i}});var r=n(8979);function i(e){return(0,r.Z)("MuiSwitch",e)}const a=(0,n(6087).Z)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]);t.Z=a},1265:function(e,t,n){"use strict";n.d(t,{Z:function(){return z}});var r=n(7462),i=n(3366),a=n(9766),o=n(6500);var c=n(1387),u=n(1796);var s={black:"#000",white:"#fff"};var f={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};var l={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"};var d={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"};var p={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"};var h={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"};var g={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"};var m={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};const b=["mode","contrastThreshold","tonalOffset"],y={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:s.white,default:s.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},v={text:{primary:s.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:s.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function k(e,t,n,r){const i=r.light||r,a=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,u.$n)(e.main,i):"dark"===t&&(e.dark=(0,u._j)(e.main,a)))}function x(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:o=.2}=e,x=(0,i.Z)(e,b),w=e.primary||function(e="light"){return"dark"===e?{main:h[200],light:h[50],dark:h[400]}:{main:h[700],light:h[400],dark:h[800]}}(t),$=e.secondary||function(e="light"){return"dark"===e?{main:l[200],light:l[50],dark:l[400]}:{main:l[500],light:l[300],dark:l[700]}}(t),A=e.error||function(e="light"){return"dark"===e?{main:d[500],light:d[300],dark:d[700]}:{main:d[700],light:d[400],dark:d[800]}}(t),O=e.info||function(e="light"){return"dark"===e?{main:g[400],light:g[300],dark:g[700]}:{main:g[700],light:g[500],dark:g[900]}}(t),Z=e.success||function(e="light"){return"dark"===e?{main:m[400],light:m[300],dark:m[700]}:{main:m[800],light:m[500],dark:m[900]}}(t),S=e.warning||function(e="light"){return"dark"===e?{main:p[400],light:p[300],dark:p[700]}:{main:"#ed6c02",light:p[500],dark:p[900]}}(t);function j(e){return(0,u.mi)(e,v.text.primary)>=n?v.text.primary:y.text.primary}const C=({color:e,name:t,mainShade:n=500,lightShade:i=300,darkShade:a=700})=>{if(!(e=(0,r.Z)({},e)).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error((0,c.Z)(11,t?` (${t})`:"",n));if("string"!==typeof e.main)throw new Error((0,c.Z)(12,t?` (${t})`:"",JSON.stringify(e.main)));return k(e,"light",i,o),k(e,"dark",a,o),e.contrastText||(e.contrastText=j(e.main)),e},E={dark:v,light:y};return(0,a.Z)((0,r.Z)({common:s,mode:t,primary:C({color:w,name:"primary"}),secondary:C({color:$,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:C({color:A,name:"error"}),warning:C({color:S,name:"warning"}),info:C({color:O,name:"info"}),success:C({color:Z,name:"success"}),grey:f,contrastThreshold:n,getContrastText:j,augmentColor:C,tonalOffset:o},E[t]),x)}const w=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];const $={textTransform:"uppercase"},A='"Roboto", "Helvetica", "Arial", sans-serif';function O(e,t){const n="function"===typeof t?t(e):t,{fontFamily:o=A,fontSize:c=14,fontWeightLight:u=300,fontWeightRegular:s=400,fontWeightMedium:f=500,fontWeightBold:l=700,htmlFontSize:d=16,allVariants:p,pxToRem:h}=n,g=(0,i.Z)(n,w);const m=c/14,b=h||(e=>e/d*m+"rem"),y=(e,t,n,i,a)=>{return(0,r.Z)({fontFamily:o,fontWeight:e,fontSize:b(t),lineHeight:n},o===A?{letterSpacing:(c=i/t,Math.round(1e5*c)/1e5)+"em"}:{},a,p);var c},v={h1:y(u,96,1.167,-1.5),h2:y(u,60,1.2,-.5),h3:y(s,48,1.167,0),h4:y(s,34,1.235,.25),h5:y(s,24,1.334,0),h6:y(f,20,1.6,.15),subtitle1:y(s,16,1.75,.15),subtitle2:y(f,14,1.57,.1),body1:y(s,16,1.5,.15),body2:y(s,14,1.43,.15),button:y(f,14,1.75,.4,$),caption:y(s,12,1.66,.4),overline:y(s,12,2.66,1,$)};return(0,a.Z)((0,r.Z)({htmlFontSize:d,pxToRem:b,fontFamily:o,fontSize:c,fontWeightLight:u,fontWeightRegular:s,fontWeightMedium:f,fontWeightBold:l},v),g,{clone:!1})}function Z(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}var S=["none",Z(0,2,1,-1,0,1,1,0,0,1,3,0),Z(0,3,1,-2,0,2,2,0,0,1,5,0),Z(0,3,3,-2,0,3,4,0,0,1,8,0),Z(0,2,4,-1,0,4,5,0,0,1,10,0),Z(0,3,5,-1,0,5,8,0,0,1,14,0),Z(0,3,5,-1,0,6,10,0,0,1,18,0),Z(0,4,5,-2,0,7,10,1,0,2,16,1),Z(0,5,5,-3,0,8,10,1,0,3,14,2),Z(0,5,6,-3,0,9,12,1,0,3,16,2),Z(0,6,6,-3,0,10,14,1,0,4,18,3),Z(0,6,7,-4,0,11,15,1,0,4,20,3),Z(0,7,8,-4,0,12,17,2,0,5,22,4),Z(0,7,8,-4,0,13,19,2,0,5,24,4),Z(0,7,9,-4,0,14,21,2,0,5,26,4),Z(0,8,9,-5,0,15,22,2,0,6,28,5),Z(0,8,10,-5,0,16,24,2,0,6,30,5),Z(0,8,11,-5,0,17,26,2,0,6,32,5),Z(0,9,11,-5,0,18,28,2,0,7,34,6),Z(0,9,12,-6,0,19,29,2,0,7,36,6),Z(0,10,13,-6,0,20,31,3,0,8,38,7),Z(0,10,13,-6,0,21,33,3,0,8,40,7),Z(0,10,14,-6,0,22,35,3,0,8,42,7),Z(0,11,14,-7,0,23,36,3,0,9,44,8),Z(0,11,15,-7,0,24,38,3,0,9,46,8)];const j=["duration","easing","delay"],C={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},E={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function M(e){return`${Math.round(e)}ms`}function _(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function P(e){const t=(0,r.Z)({},C,e.easing),n=(0,r.Z)({},E,e.duration);return(0,r.Z)({getAutoHeightDuration:_,create:(e=["all"],r={})=>{const{duration:a=n.standard,easing:o=t.easeInOut,delay:c=0}=r;(0,i.Z)(r,j);return(Array.isArray(e)?e:[e]).map((e=>`${e} ${"string"===typeof a?a:M(a)} ${o} ${"string"===typeof c?c:M(c)}`)).join(",")}},e,{easing:t,duration:n})}var T={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};const R=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function I(e={},...t){const{mixins:n={},palette:c={},transitions:u={},typography:s={}}=e,f=(0,i.Z)(e,R),l=x(c),d=(0,o.Z)(e);let p=(0,a.Z)(d,{mixins:(h=d.breakpoints,d.spacing,g=n,(0,r.Z)({toolbar:{minHeight:56,[`${h.up("xs")} and (orientation: landscape)`]:{minHeight:48},[h.up("sm")]:{minHeight:64}}},g)),palette:l,shadows:S.slice(),typography:O(l,s),transitions:P(u),zIndex:(0,r.Z)({},T)});var h,g;return p=(0,a.Z)(p,f),p=t.reduce(((e,t)=>(0,a.Z)(e,t)),p),p}var z=I},4819:function(e,t,n){"use strict";const r=n(7294).createContext(null);t.Z=r},6760:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(7294),i=n(4819);function a(){return r.useContext(i.Z)}},5408:function(e,t,n){"use strict";n.d(t,{VO:function(){return r},k9:function(){return a},W8:function(){return o},L7:function(){return c},P$:function(){return u}});const r={xs:0,sm:600,md:900,lg:1200,xl:1536},i={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${r[e]}px)`};function a(e,t,n){const a=e.theme||{};if(Array.isArray(t)){const e=a.breakpoints||i;return t.reduce(((r,i,a)=>(r[e.up(e.keys[a])]=n(t[a]),r)),{})}if("object"===typeof t){const e=a.breakpoints||i;return Object.keys(t).reduce(((i,a)=>{if(-1!==Object.keys(e.values||r).indexOf(a)){i[e.up(a)]=n(t[a],a)}else{const e=a;i[e]=t[e]}return i}),{})}return n(t)}function o(e={}){var t;return(null==e||null==(t=e.keys)?void 0:t.reduce(((t,n)=>(t[e.up(n)]={},t)),{}))||{}}function c(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}function u({values:e,breakpoints:t,base:n}){const r=n||function(e,t){if("object"!==typeof e)return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach(((t,r)=>{r{null!=e[t]&&(n[t]=!0)})),n}(e,t),i=Object.keys(r);if(0===i.length)return e;let a;return i.reduce(((t,n,r)=>(Array.isArray(e)?(t[n]=null!=e[r]?e[r]:e[a],a=r):(t[n]=null!=e[n]?e[n]:e[a]||e,a=n),t)),{})}},1796:function(e,t,n){"use strict";n.d(t,{mi:function(){return u},Fq:function(){return s},_j:function(){return f},$n:function(){return l}});var r=n(1387);function i(e,t=0,n=1){return Math.min(Math.max(t,e),n)}function a(e){if(e.type)return e;if("#"===e.charAt(0))return a(function(e){e=e.substr(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?`rgb${4===n.length?"a":""}(${n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,r.Z)(9,e));let i,o=e.substring(t+1,e.length-1);if("color"===n){if(o=o.split(" "),i=o.shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].substr(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i))throw new Error((0,r.Z)(10,i))}else o=o.split(",");return o=o.map((e=>parseFloat(e))),{type:n,values:o,colorSpace:i}}function o(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=-1!==t.indexOf("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function c(e){let t="hsl"===(e=a(e)).type?a(function(e){e=a(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,c=r*Math.min(i,1-i),u=(e,t=(e+n/30)%12)=>i-c*Math.max(Math.min(t-3,9-t,1),-1);let s="rgb";const f=[Math.round(255*u(0)),Math.round(255*u(8)),Math.round(255*u(4))];return"hsla"===e.type&&(s+="a",f.push(t[3])),o({type:s,values:f})}(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function u(e,t){const n=c(e),r=c(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function s(e,t){return e=a(e),t=i(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,o(e)}function f(e,t){if(e=a(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return o(e)}function l(e,t){if(e=a(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return o(e)}},6500:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(7462),i=n(3366),a=n(9766);const o=["values","unit","step"];function c(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:a=5}=e,c=(0,i.Z)(e,o),u=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>(0,r.Z)({},e,{[t.key]:t.val})),{})})(t),s=Object.keys(u);function f(e){return`@media (min-width:${"number"===typeof t[e]?t[e]:e}${n})`}function l(e){return`@media (max-width:${("number"===typeof t[e]?t[e]:e)-a/100}${n})`}function d(e,r){const i=s.indexOf(r);return`@media (min-width:${"number"===typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"===typeof t[s[i]]?t[s[i]]:r)-a/100}${n})`}return(0,r.Z)({keys:s,values:u,up:f,down:l,between:d,only:function(e){return s.indexOf(e)+1(0===e.length?[1]:e).map((e=>{const n=t(e);return"number"===typeof n?`${n}px`:n})).join(" ");return n.mui=!0,n}(l);let m=(0,a.Z)({breakpoints:h,direction:"ltr",components:{},palette:(0,r.Z)({mode:"light"},o),spacing:g,shape:(0,r.Z)({},u,d)},p);return m=t.reduce(((e,t)=>(0,a.Z)(e,t)),m),m}},7730:function(e,t,n){"use strict";var r=n(9766);t.Z=function(e,t){return t?(0,r.Z)(e,t,{clone:!1}):e}},8700:function(e,t,n){"use strict";n.d(t,{hB:function(){return h},eI:function(){return p},ZP:function(){return x},NA:function(){return g}});var r=n(5408),i=n(4844),a=n(7730);const o={m:"margin",p:"padding"},c={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},u={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},s=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}((e=>{if(e.length>2){if(!u[e])return[e];e=u[e]}const[t,n]=e.split(""),r=o[t],i=c[n]||"";return Array.isArray(i)?i.map((e=>r+e)):[r+i]})),f=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],l=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],d=[...f,...l];function p(e,t,n,r){const a=(0,i.D)(e,t)||n;return"number"===typeof a?e=>"string"===typeof e?e:a*e:Array.isArray(a)?e=>"string"===typeof e?e:a[e]:"function"===typeof a?a:()=>{}}function h(e){return p(e,"spacing",8)}function g(e,t){if("string"===typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"===typeof n?-n:`-${n}`}function m(e,t,n,i){if(-1===t.indexOf(n))return null;const a=function(e,t){return n=>e.reduce(((e,r)=>(e[r]=g(t,n),e)),{})}(s(n),i),o=e[n];return(0,r.k9)(e,o,a)}function b(e,t){const n=h(e.theme);return Object.keys(e).map((r=>m(e,t,r,n))).reduce(a.Z,{})}function y(e){return b(e,f)}function v(e){return b(e,l)}function k(e){return b(e,d)}y.propTypes={},y.filterProps=f,v.propTypes={},v.filterProps=l,k.propTypes={},k.filterProps=d;var x=k},4844:function(e,t,n){"use strict";n.d(t,{D:function(){return a}});var r=n(8320),i=n(5408);function a(e,t){return t&&"string"===typeof t?t.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e):null}function o(e,t,n,r=n){let i;return i="function"===typeof e?e(n):Array.isArray(e)?e[n]||r:a(e,n)||r,t&&(i=t(i)),i}t.Z=function(e){const{prop:t,cssProperty:n=e.prop,themeKey:c,transform:u}=e,s=e=>{if(null==e[t])return null;const s=e[t],f=a(e.theme,c)||{};return(0,i.k9)(e,s,(e=>{let i=o(f,u,e);return e===i&&"string"===typeof e&&(i=o(f,u,`${t}${"default"===e?"":(0,r.Z)(e)}`,e)),!1===n?i:{[n]:i}}))};return s.propTypes={},s.filterProps=[t],s}},6682:function(e,t,n){"use strict";var r=n(6500),i=n(4168);const a=(0,r.Z)();t.Z=function(e=a){return(0,i.Z)(e)}},4168:function(e,t,n){"use strict";var r=n(6760);t.Z=function(e=null){const t=(0,r.Z)();return t&&(n=t,0!==Object.keys(n).length)?t:e;var n}},8320:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1387);function i(e){if("string"!==typeof e)throw new Error((0,r.Z)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},9766:function(e,t,n){"use strict";n.d(t,{P:function(){return i},Z:function(){return a}});var r=n(7462);function i(e){return null!==e&&"object"===typeof e&&e.constructor===Object}function a(e,t,n={clone:!0}){const o=n.clone?(0,r.Z)({},e):e;return i(e)&&i(t)&&Object.keys(t).forEach((r=>{"__proto__"!==r&&(i(t[r])&&r in e&&i(e[r])?o[r]=a(e[r],t[r],n):o[r]=t[r])})),o}},1387:function(e,t,n){"use strict";function r(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n{const e=null===s?n:function(e,t){if("function"===typeof t)return t(e);return(0,a.Z)({},e,t)}(s,n);return null!=e&&(e[u]=null!==s),e}),[n,s]);return(0,r.jsx)(o.Z.Provider,{value:f,children:t})},f=n(4880),l=n(6682);function d(e){const t=(0,l.Z)();return(0,r.jsx)(f.T.Provider,{value:"object"===typeof t?t:{},children:e.children})}var p,h=function(e){const{children:t,theme:n}=e;return(0,r.jsx)(s,{theme:n,children:(0,r.jsx)(d,{children:t})})},g=n(4474),m=function(){return(0,g.Z)({key:"css"})},b=n(1265),y=n(9632),v=(n(5850),n(3329),n(5703),n(7014),n(2261),n(2154),n(7169));function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var x=(0,b.Z)({palette:{primary:{main:v.v9},secondary:{main:v.lD},background:{paper:v.v9}},typography:{fontFamily:['"Roboto Condensed"','"Source Code Pro"'].join(","),fontWeightRegular:200,fontSize:14},components:{MuiSwitch:{styleOverrides:{switchBase:{color:v.lD},root:{padding:8},track:(p={borderRadius:v.n_,border:3,backgroundColor:v.Wd,opacity:1},k(p,".".concat(y.Z.checked,".").concat(y.Z.checked," + &"),{backgroundColor:v.Ej,opacity:1}),k(p,".".concat(y.Z.disabled,".").concat(y.Z.disabled," + &"),{backgroundColor:v.rr}),p),thumb:{color:v.lD,borderRadius:v.n_}}}}});n(906);function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $(e){for(var t=1;t=0||(i[n]=e[n]);return i}n.d(t,{Z:function(){return r}})}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[774,179],(function(){return t(6363),t(387)}));var n=e.O();_N_E=n}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[888],{4474:function(e,t,n){"use strict";n.d(t,{Z:function(){return ie}});var r=n(1526),i=Math.abs,a=String.fromCharCode,o=Object.assign;function c(e){return e.trim()}function u(e,t,n){return e.replace(t,n)}function s(e,t){return e.indexOf(t)}function f(e,t){return 0|e.charCodeAt(t)}function l(e,t,n){return e.slice(t,n)}function d(e){return e.length}function p(e){return e.length}function h(e,t){return t.push(e),e}var g=1,m=1,b=0,y=0,v=0,k="";function x(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:g,column:m,length:o,return:""}}function w(e,t){return o(x("",null,null,"",null,null,0),e,{length:-e.length},t)}function A(){return v=y>0?f(k,--y):0,m--,10===v&&(m=1,g--),v}function $(){return v=y2||C(v)>3?"":" "}function T(e,t){for(;--t&&$()&&!(v<48||v>102||v>57&&v<65||v>70&&v<97););return S(e,Z()+(t<6&&32==O()&&32==$()))}function P(e){for(;$();)switch(v){case e:return y;case 34:case 39:34!==e&&39!==e&&P(v);break;case 40:41===e&&P(e);break;case 92:$()}return y}function R(e,t){for(;$()&&e+v!==57&&(e+v!==84||47!==O()););return"/*"+S(t,y-1)+"*"+a(47===e?e:$())}function I(e){for(;!C(O());)$();return S(e,y)}var z="-ms-",W="-moz-",B="-webkit-",F="comm",N="rule",D="decl",L="@keyframes";function H(e,t){for(var n="",r=p(e),i=0;i6)switch(f(e,t+1)){case 109:if(45!==f(e,t+4))break;case 102:return u(e,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1"+W+(108==f(e,t+3)?"$3":"$2-$3"))+e;case 115:return~s(e,"stretch")?U(u(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==f(e,t+1))break;case 6444:switch(f(e,d(e)-3-(~s(e,"!important")&&10))){case 107:return u(e,":",":"+B)+e;case 101:return u(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+B+(45===f(e,14)?"inline-":"")+"box$3$1"+B+"$2$3$1"+z+"$2box$3")+e}break;case 5936:switch(f(e,t+11)){case 114:return B+e+z+u(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return B+e+z+u(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return B+e+z+u(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return B+e+z+e+e}return e}function X(e){return E(q("",null,null,null,[""],e=j(e),0,[0],e))}function q(e,t,n,r,i,o,c,f,l){for(var p=0,g=0,m=c,b=0,y=0,v=0,k=1,x=1,w=1,S=0,C="",j=i,E=o,P=r,z=C;x;)switch(v=S,S=$()){case 40:if(108!=v&&58==z.charCodeAt(m-1)){-1!=s(z+=u(M(S),"&","&\f"),"&\f")&&(w=-1);break}case 34:case 39:case 91:z+=M(S);break;case 9:case 10:case 13:case 32:z+=_(v);break;case 92:z+=T(Z()-1,7);continue;case 47:switch(O()){case 42:case 47:h(Y(R($(),Z()),t,n),l);break;default:z+="/"}break;case 123*k:f[p++]=d(z)*w;case 125*k:case 59:case 0:switch(S){case 0:case 125:x=0;case 59+g:y>0&&d(z)-m&&h(y>32?J(z+";",r,n,m-1):J(u(z," ","")+";",r,n,m-2),l);break;case 59:z+=";";default:if(h(P=V(z,t,n,p,g,i,f,C,j=[],E=[],m),o),123===S)if(0===g)q(z,t,P,P,j,o,m,f,E);else switch(b){case 100:case 109:case 115:q(e,P,P,r&&h(V(e,P,P,0,0,i,f,C,i,j=[],m),E),i,E,m,f,r?j:E);break;default:q(z,P,P,P,[""],E,0,f,E)}}p=g=y=0,k=w=1,C=z="",m=c;break;case 58:m=1+d(z),y=v;default:if(k<1)if(123==S)--k;else if(125==S&&0==k++&&125==A())continue;switch(z+=a(S),S*k){case 38:w=g>0?1:(z+="\f",-1);break;case 44:f[p++]=(d(z)-1)*w,w=1;break;case 64:45===O()&&(z+=M($())),b=O(),g=m=d(C=z+=I(Z())),S++;break;case 45:45===v&&2==d(z)&&(k=0)}}return o}function V(e,t,n,r,a,o,s,f,d,h,g){for(var m=a-1,b=0===a?o:[""],y=p(b),v=0,k=0,w=0;v0?b[A]+" "+$:u($,/&\f/g,b[A])))&&(d[w++]=O);return x(e,t,n,0===a?N:f,d,h,g)}function Y(e,t,n){return x(e,t,n,F,a(v),l(e,2,-2),0)}function J(e,t,n,r){return x(e,t,n,D,l(e,0,r),l(e,r+1,-1),r)}var K=function(e,t,n){for(var r=0,i=0;r=i,i=O(),38===r&&12===i&&(t[n]=1),!C(i);)$();return S(e,y)},Q=function(e,t){return E(function(e,t){var n=-1,r=44;do{switch(C(r)){case 0:38===r&&12===O()&&(t[n]=1),e[n]+=K(y-1,t,n);break;case 2:e[n]+=M(r);break;case 4:if(44===r){e[++n]=58===O()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=a(r)}}while(r=$());return e}(j(e),t))},ee=new WeakMap,te=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||ee.get(n))&&!r){ee.set(e,!0);for(var i=[],a=Q(t,i),o=n.props,c=0,u=0;c-1&&!e.return)switch(e.type){case D:e.return=U(e.value,e.length);break;case L:return H([w(e,{value:u(e.value,"@","@"+B)})],r);case N:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return H([w(e,{props:[u(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return H([w(e,{props:[u(t,/:(plac\w+)/,":-webkit-input-$1")]}),w(e,{props:[u(t,/:(plac\w+)/,":-moz-$1")]}),w(e,{props:[u(t,/:(plac\w+)/,z+"input-$1")]})],r)}return""}))}}],ie=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var i=e.stylisPlugins||re;var a,o,c={},u=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},i={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},a=n(7866),o=/[A-Z]|^ms/g,c=/_EMO_([^_]+?)_([^]*?)_EMO_/g,u=function(e){return 45===e.charCodeAt(1)},s=function(e){return null!=e&&"boolean"!==typeof e},f=(0,a.Z)((function(e){return u(e)?e:e.replace(o,"-$&").toLowerCase()})),l=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(c,(function(e,t,n){return p={name:t,styles:n,next:p},t}))}return 1===i[e]||u(e)||"number"!==typeof t||0===t?t:t+"px"};function d(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return p={name:n.name,styles:n.styles,next:p},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)p={name:r.name,styles:r.styles,next:p},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;ie,r=(()=>{let e=n;return{configure(t){e=t},generate:t=>e(t),reset(){e=n}}})();t.Z=r},8979:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(9981);const i={active:"Mui-active",checked:"Mui-checked",completed:"Mui-completed",disabled:"Mui-disabled",error:"Mui-error",expanded:"Mui-expanded",focused:"Mui-focused",focusVisible:"Mui-focusVisible",required:"Mui-required",selected:"Mui-selected"};function a(e,t){return i[t]||`${r.Z.generate(e)}-${t}`}},6087:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(8979);function i(e,t){const n={};return t.forEach((t=>{n[t]=(0,r.Z)(e,t)})),n}},9632:function(e,t,n){"use strict";n.d(t,{H:function(){return i}});var r=n(8979);function i(e){return(0,r.Z)("MuiSwitch",e)}const a=(0,n(6087).Z)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]);t.Z=a},1265:function(e,t,n){"use strict";n.d(t,{Z:function(){return z}});var r=n(7462),i=n(3366),a=n(9766),o=n(6500);var c=n(1387),u=n(1796);var s={black:"#000",white:"#fff"};var f={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};var l={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"};var d={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"};var p={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"};var h={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"};var g={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"};var m={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};const b=["mode","contrastThreshold","tonalOffset"],y={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:s.white,default:s.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},v={text:{primary:s.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:s.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function k(e,t,n,r){const i=r.light||r,a=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,u.$n)(e.main,i):"dark"===t&&(e.dark=(0,u._j)(e.main,a)))}function x(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:o=.2}=e,x=(0,i.Z)(e,b),w=e.primary||function(e="light"){return"dark"===e?{main:h[200],light:h[50],dark:h[400]}:{main:h[700],light:h[400],dark:h[800]}}(t),A=e.secondary||function(e="light"){return"dark"===e?{main:l[200],light:l[50],dark:l[400]}:{main:l[500],light:l[300],dark:l[700]}}(t),$=e.error||function(e="light"){return"dark"===e?{main:d[500],light:d[300],dark:d[700]}:{main:d[700],light:d[400],dark:d[800]}}(t),O=e.info||function(e="light"){return"dark"===e?{main:g[400],light:g[300],dark:g[700]}:{main:g[700],light:g[500],dark:g[900]}}(t),Z=e.success||function(e="light"){return"dark"===e?{main:m[400],light:m[300],dark:m[700]}:{main:m[800],light:m[500],dark:m[900]}}(t),S=e.warning||function(e="light"){return"dark"===e?{main:p[400],light:p[300],dark:p[700]}:{main:"#ed6c02",light:p[500],dark:p[900]}}(t);function C(e){return(0,u.mi)(e,v.text.primary)>=n?v.text.primary:y.text.primary}const j=({color:e,name:t,mainShade:n=500,lightShade:i=300,darkShade:a=700})=>{if(!(e=(0,r.Z)({},e)).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error((0,c.Z)(11,t?` (${t})`:"",n));if("string"!==typeof e.main)throw new Error((0,c.Z)(12,t?` (${t})`:"",JSON.stringify(e.main)));return k(e,"light",i,o),k(e,"dark",a,o),e.contrastText||(e.contrastText=C(e.main)),e},E={dark:v,light:y};return(0,a.Z)((0,r.Z)({common:s,mode:t,primary:j({color:w,name:"primary"}),secondary:j({color:A,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:j({color:$,name:"error"}),warning:j({color:S,name:"warning"}),info:j({color:O,name:"info"}),success:j({color:Z,name:"success"}),grey:f,contrastThreshold:n,getContrastText:C,augmentColor:j,tonalOffset:o},E[t]),x)}const w=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];const A={textTransform:"uppercase"},$='"Roboto", "Helvetica", "Arial", sans-serif';function O(e,t){const n="function"===typeof t?t(e):t,{fontFamily:o=$,fontSize:c=14,fontWeightLight:u=300,fontWeightRegular:s=400,fontWeightMedium:f=500,fontWeightBold:l=700,htmlFontSize:d=16,allVariants:p,pxToRem:h}=n,g=(0,i.Z)(n,w);const m=c/14,b=h||(e=>e/d*m+"rem"),y=(e,t,n,i,a)=>{return(0,r.Z)({fontFamily:o,fontWeight:e,fontSize:b(t),lineHeight:n},o===$?{letterSpacing:(c=i/t,Math.round(1e5*c)/1e5)+"em"}:{},a,p);var c},v={h1:y(u,96,1.167,-1.5),h2:y(u,60,1.2,-.5),h3:y(s,48,1.167,0),h4:y(s,34,1.235,.25),h5:y(s,24,1.334,0),h6:y(f,20,1.6,.15),subtitle1:y(s,16,1.75,.15),subtitle2:y(f,14,1.57,.1),body1:y(s,16,1.5,.15),body2:y(s,14,1.43,.15),button:y(f,14,1.75,.4,A),caption:y(s,12,1.66,.4),overline:y(s,12,2.66,1,A)};return(0,a.Z)((0,r.Z)({htmlFontSize:d,pxToRem:b,fontFamily:o,fontSize:c,fontWeightLight:u,fontWeightRegular:s,fontWeightMedium:f,fontWeightBold:l},v),g,{clone:!1})}function Z(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}var S=["none",Z(0,2,1,-1,0,1,1,0,0,1,3,0),Z(0,3,1,-2,0,2,2,0,0,1,5,0),Z(0,3,3,-2,0,3,4,0,0,1,8,0),Z(0,2,4,-1,0,4,5,0,0,1,10,0),Z(0,3,5,-1,0,5,8,0,0,1,14,0),Z(0,3,5,-1,0,6,10,0,0,1,18,0),Z(0,4,5,-2,0,7,10,1,0,2,16,1),Z(0,5,5,-3,0,8,10,1,0,3,14,2),Z(0,5,6,-3,0,9,12,1,0,3,16,2),Z(0,6,6,-3,0,10,14,1,0,4,18,3),Z(0,6,7,-4,0,11,15,1,0,4,20,3),Z(0,7,8,-4,0,12,17,2,0,5,22,4),Z(0,7,8,-4,0,13,19,2,0,5,24,4),Z(0,7,9,-4,0,14,21,2,0,5,26,4),Z(0,8,9,-5,0,15,22,2,0,6,28,5),Z(0,8,10,-5,0,16,24,2,0,6,30,5),Z(0,8,11,-5,0,17,26,2,0,6,32,5),Z(0,9,11,-5,0,18,28,2,0,7,34,6),Z(0,9,12,-6,0,19,29,2,0,7,36,6),Z(0,10,13,-6,0,20,31,3,0,8,38,7),Z(0,10,13,-6,0,21,33,3,0,8,40,7),Z(0,10,14,-6,0,22,35,3,0,8,42,7),Z(0,11,14,-7,0,23,36,3,0,9,44,8),Z(0,11,15,-7,0,24,38,3,0,9,46,8)];const C=["duration","easing","delay"],j={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},E={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function M(e){return`${Math.round(e)}ms`}function _(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function T(e){const t=(0,r.Z)({},j,e.easing),n=(0,r.Z)({},E,e.duration);return(0,r.Z)({getAutoHeightDuration:_,create:(e=["all"],r={})=>{const{duration:a=n.standard,easing:o=t.easeInOut,delay:c=0}=r;(0,i.Z)(r,C);return(Array.isArray(e)?e:[e]).map((e=>`${e} ${"string"===typeof a?a:M(a)} ${o} ${"string"===typeof c?c:M(c)}`)).join(",")}},e,{easing:t,duration:n})}var P={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};const R=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function I(e={},...t){const{mixins:n={},palette:c={},transitions:u={},typography:s={}}=e,f=(0,i.Z)(e,R),l=x(c),d=(0,o.Z)(e);let p=(0,a.Z)(d,{mixins:(h=d.breakpoints,d.spacing,g=n,(0,r.Z)({toolbar:{minHeight:56,[`${h.up("xs")} and (orientation: landscape)`]:{minHeight:48},[h.up("sm")]:{minHeight:64}}},g)),palette:l,shadows:S.slice(),typography:O(l,s),transitions:T(u),zIndex:(0,r.Z)({},P)});var h,g;return p=(0,a.Z)(p,f),p=t.reduce(((e,t)=>(0,a.Z)(e,t)),p),p}var z=I},4819:function(e,t,n){"use strict";const r=n(7294).createContext(null);t.Z=r},6760:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(7294),i=n(4819);function a(){return r.useContext(i.Z)}},5408:function(e,t,n){"use strict";n.d(t,{VO:function(){return r},k9:function(){return a},W8:function(){return o},L7:function(){return c},P$:function(){return u}});const r={xs:0,sm:600,md:900,lg:1200,xl:1536},i={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${r[e]}px)`};function a(e,t,n){const a=e.theme||{};if(Array.isArray(t)){const e=a.breakpoints||i;return t.reduce(((r,i,a)=>(r[e.up(e.keys[a])]=n(t[a]),r)),{})}if("object"===typeof t){const e=a.breakpoints||i;return Object.keys(t).reduce(((i,a)=>{if(-1!==Object.keys(e.values||r).indexOf(a)){i[e.up(a)]=n(t[a],a)}else{const e=a;i[e]=t[e]}return i}),{})}return n(t)}function o(e={}){var t;return(null==e||null==(t=e.keys)?void 0:t.reduce(((t,n)=>(t[e.up(n)]={},t)),{}))||{}}function c(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}function u({values:e,breakpoints:t,base:n}){const r=n||function(e,t){if("object"!==typeof e)return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach(((t,r)=>{r{null!=e[t]&&(n[t]=!0)})),n}(e,t),i=Object.keys(r);if(0===i.length)return e;let a;return i.reduce(((t,n,r)=>(Array.isArray(e)?(t[n]=null!=e[r]?e[r]:e[a],a=r):(t[n]=null!=e[n]?e[n]:e[a]||e,a=n),t)),{})}},1796:function(e,t,n){"use strict";n.d(t,{mi:function(){return u},Fq:function(){return s},_j:function(){return f},$n:function(){return l}});var r=n(1387);function i(e,t=0,n=1){return Math.min(Math.max(t,e),n)}function a(e){if(e.type)return e;if("#"===e.charAt(0))return a(function(e){e=e.substr(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?`rgb${4===n.length?"a":""}(${n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,r.Z)(9,e));let i,o=e.substring(t+1,e.length-1);if("color"===n){if(o=o.split(" "),i=o.shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].substr(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i))throw new Error((0,r.Z)(10,i))}else o=o.split(",");return o=o.map((e=>parseFloat(e))),{type:n,values:o,colorSpace:i}}function o(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=-1!==t.indexOf("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function c(e){let t="hsl"===(e=a(e)).type?a(function(e){e=a(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,c=r*Math.min(i,1-i),u=(e,t=(e+n/30)%12)=>i-c*Math.max(Math.min(t-3,9-t,1),-1);let s="rgb";const f=[Math.round(255*u(0)),Math.round(255*u(8)),Math.round(255*u(4))];return"hsla"===e.type&&(s+="a",f.push(t[3])),o({type:s,values:f})}(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function u(e,t){const n=c(e),r=c(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function s(e,t){return e=a(e),t=i(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,o(e)}function f(e,t){if(e=a(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return o(e)}function l(e,t){if(e=a(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return o(e)}},6500:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(7462),i=n(3366),a=n(9766);const o=["values","unit","step"];function c(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:a=5}=e,c=(0,i.Z)(e,o),u=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>(0,r.Z)({},e,{[t.key]:t.val})),{})})(t),s=Object.keys(u);function f(e){return`@media (min-width:${"number"===typeof t[e]?t[e]:e}${n})`}function l(e){return`@media (max-width:${("number"===typeof t[e]?t[e]:e)-a/100}${n})`}function d(e,r){const i=s.indexOf(r);return`@media (min-width:${"number"===typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"===typeof t[s[i]]?t[s[i]]:r)-a/100}${n})`}return(0,r.Z)({keys:s,values:u,up:f,down:l,between:d,only:function(e){return s.indexOf(e)+1(0===e.length?[1]:e).map((e=>{const n=t(e);return"number"===typeof n?`${n}px`:n})).join(" ");return n.mui=!0,n}(l);let m=(0,a.Z)({breakpoints:h,direction:"ltr",components:{},palette:(0,r.Z)({mode:"light"},o),spacing:g,shape:(0,r.Z)({},u,d)},p);return m=t.reduce(((e,t)=>(0,a.Z)(e,t)),m),m}},7730:function(e,t,n){"use strict";var r=n(9766);t.Z=function(e,t){return t?(0,r.Z)(e,t,{clone:!1}):e}},8700:function(e,t,n){"use strict";n.d(t,{hB:function(){return h},eI:function(){return p},ZP:function(){return x},NA:function(){return g}});var r=n(5408),i=n(4844),a=n(7730);const o={m:"margin",p:"padding"},c={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},u={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},s=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}((e=>{if(e.length>2){if(!u[e])return[e];e=u[e]}const[t,n]=e.split(""),r=o[t],i=c[n]||"";return Array.isArray(i)?i.map((e=>r+e)):[r+i]})),f=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],l=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],d=[...f,...l];function p(e,t,n,r){const a=(0,i.D)(e,t)||n;return"number"===typeof a?e=>"string"===typeof e?e:a*e:Array.isArray(a)?e=>"string"===typeof e?e:a[e]:"function"===typeof a?a:()=>{}}function h(e){return p(e,"spacing",8)}function g(e,t){if("string"===typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"===typeof n?-n:`-${n}`}function m(e,t,n,i){if(-1===t.indexOf(n))return null;const a=function(e,t){return n=>e.reduce(((e,r)=>(e[r]=g(t,n),e)),{})}(s(n),i),o=e[n];return(0,r.k9)(e,o,a)}function b(e,t){const n=h(e.theme);return Object.keys(e).map((r=>m(e,t,r,n))).reduce(a.Z,{})}function y(e){return b(e,f)}function v(e){return b(e,l)}function k(e){return b(e,d)}y.propTypes={},y.filterProps=f,v.propTypes={},v.filterProps=l,k.propTypes={},k.filterProps=d;var x=k},4844:function(e,t,n){"use strict";n.d(t,{D:function(){return a}});var r=n(8320),i=n(5408);function a(e,t){return t&&"string"===typeof t?t.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e):null}function o(e,t,n,r=n){let i;return i="function"===typeof e?e(n):Array.isArray(e)?e[n]||r:a(e,n)||r,t&&(i=t(i)),i}t.Z=function(e){const{prop:t,cssProperty:n=e.prop,themeKey:c,transform:u}=e,s=e=>{if(null==e[t])return null;const s=e[t],f=a(e.theme,c)||{};return(0,i.k9)(e,s,(e=>{let i=o(f,u,e);return e===i&&"string"===typeof e&&(i=o(f,u,`${t}${"default"===e?"":(0,r.Z)(e)}`,e)),!1===n?i:{[n]:i}}))};return s.propTypes={},s.filterProps=[t],s}},6682:function(e,t,n){"use strict";var r=n(6500),i=n(4168);const a=(0,r.Z)();t.Z=function(e=a){return(0,i.Z)(e)}},4168:function(e,t,n){"use strict";var r=n(6760);t.Z=function(e=null){const t=(0,r.Z)();return t&&(n=t,0!==Object.keys(n).length)?t:e;var n}},8320:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1387);function i(e){if("string"!==typeof e)throw new Error((0,r.Z)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},9766:function(e,t,n){"use strict";n.d(t,{P:function(){return i},Z:function(){return a}});var r=n(7462);function i(e){return null!==e&&"object"===typeof e&&e.constructor===Object}function a(e,t,n={clone:!0}){const o=n.clone?(0,r.Z)({},e):e;return i(e)&&i(t)&&Object.keys(t).forEach((r=>{"__proto__"!==r&&(i(t[r])&&r in e&&i(e[r])?o[r]=a(e[r],t[r],n):o[r]=t[r])})),o}},1387:function(e,t,n){"use strict";function r(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:"suiapi.";return n["".concat(t).concat(e)]}),[n]),u=(0,r.useCallback)((function(){return c("session")}),[c]),s=(0,r.useCallback)((function(){var e;return null===(e=u())||void 0===e?void 0:e.user}),[u]);return(0,r.useEffect)((function(){if(e){var t=document.cookie.split(/\s*;\s*/);a(t.reduce((function(e,t){var n,r=o(t.split("=",2),2),i=r[0],a=r[1],c=decodeURIComponent(a);if(c.startsWith("j:"))try{n=JSON.parse(c.substring(2))}catch(u){n=a}else n=a;return e[i]=n,e}),{}))}}),[e]),{cookieJar:n,getCookie:c,getSession:u,getSessionUser:s}}},1081:function(e,t,n){"use strict";var r=n(7294);t.Z=function(){var e=(0,r.useRef)(!0);return e.current?(e.current=!1,!0):e.current}},7169:function(e,t,n){"use strict";n.d(t,{hM:function(){return r},lD:function(){return i},v9:function(){return a},Wd:function(){return o},Ej:function(){return c},s7:function(){return u},$T:function(){return s},UZ:function(){return f},d:function(){return l},rr:function(){return d},E5:function(){return p},Xb:function(){return h},of:function(){return g},n_:function(){return m},li:function(){return b}});var r="#D02724",i="#F2F2F2",a="#343434",o="#7353BA",c="#4785FF",u="#E5E5E5",s="#444",f="#666",l="#888",d="#AAA",p="#343434",h="#1F1F1F",g="#9da2a7",m="3px",b=1800},7719:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return S}});var r=n(5893),i=n(7294),a=n(7462),o=n(4819),c=n(6760);var u="function"===typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";var s=function(e){const{children:t,theme:n}=e,s=(0,c.Z)(),f=i.useMemo((()=>{const e=null===s?n:function(e,t){if("function"===typeof t)return t(e);return(0,a.Z)({},e,t)}(s,n);return null!=e&&(e[u]=null!==s),e}),[n,s]);return(0,r.jsx)(o.Z.Provider,{value:f,children:t})},f=n(4880),l=n(6682);function d(e){const t=(0,l.Z)();return(0,r.jsx)(f.T.Provider,{value:"object"===typeof t?t:{},children:e.children})}var p,h=function(e){const{children:t,theme:n}=e;return(0,r.jsx)(s,{theme:n,children:(0,r.jsx)(d,{children:t})})},g=n(4474),m=function(){return(0,g.Z)({key:"css"})},b=n(1265),y=n(9632),v=(n(5850),n(3329),n(5703),n(7014),n(2261),n(2154),n(7169));function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var x=(0,b.Z)({palette:{primary:{main:v.v9},secondary:{main:v.lD},background:{paper:v.v9}},typography:{fontFamily:['"Roboto Condensed"','"Source Code Pro"'].join(","),fontWeightRegular:200,fontSize:14},components:{MuiSwitch:{styleOverrides:{switchBase:{color:v.lD},root:{padding:8},track:(p={borderRadius:v.n_,border:3,backgroundColor:v.Wd,opacity:1},k(p,".".concat(y.Z.checked,".").concat(y.Z.checked," + &"),{backgroundColor:v.Ej,opacity:1}),k(p,".".concat(y.Z.disabled,".").concat(y.Z.disabled," + &"),{backgroundColor:v.rr}),p),thumb:{color:v.lD,borderRadius:v.n_}}}}}),w=(n(906),n(1883)),A=function(){var e=(0,w.Z)().getSession,t=(0,i.useMemo)((function(){return e()}),[e]);(0,i.useEffect)((function(){if(!t)return function(){return null};var e=t.expires,n=new Date(e).getTime(),r=Date.now(),i=setTimeout((function(){if(window){var e=window.location,t=e.pathname,n=e.search;/^\/login/.test(t)||/^\/init/.test(t)&&!n.includes("re=1")||e.replace("/login")}}),n-r);return window&&window.addEventListener("beforeunload",(function(){return clearTimeout(i)}),{once:!0}),function(){return clearTimeout(i)}}),[t])};function $(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(e){for(var t=1;t=0||(i[n]=e[n]);return i}n.d(t,{Z:function(){return r}})}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[774,179],(function(){return t(6363),t(387)}));var n=e.O();_N_E=n}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/pages/anvil-53b02ffa883f4c5a.js b/striker-ui/out/_next/static/chunks/pages/anvil-4cce8c1450ca6ceb.js similarity index 99% rename from striker-ui/out/_next/static/chunks/pages/anvil-53b02ffa883f4c5a.js rename to striker-ui/out/_next/static/chunks/pages/anvil-4cce8c1450ca6ceb.js index 305b397d..4bd3bc86 100644 --- a/striker-ui/out/_next/static/chunks/pages/anvil-53b02ffa883f4c5a.js +++ b/striker-ui/out/_next/static/chunks/pages/anvil-4cce8c1450ca6ceb.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[817],{2852:function(e,t,n){"use strict";var r=n(3366),o=n(7462),i=n(7294),a=n(6010),c=n(7192),s=n(1796),l=n(8216),d=n(1964),u=n(3616),h=n(1496),f=n(9632),x=n(5893);const m=["className","color","edge","size","sx"],v=(0,h.ZP)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${(0,l.Z)(n.edge)}`],t[`size${(0,l.Z)(n.size)}`]]}})((({ownerState:e})=>(0,o.Z)({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},"start"===e.edge&&{marginLeft:-8},"end"===e.edge&&{marginRight:-8},"small"===e.size&&{width:40,height:24,padding:7,[`& .${f.Z.thumb}`]:{width:16,height:16},[`& .${f.Z.switchBase}`]:{padding:4,[`&.${f.Z.checked}`]:{transform:"translateX(16px)"}}}))),p=(0,h.ZP)(d.Z,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${f.Z.input}`]:t.input},"default"!==n.color&&t[`color${(0,l.Z)(n.color)}`]]}})((({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:"light"===e.palette.mode?e.palette.common.white:e.palette.grey[300],transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${f.Z.checked}`]:{transform:"translateX(20px)"},[`&.${f.Z.disabled}`]:{color:"light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[600]},[`&.${f.Z.checked} + .${f.Z.track}`]:{opacity:.5},[`&.${f.Z.disabled} + .${f.Z.track}`]:{opacity:"light"===e.palette.mode?.12:.2},[`& .${f.Z.input}`]:{left:"-100%",width:"300%"}})),(({theme:e,ownerState:t})=>(0,o.Z)({"&:hover":{backgroundColor:(0,s.Fq)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&{[`&.${f.Z.checked}`]:{color:e.palette[t.color].main,"&:hover":{backgroundColor:(0,s.Fq)(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${f.Z.disabled}`]:{color:"light"===e.palette.mode?(0,s.$n)(e.palette[t.color].main,.62):(0,s._j)(e.palette[t.color].main,.55)}},[`&.${f.Z.checked} + .${f.Z.track}`]:{backgroundColor:e.palette[t.color].main}}))),g=(0,h.ZP)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})((({theme:e})=>({height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:"light"===e.palette.mode?e.palette.common.black:e.palette.common.white,opacity:"light"===e.palette.mode?.38:.3}))),j=(0,h.ZP)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})((({theme:e})=>({boxShadow:e.shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),b=i.forwardRef((function(e,t){const n=(0,u.Z)({props:e,name:"MuiSwitch"}),{className:i,color:s="primary",edge:d=!1,size:h="medium",sx:b}=n,Z=(0,r.Z)(n,m),w=(0,o.Z)({},n,{color:s,edge:d,size:h}),y=(e=>{const{classes:t,edge:n,size:r,color:i,checked:a,disabled:s}=e,d={root:["root",n&&`edge${(0,l.Z)(n)}`,`size${(0,l.Z)(r)}`],switchBase:["switchBase",`color${(0,l.Z)(i)}`,a&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},u=(0,c.Z)(d,f.H,t);return(0,o.Z)({},t,u)})(w),k=(0,x.jsx)(j,{className:y.thumb,ownerState:w});return(0,x.jsxs)(v,{className:(0,a.Z)(y.root,i),sx:b,ownerState:w,children:[(0,x.jsx)(p,(0,o.Z)({type:"checkbox",icon:k,checkedIcon:k,ref:t,ownerState:w},Z,{classes:(0,o.Z)({},y,{root:y.switchBase})})),(0,x.jsx)(g,{className:y.track,ownerState:w})]})}));t.Z=b},6069:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/anvil",function(){return n(7733)}])},1939:function(e,t,n){"use strict";var r=n(5893),o=n(7357),i=n(7169);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l="Decorator",d={ok:"".concat(l,"-ok"),warning:"".concat(l,"-warning"),error:"".concat(l,"-error"),off:"".concat(l,"-off")};t.Z=function(e){var t,n=e.colour,l=e.sx,u=s(e,["colour","sx"]);return(0,r.jsx)(o.Z,c({},u,{className:d[n],sx:c((t={borderRadius:i.n_,height:"100%",width:"1.4em"},a(t,"&.".concat(d.ok),{backgroundColor:i.Ej}),a(t,"&.".concat(d.warning),{backgroundColor:i.Wd}),a(t,"&.".concat(d.error),{backgroundColor:i.hM}),a(t,"&.".concat(d.off),{backgroundColor:i.s7}),t),l)}))}},6632:function(e,t,n){"use strict";var r=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}t.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.actionProceedText,n=void 0===t?"":t,o=e.content,c=void 0===o?"":o,s=e.titleText,l=void 0===s?"":s,d=a(e,["actionProceedText","content","titleText"]);return(0,r.useState)(i({actionProceedText:n,content:c,titleText:l},d))}},7733:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return tt}});var r=n(5893),o=n(1496),i=n(7357),a=n(9008),c=n(1163),s=n(7294),l=n(2029),d=n(7169),u={uuid:"",setAnvilUuid:function(){return null}},h=(0,s.createContext)(u),f=function(e){var t=e.children,n=(0,s.useState)(""),o=n[0],i=n[1];return(0,r.jsx)(h.Provider,{value:{uuid:o,setAnvilUuid:function(e){i(e)}},children:t})},x=n(3679),m=n(1905),v=n(2852),p=new Map([["optimal","Optimal"],["not_ready","Not Ready"],["degraded","Degraded"]]),g=n(1939),j=function(e,t){return fetch(e,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})},b=n(7750);function Z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var w={anvilName:"".concat("SelectedAnvil","-anvilName")},y=(0,o.ZP)(i.Z)((function(){return Z({display:"flex",flexDirection:"row",width:"100%"},"& .".concat(w.anvilName),{paddingLeft:0})})),k=function(e){switch(e){case"optimal":return"ok";case"not_ready":return"warning";default:return"error"}},_=function(e){return!(-1===e.hosts.findIndex((function(e){return"offline"!==e.state})))},S=function(e){var t=e.list,n=(0,s.useContext)(h).uuid,o=t.findIndex((function(e){return e.anvil_uuid===n}));return(0,r.jsx)(y,Z({},"children",""!==n&&(0,r.jsxs)(r.Fragment,Z({},"children",[(0,r.jsx)(i.Z,{p:1,children:(0,r.jsx)(g.Z,{colour:k(t[o].anvil_state)})}),(0,r.jsxs)(i.Z,{p:1,flexGrow:1,className:w.anvilName,children:[(0,r.jsx)(b.z,{text:t[o].anvil_name}),(0,r.jsx)(b.z,{text:p.get(t[o].anvil_state)||"State unavailable"})]}),(0,r.jsx)(i.Z,Z({p:1},"children",(0,r.jsx)(v.Z,Z({checked:_(t[o])},"onChange",(function(){var e=t[o],n=e.anvil_uuid;j("".concat(l.Z,"/command/").concat(_(e)?"stop-an":"start-an","/").concat(n),{})})))))]))))},O=n(8462),P=n(7720),A=n(7212),N=function(e){var t=e.anvil;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b.Ac,{text:t.anvil_name}),(0,r.jsx)(b.Ac,{text:p.get(t.anvil_state)||"State unavailable"})]})};function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.hosts[1].link.link_speed?1:0;e.bond_speed=e.hosts[t].link.link_speed,e.bond_state=e.hosts[t].link.link_state})),n},ae=n(2749);function ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nd.li?(0,r.jsxs)(i.Z,{className:Ye.container,children:[(0,r.jsxs)(i.Z,{className:Ye.child,children:[(0,r.jsx)(z,{list:g}),(0,r.jsx)(ne,{anvil:g.anvils})]}),(0,r.jsx)(i.Z,{className:Ye.server,children:(0,r.jsx)(Re,{anvil:g.anvils})}),(0,r.jsx)(i.Z,{className:Ye.child,children:(0,r.jsx)(Xe,{})}),(0,r.jsxs)(i.Z,{className:Ye.child,children:[(0,r.jsx)(xe,{}),(0,r.jsx)(G,{}),(0,r.jsx)(oe,{})]})]}):(0,r.jsxs)(i.Z,{className:Ye.container,children:[(0,r.jsxs)(i.Z,{className:Ye.child,children:[(0,r.jsx)(Re,{anvil:g.anvils}),(0,r.jsx)(z,{list:g}),(0,r.jsx)(ne,{anvil:g.anvils})]}),(0,r.jsxs)(i.Z,{className:Ye.child,children:[(0,r.jsx)(xe,{}),(0,r.jsx)(Xe,{}),(0,r.jsx)(G,{}),(0,r.jsx)(oe,{})]})]})),e}),[g,t]),Z=(0,s.useMemo)((function(){return j?(0,r.jsx)(x.s_,{sx:{marginLeft:{xs:"1em",sm:"auto"},marginRight:{xs:"1em",sm:"auto"},marginTop:"calc(50vh - 10em)",maxWidth:{xs:void 0,sm:"60%",md:"50%",lg:"40%"},minWidth:"fit-content"},children:(0,r.jsx)(F.Z,{sx:{margin:"2em 2.4em"}})}):b}),[b,j]);return(0,s.useEffect)((function(){""===u&&v((null===n||void 0===n?void 0:n.toString())||"")}),[u,n,v]),(0,r.jsxs)(et,{children:[(0,r.jsx)(a.default,{children:(0,r.jsx)("title",{children:"Anvil"})}),(0,r.jsxs)(f,{children:[(0,r.jsx)(H.Z,{}),Z]})]})}}},function(e){e.O(0,[412,438,894,182,900,485,62,195,987,157,825,774,888,179],(function(){return t=6069,e(e.s=t);var t}));var t=e.O();_N_E=t}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[817],{2852:function(e,t,n){"use strict";var r=n(3366),o=n(7462),i=n(7294),a=n(6010),c=n(7192),s=n(1796),l=n(8216),d=n(1964),u=n(3616),h=n(1496),f=n(9632),x=n(5893);const m=["className","color","edge","size","sx"],v=(0,h.ZP)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${(0,l.Z)(n.edge)}`],t[`size${(0,l.Z)(n.size)}`]]}})((({ownerState:e})=>(0,o.Z)({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},"start"===e.edge&&{marginLeft:-8},"end"===e.edge&&{marginRight:-8},"small"===e.size&&{width:40,height:24,padding:7,[`& .${f.Z.thumb}`]:{width:16,height:16},[`& .${f.Z.switchBase}`]:{padding:4,[`&.${f.Z.checked}`]:{transform:"translateX(16px)"}}}))),p=(0,h.ZP)(d.Z,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${f.Z.input}`]:t.input},"default"!==n.color&&t[`color${(0,l.Z)(n.color)}`]]}})((({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:"light"===e.palette.mode?e.palette.common.white:e.palette.grey[300],transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${f.Z.checked}`]:{transform:"translateX(20px)"},[`&.${f.Z.disabled}`]:{color:"light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[600]},[`&.${f.Z.checked} + .${f.Z.track}`]:{opacity:.5},[`&.${f.Z.disabled} + .${f.Z.track}`]:{opacity:"light"===e.palette.mode?.12:.2},[`& .${f.Z.input}`]:{left:"-100%",width:"300%"}})),(({theme:e,ownerState:t})=>(0,o.Z)({"&:hover":{backgroundColor:(0,s.Fq)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&{[`&.${f.Z.checked}`]:{color:e.palette[t.color].main,"&:hover":{backgroundColor:(0,s.Fq)(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${f.Z.disabled}`]:{color:"light"===e.palette.mode?(0,s.$n)(e.palette[t.color].main,.62):(0,s._j)(e.palette[t.color].main,.55)}},[`&.${f.Z.checked} + .${f.Z.track}`]:{backgroundColor:e.palette[t.color].main}}))),g=(0,h.ZP)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})((({theme:e})=>({height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:"light"===e.palette.mode?e.palette.common.black:e.palette.common.white,opacity:"light"===e.palette.mode?.38:.3}))),j=(0,h.ZP)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})((({theme:e})=>({boxShadow:e.shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),b=i.forwardRef((function(e,t){const n=(0,u.Z)({props:e,name:"MuiSwitch"}),{className:i,color:s="primary",edge:d=!1,size:h="medium",sx:b}=n,Z=(0,r.Z)(n,m),w=(0,o.Z)({},n,{color:s,edge:d,size:h}),y=(e=>{const{classes:t,edge:n,size:r,color:i,checked:a,disabled:s}=e,d={root:["root",n&&`edge${(0,l.Z)(n)}`,`size${(0,l.Z)(r)}`],switchBase:["switchBase",`color${(0,l.Z)(i)}`,a&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},u=(0,c.Z)(d,f.H,t);return(0,o.Z)({},t,u)})(w),k=(0,x.jsx)(j,{className:y.thumb,ownerState:w});return(0,x.jsxs)(v,{className:(0,a.Z)(y.root,i),sx:b,ownerState:w,children:[(0,x.jsx)(p,(0,o.Z)({type:"checkbox",icon:k,checkedIcon:k,ref:t,ownerState:w},Z,{classes:(0,o.Z)({},y,{root:y.switchBase})})),(0,x.jsx)(g,{className:y.track,ownerState:w})]})}));t.Z=b},6069:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/anvil",function(){return n(7733)}])},1939:function(e,t,n){"use strict";var r=n(5893),o=n(7357),i=n(7169);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l="Decorator",d={ok:"".concat(l,"-ok"),warning:"".concat(l,"-warning"),error:"".concat(l,"-error"),off:"".concat(l,"-off")};t.Z=function(e){var t,n=e.colour,l=e.sx,u=s(e,["colour","sx"]);return(0,r.jsx)(o.Z,c({},u,{className:d[n],sx:c((t={borderRadius:i.n_,height:"100%",width:"1.4em"},a(t,"&.".concat(d.ok),{backgroundColor:i.Ej}),a(t,"&.".concat(d.warning),{backgroundColor:i.Wd}),a(t,"&.".concat(d.error),{backgroundColor:i.hM}),a(t,"&.".concat(d.off),{backgroundColor:i.s7}),t),l)}))}},6632:function(e,t,n){"use strict";var r=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}t.Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.actionProceedText,n=void 0===t?"":t,o=e.content,c=void 0===o?"":o,s=e.titleText,l=void 0===s?"":s,d=a(e,["actionProceedText","content","titleText"]);return(0,r.useState)(i({actionProceedText:n,content:c,titleText:l},d))}},7733:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return tt}});var r=n(5893),o=n(1496),i=n(7357),a=n(9008),c=n(1163),s=n(7294),l=n(2029),d=n(7169),u={uuid:"",setAnvilUuid:function(){return null}},h=(0,s.createContext)(u),f=function(e){var t=e.children,n=(0,s.useState)(""),o=n[0],i=n[1];return(0,r.jsx)(h.Provider,{value:{uuid:o,setAnvilUuid:function(e){i(e)}},children:t})},x=n(3679),m=n(1905),v=n(2852),p=new Map([["optimal","Optimal"],["not_ready","Not Ready"],["degraded","Degraded"]]),g=n(1939),j=function(e,t){return fetch(e,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})},b=n(7750);function Z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var w={anvilName:"".concat("SelectedAnvil","-anvilName")},y=(0,o.ZP)(i.Z)((function(){return Z({display:"flex",flexDirection:"row",width:"100%"},"& .".concat(w.anvilName),{paddingLeft:0})})),k=function(e){switch(e){case"optimal":return"ok";case"not_ready":return"warning";default:return"error"}},_=function(e){return!(-1===e.hosts.findIndex((function(e){return"offline"!==e.state})))},S=function(e){var t=e.list,n=(0,s.useContext)(h).uuid,o=t.findIndex((function(e){return e.anvil_uuid===n}));return(0,r.jsx)(y,Z({},"children",""!==n&&(0,r.jsxs)(r.Fragment,Z({},"children",[(0,r.jsx)(i.Z,{p:1,children:(0,r.jsx)(g.Z,{colour:k(t[o].anvil_state)})}),(0,r.jsxs)(i.Z,{p:1,flexGrow:1,className:w.anvilName,children:[(0,r.jsx)(b.z,{text:t[o].anvil_name}),(0,r.jsx)(b.z,{text:p.get(t[o].anvil_state)||"State unavailable"})]}),(0,r.jsx)(i.Z,Z({p:1},"children",(0,r.jsx)(v.Z,Z({checked:_(t[o])},"onChange",(function(){var e=t[o],n=e.anvil_uuid;j("".concat(l.Z,"/command/").concat(_(e)?"stop-an":"start-an","/").concat(n),{})})))))]))))},O=n(8462),P=n(7720),A=n(7212),N=function(e){var t=e.anvil;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b.Ac,{text:t.anvil_name}),(0,r.jsx)(b.Ac,{text:p.get(t.anvil_state)||"State unavailable"})]})};function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.hosts[1].link.link_speed?1:0;e.bond_speed=e.hosts[t].link.link_speed,e.bond_state=e.hosts[t].link.link_state})),n},ae=n(2749);function ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nd.li?(0,r.jsxs)(i.Z,{className:Ye.container,children:[(0,r.jsxs)(i.Z,{className:Ye.child,children:[(0,r.jsx)(z,{list:g}),(0,r.jsx)(ne,{anvil:g.anvils})]}),(0,r.jsx)(i.Z,{className:Ye.server,children:(0,r.jsx)(Re,{anvil:g.anvils})}),(0,r.jsx)(i.Z,{className:Ye.child,children:(0,r.jsx)(Xe,{})}),(0,r.jsxs)(i.Z,{className:Ye.child,children:[(0,r.jsx)(xe,{}),(0,r.jsx)(G,{}),(0,r.jsx)(oe,{})]})]}):(0,r.jsxs)(i.Z,{className:Ye.container,children:[(0,r.jsxs)(i.Z,{className:Ye.child,children:[(0,r.jsx)(Re,{anvil:g.anvils}),(0,r.jsx)(z,{list:g}),(0,r.jsx)(ne,{anvil:g.anvils})]}),(0,r.jsxs)(i.Z,{className:Ye.child,children:[(0,r.jsx)(xe,{}),(0,r.jsx)(Xe,{}),(0,r.jsx)(G,{}),(0,r.jsx)(oe,{})]})]})),e}),[g,t]),Z=(0,s.useMemo)((function(){return j?(0,r.jsx)(x.s_,{sx:{marginLeft:{xs:"1em",sm:"auto"},marginRight:{xs:"1em",sm:"auto"},marginTop:"calc(50vh - 10em)",maxWidth:{xs:void 0,sm:"60%",md:"50%",lg:"40%"},minWidth:"fit-content"},children:(0,r.jsx)(F.Z,{sx:{margin:"2em 2.4em"}})}):b}),[b,j]);return(0,s.useEffect)((function(){""===u&&v((null===n||void 0===n?void 0:n.toString())||"")}),[u,n,v]),(0,r.jsxs)(et,{children:[(0,r.jsx)(a.default,{children:(0,r.jsx)("title",{children:"Anvil"})}),(0,r.jsxs)(f,{children:[(0,r.jsx)(H.Z,{}),Z]})]})}}},function(e){e.O(0,[412,438,894,182,900,485,62,195,987,157,898,774,888,179],(function(){return t=6069,e(e.s=t);var t}));var t=e.O();_N_E=t}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/pages/config-7be24d332b231569.js b/striker-ui/out/_next/static/chunks/pages/config-f22ac92929f0daf0.js similarity index 99% rename from striker-ui/out/_next/static/chunks/pages/config-7be24d332b231569.js rename to striker-ui/out/_next/static/chunks/pages/config-f22ac92929f0daf0.js index d570e403..88b7a034 100644 --- a/striker-ui/out/_next/static/chunks/pages/config-7be24d332b231569.js +++ b/striker-ui/out/_next/static/chunks/pages/config-f22ac92929f0daf0.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 Qe}});var r=t(5893),o=t(8263),i=t(9008),c=t(7294),l=t(2029),a=t(157),s=t(5521),u=t(1905),d=t(3106),f=t(4188),p=t(4390);function h(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(4894),g=t(6607),x=t(480),j=t(2349),w=t(7750);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 Z(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(){p.Z.delete("/host/connection",{data:n}).catch((function(e){var n=(0,k.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(){S((function(e){return!e}))},onItemCheckboxChange:function(e,n,t){T[e].isChecked=t,C((function(e){return ie({},e)}))},renderListItem:function(e,n){var t=n.isPingTest,o=void 0!==t&&t;return(0,r.jsx)(O.Z,{row:!0,spacing:0,children:(0,r.jsxs)(O.Z,{spacing:0,children:[(0,r.jsx)(w.$_,{children:e}),(0,r.jsx)(te,{label:"Ping",state:o})]})})}})}),E]})}),(0,r.jsx)(q,{ref:s}),(0,r.jsx)(a.Z,ie({closeOnProceed:!0},v,{ref:f}))]})},ae=t(582),se=t(5741),ue=t(3906);function de(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){h({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]=pe({},n[c],{hostName:r,hostUUID:o,ipAddress:i})})),e}),{})}))},refreshInterval:i}).isLoading;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(K.TZ,{header:"Manage changed SSH keys",loading:F,children:[(0,r.jsxs)(O.Z,{spacing:".2em",children:[(0,r.jsx)(w.Ac,{children:"The identity of the following targets have unexpectedly changed."}),(0,r.jsxs)(z.Z,{type:"warning",isAllowClose:!0,children:["If you haven't rebuilt the listed targets, then you could be experiencing a"," ",(0,r.jsx)(se.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)(W.Z,{header:(0,r.jsxs)(O.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)(O.Z,{row:!0,spacing:".3em",sx:{flexBasis:"calc(50% + 1em)"},children:[(0,r.jsx)(w.Ac,{children:"Host name"}),(0,r.jsx)(ae.Z,{sx:{flexGrow:1}})]}),(0,r.jsxs)(O.Z,{row:!0,spacing:".3em",sx:{flexGrow:1},children:[(0,r.jsx)(w.Ac,{children:"IP address"}),(0,r.jsx)(ae.Z,{sx:{flexGrow:1}})]}),(0,r.jsx)(ae.Z,{sx:{flexGrow:1}})]}),allowCheckAll:E,allowCheckItem:!0,allowDelete:!0,allowEdit:!1,disableDelete:!S,edit:!0,getListCheckboxProps:function(){return{checked:A}},listEmpty:(0,r.jsx)(w.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(!Z(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(){p.Z.delete("/ssh-key/conflict",{data:n}).catch((function(e){var n=(0,k.Z)(e);n.children="Failed to delete selected SSH key conflicts. ".concat(n.children),h(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)(O.Z,{spacing:0,sm:"row",sx:{width:"100%","& > *":{flexBasis:"50%"}},xs:"column",children:[(0,r.jsx)(w.Ac,{children:t}),(0,r.jsx)(w.Ac,{children:o})]})},renderListItemCheckboxState:function(e){return Z(e)}})]}),C]}),(0,r.jsx)(a.Z,pe({closeOnProceed:!0},g,{ref:s}))]})};function ye(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function be(e){for(var n=1;n0),l(ve,t===(null===(n=y.current.getValue)||void 0===n?void 0:n.call(null)))},onFirstRender:o(xe),ref:m,required:p})},"common-user-input-cell-confirm-password":{children:(0,r.jsx)(T.Z,{input:(0,r.jsx)(E.Z,{id:ve,inputProps:{readOnly:!v},label:"Confirm password",type:f.Z.password}),inputTestBatch:{defaults:{onSuccess:function(){i(ve)}},onFinishBatch:t(ve),tests:[{test:F.HJ},{onFailure:function(){i(ve,{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(ve),ref:y,required:v})}}:void 0}),[t,o,v,p,i,l,h]);return(0,r.jsx)(S.Z,{columns:{xs:1,sm:2,md:3},layout:be({"common-user-input-cell-name":{children:(0,r.jsx)(T.Z,{input:(0,r.jsx)(E.Z,{id:ge,inputProps:{readOnly:u},label:je,value:s}),inputTestBatch:(0,F.Gn)(je,(function(){i(ge)}),{onFinishBatch:t(ge)},(function(e){i(ge,{children:e})})),onFirstRender:o(ge),required:!0}),md:1,sm:2}},x),spacing:"1em"})},Ze=t(2545),Ae=t(8610),Oe=t(6632),Se=t(8859);function ke(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 Xe(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)||Ye(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 Je(e){return function(e){if(Array.isArray(e))return qe(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ye(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 Ye(e,n){if(e){if("string"===typeof e)return qe(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)?qe(e,n):void 0}}var Qe=function(e){var n=e.refreshInterval,t=void 0===n?6e4:n,d=(0,M.Z)().protect,f=(0,c.useState)(!1),p=f[0],h=f[1],m=(0,c.useState)({actionProceedText:"",closeOnProceed:!0,content:"",dialogProps:{open:p},onCancelAppend:function(){h(!1)},onProceedAppend:function(){h(!1)},titleText:""}),y=m[0],b=m[1],v=Xe((0,U.Z)(void 0,d),2),g=v[0],x=v[1],j=Xe((0,U.Z)("",d),2),w=j[0],P=j[1],Z=(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}),A=Z.data,O=Z.isLoading;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.default,{children:(0,r.jsx)("title",{children:O?"Loading...":"".concat(null===A||void 0===A?void 0:A.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)($e,{installTarget:g,onSubmit:function(e){var n=e.onProceedAppend,t=Ke(e,["onProceedAppend"]);b((function(e){return ze({},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 Qe}});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),p=t(4390);function h(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(4894),g=t(6607),x=t(480),j=t(2349),w=t(7750);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 Z(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(){p.Z.delete("/host/connection",{data:n}).catch((function(e){var n=(0,k.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(){S((function(e){return!e}))},onItemCheckboxChange:function(e,n,t){T[e].isChecked=t,C((function(e){return ie({},e)}))},renderListItem:function(e,n){var t=n.isPingTest,o=void 0!==t&&t;return(0,r.jsx)(O.Z,{row:!0,spacing:0,children:(0,r.jsxs)(O.Z,{spacing:0,children:[(0,r.jsx)(w.$_,{children:e}),(0,r.jsx)(te,{label:"Ping",state:o})]})})}})}),E]})}),(0,r.jsx)(q,{ref:s}),(0,r.jsx)(a.Z,ie({closeOnProceed:!0},v,{ref:f}))]})},ae=t(582),se=t(5741),ue=t(3906);function de(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){h({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]=pe({},n[c],{hostName:r,hostUUID:o,ipAddress:i})})),e}),{})}))},refreshInterval:i}).isLoading;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(K.TZ,{header:"Manage changed SSH keys",loading:F,children:[(0,r.jsxs)(O.Z,{spacing:".2em",children:[(0,r.jsx)(w.Ac,{children:"The identity of the following targets have unexpectedly changed."}),(0,r.jsxs)(z.Z,{type:"warning",isAllowClose:!0,children:["If you haven't rebuilt the listed targets, then you could be experiencing a"," ",(0,r.jsx)(se.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)(W.Z,{header:(0,r.jsxs)(O.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)(O.Z,{row:!0,spacing:".3em",sx:{flexBasis:"calc(50% + 1em)"},children:[(0,r.jsx)(w.Ac,{children:"Host name"}),(0,r.jsx)(ae.Z,{sx:{flexGrow:1}})]}),(0,r.jsxs)(O.Z,{row:!0,spacing:".3em",sx:{flexGrow:1},children:[(0,r.jsx)(w.Ac,{children:"IP address"}),(0,r.jsx)(ae.Z,{sx:{flexGrow:1}})]}),(0,r.jsx)(ae.Z,{sx:{flexGrow:1}})]}),allowCheckAll:E,allowCheckItem:!0,allowDelete:!0,allowEdit:!1,disableDelete:!S,edit:!0,getListCheckboxProps:function(){return{checked:A}},listEmpty:(0,r.jsx)(w.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(!Z(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(){p.Z.delete("/ssh-key/conflict",{data:n}).catch((function(e){var n=(0,k.Z)(e);n.children="Failed to delete selected SSH key conflicts. ".concat(n.children),h(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)(O.Z,{spacing:0,sm:"row",sx:{width:"100%","& > *":{flexBasis:"50%"}},xs:"column",children:[(0,r.jsx)(w.Ac,{children:t}),(0,r.jsx)(w.Ac,{children:o})]})},renderListItemCheckboxState:function(e){return Z(e)}})]}),C]}),(0,r.jsx)(a.Z,pe({closeOnProceed:!0},g,{ref:s}))]})};function ye(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function be(e){for(var n=1;n0),l(ve,t===(null===(n=y.current.getValue)||void 0===n?void 0:n.call(null)))},onFirstRender:o(xe),ref:m,required:p})},"common-user-input-cell-confirm-password":{children:(0,r.jsx)(T.Z,{input:(0,r.jsx)(E.Z,{id:ve,inputProps:{readOnly:!v},label:"Confirm password",type:f.Z.password}),inputTestBatch:{defaults:{onSuccess:function(){i(ve)}},onFinishBatch:t(ve),tests:[{test:F.HJ},{onFailure:function(){i(ve,{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(ve),ref:y,required:v})}}:void 0}),[t,o,v,p,i,l,h]);return(0,r.jsx)(S.Z,{columns:{xs:1,sm:2,md:3},layout:be({"common-user-input-cell-name":{children:(0,r.jsx)(T.Z,{input:(0,r.jsx)(E.Z,{id:ge,inputProps:{readOnly:u},label:je,value:s}),inputTestBatch:(0,F.Gn)(je,(function(){i(ge)}),{onFinishBatch:t(ge)},(function(e){i(ge,{children:e})})),onFirstRender:o(ge),required:!0}),md:1,sm:2}},x),spacing:"1em"})},Ze=t(2545),Ae=t(8610),Oe=t(6632),Se=t(8859);function ke(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 Xe(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)||Ye(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 Je(e){return function(e){if(Array.isArray(e))return qe(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ye(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 Ye(e,n){if(e){if("string"===typeof e)return qe(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)?qe(e,n):void 0}}var Qe=function(e){var n=e.refreshInterval,t=void 0===n?6e4:n,d=(0,M.Z)().protect,f=(0,c.useState)(!1),p=f[0],h=f[1],m=(0,c.useState)({actionProceedText:"",closeOnProceed:!0,content:"",dialogProps:{open:p},onCancelAppend:function(){h(!1)},onProceedAppend:function(){h(!1)},titleText:""}),y=m[0],b=m[1],v=Xe((0,U.Z)(void 0,d),2),g=v[0],x=v[1],j=Xe((0,U.Z)("",d),2),w=j[0],P=j[1],Z=(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}),A=Z.data,O=Z.isLoading;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.default,{children:(0,r.jsx)("title",{children:O?"Loading...":"".concat(null===A||void 0===A?void 0:A.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)($e,{installTarget:g,onSubmit:function(e){var n=e.onProceedAppend,t=Ke(e,["onProceedAppend"]);b((function(e){return ze({},e,t,{onProceedAppend:function(){for(var e=arguments.length,t=new Array(e),r=0;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}var w=function(e){var n=e.onClearIndicatorClick,t=x(e,["onClearIndicatorClick"]),i=t.sx,u=t.value,a=x(t,["sx","value"]),c=(0,l.useMemo)((function(){var e;return O((j(e={},"& .".concat(o.Z.icon),{color:g.s7}),j(e,"& .".concat(y.Z.root),{marginRight:".8em"}),j(e,"& .".concat(p.Z.root),{color:g.s7,visibility:"hidden"}),j(e,"&:hover .".concat(y.Z.root," .").concat(p.Z.root,",\n &.").concat(m.Z.focused," .").concat(y.Z.root," .").concat(p.Z.root),{visibility:"visible"}),e),i)}),[i]),s=(0,l.useMemo)((function(){return String(u).length>0&&n&&(0,r.jsx)(v.Z,{position:"end",children:(0,r.jsx)(h.Z,{onClick:n,children:(0,r.jsx)(d.Z,{fontSize:"small"})})})}),[n,u]);return(0,r.jsx)(b.Z,O({endAdornment:s,value:u},a,{sx:c}))};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 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}var Z=function(e){var n=e.id,t=e.label,d=e.selectItems,y=e.checkItem,p=e.disableItem,m=e.formControlProps,v=e.hideItem,h=e.inputLabelProps,b=void 0===h?{}:h,g=e.isReadOnly,j=void 0!==g&&g,O=e.messageBoxProps,x=void 0===O?{}:O,Z=e.name,C=e.onBlur,A=e.onChange,I=e.onFocus,E=e.required,M=e.selectProps,D=void 0===M?{}:M,U=D.multiple,T=D.sx,L=e.value,F=e.isCheckableItems,V=void 0===F?U:F,R=P(e.selectProps,["multiple","sx"]),_=(0,l.useMemo)((function(){return j?S(k({},"& .".concat(o.Z.icon),{visibility:"hidden"}),T):T}),[j,T]),H=(0,l.useCallback)((function(e){return V&&(0,r.jsx)(i.Z,{checked:null===y||void 0===y?void 0:y.call(null,e)})}),[y,V]),N=(0,l.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===v||void 0===v?void 0:v.call(null,e))?"none":void 0},value:e,children:[H(e),t]},"".concat(n,"-").concat(e))}),[H,p,v,n]),$=(0,l.useMemo)((function(){return"".concat(n,"-select-element")}),[n]),B=(0,l.useMemo)((function(){return(0,r.jsx)(s.Z,{id:n,label:t})}),[n,t]),W=(0,l.useMemo)((function(){return t&&(0,r.jsx)(f.Z,S({htmlFor:$,isNotifyRequired:E},b,{children:t}))}),[b,E,t,$]),z=(0,l.useMemo)((function(){return d.map((function(e){var n="string"===typeof e?{value:e}:e,t=n.value,r=n.displayValue;return N(t,void 0===r?t:r)}))}),[N,d]);return(0,r.jsxs)(u.Z,S({fullWidth:!0},m,{children:[W,(0,r.jsx)(w,S({id:$,input:B,multiple:U,name:Z,onBlur:C,onChange:A,onFocus:I,readOnly:j,value:L},R,{sx:_,children:z})),(0,r.jsx)(a.Z,S({},x))]}))}},3906:function(e,n,t){"use strict";var r=t(5893),o=t(7294),i=t(6607),u=t(8610);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 a(e){for(var n=1;n0}),[d.length]),m=(0,o.useMemo)((function(){return f.length>1}),[f.length]),v=(0,o.useCallback)((function(e){var n=e.confirmDialogProps,t=void 0===n?{}:n,o=e.formSummaryProps,i=void 0===o?{}:o,l=e.getConfirmDialogTitle,s=e.onProceedAppend,f=e.renderEntry;return a({actionProceedText:"Delete",content:(0,r.jsx)(u.Z,a({entries:c,maxDepth:0,renderEntry:f},i)),onProceedAppend:s,proceedColour:"red",titleText:l(d.length)},t)}),[c,d.length]),h=(0,o.useCallback)((function(e){return c[e]}),[c]),b=(0,o.useCallback)((function(e){return s(f.reduce((function(n,t){return e&&(n[t]=e),n}),{}))}),[f]),g=(0,o.useCallback)((function(e,n){return s((0,i.ZP)(e,n||void 0))}),[]);return{buildDeleteDialogProps:v,checklist:c,checks:d,getCheck:h,hasAllChecks:y,hasChecks:p,multipleItems:m,setAllChecks:b,setCheck:g}}},6632:function(e,n,t){"use strict";var r=t(7294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(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(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.actionProceedText,t=void 0===n?"":n,o=e.content,l=void 0===o?"":o,a=e.titleText,c=void 0===a?"":a,s=u(e,["actionProceedText","content","titleText"]);return(0,r.useState)(i({actionProceedText:t,content:l,titleText:c},s))}},7791:function(e,n,t){"use strict";var r=t(8100),o=t(2029),i=t(1200);function u(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}n.Z=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.fetcher,l=void 0===t?i.Z:t,a=n.baseUrl,c=void 0===a?o.Z:a,s=u(n,["fetcher","baseUrl"]),f=(0,r.ZP)("".concat(c).concat(e),l,s),d=f.data,y=f.error,p=!y&&!d;return{data:d,error:y,loading:p}}},8669:function(e,n,t){"use strict";t.d(n,{Z:function(){return o}});var r=function(e){return e.reduce((function(e,n){var t=n.hostName,r=n.hostType,o=n.hostUUID;return e[o]={name:t,type:r,uuid:o},e}),{})},o=function(e){return e.reduce((function(e,n){var t=n.anvilDescription,o=n.anvilName,i=n.anvilUUID,u=n.hosts;return e[i]={description:t,hosts:r(u),name:o,uuid:i},e}),{})}},6474:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Ae}});var r=t(5893),o=t(9008),i=t(5521),u=t(4490),l=t(7294),a=t(2029),c=[["iso",["application/x-cd-image","ISO (optical disc)"]],["other",["text/plain","Other file type"]],["script",["text/plain","Script (program)"]]],s=new Map(c),f=t(2175),d=t(5934),y=t(46),p=t(4390),m=t(4825);function v(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t1&&void 0!==arguments[1]?arguments[1]:{},t=n.build,r=void 0===t?function(e,n){return{children:n,type:"warning"}}:t,o=n.chain,i=void 0===o?"":o;return Object.entries(e).reduce((function(e,n){var t=g(n,2),o=t[0],u=t[1],l=String(i).length?[i,o].join("."):o;return"object"===typeof u?b({},e,j(u,{chain:l})):(e[l]=r(l,u),e)}),{})},O=j,x=t(3457),w=t(6486),k=t(4690),S=t(6125),P=t(6284),Z=t(3679),C=t(2519),A=t(7750),I=t(4188),E=t(3675);function M(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 T(e){return function(e){if(Array.isArray(e))return M(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 M(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 M(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 L(e){var n=function(e,n){if("object"!==F(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==F(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===F(n)?n:String(n)}var F=function(e){return e&&"undefined"!==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};var V=(0,l.forwardRef)((function(e,n){var t=e.input,r=e.onChange,o=void 0===r?function(e){for(var n,t,r=e.handlers,o=r.base,i=r.origin,u=arguments.length,l=new Array(u>1?u-1:0),a=1;ae.length)&&(n=e.length);for(var t=0,r=new Array(n);t1}),[i.values,o]),O=(0,l.useMemo)((function(){return(0,r.jsx)(R,{input:(0,r.jsx)(P.Z,{id:p,label:"File name",name:p,onBlur:s,onChange:d,value:i.values[o].name})})}),[d,i.values,o,s,p]),I=(0,l.useMemo)((function(){return u&&(0,r.jsx)(Z.TZ,{header:"Sync with node(s)",panelProps:{mb:0,mt:0,width:"100%"},children:(0,r.jsx)(S.Z,{allowCheckAll:j("anvils"),allowCheckItem:!0,edit:!0,header:!0,listItems:n,getListCheckboxProps:function(){return b("anvils")},getListItemCheckboxProps:function(e){return g("anvils",e)},renderListItem:function(e,n){var t=n.description,o=n.name;return(0,r.jsxs)(A.Ac,{children:[o,": ",t]})}})})}),[n,j,b,g,u]),E=(0,l.useMemo)((function(){return u&&(0,r.jsx)(Z.TZ,{header:"Sync with DR host(s)",panelProps:{mb:0,mt:0,width:"100%"},children:(0,r.jsx)(S.Z,{allowCheckAll:j("drHosts"),allowCheckItem:!0,edit:!0,header:!0,listItems:t,getListCheckboxProps:function(){return b("drHosts")},getListItemCheckboxProps:function(e){return g("drHosts",e)},renderListItem:function(e,n){var t=n.hostName;return(0,r.jsx)(A.Ac,{children:t})}})})}),[t,j,b,g,u]),M=(0,l.useMemo)((function(){return a&&(0,r.jsx)(C.Z,{id:v,label:"File type",name:v,onBlur:s,onChange:f,selectItems:c.map((function(e){var n=H(e,2),t=n[0];return{displayValue:H(n[1],2)[1],value:t}})),value:i.values[o].type})}),[i.values,o,s,f,a,v]);return(0,r.jsxs)(x.Z,{sx:{"& > :not(:first-child)":{marginTop:"1em"}},children:[(0,r.jsxs)(k.Z,{sm:"row",xs:"column",children:[O,M]}),I,E]})},$=t(1770),B=t(8187),W=t(7869),z=t(6310);function q(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var G=function(e,n){return e&&Object.keys(e).reduce((function(e,t){return function(e){for(var n=1;n :first-child":{minWidth:100,overflow:"hidden",overflowWrap:"normal",textOverflow:"ellipsis",whiteSpace:"nowrap",width:{xs:"100%",md:200},wordBreak:"keep-all"},"& > :last-child":{flexGrow:1}},children:[(0,r.jsx)(A.Ac,{children:n}),(0,r.jsx)(ne.ko,{progressPercentage:t})]},"upload-".concat(o))}))})},re=t(2749);function oe(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);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}var w=function(e){var n=e.onClearIndicatorClick,t=x(e,["onClearIndicatorClick"]),i=t.sx,u=t.value,a=x(t,["sx","value"]),c=(0,l.useMemo)((function(){var e;return O((j(e={},"& .".concat(o.Z.icon),{color:g.s7}),j(e,"& .".concat(y.Z.root),{marginRight:".8em"}),j(e,"& .".concat(p.Z.root),{color:g.s7,visibility:"hidden"}),j(e,"&:hover .".concat(y.Z.root," .").concat(p.Z.root,",\n &.").concat(m.Z.focused," .").concat(y.Z.root," .").concat(p.Z.root),{visibility:"visible"}),e),i)}),[i]),s=(0,l.useMemo)((function(){return String(u).length>0&&n&&(0,r.jsx)(v.Z,{position:"end",children:(0,r.jsx)(h.Z,{onClick:n,children:(0,r.jsx)(d.Z,{fontSize:"small"})})})}),[n,u]);return(0,r.jsx)(b.Z,O({endAdornment:s,value:u},a,{sx:c}))};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 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}var Z=function(e){var n=e.id,t=e.label,d=e.selectItems,y=e.checkItem,p=e.disableItem,m=e.formControlProps,v=e.hideItem,h=e.inputLabelProps,b=void 0===h?{}:h,g=e.isReadOnly,j=void 0!==g&&g,O=e.messageBoxProps,x=void 0===O?{}:O,Z=e.name,C=e.onBlur,A=e.onChange,I=e.onFocus,E=e.required,M=e.selectProps,D=void 0===M?{}:M,U=D.multiple,T=D.sx,L=e.value,F=e.isCheckableItems,V=void 0===F?U:F,R=P(e.selectProps,["multiple","sx"]),_=(0,l.useMemo)((function(){return j?S(k({},"& .".concat(o.Z.icon),{visibility:"hidden"}),T):T}),[j,T]),H=(0,l.useCallback)((function(e){return V&&(0,r.jsx)(i.Z,{checked:null===y||void 0===y?void 0:y.call(null,e)})}),[y,V]),N=(0,l.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===v||void 0===v?void 0:v.call(null,e))?"none":void 0},value:e,children:[H(e),t]},"".concat(n,"-").concat(e))}),[H,p,v,n]),$=(0,l.useMemo)((function(){return"".concat(n,"-select-element")}),[n]),B=(0,l.useMemo)((function(){return(0,r.jsx)(s.Z,{id:n,label:t})}),[n,t]),W=(0,l.useMemo)((function(){return t&&(0,r.jsx)(f.Z,S({htmlFor:$,isNotifyRequired:E},b,{children:t}))}),[b,E,t,$]),z=(0,l.useMemo)((function(){return d.map((function(e){var n="string"===typeof e?{value:e}:e,t=n.value,r=n.displayValue;return N(t,void 0===r?t:r)}))}),[N,d]);return(0,r.jsxs)(u.Z,S({fullWidth:!0},m,{children:[W,(0,r.jsx)(w,S({id:$,input:B,multiple:U,name:Z,onBlur:C,onChange:A,onFocus:I,readOnly:j,value:L},R,{sx:_,children:z})),(0,r.jsx)(a.Z,S({},x))]}))}},3906:function(e,n,t){"use strict";var r=t(5893),o=t(7294),i=t(6607),u=t(8610);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 a(e){for(var n=1;n0}),[d.length]),m=(0,o.useMemo)((function(){return f.length>1}),[f.length]),v=(0,o.useCallback)((function(e){var n=e.confirmDialogProps,t=void 0===n?{}:n,o=e.formSummaryProps,i=void 0===o?{}:o,l=e.getConfirmDialogTitle,s=e.onProceedAppend,f=e.renderEntry;return a({actionProceedText:"Delete",content:(0,r.jsx)(u.Z,a({entries:c,maxDepth:0,renderEntry:f},i)),onProceedAppend:s,proceedColour:"red",titleText:l(d.length)},t)}),[c,d.length]),h=(0,o.useCallback)((function(e){return c[e]}),[c]),b=(0,o.useCallback)((function(e){return s(f.reduce((function(n,t){return e&&(n[t]=e),n}),{}))}),[f]),g=(0,o.useCallback)((function(e,n){return s((0,i.ZP)(e,n||void 0))}),[]);return{buildDeleteDialogProps:v,checklist:c,checks:d,getCheck:h,hasAllChecks:y,hasChecks:p,multipleItems:m,setAllChecks:b,setCheck:g}}},6632:function(e,n,t){"use strict";var r=t(7294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(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(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.actionProceedText,t=void 0===n?"":n,o=e.content,l=void 0===o?"":o,a=e.titleText,c=void 0===a?"":a,s=u(e,["actionProceedText","content","titleText"]);return(0,r.useState)(i({actionProceedText:t,content:l,titleText:c},s))}},7791:function(e,n,t){"use strict";var r=t(8100),o=t(2029),i=t(1200);function u(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}n.Z=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.fetcher,l=void 0===t?i.Z:t,a=n.baseUrl,c=void 0===a?o.Z:a,s=u(n,["fetcher","baseUrl"]),f=(0,r.ZP)("".concat(c).concat(e),l,s),d=f.data,y=f.error,p=!y&&!d;return{data:d,error:y,loading:p}}},8669:function(e,n,t){"use strict";t.d(n,{Z:function(){return o}});var r=function(e){return e.reduce((function(e,n){var t=n.hostName,r=n.hostType,o=n.hostUUID;return e[o]={name:t,type:r,uuid:o},e}),{})},o=function(e){return e.reduce((function(e,n){var t=n.anvilDescription,o=n.anvilName,i=n.anvilUUID,u=n.hosts;return e[i]={description:t,hosts:r(u),name:o,uuid:i},e}),{})}},6474:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Ae}});var r=t(5893),o=t(9008),i=t(8750),u=t(4490),l=t(7294),a=t(2029),c=[["iso",["application/x-cd-image","ISO (optical disc)"]],["other",["text/plain","Other file type"]],["script",["text/plain","Script (program)"]]],s=new Map(c),f=t(2175),d=t(5934),y=t(46),p=t(4390),m=t(4825);function v(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t1&&void 0!==arguments[1]?arguments[1]:{},t=n.build,r=void 0===t?function(e,n){return{children:n,type:"warning"}}:t,o=n.chain,i=void 0===o?"":o;return Object.entries(e).reduce((function(e,n){var t=g(n,2),o=t[0],u=t[1],l=String(i).length?[i,o].join("."):o;return"object"===typeof u?b({},e,j(u,{chain:l})):(e[l]=r(l,u),e)}),{})},O=j,x=t(3457),w=t(6486),k=t(4690),S=t(6125),P=t(6284),Z=t(3679),C=t(2519),A=t(7750),I=t(4188),E=t(3675);function M(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 T(e){return function(e){if(Array.isArray(e))return M(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 M(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 M(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 L(e){var n=function(e,n){if("object"!==F(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==F(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===F(n)?n:String(n)}var F=function(e){return e&&"undefined"!==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};var V=(0,l.forwardRef)((function(e,n){var t=e.input,r=e.onChange,o=void 0===r?function(e){for(var n,t,r=e.handlers,o=r.base,i=r.origin,u=arguments.length,l=new Array(u>1?u-1:0),a=1;ae.length)&&(n=e.length);for(var t=0,r=new Array(n);t1}),[i.values,o]),O=(0,l.useMemo)((function(){return(0,r.jsx)(R,{input:(0,r.jsx)(P.Z,{id:p,label:"File name",name:p,onBlur:s,onChange:d,value:i.values[o].name})})}),[d,i.values,o,s,p]),I=(0,l.useMemo)((function(){return u&&(0,r.jsx)(Z.TZ,{header:"Sync with node(s)",panelProps:{mb:0,mt:0,width:"100%"},children:(0,r.jsx)(S.Z,{allowCheckAll:j("anvils"),allowCheckItem:!0,edit:!0,header:!0,listItems:n,getListCheckboxProps:function(){return b("anvils")},getListItemCheckboxProps:function(e){return g("anvils",e)},renderListItem:function(e,n){var t=n.description,o=n.name;return(0,r.jsxs)(A.Ac,{children:[o,": ",t]})}})})}),[n,j,b,g,u]),E=(0,l.useMemo)((function(){return u&&(0,r.jsx)(Z.TZ,{header:"Sync with DR host(s)",panelProps:{mb:0,mt:0,width:"100%"},children:(0,r.jsx)(S.Z,{allowCheckAll:j("drHosts"),allowCheckItem:!0,edit:!0,header:!0,listItems:t,getListCheckboxProps:function(){return b("drHosts")},getListItemCheckboxProps:function(e){return g("drHosts",e)},renderListItem:function(e,n){var t=n.hostName;return(0,r.jsx)(A.Ac,{children:t})}})})}),[t,j,b,g,u]),M=(0,l.useMemo)((function(){return a&&(0,r.jsx)(C.Z,{id:v,label:"File type",name:v,onBlur:s,onChange:f,selectItems:c.map((function(e){var n=H(e,2),t=n[0];return{displayValue:H(n[1],2)[1],value:t}})),value:i.values[o].type})}),[i.values,o,s,f,a,v]);return(0,r.jsxs)(x.Z,{sx:{"& > :not(:first-child)":{marginTop:"1em"}},children:[(0,r.jsxs)(k.Z,{sm:"row",xs:"column",children:[O,M]}),I,E]})},$=t(1770),B=t(8187),W=t(7869),z=t(6310);function q(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var G=function(e,n){return e&&Object.keys(e).reduce((function(e,t){return function(e){for(var n=1;n :first-child":{minWidth:100,overflow:"hidden",overflowWrap:"normal",textOverflow:"ellipsis",whiteSpace:"nowrap",width:{xs:"100%",md:200},wordBreak:"keep-all"},"& > :last-child":{flexGrow:1}},children:[(0,r.jsx)(A.Ac,{children:n}),(0,r.jsx)(ne.ko,{progressPercentage:t})]},"upload-".concat(o))}))})},re=t(2749);function oe(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);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 d(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=[],c=!0,a=!1;try{for(t=t.call(e);!(c=(r=t.next()).done)&&(o.push(r.value),!n||o.length!==n);c=!0);}catch(s){a=!0,i=s}finally{try{c||null==t.return||t.return()}finally{if(a)throw i}}return o}}(e,n)||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,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.")}()}n.Z=function(e){var n=e.calculateItemBreakpoints,t=void 0===n?function(){return{xs:1}}:n,a=e.layout,s=e.wrapperBoxProps,f=u(e,["calculateItemBreakpoints","layout","wrapperBoxProps"]),h=(0,i.useMemo)((function(){return Object.entries(a).map((function(e,n){var r=d(e,2),c=r[0],a=r[1],s=c;return a?(0,i.createElement)(o.ZP,l({},t(n,s),{key:s,item:!0},a)):void 0}))}),[t,a]);return(0,r.jsx)(c.Z,l({},s,{children:(0,r.jsx)(o.ZP,l({container:!0},f,{children:h}))}))}},5741:function(e,n,t){"use strict";var r=t(5893),i=t(1714),o=t(122),c=t(7169),a=t(4690);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 l(e){for(var n=1;n=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}n.Z=function(e){var n=e.children,t=e.sx,s=u(e,["children","sx"]);return(0,r.jsx)(o.Z,l({underline:"hover",variant:"subtitle1"},s,{sx:l({color:c.lD,textDecorationColor:c.s7},t),children:(0,r.jsxs)(a.Z,{row:!0,children:[n,(0,r.jsx)(i.Z,{sx:{marginLeft:".3em"}})]})}))}},7791:function(e,n,t){"use strict";var r=t(8100),i=t(2029),o=t(1200);function c(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}n.Z=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.fetcher,a=void 0===t?o.Z:t,s=n.baseUrl,l=void 0===s?i.Z:s,u=c(n,["fetcher","baseUrl"]),d=(0,r.ZP)("".concat(l).concat(e),a,u),f=d.data,h=d.error,m=!h&&!f;return{data:f,error:h,loading:m}}},8669:function(e,n,t){"use strict";t.d(n,{Z:function(){return i}});var r=function(e){return e.reduce((function(e,n){var t=n.hostName,r=n.hostType,i=n.hostUUID;return e[i]={name:t,type:r,uuid:i},e}),{})},i=function(e){return e.reduce((function(e,n){var t=n.anvilDescription,i=n.anvilName,o=n.anvilUUID,c=n.hosts;return e[o]={description:t,hosts:r(c),name:i,uuid:o},e}),{})}},9048:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return X}});var r=t(5893),i=t(2428),o=t(8263),c=t(7357),a=t(7720),s=t(9008),l=t(1163),u=t(7294),d=t(2029),f=t(7169),h=t(8673),m=t(4490),v=function(e){var n=e.anvil_name,t=e.anvil_state,r=e.anvil_uuid;return{hosts:e.hosts.reduce((function(e,n){var t=n.host_name,r=n.host_uuid,i=n.maintenance_mode,o=n.server_count,c=n.state,a=n.state_percent;return e[r]={name:t,maintenance:i,serverCount:o,state:c,stateProgress:a,uuid:r},e}),{}),name:n,state:t,uuid:r}},x=function(e){var n=e.allocated,t=e.reserved,r=e.total;return{allocated:BigInt(n),reserved:BigInt(t),total:BigInt(r)}},j=function(e){var n=e.storage_groups,t=e.total_free,r=e.total_size,i=BigInt(t),o=BigInt(r);return n.reduce((function(e,n){var t=n.storage_group_free,r=n.storage_group_name,i=n.storage_group_total,o=n.storage_group_uuid,c=BigInt(t),a=BigInt(i);return e.storageGroups[o]={free:c,name:r,size:a,uuid:o},e}),{storageGroups:{},totalFree:i,totalSize:o})},p=t(582),g=t(4690),b=t(2152),y=t(5813),Z=t(7750),O=t(7791);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}var w=BigInt(100),_={degraded:f.hM,not_ready:f.Wd,optimal:f.Ej},S={offline:f.Wd,online:f.Ej},I=function(e){var n=e.anvilUuid,t=(0,O.Z)("/anvil/".concat(n)),i=t.data,c=t.loading,a=(0,u.useMemo)((function(){return i&&v(i)}),[i]),s=(0,O.Z)("/anvil/".concat(n,"/cpu")),l=s.data,d=s.loading,I=(0,u.useMemo)((function(){return l&&Object.values(l.hosts)}),[l]),A=(0,O.Z)("/anvil/".concat(n,"/memory")),U=A.data,C=A.loading,E=(0,u.useMemo)((function(){return U&&x(U)}),[U]),M=(0,O.Z)("/anvil/".concat(n,"/store")),B=M.data,k=M.loading,N=(0,u.useMemo)((function(){return B&&j(B)}),[B]),D=(0,u.useMemo)((function(){return[c,d,C,k].some((function(e){return e}))}),[c,d,C,k]),T=(0,u.useMemo)((function(){return a&&(0,r.jsx)(Z.$_,{inheritColour:!0,color:_[a.state],children:a.state})}),[a]),z=(0,u.useMemo)((function(){return a&&(0,r.jsx)(o.ZP,{alignItems:"center",columns:20,columnSpacing:"0.5em",container:!0,sx:P({},"& > .".concat(h.Z.item,":nth-child(-n + 4)"),{marginBottom:"-.6em"}),children:Object.values(a.hosts).map((function(e){var n,t,i=e.name,c=e.serverCount,a=e.state,s=e.stateProgress,l=e.uuid,u=null!==(n=S[a])&&void 0!==n?n:f.s7,d=a;return["offline","online"].includes(a)?t=(0,r.jsx)(Z.$_,{variant:"caption",children:c}):d="".concat(s,"%"),[(0,r.jsx)(o.ZP,{item:!0,xs:7,children:(0,r.jsx)(Z.Ac,{variant:"caption",whiteSpace:"nowrap",children:i})},"".concat(l,"-state-label")),(0,r.jsx)(o.ZP,{item:!0,xs:5,children:(0,r.jsx)(Z.$_,{inheritColour:!0,color:u,children:d})},"".concat(l,"-state")),(0,r.jsx)(o.ZP,{item:!0,xs:!0,children:(0,r.jsx)(p.Z,{sx:{marginBottom:"-.4em"}})},"".concat(l,"-divider")),(0,r.jsx)(o.ZP,{item:!0,width:"2.2em",children:t&&(0,r.jsx)(Z.Ac,{variant:"caption",children:"Servers"})},"".concat(l,"-server-label")),(0,r.jsx)(o.ZP,{display:"flex",item:!0,justifyContent:"flex-end",width:"2em",children:t},"".concat(l,"-server-count"))]}))})}),[a]),$=(0,u.useMemo)((function(){return l&&I&&(0,r.jsxs)(g.Z,{row:!0,spacing:".5em",children:[(0,r.jsx)(g.Z,{spacing:0,children:(0,r.jsxs)(Z.Ac,{variant:"caption",whiteSpace:"nowrap",children:["Vendor"," ",(0,r.jsx)(Z.Q0,{sx:{paddingRight:0},children:I[0].vendor})]})}),(0,r.jsx)(p.Z,{sx:{flexGrow:1}}),(0,r.jsxs)(o.ZP,{alignItems:"center",columns:2,container:!0,sx:P({width:"3.7em"},"& > .".concat(h.Z.item,":nth-child(-n + 2)"),{marginBottom:"-.6em"}),children:[(0,r.jsx)(o.ZP,{item:!0,xs:1,children:(0,r.jsx)(Z.Ac,{variant:"caption",children:"Cores"})}),(0,r.jsx)(o.ZP,{display:"flex",item:!0,justifyContent:"flex-end",xs:1,children:(0,r.jsx)(Z.$_,{variant:"caption",children:l.cores})}),(0,r.jsx)(o.ZP,{item:!0,xs:1,children:(0,r.jsx)(Z.Ac,{variant:"caption",children:"Threads"})}),(0,r.jsx)(o.ZP,{display:"flex",item:!0,justifyContent:"flex-end",xs:1,children:(0,r.jsx)(Z.$_,{variant:"caption",children:l.threads})})]})]})}),[l,I]),W=(0,u.useMemo)((function(){return E&&(0,r.jsxs)(g.Z,{spacing:0,children:[(0,r.jsx)(g.Z,{row:!0,justifyContent:"flex-end",children:(0,r.jsxs)(Z.Ac,{mb:"-.3em",variant:"caption",children:["Free",(0,r.jsx)(Z.Q0,{children:(0,m._d)(E.total-(E.reserved+E.allocated),{toUnit:"ibyte"})}),"/",(0,r.jsx)(Z.Q0,{sx:{paddingRight:0},children:(0,m._d)(E.total,{toUnit:"ibyte"})})]})}),(0,r.jsx)(y.Z,{thin:!0,value:{reserved:{value:Number(E.reserved*w/E.total)},allocated:{value:Number((E.reserved+E.allocated)*w/E.total),colour:{0:f.Ej,70:f.Wd,90:f.hM}}}})]})}),[E]),F=(0,u.useMemo)((function(){return N&&(0,r.jsxs)(g.Z,{spacing:0,children:[(0,r.jsx)(g.Z,{row:!0,justifyContent:"flex-end",children:(0,r.jsxs)(Z.Ac,{mb:"-.3em",variant:"caption",children:["Total free",(0,r.jsx)(Z.Q0,{children:(0,m._d)(N.totalFree,{toUnit:"ibyte"})}),"/",(0,r.jsx)(Z.Q0,{sx:{paddingRight:0},children:(0,m._d)(N.totalSize,{toUnit:"ibyte"})})]})}),(0,r.jsx)(y.Z,{thin:!0,value:{allocated:{value:Number((N.totalSize-N.totalFree)*w/N.totalSize),colour:{0:f.Ej,70:f.Wd,90:f.hM}}}})]})}),[N]);return D?(0,r.jsx)(b.Z,{mt:0}):(0,r.jsxs)(o.ZP,{alignItems:"center",columns:4,container:!0,sx:P({},"& > .".concat(h.Z.item,":nth-child(odd)"),{alignItems:"center",display:"flex",height:"2.2em"}),children:[(0,r.jsx)(o.ZP,{item:!0,xs:1,children:(0,r.jsx)(Z.Ac,{children:"Node"})}),(0,r.jsx)(o.ZP,{item:!0,xs:3,children:T}),(0,r.jsx)(o.ZP,{item:!0,xs:1,children:(0,r.jsx)(Z.Ac,{children:"Subnodes"})}),(0,r.jsx)(o.ZP,{item:!0,xs:3,children:z}),(0,r.jsx)(o.ZP,{item:!0,xs:1,children:(0,r.jsx)(Z.Ac,{children:"CPU"})}),(0,r.jsx)(o.ZP,{item:!0,xs:3,children:$}),(0,r.jsx)(o.ZP,{item:!0,xs:1,children:(0,r.jsx)(Z.Ac,{children:"Memory"})}),(0,r.jsx)(o.ZP,{item:!0,xs:3,children:W}),(0,r.jsx)(o.ZP,{item:!0,xs:1,children:(0,r.jsx)(Z.Ac,{children:"Storage"})}),(0,r.jsx)(o.ZP,{item:!0,xs:3,children:F})]})},A=t(8669),U=t(7504),C=t(3679);var E=function(){var e=(0,O.Z)("/anvil",{refreshInterval:5e3}),n=e.data,t=e.loading,i=(0,u.useMemo)((function(){return n&&(0,A.Z)(n)}),[n]),o=(0,u.useMemo)((function(){return i&&(0,r.jsx)(U.Z,{columns:{xs:1,sm:2,md:3,xl:4},layout:Object.values(i).reduce((function(e,n){var t=n.description,i=n.name,o=n.uuid;return e["anvil-".concat(o)]={children:(0,r.jsxs)(C.Lg,{height:"100%",mv:0,children:[(0,r.jsx)(C.CH,{children:(0,r.jsxs)(Z.Ac,{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",children:[i,": ",t]})}),(0,r.jsx)(C.bc,{children:(0,r.jsx)(I,{anvilUuid:o})})]})},e}),{}),spacing:"1em",sx:(e={alignContent:"stretch"},n="& > .".concat(h.Z.item),t={minWidth:"20em"},n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e)});var e,n,t}),[i]);return(0,r.jsxs)(C.s_,{children:[(0,r.jsx)(C.V9,{children:(0,r.jsx)(Z.z,{children:"Nodes"})}),t?(0,r.jsx)(b.Z,{}):o]})},M=t(5094),B=t(1200),k=t(5521),N=t(1706),D=t(5741),T=t(9),z=t(1905),$=t(4968),W=t(9370);function F(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t div":{height:"100%",marginBottom:0,marginTop:0}},xs:1,children:(0,r.jsx)(M.M,{externalPreview:s,externalTimestamp:f,headerEndAdornment:[(0,r.jsx)(D.Z,{href:"/server?uuid=".concat(d,"&server_name=").concat(l,"&server_state=").concat(u),children:l},"server_list_to_server_".concat(d)),(0,r.jsx)(D.Z,{href:"/anvil?anvil_uuid=".concat(i),sx:{opacity:.7},children:t},"server_list_server_".concat(d,"_to_anvil_").concat(i))],isExternalLoading:a,isExternalPreviewStale:c,isFetchPreview:!1,isShowControls:!1,isUseInnerPanel:!0,onClickPreview:function(){n.push("/server?uuid=".concat(d,"&server_name=").concat(l,"&server_state=").concat(u,"&vnc=1"))},serverState:u,serverUUID:d})},"".concat(d,"-preview"))}))})},V=function(e,n){return""===n?{exclude:e,include:[]}:e.reduce((function(e,t){return t.serverName.includes(n)?e.include.push(t):e.exclude.push(t),e}),{exclude:[],include:[]})},X=function(){var e=(0,u.useRef)(!0),n=(0,l.useRouter)(),t=(0,u.useState)([]),o=t[0],h=t[1],m=(0,u.useState)([]),v=m[0],x=m[1],j=(0,u.useState)([]),p=j[0],g=j[1],y=(0,u.useState)(""),O=y[0],P=y[1],w=(0,u.useState)(!1),_=w[0],S=w[1],I=function(){for(var n=arguments.length,t=new Array(n),r=0;r0&&void 0!==arguments[0]?arguments[0]:[],t=n.map((function(n){var r,i=n.serverUUID,c=R({},n,{loading:!0,screenshot:(null===(r=o.find((function(e){return e.serverUUID===i})))||void 0===r?void 0:r.screenshot)||"",timestamp:0});return(0,B.Z)("".concat(d.Z,"/server/").concat(i,"?ss=1")).then((function(n){var r=n.screenshot,i=n.timestamp;if(0!==r.length){c.isScreenshotStale=!(0,W.Z$)(i,300),c.loading=!1,c.screenshot=r,c.timestamp=i;var o=L(t);e.current&&h(o)}})).catch((function(){c.isScreenshotStale=!0})).finally((function(){c.loading=!1})),c}));h(t),I(t,O)},refreshInterval:6e4}).isLoading;return(0,u.useEffect)((function(){return function(){e.current=!1}}),[]),(0,r.jsxs)(c.Z,{children:[(0,r.jsx)(s.default,{children:(0,r.jsx)("title",{children:"Dashboard"})}),(0,r.jsx)(k.Z,{}),(0,r.jsx)(C.s_,{children:A?(0,r.jsx)(b.Z,{}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(C.V9,{sx:{marginBottom:"2em"},children:[(0,r.jsx)(Z.z,{children:"Servers"}),(0,r.jsx)(N.Z,{onClick:function(){return S(!0)},children:(0,r.jsx)(i.Z,{})}),(0,r.jsx)(T.Z,{placeholder:"Search by server name",onChange:function(e){var n=e.target.value;P(n),I(o,n)},sx:{minWidth:"16em"},value:O})]}),G(p,n),p.length>0&&(0,r.jsx)(a.Z,{sx:{backgroundColor:f.d}}),G(v,n)]})}),(0,r.jsx)(E,{}),(0,r.jsx)($.Z,{dialogProps:{open:_},onClose:function(){S(!1)}})]})}}},function(e){e.O(0,[412,438,894,182,900,485,433,62,195,987,157,825,94,774,888,179],(function(){return n=5301,e(e.s=n);var n}));var n=e.O();_N_E=n}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{5301:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return t(9048)}])},7504:function(e,n,t){"use strict";var r=t(5893),i=t(7294),o=t(8263),c=t(7357);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 d(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=[],c=!0,a=!1;try{for(t=t.call(e);!(c=(r=t.next()).done)&&(o.push(r.value),!n||o.length!==n);c=!0);}catch(s){a=!0,i=s}finally{try{c||null==t.return||t.return()}finally{if(a)throw i}}return o}}(e,n)||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,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.")}()}n.Z=function(e){var n=e.calculateItemBreakpoints,t=void 0===n?function(){return{xs:1}}:n,a=e.layout,s=e.wrapperBoxProps,f=u(e,["calculateItemBreakpoints","layout","wrapperBoxProps"]),h=(0,i.useMemo)((function(){return Object.entries(a).map((function(e,n){var r=d(e,2),c=r[0],a=r[1],s=c;return a?(0,i.createElement)(o.ZP,l({},t(n,s),{key:s,item:!0},a)):void 0}))}),[t,a]);return(0,r.jsx)(c.Z,l({},s,{children:(0,r.jsx)(o.ZP,l({container:!0},f,{children:h}))}))}},5741:function(e,n,t){"use strict";var r=t(5893),i=t(1714),o=t(122),c=t(7169),a=t(4690);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 l(e){for(var n=1;n=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}n.Z=function(e){var n=e.children,t=e.sx,s=u(e,["children","sx"]);return(0,r.jsx)(o.Z,l({underline:"hover",variant:"subtitle1"},s,{sx:l({color:c.lD,textDecorationColor:c.s7},t),children:(0,r.jsxs)(a.Z,{row:!0,children:[n,(0,r.jsx)(i.Z,{sx:{marginLeft:".3em"}})]})}))}},7791:function(e,n,t){"use strict";var r=t(8100),i=t(2029),o=t(1200);function c(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}n.Z=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.fetcher,a=void 0===t?o.Z:t,s=n.baseUrl,l=void 0===s?i.Z:s,u=c(n,["fetcher","baseUrl"]),d=(0,r.ZP)("".concat(l).concat(e),a,u),f=d.data,h=d.error,m=!h&&!f;return{data:f,error:h,loading:m}}},8669:function(e,n,t){"use strict";t.d(n,{Z:function(){return i}});var r=function(e){return e.reduce((function(e,n){var t=n.hostName,r=n.hostType,i=n.hostUUID;return e[i]={name:t,type:r,uuid:i},e}),{})},i=function(e){return e.reduce((function(e,n){var t=n.anvilDescription,i=n.anvilName,o=n.anvilUUID,c=n.hosts;return e[o]={description:t,hosts:r(c),name:i,uuid:o},e}),{})}},9048:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return X}});var r=t(5893),i=t(2428),o=t(8263),c=t(7357),a=t(7720),s=t(9008),l=t(1163),u=t(7294),d=t(2029),f=t(7169),h=t(8673),m=t(4490),v=function(e){var n=e.anvil_name,t=e.anvil_state,r=e.anvil_uuid;return{hosts:e.hosts.reduce((function(e,n){var t=n.host_name,r=n.host_uuid,i=n.maintenance_mode,o=n.server_count,c=n.state,a=n.state_percent;return e[r]={name:t,maintenance:i,serverCount:o,state:c,stateProgress:a,uuid:r},e}),{}),name:n,state:t,uuid:r}},x=function(e){var n=e.allocated,t=e.reserved,r=e.total;return{allocated:BigInt(n),reserved:BigInt(t),total:BigInt(r)}},j=function(e){var n=e.storage_groups,t=e.total_free,r=e.total_size,i=BigInt(t),o=BigInt(r);return n.reduce((function(e,n){var t=n.storage_group_free,r=n.storage_group_name,i=n.storage_group_total,o=n.storage_group_uuid,c=BigInt(t),a=BigInt(i);return e.storageGroups[o]={free:c,name:r,size:a,uuid:o},e}),{storageGroups:{},totalFree:i,totalSize:o})},p=t(582),g=t(4690),b=t(2152),y=t(5813),Z=t(7750),O=t(7791);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}var w=BigInt(100),_={degraded:f.hM,not_ready:f.Wd,optimal:f.Ej},S={offline:f.Wd,online:f.Ej},I=function(e){var n=e.anvilUuid,t=(0,O.Z)("/anvil/".concat(n)),i=t.data,c=t.loading,a=(0,u.useMemo)((function(){return i&&v(i)}),[i]),s=(0,O.Z)("/anvil/".concat(n,"/cpu")),l=s.data,d=s.loading,I=(0,u.useMemo)((function(){return l&&Object.values(l.hosts)}),[l]),A=(0,O.Z)("/anvil/".concat(n,"/memory")),U=A.data,C=A.loading,E=(0,u.useMemo)((function(){return U&&x(U)}),[U]),M=(0,O.Z)("/anvil/".concat(n,"/store")),B=M.data,k=M.loading,N=(0,u.useMemo)((function(){return B&&j(B)}),[B]),D=(0,u.useMemo)((function(){return[c,d,C,k].some((function(e){return e}))}),[c,d,C,k]),T=(0,u.useMemo)((function(){return a&&(0,r.jsx)(Z.$_,{inheritColour:!0,color:_[a.state],children:a.state})}),[a]),z=(0,u.useMemo)((function(){return a&&(0,r.jsx)(o.ZP,{alignItems:"center",columns:20,columnSpacing:"0.5em",container:!0,sx:P({},"& > .".concat(h.Z.item,":nth-child(-n + 4)"),{marginBottom:"-.6em"}),children:Object.values(a.hosts).map((function(e){var n,t,i=e.name,c=e.serverCount,a=e.state,s=e.stateProgress,l=e.uuid,u=null!==(n=S[a])&&void 0!==n?n:f.s7,d=a;return["offline","online"].includes(a)?t=(0,r.jsx)(Z.$_,{variant:"caption",children:c}):d="".concat(s,"%"),[(0,r.jsx)(o.ZP,{item:!0,xs:7,children:(0,r.jsx)(Z.Ac,{variant:"caption",whiteSpace:"nowrap",children:i})},"".concat(l,"-state-label")),(0,r.jsx)(o.ZP,{item:!0,xs:5,children:(0,r.jsx)(Z.$_,{inheritColour:!0,color:u,children:d})},"".concat(l,"-state")),(0,r.jsx)(o.ZP,{item:!0,xs:!0,children:(0,r.jsx)(p.Z,{sx:{marginBottom:"-.4em"}})},"".concat(l,"-divider")),(0,r.jsx)(o.ZP,{item:!0,width:"2.2em",children:t&&(0,r.jsx)(Z.Ac,{variant:"caption",children:"Servers"})},"".concat(l,"-server-label")),(0,r.jsx)(o.ZP,{display:"flex",item:!0,justifyContent:"flex-end",width:"2em",children:t},"".concat(l,"-server-count"))]}))})}),[a]),$=(0,u.useMemo)((function(){return l&&I&&(0,r.jsxs)(g.Z,{row:!0,spacing:".5em",children:[(0,r.jsx)(g.Z,{spacing:0,children:(0,r.jsxs)(Z.Ac,{variant:"caption",whiteSpace:"nowrap",children:["Vendor"," ",(0,r.jsx)(Z.Q0,{sx:{paddingRight:0},children:I[0].vendor})]})}),(0,r.jsx)(p.Z,{sx:{flexGrow:1}}),(0,r.jsxs)(o.ZP,{alignItems:"center",columns:2,container:!0,sx:P({width:"3.7em"},"& > .".concat(h.Z.item,":nth-child(-n + 2)"),{marginBottom:"-.6em"}),children:[(0,r.jsx)(o.ZP,{item:!0,xs:1,children:(0,r.jsx)(Z.Ac,{variant:"caption",children:"Cores"})}),(0,r.jsx)(o.ZP,{display:"flex",item:!0,justifyContent:"flex-end",xs:1,children:(0,r.jsx)(Z.$_,{variant:"caption",children:l.cores})}),(0,r.jsx)(o.ZP,{item:!0,xs:1,children:(0,r.jsx)(Z.Ac,{variant:"caption",children:"Threads"})}),(0,r.jsx)(o.ZP,{display:"flex",item:!0,justifyContent:"flex-end",xs:1,children:(0,r.jsx)(Z.$_,{variant:"caption",children:l.threads})})]})]})}),[l,I]),W=(0,u.useMemo)((function(){return E&&(0,r.jsxs)(g.Z,{spacing:0,children:[(0,r.jsx)(g.Z,{row:!0,justifyContent:"flex-end",children:(0,r.jsxs)(Z.Ac,{mb:"-.3em",variant:"caption",children:["Free",(0,r.jsx)(Z.Q0,{children:(0,m._d)(E.total-(E.reserved+E.allocated),{toUnit:"ibyte"})}),"/",(0,r.jsx)(Z.Q0,{sx:{paddingRight:0},children:(0,m._d)(E.total,{toUnit:"ibyte"})})]})}),(0,r.jsx)(y.Z,{thin:!0,value:{reserved:{value:Number(E.reserved*w/E.total)},allocated:{value:Number((E.reserved+E.allocated)*w/E.total),colour:{0:f.Ej,70:f.Wd,90:f.hM}}}})]})}),[E]),F=(0,u.useMemo)((function(){return N&&(0,r.jsxs)(g.Z,{spacing:0,children:[(0,r.jsx)(g.Z,{row:!0,justifyContent:"flex-end",children:(0,r.jsxs)(Z.Ac,{mb:"-.3em",variant:"caption",children:["Total free",(0,r.jsx)(Z.Q0,{children:(0,m._d)(N.totalFree,{toUnit:"ibyte"})}),"/",(0,r.jsx)(Z.Q0,{sx:{paddingRight:0},children:(0,m._d)(N.totalSize,{toUnit:"ibyte"})})]})}),(0,r.jsx)(y.Z,{thin:!0,value:{allocated:{value:Number((N.totalSize-N.totalFree)*w/N.totalSize),colour:{0:f.Ej,70:f.Wd,90:f.hM}}}})]})}),[N]);return D?(0,r.jsx)(b.Z,{mt:0}):(0,r.jsxs)(o.ZP,{alignItems:"center",columns:4,container:!0,sx:P({},"& > .".concat(h.Z.item,":nth-child(odd)"),{alignItems:"center",display:"flex",height:"2.2em"}),children:[(0,r.jsx)(o.ZP,{item:!0,xs:1,children:(0,r.jsx)(Z.Ac,{children:"Node"})}),(0,r.jsx)(o.ZP,{item:!0,xs:3,children:T}),(0,r.jsx)(o.ZP,{item:!0,xs:1,children:(0,r.jsx)(Z.Ac,{children:"Subnodes"})}),(0,r.jsx)(o.ZP,{item:!0,xs:3,children:z}),(0,r.jsx)(o.ZP,{item:!0,xs:1,children:(0,r.jsx)(Z.Ac,{children:"CPU"})}),(0,r.jsx)(o.ZP,{item:!0,xs:3,children:$}),(0,r.jsx)(o.ZP,{item:!0,xs:1,children:(0,r.jsx)(Z.Ac,{children:"Memory"})}),(0,r.jsx)(o.ZP,{item:!0,xs:3,children:W}),(0,r.jsx)(o.ZP,{item:!0,xs:1,children:(0,r.jsx)(Z.Ac,{children:"Storage"})}),(0,r.jsx)(o.ZP,{item:!0,xs:3,children:F})]})},A=t(8669),U=t(7504),C=t(3679);var E=function(){var e=(0,O.Z)("/anvil",{refreshInterval:5e3}),n=e.data,t=e.loading,i=(0,u.useMemo)((function(){return n&&(0,A.Z)(n)}),[n]),o=(0,u.useMemo)((function(){return i&&(0,r.jsx)(U.Z,{columns:{xs:1,sm:2,md:3,xl:4},layout:Object.values(i).reduce((function(e,n){var t=n.description,i=n.name,o=n.uuid;return e["anvil-".concat(o)]={children:(0,r.jsxs)(C.Lg,{height:"100%",mv:0,children:[(0,r.jsx)(C.CH,{children:(0,r.jsxs)(Z.Ac,{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",children:[i,": ",t]})}),(0,r.jsx)(C.bc,{children:(0,r.jsx)(I,{anvilUuid:o})})]})},e}),{}),spacing:"1em",sx:(e={alignContent:"stretch"},n="& > .".concat(h.Z.item),t={minWidth:"20em"},n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e)});var e,n,t}),[i]);return(0,r.jsxs)(C.s_,{children:[(0,r.jsx)(C.V9,{children:(0,r.jsx)(Z.z,{children:"Nodes"})}),t?(0,r.jsx)(b.Z,{}):o]})},M=t(5094),B=t(1200),k=t(8750),N=t(1706),D=t(5741),T=t(9),z=t(1905),$=t(4968),W=t(9370);function F(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t div":{height:"100%",marginBottom:0,marginTop:0}},xs:1,children:(0,r.jsx)(M.M,{externalPreview:s,externalTimestamp:f,headerEndAdornment:[(0,r.jsx)(D.Z,{href:"/server?uuid=".concat(d,"&server_name=").concat(l,"&server_state=").concat(u),children:l},"server_list_to_server_".concat(d)),(0,r.jsx)(D.Z,{href:"/anvil?anvil_uuid=".concat(i),sx:{opacity:.7},children:t},"server_list_server_".concat(d,"_to_anvil_").concat(i))],isExternalLoading:a,isExternalPreviewStale:c,isFetchPreview:!1,isShowControls:!1,isUseInnerPanel:!0,onClickPreview:function(){n.push("/server?uuid=".concat(d,"&server_name=").concat(l,"&server_state=").concat(u,"&vnc=1"))},serverState:u,serverUUID:d})},"".concat(d,"-preview"))}))})},V=function(e,n){return""===n?{exclude:e,include:[]}:e.reduce((function(e,t){return t.serverName.includes(n)?e.include.push(t):e.exclude.push(t),e}),{exclude:[],include:[]})},X=function(){var e=(0,u.useRef)(!0),n=(0,l.useRouter)(),t=(0,u.useState)([]),o=t[0],h=t[1],m=(0,u.useState)([]),v=m[0],x=m[1],j=(0,u.useState)([]),p=j[0],g=j[1],y=(0,u.useState)(""),O=y[0],P=y[1],w=(0,u.useState)(!1),_=w[0],S=w[1],I=function(){for(var n=arguments.length,t=new Array(n),r=0;r0&&void 0!==arguments[0]?arguments[0]:[],t=n.map((function(n){var r,i=n.serverUUID,c=R({},n,{loading:!0,screenshot:(null===(r=o.find((function(e){return e.serverUUID===i})))||void 0===r?void 0:r.screenshot)||"",timestamp:0});return(0,B.Z)("".concat(d.Z,"/server/").concat(i,"?ss=1")).then((function(n){var r=n.screenshot,i=n.timestamp;if(0!==r.length){c.isScreenshotStale=!(0,W.Z$)(i,300),c.loading=!1,c.screenshot=r,c.timestamp=i;var o=L(t);e.current&&h(o)}})).catch((function(){c.isScreenshotStale=!0})).finally((function(){c.loading=!1})),c}));h(t),I(t,O)},refreshInterval:6e4}).isLoading;return(0,u.useEffect)((function(){return function(){e.current=!1}}),[]),(0,r.jsxs)(c.Z,{children:[(0,r.jsx)(s.default,{children:(0,r.jsx)("title",{children:"Dashboard"})}),(0,r.jsx)(k.Z,{}),(0,r.jsx)(C.s_,{children:A?(0,r.jsx)(b.Z,{}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(C.V9,{sx:{marginBottom:"2em"},children:[(0,r.jsx)(Z.z,{children:"Servers"}),(0,r.jsx)(N.Z,{onClick:function(){return S(!0)},children:(0,r.jsx)(i.Z,{})}),(0,r.jsx)(T.Z,{placeholder:"Search by server name",onChange:function(e){var n=e.target.value;P(n),I(o,n)},sx:{minWidth:"16em"},value:O})]}),G(p,n),p.length>0&&(0,r.jsx)(a.Z,{sx:{backgroundColor:f.d}}),G(v,n)]})}),(0,r.jsx)(E,{}),(0,r.jsx)($.Z,{dialogProps:{open:_},onClose:function(){S(!1)}})]})}}},function(e){e.O(0,[412,438,894,182,900,485,433,62,195,987,157,898,94,774,888,179],(function(){return n=5301,e(e.s=n);var n}));var n=e.O();_N_E=n}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/pages/init-7cf62951388d0e3b.js b/striker-ui/out/_next/static/chunks/pages/init-ce942046cf0bafb2.js similarity index 76% rename from striker-ui/out/_next/static/chunks/pages/init-7cf62951388d0e3b.js rename to striker-ui/out/_next/static/chunks/pages/init-ce942046cf0bafb2.js index dd6c8281..80a7ab61 100644 --- a/striker-ui/out/_next/static/chunks/pages/init-7cf62951388d0e3b.js +++ b/striker-ui/out/_next/static/chunks/pages/init-ce942046cf0bafb2.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[464],{593:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/init",function(){return t(8616)}])},4069:function(e,n,t){"use strict";t.d(n,{Z:function(){return y}});var r=t(7294),i=t(3675),o=function(){var e=arguments.length>0&&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(7987);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(1706),G=t(3377),K=t(2444),W=t(5741),X=t(4596),Y=t(3679),ee=t(2152),ne=t(2749);function te(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(7987);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(1706),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(7987),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(7987),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 y=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,b=e.renderInput,g=e.sx,j=v(e,["componentsProps","extendRenderInput","label","messageBoxProps","renderInput","sx"]),x=h({paper:{sx:{backgroundColor:d.lD}}},n),w=null!==b&&void 0!==b?b: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:y},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(7987),h=t(8859),v=t(2749);function y(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 y(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 y(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)?y(e,n):void 0}}var O={width:"100%"},I="gate-input",P="".concat(I,"-credential-id"),Z="".concat(I,"-credential-passphrase"),A="access",S=(0,i.forwardRef)((function(e,n){var t,y,b=e.formContainer,k=void 0===b||b,I=e.gridProps,S=void 0===I?{}:I,M=S.columns,F=void 0===M?{xs:1,sm:2}:M,T=(S.layout,S.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],ye=(0,h.Z)([P,Z],pe),be=ye.buildFinishInputTestBatchFunction,ge=ye.buildInputFirstRenderFunction,je=ye.buildInputUnmountFunction,xe=ye.isFormInvalid,we=ye.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(5521),p=t(2029),m=t(7357),h=t(4594),v=t(1496),y=t(4386),b=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 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;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 b,g,j=e.optional,x=e.required,w=null!==(b=D[s])&&void 0!==b?b: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),A=w({formUtils:i,id:k,isChecked:E.includes(O),isRequired:I,isSensitive:P,label:u,selectOptions:h,value:O}),S=(0,r.jsx)(y.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:b,label:k,name:b,value:u}),inputTestBatch:(0,T.Gn)(k,(function(){d(b)}),{onFinishBatch:s(b)},(function(e){d(b,{children:e})})),onFirstRender:l(b),required:!0},"".concat(b,"-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?y(a)+1:s;return{network:{networkGateway:c,networkMinIp:t,networkNumber:l,networkSubnetMask:o,networkType:a},networkId:(0,_e.Z)()}}),[y]),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:b,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,b,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],y=(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:y,previous:l,setNetworkList:v}),(0,r.jsx)(Ce,{formUtils:n,knownFences:t,knownUpses:o,networkListEntries:y,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 yt(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 yt(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(bt({},"&.".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 Ht(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)||$t(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 Vt(e){return function(e){if(Array.isArray(e))return Dt(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||$t(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 $t(e,n){if(e){if("string"===typeof e)return Dt(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)?Dt(e,n):void 0}}var Gt="prepare-network-host-name-input",zt="prepare-network-netconf-input-group",Wt="Host name",Qt=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 tr=function(e){var n=e.label,t=nr(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)(Kt.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 dr(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 cr(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 cr(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 fr="1.8em",pr=function(e){var n,t,o=e.orientation,i=e.variant,u=void 0===i?"fullWidth":i,c=lr(e,["orientation","variant"]),s=(0,or.Z)(),l=(0,a.useCallback)((function(e){return s.breakpoints.up(e)}),[s]),d=(0,ir.Z)(l("xs")),f=(0,ir.Z)(l("sm")),p=(0,ir.Z)(l("md")),m=(0,ir.Z)(l("lg")),h=(0,ir.Z)(l("xl")),v=(0,a.useMemo)((function(){return[["xs",d],["sm",f],["md",p],["lg",m],["xl",h]]}),[m,p,f,h,d]),y=(0,a.useMemo)((function(){var e;return"object"===typeof o?v.some((function(n){var t=dr(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)(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}var y=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,b=e.renderInput,g=e.sx,j=v(e,["componentsProps","extendRenderInput","label","messageBoxProps","renderInput","sx"]),x=h({paper:{sx:{backgroundColor:d.lD}}},n),w=null!==b&&void 0!==b?b: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:y},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(7987),h=t(8859),v=t(2749);function y(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 y(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 y(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)?y(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,y,b=e.formContainer,k=void 0===b||b,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,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],ye=(0,h.Z)([P,Z],pe),be=ye.buildFinishInputTestBatchFunction,ge=ye.buildInputFirstRenderFunction,je=ye.buildInputUnmountFunction,xe=ye.isFormInvalid,we=ye.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),y=t(4386),b=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 b,g,j=e.optional,x=e.required,w=null!==(b=D[s])&&void 0!==b?b: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)(y.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:b,label:k,name:b,value:u}),inputTestBatch:(0,T.Gn)(k,(function(){d(b)}),{onFinishBatch:s(b)},(function(e){d(b,{children:e})})),onFirstRender:l(b),required:!0},"".concat(b,"-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?y(a)+1:s;return{network:{networkGateway:c,networkMinIp:t,networkNumber:l,networkSubnetMask:o,networkType:a},networkId:(0,_e.Z)()}}),[y]),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:b,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,b,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],y=(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:y,previous:l,setNetworkList:v}),(0,r.jsx)(Ce,{formUtils:n,knownFences:t,knownUpses:o,networkListEntries:y,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 yt(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 yt(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(bt({},"&.".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]),y=(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);t0)},ref:n})]})}},4427:function(e,n,t){"use strict";var r=t(5893),o=t(2429),i=t(9309),c=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;n0,x=(null===d||void 0===d?void 0:d.toString())||"",j=(null===f||void 0===f?void 0:f.toString())||"",b=(null===h||void 0===h?void 0:h.toString())||"";return(0,l.useEffect)((function(){m&&t(!1)}),[m]),(0,r.jsxs)(g,{children:[(0,r.jsx)(c.default,{children:(0,r.jsx)("title",{children:x})}),(0,r.jsx)(u.Z,{}),n?(0,r.jsx)(i.Z,{className:p.preview,children:(0,r.jsx)(s.M,{onClickPreview:function(){t(!1)},serverName:x,serverState:j,serverUUID:b})}):(0,r.jsx)(i.Z,{className:p.fullView,children:(0,r.jsx)(s.S,{onClickCloseButton:function(){t(!0)},serverUUID:b,serverName:x})})]})}}},function(e){e.O(0,[412,894,528,62,94,774,888,179],(function(){return n=8954,e(e.s=n);var n}));var n=e.O();_N_E=n}]); \ No newline at end of file diff --git a/striker-ui/out/_next/static/chunks/pages/server-d4d91dcbacc827c4.js b/striker-ui/out/_next/static/chunks/pages/server-d4d91dcbacc827c4.js deleted file mode 100644 index 77a538c6..00000000 --- a/striker-ui/out/_next/static/chunks/pages/server-d4d91dcbacc827c4.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[753],{8954:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/server",function(){return t(1142)}])},5521:function(e,n,t){"use strict";t.d(n,{Z:function(){return F}});var r=t(5893),o=t(1113),i=t(1496),c=t(2293),a=t(7357),l=t(2992),s=t(4799),u=t(7294),f=t(7169),d=t(4433),p=t(9029),h=t(7533),g=t(8462),v=t(7212),m=t(8619),b=[{text:"Anvil",image:"/pngs/anvil_icon_on.png",uri:"/manage-element"},{text:"Files",image:"/pngs/files_on.png",uri:"/file-manager"},{text:"Configure",image:"/pngs/configure_icon_on.png",uri:"/config"},{text:"Help",image:"/pngs/help_icon_on.png",uri:"https://alteeve.com/w/Support"}],x={width:"40em",height:"40em"},j=t(4390),w=t(582),y=t(4690),Z=t(1770),k=t(7750),O=t(1081);function C(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t1&&void 0!==arguments[1]?arguments[1]:"suiapi.";return t["".concat(n).concat(e)]}),[t]),i=(0,u.useCallback)((function(){return o("user")}),[o]);return(0,u.useEffect)((function(){if(e){var n=document.cookie.split(/\s*;\s*/);r(n.reduce((function(e,n){var t,r=S(n.split("=",2),2),o=r[0],i=r[1],c=decodeURIComponent(i);if(c.startsWith("j:"))try{t=JSON.parse(c.substring(2))}catch(a){t=i}else t=i;return e[o]=t,e}),{}))}}),[e]),{cookieJar:t,getCookie:o,getSessionUser:i}};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 A(e){for(var n=1;n0)},ref:n})]})}},4427:function(e,n,t){"use strict";var r=t(5893),o=t(2429),i=t(9309),c=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;n0,b=(null===f||void 0===f?void 0:f.toString())||"",x=(null===d||void 0===d?void 0:d.toString())||"",j=(null===g||void 0===g?void 0:g.toString())||"";return(0,l.useEffect)((function(){m&&t(!1)}),[m]),(0,r.jsxs)(h,{children:[(0,r.jsx)(c.default,{children:(0,r.jsx)("title",{children:b})}),(0,r.jsx)(u.Z,{}),n?(0,r.jsx)(i.Z,{className:p.preview,children:(0,r.jsx)(s.M,{onClickPreview:function(){t(!1)},serverName:b,serverState:x,serverUUID:j})}):(0,r.jsx)(i.Z,{className:p.fullView,children:(0,r.jsx)(s.S,{onClickCloseButton:function(){t(!0)},serverUUID:j,serverName:b})})]})}}},function(e){e.O(0,[412,894,528,62,94,774,888,179],(function(){return n=8954,e(e.s=n);var n}));var n=e.O();_N_E=n}]); \ No newline at end of file diff --git a/striker-ui/out/anvil.html b/striker-ui/out/anvil.html index 52dbb2d1..2d894887 100644 --- a/striker-ui/out/anvil.html +++ b/striker-ui/out/anvil.html @@ -1 +1 @@ -Anvil
\ 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 b17c7db6..b492ef3f 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 19d58790..0cd28f60 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 7e27255c..9da3d30c 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 0f8ccd4b..d1b2dd07 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 084bb7fc..76653abf 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 ea4ed06d..b0098de2 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 87d27efc..e99701b3 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