mirror of
https://github.com/OpenMaxIO/openmaxio-object-browser
synced 2026-07-01 07:41:18 -07:00
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net> Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
2 lines
619 KiB
JavaScript
2 lines
619 KiB
JavaScript
(this["webpackJsonpportal-ui"]=this["webpackJsonpportal-ui"]||[]).push([[0],{455:function(e,t,n){},584:function(e,t,n){},585:function(e,t,n){"use strict";n.r(t);var a=n(1),c=n.n(a),i=n(29),r=n.n(i),o=n(6),s=n(56),l=n(75),d={},u="";if("".concat(window.location.pathname).startsWith("/api/proxy/")){var b="".concat(window.location.pathname).split("/").slice(0,5);d.basename=b.join("/"),u=b.join("/")}var j=Object(l.a)(d),h=n(3),m=n(2),p=n(185),O=n.n(p),f=n(306),g=n.n(f),x=n(637),v=n(688),y=n(636),S=n(111),C=n(638),k=n(639),w=n(367),N=n(693),T=n(628),E=n(14),A="USER_LOGGED",_="OPERATOR_MODE",I="MENU_OPEN",L="SERVER_NEEDS_RESTART",D="SERVER_IS_LOADING",F="SET_LOADING_PROGRESS",M="SET_SNACK_BAR_MESSAGE",R="SET_SERVER_DIAG_STAT",B="SET_ERROR_SNACK_MESSAGE",P="SET_SNACK_MODAL_MESSAGE",z="SET_MODAL_ERROR_MESSAGE",K="GLOBAL/SET_DISTRIBUTED_SETUP";function U(e){return{type:A,logged:e}}function W(e){return{type:I,open:e}}function G(e){return{type:L,needsRestart:e}}var q,V=function(e){return{type:M,message:e}},H=function(e){return{type:B,message:e}},Y=function(e){return{type:P,message:e}},Q=function(e){return{type:z,message:e}},Z=n(301),J=n(302),$=n(9),X=n.n($),ee=n(186),te=n.n(ee),ne=1073741824,ae=2147483648,ce=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],ie=["Ki","Mi","Gi","Ti","Pi","Ei"],re=["B"].concat(ie),oe=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=parseInt(e,10)||0;return se(n,t)},se=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0;e>=1024&&++n;)e/=1024;var a=["B"].concat(ie);return e.toFixed(e<10&&n>0?1:0)+" "+(t?a[n]:ce[n])},le=function(){var e;te.a.removeItem("token"),e="token",document.cookie=e+"=; expires=Thu, 01 Jan 1970 00:00:01 GMT;"},de=function(e){var t=e.getHours()<10?"0".concat(e.getHours()):"".concat(e.getHours()),n=e.getMinutes()<10?"0".concat(e.getMinutes()):"".concat(e.getMinutes()),a=e.getSeconds()<10?"0".concat(e.getSeconds()):"".concat(e.getSeconds());return"".concat(t,":").concat(n,":").concat(a,":").concat(e.getMilliseconds())},ue=function(){return ce.map((function(e){return{label:e,value:e}}))},be=function(){return ie.map((function(e){return{label:e,value:e}}))},je=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=parseFloat(e),c=n?re:ce,i=c.findIndex((function(e){return e===t}));if(-1===i)return"0";var r=Math.pow(1024,i),o=a*r;return o.toString(10)},he=function(e,t,n,a){var c=parseInt(e,10);return me(t,c,274877906944,n,a)},me=function(e,t,n,a){var c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(a))return{error:"Some provided data is invalid, please try again.",nodes:0,persistentVolumes:0,disks:0,volumePerDisk:0};var i=0,r=0,o=0;if(0===c&&(o=(r=t/(i=Math.floor(Math.min(t/Math.max(4,e),n))))/e),c&&(r=(o=c)*e,i=Math.floor(t/r)),o%1>0){r=(o=Math.ceil(o))*e;var s=(i=Math.floor(t/r))*o*e;if(s>a)return{error:"We were not able to allocate this server.",nodes:0,persistentVolumes:0,disks:0,volumePerDisk:0}}return i<ne?{error:"Disk Size with this combination would be less than 1Gi, please try another combination",nodes:0,persistentVolumes:0,disks:0,volumePerDisk:0}:{error:"",nodes:e,persistentVolumes:r,disks:o,pvSize:i}},pe=function(e){var t=e.length;return"pool-".concat(t)},Oe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"s",n=parseFloat(e);return fe(n,t)},fe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"s";switch(t){case"ns":e=Math.floor(1e-9*e);break;case"ms":e=Math.floor(.001*e)}var n=Math.floor(e/86400);e-=3600*n*24;var a=Math.floor(e/3600);e-=3600*a;var c=Math.floor(e/60);if(e-=60*c,n>365){var i=n/365;return"".concat(i," year").concat(1===Math.floor(i)?"":"s")}if(n>30){var r=Math.floor(n/30),o=n-30*r;return"".concat(r," month").concat(1===Math.floor(r)?"":"s"," ").concat(o>0?"".concat(o," day").concat(o>1?"s":""):"")}if(n>=7&&n<=30){var s=Math.floor(n/7);return"".concat(Math.floor(s)," week").concat(1===s?"":"s")}return n>=1&&n<=6?"".concat(n," day").concat(n>1?"s":""):"".concat(a>=1?"".concat(a," hour").concat(a>1?"s":""):""," ").concat(c>=1&&0===a?"".concat(c," minute").concat(c>1?"s":""):""," ").concat(e>=1&&0===c&&0===a?"".concat(e," second").concat(e>1?"s":""):"")},ge=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=new Date(1e3*parseInt(e));return t?"".concat(n.getFullYear(),"-").concat(String(n.getMonth()+1).padStart(2,"0"),"-").concat(String(n.getDay()).padStart(2,"0")," ").concat(n.getHours(),":").concat(String(n.getMinutes()).padStart(2,"0"),":").concat(String(n.getSeconds()).padStart(2,"0")):"".concat(n.getHours(),":").concat(String(n.getMinutes()).padStart(2,"0"))},xe=function(e){var t=1e-9*e,n=Math.round(1e4*(t+Number.EPSILON))/1e4;return"".concat(n," s")},ve=function(e){var t=(100*e.split("").reduce((function(e,t){return e+t.charCodeAt(0)+((e<<5)-e)}),0)&16777215).toString(16).toUpperCase();return"#".concat(t.padStart(6,"0"))},ye=new(function(){function e(){Object(Z.a)(this,e)}return Object(J.a)(e,[{key:"invoke",value:function(e,t,n){var a=this;return O()(e,"".concat(u).concat(t)).send(n).then((function(e){return e.body})).catch((function(e){return 401===e.status?(le(),void(window.location.href="/login")):a.onError(e)}))}},{key:"onError",value:function(e){if(e.status){var t=X()(e.response,"body.message",e.status.toString()),n=t.charAt(0).toUpperCase()+t.slice(1);return Promise.reject(n)}le(),window.location.href="/login"}}]),e}());!function(e){e.unknown="unknown",e.form="form",e.redirect="redirect",e.serviceAccount="service-account"}(q||(q={}));var Se=n(0),Ce=Object(T.a)((function(e){return Object(N.a)({disabled:{"&.MuiInput-underline::before":{borderColor:"#eaeaea",borderBottomStyle:"solid"}}})}));function ke(e){var t=Ce();return Object(Se.jsx)(v.a,Object(m.a)({InputProps:{classes:t}},e))}var we=Object(o.b)((function(e){return{loggedIn:e.loggedIn}}),{userLoggedIn:U})(Object(E.a)((function(e){return Object(N.a)({"@global":{body:{backgroundColor:"#FAFAFA"}},paper:{borderRadius:8,display:"flex",flexDirection:"column",alignItems:"center",width:800,height:424,margin:"auto",position:"absolute",top:"50%",left:"50%",marginLeft:-400,marginTop:-212,"&.MuiPaper-root":{borderRadius:8}},avatar:{margin:e.spacing(1),backgroundColor:e.palette.secondary.main},form:{width:"100%"},submit:{margin:"30px 0px 16px",height:40,boxShadow:"none",padding:"16px 30px"},errorBlock:{backgroundColor:"#C72C48",width:800,height:64,display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",left:"50%",top:"50%",marginLeft:-400,marginTop:-290,color:"#fff",fontWeight:700,fontSize:14,borderRadius:8,padding:10,boxSizing:"border-box"},mainContainer:{position:"relative",height:424},theOcean:{borderTopLeftRadius:8,borderBottomLeftRadius:8,background:"transparent linear-gradient(to bottom, #073052 0%,#05122b 100%); 0% 0% no-repeat padding-box;"},oceanBg:{backgroundImage:"url(/images/BG_Illustration.svg)",backgroundRepeat:"no-repeat",backgroundPosition:"bottom left",height:"100%",width:324},theLogin:{padding:"40px 45px 20px 45px"},loadingLoginStrategy:{textAlign:"center"},headerTitle:{marginBottom:10},submitContainer:{textAlign:"right"},disclaimer:{fontSize:12,marginTop:30},jwtInput:{marginTop:45},linearPredef:{height:10},errorIconStyle:{marginRight:3}})}))((function(e){var t=e.classes,n=e.userLoggedIn,i=Object(a.useState)(""),r=Object(h.a)(i,2),o=r[0],s=r[1],l=Object(a.useState)(""),d=Object(h.a)(l,2),u=d[0],b=d[1],m=Object(a.useState)(""),p=Object(h.a)(m,2),f=p[0],v=p[1],N=Object(a.useState)(""),T=Object(h.a)(N,2),E=T[0],A=T[1],_=Object(a.useState)({loginStrategy:q.unknown,redirect:""}),I=Object(h.a)(_,2),L=I[0],D=I[1],F=Object(a.useState)(!1),M=Object(h.a)(F,2),R=M[0],B=M[1],P={form:"/api/v1/login","service-account":"/api/v1/login/operator"},z={form:{accessKey:o,secretKey:f},"service-account":{jwt:u}},K=function(e){e.preventDefault(),B(!0),O.a.post(P[L.loginStrategy]||"/api/v1/login").send(z[L.loginStrategy]).then((function(e){var t=e.body;if(t.error)throw B(!1),t.error})).then((function(){n(!0),L.loginStrategy===q.form&&localStorage.setItem("userLoggedIn",btoa(o)),j.push("/")})).catch((function(e){B(!1),A(e.message)}))};Object(a.useEffect)((function(){ye.invoke("GET","/api/v1/login").then((function(e){D(e),A(""),"redirect"===e.loginStrategy&&e.redirect})).catch((function(e){A(e)}))}),[]);var U=null;switch(L.loginStrategy){case q.form:U=Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsx)(S.a,{component:"h1",variant:"h6",className:t.headerTitle,children:"Console Login"}),Object(Se.jsxs)("form",{className:t.form,noValidate:!0,onSubmit:K,children:[Object(Se.jsxs)(y.a,{container:!0,spacing:2,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(ke,{fullWidth:!0,id:"accessKey",value:o,onChange:function(e){return s(e.target.value)},label:"Enter Username",name:"accessKey",autoComplete:"username",disabled:R})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(ke,{fullWidth:!0,value:f,onChange:function(e){return v(e.target.value)},name:"secretKey",label:"Enter Password",type:"password",id:"secretKey",autoComplete:"current-password",disabled:R})})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.submitContainer,children:Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",className:t.submit,disabled:""===f||""===o||R,children:"Login"})}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.linearPredef,children:R&&Object(Se.jsx)(C.a,{})})]})]});break;case q.redirect:U=Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsx)(S.a,{component:"h1",variant:"h6",className:t.headerTitle,children:"Welcome"}),Object(Se.jsx)(x.a,{component:"a",href:L.redirect.replace("%5BHOSTNAME%5D",window.location.hostname),type:"submit",variant:"contained",color:"primary",className:t.submit,children:"Login with SSO"})]});break;case q.serviceAccount:U=Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsx)(S.a,{component:"h1",variant:"h6",className:t.headerTitle,children:"Operator Login"}),Object(Se.jsxs)("form",{className:t.form,noValidate:!0,onSubmit:K,children:[Object(Se.jsx)(y.a,{container:!0,spacing:2,children:Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.jwtInput,children:Object(Se.jsx)(ke,{required:!0,fullWidth:!0,id:"jwt",value:u,onChange:function(e){return b(e.target.value)},label:"JWT",name:"jwt",autoComplete:"off",disabled:R})})}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.submitContainer,children:Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",className:t.submit,disabled:""===u||R,children:"Login"})}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.linearPredef,children:R&&Object(Se.jsx)(C.a,{})})]})]});break;default:U=Object(Se.jsx)(k.a,{className:t.loadingLoginStrategy})}return Object(Se.jsxs)(c.a.Fragment,{children:[""!==E&&Object(Se.jsxs)("div",{className:t.errorBlock,children:[Object(Se.jsx)(g.a,{fontSize:"small",className:t.errorIconStyle})," ",E]}),Object(Se.jsx)(w.a,{className:t.paper,children:Object(Se.jsxs)(y.a,{container:!0,className:t.mainContainer,children:[Object(Se.jsx)(y.a,{item:!0,xs:7,className:t.theOcean,children:Object(Se.jsx)("div",{className:t.oceanBg})}),Object(Se.jsx)(y.a,{item:!0,xs:5,className:t.theLogin,children:U})]})})]})}))),Ne=n(37),Te=n(5),Ee=n(642),Ae=n(690),_e=n(641),Ie=n(683),Le={inputLabel:{fontWeight:600,marginRight:10,fontSize:15,color:"#000",textAlign:"left",overflow:"hidden","& span":{display:"flex",alignItems:"center"},display:"flex"},fieldLabelError:{paddingBottom:22},fieldContainer:{marginBottom:20,position:"relative",maxWidth:840},tooltipContainer:{marginLeft:5,display:"flex",alignItems:"center"},switchContainer:{display:"flex",maxWidth:840}},De={formScrollable:{maxHeight:"calc(100vh - 300px)",overflowY:"auto",marginBottom:25},formSlider:{marginLeft:0},clearButton:{fontFamily:"Lato, sans-serif",border:"0",backgroundColor:"transparent",color:"#393939",fontWeight:600,fontSize:14,marginRight:10,outline:"0",padding:"16px 25px 16px 25px",cursor:"pointer"},floatingEnabled:{position:"absolute",right:58,zIndex:1e3,marginTop:-38},configureString:{border:"#EAEAEA 1px solid",borderRadius:4,padding:"24px 50px",overflowY:"auto",height:170,maxWidth:840}},Fe={tooltip:{fontSize:16}},Me={width:14,height:14,borderRadius:2},Re={unCheckedIcon:Object(m.a)(Object(m.a)({},Me),{},{border:"1px solid #c3c3c3"}),checkedIcon:Object(m.a)(Object(m.a)({},Me),{},{border:"1px solid #081C42",backgroundColor:"#081C42"})},Be={width:12,height:12,borderRadius:"100%","input:disabled ~ &":{border:"1px solid #9C9C9C"}},Pe={radioUnselectedIcon:Object(m.a)(Object(m.a)({},Be),{},{border:"1px solid #000"}),radioSelectedIcon:Object(m.a)(Object(m.a)({},Be),{},{border:"1px solid #000",backgroundColor:"#000"})},ze={label:{color:"#393939",fontWeight:600,fontSize:13,alignSelf:"center",whiteSpace:"nowrap","&:not(:first-of-type)":{marginLeft:10}},timeContainers:{height:40},actionsTray:{display:"flex",justifyContent:"space-between","& button":{flexGrow:0,marginLeft:15}}},Ke={searchField:{flexGrow:1,height:40,background:"#FFFFFF",borderRadius:5,border:"#EAEDEE 1px solid",display:"flex",justifyContent:"center",padding:"0 16px","& label, & label.MuiInputLabel-shrink":{fontSize:10,transform:"translate(5px, 2px)",transformOrigin:"top left"},"& input":{fontSize:12,fontWeight:700,color:"#000","&::placeholder":{color:"#393939",opacity:1}},"&:hover":{borderColor:"#000"}}},Ue={prefinedContainer:{maxWidth:840,width:"100%"},predefinedTitle:{fontSize:16,fontWeight:600,color:"#000",margin:"10px 0"},predefinedList:{backgroundColor:"#eaeaea",padding:"12px 10px",color:"#393939",fontSize:12,fontWeight:600,minHeight:41},innerContent:{width:"100%",overflowX:"auto",whiteSpace:"nowrap",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},innerContentMultiline:{width:"100%",maxHeight:100,overflowY:"auto",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},We={obTitleSection:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:20},sectionTitle:{fontSize:22,color:"#000",fontWeight:600,height:40,lineHeight:"40px"},breadcrumbs:{fontSize:10,color:"#000",marginTop:2,"& a":{textDecoration:"none",color:"#000","&:hover":{textDecoration:"underline"}}},smallLabel:{color:"#9C9C9C",fontSize:15}},Ge={multiSelectTable:{height:200}},qe={customTitle:{fontSize:18,color:"#000",fontWeight:600,padding:"12px 0",borderBottom:"#eaedee 1px solid",marginBottom:10,margin:"15px 38px 27px"},settingsFormContainer:{height:"calc(100vh - 421px)",padding:"15px 38px",overflowY:"auto",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},settingsButtonContainer:{borderTop:"1px solid #EAEAEA",padding:"15px 38px",textAlign:"right"},innerSettingsButtonContainer:{maxWidth:840,textAlign:"right"},settingsOptionsContainer:{height:"calc(100vh - 244px)",backgroundColor:"#fff",border:"#EAEDEE 1px solid",borderRadius:3,marginTop:15},backButton:{cursor:"pointer",fontSize:10,fontWeight:600,color:"#000",backgroundColor:"transparent",border:0,padding:0,display:"flex",alignItems:"center","&:active, &:focus":{outline:0},"& svg":{width:10,marginRight:4}},backContainer:{margin:"20px 38px 0"}},Ve={iconContainer:{display:"flex",flexDirection:"row",maxWidth:455,justifyContent:"space-between",flexWrap:"wrap",width:"100%"},nonIconContainer:{marginBottom:16,width:455,marginTop:15,"& button":{marginRight:16}},pickTitle:{fontWeight:600,color:"#393939",fontSize:14,marginBottom:16},centerElements:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},logoButton:{height:"80px"},lambdaNotif:{backgroundColor:"#fff",border:"#393939 1px solid",borderRadius:5,width:101,height:91,display:"flex",alignItems:"center",justifyContent:"center",marginBottom:16,cursor:"pointer","& img":{maxWidth:71,maxHeight:71}}},He={logsSubContainer:{height:"calc(100vh - 230px)",padding:"15px 0"}},Ye={singleValueContainer:{position:"relative",flexGrow:1,width:"100%",height:"100%",border:"#EAEAEA 1px solid",borderRadius:5,backgroundColor:"#fff"},titleContainer:{color:"#393939",fontWeight:600,height:15,textAlign:"center",fontSize:10},contentContainer:{flexGrow:2,justifyContent:"center",alignItems:"center",display:"flex",position:"absolute",width:"100%",height:"calc(100% - 15px)"},contentContainerWithLabel:{height:"calc(100% - 25px)"},legendBlock:{position:"absolute",bottom:5,display:"flex",width:"100%",height:15,flexWrap:"wrap",overflowY:"auto"},singleLegendContainer:{display:"flex",alignItems:"center",padding:"0 10px",maxWidth:"100%"},colorContainer:{width:8,height:8,minWidth:8,borderRadius:"100%",marginRight:5},legendLabel:{fontSize:"80%",color:"#393939",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},Qe={customTooltip:{backgroundColor:"rgba(255, 255, 255, 0.90)",border:"#eaeaea 1px solid",borderRadius:3,padding:"5px 10px",maxHeight:300,overflowY:"auto"},labelContainer:{display:"flex",alignItems:"center"},labelColor:{width:6,height:6,display:"block",borderRadius:"100%",marginRight:5},itemValue:{fontSize:"75%",color:"#393939"},valueContainer:{fontWeight:600},timeStampTitle:{fontSize:"80%",color:"#9c9c9c",textAlign:"center",marginBottom:6}},Ze={snackBar:{backgroundColor:"#081F44",fontWeight:400,fontFamily:"Lato, sans-serif",fontSize:14,padding:"0px 20px 0px 20px;",boxShadow:"none","&.MuiPaper-root.MuiSnackbarContent-root":{borderRadius:"0px 0px 5px 5px"},"& div":{textAlign:"center",padding:"6px 30px",width:"100%",overflowX:"hidden",textOverflow:"ellipsis"}},errorSnackBar:{backgroundColor:"#C72C48",color:"#fff"},snackBarExternal:{top:"-17px",position:"absolute",minWidth:"348px",whiteSpace:"nowrap",height:"33px"},snackDiv:{top:"17px",left:"50%",position:"absolute"},snackBarModal:{top:0,position:"absolute",minWidth:"348px",whiteSpace:"nowrap",height:"33px",maxWidth:"calc(100% - 140px)"}},Je={multiContainer:{display:"flex",alignItems:"center",justifyContent:"flex-start"},sizeFactorContainer:{marginLeft:8,alignSelf:"flex-start"},headerElement:{position:"sticky",top:0,paddingTop:5,marginBottom:10,zIndex:500,backgroundColor:"#fff"},tableTitle:{fontWeight:700,width:"30%"},poolError:{color:"#dc1f2e",fontSize:"0.75rem",paddingLeft:120},error:{color:"#dc1f2e",fontSize:"0.75rem"},h3Section:{marginTop:0},descriptionText:{fontSize:13,color:"#777777"},container:{padding:"77px 0 0 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}},$e={anchorButton:{textDecoration:"underline",textTransform:"unset",fontWeight:"normal",padding:0,lineHeight:"unset",height:"unset",width:"unset",textAlign:"left",border:0,minWidth:"unset"}},Xe={hrClass:{borderTop:0,borderLeft:0,borderRight:0,borderColor:"#999999",backgroundColor:"transparent"}},et=Object(m.a)(Object(m.a)(Object(m.a)(Object(m.a)(Object(m.a)(Object(m.a)({buttonContainer:{textAlign:"right"},multiContainer:{display:"flex",alignItems:"center",justifyContent:"flex-start"},sizeFactorContainer:{marginLeft:8},containerHeader:{display:"flex",justifyContent:"space-between"},paperContainer:{padding:"15px 15px 15px 50px"},infoGrid:{display:"grid",gridTemplateColumns:"auto auto auto auto",gridGap:8,"& div":{display:"flex",alignItems:"center"},"& div:nth-child(odd)":{justifyContent:"flex-end",fontWeight:700},"& div:nth-child(2n)":{paddingRight:35}},masterActions:{width:"25%",minWidth:"120px","& div":{margin:"5px 0px"}},updateButton:{backgroundColor:"transparent",border:0,padding:"0 6px",cursor:"pointer","&:focus, &:active":{outline:"none"},"& svg":{height:12}},poolLabel:{color:"#666666"},titleCol:{fontWeight:700},breadcrumLink:{textDecoration:"none",color:"black"},healthCol:{fontWeight:700,paddingRight:"10px"}},De),ze),$e),Ke),Xe),{},{actionsTray:Object(m.a)(Object(m.a)({},ze.actionsTray),{},{padding:"15px 0 0"})}),tt={root:{borderRadius:0,"&::before":{borderColor:"#9c9c9c"}},disabled:{"&.MuiInput-underline::before":{borderColor:"#eaeaea",borderBottomStyle:"solid"}},input:{padding:"15px 30px 10px 5px",color:"#393939",fontSize:13,fontWeight:600,"&:placeholder":{color:"#393939",opacity:1}},error:{color:"#b53b4b"}},nt={inlineCheckboxes:{display:"flex",justifyContent:"flex-start"}},at=n(675),ct=n(640);function it(){return Object(Se.jsxs)(S.a,{variant:"body2",color:"textSecondary",align:"center",children:["Copyright \xa9 ",Object(Se.jsx)(ct.a,{color:"inherit",href:"https://material-ui.com/",children:"MinIO"})," ",(new Date).getFullYear(),"."]})}var rt=Object(T.a)((function(e){return{"@global":{body:{backgroundColor:e.palette.common.white}},paper:{marginTop:e.spacing(8),display:"flex",flexDirection:"column",alignItems:"center"}}})),ot=function(){var e=rt();return Object(Se.jsxs)(_e.a,{component:"main",children:[Object(Se.jsx)(Ee.a,{}),Object(Se.jsx)("div",{className:e.paper,children:Object(Se.jsx)(S.a,{variant:"h1",component:"h1",children:"404 Not Found"})}),Object(Se.jsx)(at.a,{mt:5,children:Object(Se.jsx)(it,{})})]})},st=n(18),lt=n(652),dt=n(26),ut=n.n(dt),bt=n(314),jt=n.n(bt),ht=n(59),mt=n.n(ht),pt=n(365),Ot=function(){return Object(Se.jsx)(pt.a,{children:Object(Se.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",children:[Object(Se.jsx)("title",{children:"ic_h_copy-new_sl"}),Object(Se.jsx)("g",{id:"Layer_2","data-name":"Layer 2",children:Object(Se.jsx)("g",{id:"Layer_1-2","data-name":"Layer 1",children:Object(Se.jsx)("path",{className:"cls-1",d:"M0,0V16H16V0ZM11.886,9.048H9.048v2.838h-2.1V9.048H4.114v-2.1H6.952V4.114h2.1V6.952h2.838Z"})})})]})})},ft=function(){return Object(Se.jsx)(pt.a,{children:Object(Se.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",children:Object(Se.jsxs)("g",{id:"Group_55","data-name":"Group 55",transform:"translate(1002 -2555)",children:[Object(Se.jsx)("rect",{id:"Rectangle_29",width:"2",height:"12",transform:"translate(-997 2555)"}),Object(Se.jsx)("rect",{id:"Rectangle_30",width:"2",height:"12",transform:"translate(-990 2560) rotate(90)"})]})})})},gt=function(){return Object(Se.jsx)(pt.a,{children:Object(Se.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10.402 13",children:Object(Se.jsx)("path",{d:"M6.761 1V0H3.64v1H.004v1h10.4V1zM.004 2.998l1.672 10h7.052l1.673-10zm3.412 8.243l-.552-6.478h.653l.553 6.472zm3.569 0h-.653l.551-6.472h.654z",className:"a"})})})},xt=function(){return Object(Se.jsx)(pt.a,{children:Object(Se.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10",children:Object(Se.jsxs)("g",{transform:"translate(249 720)",children:[Object(Se.jsx)("rect",{width:"6",height:"5",transform:"translate(-244 -720) rotate(90)"}),Object(Se.jsx)("rect",{width:"4",height:"4",transform:"translate(-243 -720)"}),Object(Se.jsx)("rect",{width:"5",height:"4",transform:"translate(-239 -715) rotate(90)"}),Object(Se.jsx)("rect",{width:"5",height:"3",transform:"translate(-244 -710) rotate(180)"})]})})})},vt=function(){return Object(Se.jsx)(pt.a,{children:Object(Se.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10",children:Object(Se.jsx)("path",{d:"M8.392,10H1.608L0,0H10Z"})})})},yt=function(){return Object(Se.jsx)(pt.a,{children:Object(Se.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6.131 10",children:Object(Se.jsx)("g",{transform:"translate(193 719.787)",children:Object(Se.jsxs)("g",{transform:"translate(-193 -719.787)",children:[Object(Se.jsx)("path",{d:"M3,0h.131a3,3,0,0,1,3,3V5a0,0,0,0,1,0,0H0A0,0,0,0,1,0,5V3A3,3,0,0,1,3,0Z",transform:"translate(0 5)"}),Object(Se.jsx)("ellipse",{cx:"2.065",cy:"2",rx:"2.065",ry:"2",transform:"translate(1 0)"})]})})})})},St=function(){return Object(Se.jsx)(pt.a,{children:Object(Se.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 9.5",children:Object(Se.jsxs)("g",{transform:"translate(231 719.516)",children:[Object(Se.jsx)("path",{d:"M-125.5,7.984a4.5,4.5,0,0,1,4.5-4.5,4.5,4.5,0,0,1,4.5,4.5Z",transform:"translate(-105 -720)"}),Object(Se.jsx)("rect",{width:"10",height:"1",transform:"translate(-231 -711.016)"}),Object(Se.jsx)("path",{d:"M-119.5.484h-3v1h1v1h1v-1h1Z",transform:"translate(-105 -720)"})]})})})},Ct=function(){return Object(Se.jsx)(pt.a,{children:Object(Se.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 9.787",children:Object(Se.jsx)("g",{transform:"translate(177 719.787)",children:Object(Se.jsxs)("g",{transform:"translate(-105 -720)",children:[Object(Se.jsx)("path",{d:"M-65,5a3,3,0,0,0-1.131.224A3.981,3.981,0,0,1-65,8v2h3V8A3,3,0,0,0-65,5Z"}),Object(Se.jsx)("path",{d:"M-72,10h6V8a3,3,0,0,0-3-3,3,3,0,0,0-3,3Z"}),Object(Se.jsx)("path",{className:"a",d:"M-65,.213a1.993,1.993,0,0,0-1.384.561A2.967,2.967,0,0,1-66,2.213a2.964,2.964,0,0,1-.384,1.439A1.989,1.989,0,0,0-65,4.213a2,2,0,0,0,2-2A2,2,0,0,0-65,.213Z"}),Object(Se.jsx)("circle",{cx:"2",cy:"2",r:"2",transform:"translate(-71 0.213)"})]})})})})},kt=function(){return Object(Se.jsx)(pt.a,{children:Object(Se.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 8.75 10",children:Object(Se.jsx)("path",{d:"M-44.625,10l-4.353-2.419L-53.375,10V0h8.75Z",transform:"translate(53.375)"})})})},wt=function(){return Object(Se.jsx)(pt.a,{children:Object(Se.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 9.998 10",children:Object(Se.jsx)("g",{transform:"translate(140.999 720)",children:Object(Se.jsxs)("g",{transform:"translate(-105 -720)",children:[Object(Se.jsx)("rect",{width:"1.114",height:"1.667",transform:"translate(-27.116 8.333)"}),Object(Se.jsx)("path",{d:"M-28.184,10H-29.3V8.154l2.182-3.037V3.147H-26V5.476l-2.182,3.037Z"}),Object(Se.jsx)("rect",{width:"1.114",height:"2.963",transform:"translate(-31.531)"}),Object(Se.jsx)("rect",{width:"1.114",height:"2.132",transform:"translate(-27.115 0)"}),Object(Se.jsx)("rect",{width:"1.114",height:"5.389",transform:"translate(-29.298)"}),Object(Se.jsx)("path",{d:"M-30.417,10h-1.114V5.722l-2.233-3V0h1.114V2.353l2.233,3Z"}),Object(Se.jsx)("path",{d:"M-32.65,10h-1.114V6.185l-2.234-3V0h1.114V2.815l2.234,3Z"}),Object(Se.jsx)("rect",{width:"1.114",height:"4.463",transform:"translate(-35.999 5.537)"})]})})})})},Nt=function(){return Object(Se.jsx)(pt.a,{children:Object(Se.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10",children:[Object(Se.jsx)("rect",{width:"1.433",height:"1"}),Object(Se.jsx)("rect",{width:"7.828",height:"1",transform:"translate(2.172)"}),Object(Se.jsx)("rect",{width:"1.433",height:"1",transform:"translate(0 6)"}),Object(Se.jsx)("rect",{width:"1.433",height:"1",transform:"translate(0 3)"}),Object(Se.jsx)("rect",{width:"1.433",height:"1",transform:"translate(0 9)"}),Object(Se.jsx)("rect",{width:"1.368",height:"0.569",transform:"translate(6.316 9)"}),Object(Se.jsx)("path",{d:"M5.566,9.569v-.31l-.238-.138-.269.155-.65.375L4.034,9V9H2.172v1H5.566Z"}),Object(Se.jsx)("path",{d:"M9.966,9l-.375.65-.65-.375-.269-.155-.238.138V10H10V9H9.967Z"}),Object(Se.jsx)("path",{d:"M3.625,6.793l.269-.155V6.362l-.269-.155L3.266,6H2.172V7H3.266Z"}),Object(Se.jsx)("path",{d:"M8.434,3.431v.31l.238.138.269-.155.649-.375L9.966,4V4H10V3H8.434Z"}),Object(Se.jsx)("path",{d:"M4.034,4l.375-.65.65.375.269.155.238-.138V3H2.172V4H4.033Z"}),Object(Se.jsx)("path",{d:"M9.356,5.929,10,5.558,9.316,4.373l-.644.372-.988-.571V3.431H6.316v.743l-.988.571-.644-.372L4,5.558l.644.371V7.071L4,7.442l.684,1.185.644-.372.988.571v.743H7.684V8.826l.988-.571.644.372L10,7.442l-.644-.371ZM7,7.278A.778.778,0,1,1,7.778,6.5.779.779,0,0,1,7,7.278Z"})]})})},Tt=function(){return Object(Se.jsx)(pt.a,{children:Object(Se.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 9",children:Object(Se.jsxs)("g",{transform:"translate(79 438.479)",children:[Object(Se.jsx)("g",{children:Object(Se.jsx)("g",{children:Object(Se.jsx)("rect",{x:"-77.9",y:"-434.5",width:"7.8",height:"1"})})}),Object(Se.jsx)("g",{children:Object(Se.jsx)("g",{children:Object(Se.jsx)("rect",{x:"-77.9",y:"-434.5",transform:"matrix(0.4999 -0.8661 0.8661 0.4999 338.8698 -281.1237)",width:"7.8",height:"1"})})}),Object(Se.jsx)("g",{children:Object(Se.jsx)("g",{children:Object(Se.jsx)("rect",{x:"-74.5",y:"-437.9",transform:"matrix(0.866 -0.5001 0.5001 0.866 207.1129 -95.1668)",width:"1",height:"7.8"})})}),Object(Se.jsx)("g",{children:Object(Se.jsx)("g",{children:Object(Se.jsx)("path",{d:"M-71.8-430.1h-4.5l-2.2-3.9l2.2-3.9h4.5l2.2,3.9L-71.8-430.1z M-75.7-431.1h3.3l1.7-2.9l-1.7-2.9h-3.3 l-1.7,2.9L-75.7-431.1z"})})}),Object(Se.jsx)("g",{children:Object(Se.jsx)("g",{children:Object(Se.jsx)("path",{d:"M-72.3-434c0,0.9-0.7,1.7-1.7,1.7c-0.9,0-1.7-0.7-1.7-1.7c0-0.9,0.7-1.7,1.7-1.7 C-73.1-435.7-72.3-434.9-72.3-434z"})})}),Object(Se.jsx)("g",{children:Object(Se.jsx)("g",{children:Object(Se.jsx)("path",{d:"M-76.8-434c0,0.6-0.5,1.1-1.1,1.1c0,0,0,0,0,0c-0.6,0-1.1-0.5-1.1-1.1c0,0,0,0,0,0c0-0.6,0.5-1.1,1.1-1.1 c0,0,0,0,0,0C-77.3-435.1-76.8-434.6-76.8-434C-76.8-434-76.8-434-76.8-434z"})})}),Object(Se.jsx)("g",{children:Object(Se.jsx)("g",{children:Object(Se.jsx)("path",{d:"M-69-434c0,0.6-0.5,1.1-1.1,1.1c0,0,0,0,0,0c-0.6,0-1.1-0.5-1.1-1.1c0,0,0,0,0,0c0-0.6,0.5-1.1,1.1-1.1 c0,0,0,0,0,0C-69.5-435.1-69-434.6-69-434C-69-434-69-434-69-434z"})})}),Object(Se.jsx)("g",{children:Object(Se.jsx)("g",{children:Object(Se.jsx)("path",{d:"M-75.4-431.6c0.5,0.3,0.7,1,0.4,1.5c-0.3,0.5-1,0.7-1.5,0.4c0,0,0,0,0,0c-0.5-0.3-0.7-1-0.4-1.5 C-76.6-431.7-75.9-431.9-75.4-431.6C-75.4-431.6-75.4-431.6-75.4-431.6z"})})}),Object(Se.jsx)("g",{children:Object(Se.jsx)("g",{children:Object(Se.jsx)("path",{d:"M-71.5-438.3c0.5,0.3,0.7,1,0.4,1.5c-0.3,0.5-1,0.7-1.5,0.4c0,0,0,0,0,0c-0.5-0.3-0.7-1-0.4-1.5 C-72.7-438.5-72-438.6-71.5-438.3C-71.5-438.3-71.5-438.3-71.5-438.3z"})})}),Object(Se.jsx)("g",{children:Object(Se.jsx)("g",{children:Object(Se.jsx)("path",{d:"M-72.6-431.6c0.5-0.3,1.2-0.1,1.5,0.4c0,0,0,0,0,0c0.3,0.5,0.1,1.2-0.4,1.5c-0.5,0.3-1.2,0.1-1.5-0.4 c0,0,0,0,0,0C-73.3-430.6-73.1-431.3-72.6-431.6z"})})}),Object(Se.jsx)("g",{children:Object(Se.jsx)("g",{children:Object(Se.jsx)("path",{d:"M-76.5-438.3c0.5-0.3,1.2-0.1,1.5,0.4c0,0,0,0,0,0c0.3,0.5,0.1,1.2-0.4,1.5c-0.5,0.3-1.2,0.1-1.5-0.4 c0,0,0,0,0,0C-77.2-437.3-77-438-76.5-438.3z"})})})]})})})},Et=function(){return Object(Se.jsx)(pt.a,{children:Object(Se.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10",children:Object(Se.jsx)("g",{transform:"translate(213 720)",children:Object(Se.jsxs)("g",{transform:"translate(-105 -720)",children:[Object(Se.jsx)("rect",{width:"1.5",height:"4",transform:"translate(-108)"}),Object(Se.jsx)("rect",{width:"1.5",height:"4",transform:"translate(-108 6)"}),Object(Se.jsx)("rect",{width:"1.5",height:"4",transform:"translate(-99.5 6)"}),Object(Se.jsx)("rect",{width:"1.5",height:"4",transform:"translate(-99.5)"}),Object(Se.jsx)("rect",{width:"1.5",height:"4",transform:"translate(-98) rotate(90)"}),Object(Se.jsx)("rect",{width:"1.5",height:"4",transform:"translate(-104) rotate(90)"}),Object(Se.jsx)("rect",{width:"1.5",height:"4",transform:"translate(-104 8.5) rotate(90)"}),Object(Se.jsx)("rect",{width:"1.5",height:"4",transform:"translate(-98 8.5) rotate(90)"}),Object(Se.jsx)("circle",{cx:"2",cy:"2",r:"2",transform:"translate(-105 3)"})]})})})})},At="ADD_BUCKET_OPEN",_t="ADD_BUCKET_NAME",It="ADD_BUCKET_VERSIONED",Lt="ADD_BUCKET_LOCKING",Dt="ADD_BUCKET_QUOTA",Ft="ADD_BUCKET_QUOTA_TYPE",Mt="ADD_BUCKET_QUOTA_SIZE",Rt="ADD_BUCKET_QUOTA_UNIT",Bt="ADD_BUCKET_RESET",Pt="ADD_BUCKET_RETENTION",zt="ADD_BUCKET_RETENTION_MODE",Kt="ADD_BUCKET_RETENTION_UNIT",Ut="ADD_BUCKET_RETENTION_VALIDITY",Wt="BUCKET_DETAILS/SET_TAB";var Gt=n(68),qt=n.n(Gt),Vt=n(587),Ht=n(634),Yt=n(682),Qt=n(82),Zt=n(311),Jt=n.n(Zt),$t=n(195),Xt=n.n($t),en=n(310),tn=n.n(en),nn=n(33),an="#081C42",cn="#081C42",rn=function(e){var t=e.active,n=void 0!==t&&t;return Object(Se.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 11.856",children:Object(Se.jsx)("path",{fill:n?cn:an,d:"M-54,8l1.764,2.614A7.52,7.52,0,0,0-46,13.928h0a7.52,7.52,0,0,0,6.234-3.314L-38,8l-1.764-2.614A7.52,7.52,0,0,0-46,2.072h0a7.52,7.52,0,0,0-6.234,3.314Zm10.286,0A2.285,2.285,0,0,1-46,10.286,2.285,2.285,0,0,1-48.286,8,2.285,2.285,0,0,1-46,5.714,2.285,2.285,0,0,1-43.714,8Zm1.3,0A3.59,3.59,0,0,1-46,11.59,3.59,3.59,0,0,1-49.59,8,3.59,3.59,0,0,1-46,4.41,3.59,3.59,0,0,1-42.41,8Z",transform:"translate(54 -2.072)"})})},on=function(e){var t=e.active,n=void 0!==t&&t;return Object(Se.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 13.833 13.833",children:Object(Se.jsx)("path",{fill:n?cn:an,d:"M2.934,16H0V13.066L10.607,2.459a1,1,0,0,1,1.414,0l1.52,1.52a1,1,0,0,1,0,1.414Z",transform:"translate(0 -2.167)"})})},sn=function(e){var t=e.active,n=void 0!==t&&t;return Object(Se.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 13 13",children:[Object(Se.jsx)("path",{fill:n?cn:an,d:"M11.05 8.617v2.429h-9.1v-9.1h2.429v-1.95H0v13h13V8.617z",className:"a"}),Object(Se.jsx)("path",{fill:n?cn:an,d:"M3.854 9.256h1.95a4.945 4.945 0 013.6-4.74v1.3l.6-.487 2.474-2.012L9.4.817v1.7a6.9 6.9 0 00-5.546 6.739z",className:"a"})]})},ln=function(e){var t=e.active,n=void 0!==t&&t;return Object(Se.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 10.402 13",children:Object(Se.jsx)("path",{fill:n?cn:an,d:"M6.761 1V0H3.64v1H.004v1h10.4V1zM.004 2.998l1.672 10h7.052l1.673-10zm3.412 8.243l-.552-6.478h.653l.553 6.472zm3.569 0h-.653l.551-6.472h.654z"})})},dn=function(e){var t=e.active,n=void 0!==t&&t;return Object(Se.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 10 11.429",children:Object(Se.jsx)("path",{fill:n?cn:an,d:"M-43.375,11.429-48.35,8.664l-5.025,2.764V0h10Z",transform:"translate(53.375)"})})},un=function(e){var t=e.active,n=void 0!==t&&t;return Object(Se.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",children:Object(Se.jsx)("path",{fill:n?cn:an,d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z"})})},bn=function(e){var t=e.active,n=void 0!==t&&t;return Object(Se.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",children:Object(Se.jsx)("path",{fill:n?cn:an,d:"M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H3v-3h18v3z"})})},jn=function(e){var t=e.active,n=void 0!==t&&t;return Object(Se.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 13 12.996",children:[Object(Se.jsx)("path",{fill:n?cn:an,d:"M11.05 9.096v1.95h-9.1v-1.95H0v3.9h13v-3.9z"}),Object(Se.jsx)("path",{fill:n?cn:an,d:"M6.5 9.75L9 6.672H7.475V0h-1.95v6.672H4z"})]})},hn=function(e){var t=e.active,n=void 0!==t&&t;return Object(Se.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",children:Object(Se.jsx)("path",{fill:n?cn:an,d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11H7v-2h10v2z"})})},mn=function(e){var t=e.active,n=void 0!==t&&t;return Object(Se.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",children:Object(Se.jsx)("path",{fill:n?cn:an,d:"M20 16h2v-2h-2v2zm0-9v5h2V7h-2zM10 4c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm0 10c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"})})},pn=function(e,t){switch(e){case"view":return Object(Se.jsx)(rn,{active:t});case"edit":return Object(Se.jsx)(on,{active:t});case"delete":return Object(Se.jsx)(ln,{active:t});case"description":return Object(Se.jsx)(dn,{active:t});case"share":return Object(Se.jsx)(sn,{active:t});case"cloud":return Object(Se.jsx)(un,{active:t});case"console":return Object(Se.jsx)(bn,{active:t});case"download":return Object(Se.jsx)(jn,{active:t});case"disable":return Object(Se.jsx)(hn,{active:t});case"format":return Object(Se.jsx)(mn,{active:t})}return null},On=Object(E.a)((function(){return Object(N.a)({spacing:{margin:"0 8px"},buttonDisabled:{"&.MuiButtonBase-root.Mui-disabled":{cursor:"not-allowed",filter:"grayscale(100%)",opacity:"30%"}}})}))((function(e){var t=e.type,n=e.onClick,a=e.valueToSend,c=e.idField,i=e.selected,r=e.to,o=e.sendOnlyId,s=void 0!==o&&o,l=e.disabled,d=void 0!==l&&l,u=e.classes,b=s?a[c]:a,j=Object(Se.jsx)(Vt.a,{"aria-label":t,size:"small",onClick:n?function(e){e.stopPropagation(),d?e.preventDefault():n(b)}:function(){return null},className:"".concat(u.spacing," ").concat(d?u.buttonDisabled:""),disabled:d,children:pn(t,i)});return n?j:qt()(r)?d?j:Object(Se.jsx)(nn.a,{to:"".concat(r,"/").concat(b),onClick:function(e){e.stopPropagation()},children:j}):null})),fn=n(692),gn=n(643),xn=function(e){return Object(Se.jsxs)(pt.a,Object(m.a)(Object(m.a)({},e),{},{viewBox:"0 0 12 12",children:[Object(Se.jsx)("path",{d:"M357.14,346a5,5,0,1,1-5,5,5,5,0,0,1,5-5m0-1a6,6,0,1,0,6,6,6,6,0,0,0-6-6Z",transform:"translate(-351.14 -345.03)"}),Object(Se.jsx)("path",{d:"M356.21,352.42v-1.86h.52c1.23,0,1.92-.45,1.92-1.29s-.68-1.18-1.89-1.18a8.07,8.07,0,0,0-.93.06l-.1-1.25a9.13,9.13,0,0,1,1.08-.08c2,0,3.19.94,3.19,2.4s-.93,2.24-2.64,2.46l-.05.74Zm1.56,1.8a1,1,0,1,1-1-1A1,1,0,0,1,357.77,354.22Z",transform:"translate(-351.14 -345.03)"})]}))},vn=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)(Object(m.a)({},Le),Fe),Re),{},{fieldContainer:Object(m.a)(Object(m.a)({},Le.fieldContainer),{},{display:"flex",justifyContent:"flex-start",alignItems:"center",margin:"15px 0",marginBottom:0,flexBasis:"initial"})}))}))((function(e){var t=e.label,n=e.onChange,a=e.value,i=e.id,r=e.name,o=e.checked,s=void 0!==o&&o,l=e.disabled,d=void 0!==l&&l,u=e.tooltip,b=void 0===u?"":u,j=e.classes;return Object(Se.jsx)(c.a.Fragment,{children:Object(Se.jsxs)(y.a,{item:!0,xs:12,className:j.fieldContainer,children:[Object(Se.jsx)("div",{children:Object(Se.jsx)(Yt.a,{name:r,id:i,value:a,color:"primary",inputProps:{"aria-label":"secondary checkbox"},checked:s,onChange:n,checkedIcon:Object(Se.jsx)("span",{className:j.checkedIcon}),icon:Object(Se.jsx)("span",{className:j.unCheckedIcon}),disabled:d})}),""!==t&&Object(Se.jsxs)(fn.a,{htmlFor:i,className:j.inputLabel,children:[Object(Se.jsx)("span",{children:t}),""!==b&&Object(Se.jsx)("div",{className:j.tooltipContainer,children:Object(Se.jsx)(gn.a,{title:b,placement:"top-start",children:Object(Se.jsx)("div",{children:Object(Se.jsx)(xn,{className:j.tooltip})})})})]})]})})})),yn="#9c9c9c80",Sn={fontWeight:400,fontSize:14,borderColor:yn,borderWidth:"0.5px",height:40,transitionDuration:"0.3s",padding:"initial",paddingRight:6,paddingLeft:6},Cn=function(e,t,n,c,i,r,o,s,l,d,u){var b=function(e,t,n,a,c,i,r){var o=Object(st.a)(e);i&&(o=e.filter((function(e){return r.includes(e.elementKey)})));var s=t;return a&&(s-=45),c&&(s-=n),o.reduce((function(e,t){return t.width?e-t.width:e}),s)/o.filter((function(e){return!e.width})).length}(e,t,n,c,i,s,l);return e.map((function(e,t){if(s&&!l.includes(e.elementKey))return null;var n=!e.enableSort||!e.enableSort;return Object(Se.jsx)(Qt.b,{dataKey:e.elementKey,headerClassName:"titleHeader ".concat(e.headerTextAlign?"text-".concat(e.headerTextAlign):""),headerRenderer:function(){return Object(Se.jsxs)(a.Fragment,{children:[d===e.elementKey&&Object(Se.jsx)(a.Fragment,{children:"ASC"===u?Object(Se.jsx)(tn.a,{}):Object(Se.jsx)(Xt.a,{})}),e.label]})},className:e.contentTextAlign?"text-".concat(e.contentTextAlign):"",cellRenderer:function(t){var n=t.rowData,c=!!r&&r.includes(qt()(n)?n:n[o]);return function(e,t,n){var c=qt()(e)?e:X()(e,t.elementKey,null),i=t.renderFullObject?e:c,r=t.renderFunction?t.renderFunction(i):i;return Object(Se.jsx)(a.Fragment,{children:Object(Se.jsx)("span",{className:n?"selected":"",children:r})})}(n,e,c)},width:e.width||b,disableSort:n,defaultSortDirection:"ASC"},"col-tb-".concat(t.toString()))}))},kn=Object(E.a)((function(){return Object(N.a)(Object(m.a)(Object(m.a)({dialogContainer:{padding:"12px 26px 22px"},paper:{display:"flex",overflow:"auto",flexDirection:"column",padding:"19px 38px",boxShadow:"none",border:"#EAEDEE 1px solid",borderRadius:3,minHeight:200,overflowY:"scroll",position:"relative","&::-webkit-scrollbar":{width:3,height:3}},noBackground:{backgroundColor:"transparent",border:0},defaultPaperHeight:{height:"calc(100vh - 205px)"},allTableSettings:{"& .MuiTableCell-sizeSmall:last-child":{paddingRight:"initial"},"& .MuiTableCell-body.MuiTableCell-sizeSmall:last-child":{paddingRight:6}},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:700,fontSize:14,borderColor:"#39393980",borderWidth:"0.5px",padding:"6px 0 10px"}}},rowUnselected:Object(m.a)(Object(m.a)({},Sn),{},{color:"#393939"}),rowSelected:Object(m.a)(Object(m.a)({},Sn),{},{color:"#081C42",fontWeight:600}),paginatorContainer:{display:"flex",justifyContent:"flex-end",padding:"5px 38px"},checkBoxHeader:{width:50,textAlign:"left",paddingRight:10,"&.MuiTableCell-paddingCheckbox":{paddingBottom:4,paddingLeft:0}},actionsContainer:{width:150,borderColor:yn},paginatorComponent:{borderBottom:0},checkBoxRow:{borderColor:yn,padding:"0 10px 0 0"},loadingBox:{paddingTop:"100px",paddingBottom:"100px"},overlayColumnSelection:{position:"absolute",right:0,top:0},popoverContainer:{position:"relative"},popoverContent:{maxHeight:250,overflowY:"auto",padding:"0 10px 10px"},shownColumnsLabel:{color:"#9c9c9c",fontSize:12,padding:10,borderBottom:"#eaeaea 1px solid",width:"100%"},"@global":{".rowLine":{borderBottom:"1px solid ".concat(yn),height:40,color:"#393939",fontSize:14,transitionDuration:.3,"&:focus":{outline:"initial"},"&:hover:not(.ReactVirtualized__Table__headerRow)":{userSelect:"none",backgroundColor:"#ececec",fontWeight:600,"&.canClick":{cursor:"pointer"},"&.canSelectText":{userSelect:"text"}},"& .selected":{color:"#081C42",fontWeight:600}},".headerItem":{userSelect:"none",fontWeight:700,fontSize:14,fontStyle:"initial",display:"flex",alignItems:"center",outline:"none"},".ReactVirtualized__Table__headerRow":{fontWeight:700,fontSize:14,borderColor:"#39393980",textTransform:"initial"},".optionsAlignment":{textAlign:"center"},".text-center":{textAlign:"center"},".text-right":{textAlign:"right"},".progress-enabled":{paddingTop:3,display:"inline-block",margin:"0 10px",position:"relative",width:18,height:18},".progress-enabled > .MuiCircularProgress-root":{position:"absolute",left:0,top:3}}},Re),Pe))}))((function(e){var t=e.itemActions,n=e.columns,i=e.onSelect,r=e.records,o=e.isLoading,s=e.loadingMessage,l=void 0===s?Object(Se.jsx)(S.a,{component:"h3",children:"Loading..."}):s,d=e.entityName,u=e.selectedItems,b=e.idField,m=e.classes,p=e.radioSelection,O=void 0!==p&&p,f=e.customEmptyMessage,g=void 0===f?"":f,x=e.customPaperHeight,v=void 0===x?"":x,N=e.noBackground,T=void 0!==N&&N,E=e.columnsSelector,A=void 0!==E&&E,_=e.textSelectable,I=void 0!==_&&_,L=e.columnsShown,D=void 0===L?[]:L,F=e.onColumnChange,M=void 0===F?function(e,t){}:F,R=e.infiniteScrollConfig,B=e.sortConfig,P=e.autoScrollToBottom,z=void 0!==P&&P,K=Object(a.useState)(!1),U=Object(h.a)(K,2),W=U[0],G=U[1],q=c.a.useState(null),V=Object(h.a)(q,2),H=V[0],Y=V[1],Q=t?t.find((function(e){return"view"===e.type})):null,Z=function(e){G(!W),Y(e.currentTarget)},J=function(){G(!1),Y(null)};return Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsxs)(w.a,{className:"".concat(m.paper," ").concat(T?m.noBackground:""," ").concat(""!==v?v:m.defaultPaperHeight),children:[o&&Object(Se.jsxs)(y.a,{container:!0,className:m.loadingBox,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,style:{textAlign:"center"},children:l}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(C.a,{})})]}),A&&!o&&r.length>0&&Object(Se.jsx)("div",{className:m.overlayColumnSelection,children:function(e){return Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(Vt.a,{"aria-describedby":"columnsSelector",color:"primary",onClick:Z,children:Object(Se.jsx)(Jt.a,{fontSize:"inherit"})}),Object(Se.jsxs)(Ht.a,{anchorEl:H,id:"columnsSelector",open:W,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:J,className:m.popoverContainer,children:[Object(Se.jsx)("div",{className:m.shownColumnsLabel,children:"Shown Columns"}),Object(Se.jsx)("div",{className:m.popoverContent,children:e.map((function(e){return Object(Se.jsx)(vn,{label:e.label,checked:D.includes(e.elementKey),onChange:function(t){M(e.elementKey,t.target.checked)},id:"chbox-".concat(e.label),name:"chbox-".concat(e.label),value:e.label},"tableColumns-".concat(e.label))}))})]})]})}(n)}),r&&!o&&r.length>0?Object(Se.jsx)(Qt.c,{isRowLoaded:function(e){var t=e.index;return!!r[t]},loadMoreRows:R?R.loadMoreRecords:function(){return new Promise((function(){return!0}))},rowCount:R?R.recordsCount:r.length,children:function(e){var c=e.onRowsRendered,o=e.registerChild;return Object(Se.jsx)(Qt.a,{children:function(e){var s=e.width,l=e.height,h=function(e,t){var n=45*t;return n<80?80:n>e?e:n}(s,t?t.filter((function(e){return"view"!==e.type})).length:0),p=!(!i||!u),f=!!(t&&t.length>1||t&&1===t.length&&"view"!==t[0].type);return Object(Se.jsxs)(Qt.d,{ref:o,disableHeader:!1,headerClassName:"headerItem",headerHeight:40,height:l,noRowsRenderer:function(){return Object(Se.jsx)(a.Fragment,{children:""!==g?g:"There are no ".concat(d," yet.")})},overscanRowCount:10,rowHeight:40,width:s,rowCount:r.length,rowGetter:function(e){var t=e.index;return r[t]},onRowClick:function(e){!function(e){if(Q){var t=Q.sendOnlyId?e[b]:e;if(Q.to)return void j.push("".concat(Q.to,"/").concat(t));Q.onClick&&Q.onClick(t)}}(e.rowData)},rowClassName:"rowLine ".concat(Q?"canClick":""," ").concat(!Q&&I?"canSelectText":""),onRowsRendered:c,sort:B?B.triggerSort:void 0,sortBy:B?B.currentSort:void 0,sortDirection:B?B.currentDirection:void 0,scrollToIndex:z?r.length-1:-1,children:[p&&Object(Se.jsx)(Qt.b,{headerRenderer:function(){return Object(Se.jsx)(a.Fragment,{children:"Select"})},dataKey:b,width:45,cellRenderer:function(e){var t=e.rowData,n=!!u&&u.includes(qt()(t)?t:t[b]);return Object(Se.jsx)(Yt.a,{value:qt()(t)?t:t[b],color:"primary",inputProps:{"aria-label":"secondary checkbox"},checked:n,onChange:i,onClick:function(e){e.stopPropagation()},checkedIcon:Object(Se.jsx)("span",{className:O?m.radioSelectedIcon:m.checkedIcon}),icon:Object(Se.jsx)("span",{className:O?m.radioUnselectedIcon:m.unCheckedIcon})})}}),Cn(n,s,h,p,f,u||[],b,A,D,B?B.currentSort:"",B?B.currentDirection:void 0),f&&Object(Se.jsx)(Qt.b,{headerRenderer:function(){return Object(Se.jsx)(a.Fragment,{children:"Options"})},dataKey:b,width:h,headerClassName:"optionsAlignment",className:"optionsAlignment",cellRenderer:function(e){var n=e.rowData,a=!!u&&u.includes(qt()(n)?n:n[b]);return function(e,t,n,a){return e.map((function(e,c){if("view"===e.type)return null;var i="string"===typeof t?t:t[a],r=!1;return e.disableButtonFunction&&e.disableButtonFunction(i)&&(r=!0),e.showLoaderFunction&&e.showLoaderFunction(i)?Object(Se.jsx)("div",{className:"progress-enabled",children:Object(Se.jsx)(k.a,{color:"primary",size:18,variant:"indeterminate"},"actions-loader-".concat(e.type,"-").concat(c.toString()))}):Object(Se.jsx)(On,{type:e.type,onClick:e.onClick,to:e.to,valueToSend:t,selected:n,idField:a,sendOnlyId:!!e.sendOnlyId,disabled:r},"actions-".concat(e.type,"-").concat(c.toString()))}))}(t||[],n,a,b)}})]})}})}}):Object(Se.jsx)(a.Fragment,{children:!o&&Object(Se.jsx)("div",{children:""!==g?g:"There are no ".concat(d," yet.")})})]})})})),wn=n(644),Nn=n(645),Tn=n(646),En={content:'" "',borderLeft:"2px solid #9C9C9C",height:33,width:1,position:"absolute"},An=Object(o.b)((function(e){return{modalSnackMessage:e.system.modalSnackBar}}),{setModalSnackMessage:Y}),_n=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({dialogContainer:{padding:"8px 15px 22px"},closeContainer:{textAlign:"right"},closeButton:{width:45,height:45,padding:0,backgroundColor:"initial","&:hover":{backgroundColor:"initial"},"&:active":{backgroundColor:"initial"}},modalCloseIcon:{fontSize:35,color:"#9C9C9C",fontWeight:300,"&:hover":{color:"#9C9C9C"}},closeIcon:{"&::before":Object(m.a)(Object(m.a)({},En),{},{transform:"rotate(45deg)"}),"&::after":Object(m.a)(Object(m.a)({},En),{},{transform:"rotate(-45deg)"}),"&:hover::before, &:hover::after":{borderColor:"#9C9C9C"},width:24,height:24,display:"block",position:"relative"},titleClass:{padding:"0px 50px 12px","& h2":{fontWeight:600,color:"#000",fontSize:22}},modalContent:{padding:"0 50px"},customDialogSize:{width:"100%",maxWidth:765}},Ze))}))(An((function(e){var t=e.onClose,n=e.modalOpen,c=e.title,i=e.children,r=e.classes,o=e.wideLimit,s=void 0===o||o,l=e.modalSnackMessage,d=e.noContentPadding,u=e.setModalSnackMessage,b=Object(a.useState)(!1),j=Object(h.a)(b,2),p=j[0],O=j[1];Object(a.useEffect)((function(){if(l){if(""===l.message)return void O(!1);O(!0)}}),[l]);var f=s?{classes:{paper:r.customDialogSize}}:{maxWidth:"md",fullWidth:!0};return Object(Se.jsx)(wn.a,Object(m.a)(Object(m.a)({open:n,onClose:t,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description"},f),{},{children:Object(Se.jsxs)("div",{className:r.dialogContainer,children:[Object(Se.jsx)(Ie.a,{open:p,className:r.snackBarModal,onClose:function(){O(!1),u("")},message:l?l.message:"",ContentProps:{className:"".concat(r.snackBar," ").concat(l&&"error"===l.type?r.errorSnackBar:"")},autoHideDuration:l&&"error"===l.type?1e4:5e3}),Object(Se.jsx)("div",{className:r.closeContainer,children:Object(Se.jsx)(Vt.a,{"aria-label":"close",className:r.closeButton,onClick:t,disableRipple:!0,children:Object(Se.jsx)("span",{className:r.closeIcon})})}),Object(Se.jsx)(Nn.a,{id:"alert-dialog-title",className:r.titleClass,children:c}),Object(Se.jsx)(Tn.a,{className:d?"":r.modalContent,children:i})]})}))}))),In=Object(T.a)((function(e){return Object(N.a)(Object(m.a)({},tt))}));function Ln(e){var t=In();return Object(Se.jsx)(v.a,Object(m.a)({InputProps:{classes:t}},e))}var Dn=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)({},Le),Fe),{},{textBoxContainer:{flexGrow:1},textBoxWithIcon:{position:"relative",paddingRight:25},errorState:{color:"#b53b4b",fontSize:14,position:"absolute",top:7,right:7},overlayAction:{position:"absolute",right:0,top:15,"& svg":{maxWidth:15,maxHeight:15},"&.withLabel":{top:27}}}))}))((function(e){var t=e.label,n=e.onChange,a=e.value,i=e.id,r=e.name,o=e.type,s=void 0===o?"text":o,l=e.autoComplete,d=void 0===l?"off":l,u=e.disabled,b=void 0!==u&&u,j=e.multiline,h=void 0!==j&&j,m=e.tooltip,p=void 0===m?"":m,O=e.index,f=void 0===O?0:O,g=e.error,x=void 0===g?"":g,v=e.required,S=void 0!==v&&v,C=e.placeholder,k=void 0===C?"":C,w=e.min,N=e.max,T=e.overlayIcon,E=void 0===T?null:T,A=e.overlayAction,_=e.classes,I={"data-index":f};return"number"===s&&w&&(I.min=w),"number"===s&&N&&(I.max=N),Object(Se.jsx)(c.a.Fragment,{children:Object(Se.jsxs)(y.a,{item:!0,xs:12,className:"".concat(_.fieldContainer," ").concat(""!==x?_.errorInField:""),children:[""!==t&&Object(Se.jsxs)(fn.a,{htmlFor:i,className:_.inputLabel,children:[Object(Se.jsxs)("span",{children:[t,S?"*":""]}),""!==p&&Object(Se.jsx)("div",{className:_.tooltipContainer,children:Object(Se.jsx)(gn.a,{title:p,placement:"top-start",children:Object(Se.jsx)("div",{children:Object(Se.jsx)(xn,{className:_.tooltip})})})})]}),Object(Se.jsx)("div",{className:_.textBoxContainer,children:Object(Se.jsx)(Ln,{id:i,name:r,fullWidth:!0,value:a,disabled:b,onChange:n,type:s,multiline:h,autoComplete:d,inputProps:I,error:""!==x,helperText:x,placeholder:k,className:_.inputRebase})}),E&&Object(Se.jsx)("div",{className:"".concat(_.overlayAction," ").concat(""!==t?"withLabel":""),children:Object(Se.jsx)(Vt.a,{onClick:A?function(){A()}:function(){return null},size:"small",disableFocusRipple:!1,disableRipple:!1,disableTouchRipple:!1,children:E})})]})})})),Fn=n(371),Mn=n(633),Rn=n(678),Bn=n(647),Pn=Object(E.a)((function(e){return Object(N.a)({root:{lineHeight:1,"label + &":{marginTop:e.spacing(3)}},input:{position:"relative",color:"#393939",fontSize:13,fontWeight:600,padding:"15px 20px 10px 10px",borderBottom:"1px solid #9c9c9c",display:"flex",alignItems:"center","&:hover":{borderColor:"#393939"},"&:focus":{backgroundColor:"#fff"}}})}))(Fn.a),zn=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({},Le),Fe))}))((function(e){var t=e.classes,n=e.id,a=e.name,i=e.onChange,r=e.options,o=e.label,s=e.tooltip,l=void 0===s?"":s,d=e.value,u=e.disabled,b=void 0!==u&&u;return Object(Se.jsx)(c.a.Fragment,{children:Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.fieldContainer,children:[""!==o&&Object(Se.jsxs)(fn.a,{htmlFor:n,className:t.inputLabel,children:[Object(Se.jsx)("span",{children:o}),""!==l&&Object(Se.jsx)("div",{className:t.tooltipContainer,children:Object(Se.jsx)(gn.a,{title:l,placement:"top-start",children:Object(Se.jsx)("div",{children:Object(Se.jsx)(xn,{className:t.tooltip})})})})]}),Object(Se.jsx)(Mn.a,{fullWidth:!0,children:Object(Se.jsx)(Rn.a,{id:n,name:a,value:d,onChange:i,input:Object(Se.jsx)(Pn,{}),disabled:b,children:r.map((function(e){return Object(Se.jsx)(Bn.a,{value:e.value,children:e.label},"select-".concat(a,"-").concat(e.label))}))})})]})})})),Kn=n(689),Un=n(648),Wn=n(680),Gn=Object(T.a)(Object(m.a)({root:{"&:hover":{backgroundColor:"transparent"}}},Pe)),qn=function(e){var t=Gn();return Object(Se.jsx)(Wn.a,Object(m.a)({className:t.root,disableRipple:!0,color:"default",checkedIcon:Object(Se.jsx)("span",{className:t.radioSelectedIcon}),icon:Object(Se.jsx)("span",{className:t.radioUnselectedIcon})},e))},Vn=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)({},Le),Fe),{},{radioBoxContainer:{},fieldContainer:Object(m.a)(Object(m.a)({},Le.fieldContainer),{},{display:"flex",justifyContent:"space-between",borderBottom:"#9c9c9c 1px solid",paddingBottom:10,marginTop:11}),optionLabel:{"&.Mui-disabled":{"& .MuiFormControlLabel-label":{color:"#9c9c9c"}},"&:last-child":{marginRight:0},"& .MuiFormControlLabel-label":{fontSize:12,color:"#000"}},checkedOption:{"& .MuiFormControlLabel-label":{fontSize:12,color:"#000",fontWeight:700}}}))}))((function(e){var t=e.selectorOptions,n=void 0===t?[]:t,a=e.currentSelection,i=e.label,r=e.id,o=e.name,s=e.onChange,l=e.tooltip,d=void 0===l?"":l,u=e.disableOptions,b=void 0!==u&&u,j=e.classes,h=e.displayInColumn,m=void 0!==h&&h;return Object(Se.jsx)(c.a.Fragment,{children:Object(Se.jsxs)(y.a,{item:!0,xs:12,className:j.fieldContainer,children:[Object(Se.jsxs)(fn.a,{htmlFor:r,className:j.inputLabel,children:[Object(Se.jsx)("span",{children:i}),""!==d&&Object(Se.jsx)("div",{className:j.tooltipContainer,children:Object(Se.jsx)(gn.a,{title:d,placement:"top-start",children:Object(Se.jsx)("div",{children:Object(Se.jsx)(xn,{className:j.tooltip})})})})]}),Object(Se.jsx)("div",{className:j.radioBoxContainer,children:Object(Se.jsx)(Kn.a,{"aria-label":r,id:r,name:o,value:a,onChange:s,row:!m,children:n.map((function(e){return Object(Se.jsx)(Un.a,{value:e.value,control:Object(Se.jsx)(qn,{}),label:e.label,disabled:b,className:Object(Te.a)(j.optionLabel,Object(Ne.a)({},j.checkedOption,e.value===a))},"rd-".concat(o,"-").concat(e.value))}))})})]})})})),Hn=n(687),Yn=n(649),Qn=Object(E.a)({root:{alignItems:"flex-start",height:18,padding:"0 12px",display:"flex",position:"relative"},switchBase:{color:"#fff",padding:0,top:"initial","&$checked":{color:"#fff"},"&$checked + $track":{backgroundColor:"#081C42",opacity:1,height:15},"&:hover":{backgroundColor:"#fff"}},checked:{},track:{height:15,backgroundColor:"#9C9C9C",border:"#081C42 1px solid",opacity:1,padding:0,marginTop:1.5,"&$checked":{backgroundColor:"#081C42"}},thumb:{backgroundColor:"#fff",border:"#081C42 1px solid",boxShadow:"none",width:18,height:18,padding:0,marginLeft:10}})(Yn.a),Zn=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column",paddingTop:15,boxShadow:"none"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},wrapCell:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},noFound:{textAlign:"center",padding:"10px 0"},tableContainer:{maxHeight:200},stickyHeader:{backgroundColor:"#fff"},actionsTitle:{fontWeight:600,color:"#081C42",fontSize:16,alignSelf:"center"},tableBlock:{marginTop:15},filterField:{width:375,fontWeight:600,"& .input":{"&::placeholder":{fontWeight:600,color:"#081C42"}}},divContainer:{borderBottom:"#9c9c9c 1px solid",paddingBottom:14,marginBottom:20,maxWidth:840},wrapperContainer:{display:"flex",justifyContent:"space-between",alignItems:"center",maxWidth:840},indicatorLabel:{fontSize:12,fontWeight:600,color:"#081C42",margin:"0 8px 0 10px"},fieldDescription:{marginTop:4,color:"#999999"}},ze),Le))}))((function(e){var t=e.label,n=void 0===t?"":t,a=e.onChange,i=e.value,r=e.id,o=e.name,s=e.checked,l=void 0!==s&&s,d=e.disabled,u=void 0!==d&&d,b=e.switchOnly,j=void 0!==b&&b,h=e.tooltip,m=void 0===h?"":h,p=e.description,O=void 0===p?"":p,f=e.indicatorLabels,g=void 0===f?[]:f,x=e.containerClass,v=void 0===x?"":x,C=e.classes,k=Object(Se.jsx)(c.a.Fragment,{children:Object(Se.jsxs)("div",{className:"".concat(C.switchContainer," ").concat(v),children:[Object(Se.jsx)(Qn,{checked:l,onChange:a,color:"primary",name:o,inputProps:{"aria-label":"primary checkbox"},disabled:u,disableRipple:!0,disableFocusRipple:!0,disableTouchRipple:!0,value:i}),2===g.length&&Object(Se.jsx)("span",{className:C.indicatorLabel,children:l?g[0]:g[1]})]})});return j?k:Object(Se.jsxs)("div",{className:C.divContainer,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:C.wrapperContainer,children:[""!==n&&Object(Se.jsxs)(fn.a,{htmlFor:r,className:C.inputLabel,children:[Object(Se.jsx)("span",{children:n}),""!==m&&Object(Se.jsx)("div",{className:C.tooltipContainer,children:Object(Se.jsx)(gn.a,{title:m,placement:"top-start",children:Object(Se.jsx)("div",{children:Object(Se.jsx)(xn,{className:C.tooltip})})})})]}),k]}),""!==O&&Object(Se.jsx)(y.a,{item:!0,xs:10,children:Object(Se.jsx)(S.a,{component:"p",className:C.fieldDescription,children:O})})]})})),Jn=Object(o.b)((function(e){return{addBucketModalOpen:e.buckets.open,bucketName:e.buckets.addBucketName,versioningEnabled:e.buckets.addBucketVersioningEnabled,lockingEnabled:e.buckets.addBucketLockingEnabled,quotaEnabled:e.buckets.addBucketQuotaEnabled,quotaType:e.buckets.addBucketQuotaType,quotaSize:e.buckets.addBucketQuotaSize,quotaUnit:e.buckets.addBucketQuotaUnit,retentionEnabled:e.buckets.addBucketRetentionEnabled,retentionMode:e.buckets.addBucketRetentionMode,retentionUnit:e.buckets.addBucketRetentionUnit,retentionValidity:e.buckets.addBucketRetentionValidity,distributedSetup:e.system.distributedSetup}}),{addBucketName:function(e){return{type:_t,name:e}},addBucketVersioned:function(e){return{type:It,versioned:e}},enableObjectLocking:function(e){return{type:Lt,locking:e}},addBucketQuota:function(e){return{type:Dt,quota:e}},addBucketQuotaType:function(e){return{type:Ft,quotaType:e}},addBucketQuotaSize:function(e){return{type:Mt,quotaSize:e}},addBucketQuotaUnit:function(e){return{type:Rt,quotaUnit:e}},addBucketRetention:function(e){return{type:Pt,retention:e}},addBucketRetentionMode:function(e){return{type:zt,retentionMode:e}},addBucketRetentionUnit:function(e){return{type:Kt,retentionUnit:e}},addBucketRetentionValidity:function(e){return{type:Ut,retentionValidity:e}},setModalError:Q})(Object(E.a)((function(e){return Object(N.a)(Object(m.a)({buttonContainer:{textAlign:"right"},multiContainer:{display:"flex",alignItems:"center",justifyContent:"flex-start"},quotaSizeContainer:{flexGrow:1},sizeFactorContainer:{flexGrow:0,maxWidth:80,marginLeft:8,alignSelf:"flex-start"},error:{color:"#b53b4b"}},De))}))((function(e){var t=e.classes,n=e.open,i=e.closeModalAndRefresh,r=e.addBucketName,o=e.addBucketVersioned,s=e.enableObjectLocking,l=e.addBucketQuota,d=e.addBucketQuotaType,u=e.addBucketQuotaSize,b=e.addBucketQuotaUnit,j=e.addBucketRetention,m=e.addBucketRetentionMode,p=e.addBucketRetentionUnit,O=e.addBucketRetentionValidity,f=e.setModalError,g=e.bucketName,v=e.versioningEnabled,k=e.lockingEnabled,w=e.quotaEnabled,N=e.quotaType,T=e.quotaSize,E=e.quotaUnit,A=e.retentionEnabled,_=e.retentionMode,I=e.retentionUnit,L=e.retentionValidity,D=e.distributedSetup,F=Object(a.useState)(!1),M=Object(h.a)(F,2),R=M[0],B=M[1],P=Object(a.useState)(!1),z=Object(h.a)(P,2),K=z[0],U=z[1],W=Object(a.useState)(!1),G=Object(h.a)(W,2),q=G[0],V=G[1],H=Object(Hn.a)(g,1e3),Y=Object(h.a)(H,1)[0];Object(a.useEffect)((function(){r(Y)}),[Y,r]);var Q=function(){r(""),o(!1),s(!1),l(!1),d("hard"),u("1"),b("TiB"),j(!1),m("compliance"),p("days"),O(1)};return Object(a.useEffect)((function(){var e=!1;""!==g.trim()&&(e=!0),w&&e&&(""!==T.trim()&&0!==parseInt(T)||(e=!1)),v&&A||(j(!1),m("compliance"),p("days"),O(1)),A?(s(!0),V(!0)):V(!1),A&&(Number.isNaN(L)||L<1)&&(e=!1),U(e)}),[g,A,k,N,T,E,w,j,m,p,O,L,v,s]),Object(Se.jsx)(_n,{title:"Create Bucket",modalOpen:n,onClose:function(){i(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:Object(Se.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){if(e.preventDefault(),!R){B(!0);var t={name:g,versioning:!!D&&v,locking:!!D&&k};if(D){if(w){var n=je(T,E,!1);t.quota={enabled:!0,quota_type:N,amount:parseInt(n)}}A&&(t.retention={mode:_,unit:I,validity:L})}ye.invoke("POST","api/v1/buckets",t).then((function(e){B(!1),i(!0)})).catch((function(e){B(!1),f(e)})),Q()}}(e)},children:Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.formScrollable,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"bucket-name",name:"bucket-name",onChange:function(e){r(e.target.value)},label:"Bucket Name",value:g})}),Object(Se.jsxs)(y.a,{item:!0,xs:12,children:[Object(Se.jsx)(S.a,{component:"h6",variant:"h6",children:"Features"}),Object(Se.jsx)("hr",{}),!D&&Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsxs)("small",{className:t.error,children:["Some of these features are disabled as server is running in FS mode. ",Object(Se.jsx)("br",{}),"If you require any of this, please start server in distributed mode."]}),Object(Se.jsx)("br",{}),Object(Se.jsx)("br",{})]})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Zn,{value:"versioned",id:"versioned",name:"versioned",checked:v,onChange:function(e){o(e.target.checked)},description:"Allows to keep multiple versions of the same object under the same key.",label:"Versioning",indicatorLabels:["On","Off"],disabled:!D})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Zn,{value:"locking",id:"locking",name:"locking",disabled:q||!D,checked:k,onChange:function(e){s(e.target.checked)},label:"Object Locking",description:"Required to support retention and legal hold. Can only be enabled at bucket creation.",indicatorLabels:["On","Off"]})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Zn,{value:"bucket_quota",id:"bucket_quota",name:"bucket_quota",checked:w,onChange:function(e){l(e.target.checked)},label:"Quota",description:"Limit the amount of data in the bucket.",indicatorLabels:["On","Off"],disabled:!D})}),w&&D&&Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Vn,{currentSelection:N,id:"quota_type",name:"quota_type",label:"Quota Type",onChange:function(e){d(e.target.value)},selectorOptions:[{value:"hard",label:"Hard"},{value:"fifo",label:"FIFO"}]})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsxs)("div",{className:t.multiContainer,children:[Object(Se.jsx)("div",{className:t.quotaSizeContainer,children:Object(Se.jsx)(Dn,{type:"number",id:"quota_size",name:"quota_size",onChange:function(e){u(e.target.value)},label:"Quota",value:T,required:!0,min:"1"})}),Object(Se.jsx)("div",{className:t.sizeFactorContainer,children:Object(Se.jsx)(zn,{label:"\xa0",id:"quota_unit",name:"quota_unit",value:E,onChange:function(e){b(e.target.value)},options:ue()})})]})})]}),v&&D&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Zn,{value:"bucket_retention",id:"bucket_retention",name:"bucket_retention",checked:A,onChange:function(e){j(e.target.checked)},label:"Retention",description:"Impose rules to prevent object deletion for a period of time.",indicatorLabels:["On","Off"]})}),A&&D&&Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Vn,{currentSelection:_,id:"retention_mode",name:"retention_mode",label:"Retention Mode",onChange:function(e){m(e.target.value)},selectorOptions:[{value:"compliance",label:"Compliance"},{value:"governance",label:"Governance"}]})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Vn,{currentSelection:I,id:"retention_unit",name:"retention_unit",label:"Retention Unit",onChange:function(e){p(e.target.value)},selectorOptions:[{value:"days",label:"Days"},{value:"years",label:"Years"}]})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{type:"number",id:"retention_validity",name:"retention_validity",onChange:function(e){O(e.target.valueAsNumber)},label:"Retention Validity",value:String(L),required:!0,min:"1"})})]})]}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.buttonContainer,children:[Object(Se.jsx)("button",{type:"button",color:"primary",className:t.clearButton,onClick:Q,children:"Clear"}),Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:R||!K,children:"Save"})]}),R&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(C.a,{})})]})})})}))),$n=n(650),Xn=n(651),ea={setErrorSnackMessage:H},ta=Object(o.b)(null,ea)((function(e){var t=e.closeDeleteModalAndRefresh,n=e.deleteOpen,c=e.selectedBucket,i=e.setErrorSnackMessage,r=Object(a.useState)(!1),o=Object(h.a)(r,2),s=o[0],l=o[1];return Object(Se.jsxs)(wn.a,{open:n,onClose:function(){t(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(Se.jsx)(Nn.a,{id:"alert-dialog-title",children:"Delete Bucket"}),Object(Se.jsxs)(Tn.a,{children:[s&&Object(Se.jsx)(C.a,{}),Object(Se.jsxs)($n.a,{id:"alert-dialog-description",children:["Are you sure you want to delete bucket ",Object(Se.jsx)("b",{children:c}),"? ",Object(Se.jsx)("br",{}),"A bucket can only be deleted if it's empty."]})]}),Object(Se.jsxs)(Xn.a,{children:[Object(Se.jsx)(x.a,{onClick:function(){t(!1)},color:"primary",disabled:s,children:"Cancel"}),Object(Se.jsx)(x.a,{onClick:function(){s||(l(!0),ye.invoke("DELETE","/api/v1/buckets/".concat(c),{name:c}).then((function(e){l(!1),t(!0)})).catch((function(e){l(!1),i(e)})))},color:"secondary",autoFocus:!0,children:"Delete"})]})]})})),na=Object(E.a)((function(e){return Object(N.a)({headerContainer:{position:"absolute",width:"100%",height:77,display:"flex",backgroundColor:"#fff",borderBottom:"#E3E3E3 1px solid",left:0},label:{display:"flex",justifyContent:"flex-start",alignItems:"center"},labelStyle:{color:"#000",fontSize:18,fontWeight:700,marginLeft:55,marginTop:8},rightMenu:{marginTop:16,marginRight:8}})}))((function(e){var t=e.classes,n=e.label,a=e.actions;return Object(Se.jsxs)(y.a,{container:!0,className:t.headerContainer,justify:"space-between",children:[Object(Se.jsx)(y.a,{item:!0,className:t.label,children:Object(Se.jsx)(S.a,{variant:"h4",className:t.labelStyle,children:n})}),a&&Object(Se.jsx)(y.a,{item:!0,className:t.rightMenu,children:a})]})})),aa=n(313),ca=n.n(aa),ia=n(312),ra=n.n(ia),oa=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({},Ue))}))((function(e){var t=e.classes,n=e.label,c=void 0===n?"":n,i=e.content,r=e.multiLine,o=void 0!==r&&r;return Object(Se.jsx)(a.Fragment,{children:Object(Se.jsxs)(y.a,{className:t.prefinedContainer,children:[""!==c&&Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.predefinedTitle,children:c}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.predefinedList,children:Object(Se.jsx)(y.a,{item:!0,xs:12,className:o?t.innerContentMultiline:t.innerContent,children:i})})]})})})),sa=Object(E.a)((function(e){return Object(N.a)({wizardStepContainer:{display:"flex",flexDirection:"column"},wizardComponent:{overflowY:"auto",marginBottom:10,height:"calc(100vh - 435px)",maxWidth:840,width:"100%"},wizardModal:{overflowY:"auto",marginBottom:10,height:"calc(100vh - 515px)"},buttonsContainer:{display:"flex",flexDirection:"row",justifyContent:"flex-start",padding:"10px 0",borderTop:"#EAEAEA 1px solid","& button":{marginLeft:10},"&.forModal":{paddingBottom:0}},buttonInnerContainer:{maxWidth:840,width:"100%",textAlign:"right"}})}))((function(e){var t=e.classes,n=e.page,a=e.pageChange,c=e.loadingStep,i=e.forModal;return Object(Se.jsxs)("div",{className:t.wizardStepContainer,children:[Object(Se.jsx)("div",{className:i?t.wizardModal:t.wizardComponent,children:n.componentRender}),c&&Object(Se.jsx)("div",{children:Object(Se.jsx)(C.a,{})}),Object(Se.jsx)("div",{className:"".concat(t.buttonsContainer," ").concat(i?"forModal":""),children:Object(Se.jsx)("div",{className:t.buttonInnerContainer,children:n.buttons.map((function(e){return Object(Se.jsx)(x.a,{variant:"contained",color:"primary",size:"small",onClick:function(){!function(e){switch(e.type){case"next":a("++");break;case"back":a("--");break;case"to":a(e.toPage||0)}e.action&&e.action(a)}(e)},disabled:!e.enabled,children:e.label},"button-".concat(n.label,"-").concat(e.label))}))})})]})})),la=Object(E.a)((function(e){return Object(N.a)({wizardMain:{display:"flex",width:"100%",height:"100%",flexGrow:1},wizFromContainer:{height:"calc(100vh - 365px)",minHeight:450,padding:"0 30px"},wizFromModal:{position:"relative"},wizardSteps:{minWidth:180,marginRight:10,borderRight:"#eaeaea 1px solid",display:"flex",flexGrow:1,flexDirection:"column",height:"100%","& ul":{padding:"0 15px 0 40px",marginTop:0,"& li":{listStyle:"lower-roman",marginBottom:12}}},modalWizardSteps:{padding:5,borderBottom:"#eaeaea 1px solid","& ul":{padding:0,marginTop:0,display:"flex",justifyContent:"space-evenly","& li":{listStyle:"lower-roman","&::marker":{paddingLeft:15}}}},buttonList:{backgroundColor:"transparent",border:"none",cursor:"pointer","&:not(:disabled):hover":{textDecoration:"underline"},"&:selected, &:active, &:focus, &:focus:active":{border:"none",outline:0,boxShadow:"none"}},paddedContentGrid:{padding:"0 10px"},stepsLabel:{fontSize:20,color:"#393939",fontWeight:600,margin:"15px 12px","&.stepsModalTitle":{textAlign:"center",width:"100%",marginTop:0,marginBottom:10}},stepsMasterContainer:{position:"sticky",top:0,backgroundColor:"#FFFFFF",width:"100%",maxHeight:90}})}))((function(e){var t=e.classes,n=e.wizardSteps,c=e.loadingStep,i=e.forModal,r=Object(a.useState)(0),o=Object(h.a)(r,2),s=o[0],l=o[1],d=function(e){var t=n.length-1;if("++"===e){var a=s+1;a>t&&(a=t),l(a)}if("--"===e){var c=s-1;c<0&&(c=0),l(c)}if("number"===typeof e){var i=e;e<0&&(i=0),e>t&&(i=t),l(i)}};if(0===n.length)return null;var u=function(){return Object(Se.jsx)("ul",{children:n.map((function(e,n){return Object(Se.jsx)("li",{children:Object(Se.jsx)("button",{onClick:function(){return d(n)},disabled:n>s,className:t.buttonList,children:e.label})},"wizard-".concat(n.toString()))}))})};return Object(Se.jsxs)(y.a,{container:!0,className:i?t.wizFromModal:t.wizFromContainer,children:[i?Object(Se.jsx)(a.Fragment,{children:Object(Se.jsxs)("div",{className:t.stepsMasterContainer,children:[Object(Se.jsx)("div",{className:"".concat(t.stepsLabel," stepsModalTitle"),children:"Steps"}),Object(Se.jsx)("div",{className:t.modalWizardSteps,children:u()})]})}):Object(Se.jsx)(a.Fragment,{children:Object(Se.jsx)(y.a,{item:!0,xs:12,sm:3,md:3,lg:3,xl:2,children:Object(Se.jsxs)("div",{className:t.wizardSteps,children:[Object(Se.jsx)("span",{className:t.stepsLabel,children:"Steps"}),u()]})})}),Object(Se.jsx)(y.a,{item:!0,xs:12,sm:i?12:9,md:i?12:9,lg:i?12:9,xl:i?12:10,className:i?"":t.paddedContentGrid,children:Object(Se.jsx)(sa,{page:n[s],pageChange:d,loadingStep:c,forModal:i})})]})})),da=Object(o.b)(null,{setModalErrorSnackMessage:Q}),ua=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},buttonContainer:{textAlign:"right"},remoteBucketList:{display:"grid",gridTemplateColumns:"auto auto 45px",alignItems:"center",justifyContent:"stretch"},errorIcon:{color:"#C72C48"},successIcon:{color:"#42C91A"},hide:{opacity:0,transitionDuration:"0.3s"}},De),Je))}))(da((function(e){var t=e.open,n=e.closeModalAndRefresh,c=e.classes,i=e.buckets,r=e.setModalErrorSnackMessage,o=Object(a.useState)([]),s=Object(h.a)(o,2),l=s[0],d=s[1],u=Object(a.useState)(!1),b=Object(h.a)(u,2),j=b[0],m=b[1],p=Object(a.useState)(!1),O=Object(h.a)(p,2),f=O[0],g=O[1],x=Object(a.useState)(""),v=Object(h.a)(x,2),S=v[0],C=v[1],k=Object(a.useState)(""),w=Object(h.a)(k,2),N=w[0],T=w[1],E=Object(a.useState)(""),A=Object(h.a)(E,2),_=A[0],I=A[1],L=Object(a.useState)(""),D=Object(h.a)(L,2),F=D[0],M=D[1],R=Object(a.useState)(!0),B=Object(h.a)(R,2),P=B[0],z=B[1],K=Object(a.useState)("async"),U=Object(h.a)(K,2),W=U[0],G=U[1],q=Object(a.useState)("100"),V=Object(h.a)(q,2),H=V[0],Y=V[1],Q=Object(a.useState)("Gi"),Z=Object(h.a)(Q,2),J=Z[0],$=Z[1],ee=Object(a.useState)("60"),te=Object(h.a)(ee,2),ne=te[0],ae=te[1],ce=Object(a.useState)([]),ie=Object(h.a)(ce,2),re=ie[0],oe=ie[1],se=Object(a.useState)([]),le=Object(h.a)(se,2),de=le[0],ue=le[1],he=Object(a.useState)([]),me=Object(h.a)(he,2),pe=me[0],Oe=me[1],fe=de.map((function(e){return{label:e,value:e}}));Object(a.useEffect)((function(){if(0===re.length){var e=[],t=[];i.forEach((function(n){e.push(n),t.push("")})),oe(t),d(e)}}),[i,re.length]);var ge=function(e){var t=e.errString;switch(t){case"":return Object(Se.jsx)("div",{className:c.successIcon,children:Object(Se.jsx)(ra.a,{})});case"n/a":return null;default:if(t)return Object(Se.jsx)("div",{className:c.errorIcon,children:Object(Se.jsx)(gn.a,{title:t,placement:"top-start",children:Object(Se.jsx)(ca.a,{})})})}return null},xe=function(e,t){var n=Object(st.a)(re);n[e]=t,oe(n)},ve=function(e){var t=Object(st.a)(l),n=Object(st.a)(re);e.forEach((function(e){var a=X()(e,"errorString","");if(!a||""===a){var c=t.indexOf(e.originBucket);t.splice(c,1),n.splice(c,1)}})),d(t),oe(n)};return Object(Se.jsx)(_n,{modalOpen:t,onClose:function(){n(!1)},title:"Set Multiple Bucket Replication",children:Object(Se.jsx)(la,{loadingStep:j||f,wizardSteps:[{label:"Remote Configuration",componentRender:Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(oa,{label:"Local Buckets to replicate",content:l.join(", ")})}),Object(Se.jsx)("h4",{children:"Remote Endpoint Configuration"}),Object(Se.jsx)("span",{className:c.descriptionText,children:"Please avoid the use of root credentials for this feature"}),Object(Se.jsx)("br",{}),Object(Se.jsx)("br",{}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"accessKey",name:"accessKey",onChange:function(e){C(e.target.value)},label:"Access Key",value:S})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"secretKey",name:"secretKey",onChange:function(e){T(e.target.value)},label:"Secret Key",value:N})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"targetURL",name:"targetURL",onChange:function(e){I(e.target.value)},placeholder:"play.min.io:9000",label:"Target URL",value:_})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Zn,{checked:P,id:"useTLS",name:"useTLS",label:"Use TLS",onChange:function(e){z(e.target.checked)},value:"yes"})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"region",name:"region",onChange:function(e){M(e.target.value)},label:"Region",value:F})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(zn,{id:"replication_mode",name:"replication_mode",onChange:function(e){G(e.target.value)},label:"Replication Mode",value:W,options:[{label:"Asynchronous",value:"async"},{label:"Synchronous",value:"sync"}]})}),"async"===W&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsxs)("div",{className:c.multiContainer,children:[Object(Se.jsx)("div",{children:Object(Se.jsx)(Dn,{type:"number",id:"bandwidth_scalar",name:"bandwidth_scalar",onChange:function(e){Y(e.target.value)},label:"Bandwidth",value:H,min:"0"})}),Object(Se.jsx)("div",{className:c.sizeFactorContainer,children:Object(Se.jsx)(zn,{label:"Unit",id:"bandwidth_unit",name:"bandwidth_unit",value:J,onChange:function(e){$(e.target.value)},options:be()})})]})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"healthCheck",name:"healthCheck",onChange:function(e){ae(e.target.value)},label:"Health Check Duration",value:ne})})]}),buttons:[{type:"custom",label:"Next",enabled:!f,action:function(e){var t={accessKey:S,secretKey:N,targetURL:_,useTLS:P};g(!0),ye.invoke("POST","api/v1/list-external-buckets",t).then((function(t){var n=X()(t,"buckets",[]);if(n&&n.length>0){var a=n.map((function(e){return e.name}));ue(a)}e("++"),g(!1)})).catch((function(e){g(!1),r(e)}))}}]},{label:"Buckets Assignation",componentRender:Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)("h3",{children:"Remote Buckets Assignation"}),Object(Se.jsx)("span",{className:c.descriptionText,children:"Please select / type the desired remote bucket were you want the local data to be replicated."}),Object(Se.jsx)("div",{className:c.remoteBucketList,children:l.map((function(e,t){var n,i=function(e){if(pe.length>0){var t=pe.find((function(t){return t.originBucket===e}));if(t)return X()(t,"errorString","")||""}return"n/a"}(e);return Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)("div",{className:""===i?c.hide:"",children:e}),Object(Se.jsx)("div",{className:""===i?c.hide:"",children:(n=t,de.length>0?Object(Se.jsx)(a.Fragment,{children:Object(Se.jsx)(zn,{label:"",id:"assign-bucket-".concat(n),name:"assign-bucket-".concat(n),value:re[n],onChange:function(e){xe(n,e.target.value)},options:fe,disabled:j})}):Object(Se.jsx)(a.Fragment,{children:Object(Se.jsx)(Dn,{id:"assign-bucket-".concat(n),name:"assign-bucket-".concat(n),label:"",onChange:function(e){xe(n,e.target.value)},value:re[n],disabled:j})}))}),Object(Se.jsx)("div",{className:""===i?c.hide:"",children:pe.length>0&&Object(Se.jsx)(ge,{errString:i})})]},"buckets-assignation-".concat(t.toString(),"-").concat(e))}))})]}),buttons:[{type:"back",label:"Back",enabled:!0},{type:"next",label:"Create",enabled:!j,action:function(){m(!0);var e=l.map((function(e,t){return{originBucket:e,destinationBucket:re[t]}})),t="".concat(P?"https://":"http://").concat(_),a=parseInt(ne),c={accessKey:S,secretKey:N,targetURL:t,region:F,bucketsRelation:e,syncMode:W,bandwidth:"async"===W?parseInt(je(H,J,!0)):0,healthCheckPeriod:a};ye.invoke("POST","api/v1/buckets-replication",c).then((function(e){m(!1);var t=e.replicationState;Oe(t),0===t.filter((function(e){return e.errorString&&""!==e.errorString})).length?n(!0):setTimeout((function(){ve(t)}),500)})).catch((function(e){m(!1),r(e)}))}}]}],forModal:!0})})}))),ba=Object(o.b)((function(e){return{addBucketModalOpen:e.buckets.open}}),{addBucketOpen:function(e){return{type:At,open:e}},addBucketReset:function(){return{type:Bt}},setErrorSnackMessage:H})(Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}}},ze),Ke),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,n=e.addBucketOpen,c=e.addBucketModalOpen,i=e.addBucketReset,r=e.setErrorSnackMessage,o=Object(a.useState)([]),s=Object(h.a)(o,2),l=s[0],d=s[1],u=Object(a.useState)(!0),b=Object(h.a)(u,2),j=b[0],m=b[1],p=Object(a.useState)(!1),O=Object(h.a)(p,2),f=O[0],g=O[1],S=Object(a.useState)(""),C=Object(h.a)(S,2),k=C[0],w=C[1],N=Object(a.useState)(""),T=Object(h.a)(N,2),E=T[0],A=T[1],_=Object(a.useState)(!0),I=Object(h.a)(_,2),L=I[0],D=I[1],F=Object(a.useState)(!1),M=Object(h.a)(F,2),R=M[0],B=M[1],P=Object(a.useState)([]),z=Object(h.a)(P,2),K=z[0],U=z[1],W=Object(a.useState)(!1),G=Object(h.a)(W,2),q=G[0],V=G[1];Object(a.useEffect)((function(){L&&ye.invoke("POST","/api/v1/has-permission",{actions:[{id:"createBucket",action:"s3:CreateBucket"}]}).then((function(e){if(D(!1),e.permissions){var t=(e.permissions?e.permissions:[]).find((function(e){return"createBucket"===e.id}));t&&t.can?B(!0):B(!1),D(!1)}})).catch((function(e){D(!1),r(e)}))}),[L,r]),Object(a.useEffect)((function(){if(j){m(!0),ye.invoke("GET","/api/v1/buckets").then((function(e){m(!1),d(e.buckets||[])})).catch((function(e){m(!1),r(e)}))}}),[j,r]);var H=[{type:"view",to:"/buckets",sendOnlyId:!0},{type:"delete",onClick:function(e){g(!0),w(e)},sendOnlyId:!0}],Y=l.filter((function(e){return""===E||e.name.indexOf(E)>=0}));return Object(Se.jsxs)(a.Fragment,{children:[c&&Object(Se.jsx)(Jn,{open:c,closeModalAndRefresh:function(e){n(!1),i(),e&&(m(!0),U([]))}}),f&&Object(Se.jsx)(ta,{deleteOpen:f,selectedBucket:k,closeDeleteModalAndRefresh:function(e){!function(e){g(!1),e&&(m(!0),U([]))}(e)}}),q&&Object(Se.jsx)(ua,{open:q,buckets:K,closeModalAndRefresh:function(e){V(!1),e&&U([])}}),Object(Se.jsx)(na,{label:"Buckets"}),Object(Se.jsx)(y.a,{container:!0,children:Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.container,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(Se.jsx)(v.a,{placeholder:"Search Buckets",className:t.searchField,id:"search-resource",label:"",onChange:function(e){A(e.target.value)},InputProps:{disableUnderline:!0,startAdornment:Object(Se.jsx)(lt.a,{position:"start",children:Object(Se.jsx)(ut.a,{})})}}),Object(Se.jsx)(x.a,{variant:"contained",color:"primary",startIcon:Object(Se.jsx)(jt.a,{}),onClick:function(){V(!0)},disabled:0===K.length,children:"Set Replication"}),R&&Object(Se.jsx)(x.a,{variant:"contained",color:"primary",startIcon:Object(Se.jsx)(ft,{}),onClick:function(){n(!0)},children:"Create Bucket"})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(kn,{itemActions:H,columns:[{label:"Name",elementKey:"name"},{label:"Creation Date",elementKey:"creation_date",renderFunction:function(e){return Object(Se.jsx)(mt.a,{children:e})}},{label:"Size",elementKey:"size",renderFunction:oe,width:60,contentTextAlign:"right"}],isLoading:j,records:Y,entityName:"Buckets",idField:"name",selectedItems:K,onSelect:function(e){var t=e.target,n=t.value,a=t.checked,c=Object(st.a)(K);return a?c.push(n):c=c.filter((function(e){return e!==n})),U(c),c}})})]})})]})}))),ja=n(677),ha=n(653),ma=n(360),pa=["children","value","index"],Oa=function(e){var t=e.children,n=e.value,c=e.index,i=Object(ma.a)(e,pa);return Object(Se.jsx)("div",Object(m.a)(Object(m.a)({role:"tabpanel",hidden:n!==c,id:"simple-tabpanel-".concat(c),"aria-labelledby":"simple-tab-".concat(c),style:{marginTop:"5px"}},i),{},{children:n===c&&Object(Se.jsx)(a.Fragment,{children:t})}))},fa=Object(o.b)((function(e){return{session:e.console.session}}),{setErrorSnackMessage:H});function ga(e){return{id:"simple-tab-".concat(e),"aria-controls":"simple-tabpanel-".concat(e)}}var xa=Object(E.a)((function(e){return Object(N.a)({})}))(fa((function(e){e.classes;var t,n=e.match,c=e.setErrorSnackMessage,i=e.session,r=Object(a.useState)(0),o=Object(h.a)(r,2),s=o[0],l=o[1],d=Object(a.useState)(!0),u=Object(h.a)(d,2),b=u[0],p=u[1],O=Object(a.useState)([]),f=Object(h.a)(O,2),g=f[0],x=f[1],v=Object(a.useState)(!0),y=Object(h.a)(v,2),S=y[0],C=y[1],k=Object(a.useState)([]),N=Object(h.a)(k,2),T=N[0],E=N[1],A=n.params.bucketName,_=(null===(t=i.pages)||void 0===t?void 0:t.indexOf("/users"))>-1,I=[{type:"view",onClick:function(e){j.push("/policies/".concat(e.name))}}],L=[{type:"view",onClick:function(e){j.push("/users/".concat(e))}}];return Object(a.useEffect)((function(){S&&_&&ye.invoke("GET","/api/v1/bucket-users/".concat(A)).then((function(e){E(e),C(!1)})).catch((function(e){c(e),C(!1)}))}),[S,c,A,_]),Object(a.useEffect)((function(){b&&ye.invoke("GET","/api/v1/bucket-policy/".concat(A)).then((function(e){x(e.policies),p(!1)})).catch((function(e){c(e),p(!1)}))}),[b,c,A]),Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)("br",{}),Object(Se.jsxs)(w.a,{children:[Object(Se.jsxs)(ja.a,{value:s,onChange:function(e,t){l(t)},indicatorColor:"primary",textColor:"primary","aria-label":"cluster-tabs",variant:"scrollable",scrollButtons:"auto",children:[Object(Se.jsx)(ha.a,Object(m.a)({label:"Policies"},ga(0))),_&&Object(Se.jsx)(ha.a,Object(m.a)({label:"Users"},ga(1)))]}),Object(Se.jsx)(Oa,{index:0,value:s,children:Object(Se.jsx)(kn,{noBackground:!0,itemActions:I,columns:[{label:"Name",elementKey:"name"}],isLoading:b,records:g,entityName:"Policies",idField:"name"})}),_&&Object(Se.jsx)(Oa,{index:1,value:s,children:Object(Se.jsx)(kn,{noBackground:!0,itemActions:L,columns:[{label:"User",elementKey:"accessKey"}],isLoading:S,records:T,entityName:"Users",idField:"accessKey"})})]})]})}))),va=Object(o.b)(null,{setModalErrorSnackMessage:Q}),ya=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({},De))}))(va((function(e){var t=e.classes,n=e.open,c=e.bucketName,i=e.actualPolicy,r=e.closeModalAndRefresh,o=e.setModalErrorSnackMessage,s=Object(a.useState)(!1),l=Object(h.a)(s,2),d=l[0],u=l[1],b=Object(a.useState)(""),j=Object(h.a)(b,2),m=j[0],p=j[1];return Object(a.useEffect)((function(){p(i)}),[p,i]),Object(Se.jsx)(_n,{title:"Change Access Policy",modalOpen:n,onClose:function(){r()},children:Object(Se.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),d||(u(!0),ye.invoke("PUT","/api/v1/buckets/".concat(c,"/set-policy"),{access:m}).then((function(e){u(!1),r()})).catch((function(e){u(!1),o(e)})))},children:Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.formScrollable,children:Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(zn,{value:m,label:"Access Policy",id:"select-access-policy",name:"select-access-policy",onChange:function(e){p(e.target.value)},options:[{value:"PRIVATE",label:"Private"},{value:"PUBLIC",label:"Public"}]})})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",fullWidth:!0,disabled:d,children:"Set"})}),d&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(C.a,{})})]})})})}))),Sa=Object(o.b)(null,{setModalErrorSnackMessage:Q}),Ca=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({},De))}))(Sa((function(e){var t=e.classes,n=e.open,c=e.bucketName,i=e.closeModalAndRefresh,r=e.setModalErrorSnackMessage,o=Object(a.useState)(!1),s=Object(h.a)(o,2),l=s[0],d=s[1],u=Object(a.useState)("compliance"),b=Object(h.a)(u,2),j=b[0],m=b[1],p=Object(a.useState)("days"),O=Object(h.a)(p,2),f=O[0],g=O[1],v=Object(a.useState)(1),S=Object(h.a)(v,2),k=S[0],w=S[1],N=Object(a.useState)(!1),T=Object(h.a)(N,2),E=T[0],A=T[1];return Object(a.useEffect)((function(){Number.isNaN(k)||k<1?A(!1):A(!0)}),[k]),Object(Se.jsx)(_n,{title:"Set Retention Configuration",modalOpen:n,onClose:function(){i()},children:Object(Se.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),l||(d(!0),ye.invoke("PUT","/api/v1/buckets/".concat(c,"/retention"),{mode:j,unit:f,validity:k}).then((function(){d(!1),i()})).catch((function(e){d(!1),r(e)})))},children:Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.formScrollable,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Vn,{currentSelection:j,id:"retention_mode",name:"retention_mode",label:"Retention Mode",onChange:function(e){m(e.target.value)},selectorOptions:[{value:"compliance",label:"Compliance"},{value:"governance",label:"Governance"}]})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Vn,{currentSelection:f,id:"retention_unit",name:"retention_unit",label:"Retention Unit",onChange:function(e){g(e.target.value)},selectorOptions:[{value:"days",label:"Days"},{value:"years",label:"Years"}]})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{type:"number",id:"retention_validity",name:"retention_validity",onChange:function(e){w(e.target.valueAsNumber)},label:"Retention Validity",value:String(k),required:!0,min:"1"})})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",fullWidth:!0,disabled:l||!E,children:"Set"})}),l&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(C.a,{})})]})})})}))),ka=Object(o.b)(null,{setModalErrorSnackMessage:Q}),wa=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},buttonContainer:{textAlign:"right"}},De))}))(ka((function(e){var t=e.classes,n=e.open,c=(e.encryptionEnabled,e.encryptionCfg),i=e.selectedBucket,r=e.closeModalAndRefresh,o=e.setModalErrorSnackMessage,s=Object(a.useState)(!1),l=Object(h.a)(s,2),d=l[0],u=l[1],b=Object(a.useState)(""),j=Object(h.a)(b,2),m=j[0],p=j[1],O=Object(a.useState)("disabled"),f=Object(h.a)(O,2),g=f[0],v=f[1];Object(a.useEffect)((function(){c&&("AES256"===c.algorithm?v("sse-s3"):(v("sse-kms"),p(c.kmsMasterKeyID)))}),[c]);return Object(Se.jsx)(_n,{modalOpen:n,onClose:function(){r()},title:"Enable Bucket Encryption",children:Object(Se.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),d||("disabled"===g?ye.invoke("POST","/api/v1/buckets/".concat(i,"/encryption/disable")).then((function(){u(!1),r()})).catch((function(e){u(!1),o(e)})):ye.invoke("POST","/api/v1/buckets/".concat(i,"/encryption/enable"),{encType:g,kmsKeyID:m}).then((function(){u(!1),r()})).catch((function(e){u(!1),o(e)})))},children:Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.formScrollable,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(zn,{onChange:function(e){v(e.target.value)},id:"select-encryption-type",name:"select-encryption-type",label:"Encryption Type",value:g,options:[{label:"Disabled",value:"disabled"},{label:"SSE-S3",value:"sse-s3"},{label:"SSE-KMS",value:"sse-kms"}]})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})}),"sse-kms"===g&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"kms-key-id",name:"kms-key-id",label:"KMS Key ID",value:m,onChange:function(e){p(e.target.value)}})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.buttonContainer,children:Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:d,children:"Save"})}),d&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(C.a,{})})]})})})}))),Na=Object(o.b)(null,{setErrorSnackMessage:H})((function(e){var t=e.closeVersioningModalAndRefresh,n=e.modalOpen,c=e.selectedBucket,i=e.versioningCurrentState,r=e.setErrorSnackMessage,o=Object(a.useState)(!1),s=Object(h.a)(o,2),l=s[0],d=s[1];return Object(Se.jsxs)(wn.a,{open:n,onClose:function(){t(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(Se.jsx)(Nn.a,{id:"alert-dialog-title",children:"Edit Versioning"}),Object(Se.jsxs)(Tn.a,{children:[l&&Object(Se.jsx)(C.a,{}),Object(Se.jsxs)($n.a,{id:"alert-dialog-description",children:["Are you sure you want to"," ",Object(Se.jsx)("strong",{children:i?"disable":"enable"})," ","versioning for this bucket?",i&&Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)("br",{}),Object(Se.jsx)("br",{}),Object(Se.jsx)("strong",{children:"File versions won't be automatically deleted"})]})]})]}),Object(Se.jsxs)(Xn.a,{children:[Object(Se.jsx)(x.a,{onClick:function(){t(!1)},color:"primary",disabled:l,children:"Cancel"}),Object(Se.jsx)(x.a,{onClick:function(){l||(d(!0),ye.invoke("PUT","/api/v1/buckets/".concat(c,"/versioning"),{versioning:!i}).then((function(){d(!1),t(!0)})).catch((function(e){d(!1),r(e)})))},color:"secondary",autoFocus:!0,children:i?"Disable":"Enable"})]})]})})),Ta=function(){return Object(Se.jsxs)(pt.a,{viewBox:"0 0 16.172 17.187",children:[Object(Se.jsx)("defs",{children:Object(Se.jsxs)("linearGradient",{id:"a",y1:"0.5",x2:"1",y2:"0.5",gradientUnits:"objectBoundingBox",children:[Object(Se.jsx)("stop",{offset:"0.044",stopColor:"#362585"}),Object(Se.jsx)("stop",{offset:"0.301",stopColor:"#281b6f"}),Object(Se.jsx)("stop",{offset:"1",stopColor:"#1e1560"})]})}),Object(Se.jsx)("path",{style:{fill:"none",stroke:"#707070",strokeMiterlimit:10,strokeWidth:"0.5px"},d:"M-4778.1,2239.582v6.425h6.425",transform:"translate(4787.594 -2239.582)"}),Object(Se.jsx)("path",{fill:"#707070",d:"M-4784.238,2247.532v-.581c0-.027.009-.054.012-.081.039-.313.055-.632.121-.939a6.744,6.744,0,0,1,3.064-4.441,6.514,6.514,0,0,1,3.293-1.032,6.923,6.923,0,0,1,2.667.423,6.793,6.793,0,0,1,4.119,4.333,6.053,6.053,0,0,1,.279,1.337c.006.083.014.164.021.247v.86c-.011.131-.018.261-.032.392a6.494,6.494,0,0,1-.626,2.147,6.807,6.807,0,0,1-4.044,3.528,6.052,6.052,0,0,1-1.663.3,6.576,6.576,0,0,1-2.565-.325,6.73,6.73,0,0,1-3.947-3.451,6.627,6.627,0,0,1-.658-2.288C-4784.212,2247.816-4784.225,2247.674-4784.238,2247.532Zm13.025-.306c-.024-.309-.021-.661-.082-1a6.206,6.206,0,0,0-1.658-3.293,6.153,6.153,0,0,0-4.1-1.9,5.984,5.984,0,0,0-2.476.355,6.188,6.188,0,0,0-4.134,5.708,6.453,6.453,0,0,0,.228,1.881,6.127,6.127,0,0,0,1.984,3.052,6.046,6.046,0,0,0,3.806,1.445,6.043,6.043,0,0,0,1.235-.065,6.249,6.249,0,0,0,3.783-2.2,6.2,6.2,0,0,0,1.352-3.048C-4771.228,2247.863-4771.233,2247.563-4771.212,2247.226Z",transform:"translate(4786.834 -2240.452)"}),Object(Se.jsx)("ellipse",{style:{opacity:.1,fill:"url(#a)"},cx:"6.151",cy:"6.151",rx:"6.151",ry:"6.151",transform:"translate(0 4.886)"})]})},Ea=n(315),Aa=n.n(Ea),_a=Object(o.b)(null,{setModalErrorSnackMessage:Q}),Ia=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},buttonContainer:{textAlign:"right"},multiContainer:{display:"flex",alignItems:"center",justifyContent:"flex-start"}},De))}))(_a((function(e){var t=e.classes,n=e.open,i=e.enabled,r=e.cfg,o=e.selectedBucket,s=e.closeModalAndRefresh,l=e.setModalErrorSnackMessage,d=Object(a.useState)(!1),u=Object(h.a)(d,2),b=u[0],j=u[1],m=Object(a.useState)(!1),p=Object(h.a)(m,2),O=p[0],f=p[1],g=Object(a.useState)("hard"),v=Object(h.a)(g,2),S=v[0],k=v[1],w=Object(a.useState)("1"),N=Object(h.a)(w,2),T=N[0],E=N[1],A=Object(a.useState)("TiB"),_=Object(h.a)(A,2),I=_[0],L=_[1];Object(a.useEffect)((function(){if(i&&(f(!0),r)){k(r.type),E("".concat(r.quota)),L("B");for(var e="B",t=r.quota,n=0;n<ce.length&&r.quota%Math.pow(1024,n)===0;n++)t=r.quota/Math.pow(1024,n),e=ce[n];E("".concat(t)),L(e)}}),[i,r]);return Object(Se.jsx)(_n,{modalOpen:n,onClose:function(){s()},title:"Enable Bucket Quota",children:Object(Se.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){if(e.preventDefault(),!b){var t={enabled:O,amount:parseInt(je(T,I,!1)),quota_type:S};ye.invoke("PUT","/api/v1/buckets/".concat(o,"/quota"),t).then((function(){j(!1),s()})).catch((function(e){j(!1),l(e)}))}}(e)},children:Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.formScrollable,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Zn,{value:"bucket_quota",id:"bucket_quota",name:"bucket_quota",checked:O,onChange:function(e){f(e.target.checked)},label:"Quota",indicatorLabels:["On","Off"]})}),O&&Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Vn,{currentSelection:S,id:"quota_type",name:"quota_type",label:"Quota Type",onChange:function(e){k(e.target.value)},selectorOptions:[{value:"hard",label:"Hard"},{value:"fifo",label:"FIFO"}]})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsxs)("div",{className:t.multiContainer,children:[Object(Se.jsx)("div",{className:t.quotaSizeContainer,children:Object(Se.jsx)(Dn,{type:"number",id:"quota_size",name:"quota_size",onChange:function(e){E(e.target.value)},label:"Quota",value:T,required:!0,min:"1"})}),Object(Se.jsx)("div",{className:t.sizeFactorContainer,children:Object(Se.jsx)(zn,{label:"\xa0",id:"quota_unit",name:"quota_unit",value:I,onChange:function(e){L(e.target.value)},options:ue()})})]})})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.buttonContainer,children:Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:b,children:"Save"})}),b&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(C.a,{})})]})})})}))),La=Object(o.b)((function(e){return{session:e.console.session,distributedSetup:e.system.distributedSetup}}),{setErrorSnackMessage:H}),Da=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({paperContainer:{padding:15,paddingLeft:50,display:"flex"},elementTitle:{fontWeight:500,color:"#777777",fontSize:14,marginTop:-9},consumptionValue:{color:"#000000",fontSize:"48px",fontWeight:"bold"},reportedUsage:{padding:"15px"},dualCardLeft:{paddingRight:"5px"},dualCardRight:{paddingLeft:"5px"}},Xe),$e))}))(La((function(e){var t=e.classes,n=e.match,i=e.distributedSetup,r=e.setErrorSnackMessage,o=Object(a.useState)(null),s=Object(h.a)(o,2),l=s[0],d=s[1],u=Object(a.useState)(null),b=Object(h.a)(u,2),j=b[0],m=b[1],p=Object(a.useState)("0"),O=Object(h.a)(p,2),f=O[0],g=O[1],v=Object(a.useState)(!1),C=Object(h.a)(v,2),N=C[0],T=C[1],E=Object(a.useState)(!1),A=Object(h.a)(E,2),_=A[0],I=A[1],L=Object(a.useState)(!1),D=Object(h.a)(L,2),F=D[0],M=D[1],R=Object(a.useState)(!0),B=Object(h.a)(R,2),P=B[0],z=B[1],K=Object(a.useState)(!0),U=Object(h.a)(K,2),W=U[0],G=U[1],q=Object(a.useState)(!0),V=Object(h.a)(q,2),H=V[0],Y=V[1],Q=Object(a.useState)(!0),Z=Object(h.a)(Q,2),J=Z[0],$=Z[1],ee=Object(a.useState)(!0),te=Object(h.a)(ee,2),ne=te[0],ae=te[1],ce=Object(a.useState)(!0),ie=Object(h.a)(ce,2),re=ie[0],se=ie[1],le=Object(a.useState)(!0),de=Object(h.a)(le,2),ue=de[0],be=de[1],je=Object(a.useState)(!1),he=Object(h.a)(je,2),me=he[0],pe=he[1],Oe=Object(a.useState)(!1),fe=Object(h.a)(Oe,2),ge=fe[0],xe=fe[1],ve=Object(a.useState)(null),Ce=Object(h.a)(ve,2),ke=Ce[0],we=Ce[1],Ne=Object(a.useState)(!1),Te=Object(h.a)(Ne,2),Ee=Te[0],Ae=Te[1],_e=Object(a.useState)(!1),Ie=Object(h.a)(_e,2),Le=Ie[0],De=Ie[1],Fe=Object(a.useState)(!1),Me=Object(h.a)(Fe,2),Re=Me[0],Be=Me[1],Pe=Object(a.useState)(!1),ze=Object(h.a)(Pe,2),Ke=ze[0],Ue=ze[1],We=Object(a.useState)(!1),Ge=Object(h.a)(We,2),qe=Ge[0],Ve=Ge[1],He=n.params.bucketName,Ye="n/a";null!==l&&(Ye=l.access),Object(a.useEffect)((function(){H&&ye.invoke("GET","/api/v1/buckets/".concat(He)).then((function(e){Y(!1),d(e)})).catch((function(e){Y(!1),r(e)}))}),[H,r,He]),Object(a.useEffect)((function(){J&&ye.invoke("GET","/api/v1/buckets/".concat(He,"/encryption/info")).then((function(e){e.algorithm&&(Ae(!0),m(e)),$(!1)})).catch((function(e){"The server side encryption configuration was not found"===e&&(Ae(!1),m(null)),$(!1)}))}),[J,He]),Object(a.useEffect)((function(){ne&&i&&ye.invoke("GET","/api/v1/buckets/".concat(He,"/versioning")).then((function(e){pe(e.is_versioned),ae(!1)})).catch((function(e){r(e),ae(!1)}))}),[ne,r,He,i]),Object(a.useEffect)((function(){re&&i&&ye.invoke("GET","/api/v1/buckets/".concat(He,"/quota")).then((function(e){we(e),e.quota?xe(!0):xe(!1),se(!1)})).catch((function(e){r(e),xe(!1),ae(!1)}))}),[re,ae,r,He,i]),Object(a.useEffect)((function(){ne&&i&&ye.invoke("GET","/api/v1/buckets/".concat(He,"/object-locking")).then((function(e){T(e.object_locking_enabled),z(!1)})).catch((function(e){r(e),z(!1)}))}),[P,r,He,ne,i]),Object(a.useEffect)((function(){W&&ye.invoke("GET","/api/v1/buckets").then((function(e){var t=X()(e,"buckets",[]).find((function(e){return e.name===He})),n=X()(t,"size","0");G(!1),g(n)})).catch((function(e){G(!1),r(e)}))}),[W,r,He]),Object(a.useEffect)((function(){ue&&i&&ye.invoke("GET","/api/v1/buckets/".concat(He,"/replication")).then((function(e){var t=e.rules?e.rules:[];M(t.length>0),be(!1)})).catch((function(e){r(e),be(!1)}))}),[ue,r,He,i]);var Qe,Ze=function(){Y(!0),G(!0),ae(!0),$(!0)};return Object(Se.jsxs)(a.Fragment,{children:[Re&&Object(Se.jsx)(wa,{open:Re,selectedBucket:He,encryptionEnabled:Ee,encryptionCfg:j,closeModalAndRefresh:function(){Be(!1),$(!0)}}),Ke&&Object(Se.jsx)(Ia,{open:Ke,selectedBucket:He,enabled:ge,cfg:ke,closeModalAndRefresh:function(){Ue(!1),se(!0)}}),_&&Object(Se.jsx)(ya,{bucketName:He,open:_,actualPolicy:Ye,closeModalAndRefresh:function(){I(!1),Ze()}}),Le&&Object(Se.jsx)(Ca,{bucketName:He,open:Le,closeModalAndRefresh:function(){De(!1),Ze()}}),qe&&Object(Se.jsx)(Na,{closeVersioningModalAndRefresh:function(e){Ve(!1),e&&Ze()},modalOpen:qe,selectedBucket:He,versioningCurrentState:me}),Object(Se.jsx)("br",{}),Object(Se.jsx)(w.a,{className:t.paperContainer,children:Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsxs)(y.a,{item:!0,xs:9,children:[Object(Se.jsx)("h2",{children:"Details"}),Object(Se.jsx)("hr",{className:t.hrClass}),Object(Se.jsx)("table",{width:"100%",children:Object(Se.jsxs)("tbody",{children:[Object(Se.jsxs)("tr",{children:[Object(Se.jsx)("td",{className:t.titleCol,children:"Access Policy:"}),Object(Se.jsx)("td",{className:t.capitalizeFirst,children:Object(Se.jsx)(x.a,{color:"primary",className:t.anchorButton,onClick:function(){I(!0)},children:H?Object(Se.jsx)(k.a,{color:"primary",size:16,variant:"indeterminate"}):Ye.toLowerCase()})}),Object(Se.jsx)("td",{className:t.titleCol,children:"Encryption:"}),Object(Se.jsx)("td",{children:J?Object(Se.jsx)(k.a,{color:"primary",size:16,variant:"indeterminate"}):Object(Se.jsx)(x.a,{color:"primary",className:t.anchorButton,onClick:function(){Be(!0)},children:Ee?"Enabled":"Disabled"})})]}),i&&Object(Se.jsxs)("tr",{children:[Object(Se.jsx)("td",{className:t.titleCol,children:"Replication:"}),Object(Se.jsx)("td",{className:t.doubleElement,children:Object(Se.jsx)("span",{children:F?"Enabled":"Disabled"})}),N?Object(Se.jsx)(c.a.Fragment,{children:Object(Se.jsx)("td",{colSpan:2})}):Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsx)("td",{className:t.titleCol,children:"Object Locking:"}),Object(Se.jsx)("td",{children:"Disabled"})]})]})]})})]}),Object(Se.jsxs)(y.a,{item:!0,xs:3,className:t.reportedUsage,children:[Object(Se.jsxs)(y.a,{container:!0,direction:"row",alignItems:"center",children:[Object(Se.jsx)(y.a,{item:!0,className:t.icon,xs:2,children:Object(Se.jsx)(Ta,{})}),Object(Se.jsx)(y.a,{item:!0,xs:10,children:Object(Se.jsx)(S.a,{className:t.elementTitle,children:"Reported Usage"})})]}),Object(Se.jsx)(S.a,{className:t.consumptionValue,children:oe(f)})]})]})}),Object(Se.jsx)("br",{}),Object(Se.jsx)("br",{}),i&&Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(w.a,{className:t.paperContainer,children:Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsxs)(y.a,{item:!0,xs:ge?9:12,children:[Object(Se.jsx)("h2",{children:"Versioning"}),Object(Se.jsx)("hr",{className:t.hrClass}),Object(Se.jsx)("table",{width:"100%",children:Object(Se.jsx)("tbody",{children:Object(Se.jsxs)("tr",{children:[Object(Se.jsx)("td",{className:t.titleCol,children:"Versioning:"}),Object(Se.jsx)("td",{children:ne?Object(Se.jsx)(k.a,{color:"primary",size:16,variant:"indeterminate"}):Object(Se.jsx)(a.Fragment,{children:Object(Se.jsx)(x.a,{color:"primary",className:t.anchorButton,onClick:function(){Ve(!0)},children:me?"Enabled":"Disabled"})})}),Object(Se.jsx)("td",{className:t.titleCol,children:"Quota:"}),Object(Se.jsx)("td",{children:re?Object(Se.jsx)(k.a,{color:"primary",size:16,variant:"indeterminate"}):Object(Se.jsx)(a.Fragment,{children:Object(Se.jsx)(x.a,{color:"primary",className:t.anchorButton,onClick:function(){Ue(!0)},children:ge?"Enabled":"Disabled"})})})]})})})]}),ge&&ke&&Object(Se.jsxs)(y.a,{item:!0,xs:3,className:t.reportedUsage,children:[Object(Se.jsxs)(y.a,{container:!0,direction:"row",alignItems:"center",children:[Object(Se.jsx)(y.a,{item:!0,className:t.icon,xs:2,children:Object(Se.jsx)(Aa.a,{})}),Object(Se.jsx)(y.a,{item:!0,xs:10,children:Object(Se.jsxs)(S.a,{className:t.elementTitle,children:[(Qe=null===ke||void 0===ke?void 0:ke.type,Qe?Qe[0].toUpperCase()+Qe.slice(1):null)," Quota"]})})]}),Object(Se.jsx)(S.a,{className:t.consumptionValue,children:oe("".concat(null===ke||void 0===ke?void 0:ke.quota))})]})]})}),Object(Se.jsx)("br",{}),Object(Se.jsx)("br",{})]}),N&&Object(Se.jsx)(w.a,{className:t.paperContainer,children:Object(Se.jsx)(y.a,{container:!0,children:Object(Se.jsxs)(y.a,{item:!0,xs:12,children:[Object(Se.jsx)("h2",{children:"Object Locking"}),Object(Se.jsx)("hr",{className:t.hrClass}),Object(Se.jsx)("table",{children:Object(Se.jsx)("tbody",{children:Object(Se.jsxs)("tr",{className:t.gridContainer,children:[Object(Se.jsx)("td",{className:t.titleCol,children:"Retention:"}),Object(Se.jsx)("td",{children:ne?Object(Se.jsx)(k.a,{color:"primary",size:16,variant:"indeterminate"}):Object(Se.jsx)(a.Fragment,{children:Object(Se.jsx)(x.a,{color:"primary",className:t.anchorButton,onClick:function(){De(!0)},children:"Configure"})})})]})})})]})})})]})}))),Fa=Object(o.b)(null,{setErrorSnackMessage:H})((function(e){var t=e.closeDeleteModalAndRefresh,n=e.deleteOpen,c=e.selectedBucket,i=e.bucketEvent,r=e.setErrorSnackMessage,o=Object(a.useState)(!1),s=Object(h.a)(o,2),l=s[0],d=s[1];return Object(Se.jsxs)(wn.a,{open:n,onClose:function(){t(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(Se.jsx)(Nn.a,{id:"alert-dialog-title",children:"Delete Event"}),Object(Se.jsxs)(Tn.a,{children:[l&&Object(Se.jsx)(C.a,{}),Object(Se.jsx)($n.a,{id:"alert-dialog-description",children:"Are you sure you want to delete this event?"})]}),Object(Se.jsxs)(Xn.a,{children:[Object(Se.jsx)(x.a,{onClick:function(){t(!1)},color:"primary",disabled:l,children:"Cancel"}),Object(Se.jsx)(x.a,{onClick:function(){!function(){if(!l&&null!=i){d(!0);var e=X()(i,"events",[]),n=X()(i,"prefix",""),a=X()(i,"suffix","");ye.invoke("DELETE","/api/v1/buckets/".concat(c,"/events/").concat(i.arn),{events:e,prefix:n,suffix:a}).then((function(e){d(!1),t(!0)})).catch((function(e){d(!1),r(e)}))}}()},color:"secondary",autoFocus:!0,children:"Delete"})]})]})})),Ma=n(655),Ra=n(656),Ba=n(657),Pa=n(658),za=n(654),Ka=n(679),Ua=Object(T.a)((function(e){return Object(N.a)(Object(m.a)({},tt))}));function Wa(e){var t=Ua();return Object(Se.jsx)(v.a,Object(m.a)({InputProps:{classes:t}},e))}var Ga=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({},Le),Fe))}))((function(e){var t=e.classes,n=e.id,i=e.name,r=e.onChange,o=e.options,s=e.label,l=e.tooltip,d=void 0===l?"":l,u=e.value,b=e.disabled,j=void 0!==b&&b,p=Object(a.useState)(o[0]),O=Object(h.a)(p,2),f=O[0],g=O[1];return Object(Se.jsx)(c.a.Fragment,{children:Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.fieldContainer,children:[""!==s&&Object(Se.jsxs)(fn.a,{htmlFor:n,className:t.inputLabel,children:[Object(Se.jsx)("span",{children:s}),""!==d&&Object(Se.jsx)("div",{className:t.tooltipContainer,children:Object(Se.jsx)(gn.a,{title:d,placement:"top-start",children:Object(Se.jsx)("div",{children:Object(Se.jsx)(xn,{className:t.tooltip})})})})]}),Object(Se.jsx)(Mn.a,{fullWidth:!0,children:Object(Se.jsx)(Ka.a,{id:n,options:o,getOptionLabel:function(e){return e.label},getOptionSelected:function(e){return e.value===u},disabled:j,renderInput:function(e){return Object(Se.jsx)(Wa,Object(m.a)(Object(m.a)({},e),{},{name:i}))},value:f,onChange:function(e,t){t&&(r(t.value),g(t))},autoHighlight:!0})})]})})})),qa=Object(o.b)(null,{setModalErrorSnackMessage:Q}),Va=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},buttonContainer:{textAlign:"right"}},De))}))(qa((function(e){var t=e.classes,n=e.open,c=e.selectedBucket,i=e.closeModalAndRefresh,r=e.setModalErrorSnackMessage,o=Object(a.useState)(!1),s=Object(h.a)(o,2),l=s[0],d=s[1],u=Object(a.useState)(""),b=Object(h.a)(u,2),j=b[0],m=b[1],p=Object(a.useState)(""),O=Object(h.a)(p,2),f=O[0],g=O[1],v=Object(a.useState)(""),S=Object(h.a)(v,2),k=S[0],w=S[1],N=Object(a.useState)([]),T=Object(h.a)(N,2),E=T[0],A=T[1],_=Object(a.useState)([]),I=Object(h.a)(_,2),L=I[0],D=I[1],F=Object(a.useCallback)((function(){d(!0),ye.invoke("GET","/api/v1/admin/arns").then((function(e){var t=[];null!==e.arns&&(t=e.arns),d(!1),D(t)})).catch((function(e){d(!1),r(e)}))}),[r]);Object(a.useEffect)((function(){F()}),[F]);var M=function(e,t){var n=E.indexOf(t),a=[];-1===n?a=a.concat(E,t):0===n?a=a.concat(E.slice(1)):n===E.length-1?a=a.concat(E.slice(0,-1)):n>0&&(a=a.concat(E.slice(0,n),E.slice(n+1))),A(a)},R=L.map((function(e){return{label:e,value:e}}));return Object(Se.jsx)(_n,{modalOpen:n,onClose:function(){i()},title:"Subscribe To Event",children:Object(Se.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),l||(d(!0),ye.invoke("POST","/api/v1/buckets/".concat(c,"/events"),{configuration:{arn:k,events:E,prefix:j,suffix:f},ignoreExisting:!0}).then((function(){d(!1),i()})).catch((function(e){d(!1),r(e)})))},children:Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.formScrollable,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Ga,{onChange:function(e){w(e)},id:"select-access-policy",name:"select-access-policy",label:"ARN",value:k,options:R})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsxs)(za.a,{size:"medium",children:[Object(Se.jsx)(Ma.a,{className:t.minTableHeader,children:Object(Se.jsxs)(Ra.a,{children:[Object(Se.jsx)(Ba.a,{children:"Select"}),Object(Se.jsx)(Ba.a,{children:"Event"})]})}),Object(Se.jsx)(Pa.a,{children:[{label:"PUT - Object Uploaded",value:"put"},{label:"GET - Object accessed",value:"get"},{label:"DELETE - Object Deleted",value:"delete"}].map((function(e){return Object(Se.jsxs)(Ra.a,{onClick:function(t){return M(0,e.value)},children:[Object(Se.jsx)(Ba.a,{padding:"checkbox",children:Object(Se.jsx)(Yt.a,{value:e.value,color:"primary",inputProps:{"aria-label":"secondary checkbox"},onChange:function(t){return M(0,e.value)},checked:E.includes(e.value)})}),Object(Se.jsx)(Ba.a,{className:t.wrapCell,children:e.label})]},"group-".concat(e.value))}))})]})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"prefix-input",name:"prefix-input",label:"Prefix",value:j,onChange:function(e){m(e.target.value)}})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"suffix-input",name:"suffix-input",label:"Suffix",value:f,onChange:function(e){g(e.target.value)}})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.buttonContainer,children:Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:l,children:"Save"})}),l&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(C.a,{})})]})})})}))),Ha=Object(o.b)((function(e){return{session:e.console.session}}),{setErrorSnackMessage:H}),Ya=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)({},Ke),ze),{},{actionsTray:Object(m.a)(Object(m.a)({},ze.actionsTray),{},{padding:"15px 0 0"})}))}))(Ha((function(e){var t=e.classes,n=e.match,c=e.setErrorSnackMessage,i=Object(a.useState)(!1),r=Object(h.a)(i,2),o=r[0],s=r[1],l=Object(a.useState)(!0),d=Object(h.a)(l,2),u=d[0],b=d[1],j=Object(a.useState)([]),m=Object(h.a)(j,2),p=m[0],O=m[1],f=Object(a.useState)(!1),g=Object(h.a)(f,2),S=g[0],C=g[1],k=Object(a.useState)(null),w=Object(h.a)(k,2),N=w[0],T=w[1],E=Object(a.useState)(""),A=Object(h.a)(E,2),_=A[0],I=A[1],L=n.params.bucketName;Object(a.useEffect)((function(){u&&ye.invoke("GET","/api/v1/buckets/".concat(L,"/events")).then((function(e){var t=X()(e,"events",[]);b(!1),O(t||[])})).catch((function(e){b(!1),c(e)}))}),[u,c,L]);var D=[{type:"delete",onClick:function(e){C(!0),T(e)}}],F=p.filter((function(e){return!!e.arn.toLowerCase().includes(_.toLowerCase())}));return Object(Se.jsxs)(a.Fragment,{children:[S&&Object(Se.jsx)(Fa,{deleteOpen:S,selectedBucket:L,bucketEvent:N,closeDeleteModalAndRefresh:function(e){C(!1),e&&b(!0)}}),o&&Object(Se.jsx)(Va,{open:o,selectedBucket:L,closeModalAndRefresh:function(){s(!1),b(!0)}}),Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(Se.jsx)(v.a,{placeholder:"Filter",className:t.searchField,id:"search-resource",label:"",onChange:function(e){I(e.target.value)},InputProps:{disableUnderline:!0,startAdornment:Object(Se.jsx)(lt.a,{position:"start",children:Object(Se.jsx)(ut.a,{})})}}),Object(Se.jsx)(x.a,{variant:"contained",color:"primary",startIcon:Object(Se.jsx)(ft,{}),size:"medium",onClick:function(){s(!0)},children:"Subscribe to Event"})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(kn,{itemActions:D,columns:[{label:"SQS",elementKey:"arn"},{label:"Events",elementKey:"events",renderFunction:function(e){return Object(Se.jsx)(a.Fragment,{children:e.join(", ")})}},{label:"Prefix",elementKey:"prefix"},{label:"Suffix",elementKey:"suffix"}],isLoading:u,records:F,entityName:"Events",idField:"id"})})]})]})}))),Qa=n(107),Za=n.n(Qa),Ja=n(316),$a=n.n(Ja),Xa=function(){return Object(Se.jsx)(pt.a,{viewBox:"0 0 12 12",children:Object(Se.jsx)("path",{fill:"#081c42",className:"a",d:"M-13160.269,1885.114h-3.235v-4.381h-4.382V1877.5h4.382v-4.381h3.235v4.381h4.383v3.238h-4.383v4.38Z",transform:"translate(13167.886 -1873.114)"})})},ec=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)({},Le),Fe),{},{inputWithBorder:{border:"1px solid #EAEAEA",padding:15,height:150,overflowY:"auto",position:"relative",marginTop:15},labelContainer:{display:"flex"},lineInputBoxes:{display:"flex"},queryDiv:{alignSelf:"center",margin:"0 4px",fontWeight:600}}))}))((function(e){var t=e.elements,n=e.name,i=e.label,r=e.tooltip,o=void 0===r?"":r,s=e.keyPlaceholder,l=void 0===s?"":s,d=e.valuePlaceholder,u=void 0===d?"":d,b=e.onChange,j=e.withBorder,m=void 0!==j&&j,p=e.classes,O=Object(a.useState)([""]),f=Object(h.a)(O,2),g=f[0],x=f[1],v=Object(a.useState)([""]),S=Object(h.a)(v,2),C=S[0],k=S[1],w=Object(a.createRef)();Object(a.useEffect)((function(){if(1===g.length&&""===g[0]&&1===C.length&&""===C[0]&&t&&""!==t){var e=t.split("&"),n=[],a=[];e.forEach((function(e){var t=e.split("=");2===t.length&&(n.push(t[0]),a.push(t[1]))})),n.push(""),a.push(""),x(n),k(a)}}),[g,C,t]),Object(a.useEffect)((function(){var e=w.current;e&&g.length>1&&e.scrollIntoView(!1)}),[g]);var N=Object(a.useRef)(!0);Object(a.useLayoutEffect)((function(){N.current?N.current=!1:A()}),[g,C]);var T=function(e){e.persist();var t=Object(st.a)(g);t[X()(e.target,"dataset.index",0)]=e.target.value,x(t)},E=function(e){e.persist();var t=Object(st.a)(C);t[X()(e.target,"dataset.index",0)]=e.target.value,k(t)},A=Za()((function(){var e="";g.forEach((function(t,n){if(g[n]&&C[n]){var a="".concat(t,"=").concat(C[n]);0!==n&&(a="&".concat(a)),e="".concat(e).concat(a)}})),b(e)}),500),_=C.map((function(e,t){return Object(Se.jsxs)(y.a,{item:!0,xs:12,className:p.lineInputBoxes,children:[Object(Se.jsx)(Dn,{id:"".concat(n,"-key-").concat(t.toString()),label:"",name:"".concat(n,"-").concat(t.toString()),value:g[t],onChange:T,index:t,placeholder:l}),Object(Se.jsx)("span",{className:p.queryDiv,children:":"}),Object(Se.jsx)(Dn,{id:"".concat(n,"-value-").concat(t.toString()),label:"",name:"".concat(n,"-").concat(t.toString()),value:C[t],onChange:E,index:t,placeholder:u,overlayIcon:t===C.length-1?Object(Se.jsx)(Xa,{}):null,overlayAction:function(){!function(){if(""!==g[g.length-1].trim()&&""!==C[C.length-1].trim()){var e=Object(st.a)(g),t=Object(st.a)(C);e.push(""),t.push(""),x(e),k(t)}}()}})]},"query-pair-".concat(n,"-").concat(t.toString()))}));return Object(Se.jsx)(c.a.Fragment,{children:Object(Se.jsxs)(y.a,{item:!0,xs:12,className:p.fieldContainer,children:[Object(Se.jsxs)(fn.a,{className:p.inputLabel,children:[Object(Se.jsx)("span",{children:i}),""!==o&&Object(Se.jsx)("div",{className:p.tooltipContainer,children:Object(Se.jsx)(gn.a,{title:o,placement:"top-start",children:Object(Se.jsx)($a.a,{className:p.tooltip})})})]}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:"".concat(m?p.inputWithBorder:""),children:[_,Object(Se.jsx)("div",{ref:w})]})]})})})),tc=Object(o.b)(null,{setModalErrorSnackMessage:Q}),nc=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},buttonContainer:{textAlign:"right"},multiContainer:{display:"flex",alignItems:"center",justifyContent:"flex-start"}},De))}))(tc((function(e){var t=e.open,n=e.closeModalAndRefresh,c=e.classes,i=e.bucketName,r=e.setModalErrorSnackMessage,o=Object(a.useState)(!1),s=Object(h.a)(o,2),l=s[0],d=s[1],u=Object(a.useState)(""),b=Object(h.a)(u,2),j=b[0],m=b[1],p=Object(a.useState)(""),O=Object(h.a)(p,2),f=O[0],g=O[1],v=Object(a.useState)(""),S=Object(h.a)(v,2),k=S[0],w=S[1],N=Object(a.useState)(""),T=Object(h.a)(N,2),E=T[0],A=T[1],_=Object(a.useState)(""),I=Object(h.a)(_,2),L=I[0],D=I[1],F=Object(a.useState)(""),M=Object(h.a)(F,2),R=M[0],B=M[1],P=Object(a.useState)(""),z=Object(h.a)(P,2),K=z[0],U=z[1],W=Object(a.useState)(!0),G=Object(h.a)(W,2),q=G[0],V=G[1],H=Object(a.useState)(!0),Y=Object(h.a)(H,2),Q=Y[0],Z=Y[1],J=Object(a.useState)(!0),$=Object(h.a)(J,2),ee=$[0],te=$[1],ne=Object(a.useState)(!0),ae=Object(h.a)(ne,2),ce=ae[0],ie=(ae[1],Object(a.useState)("")),re=Object(h.a)(ie,2),oe=re[0],se=re[1],le=Object(a.useState)("async"),de=Object(h.a)(le,2),ue=de[0],he=de[1],me=Object(a.useState)("100"),pe=Object(h.a)(me,2),Oe=pe[0],fe=pe[1],ge=Object(a.useState)("Gi"),xe=Object(h.a)(ge,2),ve=xe[0],Ce=xe[1],ke=Object(a.useState)("60"),we=Object(h.a)(ke,2),Ne=we[0],Te=we[1];return Object(Se.jsx)(_n,{modalOpen:t,onClose:function(){n()},title:"Set Bucket Replication",children:Object(Se.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),d(!0),function(){var e=[{originBucket:i,destinationBucket:R}],t=parseInt(Ne),a="".concat(q?"https://":"http://").concat(k),c={accessKey:j,secretKey:f,targetURL:a,region:K,bucketsRelation:e,syncMode:ue,bandwidth:"async"===ue?parseInt(je(Oe,ve,!0)):0,healthCheckPeriod:t,prefix:L,tags:oe,replicateDeleteMarkers:Q,replicateDeletes:ee,replicateMetadata:ce};ye.invoke("POST","api/v1/buckets-replication",c).then((function(e){d(!1);var t=X()(e,"replicationState",[]);if(t.length>0){var a=t[0];return d(!1),a.errorString&&""!==a.errorString?void r(a.errorString):void n()}r("No changes applied")})).catch((function(e){d(!1),r(e)}))}()},children:Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:c.formScrollable,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"targetURL",name:"targetURL",onChange:function(e){w(e.target.value)},placeholder:"play.min.io",label:"Target URL",value:k})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Zn,{checked:q,id:"useTLS",name:"useTLS",label:"Use TLS",onChange:function(e){V(e.target.checked)},value:"yes"})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"accessKey",name:"accessKey",onChange:function(e){m(e.target.value)},label:"Access Key",value:j})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"secretKey",name:"secretKey",onChange:function(e){g(e.target.value)},label:"Secret Key",value:f})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"targetBucket",name:"targetBucket",onChange:function(e){B(e.target.value)},label:"Target Bucket",value:R})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"region",name:"region",onChange:function(e){U(e.target.value)},label:"Region",value:K})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(zn,{id:"replication_mode",name:"replication_mode",onChange:function(e){he(e.target.value)},label:"Replication Mode",value:ue,options:[{label:"Asynchronous",value:"async"},{label:"Synchronous",value:"sync"}]})}),"async"===ue&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsxs)("div",{className:c.multiContainer,children:[Object(Se.jsx)("div",{children:Object(Se.jsx)(Dn,{type:"number",id:"bandwidth_scalar",name:"bandwidth_scalar",onChange:function(e){fe(e.target.value)},label:"Bandwidth",value:Oe,min:"0"})}),Object(Se.jsx)("div",{className:c.sizeFactorContainer,children:Object(Se.jsx)(zn,{label:"Unit",id:"bandwidth_unit",name:"bandwidth_unit",value:ve,onChange:function(e){Ce(e.target.value)},options:be()})})]})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"healthCheck",name:"healthCheck",onChange:function(e){Te(e.target.value)},label:"Health Check Duration",value:Ne})}),Object(Se.jsx)("h3",{children:"Object Filters"}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"prefix",name:"prefix",onChange:function(e){D(e.target.value)},placeholder:"prefix",label:"Prefix",value:L})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(ec,{name:"tags",label:"Tags",elements:"",onChange:function(e){se(e)},keyPlaceholder:"Tag Key",valuePlaceholder:"Tag Value",withBorder:!0})}),Object(Se.jsx)("h3",{children:"Storage Configuration"}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"storageClass",name:"storageClass",onChange:function(e){A(e.target.value)},placeholder:"STANDARD_IA,REDUCED_REDUNDANCY etc",label:"Storage Class",value:E})}),Object(Se.jsx)("h3",{children:"Replication Options"}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Zn,{checked:Q,id:"deleteMarker",name:"deleteMarker",label:"Delete Marker",onChange:function(e){console.log(e),console.log(e.target.checked),Z(e.target.checked)},value:Q,description:"Replicate soft deletes"})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Zn,{checked:ee,id:"repDelete",name:"repDelete",label:"Deletes",onChange:function(e){te(e.target.checked)},value:ee,description:"Replicate versioned deletes"})})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:c.buttonContainer,children:Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:l,children:"Save"})}),l&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(C.a,{})})]})})})}))),ac={setErrorSnackMessage:H},cc=Object(o.b)(null,ac)((function(e){var t=e.closeDeleteModalAndRefresh,n=e.deleteOpen,c=e.selectedBucket,i=e.ruleToDelete,r=e.setErrorSnackMessage,o=Object(a.useState)(!1),s=Object(h.a)(o,2),l=s[0],d=s[1];return Object(Se.jsxs)(wn.a,{open:n,onClose:function(){t(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(Se.jsx)(Nn.a,{id:"alert-dialog-title",children:"Delete Replication Rule"}),Object(Se.jsxs)(Tn.a,{children:[l&&Object(Se.jsx)(C.a,{}),Object(Se.jsxs)($n.a,{id:"alert-dialog-description",children:["Are you sure you want to delete replication rule ",Object(Se.jsx)("b",{children:i}),"? ",Object(Se.jsx)("br",{}),"Remember, at lease one rule must be present once replication has been enabled"]})]}),Object(Se.jsxs)(Xn.a,{children:[Object(Se.jsx)(x.a,{onClick:function(){t(!1)},color:"primary",disabled:l,children:"Cancel"}),Object(Se.jsx)(x.a,{onClick:function(){l||(d(!0),ye.invoke("DELETE","/api/v1/buckets/".concat(c,"/replication/").concat(i)).then((function(){d(!1),t(!0)})).catch((function(e){d(!1),r(e)})))},color:"secondary",autoFocus:!0,children:"Delete"})]})]})})),ic=n(62),rc=n.n(ic),oc=Object(o.b)((function(e){return{session:e.console.session}}),{setErrorSnackMessage:H}),sc=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)({},Ke),ze),{},{actionsTray:Object(m.a)(Object(m.a)({},ze.actionsTray),{},{padding:"15px 0 0"})}))}))(oc((function(e){var t=e.classes,n=e.match,c=e.setErrorSnackMessage,i=Object(a.useState)(!1),r=Object(h.a)(i,2),o=r[0],s=r[1],l=Object(a.useState)(!0),d=Object(h.a)(l,2),u=d[0],b=d[1],j=Object(a.useState)([]),m=Object(h.a)(j,2),p=m[0],O=m[1],f=Object(a.useState)(!0),g=Object(h.a)(f,2),S=g[0],C=g[1],k=Object(a.useState)(!1),w=Object(h.a)(k,2),N=w[0],T=w[1],E=Object(a.useState)(!1),A=Object(h.a)(E,2),_=A[0],I=A[1],L=Object(a.useState)(!1),D=Object(h.a)(L,2),F=D[0],M=D[1],R=Object(a.useState)(""),B=Object(h.a)(R,2),P=B[0],z=B[1],K=Object(a.useState)(""),U=Object(h.a)(K,2),W=U[0],G=U[1],q=n.params.bucketName;if(Object(a.useEffect)((function(){S&&ye.invoke("POST","/api/v1/has-permission",{actions:[{id:"PutReplicationConfiguration",action:"s3:PutReplicationConfiguration",bucket_name:q},{id:"GetReplicationConfiguration",action:"s3:GetReplicationConfiguration",bucket_name:q}]}).then((function(e){if(C(!1),e.permissions){var t=e.permissions?e.permissions:[],n=t.find((function(e){return"PutReplicationConfiguration"===e.id}));n&&n.can?s(!0):s(!1);var a=t.find((function(e){return"GetReplicationConfiguration"===e.id}));a&&a.can?T(!0):T(!1),C(!1)}})).catch((function(e){C(!1),c(e)}))}),[q,S,c]),Object(a.useEffect)((function(){u&&ye.invoke("GET","/api/v1/buckets/".concat(q,"/replication")).then((function(e){var t=e.rules?e.rules:[];O(t),b(!1)})).catch((function(e){c(e),b(!1)}))}),[u,c,q]),!N)return null;var V=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];M(e)},H=[{type:"delete",onClick:function(e){z(e.id),I(!0)},disableButtonFunction:function(){return p.length>1}}],Y=p.filter((function(e){return""===W||!!(e.prefix&&e.prefix.toLowerCase().includes(W.toLowerCase())||e.tags&&e.tags.toLowerCase().includes(W.toLowerCase())||e.destination&&e.destination.bucket.toLowerCase().includes(W.toLowerCase()))}));return Object(Se.jsxs)(a.Fragment,{children:[F&&Object(Se.jsx)(nc,{closeModalAndRefresh:function(){V(!1),b(!0)},open:F,bucketName:q}),_&&Object(Se.jsx)(cc,{deleteOpen:_,selectedBucket:q,closeDeleteModalAndRefresh:function(e){I(!1),e&&b(!0)},ruleToDelete:P}),Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(Se.jsx)(v.a,{placeholder:"Filter",className:t.searchField,id:"search-resource",label:"",onChange:function(e){G(e.target.value)},InputProps:{disableUnderline:!0,startAdornment:Object(Se.jsx)(lt.a,{position:"start",children:Object(Se.jsx)(ut.a,{})})}}),Object(Se.jsx)(Vt.a,{color:"primary","aria-label":"Refresh Replication Rules",component:"span",onClick:function(){b(!0)},children:Object(Se.jsx)(rc.a,{})}),o&&Object(Se.jsx)(x.a,{variant:"contained",color:"primary",startIcon:Object(Se.jsx)(ft,{}),size:"medium",onClick:function(){V(!0)},children:"Add Replication Rule"})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(kn,{itemActions:H,columns:[{label:"Priority",elementKey:"priority"},{label:"Destination",elementKey:"destination",renderFunction:function(e){return Object(Se.jsx)(a.Fragment,{children:e.bucket.replace("arn:aws:s3:::","")})}},{label:"Prefix",elementKey:"prefix"},{label:"Tags",elementKey:"tags",renderFunction:function(e){return Object(Se.jsx)(a.Fragment,{children:e&&""!==e.tags?"Yes":"No"})}},{label:"Status",elementKey:"status"}],isLoading:u,records:Y,entityName:"Replication Rules",idField:"id"})})]})]})}))),lc={setModalErrorSnackMessage:Q},dc=Object(o.b)(null,lc),uc=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({strongText:{fontWeight:700},keyName:{marginLeft:5},buttonContainer:{textAlign:"right"}},De))}))(dc((function(e){var t=e.classes,n=e.closeModalAndRefresh,i=e.selectedBucket,r=e.lifecycle,o=e.open,s=e.setModalErrorSnackMessage,l=Object(a.useState)(!1),d=Object(h.a)(l,2),u=d[0],b=d[1],j=Object(a.useState)(""),m=Object(h.a)(j,2),p=m[0],O=m[1],f=Object(a.useState)(!1),g=Object(h.a)(f,2),v=g[0],S=g[1];Object(a.useEffect)((function(){if("Enabled"===r.status&&S(!0),r.tags){var e=r.tags.reduce((function(e,t,n){return"".concat(e).concat(0!==n?"&":"").concat(t.key,"=").concat(t.value)}),"");O(e)}}),[r]);return Object(Se.jsxs)(_n,{onClose:function(){n(!1)},modalOpen:o,title:"Edit Lifecycle Configuration",children:[Object(Se.jsx)("div",{className:t.floatingEnabled,children:Object(Se.jsx)(Zn,{indicatorLabels:["Enabled","Disabled"],checked:v,value:"user_enabled",id:"user-status",name:"user-status",onChange:function(e){S(e.target.checked)},switchOnly:!0})}),Object(Se.jsx)(c.a.Fragment,{children:Object(Se.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),u||(b(!0),null!==i&&null!==r&&ye.invoke("PUT","/api/v1/buckets/".concat(i,"/lifecycle/").concat(r.id),{disable:!v,tags:p}).then((function(e){b(!1),n(!0)})).catch((function(e){b(!1),s(e)})))},children:Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.formScrollable,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"id",name:"id",label:"Id",value:r.id,onChange:function(){},disabled:!0})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(ec,{name:"tags",label:"Tags",elements:p,onChange:function(e){O(e)},keyPlaceholder:"Tag Key",valuePlaceholder:"Tag Value",withBorder:!0})})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.buttonContainer,children:Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:u,children:"Save"})}),u&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(C.a,{})})]})})})]})}))),bc=[{value:"01",label:"January"},{value:"02",label:"February"},{value:"03",label:"March"},{value:"04",label:"April"},{value:"05",label:"May"},{value:"06",label:"June"},{value:"07",label:"July"},{value:"08",label:"August"},{value:"09",label:"September"},{value:"10",label:"October"},{value:"11",label:"November"},{value:"12",label:"December"}],jc=Array.from(Array(31),(function(e,t){return t+1})),hc=(new Date).getFullYear(),mc=Array.from(Array(25),(function(e,t){return t+hc})),pc=Object(E.a)((function(e){return Object(N.a)({root:{"& .MuiSelect-icon":{color:"#000","&.Mui-disabled":{color:"#9c9c9c"}}},input:{borderBottom:0,fontSize:12}})}))(Fn.a),Oc=Object(a.forwardRef)((function(e,t){var n=e.classes,c=e.id,i=e.label,r=e.disableOptions,o=void 0!==r&&r,s=e.addSwitch,l=void 0!==s&&s,d=e.tooltip,u=void 0===d?"":d,b=e.borderBottom,j=void 0!==b&&b,m=e.onDateChange,p=e.value,O=void 0===p?"":p;Object(a.useImperativeHandle)(t,(function(){return{resetDate:F}}));var f=Object(a.useState)(!1),g=Object(h.a)(f,2),x=g[0],v=g[1],S=Object(a.useState)(""),C=Object(h.a)(S,2),k=C[0],w=C[1],N=Object(a.useState)(""),T=Object(h.a)(N,2),E=T[0],A=T[1],_=Object(a.useState)(""),I=Object(h.a)(_,2),L=I[0],D=I[1];Object(a.useEffect)((function(){if(""!==O){var e=O.split("-");D(e[0]),w(e[1]),A("".concat(parseInt(e[2])))}}),[O]),Object(a.useEffect)((function(){var e=function(e,t,n){var a=Date.parse("".concat(e,"-").concat(t,"-").concat(n));if(isNaN(a))return[!1,""];var c=parseInt(t),i=parseInt(n),r=c<10?"0".concat(c):c,o=i<10?"0".concat(i):i,s=new Date(a).toISOString().split("T")[0],l="".concat(e,"-").concat(r,"-").concat(o);return[s===l,l]}(L,k,E),t=Object(h.a)(e,2),n=t[0],a=t[1];m(a,n)}),[k,E,L,m]);var F=function(){w(""),A(""),D("")},M=function(){return o||!!l&&!x};return Object(Se.jsxs)(y.a,{item:!0,xs:12,className:Object(Te.a)(n.fieldContainer,Object(Ne.a)({},n.fieldContainerBorder,j)),children:[Object(Se.jsx)("div",{className:n.labelContainer,children:Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsxs)(fn.a,{htmlFor:c,className:n.inputLabel,children:[Object(Se.jsx)("span",{children:i}),""!==u&&Object(Se.jsx)("div",{className:n.tooltipContainer,children:Object(Se.jsx)(gn.a,{title:u,placement:"top-start",children:Object(Se.jsx)("div",{children:Object(Se.jsx)(xn,{className:n.tooltip})})})})]}),l&&Object(Se.jsx)(Zn,{indicatorLabels:["Specific Date","Default (7 Days)"],checked:x,value:"date_enabled",id:"date-status",name:"date-status",onChange:function(e){v(e.target.checked),e.target.checked||m("",!0)},switchOnly:!0})]})}),Object(Se.jsxs)("div",{children:[Object(Se.jsx)(Mn.a,{disabled:M(),className:n.dateInput,children:Object(Se.jsxs)(Rn.a,{id:"".concat(c,"-month"),name:"".concat(c,"-month"),value:k,displayEmpty:!0,onChange:function(e){w(e.target.value)},input:Object(Se.jsx)(pc,{}),children:[Object(Se.jsx)(Bn.a,{value:"",disabled:!0,children:"<Month>"}),bc.map((function(e){return Object(Se.jsx)(Bn.a,{value:e.value,children:e.label},"select-".concat(c,"-monthOP-").concat(e.label))}))]})}),Object(Se.jsx)(Mn.a,{disabled:M(),className:n.dateInput,children:Object(Se.jsxs)(Rn.a,{id:"".concat(c,"-day"),name:"".concat(c,"-day"),value:E,displayEmpty:!0,onChange:function(e){A(e.target.value)},input:Object(Se.jsx)(pc,{}),children:[Object(Se.jsx)(Bn.a,{value:"",disabled:!0,children:"<Day>"}),jc.map((function(e){return Object(Se.jsx)(Bn.a,{value:e,children:e},"select-".concat(c,"-dayOP-").concat(e))}))]})}),Object(Se.jsx)(Mn.a,{disabled:M(),className:n.dateInput,children:Object(Se.jsxs)(Rn.a,{id:"".concat(c,"-year"),name:"".concat(c,"-year"),value:L,displayEmpty:!0,onChange:function(e){D(e.target.value)},input:Object(Se.jsx)(pc,{}),children:[Object(Se.jsx)(Bn.a,{value:"",disabled:!0,children:"<Year>"}),mc.map((function(e){return Object(Se.jsx)(Bn.a,{value:e,children:e},"select-".concat(c,"-yearOP-").concat(e))}))]})})]})]})})),fc=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)({dateInput:{"&:not(:last-child)":{marginRight:22}}},Le),Fe),{},{labelContainer:{flex:1},fieldContainer:Object(m.a)(Object(m.a)({},Le.fieldContainer),{},{display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:10,marginTop:11,marginBottom:6}),fieldContainerBorder:{borderBottom:"#9c9c9c 1px solid",marginBottom:20}}))}))(Oc),gc=Object(o.b)(null,{setModalErrorSnackMessage:Q}),xc=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},buttonContainer:{textAlign:"right"}},De))}))(gc((function(e){var t=e.open,n=e.closeModalAndRefresh,c=e.classes,i=e.bucketName,r=e.setModalErrorSnackMessage,o=Object(a.useState)(!0),s=Object(h.a)(o,2),l=s[0],d=s[1],u=Object(a.useState)([]),b=Object(h.a)(u,2),j=b[0],p=b[1],O=Object(a.useState)(!1),f=Object(h.a)(O,2),g=f[0],v=f[1],S=Object(a.useState)(""),k=Object(h.a)(S,2),w=k[0],N=k[1],T=Object(a.useState)(""),E=Object(h.a)(T,2),A=E[0],_=E[1],I=Object(a.useState)(""),L=Object(h.a)(I,2),D=L[0],F=L[1],M=Object(a.useState)(""),R=Object(h.a)(M,2),B=R[0],P=R[1],z=Object(a.useState)(!1),K=Object(h.a)(z,2),U=K[0],W=K[1],G=Object(a.useState)("0"),q=Object(h.a)(G,2),V=q[0],H=q[1],Y=Object(a.useState)("0"),Q=Object(h.a)(Y,2),Z=Q[0],J=Q[1],$=Object(a.useState)("expiry"),ee=Object(h.a)($,2),te=ee[0],ne=ee[1],ae=Object(a.useState)("date"),ce=Object(h.a)(ae,2),ie=ce[0],re=ce[1],oe=Object(a.useState)("0"),se=Object(h.a)(oe,2),le=se[0],de=se[1],ue=Object(a.useState)(""),be=Object(h.a)(ue,2),je=be[0],he=be[1],me=Object(a.useState)("0"),pe=Object(h.a)(me,2),Oe=pe[0],fe=pe[1],ge=Object(a.useState)(""),xe=Object(h.a)(ge,2),ve=xe[0],Ce=xe[1],ke=Object(a.useState)("date"),we=Object(h.a)(ke,2),Ne=we[0],Te=we[1],Ee=Object(a.useState)(!1),Ae=Object(h.a)(Ee,2),_e=Ae[0],Ie=Ae[1];Object(a.useEffect)((function(){l&&ye.invoke("GET","/api/v1/admin/tiers").then((function(e){var t=X()(e,"items",[]);if(null!==t&&t.length>=1){var n=t.map((function(e){var t=e.type,n=X()(e,"".concat(t,".name"),"");return{label:n,value:n}}));p(n),n.length>0&&F(n[0].value)}d(!1)})).catch((function(e){d(!1)}))}),[l]),Object(a.useEffect)((function(){var e=!0;"expiry"===te?("date"===ie&&""===je&&(e=!1),"days"===ie&&parseInt(le)<1&&(e=!1)):("date"===Ne&&""===ve&&(e=!1),"days"===Ne&&parseInt(Oe)<1&&(e=!1),""===D&&(e=!1)),Ie(e)}),[te,ie,je,le,Ne,ve,Oe,D]);return Object(Se.jsxs)(_n,{modalOpen:t,onClose:function(){n(!1)},title:"Add Lifecycle Rule",children:[l&&Object(Se.jsx)(y.a,{container:!0,className:c.loadingBox,children:Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(C.a,{})})}),!l&&Object(Se.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),v(!0),function(){var e={};if("expiry"===te){var t={};t="date"===ie?{expiry_date:"".concat(je,"T23:59:59Z")}:{expiry_days:parseInt(le)},e=Object(m.a)(Object(m.a)({},t),{},{noncurrentversion_expiration_days:parseInt(V)})}else{var a={};a="date"===Ne?{transition_date:"".concat(ve,"T23:59:59Z")}:{transition_days:parseInt(Oe)},e=Object(m.a)(Object(m.a)({},a),{},{noncurrentversion_transition_days:parseInt(Z),noncurrentversion_transition_storage_class:B,storage_class:D})}var c=Object(m.a)({prefix:w,tags:A,expired_object_delete_marker:U},e);ye.invoke("POST","/api/v1/buckets/".concat(i,"/lifecycle"),c).then((function(){v(!1),n(!0)})).catch((function(e){v(!1),r(e)}))}()},children:Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:c.formScrollable,children:[Object(Se.jsx)("h3",{children:"Lifecycle Configuration"}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Vn,{currentSelection:te,id:"quota_type",name:"quota_type",label:"ILM Rule",onChange:function(e){ne(e.target.value)},selectorOptions:[{value:"expiry",label:"Expiry"},{value:"transition",label:"Transition"}]})}),"expiry"===te?Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Vn,{currentSelection:ie,id:"expiryType",name:"expiryType",label:"Expiry Type",onChange:function(e){re(e.target.value)},selectorOptions:[{value:"date",label:"Date"},{value:"days",label:"Days"}]})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:"date"===ie?Object(Se.jsx)(fc,{id:"expiry_date",label:"Expiry Date",value:je,borderBottom:!0,onDateChange:function(e,t){t&&he(e)}}):Object(Se.jsx)(Dn,{type:"number",id:"expiry_days",name:"expiry_days",onChange:function(e){de(e.target.value)},label:"Expiry Days",value:le,min:"0"})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{type:"number",id:"noncurrentversion_expiration_days",name:"noncurrentversion_expiration_days",onChange:function(e){H(e.target.value)},label:"Non-current Expiration Days",value:V,min:"0"})})]}):Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Vn,{currentSelection:Ne,id:"transitionType",name:"transitionType",label:"Transition Type",onChange:function(e){Te(e.target.value)},selectorOptions:[{value:"date",label:"Date"},{value:"days",label:"Days"}]})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:"date"===Ne?Object(Se.jsx)(fc,{id:"transition_date",label:"Transition Date",value:ve,borderBottom:!0,onDateChange:function(e,t){t&&Ce(e)}}):Object(Se.jsx)(Dn,{type:"number",id:"transition_days",name:"transition_days",onChange:function(e){fe(e.target.value)},label:"Transition Days",value:Oe,min:"0"})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{type:"number",id:"noncurrentversion_transition_days",name:"noncurrentversion_transition_days",onChange:function(e){J(e.target.value)},label:"Non-current Transition Days",value:Z,min:"0"})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"noncurrentversion_t_SC",name:"noncurrentversion_t_SC",onChange:function(e){P(e.target.value)},placeholder:"Set Non-current Version Transition Storage Class",label:"Non-current Version Transition Storage Class",value:B})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(zn,{label:"Storage Class",id:"storage_class",name:"storage_class",value:D,onChange:function(e){F(e.target.value)},options:j})})]}),Object(Se.jsx)("h3",{children:"File Configuration"}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"prefix",name:"prefix",onChange:function(e){N(e.target.value)},label:"Prefix",value:w})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(ec,{name:"tags",label:"Tags",elements:"",onChange:function(e){_(e)},keyPlaceholder:"Tag Key",valuePlaceholder:"Tag Value",withBorder:!0})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Zn,{value:"expired_delete_marker",id:"expired_delete_marker",name:"expired_delete_marker",checked:U,onChange:function(e){W(e.target.checked)},label:"Expired Object Delete Marker",indicatorLabels:["On","Off"]})})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:c.buttonContainer,children:Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:g||!_e,children:"Save"})}),g&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(C.a,{})})]})})]})}))),vc=Object(o.b)((function(e){return{session:e.console.session}}),{setErrorSnackMessage:H}),yc=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)({},Ke),ze),{},{actionsTray:Object(m.a)(Object(m.a)({},ze.actionsTray),{},{padding:"15px 0 0"})}))}))(vc((function(e){var t=e.classes,n=e.match,c=(e.setErrorSnackMessage,Object(a.useState)(!0)),i=Object(h.a)(c,2),r=i[0],o=i[1],s=Object(a.useState)([]),l=Object(h.a)(s,2),d=l[0],u=l[1],b=Object(a.useState)(!1),j=Object(h.a)(b,2),m=j[0],p=j[1],O=Object(a.useState)(!1),f=Object(h.a)(O,2),g=f[0],S=f[1],C=Object(a.useState)(""),k=Object(h.a)(C,2),w=k[0],N=k[1],T=n.params.bucketName;Object(a.useEffect)((function(){r&&ye.invoke("GET","/api/v1/buckets/".concat(T,"/lifecycle")).then((function(e){var t=X()(e,"lifecycle",[]);u(t||[]),o(!1)})).catch((function(e){console.error(e),o(!1)}))}),[r,o,T]);var E=[{label:"ID",elementKey:"id"},{label:"Prefix",elementKey:"prefix"},{label:"Status",elementKey:"status"},{label:"Expiration",elementKey:"expiration",renderFunction:function(e){return e.days?"".concat(e.days," day").concat(e.days>1?"s":""):"0001-01-01T00:00:00Z"===e.date?"":Object(Se.jsx)(mt.a,{children:e.date})}},{label:"Transition",elementKey:"transition",renderFunction:function(e){return e.days?"".concat(e.days," day").concat(e.days>1?"s":""):"0001-01-01T00:00:00Z"===e.date?"":Object(Se.jsx)(mt.a,{children:e.date})}},{label:"Storage Class",elementKey:"storage_class",renderFunction:function(e){return X()(e,"transition.storage_class","")},renderFullObject:!0}],A=d.filter((function(e){return!!e.id.toLocaleLowerCase().includes(w.toLowerCase())}));return Object(Se.jsxs)(a.Fragment,{children:[g&&Object(Se.jsx)(uc,{open:g,closeModalAndRefresh:function(e){S(!1),e&&o(!0)},selectedBucket:T,lifecycle:{id:""}}),m&&Object(Se.jsx)(xc,{open:m,bucketName:T,closeModalAndRefresh:function(e){p(!1),e&&o(!0)}}),Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(Se.jsx)(v.a,{placeholder:"Filter",className:t.searchField,id:"search-resource",label:"",onChange:function(e){N(e.target.value)},InputProps:{disableUnderline:!0,startAdornment:Object(Se.jsx)(lt.a,{position:"start",children:Object(Se.jsx)(ut.a,{})})}}),Object(Se.jsx)(x.a,{variant:"contained",color:"primary",startIcon:Object(Se.jsx)(ft,{}),size:"medium",onClick:function(){p(!0)},children:"Add Lifecycle Rule"})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(kn,{itemActions:[],columns:E,isLoading:r,records:A,entityName:"Lifecycle",customEmptyMessage:"There are no Lifecycle rules yet",idField:"id"})})]})]})})));function Sc(e){return{id:"simple-tab-".concat(e),"aria-controls":"simple-tabpanel-".concat(e)}}var Cc=Object(o.b)((function(e){return{session:e.console.session,selectedTab:e.buckets.bucketDetails.selectedTab,distributedSetup:e.system.distributedSetup}}),{setErrorSnackMessage:H,setBucketDetailsTab:function(e){return{type:Wt,tab:e}}}),kc=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)(Object(m.a)(Object(m.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},noRecords:{lineHeight:"24px",textAlign:"center",padding:"20px"},gridWrapper:{width:320},gridContainer:{display:"grid",gridTemplateColumns:"auto auto",gridGap:8,justifyContent:"flex-start",alignItems:"center","& div:not(.MuiCircularProgress-root)":{display:"flex",alignItems:"center"},"& div:nth-child(odd)":{justifyContent:"flex-end",fontWeight:700},"& div:nth-child(2n)":{minWidth:150}},masterActions:{width:"25%",minWidth:"120px","& div":{margin:"5px 0px"}},headerContainer:{display:"flex",justifyContent:"space-between"},capitalizeFirst:{textTransform:"capitalize"},doubleElement:{display:"flex",justifyContent:"space-between"},encCheckbox:{margin:0,padding:0},tabPan:{marginTop:"5px"},fixedHeight:{height:165,minWidth:247,padding:"25px 28px","& svg":{maxHeight:18}},routerContainer:{marginTop:5},titleCol:{fontWeight:"bold"}},Ke),ze),{},{actionsTray:Object(m.a)(Object(m.a)({},ze.actionsTray),{},{padding:"15px 0 0"})},Xe),$e),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(Cc((function(e){var t=e.classes,n=e.match,c=e.history,i=e.selectedTab,r=e.setErrorSnackMessage,o=e.setBucketDetailsTab,l=e.distributedSetup,d=Object(a.useState)(!0),u=Object(h.a)(d,2),b=u[0],j=u[1],p=Object(a.useState)(!1),O=Object(h.a)(p,2),f=O[0],g=O[1],x=n.params.bucketName;Object(a.useEffect)((function(){var e=n.params?n.params[0]:"summary";e||(e="");var t=e.split("/");i!==t[0]&&o(t[0])}),[n,x,o,i]),Object(a.useEffect)((function(){b&&ye.invoke("POST","/api/v1/has-permission",{actions:[{id:"GetReplicationConfiguration",action:"s3:GetReplicationConfiguration",bucket_name:x}]}).then((function(e){if(j(!1),e.permissions){var t=(e.permissions?e.permissions:[]).find((function(e){return"GetReplicationConfiguration"===e.id}));t&&t.can?g(!0):g(!1),j(!1)}})).catch((function(e){j(!1),r(e)}))}),[x,b,r]);return Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(na,{label:"Bucket > ".concat(n.params.bucketName)}),Object(Se.jsxs)(y.a,{container:!0,className:t.container,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsxs)(ja.a,{value:""!==i?i:"summary",onChange:function(e,t){!function(e){var t="/buckets/".concat(x);switch(e){case"events":t+="/events";break;case"replication":t+="/replication";break;case"lifecycle":t+="/lifecycle";break;case"access":t+="/access";break;default:t+="/summary"}o(e),c.push(t)}(t)},indicatorColor:"primary",textColor:"primary","aria-label":"cluster-tabs",variant:"scrollable",scrollButtons:"auto",children:[Object(Se.jsx)(ha.a,Object(m.a)({value:"summary",label:"Summary"},Sc(0))),Object(Se.jsx)(ha.a,Object(m.a)({value:"events",label:"Events"},Sc(1))),Object(Se.jsx)(ha.a,Object(m.a)(Object(m.a)({value:"replication",label:"Replication"},Sc(2)),{},{disabled:!f||!l})),Object(Se.jsx)(ha.a,Object(m.a)(Object(m.a)({value:"lifecycle",label:"Lifecycle"},Sc(3)),{},{disabled:!l})),Object(Se.jsx)(ha.a,Object(m.a)({value:"access",label:"Access"},Sc(4)))]})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.routerContainer,children:Object(Se.jsx)(s.c,{history:c,children:Object(Se.jsxs)(s.d,{children:[Object(Se.jsx)(s.b,{path:"/buckets/:bucketName/summary",component:Da}),Object(Se.jsx)(s.b,{path:"/buckets/:bucketName/events",component:Ya}),l&&Object(Se.jsx)(s.b,{path:"/buckets/:bucketName/replication",component:sc}),l&&Object(Se.jsx)(s.b,{path:"/buckets/:bucketName/lifecycle",component:yc}),Object(Se.jsx)(s.b,{path:"/buckets/:bucketName/access",component:xa}),Object(Se.jsx)(s.b,{path:"/buckets/:bucketName",component:function(){return Object(Se.jsx)(s.a,{to:"/buckets/".concat(x,"/summary")})}})]})})})})]})]})}))),wc=Object(o.b)((function(e){return{open:e.system.sidebarOpen}}),{setMenuOpen:W}),Nc=Object(s.h)(wc((function(){return Object(Se.jsx)(s.c,{history:j,children:Object(Se.jsxs)(s.d,{children:[Object(Se.jsx)(s.b,{path:"/buckets/:bucketName/*",component:kc}),Object(Se.jsx)(s.b,{path:"/buckets/:bucketName",component:kc}),Object(Se.jsx)(s.b,{path:"/",component:ba}),Object(Se.jsx)(s.b,{component:ot})]})})}))),Tc=n(317);n(455);n(456);var Ec,Ac=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({},Le))}))((function(e){var t=e.value,n=e.label,a=void 0===n?"":n,i=e.tooltip,r=void 0===i?"":i,o=e.mode,s=void 0===o?"javascript":o,l=e.classes,d=e.onChange,u=void 0===d?function(){}:d,b=e.onBeforeChange,j=e.readOnly,h=void 0!==j&&j;return Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsxs)(fn.a,{className:l.inputLabel,children:[Object(Se.jsx)("span",{children:a}),""!==r&&Object(Se.jsx)("div",{className:l.tooltipContainer,children:Object(Se.jsx)(gn.a,{title:r,placement:"top-start",children:Object(Se.jsx)("div",{children:Object(Se.jsx)(xn,{className:l.tooltip})})})})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Tc.Controlled,{value:t,options:{mode:s,lineNumbers:!0,readOnly:h},onBeforeChange:b,onChange:u})})]})})),_c={setModalErrorSnackMessage:Q},Ic=Object(o.b)(null,_c),Lc=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({jsonPolicyEditor:{minHeight:400,width:"100%"},buttonContainer:{textAlign:"right"}},De),Le))}))(Ic((function(e){var t=e.classes,n=e.open,c=e.closeModalAndRefresh,i=e.policyEdit,r=e.setModalErrorSnackMessage,o=Object(a.useState)(!1),s=Object(h.a)(o,2),l=s[0],d=s[1],u=Object(a.useState)(""),b=Object(h.a)(u,2),j=b[0],m=b[1],p=Object(a.useState)(""),O=Object(h.a)(p,2),f=O[0],g=O[1];Object(a.useEffect)((function(){i&&(m(i.name),g(i?JSON.stringify(JSON.parse(i.policy),null,4):""))}),[i]);var v=""!==j.trim();return Object(Se.jsx)(_n,{modalOpen:n,onClose:function(){c(!1)},title:"".concat(i?"Info":"Create"," Policy"),children:Object(Se.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),l||(d(!0),ye.invoke("POST","/api/v1/policies",{name:j,policy:f}).then((function(e){d(!1),c(!0)})).catch((function(e){d(!1),r(e)})))},children:Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.formScrollable,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"policy-name",name:"policy-name",label:"Policy Name",placeholder:"Enter Policy Name",onChange:function(e){m(e.target.value)},value:j,disabled:!!i})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsx)(Ac,{label:"".concat(i?"Edit":"Write"," Policy"),value:f,onBeforeChange:function(e,t,n){g(n)}})]}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.buttonContainer,children:[!i&&Object(Se.jsx)("button",{type:"button",color:"primary",className:t.clearButton,onClick:function(){m(""),g("")},children:"Clear"}),Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:l||!v,children:"Save"})]}),l&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(C.a,{})})]})})})}))),Dc={setErrorSnackMessage:H},Fc=Object(o.b)(null,Dc)((function(e){var t=e.closeDeleteModalAndRefresh,n=e.deleteOpen,c=e.selectedPolicy,i=e.setErrorSnackMessage,r=Object(a.useState)(!1),o=Object(h.a)(r,2),s=o[0],l=o[1];return Object(Se.jsxs)(wn.a,{open:n,onClose:function(){t(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(Se.jsx)(Nn.a,{id:"alert-dialog-title",children:"Delete Policy"}),Object(Se.jsxs)(Tn.a,{children:[s&&Object(Se.jsx)(C.a,{}),Object(Se.jsxs)($n.a,{id:"alert-dialog-description",children:["Are you sure you want to delete policy ",Object(Se.jsx)("b",{children:c}),"?."]})]}),Object(Se.jsxs)(Xn.a,{children:[Object(Se.jsx)(x.a,{onClick:function(){t(!1)},color:"primary",disabled:s,children:"Cancel"}),Object(Se.jsx)(x.a,{onClick:function(){s||(l(!0),ye.invoke("DELETE","/api/v1/policy?name=".concat(c)).then((function(e){l(!1),t(!0)})).catch((function(e){l(!1),i(e)})))},color:"secondary",autoFocus:!0,children:"Delete"})]})]})})),Mc={setErrorSnackMessage:H},Rc=Object(o.b)(null,Mc),Bc=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}}},ze),Ke),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(Rc((function(e){var t=e.classes,n=e.setErrorSnackMessage,i=Object(a.useState)([]),r=Object(h.a)(i,2),o=r[0],s=r[1],l=Object(a.useState)(!1),d=Object(h.a)(l,2),u=d[0],b=d[1],m=Object(a.useState)(!1),p=Object(h.a)(m,2),O=p[0],f=p[1],g=Object(a.useState)(!1),S=Object(h.a)(g,2),C=S[0],k=S[1],w=Object(a.useState)(""),N=Object(h.a)(w,2),T=N[0],E=N[1],A=Object(a.useState)(""),_=Object(h.a)(A,2),I=_[0],L=_[1],D=Object(a.useState)(null),F=Object(h.a)(D,2),M=F[0],R=F[1];Object(a.useEffect)((function(){B()}),[]),Object(a.useEffect)((function(){u&&ye.invoke("GET","/api/v1/policies").then((function(e){var t=X()(e,"policies",[]);t.sort((function(e,t){return e.name>t.name?1:e.name<t.name?-1:0})),b(!1),s(t)})).catch((function(e){b(!1),n(e)}))}),[u,b,s,n]);var B=function(){b(!0)},P=[{type:"view",onClick:function(e){j.push("/policies/".concat(e.name))}},{type:"delete",onClick:function(e){k(!0),E(e)},sendOnlyId:!0}],z=o.filter((function(e){return e.name.includes(I)}));return Object(Se.jsxs)(c.a.Fragment,{children:[O&&Object(Se.jsx)(Lc,{open:O,closeModalAndRefresh:function(e){f(!1),e&&B()},policyEdit:M}),C&&Object(Se.jsx)(Fc,{deleteOpen:C,selectedPolicy:T,closeDeleteModalAndRefresh:function(e){k(!1),e&&B()}}),Object(Se.jsx)(na,{label:"IAM Policies"}),Object(Se.jsx)(y.a,{container:!0,children:Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.container,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(Se.jsx)(v.a,{placeholder:"Search Policies",className:t.searchField,id:"search-resource",label:"",onChange:function(e){L(e.target.value)},InputProps:{disableUnderline:!0,startAdornment:Object(Se.jsx)(lt.a,{position:"start",children:Object(Se.jsx)(ut.a,{})})}}),Object(Se.jsx)(x.a,{variant:"contained",color:"primary",startIcon:Object(Se.jsx)(ft,{}),onClick:function(){f(!0),R(null)},children:"Create Policy"})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(kn,{itemActions:P,columns:[{label:"Name",elementKey:"name"}],isLoading:u,records:z,entityName:"Policies",idField:"name"})})]})})]})}))),Pc=Object(o.b)(null,{setErrorSnackMessage:H}),zc=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)(Object(m.a)({buttonContainer:{textAlign:"right"},multiContainer:{display:"flex",alignItems:"center",justifyContent:"flex-start"},sizeFactorContainer:{marginLeft:8},containerHeader:{display:"flex",justifyContent:"space-between"},paperContainer:{padding:"15px 15px 15px 50px"},infoGrid:{display:"grid",gridTemplateColumns:"auto auto auto auto",gridGap:8,"& div":{display:"flex",alignItems:"center"},"& div:nth-child(odd)":{justifyContent:"flex-end",fontWeight:700},"& div:nth-child(2n)":{paddingRight:35}},masterActions:{width:"25%",minWidth:"120px","& div":{margin:"5px 0px"}},updateButton:{backgroundColor:"transparent",border:0,padding:"0 6px",cursor:"pointer","&:focus, &:active":{outline:"none"},"& svg":{height:12}},noUnderLine:{textDecoration:"none"},poolLabel:{color:"#666666"},licenseContainer:{position:"relative",padding:"20px 52px 0px 28px",background:"#032F51",boxShadow:"0px 3px 7px #00000014","& h2":{color:"#FFF",marginBottom:67},"& a":{textDecoration:"none"},"& h3":{color:"#FFFFFF",marginBottom:"30px",fontWeight:"bold"},"& h6":{color:"#FFFFFF !important"}},licenseInfo:{color:"#FFFFFF",position:"relative"},licenseInfoTitle:{textTransform:"none",color:"#BFBFBF",fontSize:11},licenseInfoValue:{textTransform:"none",fontSize:14,fontWeight:"bold"},verifiedIcon:{width:96,position:"absolute",right:0,bottom:29},breadcrumLink:{textDecoration:"none",color:"black"}},ze),Ke),De),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(Pc((function(e){var t=e.classes,n=e.match,i=e.closeModalAndRefresh,r=e.setErrorSnackMessage,o=Object(a.useState)(0),s=Object(h.a)(o,2),l=s[0],d=s[1],u=Object(a.useState)(null),b=Object(h.a)(u,2),m=b[0],p=b[1],O=Object(a.useState)([]),f=Object(h.a)(O,2),g=f[0],S=f[1],k=Object(a.useState)([]),N=Object(h.a)(k,2),T=N[0],E=N[1],A=Object(a.useState)(!1),_=Object(h.a)(A,2),I=_[0],L=_[1],D=Object(a.useState)(n.params.policyName),F=Object(h.a)(D,2),M=F[0],R=F[1],B=Object(a.useState)(""),P=Object(h.a)(B,2),z=P[0],K=P[1],U=Object(a.useState)(!0),W=Object(h.a)(U,2),G=W[0],q=W[1],V=Object(a.useState)(""),H=Object(h.a)(V,2),Y=H[0],Q=H[1],Z=Object(a.useState)(!0),J=Object(h.a)(Z,2),$=J[0],X=J[1],ee=Object(a.useState)(""),te=Object(h.a)(ee,2),ne=te[0],ae=te[1],ce=Object(a.useState)(!0),ie=Object(h.a)(ce,2),re=ie[0],oe=ie[1];Object(a.useEffect)((function(){G&&(G&&ye.invoke("GET","/api/v1/policy?name=".concat(M)).then((function(e){e&&(p(e),K(e?JSON.stringify(JSON.parse(e.policy),null,4):"")),q(!1)})).catch((function(e){r(e),q(!1)})),$&&ye.invoke("GET","/api/v1/policies/".concat(M,"/users")).then((function(e){S(e),X(!1)})).catch((function(e){r(e),X(!1)})),re&&ye.invoke("GET","/api/v1/policies/".concat(M,"/groups")).then((function(e){E(e),oe(!1)})).catch((function(e){r(e),oe(!1)})))}),[M,G,$,re,r,S,E,K,p,X,oe]);var se=""!==M.trim(),le=[{type:"view",onClick:function(e){j.push("/users/".concat(e))}}],de=g.filter((function(e){return e.includes(Y)})),ue=T.filter((function(e){return e.includes(ne)}));return Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsx)(na,{label:Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(nn.a,{to:"/policies",className:t.breadcrumLink,children:"Policy"})," > ".concat(n.params.policyName)]})}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.container,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsxs)(ja.a,{value:l,indicatorColor:"primary",textColor:"primary",onChange:function(e,t){d(t)},"aria-label":"policy-tabs",children:[Object(Se.jsx)(ha.a,{label:"Details"}),Object(Se.jsx)(ha.a,{label:"Users"}),Object(Se.jsx)(ha.a,{label:"Groups"})]})}),0===l&&Object(Se.jsx)(w.a,{className:t.paperContainer,children:Object(Se.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),I||(L(!0),ye.invoke("POST","/api/v1/policies",{name:M,policy:z}).then((function(e){L(!1),i(!0)})).catch((function(e){L(!1),r(e)})))},children:Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.formScrollable,children:Object(Se.jsx)(Ac,{label:"".concat(m?"Edit":"Write"," Policy"),value:z,onBeforeChange:function(e,t,n){K(n)}})}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.buttonContainer,children:[!m&&Object(Se.jsx)("button",{type:"button",color:"primary",className:t.clearButton,onClick:function(){R(""),K("")},children:"Clear"}),Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:I||!se,children:"Save"})]}),I&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(C.a,{})})]})})}),1===l&&Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.actionsTray,children:Object(Se.jsx)(v.a,{placeholder:"Search Users",className:t.searchField,id:"search-resource",label:"",onChange:function(e){Q(e.target.value)},InputProps:{disableUnderline:!0,startAdornment:Object(Se.jsx)(lt.a,{position:"start",children:Object(Se.jsx)(ut.a,{})})}})}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.actionsTray,children:Object(Se.jsx)("br",{})}),Object(Se.jsx)(kn,{itemActions:le,columns:[{label:"Name",elementKey:"name"}],isLoading:$,records:de,entityName:"Users",idField:"name"})]}),2===l&&Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.actionsTray,children:Object(Se.jsx)(v.a,{placeholder:"Search Groups",className:t.searchField,id:"search-resource",label:"",onChange:function(e){ae(e.target.value)},InputProps:{disableUnderline:!0,startAdornment:Object(Se.jsx)(lt.a,{position:"start",children:Object(Se.jsx)(ut.a,{})})}})}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.actionsTray,children:Object(Se.jsx)("br",{})}),Object(Se.jsx)(kn,{itemActions:[],columns:[{label:"Name",elementKey:"name"}],isLoading:re,records:ue,entityName:"Groups",idField:"name"})]})]})]})}))),Kc=Object(o.b)((function(e){return{open:e.system.sidebarOpen}}),{setMenuOpen:W}),Uc=Object(s.h)(Kc((function(){return Object(Se.jsx)(s.c,{history:j,children:Object(Se.jsxs)(s.d,{children:[Object(Se.jsx)(s.b,{path:"/policies/:policyName",component:zc}),Object(Se.jsx)(s.b,{path:"/",component:Bc}),Object(Se.jsx)(s.b,{component:ot})]})})}))),Wc=n(207),Gc=n.n(Wc);!function(e){e.singleValue="singleValue",e.linearGraph="linearGraph",e.barChart="barChart",e.pieChart="pieChart",e.singleRep="singleRep"}(Ec||(Ec={}));var qc="dashboardConfig",Vc=[{w:1,h:2,x:0,y:0,i:"panel-0",minW:1,moved:!1,static:!1},{w:1,h:1,x:1,y:2,i:"panel-1",minW:1,moved:!1,static:!1},{w:1,h:1,x:1,y:3,i:"panel-2",minW:1,moved:!1,static:!1},{w:1,h:2,x:2,y:0,i:"panel-3",minW:1,moved:!1,static:!1},{w:4,h:2,x:4,y:2,i:"panel-4",minW:2,moved:!1,static:!1},{w:4,h:2,x:4,y:0,i:"panel-5",minW:2,moved:!1,static:!1},{w:1,h:1,x:0,y:2,i:"panel-6",minW:1,moved:!1,static:!1},{w:1,h:1,x:0,y:3,i:"panel-7",minW:1,moved:!1,static:!1},{w:1,h:1,x:2,y:2,i:"panel-8",minW:1,moved:!1,static:!1},{w:1,h:1,x:2,y:3,i:"panel-9",minW:1,moved:!1,static:!1},{w:4,h:3,x:0,y:4,i:"panel-10",minW:2,moved:!1,static:!1},{w:1,h:1,x:3,y:0,i:"panel-11",minW:1,moved:!1,static:!1},{w:1,h:1,x:3,y:1,i:"panel-12",minW:1,moved:!1,static:!1},{w:4,h:3,x:0,y:10,i:"panel-13",minW:2,moved:!1,static:!1},{w:4,h:3,x:0,y:4,i:"panel-14",minW:2,moved:!1,static:!1},{w:4,h:3,x:4,y:4,i:"panel-15",minW:2,moved:!1,static:!1},{w:8,h:3,x:0,y:7,i:"panel-16",minW:2,moved:!1,static:!1},{w:8,h:3,x:0,y:19,i:"panel-19",minW:2,moved:!1,static:!1},{w:1,h:1,x:3,y:2,i:"panel-20",minW:1,moved:!1,static:!1},{w:1,h:1,x:3,y:3,i:"panel-21",minW:1,moved:!1,static:!1},{w:4,h:3,x:4,y:4,i:"panel-22",minW:2,moved:!1,static:!1},{w:4,h:3,x:4,y:10,i:"panel-23",minW:2,moved:!1,static:!1},{w:4,h:3,x:0,y:13,i:"panel-24",minW:2,moved:!1,static:!1},{w:4,h:3,x:4,y:13,i:"panel-25",minW:2,moved:!1,static:!1},{w:4,h:3,x:0,y:16,i:"panel-26",minW:2,moved:!1,static:!1},{w:4,h:3,x:4,y:16,i:"panel-27",minW:2,moved:!1,static:!1},{w:1,h:1,x:1,y:0,i:"panel-28",minW:1,moved:!1,static:!1},{w:1,h:1,x:1,y:1,i:"panel-29",minW:1,moved:!1,static:!1}],Hc=["#6992B7","#E2AD17","#22B573","#F7655E","#0071BC","#F9E6C5","#A6E8C4","#F4CECE","#ADD5E0"],Yc=function(e){return Oe(e,"ns")},Qc=function(e){return parseInt(e).toString(10)},Zc=[{id:1,title:"Uptime",data:"N/A",type:Ec.singleValue,layoutIdentifier:"panel-0",labelDisplayFunction:Oe},{id:9,title:"Total Online Disks",data:"N/A",type:Ec.singleValue,layoutIdentifier:"panel-1"},{id:78,title:"Total Offline Disks",data:"N/A",type:Ec.singleValue,layoutIdentifier:"panel-2"},{id:50,title:"Current Usable Capacity",data:[],dataOuter:[{name:"outer",value:100}],widgetConfiguration:{outerChart:{colorList:["#9c9c9c"],innerRadius:51,outerRadius:54,startAngle:-15,endAngle:195},innerChart:{colorList:Hc,innerRadius:35,outerRadius:50,startAngle:-15,endAngle:195}},type:Ec.pieChart,layoutIdentifier:"panel-3",innerLabel:"N/A",labelDisplayFunction:oe},{id:68,title:"Data Usage Growth",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Ec.linearGraph,layoutIdentifier:"panel-4",yAxisFormatter:oe,xAxisFormatter:ge},{id:52,title:"Object size distribution",data:[],widgetConfiguration:[{dataKey:"a",color:Hc[0],background:{fill:"rgba(0,0,0,0.1)"}}],customStructure:[{originTag:"LESS_THAN_1024_B",displayTag:"Less than 1024B"},{originTag:"BETWEEN_1024_B_AND_1_MB",displayTag:"Between 1024B and 1MB"},{originTag:"BETWEEN_1_MB_AND_10_MB",displayTag:"Between 1MB and 10MB"},{originTag:"BETWEEN_10_MB_AND_64_MB",displayTag:"Between 10MB and 64MB"},{originTag:"BETWEEN_64_MB_AND_128_MB",displayTag:"Between 64MB and 128MB"},{originTag:"BETWEEN_128_MB_AND_512_MB",displayTag:"Between 128MB and 512MB"},{originTag:"GREATER_THAN_512_MB",displayTag:"Greater than 512MB"}],type:Ec.barChart,layoutIdentifier:"panel-5"},{id:53,title:"Total Online Servers",data:"N/A",type:Ec.singleValue,layoutIdentifier:"panel-6"},{id:69,title:"Total Offline Servers",data:"N/A",type:Ec.singleValue,layoutIdentifier:"panel-7"},{id:66,title:"Number of Buckets",data:[],innerLabel:"N/A",type:Ec.singleRep,color:"#0071BC",fillColor:"#ADD5E0",layoutIdentifier:"panel-8"},{id:44,title:"Number of Objects",data:[],innerLabel:"N/A",type:Ec.singleRep,color:"#0071BC",fillColor:"#ADD5E0",layoutIdentifier:"panel-9"},{id:63,title:"S3 API Data Received Rate",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Ec.linearGraph,layoutIdentifier:"panel-10",xAxisFormatter:ge,yAxisFormatter:oe},{id:61,title:"Total Open FDs",data:[],innerLabel:"N/A",type:Ec.singleRep,layoutIdentifier:"panel-11",color:"#22B573",fillColor:"#A6E8C4"},{id:62,title:"Total Goroutines",data:[],innerLabel:"N/A",type:Ec.singleRep,layoutIdentifier:"panel-12",color:"#F7655E",fillColor:"#F4CECE"},{id:77,title:"Node CPU Usage",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Ec.linearGraph,layoutIdentifier:"panel-13",yAxisFormatter:Qc,xAxisFormatter:ge},{id:60,title:"S3 API Request Rate",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Ec.linearGraph,layoutIdentifier:"panel-14",xAxisFormatter:ge},{id:70,title:"S3 API Data Sent Rate",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Ec.linearGraph,layoutIdentifier:"panel-15",xAxisFormatter:ge,yAxisFormatter:oe},{id:17,title:"Internode Data Transfer",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Ec.linearGraph,layoutIdentifier:"panel-16",yAxisFormatter:oe,xAxisFormatter:ge},{id:73,title:"Node IO",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Ec.linearGraph,layoutIdentifier:"panel-19",yAxisFormatter:oe,xAxisFormatter:ge},{id:80,title:"Time Since Last Heal Activity",data:"N/A",type:Ec.singleValue,layoutIdentifier:"panel-20",labelDisplayFunction:Yc},{id:81,title:"Time Since Last Scan Activity",data:"N/A",type:Ec.singleValue,layoutIdentifier:"panel-21",labelDisplayFunction:Yc},{id:71,title:"S3 API Request Error Rate",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Ec.linearGraph,layoutIdentifier:"panel-22",xAxisFormatter:ge},{id:76,title:"Node Memory Usage",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Ec.linearGraph,layoutIdentifier:"panel-23",xAxisFormatter:ge,yAxisFormatter:oe},{id:74,title:"Drive Used Capacity",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Ec.linearGraph,layoutIdentifier:"panel-24",xAxisFormatter:ge,yAxisFormatter:oe},{id:82,title:"Drives Free Inodes",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Ec.linearGraph,layoutIdentifier:"panel-25",disableYAxis:!0,xAxisFormatter:ge},{id:11,title:"Node Syscalls",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Ec.linearGraph,layoutIdentifier:"panel-26",yAxisFormatter:Qc,xAxisFormatter:ge},{id:8,title:"Node File Descriptors",data:[],widgetConfiguration:[{dataKey:"",keyLabel:"",lineColor:"#000",fillColor:"#000"}],type:Ec.linearGraph,layoutIdentifier:"panel-27",yAxisFormatter:Qc,xAxisFormatter:ge},{id:65,title:"Total S3 Traffic Inbound",data:"N/A",type:Ec.singleValue,layoutIdentifier:"panel-28",labelDisplayFunction:oe},{id:64,title:"Total S3 Traffic Outbound",data:"N/A",type:Ec.singleValue,layoutIdentifier:"panel-29",labelDisplayFunction:oe}],Jc=function(e,t){if(0===e.length)return["","0"];switch(t){case"mean":var n=e.reduce((function(e,t){return e+parseFloat(t[1])}),0);return["",Math.floor(n/e.length).toString()];default:var a=e.sort((function(e,t){return e[0]-t[0]}));return a[a.length-1]}},$c=function(e,t){if(!e)return t;var n=e.type;switch(t.type){case Ec.singleValue:if("stat"===n||"singlestat"===n){var a=X()(e,"targets[0].result[0].values",[]);null===a&&(a=[]);var c=X()(e,"options.reduceOptions.calcs[0]","lastNotNull"),i=Jc(a,c),r=t.labelDisplayFunction?t.labelDisplayFunction(i[1]):i[1];return Object(m.a)(Object(m.a)({},t),{},{data:r})}break;case Ec.pieChart:if("gauge"===n){var o=X()(e,"targets[0].result",[]);null===o&&(o=[]);var s=X()(e,"options.reduceOptions.calcs[0]","lastNotNull"),l=o.length>0?o[0].values:[],d=Jc(l,s),u=o.map((function(e){var t=X()(e,"values",[]),n=Object.keys(e.metric),a=t.sort((function(e,t){return e[0]-t[0]})),c=e.metric[n[0]],i=a[a.length-1];return{name:c,value:parseInt(i)}})),b=t.labelDisplayFunction?t.labelDisplayFunction(d[1]):d[1];return Object(m.a)(Object(m.a)({},t),{},{data:u,innerLabel:b})}break;case Ec.linearGraph:if("graph"===n){var j=X()(e,"targets",[]);null===j&&(j=[]);var h=[],p=[];j.forEach((function(e,t){var n=X()(e,"result",[]),a=e.legendFormat;null===n&&(n=[]),n.forEach((function(e){var n=function(e,t){var n=Object.keys(e),a=new RegExp("{{(".concat(n.join("|"),")}}"),"g"),c=t.replace(a,(function(t){var n=t.replace(/({{|}})/g,"");return e[n]})),i=(c.match(/{{/g)||[]).length,r=(c.match(/}}/g)||[]).length,o=c.replace(/{{(.*?)}}/g,"");return i===r&&0!==i&&0!==r&&(n.forEach((function(t){c=c.replace(t,e[t])})),o=c),o}(e.metric,a),c="key_".concat(t).concat(n);h.push({dataKey:c,keyLabel:n,lineColor:"",fillColor:""});var i=X()(e,"values",[]);null===i&&(i=[]),i.forEach((function(e){var t=p.findIndex((function(t){return t.name===e[0]}));if(-1===t){var n={name:e[0]};n[c]=e[1],p.push(n)}else p[t][c]=e[1]}))}))}));var O=h.sort((function(e,t){return e.keyLabel<t.keyLabel?-1:e.keyLabel>t.keyLabel?1:0})).map((function(e,t){return Object(m.a)(Object(m.a)({},e),{},{lineColor:Hc[t]||ve(e.keyLabel),fillColor:Hc[t]||ve(e.keyLabel)})})),f=p.sort((function(e,t){return e.name-t.name}));return Object(m.a)(Object(m.a)({},t),{},{widgetConfiguration:O,data:f})}break;case Ec.barChart:if("bargauge"===n){var g=X()(e,"targets[0].result",[]);null===g&&(g=[]);var x=function(e,t){return e[0]-t[0]},v=[];return v=t.customStructure?t.customStructure.map((function(e){var t=g.find((function(t){var n=Object.keys(t.metric);return t.metric[n[0]]===e.originTag})),n=X()(t,"values",[]).sort(x),a=n[n.length-1]||["","0"];return{name:e.displayTag,a:parseInt(a[1])}})):g.map((function(e){var t=Object.keys(e.metric),n=e.metric[t[0]],a=X()(e,"values",[]).sort(x),c=a[a.length-1]||["","0"];return{name:n,a:parseInt(c[1])}})),Object(m.a)(Object(m.a)({},t),{},{data:v})}break;case Ec.singleRep:if("stat"===n){var y=X()(e,"targets[0].result[0].values",[]);null===y&&(y=[]);var S=X()(e,"options.reduceOptions.calcs[0]","lastNotNull"),C=Jc(y,S),k=y.sort((function(e,t){return e[0]-t[0]})),w=[];1===k.length&&w.push({value:0}),k.forEach((function(e){w.push({value:parseInt(e[1])})}));var N=t.labelDisplayFunction?t.labelDisplayFunction(C[1]):C[1];return Object(m.a)(Object(m.a)({},t),{},{data:w,innerLabel:N})}}return t},Xc=function(e){localStorage.setItem(qc,btoa(JSON.stringify(e)))},ei=Object(o.b)(null,{displayErrorMessage:H}),ti=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({},Ye),{},{contentContainer:Object(m.a)(Object(m.a)({},Ye.contentContainer),{},{fontWeight:700,color:"#072045",fontSize:18,textAlign:"center"}),loadingAlign:{width:"100%",paddingTop:"15px",textAlign:"center",margin:"auto"}}))}))(ei((function(e){var t=e.title,n=e.panelItem,c=e.timeStart,i=e.timeEnd,r=e.propLoading,o=e.displayErrorMessage,s=e.classes,l=e.apiPrefix,d=Object(a.useState)(!0),u=Object(h.a)(d,2),b=u[0],j=u[1],m=Object(a.useState)(""),p=Object(h.a)(m,2),O=p[0],f=p[1];return Object(a.useEffect)((function(){r&&j(!0)}),[r]),Object(a.useEffect)((function(){if(b){var e=0;if(null!==c&&null!==i){var t=i.unix()-c.unix(),a=Math.floor(t/60);e=a<1?15:a}ye.invoke("GET","/api/v1/".concat(l,"/info/widgets/").concat(n.id,"/?step=").concat(e,"&").concat(null!==c?"&start=".concat(c.unix()):"").concat(null!==c&&null!==i?"&":"").concat(null!==i?"end=".concat(i.unix()):"")).then((function(e){var t=$c(e,n);f(t.data),j(!1)})).catch((function(e){o(e),j(!1)}))}}),[b,n,i,c,o,l]),Object(Se.jsxs)("div",{className:s.singleValueContainer,children:[Object(Se.jsx)("div",{className:s.titleContainer,children:t}),b&&Object(Se.jsx)("div",{className:s.loadingAlign,children:Object(Se.jsx)(k.a,{})}),!b&&Object(Se.jsx)("div",{className:s.contentContainer,children:O})]})}))),ni=n(46),ai=n(659),ci=n(660),ii=n(664),ri=n(200),oi=n(201),si=n(330),li=n(164),di=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({},Qe))}))((function(e){var t=e.active,n=e.payload,a=e.label,c=e.linearConfiguration,i=e.yAxisFormatter,r=e.classes;return t?Object(Se.jsxs)("div",{className:r.customTooltip,children:[Object(Se.jsx)("div",{className:r.timeStampTitle,children:ge(a,!0)}),n&&n.map((function(e,t){return Object(Se.jsxs)("div",{className:r.labelContainer,children:[Object(Se.jsx)("div",{className:r.labelColor,style:{backgroundColor:c[t].lineColor}}),Object(Se.jsx)("div",{className:r.itemValue,children:Object(Se.jsxs)("span",{className:r.valueContainer,children:[c[t].keyLabel,":"," ",i(e.value)]})})]},"lbPl-".concat(t,"-").concat(c[t].keyLabel))}))]}):null})),ui=Object(o.b)(null,{displayErrorMessage:H}),bi=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({},Ye),{},{containerElements:{display:"flex",flexDirection:"column",height:"calc(100% - 18px)"},chartCont:{position:"relative",flexGrow:1,minHeight:"65%",height:1},legendChart:{display:"flex",flexWrap:"wrap",flex:"0 1 auto",maxHeight:"35%",margin:0,overflowY:"auto",position:"relative",textAlign:"center"},loadingAlign:{margin:"auto"}}))}))(ui((function(e){var t=e.classes,n=e.title,i=e.displayErrorMessage,r=e.timeStart,o=e.timeEnd,s=e.propLoading,l=e.panelItem,d=e.apiPrefix,u=e.hideYAxis,b=void 0!==u&&u,j=e.yAxisFormatter,m=void 0===j?function(e){return e}:j,p=e.xAxisFormatter,O=void 0===p?function(e){return e}:p,f=e.panelWidth,g=void 0===f?0:f,x=Object(a.useState)(!0),v=Object(h.a)(x,2),y=v[0],S=v[1],C=Object(a.useState)([]),w=Object(h.a)(C,2),N=w[0],T=w[1],E=Object(a.useState)(0),A=Object(h.a)(E,2),_=A[0],I=A[1],L=Object(a.useState)(null),D=Object(h.a)(L,2),F=D[0],M=D[1];Object(a.useEffect)((function(){s&&S(!0)}),[s]),Object(a.useEffect)((function(){if(y){var e=0;if(null!==r&&null!==o){var t=o.unix()-r.unix(),n=Math.floor(t/60);e=n<1?15:n}ye.invoke("GET","/api/v1/".concat(d,"/info/widgets/").concat(l.id,"/?step=").concat(e,"&").concat(null!==r?"&start=".concat(r.unix()):"").concat(null!==r&&null!==o?"&":"").concat(null!==o?"end=".concat(o.unix()):"")).then((function(e){var t=$c(e,l);T(t.data),M(t),S(!1);var n,a=0,c=Object(ni.a)(t.data);try{for(c.s();!(n=c.n()).done;){var i=n.value;for(var r in i)if("name"!==r){var o=parseInt(i[r]);a<o&&(a=o)}}}catch(s){c.e(s)}finally{c.f()}I(a)})).catch((function(e){i(e),S(!1)}))}}),[y,l,o,r,i,d]);var R=5;0!==g&&(R=g>400?5:g>350?10:g>300?15:g>250?20:30);var B=F?null===F||void 0===F?void 0:F.widgetConfiguration:[];return Object(Se.jsxs)("div",{className:t.singleValueContainer,children:[Object(Se.jsx)("div",{className:t.titleContainer,children:n}),Object(Se.jsxs)("div",{className:t.containerElements,children:[y&&Object(Se.jsx)(k.a,{className:t.loadingAlign}),!y&&Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsx)("div",{className:t.chartCont,children:Object(Se.jsx)(ai.a,{children:Object(Se.jsxs)(ci.a,{data:N,margin:{top:5,right:20,left:b?20:5,bottom:0},children:[Object(Se.jsx)(ii.a,{strokeDasharray:"3 3",strokeWidth:1,strokeOpacity:.5}),Object(Se.jsx)(ri.a,{dataKey:"name",tickFormatter:function(e){return O(e)},interval:R,tick:{fontSize:"70%"},tickCount:10}),Object(Se.jsx)(oi.a,{type:"number",domain:[0,1.1*_],hide:b,tickFormatter:function(e){return m(e)},tick:{fontSize:"70%"}}),B.map((function(e,t){return Object(Se.jsx)(si.a,{type:"monotone",dataKey:e.dataKey,stroke:e.lineColor,fill:e.fillColor,fillOpacity:.3},"area-".concat(e.dataKey,"-").concat(t.toString()))})),Object(Se.jsx)(li.a,{content:Object(Se.jsx)(di,{linearConfiguration:B,yAxisFormatter:m}),wrapperStyle:{zIndex:5e3}})]})})}),Object(Se.jsx)("div",{className:t.legendChart,children:B.map((function(e,n){return Object(Se.jsxs)("div",{className:t.singleLegendContainer,children:[Object(Se.jsx)("div",{className:t.colorContainer,style:{backgroundColor:e.lineColor}}),Object(Se.jsx)("div",{className:t.legendLabel,children:e.keyLabel})]},"legend-".concat(e.keyLabel,"-").concat(n.toString()))}))})]})]})]})}))),ji=n(665),hi=n(361),mi=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({},Qe))}))((function(e){var t=e.active,n=e.payload,a=e.label,c=e.barChartConfiguration,i=e.classes;return t?Object(Se.jsxs)("div",{className:i.customTooltip,children:[Object(Se.jsx)("div",{className:i.timeStampTitle,children:a}),n&&n.map((function(e,t){return Object(Se.jsxs)("div",{className:i.labelContainer,children:[Object(Se.jsx)("div",{className:i.labelColor,style:{backgroundColor:c[t].color}}),Object(Se.jsx)("div",{className:i.itemValue,children:Object(Se.jsx)("span",{className:i.valueContainer,children:e.value})})]},"pltiem-".concat(t,"-").concat(a))}))]}):null})),pi=function(e){var t=e.x,n=e.y,a=e.payload;return Object(Se.jsx)("text",{width:50,fontSize:"63%",textAnchor:"end",fill:"#333",transform:"translate(".concat(t,",").concat(n,")"),dy:3,children:a.value})},Oi=Object(o.b)(null,{displayErrorMessage:H}),fi=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({},Ye),{},{loadingAlign:{width:"100%",paddingTop:"15px",textAlign:"center",margin:"auto"}}))}))(Oi((function(e){var t=e.classes,n=e.title,c=e.panelItem,i=e.timeStart,r=e.timeEnd,o=e.propLoading,s=e.displayErrorMessage,l=e.apiPrefix,d=Object(a.useState)(!0),u=Object(h.a)(d,2),b=u[0],j=u[1],m=Object(a.useState)([]),p=Object(h.a)(m,2),O=p[0],f=p[1],g=Object(a.useState)(null),x=Object(h.a)(g,2),v=x[0],y=x[1];Object(a.useEffect)((function(){o&&j(!0)}),[o]),Object(a.useEffect)((function(){if(b){var e=0;if(null!==i&&null!==r){var t=r.unix()-i.unix(),n=Math.floor(t/60);e=n<1?15:n}ye.invoke("GET","/api/v1/".concat(l,"/info/widgets/").concat(c.id,"/?step=").concat(e,"&").concat(null!==i?"&start=".concat(i.unix()):"").concat(null!==i&&null!==r?"&":"").concat(null!==r?"end=".concat(r.unix()):"")).then((function(e){var t=$c(e,c);f(t.data),y(t),j(!1)})).catch((function(e){s(e),j(!1)}))}}),[b,c,r,i,s,l]);var S=v?v.widgetConfiguration:[];return Object(Se.jsxs)("div",{className:t.singleValueContainer,children:[Object(Se.jsx)("div",{className:t.titleContainer,children:n}),b&&Object(Se.jsx)("div",{className:t.loadingAlign,children:Object(Se.jsx)(k.a,{})}),!b&&Object(Se.jsx)("div",{className:t.contentContainer,children:Object(Se.jsx)(ai.a,{children:Object(Se.jsxs)(ji.a,{data:O,layout:"vertical",barCategoryGap:1,children:[Object(Se.jsx)(ri.a,{type:"number",hide:!0}),Object(Se.jsx)(oi.a,{dataKey:"name",type:"category",interval:0,tick:Object(Se.jsx)(pi,{}),tickLine:!1,axisLine:!1,width:150}),S.map((function(e){return Object(Se.jsx)(hi.a,{dataKey:e.dataKey,fill:e.color,background:e.background},"bar-".concat(e.dataKey))})),Object(Se.jsx)(li.a,{cursor:{fill:"rgba(255, 255, 255, 0.3)"},content:Object(Se.jsx)(mi,{barChartConfiguration:S})})]})})})]})}))),gi=n(681),xi=n(332),vi=n(202),yi=Object(o.b)(null,{displayErrorMessage:H}),Si=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({},Ye),{},{loadingAlign:{width:"100%",paddingTop:"15px",textAlign:"center",margin:"auto"}}))}))(yi((function(e){var t=e.classes,n=e.title,c=e.panelItem,i=e.timeStart,r=e.timeEnd,o=e.propLoading,s=e.displayErrorMessage,l=e.apiPrefix,d=Object(a.useState)(!0),u=Object(h.a)(d,2),b=u[0],j=u[1],m=Object(a.useState)([]),p=Object(h.a)(m,2),O=p[0],f=p[1],g=Object(a.useState)([]),x=Object(h.a)(g,2),v=x[0],y=x[1],S=Object(a.useState)(null),C=Object(h.a)(S,2),w=C[0],N=C[1];Object(a.useEffect)((function(){o&&j(!0)}),[o]),Object(a.useEffect)((function(){if(b){var e=0;if(null!==i&&null!==r){var t=r.unix()-i.unix(),n=Math.floor(t/60);e=n<1?15:n}ye.invoke("GET","/api/v1/".concat(l,"/info/widgets/").concat(c.id,"/?step=").concat(e,"&").concat(null!==i?"&start=".concat(i.unix()):"").concat(null!==i&&null!==r?"&":"").concat(null!==r?"end=".concat(r.unix()):"")).then((function(e){var t=$c(e,c);f(t.data),y(t.dataOuter),N(t),j(!1)})).catch((function(e){s(e),j(!1)}))}}),[b,c,r,i,s,l]);var T=w?w.widgetConfiguration:[],E=null===w||void 0===w?void 0:w.innerLabel,A=X()(T,"innerChart.colorList",[]),_=X()(T,"outerChart.colorList",[]);return Object(Se.jsxs)("div",{className:t.singleValueContainer,children:[Object(Se.jsx)("div",{className:t.titleContainer,children:n}),b&&Object(Se.jsx)("div",{className:t.loadingAlign,children:Object(Se.jsx)(k.a,{})}),!b&&Object(Se.jsx)("div",{className:t.contentContainer,children:Object(Se.jsx)(ai.a,{children:Object(Se.jsxs)(gi.a,{margin:{top:5,bottom:5},children:[v&&Object(Se.jsx)(xi.a,{data:v,cx:"50%",cy:"50%",dataKey:"value",innerRadius:X()(T,"outerChart.innerRadius",0),outerRadius:X()(T,"outerChart.outerRadius","80%"),startAngle:X()(T,"outerChart.startAngle",0),endAngle:X()(T,"outerChart.endAngle",360),fill:"#201763",children:v.map((function(e,t){return Object(Se.jsx)(vi.a,{fill:"undefined"==typeof _[t]?"#393939":_[t]},"cellOuter-".concat(t))}))}),O&&Object(Se.jsx)(xi.a,{data:O,dataKey:"value",cx:"50%",cy:"50%",innerRadius:X()(T,"innerChart.innerRadius",0),outerRadius:X()(T,"innerChart.outerRadius","80%"),startAngle:X()(T,"innerChart.startAngle",0),endAngle:X()(T,"innerChart.endAngle",360),fill:"#201763",children:O.map((function(e,t){return Object(Se.jsx)(vi.a,{fill:"undefined"==typeof A[t]?"#393939":A[t]},"cell-".concat(t))}))}),E&&Object(Se.jsx)("text",{x:"50%",y:"50%",textAnchor:"middle",dominantBaseline:"middle",fontWeight:600,fontSize:14,children:E})]})})})]})}))),Ci=Object(o.b)(null,{displayErrorMessage:H}),ki=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({},Ye),{},{loadingAlign:{width:"100%",paddingTop:"5px",textAlign:"center",margin:"auto"}}))}))(Ci((function(e){var t=e.classes,n=e.title,c=e.panelItem,i=e.timeStart,r=e.timeEnd,o=e.propLoading,s=e.displayErrorMessage,l=e.color,d=e.fillColor,u=e.apiPrefix,b=Object(a.useState)(!0),j=Object(h.a)(b,2),m=j[0],p=j[1],O=Object(a.useState)([]),f=Object(h.a)(O,2),g=f[0],x=f[1],v=Object(a.useState)(null),y=Object(h.a)(v,2),S=y[0],C=y[1];return Object(a.useEffect)((function(){o&&p(!0)}),[o]),Object(a.useEffect)((function(){if(m){var e=0;if(null!==i&&null!==r){var t=r.unix()-i.unix(),n=Math.floor(t/60);e=n<1?15:n}ye.invoke("GET","/api/v1/".concat(u,"/info/widgets/").concat(c.id,"/?step=").concat(e,"&").concat(null!==i?"&start=".concat(i.unix()):"").concat(null!==i&&null!==r?"&":"").concat(null!==r?"end=".concat(r.unix()):"")).then((function(e){var t=$c(e,c);C(t),x(t.data),p(!1)})).catch((function(e){s(e),p(!1)}))}}),[m,c,r,i,s,u]),Object(Se.jsxs)("div",{className:t.singleValueContainer,children:[Object(Se.jsx)("div",{className:t.titleContainer,children:n}),m&&Object(Se.jsx)("div",{className:t.loadingAlign,children:Object(Se.jsx)(k.a,{})}),!m&&Object(Se.jsx)("div",{className:t.contentContainer,children:Object(Se.jsx)(ai.a,{children:Object(Se.jsxs)(ci.a,{data:g,children:[Object(Se.jsx)(oi.a,{domain:[0,function(e){return 2*e}],hide:!0}),Object(Se.jsx)(si.a,{type:"monotone",dataKey:"value",stroke:l,fill:d,fillOpacity:1}),Object(Se.jsx)("text",{x:"50%",y:"50%",textAnchor:"middle",dominantBaseline:"middle",fontWeight:600,fontSize:18,fill:l,children:S?S.innerLabel:""})]})})})]})}))),wi=n(336),Ni=n(61),Ti=n(674),Ei=n(337),Ai=n.n(Ei),_i=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({dateSelectorOverride:{height:40,border:"#EAEDEE 1px solid",marginLeft:15,backgroundColor:"#fff",padding:"0 16px",borderRadius:5,"&.MuiInput-underline:hover:not(.Mui-disabled):before":{borderBottom:0},"&:hover":{borderColor:"#000","&:before, &:after":{borderColor:"transparent",borderBottom:0}},"&:before, &:after":{borderColor:"transparent",borderBottom:0},"& input":{fontSize:12,fontWeight:600,color:"#393939"}},dateSelectorFormOverride:{width:"100%",maxWidth:840},parentDateOverride:{flexGrow:1},textBoxContainer:{flexGrow:1},textBoxWithIcon:{position:"relative",paddingRight:25}},Le),Fe))}))((function(e){var t=e.value,n=e.onChange,c=e.classes,i=e.forSearchBlock,r=void 0!==i&&i,o=e.label,s=e.tooltip,l=void 0===s?"":s,d=e.required,u=e.id,b=e.disabled,j=void 0!==b&&b,h=Object(Se.jsx)(Ni.a,{utils:wi.a,children:Object(Se.jsx)(Ti.a,{value:t,onChange:n,InputProps:{startAdornment:Object(Se.jsx)(lt.a,{position:"start",children:Object(Se.jsx)(Ai.a,{})}),className:r?c.dateSelectorOverride:""},label:"",ampm:!1,variant:"inline",className:r?c.parentDateOverride:c.dateSelectorFormOverride,format:"MMMM Do YYYY, h:mm a",id:u,disabled:j})});return r?h:Object(Se.jsx)(a.Fragment,{children:Object(Se.jsxs)(y.a,{item:!0,xs:12,className:"".concat(c.fieldContainer),children:[""!==o&&Object(Se.jsxs)(fn.a,{htmlFor:u,className:c.inputLabel,children:[Object(Se.jsxs)("span",{children:[o,d?"*":""]}),""!==l&&Object(Se.jsx)("div",{className:c.tooltipContainer,children:Object(Se.jsx)(gn.a,{title:l,placement:"top-start",children:Object(Se.jsx)("div",{children:Object(Se.jsx)(xn,{className:c.tooltip})})})})]}),Object(Se.jsx)("div",{className:c.textBoxContainer,children:h})]})})})),Ii=function(){return Object(Se.jsx)(pt.a,{children:Object(Se.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Object(Se.jsx)("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"})})})},Li=Object(o.b)(null,{displayErrorMessage:H}),Di=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({},ze),{},{widgetsContainer:{height:"calc(100vh - 250px)",paddingBottom:235},syncButton:{"&.MuiButton-root .MuiButton-iconSizeMedium > *:first-child":{fontSize:18}},actionsTray:Object(m.a)(Object(m.a)({},ze.actionsTray),{},{padding:"0 10px"})}))}))(Li((function(e){var t=e.classes,n=e.displayErrorMessage,i=e.apiPrefix,r=void 0===i?"admin":i,o=Object(a.useState)(null),s=Object(h.a)(o,2),l=s[0],d=s[1],u=Object(a.useState)(null),b=Object(h.a)(u,2),j=b[0],p=b[1],O=Object(a.useState)(!0),f=Object(h.a)(O,2),g=f[0],v=f[1],S=Object(a.useState)(Zc),C=Object(h.a)(S,2),k=C[0],w=C[1],N=Object(a.useState)(0),T=Object(h.a)(N,2),E=T[0],A=T[1],_=600,I=function(e){var t=localStorage.getItem(qc);if(!t)return Vc;var n=JSON.parse(atob(t));return 0===n.length||n.length>0&&!n[0].minW||0!==e&&n.length!==e?Vc:n}(k.length),L={width:"100%",height:"auto",paddingBottom:45},D=Object(a.useCallback)((function(e,t){var n=e/8+5,a=function(e,t){switch(e.type){case Ec.singleValue:return Object(Se.jsx)(ti,{title:e.title,panelItem:e,timeStart:l,timeEnd:j,propLoading:g,apiPrefix:r});case Ec.pieChart:return Object(Se.jsx)(Si,{title:e.title,panelItem:e,timeStart:l,timeEnd:j,propLoading:g,apiPrefix:r});case Ec.linearGraph:return Object(Se.jsx)(bi,{title:e.title,panelItem:e,timeStart:l,timeEnd:j,propLoading:g,hideYAxis:e.disableYAxis,xAxisFormatter:e.xAxisFormatter,yAxisFormatter:e.yAxisFormatter,panelWidth:I[t]?n*I[t].w:n,apiPrefix:r});case Ec.barChart:return Object(Se.jsx)(fi,{title:e.title,panelItem:e,timeStart:l,timeEnd:j,propLoading:g,apiPrefix:r});case Ec.singleRep:var a=e.fillColor?e.fillColor:e.color;return Object(Se.jsx)(ki,{title:e.title,panelItem:e,timeStart:l,timeEnd:j,propLoading:g,color:e.color,fillColor:a,apiPrefix:r});default:return null}};return k.filter((function(e){return!t||t.indexOf(e.id)>-1})).map((function(e,t){return Object(Se.jsx)("div",{children:a(e,t)},e.layoutIdentifier)}))}),[k,I,j,l,g,r]),F=Object(a.useCallback)((function(){var e=0;if(null!==l&&null!==j){var t=j.unix()-l.unix(),a=Math.floor(t/60);e=a<1?15:a}ye.invoke("GET","/api/v1/".concat(r,"/info?step=").concat(e,"&").concat(null!==l?"&start=".concat(l.unix()):"").concat(null!==l&&null!==j?"&":"").concat(null!==j?"end=".concat(j.unix()):"")).then((function(e){if(e.widgets){var t=(a=e.widgets,Zc.map((function(e){var t=a.find((function(t){return t.title.toLowerCase().trim()===e.title.toLowerCase().trim()}));return $c(t,e)})));w(t)}else n("Widget information could not be retrieved at this time. Please try again");var a;v(!1)})).catch((function(e){n(e),v(!1)}))}),[l,j,n,r]);Object(a.useEffect)((function(){g&&F()}),[g,F]);var M=function(e){return{id:"simple-tab-".concat(e),"aria-controls":"simple-tabpanel-".concat(e)}},R=[1,64,65,68,52,44,61,80,81,66,62,53,63,50,69,70,9,78],B=[76,77,11,8,82,74],P=[60,71,17,73];return Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:"".concat(t.actionsTray," ").concat(t.timeContainers),children:[Object(Se.jsx)("span",{className:t.label,children:"Start Time"}),Object(Se.jsx)(_i,{value:l,onChange:d,forSearchBlock:!0,id:"stTime"}),Object(Se.jsx)("span",{className:t.label,children:"End Time"}),Object(Se.jsx)(_i,{value:j,onChange:p,forSearchBlock:!0,id:"endTime"}),Object(Se.jsx)(x.a,{type:"button",variant:"contained",color:"primary",onClick:function(){v(!0)},startIcon:Object(Se.jsx)(Ii,{}),className:t.syncButton,children:"Sync"})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsxs)(ja.a,{indicatorColor:"primary",textColor:"primary","aria-label":"cluster-tabs",variant:"scrollable",scrollButtons:"auto",value:E,onChange:function(e,t){console.log(t),A(t)},children:[Object(Se.jsx)(ha.a,Object(m.a)({label:"Summary"},M(0))),Object(Se.jsx)(ha.a,Object(m.a)({label:"Traffic"},M(1))),Object(Se.jsx)(ha.a,Object(m.a)({label:"Resources"},M(2)))]})}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.widgetsContainer,children:[Object(Se.jsx)(Oa,{index:0,value:E,children:Object(Se.jsx)(Qt.a,{style:L,children:function(e){var t=e.width,n=e.height,a=n<_?_:n;a>380&&(a=480);var c=t>1920?1920:t;return Object(Se.jsx)(Gc.a,{width:c,cols:8,containerPadding:[10,10],onLayoutChange:Xc,layout:I,rowHeight:a/6,style:{margin:"0 auto",width:c},children:D(t,R)})}})}),Object(Se.jsx)(Oa,{index:1,value:E,children:Object(Se.jsx)(Qt.a,{style:L,children:function(e){var t=e.width,n=e.height,a=n<_?_:n;a>380&&(a=480);var c=t>1920?1920:t;return Object(Se.jsx)(Gc.a,{width:c,cols:8,containerPadding:[10,10],onLayoutChange:Xc,layout:I,rowHeight:a/6,style:{margin:"0 auto",width:c},children:D(t,P)})}})}),Object(Se.jsx)(Oa,{index:2,value:E,children:Object(Se.jsx)(Qt.a,{style:L,children:function(e){var t=e.width,n=e.height,a=n<_?_:n;a>380&&(a=480);var c=t>1920?1920:t;return Object(Se.jsx)(Gc.a,{width:c,cols:8,containerPadding:[10,10],onLayoutChange:Xc,layout:I,rowHeight:a/6,style:{margin:"0 auto",width:c},children:D(t,B)})}})})]})]})}))),Fi=function(){return Object(Se.jsxs)(pt.a,{viewBox:"0 0 15.834 17.375",children:[Object(Se.jsx)("defs",{children:Object(Se.jsxs)("linearGradient",{id:"a",y1:"0.5",x2:"1",y2:"0.5",gradientUnits:"objectBoundingBox",children:[Object(Se.jsx)("stop",{offset:"0.044",stopColor:"#362585"}),Object(Se.jsx)("stop",{offset:"0.301",stopColor:"#281b6f"}),Object(Se.jsx)("stop",{offset:"1",stopColor:"#1e1560"})]})}),Object(Se.jsxs)("g",{transform:"translate(0 0.375)",children:[Object(Se.jsx)("circle",{style:{opacity:.1,fill:"url(#a)"},cx:"6.625",cy:"6.625",r:"6.625",transform:"translate(0 3.75)"}),Object(Se.jsxs)("g",{transform:"translate(3.092)",children:[Object(Se.jsx)("ellipse",{style:{fill:"none",stroke:"#707070",strokeMiterlimit:10,strokeWidth:"0.75px"},cx:"6.183",cy:"1.244",rx:"6.183",ry:"1.244",transform:"translate(0)"}),Object(Se.jsx)("path",{style:{fill:"none",stroke:"#707070",strokeMiterlimit:10,strokeWidth:"0.75px"},d:"M-3722.174,1225.225l-1.687,10.292a.858.858,0,0,1-.578.669,12.182,12.182,0,0,1-3.918.647,12.187,12.187,0,0,1-3.894-.639.878.878,0,0,1-.6-.678q-.843-5.145-1.687-10.291",transform:"translate(3734.541 -1223.981)"})]})]})]})},Mi=function(){return Object(Se.jsxs)(pt.a,{viewBox:"0 0 18.344 17.009",children:[Object(Se.jsx)("defs",{children:Object(Se.jsxs)("linearGradient",{id:"a",y1:"0.5",x2:"1",y2:"0.5",gradientUnits:"objectBoundingBox",children:[Object(Se.jsx)("stop",{offset:"0.044",stopColor:"#362585"}),Object(Se.jsx)("stop",{offset:"0.301",stopColor:"#281b6f"}),Object(Se.jsx)("stop",{offset:"1",stopColor:"#1e1560"})]})}),Object(Se.jsxs)("g",{transform:"translate(0 0.25)",children:[Object(Se.jsx)("ellipse",{style:{opacity:.1,fill:"url(#a)"},cx:"7.462",cy:"7.462",rx:"7.462",ry:"7.462",transform:"translate(0 1.835)"}),Object(Se.jsx)("rect",{style:{fill:"none",stroke:"#707070",strokeMiterlimit:10,strokeWidth:"0.5px"},width:"9.323",height:"9.323",transform:"translate(4.083)"}),Object(Se.jsx)("rect",{style:{fill:"none",stroke:"#707070",strokeMiterlimit:10,strokeWidth:"0.5px"},width:"8.223",height:"8.223",transform:"translate(9.871 5.307)"})]})]})},Ri=Object(E.a)((function(e){return Object(N.a)({paper:{padding:e.spacing(2),display:"flex",overflow:"auto",flexDirection:"column",border:"#eaedee 1px solid",borderRadius:5,boxShadow:"none"},fixedHeight:{height:165,minWidth:247,marginRight:20,padding:"25px 28px","& svg":{maxHeight:18}},consumptionValue:{color:"#000000",fontSize:"60px",fontWeight:"bold"},icon:{marginRight:10,color:"#777777"},notationContainer:{display:"flex"},dashboardBG:{width:390,height:255,zIndex:500,position:"absolute",backgroundSize:"fill",backgroundImage:"url(/images/BG_IllustrationDarker.svg)",backgroundPosition:"right bottom",right:0,bottom:0,backgroundRepeat:"no-repeat"},dashboardContainer:{zIndex:600,position:"absolute"},elementTitle:{fontWeight:500,color:"#777777",fontSize:14,marginTop:-9},smallUnit:{fontSize:20}})}))((function(e){var t=e.classes,n=e.usage,c=Object(Te.a)(t.paper,t.fixedHeight),i=function(e){return void 0===e?0:e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")};return Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)("div",{className:t.dashboardBG}),Object(Se.jsx)(y.a,{container:!0,className:t.dashboardContainer,children:Object(Se.jsx)(y.a,{container:!0,spacing:3,className:t.container,children:Object(Se.jsxs)(y.a,{item:!0,className:t.notationContainer,children:[Object(Se.jsxs)(w.a,{className:c,children:[Object(Se.jsxs)(y.a,{container:!0,direction:"row",alignItems:"center",children:[Object(Se.jsx)(y.a,{item:!0,className:t.icon,children:Object(Se.jsx)(Fi,{})}),Object(Se.jsx)(y.a,{item:!0,children:Object(Se.jsx)(S.a,{className:t.elementTitle,children:"All buckets"})})]}),Object(Se.jsx)(S.a,{className:t.consumptionValue,children:n?i(n.buckets):0})]}),Object(Se.jsxs)(w.a,{className:c,children:[Object(Se.jsxs)(y.a,{container:!0,direction:"row",alignItems:"center",children:[Object(Se.jsx)(y.a,{item:!0,className:t.icon,children:Object(Se.jsx)(Ta,{})}),Object(Se.jsx)(y.a,{item:!0,children:Object(Se.jsx)(S.a,{className:t.elementTitle,children:"Usage"})})]}),Object(Se.jsx)(S.a,{className:t.consumptionValue,children:n?function(e){if(void 0===e)return"0";var n=oe(e).split(" ");return 2!==n.length?n.join(" "):Object(Se.jsxs)(a.Fragment,{children:[n[0],Object(Se.jsx)("span",{className:t.smallUnit,children:n[1]})]})}(n.usage+""):0})]}),Object(Se.jsxs)(w.a,{className:c,children:[Object(Se.jsxs)(y.a,{container:!0,direction:"row",alignItems:"center",children:[Object(Se.jsx)(y.a,{item:!0,className:t.icon,children:Object(Se.jsx)(Mi,{})}),Object(Se.jsx)(y.a,{item:!0,children:Object(Se.jsxs)(S.a,{className:t.elementTitle,children:[" ","Total Objects"]})})]}),Object(Se.jsx)(S.a,{className:t.consumptionValue,children:n?i(n.objects):0})]})]})})})]})})),Bi=Object(o.b)(null,{displayErrorMessage:H}),Pi=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(Bi((function(e){var t=e.classes,n=e.displayErrorMessage,c=Object(a.useState)(!0),i=Object(h.a)(c,2),r=i[0],o=i[1],s=Object(a.useState)(null),l=Object(h.a)(s,2),d=l[0],u=l[1],b=Object(a.useCallback)((function(){ye.invoke("GET","/api/v1/admin/info").then((function(e){u(e),o(!1)})).catch((function(e){n(e),o(!1)}))}),[u,o,n]);Object(a.useEffect)((function(){r&&b()}),[r,b]);var j=X()(d,"widgets",null);return Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(na,{label:"Dashboard"}),Object(Se.jsx)(y.a,{container:!0,children:r?Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.container,children:Object(Se.jsx)(C.a,{})}):Object(Se.jsx)(a.Fragment,{children:null!==j?Object(Se.jsx)(y.a,{container:!0,className:t.container,children:Object(Se.jsx)(Di,{})}):Object(Se.jsx)(y.a,{container:!0,className:t.container,children:Object(Se.jsx)(Ri,{usage:d})})})})]})}))),zi=n(590),Ki=n(667),Ui=n(338),Wi=n.n(Ui),Gi=n(666),qi=n(668),Vi=n(635),Hi=n(669),Yi=n.p+"static/media/minio_console_logo.0837460e.svg",Qi=n.p+"static/media/minio_operator_logo.1312b7c9.svg",Zi=[{label:"",group:"common",collapsible:!1},{label:"User",group:"User",collapsible:!0},{label:"Admin",group:"Admin",collapsible:!0},{label:"Tools",group:"Tools",collapsible:!0},{label:"Operator",group:"Operator",collapsible:!1},{label:"",group:"License",collapsible:!1}],Ji=n(341),$i=n.n(Ji),Xi=function(){return Object(Se.jsx)(pt.a,{children:Object(Se.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 13 11",children:[Object(Se.jsx)("path",{fill:"#fff",d:"M11 11H0V2h11v9zM2 8v1h7V8zm0-3v1h5V5z"}),Object(Se.jsxs)("g",{fill:"#07274a",stroke:"#fdfdfd",strokeWidth:"0.5",transform:"translate(7)",children:[Object(Se.jsx)("circle",{cx:"3",cy:"3",r:"3",stroke:"none"}),Object(Se.jsx)("circle",{cx:"3",cy:"3",r:"2.75",fill:"none"})]}),Object(Se.jsx)("path",{fill:"none",stroke:"#fff",strokeWidth:"0.5",d:"M8.73 2.794l.954.953 1.471-1.471"})]})})},er=function(){return Object(Se.jsx)(pt.a,{children:Object(Se.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12.122 10.571",children:Object(Se.jsxs)("g",{transform:"translate(0 0.5)",children:[Object(Se.jsx)("path",{style:{fill:"none",stroke:"rgba(255,255,255,0.8)"},d:"M4816.27,3755.205v-2.939h8.539v9.571h-8.539v-2.932",transform:"translate(-4813.187 -3752.266)"}),Object(Se.jsx)("path",{style:{fill:"none",stroke:"rgba(255,255,255,0.8)"},d:"M4813.187,3757.052h8.081",transform:"translate(-4813.187 -3752.266)"}),Object(Se.jsx)("path",{style:{fill:"none",stroke:"rgba(255,255,255,0.8)"},d:"M4806.5,3756.511l2.265,2.063-2.265,2.063",transform:"translate(-4800.808 -3753.863)"})]})})})},tr=function(){return Object(Se.jsx)(pt.a,{children:Object(Se.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10",children:Object(Se.jsxs)("g",{transform:"translate(-518 -361)",children:[Object(Se.jsx)("path",{d:"M-126,0V10h10V0Zm1.5,8.5V2.95h7V8.5Z",transform:"translate(644 361)"}),Object(Se.jsx)("rect",{width:"2",height:"1",transform:"translate(520.272 364.772)"})]})})})},nr=function(){return Object(Se.jsx)(pt.a,{children:Object(Se.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10.014 9.993",children:[Object(Se.jsx)("path",{className:"a",d:"M9.162,5.971h0L8.192,5,9.346,3.846a2.257,2.257,0,0,0,0-3.192,2.311,2.311,0,0,0-3.192,0L5,1.808,4.029.837,3.846.654a2.311,2.311,0,0,0-3.192,0,2.257,2.257,0,0,0,0,3.192l.184.183h0L1.808,5,.654,6.154A2.257,2.257,0,0,0,3.846,9.346L5,8.192l.971.971.183.183A2.257,2.257,0,0,0,9.346,6.154Zm-2.29-4.6a1.27,1.27,0,0,1,1.757,0,1.242,1.242,0,0,1,0,1.757L7.475,4.283,5.717,2.525Zm-5.5,1.757A1.243,1.243,0,0,1,3.129,1.371l.183.183L1.555,3.312Zm1.757,5.5a1.27,1.27,0,0,1-1.757,0,1.242,1.242,0,0,1,0-1.757L2.525,5.717,4.283,7.475Zm2.843-.9-.254-.253L2.525,4.283l-.253-.254L4.029,2.272l.254.253L7.475,5.717l.253.254Zm2.657.9a1.271,1.271,0,0,1-1.757,0l-.183-.183L8.446,6.688l.183.183h0a1.241,1.241,0,0,1,0,1.757Z",transform:"translate(0.007 -0.014)"}),Object(Se.jsx)("circle",{cx:"0.5",cy:"0.5",r:"0.5",transform:"translate(4.507 4.486)"}),Object(Se.jsx)("circle",{cx:"0.5",cy:"0.5",r:"0.5",transform:"translate(3.507 3.486)"}),Object(Se.jsx)("circle",{cx:"0.5",cy:"0.5",r:"0.5",transform:"translate(5.507 5.486)"})]})})},ar=n(339),cr=n.n(ar),ir=n(340),rr=n.n(ir),or=Object(o.b)((function(e){return{open:e.system.loggedIn,operatorMode:e.system.operatorMode}}),{userLoggedIn:U}),sr=or(Object(E.a)((function(e){return Object(N.a)({logo:{paddingTop:25,marginBottom:30,paddingLeft:45,"& img":{width:120}},menuList:{"& .active":{borderTopLeftRadius:2,borderBottomLeftRadius:2,color:"#fff",backgroundColor:"rgba(255, 255, 255, .18)","& .MuiSvgIcon-root":{color:"white"},"& .MuiTypography-root":{color:"#fff",fontWeight:700}},"& .MuiSvgIcon-root":{fontSize:16,color:"rgba(255, 255, 255, 0.8)",maxWidth:14},"& .MuiListItemIcon-root":{minWidth:25},"& .MuiTypography-root":{fontSize:12,color:"rgba(255, 255, 255, 0.8)"},"& .MuiListItem-gutters":{paddingRight:0,fontWeight:300},"& .MuiListItem-root":{padding:"2px 0 2px 16px",marginBottom:8,marginLeft:30,width:"calc(100% - 30px)"},"& .MuiCollapse-container .MuiCollapse-wrapper .MuiCollapse-wrapperInner .MuiDivider-root":{backgroundColor:"rgba(112,112,112,0.5)",marginBottom:12,height:1}},extraMargin:{"&.MuiListItem-gutters":{marginLeft:5}},groupTitle:{color:"#fff",fontSize:10,textTransform:"uppercase",fontWeight:700,marginBottom:3,cursor:"pointer",userSelect:"none",display:"flex",justifyContent:"space-between"},subTitleMenu:{fontWeight:700,marginLeft:10,"&.MuiTypography-root":{fontSize:13,color:"#fff"}},selectorArrow:{marginRight:20,marginTop:1,display:"inline-block",width:0,height:0,borderStyle:"solid",borderWidth:"4px 4px 0 4px",borderColor:"rgba(255, 255, 255, .29) transparent transparent transparent",transform:"rotateZ(0deg)",transitionDuration:"0.2s"},selectorArrowOpen:{transform:"rotateZ(180deg)"}})}))((function(e){var t=e.userLoggedIn,n=e.classes,i=e.pages,r=e.operatorMode,o=Object(a.useState)(function(){var e=[];return Zi.forEach((function(t){t.collapsible&&(e[t.group]=!0)})),e}()),s=Object(h.a)(o,2),l=s[0],d=s[1],u=[{group:"common",type:"item",component:nn.b,to:"/dashboard",name:"Dashboard",icon:Object(Se.jsx)(xt,{})},{group:"User",type:"item",component:nn.b,to:"/object-browser",name:"Object Browser",icon:Object(Se.jsx)(Wi.a,{})},{group:"User",type:"item",component:nn.b,to:"/account",name:"Account",icon:Object(Se.jsx)(St,{})},{group:"Admin",type:"item",component:nn.b,to:"/buckets",name:"Buckets",icon:Object(Se.jsx)(vt,{})},{group:"Admin",type:"item",component:nn.b,to:"/users",name:"Users",icon:Object(Se.jsx)(yt,{})},{group:"Admin",type:"item",component:nn.b,to:"/groups",name:"Groups",icon:Object(Se.jsx)(Ct,{})},{group:"Admin",type:"item",component:nn.b,to:"/policies",name:"IAM Policies",icon:Object(Se.jsx)(kt,{})},{group:"Tools",type:"item",component:nn.b,to:"/logs",name:"Logs",icon:Object(Se.jsx)(tr,{})},{group:"Tools",type:"item",component:nn.b,to:"/watch",name:"Watch",icon:Object(Se.jsx)(Et,{})},{group:"Tools",type:"item",component:nn.b,to:"/trace",name:"Trace",icon:Object(Se.jsx)(wt,{})},{group:"Tools",type:"item",component:nn.b,to:"/heal",name:"Heal",icon:Object(Se.jsx)(nr,{})},{group:"Tools",type:"item",component:nn.b,to:"/health-info",name:"Diagnostic",icon:Object(Se.jsx)(cr.a,{})},{group:"Admin",type:"item",component:nn.b,to:"/settings",name:"Settings",icon:Object(Se.jsx)(Nt,{})},{group:"Operator",type:"item",component:nn.b,to:"/tenants",name:"Tenants",icon:Object(Se.jsx)(Tt,{})},{group:"Operator",type:"item",component:nn.b,to:"/storage",name:"Storage",icon:Object(Se.jsx)(rr.a,{})}],b=i.reduce((function(e,t){return e[t]=!0,e}),{}),p={group:"License",type:"item",component:nn.b,to:"/documentation",name:"Documentation",icon:Object(Se.jsx)($i.a,{}),forceDisplay:!0};b.hasOwnProperty("/tenants")?u.push({group:"Operator",type:"item",component:nn.b,to:"/license",name:"License",icon:Object(Se.jsx)(Xi,{})},Object(m.a)(Object(m.a)({},p),{},{group:"Operator",onClick:function(e){e.preventDefault(),window.open("https://docs.min.io/?ref=".concat(r?"op":"con"),"_blank")}})):u.push({group:"License",type:"item",component:nn.b,to:"/license",name:"License",icon:Object(Se.jsx)(Xi,{})},Object(m.a)(Object(m.a)({},p),{},{group:"License",onClick:function(e){e.preventDefault(),window.open("https://docs.min.io/?ref=".concat(r?"op":"con"),"_blank")}}));var O=u.filter((function(e){return b[e.to]||e.forceDisplay||"item"!==e.type}));return Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsx)("div",{className:n.logo,children:Object(Se.jsx)("img",{src:r?Qi:Yi,alt:"logo"})}),Object(Se.jsxs)(Vi.a,{className:n.menuList,children:[Zi.map((function(e,t){var a=(O||[]).filter((function(t){return t.group===e.group}));return 0===a.filter((function(e){return"title"!==e.type})).length?null:Object(Se.jsxs)(c.a.Fragment,{children:[""!==e.label&&Object(Se.jsxs)(zi.a,{className:n.groupTitle,onClick:function(){e.collapsible&&function(e){var t=Object(m.a)({},l);t[e]=!t[e],d(t)}(e.group)},children:[Object(Se.jsx)("span",{children:e.label}),e.collapsible&&Object(Se.jsx)("span",{className:"".concat(n.selectorArrow," ").concat(l[e.group]?n.selectorArrowOpen:"")})]}),Object(Se.jsxs)(Gi.a,{in:!e.collapsible||l[e.group],timeout:"auto",unmountOnExit:!0,children:[a.map((function(e){switch(e.type){case"item":return Object(Se.jsxs)(zi.a,{button:!0,onClick:e.onClick,component:e.component,to:e.to,className:e.extraMargin?n.extraMargin:null,children:[e.icon&&Object(Se.jsx)(Ki.a,{children:e.icon}),e.name&&Object(Se.jsx)(qi.a,{primary:e.name})]},e.to);case"title":return Object(Se.jsx)(zi.a,{component:e.component,className:n.subTitleMenu,children:e.name},e.name);default:return null}})),Object(Se.jsx)(Hi.a,{})]},"menuGroup-".concat(e.group))]},"menuElem-".concat(t.toString()))})),Object(Se.jsxs)(zi.a,{button:!0,onClick:function(){var e=function(){le(),t(!1),localStorage.setItem("userLoggedIn",""),j.push("/login")};ye.invoke("POST","/api/v1/logout").then((function(){e()})).catch((function(t){console.log(t),e()}))},children:[Object(Se.jsx)(Ki.a,{children:Object(Se.jsx)(er,{})}),Object(Se.jsx)(qi.a,{primary:"Logout"})]})]})]})}))),lr={setModalErrorSnackMessage:Q},dr=Object(o.b)(null,lr),ur=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({jsonPolicyEditor:{minHeight:400,width:"100%"},buttonContainer:{textAlign:"right"},infoDetails:{color:"#393939",fontSize:12,fontStyle:"italic",marginBottom:"8px"},containerScrollable:{maxHeight:"calc(100vh - 300px)",overflowY:"auto"}},De))}))(dr((function(e){var t=e.classes,n=e.open,c=e.closeModalAndRefresh,i=e.setModalErrorSnackMessage,r=Object(a.useState)(!1),o=Object(h.a)(r,2),s=o[0],l=o[1],d=Object(a.useState)(""),u=Object(h.a)(d,2),b=u[0],j=u[1],m=Object(a.useState)(!1),p=Object(h.a)(m,2),O=p[0],f=p[1];Object(a.useEffect)((function(){s&&ye.invoke("POST","/api/v1/service-accounts",{policy:b}).then((function(e){l(!1),c(e)})).catch((function(e){l(!1),i(e)}))}),[s,l,i,b,c]);return Object(Se.jsx)(_n,{modalOpen:n,onClose:function(){c(null)},title:"Create Service Account",children:Object(Se.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){e.preventDefault(),l(!0)}(e)},children:[Object(Se.jsxs)(y.a,{container:!0,className:t.containerScrollable,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("div",{className:t.infoDetails,children:"Service Accounts inherit the policy explicitly attached to the parent user and the policy attached to each group in which the parent user has membership. You can specify an optional JSON-formatted policy below to restrict the Service Account access to a subset of actions and resources explicitly allowed for the parent user. You cannot modify the Service Account optional policy after saving."})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Zn,{value:"locking",id:"locking",name:"locking",checked:O,onChange:function(e){f(e.target.checked)},label:"Restrict with policy",indicatorLabels:["On","Off"]})}),O&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Ac,{value:b,onBeforeChange:function(e,t,n){j(n)}})})]}),Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.buttonContainer,children:[Object(Se.jsx)("button",{type:"button",color:"primary",className:t.clearButton,onClick:function(){j("")},children:"Clear"}),Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:s,children:"Create"})]}),s&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(C.a,{})})]})]})})}))),br={setErrorSnackMessage:H},jr=Object(o.b)(null,br),hr=Object(E.a)((function(e){return Object(N.a)({wrapText:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"}})}))(jr((function(e){var t=e.classes,n=e.closeDeleteModalAndRefresh,c=e.deleteOpen,i=e.selectedServiceAccount,r=e.setErrorSnackMessage,o=Object(a.useState)(!1),s=Object(h.a)(o,2),l=s[0],d=s[1];Object(a.useEffect)((function(){l&&ye.invoke("DELETE","/api/v1/service-accounts/".concat(i)).then((function(){d(!1),n(!0)})).catch((function(e){d(!1),r(e)}))}),[l,n,i,r]);return Object(Se.jsxs)(wn.a,{open:c,onClose:function(){n(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(Se.jsx)(Nn.a,{id:"alert-dialog-title",children:"Delete ServiceAccount"}),Object(Se.jsxs)(Tn.a,{children:[l&&Object(Se.jsx)(C.a,{}),Object(Se.jsxs)($n.a,{id:"alert-dialog-description",children:["Are you sure you want to delete service account"," ",Object(Se.jsx)("b",{className:t.wrapText,children:i}),"?"]})]}),Object(Se.jsxs)(Xn.a,{children:[Object(Se.jsx)(x.a,{onClick:function(){n(!1)},color:"primary",disabled:l,children:"Cancel"}),Object(Se.jsx)(x.a,{onClick:function(){null!=i&&d(!0)},color:"secondary",autoFocus:!0,disabled:l,children:"Delete"})]})]})}))),mr=Object(E.a)((function(e){return Object(N.a)({warningBlock:{color:"red"},buttonContainer:{textAlign:"right"},credentialsPanel:{overflowY:"auto",maxHeight:350}})}))((function(e){var t=e.classes,n=e.newServiceAccount,a=e.open,i=e.closeModal,r=e.entity;if(!n)return null;var o=X()(n,"console",null);return Object(Se.jsx)(_n,{modalOpen:a,onClose:function(){i()},title:"New ".concat(r," Created"),children:Object(Se.jsx)(c.a.Fragment,{children:Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.formScrollable,children:["A new ",r," has been created with the following details:",o&&Object(Se.jsx)(c.a.Fragment,{children:Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.credentialsPanel,children:[Object(Se.jsx)("strong",{children:"Console Credentials"}),Array.isArray(o)&&o.map((function(e,t){return Object(Se.jsxs)("ul",{children:[Object(Se.jsxs)("li",{children:[Object(Se.jsx)("b",{children:"Access Key:"})," ",e.accessKey]}),Object(Se.jsxs)("li",{children:[Object(Se.jsx)("b",{children:"Secret Key:"})," ",e.secretKey]})]},"creds-item-".concat(t.toString()))})),!Array.isArray(o)&&Object(Se.jsxs)("ul",{children:[Object(Se.jsxs)("li",{children:[Object(Se.jsx)("b",{children:"Access Key:"})," ",o.accessKey]}),Object(Se.jsxs)("li",{children:[Object(Se.jsx)("b",{children:"Secret Key:"})," ",o.secretKey]})]})]})}),Object(Se.jsx)(S.a,{component:"p",variant:"body1",className:t.warningBlock,children:"Write these down, as this is the only time the secret will be displayed."})]}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.buttonContainer,children:[Object(Se.jsx)(x.a,{onClick:function(){var e={};if(o)if(Array.isArray(o)){var t=o.map((function(e){return{access_key:e.accessKey,secret_key:e.secretKey}}));e={console:Object(st.a)(t)}}else e={console:[{access_key:o.accessKey,secret_key:o.secretKey}]};!function(e,t){var n=document.createElement("a");n.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(t)),n.setAttribute("download",e),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)}("credentials.json",JSON.stringify(Object(m.a)({},e)))},color:"primary",children:"Download"}),Object(Se.jsx)(x.a,{onClick:function(){i()},color:"secondary",autoFocus:!0,children:"Done"})]})]})})})})),pr=function(e,t){return e.accessKey>t.accessKey?1:e.accessKey<t.accessKey?-1:0},Or=function(e,t){return e.name>t.name?1:e.name<t.name?-1:0},fr=function(e,t){return e>t?1:e<t?-1:0},gr=n(342),xr=n.n(gr),vr=Object(o.b)(null,{setModalErrorSnackMessage:Q}),yr=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)({buttonContainer:{textAlign:"right"}},ze),De),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(vr((function(e){var t=e.classes,n=e.open,c=e.closeModal,i=e.setModalErrorSnackMessage,r=Object(a.useState)(""),o=Object(h.a)(r,2),s=o[0],l=o[1],d=Object(a.useState)(""),u=Object(h.a)(d,2),b=u[0],j=u[1],m=Object(a.useState)(""),p=Object(h.a)(m,2),O=p[0],f=p[1],g=Object(a.useState)(!1),v=Object(h.a)(g,2),S=v[0],k=v[1];return n?Object(Se.jsx)(_n,{title:"Change Password",modalOpen:n,onClose:function(){j(""),f(""),l(""),c()},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:Object(Se.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){if(e.preventDefault(),b===O){if(b.length<8)i("Passwords must be at least 8 characters long");else if(!S){k(!0);var t={current_secret_key:s,new_secret_key:b};ye.invoke("POST","/api/v1/account/change-password",t).then((function(e){k(!1),j(""),f(""),l(""),c()})).catch((function(e){k(!1),j(""),f(""),l(""),i(e)}))}}else i("New passwords don't match")}(e)},children:Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.formScrollable,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"current-password",name:"current-password",onChange:function(e){l(e.target.value)},label:"Current Password",type:"password",value:s})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"new-password",name:"new-password",onChange:function(e){j(e.target.value)},label:"New Password",type:"password",value:b})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"re-new-password",name:"re-new-password",onChange:function(e){f(e.target.value)},label:"Type New Password Again",type:"password",value:O})})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.buttonContainer,children:Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:S||!(s.length>0&&b.length>0&&O.length>0),children:"Save"})}),S&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(C.a,{})})]})})}):null}))),Sr=Object(o.b)(null,{displayErrorMessage:H}),Cr=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column"},addSideBar:{width:"480px",minWidth:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},wrapCell:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},imageIcon:{height:"100%"},iconRoot:{textAlign:"center"}},ze),Ke),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(Sr((function(e){var t=e.classes,n=e.displayErrorMessage,i=e.changePassword,r=Object(a.useState)([]),o=Object(h.a)(r,2),s=o[0],l=o[1],d=Object(a.useState)(!1),u=Object(h.a)(d,2),b=u[0],j=u[1],m=Object(a.useState)(""),p=Object(h.a)(m,2),O=p[0],f=p[1],g=Object(a.useState)(!1),C=Object(h.a)(g,2),k=C[0],w=C[1],N=Object(a.useState)(!1),T=Object(h.a)(N,2),E=T[0],A=T[1],_=Object(a.useState)(null),I=Object(h.a)(_,2),L=I[0],D=I[1],F=Object(a.useState)(!1),M=Object(h.a)(F,2),R=M[0],B=M[1],P=Object(a.useState)(null),z=Object(h.a)(P,2),K=z[0],U=z[1],W=Object(a.useState)(!1),G=Object(h.a)(W,2),q=G[0],V=G[1];Object(a.useEffect)((function(){H()}),[]),Object(a.useEffect)((function(){b&&ye.invoke("GET","/api/v1/service-accounts").then((function(e){var t=e.sort(fr);j(!1),l(t)})).catch((function(e){n(e),j(!1)}))}),[b,j,l,n]);var H=function(){j(!0)},Y=[{type:"delete",onClick:function(e){D(e),A(!0)}}],Q=s.filter((function(e){return e.toLowerCase().includes(O.toLowerCase())}));return Object(Se.jsxs)(c.a.Fragment,{children:[k&&Object(Se.jsx)(ur,{open:k,closeModalAndRefresh:function(e){!function(e){if(w(!1),H(),null!==e){var t={console:{accessKey:"".concat(e.accessKey),secretKey:"".concat(e.secretKey)}};U(t),B(!0)}}(e)}}),E&&Object(Se.jsx)(hr,{deleteOpen:E,selectedServiceAccount:L,closeDeleteModalAndRefresh:function(e){!function(e){A(!1),e&&H()}(e)}}),R&&Object(Se.jsx)(mr,{newServiceAccount:K,open:R,closeModal:function(){B(!1),U(null)},entity:"Service Account"}),Object(Se.jsx)(na,{label:"Account"}),Object(Se.jsx)(y.a,{container:!0,children:Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.container,children:[i&&Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(S.a,{variant:"h5",component:"h5",children:"Settings"})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsxs)(y.a,{item:!0,xs:12,children:[Object(Se.jsx)(yr,{open:q,closeModal:function(){return V(!1)}}),Object(Se.jsx)(x.a,{variant:"contained",color:"primary",startIcon:Object(Se.jsx)(xr.a,{}),onClick:function(){return V(!0)},children:"Change Password"})]}),Object(Se.jsxs)(y.a,{item:!0,xs:12,children:[Object(Se.jsx)("br",{}),Object(Se.jsx)(Hi.a,{}),Object(Se.jsx)("br",{})]})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(S.a,{variant:"h5",component:"h5",children:"Service Accounts"})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(Se.jsx)(v.a,{placeholder:"Search Service Accounts",className:t.searchField,id:"search-resource",label:"",InputProps:{disableUnderline:!0,startAdornment:Object(Se.jsx)(lt.a,{position:"start",children:Object(Se.jsx)(ut.a,{})})},onChange:function(e){f(e.target.value)}}),Object(Se.jsx)(x.a,{variant:"contained",color:"primary",startIcon:Object(Se.jsx)(ft,{}),onClick:function(){w(!0),D(null)},children:"Create service account"})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(kn,{isLoading:b,records:Q,entityName:"Service Accounts",idField:"",columns:[{label:"Service Account",elementKey:""}],itemActions:Y})})]})})]})}))),kr=n(203),wr=n.n(kr),Nr={setModalErrorSnackMessage:Q},Tr=Object(o.b)(null,Nr),Er=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column",paddingTop:15,boxShadow:"none"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},wrapCell:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},noFound:{textAlign:"center",padding:"10px 0"},tableContainer:{maxHeight:200},stickyHeader:{backgroundColor:"#fff"},actionsTitle:{fontWeight:600,color:"#000",fontSize:16,alignSelf:"center"},tableBlock:{marginTop:15},filterField:{width:375,fontWeight:600,"& .input":{"&::placeholder":{fontWeight:600,color:"#000"}}}},ze),Ge))}))(Tr((function(e){var t=e.classes,n=e.selectedGroups,i=e.setSelectedGroups,r=e.setModalErrorSnackMessage,o=Object(a.useState)([]),s=Object(h.a)(o,2),l=s[0],d=s[1],u=Object(a.useState)(!1),b=Object(h.a)(u,2),j=b[0],m=b[1],p=Object(a.useState)(""),O=Object(h.a)(p,2),f=O[0],g=O[1],x=Object(a.useCallback)((function(){ye.invoke("GET","/api/v1/groups").then((function(e){var t=X()(e,"groups",[]);t||(t=[]),d(t.sort(fr)),m(!1)})).catch((function(e){r(e),m(!1)}))}),[r]);Object(a.useEffect)((function(){m(!0)}),[]),Object(a.useEffect)((function(){j&&x()}),[j,x]);var S=n||[],k=l.filter((function(e){return e.includes(f)}));return Object(Se.jsx)(c.a.Fragment,{children:Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsxs)(w.a,{className:t.paper,children:[j&&Object(Se.jsx)(C.a,{}),null!=l&&l.length>0?Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(Se.jsx)("span",{className:t.actionsTitle,children:"Assign Groups"}),Object(Se.jsx)(v.a,{placeholder:"Filter by Group",className:t.filterField,id:"search-resource",label:"",InputProps:{startAdornment:Object(Se.jsx)(lt.a,{position:"start",children:Object(Se.jsx)(ut.a,{})})},onChange:function(e){g(e.target.value)}})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.tableBlock,children:Object(Se.jsx)(kn,{columns:[{label:"Group",elementKey:""}],onSelect:function(e){var t=e.target,n=t.value,a=t.checked,c=Object(st.a)(S);return a?c.push(n):c=c.filter((function(e){return e!==n})),i(c),c},selectedItems:S,isLoading:j,records:k,entityName:"Groups",idField:"",customPaperHeight:t.multiSelectTable})})]}):Object(Se.jsx)("div",{className:t.noFound,children:"No Groups Available"})]})})})}))),Ar={setModalErrorSnackMessage:Q},_r=Object(o.b)(null,Ar),Ir=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({strongText:{fontWeight:700},keyName:{marginLeft:5},buttonContainer:{textAlign:"right"}},De))}))(_r((function(e){var t=e.classes,n=e.closeModalAndRefresh,i=e.selectedUser,r=e.open,o=e.setModalErrorSnackMessage,s=Object(a.useState)(!1),l=Object(h.a)(s,2),d=l[0],u=l[1],b=Object(a.useState)(""),j=Object(h.a)(b,2),m=j[0],p=j[1],O=Object(a.useState)(""),f=Object(h.a)(O,2),g=f[0],v=f[1],S=Object(a.useState)(!1),k=Object(h.a)(S,2),w=k[0],N=k[1],T=Object(a.useState)([]),E=Object(h.a)(T,2),A=E[0],_=E[1],I=Object(a.useState)([]),L=Object(h.a)(I,2),D=L[0],F=L[1],M=Object(a.useCallback)((function(){if(!i)return null;ye.invoke("GET","/api/v1/users/".concat(i.accessKey)).then((function(e){u(!1),p(e.accessKey),_(e.memberOf||[]),F(e.memberOf||[]),N("enabled"===e.status)})).catch((function(e){u(!1),o(e)}))}),[i,o]);Object(a.useEffect)((function(){null==i?(p(""),v(""),_([])):M()}),[i,M]);var R=""!==m.trim()&&(""!==g.trim()&&null===i||null!==i);return Object(Se.jsxs)(_n,{onClose:function(){n()},modalOpen:r,title:null!==i?"Edit User":"Create User",children:[null!==i&&Object(Se.jsx)("div",{className:t.floatingEnabled,children:Object(Se.jsx)(Zn,{indicatorLabels:["Enabled","Disabled"],checked:w,value:"user_enabled",id:"user-status",name:"user-status",onChange:function(e){N(e.target.checked)},switchOnly:!0})}),Object(Se.jsx)(c.a.Fragment,{children:Object(Se.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){if(e.preventDefault(),g.length<8)return o("Passwords must be at least 8 characters long"),void u(!1);d||(u(!0),null!==i?ye.invoke("PUT","/api/v1/users/".concat(i.accessKey),{status:w?"enabled":"disabled",groups:A}).then((function(e){u(!1),n()})).catch((function(e){u(!1),o(e)})):ye.invoke("POST","api/v1/users",{accessKey:m,secretKey:g,groups:A}).then((function(e){u(!1),n()})).catch((function(e){u(!1),o(e)})))}(e)},children:Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.formScrollable,children:[Object(Se.jsx)(Dn,{id:"accesskey-input",name:"accesskey-input",label:"Access Key",value:m,onChange:function(e){p(e.target.value)},disabled:null!==i}),null!==i?Object(Se.jsx)(oa,{label:"Current Groups",content:D.join(", ")}):Object(Se.jsx)(Dn,{id:"standard-multiline-static",name:"standard-multiline-static",label:"Secret Key",type:"password",value:g,onChange:function(e){v(e.target.value)},autoComplete:"current-password"}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Er,{selectedGroups:A,setSelectedGroups:function(e){_(e)}})})]}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.buttonContainer,children:[Object(Se.jsx)("button",{type:"button",color:"primary",className:t.clearButton,onClick:function(){null===i?(p(""),v(""),_([])):_([])},children:"Clear"}),Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:d||!R,children:"Save"})]}),d&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(C.a,{})})]})})})]})}))),Lr={setErrorSnackMessage:H},Dr=Object(o.b)(null,Lr)((function(e){var t=e.closeDeleteModalAndRefresh,n=e.deleteOpen,c=e.selectedUser,i=e.setErrorSnackMessage,r=Object(a.useState)(!1),o=Object(h.a)(r,2),s=o[0],l=o[1];return null===c?Object(Se.jsx)("div",{}):Object(Se.jsxs)(wn.a,{open:n,onClose:function(){t(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(Se.jsx)(Nn.a,{id:"alert-dialog-title",children:"Delete User"}),Object(Se.jsxs)(Tn.a,{children:[s&&Object(Se.jsx)(C.a,{}),Object(Se.jsxs)($n.a,{id:"alert-dialog-description",children:["Are you sure you want to delete user ",Object(Se.jsx)("b",{children:c.accessKey}),"?"]})]}),Object(Se.jsxs)(Xn.a,{children:[Object(Se.jsx)(x.a,{onClick:function(){t(!1)},color:"primary",disabled:s,children:"Cancel"}),Object(Se.jsx)(x.a,{onClick:function(){s||null!=c&&(l(!0),ye.invoke("DELETE","/api/v1/users/".concat(c.accessKey),{id:c.id}).then((function(e){l(!1),t(!0)})).catch((function(e){l(!1),i(e)})))},color:"secondary",autoFocus:!0,children:"Delete"})]})]})})),Fr={setModalErrorSnackMessage:Q},Mr=Object(o.b)(null,Fr),Rr=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({strongText:{fontWeight:700},keyName:{marginLeft:5},buttonContainer:{textAlign:"right"}},De))}))(Mr((function(e){var t=e.open,n=e.checkedUsers,i=e.closeModalAndRefresh,r=e.classes,o=e.setModalErrorSnackMessage,s=Object(a.useState)(!1),l=Object(h.a)(s,2),d=l[0],u=l[1],b=Object(a.useState)(!1),j=Object(h.a)(b,2),m=j[0],p=j[1],O=Object(a.useState)([]),f=Object(h.a)(O,2),g=f[0],v=f[1];Object(a.useEffect)((function(){d&&(g.length>0?ye.invoke("PUT","/api/v1/users-groups-bulk",{groups:g,users:n}).then((function(){u(!1),p(!0)})).catch((function(e){u(!1),o(e)})):(u(!1),o("You need to select at least one group to assign")))}),[d,u,i,g,n,o]);return Object(Se.jsx)(_n,{modalOpen:t,onClose:function(){i(m)},title:m?"The selected users were added to the following groups.":"Add Users to Group",children:m?Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsx)(oa,{label:"Groups",content:g.join(", ")}),Object(Se.jsx)(oa,{label:"Users",content:n.join(", ")})]}),Object(Se.jsx)("br",{}),Object(Se.jsx)("br",{}),Object(Se.jsx)("br",{})]}):Object(Se.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),u(!0)},children:Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:r.formScrollable,children:[Object(Se.jsx)(oa,{label:"Selected Users",content:n.join(", ")}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Er,{selectedGroups:g,setSelectedGroups:v})})]}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:r.buttonContainer,children:[Object(Se.jsx)("button",{type:"button",color:"primary",className:r.clearButton,onClick:function(){v([])},children:"Clear"}),Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:d||g.length<1,children:"Save"})]}),d&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(C.a,{})})]})})})}))),Br=Object(o.b)(null,{setModalErrorSnackMessage:Q}),Pr=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column",paddingTop:15,boxShadow:"none"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},wrapCell:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},noFound:{textAlign:"center",padding:"10px 0"},tableContainer:{maxHeight:200},stickyHeader:{backgroundColor:"#fff"},actionsTitle:{fontWeight:600,color:"#000",fontSize:16,alignSelf:"center"},tableBlock:{marginTop:15},filterField:{width:375,fontWeight:600,"& .input":{"&::placeholder":{fontWeight:600,color:"#000"}}}},ze),Ge))}))(Br((function(e){var t=e.classes,n=e.selectedPolicy,i=void 0===n?[]:n,r=e.setSelectedPolicy,o=e.setModalErrorSnackMessage,s=Object(a.useState)([]),l=Object(h.a)(s,2),d=l[0],u=l[1],b=Object(a.useState)(!1),j=Object(h.a)(b,2),m=j[0],p=j[1],O=Object(a.useState)(""),f=Object(h.a)(O,2),g=f[0],x=f[1],S=Object(a.useCallback)((function(){p(!0),ye.invoke("GET","/api/v1/policies?limit=1000").then((function(e){var t=null===e.policies?[]:e.policies;p(!1),u(t.sort(Or))})).catch((function(e){p(!1),o(e)}))}),[o]);Object(a.useEffect)((function(){p(!0)}),[]),Object(a.useEffect)((function(){m&&S()}),[m,S]);var k=d.filter((function(e){return e.name.includes(g)}));return Object(Se.jsx)(c.a.Fragment,{children:Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsxs)(w.a,{className:t.paper,children:[m&&Object(Se.jsx)(C.a,{}),d.length>0?Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(Se.jsx)("span",{className:t.actionsTitle,children:"Assign Policies"}),Object(Se.jsx)(v.a,{placeholder:"Filter by Policy",className:t.filterField,id:"search-resource",label:"",InputProps:{startAdornment:Object(Se.jsx)(lt.a,{position:"start",children:Object(Se.jsx)(ut.a,{})})},onChange:function(e){x(e.target.value)}})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.tableBlock,children:Object(Se.jsx)(kn,{columns:[{label:"Policy",elementKey:"name"}],onSelect:function(e){var t=e.target,n=t.value,a=t.checked,c=Object(st.a)(i);a?c.push(n):c=c.filter((function(e){return e!==n})),c=c.filter((function(e){return""!==e})),r(c)},selectedItems:i,isLoading:m,records:k,entityName:"Policies",idField:"name",customPaperHeight:t.multiSelectTable})})]}):Object(Se.jsx)("div",{className:t.noFound,children:"No Policies Available"})]})})})}))),zr={setModalErrorSnackMessage:Q},Kr=Object(o.b)(null,zr),Ur=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({},De),{},{buttonContainer:{textAlign:"right"}}))}))(Kr((function(e){var t=e.classes,n=e.closeModalAndRefresh,c=e.selectedUser,i=e.selectedGroup,r=e.setModalErrorSnackMessage,o=e.open,s=Object(a.useState)(!1),l=Object(h.a)(s,2),d=l[0],u=l[1],b=Object(a.useState)([]),j=Object(h.a)(b,2),m=j[0],p=j[1],O=Object(a.useState)([]),f=Object(h.a)(O,2),g=f[0],v=f[1];Object(a.useEffect)((function(){if(o){if(null!==i)return void(i&&ye.invoke("GET","/api/v1/groups/".concat(i)).then((function(e){var t=X()(e,"policy","");p(t.split(",")),v(t.split(","))})).catch((function(e){r(e),u(!1)})));var e=X()(c,"policy",[]);p(e),v(e)}}),[o,i,c]);var S=X()(c,"accessKey","");return Object(Se.jsxs)(_n,{onClose:function(){n()},modalOpen:o,title:"Set Policies",children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(oa,{label:"Selected ".concat(null!==i?"Group":"User"),content:null!==i?i:S})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(oa,{label:"Current Policy",content:m.join(", ")})}),Object(Se.jsx)(Pr,{selectedPolicy:g,setSelectedPolicy:v}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.buttonContainer,children:[Object(Se.jsx)("button",{type:"button",color:"primary",className:t.clearButton,onClick:function(){v(m)},children:"Clear"}),Object(Se.jsx)(x.a,{type:"button",variant:"contained",color:"primary",disabled:d,onClick:function(){var e="user",t=null;null!==i?(e="group",t=i):null!==c&&(t=c.accessKey),u(!0),ye.invoke("PUT","/api/v1/set-policy/".concat(g),{entityName:t,entityType:e}).then((function(){u(!1),n()})).catch((function(e){u(!1),r(e)}))},children:"Save"})]}),d&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(C.a,{})})]})}))),Wr={setErrorSnackMessage:H},Gr=Object(o.b)(null,Wr),qr=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},wrapCell:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}}},ze),Ke),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(Gr((function(e){var t=e.classes,n=e.setErrorSnackMessage,i=Object(a.useState)([]),r=Object(h.a)(i,2),o=r[0],s=r[1],l=Object(a.useState)(!1),d=Object(h.a)(l,2),u=d[0],b=d[1],m=Object(a.useState)(!1),p=Object(h.a)(m,2),O=p[0],f=p[1],g=Object(a.useState)(!1),S=Object(h.a)(g,2),C=S[0],k=S[1],w=Object(a.useState)(null),N=Object(h.a)(w,2),T=N[0],E=N[1],A=Object(a.useState)(!1),_=Object(h.a)(A,2),I=_[0],L=_[1],D=Object(a.useState)(""),F=Object(h.a)(D,2),M=F[0],R=F[1],B=Object(a.useState)([]),P=Object(h.a)(B,2),z=P[0],K=P[1],U=Object(a.useState)(!1),W=Object(h.a)(U,2),G=W[0],q=W[1],V=Object(a.useCallback)((function(){b(!0),ye.invoke("GET","/api/v1/users").then((function(e){var t=null===e.users?[]:e.users;b(!1),s(t.sort(pr))})).catch((function(e){b(!1),n(e)}))}),[b,s,n]);Object(a.useEffect)((function(){V()}),[V]);var H=o.filter((function(e){return e.accessKey.includes(M)})),Y=atob(localStorage.getItem("userLoggedIn")||""),Q=[{type:"view",onClick:function(e){j.push("/users/".concat(e.accessKey))}},{type:"delete",onClick:function(e){k(!0),E(e)},disableButtonFunction:function(e){return e===Y}}];return Object(Se.jsxs)(c.a.Fragment,{children:[O&&Object(Se.jsx)(Ir,{open:O,selectedUser:T,closeModalAndRefresh:function(){f(!1),V()}}),G&&Object(Se.jsx)(Ur,{open:G,selectedUser:T,selectedGroup:null,closeModalAndRefresh:function(){q(!1),V()}}),C&&Object(Se.jsx)(Dr,{deleteOpen:C,selectedUser:T,closeDeleteModalAndRefresh:function(e){!function(e){k(!1),e&&V()}(e)}}),I&&Object(Se.jsx)(Rr,{open:I,checkedUsers:z,closeModalAndRefresh:function(e){!function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];L(!1),e&&K([])}(e)}}),Object(Se.jsx)(na,{label:"Users"}),Object(Se.jsx)(y.a,{container:!0,children:Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.container,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(Se.jsx)(v.a,{placeholder:"Search Users",className:t.searchField,id:"search-resource",label:"",InputProps:{disableUnderline:!0,startAdornment:Object(Se.jsx)(lt.a,{position:"start",children:Object(Se.jsx)(ut.a,{})})},onChange:function(e){R(e.target.value)}}),Object(Se.jsx)(x.a,{variant:"contained",color:"primary",startIcon:Object(Se.jsx)(wr.a,{}),disabled:z.length<=0,onClick:function(){z.length>0&&L(!0)},children:"Add to Group"}),Object(Se.jsx)(x.a,{variant:"contained",color:"primary",startIcon:Object(Se.jsx)(ft,{}),onClick:function(){f(!0),E(null)},children:"Create User"})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(kn,{itemActions:Q,columns:[{label:"Access Key",elementKey:"accessKey"}],onSelect:function(e){var t=e.target,n=t.value,a=t.checked,c=Object(st.a)(z);return a?c.push(n):c=c.filter((function(e){return e!==n})),K(c),c},selectedItems:z,isLoading:u,records:H,entityName:"Users",idField:"accessKey"})})]})})]})}))),Vr=n(362),Hr={setModalErrorSnackMessage:Q},Yr=Object(o.b)(null,Hr),Qr=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({strongText:{fontWeight:700},keyName:{marginLeft:5},buttonContainer:{textAlign:"right"}},De))}))(Yr((function(e){var t=e.classes,n=e.closeModalAndRefresh,i=e.selectedUser,r=e.open,o=e.setModalErrorSnackMessage,s=Object(a.useState)(!1),l=Object(h.a)(s,2),d=l[0],u=l[1],b=Object(a.useState)(""),j=Object(h.a)(b,2),m=j[0],p=j[1],O=Object(a.useState)(""),f=Object(h.a)(O,2),g=f[0],v=f[1],S=Object(a.useState)(!1),k=Object(h.a)(S,2),w=k[0],N=k[1],T=Object(a.useState)([]),E=Object(h.a)(T,2),A=E[0],_=E[1],I=Object(a.useCallback)((function(){if(!i)return null;ye.invoke("GET","/api/v1/users/".concat(i)).then((function(e){u(!1),p(e.accessKey),_(e.memberOf||[]),N("enabled"===e.status)})).catch((function(e){u(!1),o(e)}))}),[i,o]);Object(a.useEffect)((function(){null==i?(p(""),v(""),_([])):I()}),[i,I]);var L=""!==m.trim()&&(""!==g.trim()&&null===i||null!==i);return Object(Se.jsx)(_n,{onClose:function(){n()},modalOpen:r,title:"Set Groups",children:Object(Se.jsx)(c.a.Fragment,{children:Object(Se.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),d||(u(!0),null!==i?ye.invoke("PUT","/api/v1/users/".concat(i),{status:w?"enabled":"disabled",groups:A}).then((function(e){u(!1),n()})).catch((function(e){u(!1),o(e)})):ye.invoke("POST","/api/v1/users",{accessKey:m,secretKey:g,groups:A}).then((function(e){u(!1),n()})).catch((function(e){u(!1),o(e)})))},children:Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.formScrollable,children:Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Er,{selectedGroups:A,setSelectedGroups:function(e){_(e)}})})}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.buttonContainer,children:[Object(Se.jsx)("button",{type:"button",color:"primary",className:t.clearButton,onClick:function(){null===i?(p(""),v(""),_([])):_([])},children:"Clear"}),Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:d||!L,children:"Save"})]}),d&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(C.a,{})})]})})})})}))),Zr={setModalErrorSnackMessage:Q},Jr=Object(o.b)(null,Zr),$r=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({},De),{},{buttonContainer:{textAlign:"right"}}))}))(Jr((function(e){var t=e.classes,n=e.closeModalAndRefresh,c=e.selectedUser,i=e.currentPolicies,r=e.setModalErrorSnackMessage,o=e.open,s=Object(a.useState)(!1),l=Object(h.a)(s,2),d=l[0],u=l[1],b=Object(a.useState)([]),j=Object(h.a)(b,2),m=j[0],p=j[1],O=Object(a.useState)([]),f=Object(h.a)(O,2),g=f[0],v=f[1];return Object(a.useEffect)((function(){if(o){var e,t=[],n=Object(ni.a)(i);try{for(n.s();!(e=n.n()).done;){var a=e.value;t.push(a.policy)}}catch(c){n.e(c)}finally{n.f()}p(t),v(t)}}),[o,c]),Object(Se.jsxs)(_n,{onClose:function(){n()},modalOpen:o,title:"Set Policies",children:[Object(Se.jsx)(Pr,{selectedPolicy:g,setSelectedPolicy:v}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.buttonContainer,children:[Object(Se.jsx)("button",{type:"button",color:"primary",className:t.clearButton,onClick:function(){v(m)},children:"Clear"}),Object(Se.jsx)(x.a,{type:"button",variant:"contained",color:"primary",disabled:d,onClick:function(){var e=c;u(!0),ye.invoke("PUT","/api/v1/set-policy/".concat(g),{entityName:e,entityType:"user"}).then((function(){u(!1),n()})).catch((function(e){u(!1),r(e)}))},children:"Save"})]}),d&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(C.a,{})})]})}))),Xr=n(670),eo=Object(o.b)((function(e){return{session:e.console.session}}),{setErrorSnackMessage:H}),to=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)({},Ke),ze),{},{actionsTray:Object(m.a)(Object(m.a)({},ze.actionsTray),{},{padding:"15px 0 0"})}))}))(eo((function(e){var t=e.classes,n=e.user,i=e.setErrorSnackMessage,r=Object(a.useState)([]),o=Object(h.a)(r,2),s=o[0],l=o[1],d=Object(a.useState)(!1),u=Object(h.a)(d,2),b=u[0],j=u[1],m=Object(a.useState)(""),p=Object(h.a)(m,2),O=p[0],f=p[1],g=Object(a.useState)(!1),x=Object(h.a)(g,2),S=x[0],C=x[1],k=Object(a.useState)(!1),w=Object(h.a)(k,2),N=w[0],T=w[1],E=Object(a.useState)(null),A=Object(h.a)(E,2),_=A[0],I=A[1],L=Object(a.useState)(!1),D=Object(h.a)(L,2),F=D[0],M=D[1],R=Object(a.useState)(null),B=Object(h.a)(R,2),P=B[0],z=B[1];Object(a.useEffect)((function(){K()}),[]),Object(a.useEffect)((function(){b&&ye.invoke("GET","/api/v1/users/".concat(n,"/service-accounts")).then((function(e){var t=e.sort(fr);j(!1),l(t)})).catch((function(e){i(e),j(!1)}))}),[b,j,l,i,n]);var K=function(){j(!0)},U=[{type:"delete",onClick:function(e){I(e),T(!0)}}],W=s.filter((function(e){return e.toLowerCase().includes(O.toLowerCase())}));return Object(Se.jsxs)(c.a.Fragment,{children:[S&&Object(Se.jsx)(ur,{open:S,closeModalAndRefresh:function(e){!function(e){if(C(!1),K(),null!==e){var t={console:{accessKey:"".concat(e.accessKey),secretKey:"".concat(e.secretKey)}};z(t),M(!0)}}(e)}}),N&&Object(Se.jsx)(hr,{deleteOpen:N,selectedServiceAccount:_,closeDeleteModalAndRefresh:function(e){!function(e){T(!1),e&&K()}(e)}}),F&&Object(Se.jsx)(mr,{newServiceAccount:P,open:F,closeModal:function(){M(!1),z(null)},entity:"Service Account"}),Object(Se.jsx)(y.a,{container:!0,children:Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.container,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.actionsTray,children:Object(Se.jsx)(v.a,{placeholder:"Search Service Accounts",className:t.searchField,id:"search-resource",label:"",InputProps:{disableUnderline:!0,startAdornment:Object(Se.jsx)(lt.a,{position:"start",children:Object(Se.jsx)(ut.a,{})})},onChange:function(e){f(e.target.value)}})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(kn,{isLoading:b,records:W,entityName:"Service Accounts",idField:"",columns:[{label:"Service Account",elementKey:""}],itemActions:U})})]})})]})}))),no=n(204),ao=n.n(no),co=Object(o.b)(null,{setModalErrorSnackMessage:Q}),io=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)({buttonContainer:{textAlign:"right"}},ze),De),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(co((function(e){var t=e.classes,n=e.open,c=e.userName,i=e.closeModal,r=e.setModalErrorSnackMessage,o=Object(a.useState)(""),s=Object(h.a)(o,2),l=s[0],d=s[1],u=Object(a.useState)(""),b=Object(h.a)(u,2),j=b[0],m=b[1],p=Object(a.useState)(!1),O=Object(h.a)(p,2),f=O[0],g=O[1];return n?Object(Se.jsx)(_n,{title:"Change User Password",modalOpen:n,onClose:function(){d(""),m(""),i()},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:Object(Se.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){if(e.preventDefault(),!f){if(g(!0),l.length<8)return r("Passwords must be at least 8 characters long"),void g(!1);if(l.length<8)return r("Passwords must be at least 8 characters long"),void g(!1);var t={selectedUser:c,newSecretKey:l};ye.invoke("POST","/api/v1/account/change-user-password",t).then((function(e){g(!1),d(""),m(""),i()})).catch((function(e){g(!1),d(""),m(""),r(e)}))}}(e)},children:Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.formScrollable,children:[Object(Se.jsxs)("h3",{children:["Change password for ",c]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"new-password",name:"new-password",onChange:function(e){d(e.target.value)},label:"New Password",type:"password",value:l})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"re-new-password",name:"re-new-password",onChange:function(e){m(e.target.value)},label:"Type New Password Again",type:"password",value:j})})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.buttonContainer,children:Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:f||!(j.length>0&&l===j),children:"Save"})}),f&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(C.a,{})})]})})}):null}))),ro={setErrorSnackMessage:H},oo=Object(o.b)(null,ro)((function(e){var t=e.closeDeleteModalAndRefresh,n=e.deleteOpen,c=e.userName,i=e.setErrorSnackMessage,r=Object(a.useState)(!1),o=Object(h.a)(r,2),s=o[0],l=o[1];return null===c?Object(Se.jsx)("div",{}):Object(Se.jsxs)(wn.a,{open:n,onClose:function(){t(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(Se.jsx)(Nn.a,{id:"alert-dialog-title",children:"Delete User"}),Object(Se.jsxs)(Tn.a,{children:[s&&Object(Se.jsx)(C.a,{}),Object(Se.jsxs)($n.a,{id:"alert-dialog-description",children:["Are you sure you want to delete user ",Object(Se.jsx)("b",{children:c}),"?"]})]}),Object(Se.jsxs)(Xn.a,{children:[Object(Se.jsx)(x.a,{onClick:function(){t(!1)},color:"primary",disabled:s,children:"Cancel"}),Object(Se.jsx)(x.a,{onClick:function(){s||null!=c&&(l(!0),ye.invoke("DELETE","/api/v1/users/".concat(c),{id:c}).then((function(e){l(!1),t(!0)})).catch((function(e){l(!1),i(e)}))),t(!0),j.push("/users/")},color:"secondary",autoFocus:!0,children:"Delete"})]})]})}));function so(e){return{id:"simple-tab-".concat(e),"aria-controls":"simple-tabpanel-".concat(e)}}var lo,uo={setErrorSnackMessage:H},bo=Object(o.b)(null,uo),jo=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},wrapCell:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},fixedHeight:{height:165,minWidth:247,padding:"25px 28px","& svg":{maxHeight:18}},paperContainer:{padding:15,paddingLeft:50,display:"flex"},gridContainer:{display:"grid",gridTemplateColumns:"auto auto",gridGap:8,justifyContent:"flex-start",alignItems:"center","& div:not(.MuiCircularProgress-root)":{display:"flex",alignItems:"center"},"& div:nth-child(odd)":{justifyContent:"flex-end",fontWeight:700},"& div:nth-child(2n)":{minWidth:150}}},ze),Ke),{},{actionsTray:Object(m.a)(Object(m.a)({},ze.actionsTray),{},{justifyContent:"flex-end"})},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(bo((function(e){var t=e.classes,n=e.match,i=Object(a.useState)(0),r=Object(h.a)(i,2),o=r[0],s=r[1],l=Object(a.useState)(!1),d=Object(h.a)(l,2),u=d[0],b=d[1],p=Object(a.useState)(!1),O=Object(h.a)(p,2),f=O[0],g=O[1],v=Object(a.useState)(!1),S=Object(h.a)(v,2),C=S[0],k=S[1],N=Object(a.useState)(!1),T=Object(h.a)(N,2),E=T[0],A=T[1],_=Object(a.useState)(!1),I=Object(h.a)(_,2),L=I[0],D=I[1],F=Object(a.useState)([]),M=Object(h.a)(F,2),R=M[0],B=M[1],P=Object(a.useState)([]),z=Object(h.a)(P,2),K=z[0],U=z[1],W=Object(a.useState)([]),G=Object(h.a)(W,2),q=G[0],V=G[1],H=Object(a.useState)(!1),Y=Object(h.a)(H,2),Z=Y[0],J=Y[1],$=Object(a.useState)(!1),X=Object(h.a)($,2),ee=X[0],te=X[1],ne=Object(a.useState)(null),ae=Object(h.a)(ne,2),ce=ae[0],ie=ae[1],re=n.params.userName,oe=Object(a.useCallback)((function(){if(""===re)return null;b(!0),ye.invoke("GET","/api/v1/users/".concat(re)).then((function(e){A(!1);var t=e.memberOf||[];B(t);var n,a=[],c=Object(ni.a)(t);try{for(c.s();!(n=c.n()).done;){var i=n.value;a.push({group:i})}}catch(d){c.e(d)}finally{c.f()}U(a);var r,o=[],s=Object(ni.a)(e.policy);try{for(s.s();!(r=s.n()).done;){var l=r.value;o.push({policy:l})}}catch(d){s.e(d)}finally{s.f()}V(o),D("enabled"===e.status),ie(e.user),b(!1)})).catch((function(e){A(!1),b(!1),Q(e)}))}),[re]),se=c.a.useState(null),le=Object(h.a)(se,2),de=le[0],ue=le[1];Object(a.useEffect)((function(){oe()}),[oe]);var be=atob(localStorage.getItem("userLoggedIn")||"");return Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsx)(na,{label:"User: ".concat(re)}),f&&Object(Se.jsx)(Qr,{open:f,selectedUser:re,closeModalAndRefresh:function(){g(!1),oe()}}),C&&Object(Se.jsx)($r,{open:C,selectedUser:re,currentPolicies:q,closeModalAndRefresh:function(){k(!1),oe()}}),ee&&Object(Se.jsx)(oo,{deleteOpen:ee,userName:re,closeDeleteModalAndRefresh:function(e){!function(e){te(!1),e&&oe()}(e)}}),Z&&Object(Se.jsx)(io,{open:Z,userName:re,closeModal:function(){return J(!1)}}),Object(Se.jsx)(y.a,{container:!0,children:Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.container,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(y.a,{container:!0,spacing:2,children:Object(Se.jsx)(y.a,{item:!0,children:Object(Se.jsxs)(w.a,{className:t.paperContainer,children:[Object(Se.jsxs)("div",{className:t.gridContainer,children:[Object(Se.jsx)("div",{children:"Enabled:"}),Object(Se.jsx)("div",{className:t.capitalizeFirst,children:Object(Se.jsx)(Zn,{checked:L,value:"user_enabled",id:"user-status",name:"user-status",disabled:be===re,onChange:function(e){var t;D(e.target.checked),t=e.target.checked,E||(A(!0),ye.invoke("PUT","/api/v1/users/".concat(re),{status:t?"enabled":"disabled",groups:R}).then((function(e){A(!1)})).catch((function(e){A(!1),Q(e)})))},switchOnly:!0})})]}),Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(Vt.a,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true",onClick:function(e){ue(e.currentTarget)},children:Object(Se.jsx)(ao.a,{})}),Object(Se.jsxs)(Vr.a,{id:"long-menu",anchorEl:de,keepMounted:!0,open:Boolean(de),children:[Object(Se.jsx)(Bn.a,{onClick:function(){ue(null),J(!0)},children:"Change User Password"},"changeUserPassword"),Object(Se.jsx)(Bn.a,{onClick:function(){ue(null),te(!0)},children:"Delete User"},"deleteUser")]})]})]})})})}),Object(Se.jsx)("h1",{children:null!=ce&&ce.id}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsxs)(y.a,{container:!0,item:!0,xs:12,children:[Object(Se.jsx)(y.a,{item:!0,xs:9,children:Object(Se.jsxs)(ja.a,{value:o,onChange:function(e,t){s(t)},indicatorColor:"primary",textColor:"primary","aria-label":"cluster-tabs",variant:"scrollable",scrollButtons:"auto",children:[Object(Se.jsx)(ha.a,Object(m.a)({label:"Groups"},so(0))),Object(Se.jsx)(ha.a,Object(m.a)({label:"Service Accounts"},so(2))),Object(Se.jsx)(ha.a,Object(m.a)({label:"Policies"},so(1)))]})}),Object(Se.jsxs)(y.a,{item:!0,xs:3,className:t.actionsTray,children:[0===o&&Object(Se.jsx)(x.a,{variant:"contained",color:"primary",startIcon:Object(Se.jsx)(ft,{}),size:"medium",onClick:function(){g(!0)},children:"Add to Groups"}),2===o&&Object(Se.jsx)(a.Fragment,{children:Object(Se.jsx)(x.a,{variant:"contained",color:"primary",startIcon:Object(Se.jsx)(Xr.a,{}),size:"medium",onClick:function(){k(!0)},children:"Assign Policies"})})]})]}),Object(Se.jsxs)(y.a,{item:!0,xs:12,children:[Object(Se.jsx)(Oa,{index:0,value:o,children:Object(Se.jsx)(kn,{columns:[{label:"Name",elementKey:"group"}],isLoading:u,records:K,entityName:"Groups",idField:"group"})}),Object(Se.jsx)(Oa,{index:1,value:o,children:Object(Se.jsx)(to,{user:re})}),Object(Se.jsx)(Oa,{index:2,value:o,children:Object(Se.jsx)(kn,{itemActions:[{type:"view",onClick:function(e){j.push("/policies/".concat(e.policy))}}],columns:[{label:"Name",elementKey:"policy"}],isLoading:u,records:q,entityName:"Policies",idField:"policy"})})]})]})})]})}))),ho=Object(o.b)((function(e){return{open:e.system.sidebarOpen}}),{setMenuOpen:W}),mo=Object(s.h)(ho((function(){return Object(Se.jsx)(s.c,{history:j,children:Object(Se.jsxs)(s.d,{children:[Object(Se.jsx)(s.b,{path:"/users/:userName",component:jo}),Object(Se.jsx)(s.b,{path:"/",component:qr}),Object(Se.jsx)(s.b,{component:ot})]})})}))),po={setModalErrorSnackMessage:Q},Oo=Object(o.b)(null,po),fo=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column",paddingTop:15,boxShadow:"none"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},wrapCell:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},noFound:{textAlign:"center",padding:"10px 0"},tableContainer:{maxHeight:200},stickyHeader:{backgroundColor:"#fff"},actionsTitle:{fontWeight:600,color:"#000",fontSize:16,alignSelf:"center"},tableBlock:{marginTop:15},filterField:{width:375,fontWeight:600,"& .input":{"&::placeholder":{fontWeight:600,color:"#000"}}}},ze),Ge))}))(Oo((function(e){var t=e.classes,n=e.selectedUsers,i=e.setSelectedUsers,r=e.editMode,o=void 0!==r&&r,s=e.setModalErrorSnackMessage,l=Object(a.useState)([]),d=Object(h.a)(l,2),u=d[0],b=d[1],j=Object(a.useState)(!1),m=Object(h.a)(j,2),p=m[0],O=m[1],f=Object(a.useState)(""),g=Object(h.a)(f,2),x=g[0],S=g[1],k=Object(a.useCallback)((function(){ye.invoke("GET","/api/v1/users").then((function(e){var t=X()(e,"users",[]);t||(t=[]),b(t.sort(pr)),O(!1)})).catch((function(e){s(e),O(!1)}))}),[s]);Object(a.useEffect)((function(){O(!0)}),[]),Object(a.useEffect)((function(){p&&k()}),[p,k]);var N=n||[],T=u.filter((function(e){return e.accessKey.includes(x)}));return Object(Se.jsx)(c.a.Fragment,{children:Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsxs)(w.a,{className:t.paper,children:[p&&Object(Se.jsx)(C.a,{}),null!=u&&u.length>0?Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(Se.jsx)("span",{className:t.actionsTitle,children:o?"Edit Members":"Assign Users"}),Object(Se.jsx)(v.a,{placeholder:"Filter Users",className:t.filterField,id:"search-resource",label:"",InputProps:{startAdornment:Object(Se.jsx)(lt.a,{position:"start",children:Object(Se.jsx)(ut.a,{})})},onChange:function(e){S(e.target.value)}})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.tableBlock,children:Object(Se.jsx)(kn,{columns:[{label:"Access Key",elementKey:"accessKey"}],onSelect:function(e){var t=e.target,n=t.value,a=t.checked,c=Object(st.a)(N);return a?c.push(n):c=c.filter((function(e){return e!==n})),i(c),c},selectedItems:N,isLoading:p,records:T,entityName:"Users",idField:"accessKey",customPaperHeight:t.multiSelectTable})})]}):Object(Se.jsx)("div",{className:t.noFound,children:"No Users Available"})]})})})}))),go={setModalErrorSnackMessage:Q},xo=Object(o.b)(null,go),vo=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({strongText:{fontWeight:700},keyName:{marginLeft:5},buttonContainer:{textAlign:"right"}},De))}))(xo((function(e){var t=e.open,n=e.selectedGroup,i=e.closeModalAndRefresh,r=e.classes,o=e.setModalErrorSnackMessage,s=Object(a.useState)(""),l=Object(h.a)(s,2),d=l[0],u=l[1],b=Object(a.useState)(!1),j=Object(h.a)(b,2),m=j[0],p=j[1],O=Object(a.useState)(!1),f=Object(h.a)(O,2),g=f[0],v=f[1],S=Object(a.useState)([]),k=Object(h.a)(S,2),w=k[0],N=k[1],T=Object(a.useState)(!1),E=Object(h.a)(T,2),A=E[0],_=E[1],I=Object(a.useState)(!1),L=Object(h.a)(I,2),D=L[0],F=L[1];Object(a.useEffect)((function(){null!==n?_(!0):(u(""),N([]))}),[n]),Object(a.useEffect)((function(){F(""!==d.trim())}),[d,w]),Object(a.useEffect)((function(){if(g){null!==n?ye.invoke("PUT","/api/v1/groups/".concat(d),{group:d,members:w,status:m?"enabled":"disabled"}).then((function(e){v(!1),i()})).catch((function(e){v(!1),o(e)})):ye.invoke("POST","/api/v1/groups",{group:d,members:w}).then((function(e){v(!1),i()})).catch((function(e){v(!1),o(e)}))}}),[g,d,w,m,n,i,o]),Object(a.useEffect)((function(){if(n&&A){ye.invoke("GET","/api/v1/groups/".concat(n)).then((function(e){p("enabled"===e.status),u(e.name),N(e.members)})).catch((function(e){o(e),_(!1)}))}}),[A,n,o]);return Object(Se.jsxs)(_n,{modalOpen:t,onClose:i,title:null!==n?"Edit Group":"Create Group",children:[null!==n&&Object(Se.jsx)("div",{className:r.floatingEnabled,children:Object(Se.jsx)(Zn,{indicatorLabels:["Enabled","Disabled"],checked:m,value:"group_enabled",id:"group-status",name:"group-status",onChange:function(e){p(e.target.checked)},switchOnly:!0})}),Object(Se.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),v(!0)},children:Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:r.formScrollable,children:[null===n?Object(Se.jsx)(c.a.Fragment,{children:Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"group-name",name:"group-name",label:"Group Name",value:d,onChange:function(e){u(e.target.value)}})})}):Object(Se.jsx)(c.a.Fragment,{children:Object(Se.jsx)(oa,{label:"Group Name",content:n})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(fo,{selectedUsers:w,setSelectedUsers:N,editMode:null!==n})})]}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:r.buttonContainer,children:[Object(Se.jsx)("button",{type:"button",color:"primary",className:r.clearButton,onClick:function(){null===n&&u(""),N([])},children:"Clear"}),Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:g||!D,children:"Save"})]}),g&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(C.a,{})})]})})]})}))),yo={setErrorSnackMessage:H},So=Object(o.b)(null,yo),Co=So((function(e){var t=e.selectedGroup,n=e.deleteOpen,i=e.closeDeleteModalAndRefresh,r=e.setErrorSnackMessage,o=Object(a.useState)(!1),s=Object(h.a)(o,2),l=s[0],d=s[1];Object(a.useEffect)((function(){if(l){t&&ye.invoke("DELETE","/api/v1/groups/".concat(t)).then((function(){d(!1),i(!0)})).catch((function(e){d(!1),r(e)}))}}),[l,t,i,r]);var u=function(){i(!1)};return Object(Se.jsx)(c.a.Fragment,{children:Object(Se.jsxs)(wn.a,{open:n,onClose:u,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(Se.jsx)(Nn.a,{id:"alert-dialog-title",children:"Delete User"}),Object(Se.jsxs)(Tn.a,{children:[l&&Object(Se.jsx)(C.a,{}),Object(Se.jsxs)($n.a,{id:"alert-dialog-description",children:["Are you sure you want to delete group ",Object(Se.jsx)("b",{children:t}),"?"]})]}),Object(Se.jsxs)(Xn.a,{children:[Object(Se.jsx)(x.a,{onClick:u,color:"primary",disabled:l,children:"Cancel"}),Object(Se.jsx)(x.a,{onClick:function(){d(!0)},color:"secondary",autoFocus:!0,children:"Delete"})]})]})})})),ko={setErrorSnackMessage:H},wo=Object(o.b)(null,ko),No=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},wrapCell:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}}},ze),Ke),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(wo((function(e){var t=e.classes,n=e.setErrorSnackMessage,i=Object(a.useState)(!1),r=Object(h.a)(i,2),o=r[0],s=r[1],l=Object(a.useState)(null),d=Object(h.a)(l,2),u=d[0],b=d[1],j=Object(a.useState)(!1),m=Object(h.a)(j,2),p=m[0],O=m[1],f=Object(a.useState)(!1),g=Object(h.a)(f,2),S=g[0],C=g[1],k=Object(a.useState)([]),w=Object(h.a)(k,2),N=w[0],T=w[1],E=Object(a.useState)(""),A=Object(h.a)(E,2),_=A[0],I=A[1],L=Object(a.useState)(!1),D=Object(h.a)(L,2),F=D[0],M=D[1];Object(a.useEffect)((function(){C(!0)}),[]),Object(a.useEffect)((function(){C(!0)}),[]),Object(a.useEffect)((function(){if(S){ye.invoke("GET","/api/v1/groups").then((function(e){var t=[];null!==e.groups&&(t=e.groups.sort(fr)),T(t),C(!1)})).catch((function(e){n(e),C(!1)}))}}),[S,n]);var R=N.filter((function(e){return e.includes(_)})),B=[{type:"view",onClick:function(e){s(!0),b(e)}},{type:"description",onClick:function(e){M(!0),b(e)}},{type:"delete",onClick:function(e){O(!0),b(e)}}];return Object(Se.jsxs)(c.a.Fragment,{children:[o&&Object(Se.jsx)(vo,{open:o,selectedGroup:u,closeModalAndRefresh:function(){s(!1),C(!0)}}),p&&Object(Se.jsx)(Co,{deleteOpen:p,selectedGroup:u,closeDeleteModalAndRefresh:function(e){O(!1),e&&C(!0)}}),M&&Object(Se.jsx)(Ur,{open:F,selectedGroup:u,selectedUser:null,closeModalAndRefresh:function(){M(!1)}}),Object(Se.jsx)(na,{label:"Groups"}),Object(Se.jsx)(y.a,{container:!0,children:Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.container,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(Se.jsx)(v.a,{placeholder:"Search Groups",className:t.searchField,id:"search-resource",label:"",InputProps:{disableUnderline:!0,startAdornment:Object(Se.jsx)(lt.a,{position:"start",children:Object(Se.jsx)(ut.a,{})})},onChange:function(e){I(e.target.value)}}),Object(Se.jsx)(x.a,{variant:"contained",color:"primary",startIcon:Object(Se.jsx)(ft,{}),onClick:function(){b(null),s(!0)},children:"Create Group"})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(kn,{itemActions:B,columns:[{label:"Name",elementKey:""}],isLoading:S,records:R,entityName:"Groups",idField:""})})]})})]})}))),To="notify_postgres",Eo="notify_mysql",Ao="notify_kafka",_o="notify_amqp",Io="notify_mqtt",Lo="notify_redis",Do="notify_nats",Fo="notify_elasticsearch",Mo="notify_webhooks",Ro="notify_nsq",Bo=[{configuration_id:"region",configuration_label:"Edit Region Configuration"},{configuration_id:"cache",configuration_label:"Edit Cache Configuration"},{configuration_id:"compression",configuration_label:"Edit Compression Configuration"},{configuration_id:"etcd",configuration_label:"Edit Etcd Configuration"},{configuration_id:"identity_openid",configuration_label:"Edit Identity Openid Configuration"},{configuration_id:"identity_ldap",configuration_label:"Edit Identity LDAP Configuration"},{configuration_id:"logger_webhook",configuration_label:"Edit Logger Webhook Configuration"},{configuration_id:"audit_webhook",configuration_label:"Edit Audit Webhook Configuration"}],Po={region:[{name:"name",required:!0,label:"Server Location",tooltip:'Name of the location of the server e.g. "us-west-rack2"',type:"string",placeholder:"e.g. us-west-rack-2"},{name:"comment",required:!1,label:"Comment",tooltip:"You can add a comment to this setting",type:"comment",placeholder:"Enter Comment"}],cache:[{name:"drives",required:!0,label:"Drives",tooltip:'Mountpoints e.g. "/optane1" or "/optane2", you can write one per field',type:"csv",placeholder:"Enter Mount Point"},{name:"expiry",required:!1,label:"Expiry",tooltip:'Cache expiry duration in days e.g. "90"',type:"number",placeholder:"Enter Number of Days"},{name:"quota",required:!1,label:"Quota",tooltip:'Limit cache drive usage in percentage e.g. "90"',type:"number",placeholder:"Enter in %"},{name:"exclude",required:!1,label:"Exclude",tooltip:'Wildcard exclusion patterns e.g. "bucket/*.tmp" or "*.exe", you can write one per field',type:"csv",placeholder:"Enter Wildcard Exclusion Patterns"},{name:"after",required:!1,label:"After",tooltip:"Minimum number of access before caching an object",type:"number",placeholder:"Enter Number of Attempts"},{name:"watermark_low",required:!1,label:"Watermark Low",tooltip:"Watermark Low",type:"number",placeholder:"Enter Watermark Low"},{name:"watermark_high",required:!1,label:"Watermark High",tooltip:"Watermark High",type:"number",placeholder:"Enter Watermark High"},{name:"comment",required:!1,label:"Comment",tooltip:"You can add a comment to this setting",type:"comment",multiline:!0,placeholder:"Enter Comment"}],compression:[{name:"extensions",required:!1,label:"Extensions",tooltip:'Extensions to compress e.g. ".txt",".log" or ".csv", you can write one per field',type:"csv",placeholder:"Enter an Extension",withBorder:!0},{name:"mime_types",required:!1,label:"Mime Types",tooltip:'Mime types e.g. "text/*","application/json" or "application/xml", you can write one per field',type:"csv",placeholder:"Enter a Mime Type",withBorder:!0}],etcd:[{name:"endpoints",required:!0,label:"Endpoints",tooltip:'List of etcd endpoints e.g. "http://localhost:2379", you can write one per field',type:"csv",placeholder:"Enter Endpoint"},{name:"path_prefix",required:!1,label:"Path Prefix",tooltip:'namespace prefix to isolate tenants e.g. "customer1/"',type:"string",placeholder:"Enter Path Prefix"},{name:"coredns_path",required:!1,label:"Coredns Path",tooltip:'Shared bucket DNS records, default is "/skydns"',type:"string",placeholder:"Enter Coredns Path"},{name:"client_cert",required:!1,label:"Client Cert",tooltip:"Client cert for mTLS authentication",type:"string",placeholder:"Enter Client Cert"},{name:"client_cert_key",required:!1,label:"Client Cert Key",tooltip:"Client cert key for mTLS authentication",type:"string",placeholder:"Enter Client Cert Key"},{name:"comment",required:!1,label:"Comment",tooltip:"You can add a comment to this setting",type:"comment",multiline:!0,placeholder:"Enter Comment"}],identity_openid:[{name:"config_url",required:!1,label:"Config URL",tooltip:"Config URL for Client ID configuration",type:"string",placeholder:"Enter Config URL"},{name:"client_id",required:!1,label:"Client ID",type:"string",placeholder:"Enter Client ID"},{name:"claim_name",required:!1,label:"Claim Name",tooltip:"Claim Name",type:"string",placeholder:"Enter Claim Name"},{name:"claim_prefix",required:!1,label:"Claim Prefix",tooltip:"Claim Prefix",type:"string",placeholder:"Enter Claim Prefix"}],identity_ldap:[{name:"server_addr",required:!0,label:"Server Addr",tooltip:'AD/LDAP server address e.g. "myldapserver.com:636"',type:"string",placeholder:"Enter Server Address"},{name:"username_format",required:!0,label:"Username Format",tooltip:'List of username bind DNs e.g. "uid=%s","cn=accounts","dc=myldapserver" or "dc=com", you can write one per field',type:"csv",placeholder:"Enter Username Format"},{name:"username_search_filter",required:!0,label:"Username Search Filter",tooltip:'User search filter, for example "(cn=%s)" or "(sAMAccountName=%s)" or "(uid=%s)"',type:"string",placeholder:"Enter Username Search Filter"},{name:"group_search_filter",required:!0,label:"Group Search Filter",tooltip:'Search filter for groups e.g. "(&(objectclass=groupOfNames)(memberUid=%s))"',type:"string",placeholder:"Enter Group Search Filter"},{name:"username_search_base_dn",required:!1,label:"Username Search Base DN",tooltip:"List of username search DNs, you can write one per field",type:"csv",placeholder:"Enter Username Search Base DN"},{name:"group_name_attribute",required:!1,label:"Group Name Attribute",tooltip:'Search attribute for group name e.g. "cn"',type:"string",placeholder:"Enter Group Name Attribute"},{name:"sts_expiry",required:!1,label:"STS Expiry",tooltip:'temporary credentials validity duration in s,m,h,d. Default is "1h"',type:"string",placeholder:"Enter STS Expiry"},{name:"tls_skip_verify",required:!1,label:"TLS Skip Verify",tooltip:'Trust server TLS without verification, defaults to "off" (verify)',type:"on|off"},{name:"server_insecure",required:!1,label:"Server Insecure",tooltip:'Allow plain text connection to AD/LDAP server, defaults to "off"',type:"on|off"},{name:"comment",required:!1,label:"Comment",tooltip:"Optionally add a comment to this setting",type:"comment",placeholder:"Enter Comment"}],logger_webhook:[{name:"endpoint",required:!0,label:"Endpoint",type:"string",placeholder:"Enter Endpoint"},{name:"auth_token",required:!0,label:"Auth Token",type:"string",placeholder:"Enter Auth Token"}],audit_webhook:[{name:"endpoint",required:!0,label:"Endpoint",type:"string",placeholder:"Enter Endpoint"},{name:"auth_token",required:!0,label:"Auth Token",type:"string",placeholder:"Enter Auth Token"}]},zo=[{name:"queue-dir",label:"Queue Directory",required:!0,tooltip:"staging dir for undelivered messages e.g. '/home/events'",type:"string",placeholder:"Enter Queue Directory"},{name:"queue-limit",label:"Queue Limit",required:!1,tooltip:"maximum limit for undelivered messages, defaults to '10000'",type:"number",placeholder:"Enter Queue Limit"},{name:"comment",label:"Comment",required:!1,type:"comment",placeholder:"Enter Comment"}],Ko=(lo={},Object(Ne.a)(lo,Ao,[{name:"brokers",label:"Brokers",required:!0,tooltip:"Comma separated list of Kafka broker addresses",type:"string",placeholder:"Enter Brokers"},{name:"topic",label:"Topic",tooltip:"Kafka topic used for bucket notifications",type:"string",placeholder:"Enter Topic"},{name:"sasl_username",label:"SASL Username",tooltip:"Username for SASL/PLAIN or SASL/SCRAM authentication",type:"string",placeholder:"Enter SASL Username"},{name:"sasl_password",label:"SASL Password",tooltip:"Password for SASL/PLAIN or SASL/SCRAM authentication",type:"string",placeholder:"Enter SASL Password"},{name:"sasl_mechanism",label:"SASL Mechanism",tooltip:"SASL authentication mechanism, default 'PLAIN'",type:"string"},{name:"tls_client_auth",label:"TLS Client Auth",tooltip:"Client Auth determines the Kafka server's policy for TLS client auth",type:"string",placeholder:"Enter TLS Client Auth"},{name:"sasl",label:"SASL",tooltip:"Set to 'on' to enable SASL authentication",type:"on|off"},{name:"tls",label:"TLS",tooltip:"Set to 'on' to enable TLS",type:"on|off"},{name:"tls_skip_verify",label:"TLS skip verify",tooltip:'Trust server TLS without verification, defaults to "on" (verify)',type:"on|off"},{name:"client_tls_cert",label:"client TLS cert",tooltip:"Path to client certificate for mTLS auth",type:"path",placeholder:"Enter TLS Client Cert"},{name:"client_tls_key",label:"client TLS key",tooltip:"Path to client key for mTLS auth",type:"path",placeholder:"Enter TLS Client Key"},{name:"version",label:"Version",tooltip:"Specify the version of the Kafka cluster e.g '2.2.0'",type:"string",placeholder:"Enter Kafka Version"}].concat(zo)),Object(Ne.a)(lo,_o,[{name:"url",required:!0,label:"URL",tooltip:"AMQP server endpoint e.g. `amqp://myuser:mypassword@localhost:5672`",type:"url"},{name:"exchange",label:"Exchange",tooltip:"Name of the AMQP exchange",type:"string",placeholder:"Enter Exchange"},{name:"exchange_type",label:"Exchange Type",tooltip:"AMQP exchange type",type:"string",placeholder:"Enter Exchange Type"},{name:"routing_key",label:"Routing Key",tooltip:"Routing key for publishing",type:"string",placeholder:"Enter Routing Key"},{name:"mandatory",label:"Mandatory",tooltip:"Quietly ignore undelivered messages when set to 'off', default is 'on'",type:"on|off"},{name:"durable",label:"Durable",tooltip:"Persist queue across broker restarts when set to 'on', default is 'off'",type:"on|off"},{name:"no_wait",label:"No Wait",tooltip:"Non-blocking message delivery when set to 'on', default is 'off'",type:"on|off"},{name:"internal",label:"Internal",tooltip:"Set to 'on' for exchange to be not used directly by publishers, but only when bound to other exchanges",type:"on|off"},{name:"auto_deleted",label:"Auto Deleted",tooltip:"Auto delete queue when set to 'on', when there are no consumers",type:"on|off"},{name:"delivery_mode",label:"Delivery Mode",tooltip:"Set to '1' for non-persistent or '2' for persistent queue",type:"number",placeholder:"Enter Delivery Mode"}].concat(zo)),Object(Ne.a)(lo,Lo,[{name:"address",required:!0,label:"Address",tooltip:"Redis server's address. For example: `localhost:6379`",type:"address",placeholder:"Enter Address"},{name:"key",required:!0,label:"Key",tooltip:"Redis key to store/update events, key is auto-created",type:"string",placeholder:"Enter Key"},{name:"password",label:"Password",tooltip:"Redis server password",type:"string",placeholder:"Enter Password"}].concat(zo)),Object(Ne.a)(lo,Io,[{name:"broker",required:!0,label:"Broker",tooltip:"MQTT server endpoint e.g. `tcp://localhost:1883`",type:"uri",placeholder:"Enter Brokers"},{name:"topic",required:!0,label:"Topic",tooltip:"name of the MQTT topic to publish",type:"string",placeholder:"Enter Topic"},{name:"username",label:"Username",tooltip:"MQTT username",type:"string",placeholder:"Enter Username"},{name:"password",label:"Password",tooltip:"MQTT password",type:"string",placeholder:"Enter Password"},{name:"qos",label:"QOS",tooltip:"Set the quality of service priority, defaults to '0'",type:"number",placeholder:"Enter QOS"},{name:"keep_alive_interval",label:"Keep Alive Interval",tooltip:"Keep-alive interval for MQTT connections in s,m,h,d",type:"duration",placeholder:"Enter Keep Alive Internal"},{name:"reconnect_interval",label:"Reconnect Interval",tooltip:"Reconnect interval for MQTT connections in s,m,h,d",type:"duration",placeholder:"Enter Reconnect Interval"}].concat(zo)),Object(Ne.a)(lo,Do,[{name:"address",required:!0,label:"Address",tooltip:"NATS server address e.g. '0.0.0.0:4222'",type:"address",placeholder:"Enter Address"},{name:"subject",required:!0,label:"Subject",tooltip:"NATS subscription subject",type:"string",placeholder:"Enter NATS Subject"},{name:"username",label:"Username",tooltip:"NATS username",type:"string",placeholder:"Enter NATS Username"},{name:"password",label:"Password",tooltip:"NATS password",type:"string",placeholder:"Enter NATS password"},{name:"token",label:"Token",tooltip:"NATS token",type:"string",placeholder:"Enter NATS token"},{name:"tls",label:"TLS",tooltip:"Set to 'on' to enable TLS",type:"on|off"},{name:"tls_skip_verify",label:"TLS Skip Verify",tooltip:'Trust server TLS without verification, defaults to "on" (verify)',type:"on|off"},{name:"ping_interval",label:"Ping Interval",tooltip:"Client ping commands interval in s,m,h,d. Disabled by default",type:"duration",placeholder:"Enter Ping Interval"},{name:"streaming",label:"Streaming",tooltip:"Set to 'on', to use streaming NATS server",type:"on|off"},{name:"streaming_async",label:"Streaming async",tooltip:"Set to 'on', to enable asynchronous publish",type:"on|off"},{name:"streaming_max_pub_acks_in_flight",label:"Streaming max publish ACKS in flight",tooltip:"Number of messages to publish without waiting for ACKs",type:"number",placeholder:"Enter Streaming in flight value"},{name:"streaming_cluster_id",label:"Streaming Cluster ID",tooltip:"Unique ID for NATS streaming cluster",type:"string",placeholder:"Enter Streaming Cluster ID"},{name:"cert_authority",label:"Cert Authority",tooltip:"Path to certificate chain of the target NATS server",type:"string",placeholder:"Enter Cert Authority"},{name:"client_cert",label:"Client Cert",tooltip:"Client cert for NATS mTLS auth",type:"string",placeholder:"Enter Client Cert"},{name:"client_key",label:"Client Key",tooltip:"Client cert key for NATS mTLS auth",type:"string",placeholder:"Enter Client Key"}].concat(zo)),Object(Ne.a)(lo,Fo,[{name:"url",required:!0,label:"URL",tooltip:"Elasticsearch server's address, with optional authentication info",type:"url",placeholder:"Enter URL"},{name:"index",required:!0,label:"Index",tooltip:"Elasticsearch index to store/update events, index is auto-created",type:"string",placeholder:"Enter Index"},{name:"format",required:!0,label:"Format",tooltip:"'namespace' reflects current bucket/object list and 'access' reflects a journal of object operations, defaults to 'namespace'",type:"enum",placeholder:"Enter Format"}].concat(zo)),Object(Ne.a)(lo,Mo,[{name:"endpoint",required:!0,label:"Endpoint",tooltip:"webhook server endpoint e.g. http://localhost:8080/minio/events",type:"url",placeholder:"Enter Endpoint"},{name:"auth_token",label:"Auth Token",tooltip:"opaque string or JWT authorization token",type:"string",placeholder:"Enter auth_token"}].concat(zo)),Object(Ne.a)(lo,Ro,[{name:"nsqd_address",required:!0,label:"NSQD Address",tooltip:"NSQ server address e.g. '127.0.0.1:4150'",type:"address",placeholder:"Enter nsqd_address"},{name:"topic",required:!0,label:"Topic",tooltip:"NSQ topic",type:"string",placeholder:"Enter Topic"},{name:"tls",label:"TLS",tooltip:"set to 'on' to enable TLS",type:"on|off"},{name:"tls_skip_verify",label:"TLS Skip Verify",tooltip:'trust server TLS without verification, defaults to "on" (verify)',type:"on|off"}].concat(zo)),lo),Uo=function(e){return e.filter((function(e){return""!==e.value}))},Wo=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)({},Le),Fe),{},{inputWithBorder:{border:"1px solid #EAEAEA",padding:15,height:150,overflowY:"auto",position:"relative",marginTop:15},labelContainer:{display:"flex"}}))}))((function(e){var t=e.elements,n=e.name,i=e.label,r=e.tooltip,o=void 0===r?"":r,s=e.commonPlaceholder,l=void 0===s?"":s,d=e.onChange,u=e.withBorder,b=void 0!==u&&u,j=e.classes,m=Object(a.useState)([""]),p=Object(h.a)(m,2),O=p[0],f=p[1],g=Object(a.createRef)();Object(a.useEffect)((function(){if(1===O.length&&""===O[0]&&t&&""!==t){var e=t.split(",");e.push(""),f(e)}}),[t,O]),Object(a.useEffect)((function(){if(O.length>1){var e=g.current;e&&e.scrollIntoView(!1)}}),[O,g]);var x=Object(a.useRef)(!0);Object(a.useLayoutEffect)((function(){x.current?x.current=!1:S()}),[O]);var v=function(e){e.persist();var t=Object(st.a)(O);t[X()(e.target,"dataset.index",0)]=e.target.value,f(t)},S=Za()((function(){var e=O.filter((function(e){return""!==e.trim()})).join(",");d(e)}),500),C=O.map((function(e,t){return Object(Se.jsx)(Dn,{id:"".concat(n,"-").concat(t.toString()),label:"",name:"".concat(n,"-").concat(t.toString()),value:O[t],onChange:v,index:t,placeholder:l,overlayIcon:t===O.length-1?Object(Se.jsx)(Xa,{}):null,overlayAction:function(){!function(e){if(""!==e[e.length-1].trim()){var t=Object(st.a)(e);t.push(""),f(t)}}(O)}},"csv-".concat(n,"-").concat(t.toString()))}));return Object(Se.jsx)(c.a.Fragment,{children:Object(Se.jsxs)(y.a,{item:!0,xs:12,className:j.fieldContainer,children:[Object(Se.jsxs)(fn.a,{className:j.inputLabel,children:[Object(Se.jsx)("span",{children:i}),""!==o&&Object(Se.jsx)("div",{className:j.tooltipContainer,children:Object(Se.jsx)(gn.a,{title:o,placement:"top-start",children:Object(Se.jsx)("div",{children:Object(Se.jsx)(xn,{className:j.tooltip})})})})]}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:"".concat(b?j.inputWithBorder:""),children:[C,Object(Se.jsx)("div",{ref:g})]})]})})})),Go=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)({},Le),Fe),{},{inputLabel:Object(m.a)(Object(m.a)({},Le.inputLabel),{},{marginBottom:16,fontSize:14}),textBoxContainer:{flexGrow:1,position:"relative"},errorState:{color:"#b53b4b",fontSize:14,position:"absolute",top:7,right:7},cssOutlinedInput:{borderColor:"#9C9C9C",padding:16},rootContainer:{"& .MuiOutlinedInput-inputMultiline":Object(m.a)(Object(m.a)({},Le.inputLabel),{},{fontSize:13,minHeight:150})}}))}))((function(e){var t=e.label,n=e.onChange,a=e.value,i=e.id,r=e.name,o=e.disabled,s=void 0!==o&&o,l=e.tooltip,d=void 0===l?"":l,u=e.index,b=void 0===u?0:u,j=e.error,h=void 0===j?"":j,m=e.required,p=void 0!==m&&m,O=e.placeholder,f=void 0===O?"":O,g=e.classes,x={"data-index":b};return Object(Se.jsx)(c.a.Fragment,{children:Object(Se.jsxs)(y.a,{item:!0,xs:12,className:"".concat(g.fieldContainer," ").concat(""!==h?g.errorInField:""),children:[""!==t&&Object(Se.jsxs)(fn.a,{htmlFor:i,className:g.inputLabel,children:[Object(Se.jsxs)("span",{children:[t,p?"*":""]}),""!==d&&Object(Se.jsx)("div",{className:g.tooltipContainer,children:Object(Se.jsx)(gn.a,{title:d,placement:"top-start",children:Object(Se.jsx)("div",{children:Object(Se.jsx)(xn,{className:g.tooltip})})})})]}),Object(Se.jsx)("div",{className:g.textBoxContainer,children:Object(Se.jsx)(v.a,{id:i,name:r,fullWidth:!0,value:a,disabled:s,onChange:n,multiline:!0,inputProps:x,error:""!==h,helperText:h,placeholder:f,InputLabelProps:{shrink:!0},InputProps:{classes:{notchedOutline:g.cssOutlinedInput,root:g.rootContainer}},variant:"outlined"})})]})})})),qo=function(e,t,n){var a="on|off"===t?"false":"";if(n.length>0){var c=n.find((function(t){return t.key===e}));c&&(a=c.value)}return a},Vo=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({},De))}))((function(e){var t=e.onChange,n=e.fields,c=e.defaultVals,i=(e.classes,Object(a.useState)([])),r=Object(h.a)(i,2),o=r[0],s=r[1],l=n||[],d=c||[];Object(a.useEffect)((function(){var e=[];n.forEach((function(t){var n={key:t.name,value:qo(t.name,t.type,d)};e.push(n)})),s(e)}),[n,c]),Object(a.useEffect)((function(){t(o)}),[o]);var u=function(e,t,n){var a=Object(st.a)(o);a[n]={key:e,value:t},s(a)},b=function(e,t){switch(e.type){case"on|off":var n=o[t]?o[t].value:"false";return Object(Se.jsx)(Zn,{indicatorLabels:["On","Off"],onChange:function(n){var a=n.target.checked?"true":"false";u(e.name,a,t)},id:e.name,name:e.name,label:e.label,value:"switch_on",tooltip:e.tooltip,checked:"true"===n});case"csv":return Object(Se.jsx)(Wo,{elements:o[t]?o[t].value:"",label:e.label,name:e.name,onChange:function(n){return u(e.name,n,t)},tooltip:e.tooltip,commonPlaceholder:e.placeholder,withBorder:!!e.withBorder});case"comment":return Object(Se.jsx)(Go,{id:e.name,name:e.name,label:e.label,tooltip:e.tooltip,value:o[t]?o[t].value:"",onChange:function(n){return u(e.name,n.target.value,t)},placeholder:e.placeholder});default:return Object(Se.jsx)(Dn,{id:e.name,name:e.name,label:e.label,tooltip:e.tooltip,value:o[t]?o[t].value:"",onChange:function(n){return u(e.name,n.target.value,t)},multiline:!!e.multiline,placeholder:e.placeholder})}};return Object(Se.jsx)(y.a,{container:!0,children:Object(Se.jsx)(y.a,{xs:12,item:!0,children:l.map((function(e,t){return Object(Se.jsx)(a.Fragment,{children:Object(Se.jsx)(y.a,{item:!0,xs:12,children:b(e,t)})},e.name)}))})})})),Ho={serverNeedsRestart:G,setErrorSnackMessage:H},Yo=Object(o.b)(null,Ho),Qo=Yo(Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)({},Le),qe),{},{strongText:{fontWeight:700},keyName:{marginLeft:5},buttonContainer:{textAlign:"right"},logoButton:{height:"80px"},customTitle:Object(m.a)(Object(m.a)({},qe.customTitle),{},{marginTop:0})}))}))((function(e){var t=e.closeModalAndRefresh,n=e.serverNeedsRestart,c=e.selectedConfiguration,i=e.setErrorSnackMessage,r=e.classes,o=Object(a.useState)([]),s=Object(h.a)(o,2),l=s[0],d=s[1],u=Object(a.useState)(!1),b=Object(h.a)(u,2),j=b[0],m=b[1],p=Object(a.useState)(!0),O=Object(h.a)(p,2),f=O[0],g=O[1],v=Object(a.useState)([]),S=Object(h.a)(v,2),k=S[0],w=S[1];Object(a.useEffect)((function(){var e=X()(c,"configuration_id",!1);e&&ye.invoke("GET","/api/v1/configs/".concat(e)).then((function(e){var t=X()(e,"key_values",[]);w(t)})).catch((function(e){g(!1),i(e)})),g(!1)}),[c,i]),Object(a.useEffect)((function(){if(j){var e={key_values:Uo(l)};ye.invoke("PUT","/api/v1/configs/".concat(c.configuration_id),e).then((function(){m(!1),n(!0),t()})).catch((function(e){m(!1),i(e)}))}}),[j,n,c,l,t,i]);var N=Object(a.useCallback)((function(e){d(e)}),[d]);return Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,className:r.customTitle,children:c.configuration_label}),Object(Se.jsx)(a.Fragment,{children:Object(Se.jsxs)("form",{noValidate:!0,onSubmit:function(e){e.preventDefault(),m(!0)},children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:r.settingsFormContainer,children:[f&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(C.a,{})}),Object(Se.jsx)(Vo,{fields:Po[c.configuration_id],onChange:N,defaultVals:k})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:r.settingsButtonContainer,children:Object(Se.jsx)(y.a,{item:!0,xs:12,className:r.innerSettingsButtonContainer,children:Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:j,children:"Save"})})})]})})]})}))),Zo=Object(E.a)((function(){return Object(N.a)({masterContainer:{overflowX:"hidden",overflowY:"auto"},sliderContainer:{width:"auto",transitionDuration:"0.3s",position:"relative"},slide:{float:"left"}})}))((function(e){var t=e.classes,n=e.slideOptions,c=e.currentSlide;return Object(Se.jsx)(Qt.a,{children:function(e){var i=e.width,r=e.height,o=c*i,s=i*n.length;return Object(Se.jsx)(a.Fragment,{children:Object(Se.jsx)("div",{className:t.masterContainer,style:{width:i,height:r},children:Object(Se.jsx)("div",{className:t.sliderContainer,style:{left:"-".concat(o,"px"),width:"".concat(s,"px")},children:n.map((function(e,n){return Object(Se.jsx)("div",{className:t.slide,style:{width:i},children:e},"slide-panel-".concat(n.toString()))}))})})})}})})),Jo=function(){return Object(Se.jsx)(pt.a,{viewBox:"0 0 10.847 6.572",children:Object(Se.jsxs)("g",{transform:"translate(-84.793 -81.193)",children:[Object(Se.jsx)("line",{x2:"9.64",transform:"translate(85.5 84.5)",fill:"none",stroke:"#000",strokeLinecap:"round",strokeWidth:"1"}),Object(Se.jsx)("line",{y1:"2.558",x2:"2.645",transform:"translate(85.5 81.9)",fill:"none",stroke:"#000",strokeLinecap:"round",strokeWidth:"1"}),Object(Se.jsx)("line",{x2:"2.645",y2:"2.558",transform:"translate(85.5 84.5)",fill:"none",stroke:"#000",strokeLinecap:"round",strokeWidth:"1"})]})})},$o={configuration_id:"",configuration_label:""},Xo=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)(Object(m.a)({strongText:{fontWeight:700},keyName:{marginLeft:5},iconText:{lineHeight:"24px"},customConfigurationPage:{height:"calc(100vh - 324px)",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},Ke),ze),qe),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,n=Object(a.useState)($o),c=Object(h.a)(n,2),i=c[0],r=c[1],o=Object(a.useState)(0),s=Object(h.a)(o,2),l=s[0],d=s[1],u=[{type:"edit",onClick:function(e){var t=X()(e,"url","");""!==t?j.push(t):(d(1),r(e))}}];return Object(Se.jsx)(a.Fragment,{children:Object(Se.jsx)(y.a,{container:!0,children:Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("div",{className:t.settingsOptionsContainer,children:Object(Se.jsx)(Zo,{slideOptions:[Object(Se.jsx)(a.Fragment,{children:Object(Se.jsx)(kn,{itemActions:u,columns:[{label:"Configuration",elementKey:"configuration_id"}],isLoading:!1,records:Bo,entityName:"Configurations",idField:"configuration_id",customPaperHeight:t.customConfigurationPage,noBackground:!0})}),Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.backContainer,children:Object(Se.jsxs)("button",{onClick:function(){d(0),r($o)},className:t.backButton,children:[Object(Se.jsx)(Jo,{}),"Back To Configurations"]})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:1===l?Object(Se.jsx)(Qo,{closeModalAndRefresh:function(){d(0)},selectedConfiguration:i}):null})]})],currentSlide:l})})})})})})})),es=n(206),ts=n(343),ns=n.n(ts),as=[{actionTrigger:To,targetTitle:"Postgres SQL",logo:"/postgres.png"},{actionTrigger:Ao,targetTitle:"Kafka",logo:"/kafka.png"},{actionTrigger:_o,targetTitle:"AMQP",logo:"/amqp.png"},{actionTrigger:Io,targetTitle:"MQTT",logo:"/mqtt.png"},{actionTrigger:Lo,targetTitle:"Redis",logo:"/redis.png"},{actionTrigger:Do,targetTitle:"NATS",logo:"/nats.png"},{actionTrigger:Eo,targetTitle:"Mysql",logo:"/mysql.png"},{actionTrigger:Fo,targetTitle:"Elastic Search",logo:"/elasticsearch.png"},{actionTrigger:Mo,targetTitle:"Webhook",logo:""},{actionTrigger:Ro,targetTitle:"NSQ",logo:""}],cs=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({},De))}))((function(e){var t=e.onChange,n=e.classes,i=Object(a.useState)(!1),r=Object(h.a)(i,2),o=r[0],s=r[1],l=Object(a.useState)(""),d=Object(h.a)(l,2),u=d[0],b=d[1],j=Object(a.useState)(""),m=Object(h.a)(j,2),p=m[0],O=m[1],f=Object(a.useState)(""),g=Object(h.a)(f,2),x=g[0],v=g[1],S=Object(a.useState)(""),C=Object(h.a)(S,2),k=C[0],w=C[1],N=Object(a.useState)(""),T=Object(h.a)(N,2),E=T[0],A=T[1],_=Object(a.useState)(""),I=Object(h.a)(_,2),L=I[0],D=I[1],F=Object(a.useState)(" "),M=Object(h.a)(F,2),R=M[0],B=M[1],P=Object(a.useState)(""),z=Object(h.a)(P,2),K=z[0],U=z[1],W=Object(a.useState)("namespace"),G=Object(h.a)(W,2),q=G[0],V=G[1],H=Object(a.useState)(""),Y=Object(h.a)(H,2),Q=Y[0],Z=Y[1],J=Object(a.useState)(""),$=Object(h.a)(J,2),X=$[0],ee=$[1],te=Object(a.useState)(""),ne=Object(h.a)(te,2),ae=ne[0],ce=ne[1],ie=Object(a.useCallback)((function(){var e="";return""!==p&&(e="".concat(e," host=").concat(p)),""!==x&&(e="".concat(e," dbname=").concat(x)),""!==E&&(e="".concat(e," user=").concat(E)),""!==L&&(e="".concat(e," password=").concat(L)),""!==k&&(e="".concat(e," port=").concat(k))," "!==R&&(e="".concat(e," sslmode=").concat(R)),(e="".concat(e," ")).trim()}),[p,x,E,L,k,R]);return Object(a.useEffect)((function(){""!==u&&t([{key:"connection_string",value:u},{key:"table",value:K},{key:"format",value:q},{key:"queue_dir",value:Q},{key:"queue_limit",value:X},{key:"comment",value:ae}])}),[u,K,q,Q,X,ae,t]),Object(a.useEffect)((function(){var e=ie();b(e)}),[E,x,L,k,R,p,b,ie]),Object(a.useEffect)((function(){if(o){var e=ie();b(e)}else{var t=function(e,t){var n,a=[],c=Object(ni.a)(t);try{for(c.s();!(n=c.n()).done;){var i=n.value,r=e.indexOf(i+"=");-1!==r&&a.push(r)}}catch(p){c.e(p)}finally{c.f()}a.sort((function(e,t){return e-t}));for(var o=new Map,s=new Array(a.length),l=0;l<a.length;l++){var d=l+1;d<a.length?s[l]=e.substr(a[l],a[d]-a[l]):s[l]=e.substr(a[l])}for(var u=0,b=s;u<b.length;u++){var j=b[u];if(void 0!==j){var h=j.substr(0,j.indexOf("=")),m=j.substr(j.indexOf("=")+1).trim();o.set(h,m)}}return o}(u,["host","port","dbname","user","password","sslmode"]);O(t.get("host")?t.get("host")+"":""),w(t.get("port")?t.get("port")+"":""),v(t.get("dbname")?t.get("dbname")+"":""),A(t.get("user")?t.get("user")+"":""),D(t.get("password")?t.get("password")+"":""),B(t.get("sslmode")?t.get("sslmode")+"":" ")}}),[o]),Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Zn,{label:"Manually Configure String",checked:o,id:"manualString",name:"manualString",onChange:function(e){s(e.target.checked)},value:"manualString",indicatorLabels:["On","Off"]})}),o?Object(Se.jsx)(c.a.Fragment,{children:Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"connection-string",name:"connection_string",label:"Connection String",value:u,onChange:function(e){b(e.target.value)}})})}):Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsxs)(y.a,{item:!0,xs:12,className:n.configureString,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"host",name:"host",label:"",placeholder:"Enter Host",value:p,onChange:function(e){O(e.target.value)}})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"db-name",name:"db-name",label:"",placeholder:"Enter DB Name",value:x,onChange:function(e){v(e.target.value)}})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"port",name:"port",label:"",placeholder:"Enter Port",value:k,onChange:function(e){w(e.target.value)}})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(zn,{value:R,label:"",id:"sslmode",name:"sslmode",onChange:function(e){void 0!==e.target.value&&B(e.target.value+"")},options:[{label:"Enter SSL Mode",value:" "},{label:"Require",value:"require"},{label:"Disable",value:"disable"},{label:"Verify CA",value:"verify-ca"},{label:"Verify Full",value:"verify-full"}]})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"user",name:"user",label:"",placeholder:"Enter User",value:E,onChange:function(e){A(e.target.value)}})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"password",name:"password",label:"",type:"password",placeholder:"Enter Password",value:L,onChange:function(e){D(e.target.value)}})})]})}),Object(Se.jsx)(oa,{label:"Connection String",content:u}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"table",name:"table",label:"Table",placeholder:"Enter Table Name",value:K,tooltip:"DB table name to store/update events, table is auto-created",onChange:function(e){U(e.target.value)}})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Vn,{currentSelection:q,id:"format",name:"format",label:"Format",onChange:function(e){V(e.target.value)},tooltip:"'namespace' reflects current bucket/object list and 'access' reflects a journal of object operations, defaults to 'namespace'",selectorOptions:[{label:"Namespace",value:"namespace"},{label:"Access",value:"access"}]})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"queue-dir",name:"queue_dir",label:"Queue Dir",placeholder:"Enter Queue Directory",value:Q,tooltip:"staging dir for undelivered messages e.g. '/home/events'",onChange:function(e){Z(e.target.value)}})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"queue-limit",name:"queue_limit",label:"Queue Limit",placeholder:"Enter Queue Limit",type:"number",value:X,tooltip:"maximum limit for undelivered messages, defaults to '10000'",onChange:function(e){ee(e.target.value)}})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Go,{id:"comment",name:"comment",label:"Comment",placeholder:"Enter Comment",value:ae,onChange:function(e){ce(e.target.value)}})})]})})),is=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({},De))}))((function(e){var t=e.onChange,n=e.classes,i=Object(a.useState)(!1),r=Object(h.a)(i,2),o=r[0],s=r[1],l=Object(a.useState)(""),d=Object(h.a)(l,2),u=d[0],b=d[1],j=Object(a.useState)(""),m=Object(h.a)(j,2),p=m[0],O=m[1],f=Object(a.useState)(""),g=Object(h.a)(f,2),x=g[0],v=g[1],S=Object(a.useState)(""),C=Object(h.a)(S,2),k=C[0],w=C[1],N=Object(a.useState)(""),T=Object(h.a)(N,2),E=T[0],A=T[1],_=Object(a.useState)(""),I=Object(h.a)(_,2),L=I[0],D=I[1],F=Object(a.useState)(""),M=Object(h.a)(F,2),R=M[0],B=M[1],P=Object(a.useState)("namespace"),z=Object(h.a)(P,2),K=z[0],U=z[1],W=Object(a.useState)(""),G=Object(h.a)(W,2),q=G[0],V=G[1],H=Object(a.useState)(""),Y=Object(h.a)(H,2),Q=Y[0],Z=Y[1],J=Object(a.useState)(""),$=Object(h.a)(J,2),X=$[0],ee=$[1],te=Object(a.useCallback)((function(){return"".concat(E,":").concat(L,"@tcp(").concat(p,":").concat(k,")/").concat(x)}),[E,L,p,k,x]);Object(a.useEffect)((function(){""!==u&&t([{key:"dsn_string",value:u},{key:"table",value:R},{key:"format",value:K},{key:"queue_dir",value:q},{key:"queue_limit",value:Q},{key:"comment",value:X}])}),[u,R,K,q,Q,X,t]),Object(a.useEffect)((function(){var e=te();b(e)}),[E,x,L,k,p,b,te]);return Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Zn,{label:"Enter DNS String",checked:o,id:"checkedB",name:"checkedB",onChange:function(e){if(e.target.checked){var t=te();b(t)}else{var n=function(e,t){for(var n,a=new Map,c=/(.*?):(.*?)@tcp\((.*?):(.*?)\)\/(.*?)$/gm;null!==(n=c.exec(e));)n.index===c.lastIndex&&c.lastIndex++,a.set("user",n[1]),a.set("password",n[2]),a.set("host",n[3]),a.set("port",n[4]),a.set("dbname",n[5]);return a}(u);O(n.get("host")?n.get("host")+"":""),w(n.get("port")?n.get("port")+"":""),v(n.get("dbname")?n.get("dbname")+"":""),A(n.get("user")?n.get("user")+"":""),D(n.get("password")?n.get("password")+"":"")}s(e.target.checked)},value:"dnsString",indicatorLabels:["On","Off"]})}),o?Object(Se.jsx)(c.a.Fragment,{children:Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"dsn-string",name:"dsn_string",label:"DSN String",value:u,onChange:function(e){b(e.target.value)}})})}):Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsxs)(y.a,{item:!0,xs:12,className:n.configureString,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"host",name:"host",label:"",placeholder:"Enter Host",value:p,onChange:function(e){O(e.target.value)}})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"db-name",name:"db-name",label:"",placeholder:"Enter DB Name",value:x,onChange:function(e){v(e.target.value)}})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"port",name:"port",label:"",placeholder:"Enter Port",value:k,onChange:function(e){w(e.target.value)}})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"user",name:"user",label:"",placeholder:"Enter User",value:E,onChange:function(e){A(e.target.value)}})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"password",name:"password",label:"",placeholder:"Enter Password",type:"password",value:L,onChange:function(e){D(e.target.value)}})})]})}),Object(Se.jsx)(oa,{label:"Connection String",content:u}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"table",name:"table",label:"Table",placeholder:"Enter Table Name",value:R,tooltip:"DB table name to store/update events, table is auto-created",onChange:function(e){B(e.target.value)}})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Vn,{currentSelection:K,id:"format",name:"format",label:"Format",onChange:function(e){U(e.target.value)},tooltip:"'namespace' reflects current bucket/object list and 'access' reflects a journal of object operations, defaults to 'namespace'",selectorOptions:[{label:"Namespace",value:"namespace"},{label:"Access",value:"access"}]})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"queue-dir",name:"queue_dir",label:"Queue Dir",placeholder:"Enter Queue Dir",value:q,tooltip:"staging dir for undelivered messages e.g. '/home/events'",onChange:function(e){V(e.target.value)}})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"queue-limit",name:"queue_limit",label:"Queue Limit",placeholder:"Enter Queue Limit",type:"number",value:Q,tooltip:"maximum limit for undelivered messages, defaults to '10000'",onChange:function(e){Z(e.target.value)}})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Go,{id:"comment",name:"comment",label:"Comment",placeholder:"Enter Comment",value:X,onChange:function(e){ee(e.target.value)}})})]})})),rs={serverNeedsRestart:G,setErrorSnackMessage:H},os=Object(o.b)(null,rs),ss=os(Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)({},De),qe),{},{strongText:{fontWeight:700},keyName:{marginLeft:5},buttonContainer:{textAlign:"right"},lambdaFormIndicator:{display:"flex",marginBottom:40},customTitle:Object(m.a)(Object(m.a)({},qe.customTitle),{},{marginTop:0}),settingsFormContainer:Object(m.a)(Object(m.a)({},qe.settingsFormContainer),{},{height:"calc(100vh - 422px)"})}))}))((function(e){var t=e.service,n=e.saveAndRefresh,c=e.serverNeedsRestart,i=e.classes,r=e.setErrorSnackMessage,o=Object(a.useState)([]),s=Object(h.a)(o,2),l=s[0],d=s[1],u=Object(a.useState)(!1),b=Object(h.a)(u,2),j=b[0],m=b[1];Object(a.useEffect)((function(){if(j){var e={key_values:Uo(l)};ye.invoke("PUT","/api/v1/configs/".concat(t),e).then((function(){m(!1),c(!0),n()})).catch((function(e){m(!1),r(e)}))}}),[j,c,t,l,n,r]);var p,O=Object(a.useCallback)((function(e){d(e)}),[d]);switch(t){case To:p=Object(Se.jsx)(cs,{onChange:O});break;case Eo:p=Object(Se.jsx)(is,{onChange:O});break;default:var f=X()(Ko,t,[]);p=Object(Se.jsx)(Vo,{fields:f,onChange:O})}var g=as.find((function(e){return e.actionTrigger===t}));return Object(Se.jsx)(a.Fragment,{children:""!==t&&Object(Se.jsx)(a.Fragment,{children:Object(Se.jsxs)("form",{noValidate:!0,onSubmit:function(e){e.preventDefault(),m(!0)},children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:i.customTitle,children:[g?g.targetTitle:""," - Add Lambda Notification Target"]}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:i.settingsFormContainer,children:p}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:i.settingsButtonContainer,children:Object(Se.jsx)(y.a,{item:!0,xs:12,className:i.innerSettingsButtonContainer,children:Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:j,children:"Save"})})}),Object(Se.jsx)(y.a,{item:!0,xs:9})]})})})}))),ls=as.filter((function(e){return""===e.logo})),ds=as.filter((function(e){return""!==e.logo})),us=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({},qe),{},{customTitle:Object(m.a)(Object(m.a)({},qe.customTitle),{},{marginTop:0})},Ve))}))((function(e){var t=e.classes,n=e.setService;return Object(Se.jsx)(a.Fragment,{children:Object(Se.jsx)(y.a,{container:!0,children:Object(Se.jsxs)(y.a,{item:!0,xs:12,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.customTitle,children:"Pick a supported service"}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.centerElements,children:[Object(Se.jsx)("div",{className:t.nonIconContainer,children:ls.map((function(e){return Object(Se.jsx)(x.a,{variant:"contained",color:"primary",onClick:function(){n(e.actionTrigger)},children:e.targetTitle.toUpperCase()},"non-icon-".concat(e.targetTitle))}))}),Object(Se.jsx)("div",{className:t.iconContainer,children:ds.map((function(e){return Object(Se.jsx)("button",{className:t.lambdaNotif,onClick:function(){n(e.actionTrigger)},children:Object(Se.jsx)("img",{src:e.logo,className:t.logoButton,alt:e.targetTitle})},"icon-".concat(e.targetTitle))}))})]})]})})})})),bs={setErrorSnackMessage:H},js=Object(o.b)(null,bs),hs=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)(Object(m.a)(Object(m.a)({},ze),Ke),qe),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})),{},{strongText:{fontWeight:700},keyName:{marginLeft:5},iconText:{lineHeight:"24px"},customConfigurationPage:{height:"calc(100vh - 410px)",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},lambdaContainer:{padding:"15px 0"},actionsTray:Object(m.a)(Object(m.a)({},ze.actionsTray),{},{padding:"0 38px"})}))}))(js((function(e){var t=e.classes,n=e.setErrorSnackMessage,c=Object(a.useState)([]),i=Object(h.a)(c,2),r=i[0],o=i[1],s=Object(a.useState)(""),l=Object(h.a)(s,2),d=l[0],u=l[1],b=Object(a.useState)(!1),j=Object(h.a)(b,2),m=j[0],p=j[1],O=Object(a.useState)(0),f=Object(h.a)(O,2),g=f[0],S=f[1],C=Object(a.useState)(""),k=Object(h.a)(C,2),w=k[0],N=k[1];Object(a.useEffect)((function(){if(m){ye.invoke("GET","/api/v1/admin/notification_endpoints").then((function(e){var t=[];null!==e.notification_endpoints&&(t=e.notification_endpoints),o(t.map((function(e){return{service_name:"".concat(e.service,":").concat(e.account_id),status:e.status}}))),p(!1)})).catch((function(e){n(e),p(!1)}))}}),[m,n]),Object(a.useEffect)((function(){p(!0)}),[]);var T=r.filter((function(e){return""===d||e.service_name.indexOf(d)>=0})),E=function(){N(""),S(g-1)};return Object(Se.jsx)(a.Fragment,{children:Object(Se.jsx)(y.a,{container:!0,children:Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("div",{className:t.settingsOptionsContainer,children:Object(Se.jsx)(Zo,{slideOptions:[Object(Se.jsx)(a.Fragment,{children:Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.lambdaContainer,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(Se.jsx)(v.a,{placeholder:"Filter",className:t.searchField,id:"search-resource",label:"",onChange:function(e){u(e.target.value)},InputProps:{disableUnderline:!0,startAdornment:Object(Se.jsx)(lt.a,{position:"start",children:Object(Se.jsx)(ut.a,{})})}}),Object(Se.jsx)(Vt.a,{color:"primary","aria-label":"Refresh List",component:"span",onClick:function(){p(!0)},children:Object(Se.jsx)(rc.a,{})}),Object(Se.jsx)(x.a,{variant:"contained",color:"primary",startIcon:Object(Se.jsx)(ft,{}),onClick:function(){S(1)},children:"Add Notification Target"})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(kn,{itemActions:[],columns:[{label:"Status",elementKey:"status",renderFunction:function(e){return Object(Se.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[Object(Se.jsx)(ns.a,{style:"Offline"===e?{color:es.a[500]}:{}}),e]})},width:150},{label:"Service",elementKey:"service_name"}],isLoading:m,records:T,entityName:"Lambda Notification Targets",idField:"service_name",customPaperHeight:t.customConfigurationPage,noBackground:!0})})]})}),Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.backContainer,children:Object(Se.jsxs)("button",{onClick:E,className:t.backButton,children:[Object(Se.jsx)(Jo,{}),"Back To Lambda Notifications"]})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(us,{setService:function(e){N(e),S(2)}})})]}),Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.backContainer,children:Object(Se.jsxs)("button",{onClick:E,className:t.backButton,children:[Object(Se.jsx)(Jo,{}),"Back To Supported Services"]})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(ss,{service:w,saveAndRefresh:function(){p(!0),S(0),N("")}})})]})],currentSlide:g})})})})})})}))),ms=n(345),ps=n.n(ms),Os=n(344),fs=n.n(Os),gs=Object(E.a)((function(e){return Object(N.a)({errorBlock:{color:e.palette.error.main}})}))((function(e){var t=e.classes,n=e.errorMessage,a=e.withBreak,i=void 0===a||a;return Object(Se.jsxs)(c.a.Fragment,{children:[i&&Object(Se.jsx)("br",{}),Object(Se.jsx)(S.a,{component:"p",variant:"body1",className:t.errorBlock,children:n})]})})),xs=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)({},Le),Fe),{},{textBoxContainer:{flexGrow:1,position:"relative",flexDirection:"column"},errorState:{color:"#b53b4b",fontSize:14,position:"absolute",top:7,right:7},errorText:{margin:"0",fontSize:"0.75rem",marginTop:3,textAlign:"left",fontFamily:"Lato,sans-serif",fontWeight:400,lineHeight:"1.66",color:"#dc1f2e"},valueString:{maxWidth:350,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",marginTop:2},fileReselect:{display:"flex",alignItems:"center"},fieldBottom:{borderBottom:"#9c9c9c 1px solid"},fileInputField:{margin:"13px 0"}}))}))((function(e){var t=e.label,n=e.classes,i=e.onChange,r=e.id,o=e.name,s=e.disabled,l=void 0!==s&&s,d=e.tooltip,u=void 0===d?"":d,b=e.required,j=e.error,m=void 0===j?"":j,p=e.accept,O=void 0===p?"":p,f=e.value,g=void 0===f?"":f,x=Object(a.useState)(!1),v=Object(h.a)(x,2),S=v[0],C=v[1];return Object(Se.jsx)(c.a.Fragment,{children:Object(Se.jsxs)(y.a,{item:!0,xs:12,className:"".concat(n.fieldBottom," ").concat(n.fieldContainer," ").concat(""!==m?n.errorInField:""),children:[""!==t&&Object(Se.jsxs)(fn.a,{htmlFor:r,className:"".concat(""!==m?n.fieldLabelError:""," ").concat(n.inputLabel),children:[Object(Se.jsxs)("span",{children:[t,b?"*":""]}),""!==u&&Object(Se.jsx)("div",{className:n.tooltipContainer,children:Object(Se.jsx)(gn.a,{title:u,placement:"top-start",children:Object(Se.jsx)("div",{children:Object(Se.jsx)(xn,{className:n.tooltip})})})})]}),S||""===g?Object(Se.jsxs)("div",{className:n.textBoxContainer,children:[Object(Se.jsx)("input",{type:"file",name:o,onChange:function(e){var t=X()(e,"target.files[0].name","");!function(e,t){var n=e.target.files[0],a=new FileReader;a.readAsDataURL(n),a.onload=function(){var e=a.result;if(e){var n=e.toString().split("base64,");2===n.length&&t(n[1])}}}(e,(function(e){i(e,t)}))},accept:O,required:b,disabled:l,className:n.fileInputField}),""!==g&&Object(Se.jsx)(Vt.a,{color:"primary","aria-label":"upload picture",component:"span",onClick:function(){C(!1)},disableRipple:!1,disableFocusRipple:!1,children:Object(Se.jsx)(fs.a,{})}),""!==m&&Object(Se.jsx)(gs,{errorMessage:m})]}):Object(Se.jsxs)("div",{className:n.fileReselect,children:[Object(Se.jsx)("div",{className:n.valueString,children:g}),Object(Se.jsx)(Vt.a,{color:"primary","aria-label":"upload picture",component:"span",onClick:function(){C(!0)},disableRipple:!1,disableFocusRipple:!1,children:Object(Se.jsx)(ps.a,{})})]})]})})})),vs={setErrorSnackMessage:H},ys=Object(o.b)(null,vs),Ss=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)({},De),qe),{},{strongText:{fontWeight:700},keyName:{marginLeft:5},buttonContainer:{textAlign:"right"},customTitle:Object(m.a)(Object(m.a)({},qe.customTitle),{},{marginTop:0}),settingsFormContainer:Object(m.a)(Object(m.a)({},qe.settingsFormContainer),{},{height:"calc(100vh - 422px)"})}))}))(ys((function(e){var t=e.saveAndRefresh,n=e.classes,c=e.setErrorSnackMessage,i=e.type,r=Object(a.useState)(!1),o=Object(h.a)(r,2),s=o[0],l=o[1],d=Object(a.useState)(""),u=Object(h.a)(d,2),b=u[0],j=u[1],p=Object(a.useState)(""),O=Object(h.a)(p,2),f=O[0],g=O[1],v=Object(a.useState)(""),S=Object(h.a)(v,2),C=S[0],k=S[1],w=Object(a.useState)(""),N=Object(h.a)(w,2),T=N[0],E=N[1],A=Object(a.useState)(""),_=Object(h.a)(A,2),I=_[0],L=_[1],D=Object(a.useState)(""),F=Object(h.a)(D,2),M=F[0],R=F[1],B=Object(a.useState)(""),P=Object(h.a)(B,2),z=P[0],K=P[1],U=Object(a.useState)(""),W=Object(h.a)(U,2),G=W[0],q=W[1],V=Object(a.useState)(""),H=Object(h.a)(V,2),Y=H[0],Q=H[1],Z=Object(a.useState)(""),J=Object(h.a)(Z,2),$=J[0],X=J[1],ee=Object(a.useState)(""),te=Object(h.a)(ee,2),ne=te[0],ae=te[1],ce=Object(a.useState)(""),ie=Object(h.a)(ce,2),re=ie[0],oe=ie[1],se=Object(a.useState)(""),le=Object(h.a)(se,2),de=le[0],ue=le[1],be=Object(a.useState)(!0),je=Object(h.a)(be,2),he=je[0],me=je[1];Object(a.useEffect)((function(){if(s){var e={},n={name:b,endpoint:f,bucket:C,prefix:T,region:I},a=i;switch("minio"===i&&(a="s3"),i){case"minio":case"s3":e={s3:Object(m.a)(Object(m.a)({},n),{},{accesskey:z,secretkey:G,storageclass:M})};break;case"gcs":e={gcs:Object(m.a)(Object(m.a)({},n),{},{creds:$})};break;case"azure":e={azure:Object(m.a)(Object(m.a)({},n),{},{accountname:ne,accountkey:re})}}var r=Object(m.a)({type:a},e);ye.invoke("POST","/api/v1/admin/tiers",r).then((function(){l(!1),t()})).catch((function(e){l(!1),c(e)}))}}),[z,re,ne,C,$,f,b,T,I,t,s,G,c,M,i]),Object(a.useEffect)((function(){var e=!0;""===i&&(e=!1),""===i&&(e=!1),""===b&&(e=!1),""===f&&(e=!1),""===C&&(e=!1),""===T&&(e=!1),""===I&&(e=!1),"s3"!==i&&"minio"!==i||(""===z&&(e=!1),""===G&&(e=!1)),"gcs"===i&&""===$&&(e=!1),"azure"===i&&(""===ne&&(e=!1),""===re&&(e=!1)),me(e)}),[z,re,ne,C,$,f,he,b,T,I,G,M,i]),Object(a.useEffect)((function(){switch(i){case"gcs":g("https://storage.googleapis.com/"),ue("Google Cloud");break;case"s3":g("https://s3.amazonaws.com"),ue("Amazon S3");break;case"azure":g("http://blob.core.windows.net"),ue("Azure");break;case"minio":g(""),ue("MinIO")}}),[i]);return Object(Se.jsx)(a.Fragment,{children:Object(Se.jsxs)("form",{noValidate:!0,onSubmit:function(e){e.preventDefault(),l(!0)},children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:n.customTitle,children:[de," - Add Tier Configuration"]}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:n.settingsFormContainer,children:Object(Se.jsx)(y.a,{container:!0,children:""!==i&&Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(Dn,{id:"name",name:"name",label:"Name",placeholder:"Enter Name",value:b,onChange:function(e){j(e.target.value)}}),Object(Se.jsx)(Dn,{id:"endpoint",name:"endpoint",label:"Endpoint",placeholder:"Enter Endpoint",value:f,onChange:function(e){g(e.target.value)}}),("s3"===i||"minio"===i)&&Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(Dn,{id:"accessKey",name:"accessKey",label:"Access Key",placeholder:"Enter Access Key",value:z,onChange:function(e){K(e.target.value)}}),Object(Se.jsx)(Dn,{id:"secretKey",name:"secretKey",label:"Secret Key",placeholder:"Enter Secret Key",value:G,onChange:function(e){q(e.target.value)}})]}),"gcs"===i&&Object(Se.jsx)(a.Fragment,{children:Object(Se.jsx)(xs,{accept:".json",id:"creds",label:"Credentials",name:"creds",onChange:function(e,t){X(e),Q(t)},value:Y})}),"azure"===i&&Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(Dn,{id:"accountName",name:"accountName",label:"Account Name",placeholder:"Enter Account Name",value:ne,onChange:function(e){ae(e.target.value)}}),Object(Se.jsx)(Dn,{id:"accountKey",name:"accountKey",label:"Account Key",placeholder:"Enter Account Key",value:re,onChange:function(e){oe(e.target.value)}})]}),Object(Se.jsx)(Dn,{id:"bucket",name:"bucket",label:"Bucket",placeholder:"Enter Bucket",value:C,onChange:function(e){k(e.target.value)}}),Object(Se.jsx)(Dn,{id:"prefix",name:"prefix",label:"Prefix",placeholder:"Enter Prefix",value:T,onChange:function(e){E(e.target.value)}}),Object(Se.jsx)(Dn,{id:"region",name:"region",label:"Region",placeholder:"Enter Region",value:I,onChange:function(e){L(e.target.value)}}),"s3"===i||"minio"===i&&Object(Se.jsx)(Dn,{id:"storageClass",name:"storageClass",label:"Storage Class",placeholder:"Enter Storage Class",value:M,onChange:function(e){R(e.target.value)}})]})})}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:n.settingsButtonContainer,children:Object(Se.jsx)(y.a,{item:!0,xs:12,className:n.innerSettingsButtonContainer,children:Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:s||!he,children:"Save"})})})]})})}))),Cs=Object(o.b)(null,{setModalErrorSnackMessage:Q}),ks=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},buttonContainer:{textAlign:"right"}},De))}))(Cs((function(e){var t=e.open,n=e.closeModalAndRefresh,c=e.classes,i=e.tierData,r=e.setModalErrorSnackMessage,o=Object(a.useState)(!1),s=Object(h.a)(o,2),l=s[0],d=s[1],u=Object(a.useState)(""),b=Object(h.a)(u,2),j=b[0],m=b[1],p=Object(a.useState)(""),O=Object(h.a)(p,2),f=O[0],g=O[1],v=Object(a.useState)(""),S=Object(h.a)(v,2),k=S[0],w=S[1],N=Object(a.useState)(""),T=Object(h.a)(N,2),E=T[0],A=T[1],_=Object(a.useState)(""),I=Object(h.a)(_,2),L=I[0],D=I[1],F=Object(a.useState)(""),M=Object(h.a)(F,2),R=M[0],B=M[1],P=Object(a.useState)(!0),z=Object(h.a)(P,2),K=z[0],U=z[1],W=X()(i,"type",""),G=X()(i,"".concat(W,".name"),"");Object(a.useEffect)((function(){var e=!0;"s3"===W||"azure"===W?""!==L&&""!==R||(e=!1):"gcs"===W&&""===E&&(e=!1),U(e)}),[R,L,E,W]);return Object(Se.jsx)(_n,{modalOpen:t,onClose:function(){n(!1)},title:"Update Credentials - ".concat(W," / ").concat(G),children:Object(Se.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),d(!0),function(){var e={};"s3"===W||"azure"===W?e={access_key:L,secret_key:R}:"gcs"===W&&(e={creds:E}),""!==G?ye.invoke("PUT","/api/v1/admin/tiers/".concat(W,"/").concat(G,"/credentials"),e).then((function(){d(!1),n(!0)})).catch((function(e){d(!1),r(e)})):r("There was an error retrieving tier information")}()},children:Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:c.formScrollable,children:["s3"===W&&Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(Dn,{id:"accessKey",name:"accessKey",label:"Access Key",placeholder:"Enter Access Key",value:j,onChange:function(e){m(e.target.value)}}),Object(Se.jsx)(Dn,{id:"secretKey",name:"secretKey",label:"Secret Key",placeholder:"Enter Secret Key",value:f,onChange:function(e){g(e.target.value)}})]}),"gcs"===W&&Object(Se.jsx)(a.Fragment,{children:Object(Se.jsx)(xs,{accept:".json",id:"creds",label:"Credentials",name:"creds",onChange:function(e,t){A(e),w(t)},value:k})}),"azure"===W&&Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(Dn,{id:"accountName",name:"accountName",label:"Account Name",placeholder:"Enter Account Name",value:L,onChange:function(e){D(e.target.value)}}),Object(Se.jsx)(Dn,{id:"accountKey",name:"accountKey",label:"Account Key",placeholder:"Enter Account Key",value:R,onChange:function(e){B(e.target.value)}})]})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:c.buttonContainer,children:Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:l||!K,children:"Save"})}),l&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(C.a,{})})]})})})}))),ws={setErrorSnackMessage:H},Ns=Object(o.b)(null,ws),Ts=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)(Object(m.a)(Object(m.a)(Object(m.a)({},ze),Ke),qe),Ve),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})),{},{strongText:{fontWeight:700},keyName:{marginLeft:5},iconText:{lineHeight:"24px"},customConfigurationPage:{height:"calc(100vh - 410px)",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},lambdaContainer:{padding:"15px 0"},actionsTray:Object(m.a)(Object(m.a)({},ze.actionsTray),{},{padding:"0 38px"}),customTitle:Object(m.a)(Object(m.a)({},qe.customTitle),{},{marginTop:0})}))}))(Ns((function(e){var t=e.classes,n=e.setErrorSnackMessage,c=Object(a.useState)([]),i=Object(h.a)(c,2),r=i[0],o=i[1],s=Object(a.useState)(""),l=Object(h.a)(s,2),d=l[0],u=l[1],b=Object(a.useState)(!0),j=Object(h.a)(b,2),m=j[0],p=j[1],O=Object(a.useState)(0),f=Object(h.a)(O,2),g=f[0],S=f[1],C=Object(a.useState)(!1),k=Object(h.a)(C,2),w=k[0],N=k[1],T=Object(a.useState)({type:"unsupported"}),E=Object(h.a)(T,2),A=E[0],_=E[1],I=Object(a.useState)(""),L=Object(h.a)(I,2),D=L[0],F=L[1];Object(a.useEffect)((function(){if(m){ye.invoke("GET","/api/v1/admin/tiers").then((function(e){o(e.items||[]),p(!1)})).catch((function(e){n(e),p(!1)}))}}),[m,n]);var M=r.filter((function(e){if(""===d)return!0;var t=X()(e,"".concat(e.type,".name"),""),n=X()(e,"type","");return t.indexOf(d)>=0||n.indexOf(d)>=0})),R=function(){S(g-1)},B=function(e){F(e),S(2)};return Object(Se.jsxs)(a.Fragment,{children:[w&&Object(Se.jsx)(ks,{open:w,tierData:A,closeModalAndRefresh:function(){N(!1)}}),Object(Se.jsx)(y.a,{container:!0,children:Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("div",{className:t.settingsOptionsContainer,children:Object(Se.jsx)(Zo,{slideOptions:[Object(Se.jsx)(a.Fragment,{children:Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.lambdaContainer,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(Se.jsx)(v.a,{placeholder:"Filter",className:t.searchField,id:"search-resource",label:"",onChange:function(e){u(e.target.value)},InputProps:{disableUnderline:!0,startAdornment:Object(Se.jsx)(lt.a,{position:"start",children:Object(Se.jsx)(ut.a,{})})}}),Object(Se.jsx)(Vt.a,{color:"primary","aria-label":"Refresh List",component:"span",onClick:function(){p(!0)},children:Object(Se.jsx)(rc.a,{})}),Object(Se.jsx)(x.a,{variant:"contained",color:"primary",startIcon:Object(Se.jsx)(ft,{}),onClick:function(){S(1)},children:"Add Tier"})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(kn,{itemActions:[{type:"edit",onClick:function(e){_(e),N(!0)}}],columns:[{label:"Tier Name",elementKey:"type",renderFunction:function(e){var t=X()(e,"".concat(e.type,".name"),"");return null!==t?t:""},renderFullObject:!0},{label:"Type",elementKey:"type",width:150},{label:"Endpoint",elementKey:"type",renderFunction:function(e){var t=X()(e,"".concat(e.type,".endpoint"),"");return null!==t?t:""},renderFullObject:!0},{label:"Bucket",elementKey:"type",renderFunction:function(e){var t=X()(e,"".concat(e.type,".bucket"),"");return null!==t?t:""},renderFullObject:!0},{label:"Prefix",elementKey:"type",renderFunction:function(e){var t=X()(e,"".concat(e.type,".prefix"),"");return null!==t?t:""},renderFullObject:!0},{label:"Region",elementKey:"type",renderFunction:function(e){var t=X()(e,"".concat(e.type,".region"),"");return null!==t?t:""},renderFullObject:!0}],isLoading:m,records:M,entityName:"Tiers",idField:"service_name",customPaperHeight:t.customConfigurationPage,noBackground:!0})})]})}),Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.backContainer,children:Object(Se.jsxs)("button",{onClick:R,className:t.backButton,children:[Object(Se.jsx)(Jo,{}),"Back To Tiers"]})}),Object(Se.jsxs)(y.a,{item:!0,xs:12,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.customTitle,children:"Add Tier Configuration"}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.settingsFormContainer,children:Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.centerElements,children:Object(Se.jsxs)("div",{className:t.iconContainer,children:[Object(Se.jsx)("button",{className:t.lambdaNotif,onClick:function(){B("minio")},children:Object(Se.jsx)("img",{src:"/minioTier.png",className:t.logoButton,alt:"MinIO"})}),Object(Se.jsx)("button",{className:t.lambdaNotif,onClick:function(){B("gcs")},children:Object(Se.jsx)("img",{src:"/gcs.png",className:t.logoButton,alt:"GCS"})}),Object(Se.jsx)("button",{className:t.lambdaNotif,onClick:function(){B("s3")},children:Object(Se.jsx)("img",{src:"/amazon.png",className:t.logoButton,alt:"s3"})}),Object(Se.jsx)("button",{className:t.lambdaNotif,onClick:function(){B("azure")},children:Object(Se.jsx)("img",{src:"/azure.png",className:t.logoButton,alt:"Azure"})})]})})})})]})]}),Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.backContainer,children:Object(Se.jsxs)("button",{onClick:R,className:t.backButton,children:[Object(Se.jsx)(Jo,{}),"Back To Tier Type Selection"]})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:2===g&&Object(Se.jsx)(Ss,{type:D,saveAndRefresh:function(){S(0),p(!0)}})})]})],currentSlide:g})})})})})]})}))),Es=Object(o.b)((function(e){return{session:e.console.session,distributedSetup:e.system.distributedSetup}}),{}),As=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({headerLabel:{fontSize:22,fontWeight:600,color:"#000",marginTop:4}},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(Es((function(e){var t=e.classes,n=(e.session,e.distributedSetup),c=Object(a.useState)(0),i=Object(h.a)(c,2),r=i[0],o=i[1];return Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(na,{label:"Settings"}),Object(Se.jsx)(y.a,{container:!0,children:Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.container,children:[Object(Se.jsxs)(ja.a,{value:r,indicatorColor:"primary",textColor:"primary",onChange:function(e,t){o(t)},"aria-label":"tenant-tabs",variant:"scrollable",scrollButtons:"auto",children:[Object(Se.jsx)(ha.a,{label:"Configurations"}),Object(Se.jsx)(ha.a,{label:"Lambda Notifications"}),Object(Se.jsx)(ha.a,{label:"Tiers",disabled:!n})]}),Object(Se.jsxs)(y.a,{item:!0,xs:12,children:[0===r&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Xo,{})}),1===r&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(hs,{})}),2===r&&n&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Ts,{})})]})]})})]})}))),_s=n(145),Is=n.n(_s),Ls={logger:{main:"logger",title:"Logger Webhook Configuration",modalTitle:"Logger Webhook",apiURL:"",configuration:{configuration_id:"logger_webhook",configuration_label:"Logger Webhook"}},audit:{main:"audit",title:"Audit Webhook Configuration",modalTitle:"Audit Webhook",apiURL:"",configuration:{configuration_id:"audit_webhook",configuration_label:"Audit Webhook"}}},Ds=Object(E.a)((function(e){return Object(N.a)({strongText:{fontWeight:700},keyName:{marginLeft:5},actionsTray:{textAlign:"right","& button":{marginLeft:10}},searchField:{background:"#FFFFFF",padding:12,borderRadius:5,boxShadow:"0px 3px 6px #00000012"},iconText:{lineHeight:"24px"}})}))((function(e){var t=e.match,n=e.classes,i=Object(a.useState)(!1),r=Object(h.a)(i,2),o=r[0],s=r[1],l=Object(a.useState)(""),d=Object(h.a)(l,2),u=d[0],b=d[1],j=Object(a.useState)(!1),m=Object(h.a)(j,2),p=m[0],O=m[1],f=X()(t,"path","").split("/"),g=X()(Ls,f[2],!1);if(!g)return null;var C=[].filter((function(e){return e.name.toLocaleLowerCase().includes(u.toLocaleLowerCase())}));return Object(Se.jsxs)(c.a.Fragment,{children:[o&&Object(Se.jsx)(Qo,{closeModalAndRefresh:function(){O(!0),s(!1)},selectedConfiguration:g.configuration}),Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(S.a,{variant:"h6",children:g.title})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:n.actionsTray,children:[Object(Se.jsx)(v.a,{placeholder:"Filter",className:n.searchField,id:"search-resource",label:"",onChange:function(e){b(e.target.value)},InputProps:{disableUnderline:!0,startAdornment:Object(Se.jsx)(lt.a,{position:"start",children:Object(Se.jsx)(ut.a,{})})}}),Object(Se.jsx)(x.a,{variant:"contained",color:"primary",startIcon:Object(Se.jsx)(Is.a,{}),onClick:function(){s(!0)},children:"Add Webhook Configuration"})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(kn,{itemActions:[{type:"edit",onClick:function(){}}],columns:[{label:"Name",elementKey:"name"}],isLoading:p,records:C,entityName:"Webhook Configurations",idField:"name"})})]})]})})),Fs=Object(o.b)(null,{setErrorSnackMessage:H}),Ms=Fs((function(e){var t=e.deleteOpen,n=e.selectedTenant,c=e.closeDeleteModalAndRefresh,i=e.setErrorSnackMessage,r=Object(a.useState)(!1),o=Object(h.a)(r,2),s=o[0],l=o[1],d=Object(a.useState)(""),u=Object(h.a)(d,2),b=u[0],j=u[1];Object(a.useEffect)((function(){s&&ye.invoke("DELETE","/api/v1/namespaces/".concat(n.namespace,"/tenants/").concat(n.name)).then((function(){l(!1),c(!0)})).catch((function(e){l(!1),i(e)}))}),[s]);return Object(Se.jsxs)(wn.a,{open:t,onClose:function(){c(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(Se.jsx)(Nn.a,{id:"alert-dialog-title",children:"Delete Tenant"}),Object(Se.jsxs)(Tn.a,{children:[s&&Object(Se.jsx)(C.a,{}),Object(Se.jsxs)($n.a,{id:"alert-dialog-description",children:["To continue please type ",Object(Se.jsx)("b",{children:n.name})," in the box.",Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"retype-tenant",name:"retype-tenant",onChange:function(e){j(e.target.value)},label:"",value:b})})]})]}),Object(Se.jsxs)(Xn.a,{children:[Object(Se.jsx)(x.a,{onClick:function(){c(!1)},color:"primary",disabled:s,children:"Cancel"}),Object(Se.jsx)(x.a,{onClick:function(){b===n.name?l(!0):i("Tenant name is not correct")},color:"secondary",autoFocus:!0,disabled:b!==n.name,children:"Delete"})]})]})})),Rs=function(e,t){return{podAntiAffinity:{requiredDuringSchedulingIgnoredDuringExecution:[{labelSelector:{matchExpressions:[{key:"v1.min.io/tenant",operator:"In",values:[e]},{key:"v1.min.io/pool",operator:"In",values:[t]}]},topologyKey:"kubernetes.io/hostname"}]}}},Bs=function(e,t,n,a){var c=e.split("&"),i=[];c.forEach((function(e){var t=e.split("=");2===t.length&&i.push({key:t[0],operator:"In",values:[t[1]]})}));var r={nodeAffinity:{requiredDuringSchedulingIgnoredDuringExecution:{nodeSelectorTerms:[{matchExpressions:i}]}}};if(t){var o=Rs(n,a);r.podAntiAffinity=o.podAntiAffinity}return console.log(r),r},Ps="ADD_TENANT/SET_CURRENT_PAGE",zs="ADD_TENANT/SET_ADVANCED_MODE",Ks="ADD_TENANT/UPDATE_FIELD",Us="ADD_TENANT/SET_PAGE_VALID",Ws="ADD_TENANT/RESET_FORM",Gs="ADD_TENANT/SET_STORAGE_CLASSES_LIST",qs="ADD_TENANT/ADD_MINIO_KEYPAIR",Vs="ADD_TENANT/ADD_FILE_MINIO_KEYPAIR",Hs="ADD_TENANT/DELETE_MINIO_KEYPAIR",Ys="ADD_TENANT/ADD_CA_KEYPAIR",Qs="ADD_TENANT/ADD_FILE_TO_CA_KEYPAIR",Zs="ADD_TENANT/DELETE_CA_KEYPAIR",Js="ADD_TENANT/ADD_CONSOLE_CERT",$s="ADD_TENANT/ADD_CONSOLE_CA_KEYPAIR",Xs="ADD_TENANT/ADD_FILE_TO_CONSOLE_CA_KEYPAIR",el="ADD_TENANT/DELETE_CONSOLE_CA_KEYPAIR",tl="ADD_TENANT/ENCRYPTION_SERVER_CERT",nl="ADD_TENANT/ENCRYPTION_CLIENT_CERT",al="ADD_TENANT/ENCRYPTION_VAULT_CERT",cl="ADD_TENANT/ENCRYPTION_VAULT_CA",il="ADD_TENANT/ENCRYPTION_GEMALTO_CA",rl="TENANT_DETAILS/SET_LOADING",ol="TENANT_DETAILS/SET_CURRENT_TENANT",sl="TENANT_DETAILS/SET_TENANT",ll="TENANT_DETAILS/SET_TAB",dl=function(e,t,n){return{type:Ks,pageName:e,field:t,value:n}},ul=function(e,t){return{type:Us,pageName:e,valid:t}},bl=function(e,t,n){return{type:Js,key:e,fileName:t,value:n}},jl=function(e){return{type:rl,state:e}},hl=function(e){var t={};return e.forEach((function(e){if(e.required&&""===e.value.trim())t[e.fieldKey]="Field cannot be empty";else if(e.required||""!==e.value.trim())if(e.customValidation&&e.customValidationMessage)t[e.fieldKey]=e.customValidationMessage;else if(e.pattern&&e.customPatternMessage){var n=new RegExp(e.pattern,"g");e.value.match(n)||(t[e.fieldKey]=e.customPatternMessage)}else;})),t},ml=function(e,t){var n=Object(m.a)({},e);return delete n[t],n},pl=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,t="",n="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",a=0;a<e;a++)t+=n[Math.floor(Math.random()*n.length)];return t},Ol={setErrorSnackMessage:H},fl=Object(o.b)(null,Ol),gl=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({wrapText:{maxWidth:"200px",whiteSpace:"normal",wordWrap:"break-word"}},De))}))(fl((function(e){var t=e.classes,n=e.namespace,c=e.addNamespaceOpen,i=e.closeAddNamespaceModalAndRefresh,r=e.setErrorSnackMessage,o=Object(a.useState)(!1),s=Object(h.a)(o,2),l=s[0],d=s[1];Object(a.useEffect)((function(){l&&ye.invoke("POST","/api/v1/namespace",{name:n}).then((function(e){d(!1),i(!0)})).catch((function(e){d(!1),r(e)}))}),[l,i,n,r]);return Object(Se.jsxs)(wn.a,{open:c,onClose:function(){i(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(Se.jsx)(Nn.a,{id:"alert-dialog-title",children:"Create new namespace"}),Object(Se.jsxs)(Tn.a,{children:[l&&Object(Se.jsx)(C.a,{}),Object(Se.jsxs)($n.a,{id:"alert-dialog-description",children:["Are you sure you want to add a namespace called"," ",Object(Se.jsx)("b",{className:t.wrapText,children:n}),"?"]})]}),Object(Se.jsxs)(Xn.a,{children:[Object(Se.jsx)(x.a,{onClick:function(){i(!1)},color:"primary",disabled:l,type:"button",className:t.clearButton,children:"Cancel"}),Object(Se.jsx)(x.a,{onClick:function(){d(!0)},variant:"contained",color:"primary",autoFocus:!0,disabled:l,children:"Create Namespace"})]})]})}))),xl=Object(o.b)((function(e){return{advancedMode:e.tenants.createTenant.advancedModeOn,tenantName:e.tenants.createTenant.fields.nameTenant.tenantName,namespace:e.tenants.createTenant.fields.nameTenant.namespace,selectedStorageClass:e.tenants.createTenant.fields.nameTenant.selectedStorageClass,storageClasses:e.tenants.createTenant.storageClasses}}),{setModalErrorSnackMessage:Q,setAdvancedMode:function(e){return{type:zs,state:e}},updateAddField:dl,setStorageClassesList:function(e){return{type:Gs,storageClasses:e}},setLimitSize:function(e){return{type:"ADD_TENANT/SET_LIMIT_SIZE",limitSize:e}},isPageValid:ul}),vl=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({buttonContainer:{textAlign:"right"}},De),Je))}))(xl((function(e){var t=e.classes,n=e.storageClasses,i=e.advancedMode,r=e.tenantName,o=e.namespace,s=e.selectedStorageClass,l=e.setAdvancedMode,d=e.updateAddField,u=e.setStorageClassesList,b=e.setLimitSize,j=e.isPageValid,m=e.setModalErrorSnackMessage,p=Object(a.useState)({}),O=Object(h.a)(p,2),f=O[0],g=O[1],x=Object(a.useState)(!0),v=Object(h.a)(x,2),S=v[0],C=v[1],k=Object(a.useState)(!1),w=Object(h.a)(k,2),N=w[0],T=w[1],E=Object(a.useState)(!1),A=Object(h.a)(E,2),_=A[0],I=A[1],L=Object(a.useState)(!1),D=Object(h.a)(L,2),F=D[0],M=D[1],R=Object(a.useCallback)((function(e,t){d("nameTenant",e,t)}),[d]),B=Object(a.useCallback)((function(){I(!1),R("selectedStorageClass",""),u([]),ye.invoke("GET","/api/v1/namespaces/".concat(o,"/tenants")).then((function(e){var t=X()(e,"tenants",[]);if(t&&t.length>0)return C(!1),void T(!1);C(!0),ye.invoke("GET","/api/v1/namespaces/".concat(o,"/resourcequotas/").concat(o,"-storagequota")).then((function(e){var t=X()(e,"elements",[]);b(function(e){var t=X()(e,"elements",[]),n={};return t.forEach((function(e){var t=e.name.split(".storageclass.storage.k8s.io/requests.storage")[0],a=X()(e,"hard",0),c=X()(e,"used",0);n[t]=a-c})),n}(e));var n=t.map((function(e){var t=X()(e,"name","").split(".storageclass.storage.k8s.io/requests.storage")[0];return{label:t,value:t}}));u(n),n.length>0&&R("selectedStorageClass",n[0].value),T(!1)})).catch((function(e){T(!1),I(!0),console.error("Namespace error: ",e)}))})).catch((function(e){console.error(e),m("Error validating if namespace already has tenants")}))}),[o,b,m,u,R]),P=Object(a.useMemo)((function(){return Za()(B,500)}),[B]);Object(a.useEffect)((function(){if(""!==o)return P(),T(!0),P.cancel}),[P,o]),Object(a.useEffect)((function(){var e=!1,t="";S||N?n.length<1&&S&&!N&&(e=!0,t="Please enter a valid namespace"):(e=!0,t="You can only create one tenant per namespace");var a=hl([{fieldKey:"tenant-name",required:!0,pattern:/^[a-z0-9-]{3,63}$/,customPatternMessage:"Name only can contain lowercase letters, numbers and '-'. Min. Length: 3",value:r},{fieldKey:"namespace",required:!0,value:o,customValidation:e,customValidationMessage:t}]),c=!("tenant-name"in a)&&!("namespace"in a)&&n.length>0;j("nameTenant",c),g(a)}),[n,o,r,j,S,N]);var z=function(e){g(ml(f,e))};return Object(Se.jsxs)(c.a.Fragment,{children:[F&&Object(Se.jsx)(gl,{addNamespaceOpen:F,closeAddNamespaceModalAndRefresh:function(e){M(!1),e&&P()},namespace:o}),Object(Se.jsxs)("div",{className:t.headerElement,children:[Object(Se.jsx)("h3",{className:t.h3Section,children:"Name Tenant"}),Object(Se.jsx)("span",{className:t.descriptionText,children:"How would you like to name this new tenant?"})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"tenant-name",name:"tenant-name",onChange:function(e){R("tenantName",e.target.value),z("tenant-name")},label:"Name",value:r,required:!0,error:f["tenant-name"]||""})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"namespace",name:"namespace",onChange:function(e){R("namespace",e.target.value),z("namespace")},label:"Namespace",value:o,error:f.namespace||"",overlayIcon:_?Object(Se.jsx)(Xa,{}):null,overlayAction:function(){M(!0)},required:!0})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(zn,{id:"storage_class",name:"storage_class",onChange:function(e){R("selectedStorageClass",e.target.value)},label:"Storage Class",value:s,options:n,disabled:n.length<1})}),Object(Se.jsxs)(y.a,{item:!0,xs:12,children:[Object(Se.jsx)("br",{}),Object(Se.jsxs)("span",{className:t.descriptionText,children:["Check 'Advanced Mode' for additional configuration options, such as configuring an Identity Provider, Encryption at rest, and customized TLS/SSL Certificates.",Object(Se.jsx)("br",{}),"Leave 'Advanced Mode' unchecked to use the secure default settings for the tenant."]}),Object(Se.jsx)("br",{}),Object(Se.jsx)("br",{}),Object(Se.jsx)(Zn,{value:"adv_mode",id:"adv_mode",name:"adv_mode",checked:i,onChange:function(e){var t=e.target.checked;l(t)},label:"Advanced Mode"})]})]})}))),yl=Object(o.b)((function(e){return{storageClasses:e.tenants.createTenant.storageClasses,customImage:e.tenants.createTenant.fields.configure.customImage,imageName:e.tenants.createTenant.fields.configure.imageName,consoleImage:e.tenants.createTenant.fields.configure.consoleImage,customDockerhub:e.tenants.createTenant.fields.configure.customDockerhub,imageRegistry:e.tenants.createTenant.fields.configure.imageRegistry,imageRegistryUsername:e.tenants.createTenant.fields.configure.imageRegistryUsername,imageRegistryPassword:e.tenants.createTenant.fields.configure.imageRegistryPassword,exposeMinIO:e.tenants.createTenant.fields.configure.exposeMinIO,exposeConsole:e.tenants.createTenant.fields.configure.exposeConsole,prometheusCustom:e.tenants.createTenant.fields.configure.prometheusCustom,logSearchCustom:e.tenants.createTenant.fields.configure.logSearchCustom,logSearchVolumeSize:e.tenants.createTenant.fields.configure.logSearchVolumeSize,logSearchSizeFactor:e.tenants.createTenant.fields.configure.logSearchSizeFactor,prometheusVolumeSize:e.tenants.createTenant.fields.configure.prometheusVolumeSize,prometheusSizeFactor:e.tenants.createTenant.fields.configure.prometheusSizeFactor,logSearchSelectedStorageClass:e.tenants.createTenant.fields.configure.logSearchSelectedStorageClass,logSearchImage:e.tenants.createTenant.fields.configure.logSearchImage,kesImage:e.tenants.createTenant.fields.configure.kesImage,logSearchPostgresImage:e.tenants.createTenant.fields.configure.logSearchPostgresImage,prometheusSelectedStorageClass:e.tenants.createTenant.fields.configure.prometheusSelectedStorageClass,prometheusImage:e.tenants.createTenant.fields.configure.prometheusImage,selectedStorageClass:e.tenants.createTenant.fields.nameTenant.selectedStorageClass}}),{updateAddField:dl,isPageValid:ul}),Sl=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({buttonContainer:{textAlign:"right"}},De),Je))}))(yl((function(e){var t=e.classes,n=e.storageClasses,c=e.customImage,i=e.imageName,r=e.consoleImage,o=e.customDockerhub,s=e.imageRegistry,l=e.imageRegistryUsername,d=e.imageRegistryPassword,u=e.exposeMinIO,b=e.exposeConsole,j=e.prometheusCustom,m=e.logSearchCustom,p=e.logSearchVolumeSize,O=(e.logSearchSizeFactor,e.logSearchImage),f=e.kesImage,g=e.logSearchPostgresImage,x=e.prometheusVolumeSize,v=(e.prometheusSizeFactor,e.logSearchSelectedStorageClass),S=e.prometheusSelectedStorageClass,C=e.prometheusImage,k=e.updateAddField,w=e.isPageValid,N=e.selectedStorageClass,T=Object(a.useState)({}),E=Object(h.a)(T,2),A=E[0],_=E[1],I=Object(a.useCallback)((function(e,t){k("configure",e,t)}),[k]);Object(a.useEffect)((function(){var e=[];j&&(e=[].concat(Object(st.a)(e),[{fieldKey:"prometheus_storage_class",required:!0,value:S,customValidation:""===S,customValidationMessage:"Field cannot be empty"},{fieldKey:"prometheus_volume_size",required:!0,value:x,customValidation:""===x||parseInt(x)<=0,customValidationMessage:"Volume size must be present and be greatter than 0"}])),m&&(e=[].concat(Object(st.a)(e),[{fieldKey:"log_search_storage_class",required:!0,value:v,customValidation:""===v,customValidationMessage:"Field cannot be empty"},{fieldKey:"log_search_volume_size",required:!0,value:p,customValidation:""===p||parseInt(p)<=0,customValidationMessage:"Volume size must be present and be greatter than 0"}])),c&&(e=[].concat(Object(st.a)(e),[{fieldKey:"image",required:!1,value:i,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'minio/minio:VERSION'"},{fieldKey:"consoleImage",required:!1,value:r,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'minio/console:VERSION'"},{fieldKey:"logSearchImage",required:!1,value:O,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'minio/logsearchapi:VERSION'"},{fieldKey:"kesImage",required:!1,value:f,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'minio/kes:VERSION'"},{fieldKey:"logSearchPostgresImage",required:!1,value:g,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'library/postgres:VERSION'"},{fieldKey:"prometheusImage",required:!1,value:C,pattern:/^((.*?)\/(.*?):(.+))$/,customPatternMessage:"Format must be of form: 'minio/prometheus:VERSION'"}]),o&&(e=[].concat(Object(st.a)(e),[{fieldKey:"registry",required:!0,value:s},{fieldKey:"registryUsername",required:!0,value:l},{fieldKey:"registryPassword",required:!0,value:d}])));var t=hl(e);w("configure",0===Object.keys(t).length),_(t)}),[c,i,r,O,f,g,C,o,s,l,d,w,j,m,S,x,v,p]),Object(a.useEffect)((function(){n.length>0&&(0===n.filter((function(e){return e.value===S})).length&&I("prometheusSelectedStorageClass",N),0===n.filter((function(e){return e.value===v})).length&&I("logSearchSelectedStorageClass",N))}),[v,S,N,n,I]);var L=function(e){_(ml(A,e))};return Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsxs)("div",{className:t.headerElement,children:[Object(Se.jsx)("h3",{className:t.h3Section,children:"Configure"}),Object(Se.jsx)("span",{className:t.descriptionText,children:"Basic configurations for tenant management"})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Zn,{value:"custom_image",id:"custom_image",name:"custom_image",checked:c,onChange:function(e){var t=e.target.checked;I("customImage",t)},label:"Use custom image"})}),c&&Object(Se.jsxs)(a.Fragment,{children:["Please enter the MinIO docker image to use",Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"image",name:"image",onChange:function(e){I("imageName",e.target.value),L("image")},label:"MinIO's Image",value:i,error:A.image||"",placeholder:"E.g. minio/minio:RELEASE.2021-06-17T00-10-46Z"})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"consoleImage",name:"consoleImage",onChange:function(e){I("consoleImage",e.target.value),L("consoleImage")},label:"Console's Image",value:r,error:A.consoleImage||"",placeholder:"E.g. minio/console:v0.7.5"})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"logSearchImage",name:"logSearchImage",onChange:function(e){I("logSearchImage",e.target.value),L("logSearchImage")},label:"Log Search API's Image",value:O,error:A.logSearchImage||"",placeholder:"E.g. minio/logsearchapi:v4.1.1"})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"kesImage",name:"kesImage",onChange:function(e){I("kesImage",e.target.value),L("kesImage")},label:"KES Image",value:f,error:A.kesImage||"",placeholder:"E.g. minio/kes:v0.14.0"})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"logSearchPostgresImage",name:"logSearchPostgresImage",onChange:function(e){I("logSearchPostgresImage",e.target.value),L("logSearchPostgresImage")},label:"Log Search Postgres's Image",value:g,error:A.logSearchPostgresImage||"",placeholder:"E.g. library/postgres:13"})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"prometheusImage",name:"prometheusImage",onChange:function(e){I("prometheusImage",e.target.value),L("prometheusImage")},label:"Prometheus Image",value:C,error:A.prometheusImage||"",placeholder:"E.g. quay.io/prometheus/prometheus:latest"})})]}),c&&Object(Se.jsx)(a.Fragment,{children:Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Zn,{value:"custom_docker_hub",id:"custom_docker_hub",name:"custom_docker_hub",checked:o,onChange:function(e){var t=e.target.checked;I("customDockerhub",t)},label:"Set/Update Image Registry"})})}),o&&Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"registry",name:"registry",onChange:function(e){I("imageRegistry",e.target.value)},label:"Endpoint",value:s,error:A.registry||"",placeholder:"E.g. https://index.docker.io/v1/",required:!0})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"registryUsername",name:"registryUsername",onChange:function(e){I("imageRegistryUsername",e.target.value)},label:"Username",value:l,error:A.registryUsername||"",required:!0})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"registryPassword",name:"registryPassword",onChange:function(e){I("imageRegistryPassword",e.target.value)},label:"Password",value:d,error:A.registryPassword||"",required:!0})})]}),Object(Se.jsxs)("div",{className:t.headerElement,children:[Object(Se.jsx)("h3",{className:t.h3Section,children:"Expose Services"}),Object(Se.jsx)("span",{className:t.descriptionText,children:"Whether the tenant's services should request an external IP."})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Zn,{value:"expose_minio",id:"expose_minio",name:"expose_minio",checked:u,onChange:function(e){var t=e.target.checked;I("exposeMinIO",t)},label:"Expose MiniO Service"})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Zn,{value:"expose_console",id:"expose_console",name:"expose_console",checked:b,onChange:function(e){var t=e.target.checked;I("exposeConsole",t)},label:"Expose Console Service"})}),Object(Se.jsxs)("div",{className:t.headerElement,children:[Object(Se.jsx)("h3",{className:t.h3Section,children:"Additional Configurations"}),Object(Se.jsx)("span",{className:t.descriptionText,children:"Configure Storage Classes & Storage size for Log Search and Prometheus add-ons"})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Zn,{value:"logSearchConfig",id:"log_search_configuration",name:"log_search_configuration",checked:m,onChange:function(e){var t=e.target.checked;I("logSearchCustom",t)},label:"Override Log Search defaults"})}),m&&Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(zn,{id:"log_search_storage_class",name:"log_search_storage_class",onChange:function(e){I("logSearchSelectedStorageClass",e.target.value)},label:"Log Search Storage Class",value:v,options:n,disabled:n.length<1})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("div",{className:t.multiContainer,children:Object(Se.jsx)("div",{children:Object(Se.jsx)(Dn,{type:"number",id:"log_search_volume_size",name:"log_search_volume_size",onChange:function(e){I("logSearchVolumeSize",e.target.value),L("log_search_volume_size")},label:"Storage Size [Gi]",value:p,required:!0,error:A.log_search_volume_size||"",min:"0"})})})}),Object(Se.jsx)("br",{})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Zn,{value:"prometheusConfig",id:"prometheus_configuration",name:"prometheus_configuration",checked:j,onChange:function(e){var t=e.target.checked;I("prometheusCustom",t)},label:"Override Prometheus defaults"})}),j&&Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(zn,{id:"prometheus_storage_class",name:"prometheus_storage_class",onChange:function(e){I("prometheusSelectedStorageClass",e.target.value)},label:"Prometheus Storage Class",value:S,options:n,disabled:n.length<1})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("div",{className:t.multiContainer,children:Object(Se.jsx)("div",{children:Object(Se.jsx)(Dn,{type:"number",id:"prometheus_volume_size",name:"prometheus_volume_size",onChange:function(e){I("prometheusVolumeSize",e.target.value),L("prometheus_volume_size")},label:"Storage Size [Gi]",value:x,required:!0,error:A.prometheus_volume_size||"",min:"0"})})})}),Object(Se.jsx)("br",{})]})]})}))),Cl=n(346),kl=n.n(Cl),wl=n(347),Nl=n.n(wl),Tl=Object(o.b)((function(e){return{idpSelection:e.tenants.createTenant.fields.identityProvider.idpSelection,accessKeys:e.tenants.createTenant.fields.identityProvider.accessKeys,secretKeys:e.tenants.createTenant.fields.identityProvider.secretKeys,openIDURL:e.tenants.createTenant.fields.identityProvider.openIDURL,openIDClientID:e.tenants.createTenant.fields.identityProvider.openIDClientID,openIDSecretID:e.tenants.createTenant.fields.identityProvider.openIDSecretID,ADURL:e.tenants.createTenant.fields.identityProvider.ADURL,ADSkipTLS:e.tenants.createTenant.fields.identityProvider.ADSkipTLS,ADServerInsecure:e.tenants.createTenant.fields.identityProvider.ADServerInsecure,ADUserNameFilter:e.tenants.createTenant.fields.identityProvider.ADUserNameFilter,ADGroupBaseDN:e.tenants.createTenant.fields.identityProvider.ADGroupBaseDN,ADGroupSearchFilter:e.tenants.createTenant.fields.identityProvider.ADGroupSearchFilter,ADNameAttribute:e.tenants.createTenant.fields.identityProvider.ADNameAttribute}}),{updateAddField:dl,isPageValid:ul}),El=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({buttonContainer:{textAlign:"right"},shortened:{gridTemplateColumns:"auto auto 50px 50px",display:"grid",gridGap:20},buttonTray:{gridTemplateColumns:"auto auto 10px 10px",display:"grid",gridGap:0,height:16,marginTop:12}},De),Je))}))(Tl((function(e){var t=e.classes,n=e.idpSelection,c=e.accessKeys,i=e.secretKeys,r=e.openIDURL,o=e.openIDClientID,s=e.openIDSecretID,l=e.ADURL,d=e.ADSkipTLS,u=e.ADServerInsecure,b=e.ADUserNameFilter,j=e.ADGroupBaseDN,m=e.ADGroupSearchFilter,p=e.ADNameAttribute,O=e.updateAddField,f=e.isPageValid,g=Object(a.useState)({}),x=Object(h.a)(g,2),v=x[0],C=x[1],k=Object(a.useCallback)((function(e,t){O("identityProvider",e,t)}),[O]),w=function(e,t){var n=Object(st.a)(c);n[e]=t,k("accessKeys",n)},N=function(e,t){var n=Object(st.a)(i);n[e]=t,k("secretKeys",n)},T=function(e){C(ml(v,e))};Object(a.useEffect)((function(){var e=[];if("Built-in"===n){e=Object(st.a)(e);for(var t=0;t<c.length;t++)e.push({fieldKey:"accesskey-".concat(t.toString()),required:!0,value:c[t],pattern:/^[a-zA-Z0-9-]{8,63}$/,customPatternMessage:"Keys must be at least length 8"}),e.push({fieldKey:"secretkey-".concat(t.toString()),required:!0,value:i[t],pattern:/^[a-zA-Z0-9-]{8,63}$/,customPatternMessage:"Keys must be at least length 8"})}"OpenID"===n&&(e=[].concat(Object(st.a)(e),[{fieldKey:"openID_URL",required:!0,value:r},{fieldKey:"openID_clientID",required:!0,value:o},{fieldKey:"openID_secretID",required:!0,value:s}])),"AD"===n&&(e=[].concat(Object(st.a)(e),[{fieldKey:"AD_URL",required:!0,value:l},{fieldKey:"ad_userNameFilter",required:!0,value:b},{fieldKey:"ad_groupBaseDN",required:!0,value:j},{fieldKey:"ad_groupSearchFilter",required:!0,value:m},{fieldKey:"ad_nameAttribute",required:!0,value:p}]));var a=hl(e);f("identityProvider",0===Object.keys(a).length),C(a)}),[n,c,i,r,o,s,l,b,j,m,p,f]);var E=null;return"Built-in"===n&&(E=c.map((function(e,n){return Object(Se.jsx)(a.Fragment,{children:Object(Se.jsxs)("div",{className:t.shortened,children:[Object(Se.jsx)(Dn,{id:"accesskey-".concat(n.toString()),label:"",placeholder:"Access Key",name:"accesskey-".concat(n.toString()),value:c[n],onChange:function(e){w(n,e.target.value),T("accesskey-".concat(n.toString()))},index:n,error:v["accesskey-".concat(n.toString())]||""},"csv-accesskey-".concat(n.toString())),Object(Se.jsx)(Dn,{id:"secretkey-".concat(n.toString()),label:"",placeholder:"Secret Key",name:"secretkey-".concat(n.toString()),value:i[n],onChange:function(e){N(n,e.target.value),T("secretkey-".concat(n.toString()))},index:n,error:v["secretkey-".concat(n.toString())]||""},"csv-secretkey-".concat(n.toString())),Object(Se.jsxs)("div",{className:t.buttonTray,children:[Object(Se.jsx)(gn.a,{title:"Add User","aria-label":"add",children:Object(Se.jsx)(Vt.a,{size:"small",onClick:function(){c.push(""),i.push(""),w(c.length-1,""),N(i.length-1,"")},children:Object(Se.jsx)(Is.a,{})})}),Object(Se.jsx)(gn.a,{title:"Randomize Credentials","aria-label":"add",children:Object(Se.jsx)(Vt.a,{onClick:function(){w(n,pl(16)),N(n,pl(32))},size:"small",children:Object(Se.jsx)(kl.a,{})})}),Object(Se.jsx)(gn.a,{title:"Remove","aria-label":"add",children:Object(Se.jsx)(Vt.a,{size:"small",style:{marginLeft:16},onClick:function(){c.length>1&&(c.splice(n,1),i.splice(n,1),w(c.length-1,c[c.length-1]))},children:Object(Se.jsx)(Nl.a,{})})})]})]})},"identityField-".concat(n.toString()))}))),Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsxs)("div",{className:t.headerElement,children:[Object(Se.jsx)("h3",{className:t.h3Section,children:"Identity Provider"}),Object(Se.jsx)("span",{className:t.descriptionText,children:"Access to the tenant can be controlled via an external Identity Manager."})]}),Object(Se.jsxs)(y.a,{item:!0,xs:12,children:[Object(Se.jsx)(Vn,{currentSelection:n,id:"idp-options",name:"idp-options",label:"Protocol",onChange:function(e){k("idpSelection",e.target.value)},selectorOptions:[{label:"Built-in",value:"Built-in"},{label:"OpenID",value:"OpenID"},{label:"Active Directory",value:"AD"}]}),"Add additional users"]})," ","Built-in"===n&&Object(Se.jsx)(a.Fragment,{children:E}),"OpenID"===n&&Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"openID_URL",name:"openID_URL",onChange:function(e){k("openIDURL",e.target.value),T("openID_URL")},label:"URL",value:r,error:v.openID_URL||"",required:!0})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"openID_clientID",name:"openID_clientID",onChange:function(e){k("openIDClientID",e.target.value),T("openID_clientID")},label:"Client ID",value:o,error:v.openID_clientID||"",required:!0})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"openID_secretID",name:"openID_secretID",onChange:function(e){k("openIDSecretID",e.target.value),T("openID_secretID")},label:"Secret ID",value:s,error:v.openID_secretID||"",required:!0})})]}),"AD"===n&&Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"AD_URL",name:"AD_URL",onChange:function(e){k("ADURL",e.target.value),T("AD_URL")},label:"URL",value:l,error:v.AD_URL||"",required:!0})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Zn,{value:"ad_skipTLS",id:"ad_skipTLS",name:"ad_skipTLS",checked:d,onChange:function(e){var t=e.target.checked;k("ADSkipTLS",t)},label:"Skip TLS Verification"})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Zn,{value:"ad_serverInsecure",id:"ad_serverInsecure",name:"ad_serverInsecure",checked:u,onChange:function(e){var t=e.target.checked;k("ADServerInsecure",t)},label:"Server Insecure"})}),u?Object(Se.jsxs)(y.a,{item:!0,xs:12,children:[Object(Se.jsx)(S.a,{className:t.error,variant:"caption",display:"block",gutterBottom:!0,children:"Warning: All traffic with Active Directory will be unencrypted"}),Object(Se.jsx)("br",{})]}):null,Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"ad_userNameFilter",name:"ad_userNameFilter",onChange:function(e){k("ADUserNameFilter",e.target.value),T("ad_userNameFilter")},label:"User Search Filter",value:b,error:v.ad_userNameFilter||"",required:!0})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"ad_groupBaseDN",name:"ad_groupBaseDN",onChange:function(e){k("ADGroupBaseDN",e.target.value),T("ad_groupBaseDN")},label:"Group Search Base DN",value:j,error:v.ad_groupBaseDN||"",required:!0})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"ad_groupSearchFilter",name:"ad_groupSearchFilter",onChange:function(e){k("ADGroupSearchFilter",e.target.value),T("ad_groupSearchFilter")},label:"Group Search Filter",value:m,error:v.ad_groupSearchFilter||"",required:!0})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"ad_nameAttribute",name:"ad_nameAttribute",onChange:function(e){k("ADNameAttribute",e.target.value),T("ad_nameAttribute")},label:"Group Name Attribute",value:p,error:v.ad_nameAttribute||"",required:!0})})]})]})}))),Al=Object(o.b)((function(e){return{enableTLS:e.tenants.createTenant.fields.security.enableTLS,enableAutoCert:e.tenants.createTenant.fields.security.enableAutoCert,enableCustomCerts:e.tenants.createTenant.fields.security.enableCustomCerts,minioCertificates:e.tenants.createTenant.certificates.minioCertificates,caCertificates:e.tenants.createTenant.certificates.caCertificates,consoleCaCertificates:e.tenants.createTenant.certificates.consoleCaCertificates,consoleCertificate:e.tenants.createTenant.certificates.consoleCertificate}}),{updateAddField:dl,isPageValid:ul,addFileToCaCertificates:function(e,t,n,a){return{type:Qs,id:e,key:t,fileName:n,value:a}},deleteCaCertificate:function(e){return{type:Zs,id:e}},addCaCertificate:function(){return{type:Ys}},addKeyPair:function(){return{type:qs}},addFileToKeyPair:function(e,t,n,a){return{type:Vs,id:e,key:t,fileName:n,value:a}},deleteKeyPair:function(e){return{type:Hs,id:e}},addConsoleCertificate:bl,addFileToConsoleCaCertificates:function(e,t,n,a){return{type:Xs,id:e,key:t,fileName:n,value:a}},deleteConsoleCaCertificate:function(e){return{type:el,id:e}},addConsoleCaCertificate:function(){return{type:$s}}}),_l=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({buttonContainer:{textAlign:"right"}},De),Je))}))(Al((function(e){var t=e.classes,n=e.enableTLS,c=e.enableAutoCert,i=e.enableCustomCerts,r=e.minioCertificates,o=e.caCertificates,s=e.consoleCertificate,l=e.updateAddField,d=e.isPageValid,u=e.addFileToCaCertificates,b=e.deleteCaCertificate,j=e.addCaCertificate,h=e.consoleCaCertificates,m=e.addFileToConsoleCaCertificates,p=e.deleteConsoleCaCertificate,O=e.addConsoleCaCertificate,f=e.addKeyPair,g=e.addFileToKeyPair,v=e.deleteKeyPair,C=Object(a.useCallback)((function(e,t){l("security",e,t)}),[l]);return Object(a.useEffect)((function(){d("security",!n||(!!c||!!i))}),[n,c,i,d]),Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)("div",{className:t.headerElement,children:Object(Se.jsx)("h3",{className:t.h3Section,children:"Security"})}),Object(Se.jsxs)(y.a,{item:!0,xs:12,children:[Object(Se.jsx)(Zn,{value:"enableTLS",id:"enableTLS",name:"enableTLS",checked:n,onChange:function(e){var t=e.target.checked;C("enableTLS",t)},label:"Enable TLS"}),"Enable TLS for the tenant, this is required for Encryption Configuration",n&&Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)("br",{}),Object(Se.jsx)("br",{}),Object(Se.jsx)(S.a,{variant:"caption",display:"block",gutterBottom:!0,children:"AutoCert: MinIO Operator will generate all TLS certificates automatically"}),Object(Se.jsx)(S.a,{variant:"caption",display:"block",gutterBottom:!0,children:"Custom certificates: Allow user to provide your own certificates"}),Object(Se.jsx)("br",{})]})]}),n&&Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,children:[Object(Se.jsx)(Zn,{value:"enableAutoCert",id:"enableAutoCert",name:"enableAutoCert",checked:c,onChange:function(e){var t=e.target.checked;C("enableAutoCert",t)},label:"Enable AutoCert"}),Object(Se.jsx)(Zn,{value:"enableCustomCerts",id:"enableCustomCerts",name:"enableCustomCerts",checked:i,onChange:function(e){var t=e.target.checked;C("enableCustomCerts",t)},label:"Custom Certificates"})]}),i&&Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(S.a,{variant:"overline",display:"block",gutterBottom:!0,children:"MinIO Certificates"})}),r.map((function(e){return Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:5,children:Object(Se.jsx)(xs,{onChange:function(t,n){g(e.id,"key",n,t)},accept:".key,.pem",id:"tlsKey",name:"tlsKey",label:"Key",value:e.key})}),Object(Se.jsx)(y.a,{item:!0,xs:5,children:Object(Se.jsx)(xs,{onChange:function(t,n){g(e.id,"cert",n,t)},accept:".cer,.crt,.cert,.pem",id:"tlsCert",name:"tlsCert",label:"Cert",value:e.cert})}),Object(Se.jsx)(y.a,{item:!0,xs:1,children:Object(Se.jsx)(x.a,{onClick:function(){v(e.id)},color:"secondary",children:"Remove"})})]},e.id)})),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(x.a,{onClick:f,color:"primary",children:"Add More"})})]}),Object(Se.jsx)(y.a,{container:!0,children:Object(Se.jsxs)(y.a,{item:!0,xs:12,children:[Object(Se.jsx)("br",{}),Object(Se.jsx)(Hi.a,{}),Object(Se.jsx)("br",{})]})}),Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(S.a,{variant:"overline",display:"block",gutterBottom:!0,children:"MinIO CA Certificates"})}),o.map((function(e){return Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:10,children:Object(Se.jsx)(xs,{onChange:function(t,n){u(e.id,"cert",n,t)},accept:".cer,.crt,.cert,.pem",id:"tlsCert",name:"tlsCert",label:"Cert",value:e.cert})}),Object(Se.jsx)(y.a,{item:!0,xs:1,children:Object(Se.jsx)(x.a,{onClick:function(){b(e.id)},color:"secondary",children:"Remove"})})]},e.id)})),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(x.a,{onClick:j,color:"primary",children:"Add More"})})]}),Object(Se.jsx)(y.a,{container:!0,children:Object(Se.jsxs)(y.a,{item:!0,xs:12,children:[Object(Se.jsx)("br",{}),Object(Se.jsx)(Hi.a,{}),Object(Se.jsx)("br",{})]})}),Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(S.a,{variant:"overline",display:"block",gutterBottom:!0,children:"Console Certificates"})}),Object(Se.jsx)(y.a,{item:!0,xs:6,children:Object(Se.jsx)(xs,{onChange:function(e,t){bl("key",t,e)},accept:".key,.pem",id:"consoleKey",name:"consoleKey",label:"Key",value:s.key})}),Object(Se.jsx)(y.a,{item:!0,xs:6,children:Object(Se.jsx)(xs,{onChange:function(e,t){bl("cert",t,e)},accept:".cer,.crt,.cert,.pem",id:"consoleCert",name:"consoleCert",label:"Cert",value:s.cert})})]}),Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(S.a,{variant:"overline",display:"block",gutterBottom:!0,children:"Console CA Certificates"})}),h.map((function(e){return Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:10,children:Object(Se.jsx)(xs,{onChange:function(t,n){m(e.id,"cert",n,t)},accept:".cer,.crt,.cert,.pem",id:"tlsCert",name:"tlsCert",label:"Cert",value:e.cert})}),Object(Se.jsx)(y.a,{item:!0,xs:1,children:Object(Se.jsx)(x.a,{onClick:function(){p(e.id)},color:"secondary",children:"Remove"})})]},e.id)})),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(x.a,{onClick:O,color:"primary",children:"Add More"})})]})]})]})]})}))),Il=Object(o.b)((function(e){return{enableEncryption:e.tenants.createTenant.fields.encryption.enableEncryption,encryptionType:e.tenants.createTenant.fields.encryption.encryptionType,gemaltoEndpoint:e.tenants.createTenant.fields.encryption.gemaltoEndpoint,gemaltoToken:e.tenants.createTenant.fields.encryption.gemaltoToken,gemaltoDomain:e.tenants.createTenant.fields.encryption.gemaltoDomain,gemaltoRetry:e.tenants.createTenant.fields.encryption.gemaltoRetry,awsEndpoint:e.tenants.createTenant.fields.encryption.awsEndpoint,awsRegion:e.tenants.createTenant.fields.encryption.awsRegion,awsKMSKey:e.tenants.createTenant.fields.encryption.awsKMSKey,awsAccessKey:e.tenants.createTenant.fields.encryption.awsAccessKey,awsSecretKey:e.tenants.createTenant.fields.encryption.awsSecretKey,awsToken:e.tenants.createTenant.fields.encryption.awsToken,vaultEndpoint:e.tenants.createTenant.fields.encryption.vaultEndpoint,vaultEngine:e.tenants.createTenant.fields.encryption.vaultEngine,vaultNamespace:e.tenants.createTenant.fields.encryption.vaultNamespace,vaultPrefix:e.tenants.createTenant.fields.encryption.vaultPrefix,vaultAppRoleEngine:e.tenants.createTenant.fields.encryption.vaultAppRoleEngine,vaultId:e.tenants.createTenant.fields.encryption.vaultId,vaultSecret:e.tenants.createTenant.fields.encryption.vaultSecret,vaultRetry:e.tenants.createTenant.fields.encryption.vaultRetry,vaultPing:e.tenants.createTenant.fields.encryption.vaultPing,gcpProjectID:e.tenants.createTenant.fields.encryption.gcpProjectID,gcpEndpoint:e.tenants.createTenant.fields.encryption.gcpEndpoint,gcpClientEmail:e.tenants.createTenant.fields.encryption.gcpClientEmail,gcpClientID:e.tenants.createTenant.fields.encryption.gcpClientID,gcpPrivateKeyID:e.tenants.createTenant.fields.encryption.gcpPrivateKeyID,gcpPrivateKey:e.tenants.createTenant.fields.encryption.gcpPrivateKey,enableCustomCertsForKES:e.tenants.createTenant.fields.encryption.enableCustomCertsForKES,enableAutoCert:e.tenants.createTenant.fields.security.enableAutoCert,enableTLS:e.tenants.createTenant.fields.security.enableTLS,minioCertificates:e.tenants.createTenant.certificates.minioCertificates,serverCertificate:e.tenants.createTenant.certificates.serverCertificate,clientCertificate:e.tenants.createTenant.certificates.clientCertificate,vaultCertificate:e.tenants.createTenant.certificates.vaultCertificate,vaultCA:e.tenants.createTenant.certificates.vaultCA,gemaltoCA:e.tenants.createTenant.certificates.gemaltoCA,enableCustomCerts:e.tenants.createTenant.fields.security.enableCustomCerts}}),{updateAddField:dl,isPageValid:ul,addFileServerCert:function(e,t,n){return{type:tl,key:e,fileName:t,value:n}},addFileClientCert:function(e,t,n){return{type:nl,key:e,fileName:t,value:n}},addFileVaultCert:function(e,t,n){return{type:al,key:e,fileName:t,value:n}},addFileVaultCa:function(e,t){return{type:cl,fileName:e,value:t}},addFileGemaltoCa:function(e,t){return{type:il,fileName:e,value:t}}}),Ll=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({buttonContainer:{textAlign:"right"}},De),Je))}))(Il((function(e){var t=e.classes,n=e.updateAddField,c=e.isPageValid,i=e.addFileServerCert,r=e.addFileClientCert,o=e.addFileVaultCert,s=e.addFileVaultCa,l=e.addFileGemaltoCa,d=e.enableEncryption,u=e.enableCustomCerts,b=e.encryptionType,j=e.gemaltoEndpoint,m=e.gemaltoToken,p=e.gemaltoDomain,O=e.gemaltoRetry,f=e.awsEndpoint,g=e.awsRegion,x=e.awsKMSKey,v=e.awsAccessKey,C=e.awsSecretKey,k=e.awsToken,w=e.vaultEndpoint,N=e.vaultEngine,T=e.vaultNamespace,E=e.vaultPrefix,A=e.vaultAppRoleEngine,_=e.vaultId,I=e.vaultSecret,L=e.vaultRetry,D=e.vaultPing,F=e.gcpProjectID,M=e.gcpEndpoint,R=e.gcpClientEmail,B=e.gcpClientID,P=e.gcpPrivateKeyID,z=e.gcpPrivateKey,K=e.enableCustomCertsForKES,U=e.enableAutoCert,W=e.enableTLS,G=e.minioCertificates,q=e.serverCertificate,V=e.clientCertificate,H=e.vaultCertificate,Y=e.vaultCA,Q=e.gemaltoCA,Z=Object(a.useState)({}),J=Object(h.a)(Z,2),$=J[0],X=J[1],ee=!1;W&&(U||G&&G.filter((function(e){return e.encoded_key&&e.encoded_cert})).length>0)&&(ee=!0);var te=Object(a.useCallback)((function(e,t){n("encryption",e,t)}),[n]),ne=function(e){X(ml($,e))};return Object(a.useEffect)((function(){var e=[];d&&(u&&(e=[].concat(Object(st.a)(e),[{fieldKey:"serverKey",required:!U,value:q.encoded_key},{fieldKey:"serverCert",required:!U,value:q.encoded_cert},{fieldKey:"clientKey",required:!U,value:V.encoded_key},{fieldKey:"clientCert",required:!U,value:V.encoded_cert}])),"vault"===b&&(e=[].concat(Object(st.a)(e),[{fieldKey:"vault_endpoint",required:!0,value:w},{fieldKey:"vault_id",required:!0,value:_},{fieldKey:"vault_secret",required:!0,value:I},{fieldKey:"vault_ping",required:!1,value:D,customValidation:parseInt(D)<0,customValidationMessage:"Value needs to be 0 or greater"},{fieldKey:"vault_retry",required:!1,value:L,customValidation:parseInt(L)<0,customValidationMessage:"Value needs to be 0 or greater"}])),"aws"===b&&(e=[].concat(Object(st.a)(e),[{fieldKey:"aws_endpoint",required:!0,value:f},{fieldKey:"aws_region",required:!0,value:g},{fieldKey:"aws_accessKey",required:!0,value:v},{fieldKey:"aws_secretKey",required:!0,value:C}])),"gemalto"===b&&(e=[].concat(Object(st.a)(e),[{fieldKey:"gemalto_endpoint",required:!0,value:j},{fieldKey:"gemalto_token",required:!0,value:m},{fieldKey:"gemalto_domain",required:!0,value:p},{fieldKey:"gemalto_retry",required:!1,value:O,customValidation:parseInt(O)<0,customValidationMessage:"Value needs to be 0 or greater"}])));var t=hl(e);c("encryption",0===Object.keys(t).length),X(t)}),[d,b,w,N,_,I,D,L,f,g,C,v,j,m,p,O,F,c,U,u,q.encoded_key,q.encoded_cert,V.encoded_key,V.encoded_cert]),Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsxs)("div",{className:t.headerElement,children:[Object(Se.jsx)("h3",{className:t.h3Section,children:"Encryption"}),Object(Se.jsx)("span",{className:t.descriptionText,children:"How would you like to encrypt the information at rest."})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Zn,{value:"enableEncryption",id:"enableEncryption",name:"enableEncryption",checked:d,onChange:function(e){var t=e.target.checked;te("enableEncryption",t)},label:"Enable Server Side Encryption",disabled:!ee})}),d&&Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Vn,{currentSelection:b,id:"encryptionType",name:"encryptionType",label:"Encryption Options",onChange:function(e){te("encryptionType",e.target.value)},selectorOptions:[{label:"Vault",value:"vault"},{label:"AWS",value:"aws"},{label:"Gemalto",value:"gemalto"},{label:"GCP",value:"gcp"}]})}),"vault"===b&&Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Zn,{value:"enableCustomCertsForKES",id:"enableCustomCertsForKES",name:"enableCustomCertsForKES",checked:K||!U,onChange:function(e){var t=e.target.checked;te("enableCustomCertsForKES",t)},label:"Custom Certificates",disabled:!U})}),(K||!U)&&Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(S.a,{variant:"overline",display:"block",gutterBottom:!0,children:"Encryption Service Certificates"})}),Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsx)(y.a,{item:!0,xs:6,children:Object(Se.jsx)(xs,{onChange:function(e,t){i("key",t,e),ne("serverKey")},accept:".key,.pem",id:"serverKey",name:"serverKey",label:"Key",error:$.serverKey||"",value:q.key,required:!U})}),Object(Se.jsx)(y.a,{item:!0,xs:6,children:Object(Se.jsx)(xs,{onChange:function(e,t){i("cert",t,e),ne("serverCert")},accept:".cer,.crt,.cert,.pem",id:"serverCert",name:"serverCert",label:"Cert",error:$.serverCert||"",value:q.cert,required:!U})})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(S.a,{variant:"overline",display:"block",gutterBottom:!0,children:"Mutual TLS authentication"})}),Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsx)(y.a,{item:!0,xs:6,children:Object(Se.jsx)(xs,{onChange:function(e,t){r("key",t,e),ne("clientKey")},accept:".key,.pem",id:"clientKey",name:"clientKey",label:"Key",error:$.clientKey||"",value:V.key,required:!U})}),Object(Se.jsx)(y.a,{item:!0,xs:6,children:Object(Se.jsx)(xs,{onChange:function(e,t){r("cert",t,e),ne("clientCert")},accept:".cer,.crt,.cert,.pem",id:"clientCert",name:"clientCert",label:"Cert",error:$.clientCert||"",value:V.cert,required:!U})})]})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"vault_endpoint",name:"vault_endpoint",onChange:function(e){te("vaultEndpoint",e.target.value),ne("vault_endpoint")},label:"Endpoint",value:w,error:$.vault_endpoint||"",required:!0})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"vault_engine",name:"vault_engine",onChange:function(e){te("vaultEngine",e.target.value),ne("vault_engine")},label:"Engine",value:N})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"vault_namespace",name:"vault_namespace",onChange:function(e){te("vaultNamespace",e.target.value)},label:"Namespace",value:T})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"vault_prefix",name:"vault_prefix",onChange:function(e){te("vaultPrefix",e.target.value)},label:"Prefix",value:E})}),Object(Se.jsx)("h5",{children:"App Role"}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"vault_approle_engine",name:"vault_approle_engine",onChange:function(e){te("vaultAppRoleEngine",e.target.value)},label:"Engine",value:A})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"vault_id",name:"vault_id",onChange:function(e){te("vaultId",e.target.value),ne("vault_id")},label:"AppRole ID",value:_,error:$.vault_id||"",required:!0})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"vault_secret",name:"vault_secret",onChange:function(e){te("vaultSecret",e.target.value),ne("vault_secret")},label:"AppRole Secret",value:I,error:$.vault_secret||"",required:!0})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{type:"number",min:"0",id:"vault_retry",name:"vault_retry",onChange:function(e){te("vaultRetry",e.target.value),ne("vault_retry")},label:"Retry (Seconds)",value:L,error:$.vault_retry||""})}),Object(Se.jsx)("h5",{children:"Mutual TLS authentication (optional)"}),Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsx)(y.a,{item:!0,xs:6,children:Object(Se.jsx)(xs,{onChange:function(e,t){o("key",t,e),ne("vault_key")},accept:".key,.pem",id:"vault_key",name:"vault_key",label:"Key",value:H.key})}),Object(Se.jsx)(y.a,{item:!0,xs:6,children:Object(Se.jsx)(xs,{onChange:function(e,t){o("cert",t,e),ne("vault_cert")},accept:".cer,.crt,.cert,.pem",id:"vault_cert",name:"vault_cert",label:"Cert",value:H.cert})})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(xs,{onChange:function(e,t){s(t,e),ne("vault_ca")},accept:".cer,.crt,.cert,.pem",id:"vault_ca",name:"vault_ca",label:"CA",value:Y.cert})}),Object(Se.jsx)("h5",{children:"Status"}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{type:"number",min:"0",id:"vault_ping",name:"vault_ping",onChange:function(e){te("vaultPing",e.target.value),ne("vault_ping")},label:"Ping (Seconds)",value:D,error:$.vault_ping||""})})]}),"gcp"===b&&Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"gcp_project_id",name:"gcp_project_id",onChange:function(e){te("gcpProjectID",e.target.value)},label:"Project ID",value:F})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"gcp_endpoint",name:"gcp_endpoint",onChange:function(e){te("gcpEndpoint",e.target.value)},label:"Endpoint",value:M})}),Object(Se.jsx)("h5",{children:"Credentials"}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"gcp_client_email",name:"gcp_client_email",onChange:function(e){te("gcpClientEmail",e.target.value)},label:"Client Email",value:R})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"gcp_client_id",name:"gcp_client_id",onChange:function(e){te("gcpClientID",e.target.value)},label:"Client ID",value:B})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"gcp_private_key_id",name:"gcp_private_key_id",onChange:function(e){te("gcpPrivateKeyID",e.target.value)},label:"Private Key ID",value:P})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"gcp_private_key",name:"gcp_private_key",onChange:function(e){te("gcpPrivateKey",e.target.value)},label:"Private Key",value:z})})]}),"aws"===b&&Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"aws_endpoint",name:"aws_endpoint",onChange:function(e){te("awsEndpoint",e.target.value),ne("aws_endpoint")},label:"Endpoint",value:f,error:$.aws_endpoint||"",required:!0})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"aws_region",name:"aws_region",onChange:function(e){te("awsRegion",e.target.value),ne("aws_region")},label:"Region",value:g,error:$.aws_region||"",required:!0})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"aws_kmsKey",name:"aws_kmsKey",onChange:function(e){te("awsKMSKey",e.target.value)},label:"KMS Key",value:x})}),Object(Se.jsx)("h5",{children:"Credentials"}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"aws_accessKey",name:"aws_accessKey",onChange:function(e){te("awsAccessKey",e.target.value),ne("aws_accessKey")},label:"Access Key",value:v,error:$.aws_accessKey||"",required:!0})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"aws_secretKey",name:"aws_secretKey",onChange:function(e){te("awsSecretKey",e.target.value),ne("aws_secretKey")},label:"Secret Key",value:C,error:$.aws_secretKey||"",required:!0})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"aws_token",name:"aws_token",onChange:function(e){te("awsToken",e.target.value)},label:"Token",value:k})})]}),"gemalto"===b&&Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"gemalto_endpoint",name:"gemalto_endpoint",onChange:function(e){te("gemaltoEndpoint",e.target.value),ne("gemalto_endpoint")},label:"Endpoint",value:j,error:$.gemalto_endpoint||"",required:!0})}),Object(Se.jsx)("h5",{children:"Credentials"}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"gemalto_token",name:"gemalto_token",onChange:function(e){te("gemaltoToken",e.target.value),ne("gemalto_token")},label:"Token",value:m,error:$.gemalto_token||"",required:!0})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"gemalto_domain",name:"gemalto_domain",onChange:function(e){te("gemaltoDomain",e.target.value),ne("gemalto_domain")},label:"Domain",value:p,error:$.gemalto_domain||"",required:!0})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{type:"number",min:"0",id:"gemalto_retry",name:"gemalto_retry",onChange:function(e){te("gemaltoRetry",e.target.value),ne("gemalto_retry")},label:"Retry (seconds)",value:O,error:$.gemalto_retry||""})}),Object(Se.jsx)("h5",{children:"Custom CA Root certificate verification"}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(xs,{onChange:function(e,t){l(t,e),ne("gemalto_ca")},accept:".cer,.crt,.cert,.pem",id:"gemalto_ca",name:"gemalto_ca",label:"CA",value:Q.cert})})]})]})]})}))),Dl=Object(o.b)((function(e){return{advancedMode:e.tenants.createTenant.advancedModeOn,volumeSize:e.tenants.createTenant.fields.tenantSize.volumeSize,sizeFactor:e.tenants.createTenant.fields.tenantSize.sizeFactor,drivesPerServer:e.tenants.createTenant.fields.tenantSize.drivesPerServer,nodes:e.tenants.createTenant.fields.tenantSize.nodes,memoryNode:e.tenants.createTenant.fields.tenantSize.memoryNode,ecParity:e.tenants.createTenant.fields.tenantSize.ecParity,ecParityChoices:e.tenants.createTenant.fields.tenantSize.ecParityChoices,cleanECChoices:e.tenants.createTenant.fields.tenantSize.cleanECChoices,maxAllocableMemo:e.tenants.createTenant.fields.tenantSize.maxAllocableMemo,memorySize:e.tenants.createTenant.fields.tenantSize.memorySize,distribution:e.tenants.createTenant.fields.tenantSize.distribution,ecParityCalc:e.tenants.createTenant.fields.tenantSize.ecParityCalc,limitSize:e.tenants.createTenant.fields.tenantSize.limitSize,selectedStorageClass:e.tenants.createTenant.fields.nameTenant.selectedStorageClass}}),{updateAddField:dl,isPageValid:ul}),Fl=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({buttonContainer:{textAlign:"right"}},De),Je))}))(Dl((function(e){var t=e.classes,n=e.updateAddField,c=e.isPageValid,i=e.advancedMode,r=e.volumeSize,o=e.sizeFactor,s=e.drivesPerServer,l=e.nodes,d=e.memoryNode,u=e.ecParity,b=e.ecParityChoices,j=e.cleanECChoices,m=e.maxAllocableMemo,p=e.memorySize,O=e.distribution,f=e.ecParityCalc,g=e.limitSize,x=e.selectedStorageClass,v=Object(a.useState)({}),S=Object(h.a)(v,2),C=S[0],k=S[1],w=f.storageFactors.find((function(e){return e.erasureCode===u})),N=Object(a.useCallback)((function(e,t){n("tenantSize",e,t)}),[n]),T=function(e){k(ml(C,e))},E=Object(a.useCallback)((function(){var e=parseInt(d)||0,t=m||0,n=o,a=function(e,t,n){var a=je(e.toString(10),"Gi",!0),c=parseInt(a,10);if(0===n)return{error:"There is no memory available for the selected number of nodes",request:0,limit:0};if(n<ae)return{error:"There are not enough memory resources available",request:0,limit:0};if(c<ae)return{error:"The requested memory size must be greater than 2Gi",request:0,limit:0};if(c>n)return{error:"The requested memory is greater than the max available memory for the selected number of nodes",request:0,limit:0};var i=parseInt(t,10),r=c;return i>=parseInt(je("1","Pi",!0),10)?r=Math.max(c,parseInt(je("64","Gi",!0),10)):i>=parseInt(je("100","Ti"),10)?r=Math.max(c,parseInt(je("32","Gi",!0),10)):i>=parseInt(je("10","Ti"),10)?r=Math.max(c,parseInt(je("16","Gi",!0),10)):i>=parseInt(je("1","Ti"),10)&&(r=Math.max(c,parseInt(je("8","Gi",!0),10))),{error:"",request:c,limit:r}}(e,je((r||0).toString(10),n),t);N("memorySize",a)}),[m,d,o,N,r]);Object(a.useEffect)((function(){E()}),[d,E]),Object(a.useEffect)((function(){E()}),[m,E]),Object(a.useEffect)((function(){if(b.length>0&&""===O.error){var e=function(e,t,n,a){if(e.length<1)return{error:1,defaultEC:"",erasureCodeSet:0,maxEC:"",rawCapacity:"0",storageFactors:[]};var c=t*n,i=e[0],r=2*parseInt(i.split(":")[1],10),o=e.map((function(e){var n=parseInt(e.split(":")[1],10),a=r/(r-n),i=Math.floor(c/a),o=t-Math.floor(t/a);return{erasureCode:e,storageFactor:a,maxCapacity:i.toString(10),maxFailureTolerations:o}})),s=i,l=e.find((function(e){return"EC:4"===e}));return t>=8&&a>16&&l&&(s="EC:4"),{error:0,storageFactors:o,maxEC:i,rawCapacity:c.toString(10),erasureCodeSet:r,defaultEC:s}}(j,O.persistentVolumes,O.pvSize,O.nodes);N("ecParityCalc",e),N("ecParity",e.defaultEC)}}),[b.length,O,j,N]),Object(a.useEffect)((function(){A(),_(),function(e){""===e||isNaN(parseInt(e))||ye.invoke("GET","/api/v1/cluster/max-allocatable-memory?num_nodes=".concat(e)).then((function(e){var t=e.max_memory?e.max_memory:0;N("maxAllocableMemo",t)})).catch((function(e){N("maxAllocableMemo",0),console.error(e)}))}(l)}),[l,r,o,s]);var A=function(){var e=r,t=o,n=je("12","Ti",!0),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,c=je(e.value,e.unit,!0);return parseInt(c,10)<ne?{error:"The pool size must be greater than 1Gi",nodes:0,persistentVolumes:0,disks:0,pvSize:0}:t<4?{error:"Number of nodes cannot be less than 4",nodes:0,persistentVolumes:0,disks:0,pvSize:0}:a<=0?{error:"Number of drives must be at least 1",nodes:0,persistentVolumes:0,disks:0,pvSize:0}:he(c,t,n,a)}({unit:t,value:e.toString()},parseInt(l),parseInt(n),parseInt(s));N("distribution",a)},_=function(){N("ecParity",""),""!==l.trim()&&""!==s.trim()&&ye.invoke("GET","/api/v1/get-parity/".concat(l,"/").concat(s)).then((function(e){N("ecParityChoices",function(e){return e.map((function(e){return{label:e,value:e}}))}(e)),N("cleanECChoices",e)})).catch((function(e){N("ecparityChoices",[]),c("tenantSize",!1),N("ecParity","")}))};return Object(a.useEffect)((function(){var e=je(r,o,!0),t=hl([{fieldKey:"nodes",required:!0,value:l,customValidation:parseInt(l)<4,customValidationMessage:"Number of nodes cannot be less than 4"},{fieldKey:"volume_size",required:!0,value:r,customValidation:parseInt(e)<1073741824||parseInt(e)>g[x],customValidationMessage:"Volume size must be greater than 1Gi and less than ".concat(oe(g[x],!0))},{fieldKey:"memory_per_node",required:!0,value:d,customValidation:parseInt(d)<2,customValidationMessage:"Memory size must be greater than 2Gi"},{fieldKey:"drivesps",required:!0,value:s,customValidation:parseInt(s)<1,customValidationMessage:"There must be at least one drive"}]);c("tenantSize",!("nodes"in t)&&!("volume_size"in t)&&!("memory_per_node"in t)&&!("drivesps"in t)&&""===O.error&&0===f.error&&""===p.error),k(t)}),[l,r,o,d,O,s,f,p,g,x,c]),Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsxs)("div",{className:t.headerElement,children:[Object(Se.jsx)("h3",{className:t.h3Section,children:"Tenant Size"}),Object(Se.jsx)("span",{className:t.descriptionText,children:"Please select the desired capacity"})]}),Object(Se.jsx)("span",{className:t.error,children:O.error}),Object(Se.jsx)("span",{className:t.error,children:p.error}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"nodes",name:"nodes",type:"number",onChange:function(e){N("nodes",e.target.value),T("nodes")},label:"Number of Servers",value:l,min:"4",required:!0,error:C.nodes||""})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"drivesps",name:"drivesps",type:"number",onChange:function(e){N("drivesPerServer",e.target.value),T("drivesps")},label:"Number of Drives per Server",value:s,min:"1",required:!0,error:C.drivesps||""})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsxs)("div",{className:t.multiContainer,children:[Object(Se.jsx)("div",{children:Object(Se.jsx)(Dn,{type:"number",id:"volume_size",name:"volume_size",onChange:function(e){N("volumeSize",e.target.value),T("volume_size")},label:"Total Size",value:r,required:!0,error:C.volume_size||"",min:"0"})}),Object(Se.jsx)("div",{className:t.sizeFactorContainer,children:Object(Se.jsx)(zn,{label:"Unit",id:"size_factor",name:"size_factor",value:o,onChange:function(e){N("sizeFactor",e.target.value)},options:be()})})]})}),i&&Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{type:"number",id:"memory_per_node",name:"memory_per_node",onChange:function(e){N("memoryNode",e.target.value),T("memory_per_node")},label:"Memory per Node [Gi]",value:d,required:!0,error:C.memory_per_node||"",min:"2"})}),Object(Se.jsxs)(y.a,{item:!0,xs:12,children:[Object(Se.jsx)(zn,{id:"ec_parity",name:"ec_parity",onChange:function(e){N("ecParity",e.target.value)},label:"Erasure Code Parity",value:u,options:b}),Object(Se.jsx)("span",{className:t.descriptionText,children:"Please select the desired parity. This setting will change the max usable capacity in the cluster"})]})]}),Object(Se.jsx)("h4",{children:"Resource Allocation"}),Object(Se.jsx)(za.a,{className:t.table,"aria-label":"simple table",children:Object(Se.jsxs)(Pa.a,{children:[Object(Se.jsxs)(Ra.a,{children:[Object(Se.jsx)(Ba.a,{component:"th",scope:"row",children:"Number of Servers"}),Object(Se.jsx)(Ba.a,{align:"right",children:parseInt(l)>0?l:"-"})]}),Object(Se.jsxs)(Ra.a,{children:[Object(Se.jsx)(Ba.a,{component:"th",scope:"row",children:"Drives per Server"}),Object(Se.jsx)(Ba.a,{align:"right",children:O?O.disks:"-"})]}),Object(Se.jsxs)(Ra.a,{children:[Object(Se.jsx)(Ba.a,{component:"th",scope:"row",children:"Drive Capacity"}),Object(Se.jsx)(Ba.a,{align:"right",children:O?oe(O.pvSize):"-"})]}),Object(Se.jsxs)(Ra.a,{children:[Object(Se.jsx)(Ba.a,{component:"th",scope:"row",children:"Total Number of Volumes"}),Object(Se.jsx)(Ba.a,{align:"right",children:O?O.persistentVolumes:"-"})]}),!i&&Object(Se.jsxs)(Ra.a,{children:[Object(Se.jsx)(Ba.a,{component:"th",scope:"row",children:"Memory per Node"}),Object(Se.jsxs)(Ba.a,{align:"right",children:[d," Gi"]})]})]})}),0===f.error&&w&&Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)("h4",{children:"Erasure Code Configuration"}),Object(Se.jsx)(za.a,{className:t.table,"aria-label":"simple table",children:Object(Se.jsxs)(Pa.a,{children:[Object(Se.jsxs)(Ra.a,{children:[Object(Se.jsx)(Ba.a,{component:"th",scope:"row",children:"EC Parity"}),Object(Se.jsx)(Ba.a,{align:"right",children:""!==u?u:"-"})]}),Object(Se.jsxs)(Ra.a,{children:[Object(Se.jsx)(Ba.a,{component:"th",scope:"row",children:"Raw Capacity"}),Object(Se.jsx)(Ba.a,{align:"right",children:oe(f.rawCapacity)})]}),Object(Se.jsxs)(Ra.a,{children:[Object(Se.jsx)(Ba.a,{component:"th",scope:"row",children:"Usable Capacity"}),Object(Se.jsx)(Ba.a,{align:"right",children:oe(w.maxCapacity)})]}),Object(Se.jsxs)(Ra.a,{children:[Object(Se.jsx)(Ba.a,{component:"th",scope:"row",children:"Number of server failures to tolerate"}),Object(Se.jsx)(Ba.a,{align:"right",children:O?Math.floor(w.maxFailureTolerations/O.disks):"-"})]})]})})]})]})}))),Ml=Object(o.b)((function(e){return{advancedMode:e.tenants.createTenant.advancedModeOn,enableTLS:e.tenants.createTenant.fields.security.enableTLS,tenantName:e.tenants.createTenant.fields.nameTenant.tenantName,selectedStorageClass:e.tenants.createTenant.fields.nameTenant.selectedStorageClass,customImage:e.tenants.createTenant.fields.configure.customImage,imageName:e.tenants.createTenant.fields.configure.imageName,consoleImage:e.tenants.createTenant.fields.configure.consoleImage,namespace:e.tenants.createTenant.fields.nameTenant.namespace,volumeSize:e.tenants.createTenant.fields.tenantSize.volumeSize,sizeFactor:e.tenants.createTenant.fields.tenantSize.sizeFactor}}),{}),Rl=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({buttonContainer:{textAlign:"right"}},De),Je))}))(Ml((function(e){var t=e.classes,n=e.tenantName,c=e.customImage,i=e.imageName,r=e.consoleImage,o=e.namespace,s=e.selectedStorageClass,l=e.volumeSize,d=e.sizeFactor,u=e.advancedMode,b=e.enableTLS;return Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsxs)("div",{className:t.headerElement,children:[Object(Se.jsx)("h3",{className:t.h3Section,children:"Review"}),Object(Se.jsx)("span",{className:t.descriptionText,children:"Review the details of the new tenant"})]}),Object(Se.jsx)(za.a,{size:"small",children:Object(Se.jsxs)(Pa.a,{children:[Object(Se.jsxs)(Ra.a,{children:[Object(Se.jsx)(Ba.a,{align:"right",className:t.tableTitle,children:"Tenant Name"}),Object(Se.jsx)(Ba.a,{children:n})]}),c&&Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsxs)(Ra.a,{children:[Object(Se.jsx)(Ba.a,{align:"right",className:t.tableTitle,children:"MinIO Image"}),Object(Se.jsx)(Ba.a,{children:i})]}),Object(Se.jsxs)(Ra.a,{children:[Object(Se.jsx)(Ba.a,{align:"right",className:t.tableTitle,children:"Console Image"}),Object(Se.jsx)(Ba.a,{children:r})]})]}),""!==o&&Object(Se.jsxs)(Ra.a,{children:[Object(Se.jsx)(Ba.a,{align:"right",className:t.tableTitle,children:"Namespace"}),Object(Se.jsx)(Ba.a,{children:o})]}),Object(Se.jsxs)(Ra.a,{children:[Object(Se.jsx)(Ba.a,{align:"right",className:t.tableTitle,children:"Storage Class"}),Object(Se.jsx)(Ba.a,{children:s})]}),Object(Se.jsxs)(Ra.a,{children:[Object(Se.jsx)(Ba.a,{align:"right",className:t.tableTitle,children:"Total Size"}),Object(Se.jsxs)(Ba.a,{children:[l," ",d]})]}),u&&Object(Se.jsx)(a.Fragment,{children:Object(Se.jsxs)(Ra.a,{children:[Object(Se.jsx)(Ba.a,{align:"right",className:t.tableTitle,children:"Enable TLS"}),Object(Se.jsx)(Ba.a,{children:b?"Enabled":"Disabled"})]})})]})})]})}))),Bl=function(){return Object(Se.jsx)(pt.a,{viewBox:"0 0 11.656 3.101",children:Object(Se.jsx)("path",{fill:"#081c42",d:"M-13157.172,1879.551h-11.656v-3.1h11.656v3.1Z",transform:"translate(13168.828 -1876.449)"})})},Pl=Object(o.b)((function(e){return{podAffinity:e.tenants.createTenant.fields.affinity.podAffinity,nodeSelectorLabels:e.tenants.createTenant.fields.affinity.nodeSelectorLabels,withPodAntiAffinity:e.tenants.createTenant.fields.affinity.withPodAntiAffinity}}),{setModalErrorSnackMessage:Q,updateAddField:dl,isPageValid:ul}),zl=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({buttonContainer:{textAlign:"right"},overlayAction:{lineHeight:"50px",float:"left","& svg":{maxWidth:15,maxHeight:15}}},De),Je))}))(Pl((function(e){var t=e.classes,n=e.podAffinity,i=e.nodeSelectorLabels,r=e.withPodAntiAffinity,o=e.setModalErrorSnackMessage,s=e.updateAddField,l=e.isPageValid,d=Object(a.useState)({}),u=Object(h.a)(d,2),b=u[0],j=u[1],m=Object(a.useState)(!0),p=Object(h.a)(m,2),O=p[0],f=p[1],g=Object(a.useState)({}),x=Object(h.a)(g,2),v=x[0],S=x[1],C=Object(a.useState)([{key:"",value:""}]),k=Object(h.a)(C,2),w=k[0],N=k[1],T=Object(a.useState)([]),E=Object(h.a)(T,2),A=E[0],_=E[1],I=Object(a.useCallback)((function(e,t){s("affinity",e,t)}),[s]);return Object(a.useEffect)((function(){O&&ye.invoke("GET","/api/v1/nodes/labels").then((function(e){f(!1),S(e);var t=[];for(var n in e)t.push({label:n,value:n});_(t),N([{key:t[0].value,value:t[0].value}])})).catch((function(e){f(!1),o(e),S({})}))}),[o,O]),Object(a.useEffect)((function(){if(w){var e=w.filter((function(e){return""!==e.key})).map((function(e){return"".concat(e.key,"=").concat(e.value)})).filter((function(e,t,n){return n.indexOf(e)===t})).join("&");console.log(e),I("nodeSelectorLabels",e)}}),[w,I]),Object(a.useEffect)((function(){var e=[];if("nodeSelector"===n){var t=!0,a=i.split("&");1===a.length&&""===a[0]&&(t=!1),a.forEach((function(e,n){var c=e.split("=");2!==c.length&&(t=!1),n+1!==a.length&&(""!==c[0]&&""!==c[1]||(t=!1))})),e=[].concat(Object(st.a)(e),[{fieldKey:"labels",required:!0,value:i,customValidation:!t,customValidationMessage:"You need to add at least one label key-pair"}])}var c=hl(e);l("affinity",0===Object.keys(c).length),j(c)}),[l,n,i]),Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsxs)("div",{className:t.headerElement,children:[Object(Se.jsx)("h3",{className:t.h3Section,children:"Pod Affinity"}),Object(Se.jsx)("span",{className:t.descriptionText,children:"Configure how pods will be assigned to nodes"})]}),Object(Se.jsxs)(y.a,{item:!0,xs:12,children:[Object(Se.jsx)(Vn,{currentSelection:n,id:"affinity-options",name:"affinity-options",label:"Type",onChange:function(e){I("podAffinity",e.target.value)},selectorOptions:[{label:"None",value:"none"},{label:"Default (Pod Anti-afinnity)",value:"default"},{label:"Node Selector",value:"nodeSelector"}]}),"MinIO supports multiple configurations for Pod Afinnity"]}),"nodeSelector"===n&&Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)("br",{}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Zn,{value:"with_pod_anti_affinity",id:"with_pod_anti_affinity",name:"with_pod_anti_affinity",checked:r,onChange:function(e){var t=e.target.checked;I("withPodAntiAffinity",t)},label:"With Pod Anti-Affinity"})}),Object(Se.jsxs)(y.a,{item:!0,xs:12,children:[Object(Se.jsx)("h3",{children:"Labels"}),Object(Se.jsx)("span",{className:t.error,children:b.labels}),Object(Se.jsx)(y.a,{container:!0,children:w&&w.map((function(e,n){return Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsxs)(y.a,{item:!0,xs:5,children:[A.length>0&&Object(Se.jsx)(zn,{onChange:function(e){var t=e.target.value,a=Object.assign([],w);a[n].key=e.target.value,a[n].value=v[t][0],N(a)},id:"select-access-policy",name:"select-access-policy",label:"",value:e.key,options:A}),0===A.length&&Object(Se.jsx)(Dn,{id:"nodeselector-key-".concat(n.toString()),label:"",name:"nodeselector-".concat(n.toString()),value:e.key,onChange:function(e){var t=Object.assign([],w);t[n].key=e.target.value,N(t)},index:n,placeholder:"Key"})]}),Object(Se.jsxs)(y.a,{item:!0,xs:5,children:[A.length>0&&Object(Se.jsx)(zn,{onChange:function(e){var t=Object.assign([],w);t[n].value=e.target.value,N(t)},id:"select-access-policy",name:"select-access-policy",label:"",value:e.value,options:v[e.key]?v[e.key].map((function(e){return{label:e,value:e}})):[]}),0===A.length&&Object(Se.jsx)(Dn,{id:"nodeselector-value-".concat(n.toString()),label:"",name:"nodeselector-".concat(n.toString()),value:e.value,onChange:function(e){var t=Object.assign([],w);t[n].value=e.target.value,N(t)},index:n,placeholder:"value"})]}),Object(Se.jsxs)(y.a,{item:!0,xs:2,children:[Object(Se.jsx)("div",{className:t.overlayAction,children:Object(Se.jsx)(Vt.a,{size:"small",onClick:function(){var e=Object.assign([],w);A.length>0?e.push({key:A[0].value,value:v[A[0].value][0]}):e.push({key:"",value:""}),N(e)},children:Object(Se.jsx)(Xa,{})})}),w.length>1&&Object(Se.jsx)("div",{className:t.overlayAction,children:Object(Se.jsx)(Vt.a,{size:"small",onClick:function(){var e=w.filter((function(e,t){return t!==n}));N(e)},children:Object(Se.jsx)(Bl,{})})})]})]})}))})]})]})]})}))),Kl=Object(o.b)((function(e){return{advancedMode:e.tenants.createTenant.advancedModeOn,namespace:e.tenants.createTenant.fields.nameTenant.namespace,validPages:e.tenants.createTenant.validPages,fields:e.tenants.createTenant.fields,certificates:e.tenants.createTenant.certificates}}),{setModalErrorSnackMessage:Q,updateAddField:dl}),Ul=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)({buttonContainer:{textAlign:"right"}},De),Je),qe))}))(Kl((function(e){var t=e.classes,n=e.advancedMode,c=e.fields,i=e.certificates,r=e.namespace,o=e.validPages,s=e.setModalErrorSnackMessage,l=e.closeAndRefresh,d=Object(a.useState)(!1),u=Object(h.a)(d,2),b=u[0],j=u[1],p=Object(a.useState)(null),O=Object(h.a)(p,2),f=O[0],g=O[1],x=Object(a.useState)(!1),v=Object(h.a)(x,2),S=v[0],k=v[1];Object(a.useEffect)((function(){var e=c.nameTenant.tenantName,t=c.nameTenant.selectedStorageClass,n=c.configure.imageName,a=c.configure.consoleImage,o=c.configure.customDockerhub,l=c.configure.imageRegistry,d=c.configure.imageRegistryUsername,u=c.configure.imageRegistryPassword,b=c.configure.exposeMinIO,h=c.configure.exposeConsole,p=c.identityProvider.idpSelection,O=c.identityProvider.openIDURL,f=c.identityProvider.openIDClientID,x=c.identityProvider.openIDSecretID,v=c.identityProvider.ADURL,y=c.identityProvider.ADSkipTLS,C=c.identityProvider.ADServerInsecure,w=c.identityProvider.ADUserNameFilter,N=c.identityProvider.ADGroupBaseDN,T=c.identityProvider.ADGroupSearchFilter,E=c.identityProvider.ADNameAttribute,A=c.identityProvider.accessKeys,_=c.identityProvider.secretKeys,I=i.minioCertificates,L=i.caCertificates,D=i.consoleCaCertificates,F=i.consoleCertificate,M=i.serverCertificate,R=i.clientCertificate,B=i.vaultCertificate,P=i.vaultCA,z=i.gemaltoCA,K=c.encryption.enableEncryption,U=c.encryption.encryptionType,W=c.encryption.gemaltoEndpoint,G=c.encryption.gemaltoToken,q=c.encryption.gemaltoDomain,V=c.encryption.gemaltoRetry,H=c.encryption.awsEndpoint,Y=c.encryption.awsRegion,Q=c.encryption.awsKMSKey,Z=c.encryption.awsAccessKey,J=c.encryption.awsSecretKey,$=c.encryption.awsToken,ee=c.encryption.vaultEndpoint,te=c.encryption.vaultEngine,ne=c.encryption.vaultNamespace,ae=c.encryption.vaultPrefix,ce=c.encryption.vaultAppRoleEngine,ie=c.encryption.vaultId,re=c.encryption.vaultSecret,oe=c.encryption.vaultRetry,se=c.encryption.vaultPing,le=c.encryption.gcpProjectID,de=c.encryption.gcpEndpoint,ue=c.encryption.gcpClientEmail,be=c.encryption.gcpClientID,je=c.encryption.gcpPrivateKeyID,he=c.encryption.gcpPrivateKey,me=c.security.enableAutoCert,Oe=c.security.enableTLS,fe=c.tenantSize.ecParity,ge=c.tenantSize.distribution,xe=c.tenantSize.memorySize,ve=c.configure.logSearchCustom,Se=c.configure.prometheusCustom,Ce=c.configure.logSearchVolumeSize,ke=c.configure.logSearchSelectedStorageClass,we=c.configure.logSearchImage,Ne=c.configure.kesImage,Te=c.configure.logSearchPostgresImage,Ee=c.configure.prometheusImage,Ae=c.configure.prometheusSelectedStorageClass,_e=c.configure.prometheusVolumeSize,Ie=c.affinity.podAffinity,Le=c.affinity.nodeSelectorLabels,De=c.affinity.withPodAntiAffinity;if(S){var Fe=pe([]),Me={};switch(Ie){case"default":Me={affinity:Rs(e,Fe)};break;case"nodeSelector":Me={affinity:Bs(Le,De,e,Fe)}}var Re=fe.split(":")[1],Be={name:e,namespace:r,access_key:"",secret_key:"",access_keys:[],secret_keys:[],enable_tls:Oe&&me,enable_console:!0,enable_prometheus:!0,service_name:"",image:n,console_image:a,expose_minio:b,expose_console:h,pools:[Object(m.a)({name:Fe,servers:ge.nodes,volumes_per_server:ge.disks,volume_configuration:{size:ge.pvSize,storage_class_name:t},resources:{requests:{memory:xe.request},limits:{memory:xe.limit}}},Me)],erasureCodingParity:parseInt(Re,10)};o&&(Be=Object(m.a)(Object(m.a)({},Be),{},{image_registry:{registry:l,username:d,password:u}})),Be=ve?Object(m.a)(Object(m.a)({},Be),{},{logSearchConfiguration:{storageClass:ke,storageSize:parseInt(Ce),image:we,postgres_image:Te}}):Object(m.a)(Object(m.a)({},Be),{},{logSearchConfiguration:{image:we,postgres_image:Te}}),Be=Se?Object(m.a)(Object(m.a)({},Be),{},{prometheusConfiguration:{storageClass:Ae,storageSize:parseInt(_e),image:Ee}}):Object(m.a)(Object(m.a)({},Be),{},{prometheusConfiguration:{image:Ee}});var Pe=null,ze=null,Ke=null,Ue=null;if(L.length>0&&(Ke={ca_certificates:L.map((function(e){return e.encoded_cert})).filter((function(e){return e}))}),D.length>0&&(Ue={console_ca_certificates:D.map((function(e){return e.encoded_cert})).filter((function(e){return e}))}),Oe&&I.length>0&&(Pe={minio:I.map((function(e){return{crt:e.encoded_cert,key:e.encoded_key}})).filter((function(e){return e.crt&&e.key}))}),Oe&&""!==F.encoded_cert&&""!==F.encoded_key&&(ze={console:{crt:F.encoded_cert,key:F.encoded_key}}),(Pe||ze||Ke||Ue)&&(Be=Object(m.a)(Object(m.a)({},Be),{},{tls:Object(m.a)(Object(m.a)(Object(m.a)(Object(m.a)({},Pe),ze),Ke),Ue)})),K){var We={};switch(U){case"gemalto":var Ge={};""!==z.encoded_cert&&(Ge={ca:z.encoded_cert}),We={gemalto:{keysecure:{endpoint:W,credentials:{token:G,domain:q,retry:parseInt(V)},tls:Object(m.a)({},Ge)}}};break;case"aws":We={aws:{secretsmanager:{endpoint:H,region:Y,kmskey:Q,credentials:{accesskey:Z,secretkey:J,token:$}}}};break;case"gcp":We={gcp:{secretmanager:{project_id:le,endpoint:de,credentials:{client_email:ue,client_id:be,private_key_id:je,private_key:he}}}};break;case"vault":var qe=null,Ve=null;""!==B.encoded_key&&""!==B.encoded_cert&&(qe={key:B.encoded_key,crt:B.encoded_cert}),""!==P.encoded_cert&&(Ve={ca:P.encoded_cert});var He=null;(qe||P)&&(He={tls:Object(m.a)(Object(m.a)({},qe),Ve)}),We={vault:Object(m.a)(Object(m.a)({endpoint:ee,engine:te,namespace:ne,prefix:ae,approle:{engine:ce,id:ie,secret:re,retry:parseInt(oe)}},He),{},{status:{ping:parseInt(se)}})}}var Ye={},Qe={};""!==R.encoded_key&&""!==R.encoded_cert&&(Qe={client:{key:R.encoded_key,crt:R.encoded_cert}}),""!==M.encoded_key&&""!==M.encoded_cert&&(Ye={server:{key:M.encoded_key,crt:M.encoded_cert}}),Be=Object(m.a)(Object(m.a)({},Be),{},{encryption:Object(m.a)(Object(m.a)(Object(m.a)({image:Ne},Qe),Ye),We)})}var Ze={};switch(p){case"Built-in":for(var Je=[],$e=0;$e<A.length;$e++)Je.push({access_key:A[$e],secret_key:_[$e]});Ze={keys:Je};break;case"OpenID":Ze={oidc:{url:O,client_id:f,secret_id:x}};break;case"AD":Ze={active_directory:{url:v,skip_tls_verification:y,server_insecure:C,username_format:"",user_search_filter:w,group_search_base_dn:N,group_search_filter:T,group_name_attribute:E}}}Be=Object(m.a)(Object(m.a)({},Be),{},{idp:Object(m.a)({},Ze)}),ye.invoke("POST","/api/v1/tenants",Be).then((function(e){var t=X()(e,"console",[]),n={console:[]};if(t&&Array.isArray(t)){var a=t.map((function(e){return{accessKey:e.access_key,secretKey:e.secret_key}}));n.console=a}else n={console:{accessKey:e.console.access_key,secretKey:e.console.secret_key}};k(!1),j(!0),g(n)})).catch((function(e){k(!1),s(e)}))}}),[S]);var w={label:"Cancel",type:"other",enabled:!0,action:function(){l(!1)}},N=[{label:"Name Tenant",componentRender:Object(Se.jsx)(vl,{}),buttons:[w,{label:"Next",type:"next",enabled:o.includes("nameTenant")}]},{label:"Configure",advancedOnly:!0,componentRender:Object(Se.jsx)(Sl,{}),buttons:[w,{label:"Back",type:"back",enabled:!0},{label:"Next",type:"next",enabled:o.includes("configure")}]},{label:"Pod Affinity",advancedOnly:!0,componentRender:Object(Se.jsx)(zl,{}),buttons:[w,{label:"Back",type:"back",enabled:!0},{label:"Next",type:"next",enabled:o.includes("affinity")}]},{label:"Identity Provider",advancedOnly:!0,componentRender:Object(Se.jsx)(El,{}),buttons:[w,{label:"Back",type:"back",enabled:!0},{label:"Next",type:"next",enabled:o.includes("identityProvider")}]},{label:"Security",advancedOnly:!0,componentRender:Object(Se.jsx)(_l,{}),buttons:[w,{label:"Back",type:"back",enabled:!0},{label:"Next",type:"next",enabled:o.includes("security")}]},{label:"Encryption",advancedOnly:!0,componentRender:Object(Se.jsx)(Ll,{}),buttons:[w,{label:"Back",type:"back",enabled:!0},{label:"Next",type:"next",enabled:o.includes("encryption")}]},{label:"Tenant Size",componentRender:Object(Se.jsx)(Fl,{}),buttons:[w,{label:"Back",type:"back",enabled:!0},{label:"Next",type:"next",enabled:o.includes("tenantSize")}]},{label:"Preview Configuration",componentRender:Object(Se.jsx)(Rl,{}),buttons:[w,{label:"Back",type:"back",enabled:!0},{label:"Create",type:"submit",enabled:!S,action:function(){k(!0)}}]}],T=N;n||(T=N.filter((function(e){return!e.advancedOnly})));return Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.customTitle,children:"Create New Tenant"}),S&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(C.a,{})}),b&&Object(Se.jsx)(mr,{newServiceAccount:f,open:b,closeModal:function(){l(!0)},entity:"Tenant"}),Object(Se.jsx)(y.a,{container:!0,children:Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(la,{wizardSteps:T})})})]})}))),Wl=Object(o.b)(null,{setErrorSnackMessage:H,resetAddTenantForm:function(){return{type:Ws}}}),Gl=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)(Object(m.a)({},ze),Ke),qe),{},{seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},actionsTray:Object(m.a)(Object(m.a)({},ze.actionsTray),{},{padding:"0 38px"}),tenantsContainer:{padding:"15px 0"},customConfigurationPage:{height:"calc(100vh - 440px)",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},redState:{color:e.palette.error.main},yellowState:{color:e.palette.warning.main},greenState:{color:e.palette.success.main},greyState:{color:"grey"}}))}))(Wl((function(e){var t=e.classes,n=e.setErrorSnackMessage,i=e.resetAddTenantForm,r=Object(a.useState)(0),o=Object(h.a)(r,2),s=o[0],l=o[1],d=Object(a.useState)(!1),u=Object(h.a)(d,2),b=u[0],m=u[1],p=Object(a.useState)(null),O=Object(h.a)(p,2),f=O[0],g=O[1],S=Object(a.useState)(!1),C=Object(h.a)(S,2),k=C[0],w=C[1],N=Object(a.useState)(""),T=Object(h.a)(N,2),E=T[0],A=T[1],_=Object(a.useState)([]),I=Object(h.a)(_,2),L=I[0],D=I[1],F=Object(a.useState)(!1),M=Object(h.a)(F,2),R=M[0],B=M[1],P=Object(a.useState)(null),z=Object(h.a)(P,2),K=z[0],U=z[1],W=[{type:"view",onClick:function(e){j.push("/namespaces/".concat(e.namespace,"/tenants/").concat(e.name))}},{type:"delete",onClick:function(e){g(e),m(!0)}}],G=L.filter((function(e){return""===E||e.name.indexOf(E)>=0}));Object(a.useEffect)((function(){if(k){ye.invoke("GET","/api/v1/tenants").then((function(e){if(null!==e){var t=[];null!==e.tenants&&(t=e.tenants);for(var n=0;n<t.length;n++)t[n].capacity=oe(t[n].total_size+"");D(t),w(!1)}else w(!1)})).catch((function(e){n(e),w(!1)}))}}),[k,n]),Object(a.useEffect)((function(){w(!0)}),[]);var q=function(e){switch(e){case"red":return t.redState;case"yellow":return t.yellowState;case"green":return t.greenState;default:return t.greyState}};return Object(Se.jsxs)(a.Fragment,{children:[b&&Object(Se.jsx)(Ms,{deleteOpen:b,selectedTenant:f,closeDeleteModalAndRefresh:function(e){m(!1),e&&w(!0)}}),R&&Object(Se.jsx)(mr,{newServiceAccount:K,open:R,closeModal:function(){B(!1),U(null)},entity:"Tenant"}),Object(Se.jsx)(y.a,{container:!0,children:Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("div",{className:t.settingsOptionsContainer,children:Object(Se.jsx)(Zo,{slideOptions:[Object(Se.jsx)(a.Fragment,{children:Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.tenantsContainer,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(Se.jsx)(v.a,{placeholder:"Search Tenants",className:t.searchField,id:"search-resource",label:"",onChange:function(e){A(e.target.value)},InputProps:{disableUnderline:!0,startAdornment:Object(Se.jsx)(lt.a,{position:"start",children:Object(Se.jsx)(ut.a,{})})}}),Object(Se.jsx)(Vt.a,{color:"primary","aria-label":"Refresh Tenant List",component:"span",onClick:function(){w(!0)},children:Object(Se.jsx)(rc.a,{})}),Object(Se.jsx)(x.a,{variant:"contained",color:"primary",startIcon:Object(Se.jsx)(ft,{}),onClick:function(){l(1)},children:"Create Tenant"})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.tenantsContainer,children:Object(Se.jsx)(kn,{itemActions:W,columns:[{label:"Name",elementKey:"name",renderFullObject:!0,renderFunction:function(e){return Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsx)("span",{className:q(e.health_status),children:"\u2b24"})," ",e.name]})}},{label:"Namespace",elementKey:"namespace"},{label:"Capacity",elementKey:"capacity"},{label:"# of Pools",elementKey:"pool_count"},{label:"State",elementKey:"currentState"}],isLoading:k,records:G,entityName:"Tenants",idField:"name",customPaperHeight:t.customConfigurationPage,noBackground:!0})})]})}),Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.backContainer,children:Object(Se.jsxs)("button",{onClick:function(){l(s-1),i()},className:t.backButton,children:[Object(Se.jsx)(Jo,{}),"Back To Tenants List"]})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:1===s&&Object(Se.jsx)(Ul,{closeAndRefresh:function(e){l(0),i(),e&&w(!0)}})})]})],currentSlide:s})})})})})]})}))),ql=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({headerLabel:{fontSize:22,fontWeight:600,color:"#000",marginTop:4}},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes;return Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(na,{label:"Tenants"}),Object(Se.jsx)(y.a,{container:!0,children:Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.container,children:Object(Se.jsx)(Gl,{})})})]})})),Vl={setModalErrorSnackMessage:Q},Hl=Object(o.b)(null,Vl),Yl=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({jsonPolicyEditor:{minHeight:400,width:"100%"},buttonContainer:{textAlign:"right"},errorState:{color:"#b53b4b",fontSize:14,fontWeight:"bold"}},De),Le))}))(Hl((function(e){var t=e.classes,n=e.open,c=e.closeModalAndRefresh,i=e.tenant,r=e.namespace,o=e.setModalErrorSnackMessage,s=Object(a.useState)(!1),l=Object(h.a)(s,2),d=l[0],u=l[1],b=Object(a.useState)(!1),j=Object(h.a)(b,2),m=j[0],p=j[1],O=Object(a.useState)(""),f=Object(h.a)(O,2),g=f[0],v=f[1],S=Object(a.useState)(""),k=Object(h.a)(S,2),w=k[0],N=k[1];Object(a.useEffect)((function(){ye.invoke("GET","/api/v1/namespaces/".concat(r,"/tenants/").concat(i,"/yaml")).then((function(e){p(!1),v(e.yaml)})).catch((function(e){p(!1),o(e)}))}),[i,r,o]),Object(a.useEffect)((function(){}),[]);var T=""!==g.trim();return Object(Se.jsxs)(_n,{modalOpen:n,onClose:function(){c(!1)},title:"YAML",children:[m&&Object(Se.jsx)(C.a,{}),""!==w&&Object(Se.jsx)("div",{className:t.errorState,children:w}),!m&&Object(Se.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),d||(u(!0),N(""),ye.invoke("PUT","/api/v1/namespaces/".concat(r,"/tenants/").concat(i,"/yaml"),{yaml:g}).then((function(e){u(!1),c(!0),N("")})).catch((function(e){u(!1),console.log(e),N(e)})))},children:Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.formScrollable,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsx)(Ac,{label:"Tenant Specification",value:g,mode:"yaml",onBeforeChange:function(e,t,n){v(n)}})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.buttonContainer,children:Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:d||!T,children:"Save"})}),d&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(C.a,{})})]})})]})}))),Ql=Object(E.a)((function(e){return{root:{height:10,borderRadius:5},colorPrimary:{backgroundColor:"#F4F4F4"},bar:{borderRadius:5,backgroundColor:"#081C42"},padChart:{padding:"5px"}}}))(C.a),Zl=Object(E.a)((function(e){return Object(N.a)({paperContainer:{padding:15},allValue:{fontSize:16,fontWeight:700,marginBottom:8},currentUsage:{fontSize:12,marginTop:8},centerItem:{textAlign:"center"}})}))((function(e){var t=e.classes,n=e.maxValue,a=e.currValue,i=e.label,r=e.renderFunction,o=e.loading,s=e.error,l=100*a/n;return Object(Se.jsxs)(c.a.Fragment,{children:[o&&Object(Se.jsx)("div",{className:t.padChart,children:Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.centerItem,children:Object(Se.jsx)(k.a,{color:"primary",size:40,variant:"indeterminate"})})}),o?null:""!==s?Object(Se.jsx)(gs,{errorMessage:s,withBreak:!1}):Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.allValue,children:[i," ",r?r(n.toString()):n]}),Object(Se.jsx)(Ql,{variant:"determinate",value:l}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.currentUsage,children:["Used:"," ",r?r(a.toString()):a]})]})]})})),Jl=Object(o.b)(null,{setModalErrorSnackMessage:Q}),$l=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({buttonContainer:{textAlign:"right"}},De))}))(Jl((function(e){var t=e.open,n=e.closeModalAndRefresh,c=e.namespace,i=e.idTenant,r=e.setModalErrorSnackMessage,o=e.classes,s=Object(a.useState)(!1),l=Object(h.a)(s,2),d=l[0],u=l[1],b=Object(a.useState)(""),j=Object(h.a)(b,2),p=j[0],O=j[1],f=Object(a.useState)(""),g=Object(h.a)(f,2),v=g[0],S=g[1],C=Object(a.useState)(!1),k=Object(h.a)(C,2),w=k[0],N=k[1],T=Object(a.useState)(""),E=Object(h.a)(T,2),A=E[0],_=E[1],I=Object(a.useState)(""),L=Object(h.a)(I,2),D=L[0],F=L[1],M=Object(a.useState)(""),R=Object(h.a)(M,2),B=R[0],P=R[1],z=Object(a.useState)(!0),K=Object(h.a)(z,2),U=K[0],W=K[1],G=Object(a.useState)(!0),q=Object(h.a)(G,2),V=q[0],H=q[1],Y=Object(a.useCallback)((function(e){var t=new RegExp("^$|^((.*?)/(.*?):(.+))$");switch(e){case"consoleImage":H(t.test(v));break;case"minioImage":W(t.test(p))}}),[v,p]);Object(a.useEffect)((function(){Y("minioImage")}),[p,Y]),Object(a.useEffect)((function(){Y("consoleImage")}),[v,Y]);return Object(Se.jsx)(_n,{title:"Update MinIO Version",modalOpen:t,onClose:function(){n(!1)},children:Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:o.formScrollable,children:[Object(Se.jsx)("span",{children:"Please enter the MinIO image from dockerhub to use. If blank, then latest build will be used."}),Object(Se.jsx)("br",{}),Object(Se.jsx)("br",{}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{value:p,label:"MinIO's Image",id:"minioImage",name:"minioImage",placeholder:"E.g. minio/minio:RELEASE.2020-05-08T02-40-49Z",onChange:function(e){O(e.target.value)}})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{value:v,label:"Console's Image",id:"consoleImage",name:"consoleImage",placeholder:"E.g. minio/console:v0.3.13",onChange:function(e){S(e.target.value)}})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Zn,{value:"imageRegistry",id:"setImageRegistry",name:"setImageRegistry",checked:w,onChange:function(e){N(!w)},label:"Set Custom Image Registry",indicatorLabels:["Yes","No"]})}),w&&Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{value:A,label:"Endpoint",id:"imageRegistry",name:"imageRegistry",placeholder:"E.g. https://index.docker.io/v1/",onChange:function(e){_(e.target.value)}})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{value:D,label:"Username",id:"imageRegistryUsername",name:"imageRegistryUsername",placeholder:"Enter image registry username",onChange:function(e){F(e.target.value)}})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{value:B,label:"Password",id:"imageRegistryPassword",name:"imageRegistryPassword",placeholder:"Enter image registry password",onChange:function(e){P(e.target.value)}})})]})]}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:o.buttonContainer,children:[Object(Se.jsx)("button",{type:"button",color:"primary",className:o.clearButton,onClick:function(){O(""),S(""),N(!1),_(""),F(""),P("")},children:"Clear"}),Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:!U||!V||w&&(""===A.trim()||""===D.trim()||""===B.trim())||d,onClick:function(){u(!0);var e={image:p,console_image:v,enable_prometheus:!0};if(w){var t={image_registry:{registry:A,username:D,password:B}};e=Object(m.a)(Object(m.a)({},e),t)}ye.invoke("PUT","/api/v1/namespaces/".concat(c,"/tenants/").concat(i),e).then((function(){u(!1),n(!0)})).catch((function(e){r(e),u(!1)}))},children:"Save"})]})]})})}))),Xl=Object(o.b)((function(e){return{loadingTenant:e.tenants.tenantDetails.loadingTenant,selectedTenant:e.tenants.tenantDetails.currentTenant,tenant:e.tenants.tenantDetails.tenantInfo,logEnabled:X()(e.tenants.tenantDetails.tenantInfo,"logEnabled",!1),monitoringEnabled:X()(e.tenants.tenantDetails.tenantInfo,"monitoringEnabled",!1),encryptionEnabled:X()(e.tenants.tenantDetails.tenantInfo,"encryptionEnabled",!1),minioTLS:X()(e.tenants.tenantDetails.tenantInfo,"minioTLS",!1),consoleTLS:X()(e.tenants.tenantDetails.tenantInfo,"consoleTLS",!1),consoleEnabled:X()(e.tenants.tenantDetails.tenantInfo,"consoleEnabled",!1),adEnabled:X()(e.tenants.tenantDetails.tenantInfo,"idpAdEnabled",!1),oicEnabled:X()(e.tenants.tenantDetails.tenantInfo,"idpOicEnabled",!1)}}),null),ed=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({},et),{},{redState:{color:e.palette.error.main},yellowState:{color:e.palette.warning.main},greenState:{color:e.palette.success.main},greyState:{color:"grey"},centerAlign:{textAlign:"center"}},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(Xl((function(e){var t,n,i,r,o,s,l,d=e.classes,u=e.match,b=e.tenant,j=e.logEnabled,m=e.monitoringEnabled,p=e.encryptionEnabled,O=e.minioTLS,f=e.consoleTLS,g=e.consoleEnabled,v=e.adEnabled,S=e.oicEnabled,C=e.loadingTenant,N=Object(a.useState)(0),T=Object(h.a)(N,2),E=T[0],A=T[1],_=Object(a.useState)(0),I=Object(h.a)(_,2),L=I[0],D=I[1],F=Object(a.useState)(0),M=Object(h.a)(F,2),R=M[0],B=M[1],P=Object(a.useState)(0),z=Object(h.a)(P,2),K=z[0],U=z[1],W=Object(a.useState)(!0),G=Object(h.a)(W,2),q=G[0],V=G[1],H=Object(a.useState)(""),Y=Object(h.a)(H,2),Q=Y[0],Z=Y[1],J=Object(a.useState)(0),$=Object(h.a)(J,2),ee=$[0],te=$[1],ne=Object(a.useState)(!1),ae=Object(h.a)(ne,2),ce=ae[0],ie=ae[1],re=u.params.tenantName,se=u.params.tenantNamespace;return Object(a.useEffect)((function(){q&&ye.invoke("GET","/api/v1/namespaces/".concat(se,"/tenants/").concat(re,"/usage")).then((function(e){var t=X()(e,"disk_used","0");te(parseInt(t)),Z(""),V(!1)})).catch((function(e){Z(e),te(0),V(!1)}))}),[re,se,q]),Object(a.useEffect)((function(){if(b){var e,t=b,n=t.pools?t.pools:[],a=0,c=0,i=0,r=Object(ni.a)(n);try{for(r.s();!(e=r.n()).done;){var o=e.value,s=o.volumes_per_server*o.servers*o.volume_configuration.size;o.label="pool-".concat(i),void 0!==o.name&&""!==o.name||(o.name=o.label),o.capacity=oe(s+""),o.volumes=o.servers*o.volumes_per_server,a+=o.servers,c+=o.volumes,i+=1}}catch(l){r.e(l)}finally{r.f()}A(t.total_size||0),D(n.length),U(c),B(a)}}),[b]),Object(Se.jsxs)(a.Fragment,{children:[ce&&Object(Se.jsx)($l,{open:ce,closeModalAndRefresh:function(){ie(!1)},idTenant:re,namespace:se}),Object(Se.jsx)("br",{}),Object(Se.jsx)(w.a,{className:d.paperContainer,children:Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsx)(y.a,{item:!0,xs:8,children:Object(Se.jsx)("table",{width:"100%",children:Object(Se.jsxs)("tbody",{children:[Object(Se.jsx)("tr",{children:Object(Se.jsxs)("td",{colSpan:4,children:[Object(Se.jsx)("h2",{children:"Details"}),Object(Se.jsx)("hr",{className:d.hrClass})]})}),C?Object(Se.jsx)("tr",{children:Object(Se.jsx)("td",{colSpan:4,className:d.centerAlign,children:Object(Se.jsx)(k.a,{})})}):Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsxs)("tr",{children:[Object(Se.jsx)("td",{className:d.titleCol,children:"Capacity:"}),Object(Se.jsx)("td",{children:oe(E.toString(10))}),Object(Se.jsx)("td",{className:d.titleCol,children:"MinIO:"}),Object(Se.jsx)("td",{children:Object(Se.jsx)(x.a,{color:"primary",className:d.anchorButton,onClick:function(){ie(!0)},children:b?b.image:""})})]}),Object(Se.jsxs)("tr",{children:[Object(Se.jsx)("td",{className:d.titleCol,children:"Clusters:"}),Object(Se.jsx)("td",{children:L}),Object(Se.jsx)("td",{className:d.titleCol,children:"Console:"}),Object(Se.jsx)("td",{children:Object(Se.jsx)(x.a,{color:"primary",className:d.anchorButton,onClick:function(){ie(!0)},children:b?b.console_image:""})})]}),Object(Se.jsxs)("tr",{children:[Object(Se.jsx)("td",{className:d.titleCol,children:"Instances:"}),Object(Se.jsx)("td",{children:R}),Object(Se.jsx)("td",{className:d.titleCol,children:"Volumes:"}),Object(Se.jsx)("td",{children:K})]}),(null===b||void 0===b?void 0:b.endpoints)&&Object(Se.jsxs)("tr",{children:[Object(Se.jsx)("td",{className:d.titleCol,children:"Endpoint:"}),Object(Se.jsx)("td",{children:Object(Se.jsx)("a",{href:null===b||void 0===b?void 0:b.endpoints.minio,target:"_blank",rel:"noopener noreferrer",children:null===b||void 0===b?void 0:b.endpoints.minio})}),Object(Se.jsx)("td",{className:d.titleCol,children:"Console:"}),Object(Se.jsx)("td",{children:Object(Se.jsx)("a",{href:null===b||void 0===b?void 0:b.endpoints.console,target:"_blank",rel:"noopener noreferrer",children:null===b||void 0===b?void 0:b.endpoints.console})})]}),Object(Se.jsxs)("tr",{children:[Object(Se.jsx)("td",{className:d.titleCol,children:"State:"}),Object(Se.jsx)("td",{colSpan:3,children:null===b||void 0===b?void 0:b.currentState})]})]})]})})}),Object(Se.jsx)(y.a,{item:!0,xs:4,children:C?Object(Se.jsx)("div",{className:d.centerAlign,children:Object(Se.jsx)(k.a,{})}):Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(Zl,{currValue:ee,maxValue:b?b.total_size:0,label:"Storage",renderFunction:oe,error:Q,loading:q}),Object(Se.jsxs)("h4",{children:[b&&b.status&&Object(Se.jsx)("span",{className:(l=b.status.health_status,"red"===l?d.redState:"yellow"===l?d.yellowState:"green"===l?d.greenState:d.greyState),children:"\u2b24\xa0"}),"Health"]}),Object(Se.jsx)("table",{children:Object(Se.jsxs)("tbody",{children:[Object(Se.jsxs)("tr",{children:[Object(Se.jsx)("td",{className:d.healthCol,children:"Drives Online"}),Object(Se.jsx)("td",{children:(null===b||void 0===b||null===(t=b.status)||void 0===t?void 0:t.drives_online)?null===b||void 0===b||null===(n=b.status)||void 0===n?void 0:n.drives_online:0})]}),Object(Se.jsxs)("tr",{children:[Object(Se.jsx)("td",{className:d.healthCol,children:"Drives Offline"}),Object(Se.jsx)("td",{children:(null===b||void 0===b||null===(i=b.status)||void 0===i?void 0:i.drives_offline)?null===b||void 0===b||null===(r=b.status)||void 0===r?void 0:r.drives_offline:0})]}),Object(Se.jsxs)("tr",{children:[Object(Se.jsx)("td",{className:d.healthCol,children:"Write Quorum"}),Object(Se.jsx)("td",{children:(null===b||void 0===b||null===(o=b.status)||void 0===o?void 0:o.write_quorum)?null===b||void 0===b||null===(s=b.status)||void 0===s?void 0:s.write_quorum:0})]})]})})]})})]})}),Object(Se.jsx)("br",{}),Object(Se.jsx)("br",{}),Object(Se.jsx)(w.a,{className:d.paperContainer,children:Object(Se.jsx)(y.a,{container:!0,children:Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("table",{width:"100%",children:Object(Se.jsxs)("tbody",{children:[Object(Se.jsx)("tr",{children:Object(Se.jsxs)("td",{colSpan:4,children:[Object(Se.jsx)("h2",{children:"Features"}),Object(Se.jsx)("hr",{className:d.hrClass})]})}),C?Object(Se.jsx)("tr",{children:Object(Se.jsx)("td",{className:d.centerAlign,colSpan:4,children:Object(Se.jsx)(k.a,{})})}):Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsxs)("tr",{children:[Object(Se.jsx)("td",{className:d.titleCol,children:"Logs:"}),Object(Se.jsx)("td",{children:Object(Se.jsx)(x.a,{color:"primary",className:d.anchorButton,children:j?"Enabled":"Disabled"})}),Object(Se.jsx)("td",{className:d.titleCol,children:"Monitoring:"}),Object(Se.jsx)("td",{children:Object(Se.jsx)(x.a,{color:"primary",className:d.anchorButton,children:m?"Enabled":"Disabled"})})]}),Object(Se.jsxs)("tr",{children:[Object(Se.jsx)("td",{className:d.titleCol,children:"MinIO TLS:"}),Object(Se.jsx)("td",{children:Object(Se.jsx)(x.a,{color:"primary",className:d.anchorButton,children:O?"Enabled":"Disabled"})}),g?Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)("td",{className:d.titleCol,children:"Console TLS:"}),Object(Se.jsx)("td",{children:Object(Se.jsx)(x.a,{color:"primary",className:d.anchorButton,children:f?"Enabled":"Disabled"})})]}):Object(Se.jsx)("td",{})]}),Object(Se.jsxs)("tr",{children:[Object(Se.jsx)("td",{className:d.titleCol,children:"Encryption:"}),Object(Se.jsx)("td",{children:Object(Se.jsx)(x.a,{color:"primary",className:d.anchorButton,children:p?"Enabled":"Disabled"})}),Object(Se.jsx)("td",{}),Object(Se.jsx)("td",{})]}),Object(Se.jsxs)("tr",{children:[v||!v&&!S&&Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsx)("td",{className:d.titleCol,children:"Active Directory:"}),Object(Se.jsx)("td",{children:Object(Se.jsx)(x.a,{color:"primary",className:d.anchorButton,children:v?"Enabled":"Disabled"})})]}),S||!S&&!v&&Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsx)("td",{className:d.titleCol,children:"OpenID:"}),Object(Se.jsx)("td",{children:Object(Se.jsx)(x.a,{color:"primary",className:d.anchorButton,children:S?"Enabled":"Disabled"})})]})]})]})]})})})})})]})}))),td=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({paperContainer:{padding:"15px 15px 15px 50px"},licenseInfoValue:{textTransform:"none",fontSize:14,fontWeight:"bold"},licenseContainer:{position:"relative",padding:"20px 52px 0px 28px",background:"#032F51",boxShadow:"0px 3px 7px #00000014","& h2":{color:"#FFF",marginBottom:67},"& a":{textDecoration:"none"},"& h3":{color:"#FFFFFF",marginBottom:"30px",fontWeight:"bold"},"& h6":{color:"#FFFFFF !important"}},licenseInfo:{color:"#FFFFFF",position:"relative"},licenseInfoTitle:{textTransform:"none",color:"#BFBFBF",fontSize:11},verifiedIcon:{width:96,position:"absolute",right:0,bottom:29},noUnderLine:{textDecoration:"none"}},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,n=e.tenant,a=e.loadingActivateProduct,i=e.loadingLicenseInfo,r=e.licenseInfo,o=e.activateProduct;return Object(Se.jsx)(w.a,{className:n&&n.subnet_license?t.licenseContainer:"",children:n&&n.subnet_license?Object(Se.jsx)(c.a.Fragment,{children:Object(Se.jsxs)(y.a,{container:!0,className:t.licenseInfo,children:[Object(Se.jsxs)(y.a,{item:!0,xs:6,children:[Object(Se.jsx)(S.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"License"}),Object(Se.jsx)(S.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:"Commercial License"}),Object(Se.jsx)(S.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"Organization"}),Object(Se.jsx)(S.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:n.subnet_license.organization}),Object(Se.jsx)(S.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"Registered Capacity"}),Object(Se.jsx)(S.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:oe((1099511627776*n.subnet_license.storage_capacity).toString(10))}),Object(Se.jsx)(S.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"Expiry Date"}),Object(Se.jsx)(S.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:Object(Se.jsx)(mt.a,{format:"YYYY-MM-DD",children:n.subnet_license.expires_at})})]}),Object(Se.jsxs)(y.a,{item:!0,xs:6,children:[Object(Se.jsx)(S.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"Subscription Plan"}),Object(Se.jsx)(S.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:n.subnet_license.plan}),Object(Se.jsx)(S.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"Requester"}),Object(Se.jsx)(S.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:n.subnet_license.email})]}),Object(Se.jsx)("img",{className:t.verifiedIcon,src:"/verified.svg",alt:"verified"})]})}):!i&&Object(Se.jsxs)(y.a,{className:t.paperContainer,children:[!r&&Object(Se.jsx)(nn.a,{to:"/license",onClick:function(e){e.stopPropagation()},className:t.noUnderLine,children:Object(Se.jsx)(x.a,{className:t.licenseButton,variant:"contained",color:"primary",children:"Activate Product"})}),r&&n&&Object(Se.jsx)(x.a,{disabled:a,className:t.licenseButton,variant:"contained",color:"primary",onClick:function(){return o(n.namespace,n.name)},children:"Attach License"})]})})})),nd=Object(o.b)((function(e){return{loadingTenant:e.tenants.tenantDetails.loadingTenant,tenant:e.tenants.tenantDetails.tenantInfo}}),{setErrorSnackMessage:H,setTenantDetailsLoad:jl}),ad=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({},et),{},{loaderAlign:{textAlign:"center"}},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(nd((function(e){var t=e.classes,n=e.tenant,c=e.loadingTenant,i=e.setTenantDetailsLoad,r=Object(a.useState)(),o=Object(h.a)(r,2),s=o[0],l=o[1],d=Object(a.useState)(!0),u=Object(h.a)(d,2),b=u[0],j=u[1],m=Object(a.useState)(!1),p=Object(h.a)(m,2),O=p[0],f=p[1];return Object(a.useEffect)((function(){b&&ye.invoke("GET","/api/v1/subscription/info").then((function(e){l(e),j(!1)})).catch((function(e){j(!1)}))}),[b]),Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)("br",{}),c?Object(Se.jsx)("div",{className:t.loaderAlign,children:Object(Se.jsx)(k.a,{})}):Object(Se.jsx)(a.Fragment,{children:n&&Object(Se.jsx)(y.a,{container:!0,children:Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(td,{tenant:n,loadingLicenseInfo:b,loadingActivateProduct:O,licenseInfo:s,activateProduct:function(e,t){O||(f(!0),ye.invoke("POST","/api/v1/subscription/namespaces/".concat(e,"/tenants/").concat(t,"/activate"),{}).then((function(){f(!1),i(!0),j(!0)})).catch((function(e){f(!1),H(e)})))}})})})})]})}))),cd=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({buttonContainer:{textAlign:"right"},multiContainer:{display:"flex",alignItems:"center",justifyContent:"flex-start"},sizeFactorContainer:{marginLeft:8},bottomContainer:{display:"flex",flexGrow:1,alignItems:"center","& div":{flexGrow:1,width:"100%"}},factorElements:{display:"flex",justifyContent:"flex-start"},sizeNumber:{fontSize:35,fontWeight:700,textAlign:"center"},sizeDescription:{fontSize:14,color:"#777",textAlign:"center"}},De))}))((function(e){var t=e.tenant,n=e.classes,c=e.open,i=e.onClosePoolAndReload,r=Object(a.useState)(!1),o=Object(h.a)(r,2),s=o[0],l=o[1],d=Object(a.useState)(0),u=Object(h.a)(d,2),b=u[0],j=u[1],m=Object(a.useState)(0),p=Object(h.a)(m,2),O=p[0],f=p[1],g=Object(a.useState)(0),v=Object(h.a)(g,2),S=v[0],k=v[1],w=Object(a.useState)(""),N=Object(h.a)(w,2),T=N[0],E=N[1],A=Object(a.useState)([]),_=Object(h.a)(A,2),I=_[0],L=_[1],D=1073741824*O*S,F=D*b;return Object(a.useEffect)((function(){E(""),L([]),ye.invoke("GET","/api/v1/namespaces/".concat(t.namespace,"/resourcequotas/").concat(t.namespace,"-storagequota")).then((function(e){var t=X()(e,"elements",[]).map((function(e){var t=X()(e,"name","").split(".storageclass.storage.k8s.io/requests.storage")[0];return{label:t,value:t}}));L(t),t.length>0&&E(t[0].value)})).catch((function(e){console.error(e)}))}),[t]),Object(Se.jsx)(_n,{onClose:function(){return i(!1)},modalOpen:c,title:"Add Pool",children:Object(Se.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){e.preventDefault(),l(!0);var n=pe(t.pools),a=Rs(t.name,n),c={name:n,servers:b,volumes_per_server:S,volume_configuration:{size:1073741824*O,storage_class_name:T,labels:null},affinity:a};ye.invoke("POST","/api/v1/namespaces/".concat(t.namespace,"/tenants/").concat(t.name,"/pools"),c).then((function(){l(!1),i(!0)})).catch((function(e){l(!1)}))},children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"number_of_nodes",name:"number_of_nodes",type:"number",onChange:function(e){j(parseInt(e.target.value))},label:"Number o Nodes",value:b.toString(10)})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"pool_size",name:"pool_size",type:"number",onChange:function(e){f(parseInt(e.target.value))},label:"Volume Size (Gi)",value:O.toString(10)})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"volumes_per_sever",name:"volumes_per_sever",type:"number",onChange:function(e){k(parseInt(e.target.value))},label:"Volumes per Server",value:S.toString(10)})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(zn,{id:"storage_class",name:"storage_class",onChange:function(e){E(e.target.value)},label:"Storage Class",value:T,options:I,disabled:I.length<1})}),Object(Se.jsxs)(y.a,{item:!0,xs:12,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:n.bottomContainer,children:[Object(Se.jsxs)("div",{className:n.factorElements,children:[Object(Se.jsxs)("div",{children:[Object(Se.jsx)("div",{className:n.sizeNumber,children:oe(D.toString(10))}),Object(Se.jsx)("div",{className:n.sizeDescription,children:"Instance Capacity"})]}),Object(Se.jsxs)("div",{children:[Object(Se.jsx)("div",{className:n.sizeNumber,children:oe(F.toString(10))}),Object(Se.jsx)("div",{className:n.sizeDescription,children:"Total Capacity"})]})]}),Object(Se.jsx)("div",{className:n.buttonContainer,children:Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:s,children:"Save"})})]}),s&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(C.a,{})})]})]})})})),id=Object(o.b)((function(e){return{loadingTenant:e.tenants.tenantDetails.loadingTenant,selectedTenant:e.tenants.tenantDetails.currentTenant,tenant:e.tenants.tenantDetails.tenantInfo}}),{setErrorSnackMessage:H,setTenantDetailsLoad:jl}),rd=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({},et),{},{redState:{color:e.palette.error.main},yellowState:{color:e.palette.warning.main},greenState:{color:e.palette.success.main},greyState:{color:"grey"}},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(id((function(e){var t=e.classes,n=e.tenant,c=e.loadingTenant,i=e.setTenantDetailsLoad,r=Object(a.useState)([]),o=Object(h.a)(r,2),s=o[0],l=o[1],d=Object(a.useState)(!1),u=Object(h.a)(d,2),b=u[0],j=u[1],m=Object(a.useState)(""),p=Object(h.a)(m,2),O=p[0],f=p[1];Object(a.useEffect)((function(){if(n){var e=n.pools?n.pools:[];l(e)}}),[n]);var g=s.filter((function(e){return!!e.name.toLowerCase().includes(O.toLowerCase())}));return Object(Se.jsxs)(a.Fragment,{children:[b&&null!==n&&Object(Se.jsx)(cd,{open:b,onClosePoolAndReload:function(e){j(!1),e&&i(!0)},tenant:n}),Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(Se.jsx)(v.a,{placeholder:"Filter",className:t.searchField,id:"search-resource",label:"",onChange:function(e){f(e.target.value)},InputProps:{disableUnderline:!0,startAdornment:Object(Se.jsx)(lt.a,{position:"start",children:Object(Se.jsx)(ut.a,{})})}}),Object(Se.jsx)(x.a,{variant:"contained",color:"primary",startIcon:Object(Se.jsx)(ft,{}),onClick:function(){j(!0)},children:"Expand Tenant"})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(kn,{itemActions:[],columns:[{label:"Name",elementKey:"name"},{label:"Capacity",elementKey:"capacity"},{label:"# of Instances",elementKey:"servers"},{label:"# of Drives",elementKey:"volumes"}],isLoading:c,records:g,entityName:"Servers",idField:"name",customEmptyMessage:"No Pools found"})})]})]})}))),od=Object(o.b)(null,{setErrorSnackMessage:H})((function(e){var t=e.deleteOpen,n=e.selectedPod,c=e.closeDeleteModalAndRefresh,i=e.setErrorSnackMessage,r=Object(a.useState)(!1),o=Object(h.a)(r,2),s=o[0],l=o[1],d=Object(a.useState)(""),u=Object(h.a)(d,2),b=u[0],j=u[1];Object(a.useEffect)((function(){s&&ye.invoke("DELETE","/api/v1/namespaces/".concat(n.namespace,"/tenants/").concat(n.tenant,"/pods/").concat(n.name)).then((function(){l(!1),c(!0)})).catch((function(e){l(!1),i(e)}))}),[s]);return Object(Se.jsxs)(wn.a,{open:t,onClose:function(){c(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(Se.jsx)(Nn.a,{id:"alert-dialog-title",children:"Delete Pod"}),Object(Se.jsxs)(Tn.a,{children:[s&&Object(Se.jsx)(C.a,{}),Object(Se.jsxs)($n.a,{id:"alert-dialog-description",children:["To continue please type ",Object(Se.jsx)("b",{children:n.name})," in the box.",Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"retype-pod",name:"retype-pod",onChange:function(e){j(e.target.value)},label:"",value:b})})]})]}),Object(Se.jsxs)(Xn.a,{children:[Object(Se.jsx)(x.a,{onClick:function(){c(!1)},color:"primary",disabled:s,children:"Cancel"}),Object(Se.jsx)(x.a,{onClick:function(){b===n.name?l(!0):i("Tenant name is not correct")},color:"secondary",autoFocus:!0,disabled:b!==n.name,children:"Delete"})]})]})})),sd=Object(o.b)((function(e){return{loadingTenant:e.tenants.tenantDetails.loadingTenant}}),{setErrorSnackMessage:H}),ld=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({},et),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(sd((function(e){var t=e.match,n=e.history,c=e.loadingTenant,i=Object(a.useState)([]),r=Object(h.a)(i,2),o=r[0],s=r[1],l=Object(a.useState)(!0),d=Object(h.a)(l,2),u=d[0],b=d[1],j=Object(a.useState)(!1),m=Object(h.a)(j,2),p=m[0],O=m[1],f=Object(a.useState)(null),g=Object(h.a)(f,2),x=g[0],v=g[1],y=t.params.tenantName,S=t.params.tenantNamespace,C=[{type:"view",onClick:function(e){n.push("/namespaces/".concat(S,"/tenants/").concat(y,"/pods/").concat(e.name))}},{type:"delete",onClick:function(e){e.tenant=y,e.namespace=S,v(e),O(!0)}}];return Object(a.useEffect)((function(){c&&b(!0)}),[c]),Object(a.useEffect)((function(){u&&ye.invoke("GET","/api/v1/namespaces/".concat(S,"/tenants/").concat(y,"/pods")).then((function(e){for(var t=0;t<e.length;t++){var n=Date.now()/1e3|0;e[t].time=Oe((n-parseInt(e[t].timeCreated)).toString())}s(e),b(!1)})).catch((function(e){H("Error loading pods")}))}),[u,y,S]),Object(Se.jsxs)(a.Fragment,{children:[p&&Object(Se.jsx)(od,{deleteOpen:p,selectedPod:x,closeDeleteModalAndRefresh:function(e){O(!1)}}),Object(Se.jsx)("br",{}),Object(Se.jsx)(kn,{columns:[{label:"Name",elementKey:"name"},{label:"Status",elementKey:"status"},{label:"Age",elementKey:"time"},{label:"Pod IP",elementKey:"podIP"},{label:"Restarts",elementKey:"restarts",renderFunction:function(e){return null!=e?e:0}},{label:"Node",elementKey:"node"}],isLoading:u,records:o,itemActions:C,entityName:"Servers",idField:"name"})]})}))),dd=Object(o.b)((function(e){return{loadingTenant:e.tenants.tenantDetails.loadingTenant,selectedTenant:e.tenants.tenantDetails.currentTenant,tenant:e.tenants.tenantDetails.tenantInfo,logEnabled:X()(e.tenants.tenantDetails.tenantInfo,"logEnabled",!1),monitoringEnabled:X()(e.tenants.tenantDetails.tenantInfo,"monitoringEnabled",!1),encryptionEnabled:X()(e.tenants.tenantDetails.tenantInfo,"encryptionEnabled",!1),adEnabled:X()(e.tenants.tenantDetails.tenantInfo,"idpAdEnabled",!1),oicEnabled:X()(e.tenants.tenantDetails.tenantInfo,"idpOicEnabled",!1)}}),{setErrorSnackMessage:H}),ud=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({},et),{},{flexBox:{display:"flex",flexFlow:"column"},iframeStyle:{border:"0px",flex:"1 1 auto",minHeight:"800px",width:"100%"}},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(dd((function(e){var t=e.classes,n=e.match,i=n.params.tenantName,r=n.params.tenantNamespace,o=Object(a.useState)(!0),s=Object(h.a)(o,2),l=s[0],d=s[1];return Object(Se.jsxs)(c.a.Fragment,{children:[l&&Object(Se.jsx)("div",{style:{marginTop:"80px"},children:Object(Se.jsx)(C.a,{})}),Object(Se.jsx)("iframe",{className:t.iframeStyle,title:"metrics",src:"/api/proxy/".concat(r,"/").concat(i,"/metrics"),onLoad:function(){d(!1)}})]})}))),bd=n(684),jd=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({},et),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){e.classes;var t=e.open,n=e.cancelLabel,c=e.okLabel,i=e.onClose,r=e.cancelOnClick,o=e.okOnClick,s=e.title,l=e.description,d=Object(a.useState)(!1),u=Object(h.a)(d,2),b=u[0],j=u[1];return t?Object(Se.jsxs)(wn.a,{open:t,onClose:i,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(Se.jsx)(Nn.a,{id:"alert-dialog-title",children:s}),Object(Se.jsxs)(Tn.a,{children:[b&&Object(Se.jsx)(C.a,{}),Object(Se.jsx)($n.a,{id:"alert-dialog-description",children:l})]}),Object(Se.jsxs)(Xn.a,{children:[Object(Se.jsx)(x.a,{onClick:r,color:"primary",disabled:b,children:n||"Cancel"}),Object(Se.jsx)(x.a,{onClick:function(){j(!0),null!==o&&o(),j(!1)},color:"secondary",autoFocus:!0,children:c||"Ok"})]})]}):null})),hd={setErrorSnackMessage:H,setTenantDetailsLoad:jl},md=Object(o.b)((function(e){return{loadingTenant:e.tenants.tenantDetails.loadingTenant,selectedTenant:e.tenants.tenantDetails.currentTenant,tenant:e.tenants.tenantDetails.tenantInfo}}),hd),pd=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({},et),{},{loaderAlign:{textAlign:"center"},title:{marginTop:35},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},underline:{textDecorationLine:"underline"},paperContainer:{padding:"15px 15px 15px 50px"},verifiedIcon:{width:96,position:"absolute",right:0,bottom:29},noUnderLine:{textDecoration:"none"},certificateInfo:{height:"auto",margin:5},certificateInfoName:{fontWeight:"bold"}},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(md((function(e){var t=e.classes,n=e.tenant,i=e.loadingTenant,r=e.setErrorSnackMessage,o=(e.setTenantDetailsLoad,Object(a.useState)(!1)),s=Object(h.a)(o,2),l=s[0],d=s[1],u=Object(a.useState)(!1),b=Object(h.a)(u,2),j=b[0],p=b[1],O=Object(a.useState)(!1),f=Object(h.a)(O,2),g=f[0],v=f[1],C=Object(a.useState)(!1),N=Object(h.a)(C,2),T=N[0],E=N[1],A=Object(a.useState)([]),_=Object(h.a)(A,2),I=_[0],L=_[1],D=Object(a.useState)([{cert:"",encoded_cert:"",encoded_key:"",id:Date.now().toString(),key:""}]),F=Object(h.a)(D,2),M=F[0],R=F[1],B=Object(a.useState)([]),P=Object(h.a)(B,2),z=P[0],K=P[1],U=Object(a.useState)([]),W=Object(h.a)(U,2),G=W[0],q=W[1],V=Object(a.useState)([]),H=Object(h.a)(V,2),Y=H[0],Q=H[1],Z=Object(a.useState)([]),J=Object(h.a)(Z,2),$=J[0],X=J[1],ee=Object(a.useState)([]),te=Object(h.a)(ee,2),ne=te[0],ae=te[1],ce=Object(a.useState)([]),ie=Object(h.a)(ce,2),re=ie[0],oe=ie[1],se=Object(a.useState)([]),le=Object(h.a)(se,2),de=le[0],ue=le[1],be=Object(a.useCallback)((function(){ye.invoke("GET","/api/v1/namespaces/".concat(null===n||void 0===n?void 0:n.namespace,"/tenants/").concat(null===n||void 0===n?void 0:n.name,"/security")).then((function(e){v(e.autoCert),(e.customCertificates.minio||e.customCertificates.minioCAs||e.customCertificates.console||e.customCertificates.consoleCAs)&&E(!0),oe(e.customCertificates.minio||[]),ue(e.customCertificates.minioCAs||[]),q(e.customCertificates.console||[]),Q(e.customCertificates.consoleCAs||[])})).catch((function(e){r(e.message)}))}),[n,r]);Object(a.useEffect)((function(){n&&be()}),[n,be]);var je=function(e){L([].concat(Object(st.a)(I),[e.name]));var t=re.filter((function(t){return t.name!==e.name})),n=de.filter((function(t){return t.name!==e.name}));oe(t),ue(n);var a=G.filter((function(t){return t.name!==e.name})),c=Y.filter((function(t){return t.name!==e.name}));q(a),Q(c)},he=function(e,t,n,a,c){var i=$,r=function(){};switch(e){case"minio":i=$,r=X;break;case"minioCAs":i=ne,r=ae;break;case"console":i=M,r=R;break;case"consoleCAs":i=z,r=K}r(i.map((function(e){var i;return e.id===t?Object(m.a)(Object(m.a)({},e),{},(i={},Object(Ne.a)(i,n,a),Object(Ne.a)(i,"encoded_".concat(n),c),i)):e})))},me=function(e,t){var n=$,a=function(){};switch(e){case"minio":n=$,a=X;break;case"minioCAs":n=ne,a=ae;break;case"console":n=M,a=R;break;case"consoleCAs":n=z,a=K}n.length>1&&a(n.filter((function(e){return e.id!==t})))},pe=function(e){var t=$,n=function(){};switch(e){case"minio":t=$,n=X;break;case"minioCAs":t=ne,n=ae;break;case"console":t=M,n=R;break;case"consoleCAs":t=z,n=K}n([].concat(Object(st.a)(t),[{id:Date.now().toString(),key:"",cert:"",encoded_key:"",encoded_cert:""}]))};return Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsx)(jd,{open:j,title:"Save and Restart",description:"Are you sure you want to save the changes and restart the service?",onClose:function(){return p(!1)},cancelOnClick:function(){return p(!1)},okOnClick:function(){d(!0);var e={autoCert:g,customCertificates:{}};e.customCertificates=T?{secretsToBeDeleted:I,minio:$.map((function(e){return{crt:e.encoded_cert,key:e.encoded_key}})).filter((function(e){return e.crt&&e.key})),minioCAs:ne.map((function(e){return e.encoded_cert})).filter((function(e){return e})),console:M.map((function(e){return{crt:e.encoded_cert,key:e.encoded_key}})).filter((function(e){return e.crt&&e.key})),consoleCAs:z.map((function(e){return e.encoded_cert})).filter((function(e){return e}))}:{secretsToBeDeleted:[].concat(Object(st.a)(re.map((function(e){return e.name}))),Object(st.a)(de.map((function(e){return e.name}))),Object(st.a)(G.map((function(e){return e.name}))),Object(st.a)(Y.map((function(e){return e.name})))),minio:[],minioCAs:[],console:[],consoleCAs:[]},ye.invoke("POST","/api/v1/namespaces/".concat(null===n||void 0===n?void 0:n.namespace,"/tenants/").concat(null===n||void 0===n?void 0:n.name,"/security"),e).then((function(){d(!1),p(!1),X([{cert:"",encoded_cert:"",encoded_key:"",id:Date.now().toString(),key:""}]),ae([{cert:"",encoded_cert:"",encoded_key:"",id:Date.now().toString(),key:""}]),R([{cert:"",encoded_cert:"",encoded_key:"",id:Date.now().toString(),key:""}]),K([{cert:"",encoded_cert:"",encoded_key:"",id:Date.now().toString(),key:""}]),be()})).catch((function(e){r(e),d(!1)}))},cancelLabel:"Cancel",okLabel:"Restart"}),Object(Se.jsx)("br",{}),i?Object(Se.jsx)(w.a,{className:t.paperContainer,children:Object(Se.jsx)("div",{className:t.loaderAlign,children:Object(Se.jsx)(k.a,{})})}):Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsxs)(w.a,{className:t.paperContainer,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.title,children:[Object(Se.jsx)(Zn,{value:"enableAutoCert",id:"enableAutoCert",name:"enableAutoCert",checked:g,onChange:function(e){var t=e.target.checked;v(t)},label:"Manage Inter-Node Certificates Automatically",description:"The internode certificates will be generated and managed by MinIO Operator"}),Object(Se.jsx)(Zn,{value:"enableCustomCerts",id:"enableCustomCerts",name:"enableCustomCerts",checked:T,onChange:function(e){var t=e.target.checked;E(t)},label:"Custom Certificates"})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.buttonContainer,children:Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:j||l,onClick:function(){return p(!0)},children:"Save"})})]}),T&&Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)("br",{}),Object(Se.jsx)(w.a,{className:t.paperContainer,children:Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsx)(y.a,{container:!0,item:!0,xs:12,children:Object(Se.jsx)(S.a,{variant:"h5",display:"block",gutterBottom:!0,children:"MinIO Certificates"})}),Object(Se.jsx)(y.a,{container:!0,item:!0,xs:12,children:re.map((function(e){return Object(Se.jsx)(bd.a,{variant:"outlined",color:"primary",className:t.certificateInfo,label:Object(Se.jsxs)("div",{children:[Object(Se.jsx)(S.a,{variant:"subtitle1",display:"block",gutterBottom:!0,children:e.name}),Object(Se.jsx)(S.a,{className:t.italic,variant:"caption",display:"block",gutterBottom:!0,children:e.domains.map((function(e){return Object(Se.jsx)("div",{children:e})}))}),Object(Se.jsx)(S.a,{className:t.bold,variant:"overline",gutterBottom:!0,children:"Expiry:\xa0"}),Object(Se.jsx)(S.a,{variant:"caption",gutterBottom:!0,children:Object(Se.jsx)(mt.a,{format:"YYYY-MM-DD",children:e.expiry})})]}),onDelete:function(){return je(e)}},e.name)}))}),Object(Se.jsx)(y.a,{container:!0,item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsx)(y.a,{container:!0,item:!0,xs:12,children:$.map((function(e){return Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:5,children:Object(Se.jsx)(xs,{onChange:function(t,n){return he("minio",e.id,"cert",n,t)},accept:".cer,.crt,.cert,.pem",id:"tlsCert",name:"tlsCert",label:"Cert",value:e.cert})}),Object(Se.jsx)(y.a,{item:!0,xs:5,children:Object(Se.jsx)(xs,{onChange:function(t,n){return he("minio",e.id,"key",n,t)},accept:".key,.pem",id:"tlsKey",name:"tlsKey",label:"Key",value:e.key})}),Object(Se.jsx)(y.a,{item:!0,xs:1,children:Object(Se.jsx)(x.a,{onClick:function(){return me("minio",e.id)},color:"secondary",children:"Remove"})})]},e.id)}))}),Object(Se.jsx)(y.a,{container:!0,item:!0,xs:12,children:Object(Se.jsx)(x.a,{onClick:function(){return pe("minio")},color:"primary",children:"Add Certificate"})}),Object(Se.jsx)(y.a,{container:!0,item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsx)(y.a,{container:!0,item:!0,xs:12,children:Object(Se.jsx)(S.a,{variant:"h6",display:"block",gutterBottom:!0,children:"MinIO CA Certificates"})}),Object(Se.jsx)(y.a,{container:!0,item:!0,xs:12,children:de.map((function(e){return Object(Se.jsx)(bd.a,{variant:"outlined",color:"primary",className:t.certificateInfo,label:Object(Se.jsxs)("div",{children:[Object(Se.jsx)(S.a,{variant:"subtitle1",display:"block",gutterBottom:!0,children:e.name}),Object(Se.jsx)(S.a,{className:t.italic,variant:"caption",display:"block",gutterBottom:!0,children:e.domains.map((function(e){return Object(Se.jsx)("div",{children:e})}))}),Object(Se.jsx)(S.a,{className:t.bold,variant:"overline",gutterBottom:!0,children:"Expiry:\xa0"}),Object(Se.jsx)(S.a,{variant:"caption",gutterBottom:!0,children:Object(Se.jsx)(mt.a,{format:"YYYY-MM-DD",children:e.expiry})})]}),onDelete:function(){return je(e)}},e.name)}))}),Object(Se.jsx)(y.a,{container:!0,item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsx)(y.a,{container:!0,item:!0,xs:12,children:ne.map((function(e){return Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:10,children:Object(Se.jsx)(xs,{onChange:function(t,n){return he("minioCAs",e.id,"cert",n,t)},accept:".cer,.crt,.cert,.pem",id:"tlsCert",name:"tlsCert",label:"Cert",value:e.cert})}),Object(Se.jsx)(y.a,{item:!0,xs:1,children:Object(Se.jsx)(x.a,{onClick:function(){return me("minioCAs",e.id)},color:"secondary",children:"Remove"})})]},e.id)}))}),Object(Se.jsx)(y.a,{container:!0,item:!0,xs:12,children:Object(Se.jsx)(x.a,{onClick:function(){return pe("minioCAs")},color:"primary",children:"Add CA Certificate"})}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.buttonContainer,children:Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:j||l,onClick:function(){return p(!0)},children:"Save"})})]})}),(null===n||void 0===n?void 0:n.consoleEnabled)?Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)("br",{}),Object(Se.jsxs)(w.a,{className:t.paperContainer,children:[Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsx)(y.a,{container:!0,item:!0,xs:12,children:Object(Se.jsx)(S.a,{variant:"h5",display:"block",gutterBottom:!0,children:"Console Certificates"})}),Object(Se.jsx)(y.a,{container:!0,item:!0,xs:12,children:G.map((function(e){return Object(Se.jsx)(bd.a,{variant:"outlined",color:"primary",className:t.certificateInfo,label:Object(Se.jsxs)("div",{children:[Object(Se.jsx)(S.a,{variant:"subtitle1",display:"block",gutterBottom:!0,children:e.name}),Object(Se.jsx)(S.a,{className:t.italic,variant:"caption",display:"block",gutterBottom:!0,children:e.domains.map((function(e){return Object(Se.jsx)("div",{children:e})}))}),Object(Se.jsx)(S.a,{className:t.bold,variant:"overline",gutterBottom:!0,children:"Expiry:\xa0"}),Object(Se.jsx)(S.a,{variant:"caption",gutterBottom:!0,children:Object(Se.jsx)(mt.a,{format:"YYYY-MM-DD",children:e.expiry})})]}),onDelete:function(){return je(e)}},e.name)}))}),Object(Se.jsx)(y.a,{container:!0,item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsx)(y.a,{container:!0,item:!0,xs:12,children:M.map((function(e){return Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:6,children:Object(Se.jsx)(xs,{onChange:function(t,n){return he("console",e.id,"cert",n,t)},accept:".cer,.crt,.cert,.pem",id:"consoleCert",name:"consoleCert",label:"Cert",value:e.cert})}),Object(Se.jsx)(y.a,{item:!0,xs:6,children:Object(Se.jsx)(xs,{onChange:function(t,n){return he("console",e.id,"key",n,t)},accept:".key,.pem",id:"consoleKey",name:"consoleKey",label:"Key",value:e.key})})]},e.id)}))}),Object(Se.jsx)(y.a,{container:!0,item:!0,xs:12,children:Object(Se.jsx)(S.a,{variant:"h6",display:"block",gutterBottom:!0,children:"CA Certificates"})}),Object(Se.jsx)(y.a,{container:!0,item:!0,xs:12,children:Y.map((function(e){return Object(Se.jsx)(bd.a,{variant:"outlined",color:"primary",className:t.certificateInfo,label:Object(Se.jsxs)("div",{children:[Object(Se.jsx)(S.a,{variant:"subtitle1",display:"block",gutterBottom:!0,children:e.name}),Object(Se.jsx)(S.a,{className:t.italic,variant:"caption",display:"block",gutterBottom:!0,children:e.domains.map((function(e){return Object(Se.jsx)("div",{children:e})}))}),Object(Se.jsx)(S.a,{className:t.bold,variant:"overline",gutterBottom:!0,children:"Expiry:\xa0"}),Object(Se.jsx)(S.a,{variant:"caption",gutterBottom:!0,children:Object(Se.jsx)(mt.a,{format:"YYYY-MM-DD",children:e.expiry})})]}),onDelete:function(){return je(e)}},e.name)}))}),Object(Se.jsx)(y.a,{container:!0,item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsx)(y.a,{container:!0,item:!0,xs:12,children:z.map((function(e){return Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:10,children:Object(Se.jsx)(xs,{onChange:function(t,n){return he("consoleCAs",e.id,"cert",n,t)},accept:".cer,.crt,.cert,.pem",id:"tlsCert",name:"tlsCert",label:"Cert",value:e.cert})}),Object(Se.jsx)(y.a,{item:!0,xs:1,children:Object(Se.jsx)(x.a,{onClick:function(){return me("consoleCAs",e.id)},color:"secondary",children:"Remove"})})]},e.id)}))}),Object(Se.jsx)(y.a,{container:!0,item:!0,xs:12,children:Object(Se.jsx)(x.a,{onClick:function(){return pe("consoleCAs")},color:"primary",children:"Add Console Certificate"})})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.buttonContainer,children:Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:j||l,onClick:function(){return p(!0)},children:"Save"})})]})]}):null]})]})]})}))),Od=Object(o.b)((function(e){return{loadingTenant:e.tenants.tenantDetails.loadingTenant,currentTab:e.tenants.tenantDetails.currentTab,selectedTenant:e.tenants.tenantDetails.currentTenant,selectedNamespace:e.tenants.tenantDetails.currentNamespace}}),{setErrorSnackMessage:H,setTenantDetailsLoad:jl,setTenantName:function(e,t){return{type:ol,name:e,namespace:t}},setTenantInfo:function(e){return{type:sl,tenant:e}},setTenantTab:function(e){return{type:ll,tab:e}}}),fd=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({},et),{},{redState:{color:e.palette.error.main},yellowState:{color:e.palette.warning.main},greenState:{color:e.palette.success.main},greyState:{color:"grey"}},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(Od((function(e){var t=e.classes,n=e.match,i=e.history,r=e.loadingTenant,o=e.currentTab,l=e.selectedTenant,d=e.selectedNamespace,u=e.setErrorSnackMessage,b=e.setTenantDetailsLoad,j=e.setTenantName,m=e.setTenantInfo,p=e.setTenantTab,O=Object(a.useState)(!1),f=Object(h.a)(O,2),g=f[0],x=f[1],v=n.params.tenantName,S=n.params.tenantNamespace,C=c.a.useState(null),k=Object(h.a)(C,2),w=k[0],N=k[1];Object(a.useEffect)((function(){r||v===l&&S===d||(j(v,S),b(!0))}),[r,l,d,b,m,j,v,S]),Object(a.useEffect)((function(){r&&ye.invoke("GET","/api/v1/namespaces/".concat(S,"/tenants/").concat(v)).then((function(e){m(e),b(!1)})).catch((function(e){u(e),b(!1)}))}),[r,S,v,m,b,u]),Object(a.useEffect)((function(){var e=X()(n,"path","/").split("/"),t=e[e.length-1];switch(t){case"pools":case"pods":case"metrics":case"license":case"security":p(t);break;default:p("summary")}}),[n,p]);var T=function(){N(null),x(!0)};return Object(Se.jsxs)(a.Fragment,{children:[g&&Object(Se.jsx)(Yl,{open:g,closeModalAndRefresh:function(){x(!1),b(!0)},tenant:v,namespace:S}),Object(Se.jsx)(na,{label:Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(nn.a,{to:"/tenants",className:t.breadcrumLink,children:"Tenant"})," > ".concat(n.params.tenantName),Object(Se.jsx)(Vt.a,{"aria-label":"more","aria-controls":"long-menu","aria-haspopup":"true",onClick:function(e){N(e.currentTarget)},children:Object(Se.jsx)(ao.a,{})}),Object(Se.jsx)(Vr.a,{id:"long-menu",anchorEl:w,keepMounted:!0,open:Boolean(w),onClose:T,children:Object(Se.jsx)(Bn.a,{onClick:T,children:"Edit YAML"},"yaml")})]}),actions:Object(Se.jsx)(Vt.a,{color:"primary","aria-label":"Refresh List",component:"span",onClick:function(){b(!0)},children:Object(Se.jsx)(rc.a,{})})}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.container}),Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsxs)(ja.a,{value:o,indicatorColor:"primary",textColor:"primary",onChange:function(e,t){p(t),i.push("/namespaces/".concat(S,"/tenants/").concat(v,"/").concat(t))},"aria-label":"tenant-tabs",variant:"scrollable",scrollButtons:"auto",children:[Object(Se.jsx)(ha.a,{value:"summary",label:"Summary"}),Object(Se.jsx)(ha.a,{value:"metrics",label:"Metrics"}),Object(Se.jsx)(ha.a,{value:"security",label:"Security"}),Object(Se.jsx)(ha.a,{value:"pools",label:"Pools"}),Object(Se.jsx)(ha.a,{value:"pods",label:"Pods"}),Object(Se.jsx)(ha.a,{value:"license",label:"License"})]})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(s.c,{history:i,children:Object(Se.jsxs)(s.d,{children:[Object(Se.jsx)(s.b,{path:"/namespaces/:tenantNamespace/tenants/:tenantName/summary",component:ed}),Object(Se.jsx)(s.b,{path:"/namespaces/:tenantNamespace/tenants/:tenantName/metrics",component:ud}),Object(Se.jsx)(s.b,{path:"/namespaces/:tenantNamespace/tenants/:tenantName/security",component:pd}),Object(Se.jsx)(s.b,{path:"/namespaces/:tenantNamespace/tenants/:tenantName/pools",component:rd}),Object(Se.jsx)(s.b,{path:"/namespaces/:tenantNamespace/tenants/:tenantName/pods",component:ld}),Object(Se.jsx)(s.b,{path:"/namespaces/:tenantNamespace/tenants/:tenantName/license",component:ad}),Object(Se.jsx)(s.b,{path:"/namespaces/:tenantNamespace/tenants/:tenantName",component:function(){return Object(Se.jsx)(s.a,{to:"/namespaces/".concat(S,"/tenants/").concat(v,"/summary")})}})]})})})]})]})}))),gd="OBJECT_BROWSER/ADD_ROUTE",xd="OBJECT_BROWSER/RESET_ROUTES_LIST",vd="OBJECT_BROWSER/REMOVE_ROUTE_LEVEL",yd="OBJECT_BROWSER/SET_ALL_ROUTES",Sd="OBJECT_BROWSER/CREATE_FOLDER",Cd="OBJECT_BROWSER/SET_LAST_AS_FILE",kd="OBJECT_BROWSER/DOWNLOAD_FILE_LOADER",wd="OBJECT_BROWSER/DOWNLOADED_FILE",Nd="REWIND/SET_ENABLE",Td="REWIND/RESET_REWIND",Ed=function(e,t,n){return{type:gd,route:e,label:t,routeType:n}},Ad=function(e){return{type:vd,toRoute:e}},_d=function(e){return{type:yd,currentRoute:e}},Id=function(e){return{type:kd,path:e}},Ld=function(e){return{type:wd,path:e}},Dd=function(){return{type:Td}},Fd={removeRouteLevel:Ad},Md=Object(o.b)((function(e){var t=e.objectBrowser;return{objectsList:X()(t,"routesList",[]),rewindEnabled:X()(t,"rewind.rewindEnabled",!1),rewindDate:X()(t,"rewind.dateToRewind",null)}}),Fd)(Object(E.a)((function(e){return Object(N.a)(Object(m.a)({},We))}))((function(e){var t=e.classes,n=e.objectsList,a=e.rewindEnabled,i=e.rewindDate,r=e.removeRouteLevel,o=n.map((function(e,t){return Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsx)(nn.a,{to:e.route,onClick:function(){r(e.route)},children:e.label}),t<n.length-1&&Object(Se.jsx)("span",{children:" / "})]},"breadcrumbs-".concat(t.toString()))}));return Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsxs)("div",{className:t.sectionTitle,children:[n&&n.length>0?n.slice(-1)[0].label:"",a&&n.length>1&&Object(Se.jsxs)("small",{className:t.smallLabel,children:["\xa0(Rewind:"," ",Object(Se.jsx)(mt.a,{date:i,format:"MMMM Do YYYY, h:mm a"})," )"]})]})}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.breadcrumbs,children:o})]})}))),Rd={addRoute:Ed,resetRoutesList:function(e){return{type:xd,reset:e}},displayErrorMessage:H},Bd=Object(o.b)(null,Rd),Pd=Object(s.h)(Bd(Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},usedSpaceCol:{width:150,textAlign:"right"},subTitleLabel:{alignItems:"center",display:"flex"},bucketName:{display:"flex",alignItems:"center"},iconBucket:{backgroundImage:"url(/images/ob_bucket_clear.svg)",backgroundRepeat:"no-repeat",backgroundPosition:"center center",width:16,height:40,marginRight:10},"@global":{".rowLine:hover .iconBucketElm":{backgroundImage:"url(/images/ob_bucket_filled.svg)"}},browsePaper:{height:"calc(100vh - 280px)"}},ze),Ke),We))}))((function(e){var t=e.classes,n=e.match,c=e.addRoute,i=e.resetRoutesList,r=e.displayErrorMessage,o=Object(a.useState)(!0),s=Object(h.a)(o,2),l=s[0],d=s[1],u=Object(a.useState)([]),b=Object(h.a)(u,2),j=b[0],m=b[1],p=Object(a.useState)(!1),O=Object(h.a)(p,2),f=O[0],g=O[1],S=Object(a.useState)(""),C=Object(h.a)(S,2),k=C[0],w=C[1],N=Object(a.useState)(!0),T=Object(h.a)(N,2),E=T[0],A=T[1],_=Object(a.useState)(!1),I=Object(h.a)(_,2),L=I[0],D=I[1];Object(a.useEffect)((function(){E&&ye.invoke("POST","/api/v1/has-permission",{actions:[{id:"createBucket",action:"s3:CreateBucket"}]}).then((function(e){var t=e.permissions.filter((function(e){return"createBucket"===e.id})).pop();t&&t.can?D(!0):D(!1),A(!1)})).catch((function(e){A(!1),H(e)}))}),[E]),Object(a.useEffect)((function(){i(!0)}),[n,i]),Object(a.useEffect)((function(){l&&ye.invoke("GET","/api/v1/buckets").then((function(e){d(!1),m(e.buckets||[])})).catch((function(e){d(!1),r(e)}))}),[l,r]);var F=j.filter((function(e){return""===k||e.name.indexOf(k)>=0}));return Object(Se.jsxs)(a.Fragment,{children:[f&&Object(Se.jsx)(Jn,{open:f,closeModalAndRefresh:function(e){g(!1),e&&d(!0)}}),Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.obTitleSection,children:Object(Se.jsx)("div",{children:Object(Se.jsx)(Md,{})})}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(Se.jsx)(v.a,{placeholder:"Search Buckets",className:t.searchField,id:"search-resource",label:"",onChange:function(e){w(e.target.value)},InputProps:{disableUnderline:!0,startAdornment:Object(Se.jsx)(lt.a,{position:"start",children:Object(Se.jsx)(ut.a,{})})}}),Object(Se.jsx)(Vt.a,{color:"primary","aria-label":"Refresh List",component:"span",onClick:function(){d(!0)},children:Object(Se.jsx)(rc.a,{})}),L&&Object(Se.jsx)("div",{children:Object(Se.jsx)(x.a,{variant:"contained",color:"primary",startIcon:Object(Se.jsx)(ft,{}),onClick:function(){g(!0)},children:"Create Bucket"})})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(kn,{itemActions:[{type:"view",sendOnlyId:!0,onClick:function(e){var t=X()(n,"url","/object-browser"),a="".concat(t,"/").concat(e);c(a,e,"path")}}],columns:[{label:"Name",elementKey:"name",renderFunction:function(e){return Object(Se.jsxs)("div",{className:t.bucketName,children:[Object(Se.jsx)("div",{className:"".concat(t.iconBucket," iconBucketElm")}),Object(Se.jsx)("span",{children:e})]})}},{label:"Used Space",elementKey:"size",renderFunction:oe,globalClass:t.usedSpaceCol,rowClass:t.usedSpaceCol,width:100,contentTextAlign:"right",headerTextAlign:"right"}],isLoading:l,records:F,entityName:"Buckets",idField:"name",customPaperHeight:t.browsePaper})})]})]})})))),zd=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({watchList:{background:"white",maxHeight:"400",overflow:"auto","& ul":{margin:"4",padding:"0"},"& ul li":{listStyle:"none",margin:"0",padding:"0",borderBottom:"1px solid #dedede"}},actionsTray:{textAlign:"right","& button":{marginLeft:10}},inputField:{background:"#FFFFFF",padding:12,borderRadius:5,marginLeft:10,boxShadow:"0px 3px 6px #00000012"},fieldContainer:{background:"#FFFFFF",padding:0,borderRadius:5,marginLeft:10,textAlign:"left",minWidth:"206",boxShadow:"0px 3px 6px #00000012"},lastElementWPadding:{paddingRight:"78"}},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.match,n=e.classes,a=X()(t,"url","");return Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsx)(na,{label:"Object Browser"}),Object(Se.jsx)(y.a,{container:!0,children:Object(Se.jsx)(y.a,{item:!0,xs:12,className:n.container,children:"/object-browser"===a&&Object(Se.jsx)(Pd,{})})})]})})),Kd=n(349),Ud=n.n(Kd),Wd={setErrorSnackMessage:H},Gd=Object(o.b)(null,Wd)((function(e){var t=e.closeDeleteModalAndRefresh,n=e.deleteOpen,c=e.selectedBucket,i=e.selectedObject,r=e.setErrorSnackMessage,o=Object(a.useState)(!1),s=Object(h.a)(o,2),l=s[0],d=s[1];return Object(Se.jsxs)(wn.a,{open:n,onClose:function(){t(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(Se.jsx)(Nn.a,{id:"alert-dialog-title",children:"Delete"}),Object(Se.jsxs)(Tn.a,{children:[l&&Object(Se.jsx)(C.a,{}),Object(Se.jsxs)($n.a,{id:"alert-dialog-description",children:["Are you sure you want to delete: ",Object(Se.jsx)("b",{children:i}),"?"," "]})]}),Object(Se.jsxs)(Xn.a,{children:[Object(Se.jsx)(x.a,{onClick:function(){t(!1)},color:"primary",disabled:l,children:"Cancel"}),Object(Se.jsx)(x.a,{onClick:function(){!function(){if(!l){var e=!1;i.endsWith("/")&&(e=!0),d(!0),ye.invoke("DELETE","/api/v1/buckets/".concat(c,"/objects?path=").concat(i,"&recursive=").concat(e)).then((function(){d(!1),t(!0)})).catch((function(e){d(!1),r(e)}))}}()},color:"secondary",disabled:l,children:"Delete"})]})]})})),qd=n(671),Vd=n(630),Hd={createFolder:function(e){return{type:Sd,newRoute:e}}},Yd=Object(o.b)(null,Hd)(Object(E.a)((function(e){return Object(N.a)(Object(m.a)({buttonContainer:{textAlign:"right"},pathLabel:{marginTop:0,marginBottom:32}},De))}))((function(e){var t=e.modalOpen,n=e.folderName,i=e.onClose,r=e.createFolder,o=e.classes,s=Object(a.useState)(""),l=Object(h.a)(s,2),d=l[0],u=l[1],b=n.split("/").slice(2).join("/");return Object(Se.jsx)(c.a.Fragment,{children:Object(Se.jsx)(_n,{modalOpen:t,title:"Add Folder",onClose:i,children:Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsxs)("h3",{className:o.pathLabel,children:["Current Path: ",b,"/"]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{value:d,label:"Folder Path",id:"folderPath",name:"folderPath",placeholder:"Enter Folder Path",onChange:function(e){u(e.target.value)}})}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:o.buttonContainer,children:[Object(Se.jsx)("button",{type:"button",color:"primary",className:o.clearButton,onClick:function(){u("")},children:"Clear"}),Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:""===d.trim(),onClick:function(){r(d),i()},children:"Save"})]})]})})})}))),Qd=function(){return Object(Se.jsx)(pt.a,{children:Object(Se.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 13 12.996",children:Object(Se.jsxs)("g",{transform:"translate(-63.686 -70.783)",children:[Object(Se.jsx)("path",{className:"a",d:"M74.736,79.879v1.95h-9.1v-1.95h-1.95v3.9h13v-3.9Z"}),Object(Se.jsx)("path",{className:"a",d:"M69.211,80.533h1.95V73.861h1.525l-2.5-3.078-2.5,3.078h1.525Z"})]})})})},Zd=n(348),Jd=function(e,t,n,a,c){var i=document.createElement("a");document.body.appendChild(i);var r="/api/v1/buckets/".concat(e,"/objects/download?prefix=").concat(t);Object(Zd.isNullOrUndefined)(n)||"null"===n||(r=r.concat("&version_id=".concat(n))),window.location.href=r},$d={resetRewind:Dd,setRewindEnable:function(e,t,n){return{type:Nd,state:e,bucket:t,dateRewind:n}}},Xd=Object(o.b)((function(e){var t=e.objectBrowser;return{bucketToRewind:t.rewind.bucketToRewind,rewindEnabled:t.rewind.rewindEnabled,dateRewind:t.rewind.dateToRewind}}),$d),eu=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({buttonContainer:{textAlign:"right"}},De))}))(Xd((function(e){var t=e.closeModalAndRefresh,n=e.classes,c=e.open,i=e.bucketName,r=(e.bucketToRewind,e.rewindEnabled),o=e.dateRewind,s=e.resetRewind,l=e.setRewindEnable,d=Object(a.useState)(!1),u=Object(h.a)(d,2),b=u[0],j=u[1],m=Object(a.useState)(!0),p=Object(h.a)(m,2),O=p[0],f=p[1],g=Object(a.useState)(null),v=Object(h.a)(g,2),S=v[0],k=v[1];Object(a.useEffect)((function(){r&&(f(!0),k(new Date(o)))}),[r,o]);return Object(Se.jsxs)(_n,{modalOpen:c,onClose:function(){t(!1)},title:"Rewind - ".concat(i),children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(_i,{value:S,onChange:k,id:"rewind-selector",label:"Rewind to",disabled:!O})}),Object(Se.jsxs)(y.a,{container:!0,children:[r&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Zn,{value:"status",id:"status",name:"status",checked:O,onChange:function(e){f(!1)},label:"Current Status",indicatorLabels:["Enabled","Disabled"]})}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:n.buttonContainer,children:Object(Se.jsx)(x.a,{type:"button",variant:"contained",color:"primary",disabled:b||!S&&O,onClick:function(){!O&&r?s():(j(!0),l(!0,i,S)),t(!0)},children:!O&&r?"Show Current Data":"Show Rewind Data"})}),b&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(C.a,{})})]})]})}))),tu={backgroundRepeat:"no-repeat",backgroundPosition:"center center",width:16,minWidth:16,height:40,marginRight:10};var nu=Object(Se.jsx)(S.a,{component:"h3",children:"Loading..."}),au={addRoute:Ed,setAllRoutes:_d,setLastAsFile:function(){return{type:Cd}},setLoadingProgress:function(e){return{type:F,loadingProgress:e}},setSnackBarMessage:V,setErrorSnackMessage:H,fileIsBeingPrepared:Id,fileDownloadStarted:Ld,resetRewind:Dd},cu=Object(o.b)((function(e){var t=e.objectBrowser;return{routesList:X()(t,"routesList",[]),downloadingFiles:X()(t,"downloadingFiles",[]),rewindEnabled:X()(t,"rewind.rewindEnabled",!1),rewindDate:X()(t,"rewind.dateToRewind",null),bucketToRewind:X()(t,"rewind.bucketToRewind","")}}),au),iu=Object(s.h)(cu(Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)(Object(m.a)({seeMore:{marginTop:e.spacing(3)},paper:{display:"flex",overflow:"auto",flexDirection:"column"},addSideBar:{width:"320px",padding:"20px"},tableToolbar:{paddingLeft:e.spacing(2),paddingRight:e.spacing(0)},minTableHeader:{color:"#393939","& tr":{"& th":{fontWeight:"bold"}}},fileName:{display:"flex",alignItems:"center"},fileNameText:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},iconFolder:Object(m.a)({backgroundImage:"url(/images/ob_folder_clear.svg)"},tu),iconFile:Object(m.a)({backgroundImage:"url(/images/ob_file_clear.svg)"},tu),buttonsContainer:{"& .MuiButtonBase-root":{marginLeft:10}},browsePaper:{height:"calc(100vh - 280px)"},"@global":{".rowLine:hover .iconFileElm":{backgroundImage:"url(/images/ob_file_filled.svg)"},".rowLine:hover .iconFolderElm":{backgroundImage:"url(/images/ob_folder_filled.svg)"}},listButton:{marginLeft:"10px"},badgeOverlap:{"& .MuiBadge-badge":{top:35,right:10}}},ze),Ke),We),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,n=e.match,i=e.addRoute,r=e.setAllRoutes,o=e.routesList,s=e.downloadingFiles,l=e.rewindEnabled,d=e.rewindDate,u=e.bucketToRewind,b=e.setLastAsFile,j=e.setLoadingProgress,m=e.setSnackBarMessage,p=e.setErrorSnackMessage,O=(e.fileIsBeingPrepared,e.fileDownloadStarted,e.resetRewind),f=Object(a.useState)([]),g=Object(h.a)(f,2),C=g[0],k=g[1],w=Object(a.useState)(!0),N=Object(h.a)(w,2),T=N[0],E=N[1],A=Object(a.useState)([]),_=Object(h.a)(A,2),I=_[0],L=_[1],D=Object(a.useState)(!0),F=Object(h.a)(D,2),M=F[0],R=F[1],B=Object(a.useState)(!1),P=Object(h.a)(B,2),z=P[0],K=P[1],U=Object(a.useState)(!1),W=Object(h.a)(U,2),G=W[0],q=W[1],V=Object(a.useState)(""),H=Object(h.a)(V,2),Y=H[0],Q=H[1],Z=Object(a.useState)(""),J=Object(h.a)(Z,2),$=J[0],ee=J[1],te=Object(a.useState)(""),ne=Object(h.a)(te,2),ae=ne[0],ce=ne[1],ie=Object(a.useState)(0),re=Object(h.a)(ie,2),se=re[0],le=re[1],de=Object(a.useState)(nu),ue=Object(h.a)(de,2),be=ue[0],je=ue[1],he=Object(a.useState)(!0),me=Object(h.a)(he,2),pe=me[0],Oe=me[1],fe=Object(a.useState)(!1),ge=Object(h.a)(fe,2),xe=ge[0],ve=ge[1],Ce=Object(a.useState)(!1),ke=Object(h.a)(Ce,2),we=ke[0],Ne=ke[1],Te=n.params.bucket;!function(e,t){var n=Object(a.useRef)(null);Object(a.useEffect)((function(){n.current=e}),[e]),Object(a.useEffect)((function(){if(null!==t){var e=setInterval((function(){void 0!==n&&n.current&&n.current()}),t);return function(){return clearInterval(e)}}}),[t])}((function(){T&&function(){var e=Date.now()-se;e/1e3>=6?je(Object(Se.jsx)(c.a.Fragment,{children:Object(Se.jsxs)(S.a,{component:"h3",children:["This operation is taking longer than expected... (",Math.ceil(e/1e3),"s)"]})})):e/1e3>=3&&je(Object(Se.jsx)(S.a,{component:"h3",children:"This operation is taking longer than expected..."}))}()}),1e3),Object(a.useEffect)((function(){pe&&ye.invoke("GET","/api/v1/buckets/".concat(Te,"/versioning")).then((function(e){ve(e.is_versioned),Oe(!1)})).catch((function(e){p(e),Oe(!1)}))}),[Te,pe,p]),Object(a.useEffect)((function(){var e=n.params[0];if(l){if(u!==Te)return void O();if(d){R(!0);var t=d.toISOString();ye.invoke("GET","/api/v1/buckets/".concat(Te,"/rewind/").concat(t,"?prefix=").concat(e?"".concat(e,"/"):"")).then((function(e){R(!1),e.objects?L(e.objects):L([])})).catch((function(e){R(!1),p(e)}))}}}),[l,d,u,Te,n,p,O]),Object(a.useEffect)((function(){var e=n.params[0];if(T){var t="";e&&(t="?prefix=".concat(e,"/"));var a=Date.now()+0;le(a),je(nu),ye.invoke("GET","/api/v1/buckets/".concat(Te,"/objects").concat(t)).then((function(n){ee(Te);var a=n.objects||[],c=[],i=[];a.forEach((function(e){e.name.endsWith("/")?c.push(e):i.push(e)}));var r=[].concat(c,i);k(r),n.objects||""===t?E(!1):function(){if(l){var t=d.toISOString();ye.invoke("GET","/api/v1/buckets/".concat(Te,"/rewind/").concat(t,"?prefix=").concat(e?"".concat(e,"/"):"")).then((function(e){null===e.objects?b():(R(!1),E(!1))})).catch((function(e){R(!1),E(!1),p(e)}))}else ye.invoke("GET","/api/v1/buckets/".concat(Te,"/objects?prefix=").concat(e)).then((function(e){null!==e.objects?b():E(!1)})).catch((function(e){E(!1),p(e)}))}()})).catch((function(e){E(!1),p(e)}))}}),[T,n,b,p,Te,l,d]),Object(a.useEffect)((function(){var e=X()(n,"url","/object-browser");e!==o[o.length-1].route&&r(e)}),[n,o,r]),Object(a.useEffect)((function(){E(!0)}),[o,E]);var Ee=function(e){return e.name.endsWith("/")?"":Object(Se.jsx)(mt.a,{children:e.last_modified})},Ae=function(e){return e.name.endsWith("/")?"":oe(String(e.size))},_e=function(e){var t=o[o.length-1].route.split("/").filter((function(e){return""!==e.trim()})),n="";t.length>2&&(n="".concat(t.slice(2).join("/"),"/")),function(e,t,n){if(null!==e&&void 0!==e&&null!==e.target&&void 0!==e.target){e.preventDefault();var a=e.target.files,c="/api/v1/buckets/".concat(t,"/objects/upload");""!==n&&(c="".concat(c,"?prefix=").concat(n));var i=new XMLHttpRequest,r=a.length>1,o="An error occurred while uploading the file".concat(r?"s":"","."),s="Object".concat(r?"s":""," uploaded successfully.");i.open("POST",c,!0),i.withCredentials=!1,i.onload=function(e){401!==i.status&&403!==i.status&&400!==i.status&&500!==i.status||m(o),200===i.status&&m(s)},i.upload.addEventListener("error",(function(e){m(o)})),i.upload.addEventListener("progress",(function(e){j(Math.floor(100*e.loaded/e.total))})),i.onerror=function(){m(o)},i.onloadend=function(){E(!0),j(100)};var l,d=new FormData,u=Object(ni.a)(a);try{for(u.s();!(l=u.n()).done;){var b=l.value,h=b.name,p=new Blob([b]);d.append(h,p)}}catch(O){u.e(O)}finally{u.f()}i.send(d),e.target.value=null}}(e,$,n)},Ie=[{type:"view",onClick:function(e){var t=X()(n,"url","/object-browser");if(e.endsWith("/")){var a=e.substr(0,e.length-1).split("/"),c=a.length-1,r="".concat(t,"/").concat(a[c]);i(r,a[c],"path")}else{var o=e.split("/"),s=o[o.length-1],l="".concat(t,"/").concat(s);i(l,s,"file")}},sendOnlyId:!0},{type:"download",onClick:function(e){e.size>104857600&&m("Download process started, it may take a few moments to complete"),Jd($,e.name,e.version_id)},showLoaderFunction:function(e){return s.includes("".concat(n.params.bucket,"/").concat(e))},disableButtonFunction:function(e){if(l){var t=I.find((function(t){return t.name===e}));if(t&&t.delete_flag)return!0}return!1},sendOnlyId:!1},{type:"delete",onClick:function(e){K(!0),Q(e)},sendOnlyId:!0,disableButtonFunction:function(){return l}}],Le=function(e){var n=e,a="".concat(t.iconFile," iconFileElm");e.endsWith("/")&&(a="".concat(t.iconFolder," iconFolderElm"),n=e.substr(0,e.length-1));var c=n.split("/");return Object(Se.jsxs)("div",{className:t.fileName,children:[Object(Se.jsx)("div",{className:a}),Object(Se.jsx)("span",{className:t.fileNameText,children:c[c.length-1]})]})},De=C.filter((function(e){return""===ae||e.name.indexOf(ae)>=0})),Fe=[{label:"Name",elementKey:"name",renderFunction:Le},{label:"Last Modified",elementKey:"last_modified",renderFunction:Ee,renderFullObject:!0},{label:"Size",elementKey:"size",renderFunction:Ae,renderFullObject:!0,width:60,contentTextAlign:"right"}],Me=[{label:"Name",elementKey:"name",renderFunction:Le},{label:"Object Date",elementKey:"last_modified",renderFunction:Ee,renderFullObject:!0},{label:"Size",elementKey:"size",renderFunction:Ae,renderFullObject:!0,width:60,contentTextAlign:"right"},{label:"Deleted",elementKey:"delete_flag",renderFunction:function(e){return e?"Yes":"No"},width:60,contentTextAlign:"center"}];return Object(Se.jsxs)(c.a.Fragment,{children:[z&&Object(Se.jsx)(Gd,{deleteOpen:z,selectedBucket:$,selectedObject:Y,closeDeleteModalAndRefresh:function(e){K(!1),e&&(m("Object '".concat(Y,"' deleted successfully.")),E(!0))}}),G&&Object(Se.jsx)(Yd,{modalOpen:G,folderName:o[o.length-1].route,onClose:function(){q(!1)}}),we&&Object(Se.jsx)(eu,{open:we,closeModalAndRefresh:function(e){Ne(!1)},bucketName:Te}),Object(Se.jsx)(na,{label:"Object Browser"}),Object(Se.jsx)(y.a,{container:!0,children:Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.container,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.obTitleSection,children:Object(Se.jsx)("div",{children:Object(Se.jsx)(Md,{})})}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(Se.jsx)(v.a,{placeholder:"Search Objects",className:t.searchField,id:"search-resource",label:"",onChange:function(e){ce(e.target.value)},InputProps:{disableUnderline:!0,startAdornment:Object(Se.jsx)(lt.a,{position:"start",children:Object(Se.jsx)(ut.a,{})})}}),Object(Se.jsx)(Vt.a,{color:"primary","aria-label":"Refresh List",component:"span",onClick:function(){E(!0)},disabled:l,children:Object(Se.jsx)(rc.a,{})}),Object(Se.jsx)(qd.a,{badgeContent:" ",color:"secondary",variant:"dot",invisible:!l,className:t.badgeOverlap,children:Object(Se.jsx)(Vt.a,{color:"primary","aria-label":"Rewind",component:"span",onClick:function(){Ne(!0)},disabled:!xe,children:Object(Se.jsx)(Ud.a,{})})}),Object(Se.jsx)(x.a,{variant:"contained",color:"primary",startIcon:Object(Se.jsx)(ft,{}),component:"label",onClick:function(){q(!0)},className:t.listButton,disabled:l,children:"Create Folder"}),Object(Se.jsxs)(x.a,{variant:"contained",color:"primary",startIcon:Object(Se.jsx)(Qd,{}),component:"label",className:t.listButton,disabled:l,children:["File",Object(Se.jsx)(Vd.a,{type:"file",inputProps:{multiple:!0},onChange:function(e){return _e(e)},id:"file-input",style:{display:"none"}})]})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(kn,{itemActions:Ie,columns:l?Me:Fe,isLoading:l?M:T,loadingMessage:be,entityName:"Rewind Objects",idField:"name",records:l?I:De,customPaperHeight:t.browsePaper})})]})})]})})))),ru=n(351),ou=n.n(ru),su=n(350),lu=n.n(su),du=Object(o.b)((function(e){var t=e.system;return{distributedSetup:X()(t,"distributedSetup",!1)}}),{setModalSnackMessage:Y,setModalErrorSnackMessage:Q}),uu=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({copyButtonContainer:{paddingLeft:16},modalContent:{paddingBottom:53}},De))}))(du((function(e){var t=e.classes,n=e.open,i=e.closeModalAndRefresh,r=e.bucketName,o=e.dataObject,s=e.distributedSetup,l=e.setModalSnackMessage,d=e.setModalErrorSnackMessage,u=Object(a.useState)(""),b=Object(h.a)(u,2),j=b[0],m=b[1],p=Object(a.useState)(!1),O=Object(h.a)(p,2),f=O[0],g=O[1],v=Object(a.useState)(""),S=Object(h.a)(v,2),C=S[0],k=S[1],w=Object(a.useState)(!0),N=Object(h.a)(w,2),T=N[0],E=N[1];return Object(a.useEffect)((function(){if(T){g(!0),m("");var e=new Date("".concat(C,"T23:59:59")),t=new Date,n=e.getTime()-t.getTime(),a=s?o.version_id:"null";return n<0?(d("Selected date must be greater than current time."),m(""),void g(!1)):n>6048e5?(d("You can share a file only for less than 7 days."),m(""),void g(!1)):void ye.invoke("GET","/api/v1/buckets/".concat(r,"/objects/share?prefix=").concat(o.name,"&version_id=").concat(a).concat(""!==C?"&expires=".concat(n,"ms"):"")).then((function(e){m(e),g(!1)})).catch((function(e){d(e),m(""),g(!1)}))}}),[o,C,r,T,m,d,s]),Object(Se.jsx)(c.a.Fragment,{children:Object(Se.jsx)(_n,{title:"Share File",modalOpen:n,onClose:function(){i()},children:Object(Se.jsxs)(y.a,{container:!0,className:t.modalContent,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.dateContainer,children:Object(Se.jsx)(fc,{id:"date",label:"Active until",borderBottom:!1,addSwitch:!0,onDateChange:function(e,t){E(t),k(t?e:"")}})}),Object(Se.jsxs)(y.a,{container:!0,item:!0,xs:12,children:[Object(Se.jsx)(y.a,{item:!0,xs:10,children:Object(Se.jsx)(oa,{content:j})}),Object(Se.jsx)(y.a,{item:!0,xs:2,className:t.copyButtonContainer,children:Object(Se.jsx)(lu.a,{text:j,children:Object(Se.jsx)(x.a,{variant:"contained",color:"primary",startIcon:Object(Se.jsx)(Ot,{}),onClick:function(){l("Share URL Copied to clipboard")},disabled:""===j||f,children:"Copy"})})})]})]})})})}))),bu=function(){return Object(Se.jsx)(pt.a,{children:Object(Se.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 13 13",children:[Object(Se.jsx)("path",{d:"M11.05 8.617v2.429h-9.1v-9.1h2.429v-1.95H0v13h13V8.617z",className:"a"}),Object(Se.jsx)("path",{d:"M3.854 9.256h1.95a4.945 4.945 0 013.6-4.74v1.3l.6-.487 2.474-2.012L9.4.817v1.7a6.9 6.9 0 00-5.546 6.739z",className:"a"})]})})},ju=function(){return Object(Se.jsx)(pt.a,{children:Object(Se.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 13 12.996",children:[Object(Se.jsx)("path",{d:"M11.05 9.096v1.95h-9.1v-1.95H0v3.9h13v-3.9z"}),Object(Se.jsx)("path",{d:"M6.5 9.75L9 6.672H7.475V0h-1.95v6.672H4z"})]})})},hu={setModalErrorSnackMessage:Q},mu=Object(o.b)(null,hu),pu=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({objectName:{fontSize:18,fontWeight:700,marginBottom:40},buttonContainer:{textAlign:"right"}},De))}))(mu((function(e){var t=e.classes,n=e.open,c=e.closeModalAndRefresh,i=e.objectName,r=e.objectInfo,o=e.bucketName,s=e.setModalErrorSnackMessage,l=Object(a.useState)(!0),d=Object(h.a)(l,2),u=d[0],b=d[1],j=Object(a.useState)(""),m=Object(h.a)(j,2),p=m[0],O=m[1],f=Object(a.useState)(""),g=Object(h.a)(f,2),v=g[0],S=g[1],C=Object(a.useState)(!1),k=Object(h.a)(C,2),w=k[0],N=k[1],T=Object(a.useState)(!1),E=Object(h.a)(T,2),A=E[0],_=E[1],I=Object(a.useState)(!1),L=Object(h.a)(I,2),D=L[0],F=L[1];Object(a.useEffect)((function(){if(r.retention_mode&&(O(r.retention_mode.toLowerCase()),F(!0)),r.retention_until_date){var e=new Date(r.retention_until_date);if("Invalid Date"!==e.toString()){var t=e.getFullYear(),n=(c=e.getMonth()+1)<10?"0".concat(c):"".concat(c),a=e.getDate();isNaN(a)||"NaN"===n||isNaN(t)||S("".concat(t,"-").concat(n,"-").concat(a))}F(!0)}var c}),[r]);var M=Object(a.useRef)(null),R=function(){b(!1),O(""),M.current&&M.current.resetDate()},B=D&&("governance"===p||""===p);return Object(Se.jsxs)(_n,{title:"Set Retention Policy",modalOpen:n,onClose:function(){R(),c(!1)},children:[Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.objectName,children:i}),Object(Se.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){e.preventDefault()}(e)},children:[B&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Zn,{value:"status",id:"status",name:"status",checked:u,onChange:function(e){b(!u)},label:"Status",indicatorLabels:["Enabled","Disabled"]})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Vn,{currentSelection:p,id:"type",name:"type",label:"Type",disableOptions:!u||D&&""!==p,onChange:function(e){O(e.target.value)},selectorOptions:[{label:"Governance",value:"governance"},{label:"Compliance",value:"compliance"}]})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(fc,{id:"date",label:"Date",disableOptions:!(u&&("governance"===p||"compliance"===p)),ref:M,value:v,borderBottom:!0,onDateChange:function(e,t){N(t),t&&S(e)}})}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.buttonContainer,children:[Object(Se.jsx)("button",{type:"button",color:"primary",className:t.clearButton,onClick:R,children:"Reset"}),Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:u&&""===p||u&&!w||A,onClick:function(){_(!0);var e=r.name,t=r.version_id,n=u||"governance"!==p?"".concat(v,"T23:59:59Z"):"";u||"governance"!==p?function(e,t,n){ye.invoke("PUT","/api/v1/buckets/".concat(o,"/objects/retention?prefix=").concat(e,"&version_id=").concat(t),{expires:n,mode:p}).then((function(e){_(!1),c(!0)})).catch((function(e){s(e),_(!1)}))}(e,t,n):function(e,t){ye.invoke("DELETE","/api/v1/buckets/".concat(o,"/objects/retention?prefix=").concat(e,"&version_id=").concat(t)).then((function(){_(!1),c(!0)})).catch((function(e){s(e),_(!1)}))}(e,t)},children:"Save"})]})]})]})}))),Ou={setModalErrorSnackMessage:Q},fu=Object(o.b)((function(e){var t=e.system;return{distributedSetup:X()(t,"distributedSetup",!1)}}),Ou),gu=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({buttonContainer:{textAlign:"right"},pathLabel:{marginTop:0,marginBottom:32}},De))}))(fu((function(e){var t=e.modalOpen,n=e.currentTags,i=e.selectedObject,r=e.onCloseAndUpdate,o=e.bucketName,s=e.versionId,l=e.distributedSetup,d=e.setModalErrorSnackMessage,u=e.classes,b=Object(a.useState)(""),j=Object(h.a)(b,2),p=j[0],O=j[1],f=Object(a.useState)(""),g=Object(h.a)(f,2),v=g[0],S=g[1],C=Object(a.useState)(!1),k=Object(h.a)(C,2),w=k[0],N=k[1];return Object(Se.jsx)(c.a.Fragment,{children:Object(Se.jsx)(_n,{modalOpen:t,title:"Add New Tag",onClose:function(){r(!1)},children:Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsxs)("h3",{className:u.pathLabel,children:["Selected Object: ",i]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{value:p,label:"New Tag Key",id:"newTagKey",name:"newTagKey",placeholder:"Enter New Tag Key",onChange:function(e){O(e.target.value)}})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{value:v,label:"New Tag Label",id:"newTagLabel",name:"newTagLabel",placeholder:"Enter New Tag Label",onChange:function(e){S(e.target.value)}})}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:u.buttonContainer,children:[Object(Se.jsx)("button",{type:"button",color:"primary",className:u.clearButton,onClick:function(){S(""),O("")},children:"Clear"}),Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:""===v.trim()||""===p.trim()||w,onClick:function(){N(!0);var e={};e[p]=v;var t=Object(m.a)(Object(m.a)({},n),e),a=l?s:"null";ye.invoke("PUT","/api/v1/buckets/".concat(o,"/objects/tags?prefix=").concat(i,"&version_id=").concat(a),{tags:t}).then((function(e){N(!1),r(!0)})).catch((function(e){d(e),N(!1)}))},children:"Save"})]})]})})})}))),xu={setErrorSnackMessage:H},vu=Object(o.b)((function(e){var t=e.system;return{distributedSetup:X()(t,"distributedSetup",!1)}}),xu),yu=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({buttonContainer:{textAlign:"right"},pathLabel:{marginTop:0,marginBottom:32}},De))}))(vu((function(e){var t=e.deleteOpen,n=e.currentTags,c=e.selectedObject,i=e.selectedTag,r=e.onCloseAndUpdate,o=e.bucketName,s=e.versionId,l=e.distributedSetup,d=e.setErrorSnackMessage,u=e.classes,b=Object(a.useState)(!1),j=Object(h.a)(b,2),p=j[0],O=j[1],f=Object(h.a)(i,2),g=f[0],v=f[1];return Object(Se.jsxs)(wn.a,{open:t,onClose:function(){r(!1)},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(Se.jsx)(Nn.a,{id:"alert-dialog-title",children:"Delete Tag"}),Object(Se.jsxs)(Tn.a,{children:[p&&Object(Se.jsx)(C.a,{}),Object(Se.jsxs)($n.a,{id:"alert-dialog-description",children:["Are you sure you want to delete the tag"," ",Object(Se.jsxs)("b",{className:u.wrapText,children:[g," : ",v]})," ","from ",c,"?"]})]}),Object(Se.jsxs)(Xn.a,{children:[Object(Se.jsx)(x.a,{onClick:function(){r(!1)},color:"primary",disabled:p,children:"Cancel"}),Object(Se.jsx)(x.a,{onClick:function(){O(!0);var e=Object(m.a)({},n);delete e[g];var t=l?s:"null";ye.invoke("PUT","/api/v1/buckets/".concat(o,"/objects/tags?prefix=").concat(c,"&version_id=").concat(t),{tags:e}).then((function(e){O(!1),r(!0)})).catch((function(e){d(e),O(!1)}))},color:"secondary",autoFocus:!0,children:"Delete"})]})]})}))),Su={setModalErrorSnackMessage:Q},Cu=Object(o.b)(null,Su),ku=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({objectName:{fontSize:18,fontWeight:700,marginBottom:40},buttonContainer:{textAlign:"right"}},De))}))(Cu((function(e){var t=e.classes,n=e.open,c=e.closeModalAndRefresh,i=e.objectName,r=e.bucketName,o=e.actualInfo,s=e.setModalErrorSnackMessage,l=Object(a.useState)(!1),d=Object(h.a)(l,2),u=d[0],b=d[1],j=Object(a.useState)(!1),m=Object(h.a)(j,2),p=m[0],O=m[1],f=o.version_id;Object(a.useEffect)((function(){var e=X()(o,"legal_hold_status","OFF");b("ON"===e)}),[o]);var g=function(){b(!1)};return Object(Se.jsxs)(_n,{title:"Set Legal Hold",modalOpen:n,onClose:function(){g(),c(!1)},children:[Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.objectName,children:i}),Object(Se.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:function(e){!function(e){e.preventDefault(),O(!0),ye.invoke("PUT","/api/v1/buckets/".concat(r,"/objects/legalhold?prefix=").concat(i,"&version_id=").concat(f),{status:u?"enabled":"disabled"}).then((function(){O(!1),c(!0)})).catch((function(e){s(e),O(!1)}))}(e)},children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Zn,{value:"legalhold",id:"legalhold",name:"legalhold",checked:u,onChange:function(e){b(!u)},label:"Legal Hold Status",indicatorLabels:["Enabled","Disabled"],tooltip:"To enable this feature you need to enable versioning on the bucket before creation"})}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.buttonContainer,children:[Object(Se.jsx)("button",{type:"button",color:"primary",className:t.clearButton,onClick:g,children:"Reset"}),Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:p,children:"Save"})]})]})]})}))),wu={is_latest:!0,last_modified:"",legal_hold_status:"",name:"",retention_mode:"",retention_until_date:"",size:"0",tags:{},version_id:null},Nu={removeRouteLevel:Ad,setErrorSnackMessage:H,fileIsBeingPrepared:Id,fileDownloadStarted:Ld,setSnackBarMessage:V},Tu=Object(o.b)((function(e){var t=e.objectBrowser,n=e.system;return{downloadingFiles:X()(t,"downloadingFiles",[]),rewindEnabled:X()(t,"rewind.rewindEnabled",!1),rewindDate:X()(t,"rewind.dateToRewind",null),bucketToRewind:X()(t,"rewind.bucketToRewind",""),distributedSetup:X()(n,"distributedSetup",!1)}}),Nu)(Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)({objectNameContainer:{marginBottom:8},objectPathContainer:{marginBottom:26,fontSize:10},objectPathLink:{"&:visited":{color:"#000"}},objectName:{fontSize:24},propertiesContainer:{display:"flex",flexDirection:"row",marginBottom:15},propertiesItem:{display:"flex",flexDirection:"row",marginRight:21},propertiesItemBold:{fontWeight:700},propertiesValue:{marginLeft:8,textTransform:"capitalize"},propertiesIcon:{marginLeft:5},actionsIconContainer:{marginLeft:12},actionsIcon:{height:16,width:16,"& .MuiSvgIcon-root":{height:16}},tagsContainer:{display:"flex",flexDirection:"row",alignItems:"center",marginBottom:15},tagText:{marginRight:13},tag:{marginRight:6,fontSize:10,fontWeight:700,"&.MuiChip-sizeSmall":{height:18},"& .MuiSvgIcon-root":{height:10,width:10}},search:{marginBottom:8,"&.MuiFormControl-root":{marginRight:0}},"@global":{".progressDetails":{paddingTop:3,display:"inline-block",position:"relative",width:18,height:18},".progressDetails > .MuiCircularProgress-root":{position:"absolute",left:0,top:3}}},ze),Ke),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,n=e.routesList,i=e.downloadingFiles,r=(e.rewindEnabled,e.rewindDate,e.distributedSetup),o=(e.bucketToRewind,e.removeRouteLevel),s=e.setErrorSnackMessage,l=e.setSnackBarMessage,d=(e.fileIsBeingPrepared,e.fileDownloadStarted,Object(a.useState)(!0)),u=Object(h.a)(d,2),b=u[0],m=u[1],p=Object(a.useState)(!1),O=Object(h.a)(p,2),f=O[0],g=O[1],x=Object(a.useState)(!1),S=Object(h.a)(x,2),C=S[0],w=S[1],N=Object(a.useState)(!1),T=Object(h.a)(N,2),E=T[0],A=T[1],_=Object(a.useState)(!1),I=Object(h.a)(_,2),L=I[0],D=I[1],F=Object(a.useState)(["",""]),M=Object(h.a)(F,2),R=M[0],B=M[1],P=Object(a.useState)(!1),z=Object(h.a)(P,2),K=z[0],U=z[1],W=Object(a.useState)(wu),G=Object(h.a)(W,2),q=G[0],V=G[1],H=Object(a.useState)([]),Y=Object(h.a)(H,2),Q=Y[0],Z=Y[1],J=Object(a.useState)(""),$=Object(h.a)(J,2),ee=$[0],te=$[1],ne=Object(a.useState)(!1),ae=Object(h.a)(ne,2),ce=ae[0],ie=ae[1],re=n[n.length-1].route.split("/"),oe=re[re.length-1],se=re[2],le=re.slice(3).join("/");Object(a.useEffect)((function(){b&&ye.invoke("GET","/api/v1/buckets/".concat(se,"/objects?prefix=").concat(le).concat(r?"&with_versions=true":"")).then((function(e){var t=X()(e,"objects",[]);r?(V(t.find((function(e){return e.is_latest}))||wu),Z(t)):(V(t[0]),Z([])),m(!1)})).catch((function(e){s(e),m(!1)}))}),[b,se,le,s,r]);var de=[];q.tags&&(de=Object.keys(q.tags));var ue=function(){g(!0)},be=function(e,t){e.size&&parseInt(e.size)>104857600&&l("Download process started, it may take a few moments to complete"),Jd(se,le,e.version_id)},je=[{type:"share",onClick:ue,sendOnlyId:!0,disableButtonFunction:function(e){var t=Q.find((function(t){return t.version_id===e}));return!(!t||!t.is_delete_marker)}},{type:"download",onClick:function(e){be(e)},disableButtonFunction:function(e){var t=Q.find((function(t){return t.version_id===e}));return!(!t||!t.is_delete_marker)}}],he=Q.filter((function(e){return!!e.version_id&&e.version_id.includes(ee)}));return Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsx)(na,{label:"Object Browser"}),f&&Object(Se.jsx)(uu,{open:f,closeModalAndRefresh:function(){g(!1)},bucketName:se,dataObject:q}),C&&Object(Se.jsx)(pu,{open:C,closeModalAndRefresh:function(e){w(!1),e&&m(!0)},objectName:oe,objectInfo:q,bucketName:se}),ce&&Object(Se.jsx)(Gd,{deleteOpen:ce,selectedBucket:se,selectedObject:le,closeDeleteModalAndRefresh:function(e){if(ie(!1),e){var t=re.slice(0,-1).join("/");o(t),j.push(t)}}}),E&&Object(Se.jsx)(gu,{modalOpen:E,currentTags:q.tags,selectedObject:le,versionId:q.version_id,bucketName:se,onCloseAndUpdate:function(e){A(!1),e&&m(!0)}}),L&&Object(Se.jsx)(yu,{deleteOpen:L,currentTags:q.tags,selectedObject:le,versionId:q.version_id,bucketName:se,onCloseAndUpdate:function(e){D(!1),e&&m(!0)},selectedTag:R}),K&&Object(Se.jsx)(ku,{open:K,closeModalAndRefresh:function(e){U(!1),e&&m(!0)},objectName:le,bucketName:se,actualInfo:q}),Object(Se.jsx)(y.a,{container:!0,children:Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.container,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.obTitleSection,children:Object(Se.jsx)("div",{children:Object(Se.jsx)(Md,{})})}),Object(Se.jsx)("br",{}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.propertiesContainer,children:[q.version_id&&"null"!==q.version_id&&Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsxs)("div",{className:t.propertiesItem,children:[Object(Se.jsxs)("div",{children:[Object(Se.jsx)("span",{className:t.propertiesItemBold,children:"Legal Hold:"}),Object(Se.jsx)("span",{className:t.propertiesValue,children:q.legal_hold_status?q.legal_hold_status.toLowerCase():"Off"})]}),Object(Se.jsx)("div",{children:Object(Se.jsx)(Vt.a,{color:"primary","aria-label":"legal-hold",size:"small",className:t.propertiesIcon,onClick:function(){U(!0)},children:Object(Se.jsx)(on,{active:!0})})})]}),Object(Se.jsxs)("div",{className:t.propertiesItem,children:[Object(Se.jsxs)("div",{children:[Object(Se.jsx)("span",{className:t.propertiesItemBold,children:"Retention:"}),Object(Se.jsx)("span",{className:t.propertiesValue,children:q.retention_mode?q.retention_mode.toLowerCase():"Undefined"})]}),Object(Se.jsx)("div",{children:Object(Se.jsx)(Vt.a,{color:"primary","aria-label":"retention",size:"small",className:t.propertiesIcon,onClick:function(){w(!0)},children:Object(Se.jsx)(on,{active:!0})})})]})]}),Object(Se.jsxs)("div",{className:t.propertiesItem,children:[Object(Se.jsx)("div",{className:t.propertiesItemBold,children:"File Actions:"}),Object(Se.jsx)("div",{className:t.actionsIconContainer,children:Object(Se.jsx)(Vt.a,{color:"primary","aria-label":"share",size:"small",className:t.actionsIcon,onClick:function(){ue()},disabled:q.is_delete_marker,children:Object(Se.jsx)(bu,{})})}),Object(Se.jsx)("div",{className:t.actionsIconContainer,children:i.includes("".concat(se,"/").concat(q.name))?Object(Se.jsx)("div",{className:"progressDetails",children:Object(Se.jsx)(k.a,{color:"primary",size:17,variant:"indeterminate"})}):Object(Se.jsx)(Vt.a,{color:"primary","aria-label":"download",size:"small",className:t.actionsIcon,onClick:function(){be(q)},disabled:q.is_delete_marker,children:Object(Se.jsx)(ju,{})})}),Object(Se.jsx)("div",{className:t.actionsIconContainer,children:Object(Se.jsx)(Vt.a,{color:"primary","aria-label":"delete",size:"small",className:t.actionsIcon,onClick:function(){ie(!0)},disabled:q.is_delete_marker,children:Object(Se.jsx)(gt,{})})})]})]}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.tagsContainer,children:[Object(Se.jsx)("div",{className:t.tagText,children:"Tags:"}),de&&de.map((function(e,n){var a=X()(q,"tags.".concat(e),"");return""!==a?Object(Se.jsx)(bd.a,{className:t.tag,size:"small",label:"".concat(e," : ").concat(a),color:"primary",deleteIcon:Object(Se.jsx)(ou.a,{}),onDelete:function(){!function(e,t){B([e,t]),D(!0)}(e,a)}},"chip-".concat(n)):null})),Object(Se.jsx)(bd.a,{className:t.tag,icon:Object(Se.jsx)(Is.a,{}),clickable:!0,size:"small",label:"Add tag",color:"primary",variant:"outlined",onClick:function(){A(!0)}})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.actionsTray,children:q.version_id&&"null"!==q.version_id&&Object(Se.jsx)(v.a,{placeholder:"Search ".concat(oe),className:Object(Te.a)(t.search,t.searchField),id:"search-resource",label:"",onChange:function(e){te(e.target.value)},InputProps:{disableUnderline:!0,startAdornment:Object(Se.jsx)(lt.a,{position:"start",children:Object(Se.jsx)(ut.a,{})})}})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:q.version_id&&"null"!==q.version_id&&Object(Se.jsx)(kn,{itemActions:je,columns:[{label:"",width:20,renderFullObject:!0,renderFunction:function(e){var t=Q.length-Q.indexOf(e);return"v".concat(t)}},{label:"Version ID",elementKey:"version_id"},{label:"Last Modified",elementKey:"last_modified",renderFunction:function(e){return Object(Se.jsx)(mt.a,{children:e})}},{label:"Deleted",width:60,contentTextAlign:"center",renderFullObject:!0,renderFunction:function(e){var t=e.is_delete_marker?"Yes":"No";return"".concat(t)}}],isLoading:!1,entityName:"Versions",idField:"version_id",records:he})})]})})]})}))),Eu={setAllRoutes:_d},Au=Object(o.b)((function(e){var t=e.objectBrowser;return{routesList:X()(t,"routesList",[])}}),Eu),_u=Object(s.h)(Au((function(e){var t=e.routesList,n=e.match,c=e.setAllRoutes,i=t[t.length-1];return Object(a.useEffect)((function(){var e=X()(n,"url","/object-browser");e!==t[t.length-1].route&&c(e)}),[n,t,c]),"path"===i.type?Object(Se.jsx)(iu,{}):Object(Se.jsx)(Tu,{routesList:t})}))),Iu=n(209),Lu=n.n(Iu),Du=[{id:0,title:"Community",price:"Open Source",capacityMin:""},{id:1,title:"Standard",price:"$10/TB/month",capacityMax:"Up to 10PB. No additional charges for capacity over 10PB",capacityMin:""},{id:2,title:"Enterprise",price:"$20/TB/month",capacityMax:"Up to 5PB. No additional charges for capacity over 5PB",capacityMin:""}],Fu=[{id:0,field:"License",community:"GNU AGPL v3",communityDetail:"",standard:"Commercial License",standardDetail:"",enterprise:"Commercial License",enterpriseDetail:""},{id:1,field:"Software Release",community:"Update to latest",standard:"1 Year Long Term Support",enterprise:"5 Years Long Term Support"},{id:2,field:"SLA",community:"No SLA",standard:"<24 hours",enterprise:"<1 hour"},{id:3,field:"Support",community:"Community:",communityDetail:"Public Slack Channel + Github Issues",standard:"24x7 L4 direct engineering",standardDetail:"Support via SUBNET",enterprise:"24x7 L4 direct engineering",enterpriseDetail:"Support via SUBNET"},{id:4,field:"Security Updates & Critical Bugs",community:"Self Update",standard:"Guided Update",enterprise:"Guided Update"},{id:5,field:"Panic Button",community:"N/A",standard:"1 per year",enterprise:"Unlimited"},{id:6,field:"Annual Architecture Review",community:"N/A",standard:"Yes",enterprise:"Yes"},{id:7,field:"Annual Performance Review",community:"N/A",standard:"Yes",enterprise:"Yes"},{id:8,field:"Indemnification",community:"N/A",standard:"N/A",enterprise:"Yes"},{id:9,field:"Security + Policy Review",community:"N/A",standard:"N/A",enterprise:"Yes"}],Mu=[{id:0,text:"Join Slack",text2:"",link:"https://slack.min.io",plan:"community"},{id:1,text:"Subscribe",text2:"Upgrade",link:"https://subnet.min.io/subscription",plan:"standard"},{id:2,text:"Subscribe",text2:"Upgrade",link:"https://subnet.min.io/subscription",plan:"enterprise"}],Ru=n(352),Bu=n.n(Ru),Pu=n(353),zu=n.n(Pu),Ku={setModalErrorSnackMessage:Q},Uu=Object(o.b)(null,Ku),Wu=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({errorBlock:{color:"red"},subnetLicenseKey:{padding:"10px 10px 10px 0px",borderRight:"1px solid rgba(0, 0, 0, 0.12)",opacity:.5,"&:hover":{opacity:1}},subnetLoginForm:{padding:"10px 0px 10px 10px",opacity:.5,"&:hover":{opacity:1}},licenseKeyField:{},pageTitle:{marginBottom:20},button:{textTransform:"none",fontSize:15,fontWeight:700,background:"transparent linear-gradient(90deg, #073052 0%, #081c42 100%) 0% 0% no-repeat padding-box",color:"#fff"},buttonSignup:{textTransform:"none",fontSize:15,fontWeight:700,marginLeft:15}},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(Uu((function(e){var t=e.classes,n=e.open,c=e.closeModal,i=e.setModalErrorSnackMessage,r=Object(a.useState)(""),o=Object(h.a)(r,2),s=o[0],l=o[1],d=Object(a.useState)(""),u=Object(h.a)(d,2),b=u[0],j=u[1],m=Object(a.useState)(""),p=Object(h.a)(m,2),O=p[0],f=p[1],g=Object(a.useState)(!1),k=Object(h.a)(g,2),w=k[0],N=k[1],T=function(){if(!w){N(!0);var e={license:s,email:O,password:b};ye.invoke("POST","/api/v1/subscription/validate",e).then((function(){N(!1),l(""),j(""),f(""),c()})).catch((function(e){N(!1),l(""),j(""),f(""),i(e)}))}};return n?Object(Se.jsxs)(_n,{title:"",modalOpen:n,onClose:function(){l(""),j(""),f(""),c()},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(Se.jsxs)(y.a,{container:!0,alignItems:"center",item:!0,xs:12,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(S.a,{component:"h2",variant:"h6",className:t.pageTitle,children:"Activate SUBNET License"})}),Object(Se.jsxs)(y.a,{item:!0,className:t.subnetLicenseKey,xs:6,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(S.a,{variant:"caption",display:"block",gutterBottom:!0,children:"Enter your license key here"})}),Object(Se.jsx)(v.a,{id:"license-key",placeholder:"",multiline:!0,rows:3,value:s,onChange:function(e){return l(e.target.value)},fullWidth:!0,className:t.licenseKeyField,variant:"outlined"}),Object(Se.jsx)("br",{}),Object(Se.jsx)("br",{}),Object(Se.jsx)(x.a,{variant:"contained",color:"primary",onClick:function(){return T()},disabled:w||0===s.trim().length,children:"Activate"})]}),Object(Se.jsx)(y.a,{item:!0,className:t.subnetLoginForm,xs:6,children:Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{overlayIcon:Object(Se.jsx)(Bu.a,{}),id:"subnet-email",name:"subnet-email",onChange:function(e){f(e.target.value)},placeholder:"email",label:"",type:"text",value:O})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{overlayIcon:Object(Se.jsx)(zu.a,{}),id:"subnet-password",name:"subnet-password",onChange:function(e){j(e.target.value)},placeholder:"password",label:"",type:"password",value:b})}),Object(Se.jsxs)(y.a,{item:!0,xs:12,children:[Object(Se.jsx)(x.a,{className:t.button,color:"primary",onClick:function(){return T()},disabled:w||0===O.trim().length||0===b.trim().length,variant:"contained",children:"Activate"}),Object(Se.jsx)(x.a,{className:t.buttonSignup,color:"primary",target:"_blank",rel:"noopener noreferrer",href:"#",onClick:function(e){e.preventDefault(),window.open("https://min.io/pricing","_blank")},variant:"outlined",children:"Sign Up"})]})]})})]}),w&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(C.a,{})})]}):null}))),Gu=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({pageTitle:{fontSize:18,marginBottom:20,textAlign:"center"},pageSubTitle:{textAlign:"center"},paper:{padding:"20px 52px 20px 28px"}},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,n=e.open,a=e.closeModal;return n?Object(Se.jsxs)(_n,{title:"",modalOpen:n,onClose:function(){a()},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[" ",Object(Se.jsxs)(y.a,{container:!0,alignItems:"center",item:!0,xs:12,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,children:[Object(Se.jsx)(S.a,{component:"h2",variant:"h6",className:t.pageTitle,children:"GNU AFFERO GENERAL PUBLIC LICENSE"}),Object(Se.jsx)("p",{className:t.pageSubTitle,children:"Version 3, 19 November 2007"})]}),Object(Se.jsxs)(y.a,{item:!0,className:t.subnetLicenseKey,xs:12,children:[Object(Se.jsxs)("p",{children:["Copyright \xa9 2007 Free Software Foundation, Inc. <",Object(Se.jsx)("a",{target:"_blank",href:"https://fsf.org/",rel:"noreferrer",children:"https://fsf.org/"}),">"]}),Object(Se.jsxs)("p",{children:[" ","Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed."]}),Object(Se.jsx)("h1",{children:"Preamble"}),Object(Se.jsx)("p",{children:"The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software."}),Object(Se.jsx)("p",{children:"The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users."}),Object(Se.jsx)("p",{children:"When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things."}),Object(Se.jsx)("p",{children:"Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software."}),Object(Se.jsx)("p",{children:"A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public."}),Object(Se.jsx)("p",{children:"The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version."}),Object(Se.jsx)("p",{children:"An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license."}),Object(Se.jsx)("p",{children:"The precise terms and conditions for copying, distribution and modification follow."}),Object(Se.jsx)("h2",{children:"TERMS AND CONDITIONS"}),Object(Se.jsx)("h2",{children:"0. Definitions."}),Object(Se.jsx)("p",{children:'"This License" refers to version 3 of the GNU Affero General Public License.'}),Object(Se.jsx)("p",{children:'"Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.'}),Object(Se.jsx)("p",{children:'"The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations.'}),Object(Se.jsx)("p",{children:'To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work.'}),Object(Se.jsx)("p",{children:'A "covered work" means either the unmodified Program or a work based on the Program.'}),Object(Se.jsx)("p",{children:'To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.'}),Object(Se.jsx)("p",{children:'To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.'}),Object(Se.jsx)("p",{children:'An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.'}),Object(Se.jsx)("h2",{children:"1. Source Code."}),Object(Se.jsx)("p",{children:'The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work.'}),Object(Se.jsx)("p",{children:'A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.'}),Object(Se.jsx)("p",{children:'The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.'}),Object(Se.jsx)("p",{children:'The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work\'s System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.'}),Object(Se.jsx)("p",{children:"The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source."}),Object(Se.jsx)("p",{children:"The Corresponding Source for a work in source code form is that same work."}),Object(Se.jsx)("h2",{children:"2. Basic Permissions."}),Object(Se.jsx)("p",{children:"All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law."}),Object(Se.jsx)("p",{children:"You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you."}),Object(Se.jsx)("p",{children:"Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary."}),Object(Se.jsx)("h2",{children:"3. Protecting Users' Legal Rights From Anti-Circumvention Law."}),Object(Se.jsx)("p",{children:"No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures."}),Object(Se.jsx)("p",{children:"When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures."}),Object(Se.jsx)("h2",{children:"4. Conveying Verbatim Copies."}),Object(Se.jsx)("p",{children:"You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program."}),Object(Se.jsx)("p",{children:"You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee."}),Object(Se.jsx)("h2",{children:"5. Conveying Modified Source Versions."}),Object(Se.jsx)("p",{children:"You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:"}),Object(Se.jsx)("p",{children:Object(Se.jsxs)("ul",{children:[Object(Se.jsx)("li",{children:"a) The work must carry prominent notices stating that you modified it, and giving a relevant date."}),Object(Se.jsx)("li",{children:'b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices".'}),Object(Se.jsx)("li",{children:"c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it."}),Object(Se.jsx)("li",{children:"d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so."})]})}),Object(Se.jsx)("p",{children:'A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation\'s users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.'}),Object(Se.jsx)("h2",{children:"6. Conveying Non-Source Forms."}),Object(Se.jsx)("p",{children:"You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:"}),Object(Se.jsx)("p",{children:Object(Se.jsxs)("ul",{children:[Object(Se.jsx)("li",{children:"a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange."}),Object(Se.jsx)("li",{children:"b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge."}),Object(Se.jsx)("li",{children:"c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b."}),Object(Se.jsx)("li",{children:"d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements."}),Object(Se.jsx)("li",{children:"e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d."})]})}),Object(Se.jsx)("p",{children:"A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work."}),Object(Se.jsx)("p",{children:'A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.'}),Object(Se.jsx)("p",{children:'"Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.'}),Object(Se.jsx)("p",{children:"If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM)."}),Object(Se.jsx)("p",{children:"The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network."}),Object(Se.jsx)("p",{children:"Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying."}),Object(Se.jsx)("h2",{children:"7. Additional Terms."}),Object(Se.jsx)("p",{children:'"Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.'}),Object(Se.jsx)("p",{children:"When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission."}),Object(Se.jsx)("p",{children:"Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:"}),Object(Se.jsx)("p",{children:Object(Se.jsxs)("ul",{children:[Object(Se.jsx)("li",{children:"a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or"}),Object(Se.jsx)("li",{children:"b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or"}),Object(Se.jsx)("li",{children:"c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or"}),Object(Se.jsx)("li",{children:"d) Limiting the use for publicity purposes of names of licensors or authors of the material; or"}),Object(Se.jsx)("li",{children:"e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or"}),Object(Se.jsx)("li",{children:"f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors."})]})}),Object(Se.jsx)("p",{children:'All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.'}),Object(Se.jsx)("p",{children:"If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms."}),Object(Se.jsx)("p",{children:"Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way."}),Object(Se.jsx)("h2",{children:"8. Termination."}),Object(Se.jsx)("p",{children:"You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11)."}),Object(Se.jsx)("p",{children:"However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation."}),Object(Se.jsx)("p",{children:"Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice."}),Object(Se.jsx)("p",{children:"Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10."}),Object(Se.jsx)("h2",{children:"9. Acceptance Not Required for Having Copies."}),Object(Se.jsx)("p",{children:"You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so."}),Object(Se.jsx)("h2",{children:"10. Automatic Licensing of Downstream Recipients."}),Object(Se.jsx)("p",{children:"Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License."}),Object(Se.jsx)("p",{children:'An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party\'s predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.'}),Object(Se.jsx)("p",{children:"You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it."}),Object(Se.jsx)("h2",{children:"11. Patents."}),Object(Se.jsx)("p",{children:'A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor\'s "contributor version".'}),Object(Se.jsx)("p",{children:'A contributor\'s "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.'}),Object(Se.jsx)("p",{children:"Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version."}),Object(Se.jsx)("p",{children:'In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.'}),Object(Se.jsx)("p",{children:'If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient\'s use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.'}),Object(Se.jsx)("p",{children:"If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it."}),Object(Se.jsx)("p",{children:'A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.'}),Object(Se.jsx)("p",{children:"Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law."}),Object(Se.jsx)("h2",{children:"12. No Surrender of Others' Freedom."}),Object(Se.jsx)("p",{children:"If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program."}),Object(Se.jsx)("h2",{children:"13. Remote Network Interaction; Use with the GNU General Public License."}),Object(Se.jsx)("p",{children:"Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph."}),Object(Se.jsx)("p",{children:"Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License."}),Object(Se.jsx)("h2",{children:"14. Revised Versions of this License."}),Object(Se.jsx)("p",{children:"The Free Software Foundation may publish revised and/or new versions of the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns."}),Object(Se.jsx)("p",{children:'Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation.'}),Object(Se.jsx)("p",{children:'Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation.'}),Object(Se.jsx)("p",{children:"Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version."}),Object(Se.jsx)("h2",{children:"15. Disclaimer of Warranty."}),Object(Se.jsx)("p",{children:'THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.'}),Object(Se.jsx)("h2",{children:"16. Limitation of Liability."}),Object(Se.jsx)("p",{children:"IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES."}),Object(Se.jsx)("h2",{children:"17. Interpretation of Sections 15 and 16."}),Object(Se.jsx)("p",{children:"If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee."}),Object(Se.jsx)("p",{children:"END OF TERMS AND CONDITIONS"}),Object(Se.jsx)("h2",{children:"How to Apply These Terms to Your New Programs"}),Object(Se.jsx)("p",{children:"If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms."}),Object(Se.jsx)("p",{children:'To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.'}),Object(Se.jsx)("p",{children:Object(Se.jsx)("code",{children:"<one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>."})}),Object(Se.jsx)("p",{children:"Also add information on how to contact you by electronic and paper mail."}),Object(Se.jsx)("p",{children:'If your software can interact with users remotely through a computer network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive of the code. There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements.'}),Object(Se.jsxs)("p",{children:['You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU AGPL, see <',Object(Se.jsx)("a",{target:"_blank",href:"https://www.gnu.org/licenses/",rel:"noreferrer",children:"https://www.gnu.org/licenses/"}),">."]})]})]})]}):null})),qu=Object(o.b)((function(e){return{operatorMode:e.system.operatorMode}}),null)(Object(E.a)((function(e){return Object(N.a)(Object(m.a)({pageTitle:{fontSize:18,marginBottom:20},paper:{padding:"20px 52px 20px 28px",backgroundColor:"#FFFFFF"},licenseContainer:{display:"flex",flexWrap:"wrap",flexDirection:"row",padding:"30px 30px 0px 30px",background:"#032F51",boxShadow:"0px 3px 7px #00000014","& h2":{color:"#FFF",flexDirection:"row"},"& a":{textDecoration:"none",flexDirection:"row"},"& h3":{color:"#FFFFFF",marginBottom:"30px",fontWeight:"bold"},"& h6":{color:"#FFFFFF !important"}},tableContainer:{marginLeft:28},detailsContainer:{textAlign:"center",paddingBottom:12,borderRadius:"3px 3px 0 0",marginLeft:8,maxWidth:"calc(25% - 8px)"},detailsContainerBorder:{border:"1px solid #e2e2e2",borderBottom:0,borderRadius:"4px 4px 0px 0px"},detailsContainerBorderHighlighted:{border:"1px solid #B5B5B5",borderBottom:0},detailsTitle:{fontSize:19,fontWeight:700,marginBottom:26,paddingTop:18},activePlanHeader:{fontWeight:700,background:"#D5DDE5",borderRadius:"3px 3px 0px 0px",color:"#121212",padding:8,borderTop:"1px solid #D5DDE5",marginTop:-2},planHeader:{background:"#FFFFFF",borderRadius:"3px 3px 0px 0px",padding:8,borderTop:"1px solid #D5DDE5"},detailsPrice:{fontSize:13,fontWeight:700,marginBottom:8},detailsCapacityMax:{minHeight:28,fontSize:10,fontWeight:700,marginBottom:12,padding:"0% 15%"},detailsCapacityMin:{fontSize:10},itemContainer:{height:36},itemContainerDetail:{height:48},item:{height:"100%",borderLeft:"1px solid #e2e2e2",borderRight:"1px solid #e2e2e2",textAlign:"center",fontSize:10,fontWeight:700,display:"flex",alignItems:"center",alignContent:"center",marginLeft:8,maxWidth:"calc(25% - 8px)",borderTop:"1px solid #e5e5e5"},itemFirst:{borderLeft:0,borderRight:0},itemHighlighted:{borderLeft:"1px solid #B5B5B5",borderRight:"1px solid #B5B5B5"},field:{textAlign:"left",fontWeight:400,fontSize:12},checkIcon:{height:12,color:"transparent linear-gradient(90deg, #073052 0%, #081c42 100%) 0% 0% no-repeat padding-box"},buttonContainer:{paddingTop:8,paddingBottom:24,height:"100%",display:"flex",justifyContent:"center",borderRadius:"0 0 3px 3px",border:"1px solid #e2e2e2",borderTop:0,marginLeft:8,maxWidth:"calc(25% - 8px)"},buttonContainerBlank:{border:0},buttonContainerHighlighted:{border:"1px solid #B5B5B5",borderTop:0},button:{textTransform:"none",fontSize:15,fontWeight:700},licenseButton:{float:"right",marginTop:25,marginRight:25},openSourcePolicy:{color:"#1C5A8D",fontWeight:"bold"},activateLink:{color:"#1C5A8D",fontWeight:"bold",clear:"both",background:"none",border:"none",textDecoration:"underline",cursor:"pointer"},subnetRefreshLicenseLink:{color:"#1C5A8D",fontWeight:"bold",clear:"both",background:"none",border:"none",textDecoration:"underline",cursor:"pointer",fontSize:13},fullWidth:{width:"100%",height:"100%"},licenseInfo:{color:"#FFFFFF",position:"relative"},licenseInfoTitle:{textTransform:"none",color:"#BFBFBF",fontSize:11},licenseInfoValue:{textTransform:"none",fontSize:14,fontWeight:"bold"},licenseDescription:{background:"#032F51",padding:"30px 30px",borderTop:"1px solid #e2e5e4",borderLeft:"1px solid #e2e5e4",borderRight:"1px solid #e2e5e4",alignSelf:"flex-end"},currentPlanBG:{background:"#022A4A 0% 0% no-repeat padding-box",color:"#FFFFFF",borderTop:"1px solid #52687d"},currentPlanButton:{background:"#FFFFFF",color:"#022A4A","&:hover":{background:"#FFFFFF"}},planItemsPadding:{padding:"23px 33px"},subnetSubTitle:{fontSize:12},verifiedIcon:{width:96,position:"absolute",right:0,bottom:29},loadingLoginStrategy:{textAlign:"center"}},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,n=e.operatorMode,i=function(){I(!0),ye.invoke("GET","/api/v1/subscription/info").then((function(e){e&&("STANDARD"===e.plan?T(1):"ENTERPRISE"===e.plan?T(2):T(1),f(e)),I(!1)})).catch((function(e){I(!1)}))},r=Object(a.useState)(!1),o=Object(h.a)(r,2),s=o[0],l=o[1],d=Object(a.useState)(!1),u=Object(h.a)(d,2),b=u[0],j=u[1],m=Object(a.useState)(),p=Object(h.a)(m,2),O=p[0],f=p[1],g=Object(a.useState)(0),v=Object(h.a)(g,2),N=v[0],T=v[1],E=Object(a.useState)(!0),A=Object(h.a)(E,2),_=A[0],I=A[1],L=Object(a.useState)(!1),D=Object(h.a)(L,2),F=D[0],M=D[1];return Object(a.useEffect)((function(){i()}),[]),_?Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(C.a,{})}):Object(Se.jsx)(c.a.Fragment,{children:Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsx)(na,{label:"License"}),Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsxs)(y.a,{container:!0,xs:12,className:t.container,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,lg:8,className:"".concat(t.licenseContainer),children:O?Object(Se.jsx)(c.a.Fragment,{children:Object(Se.jsxs)(y.a,{container:!0,className:t.licenseInfo,children:[Object(Se.jsxs)(y.a,{item:!0,xs:6,children:[Object(Se.jsx)(S.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"License"}),Object(Se.jsx)(S.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:"Commercial License"}),Object(Se.jsx)(S.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"Organization"}),Object(Se.jsx)(S.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:O.organization}),Object(Se.jsx)(S.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"Registered Capacity"}),Object(Se.jsx)(S.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:oe((1099511627776*O.storage_capacity).toString(10))}),Object(Se.jsx)(S.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"Expiry Date"}),Object(Se.jsx)(S.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:Object(Se.jsx)(mt.a,{format:"YYYY-MM-DD",children:O.expires_at})})]}),Object(Se.jsxs)(y.a,{item:!0,xs:6,children:[Object(Se.jsx)(S.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"Subscription Plan"}),Object(Se.jsx)(S.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:O.plan}),Object(Se.jsx)(S.a,{variant:"button",display:"block",gutterBottom:!0,className:t.licenseInfoTitle,children:"Requester"}),Object(Se.jsx)(S.a,{variant:"overline",display:"block",gutterBottom:!0,className:t.licenseInfoValue,children:O.email})]}),Object(Se.jsx)("img",{className:t.verifiedIcon,src:"/verified.svg",alt:"verified"})]})}):Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsx)(Gu,{open:b,closeModal:function(){return j(!1)}}),Object(Se.jsx)(y.a,{container:!0,children:Object(Se.jsx)("img",{src:"/agpl.svg",height:40,alt:"agpl"})}),Object(Se.jsx)(y.a,{container:!0,children:Object(Se.jsx)(S.a,{component:"h2",variant:"h6",children:"GNU Affero General Public License"})}),Object(Se.jsx)(y.a,{container:!0,className:t.licenseDescription,children:Object(Se.jsxs)("a",{onClick:function(){return j(!0)},href:"#",children:[Object(Se.jsx)(S.a,{component:"h3",children:"Version 3"}),Object(Se.jsx)(S.a,{component:"h6",children:"The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the Community in the case of network server software."})]})})]})}),Object(Se.jsx)(y.a,{item:!0,xs:12,lg:4,className:"".concat(t.paper),children:O?Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsx)(S.a,{component:"h2",variant:"h6",className:t.pageTitle,children:"Login to MinIO SUBNET !"}),Object(Se.jsx)(S.a,{component:"h6",className:t.subnetSubTitle,children:"It combines a commercial license with a support experience unlike any other."}),Object(Se.jsx)("br",{}),Object(Se.jsx)(x.a,{variant:"contained",color:"primary",className:t.button,target:"_blank",rel:"noopener noreferrer",href:"https://subnet.min.io/support/?ref=".concat(n?"op":"con"),children:"Login to SUBNET"}),n&&Object(Se.jsxs)(c.a.Fragment,{children:[" ",Object(Se.jsx)("br",{}),Object(Se.jsx)("br",{}),Object(Se.jsx)("button",{className:t.subnetRefreshLicenseLink,onClick:function(e){e.preventDefault(),M(!0),ye.invoke("POST","/api/v1/subscription/refresh",{}).then((function(e){e&&("STANDARD"===e.plan?T(1):"ENTERPRISE"===e.plan?T(2):T(1),f(e)),M(!1)})).catch((function(e){M(!1)}))},children:"Refresh Licence"}),F&&Object(Se.jsx)(k.a,{size:16,className:t.loadingLoginStrategy})]})]}):Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsx)(S.a,{component:"h2",variant:"h6",className:t.pageTitle,children:"Choosing between GNU AGPL v3 and Commercial License"}),Object(Se.jsx)(S.a,{component:"h6",children:"If you are building proprietary applications, you may want to choose the commercial license included as part of the Standard and Enterprise subscription plans. Applications must otherwise comply with all the GNU AGPLv3 License & Trademark obligations. Follow the links below to learn more about the compliance policy."}),Object(Se.jsx)("br",{}),Object(Se.jsx)("a",{href:"https://min.io/compliance?ref=".concat(n?"op":"con"),className:t.openSourcePolicy,target:"_blank",rel:"nofollow noopener noreferrer",children:"Open Source Policy Compliance"}),Object(Se.jsx)("br",{}),Object(Se.jsx)("br",{}),Object(Se.jsx)("a",{href:"https://min.io/logo?ref=".concat(n?"op":"con"),className:t.openSourcePolicy,target:"_blank",rel:"nofollow noopener noreferrer",children:"Trademark Policy"})]})})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:Object(Te.a)(t.planItemsPadding),children:Object(Se.jsx)(w.a,{className:t.paper,style:{borderRadius:"0px 0px 3px 3px"},children:Object(Se.jsxs)(y.a,{container:!0,children:[n?Object(Se.jsx)(Wu,{open:s,closeModal:function(){return l(!1),void i()}}):null,Object(Se.jsxs)(y.a,{container:!0,item:!0,xs:12,className:t.tableContainer,children:[Object(Se.jsxs)(y.a,{container:!0,item:!0,xs:12,children:[Object(Se.jsx)(y.a,{item:!0,xs:3,className:t.detailsContainer}),Du.map((function(e){var n=!O&&"Community"===e.title||O&&O.plan.toLowerCase()===e.title.toLowerCase();return Object(Se.jsxs)(y.a,{container:!0,item:!0,xs:3,className:Object(Te.a)(t.detailsContainer,t.detailsContainerBorder,Object(Ne.a)({},t.detailsContainerBorderHighlighted,"Community"!==e.title),n?t.currentPlanBG:""),children:[Object(Se.jsx)(y.a,{item:!0,xs:12,className:n?t.activePlanHeader:t.planHeader,children:n?"Current Plan":"\xa0"}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.detailsTitle,children:e.title}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.detailsPrice,children:e.price}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.detailsCapacityMax,children:e.capacityMax||""})]},e.id)}))]}),Fu.map((function(e){return Object(Se.jsxs)(y.a,{container:!0,item:!0,xs:12,className:Object(Te.a)(t.itemContainer,e.communityDetail&&t.itemContainerDetail),children:[Object(Se.jsx)(y.a,{item:!0,xs:3,className:Object(Te.a)(t.item,t.field,t.itemFirst),children:e.field}),Object(Se.jsxs)(y.a,{container:!0,item:!0,xs:3,className:Object(Te.a)(t.item,0===N?t.currentPlanBG:""),children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:"N/A"===e.community?"":"Yes"===e.community?Object(Se.jsx)(Lu.a,{className:t.checkIcon}):e.community}),void 0!==e.communityDetail&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:e.communityDetail})]}),Object(Se.jsx)(y.a,{container:!0,item:!0,xs:3,className:Object(Te.a)(t.item,t.itemHighlighted,1===N?t.currentPlanBG:""),children:Object(Se.jsx)(y.a,{item:!0,xs:12,children:"N/A"===e.standard?"":"Yes"===e.standard?Object(Se.jsx)(Lu.a,{className:t.checkIcon}):e.standard})}),Object(Se.jsx)(y.a,{container:!0,item:!0,xs:3,className:Object(Te.a)(t.item,t.itemHighlighted,2===N?t.currentPlanBG:""),children:Object(Se.jsx)(y.a,{item:!0,xs:12,children:"N/A"===e.enterprise?"":"Yes"===e.enterprise?Object(Se.jsx)(Lu.a,{className:t.checkIcon}):e.enterprise})})]},e.id)})),Object(Se.jsxs)(y.a,{container:!0,item:!0,xs:12,children:[Object(Se.jsx)(y.a,{item:!0,xs:3,className:Object(Te.a)(t.buttonContainer,t.buttonContainerBlank)}),Mu.map((function(e,a){return Object(Se.jsxs)(y.a,{container:!0,item:!0,xs:3,style:{textAlign:"center"},className:Object(Te.a)(t.buttonContainer,N===a?t.currentPlanBG:"",Object(Ne.a)({},t.buttonContainerHighlighted,"Subscribe"===e.text)),children:[Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(x.a,{variant:"contained",color:"primary",className:Object(Te.a)(t.button,N===a?t.currentPlanButton:""),target:"_blank",rel:"noopener noreferrer",href:"#",disabled:O&&O.plan.toLowerCase()===e.plan.toLowerCase(),onClick:function(t){t.preventDefault(),window.open("".concat(e.link,"/?ref=").concat(n?"op":"con"),"_blank")},children:N!==a&&a>0?e.text2:e.text})}),n&&"Subscribe"===e.text&&!(O&&O.plan.toLowerCase()===e.plan.toLowerCase())&&Object(Se.jsx)(y.a,{item:!0,xs:12,style:{marginTop:"10px"},children:Object(Se.jsx)("button",{className:t.activateLink,onClick:function(e){e.preventDefault(),l(!0)},children:"Activate"})})]},e.id)}))]})]})]})})})]})]})})}))),Vu=n(94),Hu="TRACE/MESSAGE_RECEIVED",Yu="TRACE/RESET_MESSAGES",Qu="TRACE/SET_STARTED";var Zu=function(e){var t="ws";return"https:"===e&&(t="wss"),t},Ju=n(116),$u=n.n(Ju),Xu=null,eb=Object(o.b)((function(e){return{messages:e.trace.messages,traceStarted:e.trace.traceStarted}}),{traceMessageReceived:function(e){return{type:Hu,message:e}},traceResetMessages:function(){return{type:Yu}},setTraceStarted:function(e){return{type:Qu,status:e}}})(Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)(Object(m.a)(Object(m.a)({paperContainer:{padding:15,paddingLeft:50,display:"flex"},logList:{background:"white",height:"400px",overflow:"auto","& ul":{margin:"4px",padding:"0px"},"& ul li":{listStyle:"none",margin:"0px",padding:"0px",borderBottom:"1px solid #dedede"}},sizeItem:{width:150},timeItem:{width:100},labelCheckboxes:{fontSize:16,fontWeight:700,paddingTop:19},startButton:{textAlign:"right"}},ze),Ke),Xe),nt),{},{searchField:Object(m.a)(Object(m.a)({},Ke.searchField),{},{margin:"0 5px","&:first-of-type":{marginLeft:0},"&:last-of-type":{marginRight:0}}),tableWrapper:{height:"calc(100vh - 292px)"}},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,n=e.traceMessageReceived,c=e.traceResetMessages,i=e.setTraceStarted,r=e.traceStarted,o=e.messages,s=Object(a.useState)(""),l=Object(h.a)(s,2),d=l[0],u=l[1],b=Object(a.useState)(""),j=Object(h.a)(b,2),m=j[0],p=j[1],O=Object(a.useState)(""),f=Object(h.a)(O,2),g=f[0],S=f[1],C=Object(a.useState)(""),k=Object(h.a)(C,2),w=k[0],N=k[1],T=Object(a.useState)(0),E=Object(h.a)(T,2),A=E[0],_=E[1],I=Object(a.useState)(!1),L=Object(h.a)(I,2),D=L[0],F=L[1],M=Object(a.useState)(!0),R=Object(h.a)(M,2),B=R[0],P=R[1],z=Object(a.useState)(!1),K=Object(h.a)(z,2),U=K[0],W=K[1],G=Object(a.useState)(!1),q=Object(h.a)(G,2),V=q[0],H=q[1],Y=Object(a.useState)(!1),Q=Object(h.a)(Y,2),Z=Q[0],J=Q[1],$=Object(a.useState)(!1),X=Object(h.a)($,2),ee=X[0],te=X[1];return Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(na,{label:"Trace"}),Object(Se.jsx)(y.a,{container:!0,children:Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.container,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(Se.jsx)(v.a,{placeholder:"Status Code",className:t.searchField,id:"status-code",label:"",InputProps:{disableUnderline:!0},value:d,onChange:function(e){u(e.target.value)},disabled:r}),Object(Se.jsx)(v.a,{placeholder:"Method",className:t.searchField,id:"method",label:"",InputProps:{disableUnderline:!0},value:m,onChange:function(e){p(e.target.value)},disabled:r}),Object(Se.jsx)(v.a,{placeholder:"Function Name",className:t.searchField,id:"func-name",label:"",disabled:r,InputProps:{disableUnderline:!0},value:g,onChange:function(e){S(e.target.value)}}),Object(Se.jsx)(v.a,{placeholder:"Path",className:t.searchField,id:"path",label:"",disabled:r,InputProps:{disableUnderline:!0},value:w,onChange:function(e){N(e.target.value)}}),Object(Se.jsx)(v.a,{type:"number",className:t.searchField,id:"fthreshold",label:"Response Threshold",disabled:r,InputProps:{disableUnderline:!0},inputProps:{min:0},value:A,onChange:function(e){_(parseInt(e.target.value))}})]}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.inlineCheckboxes,children:[Object(Se.jsx)("span",{className:t.labelCheckboxes,children:"Calls to trace:"}),Object(Se.jsx)(vn,{checked:D,id:"all_calls",name:"all_calls",label:"All",onChange:function(e){F(e.target.checked)},value:"all",disabled:r}),Object(Se.jsx)(vn,{checked:B||D,id:"s3_calls",name:"s3_calls",label:"S3",onChange:function(e){P(e.target.checked)},value:"s3",disabled:D||r}),Object(Se.jsx)(vn,{checked:U||D,id:"internal_calls",name:"internal_calls",label:"Internal",onChange:function(e){W(e.target.checked)},value:"internal",disabled:D||r}),Object(Se.jsx)(vn,{checked:V||D,id:"storage_calls",name:"storage_calls",label:"Storage",onChange:function(e){H(e.target.checked)},value:"storage",disabled:D||r}),Object(Se.jsx)(vn,{checked:Z||D,id:"os_calls",name:"os_calls",label:"OS",onChange:function(e){J(e.target.checked)},value:"os",disabled:D||r}),Object(Se.jsx)("span",{className:t.labelCheckboxes,children:"\xa0 \xa0 \xa0 | \xa0 \xa0 \xa0"}),Object(Se.jsx)(vn,{checked:ee,id:"only_errors",name:"only_errors",label:"Display only Errors",onChange:function(e){te(e.target.checked)},value:"only_errors",disabled:r})]}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.startButton,children:[!r&&Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:r,onClick:function(){c();var e=new URL(window.location.toString()),t=e.port,a="".concat(B?"s3,":"").concat(U?"internal,":"").concat(V?"storage,":"").concat(Z?"os,":"");D&&(a="all");var r=Zu(e.protocol);Xu=new Vu.w3cwebsocket("".concat(r,"://").concat(e.hostname,":").concat(t,"/ws/trace?calls=").concat(a,"&threshold=").concat(A,"&onlyErrors=").concat(ee?"yes":"no","&statusCode=").concat(d,"&method=").concat(m,"&funcname=").concat(g,"&path=").concat(w));var o=null;if(null!==Xu)return Xu.onopen=function(){console.log("WebSocket Client Connected"),i(!0),Xu.send("ok"),o=setInterval((function(){Xu.send("ok")}),1e4)},Xu.onmessage=function(e){var t=JSON.parse(e.data.toString());t.ptime=$u()(t.time,"YYYY-MM-DD HH:mm:s.SSSS +0000 UTC").toDate(),t.key=Math.random(),n(t)},Xu.onclose=function(){clearInterval(o),console.log("connection closed by server"),i(!1)},function(){Xu.close(1e3),clearInterval(o),console.log("closing websockets"),i(!1)}},children:"Start"}),r&&Object(Se.jsx)(x.a,{type:"button",variant:"contained",color:"primary",onClick:function(){Xu.close(1e3),i(!1)},children:"Stop"})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsx)(kn,{itemActions:[],columns:[{label:"Time",elementKey:"ptime",renderFunction:function(e){var t=new Date(e);return de(t)},globalClass:t.timeItem},{label:"Name",elementKey:"api"},{label:"Status",elementKey:"",renderFunction:function(e){return"".concat(e.statusCode," ").concat(e.statusMsg)},renderFullObject:!0},{label:"Location",elementKey:"configuration_id",renderFunction:function(e){return"".concat(e.host," ").concat(e.client)},renderFullObject:!0},{label:"Load Time",elementKey:"callStats.duration",globalClass:t.timeItem},{label:"Upload",elementKey:"callStats.rx",renderFunction:oe,globalClass:t.sizeItem},{label:"Download",elementKey:"callStats.tx",renderFunction:oe,globalClass:t.sizeItem}],isLoading:!1,records:o,entityName:"Traces",idField:"api",customEmptyMessage:r?"No Traced elements received yet":"Trace is not started yet",customPaperHeight:t.tableWrapper,autoScrollToBottom:!0})]})})]})}))),tb="LOG_MESSAGE_RECEIVED",nb="LOG_RESET_MESSAGES";var ab=Object(o.b)((function(e){return{messages:e.logs.messages}}),{logMessageReceived:function(e){return{type:tb,message:e}},logResetMessages:function(){return{type:nb}}}),cb=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)({logList:{background:"#fff",minHeight:400,height:"calc(100vh - 304px)",overflow:"auto",fontSize:13,padding:"25px 45px 0",border:"1px solid #EAEDEE",borderRadius:4},tab:{paddingLeft:25},logerror:{color:"#A52A2A"},logerror_tab:{color:"#A52A2A",paddingLeft:25},ansidefault:{color:"#000"},highlight:{"& span":{backgroundColor:"#082F5238"}}},ze),Ke),He))}))(ab((function(e){var t=e.classes,n=e.logMessageReceived,c=e.logResetMessages,i=e.messages,r=Object(a.useState)(""),o=Object(h.a)(r,2),s=o[0],l=o[1];Object(a.useEffect)((function(){c();var e=new URL(window.location.toString()),t=e.port,a=Zu(e.protocol),i=new Vu.w3cwebsocket("".concat(a,"://").concat(e.hostname,":").concat(t,"/ws/console")),r=null;if(null!==i)return i.onopen=function(){console.log("WebSocket Client Connected"),i.send("ok"),r=setInterval((function(){i.send("ok")}),1e4)},i.onmessage=function(e){var t=JSON.parse(e.data.toString());t.time=$u()(t.time,"HH:mm:s UTC MM/DD/YYYY").toDate(),t.key=Math.random(),n(t)},i.onclose=function(){clearInterval(r),console.log("connection closed by server")},function(){i.close(1e3),clearInterval(r),console.log("closing websockets")}}),[n,c]);var d=function(e){var n=e.ConsoleMsg,a=(n=n.replace(/([^\x20-\x7F])/g,"")).replace(/((\[[0-9;]+m))/g,""),c=""!==s&&n.toLowerCase().includes(s.toLowerCase());return a.startsWith(" ")?Object(Se.jsx)("div",{className:"".concat(c?t.highlight:""),children:Object(Se.jsx)("span",{className:t.tab,children:a})},e.key):null!==e.error&&void 0!==e.error?function(e){var n=[];if(null!==e.error&&void 0!==e.error){if(e.api&&e.api.name){var a="API: ".concat(e.api.name),c=""!==s&&a.toLowerCase().includes(s.toLowerCase());n.push(Object(Se.jsxs)("div",{className:"".concat(c?t.highlight:""),children:[Object(Se.jsx)("br",{}),Object(Se.jsx)("span",{className:t.logerror,children:a})]},"api-".concat(e.key)))}if(e.time){var i="Time: ".concat(de(e.time)),r=""!==s&&i.toLowerCase().includes(s.toLowerCase());n.push(Object(Se.jsx)("div",{className:"".concat(r?t.highlight:""),children:Object(Se.jsx)("span",{className:t.logerror,children:i})},"time-".concat(e.key)))}if(e.deploymentid){var o="DeploymentID: ".concat(e.deploymentid),l=""!==s&&o.toLowerCase().includes(s.toLowerCase());n.push(Object(Se.jsx)("div",{className:"".concat(l?t.highlight:""),children:Object(Se.jsx)("span",{className:t.logerror,children:o})},"deploytmentid-".concat(e.key)))}if(e.requestID){var d="RequestID: ".concat(e.requestID),u=""!==s&&d.toLowerCase().includes(s.toLowerCase());n.push(Object(Se.jsx)("div",{className:"".concat(u?t.highlight:""),children:Object(Se.jsx)("span",{className:t.logerror,children:d})},"requestid-".concat(e.key)))}if(e.remotehost){var b="RemoteHost: ".concat(e.remotehost),j=""!==s&&b.toLowerCase().includes(s.toLowerCase());n.push(Object(Se.jsx)("div",{className:"".concat(j?t.highlight:""),children:Object(Se.jsx)("span",{className:t.logerror,children:b})},"remotehost-".concat(e.key)))}if(e.host){var h="Host: ".concat(e.host),m=""!==s&&h.toLowerCase().includes(s.toLowerCase());n.push(Object(Se.jsx)("div",{className:"".concat(m?t.highlight:""),children:Object(Se.jsx)("span",{className:t.logerror,children:h})},"host-".concat(e.key)))}if(e.userAgent){var p="UserAgent: ".concat(e.userAgent),O=""!==s&&p.toLowerCase().includes(s.toLowerCase());n.push(Object(Se.jsx)("div",{className:"".concat(O?t.highlight:""),children:Object(Se.jsx)("span",{className:t.logerror,children:p})},"useragent-".concat(e.key)))}if(e.error.message){var f="Error: ".concat(e.error.message),g=""!==s&&f.toLowerCase().includes(s.toLowerCase());n.push(Object(Se.jsx)("div",{className:"".concat(g?t.highlight:""),children:Object(Se.jsx)("span",{className:t.logerror,children:f})},"message-".concat(e.key)))}if(e.error.source)for(var x in e.error.source){var v=e.error.source[x],y=""!==s&&v.toLowerCase().includes(s.toLowerCase());n.push(Object(Se.jsx)("div",{className:"".concat(y?t.highlight:""),children:Object(Se.jsx)("span",{className:t.logerror_tab,children:v})},"source-".concat(e.key,"-").concat(x)))}}return n}(e):Object(Se.jsx)("div",{className:"".concat(c?t.highlight:""),children:Object(Se.jsx)("span",{className:t.ansidefault,children:a})},e.key)},u=i.map((function(e){return d(e)}));return Object(Se.jsx)(a.Fragment,{children:Object(Se.jsxs)(y.a,{container:!0,className:t.logsSubContainer,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.actionsTray,children:Object(Se.jsx)(v.a,{placeholder:"Highlight Line",className:t.searchField,id:"search-resource",label:"",onChange:function(e){l(e.target.value)},InputProps:{disableUnderline:!0,startAdornment:Object(Se.jsx)(lt.a,{position:"start",children:Object(Se.jsx)(ut.a,{})})}})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("div",{className:t.logList,children:u})})]})})}))),ib=n(672),rb=Object(E.a)((function(e){return Object(N.a)({searchField:Object(m.a)(Object(m.a)({},Ke.searchField),{},{height:30,padding:0,"& input":{padding:"0 12px",height:28,fontSize:12,fontWeight:600,color:"#393939"},"&.isDisabled":{"&:hover":{borderColor:"#EAEDEE"}},"& input.Mui-disabled":{backgroundColor:"#EAEAEA"}}),labelStyle:{color:"#393939",fontSize:12,marginBottom:4},buttonKit:{display:"flex",alignItems:"center"},toggleButton:{marginRight:10},fieldContainer:{flexGrow:1,margin:"0 15px"}})}))((function(e){var t=e.classes,n=e.label,c=e.onChange,i=e.value,r=e.placeholder,o=void 0===r?"":r,s=e.id,l=e.name;return Object(Se.jsx)(a.Fragment,{children:Object(Se.jsxs)("div",{className:t.fieldContainer,children:[Object(Se.jsx)("div",{className:t.labelStyle,children:n}),Object(Se.jsx)("div",{className:t.buttonKit,children:Object(Se.jsx)(v.a,{placeholder:o,id:s,name:l,label:"",onChange:function(e){c(e.target.value)},InputProps:{disableUnderline:!0},className:t.searchField,value:i})})]})})})),ob={setErrorSnackMessage:H},sb=Object(o.b)(null,ob),lb=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)(Object(m.a)({inputBar:{flexGrow:1,marginLeft:15},advancedLabel:{display:"flex",alignItems:"center",color:"#091C42",border:0,backgroundColor:"transparent",cursor:"pointer","&:focus, &:active":{outline:"none"}},advancedLabelContainer:{marginTop:10},getInformationContainer:{textAlign:"right"},orderButton:{width:93},recordsLabel:{alignSelf:"center",marginLeft:15},blockCollapsed:{height:0,overflowY:"hidden",transitionDuration:"0.3s"},filterOpen:{height:200,marginBottom:12},endLineAction:{marginBottom:15},filtersContainer:{display:"flex",justifyContent:"space-between",marginBottom:12},innerContainer:{backgroundColor:"#fff",border:"#EAEDEE 1px solid",borderRadius:3,padding:10,marginBottom:15},noticeLabel:{marginLeft:15,marginBottom:15,fontSize:12,color:"#9C9C9C"},tableFOpen:{height:"calc(100vh - 561px)"},tableFClosed:{height:"calc(100vh - 349px)"},"@global":{".overrideMargin":{marginLeft:0}}},Ke),ze),He),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(sb((function(e){var t=e.classes,n=e.setErrorSnackMessage,c=Object(a.useState)(!0),i=Object(h.a)(c,2),r=i[0],o=i[1],s=Object(a.useState)(null),l=Object(h.a)(s,2),d=l[0],u=l[1],b=Object(a.useState)(null),j=Object(h.a)(b,2),m=j[0],p=j[1],O=Object(a.useState)(!1),f=Object(h.a)(O,2),g=f[0],v=f[1],S=Object(a.useState)([]),C=Object(h.a)(S,2),k=C[0],w=C[1],N=Object(a.useState)(""),T=Object(h.a)(N,2),E=T[0],A=T[1],_=Object(a.useState)(""),I=Object(h.a)(_,2),L=I[0],D=I[1],F=Object(a.useState)(""),M=Object(h.a)(F,2),R=M[0],B=M[1],P=Object(a.useState)(""),z=Object(h.a)(P,2),K=z[0],U=z[1],W=Object(a.useState)(""),G=Object(h.a)(W,2),q=G[0],V=G[1],H=Object(a.useState)(""),Y=Object(h.a)(H,2),Q=Y[0],Z=Y[1],J=Object(a.useState)("DESC"),$=Object(h.a)(J,2),ee=$[0],te=$[1],ne=Object(a.useState)(["time","api_name","bucket","object","remote_host","request_id","user_agent","response_status"]),ae=Object(h.a)(ne,2),ce=ae[0],ie=ae[1],re=Object(a.useState)(0),se=Object(h.a)(re,2),le=se[0],de=se[1],ue=Object(a.useState)(!1),be=Object(h.a)(ue,2),je=be[0],he=be[1],me=null,pe=Object(a.useCallback)((function(){if(!je){he(!0);var e="".concat(""!==E?"&fp=bucket:".concat(E):"").concat(""!==K?"&fp=object:".concat(K):"").concat(""!==L?"&fp=api_name:".concat(L):"").concat(""!==q?"&fp=request_id:".concat(q):"").concat(""!==R?"&fp=user_agent:".concat(R):"").concat(""!==Q?"&fp=response_status:".concat(Q):"");(e=e.trim()).endsWith(",")&&(e=e.slice(0,-1)),ye.invoke("GET","/api/v1/logs/search?q=reqinfo".concat(""!==e?"".concat(e):"","&pageSize=100&pageNo=").concat(le,"&order=").concat("DESC"===ee?"timeDesc":"timeAsc").concat(null!==d?"&timeStart=".concat(d.toISOString()):"").concat(null!==m?"&timeEnd=".concat(m.toISOString()):"")).then((function(e){var t=e.results||[],n=[].concat(Object(st.a)(k),Object(st.a)(t));o(!1),he(!1),w(n),de(le+1),null!==me&&me()})).catch((function(e){o(!1),he(!1),n(e)}))}}),[E,K,L,q,R,Q,le,ee,d,m,je,k,me,n]);Object(a.useEffect)((function(){r&&(w([]),pe())}),[r,ee,pe]);return Object(Se.jsx)(a.Fragment,{children:Object(Se.jsxs)(y.a,{container:!0,className:t.logsSubContainer,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:"".concat(t.actionsTray," ").concat(t.timeContainers),children:[Object(Se.jsx)("span",{className:t.label,children:"Start Time"}),Object(Se.jsx)(_i,{value:d,onChange:u,forSearchBlock:!0,id:"stTime"}),Object(Se.jsx)("span",{className:t.label,children:"End Time"}),Object(Se.jsx)(_i,{value:m,onChange:p,forSearchBlock:!0,id:"endTime"})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:"".concat(t.advancedLabelContainer),children:Object(Se.jsx)("div",{className:"".concat(t.blockCollapsed," ").concat(g?t.filterOpen:""),children:Object(Se.jsxs)("div",{className:t.innerContainer,children:[Object(Se.jsxs)("div",{className:t.noticeLabel,children:["Enable your preferred options to get filtered records.",Object(Se.jsx)("br",{}),"You can use '*' to match any character, '.' to signify a single character or '\\' to scape an special character (E.g. mybucket-*)"]}),Object(Se.jsxs)("div",{className:t.filtersContainer,children:[Object(Se.jsx)(rb,{onChange:A,value:E,label:"Bucket",id:"bucket",name:"bucket"}),Object(Se.jsx)(rb,{onChange:D,value:L,label:"API Name",id:"api_name",name:"api_name"}),Object(Se.jsx)(rb,{onChange:B,value:R,label:"User Agent",id:"user_agent",name:"user_agent"})]}),Object(Se.jsxs)("div",{className:t.filtersContainer,children:[Object(Se.jsx)(rb,{onChange:U,value:K,label:"Object",id:"object",name:"object"}),Object(Se.jsx)(rb,{onChange:V,value:q,label:"Request ID",id:"request_id",name:"request_id"}),Object(Se.jsx)(rb,{onChange:Z,value:Q,label:"Response Status",id:"response_status",name:"response_status"})]})]})})}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:"".concat(t.actionsTray," ").concat(t.endLineAction),children:[Object(Se.jsx)("div",{children:Object(Se.jsxs)("button",{type:"button",className:"".concat(t.advancedLabel," overrideMargin"),onClick:function(){v(!g)},children:["Advanced Filters"," ",g?Object(Se.jsx)(ib.a,{}):Object(Se.jsx)(Xt.a,{})]})}),Object(Se.jsx)(x.a,{type:"button",variant:"contained",color:"primary",onClick:function(){de(0),o(!0)},children:"Get Information"})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(kn,{columns:[{label:"Timestamp",elementKey:"time",enableSort:!0},{label:"API Name",elementKey:"api_name"},{label:"Bucket",elementKey:"bucket"},{label:"Object",elementKey:"object"},{label:"Remote Host",elementKey:"remote_host"},{label:"Request ID",elementKey:"request_id"},{label:"User Agent",elementKey:"user_agent"},{label:"Response Status",elementKey:"response_status",renderFunction:function(e){return Object(Se.jsx)(a.Fragment,{children:Object(Se.jsxs)("span",{children:[e.response_status_code," (",e.response_status,")"]})})},renderFullObject:!0},{label:"Request Content Length",elementKey:"request_content_length",renderFunction:oe},{label:"Response Content Length",elementKey:"response_content_length",renderFunction:oe},{label:"Time to Response NS",elementKey:"time_to_response_ns",renderFunction:xe,contentTextAlign:"right"}],isLoading:r,records:k,entityName:"Logs",customEmptyMessage:"There is no information with this criteria",idField:"request_id",columnsSelector:!0,columnsShown:ce,onColumnChange:function(e,t){var n=Object(st.a)(ce);t?n.includes(e)||n.push(e):n=ce.filter((function(t){return t!==e})),ie(n)},customPaperHeight:g?t.tableFOpen:t.tableFClosed,sortConfig:{currentSort:"time",currentDirection:ee,triggerSort:function(e){var t=X()(e,"sortDirection","DESC");te(t),de(0),o(!0)}},infiniteScrollConfig:{recordsCount:1e6,loadMoreRecords:function(e){return pe(),new Promise((function(e){me=e}))}},textSelectable:!0})})]})})}))),db=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({headerLabel:{fontSize:22,fontWeight:600,color:"#000",marginTop:4}},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,n=Object(a.useState)(0),c=Object(h.a)(n,2),i=c[0],r=c[1],o=Object(a.useState)(!0),s=Object(h.a)(o,2),l=s[0],d=s[1],u=Object(a.useState)(!1),b=Object(h.a)(u,2),j=b[0],m=b[1];return Object(a.useEffect)((function(){ye.invoke("GET","/api/v1/logs/search?q=reqinfo&pageSize=10&pageNo=0").then((function(){m(!0),d(!1)})).catch((function(e){d(!1),console.info("Log Search API not available.")}))}),[l]),Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(na,{label:"Logs"}),Object(Se.jsx)(y.a,{container:!0,children:Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.container,children:l?Object(Se.jsx)(C.a,{}):Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.headerLabel,children:"All Logs"}),Object(Se.jsxs)(ja.a,{value:i,onChange:function(e,t){r(t)},indicatorColor:"primary",textColor:"primary","aria-label":"cluster-tabs",variant:"scrollable",scrollButtons:"auto",children:[Object(Se.jsx)(ha.a,{label:"Error Logs"}),j&&Object(Se.jsx)(ha.a,{label:"Logs Search"})]}),Object(Se.jsxs)(y.a,{item:!0,xs:12,children:[0===i&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(cb,{})}),1===i&&j&&Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(lb,{})})]})]})})})]})})),ub=n(354),bb=Object(E.a)((function(e){return Object(N.a)({root:{width:450,lineHeight:"50px",marginRight:15,"label + &":{marginTop:e.spacing(3)},"& .MuiSelect-select:focus":{backgroundColor:"transparent"}},input:{height:50,fontSize:13,lineHeight:"50px",width:450}})}))(Fn.a),jb=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)(Object(m.a)({watchList:{background:"white",maxHeight:"400",overflow:"auto","& ul":{margin:"4",padding:"0"},"& ul li":{listStyle:"none",margin:"0",padding:"0",borderBottom:"1px solid #dedede"}},graphContainer:{backgroundColor:"#fff",border:"#EAEDEE 1px solid",borderRadius:3,padding:"19px 38px"},scanInfo:{marginTop:20,display:"flex",flexDirection:"row",justifyContent:"space-between"},scanData:{fontSize:13}},nt),ze),Ke),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,n=Object(a.useState)(!1),i=Object(h.a)(n,2),r=i[0],o=i[1],s=Object(a.useState)(""),l=Object(h.a)(s,2),d=l[0],u=l[1],b=Object(a.useState)([]),j=Object(h.a)(b,2),m=j[0],p=j[1],O=Object(a.useState)(""),f=Object(h.a)(O,2),g=f[0],S=f[1],C=Object(a.useState)(!1),k=Object(h.a)(C,2),w=k[0],N=k[1],T=Object(a.useState)(!1),E=Object(h.a)(T,2),A=E[0],_=E[1],I=Object(a.useState)(!1),L=Object(h.a)(I,2),D=L[0],F=L[1],M=Object(a.useState)({beforeHeal:[0,0,0,0],afterHeal:[0,0,0,0],objectsHealed:0,objectsScanned:0,healDuration:0,sizeScanned:""}),R=Object(h.a)(M,2),B=R[0],P=R[1];Object(a.useEffect)((function(){ye.invoke("GET","/api/v1/buckets").then((function(e){var t=[];null!==e.buckets&&(t=e.buckets),p(t)})).catch((function(e){console.log(e)}))}),[]),Object(a.useEffect)((function(){!0===A&&F(!1)}),[A]),Object(a.useEffect)((function(){!0===D&&_(!1)}),[D]);var z=function(e){return[e.Green,e.Yellow,e.Red,e.Grey]};Object(a.useEffect)((function(){if(r){var e={Green:0,Yellow:0,Red:0,Grey:0},t={Green:0,Yellow:0,Red:0,Grey:0},n=new URL(window.location.toString()),a=n.port,c=Zu(n.protocol),i=new Vu.w3cwebsocket("".concat(c,"://").concat(n.hostname,":").concat(a,"/ws/heal/").concat(d,"?prefix=").concat(g,"&recursive=").concat(w,"&force-start=").concat(A,"&force-stop=").concat(D));if(null!==i)return i.onopen=function(){console.log("WebSocket Client Connected"),i.send("ok")},i.onmessage=function(n){for(var a=JSON.parse(n.data.toString()),c=0,i=Object.entries(a.healthAfterCols);c<i.length;c++){var r=Object(h.a)(i[c],2),o=r[0],s=r[1];t[o]=100*s/a.itemsScanned}for(var l=0,d=Object.entries(a.healthBeforeCols);l<d.length;l++){var u=Object(h.a)(d[l],2),b=u[0],j=u[1];e[b]=100*j/a.itemsScanned}P({beforeHeal:z(e),afterHeal:z(t),objectsHealed:a.objectsHealed,objectsScanned:a.objectsScanned,healDuration:a.healDuration,sizeScanned:oe(a.bytesScanned.toString())})},i.onclose=function(){o(!1),console.log("connection closed by server")},function(){i.close(1e3),console.log("closing websockets")}}}),[r,d,A,D,g,w]);var K={labels:["Green","Yellow","Red","Grey"],datasets:[{label:"After Healing",data:B.afterHeal,backgroundColor:"rgba(0, 0, 255, 0.2)",borderColor:"rgba(54, 162, 235, 1)",borderWidth:1},{label:"Before Healing",data:B.beforeHeal,backgroundColor:"rgba(153, 102, 255, 0.2)",borderColor:"rgba(153, 102, 255, 1)",borderWidth:1}]},U=m.map((function(e){return{label:e.name,value:e.name}}));return Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsx)(na,{label:"Heal"}),Object(Se.jsx)(y.a,{container:!0,className:t.container,children:Object(Se.jsxs)(y.a,{item:!0,xs:12,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(Se.jsx)(Mn.a,{variant:"outlined",children:Object(Se.jsxs)(Rn.a,{id:"bucket-name",name:"bucket-name",value:d,onChange:function(e){u(e.target.value)},className:t.searchField,input:Object(Se.jsx)(bb,{}),displayEmpty:!0,children:[Object(Se.jsx)(Bn.a,{value:"",children:"Select Bucket"},"select-bucket-name-default"),U.map((function(e){return Object(Se.jsx)(Bn.a,{value:e.value,children:e.label},"select-bucket-name-".concat(e.label))}))]})}),Object(Se.jsx)(v.a,{placeholder:"Prefix",className:t.searchField,id:"prefix-resource",label:"",disabled:!1,InputProps:{disableUnderline:!0},onChange:function(e){S(e.target.value)}}),Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:r,onClick:function(){return o(!0)},children:"Start"})]}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.inlineCheckboxes,children:[Object(Se.jsx)(vn,{name:"recursive",id:"recursive",value:"recursive",checked:w,onChange:function(e){N(e.target.checked)},disabled:!1,label:"Recursive"}),Object(Se.jsx)(vn,{name:"forceStart",id:"forceStart",value:"forceStart",checked:A,onChange:function(e){_(e.target.checked)},disabled:!1,label:"Force Start"}),Object(Se.jsx)(vn,{name:"forceStop",id:"forceStop",value:"forceStop",checked:D,onChange:function(e){F(e.target.checked)},disabled:!1,label:"Force Stop"})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.graphContainer,children:[Object(Se.jsx)(ub.HorizontalBar,{data:K,width:80,height:30,options:{title:{display:!0,text:"Item's Health Status [%]",fontSize:20},legend:{display:!0,position:"right"}}}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.scanInfo,children:[Object(Se.jsxs)("div",{className:t.scanData,children:[Object(Se.jsx)("strong",{children:"Size scanned:"})," ",B.sizeScanned]}),Object(Se.jsxs)("div",{className:t.scanData,children:[Object(Se.jsx)("strong",{children:"Objects healed:"})," ",B.objectsHealed," /"," ",B.objectsScanned]}),Object(Se.jsxs)("div",{className:t.scanData,children:[Object(Se.jsx)("strong",{children:"Healing time:"})," ",B.healDuration,"s"]})]})]})]})})]})})),hb="WATCH_MESSAGE_RECEIVED",mb="WATCH_RESET_MESSAGES";var pb=Object(E.a)((function(e){return Object(N.a)({root:{width:450,lineHeight:"50px","label + &":{marginTop:e.spacing(3)},"& .MuiSelect-select:focus":{backgroundColor:"transparent"}},input:{height:50,fontSize:13,lineHeight:"50px",width:450}})}))(Fn.a),Ob=Object(o.b)((function(e){return{messages:e.watch.messages}}),{watchMessageReceived:function(e){return{type:hb,message:e}},watchResetMessages:function(){return{type:mb}}})(Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)({watchList:{background:"white",height:"400px",overflow:"auto","& ul":{margin:"4px",padding:"0px"},"& ul li":{listStyle:"none",margin:"0px",padding:"0px",borderBottom:"1px solid #dedede"}},searchPrefix:{flexGrow:1,marginLeft:15}},ze),Ke),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,n=e.watchMessageReceived,i=e.watchResetMessages,r=e.messages,o=Object(a.useState)(!1),s=Object(h.a)(o,2),l=s[0],d=s[1],u=Object(a.useState)("Select Bucket"),b=Object(h.a)(u,2),j=b[0],m=b[1],p=Object(a.useState)(""),O=Object(h.a)(p,2),f=O[0],g=O[1],S=Object(a.useState)(""),C=Object(h.a)(S,2),k=C[0],w=C[1],N=Object(a.useState)([]),T=Object(h.a)(N,2),E=T[0],A=T[1];Object(a.useEffect)((function(){ye.invoke("GET","/api/v1/buckets").then((function(e){var t=[];null!==e.buckets&&(t=e.buckets),A(t)})).catch((function(e){console.log(e)}))}),[]),Object(a.useEffect)((function(){if(i(),l&&E.some((function(e){return e.name===j}))){var e=new URL(window.location.toString()),t=e.port,a=Zu(e.protocol),c=new Vu.w3cwebsocket("".concat(a,"://").concat(e.hostname,":").concat(t,"/ws/watch/").concat(j,"?prefix=").concat(f,"&suffix=").concat(k)),r=null;if(null!==c)return c.onopen=function(){console.log("WebSocket Client Connected"),c.send("ok"),r=setInterval((function(){c.send("ok")}),1e4)},c.onmessage=function(e){var t=JSON.parse(e.data.toString());t.Time=new Date(t.Time.toString()),t.key=Math.random(),n(t)},c.onclose=function(){clearInterval(r),console.log("connection closed by server"),d(!1)},function(){c.close(1e3),clearInterval(r),console.log("closing websockets")}}else d(!1)}),[n,l,E,j,f,k,i]);var _=E.map((function(e){return{label:e.name,value:e.name}}));return Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsx)(na,{label:"Watch"}),Object(Se.jsx)(y.a,{container:!0,children:Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.container,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(Se.jsx)(Mn.a,{variant:"outlined",children:Object(Se.jsxs)(Rn.a,{id:"bucket-name",name:"bucket-name",value:j,onChange:function(e){m(e.target.value)},className:t.searchField,disabled:l,input:Object(Se.jsx)(pb,{}),children:[Object(Se.jsx)(Bn.a,{value:j,disabled:!0,children:"Select Bucket"},"select-bucket-name-default"),_.map((function(e){return Object(Se.jsx)(Bn.a,{value:e.value,children:e.label},"select-bucket-name-".concat(e.label))}))]})}),Object(Se.jsx)(v.a,{placeholder:"Prefix",className:"".concat(t.searchField," ").concat(t.searchPrefix),id:"prefix-resource",label:"",disabled:l,InputProps:{disableUnderline:!0},onChange:function(e){g(e.target.value)}}),Object(Se.jsx)(v.a,{placeholder:"Suffix",className:"".concat(t.searchField," ").concat(t.searchPrefix),id:"suffix-resource",label:"",disabled:l,InputProps:{disableUnderline:!0},onChange:function(e){w(e.target.value)}}),Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:l,onClick:function(){return d(!0)},children:"Start"})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsx)(kn,{columns:[{label:"Time",elementKey:"Time",renderFunction:de},{label:"Size",elementKey:"Size",renderFunction:oe},{label:"Type",elementKey:"Type"},{label:"Path",elementKey:"Path"}],records:r,entityName:"Watch",customEmptyMessage:"No Changes at this time",idField:"watch_table",isLoading:!1})]})})]})}))),fb="HEALTH_INFO_MESSAGE_RECEIVED",gb="HEALTH_INFO_RESET_MESSAGE";var xb="error",vb="success",yb="inProgress",Sb=Object(o.b)((function(e){return{message:e.healthInfo.message,serverDiagnosticStatus:e.system.serverDiagnosticStatus}}),{healthInfoMessageReceived:function(e){return{type:fb,message:e}},healthInfoResetMessage:function(){return{type:gb}},setSnackBarMessage:V,setServerDiagStat:function(e){return{type:R,serverDiagnosticStatus:e}}})(Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)({logList:{background:"#fff",minHeight:400,height:"calc(100vh - 270px)",overflow:"auto",fontSize:13,padding:"25px 45px",border:"1px solid #EAEDEE",borderRadius:4},loading:{paddingTop:8,paddingLeft:40},buttons:{justifyContent:"flex-start",gap:20}},ze),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,n=e.healthInfoMessageReceived,i=e.healthInfoResetMessage,r=e.message,o=e.setSnackBarMessage,s=e.setServerDiagStat,l=e.serverDiagnosticStatus,d=Object(a.useState)(!1),u=Object(h.a)(d,2),b=u[0],j=u[1],m=Object(a.useState)(!0),p=Object(h.a)(m,2),O=p[0],f=p[1];return Object(a.useEffect)((function(){l===vb&&r!=={}&&f(!1),l===yb&&f(!0),j(!1)}),[l,r]),Object(a.useEffect)((function(){if(b){i();var e=new URL(window.location.toString()),t=e.port,a=Zu(e.protocol),c=new Vu.w3cwebsocket("".concat(a,"://").concat(e.hostname,":").concat(t,"/ws/health-info?deadline=1h")),r=null;null!==c&&(c.onopen=function(){console.log("WebSocket Client Connected"),c.send("ok"),r=setInterval((function(){c.send("ok")}),1e4),o("Diagnostic started. Please do not refresh page during diagnosis."),s(yb)},c.onmessage=function(e){var t=JSON.parse(e.data.toString());t.timestamp=new Date(t.timestamp.toString()),n(t)},c.onerror=function(e){console.log("error closing websocket:",e.message),c.close(1e3),clearInterval(r),s(xb)},c.onclose=function(e){clearInterval(r),1011===e.code||1008===e.code||1006===e.code?(console.log("connection closed by server with code:",e.code),o("An error occurred while getting Diagnostic file."),s(xb)):(console.log("connection closed by server"),o("Diagnostic file is ready to be downloaded."),s(vb))})}else j(!1)}),[n,i,b,o,s]),Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsx)(na,{label:"Diagnostic"}),Object(Se.jsx)(y.a,{container:!0,children:Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.container,children:Object(Se.jsxs)(y.a,{container:!0,className:t.buttons,children:[Object(Se.jsx)(y.a,{item:!0,children:Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",disabled:b,onClick:function(){return j(!0)},children:"Start Diagnostic"})},"start-diag"),Object(Se.jsx)(y.a,{item:!0,children:l===yb?Object(Se.jsx)("div",{className:t.loading,children:Object(Se.jsx)(k.a,{size:25})}):Object(Se.jsx)(x.a,{type:"submit",variant:"contained",color:"primary",onClick:function(){!function(e,t){var n=document.createElement("a");n.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(t)),n.setAttribute("download",e),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)}("diagnostic.json",JSON.stringify(r,null,2))},disabled:O,children:"Download"})},"start-download")]})})})]})}))),Cb={setErrorSnackMessage:H},kb=Object(o.b)(null,Cb),wb=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)({headerLabel:{fontSize:22,fontWeight:600,color:"#000",marginTop:4},breadcrumLink:{textDecoration:"none",color:"black"},tableWrapper:{height:"calc(100vh - 267px)"}},ze),Ke),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(kb((function(e){var t=e.classes,n=e.setErrorSnackMessage,c=Object(a.useState)([]),i=Object(h.a)(c,2),r=i[0],o=i[1],s=Object(a.useState)(""),l=Object(h.a)(s,2),d=l[0],u=l[1],b=Object(a.useState)(!0),j=Object(h.a)(b,2),m=j[0],p=j[1];Object(a.useEffect)((function(){m&&ye.invoke("GET","/api/v1/list-pvcs").then((function(e){var t=X()(e,"pvcs",[]);o(t||[]),p(!1)})).catch((function(e){p(!1),n(e)}))}),[m,n]);var O=r.filter((function(e){return e.name.includes(d)}));return Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.actionsTray,children:Object(Se.jsx)(v.a,{placeholder:"Search PVC",className:t.searchField,id:"search-resource",label:"",InputProps:{disableUnderline:!0,startAdornment:Object(Se.jsx)(lt.a,{position:"start",children:Object(Se.jsx)(ut.a,{})})},onChange:function(e){u(e.target.value)}})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(kn,{itemActions:[],columns:[{label:"Name",elementKey:"name"},{label:"Namespace",elementKey:"namespace",width:90},{label:"Status",elementKey:"status",width:120},{label:"Volume",elementKey:"volume"},{label:"Capacity",elementKey:"capacity",width:90},{label:"Storage Class",elementKey:"storageClass"}],isLoading:m,records:O,entityName:"PVCs",idField:"name",customPaperHeight:t.tableWrapper})})]})}))),Nb="DIRECT_CSI/SELECT_DRIVE",Tb={setErrorSnackMessage:H},Eb=Object(o.b)(null,Tb)((function(e){var t=e.closeFormatModalAndRefresh,n=e.deleteOpen,c=e.allDrives,i=e.drivesToFormat,r=e.setErrorSnackMessage,o=Object(a.useState)(!1),s=Object(h.a)(o,2),l=s[0],d=s[1],u=Object(a.useState)(""),b=Object(h.a)(u,2),j=b[0],m=b[1],p=Object(a.useState)(!1),O=Object(h.a)(p,2),f=O[0],g=O[1];return Object(Se.jsxs)(wn.a,{open:n,onClose:function(){t(!1,[])},"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[Object(Se.jsxs)(Nn.a,{id:"alert-dialog-title",children:["Format ",c?"All ":"","Drives"]}),Object(Se.jsx)(Tn.a,{children:Object(Se.jsxs)($n.a,{id:"alert-dialog-description",children:[!c&&Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(oa,{label:"Selected Drive".concat(i.length>1?"s":""),content:i.join(", ")}),Object(Se.jsx)("br",{})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Zn,{value:"force",id:"force",name:"force",checked:f,onChange:function(e){g(e.target.checked)},label:"Force Format",indicatorLabels:["Yes","No"]})}),"Are you sure you want to format"," ",c?Object(Se.jsx)("strong",{children:"All"}):"the selected"," drive",i.length>1||c?"s":"","?.",Object(Se.jsx)("br",{}),Object(Se.jsx)("br",{}),Object(Se.jsx)("strong",{children:"All information contained will be erased and cannot be recovered"}),Object(Se.jsx)("br",{}),Object(Se.jsx)("br",{}),"To continue please type ",Object(Se.jsx)("b",{children:"YES, PROCEED"})," in the box.",Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(Dn,{id:"format-confirm",name:"format-confirm",onChange:function(e){m(e.target.value)},label:"",value:j})})]})}),l&&Object(Se.jsx)(C.a,{}),Object(Se.jsxs)(Xn.a,{children:[Object(Se.jsx)(x.a,{onClick:function(){t(!1,[])},color:"primary",disabled:l,children:"Cancel"}),Object(Se.jsxs)(x.a,{onClick:function(){l||(d(!0),ye.invoke("POST","/api/v1/direct-csi/drives/format",{drives:i,force:f}).then((function(e){d(!1),t(!0,e.formatIssuesList)})).catch((function(e){d(!1),r(e)})))},color:"secondary",autoFocus:!0,disabled:"YES, PROCEED"!==j,children:["Format Drive",i.length>1||c?"s":""]})]})]})})),Ab=Object(E.a)((function(e){return Object(N.a)({warningBlock:{color:"red"},buttonContainer:{textAlign:"right"},errorsList:{height:"calc(100vh - 280px)"}})}))((function(e){var t=e.open,n=e.onCloseFormatErrorsList,a=e.errorsList,c=e.classes;return Object(Se.jsx)(_n,{modalOpen:t,title:"Format Errors",onClose:n,children:Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsxs)(y.a,{item:!0,xs:12,className:c.formScrollable,children:["There were some issues trying to format the selected CSI Drives, please fix the issues and try again.",Object(Se.jsx)("br",{}),Object(Se.jsx)(kn,{columns:[{label:"Node",elementKey:"node"},{label:"Drive",elementKey:"drive"},{label:"Message",elementKey:"error"}],entityName:"Format Errors",idField:"drive",records:a,isLoading:!1,customPaperHeight:c.errorsList,textSelectable:!0,noBackground:!0})]}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:c.buttonContainer,children:[Object(Se.jsx)(x.a,{onClick:function(){!function(e,t){var n=document.createElement("a");n.setAttribute("href","data:application/json;charset=utf-8,"+encodeURIComponent(t)),console.log(e),n.setAttribute("download",e),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)}("csiFormatErrors.json",JSON.stringify(Object(st.a)(a)))},color:"primary",children:"Download"}),Object(Se.jsx)(x.a,{onClick:n,color:"secondary",autoFocus:!0,children:"Done"})]})]})})})),_b={setErrorSnackMessage:H,selectDrive:function(e){return{type:Nb,driveName:e}}},Ib=Object(o.b)(null,_b),Lb=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)({headerLabel:{fontSize:22,fontWeight:600,color:"#000",marginTop:4},tableWrapper:{height:"calc(100vh - 275px)"},notAvailableNotice:{border:"#EAEDEE 1px solid",backgroundColor:"#FFF",display:"flex",padding:"19px 38px",overflow:"auto",position:"relative",boxShadow:"none",minHeight:200,overflowY:"scroll",borderRadius:3,flexDirection:"column",alignItems:"center",justifyContent:"center",height:"calc(100vh - 275px)",fontSize:18,fontWeight:600,textAlign:"center"},linkItem:{display:"default",color:"#072F51",textDecoration:"none","&:hover":{textDecoration:"underline",color:"#000"}}},ze),Ke),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(Ib((function(e){var t=e.classes,n=(e.selectDrive,e.setErrorSnackMessage),c=Object(a.useState)([]),i=Object(h.a)(c,2),r=i[0],o=i[1],s=Object(a.useState)(""),l=Object(h.a)(s,2),d=l[0],u=l[1],b=Object(a.useState)([]),j=Object(h.a)(b,2),p=j[0],O=j[1],f=Object(a.useState)(!0),g=Object(h.a)(f,2),S=g[0],C=g[1],k=Object(a.useState)(!1),w=Object(h.a)(k,2),N=w[0],T=w[1],E=Object(a.useState)(!1),A=Object(h.a)(E,2),_=A[0],I=A[1],L=Object(a.useState)([]),D=Object(h.a)(L,2),F=D[0],M=D[1],R=Object(a.useState)(!1),B=Object(h.a)(R,2),P=B[0],z=B[1],K=Object(a.useState)([]),U=Object(h.a)(K,2),W=U[0],G=U[1],q=Object(a.useState)(!0),V=Object(h.a)(q,2),H=V[0],Y=V[1];Object(a.useEffect)((function(){S&&ye.invoke("GET","/api/v1/direct-csi/drives").then((function(e){var t=X()(e,"drives",[]);t||(t=[]),(t=t.map((function(e){var t=Object(m.a)({},e);return t.joinName="".concat(t.node,":").concat(t.drive),t}))).sort((function(e,t){return e.drive>t.drive?1:e.drive<t.drive?-1:0})),o(t),C(!1),Y(!1)})).catch((function(e){C(!1),Y(!0)}))}),[S,n,H]);var Q=[{type:"format",onClick:function(e){G([e]),I(!1),T(!0)},sendOnlyId:!0}],Z=r.filter((function(e){return e.drive.includes(d)}));return Object(Se.jsxs)(a.Fragment,{children:[N&&Object(Se.jsx)(Eb,{closeFormatModalAndRefresh:function(e,t){T(!1),e&&(t&&t.length>0&&(M(t),z(!0)),C(!0),O([]))},deleteOpen:N,allDrives:_,drivesToFormat:W}),P&&Object(Se.jsx)(Ab,{errorsList:F,open:P,onCloseFormatErrorsList:function(){z(!1)}}),Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.actionsTray,children:[Object(Se.jsx)(v.a,{placeholder:"Search Drives",className:t.searchField,id:"search-resource",label:"",InputProps:{disableUnderline:!0,startAdornment:Object(Se.jsx)(lt.a,{position:"start",children:Object(Se.jsx)(ut.a,{})})},onChange:function(e){u(e.target.value)},disabled:H}),Object(Se.jsx)(Vt.a,{color:"primary","aria-label":"Refresh Tenant List",component:"span",onClick:function(){C(!0)},disabled:H,children:Object(Se.jsx)(rc.a,{})}),Object(Se.jsx)(x.a,{variant:"contained",color:"primary",startIcon:Object(Se.jsx)(wr.a,{}),disabled:p.length<=0||H,onClick:function(){p.length>0&&(G(p),I(!1),T(!0))},children:"Format Selected Drives"}),Object(Se.jsx)(x.a,{variant:"contained",color:"primary",startIcon:Object(Se.jsx)(ft,{}),onClick:function(){var e=r.map((function(e){return"".concat(e.node,":").concat(e.drive)}));I(!0),G(e),T(!0)},disabled:H,children:"Format All Drives"})]}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:H&&!S?Object(Se.jsxs)("div",{className:t.notAvailableNotice,children:["To manage locally attached drives you need to install direct-csi, for more information",Object(Se.jsx)("br",{}),"please follow this",Object(Se.jsx)("a",{href:"https://github.com/minio/direct-csi",rel:"noreferrer",target:"_blank",className:t.linkItem,children:"Link"})]}):Object(Se.jsx)(kn,{itemActions:Q,columns:[{label:"Drive",elementKey:"drive"},{label:"Capacity",elementKey:"capacity",renderFunction:oe},{label:"Allocated",elementKey:"allocated",renderFunction:oe},{label:"Volumes",elementKey:"volumes"},{label:"Node",elementKey:"node"},{label:"Status",elementKey:"status"}],onSelect:function(e){var t=e.target,n=t.value,a=t.checked,c=Object(st.a)(p);return a?c.push(n):c=c.filter((function(e){return e!==n})),O(c),c},selectedItems:p,isLoading:S,records:Z,customPaperHeight:t.tableWrapper,entityName:"Drives",idField:"joinName"})})]})}))),Db=["/storage/volumes","/storage/drives"],Fb=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)({headerLabel:{fontSize:22,fontWeight:600,color:"#000",marginTop:4},tabsContainer:{marginBottom:15}},ze),Ke),(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,n=e.match,c=Object(a.useState)(0),i=Object(h.a)(c,2),r=i[0],o=i[1];Object(a.useEffect)((function(){var e=Db.findIndex((function(e){return e===n.path}));o(e)}),[n]);return Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(na,{label:"Storage"}),Object(Se.jsx)(y.a,{container:!0,children:Object(Se.jsxs)(y.a,{item:!0,xs:12,className:t.container,children:[Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.tabsContainer,children:Object(Se.jsxs)(ja.a,{value:r,onChange:function(e,t){j.push(Db[t])},indicatorColor:"primary",textColor:"primary","aria-label":"cluster-tabs",children:[Object(Se.jsx)(ha.a,{label:"Volumes"}),Object(Se.jsx)(ha.a,{label:"Drives"})]})}),Object(Se.jsx)(s.c,{history:j,children:Object(Se.jsxs)(s.d,{children:[Object(Se.jsx)(s.b,{path:Db[0],component:wb}),Object(Se.jsx)(s.b,{path:Db[1],component:Lb}),Object(Se.jsx)(s.b,{render:function(){return Object(Se.jsx)(s.a,{to:"/storage/volumes"})}})]})})]})})]})})),Mb=Object(o.b)(null,{setErrorSnackMessage:H}),Rb=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)({logList:{background:"#fff",minHeight:400,height:"calc(100vh - 304px)",overflow:"auto",fontSize:13,padding:"25px 45px 0",border:"1px solid #EAEDEE",borderRadius:4}},$e),Ke),{},{actionsTray:Object(m.a)(Object(m.a)({},ze.actionsTray),{},{padding:"15px 0 0"}),logerror:{color:"#A52A2A"},logerror_tab:{color:"#A52A2A",paddingLeft:25},ansidefault:{color:"#000"},highlight:{"& span":{backgroundColor:"#082F5238"}}},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))(Mb((function(e){var t=e.classes,n=e.tenant,i=e.namespace,r=e.podName,o=e.propLoading,s=e.setErrorSnackMessage,l=Object(a.useState)(""),d=Object(h.a)(l,2),u=d[0],b=d[1],j=Object(a.useState)([]),m=Object(h.a)(j,2),p=m[0],O=m[1],f=Object(a.useState)(!0),g=Object(h.a)(f,2),x=g[0],S=g[1];Object(a.useEffect)((function(){o&&S(!0)}),[o]);var C=p.map((function(e,n){return function(e,n){var a=(e=e.replace(/([^\x20-\x7F])/g,"")).replace(/((\[[0-9;]+m))/g,""),c=""!==u&&e.toLowerCase().includes(u.toLowerCase());return a.startsWith(" ")?Object(Se.jsx)("div",{className:"".concat(c?t.highlight:""),children:Object(Se.jsx)("span",{className:t.tab,children:a})},n):Object(Se.jsx)("div",{className:"".concat(c?t.highlight:""),children:Object(Se.jsx)("span",{className:t.ansidefault,children:a})},n)}(e,n)}));return Object(a.useEffect)((function(){x&&ye.invoke("GET","/api/v1/namespaces/".concat(i,"/tenants/").concat(n,"/pods/").concat(r)).then((function(e){O(e.split("\n")),S(!1)})).catch((function(e){s(e),S(!1)}))}),[x,r,i,n,s]),Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.actionsTray,children:Object(Se.jsx)(v.a,{placeholder:"Highlight Line",className:t.searchField,id:"search-resource",label:"",onChange:function(e){b(e.target.value)},InputProps:{disableUnderline:!0,startAdornment:Object(Se.jsx)(lt.a,{position:"start",children:Object(Se.jsx)(ut.a,{})})}})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)("br",{})}),Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(w.a,{children:Object(Se.jsx)("div",{className:t.logList,children:C})})})]})}))),Bb=Object(o.b)(null,{setErrorSnackMessage:H}),Pb=Object(E.a)((function(e){return Object(N.a)(Object(m.a)(Object(m.a)(Object(m.a)(Object(m.a)(Object(m.a)({},ze),$e),Ke),Xe),{},{actionsTray:Object(m.a)(Object(m.a)({},ze.actionsTray),{},{padding:"15px 0 0"})}))}))(Bb((function(e){var t=e.classes,n=e.tenant,i=e.namespace,r=e.podName,o=e.propLoading,s=e.setErrorSnackMessage,l=Object(a.useState)([]),d=Object(h.a)(l,2),u=d[0],b=d[1],j=Object(a.useState)(!1),m=Object(h.a)(j,2),p=m[0],O=m[1];return Object(a.useEffect)((function(){o&&O(!0)}),[o]),Object(a.useEffect)((function(){p&&ye.invoke("GET","/api/v1/namespaces/".concat(i,"/tenants/").concat(n,"/pods/").concat(r,"/events")).then((function(e){for(var t=0;t<e.length;t++){var n=Date.now()/1e3|0;e[t].seen=Oe((n-e[t].last_seen).toString())}b(e),O(!1)})).catch((function(e){s(e),O(!1)}))}),[p,r,i,n,s]),Object(Se.jsx)(c.a.Fragment,{children:Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.actionsTray,children:Object(Se.jsx)(kn,{itemActions:[],columns:[{label:"Namespace",elementKey:"namespace"},{label:"Last Seen",elementKey:"seen"},{label:"Message",elementKey:"message"},{label:"Event Type",elementKey:"event_type"},{label:"Reason",elementKey:"reason"}],isLoading:p,records:u,entityName:"Events",idField:"event"})})})}))),zb=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({breadcrumLink:{textDecoration:"none",color:"black"}},(e.spacing(4),{container:{padding:"110px 33px 0","& h6":{color:"#777777",fontSize:14},"& p":{"& span:not(*[class*='smallUnit'])":{fontSize:16}}}})))}))((function(e){var t=e.classes,n=e.match,i=Object(a.useState)(0),r=Object(h.a)(i,2),o=r[0],s=r[1],l=Object(a.useState)(!0),d=Object(h.a)(l,2),u=d[0],b=d[1],j=n.params.tenantNamespace,p=n.params.tenantName,O=n.params.podName;function f(e){return{id:"simple-tab-".concat(e),"aria-controls":"simple-tabpanel-".concat(e)}}return Object(a.useEffect)((function(){u&&b(!1)}),[u]),Object(Se.jsxs)(c.a.Fragment,{children:[Object(Se.jsx)(na,{label:Object(Se.jsxs)(a.Fragment,{children:[Object(Se.jsx)(nn.a,{to:"/tenants",className:t.breadcrumLink,children:"Tenants"})," > ",Object(Se.jsx)(nn.a,{to:"/namespaces/".concat(j,"/tenants/").concat(p),className:t.breadcrumLink,children:p})," > Pods > ".concat(O)]}),actions:Object(Se.jsx)(Vt.a,{color:"primary","aria-label":"Refresh List",component:"span",onClick:function(){b(!0)},children:Object(Se.jsx)(rc.a,{})})}),Object(Se.jsx)(y.a,{item:!0,xs:12,className:t.container}),Object(Se.jsxs)(y.a,{container:!0,children:[Object(Se.jsx)(y.a,{item:!0,xs:9,children:Object(Se.jsxs)(ja.a,{value:o,onChange:function(e,t){s(t)},indicatorColor:"primary",textColor:"primary","aria-label":"cluster-tabs",variant:"scrollable",scrollButtons:"auto",children:[Object(Se.jsx)(ha.a,Object(m.a)({label:"Events"},f(0))),Object(Se.jsx)(ha.a,Object(m.a)({label:"Logs"},f(1)))]})}),0===o&&Object(Se.jsx)(Pb,{tenant:p,namespace:j,podName:O,propLoading:u}),1===o&&Object(Se.jsx)(Rb,{tenant:p,namespace:j,podName:O,propLoading:u})]})]})})),Kb=Object(o.b)(null,{displayErrorMessage:H}),Ub=Object(E.a)((function(e){return Object(N.a)({})}))(Kb((function(e){e.classes;var t=e.displayErrorMessage,n=Object(a.useState)(!0),c=Object(h.a)(n,2),i=c[0],r=c[1],o=Object(a.useState)(null),s=Object(h.a)(o,2),l=s[0],d=s[1],u=Object(a.useCallback)((function(){ye.invoke("GET","/api/v1/admin/info").then((function(e){d(e),r(!1)})).catch((function(e){t(e),r(!1)}))}),[d,r,t]);Object(a.useEffect)((function(){i&&u()}),[i,u]);var b=X()(l,"widgets",null);return Object(Se.jsx)(a.Fragment,{children:Object(Se.jsx)(y.a,{container:!0,children:i?Object(Se.jsx)(y.a,{item:!0,xs:12,children:Object(Se.jsx)(C.a,{})}):Object(Se.jsx)(a.Fragment,{children:null!==b?Object(Se.jsx)(y.a,{container:!0,children:Object(Se.jsx)(Di,{})}):Object(Se.jsx)(Ri,{usage:l})})})})}))),Wb=Object(o.b)((function(e){return{open:e.system.sidebarOpen,needsRestart:e.system.serverNeedsRestart,isServerLoading:e.system.serverIsLoading,session:e.console.session,loadingProgress:e.system.loadingProgress,snackBarMessage:e.system.snackBar}}),{setMenuOpen:W,serverNeedsRestart:G,serverIsLoading:function(e){return{type:D,isLoading:e}},setSnackBarMessage:V}),Gb=Object(E.a)((function(e){return Object(N.a)(Object(m.a)({root:{display:"flex","& .MuiPaper-root.MuiSnackbarContent-root":{borderRadius:"0px 0px 5px 5px",boxShadow:"none"}},toolbar:{background:e.palette.background.default,color:"black",paddingRight:24},toolbarIcon:Object(m.a)({display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"0 8px"},e.mixins.toolbar),appBar:{zIndex:e.zIndex.drawer+1,transition:e.transitions.create(["width","margin"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen})},appBarShift:{marginLeft:245,width:"calc(100% - ".concat(245,"px)"),transition:e.transitions.create(["width","margin"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen})},menuButton:{marginRight:36},menuButtonHidden:{display:"none"},title:{flexGrow:1},drawerPaper:{position:"relative",whiteSpace:"nowrap",width:245,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden",background:"transparent linear-gradient(90deg, #073052 0%, #081C42 100%) 0% 0% no-repeat padding-box",boxShadow:"0px 3px 7px #00000014"},drawerPaperClose:Object(Ne.a)({overflowX:"hidden",transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),width:e.spacing(7)},e.breakpoints.up("sm"),{width:e.spacing(9)}),content:{flexGrow:1,height:"100vh",overflow:"auto",position:"relative"},container:{paddingBottom:e.spacing(4),margin:0,width:"100%",maxWidth:"initial"},paper:{padding:e.spacing(2),display:"flex",overflow:"auto",flexDirection:"column"},fixedHeight:{minHeight:240},warningBar:{background:e.palette.primary.main,color:"white",heigh:"60px",widht:"100%",lineHeight:"60px",textAlign:"center"},progress:{height:"3px",backgroundColor:"#eaeaea"}},Ze))}))(Wb((function(e){var t=e.classes,n=e.open,c=e.needsRestart,i=e.isServerLoading,r=e.serverNeedsRestart,o=e.serverIsLoading,l=e.session,d=e.loadingProgress,u=e.snackBarMessage,b=e.setSnackBarMessage,p=Object(a.useState)(!1),O=Object(h.a)(p,2),f=O[0],g=O[1],v=l.pages.reduce((function(e,t,n){return e[t]=!0,e}),{}),y=[{component:Pi,path:"/dashboard"},{component:Ub,path:"/metrics"},{component:Nc,path:"/buckets"},{component:Nc,path:"/buckets/:bucketName"},{component:Nc,path:"/buckets/:bucketName/summary"},{component:Nc,path:"/buckets/:bucketName/events"},{component:Nc,path:"/buckets/:bucketName/replication"},{component:Nc,path:"/buckets/:bucketName/lifecycle"},{component:Nc,path:"/buckets/:bucketName/access"},{component:Nc,path:"/buckets/:bucketName/access"},{component:Nc,path:"/buckets/:bucketName/access/policies"},{component:Nc,path:"/buckets/:bucketName/access/users"},{component:zd,path:"/object-browser"},{component:_u,path:"/object-browser/:bucket"},{component:_u,path:"/object-browser/:bucket/*"},{component:Ob,path:"/watch"},{component:mo,path:"/users/:userName"},{component:mo,path:"/users"},{component:No,path:"/groups"},{component:Uc,path:"/policies/:policyName"},{component:Uc,path:"/policies"},{component:jb,path:"/heal"},{component:eb,path:"/trace"},{component:db,path:"/logs"},{component:Sb,path:"/health-info"},{component:As,path:"/settings"},{component:Cr,path:"/account",props:{changePassword:l.pages.includes("/account/change-password")}},{component:Ds,path:"/webhook/logger"},{component:Ds,path:"/webhook/audit"},{component:ql,path:"/tenants"},{component:Fb,path:"/storage"},{component:Fb,path:"/storage/volumes"},{component:Fb,path:"/storage/drives"},{component:fd,path:"/namespaces/:tenantNamespace/tenants/:tenantName"},{component:zb,path:"/namespaces/:tenantNamespace/tenants/:tenantName/pods/:podName"},{component:fd,path:"/namespaces/:tenantNamespace/tenants/:tenantName/summary"},{component:fd,path:"/namespaces/:tenantNamespace/tenants/:tenantName/metrics"},{component:fd,path:"/namespaces/:tenantNamespace/tenants/:tenantName/pods"},{component:fd,path:"/namespaces/:tenantNamespace/tenants/:tenantName/pools"},{component:fd,path:"/namespaces/:tenantNamespace/tenants/:tenantName/license"},{component:fd,path:"/namespaces/:tenantNamespace/tenants/:tenantName/security"},{component:qu,path:"/license"}].filter((function(e){return v[e.path]}));Object(a.useEffect)((function(){""!==u.message?g(!0):g(!1)}),[u]);var S=Object(s.g)();return Object(Se.jsx)(a.Fragment,{children:"ok"===l.status?Object(Se.jsxs)("div",{className:t.root,children:[Object(Se.jsx)(Ee.a,{}),"/metrics"!==S.pathname&&Object(Se.jsx)(Ae.a,{variant:"permanent",classes:{paper:Object(Te.a)(t.drawerPaper,!n&&t.drawerPaperClose)},open:n,children:Object(Se.jsx)(sr,{pages:l.pages})}),Object(Se.jsxs)("main",{className:t.content,children:[c&&Object(Se.jsx)("div",{className:t.warningBar,children:i?Object(Se.jsxs)(a.Fragment,{children:["The server is restarting.",Object(Se.jsx)(C.a,{className:t.progress})]}):Object(Se.jsxs)(a.Fragment,{children:["The instance needs to be restarted for configuration changes to take effect."," ",Object(Se.jsx)(x.a,{color:"secondary",size:"small",onClick:function(){o(!0),ye.invoke("POST","/api/v1/service/restart",{}).then((function(e){console.log("success restarting service"),console.log(e),o(!1),r(!1)})).catch((function(e){o(!1),console.log("failure restarting service"),console.log(e)}))},children:"Restart"})]})}),d<100&&Object(Se.jsx)(C.a,{className:t.progress,variant:"determinate",value:d}),Object(Se.jsx)("div",{className:t.snackDiv,children:Object(Se.jsx)(Ie.a,{open:f,onClose:function(){g(!1),b("")},autoHideDuration:"error"===u.type?1e4:5e3,message:u.message,className:t.snackBarExternal,ContentProps:{className:"".concat(t.snackBar," ").concat("error"===u.type?t.errorSnackBar:"")}})}),Object(Se.jsx)(_e.a,{className:t.container,children:Object(Se.jsx)(s.c,{history:j,children:Object(Se.jsxs)(s.d,{children:[y.map((function(e){return Object(Se.jsx)(s.b,{exact:!0,path:e.path,children:function(t){return Object(Se.jsx)(e.component,Object(m.a)(Object(m.a)({},t),e.props))}},e.path)})),y.length>0?Object(Se.jsx)(s.a,{to:y[0].path}):null]})})})]})]}):null})}))),qb=function(e){var t=e.location,n=Object(a.useState)(""),c=Object(h.a)(n,2),i=c[0],r=c[1],o=Object(a.useState)(""),s=Object(h.a)(o,2),l=s[0],d=s[1];return Object(a.useEffect)((function(){var e=(t.search.match(/code=([^&]+)/)||[])[1],n=(t.search.match(/state=([^&]+)/)||[])[1],a=(t.search.match(/error=([^&]+)/)||[])[1],c=(t.search.match(/error_description=([^&]+)/)||[])[1];void 0!==a||void 0!==c?(r(a),d(c)):ye.invoke("POST","/api/v1/login/oauth2/auth",{code:e,state:n}).then((function(e){e&&e.sessionId&&(te.a.setItem("token",e.sessionId),window.location.href="/")})).catch((function(e){window.location.href="/login"}))}),[t.search]),""!==i||""!==l?Object(Se.jsxs)("div",{children:[Object(Se.jsx)("h2",{children:"IDP Error:"}),Object(Se.jsx)("p",{children:i}),Object(Se.jsx)("p",{children:l})]}):null},Vb=n(355),Hb="SESSION_RESPONSE";var Yb=Object(o.b)((function(e){return{loggedIn:e.system.loggedIn}}),{userLoggedIn:U,consoleOperatorMode:function(e){return{type:_,operatorMode:e}},saveSessionResponse:function(e){return{type:Hb,message:e}},setDistributedMode:function(e){return{type:K,distributedSetup:e}}})((function(e){var t=e.Component,n=e.loggedIn,c=e.userLoggedIn,i=e.consoleOperatorMode,r=e.saveSessionResponse,o=e.setDistributedMode,l=Object(a.useState)(!0),d=Object(h.a)(l,2),u=d[0],b=d[1];return Object(a.useEffect)((function(){ye.invoke("GET","/api/v1/session").then((function(e){r(e),c(!0),b(!1),o(e.distributedMode||!1),e.operator&&(i(!0),document.title="MinIO Operator")})).catch((function(){return b(!1)}))}),[r,i,c,o]),u?null:n?Object(Se.jsx)(t,{}):Object(Se.jsx)(s.a,{to:{pathname:"/login"}})})),Qb=Object(Vb.hot)((function(){return Object(Se.jsx)(s.c,{history:j,children:Object(Se.jsxs)(s.d,{children:[Object(Se.jsx)(s.b,{exact:!0,path:"/oauth_callback",component:qb}),Object(Se.jsx)(s.b,{exact:!0,path:"/login",component:we}),Object(Se.jsx)(Yb,{Component:Gb})]})})})),Zb=n(165),Jb=n(356),$b={loggedIn:!1,operatorMode:!1,session:"",userName:"",sidebarOpen:!0,serverNeedsRestart:!1,serverIsLoading:!1,loadingProgress:100,snackBar:{message:"",type:"message"},modalSnackBar:{message:"",type:"message"},serverDiagnosticStatus:"",distributedSetup:!1};var Xb={messages:[],traceStarted:!1};var ej={messages:[]};var tj={message:{}};var nj={messages:[]};var aj={session:{operator:!1,status:"",pages:[],features:[],distributedMode:!1}};var cj={open:!1,addBucketName:"",addBucketVersioningEnabled:!1,addBucketLockingEnabled:!1,addBucketQuotaEnabled:!1,addBucketQuotaType:"hard",addBucketQuotaSize:"1",addBucketQuotaUnit:"TiB",addBucketRetentionEnabled:!1,addBucketRetentionMode:"compliance",addBucketRetentionUnit:"days",addBucketRetentionValidity:1,bucketDetails:{selectedTab:"summary"}};var ij=[{route:"/object-browser",label:"All Buckets",type:"path"}],rj={routesList:ij,downloadingFiles:[],rewind:Object(m.a)({},{rewindEnabled:!1,bucketToRewind:"",dateToRewind:null})};var oj=n(357),sj=n.n(oj),lj={createTenant:{page:0,validPages:[],advancedModeOn:!1,storageClasses:[],limitSize:{},fields:{nameTenant:{tenantName:"",namespace:"",selectedStorageClass:""},configure:{customImage:!1,imageName:"",consoleImage:"",customDockerhub:!1,imageRegistry:"",imageRegistryUsername:"",imageRegistryPassword:"",exposeMinIO:!0,exposeConsole:!0,logSearchCustom:!1,prometheusCustom:!1,logSearchVolumeSize:"5",logSearchSizeFactor:"Gi",logSearchImage:"",kesImage:"",logSearchPostgresImage:"",prometheusVolumeSize:"5",prometheusSizeFactor:"Gi",logSearchSelectedStorageClass:"",prometheusSelectedStorageClass:"",prometheusImage:""},identityProvider:{idpSelection:"Built-in",accessKeys:[pl(16)],secretKeys:[pl(32)],openIDURL:"",openIDClientID:"",openIDSecretID:"",ADURL:"",ADSkipTLS:!1,ADServerInsecure:!1,ADUserNameFilter:"",ADGroupBaseDN:"",ADGroupSearchFilter:"",ADNameAttribute:""},security:{enableAutoCert:!0,enableCustomCerts:!1,enableTLS:!0},encryption:{enableEncryption:!1,encryptionType:"vault",gemaltoEndpoint:"",gemaltoToken:"",gemaltoDomain:"",gemaltoRetry:"0",awsEndpoint:"",awsRegion:"",awsKMSKey:"",awsAccessKey:"",awsSecretKey:"",awsToken:"",vaultEndpoint:"",vaultEngine:"",vaultNamespace:"",vaultPrefix:"",vaultAppRoleEngine:"",vaultId:"",vaultSecret:"",vaultRetry:"0",vaultPing:"0",gcpProjectID:"",gcpEndpoint:"",gcpClientEmail:"",gcpClientID:"",gcpPrivateKeyID:"",gcpPrivateKey:"",enableCustomCertsForKES:!1},tenantSize:{volumeSize:"100",sizeFactor:"Gi",drivesPerServer:"1",nodes:"4",memoryNode:"2",ecParity:"",ecParityChoices:[],cleanECChoices:[],maxAllocableMemo:0,memorySize:{error:"",limit:0,request:0},distribution:{error:"",nodes:0,persistentVolumes:0,disks:0,volumePerDisk:0},ecParityCalc:{error:0,defaultEC:"",erasureCodeSet:0,maxEC:"",rawCapacity:"0",storageFactors:[]},limitSize:{}},affinity:{nodeSelectorLabels:"",podAffinity:"default",withPodAntiAffinity:!0}},certificates:{minioCertificates:[{id:Date.now().toString(),key:"",cert:"",encoded_key:"",encoded_cert:""}],caCertificates:[{id:Date.now().toString(),key:"",cert:"",encoded_key:"",encoded_cert:""}],consoleCaCertificates:[{id:Date.now().toString(),key:"",cert:"",encoded_key:"",encoded_cert:""}],consoleCertificate:{id:"console_cert_pair",key:"",cert:"",encoded_key:"",encoded_cert:""},serverCertificate:{id:"encryptionServerCertificate",key:"",cert:"",encoded_key:"",encoded_cert:""},clientCertificate:{id:"encryptionClientCertificate",key:"",cert:"",encoded_key:"",encoded_cert:""},vaultCertificate:{id:"encryptionVaultCertificate",key:"",cert:"",encoded_key:"",encoded_cert:""},vaultCA:{id:"encryptionVaultCA",key:"",cert:"",encoded_key:"",encoded_cert:""},gemaltoCA:{id:"encryptionGemaltoCA",key:"",cert:"",encoded_key:"",encoded_cert:""}}},tenantDetails:{currentTenant:"",currentNamespace:"",loadingTenant:!1,tenantInfo:null,currentTab:"summary"}};var dj={selectedDrive:""};var uj=Object(Zb.b)({system:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$b,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case A:return Object(m.a)(Object(m.a)({},e),{},{loggedIn:t.logged});case _:return Object(m.a)(Object(m.a)({},e),{},{operatorMode:t.operatorMode});case I:return Object(m.a)(Object(m.a)({},e),{},{sidebarOpen:t.open});case L:return Object(m.a)(Object(m.a)({},e),{},{serverNeedsRestart:t.needsRestart});case D:return Object(m.a)(Object(m.a)({},e),{},{serverIsLoading:t.isLoading});case F:return Object(m.a)(Object(m.a)({},e),{},{loadingProgress:t.loadingProgress});case M:return Object(m.a)(Object(m.a)({},e),{},{snackBar:{message:t.message,type:"message"}});case B:return Object(m.a)(Object(m.a)({},e),{},{snackBar:{message:t.message,type:"error"}});case P:return Object(m.a)(Object(m.a)({},e),{},{modalSnackBar:{message:t.message,type:"message"}});case z:return Object(m.a)(Object(m.a)({},e),{},{modalSnackBar:{message:t.message,type:"error"}});case R:return Object(m.a)(Object(m.a)({},e),{},{serverDiagnosticStatus:t.serverDiagnosticStatus});case K:return Object(m.a)(Object(m.a)({},e),{},{distributedSetup:t.distributedSetup});default:return e}},trace:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Xb,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Hu:return Object(m.a)(Object(m.a)({},e),{},{messages:[].concat(Object(st.a)(e.messages),[t.message])});case Yu:return Object(m.a)(Object(m.a)({},e),{},{messages:[]});case Qu:return Object(m.a)(Object(m.a)({},e),{},{traceStarted:t.status});default:return e}},logs:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ej,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case tb:return Object(m.a)(Object(m.a)({},e),{},{messages:[].concat(Object(st.a)(e.messages),[t.message])});case nb:return Object(m.a)(Object(m.a)({},e),{},{messages:[]});default:return e}},watch:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:nj,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case hb:return Object(m.a)(Object(m.a)({},e),{},{messages:[].concat(Object(st.a)(e.messages),[t.message])});case mb:return Object(m.a)(Object(m.a)({},e),{},{messages:[]});default:return e}},console:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:aj,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Hb:return Object(m.a)(Object(m.a)({},e),{},{session:t.message});default:return e}},buckets:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:cj,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case At:return Object(m.a)(Object(m.a)({},e),{},{open:t.open});case _t:return Object(m.a)(Object(m.a)({},e),{},{addBucketName:t.name});case It:return Object(m.a)(Object(m.a)({},e),{},{addBucketVersioningEnabled:t.versioned});case Lt:return Object(m.a)(Object(m.a)({},e),{},{addBucketLockingEnabled:t.locking});case Dt:return Object(m.a)(Object(m.a)({},e),{},{addBucketQuotaEnabled:t.quota});case Ft:return Object(m.a)(Object(m.a)({},e),{},{addBucketQuotaType:t.quotaType});case Mt:return Object(m.a)(Object(m.a)({},e),{},{addBucketQuotaSize:t.quotaSize});case Rt:return Object(m.a)(Object(m.a)({},e),{},{addBucketQuotaUnit:t.quotaUnit});case Pt:return Object(m.a)(Object(m.a)({},e),{},{addBucketRetentionEnabled:t.retention});case zt:return Object(m.a)(Object(m.a)({},e),{},{addBucketRetentionMode:t.retentionMode});case Kt:return Object(m.a)(Object(m.a)({},e),{},{addBucketRetentionUnit:t.retentionUnit});case Ut:return Object(m.a)(Object(m.a)({},e),{},{addBucketRetentionValidity:t.retentionValidity});case Wt:return Object(m.a)(Object(m.a)({},e),{},{bucketDetails:Object(m.a)(Object(m.a)({},e.bucketDetails),{},{selectedTab:t.tab})});case Bt:return Object(m.a)(Object(m.a)({},e),{},{addBucketName:"",addBucketVersioningEnabled:!1,addBucketLockingEnabled:!1,addBucketQuotaEnabled:!1,addBucketQuotaType:"hard",addBucketQuotaSize:"1",addBucketQuotaUnit:"TiB",addBucketRetentionEnabled:!1,addBucketRetentionMode:"compliance",addBucketRetentionUnit:"days",addBucketRetentionValidity:1});default:return e}},objectBrowser:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rj,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case gd:var n=[].concat(Object(st.a)(e.routesList),[{route:t.route,label:t.label,type:t.routeType}]);return j.push(t.route),Object(m.a)(Object(m.a)({},e),{},{routesList:n});case xd:return Object(m.a)(Object(m.a)({},e),{},{routesList:[].concat(ij)});case vd:var a=e.routesList.findIndex((function(e){return e.route===t.toRoute}))+1,c=e.routesList.slice(0,a);return Object(m.a)(Object(m.a)({},e),{},{routesList:c});case yd:var i=t.currentRoute.split("/"),r=[],o=ij[0].route;i.forEach((function(e){""!==e&&"object-browser"!==e&&(o="".concat(o,"/").concat(e),r.push({route:o,label:e,type:"path"}))}));var s=[].concat(ij,r);return Object(m.a)(Object(m.a)({},e),{},{routesList:s});case Sd:var l=Object(st.a)(e.routesList),d=e.routesList[e.routesList.length-1].route,u=t.newRoute.split("/");return u.forEach((function(e){var t=e.trim();if(""!==t){var n={route:d="".concat(d,"/").concat(t),label:t,type:"path"};l.push(n)}})),j.push(d),Object(m.a)(Object(m.a)({},e),{},{routesList:l});case Cd:var b=e.routesList,h=b.slice(-1)[0];"path"===h.type&&(h.type="file");var p=[].concat(Object(st.a)(b.slice(0,-1)),[h]);return Object(m.a)(Object(m.a)({},e),{},{routesList:p});case kd:var O=Object(st.a)(e.downloadingFiles);return O.push(t.path),Object(m.a)(Object(m.a)({},e),{},{downloadingFiles:Object(st.a)(O)});case wd:var f=e.downloadingFiles.filter((function(e){return e!==t.path}));return Object(m.a)(Object(m.a)({},e),{},{downloadingFiles:Object(st.a)(f)});case Nd:var g=Object(m.a)(Object(m.a)({},e.rewind),{},{rewindEnabled:t.state,bucketToRewind:t.bucket,dateToRewind:t.dateRewind});return Object(m.a)(Object(m.a)({},e),{},{rewind:g});case Td:var x={rewindEnabled:!1,bucketToRewind:"",dateToRewind:null};return Object(m.a)(Object(m.a)({},e),{},{rewind:x});default:return e}},healthInfo:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tj,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case fb:return Object(m.a)(Object(m.a)({},e),{},{message:t.message});case gb:return Object(m.a)(Object(m.a)({},e),{},{message:{}});default:return e}},tenants:function(){var e,t,n,a,c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:lj,i=arguments.length>1?arguments[1]:void 0,r=Object(m.a)({},c);switch(i.type){case Ps:return r.createTenant.page=i.page,Object(m.a)({},r);case zs:return r.createTenant.advancedModeOn=i.state,Object(m.a)({},r);case Ks:if(sj()(r.createTenant.fields,"".concat(i.pageName,".").concat(i.field))){var o=X()(r.createTenant.fields,"".concat(i.pageName),{}),s={};s[i.field]=i.value;var l=Object(m.a)(Object(m.a)({},o),s);return r.createTenant.fields[i.pageName]=Object(m.a)({},l),Object(m.a)({},r)}return c;case Us:var d=c.createTenant.validPages;if(i.valid)d.includes(i.pageName)||(d.push(i.pageName),r.createTenant.validPages=Object(st.a)(d));else{var u=d.filter((function(e){return e!==i.pageName}));r.createTenant.validPages=Object(st.a)(u)}return Object(m.a)({},r);case Gs:var b=Object(m.a)(Object(m.a)({},c),{},{createTenant:Object(m.a)(Object(m.a)({},c.createTenant),{},{storageClasses:i.storageClasses})});return Object(m.a)({},b);case qs:var j=[].concat(Object(st.a)(c.createTenant.certificates.minioCertificates),[{id:Date.now().toString(),key:"",cert:"",encoded_key:"",encoded_cert:""}]);return r.createTenant.certificates.minioCertificates=Object(st.a)(j),Object(m.a)({},r);case Vs:var h=c.createTenant.certificates.minioCertificates,p=h.map((function(e){var t;return e.id===i.id?Object(m.a)(Object(m.a)({},e),{},(t={},Object(Ne.a)(t,i.key,i.fileName),Object(Ne.a)(t,"encoded_".concat(i.key),i.value),t)):e}));return r.createTenant.certificates.minioCertificates=Object(st.a)(p),Object(m.a)({},r);case Hs:var O=c.createTenant.certificates.minioCertificates;if(O.length>1){var f=O.filter((function(e){return e.id!==i.id}));return r.createTenant.certificates.minioCertificates=Object(st.a)(f),Object(m.a)({},r)}return Object(m.a)({},c);case Ys:var g=[].concat(Object(st.a)(c.createTenant.certificates.caCertificates),[{id:Date.now().toString(),key:"",cert:"",encoded_key:"",encoded_cert:""}]);return r.createTenant.certificates.caCertificates=Object(st.a)(g),Object(m.a)({},r);case Qs:var x=c.createTenant.certificates.caCertificates,v=x.map((function(e){var t;return e.id===i.id?Object(m.a)(Object(m.a)({},e),{},(t={},Object(Ne.a)(t,i.key,i.fileName),Object(Ne.a)(t,"encoded_".concat(i.key),i.value),t)):e}));return r.createTenant.certificates.caCertificates=Object(st.a)(v),Object(m.a)({},r);case Zs:var y=c.createTenant.certificates.caCertificates;if(y.length>1){var S=y.filter((function(e){return e.id!==i.id}));return r.createTenant.certificates.caCertificates=Object(st.a)(S),Object(m.a)({},r)}return Object(m.a)({},c);case Js:var C=c.createTenant.certificates.consoleCertificate;return r.createTenant.certificates.consoleCertificate=Object(m.a)(Object(m.a)({},C),{},(e={},Object(Ne.a)(e,i.key,i.fileName),Object(Ne.a)(e,"encoded_".concat(i.key),i.value),e)),Object(m.a)({},r);case $s:var k=[].concat(Object(st.a)(c.createTenant.certificates.consoleCaCertificates),[{id:Date.now().toString(),key:"",cert:"",encoded_key:"",encoded_cert:""}]);return r.createTenant.certificates.consoleCaCertificates=Object(st.a)(k),Object(m.a)({},r);case Xs:var w=c.createTenant.certificates.consoleCaCertificates,N=w.map((function(e){var t;return e.id===i.id?Object(m.a)(Object(m.a)({},e),{},(t={},Object(Ne.a)(t,i.key,i.fileName),Object(Ne.a)(t,"encoded_".concat(i.key),i.value),t)):e}));return r.createTenant.certificates.consoleCaCertificates=Object(st.a)(N),Object(m.a)({},r);case el:var T=c.createTenant.certificates.consoleCaCertificates;if(T.length>1){var E=T.filter((function(e){return e.id!==i.id}));return r.createTenant.certificates.consoleCaCertificates=Object(st.a)(E),Object(m.a)({},r)}return Object(m.a)({},c);case tl:var A=c.createTenant.certificates.serverCertificate;return r.createTenant.certificates.serverCertificate=Object(m.a)(Object(m.a)({},A),{},(t={},Object(Ne.a)(t,i.key,i.fileName),Object(Ne.a)(t,"encoded_".concat(i.key),i.value),t)),Object(m.a)({},r);case nl:var _=c.createTenant.certificates.clientCertificate;return r.createTenant.certificates.clientCertificate=Object(m.a)(Object(m.a)({},_),{},(n={},Object(Ne.a)(n,i.key,i.fileName),Object(Ne.a)(n,"encoded_".concat(i.key),i.value),n)),Object(m.a)({},r);case al:var I=c.createTenant.certificates.vaultCertificate;return r.createTenant.certificates.vaultCertificate=Object(m.a)(Object(m.a)({},I),{},(a={},Object(Ne.a)(a,i.key,i.fileName),Object(Ne.a)(a,"encoded_".concat(i.key),i.value),a)),Object(m.a)({},r);case cl:var L=c.createTenant.certificates.vaultCA;return r.createTenant.certificates.vaultCA=Object(m.a)(Object(m.a)({},L),{},{cert:i.fileName,encoded_cert:i.value}),Object(m.a)({},r);case il:var D=c.createTenant.certificates.gemaltoCA;return r.createTenant.certificates.gemaltoCA=Object(m.a)(Object(m.a)({},D),{},{cert:i.fileName,encoded_cert:i.value}),Object(m.a)({},r);case Ws:return Object(m.a)(Object(m.a)({},c),{},{createTenant:{page:0,validPages:[],advancedModeOn:!1,storageClasses:[],limitSize:{},fields:{nameTenant:{tenantName:"",namespace:"",selectedStorageClass:""},configure:{customImage:!1,imageName:"",consoleImage:"",customDockerhub:!1,imageRegistry:"",imageRegistryUsername:"",imageRegistryPassword:"",exposeMinIO:!0,exposeConsole:!0,logSearchCustom:!1,prometheusCustom:!1,logSearchVolumeSize:"5",logSearchSizeFactor:"Gi",logSearchSelectedStorageClass:"",logSearchImage:"",kesImage:"",logSearchPostgresImage:"",prometheusVolumeSize:"5",prometheusSizeFactor:"Gi",prometheusSelectedStorageClass:"",prometheusImage:""},identityProvider:{idpSelection:"Built-in",accessKeys:[pl(16)],secretKeys:[pl(32)],openIDURL:"",openIDClientID:"",openIDSecretID:"",ADURL:"",ADSkipTLS:!1,ADServerInsecure:!1,ADUserNameFilter:"",ADGroupBaseDN:"",ADGroupSearchFilter:"",ADNameAttribute:""},security:{enableAutoCert:!0,enableCustomCerts:!1,enableTLS:!0},encryption:{enableEncryption:!1,encryptionType:"vault",gemaltoEndpoint:"",gemaltoToken:"",gemaltoDomain:"",gemaltoRetry:"0",awsEndpoint:"",awsRegion:"",awsKMSKey:"",awsAccessKey:"",awsSecretKey:"",awsToken:"",vaultEndpoint:"",vaultEngine:"",vaultNamespace:"",vaultPrefix:"",vaultAppRoleEngine:"",vaultId:"",vaultSecret:"",vaultRetry:"0",vaultPing:"0",gcpProjectID:"",gcpEndpoint:"",gcpClientEmail:"",gcpClientID:"",gcpPrivateKeyID:"",gcpPrivateKey:"",enableCustomCertsForKES:!1},tenantSize:{volumeSize:"100",sizeFactor:"Gi",drivesPerServer:"1",nodes:"4",memoryNode:"2",ecParity:"",ecParityChoices:[],cleanECChoices:[],maxAllocableMemo:0,memorySize:{error:"",limit:0,request:0},distribution:{error:"",nodes:0,persistentVolumes:0,disks:0,volumePerDisk:0},ecParityCalc:{error:0,defaultEC:"",erasureCodeSet:0,maxEC:"",rawCapacity:"0",storageFactors:[]},limitSize:{}},affinity:{nodeSelectorLabels:"",podAffinity:"default",withPodAntiAffinity:!0}},certificates:{minioCertificates:[{id:Date.now().toString(),key:"",cert:"",encoded_key:"",encoded_cert:""}],caCertificates:[{id:Date.now().toString(),key:"",cert:"",encoded_key:"",encoded_cert:""}],consoleCaCertificates:[{id:Date.now().toString(),key:"",cert:"",encoded_key:"",encoded_cert:""}],consoleCertificate:{id:"console_cert_pair",key:"",cert:"",encoded_key:"",encoded_cert:""},serverCertificate:{id:"encryptionServerCertificate",key:"",cert:"",encoded_key:"",encoded_cert:""},clientCertificate:{id:"encryptionClientCertificate",key:"",cert:"",encoded_key:"",encoded_cert:""},vaultCertificate:{id:"encryptionVaultCertificate",key:"",cert:"",encoded_key:"",encoded_cert:""},vaultCA:{id:"encryptionVaultCA",key:"",cert:"",encoded_key:"",encoded_cert:""},gemaltoCA:{id:"encryptionGemaltoCA",key:"",cert:"",encoded_key:"",encoded_cert:""}}}});case rl:var F=Object(m.a)(Object(m.a)({},c.tenantDetails),{},{loadingTenant:i.state});return Object(m.a)(Object(m.a)({},c),{},{tenantDetails:Object(m.a)({},F)});case ol:var M=Object(m.a)(Object(m.a)({},c.tenantDetails),{},{currentTenant:i.name,currentNamespace:i.namespace});return Object(m.a)(Object(m.a)({},c),{},{tenantDetails:Object(m.a)({},M)});case sl:var R=null;i.tenant&&(R={tenantInfo:Object(m.a)({},i.tenant)});var B=Object(m.a)(Object(m.a)({},c.tenantDetails),R);return Object(m.a)(Object(m.a)({},c),{},{tenantDetails:Object(m.a)({},B)});case ll:var P=Object(m.a)(Object(m.a)({},c.tenantDetails),{},{currentTab:i.tab});return Object(m.a)(Object(m.a)({},c),{},{tenantDetails:Object(m.a)({},P)});default:return c}},directCSI:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:dj,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Nb:if(""!==t.driveName){var n=Object(m.a)({},e);return n.selectedDrive=t.driveName,n}return e;default:return e}}}),bj=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||Zb.c;Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));var jj=n(673),hj=(n(581),n(582),n(583),n(584),n(358)),mj=Object(hj.a)({palette:{primary:{light:"#073052",main:"#081C42",dark:"#05122B",contrastText:"#fff"},secondary:{light:"#ff7961",main:"#f44336",dark:"#ba000d",contrastText:"#000"},error:{light:"#e03a48",main:"#dc1f2e",contrastText:"#ffffff"},grey:{100:"#f0f0f0",200:"#e6e6e6",300:"#cccccc",400:"#999999",500:"#8c8c8c",600:"#737373",700:"#666666",800:"#4d4d4d",900:"#333333"},background:{default:"#F4F4F4"}},typography:{fontFamily:["Lato","sans-serif"].join(","),h1:{fontWeight:"bold",color:"#081C42"},h2:{fontWeight:"bold",color:"#081C42"},h3:{fontWeight:"bold",color:"#081C42"},h4:{fontWeight:"bold",color:"#081C42"},h5:{fontWeight:"bold",color:"#081C42"},h6:{fontWeight:"bold",color:"#000000"}},overrides:{MuiButton:{root:{borderRadius:3,color:"white",height:40,padding:"0 20px",fontSize:14,fontWeight:600,boxShadow:"none","& .MuiSvgIcon-root":{maxHeight:18},"&.MuiButton-contained.Mui-disabled":{backgroundColor:"#EAEDEE",fontWeight:600,color:"#767676"},"& .MuiButton-iconSizeMedium > *:first-child":{fontSize:12}}}}}),pj=Object(E.a)({"@global":{".MuiButton-contained":{fontSize:"14px",textTransform:"capitalize",padding:"16px 25px 16px 25px",borderRadius:3},".MuiButton-sizeSmall":{padding:"4px 10px",fontSize:"0.8125rem"},".MuiTableCell-head":{borderRadius:"3px 3px 0px 0px",fontSize:13},".MuiPaper-root":{borderRadius:3},".MuiDrawer-paperAnchorDockedLeft":{borderRight:0},".MuiDrawer-root":{"& .MuiPaper-root":{borderRadius:0}}}})((function(){return null}));r.a.render(Object(Se.jsxs)(o.a,{store:Object(Zb.d)(uj,bj(Object(Zb.a)(Jb.a))),children:[Object(Se.jsx)(pj,{}),Object(Se.jsx)(jj.a,{theme:mj,children:Object(Se.jsx)(Qb,{})})]}),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()}))}},[[585,1,2]]]);
|
|
//# sourceMappingURL=main.a608e767.chunk.js.map
|